[FFmpeg-devel] [PATCH 2/2] Add SIPR decoder for 5k0, 6k5 and 8k5 modes

Vitor Sessak vitor1001
Fri Jan 1 12:52:35 CET 2010


Ronald S. Bultje wrote:
> Hi Vitor,

Hi and thanks for having a look

> On Thu, Dec 31, 2009 at 11:48 AM, Vitor Sessak <vitor1001 at gmail.com> wrote:
>>> ive no further comments, remaining review left to our celp experts
>> Do you have anyone in mind in particular?
> 
> I can try a bit...
> 
> in lsf_decode_fp():
> +    for (i = 0; i < LP_FILTER_ORDER; i++)
> +        lsfnew[i] = lsf_history[i] * 0.33 + lsf_tmp[i] + mean_lsf[i];
> [..]
> +    for (i = 0; i < LP_FILTER_ORDER - 1; i++)
> +        lsfnew[i] = cos((M_PI / 4000) * lsfnew[i]);
> +    lsfnew[LP_FILTER_ORDER - 1] *= 1.538462e-3;
> 
> and f you look at mean_lsf[]:
> 
> +static const float mean_lsf[10] = {
> +     378.342377,  575.895447,  974.590332, 1444.874878, 1809.430786,
> +    2258.499023, 2609.088135, 3025.107178, 3291.449707,   96.456100
> +};
> (same for lsf_codebooks)
> 
> which doesn't really make sense, I think, since LSPs/LSFs are supposed
> to be in the 0.0-1.0 range. So can you convert all of this so the
> scale is 0.0-1.0 to begin with (e.g. by adjustling lsf_codebooks)?

Indeed, the [0:4000] range is pretty arbitrary. Fixed (new patch attached).

> (Also, why is the last one so low? Shouldn't they be ascending?)

Because in the code it do not take he cos() of the last value, funny 
algorithm they use...

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_sipr2_6.diff
Type: text/x-patch
Size: 39761 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100101/b5350676/attachment.bin>



More information about the ffmpeg-devel mailing list