mirror of https://github.com/mpv-player/mpv
vo_vdpau: document what WRAP_ADD does
This wasn't necessarily clear.
This commit is contained in:
parent
a748b62709
commit
a62276bf56
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue