-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,9 +82,9 @@ void opj_mct_encode( | |
OPJ_SIZE_T i; | ||
const OPJ_SIZE_T len = n; | ||
/* buffer are aligned on 16 bytes */ | ||
assert( (uintptr_t)c0 & 16 == 0 ); | ||
assert( (uintptr_t)c1 & 16 == 0 ); | ||
assert( (uintptr_t)c2 & 16 == 0 ); | ||
assert( ((uintptr_t)c0 & 0xf) == 0 ); | ||
assert( ((uintptr_t)c1 & 0xf) == 0 ); | ||
assert( ((uintptr_t)c2 & 0xf) == 0 ); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
malaterre
Author
Collaborator
|
||
|
||
for(i = 0; i < (len & ~3U); i += 4) { | ||
__m128i y, u, v; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ static inline void *opj_aligned_realloc_n(void *ptr, size_t alignment, size_t si | |
/* glibc doc states one can mixed aligned malloc with realloc */ | ||
void *r_ptr = realloc( ptr, size ); | ||
/* fast path */ | ||
if( (uintptr_t)r_ptr & alignment == 0 ) | ||
if( ((uintptr_t)r_ptr & alignment) == 0 ) | ||
This comment has been minimized.
Sorry, something went wrong.
mayeut
Collaborator
|
||
return r_ptr; | ||
/* this is non-trivial to implement a portable aligned realloc, so use a | ||
* simple approach where we do not need a function that return the size of an | ||
|
Isn't
uintptr_t
optional even in c99 ? given the comparison, it can be replaced with a, maybe, shorter but always definedunsigned int
.