# HG changeset patch # User stefano # Date 1284328845 0 # Node ID 4c26dcb90bc6e13fa7e49ad114b141e1b579e0d3 # Parent f332df5d8da50daab41cca65c4ea240cefe43af2 Apply minor simplification in av_read_image_line(). diff -r f332df5d8da5 -r 4c26dcb90bc6 pixdesc.c --- a/pixdesc.c Sun Sep 12 21:39:57 2010 +0000 +++ b/pixdesc.c Sun Sep 12 22:00:45 2010 +0000 @@ -53,12 +53,11 @@ } } 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);