search for: flac__lpc_quantize_coeffici

Displaying 8 results from an estimated 8 matches for "flac__lpc_quantize_coeffici".

2014 Jul 02
2
[PATCH] two patches of doubtful usefulness
1) lpc.c, FLAC__lpc_quantize_coefficients(): This function declares "const int nshift = -(*shift)" variable when *shift is less than 0. Then nshift is used in the loop: for(i = 0; i < order; i++) { error += lp_coeff[i] / (1 << nshift); This patch adds "const int pshift = *shift" variable....
2012 Apr 07
1
[PATCH 2/2] Update and improve autotools build
...ound(double x) { + return (long)(x + copysign (0.5, x)); +} +//If this fails, we are in the precence of a mid 90's compiler..move along... +#endif void FLAC__lpc_window_data(const FLAC__int32 in[], const FLAC__real window[], FLAC__real out[], unsigned data_len) { @@ -199,14 +212,8 @@ int FLAC__lpc_quantize_coefficients(const FLAC__real lp_coeff[], unsigned order, FLAC__int32 q; for(i = 0; i < order; i++) { error += lp_coeff[i] * (1 << *shift); -#if 1 /* unfortunately lround() is C99 */ - if(error >= 0.0) - q = (FLAC__int32)(error + 0.5); - else - q = (FLAC__int32)(error - 0.5);...
2017 Jan 13
0
[PATCH 1/4] Do not override CFLAGS, as CFLAGS is a user flag.
...lpc.h" #include "private/macros.h" -#if defined DEBUG || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE +#if !defined(NDEBUG) || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE #include <stdio.h> #endif @@ -234,7 +234,7 @@ int FLAC__lpc_quantize_coefficients(const FLAC__real lp_coeff[], unsigned order, const int nshift = -(*shift); double error = 0.0; FLAC__int32 q; -#ifdef DEBUG +#ifndef NDEBUG fprintf(stderr,"FLAC__lpc_quantize_coefficients: negative shift=%d order=%u cmax=%f\n", *shift, order, cmax); #endif for(i = 0; i...
2017 Jan 15
0
[PATCH 1/2] Do not override CFLAGS, as CFLAGS is a user flag.
...lpc.h" #include "private/macros.h" -#if defined DEBUG || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE +#if !defined(NDEBUG) || defined FLAC__OVERFLOW_DETECT || defined FLAC__OVERFLOW_DETECT_VERBOSE #include <stdio.h> #endif @@ -234,7 +234,7 @@ int FLAC__lpc_quantize_coefficients(const FLAC__real lp_coeff[], uint32_t order, const int nshift = -(*shift); double error = 0.0; FLAC__int32 q; -#ifdef DEBUG +#ifndef NDEBUG fprintf(stderr,"FLAC__lpc_quantize_coefficients: negative shift=%d order=%u cmax=%f\n", *shift, order, cmax); #endif for(i = 0; i...
2007 Feb 03
3
need help with MSVC
for recent code changes I find myself needing some workarounds for MSVC6: 1st, I need a fast way to swap bytes (for endianness) of a 32-bit int. I could not find a builtin like bswap; the closest thing I found was ntohl() which appears to be a function call and also requires linking with winsock2 (ws2_32.lib) to get it. 2nd, I need an equivalent for lround() (or round() is ok), which is not in
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
2012 Apr 05
2
[PATCH 2/2] V2: Use a single definition of MIN and MAX in sources
...{ FLAC__ASSERT(order > 0); FLAC__ASSERT(order <= FLAC__MAX_LPC_ORDER); - qlp_coeff_precision = min(qlp_coeff_precision, 32 - subframe_bps - FLAC__bitmath_ilog2(order)); + qlp_coeff_precision = flac_min(qlp_coeff_precision, 32 - subframe_bps - FLAC__bitmath_ilog2(order)); } ret = FLAC__lpc_quantize_coefficients(lp_coeff, order, qlp_coeff_precision, qlp_coeff, &quantization); @@ -3681,7 +3672,7 @@ unsigned find_best_partition_order_( const unsigned blocksize = residual_samples + predictor_order; max_partition_order = FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_and_pre...