diff pixdesc.c @ 1016:4c26dcb90bc6 libavutil

Apply minor simplification in av_read_image_line().
author stefano
date Sun, 12 Sep 2010 22:00:45 +0000
parents f332df5d8da5
children
line wrap: on
line diff
--- a/pixdesc.c	Sun Sep 12 21:39:57 2010 +0000
+++ b/pixdesc.c	Sun Sep 12 22:00:45 2010 +0000
@@ -53,12 +53,11 @@
         }
     } 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);