diff options
author | wm4 <wm4@nowhere> | 2014-04-08 19:13:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-17 22:58:47 +0200 |
commit | 34cee2a77d00d4986cba309d1758d1cfeeb25530 (patch) | |
tree | 42eeed44885b731ad651f6659ad6906c71a8aa67 /video | |
parent | 8f5eb7b780cf7598157179d0679863e3b7a90084 (diff) | |
download | mpv-34cee2a77d00d4986cba309d1758d1cfeeb25530.tar.bz2 mpv-34cee2a77d00d4986cba309d1758d1cfeeb25530.tar.xz |
vo_vdpau: document what WRAP_ADD does
This wasn't necessarily clear.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_vdpau.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 8c50e44d6b..13c291e218 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -50,6 +50,8 @@ #include "osdep/timer.h" #include "bitmap_packer.h" +// Returns x + a, but wrapped around to the range [0, m) +// a must be within [-m, m], x within [0, m) #define WRAP_ADD(x, a, m) ((a) < 0 \ ? ((x)+(a)+(m) < (m) ? (x)+(a)+(m) : (x)+(a)) \ : ((x)+(a) < (m) ? (x)+(a) : (x)+(a)-(m))) |