avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/284/merge
Michael Niedermayer 7 years ago
parent 530ac1e50b
commit c35ca7e01c
  1. 18
      libavformat/mxfenc.c
  2. 2
      tests/ref/fate/copy-trac4914
  3. 2
      tests/ref/fate/mxf-reel_name
  4. 2
      tests/ref/fate/time_base
  5. 6
      tests/ref/lavf/mxf
  6. 2
      tests/ref/lavf/mxf_d10
  7. 2
      tests/ref/lavf/mxf_dv25
  8. 2
      tests/ref/lavf/mxf_dvcpro50
  9. 2
      tests/ref/lavf/mxf_opatom
  10. 2
      tests/ref/lavf/mxf_opatom_audio

@ -485,6 +485,8 @@ 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 */
{ 0x320B, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0E,0x00,0x00,0x00}}, /* Presentation Y offset */
{ 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */
{ 0x3213, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x18,0x01,0x02,0x00,0x00,0x00,0x00}}, /* Image Start Offset */
{ 0x3214, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x18,0x01,0x03,0x00,0x00,0x00,0x00}}, /* Image End Offset */
{ 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */
{ 0x3212, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x03,0x01,0x06,0x00,0x00,0x00}}, /* Field Dominance (Opt) */
{ 0x3215, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x05,0x01,0x13,0x00,0x00,0x00,0x00}}, /* Signal Standard */
@ -1151,6 +1153,8 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
desc_size += 8;
if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED)
desc_size += 8 * 3;
if (s->oformat == &ff_mxf_d10_muxer)
desc_size += 8 + 8 + 8;
mxf_write_generic_desc(s, st, key, desc_size);
@ -1160,6 +1164,20 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
mxf_write_local_tag(pb, 4, 0x3202);
avio_wb32(pb, stored_height>>sc->interlaced);
if (s->oformat == &ff_mxf_d10_muxer) {
//Stored F2 Offset
mxf_write_local_tag(pb, 4, 0x3216);
avio_wb32(pb, 0);
//Image Start Offset
mxf_write_local_tag(pb, 4, 0x3213);
avio_wb32(pb, 0);
//Image End Offset
mxf_write_local_tag(pb, 4, 0x3214);
avio_wb32(pb, 0);
}
mxf_write_local_tag(pb, 4, 0x3209);
avio_wb32(pb, st->codecpar->width);

@ -1,4 +1,4 @@
631ee839b737fa56b4af1d57b588696c *tests/data/fate/copy-trac4914.mxf
a3631810ebed2db905db7554e137b48e *tests/data/fate/copy-trac4914.mxf
561721 tests/data/fate/copy-trac4914.mxf
#tb 0: 1001/30000
#media_type 0: video

@ -1 +1 @@
d0a2d75af1c4ba8c96651ec366a50e49
61f2fe7aa57ae3d64db1e2bb6c2acb16

@ -1 +1 @@
7a9d8ea19bf2f14f1af680c050c88d0d
f8bb8b13d6c051aa29cc79486f8f555f

@ -1,9 +1,9 @@
27bbd27662f99181fbaa8c6b7b32aee2 *./tests/data/lavf/lavf.mxf
b522a40e24cca5b7f86c99bb5bd78060 *./tests/data/lavf/lavf.mxf
526393 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab
69ad89b94977f29fa54446680c17c43c *./tests/data/lavf/lavf.mxf
3b09745afe0bcd331666ac92e84cf6b8 *./tests/data/lavf/lavf.mxf
561721 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0xf21b1b48
375b804000535385db5f7ed748599fba *./tests/data/lavf/lavf.mxf
fe00f21d74ec5a33de0d8fb23f397e42 *./tests/data/lavf/lavf.mxf
526393 ./tests/data/lavf/lavf.mxf
./tests/data/lavf/lavf.mxf CRC=0x8dddfaab

@ -1,3 +1,3 @@
0bf4c7b8cc8d00290b151991ff8a675e *./tests/data/lavf/lavf.mxf_d10
85ce91f9d1c08072d902dae63a3d31d9 *./tests/data/lavf/lavf.mxf_d10
5332013 ./tests/data/lavf/lavf.mxf_d10
./tests/data/lavf/lavf.mxf_d10 CRC=0x6c74d488

@ -1,3 +1,3 @@
20a759ba52bbdc614f3ea448bab1eb90 *./tests/data/lavf/lavf.mxf_dv25
788d6d38bd9086a7100ad5bccb93ab59 *./tests/data/lavf/lavf.mxf_dv25
3834413 ./tests/data/lavf/lavf.mxf_dv25
./tests/data/lavf/lavf.mxf_dv25 CRC=0xbdaf7f52

@ -1,3 +1,3 @@
8b68190fc95b97e21c260d2b134bf003 *./tests/data/lavf/lavf.mxf_dvcpro50
58e2477bf49c5fa50b6f2266aafae43f *./tests/data/lavf/lavf.mxf_dvcpro50
7431213 ./tests/data/lavf/lavf.mxf_dvcpro50
./tests/data/lavf/lavf.mxf_dvcpro50 CRC=0xe3bbe4b4

@ -1,3 +1,3 @@
9e3d53baab0f805e6642500ea469682b *./tests/data/lavf/lavf.mxf_opatom
e95dc4f86864b4c3d63f81b8966077a3 *./tests/data/lavf/lavf.mxf_opatom
4717625 ./tests/data/lavf/lavf.mxf_opatom
./tests/data/lavf/lavf.mxf_opatom CRC=0xf55aa22a

@ -1,3 +1,3 @@
8e1351b9aac6292d69df2d4af42e7040 *./tests/data/lavf/lavf.mxf_opatom_audio
c0e14eec21b75875a6c898f71cbeded0 *./tests/data/lavf/lavf.mxf_opatom_audio
102969 ./tests/data/lavf/lavf.mxf_opatom_audio
./tests/data/lavf/lavf.mxf_opatom_audio CRC=0xd155c6ff

Loading…
Cancel
Save