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

Stefano Sabatini stefano.sabatini-lala
Mon Sep 27 00:16:14 CEST 2010


On date Sunday 2010-09-26 23:25:40 +0200, Aurelien Jacobs wrote:
> 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);

Not contrary to it if you prefer it that way.
-- 
FFmpeg = Fantastic & Fierce Merciful Pitiful Evangelical Geek



More information about the ffmpeg-cvslog mailing list