mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
change WEBP_ALIGN_CST value to 31
(and make dec/frame.c use the common macros too) Change-Id: Ie44dbd82e067934b17ca3ffba4dd45ab0d61d3f6
This commit is contained in:
parent
f717b82864
commit
d64d376c2a
@ -15,9 +15,6 @@
|
||||
#include "./vp8i.h"
|
||||
#include "../utils/utils.h"
|
||||
|
||||
#define ALIGN_CST (32 - 1)
|
||||
#define DO_ALIGN(PTR) ((uintptr_t)((PTR) + ALIGN_CST) & ~ALIGN_CST)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Main reconstruction function.
|
||||
|
||||
@ -724,7 +721,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_CST;
|
||||
+ cache_size + alpha_size + WEBP_ALIGN_CST;
|
||||
uint8_t* mem;
|
||||
|
||||
if (needed != (size_t)needed) return 0; // check for overflow
|
||||
@ -761,8 +758,8 @@ static int AllocateMemory(VP8Decoder* const dec) {
|
||||
dec->thread_ctx_.f_info_ += mb_w;
|
||||
}
|
||||
|
||||
mem = (uint8_t*)DO_ALIGN(mem);
|
||||
assert((yuv_size & ALIGN_CST) == 0);
|
||||
mem = (uint8_t*)WEBP_ALIGN(mem);
|
||||
assert((yuv_size & WEBP_ALIGN_CST) == 0);
|
||||
dec->yuv_b_ = (uint8_t*)mem;
|
||||
mem += yuv_size;
|
||||
|
||||
|
@ -46,7 +46,7 @@ WEBP_EXTERN(void) WebPSafeFree(void* const ptr);
|
||||
//------------------------------------------------------------------------------
|
||||
// Alignment
|
||||
|
||||
#define WEBP_ALIGN_CST 15
|
||||
#define WEBP_ALIGN_CST 31
|
||||
#define WEBP_ALIGN(PTR) ((uintptr_t)((PTR) + WEBP_ALIGN_CST) & ~WEBP_ALIGN_CST)
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user