Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2015-12-05 22:31:54 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-02 22:13:35 +0300
commit2d1b389a8a0d9c7c2a7c097e65d2c47a9897b32c (patch)
tree84947590e796f7209f2bdc9f68fa414b26c746eb
parentf332b3de6a74f1959e260ae82e32f57d8017f9e3 (diff)
Quality: Forces trim to 5 on hybrid mode
This saves bits and makes more sense since alloc_trim_analysis() mostly looks at the lower bands that are coded with SILK
-rw-r--r--celt/celt_encoder.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index 7bdd1e49..e33b9906 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1886,12 +1886,15 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
alloc_trim = 5;
if (tell+(6<<BITRES) <= total_bits - total_boost)
{
- if (st->lfe)
+ if (start > 0 || st->lfe)
+ {
+ st->stereo_saving = 0;
alloc_trim = 5;
- else
+ } else {
alloc_trim = alloc_trim_analysis(mode, X, bandLogE,
end, LM, C, N, &st->analysis, &st->stereo_saving, tf_estimate,
st->intensity, surround_trim, st->arch);
+ }
ec_enc_icdf(enc, alloc_trim, trim_icdf, 7);
tell = ec_tell_frac(enc);
}