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

Michael Niedermayer michaelni at gmx.at
Sat Jun 21 18:20:03 CEST 2008


On Sat, Jun 21, 2008 at 04:34:06PM +0100, Robert Swain wrote:
> 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.

Id like "number_pulse" to be the number of pulses

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

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- 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-soc/attachments/20080621/3f12b3b1/attachment.pgp>


More information about the FFmpeg-soc mailing list