vdpau: fix -Wabsolute-value warning
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 25 Nov 2020 14:32:36 +0000 (15:32 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 5 Jan 2021 11:29:11 +0000 (11:29 +0000)
commitcd1ac36ddde6eaf758d1cbb7a501369f5d60d330
tree060b58179b5de040877fcc3baa93f103584f705c
parentc5973ede01c4d5458b3d487f7b7486707d905c52
vdpau: fix -Wabsolute-value warning

vdpau specifies that top-left is x0/y0, bottom-right is x1/y1 and that x0/y0 are
inclusive while x1/y1 are exclusive.

This commit remove the abs() usage and instead verifies that the VdpRects passed
by the user matche the documentation. When they don't they're treated as empty
rectangles.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7846>
src/gallium/frontends/vdpau/output.c
src/gallium/frontends/vdpau/vdpau_private.h