summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/h264.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3298565d97..2a711bdfff 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -290,10 +290,11 @@ static inline int get_lowest_part_list_y(H264Context *h, Picture *pic, int n,
int height, int y_offset, int list)
{
int raw_my = h->mv_cache[list][scan8[n]][1];
- int filter_height = (raw_my & 3) ? 2 : 0;
+ int filter_height_up = (raw_my & 3) ? 2 : 0;
+ int filter_height_down = (raw_my & 3) ? 3 : 0;
int full_my = (raw_my >> 2) + y_offset;
- int top = full_my - filter_height;
- int bottom = full_my + filter_height + height;
+ int top = full_my - filter_height_up;
+ int bottom = full_my + filter_height_down + height;
return FFMAX(abs(top), bottom);
}