mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
tiffdec: support predictor type 2 with RGB48 pixel format
This commit is contained in:
parent
345a96c327
commit
e75ef2b7f4
@ -635,10 +635,24 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
dst = p->data[0];
|
||||
soff = s->bpp >> 3;
|
||||
ssize = s->width * soff;
|
||||
for (i = 0; i < s->height; i++) {
|
||||
for (j = soff; j < ssize; j++)
|
||||
dst[j] += dst[j - soff];
|
||||
dst += stride;
|
||||
if (s->avctx->pix_fmt == PIX_FMT_RGB48LE) {
|
||||
for (i = 0; i < s->height; i++) {
|
||||
for (j = soff; j < ssize; j += 2)
|
||||
AV_WL16(dst + j, AV_RL16(dst + j) + AV_RL16(dst + j - soff));
|
||||
dst += stride;
|
||||
}
|
||||
} else if (s->avctx->pix_fmt == PIX_FMT_RGB48BE) {
|
||||
for (i = 0; i < s->height; i++) {
|
||||
for (j = soff; j < ssize; j += 2)
|
||||
AV_WB16(dst + j, AV_RB16(dst + j) + AV_RB16(dst + j - soff));
|
||||
dst += stride;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < s->height; i++) {
|
||||
for (j = soff; j < ssize; j++)
|
||||
dst[j] += dst[j - soff];
|
||||
dst += stride;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user