aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-04-18 00:09:00 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-05-08 23:02:58 +0200
commitc35ca7e01c887bb32600782668074929e85b2943 (patch)
tree30d27ba1bc6366cfdb155702d0c90d9e50b2ea66
parent530ac1e50bd7f99e5cedca40a7a94ac7f49d9902 (diff)
downloadffmpeg-c35ca7e01c887bb32600782668074929e85b2943.tar.gz
avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mxfenc.c18
-rw-r--r--tests/ref/fate/copy-trac49142
-rw-r--r--tests/ref/fate/mxf-reel_name2
-rw-r--r--tests/ref/fate/time_base2
-rw-r--r--tests/ref/lavf/mxf6
-rw-r--r--tests/ref/lavf/mxf_d102
-rw-r--r--tests/ref/lavf/mxf_dv252
-rw-r--r--tests/ref/lavf/mxf_dvcpro502
-rw-r--r--tests/ref/lavf/mxf_opatom2
-rw-r--r--tests/ref/lavf/mxf_opatom_audio2
10 files changed, 29 insertions, 11 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index f3122cbc8b..052e687926 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -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);
diff --git a/tests/ref/fate/copy-trac4914 b/tests/ref/fate/copy-trac4914
index 6bc8f1c4e3..fedff45105 100644
--- a/tests/ref/fate/copy-trac4914
+++ b/tests/ref/fate/copy-trac4914
@@ -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
diff --git a/tests/ref/fate/mxf-reel_name b/tests/ref/fate/mxf-reel_name
index 76c1c3c8df..03dab69544 100644
--- a/tests/ref/fate/mxf-reel_name
+++ b/tests/ref/fate/mxf-reel_name
@@ -1 +1 @@
-d0a2d75af1c4ba8c96651ec366a50e49
+61f2fe7aa57ae3d64db1e2bb6c2acb16
diff --git a/tests/ref/fate/time_base b/tests/ref/fate/time_base
index 488d17ef87..c2e9c40a3b 100644
--- a/tests/ref/fate/time_base
+++ b/tests/ref/fate/time_base
@@ -1 +1 @@
-7a9d8ea19bf2f14f1af680c050c88d0d
+f8bb8b13d6c051aa29cc79486f8f555f
diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf
index 6f1b99ad99..590f7228a6 100644
--- a/tests/ref/lavf/mxf
+++ b/tests/ref/lavf/mxf
@@ -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
diff --git a/tests/ref/lavf/mxf_d10 b/tests/ref/lavf/mxf_d10
index bfed6a3198..c81fc512fd 100644
--- a/tests/ref/lavf/mxf_d10
+++ b/tests/ref/lavf/mxf_d10
@@ -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
diff --git a/tests/ref/lavf/mxf_dv25 b/tests/ref/lavf/mxf_dv25
index 05ac619356..27bc9066ae 100644
--- a/tests/ref/lavf/mxf_dv25
+++ b/tests/ref/lavf/mxf_dv25
@@ -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
diff --git a/tests/ref/lavf/mxf_dvcpro50 b/tests/ref/lavf/mxf_dvcpro50
index e9c73d6c71..94fa092af0 100644
--- a/tests/ref/lavf/mxf_dvcpro50
+++ b/tests/ref/lavf/mxf_dvcpro50
@@ -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
diff --git a/tests/ref/lavf/mxf_opatom b/tests/ref/lavf/mxf_opatom
index 99c57260df..25d3347a96 100644
--- a/tests/ref/lavf/mxf_opatom
+++ b/tests/ref/lavf/mxf_opatom
@@ -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
diff --git a/tests/ref/lavf/mxf_opatom_audio b/tests/ref/lavf/mxf_opatom_audio
index 9c61bedb70..74723f5e77 100644
--- a/tests/ref/lavf/mxf_opatom_audio
+++ b/tests/ref/lavf/mxf_opatom_audio
@@ -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