[FFmpeg-devel] [PATCH] Remove MULL macro from lsp.c
Mon Aug 25 04:06:05 CEST 2008
On Sat, Aug 23, 2008 at 01:08:13AM +0700, Vladimir Voroshilov wrote:
> Attached patch replaces MULL macro in lsp.c with multiplication and right shift.
> Current code works wrong because one of macro's arguments is int16_t while asm
> assumes both of them to be int.
> I'll also remove all occurences of MULL macro from my G.729 code.
> P.S. Another fix is leaving MULL there but explicitly cast the second
> argument to (int).
> I don't know which is better.
I would say that the bug you are trying to fix is in MULL
it should work when its arguments are not int.
> f[i] = f[i-2];
> for(j=i; j>1; j--)
> - f[j] -= MULL(f[j-1], lsp[2*i-2]) - f[j-2]; // (3.22) * (0.15) * 2 -> (3.22)
> + f[j] -= (((int64_t)f[j-1] * lsp[2*i-2]) >> 14) - f[j-2]; // (3.22) * (0.15) * 2 -> (3.22)
please fix the comments
also please fix the comments in ff_acelp_high_pass_filter()
they contradict the claim that cliping is needed. One of them has to
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel