]> git.sesse.net Git - ffmpeg/commitdiff
h264/get_lowest_part_list_y: remove unneeded operations
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 16 Jan 2013 00:26:44 +0000 (01:26 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 18 Jan 2013 14:06:38 +0000 (15:06 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index e1c76e3241040965b4ea448309dba3f14818a884..f43e99efc59c23b6f5c08327c1689c66d857144b 100644 (file)
@@ -309,13 +309,13 @@ 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_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_up;
     int bottom        = full_my + filter_height_down + height;
 
-    return FFMAX(abs(top), bottom);
+    av_assert2(height >= 0);
+
+    return FFMAX(0, bottom);
 }
 
 static inline void get_lowest_part_y(H264Context *h, int refs[2][48], int n,