From a02057d7a9f9f1f6917369e1819dc22ebfa0fd5e 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 662d71203..866fcf226 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);