From 34210e8df1458da556998ad6bbcabc78f4d15ffb Mon Sep 17 00:00:00 2001 From: Philip de Nier Date: Tue, 28 Feb 2012 14:16:39 +0000 Subject: mxfdec: set pixel format for cdci picture formats The properties of the CDCI Descriptor are insufficient to specify the pixel format for uncompressed picture data. SMPTE 377-1 and RP224v10 have defined a set of picture coding labels to indicate what formatting was used. This patch uses 2 labels to detect UYVY422 or YUYV422 pixel formats. It defaults to UYVY422 for 8-bit 4:2:2 pictures to support files that were created before the coding labels were introduced ~2008 The codec pix_fmt default was changed from 0 (PIX_FMT_YUV420P) to -1 (PIX_FMT_NONE) Reviewed-by: Baptiste Coudurier Signed-off-by: Michael Niedermayer --- libavformat/mxf.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libavformat/mxf.c') diff --git a/libavformat/mxf.c b/libavformat/mxf.c index c40197e9c6..a02701a8c5 100644 --- a/libavformat/mxf.c +++ b/libavformat/mxf.c @@ -56,6 +56,12 @@ const MXFCodecUL ff_mxf_codec_uls[] = { { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE }, }; +const MXFCodecUL ff_mxf_pixel_format_uls[] = { + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x01 }, 16, PIX_FMT_UYVY422 }, + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x02 }, 16, PIX_FMT_YUYV422 }, + { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, PIX_FMT_NONE }, +}; + static const struct { enum PixelFormat pix_fmt; const char data[16]; -- cgit v1.2.1