mirror of
https://github.com/holub/mame
synced 2025-04-22 00:11:58 +03:00
FLAC encoder did not use FIR Linear prediction (regressed in r18882) [William Coolay]
This commit is contained in:
parent
b486a07a02
commit
d1a912fae7
@ -112,7 +112,7 @@ void FLAC__lpc_compute_autocorrelation(const FLAC__real data[], unsigned data_le
|
||||
void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_order, FLAC__real lp_coeff[][FLAC__MAX_LPC_ORDER], FLAC__double error[])
|
||||
{
|
||||
unsigned i, j;
|
||||
FLAC__double r, err, /*ref[FLAC__MAX_LPC_ORDER],*/ lpc[FLAC__MAX_LPC_ORDER];
|
||||
FLAC__double r, err, lpc[FLAC__MAX_LPC_ORDER];
|
||||
|
||||
FLAC__ASSERT(0 != max_order);
|
||||
FLAC__ASSERT(0 < *max_order);
|
||||
@ -126,7 +126,7 @@ void FLAC__lpc_compute_lp_coefficients(const FLAC__real autoc[], unsigned *max_o
|
||||
r = -autoc[i+1];
|
||||
for(j = 0; j < i; j++)
|
||||
r -= lpc[j] * autoc[i-j];
|
||||
//ref[i] = (r/=err);
|
||||
r/=err;
|
||||
|
||||
/* Update LPC coefficients and total error. */
|
||||
lpc[i]=r;
|
||||
|
Loading…
Reference in New Issue
Block a user