[FFmpeg-devel] [PATCH] make lsp2poly() a non-static function
Vitor Sessak
vitor1001
Sun Nov 22 19:06:16 CET 2009
$subj, it is used for SIPR for implementing its broken version of
ff_acelp_lspd2lpc():
> static void lsp2lpc_8k5(const double *isp, float *Az, int length)
> {
> int lp_half_order = length >> 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=length-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[length - 1];
> Az[j-1] = qaf + paf * isp[length - 1];
> }
>
> Az[lp_half_order-1] = (1.0 + isp[length - 1]) * pa[lp_half_order] * 0.5;
> Az[length-1] = isp[length - 1];
> }
-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lsp2polyf.diff
Type: text/x-patch
Size: 1790 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091122/40f087a4/attachment.bin>
More information about the ffmpeg-devel
mailing list