comparison mxfenc.c @ 4335:e6fb8644af02 libavformat

write display height/width tags
author bcoudurier
date Mon, 02 Feb 2009 03:35:09 +0000
parents f59a2165d042
children 87455a164f2b
comparison
equal deleted inserted replaced
4334:376664156fe2 4335:e6fb8644af02
176 // Generic Picture Essence Descriptor 176 // Generic Picture Essence Descriptor
177 { 0x320C, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Frame Layout */ 177 { 0x320C, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Frame Layout */
178 { 0x320D, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x02,0x05,0x00,0x00,0x00}}, /* Video Line Map */ 178 { 0x320D, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x03,0x02,0x05,0x00,0x00,0x00}}, /* Video Line Map */
179 { 0x3203, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x02,0x00,0x00,0x00}}, /* Stored Width */ 179 { 0x3203, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x02,0x00,0x00,0x00}}, /* Stored Width */
180 { 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ 180 { 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */
181 { 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */
182 { 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */
181 { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ 183 { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */
182 { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */ 184 { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */
183 // Generic Sound Essence Descriptor 185 // Generic Sound Essence Descriptor
184 { 0x3D02, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Locked/Unlocked */ 186 { 0x3D02, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Locked/Unlocked */
185 { 0x3D03, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x01,0x01,0x00,0x00}}, /* Audio sampling rate */ 187 { 0x3D03, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x01,0x01,0x00,0x00}}, /* Audio sampling rate */
591 ByteIOContext *pb = s->pb; 593 ByteIOContext *pb = s->pb;
592 int stored_height = (st->codec->height+15)/16*16; 594 int stored_height = (st->codec->height+15)/16*16;
593 AVRational dar; 595 AVRational dar;
594 int f1, f2; 596 int f1, f2;
595 597
596 mxf_write_generic_desc(pb, st, mxf_mpegvideo_descriptor_key, 133); 598 mxf_write_generic_desc(pb, st, mxf_mpegvideo_descriptor_key, 149);
597 599
598 mxf_write_local_tag(pb, 4, 0x3203); 600 mxf_write_local_tag(pb, 4, 0x3203);
599 put_be32(pb, st->codec->width); 601 put_be32(pb, st->codec->width);
600 602
601 mxf_write_local_tag(pb, 4, 0x3202); 603 mxf_write_local_tag(pb, 4, 0x3202);
602 put_be32(pb, stored_height>>sc->interlaced); 604 put_be32(pb, stored_height>>sc->interlaced);
605
606 mxf_write_local_tag(pb, 4, 0x3209);
607 put_be32(pb, st->codec->width);
608
609 mxf_write_local_tag(pb, 4, 0x3208);
610 put_be32(pb, st->codec->height>>sc->interlaced);
603 611
604 // frame layout 612 // frame layout
605 mxf_write_local_tag(pb, 1, 0x320C); 613 mxf_write_local_tag(pb, 1, 0x320C);
606 put_byte(pb, sc->interlaced); 614 put_byte(pb, sc->interlaced);
607 615