[FFmpeg-cvslog] avcodec/mpegvideo: use av_clip() instead of nested min & max
Clément Bœsch
git at videolan.org
Sat Jun 6 13:18:36 CEST 2015
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sat Jun 6 12:55:20 2015 +0200| [622ef80e3f5fae400e22aa1417b012d323c04eed] | committer: Clément Bœsch
avcodec/mpegvideo: use av_clip() instead of nested min & max
Note: MpegEncContext.mb_{y,height} are int fields, as well as local off
variable.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=622ef80e3f5fae400e22aa1417b012d323c04eed
---
libavcodec/mpegvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index d4a84d4..57d9620 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -2776,7 +2776,7 @@ int ff_mpv_lowest_referenced_row(MpegEncContext *s, int dir)
off = ((FFMAX(-my_min, my_max)<<qpel_shift) + 63) >> 6;
- return FFMIN(FFMAX(s->mb_y + off, 0), s->mb_height-1);
+ return av_clip(s->mb_y + off, 0, s->mb_height - 1);
unhandled:
return s->mb_height-1;
}
More information about the ffmpeg-cvslog
mailing list