moved ALIGN_CST into util/utils.h and renamed WEBP_ALIGN_xxx

Note that ALIGN_CST is still kept different in dec/frame.c for now,
because the values is 31 there, not 15. We might re-unite these two
later.

Change-Id: Ibbee607fac4eef02f175b56f0bb0ba359fda3b87
This commit is contained in:
Pascal Massimino
2015-10-13 23:51:19 -07:00
parent a26408389a
commit 12ec204ec7
6 changed files with 25 additions and 23 deletions

View File

@ -43,6 +43,12 @@ WEBP_EXTERN(void*) WebPSafeCalloc(uint64_t nmemb, size_t size);
// Companion deallocation function to the above allocations.
WEBP_EXTERN(void) WebPSafeFree(void* const ptr);
//------------------------------------------------------------------------------
// Alignment
#define WEBP_ALIGN_CST 15
#define WEBP_ALIGN(PTR) ((uintptr_t)((PTR) + WEBP_ALIGN_CST) & ~WEBP_ALIGN_CST)
//------------------------------------------------------------------------------
// Reading/writing data.