diff options
author | wm4 <wm4@nowhere> | 2019-10-31 11:24:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-10-31 11:24:20 +0100 |
commit | 6d92e5550203b04b7254eb8ffe31734e57070d79 (patch) | |
tree | fcd9f88cddae110a8a65f9e7ea59703bd79f83c5 /sub/img_convert.c | |
parent | 6fdfa7c9912ff9fda0ada6125bc4fed61b7220ea (diff) | |
download | mpv-6d92e5550203b04b7254eb8ffe31734e57070d79.tar.bz2 mpv-6d92e5550203b04b7254eb8ffe31734e57070d79.tar.xz |
Replace uses of FFMIN/MAX with MPMIN/MAX
And remove libavutil includes where possible.
Diffstat (limited to 'sub/img_convert.c')
-rw-r--r-- | sub/img_convert.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sub/img_convert.c b/sub/img_convert.c index 0ce5c7ac0a..a70bb0a24c 100644 --- a/sub/img_convert.c +++ b/sub/img_convert.c @@ -17,9 +17,7 @@ #include <string.h> #include <assert.h> - -#include <libavutil/mem.h> -#include <libavutil/common.h> +#include <limits.h> #include "mpv_talloc.h" @@ -52,15 +50,15 @@ bool mp_sub_bitmaps_bb(struct sub_bitmaps *imgs, struct mp_rect *out_bb) struct mp_rect bb = {INT_MAX, INT_MAX, INT_MIN, INT_MIN}; for (int n = 0; n < imgs->num_parts; n++) { struct sub_bitmap *p = &imgs->parts[n]; - bb.x0 = FFMIN(bb.x0, p->x); - bb.y0 = FFMIN(bb.y0, p->y); - bb.x1 = FFMAX(bb.x1, p->x + p->dw); - bb.y1 = FFMAX(bb.y1, p->y + p->dh); + bb.x0 = MPMIN(bb.x0, p->x); + bb.y0 = MPMIN(bb.y0, p->y); + bb.x1 = MPMAX(bb.x1, p->x + p->dw); + bb.y1 = MPMAX(bb.y1, p->y + p->dh); } // avoid degenerate bounding box if empty - bb.x0 = FFMIN(bb.x0, bb.x1); - bb.y0 = FFMIN(bb.y0, bb.y1); + bb.x0 = MPMIN(bb.x0, bb.x1); + bb.y0 = MPMIN(bb.y0, bb.y1); *out_bb = bb; |