search for: flac__clz_soft_uint32

Displaying 7 results from an estimated 7 matches for "flac__clz_soft_uint32".

2012 Jun 27
1
Failed win32 build
Hello, While building from git, I'm getting the following failure (help please): CC ogg_mapping.lo CCLD libFLAC.la Creating library file: .libs/libFLAC.dll.a .libs/bitreader.o: In function `FLAC__clz_soft_uint32': ./include/private/bitmath.h:46: multiple definition of `_FLAC__clz_soft_uint32' .libs/bitmath.o:./include/private/bitmath.h:46: first defined here .libs/fixed.o: In function `FLAC__clz_soft_uint32': ./include/private/bitmath.h:46: multiple definition of `_FLAC__clz_soft_uint32' .l...
2014 Oct 11
1
bitmath.h static array
There is a function FLAC__clz_soft_uint32 in bitmath.h: static inline unsigned int FLAC__clz_soft_uint32(unsigned int word) { static const unsigned char byte_to_unary_table[] = { 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, .................................... 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };...
2012 Jun 24
3
Patch for cross compilation with MinGW32
...way, I attached a patch to allow cross compilation with MinGW32 on my machine again: First, I moved the implementation of *safe_malloc_mul_2op_ to alloc.h, just like all the other alloc implementations, and removed the thereby obsolete alloc.c implementation from grabbag. Second, I just wrapped FLAC__clz_soft_uint32 with an #ifndef __MINGW32__. I tested the patch for both Linux and MinGW32 compiles, and both result in functional programs. kind regards, Christoph Terasa -------------- next part -------------- diff --git include/share/alloc.h include/share/alloc.h index 7aa17f7..3f2f2c7 100644 --- include/sh...
2012 Aug 28
3
[PATCH 1/3] Make FLAC__clz_soft_uint32 static.
...ibFLAC/include/private/bitmath.h b/src/libFLAC/include/private/bitmath.h index 61b0e03..d32b1a7 100644 --- a/src/libFLAC/include/private/bitmath.h +++ b/src/libFLAC/include/private/bitmath.h @@ -42,7 +42,7 @@ #endif /* Will never be emitted for MSVC, GCC, Intel compilers */ -inline unsigned int FLAC__clz_soft_uint32(unsigned int word) +static inline unsigned int FLAC__clz_soft_uint32(unsigned int word) { static const unsigned char byte_to_unary_table[] = { 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, -- 1.7.7.6
2015 Dec 28
1
[PATCH 2] more changes in bitmath.h
1) FLAC supports only MSVS 2005 and newer, so (_MSC_VER >= 1400) is always true and can be removed. 2) The argument for FLAC__clz_uint32() is of FLAC__uint32 type, so FLAC__clz_soft_uint32() should have the same argument type. 3) The patch removes unnecessary parentheses around 'word' variable. 4) It also replaces "sizeof(FLAC__uint32) * CHAR_BIT - 1 - FLAC__clz_uint32(v)" with "FLAC__clz_uint32(v) ^ 31U" (and the same for 64-bit version). "size...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...ot;FLAC/ordinals.h" +/* for CHAR_BIT */ +#include <limits.h> -#if defined(__GNUC__) +#if defined(_MSC_VER) && (_MSC_VER >= 1400) +#include <intrin.h> /* for _BitScanReverse* */ +#endif + +/* Will never be emitted for MSVC, GCC, Intel compilers */ +inline unsigned int FLAC__clz_soft_uint32(unsigned int word) +{ + static const unsigned char byte_to_unary_table[] = { + 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1,...
2013 Aug 16
1
PATCH for bitmath.h: 1 typo, 1 warning
...g or to a software routine in exotic machines. */ return __builtin_clz(v); #elif defined(_MSC_VER) && (_MSC_VER >= 1400) - FLAC__uint32 idx; + unsigned long idx; _BitScanReverse(&idx, v); - return idx ^ 31U; + return (unsigned)idx ^ 31U; #else return FLAC__clz_soft_uint32(v); #endif