changeset 1013:83021885b234 libavutil

Cosmetics: use x ? y : z construct and merge intialization and definition for the val variable in av_read_image_line(). Simplify.
author stefano
date Sun, 12 Sep 2010 21:31:39 +0000
parents c915dc284b9a
children 3728a7291737
files pixdesc.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pixdesc.c	Thu Sep 09 19:40:59 2010 +0000
+++ b/pixdesc.c	Sun Sep 12 21:31:39 2010 +0000
@@ -55,9 +55,7 @@
         const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
 
         while(w--){
-            int val;
-            if(flags & PIX_FMT_BE) val= AV_RB16(p);
-            else                   val= AV_RL16(p);
+            int val = flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);
             val = (val>>shift) & mask;
             if(read_pal_component)
                 val= data[1][4*val + c];