Mercurial > libavutil.hg
comparison pixdesc.c @ 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 | 732bb5b10aec |
children | 3728a7291737 |
comparison
equal
deleted
inserted
replaced
1012:c915dc284b9a | 1013:83021885b234 |
---|---|
53 } | 53 } |
54 } else { | 54 } else { |
55 const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1; | 55 const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1; |
56 | 56 |
57 while(w--){ | 57 while(w--){ |
58 int val; | 58 int val = flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p); |
59 if(flags & PIX_FMT_BE) val= AV_RB16(p); | |
60 else val= AV_RL16(p); | |
61 val = (val>>shift) & mask; | 59 val = (val>>shift) & mask; |
62 if(read_pal_component) | 60 if(read_pal_component) |
63 val= data[1][4*val + c]; | 61 val= data[1][4*val + c]; |
64 p+= step; | 62 p+= step; |
65 *dst++= val; | 63 *dst++= val; |