diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-16 01:26:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-18 15:06:38 +0100 |
commit | 13178d002bed6e2ad2d99fd086ff88ed126ca086 (patch) | |
tree | f0fb4512adadb80db6b4cb5ff4b69d97af912949 | |
parent | 8ac0d95bd371a3cf6b4dd57a3d56cdc7bceef464 (diff) | |
download | ffmpeg-13178d002bed6e2ad2d99fd086ff88ed126ca086.tar.gz |
h264/get_lowest_part_list_y: remove unneeded operations
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e1c76e3241..f43e99efc5 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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, |