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

Michael Niedermayer michaelni
Mon Sep 27 01:52:01 CEST 2010


On Mon, Sep 27, 2010 at 12:16:14AM +0200, Stefano Sabatini wrote:
> 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.

benchmark it please before changing

[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20100927/40a2431a/attachment.pgp>



More information about the ffmpeg-cvslog mailing list