search for: flac__bitreader

Displaying 18 results from an estimated 18 matches for "flac__bitreader".

2014 Jul 27
1
[PATCH] remove obsolete cpu_info from struct FLAC__BitReader
In FLAC 1.2.0, a new field 'FLAC__CPUInfo cpu_info' was added to the struct FLAC__BitReader. It became useless in 1.3.0 because of various bitreader optimizations. The first patch removes it and also removes FLAC__CPUInfo argument of FLAC__bitreader_init() function. The second patch removes a comment about struct FLAC__BitReader. It seems that it should really belong to <http://git.x...
2015 Oct 07
2
Are pointers to FLAC__int32 and int interchangeable?
There are following functions in bitreader.c: FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, unsigned *val); FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsigned parameter); FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter); * function FLAC__bitread...
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: > libFLAC.dll!FLAC__bitreader_free(FLAC__BitReader * br=0x035280c0) Line 348 + 0xe bytes C libFLAC.dll!FLAC__stream_decoder_finish(FLAC__StreamDecod...
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: > libFLAC.dll!FLAC__bitreader_free(FLAC__BitReader * br=0x035280c0) Line 348 + 0xe bytes C libFLAC.dll!FLAC__stream_decoder_finish(FLAC__StreamDecod...
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...der.c +++ b/src/libFLAC/bitreader.c @@ -117,10 +117,6 @@ static const unsigned char byte_to_unary_table[] = { #define FLAC__U64L(x) x##LLU #endif -#ifndef FLaC__INLINE -#define FLaC__INLINE -#endif - /* WATCHOUT: assembly routines rely on the order in which these fields are declared */ struct FLAC__BitReader { /* any partially-consumed word at the head will stay right-justified as bits 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_upda...
2008 Jun 14
0
[Flac] Ogg Codecs 0.80.15035
Cristian Adam wrote: > 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: > > > libFLAC.dll!FLAC__bitreader_free(FLAC__BitReader * > br=0x035280c0) Line 348 + 0xe bytes C > li...
2015 Oct 08
1
Are pointers to FLAC__int32 and int interchangeable?
...l without an API > version bump and I don't think that is currently worth it. IMHO in this case it makes sense to change: unsigned *val -> FLAC__uint32 *val int *val -> FLAC__int32 *val int vals[] -> FLAC__int32 vals[] or FLAC__int32* vals: that is: FLAC__bool FLAC__bitreader_read_unary_unsigned(FLAC__BitReader *br, FLAC__uint32 *val); FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, FLAC__int32 *val, unsigned parameter); FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, FLAC__int32* vals, unsigned nvals, unsigned parameter...
2012 May 09
1
[PATCH 2/2] bitmath: Finish up optimizations
...+ 16 : \ - byte_to_unary_table[(word)] + 24 \ -) -#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,...
2012 May 04
0
[PATCH] Optimize FLAC__bitreader_read_rice_signed
...c | 445 +++++++++++------------------------------------ 1 files changed, 105 insertions(+), 340 deletions(-) diff --git a/src/libFLAC/bitreader.c b/src/libFLAC/bitreader.c index ae515a0..7ae086d 100644 --- a/src/libFLAC/bitreader.c +++ b/src/libFLAC/bitreader.c @@ -755,379 +755,144 @@ FLAC__bool FLAC__bitreader_read_rice_signed(FLAC__BitReader *br, int *val, unsig } /* this is by far the most heavily used reader call. it ain't pretty but it's fast */ -/* a lot of the logic is copied, then adapted, from FLAC__bitreader_read_unary_unsigned() and FLAC__bitreader_read_raw_uint32() */ FLAC__bool...
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 */
2017 Jan 19
4
[PATCH] Fix cppcheck warnings
...ecoders.c | 4 ++-- src/test_libFLAC/encoders.c | 8 ++++---- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/libFLAC/bitreader.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...
2008 Mar 14
2
bitreader optimizations
...NUC__ +static void local_swap32_block_(FLAC__uint32 *start, FLAC__uint32 len) +{ + FLAC__uint32 *end; + + for(end = start + len; start < end; start++) + asm ("bswap %0" : "=r"(*start) : "0"(*start)); +} +#endif #endif static FLaC__INLINE void crc16_update_word_(FLAC__BitReader *br, brword word) @@ -263,7 +272,7 @@ #if WORDS_BIGENDIAN #else end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD; -# if defined(_MSC_VER) && (FLAC__BYTES_PER_WORD == 4) +# if FLAC__CPU_IA32 && (__GNUC__ || defined...
2013 Mar 11
0
flac 1.3.0pre2 pre-release
...no better solutions to fix the problem, I'd suggest to > #define inline to nothing for MSVC. Looking at the spec again, and using the information in Example 7, I found that if we put the following AFTER the inline definition, it becomes available to other translation units. extern unsigned FLAC__bitreader_get_input_bits_unconsumed(const FLAC__BitReader *br); This appears to be different behavior than other uses of the keyword 'extern' (just like the multiple uses of the keyword 'static'). 6.7.4.7 of the C99 spec suggests that a statement such as the above turns an inline definition...
2013 Mar 11
2
flac 1.3.0pre2 pre-release
On Mon, Mar 11, 2013 at 08:30:18AM -0400, Ben Allison wrote: > Take, for example, the function FLAC__bitreader_is_consumed_byte_aligned. > It is prototyped in bitreader.h It is used in stream_decoder.c, so it > must be defined and made available to the linker ("external definition"). > However, the only definition in bitreader.c has been declared inline. > > From 6.7.4.6 > An...
2013 Mar 03
3
Fwd: flac 1.3.0pre1 prelease
...SC_VER is defined. I'd prefer a single diffinition of that in one place and one place only. > * change instances of uint32_t in bitwriter.c to FLAC__uint32 Can we include <inttypes.h> to fix this instead? > * functions marked inline cannot be used within another C file (e.g. > FLAC__bitreader_get_input_bits_unconsumed produces the linker error "error > LNK2001: unresolved external symbol > _FLAC__bitreader_get_input_bits_unconsumed"). This change has performance > implications! I'd like someone to review this and possibly come up with a > better solution. Th...
2008 Mar 17
0
bitreader optimizations
...ader.c --- src/libFLAC/bitreader.c 28 Feb 2008 05:34:26 -0000 1.15 +++ src/libFLAC/bitreader.c 17 Mar 2008 15:42:57 -0000 @@ -803,379 +812,144 @@ } /* this is by far the most heavily used reader call. it ain't pretty but it's fast */ -/* a lot of the logic is copied, then adapted, from FLAC__bitreader_read_unary_unsigned() and FLAC__bitreader_read_raw_uint32() */ FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter) -/* OPT: possibly faster version for use with MSVC */ -#ifdef _MSC_VER { - unsigned i; - unsigned uval = 0; - unsig...
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 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...n -#undef min -#endif -#define min(x,y) ((x)<(y)?(x):(y)) -#ifdef max -#undef max -#endif -#define max(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 @@ -547,7 +539,7 @@ FLAC__bool FLAC__bitreader_skip_bits_no_crc(FLAC__BitReader *br, unsigned bits) FLAC__uint32 x; if(n != 0) { - m = min(8-n, bits); + m = flac_min(8-n, bits); if(!FLAC__bitreader_read_raw_uint32(br, &x, m)) return false; bits -= m; diff --git a/src/libFLAC/bitwriter.c b/src/libFLAC/bitwriter.c ind...