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

stefano subversion
Sun Sep 12 23:31:40 CEST 2010


Author: stefano
Date: Sun Sep 12 23:31:39 2010
New Revision: 25109

Log:
Cosmetics: use x ? y : z construct and merge intialization and
definition for the val variable in av_read_image_line(). Simplify.

Modified:
   trunk/libavutil/pixdesc.c

Modified: trunk/libavutil/pixdesc.c
==============================================================================
--- trunk/libavutil/pixdesc.c	Sun Sep 12 21:44:45 2010	(r25108)
+++ trunk/libavutil/pixdesc.c	Sun Sep 12 23:31:39 2010	(r25109)
@@ -55,9 +55,7 @@ void av_read_image_line(uint16_t *dst, c
         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];



More information about the ffmpeg-cvslog mailing list