[FFmpeg-cvslog] r14752 - trunk/libavcodec/aacenc.c

Kostya kostya.shishkov
Thu Aug 14 18:03:20 CEST 2008


On Thu, Aug 14, 2008 at 04:13:22PM +0200, Michael Niedermayer wrote:
> On Thu, Aug 14, 2008 at 07:52:29AM +0200, kostya wrote:
> > Author: kostya
> > Date: Thu Aug 14 07:52:29 2008
> > New Revision: 14752
> > 
> > Log:
> > Okayed parts of AAC encoder
> [...]
> > +#define CB_UNSIGNED 0x01    ///< coefficients are coded as absolute values
> > +#define CB_PAIRS    0x02    ///< coefficients are grouped into pairs before coding (quads by default)
> > +#define CB_ESCAPE   0x04    ///< codebook allows escapes
> > +
> > +/** spectral coefficients codebook information */
> > +static const struct {
> > +    int16_t maxval;         ///< maximum possible value
> > +     int8_t cb_num;         ///< codebook number
> > +    uint8_t flags;          ///< codebook features
> > +} aac_cb_info[] = {
> > +    {    0, -1, CB_UNSIGNED }, // zero codebook
> > +    {    1,  0, 0 },
> > +    {    1,  1, 0 },
> > +    {    2,  2, CB_UNSIGNED },
> > +    {    2,  3, CB_UNSIGNED },
> > +    {    4,  4, CB_PAIRS },
> > +    {    4,  5, CB_PAIRS },
> > +    {    7,  6, CB_PAIRS | CB_UNSIGNED },
> > +    {    7,  7, CB_PAIRS | CB_UNSIGNED },
> > +    {   12,  8, CB_PAIRS | CB_UNSIGNED },
> > +    {   12,  9, CB_PAIRS | CB_UNSIGNED },
> > +    { 8191, 10, CB_PAIRS | CB_UNSIGNED | CB_ESCAPE },
> > +    {   -1, -1, 0 }, // reserved
> > +    {   -1, -1, 0 }, // perceptual noise substitution
> > +    {   -1, -1, 0 }, // intensity out-of-phase
> > +    {   -1, -1, 0 }, // intensity in-phase
> > +};
> 
> i did not ok this
> 
> 
> [...]
> 
> > +    DECLARE_ALIGNED_16(FFTSample, output[2048]); ///< temporary buffer for MDCT input coefficients
> > +    DECLARE_ALIGNED_16(FFTSample, tmp[1024]);    ///< temporary buffer used by MDCT
> > +    int16_t* samples;                            ///< saved preprocessed input
> > +
> > +    int samplerate_index;                        ///< MPEG-4 samplerate index
> > +    const uint8_t *swb_sizes1024;                ///< scalefactor band sizes for long frame
> > +    int swb_num1024;                             ///< number of scalefactor bands for long frame
> > +    const uint8_t *swb_sizes128;                 ///< scalefactor band sizes for short frame
> > +    int swb_num128;                              ///< number of scalefactor bands for short frame
> > +
> > +    ChannelElement *cpe;                         ///< channel elements
> > +    AACPsyContext psy;                           ///< psychoacoustic model context
> > +    int last_frame;
> > +} AACEncContext;
> 
> and neither this
> 
> 
> [...]
> > +    // window init
> > +    ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
> > +    ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
> > +    ff_sine_window_init(ff_aac_sine_long_1024, 1024);
> > +    ff_sine_window_init(ff_aac_sine_short_128, 128);
> 
> i suspect i did not ok this either, because i want these shared between
> codecs so if i did ok it, it was a oversight

removed
But as for windows issue, ff_aac_kbd_* are shared between decoder and encoder,
and I will reuse global sine windows in the next round of patches.

> [...]
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Complexity theory is the science of finding the exact solution to an
> approximation. Benchmarking OTOH is finding an approximation of the exact




More information about the ffmpeg-cvslog mailing list