summaryrefslogtreecommitdiffstats
path: root/libavcodec/utvideodec.c
diff options
context:
space:
mode:
authorStephen Hutchinson <qyot27@gmail.com>2013-06-09 08:08:04 -0400
committerMichael Niedermayer <michaelni@gmx.at>2013-06-10 10:15:13 +0200
commit3f54547709c22e3e8db4f1e27ec2a285d208e156 (patch)
treecefb7f80aa4bfafb6d1559872bf48b99e4696a02 /libavcodec/utvideodec.c
parent8ed6c13fe3d7990962c10f22dc0b60dba67d7a04 (diff)
downloadffmpeg-streaming-3f54547709c22e3e8db4f1e27ec2a285d208e156.zip
ffmpeg-streaming-3f54547709c22e3e8db4f1e27ec2a285d208e156.tar.gz
utvideo: Add ULH0 and ULH2 decoding to the native decoder.
Also prevents an error since the native decoder (if enabled) is always used to probe Ut Video-encoded files, even if the user forces libutvideo to be the decoder. Without this patch, the probe would fail, and the video wouldn't get properly handed over, resulting in failure to set codec parameters. When the native decoder is disabled, libutvideo can probe and initialize decoding without issues. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utvideodec.c')
-rw-r--r--libavcodec/utvideodec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 4efad1e..7615ea1 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -512,6 +512,18 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->planes = 3;
avctx->pix_fmt = AV_PIX_FMT_YUV422P;
break;
+ case MKTAG('U', 'L', 'H', '0'):
+ c->planes = 3;
+ avctx->color_primaries = AVCOL_PRI_BT709;
+ avctx->colorspace = AVCOL_SPC_BT709;
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P;
+ break;
+ case MKTAG('U', 'L', 'H', '2'):
+ c->planes = 3;
+ avctx->color_primaries = AVCOL_PRI_BT709;
+ avctx->colorspace = AVCOL_SPC_BT709;
+ avctx->pix_fmt = AV_PIX_FMT_YUV422P;
+ break;
default:
av_log(avctx, AV_LOG_ERROR, "Unknown Ut Video FOURCC provided (%08X)\n",
avctx->codec_tag);
OpenPOWER on IntegriCloud