[FFmpeg-soc] [soc]: r2505 - aac/aac.c

Robert Swain robert.swain at gmail.com
Sat Jun 21 17:53:09 CEST 2008


2008/6/21 Michael Niedermayer <michaelni at gmx.at>:
> On Sat, Jun 21, 2008 at 03:49:06PM +0200, superdump wrote:
>> Author: superdump
>> Date: Sat Jun 21 15:49:05 2008
>> New Revision: 2505
>>
>> Log:
>> Make VLC tables static and use INIT_VLC_USE_STATIC for VLC initialisation
>>
>>
>> Modified:
>>    aac/aac.c
>>
>> Modified: aac/aac.c
>> ==============================================================================
>> --- aac/aac.c (original)
>> +++ aac/aac.c Sat Jun 21 15:49:05 2008
>> @@ -65,6 +65,9 @@ DECLARE_ALIGNED_16(static float, kbd_sho
>>  DECLARE_ALIGNED_16(static float, sine_long_1024[1024]);
>>  DECLARE_ALIGNED_16(static float, sine_short_128[128]);
>>
>> +static VLC mainvlc;
>> +static VLC books[11];
>> +
>>  /**
>>   * Audio Object Types
>>   */
>> @@ -365,8 +368,6 @@ typedef struct {
>>       * @defgroup tables   Computed / setup during initialization
>>       * @{
>>       */
>> -    VLC mainvlc;
>> -    VLC books[11];
>>      MDCTContext mdct;
>>      MDCTContext mdct_small;
>>      MDCTContext *mdct_ltp;
>> @@ -813,10 +814,10 @@ static int aac_decode_init(AVCodecContex
>>          int dim = (i >= 4 ? 2 : 4);
>>          int mod = mod_cb[i], off = off_cb[i], index = 0;
>>
>> -        if(init_vlc(&ac->books[i], 6, values,
>> +        if(!books[i].table && init_vlc(&books[i], 6, values,
>>                  tmp[i].a_bits, a_bits_size, a_bits_size,
>>                  tmp[i].a_code, a_code_size, a_code_size,
>> -                0) < 0)
>> +                INIT_VLC_USE_STATIC) < 0)
>>              return -1;
>
> NO!!!
>
> INIT_VLC_STATIC or INIT_VLC_USE_NEW_STATIC
> NOT INIT_VLC_USE_STATIC
>
> RTFS:
> #define INIT_VLC_USE_STATIC 1 ///< VERY strongly deprecated and forbidden

There's no need to shout. This was a fairly recent change you made,
not all codecs have migrated and it would seem not everyone is aware
of the change you made on the 30th of May. I realise I shouldn't copy
code from other codecs without verifying that it is current.

I'll RTFS to see what the difference between INIT_VLC_STATIC and
INIT_VLC_USE_NEW_STATIC is, change my code and submit patches for the
codecs that have not had the flag changed in their code as it is such
a trivial thing to do and will only take a few seconds to change.

Rob



More information about the FFmpeg-soc mailing list