From 59354672cb3af794a0e46c0b2097d6441c75cdd1 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> Date: Sun, 31 Oct 2010 09:57:36 -0400 Subject: [PATCH] Fixed a stupid fixed-point pf bug in the gain handling --- libcelt/celt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libcelt/celt.c b/libcelt/celt.c index 8b354829..9fc212ce 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -771,7 +771,7 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, c gain1 = QCONST16(.6f,15); if (fabs(gain1-st->prefilter_gain)<QCONST16(.1,15)) gain1=st->prefilter_gain; - if (gain1<QCONST16(.2f,16)) + if (gain1<QCONST16(.2f,15)) { ec_enc_bit_prob(enc, 0, 32768); gain1 = 0; @@ -794,8 +794,6 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, c for (c=0;c<C;c++) { - - CELT_COPY(in+c*(N+st->overlap), st->in_mem+c*(st->overlap), st->overlap); comb_filter(in+c*(N+st->overlap)+st->overlap, pre[c]+COMBFILTER_MAXPERIOD, st->prefilter_period, pitch_index, N, C, -st->prefilter_gain, -gain1, st->mode->window, st->mode->overlap); -- GitLab