search for: log2_frac

Displaying 2 results from an estimated 2 matches for "log2_frac".

2009 Apr 11
1
get_required_bits32() and alloca() -> corrupted stack
...sing alloca(). When get_required_bits32() (in file cwrs.c:308) is called from get_required_bits() (in file cwrs.c:328) the 'K' parameter is 1 which means that the uint32 which is allocated on the stack only has 3 bytes instead of 4. This results in a corrupted stack in the following call to log2_frac().Shouldn't the line cwrs.c:313:ALLOC(u,K+2,celt_uint32_t);Instead say:ALLOC(u,max(K+2,sizeof(celt_uint32_t)),celt_uint32_t);?-- Bjoern _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!...
2011 Mar 03
0
[PATCH] Eliminate the ec_int32 and ec_uint32 typedefs.
...d; diff --git a/libcelt/cwrs.c b/libcelt/cwrs.c index 40dcc55..21d278f 100644 --- a/libcelt/cwrs.c +++ b/libcelt/cwrs.c @@ -42,7 +42,7 @@ with frac bits of fractional precision. Tested for all possible 32-bit inputs with frac=4, where the maximum overestimation is 0.06254243 bits.*/ -int log2_frac(ec_uint32 val, int frac) +int log2_frac(celt_uint32 val, int frac) { int l; l=EC_ILOG(val); diff --git a/libcelt/cwrs.h b/libcelt/cwrs.h index 1224a26..443213f 100644 --- a/libcelt/cwrs.h +++ b/libcelt/cwrs.h @@ -35,7 +35,7 @@ #include "entenc.h" #include "entdec.h" -...