diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2012-04-29 01:37:08 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-01 21:47:07 +0400 |
commit | 6d695d7acc4cb1da84eb73710e05a4c090e5ab31 (patch) | |
tree | 444928cbecc1b2963f3eaf58c9b8ded047e1c106 /libavcodec/mjpegenc.c | |
parent | 527f5cbf64e7ac7fe265a244ebf36650e50921dc (diff) |
Fix nonsense non-mod16 AMV flipping code.
It is obviously nonsense since it produces wrong results
or even crashes (crashes should be encode-only though).
Fixes trac issue #1092.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegenc.c')
-rw-r--r-- | libavcodec/mjpegenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index e33e75fbc8..7a87f24271 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -552,7 +552,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, //picture should be flipped upside-down for(i=0; i < 3; i++) { int vsample = i ? 2 >> chroma_v_shift : 2; - pic->data[i] += (pic->linesize[i] * (vsample * (8 * s->mb_height -((s->height/V_MAX)&7)) - 1 )); + pic->data[i] += pic->linesize[i] * (vsample * s->height / V_MAX - 1); pic->linesize[i] *= -1; } ret = ff_MPV_encode_picture(avctx, pkt, pic, got_packet); |