mirror of
https://github.com/xiph/opus.git
synced 2025-05-31 07:37:42 +00:00
Making sure DTX for voice still works at high bit-rate
This commit is contained in:
parent
6b9c29aee4
commit
6ef378725f
1 changed files with 4 additions and 0 deletions
|
@ -580,8 +580,12 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
|
|||
|
||||
st->mode = (equiv_rate >= threshold) ? MODE_CELT_ONLY: MODE_SILK_ONLY;
|
||||
|
||||
/* When FEC is enabled and there's enough packet loss, use SILK */
|
||||
if (st->silk_mode.useInBandFEC && st->silk_mode.packetLossPercentage > (128-voice_est)>>4)
|
||||
st->mode = MODE_SILK_ONLY;
|
||||
/* When encoding voice and DTX is enabled, set the encoder to SILK mode (at least for now) */
|
||||
if (st->silk_mode.useDTX && voice_est > 100)
|
||||
st->mode = MODE_SILK_ONLY;
|
||||
#endif
|
||||
} else {
|
||||
st->mode = st->user_forced_mode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue