search for: flac__bitwriter_write_rice_sign

Displaying 4 results from an estimated 4 matches for "flac__bitwriter_write_rice_sign".

2015 Dec 16
1
[PATCH] fix UB in bitwriter.c
The commit <http://git.xiph.org/?p=flac.git;a=commitdiff;h=e3c8095336249182b6a8871747df3cc99640103a> fixed UB in bitwriter.c. But there are 2 unused functions - FLAC__bitwriter_rice_bits() and FLAC__bitwriter_write_rice_signed() that also have this UB. IMHO it makes sense to fix their code as well. Maybe someone will use them in future. -------------- next part -------------- A non-text attachment was scrubbed... Name: fold_UB_fix.patch Type: application/octet-stream Size: 871 bytes Desc: not available Url : http://lis...
2015 Oct 08
1
Are pointers to FLAC__int32 and int interchangeable?
...__BitReader *br, FLAC__int32* vals, unsigned nvals, unsigned parameter); And I hope that there's no need to bump API version because these functions are declared in src/libFLAC/include/private/bitreader.h After all the corresponding functions from bitwriter.h use FLAC__int32: FLAC__bool FLAC__bitwriter_write_rice_signed(FLAC__BitWriter *bw, FLAC__int32 val, unsigned parameter); FLAC__bool FLAC__bitwriter_write_rice_signed_block(FLAC__BitWriter *bw, const FLAC__int32 *vals, unsigned nvals, unsigned parameter);
2015 Dec 28
1
[PATCH 3] for bitwriter.c
...nd why sizeof is better here. Also, bitreader.c already uses asserts like "FLAC__ASSERT(parameter <= 31)". 4) Fixed the calculation of mask1 and mask2. The current code is incorrect if FLAC__WORD_ALL_ONES is not 32-bit, so better to replace it with the proper 32-bit constant. 5) In FLAC__bitwriter_write_rice_signed_block() the new variable total_bits was added (just as in FLAC__bitwriter_write_rice_signed()). The code was simplified. Example: - bw->bits = bw->bits + msbits + lsbits; + bw->bits += total_bits; -------------- next part -------------- A non-text attachment was scrubbed... Name: 3_b...
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__bitreader_read_rice_signed():