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

Ronald S. Bultje rsbultje
Thu Dec 31 18:13:10 CET 2009


Hi Vitor,

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)?
(Also, why is the last one so low? Shouldn't they be ascending?)

The rest looks nice and simple, maybe because you left out 16k. I'll
go through it in detail this weekend.

Ronald



More information about the ffmpeg-devel mailing list