Browse Source

Apply minor simplification in av_read_image_line().

Originally committed as revision 25112 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/n0.8
Stefano Sabatini 14 years ago
parent
commit
4660143a2c
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      libavutil/pixdesc.c

+ 3
- 4
libavutil/pixdesc.c View File

@@ -53,12 +53,11 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
}
} 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);


Loading…
Cancel
Save