diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2012-11-14 11:39:27 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-02-10 09:15:49 +0400 |
commit | 48ac122141c317964fae2987eaea161c46538717 (patch) | |
tree | 06774b8393fb23c7af7ad7f3dddbd2894e655619 /celt | |
parent | 7ebacf430a465d000d97d6d9015f8f6061af8804 (diff) |
Makes analysis usable for all frame sizes
Diffstat (limited to 'celt')
-rw-r--r-- | celt/celt_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 0d92c1ff..fd811360 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -1274,7 +1274,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, prefilter_tapset = st->tapset_decision; pf_on = run_prefilter(st, in, prefilter_mem, CC, N, prefilter_tapset, &pitch_index, &gain1, &qg, enabled, nbAvailableBytes); - if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && st->analysis.tonality > .3 + if ((gain1 > QCONST16(.4f,15) || st->prefilter_gain > QCONST16(.4f,15)) && (!st->analysis.valid || st->analysis.tonality > .3) && (pitch_index > 1.26*st->prefilter_period || pitch_index < .79*st->prefilter_period)) pitch_change = 1; if (pf_on==0) |