aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-08 01:18:56 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-13 00:43:04 +0200
commit0cb4887b838a4a9a7e0fbe4fc9f8104e685de9db (patch)
tree27b33a5e1f914bb918a8e26da2e029a217ee31b8
parent4a455358363f61570b0333399c081f0f48a9fe8a (diff)
downloadffmpeg-0cb4887b838a4a9a7e0fbe4fc9f8104e685de9db.tar.gz
avcodec/mpegvideo: Fix edge emu with lowres
Fixes a few green artifacts at the top Fixes rest of Ticket 2535 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c67bca2b5a94efb8fb3c2ba2c7d9b1b413468838) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 6ad81b197a..f9246f06c1 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2135,7 +2135,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
- if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) ||
+ if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||
(unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) {
s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
linesize >> field_based, 17, 17 + field_based,