mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
make ALIGN_xxx naming consistent
(potentially for future factorization between enc/ and dec/) Change-Id: Ibf6670e21433a6a6a7202dcbe76f7efc8493b8cf
This commit is contained in:
parent
57606047ec
commit
432e5b550e
@ -15,7 +15,8 @@
|
||||
#include "./vp8i.h"
|
||||
#include "../utils/utils.h"
|
||||
|
||||
#define ALIGN_MASK (32 - 1)
|
||||
#define ALIGN_CST (32 - 1)
|
||||
#define DO_ALIGN(PTR) ((uintptr_t)((PTR) + ALIGN_CST) & ~ALIGN_CST)
|
||||
|
||||
static void ReconstructRow(const VP8Decoder* const dec,
|
||||
const VP8ThreadContext* ctx); // TODO(skal): remove
|
||||
@ -552,7 +553,7 @@ static int AllocateMemory(VP8Decoder* const dec) {
|
||||
const uint64_t needed = (uint64_t)intra_pred_mode_size
|
||||
+ top_size + mb_info_size + f_info_size
|
||||
+ yuv_size + mb_data_size
|
||||
+ cache_size + alpha_size + ALIGN_MASK;
|
||||
+ cache_size + alpha_size + ALIGN_CST;
|
||||
uint8_t* mem;
|
||||
|
||||
if (needed != (size_t)needed) return 0; // check for overflow
|
||||
@ -589,8 +590,8 @@ static int AllocateMemory(VP8Decoder* const dec) {
|
||||
dec->thread_ctx_.f_info_ += mb_w;
|
||||
}
|
||||
|
||||
mem = (uint8_t*)((uintptr_t)(mem + ALIGN_MASK) & ~ALIGN_MASK);
|
||||
assert((yuv_size & ALIGN_MASK) == 0);
|
||||
mem = (uint8_t*)DO_ALIGN(mem);
|
||||
assert((yuv_size & ALIGN_CST) == 0);
|
||||
dec->yuv_b_ = (uint8_t*)mem;
|
||||
mem += yuv_size;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user