[FFmpeg-devel] [RFC] AAC Encoder

Kostya kostya.shishkov
Sun Aug 24 06:33:56 CEST 2008


On Sat, Aug 23, 2008 at 08:39:19PM +0200, Michael Niedermayer wrote:
> > the code was
> > for(i = 1; i < info->num_windows; i++)
> >     put_bits(&s->pb, 1, info->group_len[i]);
> > 
> > why can it not be
> > for(i = 1; i < info->num_windows; i++)
> >     put_bits(&s->pb, 1, !!info->group_len[i]);
> > 
> > ?
> > 
> > group_len here can be the actual lens
> 
> ping, this is currently blocking quite a few hunks in your patch.
> I wont forget about it, nor will i skip going over all previous reviews
> at the end to ensure nothing has been forgotten.

There could be 1-8 window groups (now it's 3 or 4 but I'll implement a
better grouping eventually), and the standards says encoder
should always write 7 bits indicating whether window n+1 starts a new
window group or not (since window 0 is always a start window), so each
window group length is represented by a variable number of bits,
hence the loop in the form you see in my code.

And I did representing group lengths as in bitstream (if(!group_len[]) continue),
you didn't like it either.
 
> [...]
> 
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> No great genius has ever existed without some touch of madness. -- Aristotle




More information about the ffmpeg-devel mailing list