diff options
author | Felicia Lim <flim@google.com> | 2016-03-30 15:46:59 +0200 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-17 15:05:55 -0400 |
commit | 4f5557c3095a1d212161609ff638cdae67a9b303 (patch) | |
tree | 84b7869caff9385de0844af3ac6e0d1cb09eb475 /silk/PLC.c | |
parent | 0e69e4ee168de21c38673b92286cc75d5f155eea (diff) | |
download | opus-4f5557c3095a1d212161609ff638cdae67a9b303.tar.gz |
Attenuate SILK PLC gain only for unvoiced speech
Diffstat (limited to 'silk/PLC.c')
-rw-r--r-- | silk/PLC.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -328,8 +328,10 @@ static OPUS_INLINE void silk_PLC_conceal( for( j = 0; j < LTP_ORDER; j++ ) { B_Q14[ j ] = silk_RSHIFT( silk_SMULBB( harm_Gain_Q15, B_Q14[ j ] ), 15 ); } - /* Gradually reduce excitation gain */ - rand_scale_Q14 = silk_RSHIFT( silk_SMULBB( rand_scale_Q14, rand_Gain_Q15 ), 15 ); + if ( psDec->indices.signalType != TYPE_NO_VOICE_ACTIVITY ) { + /* Gradually reduce excitation gain */ + rand_scale_Q14 = silk_RSHIFT( silk_SMULBB( rand_scale_Q14, rand_Gain_Q15 ), 15 ); + } /* Slowly increase pitch lag */ psPLC->pitchL_Q8 = silk_SMLAWB( psPLC->pitchL_Q8, psPLC->pitchL_Q8, PITCH_DRIFT_FAC_Q16 ); |