search for: flac__assert

Displaying 20 results from an estimated 69 matches for "flac__assert".

2008 Mar 14
2
bitreader optimizations
..., and before returning */ - register unsigned cwords; - register unsigned cbits; + * bitreader functions that use them, and before returning */ + unsigned cwords, words, lsbs, msbs, x, 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...
2008 Mar 17
0
bitreader optimizations
..., and before returning */ - register unsigned cwords; - register unsigned cbits; + * bitreader functions that use them, and before returning */ + unsigned cwords, words, lsbs, msbs, x, 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...
2012 May 04
0
[PATCH] Optimize FLAC__bitreader_read_rice_signed
...and before returning */ - register unsigned cwords; - register unsigned cbits; + * bitreader functions that use them, and before returning */ + unsigned cwords, words, lsbs, msbs, x, 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...
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
...unsigned words; /* # of complete words in buffer */ unsigned bits; /* # of used bits in accum */ @@ -96,7 +95,7 @@ struct FLAC__BitWriter { static FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add) { unsigned new_capacity; - bwword *new_buffer; + uint32_t *new_buffer; FLAC__ASSERT(0 != bw); FLAC__ASSERT(0 != bw->buffer); @@ -118,7 +117,7 @@ static FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add) FLAC__ASSERT(new_capacity > bw->capacity); FLAC__ASSERT(new_capacity >= bw->words + ((bw->bits + bits_to_add + FLAC__BITS_PER_WORD - 1) /...
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...FLAC__int32 residual[], unsigned data_len, const FLAC__int32 qlp_coeff[], unsigned order, 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) {...
2015 Dec 28
1
[PATCH 3] for bitwriter.c
1) Added assert FLAC__ASSERT((bits == 32) || (val>>bits == 0)) It was inspired by https://sourceforge.net/p/flac/bugs/351/ Such situation should be detected at least. 2) Unnecessary assignments removed: bw->accum = val; bw->bits = 0; (bw->bits is already 0 at this place). 3) Asserts like FLAC_...
2004 Sep 10
1
metaflac bug
...ter(iterator, block)) { + fprintf(stderr, "%s: ERROR: adding new VORBIS_COMMENT block to metadata, status =\"%s\"\n", filename, FLAC__Metadata_ChainStatusString[FLAC__metadata_chain_status(chain)]); + return false; + } + /* iterator is left pointing to new block */ + FLAC__ASSERT(FLAC__metadata_iterator_get_block(iterator) == block); + } else { + FLAC__metadata_iterator_delete(iterator); + return ok; } - /* iterator is left pointing to new block */ - FLAC__ASSERT(FLAC__metadata_iterator_get_block(iterator) == block); - } FLAC__ASSERT(0 != block); FLAC__ASSER...
2014 Jun 20
2
Lets work towards a new version
On Fri, Jun 20, 2014 at 1:05 AM, lvqcl <lvqcl.mail at gmail.com> wrote: > I cannot find anything about the size of METADATA_BLOCK_PICTURE block > in <http://xiph.org/flac/format.html>. Where did you read this? > METADATA_BLOCK_HEADER has a 24-bit field to encode the length of METADATA_BLOCK_DATA ; hence the limitation (which not only applies to METADATA_BLOCK_PICTURE but all
2006 Mar 19
0
Patch -- Decode Position for libFLAC++ file and seekable_stream decoder
...e_decoder.cpp --- src/libFLAC++/file_decoder.cpp 25 Jan 2005 04:18:35 -0000 1.9 +++ src/libFLAC++/file_decoder.cpp 20 Mar 2006 05:53:19 -0000 @@ -159,6 +159,12 @@ return ::FLAC__file_decoder_get_blocksize(decoder_); } + bool File::get_decode_position(FLAC__uint64 *position) const + { + FLAC__ASSERT(is_valid()); + return (bool)::FLAC__file_decoder_get_decode_position(decoder_, position); + } + File::State File::init() { FLAC__ASSERT(0 != decoder_); Index: src/libFLAC++/seekable_stream_decoder.cpp =================================================================== RCS file: /cvsroo...
2007 Sep 01
2
Re: 1.2.0: Test suite failures on LP64 archs?
Christian Weisgerber <naddy@mips.inka.de> wrote: > #0 0x0000000040d18810 in FLAC__lpc_compute_residual_from_qlp_coefficients_wide > (data=0x49e4c014, data_len=110, qlp_coeff=0x7f7ffffece70, order=1, > lp_quantization=14, residual=0x4fced000) at lpc.c:745 > 745 residual[i] = > data[i] - (FLAC__int32)((qlp_coeff[0] *
2014 Sep 25
2
Patch to improve malformed vorbiscomment handling
...LAC__bool is_ return true; } -FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__StreamMetadata_VorbisComment *obj) +FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__StreamMetadata_VorbisComment *obj, unsigned length) { FLAC__uint32 i; FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(decoder->private_->input)); + if (length < 8) return false; /* vendor string length + num comments entries alone take 8 bytes */ /* read vendor string */ FLAC__ASSERT(FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN == 32); if(!FLAC__bi...
2004 Sep 10
2
1.0 candidate checked in
> OK, attempting one more convergence on all this, here's > what I did: > > 1. Reverted back to rev 1.5 of src/libFLAC/ia32/Makefile.am > 2. Applied Matt's last cleanup patch of 8 files. I did not > apply the patch to src/test_unit/main.c since it looks wrong. > main.c is supposed to include the local bitbuffer.h, not > src/libFLAC/private/bitbuffer.h; I think the
2018 Jul 10
9
[PATCH 0/7] PowerPC64 performance improvements
The following series adds initial vector support for PowerPC64. On POWER9, flac --best is about 3.3x faster. Amitay Isaacs (2): Add m4 macro to check for C __attribute__ features Check if compiler supports target attribute on ppc64 Anton Blanchard (5): configure.ac: Remove SPE detection code configure.ac: Add VSX enable/disable configure.ac: Fix FLAC__CPU_PPC on little endian, and add
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...******************************** * @@ -2634,7 +2625,7 @@ FLAC__bool write_metadata_block_data_vorbis_comment_cb_(FLAC__IOHandle handle, F const unsigned num_comments_len = FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN / 8; FLAC__byte buffer[4]; /* magic number is asserted below */ - FLAC__ASSERT(max(FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN, FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN) / 8 == sizeof(buffer)); + FLAC__ASSERT(flac_max(FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN, FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN) / 8 == sizeof(buffer));...
2014 Sep 26
0
Patch to improve malformed vorbiscomment handling
...nt_entry_cb_(FLAC__IOHandle handle, FLAC__IOCallback_Read read_cb, FLAC__StreamMetadata_VorbisComment_Entry *entry, unsigned max_length) { const unsigned entry_length_len = FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN / 8; FLAC__byte buffer[4]; /* magic number is asserted below */ FLAC__ASSERT(FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN / 8 == sizeof(buffer)); + if(max_length < entry_length_len) return FLAC__METADATA_CHAIN_STATUS_BAD_METADATA; else max_length -= entry_length_len; if(read_cb(buffer, 1, entry_length_len, handle) != entry_length_len) return FLAC__METADAT...
2008 May 09
1
FLAC__metadata_get_picture()
...e type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors) 286 { 287 FLAC__Metadata_SimpleIterator *it; 288 FLAC__uint64 max_area_seen = 0; 289 FLAC__uint64 max_depth_seen = 0; 290 291 FLAC__ASSERT(0 != filename); 292 FLAC__ASSERT(0 != picture); 293 294 *picture = 0; 295 296 it = FLAC__metadata_simple_iterator_new(); 297 if(0 == it) 298 return false; 299 if(!FLAC__metadata_simple_iterator_init(it, filename, /*read_only=*/true, /*preserve_file_stats...
2007 Jul 14
2
PATCH : Fix missing protoypes
...bFLAC/stream_encoder.c 2007-07-15 00:50:25 +0000 @@ -1417,6 +1417,7 @@ return true; } +FLAC_API FLAC__bool FLAC__stream_encoder_set_do_md5(FLAC__StreamEncoder *encoder, FLAC__bool value) ; FLAC_API FLAC__bool FLAC__stream_encoder_set_do_md5(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); @@ -1744,6 +1745,7 @@ * These three functions are not static, but not publically exposed in * include/FLAC/ either. They are used by the test suite. */ +FLAC_API FLAC__bool FLAC__stream_encoder_disable_constant_subframes(FLAC__StreamEncoder *encoder, FLAC__bool value) ; FLAC_...
2004 Sep 10
1
FLAC/assert.h overwrites /usr/include/assert.h?
I always use --prefix, and it gets put in the right place (<prefix>/include/FLAC/assert.h), which I'm sure sheds no new light on this. I'd still like to know why FLAC__ASSERT() is necessary. K&R is very clear that the preprocessor is to remove calls to assert() if NDEBUG is defined. (Some compilers, including gcc, implicitly define NDEBUG when optimizing, but of course it can also be explicitly defined, which is in fact done by default by configure.in .) So, does...
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__StreamDecoder * decoder=0x035265f0) Line 685 + 0xf byt...