search for: swap_be_word_to_host

Displaying 5 results from an estimated 5 matches for "swap_be_word_to_host".

2012 Apr 05
1
[PATCH] remove unnecesary typedef in bitwriter.c
...er.c b/src/libFLAC/bitwriter.c index 651440d..7da4b15 100644 --- a/src/libFLAC/bitwriter.c +++ b/src/libFLAC/bitwriter.c @@ -43,12 +43,11 @@ /* Things should be fastest when this matches the machine word size */ /* WATCHOUT: if you change this you must also change the following #defines down to SWAP_BE_WORD_TO_HOST below to match */ -/* WATCHOUT: there are a few places where the code will not work unless bwword is >= 32 bits wide */ -typedef FLAC__uint32 bwword; +/* WATCHOUT: there are a few places where the code will not work unless uint32_t is >= 32 bits wide */ #define FLAC__BYTES_PER_WORD 4 #defin...
2015 Dec 20
2
about word size in bitreader/bitwriter
Erik de Castro Lopo wrote: > The think in and ideal world we would a: > > * Make it work correctly FLAC__BYTES_PER_WORD == 8 and compare the performance > with FLAC__BYTES_PER_WORD == 4. > * If there is an statistically measurable performance, keep it, otherwise > remove the FLAC__BYTES_PER_WORD == 8 code all together. I'll try to do it, but I don't have a deep
2016 Jan 04
0
about word size in bitreader/bitwriter
...re less likely to be split across two words. In the measurements comparing 32-bit and 64-bit words you posted later, I'm wondering why there is a slow down in decoding of 24-bit files. Does profiling show it comes from the read_rice_signed_block() function or something else? Could it be slower SWAP_BE_WORD_TO_HOST or COUNT_ZERO_MSBS2? -- Miroslav Lichvar
2015 Dec 16
2
about word size in bitreader/bitwriter
There are preprocessor definitions in bitreader.c and bitwriter.c: /* Things should be fastest when this matches the machine word size */ /* WATCHOUT: if you change this you must also change the following #defines down to SWAP_BE_WORD_TO_HOST below to match */ /* WATCHOUT: there are a few places where the code will not work unless uint32_t is >= 32 bits wide */ #define FLAC__BYTES_PER_WORD 4 #define FLAC__BITS_PER_WORD 32 #define FLAC__WORD_ALL_ONES ((FLAC__uint32)0xffffffff) ... and the following code in bi...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...to match */ /* WATCHOUT: there are a few places where the code will not work unless uint32_t is >= 32 bits wide */ /* also, some sections currently only have fast versions for 4 or 8 bytes per word */ #define FLAC__BYTES_PER_WORD 4 /* sizeof uint32_t */ @@ -56,27 +56,6 @@ #define SWAP_BE_WORD_TO_HOST(x) ENDSWAP_32(x) #endif -#if defined(__GNUC__) -/* "int __builtin_clz (unsigned int x) If x is 0, the result is undefined" */ -static inline uint32_t -COUNT_ZERO_MSBS (uint32_t word) -{ - if (word == 0) - return 32; - return __builtin_clz (word); -} -#else -/* counts the # of zero MS...