提交 622ef80e 编写于 作者: C 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.
上级 0f6118c5
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册