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 /common/common.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 'common/common.c')
-rw-r--r-- | common/common.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/common.c b/common/common.c index e8a100dcc4..d0b2382b78 100644 --- a/common/common.c +++ b/common/common.c @@ -96,10 +96,10 @@ char *mp_format_time(double time, bool fractions) // Set rc to the union of rc and rc2 void mp_rect_union(struct mp_rect *rc, const struct mp_rect *rc2) { - rc->x0 = FFMIN(rc->x0, rc2->x0); - rc->y0 = FFMIN(rc->y0, rc2->y0); - rc->x1 = FFMAX(rc->x1, rc2->x1); - rc->y1 = FFMAX(rc->y1, rc2->y1); + rc->x0 = MPMIN(rc->x0, rc2->x0); + rc->y0 = MPMIN(rc->y0, rc2->y0); + rc->x1 = MPMAX(rc->x1, rc2->x1); + rc->y1 = MPMAX(rc->y1, rc2->y1); } // Returns whether or not a point is contained by rc @@ -112,10 +112,10 @@ bool mp_rect_contains(struct mp_rect *rc, int x, int y) // Return false if the result is empty. bool mp_rect_intersection(struct mp_rect *rc, const struct mp_rect *rc2) { - rc->x0 = FFMAX(rc->x0, rc2->x0); - rc->y0 = FFMAX(rc->y0, rc2->y0); - rc->x1 = FFMIN(rc->x1, rc2->x1); - rc->y1 = FFMIN(rc->y1, rc2->y1); + rc->x0 = MPMAX(rc->x0, rc2->x0); + rc->y0 = MPMAX(rc->y0, rc2->y0); + rc->x1 = MPMIN(rc->x1, rc2->x1); + rc->y1 = MPMIN(rc->y1, rc2->y1); return rc->x1 > rc->x0 && rc->y1 > rc->y0; } |