search for: read_crc16

Displaying 6 results from an estimated 6 matches for "read_crc16".

2004 Sep 10
4
bitbuffer optimizations
...b <<= 1; - msbs += j; - - /* dispose of the unary end bit */ - blurb <<= 1; - j++; - cbits += j; - - uval = 0; - lsbs_left = parameter; - state++; - if(cbits == FLAC__BITS_PER_BLURB) { - cbits = 0; - CRC16_UPDATE_BLURB(bb, save_blurb, bb->read_crc16); - break; - } - } - else { - msbs += FLAC__BITS_PER_BLURB - cbits; - cbits = 0; - CRC16_UPDATE_BLURB(bb, save_blurb, bb->read_crc16); - break; - } - } - else { - const unsigned available_bits = FLAC__BITS_PER_BLURB - cbits; - if(lsbs_left >= availa...
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...; if(i <= bits_) { - v = bb->buffer[bb->consumed_blurbs] & (FLAC__BLURB_ALL_ONES >> bb->consumed_bits); + v = (*bbb) & (FLAC__BLURB_ALL_ONES >> bb->consumed_bits); bits_ -= i; - CRC16_UPDATE_BLURB(bb, bb->buffer[bb->consumed_blurbs], bb->read_crc16); + CRC16_UPDATE_BLURB(bb, (*bbb), bb->read_crc16); + ++bbb; bb->consumed_blurbs++; bb->consumed_bits = 0; /* we hold off updating bb->total_consumed_bits until the end */ } else { - *val = (bb->buffer[bb->consumed_blurbs] & (FLAC__BLURB_ALL_ONE...
2005 Jan 01
2
libFLAC bitbuffer optimizations
...b <<= 1; - msbs += j; - - /* dispose of the unary end bit */ - blurb <<= 1; - j++; - cbits += j; - - uval = 0; - lsbs_left = parameter; - state++; - if(cbits == FLAC__BITS_PER_BLURB) { - cbits = 0; - CRC16_UPDATE_BLURB(bb, save_blurb, bb->read_crc16); - break; - } - } - else { - msbs += FLAC__BITS_PER_BLURB - cbits; - cbits = 0; - CRC16_UPDATE_BLURB(bb, save_blurb, bb->read_crc16); - break; - } - } - else { - const unsigned available_bits = FLAC__BITS_PER_BLURB - cbits; - if(lsbs_left >= availa...
2015 Dec 16
2
about word size in bitreader/bitwriter
...case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 24), crc); case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 16) & 0xff), crc); case 16: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 8) & 0xff), crc); case 24: br->read_crc16 = FLAC__CRC16_UPDATE((unsigned)(word & 0xff), crc); } #elif FLAC__BYTES_PER_WORD == 8 switch(br->crc16_align) { case 0: crc = FLAC__CRC16_UPDATE((unsigned)(word >> 56), crc); case 8: crc = FLAC__CRC16_UPDATE((unsigned)((word >> 4...
2004 Dec 28
2
libFLAC bitbuffer optimizations
Pulled from my Arch archive, this following patch seems to have made quite a difference in getting my ARM7TDMI chip to play FLAC (compression levels 0-2) on my ipod. I don't have benchmarks with hard numbers, but playing with skips vs playing without skips is a fairly noticeable difference. memcpy and memset on uClibc are optimized in asm for the ARM7TDMI in uClibc. Other hardware/libc
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...are consumed from 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_al...