similar to: Possible overflow of _candidate_bits in stream_encoder.c

Displaying 20 results from an estimated 400 matches similar to: "Possible overflow of _candidate_bits in stream_encoder.c"

2020 Jul 06
2
Possible overflow of _candidate_bits in stream_encoder.c
Op ma 6 jul. 2020 om 10:22 schreef Erik de Castro Lopo <mle+la at mega-nerd.com>: > > Martijn van Beurden wrote: > > > To trigger this overflow, one has to force rice_parameter to 0 > > Ok, that sounds dodgy. Yes, well, it is. It could very well be that without patching, nobody ever has a problem with this, but as the rice code is based on an estimate, it might,
2013 Oct 09
3
PATCH for rice_parameter calculation
MSVS profiler shows that the following code in stream_encoder.c takes several percent of CPU time: for(rice_parameter = 0, k = partition_samples; k < mean; rice_parameter++, k <<= 1) ; this code is equivalent to: rice_parameter = 0; k = partition_samples; while(k < mean) { rice_parameter++; k <<= 1; } The idea was to accelerate it:
2013 Oct 11
1
PATCH for rice_parameter calculation
Or, I was originally thinking: rice_parameter = 0; k = partition_samples; if (k < mean) { int n = mean - k; rice_parameter += n; k <<= n; } (sorry for the hasty post) On Oct 11, 2013, at 10:34, Brian Willoughby wrote: > Hmm, maybe I'm missing something, but what about this: > > rice_parameter = 0; k = partition_samples; > int n = mean - k; > if (n >
2007 Apr 08
0
FLAC 24 bit test results
On Thu, Apr 05, 2007 at 06:48:06PM +0200, Josh Green wrote: > It seems that generally Wavpack does a little better than FLAC at > compressing audio. But that is generally within a rather small margin. > 20% margin seems a little large to me though. There may indeed be no > problem with the FLAC reference implementation in regards to 24 bit and > its just having trouble compressing
2014 Jun 19
0
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 03:30:06PM +0200, Miroslav Lichvar wrote: > But, as we have seen with unusual data the residual signal can be > wider than bps. The FLAC format specification doesn't seem to mention > this. Should it be treated as a valid FLAC stream? I think it would be interesting to know how common are such streams. I patched flac to print a warning on decoding or testing
2007 Apr 05
2
FLAC 24 bit test results
On Thu, 2007-04-05 at 02:27 -0700, Brian Willoughby wrote: > Josh (Green), > > Seems like the longest example in your list is a 15-second file. I > would like to see the same problem exhibited in a file that is of a > normal length. I have been recording full performances lasting > hours, and flac always compresses the files below 70% of the original > size. >
2014 Jun 19
5
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 03:30:22PM +0400, lvqcl wrote: > BTW, what can you say about the following place in stream_decoder.c > in read_subframe_lpc_() function: > > /*@@@@@@ technically not pessimistic enough, should be more like > if( (FLAC__uint64)order * ((((FLAC__uint64)1)<<bps)-1) * ((1<<subframe->qlp_coeff_precision)-1) < (((FLAC__uint64)-1)
2017 Jan 13
0
[PATCH 1/4] Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence of building with more debug output information. AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays Gnome has also switched to it from its own custom solution. --- configure.ac | 19 +------ include/FLAC/assert.h | 2 +- m4/ax_check_enable_debug.m4 | 124 ++++++++++++++++++++++++++++++++++++++++++
2017 Jan 15
0
[PATCH 1/2] Do not override CFLAGS, as CFLAGS is a user flag.
* Furthermore, use NDEBUG globally to detect the presence of building with more debug output information. AX_CHECK_ENABLE_DEBUG is easier to use, and nowadays Gnome has also switched to it from its own custom solution. --- configure.ac | 52 ++++++++++++------ include/FLAC/assert.h | 2 +- m4/ax_check_enable_debug.m4 | 124
2017 Jan 15
4
Updated CFLAGS patches and make test compilation conditional
Hi Erik, I've found a middleground for the problem of setting default CFLAGS. I've gone back to setting them if {C,CXX,CPP,LD}FLAGS are unset at the onset of the configure script (i.e., the user hasn't specified anything) and then proceed to set them to the defaults as before. This has been suggested before: https://lists.gnu.org/archive/html/autoconf/2006-04/msg00022.html In
2017 Jan 13
9
Upstreaming Gentoo patches
Dear FLAC devs, I would like to get some of our patches merged into master. Most of them deal with adhering to GNU conventions, respectively not overriding flags/variables that are up to the user to set. For instance, honoring $(htmldir) is important, as we have installation paths for the documentation that differ from what is currently coded in the various Makefile.am's. Regards David
2015 Apr 20
2
"keep qlp coeff precision such that only 32-bit math is required"
Martijn van Beurden wrote: > Or maybe the question is: why is this code in evaluate_lpc_subframe anyway, > i.e, why is this code duplicated? If process_subframe_ sets the > qlp_precision for evaluate_lpc_subframe, why should the latter ignore that? > > We can only speculate about this, but I think this code has been duplicated > by accident, and therefore it wasn't changed
2014 Feb 24
1
PATCH for stream_encoder.c: change ifdefs order
Erik de Castro Lopo wrote: > Applied with minor reformatting. Thanks. And btw, about reformatting: currently stream_encoder.c contains the following code: #ifdef FLAC__SSSE3_SUPPORTED if(encoder->private_->cpuinfo.ia32.ssse3) aaaaa; else #endif #ifdef FLAC__SSE2_SUPPORTED bbbbb; #endif This code is correct because if FLAC__SSSE3_SUPPORTED is defined then FLAC__SSE2_SUPPORTED is
2014 Jun 19
1
stream_encoder: 32 vs 64 bit accumulator
Another interesting comment is inside src/libFLAC/include/private/fixed.h: "The _wide() version uses 64-bit integers which is statistically necessary when bits-per-sample + log2(blocksize) > 30" I mean the word "statistically". libFLAC uses FLAC__fixed_compute_best_predictor_wide() if "bits_per_sample + FLAC__bitmath_ilog2(blocksize)+1 > 30" is true (see
2015 Oct 11
1
[PATCH] stream_encoder.c: fix subframe_bps comparison
libFLAC limits the value of qlp_coeff_precision to make sure that 32-bit math is enough for decoding of 16-bit audio. subframe_bps can be equal to 17 for 16-bit input (for side channel). So the value of subframe_bps should be compared with 17, not 16 (see also http://git.xiph.org/?p=flac.git;a=blob;f=src/libFLAC/stream_encoder.c;hb=02591f6b4b09e7c6e26bd2ae7225ff2810b227bb#l3431 ) --------------
2014 Jun 19
1
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 06:25:57PM +0400, lvqcl wrote: > Now I wonder why evaluate_lpc_subframe_() function in stream_encoder.c contains > almost the same code, but without any comments that it's not enough pessimistic: > evaluate_lpc_subframe_(): > > if(subframe_bps + qlp_coeff_precision + FLAC__bitmath_ilog2(order) <= 32) > if(subframe_bps <= 16 &&
2014 Jun 28
0
[PATCH] stream_encoder : Improve selection of residual accumulator width
Miroslav Lichvar wrote: > In the precompute_partition_info_sums_ function, instead of selecting > 64-bit accumulator when the signal bps is larger than 16, revert to the > original approach based on partition size, but make room for few extra > bits to not overflow with unusual signals where the average residual > magnitude may be larger than bps. > > It slightly improves
2014 Jun 29
0
[PATCH] stream_encoder : Improve selection of residual accumulator width
lvqcl wrote: > Erik de Castro Lopo wrote: > >>> It slightly improves the performance with standard encoding levels and >>> 16-bit files as the 17-bit side channel can still be processed with the >>> 32-bit accumulator and correctly selects the 64-bit accumulator with >>> very large 16-bit partitions. >>> >>> This is related to commits
2015 Nov 23
3
[PATCH] stream_encoder.c: choose proper *fixed_compute_best_predictor* function
I found that 32-bit total_error_* variables in fixed_compute_best_predictor() functions can overflow. For example it happens with the attached test.wav and the following options: "-l 0 -b 4200 -m -r 5". The attached patch should fix it. (Now all three use_wide_by_* variables are unused, so I commented them out with #ifdef 0). -------------- next part -------------- A non-text
2015 Nov 24
1
[PATCH] stream_encoder.c: choose proper *fixed_compute_best_predictor* function
Erik de Castro Lopo wrote: > Rather than '#ifdef 0'-ing them out, shouldn't we remove them instead? Patch ver.2 attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: fixed_wide_v2.patch Type: application/octet-stream Size: 3303 bytes Desc: not available Url :