aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-09 21:23:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-09 21:36:21 +0100
commitaf15c17daa5d8d2940c0263ba4d3ecec761c11ee (patch)
tree20e829b65f4d211c111acecac11a5be0a6690d79 /libavcodec/mjpegdec.c
parent268d93172460f116d239c2cf815d7b2f495efb2d (diff)
downloadffmpeg-af15c17daa5d8d2940c0263ba4d3ecec761c11ee.tar.gz
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>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 0ad538286b..f7e07452a4 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -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++) {