Mercurial > libavformat.hg
comparison mxfenc.c @ 4434:a75d42745d16 libavformat
write component depth and horizontal subsampling best effort local tags
author | bcoudurier |
---|---|
date | Tue, 10 Feb 2009 06:14:39 +0000 |
parents | 7ab5a6c4616b |
children | 4f96c60c9561 |
comparison
equal
deleted
inserted
replaced
4433:7ab5a6c4616b | 4434:a75d42745d16 |
---|---|
200 { 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ | 200 { 0x3202, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x02,0x01,0x00,0x00,0x00}}, /* Stored Height */ |
201 { 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */ | 201 { 0x3209, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0C,0x00,0x00,0x00}}, /* Display Width */ |
202 { 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ | 202 { 0x3208, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x0B,0x00,0x00,0x00}}, /* Display Height */ |
203 { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ | 203 { 0x320E, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x01,0x01,0x01,0x00,0x00,0x00}}, /* Aspect Ratio */ |
204 { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */ | 204 { 0x3201, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x06,0x01,0x00,0x00,0x00,0x00}}, /* Picture Essence Coding */ |
205 // CDCI Picture Essence Descriptor | |
206 { 0x3301, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x02,0x04,0x01,0x05,0x03,0x0A,0x00,0x00,0x00}}, /* Component Depth */ | |
207 { 0x3302, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x01,0x04,0x01,0x05,0x01,0x05,0x00,0x00,0x00}}, /* Horizontal Subsampling */ | |
205 // Generic Sound Essence Descriptor | 208 // Generic Sound Essence Descriptor |
206 { 0x3D02, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Locked/Unlocked */ | 209 { 0x3D02, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x01,0x04,0x00,0x00,0x00}}, /* Locked/Unlocked */ |
207 { 0x3D03, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x01,0x01,0x00,0x00}}, /* Audio sampling rate */ | 210 { 0x3D03, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x01,0x01,0x01,0x00,0x00}}, /* Audio sampling rate */ |
208 { 0x3D07, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x01,0x01,0x04,0x00,0x00,0x00}}, /* ChannelCount */ | 211 { 0x3D07, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x01,0x01,0x04,0x00,0x00,0x00}}, /* ChannelCount */ |
209 { 0x3D01, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x03,0x04,0x00,0x00,0x00}}, /* Quantization bits */ | 212 { 0x3D01, {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x04,0x04,0x02,0x03,0x03,0x04,0x00,0x00,0x00}}, /* Quantization bits */ |
646 ByteIOContext *pb = s->pb; | 649 ByteIOContext *pb = s->pb; |
647 int stored_height = (st->codec->height+15)/16*16; | 650 int stored_height = (st->codec->height+15)/16*16; |
648 AVRational dar; | 651 AVRational dar; |
649 int f1, f2; | 652 int f1, f2; |
650 | 653 |
651 mxf_write_generic_desc(s, st, mxf_mpegvideo_descriptor_key, 153+sc->interlaced*4); | 654 mxf_write_generic_desc(s, st, mxf_mpegvideo_descriptor_key, 169+sc->interlaced*4); |
652 | 655 |
653 mxf_write_local_tag(pb, 4, 0x3203); | 656 mxf_write_local_tag(pb, 4, 0x3203); |
654 put_be32(pb, st->codec->width); | 657 put_be32(pb, st->codec->width); |
655 | 658 |
656 mxf_write_local_tag(pb, 4, 0x3202); | 659 mxf_write_local_tag(pb, 4, 0x3202); |
659 mxf_write_local_tag(pb, 4, 0x3209); | 662 mxf_write_local_tag(pb, 4, 0x3209); |
660 put_be32(pb, st->codec->width); | 663 put_be32(pb, st->codec->width); |
661 | 664 |
662 mxf_write_local_tag(pb, 4, 0x3208); | 665 mxf_write_local_tag(pb, 4, 0x3208); |
663 put_be32(pb, st->codec->height>>sc->interlaced); | 666 put_be32(pb, st->codec->height>>sc->interlaced); |
667 | |
668 // component depth | |
669 mxf_write_local_tag(pb, 4, 0x3301); | |
670 put_be32(pb, 8); | |
671 | |
672 // horizontal subsampling | |
673 mxf_write_local_tag(pb, 4, 0x3302); | |
674 put_be32(pb, 2); | |
664 | 675 |
665 // bit rate | 676 // bit rate |
666 mxf_write_local_tag(pb, 4, 0x8000); | 677 mxf_write_local_tag(pb, 4, 0x8000); |
667 put_be32(pb, st->codec->bit_rate); | 678 put_be32(pb, st->codec->bit_rate); |
668 | 679 |