diff options
-rw-r--r-- | mpvcore/mp_common.h | 4 | ||||
-rw-r--r-- | video/mp_image.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mpvcore/mp_common.h b/mpvcore/mp_common.h index ee2f055807..543c22073e 100644 --- a/mpvcore/mp_common.h +++ b/mpvcore/mp_common.h @@ -40,6 +40,10 @@ do { type SWAP_tmp = b; b = a; a = SWAP_tmp; } while (0) #define MP_ARRAY_SIZE(s) (sizeof(s) / sizeof((s)[0])) +// align must be a power of two (align >= 1), x >= 0 +#define MP_ALIGN_UP(x, align) (((x) + (align) - 1) & ~((align) - 1)) +#define MP_ALIGN_DOWN(x, align) ((x) & ~((align) - 1)) + #define CONTROL_OK 1 #define CONTROL_TRUE 1 #define CONTROL_FALSE 0 diff --git a/video/mp_image.h b/video/mp_image.h index ac981533a0..e198c4e547 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -161,8 +161,4 @@ void mp_image_copy_fields_to_av_frame(struct AVFrame *dst, struct mp_image *mp_image_from_av_frame(struct AVFrame *av_frame); struct AVFrame *mp_image_to_av_frame_and_unref(struct mp_image *img); -// align must be a power of two (align >= 1), v >= 0 -#define MP_ALIGN_UP(v, align) FFALIGN(v, align) -#define MP_ALIGN_DOWN(v, align) ((v) & ~((align) - 1)) - #endif /* MPLAYER_MP_IMAGE_H */ |