summaryrefslogtreecommitdiff
path: root/libavcodec/libutvideodec.cpp
diff options
context:
space:
mode:
authorStephen Hutchinson <qyot27@gmail.com>2013-06-09 08:08:03 -0400
committerMichael Niedermayer <michaelni@gmx.at>2013-06-10 10:12:15 +0200
commit8ed6c13fe3d7990962c10f22dc0b60dba67d7a04 (patch)
tree525a2af88d45cc62cda71664add32ecf7e470e3b /libavcodec/libutvideodec.cpp
parent0047da071ed18318e87b6e59d7442f37e24f5678 (diff)
downloadffmpeg-8ed6c13fe3d7990962c10f22dc0b60dba67d7a04.tar.gz
libutvideo: Add ULH0 and ULH2 decoding when using version 13.0.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libutvideodec.cpp')
-rw-r--r--libavcodec/libutvideodec.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp
index bc491e2329..eadf4a145d 100644
--- a/libavcodec/libutvideodec.cpp
+++ b/libavcodec/libutvideodec.cpp
@@ -21,7 +21,8 @@
/**
* @file
* Known FOURCCs:
- * 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA)
+ * 'ULY0' (YCbCr 4:2:0), 'ULY2' (YCbCr 4:2:2), 'ULRG' (RGB), 'ULRA' (RGBA),
+ * 'ULH0' (YCbCr 4:2:0 BT.709), 'ULH2' (YCbCr 4:2:2 BT.709)
*/
extern "C" {
@@ -51,6 +52,20 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
/* Pick format based on FOURCC */
switch (avctx->codec_tag) {
+#ifdef UTV_BT709
+ case MKTAG('U', 'L', 'H', '0'):
+ avctx->pix_fmt = AV_PIX_FMT_YUV420P;
+ avctx->color_primaries = AVCOL_PRI_BT709;
+ avctx->colorspace = AVCOL_SPC_BT709;
+ format = UTVF_YV12;
+ break;
+ case MKTAG('U', 'L', 'H', '2'):
+ avctx->pix_fmt = AV_PIX_FMT_YUYV422;
+ avctx->color_primaries = AVCOL_PRI_BT709;
+ avctx->colorspace = AVCOL_SPC_BT709;
+ format = UTVF_YUY2;
+ break;
+#endif
case MKTAG('U', 'L', 'Y', '0'):
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
format = UTVF_YV12;