1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 00:42:57 +00:00

vo_vdpau: document what WRAP_ADD does

This wasn't necessarily clear.
This commit is contained in:
wm4 2014-04-08 19:13:15 +02:00
parent a748b62709
commit a62276bf56

View File

@ -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)))