Commit af15c17d authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 268d9317
......@@ -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++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment