search for: flac__bytes_per_word

Displaying 14 results from an estimated 14 matches for "flac__bytes_per_word".

Did you mean: flac__bits_per_word
2015 Dec 16
2
about word size in bitreader/bitwriter
...test 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 bitreader.c: #if FLAC__BYTES_PER_WORD == 4 switch(br->crc16_align) { case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 24), c...
2015 Dec 29
2
FLAC__BYTES_PER_WORD==8 test results
I wrote a patch that enables FLAC__BYTES_PER_WORD==8 in libFLAC/bitreader.c and libFLAC\bitwriter.c. The tests were done on an Intel Nehalem CPU, and flac was compiled with CGG 4.9.x. Average speed increase for FLAC__BYTES_PER_WORD change from 4 to 8: Decoding speed: ia32 architecture 16-bit .flac: -15% 24-bit .flac: -11%...
2015 Dec 29
2
FLAC__BYTES_PER_WORD==8 test results
.../bitwriter.c among them. So now I wait for the decision for patches #3 and #4 that I posted yesterday. > The slower decoding speed for 24 bit content on x86_64 seems > surprising, but minor. > However losing 15% decoding speed on i386 would be very bad. So, does it make sense to #define FLAC__BYTES_PER_WORD (in bitreader.c) as 4 for 32-bit and as 8 for 64-bit targets?
2015 Dec 30
2
FLAC__BYTES_PER_WORD==8 test results
On Dec 30, 2015, at 3:09 AM, Thomas Zander <thomas.e.zander at googlemail.com> wrote: > On 29 December 2015 at 21:50, lvqcl <lvqcl.mail at gmail.com> wrote: >> So, does it make sense to #define FLAC__BYTES_PER_WORD (in bitreader.c) >> as 4 for 32-bit and as 8 for 64-bit targets? > > Your tests so far imply this is a sensible default. > I'd say go ahead. We can always change it if it turns out there is a > better option. > > Riggs What's wrong with something incredible simple...
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 understanding of bit(read|write)...
2015 Dec 31
1
FLAC__BYTES_PER_WORD==8 test results
On 31-Dec-15 09:00, Erik de Castro Lopo wrote: > Brian Willoughby wrote: > >> What's wrong with something incredible simple, like: >> >> #define FLAC__BYTES_PER_WORD (sizeof(int)) > The fact that it actually is not correct. We want to determine > the size in bits of the CPU registers. > > Here's what I know: > > sizeof(int) sizeof (long) > ---------------+----------------+----------------- > 32 bit...
2015 Dec 31
1
[PATCH] Support 64-bit brword/bwword
Here is the patch that allows to set FLAC__BYTES_PER_WORD to 8. This is disabled by default though. To test FLAC__BYTES_PER_WORD==8: open src/libFLAC/bitreader.c, src/libFLAC/bitwriter.c, src/test_libFLAC/bitwriter.c and change '#if 1' to '#if 0'. The value of FLAC__BYTES_PER_WORD must be the same in src/libFLAC/bitwriter.c and src/test_l...
2016 Jan 04
0
about word size in bitreader/bitwriter
On Sun, Dec 20, 2015 at 01:30:57PM +0300, lvqcl wrote: > 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 understa...
2008 Mar 14
2
bitreader optimizations
...==================== RCS file: /cvsroot/flac/flac/src/libFLAC/bitreader.c,v retrieving revision 1.15 diff -u -r1.15 bitreader.c --- src/libFLAC/bitreader.c 28 Feb 2008 05:34:26 -0000 1.15 +++ src/libFLAC/bitreader.c 14 Mar 2008 13:19:46 -0000 @@ -149,6 +148,7 @@ FLAC__CPUInfo cpu_info; }; +#if FLAC__BYTES_PER_WORD == 4 && FLAC__CPU_IA32 #ifdef _MSC_VER /* OPT: an MSVC built-in would be better */ static _inline FLAC__uint32 local_swap32_(FLAC__uint32 x) @@ -173,6 +173,15 @@ done1: } } +#elif __GNUC__ +static void local_swap32_block_(FLAC__uint32 *start, FLAC__uint32 len) +{ + FLAC__uint32 *end;...
2016 Dec 05
4
Some additions for the 1.3.2 changelog?
...: Only use large buffers when writing to disk https://git.xiph.org/?p=flac.git;a=commit;h=f0ee453c23eacd1a10762b2301384ddc19821052 libFLAC: Fix potential memory leaks https://git.xiph.org/?p=flac.git;a=commit;h=15a9062609c123b56df104a575dba657c2577e0b libFLAC: Support 64bit brword/bwword allowing FLAC__BYTES_PER_WORD to be set to 8. This is disabled by default. Thanks, Maurits
2012 Apr 05
1
[PATCH] remove unnecesary typedef in bitwriter.c
...s 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 #define FLAC__BITS_PER_WORD 32 #define FLAC__WORD_ALL_ONES ((FLAC__uint32)0xffffffff) -/* SWAP_BE_WORD_TO_HOST swaps bytes in a bwword (which is always big-endian) if necessary to match host byte order */ +/* SWAP_BE_WORD_TO_HOST swaps bytes in a uint32_t (which is always big-endian) if necessa...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...you must also change the following #defines down to FLAC__clz_uint32 below 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) - retur...
2016 Jan 08
8
Lets do a 1.3.2 release
HI all, I think its time for a new release. The current code base is stable and I've been building it for x86_64/linux, powerpc/linux, armhf/linux, x86_64/darwin in a Jenkins build bot. I'm pretty sure others have been building regularly on their platforms of interest. I made a first pass on an update to the changelog.html. I' also putting toether a release checklist that I will add
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...m the left */ @@ -138,7 +134,7 @@ struct FLAC__BitReader { FLAC__CPUInfo cpu_info; }; -static FLaC__INLINE void crc16_update_word_(FLAC__BitReader *br, uint32_t word) +static inline void crc16_update_word_(FLAC__BitReader *br, uint32_t word) { register unsigned crc = br->read_crc16; #if FLAC__BYTES_PER_WORD == 4 @@ -373,17 +369,17 @@ FLAC__uint16 FLAC__bitreader_get_read_crc16(FLAC__BitReader *br) return br->read_crc16; } -FLaC__INLINE FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader *br) +inline FLAC__bool FLAC__bitreader_is_consumed_byte_aligned(const FLAC__BitReader...