aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-12 21:31:39 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-09-12 21:31:39 +0000
commit4b9ac6dedcbee4d059c04363fafbaad3586c1053 (patch)
tree257e187cc4baa07a248aa13d02b4872bbdcbb1f6 /libavutil
parent0105889358a460c725a64aa613d29a5b2004fccd (diff)
downloadffmpeg-4b9ac6dedcbee4d059c04363fafbaad3586c1053.tar.gz
Cosmetics: use x ? y : z construct and merge intialization and
definition for the val variable in av_read_image_line(). Simplify. Originally committed as revision 25109 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/pixdesc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index e2bc6491da..98f5a9b1c6 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -55,9 +55,7 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
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];