[FFmpeg-soc] [PATCH 2/5] Use lrintf() in FIX15() macro. This matches the float-to-int16 conversion in audioconvert.c. Regression reference updated.

Ronald S. Bultje rsbultje at gmail.com
Wed Nov 17 03:59:47 CET 2010


Hi,

On Wed, Nov 17, 2010 at 2:37 AM, Justin Ruggles
<justin.ruggles at gmail.com> wrote:
> +/** convert float in range [-1..1] to int16_t in range [-32768..32767] */
> +#define FIX15(a) ((int16_t)av_clip_int16((int)(a * (float)(1 << 15))))

The patch doesn't do what the subject says. It does fix the comment
though, well done. :-p.

Ronald


More information about the FFmpeg-soc mailing list