|
|
@ -481,9 +481,16 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = { |
|
|
|
{ 0x320D, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x03,0x02,0x05,0x00,0x00,0x00}}, /* Video Line Map */ |
|
|
|
{ 0x320D, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x03,0x02,0x05,0x00,0x00,0x00}}, /* Video Line Map */ |
|
|
|
{ 0x3203, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x02,0x00,0x00,0x00}}, /* Stored Width */ |
|
|
|
{ 0x3203, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x02,0x00,0x00,0x00}}, /* Stored Width */ |
|
|
|
{ 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ |
|
|
|
{ 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ |
|
|
|
|
|
|
|
{ 0x3216, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x03,0x02,0x08,0x00,0x00,0x00}}, /* Stored F2 Offset */ |
|
|
|
|
|
|
|
{ 0x3205, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x08,0x00,0x00,0x00}}, /* Sampled Width */ |
|
|
|
|
|
|
|
{ 0x3204, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x07,0x00,0x00,0x00}}, /* Sampled Height */ |
|
|
|
|
|
|
|
{ 0x3206, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x09,0x00,0x00,0x00}}, /* Sampled X Offset */ |
|
|
|
|
|
|
|
{ 0x3207, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0A,0x00,0x00,0x00}}, /* Sampled Y Offset */ |
|
|
|
{ 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */ |
|
|
|
{ 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */ |
|
|
|
{ 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ |
|
|
|
{ 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ |
|
|
|
|
|
|
|
{ 0x320A, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0D,0x00,0x00,0x00}}, /* Display X offset */ |
|
|
|
{ 0x320B, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0E,0x00,0x00,0x00}}, /* Presentation Y offset */ |
|
|
|
{ 0x320B, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0E,0x00,0x00,0x00}}, /* Presentation Y offset */ |
|
|
|
|
|
|
|
{ 0x3217, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x03,0x02,0x07,0x00,0x00,0x00}}, /* Display F2 offset */ |
|
|
|
{ 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ |
|
|
|
{ 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ |
|
|
|
{ 0x3210, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x02,0x01,0x01,0x01,0x02,0x00}}, /* Transfer characteristic */ |
|
|
|
{ 0x3210, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x02,0x01,0x01,0x01,0x02,0x00}}, /* Transfer characteristic */ |
|
|
|
{ 0x3213, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x18,0x01,0x02,0x00,0x00,0x00,0x00}}, /* Image Start Offset */ |
|
|
|
{ 0x3213, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x18,0x01,0x02,0x00,0x00,0x00,0x00}}, /* Image Start Offset */ |
|
|
@ -1173,13 +1180,15 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke |
|
|
|
int stored_height = (st->codecpar->height+15)/16*16; |
|
|
|
int stored_height = (st->codecpar->height+15)/16*16; |
|
|
|
int display_height; |
|
|
|
int display_height; |
|
|
|
int f1, f2; |
|
|
|
int f1, f2; |
|
|
|
unsigned desc_size = size+8+8+8+8+8+8+8+5+16+4+12+20+5 + 6; |
|
|
|
unsigned desc_size = size+8+8+8+8+8+8+8+5+16+4+12+20+5 + 5*8 + 6; |
|
|
|
UID transfer_ul = {0}; |
|
|
|
UID transfer_ul = {0}; |
|
|
|
|
|
|
|
|
|
|
|
if (sc->interlaced && sc->field_dominance) |
|
|
|
if (sc->interlaced && sc->field_dominance) |
|
|
|
desc_size += 5; |
|
|
|
desc_size += 5; |
|
|
|
if (sc->signal_standard) |
|
|
|
if (sc->signal_standard) |
|
|
|
desc_size += 5; |
|
|
|
desc_size += 5; |
|
|
|
|
|
|
|
if (sc->interlaced) |
|
|
|
|
|
|
|
desc_size += 8; |
|
|
|
if (sc->v_chroma_sub_sample) |
|
|
|
if (sc->v_chroma_sub_sample) |
|
|
|
desc_size += 8; |
|
|
|
desc_size += 8; |
|
|
|
if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED) |
|
|
|
if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED) |
|
|
@ -1211,6 +1220,22 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke |
|
|
|
avio_wb32(pb, 0); |
|
|
|
avio_wb32(pb, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Sampled width
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3205); |
|
|
|
|
|
|
|
avio_wb32(pb, st->codecpar->width); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Samples height
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3204); |
|
|
|
|
|
|
|
avio_wb32(pb, st->codecpar->height>>sc->interlaced); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Sampled X Offset
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3206); |
|
|
|
|
|
|
|
avio_wb32(pb, 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Sampled Y Offset
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3207); |
|
|
|
|
|
|
|
avio_wb32(pb, 0); |
|
|
|
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3209); |
|
|
|
mxf_write_local_tag(pb, 4, 0x3209); |
|
|
|
avio_wb32(pb, st->codecpar->width); |
|
|
|
avio_wb32(pb, st->codecpar->width); |
|
|
|
|
|
|
|
|
|
|
@ -1224,10 +1249,20 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke |
|
|
|
mxf_write_local_tag(pb, 4, 0x3208); |
|
|
|
mxf_write_local_tag(pb, 4, 0x3208); |
|
|
|
avio_wb32(pb, display_height>>sc->interlaced); |
|
|
|
avio_wb32(pb, display_height>>sc->interlaced); |
|
|
|
|
|
|
|
|
|
|
|
// presentation Y offset
|
|
|
|
// display X offset
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x320A); |
|
|
|
|
|
|
|
avio_wb32(pb, 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// display Y offset
|
|
|
|
mxf_write_local_tag(pb, 4, 0x320B); |
|
|
|
mxf_write_local_tag(pb, 4, 0x320B); |
|
|
|
avio_wb32(pb, (st->codecpar->height - display_height)>>sc->interlaced); |
|
|
|
avio_wb32(pb, (st->codecpar->height - display_height)>>sc->interlaced); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sc->interlaced) { |
|
|
|
|
|
|
|
//Display F2 Offset
|
|
|
|
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3217); |
|
|
|
|
|
|
|
avio_wb32(pb, -((st->codecpar->height - display_height)&1)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// component depth
|
|
|
|
// component depth
|
|
|
|
mxf_write_local_tag(pb, 4, 0x3301); |
|
|
|
mxf_write_local_tag(pb, 4, 0x3301); |
|
|
|
avio_wb32(pb, sc->component_depth); |
|
|
|
avio_wb32(pb, sc->component_depth); |
|
|
|