mirror of
https://github.com/darksaid98/mediaplex.git
synced 2026-12-03 22:16:48 +00:00
chore: update
This commit is contained in:
1 parent
345a8c44ca
commit
71b3dc90ee
136 files changed
+3928
-2157
No files matched your search
+8
-2
@@ -41,8 +41,14 @@ void silk_LTP_scale_ctrl_FLP(
|
||||
|
||||
if( condCoding == CODE_INDEPENDENTLY ) {
|
||||
/* Only scale if first frame in packet */
|
||||
round_loss = psEnc->sCmn.PacketLoss_perc + psEnc->sCmn.nFramesPerPacket;
|
||||
psEnc->sCmn.indices.LTP_scaleIndex = (opus_int8)silk_LIMIT( round_loss * psEncCtrl->LTPredCodGain * 0.1f, 0.0f, 2.0f );
|
||||
round_loss = psEnc->sCmn.PacketLoss_perc * psEnc->sCmn.nFramesPerPacket;
|
||||
if ( psEnc->sCmn.LBRR_flag ) {
|
||||
/* LBRR reduces the effective loss. In practice, it does not square the loss because
|
||||
losses aren't independent, but that still seems to work best. We also never go below 2%. */
|
||||
round_loss = 2 + silk_SMULBB( round_loss, round_loss) / 100;
|
||||
}
|
||||
psEnc->sCmn.indices.LTP_scaleIndex = silk_SMULBB( psEncCtrl->LTPredCodGain, round_loss ) > silk_log2lin( 2900 - psEnc->sCmn.SNR_dB_Q7 );
|
||||
psEnc->sCmn.indices.LTP_scaleIndex += silk_SMULBB( psEncCtrl->LTPredCodGain, round_loss ) > silk_log2lin( 3900 - psEnc->sCmn.SNR_dB_Q7 );
|
||||
} else {
|
||||
/* Default is minimum scaling */
|
||||
psEnc->sCmn.indices.LTP_scaleIndex = 0;
|
||||
|
||||
+2
-1
@@ -44,7 +44,8 @@ void silk_find_pred_coefs_FLP(
|
||||
silk_float XXLTP[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ];
|
||||
silk_float xXLTP[ MAX_NB_SUBFR * LTP_ORDER ];
|
||||
silk_float invGains[ MAX_NB_SUBFR ];
|
||||
opus_int16 NLSF_Q15[ MAX_LPC_ORDER ];
|
||||
/* Set to NLSF_Q15 to zero so we don't copy junk to the state. */
|
||||
opus_int16 NLSF_Q15[ MAX_LPC_ORDER ]={0};
|
||||
const silk_float *x_ptr;
|
||||
silk_float *x_pre_ptr, LPC_in_pre[ MAX_NB_SUBFR * MAX_LPC_ORDER + MAX_FRAME_LENGTH ];
|
||||
silk_float minInvGain;
|
||||
|
||||
+6
-4
@@ -190,12 +190,14 @@ void silk_quant_LTP_gains_FLP(
|
||||
opus_int32 XX_Q17[ MAX_NB_SUBFR * LTP_ORDER * LTP_ORDER ];
|
||||
opus_int32 xX_Q17[ MAX_NB_SUBFR * LTP_ORDER ];
|
||||
|
||||
for( i = 0; i < nb_subfr * LTP_ORDER * LTP_ORDER; i++ ) {
|
||||
i = 0;
|
||||
do {
|
||||
XX_Q17[ i ] = (opus_int32)silk_float2int( XX[ i ] * 131072.0f );
|
||||
}
|
||||
for( i = 0; i < nb_subfr * LTP_ORDER; i++ ) {
|
||||
} while ( ++i < nb_subfr * LTP_ORDER * LTP_ORDER );
|
||||
i = 0;
|
||||
do {
|
||||
xX_Q17[ i ] = (opus_int32)silk_float2int( xX[ i ] * 131072.0f );
|
||||
}
|
||||
} while ( ++i < nb_subfr * LTP_ORDER );
|
||||
|
||||
silk_quant_LTP_gains( B_Q14, cbk_index, periodicity_index, sum_log_gain_Q7, &pred_gain_dB_Q7, XX_Q17, xX_Q17, subfr_len, nb_subfr, arch );
|
||||
|
||||
|
||||
Reference in new issue
Block a user