mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mjpegdec: remove new flipping code
It stored images wrong in the user provided buffers (that is you would end up with a wrongly flipped image if you used direct rendering). Also it used wrong dimensions as noticed by ubitux Enable the old code unconditionally so flipping works correctly again. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
268d931724
commit
af15c17daa
|
@ -1909,15 +1909,6 @@ eoi_parser:
|
|||
}
|
||||
if ((ret = av_frame_ref(frame, s->picture_ptr)) < 0)
|
||||
return ret;
|
||||
if (s->flipped) {
|
||||
int i;
|
||||
for (i = 0; frame->data[i]; i++) {
|
||||
int h = frame->height >> ((i == 1 || i == 2) ?
|
||||
s->pix_desc->log2_chroma_h : 0);
|
||||
frame->data[i] += frame->linesize[i] * (h - 1);
|
||||
frame->linesize[i] *= -1;
|
||||
}
|
||||
}
|
||||
*got_frame = 1;
|
||||
s->got_picture = 0;
|
||||
|
||||
|
@ -2009,7 +2000,7 @@ the_end:
|
|||
dst -= s->linesize[s->upscale_v];
|
||||
}
|
||||
}
|
||||
if (s->flipped && (s->avctx->flags & CODEC_FLAG_EMU_EDGE)) {
|
||||
if (s->flipped) {
|
||||
int j;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
for (index=0; index<4; index++) {
|
||||
|
|
Loading…
Reference in New Issue