summaryrefslogtreecommitdiff
path: root/libavformat/mxfenc.c
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 /libavformat/mxfenc.c
parent530ac1e50bd7f99e5cedca40a7a94ac7f49d9902 (diff)
avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r--libavformat/mxfenc.c18
1 files changed, 18 insertions, 0 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);