From ee1f7f4bf9cec6bd2da6bf97535fabce5d0ffad4 Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Tue, 10 Feb 2009 06:14:39 +0000 Subject: [PATCH] write component depth and horizontal subsampling best effort local tags Originally committed as revision 17120 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mxfenc.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 9cd5a4006..1b6205423 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -202,6 +202,9 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = { { 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */ + // CDCI Picture Essence Descriptor + { 0x3301, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x05,0x03,0x0A,0x00,0x00,0x00}}, /* Component Depth */ + { 0x3302, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x05,0x00,0x00,0x00}}, /* Horizontal Subsampling */ // Generic Sound Essence Descriptor { 0x3D02, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Locked/Unlocked */ { 0x3D03, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x01,0x01,0x00,0x00}}, /* Audio sampling rate */ @@ -648,7 +651,7 @@ static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st) AVRational dar; int f1, f2; - mxf_write_generic_desc(s, st, mxf_mpegvideo_descriptor_key, 153+sc->interlaced*4); + mxf_write_generic_desc(s, st, mxf_mpegvideo_descriptor_key, 169+sc->interlaced*4); mxf_write_local_tag(pb, 4, 0x3203); put_be32(pb, st->codec->width); @@ -662,6 +665,14 @@ static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st) mxf_write_local_tag(pb, 4, 0x3208); put_be32(pb, st->codec->height>>sc->interlaced); + // component depth + mxf_write_local_tag(pb, 4, 0x3301); + put_be32(pb, 8); + + // horizontal subsampling + mxf_write_local_tag(pb, 4, 0x3302); + put_be32(pb, 2); + // bit rate mxf_write_local_tag(pb, 4, 0x8000); put_be32(pb, st->codec->bit_rate); -- 2.34.1