diff options
Diffstat (limited to 'libavutil/internal.h')
-rw-r--r-- | libavutil/internal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h index 77af6f9512..0a201424de 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -256,6 +256,19 @@ int avpriv_open(const char *filename, int flags, ...); int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt); +static av_always_inline av_const int avpriv_mirror(int x, int w) +{ + if (!w) + return 0; + + while ((unsigned)x > (unsigned)w) { + x = -x; + if (x < 0) + x += 2 * w; + } + return x; +} + #if FF_API_GET_CHANNEL_LAYOUT_COMPAT uint64_t ff_get_channel_layout(const char *name, int compat); #endif |