search for: flac__bits_per_blurb

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

2004 Dec 28
2
libFLAC bitbuffer optimizations
...c--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 = r_end - r; + FLAC__blurb *...
2005 Jan 01
2
libFLAC bitbuffer optimizations
...Miroslav's patch, from the mailing list post I dug up in the archives: --- orig/src/libFLAC/bitbuffer.c +++ mod/src/libFLAC/bitbuffer.c @@ -62,6 +62,24 @@ * keeping in mind the limit from the first paragraph. */ static const unsigned FLAC__BITBUFFER_DEFAULT_CAPACITY = ((65536 - 64) * 8) / FLAC__BITS_PER_BLURB; /* blurbs */ +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, 1...
2004 Sep 10
4
bitbuffer optimizations
.... -- Miroslav Lichvar -------------- next part -------------- --- src/libFLAC/bitbuffer.c.orig 2003-01-30 17:36:01.000000000 +0100 +++ src/libFLAC/bitbuffer.c 2003-01-30 21:53:18.000000000 +0100 @@ -51,6 +51,25 @@ */ static const unsigned FLAC__BITBUFFER_DEFAULT_CAPACITY = ((65536 - 64) * 8) / FLAC__BITS_PER_BLURB; /* blurbs */ +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, 1, 1, 1, 1, 1, 1, 1, 1,...
2005 Jan 24
0
libFLAC bitbuffer optimizations
...er.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 faster + */ + const...
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...r, int lp_quantization, FLAC__int32 data[]) { --- orig/src/libFLAC/bitbuffer.c +++ mod/src/libFLAC/bitbuffer.c @@ -1466,6 +1469,7 @@ { unsigned i, bits_ = bits; FLAC__uint32 v = 0; + FLAC__blurb *bbb; FLAC__ASSERT(0 != bb); FLAC__ASSERT(0 != bb->buffer); @@ -1485,18 +1489,20 @@ #if FLAC__BITS_PER_BLURB > 8 if(bb->bits == 0 || bb->consumed_blurbs < bb->blurbs) { /*@@@ comment on why this is here*/ #endif + bbb = &bb->buffer[bb->consumed_blurbs]; if(bb->consumed_bits) { i = FLAC__BITS_PER_BLURB - bb->consumed_bits; if(i <= bits_) { - v = bb->bu...
2004 Dec 29
0
libFLAC bitbuffer optimizations
.../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_blur...