[FFmpeg-devel] [PATCH] attachments support in matroska demuxer

Måns Rullgård mans
Sun Jan 20 21:43:21 CET 2008


Michael Niedermayer <michaelni at gmx.at> writes:

> And irronically it [codec_tag] would also solve the hddvd h264
> problem with mpeg

How?  Without looking inside the PES payload, it is *impossible* to
distinguish these files from spec-compliant MPEG.

>> > avi doesnt have such entertaining identifer system, but uses boring 4 
>> > character codes with some similarity to the codec name and suprisingly
>> > that anarchistic system is free of colissions while the great mpeg
>> > is full of collisions.
>> 
>> Well, with AVI the problem is the opposite.  Every codec has a zillion
>> different identifiers.  This is because of fundamental misconceptions
>> in the way AVI and VFW were originally conceived.  I've discussed
>
> I just an hour ago wanted to add proper AVCodecTag tables to mpeg, guess why
> i didnt? Because mpeg has ten times more redundant identifers.
> but lets just see the code:
>     } else if (startcode >= 0x1e0 && startcode <= 0x1ef) {
> ....
>     } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
> ....
>     } else if (startcode >= 0x80 && startcode <= 0x87) {
> ....
>     } else if ((startcode >= 0x88 && startcode <= 0x8f)
> ....
>     } else if (startcode >= 0xa0 && startcode <= 0xaf) {
>         type = CODEC_TYPE_AUDIO;
>         codec_id = CODEC_ID_PCM_S16BE;
>     } else if (startcode >= 0xb0 && startcode <= 0xbf) {
>         type = CODEC_TYPE_AUDIO;
>         codec_id = CODEC_ID_MLP;
>     } else if (startcode >= 0xc0 && startcode <= 0xcf) {
>         /* Used for both AC-3 and E-AC-3 in EVOB files */
>         type = CODEC_TYPE_AUDIO;
>         codec_id = CODEC_ID_AC3;
>     } else if (startcode >= 0x20 && startcode <= 0x3f) {
>         type = CODEC_TYPE_SUBTITLE;
>         codec_id = CODEC_ID_DVD_SUBTITLE;
>     } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
>
> why has every codec such a huge range?!

I know you know why, so I'm not going to bother explaining it to you.
Besides, half of that code is for dealing with non-standard variants
of the format.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list