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

Vitor Sessak vitor1001
Mon Dec 28 23:32:56 CET 2009


Michael Niedermayer wrote:
> On Mon, Dec 21, 2009 at 03:43:02PM +0100, Vitor Sessak wrote:
>   
>> Michael Niedermayer wrote:
>>     
>>> On Sat, Dec 19, 2009 at 03:17:37PM +0100, Vitor Sessak wrote:
>>>       
>>>> Michael Niedermayer wrote:
>>>>         
>>>>> On Fri, Dec 18, 2009 at 06:07:45PM +0100, Vitor Sessak wrote:
>>>>>           
>>>>>> Diego Biurrun wrote:
>>>>>>             
>>>>>>> On Fri, Dec 18, 2009 at 05:52:13PM +0100, Vitor Sessak wrote:
>>>>>>>               
>>>>

[...]

>>>> +static void lsp2lpc_sipr(const double *isp, float *Az)
>>>> +{
>>>> +    int lp_half_order = LP_FILTER_ORDER >> 1;
>>>> +    double pa[lp_half_order+1], qa[lp_half_order];
>>>> +    int i,j;
>>>> +
>>>> +    ff_lsp2polyf(isp    , pa, lp_half_order    );
>>>> +    ff_lsp2polyf(isp + 1, qa, lp_half_order - 1);
>>>> +
>>>>         
>
>   
>>>> +    for (i = lp_half_order-1; i > 1; i--)
>>>> +        qa[i] -= qa[i-2];
>>>> +
>>>> +    for (i = 1, j = LP_FILTER_ORDER - 1; i < lp_half_order; i++, j--) {
>>>> +        float paf = (pa[i] + qa[i]) * 0.5;
>>>> +        float qaf = (pa[i] - qa[i]) * 0.5;
>>>> +
>>>> +        Az[i-1]  = paf + qaf * isp[LP_FILTER_ORDER - 1];
>>>> +        Az[j-1]  = qaf + paf * isp[LP_FILTER_ORDER - 1];
>>>>         
>
>     paf=  pa[i]           *(1+isp[LP_FILTER_ORDER - 1]);
>     qaf= (qa[i] - qa[i-2])*(1-isp[LP_FILTER_ORDER - 1]);
>     Az[i-1]  = (paf + qaf)*0.5;
>     Az[j-1]  = (paf - qaf)*0.5;
>   

done as suggested.

> btw what value does isp[LP_FILTER_ORDER - 1] have?
> its not 1 or -1 or something trivial ?
>   

no :(

New patch attached, together with Diego's cosmetics.

-Vitor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_sipr2_4.diff
Type: text/x-patch
Size: 39552 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091228/b49636e5/attachment.bin>



More information about the ffmpeg-devel mailing list