[FFmpeg-cvslog] r19336 - in trunk: libavformat/mxfenc.c tests/lavf.regression.ref

bcoudurier subversion
Sat Jul 4 09:49:12 CEST 2009


Author: bcoudurier
Date: Sat Jul  4 09:49:12 2009
New Revision: 19336

Log:
write profile and level local tag in mpeg descriptor

Modified:
   trunk/libavformat/mxfenc.c
   trunk/tests/lavf.regression.ref

Modified: trunk/libavformat/mxfenc.c
==============================================================================
--- trunk/libavformat/mxfenc.c	Sat Jul  4 09:46:58 2009	(r19335)
+++ trunk/libavformat/mxfenc.c	Sat Jul  4 09:49:12 2009	(r19336)
@@ -298,6 +298,7 @@ static const MXFLocalTagPair mxf_local_t
     { 0x3F0A, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x04,0x04,0x02,0x05,0x00,0x00,0x00}}, /* Index Entry Array */
     // MPEG video Descriptor
     { 0x8000, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x0B,0x00,0x00}}, /* BitRate */
+    { 0x8007, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x0A,0x00,0x00}}, /* ProfileAndLevel */
     // Wave Audio Essence Descriptor
     { 0x3D09, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x03,0x05,0x00,0x00,0x00}}, /* Average Bytes Per Second */
     { 0x3D0A, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x02,0x01,0x00,0x00,0x00}}, /* Block Align */
@@ -855,12 +856,19 @@ static void mxf_write_cdci_desc(AVFormat
 static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st)
 {
     ByteIOContext *pb = s->pb;
+    int profile_and_level = (st->codec->profile<<4) | st->codec->level;
 
-    mxf_write_cdci_common(s, st, mxf_mpegvideo_descriptor_key, 8);
+    mxf_write_cdci_common(s, st, mxf_mpegvideo_descriptor_key, 8+5);
 
     // bit rate
     mxf_write_local_tag(pb, 4, 0x8000);
     put_be32(pb, st->codec->bit_rate);
+
+    // profile and level
+    mxf_write_local_tag(pb, 1, 0x8007);
+    if (!st->codec->profile)
+        profile_and_level |= 0x80; // escape bit
+    put_byte(pb, profile_and_level);
 }
 
 static void mxf_write_generic_sound_common(AVFormatContext *s, AVStream *st, const UID key, unsigned size)

Modified: trunk/tests/lavf.regression.ref
==============================================================================
--- trunk/tests/lavf.regression.ref	Sat Jul  4 09:46:58 2009	(r19335)
+++ trunk/tests/lavf.regression.ref	Sat Jul  4 09:49:12 2009	(r19336)
@@ -9,10 +9,10 @@ bc5e914594523f7c48f9e044c9a9c0b6 *./test
 bfdec98337e6a9d89dc648d1e65a41db *./tests/data/b-lavf.mpg
 378880 ./tests/data/b-lavf.mpg
 ./tests/data/b-lavf.mpg CRC=0xaf760568
-36ea24816444a40fa47b866a409a79b0 *./tests/data/b-lavf.mxf
+4c2cd0f62014a7c6571d8dbdf4248965 *./tests/data/b-lavf.mxf
 535097 ./tests/data/b-lavf.mxf
 ./tests/data/b-lavf.mxf CRC=0xd7ff387d
-0a7cc51de3da754ce36dffeeda290c45 *./tests/data/b-lavf.mxf_d10
+4463959da5ebd7536a579a628c4f6412 *./tests/data/b-lavf.mxf_d10
 5330989 ./tests/data/b-lavf.mxf_d10
 ./tests/data/b-lavf.mxf_d10 CRC=0xd241c8b6
 2e9bd99fbb121ae4887109e3a4169acd *./tests/data/b-lavf.ts



More information about the ffmpeg-cvslog mailing list