mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/mpegvideo: use av_clip() instead of nested min & max
Note: MpegEncContext.mb_{y,height} are int fields, as well as local off variable.
This commit is contained in:
parent
0f6118c581
commit
622ef80e3f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user