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

Robert Swain robert.swain at gmail.com
Sat Jun 21 17:34:06 CEST 2008


2008/6/21 Michael Niedermayer <michaelni at gmx.at>:
> On Sat, Jun 21, 2008 at 03:37:37PM +0200, superdump wrote:
>> Author: superdump
>> Date: Sat Jun 21 15:37:36 2008
>> New Revision: 2504
>>
>> Log:
>> Remove _minus1 suffix from num_pulse variable to be consistent with spec
>>
>>
>> Modified:
>>    aac/aac.c
>>
>> Modified: aac/aac.c
>> ==============================================================================
>> --- aac/aac.c (original)
>> +++ aac/aac.c Sat Jun 21 15:37:36 2008
>> @@ -259,7 +259,7 @@ typedef struct {
>>   */
>>  typedef struct {
>>      int present;
>> -    int num_pulse_minus1;
>> +    int num_pulse;
>>      int start;
>>      int offset[4];
>>      int amp[4];
>> @@ -1065,9 +1065,9 @@ static int decode_scale_factor_data(AACC
>>
>>  static void decode_pulse_data(AACContext * ac, GetBitContext * gb, pulse_struct * pulse) {
>>      int i;
>> -    pulse->num_pulse_minus1 = get_bits(gb, 2);
>> +    pulse->num_pulse = get_bits(gb, 2);
>>      pulse->start = get_bits(gb, 6);
>> -    for (i = 0; i <= pulse->num_pulse_minus1; i++) {
>> +    for (i = 0; i <= pulse->num_pulse; i++) {
>>          pulse->offset[i] = get_bits(gb, 5);
>>          pulse->amp[i] = get_bits(gb, 4);
>
> but now it is not correct anymore
> pulse->num_pulse = get_bits(gb, 2) + 1;
> it should be i think and < instead of <=

The current code is consistent with the spec. They call the variable
number_pulse and use < number_pulse + 1 in their loop limits. But, I
can move the +1 to the assignment if you wish.

Rob



More information about the FFmpeg-soc mailing list