mirror of
https://github.com/xiph/opus.git
synced 2025-05-25 20:59:13 +00:00
SILK fixes following last codec WG meeting
decoder: - fixed incorrect scaling of filter states for the smallest quantization step sizes - NLSF2A now limits the prediction gain of LPC filters encoder: - increased damping of LTP coefficients in LTP analysis - increased white noise fraction in noise shaping LPC analysis - introduced maximum total prediction gain. Used by Burg's method to exit early if prediction gain is exceeded. This improves packet loss robustness and numerical robustness in Burg's method - Prefiltered signal is now in int32 Q10 domain, from int16 Q0 - Increased max number of iterations in CBR gain control loop from 5 to 6 - Removed useless code from LTP scaling control - Optimization: smarter LPC loop unrolling - Switched default win32 compile mode to be floating-point resampler: - made resampler have constant delay of 0.75 ms; removed delay compensation from silk code. - removed obsolete table entries (~850 Bytes) - increased downsampling filter order from 16 to 18/24/36 (depending on frequency ratio) - reoptimized filter coefficients
This commit is contained in:
parent
6619a73637
commit
bf75c8ec4d
71 changed files with 961 additions and 1005 deletions
|
@ -79,7 +79,7 @@ opus_int32 silk_NLSF_encode( /* O Returns
|
|||
/* Residual after first stage */
|
||||
pCB_element = &psNLSF_CB->CB1_NLSF_Q8[ ind1 * psNLSF_CB->order ];
|
||||
for( i = 0; i < psNLSF_CB->order; i++ ) {
|
||||
NLSF_tmp_Q15[ i ] = silk_LSHIFT16( ( opus_int16 )pCB_element[ i ], 7 );
|
||||
NLSF_tmp_Q15[ i ] = silk_LSHIFT16( (opus_int16)pCB_element[ i ], 7 );
|
||||
res_Q15[ i ] = pNLSF_Q15[ i ] - NLSF_tmp_Q15[ i ];
|
||||
}
|
||||
|
||||
|
@ -88,13 +88,13 @@ opus_int32 silk_NLSF_encode( /* O Returns
|
|||
|
||||
/* Apply square-rooted weights */
|
||||
for( i = 0; i < psNLSF_CB->order; i++ ) {
|
||||
W_tmp_Q9 = silk_SQRT_APPROX( silk_LSHIFT( ( opus_int32 )W_tmp_QW[ i ], 18 - NLSF_W_Q ) );
|
||||
res_Q10[ i ] = ( opus_int16 )silk_RSHIFT( silk_SMULBB( res_Q15[ i ], W_tmp_Q9 ), 14 );
|
||||
W_tmp_Q9 = silk_SQRT_APPROX( silk_LSHIFT( (opus_int32)W_tmp_QW[ i ], 18 - NLSF_W_Q ) );
|
||||
res_Q10[ i ] = (opus_int16)silk_RSHIFT( silk_SMULBB( res_Q15[ i ], W_tmp_Q9 ), 14 );
|
||||
}
|
||||
|
||||
/* Modify input weights accordingly */
|
||||
for( i = 0; i < psNLSF_CB->order; i++ ) {
|
||||
W_adj_Q5[ i ] = silk_DIV32_16( silk_LSHIFT( ( opus_int32 )pW_QW[ i ], 5 ), W_tmp_QW[ i ] );
|
||||
W_adj_Q5[ i ] = silk_DIV32_16( silk_LSHIFT( (opus_int32)pW_QW[ i ], 5 ), W_tmp_QW[ i ] );
|
||||
}
|
||||
|
||||
/* Unpack entropy table indices and predictor for current CB1 index */
|
||||
|
@ -118,7 +118,7 @@ opus_int32 silk_NLSF_encode( /* O Returns
|
|||
/* Find the lowest rate-distortion error */
|
||||
silk_insertion_sort_increasing( RD_Q25, &bestIndex, nSurvivors, 1 );
|
||||
|
||||
NLSFIndices[ 0 ] = ( opus_int8 )tempIndices1[ bestIndex ];
|
||||
NLSFIndices[ 0 ] = (opus_int8)tempIndices1[ bestIndex ];
|
||||
silk_memcpy( &NLSFIndices[ 1 ], &tempIndices2[ bestIndex * MAX_LPC_ORDER ], psNLSF_CB->order * sizeof( opus_int8 ) );
|
||||
|
||||
/* Decode */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue