[FFmpeg-soc] [soc]: r766 - qcelp/qcelpdec.c

Aurelien Jacobs aurel at gnuage.org
Tue Aug 14 10:18:46 CEST 2007


On Tue, 14 Aug 2007 07:25:38 +0200 (CEST)
reynaldo <subversion at mplayerhq.hu> wrote:

> Author: reynaldo
> Date: Tue Aug 14 07:25:38 2007
> New Revision: 766
> 
> Log:
> Fix some av_clip usage errors
> 
> Modified:
>    qcelp/qcelpdec.c
> 
> Modified: qcelp/qcelpdec.c
> ==============================================================================
> --- qcelp/qcelpdec.c	(original)
> +++ qcelp/qcelpdec.c	Tue Aug 14 07:25:38 2007
> 
> [...]
> 
> @@ -865,7 +865,7 @@ static int qcelp_decode_frame(AVCodecCon
>          /* WIP adaptive postfilter here */
>  
>          /* output stage */
> -        outbuffer[i]=av_clip(lrintf(4*ppf_vector[i]), -32768, 32767);
> +        outbuffer[i]=av_clip(lrintf(4*ppf_vector[i]), -32768, 32768);

This looks strange. The maximum 16bits signed integer is 32767, not 32768.
And if the range you want is indeed -32768 - 32767, you'd better use
av_clip_int16().

Aurel



More information about the FFmpeg-soc mailing list