[FFmpeg-devel] AAC decoder round 5

Michael Niedermayer michaelni
Fri Aug 8 18:33:09 CEST 2008


On Fri, Aug 08, 2008 at 02:15:36PM +0100, Robert Swain wrote:
> 2008/8/8 Michael Niedermayer <michaelni at gmx.at>:
> > On Thu, Aug 07, 2008 at 11:53:39PM +0100, Robert Swain wrote:
> >> 2008/8/7 Michael Niedermayer <michaelni at gmx.at>:
> >> >> >> +
> >> >> >> +
> >> >> >> +static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data_size, const uint8_t * buf, int buf_size) {
> >> >> >> +    AACContext * ac = avccontext->priv_data;
> >> >> >> +    GetBitContext gb;
> >> >> >> +    enum RawDataBlockID id;
> >> >> >> +    int err, tag;
> >> >> >> +
> >> >> >> +    init_get_bits(&gb, buf, buf_size*8);
> >> >> >> +
> >> >> >> +    // parse
> >> >> >> +    while ((id = get_bits(&gb, 3)) != ID_END) {
> >> >> >> +        tag = get_bits(&gb, 4);
> >> >> >> +        err = -1;
> >> >> >> +        switch (id) {
> >> >> >> +
> >> >> >
> >> >> >> +        case ID_SCE:
> >> >> >> +            if(!ac->che[ID_SCE][tag]) {
> >> >> >
> >> >> > this id / tag naming confuses the hell out of me ...
> >> >> > Both values together identify the "thing". the id here is the
> >> >> > type (channel pair / single channel / ...)
> >> >>
> >> >> Why is it confusing? As you say, the id is the type and the tag is
> >> >> (and I know you don't like this but I'm going to use it anyway because
> >> >> I'm happy with it) the instance of that type.
> >> >
> >> > Well iam not a native englishman ...
> >> > but to me id is something by which a specific individual or instance can
> >> > uniquely be identified. This isnt true here ...
> >> >
> >> > That is, the number on the license plate of a car is an ID,
> >> > Rolls Royce Phantom II is not an ID its the type or model.
> >>
> >> Hmm, I agree. In the spec it uses ID but something like element_type
> >> and element_id instead of id and tag respectively would be better,
> >> wouldn't you agree?
> >
> > yes
> 
> Should I also rename all the ID_*E in the enum? What to? ELEM_TYPE_SCE

TYPE_SCE, etc, ELEM_*E is strange when the last E stands for element


> etc? And MAX_TAGID to MAX_ELEM_ID?

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080808/dbba64cc/attachment.pgp>



More information about the ffmpeg-devel mailing list