[FFmpeg-devel] [PATCH] Some ra144.c simplifications

Vitor Sessak vitor1001
Wed Jun 4 20:18:10 CEST 2008


Michael Niedermayer wrote:
> On Wed, May 28, 2008 at 09:23:02PM +0200, Vitor Sessak wrote:
>> Michael Niedermayer wrote:
>>> On Wed, May 28, 2008 at 06:56:45PM +0200, Vitor Sessak wrote:
>>>> Michael Niedermayer wrote:
>>>>> On Tue, May 27, 2008 at 09:16:09PM +0200, Vitor Sessak wrote:
>>>>>> Michael Niedermayer wrote:
>>>>>>> On Sun, May 25, 2008 at 07:11:52PM +0200, Vitor Sessak wrote:
>>>>>>>> Michael Niedermayer wrote:
>>>>>>>>> On Sun, May 25, 2008 at 06:05:15PM +0200, Vitor Sessak wrote:
>>>>>>>>> [...]
>>>>>>>>>>>> ok
>>>>>>>>>>> One more...
>>>>>>>>>> ... and some more cleanup:
>>>>>>>>>>
>>>>>>>>>> ra144_vector_add_wav.diff: Make add_wav() receive a vector instead 
>>>>>>>>>> of three integers
>>>>>>>>>>
>>>>>>>>>> ra144_params_dec2.diff: Do not calculate anything based in l, it is 
>>>>>>>>>> unrolled in the loop anyway
>>>>>>>>> ok
>>>>>>>> Now s/(unsigned) short/(u)int16_t.
>>>>>>> ok
>>>>>> Next one. dec2() interpolates the block coefficients from the previous 
>>>>>> one and fall back to a block-dependent schema if the interpolation 
>>>>>> results in an unstable filter...
>>>>> [...]
>>>>>> +    // Interpolate block coefficients from the this frame forth block 
>>>>>> and
>>>>>> +    // last frame forth block
>>>>>>      for (x=0; x<30; x++)
>>>>>> -        decsp[x] = (a * inp[x] + b * inp2[x]) >> 2;
>>>>>> +        decsp[x] = (a * ractx->lpc_coef[x] + b * 
>>>>>> ractx->lpc_coef_old[x])>> 2;
>>>>> ff_acelp_weighted_vector_sum()
>>>> Ok, but to do that I need to use int16_t. So I propose to apply my 
>>>> original patch and then the attached one.
>>> hmm, ok
>> Done. Now remove the dec1() function (that was memcpy + 1 line of code). As 
>> a side effect, it removes the need of a memcpy (the dec1() call at 
>> decode_frame()).
> 
> ok

Now the first patch (ra144_rescale_energy.diff) split the energy 
rescaling out of the rms() function. The next patch remove *lpc_refl 
from the context, since the only thing needed from the last frame is the 
non rescaled output of rms().

-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ra144_rescale_rms.diff
Type: text/x-patch
Size: 1551 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080604/7b84f9bc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ra144_dont_recalc_rms.diff
Type: text/x-patch
Size: 3316 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080604/7b84f9bc/attachment-0001.bin>



More information about the ffmpeg-devel mailing list