[FFmpeg-devel] [PATCH] Common ACELP code & G.729 [2/7] - pitch lag decoding

Måns Rullgård mans
Fri Jun 27 22:26:36 CEST 2008


Michael Niedermayer <michaelni at gmx.at> writes:

> On Fri, Jun 27, 2008 at 09:59:49PM +0700, Vladimir Voroshilov wrote:
>> I have question about rounding. What is better:
>> (a >> 13)<<10
>> or
>> (a>>3) & ~0x3ff
>> ?
>> Such code is required for bitexactness.
>
> i prefer the &~ variant

I prefer it syntactically too, but the shift is probably faster on ARM
older than v7, unless the compiler is clever enough to change it (gcc
isn't).

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list