From fe627d5d8634cca1fc4f78ff5a3543a04814eb63 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Fri, 28 Jun 2024 19:54:54 -0400 Subject: [PATCH] Disable TF analysis on tones --- celt/celt_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 029a8c4cb..f246c05dd 100644 --- a/celt/celt_encoder.c +++ b/celt/celt_encoder.c @@ -2073,7 +2073,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, /* Band normalisation */ normalise_bands(mode, freq, X, bandE, effEnd, C, M); - enable_tf_analysis = effectiveBytes>=15*C && !hybrid && st->complexity>=2 && !st->lfe; + enable_tf_analysis = effectiveBytes>=15*C && !hybrid && st->complexity>=2 && !st->lfe && toneishness < QCONST32(.98f, 29); ALLOC(offsets, nbEBands, int); ALLOC(importance, nbEBands, int);