}
} else {
const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
+ int is_8bit = 0;
+ if (shift + depth <= 8) {
+ p += !!(flags & PIX_FMT_BE);
+ is_8bit = 1;
+ }
while(w--){
- int val = flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);
+ int val = is_8bit ? *p :
+ flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);
val = (val>>shift) & mask;
if(read_pal_component)
val= data[1][4*val + c];
int shift = comp.shift;
uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
+ if (shift + depth <= 8) {
+ p += !!(flags & PIX_FMT_BE);
+ while (w--) {
+ *p |= (*src++<<shift);
+ p += step;
+ }
+ } else {
while (w--) {
if (flags & PIX_FMT_BE) {
uint16_t val = AV_RB16(p) | (*src++<<shift);
}
p+= step;
}
+ }
}
}