]> git.sesse.net Git - ffmpeg/commitdiff
utvideo: Add ULH0 and ULH2 decoding to the native decoder.
authorStephen Hutchinson <qyot27@gmail.com>
Sun, 9 Jun 2013 12:08:04 +0000 (08:08 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Jun 2013 08:15:13 +0000 (10:15 +0200)
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>
libavcodec/utvideodec.c

index 4efad1e72289452d17c758f36de3324939a1baf3..7615ea18faff5e92e9e32a5d6c01e6c4ba888031 100644 (file)
@@ -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);