[FFmpeg-cvslog] r25112 - trunk/libavutil/pixdesc.c

Aurelien Jacobs aurel
Sun Sep 26 23:25:40 CEST 2010


On Mon, Sep 13, 2010 at 12:00:45AM +0200, stefano wrote:
> Author: stefano
> Date: Mon Sep 13 00:00:45 2010
> New Revision: 25112
> 
> Log:
> Apply minor simplification in av_read_image_line().
> 
> Modified:
>    trunk/libavutil/pixdesc.c
> 
> Modified: trunk/libavutil/pixdesc.c
> ==============================================================================
> --- trunk/libavutil/pixdesc.c	Sun Sep 12 23:39:57 2010	(r25111)
> +++ trunk/libavutil/pixdesc.c	Mon Sep 13 00:00:45 2010	(r25112)
> @@ -53,12 +53,11 @@ void av_read_image_line(uint16_t *dst, c
>          }
>      } else {
>          const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
> -        int is_8bit = 0;
> +        int is_8bit = shift + depth <= 8;
>  
> -        if (shift + depth <= 8) {
> +        if (is_8bit)
>              p += !!(flags & PIX_FMT_BE);
> -            is_8bit = 1;
> -        }

What about removing the if() and simply having:
  p += is_8bit && (flags & PIX_FMT_BE);

Aurel



More information about the ffmpeg-cvslog mailing list