[FFmpeg-soc] [soc]: r511 - dirac/libavcodec/dirac.c
Aurelien Jacobs
aurel at gnuage.org
Mon Jul 23 23:58:58 CEST 2007
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().
Aurel
More information about the FFmpeg-soc
mailing list