From: Hyeonmyeong Choi Date: Sat, 2 Feb 2013 09:41:33 +0000 (+0900) Subject: include: Modify exynos_format.h for define ALIGN UP/DOWN X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf53dddaa8086253da888ff1b58116ac1f06a968;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos.git include: Modify exynos_format.h for define ALIGN UP/DOWN Change-Id: I0c7e85dc6f2f3b3f859d54bd109b57d46f90e684 Signed-off-by: Hyeonmyeong Choi --- diff --git a/include/exynos_format.h b/include/exynos_format.h old mode 100644 new mode 100755 index f4c0466..fff96ce --- a/include/exynos_format.h +++ b/include/exynos_format.h @@ -58,7 +58,9 @@ struct ADDRS { /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ #define V4L2_PIX_FMT_NV12T v4l2_fourcc('T', 'V', '1', '2') -#define ALIGN(x, a) (((x) + (a) - 1) & ~((a) - 1)) +#define ALIGN_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) +#define ALIGN_DOWN(x, a) ((x) - (x % a)) +#define ALIGN(x, a) ALIGN_UP(x, a) #define ALIGN_TO_32B(x) ((((x) + (1 << 5) - 1) >> 5) << 5) #define ALIGN_TO_128B(x) ((((x) + (1 << 7) - 1) >> 7) << 7) #define ALIGN_TO_8KB(x) ((((x) + (1 << 13) - 1) >> 13) << 13)