[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [6/7] - G.729 postfilter

Michael Niedermayer michaelni
Wed May 14 13:05:52 CEST 2008


On Wed, May 14, 2008 at 09:39:00AM +0700, Vladimir Voroshilov wrote:
> Michael Niedermayer wrote: 
> > On Wed, May 14, 2008 at 12:25:24AM +0700, Vladimir Voroshilov wrote:
> > > 2008/5/12 Michael Niedermayer <michaelni at gmx.at>:
> > > >
> 
> [...]
> 
> > > +                /*
> > > +                  Compute numerator of pseudo-normalized correlation R'(k)
> > > +                  (4.2.1, Equation 81)
> > > +                */
> > 
> > > +                sum = 0;
> > > +                for(n=0; n<subframe_size; n++)
> > > +                    sum += delayed_signal[k][n+i] * sig_scaled[n + RES_PREV_DATA_SIZE];
> > 
> > duplicate of sum_of_squares()
> 
> Hm. where ?
> 
> delayed_signal[k] has fractional offset (k+1)/8,
> sum_of_squares can't be used here (it is applicapable
> to integer offsets only).

sum_of_squares(delayed_signal[k]+i, sig_scaled+RES_PREV_DATA_SIZE, ...)

also rename sum_of_squares to dot_product because thats really what it
does and obviously pass it 2 pointers instead of 1 + offset.


> 
> [...]
> 
> > > +        /*
> > > +          Compute R'(k) correlation's numerator
> > > +        */
> > 
> > > +        sum = 0;
> > > +        for(n=0; n<subframe_size; n++)
> > > +            sum += residual_filt[n] * sig_scaled[n + RES_PREV_DATA_SIZE];
> > 
> > duplicate of sum_of_squares()
> 
> Hm. same as above: residual_filt has fractional offset

sum_of_squares(residual_filt, sig_scaled + RES_PREV_DATA_SIZE

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

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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-devel/attachments/20080514/de7da088/attachment.pgp>



More information about the ffmpeg-devel mailing list