[FFmpeg-devel] [PATCH] Move pitch vector interpolation filter to acelp_filters.

Vladimir Voroshilov voroshil
Mon May 19 13:20:20 CEST 2008



2008/5/19 Vladimir Voroshilov <voroshil at gmail.com>:
> 2008/5/19 Vladimir Voroshilov <voroshil at gmail.com>:
>  
> 
> > 2008/5/18 Michael Niedermayer <michaelni at gmx.at>:
>  >
>  >
>  > > On Sun, May 18, 2008 at 12:23:32AM +0700, Vladimir Voroshilov wrote:
>  >  >

[...]

>  >  >  This code is written for a filter with an odd number of coeffs (1,3,5,...) but
>  >  >  all but the first filter for which it is used have an even number thus they
>  >  >  end up needing these 0 coeffs.
>  >  >  The code should be changed so it expects even number of coeff filters and the
>  >  >  unneeded 0 elements should be removed from the tables
>  >  >
>  >  >  anyway, the obvious implementation is:
>  >  >
>  >  >  for(n=0; n<subframe_size; n++){
>  >  >     int idx = precision>>1;
>  >  >     int v = 0x4000;
>  >  >     for(i=1; i<filter_length+1; i++){
>  >  >         v += in[n - pitch_delay_int - i] * filter_coeffs[idx - frac];
>  >  >         v += in[n - pitch_delay_int + i] * filter_coeffs[idx + frac];
>  >  >         idx += precision;
>  >  >     }
>  >  >     out[n] = av_clip_int16(v >> 15);
>  >
>  >  First, I can't see here equivalent  (due to i>0) for
>  >
>  >     int v = in[n - pitch_delay_int] * filter_coeffs[FFABS(pitch_delay_frac)];
>  >
>  >  Second, your code 'as is' gives me PSNR 10 and i'm afraid it is totally wrong:
>  >  you have shifted filter represented in filter_coeffs by precision/2
>  >  as respect signal. This will obviously produce different result.
>  
>  Sorry, i overreacted with 'totally wrong'.
>  I'm still investingating problem, but already found several
>  inconsistences between doxygen comment to the filter and it's usage
>  (like passing [-5; 0] value
>  in pitch_frac_delay).
>  
>  Code is not looks like yours yet, but is going to that direction.

finished.
Here is result.
It looks a bit hackish but i don't see yet  how to make it cleaner.


-- 
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01_acelp_filt_53.diff
Type: text/x-diff
Size: 5125 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080519/63a6f326/attachment.diff>



More information about the ffmpeg-devel mailing list