search for: total_consumed_bit

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

Did you mean: total_consumed_bits
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...t;> 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_ONES >> bb->consumed_bits)) >> (i-bits_); + *val = ((*bbb) & (FLAC__BLURB_ALL_ONES >> bb->consumed_bits)) >> (i-bits_); bb->consumed_bits += bits...
2004 Dec 28
2
libFLAC bitbuffer optimizations
...{arch}/flac/flac--ipod/flac--ipod--1.1.0/eric@petta-tech.com--2004b-ordinary/patch-log/patch-27 * modified files --- orig/src/libFLAC/bitbuffer.c +++ mod/src/libFLAC/bitbuffer.c @@ -233,11 +233,26 @@ /* first shift the unconsumed buffer data toward the front as much as possible */ if(bb->total_consumed_bits >= FLAC__BITS_PER_BLURB) { +#if FLAC__BITS_PER_BLURB == 8 + /* + * memset and memcpy are usually implemented in assembly language + * by the system libc, and they can be much faster + */ + unsigned r_end = (bb->blurbs + (bb->bits? 1:0)), + r = bb->consumed_blurbs, l =...
2005 Jan 01
2
libFLAC bitbuffer optimizations
...nvals) { - /* back up one if we exited the for loop because we read all nvals but the end came in the middle of a blurb */ - i--; - break; - } - - msbs = 0; - state = 0; - } - } - } - i++; - - bb->consumed_blurbs = i; - bb->consumed_bits = cbits; - bb->total_consumed_bits = (i << FLAC__BITS_PER_BLURB_LOG2) | cbits; - } - - /* - * Now that we are blurb-aligned the logic is slightly simpler - */ + while(val_i < nvals) { - for( ; i < bb->blurbs && val_i < nvals; i++) { - save_blurb = blurb = buffer[i]; - cbits = 0; + for( ; i <...
2004 Sep 10
4
bitbuffer optimizations
...nvals) { - /* back up one if we exited the for loop because we read all nvals but the end came in the middle of a blurb */ - i--; - break; - } - - msbs = 0; - state = 0; - } - } - } - i++; - - bb->consumed_blurbs = i; - bb->consumed_bits = cbits; - bb->total_consumed_bits = (i << FLAC__BITS_PER_BLURB_LOG2) | cbits; - } - - /* - * Now that we are blurb-aligned the logic is slightly simpler - */ while(val_i < nvals) { - for( ; i < bb->blurbs && val_i < nvals; i++) { - save_blurb = blurb = buffer[i]; - cbits = 0; + for( ; i < bb-...
2005 Jan 24
0
libFLAC bitbuffer optimizations
...c/flac/src/libFLAC/bitbuffer.c,v retrieving revision 1.55 diff -u -r1.55 bitbuffer.c --- bitbuffer.c 25 Jan 2005 02:37:08 -0000 1.55 +++ bitbuffer.c 25 Jan 2005 02:39:52 -0000 @@ -228,11 +228,27 @@ /* first shift the unconsumed buffer data toward the front as much as possible */ if(bb->total_consumed_bits >= FLAC__BITS_PER_BLURB) { - unsigned l = 0, r = bb->consumed_blurbs, r_end = bb->blurbs + (bb->bits? 1:0); +#if FLAC__BITS_PER_BLURB == 8 + /* + * memset and memcpy are usually implemented in assembly language + * by the system libc, and they can be much fast...
2004 Dec 29
0
libFLAC bitbuffer optimizations
...a-tech.com--2004b-ordinary/patch-log/patch-27 > > * modified files > > --- orig/src/libFLAC/bitbuffer.c > +++ mod/src/libFLAC/bitbuffer.c > @@ -233,11 +233,26 @@ > > /* first shift the unconsumed buffer data toward the front as much > as possible */ > if(bb->total_consumed_bits >= FLAC__BITS_PER_BLURB) { > +#if FLAC__BITS_PER_BLURB == 8 > + /* > + * memset and memcpy are usually implemented in assembly language > + * by the system libc, and they can be much faster > + */ > + unsigned r_end = (bb->blurbs + (bb->bits? 1:0)), > +...