[FFmpeg-soc] [soc]: r511 - dirac/libavcodec/dirac.c

Marco Gerards mgerards at xs4all.nl
Tue Jul 24 00:15:31 CEST 2007


Aurelien Jacobs <aurel at gnuage.org> writes:

> On Mon, 23 Jul 2007 22:48:59 +0200 (CEST)
> marco <subversion at mplayerhq.hu> wrote:
>
>> Author: marco
>> Date: Mon Jul 23 22:48:59 2007
>> New Revision: 511
>> 
>> Log:
>> Force the pixel to a valid range before writing it to the frame.
>> 
>> 
>> Modified:
>>    dirac/libavcodec/dirac.c
>> 
>> Modified: dirac/libavcodec/dirac.c
>> ==============================================================================
>> --- dirac/libavcodec/dirac.c	(original)
>> +++ dirac/libavcodec/dirac.c	Mon Jul 23 22:48:59 2007
>> @@ -1118,7 +1118,7 @@ static int decode_intra_frame(AVCodecCon
>>          /* XXX: Show the coefficients in a frame.  */
>>          for (x = 0; x < width; x++)
>>              for (y = 0; y < height; y++)
>> -                frame[x + y * s->picture.linesize[comp]] = coeffs[x + y * s->padded_width];
>> +                frame[x + y * s->picture.linesize[comp]] = FFMAX(0, FFMIN(255, coeffs[x + y * s->padded_width]));
>
> Here you should use av_clip_uint8().

Thanks a lot, I fixed this.

--
Marco




More information about the FFmpeg-soc mailing list