mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/mjpegdec: Fix normal jpeg with bits < 8
Untested due to lack of testcase Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
15071ed4fc
commit
1deeb9437c
@ -1121,6 +1121,12 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
s->dsp.idct_put(ptr, linesize[c], s->block);
|
||||
if (s->bits & 7) {
|
||||
int block_x, block_y;
|
||||
for (block_y=0; block_y<8; block_y++)
|
||||
for (block_x=0; block_x<8; block_x++)
|
||||
*(ptr + 2*block_x + block_y*linesize[c]) <<= 8 - s->bits;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int block_idx = s->block_stride[c] * (v * mb_y + y) +
|
||||
|
Loading…
Reference in New Issue
Block a user