Mercurial > libavutil.hg
comparison pixdesc.c @ 1016:4c26dcb90bc6 libavutil
Apply minor simplification in av_read_image_line().
author | stefano |
---|---|
date | Sun, 12 Sep 2010 22:00:45 +0000 |
parents | f332df5d8da5 |
children |
comparison
equal
deleted
inserted
replaced
1015:f332df5d8da5 | 1016:4c26dcb90bc6 |
---|---|
51 shift &= 7; | 51 shift &= 7; |
52 *dst++= val; | 52 *dst++= val; |
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 int is_8bit = 0; | 56 int is_8bit = shift + depth <= 8; |
57 | 57 |
58 if (shift + depth <= 8) { | 58 if (is_8bit) |
59 p += !!(flags & PIX_FMT_BE); | 59 p += !!(flags & PIX_FMT_BE); |
60 is_8bit = 1; | 60 |
61 } | |
62 while(w--){ | 61 while(w--){ |
63 int val = is_8bit ? *p : | 62 int val = is_8bit ? *p : |
64 flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p); | 63 flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p); |
65 val = (val>>shift) & mask; | 64 val = (val>>shift) & mask; |
66 if(read_pal_component) | 65 if(read_pal_component) |