summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-08 19:13:15 +0200
committerwm4 <wm4@nowhere>2014-04-08 19:13:15 +0200
commita62276bf5635dc9c4d0b7a3a20e0e1b01d545d4a (patch)
tree546504293233e0877180cbfb6340487a24d6072a /video
parenta748b6270934717063797aba646072b95f141acc (diff)
downloadmpv-a62276bf5635dc9c4d0b7a3a20e0e1b01d545d4a.tar.bz2
mpv-a62276bf5635dc9c4d0b7a3a20e0e1b01d545d4a.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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 47e8bd95e2..d7e7206291 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)))