mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-13 21:26:33 +02:00
jpegdec: support ilv=1 grayscale jpeg-ls.
Fixes Ticket851 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bbe25b4f3e
commit
2d6f317d71
@ -309,11 +309,12 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor
|
|||||||
} else if(ilv == 1) { /* line interleaving */
|
} else if(ilv == 1) { /* line interleaving */
|
||||||
int j;
|
int j;
|
||||||
int Rc[3] = {0, 0, 0};
|
int Rc[3] = {0, 0, 0};
|
||||||
|
stride = (s->nb_components > 1) ? 3 : 1;
|
||||||
memset(cur, 0, s->picture.linesize[0]);
|
memset(cur, 0, s->picture.linesize[0]);
|
||||||
width = s->width * 3;
|
width = s->width * stride;
|
||||||
for(i = 0; i < s->height; i++) {
|
for(i = 0; i < s->height; i++) {
|
||||||
for(j = 0; j < 3; j++) {
|
for(j = 0; j < stride; j++) {
|
||||||
ls_decode_line(state, s, last + j, cur + j, Rc[j], width, 3, j, 8);
|
ls_decode_line(state, s, last + j, cur + j, Rc[j], width, stride, j, 8);
|
||||||
Rc[j] = last[j];
|
Rc[j] = last[j];
|
||||||
|
|
||||||
if (s->restart_interval && !--s->restart_count) {
|
if (s->restart_interval && !--s->restart_count) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user