mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-08 16:54:03 +02:00
avcodec/mjpegdec: Fix decoding RGBA RCT LJPEG
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
07d33439f3
commit
055e56e9f7
@ -995,7 +995,14 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
|
|||||||
skip_bits(&s->gb, 16); /* skip RSTn */
|
skip_bits(&s->gb, 16); /* skip RSTn */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (s->nb_components == 4) {
|
if (s->rct && s->nb_components == 4) {
|
||||||
|
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
|
||||||
|
ptr[4*mb_x + 2] = buffer[mb_x][0] - ((buffer[mb_x][1] + buffer[mb_x][2] - 0x200) >> 2);
|
||||||
|
ptr[4*mb_x + 1] = buffer[mb_x][1] + ptr[4*mb_x + 2];
|
||||||
|
ptr[4*mb_x + 3] = buffer[mb_x][2] + ptr[4*mb_x + 2];
|
||||||
|
ptr[4*mb_x + 0] = buffer[mb_x][3];
|
||||||
|
}
|
||||||
|
} else if (s->nb_components == 4) {
|
||||||
for(i=0; i<nb_components; i++) {
|
for(i=0; i<nb_components; i++) {
|
||||||
int c= s->comp_index[i];
|
int c= s->comp_index[i];
|
||||||
if (s->bits <= 8) {
|
if (s->bits <= 8) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user