Displaying 17 results from an estimated 17 matches for "consumed_bit".
Did you mean:
consumed_bits
2008 Mar 14
2
bitreader optimizations
...er *br, int vals[], unsigned nvals, unsigned parameter)
-/* OPT: possibly faster version for use with MSVC */
-#ifdef _MSC_VER
{
- unsigned i;
- unsigned uval = 0;
- unsigned bits; /* the # of binary LSBs left to read to finish a rice codeword */
-
/* try and get br->consumed_words and br->consumed_bits into register;
* must remember to flush them back to *br before calling other
- * bitwriter functions that use them, and before returning */
- register unsigned cwords;
- register unsigned cbits;
+ * bitreader functions that use them, and before returning */
+ unsigned cwords, words, lsbs, ms...
2012 May 04
0
[PATCH] Optimize FLAC__bitreader_read_rice_signed
...er *br, int vals[], unsigned nvals, unsigned parameter)
-/* OPT: possibly faster version for use with MSVC */
-#ifdef _MSC_VER
{
- unsigned i;
- unsigned uval = 0;
- unsigned bits; /* the # of binary LSBs left to read to finish a rice codeword */
-
/* try and get br->consumed_words and br->consumed_bits into register;
* must remember to flush them back to *br before calling other
- * bitwriter functions that use them, and before returning */
- register unsigned cwords;
- register unsigned cbits;
+ * bitreader functions that use them, and before returning */
+ unsigned cwords, words, lsbs, ms...
2008 Mar 17
0
bitreader optimizations
...er *br, int vals[], unsigned nvals, unsigned parameter)
-/* OPT: possibly faster version for use with MSVC */
-#ifdef _MSC_VER
{
- unsigned i;
- unsigned uval = 0;
- unsigned bits; /* the # of binary LSBs left to read to finish a rice codeword */
-
/* try and get br->consumed_words and br->consumed_bits into register;
* must remember to flush them back to *br before calling other
- * bitwriter functions that use them, and before returning */
- register unsigned cwords;
- register unsigned cbits;
+ * bitreader functions that use them, and before returning */
+ unsigned cwords, words, lsbs, ms...
2012 Aug 28
3
[PATCH 1/3] Make FLAC__clz_soft_uint32 static.
---
src/libFLAC/include/private/bitmath.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libFLAC/include/private/bitmath.h b/src/libFLAC/include/private/bitmath.h
index 61b0e03..d32b1a7 100644
--- a/src/libFLAC/include/private/bitmath.h
+++ b/src/libFLAC/include/private/bitmath.h
@@ -42,7 +42,7 @@
#endif
/* Will never be emitted for MSVC, GCC, Intel compilers */
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...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->buffer[bb->consumed_blurbs] & (FLAC__BLURB_ALL_ONES >> bb->consumed_bits);
+ v = (*bbb) & (FLAC__BLURB_ALL_ONES >> bb->consumed_bits);
bits_ -= i;
- CRC16_UPDATE_...
2005 Jan 01
2
libFLAC bitbuffer optimizations
...) >> 8] + 16 \
+ : ((blurb) <=0xffffff \
+ ? byte_to_unary_table[(blurb) >> 16] + 8 \
+ : byte_to_unary_table[(blurb) >> 24])))
#else
/* ERROR, only sizes of 8 and 32 are supported */
#endif
@@ -2109,114 +2135,18 @@
if(nvals == 0)
return true;
+ cbits = bb->consumed_bits;
i = bb->consumed_blurbs;
- /*
- * We unroll the main loop to take care of partially consumed blurbs here.
- */
- if(bb->consumed_bits > 0) {
- save_blurb = blurb = buffer[i];
- cbits = bb->consumed_bits;
- blurb <<= cbits;
-
- while(1) {
- if(state == 0) {
- if(blur...
2004 Sep 10
4
bitbuffer optimizations
..._unary_table[(blurb) >> 8] + 16 : ((blurb) <= 0xffffff ? byte_to_unary_table[(blurb) >> 16] + 8 : byte_to_unary_table[(blurb) >> 24])))
#else
/* ERROR, only sizes of 8 and 32 are supported */
#endif
@@ -2090,114 +2111,16 @@
if(nvals == 0)
return true;
+ cbits = bb->consumed_bits;
i = bb->consumed_blurbs;
- /*
- * We unroll the main loop to take care of partially consumed blurbs here.
- */
- if(bb->consumed_bits > 0) {
- save_blurb = blurb = buffer[i];
- cbits = bb->consumed_bits;
- blurb <<= cbits;
-
- while(1) {
- if(state == 0) {
- if(blur...
2004 Dec 28
2
libFLAC bitbuffer optimizations
.../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 =...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...FLAC__U64L(x) x
@@ -679,7 +639,7 @@ FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *va
while(br->consumed_words < br->words) { /* if we've not consumed up to a partial tail word... */
uint32_t b = br->buffer[br->consumed_words] << br->consumed_bits;
if(b) {
- i = COUNT_ZERO_MSBS(b);
+ i = FLAC__clz_uint32(b);
*val += i;
i++;
br->consumed_bits += i;
@@ -709,7 +669,7 @@ FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *va
const unsigned end = br->bytes * 8;
uint32_t b = (br->...
2017 Jan 19
4
[PATCH] Fix cppcheck warnings
...ader.c b/src/libFLAC/bitreader.c
index 386f420..7554385 100644
--- a/src/libFLAC/bitreader.c
+++ b/src/libFLAC/bitreader.c
@@ -306,7 +306,7 @@ void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out)
if(i < br->consumed_words || (i == br->consumed_words && j < br->consumed_bits))
fprintf(out, ".");
else
- fprintf(out, "%01u", br->buffer[i] & ((brword)1 << (FLAC__BITS_PER_WORD-j-1)) ? 1:0);
+ fprintf(out, "%01d", br->buffer[i] & ((brword)1 << (FLAC__BITS_PER_WORD-j-1)) ? 1:0);
fprintf(out, &quo...
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...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 *br)
{
return ((br->consumed_bits & 7) == 0);
}
-FLaC__INLINE unsigned FLAC__bitreader_bits_left_for_byte_alignment(const FLAC__BitReader *br)
+inline unsigned FLAC__bitreader_bits_left_for_byte_alignment(const FLAC__BitReader *br)
{
return 8 - (br->consumed_bits & 7);
}
-FLaC__INLINE unsigned FLAC__bitreader_g...
2008 Jun 14
0
[Flac] Ogg Codecs 0.80.15035
...he HEAP Corruption was only 8 bytes. So I've thought of giving
more memory:
FLAC__bool FLAC__bitreader_init(FLAC__BitReader *br, FLAC__CPUInfo cpu,
FLAC__BitReaderReadCallback rcb, void *cd)
{
FLAC__ASSERT(0 != br);
br->words = br->bytes = 0;
br->consumed_words = br->consumed_bits = 0;
br->capacity = FLAC__BITREADER_DEFAULT_CAPACITY;
br->buffer = (brword*)malloc(sizeof(brword) * (br->capacity + 2));
I remember seeing things like br->words = 2049 and br->capacity = 2048.
This hack fixes the crashes,
the updated setup file is here:
http://www.xip...
2008 Jun 14
1
[Flac] Ogg Codecs 0.80.15035
Hi all,
I've made a test release for Ogg DirectShow Codecs.
You can find it here:
http://www.xiph.org/dshow/uploads/Main/oggcodecs_0.80.15035.exe
The problem is that I get a HEAP Corruption detected at:
void FLAC__bitreader_free(FLAC__BitReader *br)
{
FLAC__ASSERT(0 != br);
if(0 != br->buffer)
free(br->buffer);
The call stack is:
>
2008 Jun 14
1
Ogg Codecs 0.80.15035
Hi all,
I've made a test release for Ogg DirectShow Codecs.
You can find it here:
http://www.xiph.org/dshow/uploads/Main/oggcodecs_0.80.15035.exe
The problem is that I get a HEAP Corruption detected at:
void FLAC__bitreader_free(FLAC__BitReader *br)
{
FLAC__ASSERT(0 != br);
if(0 != br->buffer)
free(br->buffer);
The call stack is:
>
2013 Mar 03
3
Fwd: flac 1.3.0pre1 prelease
...n.
The solution there is to move the function definition to the header file as
a static inline function
static inline unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br)
{
return (br->words-br->consumed_words)*FLAC__BITS_PER_WORD + br->bytes*8 - br->consumed_bits;
}
Can you please try that and line me know if it works in MSVC? I know it
works for GCC and Clang as its required for C99.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
2004 Sep 10
3
1.0 source candidate
On Fri, Jul 20, 2001 at 08:14:55PM -0700, Josh Coalson wrote:
> --- Matt Zimmerman <mdz@debian.org> wrote:
> > On Fri, Jul 20, 2001 at 10:51:11PM -0400, Matt Zimmerman wrote:
> >
> > > This version seems to work at least partially on ia64. I am able
> > to encode my
> > > usual test WAV file now, but I still get a segfault during the
> >
2013 Mar 03
5
Fwd: flac 1.3.0pre1 prelease
Johnny Rosenberg wrote:
> Maybe a stupid question, but I was born stupid and I have walked that
> path ever since, so: Is there a changelog?
The only changelog is the git changelog. I will be writing a real
changelog to go in the actual release tarball before the official
release.
The git changelog is available here:
https://git.xiph.org/?p=flac.git;a=summary
or in any git clone of