summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2018-02-15 14:58:53 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2018-02-15 14:58:53 -0500
commitcdcb2f7d2bde62759cc14cc40efd8f304218008e (patch)
treef9aceb31006ae7c9b73520f79fd9db9ac49323c2
parente04e86e0e7067bfc895dc71e0c74c00b312071c5 (diff)
downloadopus-cdcb2f7d2bde62759cc14cc40efd8f304218008e.tar.gz
Disabling weak transients and 5ms resolution on voiced frames
-rw-r--r--celt/celt_encoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index 106693da..2cc0ae0c 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1687,7 +1687,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
/* Reduces the likelihood of energy instability on fricatives at low bitrate
in hybrid mode. It seems like we still want to have real transients on vowels
though (small SILK quantization offset value). */
- int allow_weak_transients = hybrid && effectiveBytes<15 && st->silk_info.offset >= 100;
+ int allow_weak_transients = hybrid && effectiveBytes<15 && st->silk_info.signalType != 2;
isTransient = transient_analysis(in, N+overlap, CC,
&tf_estimate, &tf_chan, allow_weak_transients, &weak_transient);
}
@@ -1886,7 +1886,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
for (i=0;i<end;i++)
tf_res[i] = 1;
tf_select=0;
- } else if (hybrid && effectiveBytes<15)
+ } else if (hybrid && effectiveBytes<15 && st->silk_info.signalType != 2)
{
/* For low bitrate hybrid, we force temporal resolution to 5 ms rather than 2.5 ms. */
for (i=0;i<end;i++)