mirror of
https://github.com/xiph/opus.git
synced 2025-05-29 06:39:15 +00:00
Surround masking tuning
More conservative surround masking Disables temporal VBR on surround Disables tonality on LFE
This commit is contained in:
parent
4958751ef4
commit
cd373b54de
1 changed files with 6 additions and 4 deletions
|
@ -1165,7 +1165,8 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32
|
|||
|
||||
#ifndef FIXED_POINT
|
||||
/* Apply tonality boost */
|
||||
if (analysis->valid) {
|
||||
if (analysis->valid && !lfe)
|
||||
{
|
||||
opus_int32 tonal_target;
|
||||
float tonal;
|
||||
|
||||
|
@ -1211,7 +1212,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32
|
|||
|
||||
}
|
||||
|
||||
if (tf_estimate < QCONST16(.2f, 14))
|
||||
if (!has_surround_mask && tf_estimate < QCONST16(.2f, 14))
|
||||
{
|
||||
opus_val16 amount;
|
||||
opus_val16 tvbr_factor;
|
||||
|
@ -1551,8 +1552,9 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
|
|||
mask_avg += followE-followMask;
|
||||
}
|
||||
}
|
||||
surround_masking = DIV32_16(mask_avg,C*st->end) + QCONST16(.0f, DB_SHIFT);
|
||||
surround_masking = MIN16(MAX16(surround_masking,-QCONST16(1.5f, DB_SHIFT)), 0);
|
||||
surround_masking = DIV32_16(mask_avg,C*st->end) + QCONST16(.7f, DB_SHIFT);
|
||||
surround_masking = MIN16(MAX16(surround_masking, -QCONST16(2.f, DB_SHIFT)), QCONST16(.2f, DB_SHIFT));
|
||||
surround_masking -= HALF16(HALF16(surround_masking));
|
||||
}
|
||||
/* Temporal VBR (but not for LFE) */
|
||||
if (!st->lfe)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue