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

stefano subversion
Mon Sep 13 00:00:45 CEST 2010


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;
-        }
+
         while(w--){
             int val = is_8bit ? *p :
                 flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);



More information about the ffmpeg-cvslog mailing list