[FFmpeg-soc] [soc]: r4250 - wmapro/wma3dec.c

Sascha Sommer saschasommer at freenet.de
Sat May 2 20:56:16 CEST 2009


Hi,

On Freitag, 1. Mai 2009, Michael Niedermayer wrote:
> On Fri, May 01, 2009 at 02:17:35PM +0200, faust3 wrote:
> > Author: faust3
> > Date: Fri May  1 14:17:35 2009
> > New Revision: 4250
> >
> > Log:
> > removed unneeded division
> >
> > Modified:
> >    wmapro/wma3dec.c
> >
> > Modified: wmapro/wma3dec.c
> > =========================================================================
> >===== --- wmapro/wma3dec.c	Fri May  1 13:27:16 2009	(r4249)
> > +++ wmapro/wma3dec.c	Fri May  1 14:17:35 2009	(r4250)
> > @@ -1007,10 +1007,8 @@ static void wma_inverse_channel_transfor
> >                      }
> >                  }else{
> >                     
> > for(y=s->cur_sfb_offsets[b];y<FFMIN(s->cur_sfb_offsets[b+1],
> > s->subframe_len);y++){ -                        s->channel[0].coeffs[y]
> > *= 362;
> > -                        s->channel[0].coeffs[y] /= 256;
> > -                        s->channel[1].coeffs[y] *= 362;
> > -                        s->channel[1].coeffs[y] /= 256;
> > +                        s->channel[0].coeffs[y] *= 1.4140625f;
> > +                        s->channel[1].coeffs[y] *= 1.4140625f;
>
> *= 181.0 / 128;
> might be clearer

Changed.

> in that respect, this is really 181/128 and not sqrt(2) ?
> Its strange as its floats ...
>

I don't know what is written in the spec. Maybe it is some kind of 
optimization. When integers are used *362 / 256 can be done with shifts and 
adds afaik.

Regards

Sascha




More information about the FFmpeg-soc mailing list