Displaying 12 results from an estimated 12 matches for "flac__bits_per_word".
2008 Mar 14
2
bitreader optimizations
..., y;
+ unsigned ucbits; /* keep track of the number of unconsumed bits in word */
+ brword b;
+ int *val, *end;
FLAC__ASSERT(0 != br);
FLAC__ASSERT(0 != br->buffer);
/* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
FLAC__ASSERT(FLAC__BITS_PER_WORD >= 32);
FLAC__ASSERT(parameter < 32);
- /* the above two asserts also guarantee that the binary part never straddles more that 2 words, so we don't have to loop to read it */
-
- if(nvals == 0)
- return true;
+ /* the above two asserts also guarantee that the binary part never straddle...
2012 May 04
0
[PATCH] Optimize FLAC__bitreader_read_rice_signed
...y;
+ unsigned ucbits; /* keep track of the number of unconsumed bits in word */
+ uint32_t b;
+ int *val, *end;
FLAC__ASSERT(0 != br);
FLAC__ASSERT(0 != br->buffer);
/* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
FLAC__ASSERT(FLAC__BITS_PER_WORD >= 32);
FLAC__ASSERT(parameter < 32);
- /* the above two asserts also guarantee that the binary part never straddles more that 2 words, so we don't have to loop to read it */
-
- if(nvals == 0)
- return true;
-
- cbits = br->consumed_bits;
- cwords = br->consumed_words;
+ /* the...
2008 Mar 17
0
bitreader optimizations
..., y;
+ unsigned ucbits; /* keep track of the number of unconsumed bits in word */
+ brword b;
+ int *val, *end;
FLAC__ASSERT(0 != br);
FLAC__ASSERT(0 != br->buffer);
/* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
FLAC__ASSERT(FLAC__BITS_PER_WORD >= 32);
FLAC__ASSERT(parameter < 32);
- /* the above two asserts also guarantee that the binary part never straddles more that 2 words, so we don't have to loop to read it */
-
- if(nvals == 0)
- return true;
-
- cbits = br->consumed_bits;
- cwords = br->consumed_words;
+ /* the...
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 */
2012 Apr 05
1
[PATCH] remove unnecesary typedef in bitwriter.c
...elow 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 necessary to match host byte order */...
2017 Jan 19
4
[PATCH] Fix cppcheck warnings
...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, "\n");
}
if(br->bytes > 0) {
@@ -315,7 +315,7 @@ void FLAC__bitreader_dump(const FLAC__BitReader *br, FILE *out)
if(i < br-...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...\
-)
-#endif
-
-
/*
* This should be at least twice as large as the largest number of words
* required to represent any 'number' (in any encoding) you are going to
@@ -93,25 +72,6 @@ COUNT_ZERO_MSBS (uint32_t word)
*/
static const unsigned FLAC__BITREADER_DEFAULT_CAPACITY = 65536u / FLAC__BITS_PER_WORD; /* in words */
-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...
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...ot;
+#include "private/macros.h"
#include "FLAC/assert.h"
#include "share/alloc.h"
#include "share/endswap.h"
@@ -67,11 +68,6 @@ static const unsigned FLAC__BITWRITER_DEFAULT_INCREMENT = 4096u / sizeof(uint32_
#define FLAC__WORDS_TO_BITS(words) ((words) * FLAC__BITS_PER_WORD)
#define FLAC__TOTAL_BITS(bw) (FLAC__WORDS_TO_BITS((bw)->words) + (bw)->bits)
-#ifdef min
-#undef min
-#endif
-#define min(x,y) ((x)<(y)?(x):(y))
-
/* adjust for compilers that can't understand using LLU suffix for uint64_t literals */
#ifdef _MSC_VER
#define FLAC__U64L(x) x
@@ -...
2013 Mar 03
3
Fwd: flac 1.3.0pre1 prelease
...nd possibly come up with a
> better solution.
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/
2015 Dec 16
2
about word size in bitreader/bitwriter
...ord 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), crc);
case 8: crc = FL...
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
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...LAC__BitReader *br)
{
return 8 - (br->consumed_bits & 7);
}
-FLaC__INLINE unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br)
+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;
}
@@ -499,7 +495,7 @@ FLAC__bool FLAC__bitreader_read_raw_uint64(FLAC__BitReader *br, FLAC__uint64 *va
return true;
}
-FLaC__INLINE FLAC__bool FLAC__bitreader_read_uint32_little_endian(FLAC__BitReader *br, FLAC__uint32 *val)
+inline FLAC__bool FLAC__bi...