[FFmpeg-devel] [PATCH] Long-term prediction for ALS

Thilo Borgmann thilo.borgmann
Thu Nov 12 18:32:01 CET 2009


Ronald S. Bultje schrieb:
> Hi,
> 
> 2009/11/12 M?ns Rullg?rd <mans at mansr.com>:
>> "Ronald S. Bultje" <rsbultje at gmail.com> writes:
>>> int idx = get_unary(gb, 0, 4) << 2 + get_bits(gb, 2);
>>> ltp_gain[2] = ltp_gain_values[idx];
>>>
>>> Or even:
>>>
>>> int a = get_unary(gb, 0, 4), b = get_bits(gb, 2);
>>> ltp_gain[2] = ltp_gain_values[a][b];
>> Is that a 1D or 2D array.  Please try to index arrays as they are
>> declared, not in some other random fashion.  It *DOES* break
>> sometimes.
> 
> It's declared in this very patch, he could easily make it 2D instead
> of 1D (I didn't say it explicitely, but obviously the intention is for
> him to make the array 2D then).

Ah yes, this makes more sense then.

And thinking about the clipping, which would break this thing
nevertheless - I think I've put in the clipping too fast because I think
it is not necessary here.

So base line is I would be fine to make it 2D and clipping has to be
removed again, so rev. 3 comes for sure.

So if no one interrupts, I would send in rev. 3 using a 2D array shortly.

-Thilo




More information about the ffmpeg-devel mailing list