diff options
author | Koen Vos <koenvos@users.noreply.github.com> | 2016-06-01 16:10:57 +0800 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-19 16:11:18 -0400 |
commit | 3e054b8e57f5439b428b3d4773eec5137d3bb783 (patch) | |
tree | 9984347371b6f76e67c36c8794b564c0b2d80235 | |
parent | f06774c64072e09936e262a1bfbad54b9a15e42f (diff) | |
download | opus-3e054b8e57f5439b428b3d4773eec5137d3bb783.tar.gz |
increase order of noise shaping filter
-rw-r--r-- | silk/SigProc_FIX.h | 2 | ||||
-rw-r--r-- | silk/control_codec.c | 14 | ||||
-rw-r--r-- | silk/define.h | 2 | ||||
-rw-r--r-- | silk/fixed/schur64_FIX.c | 2 | ||||
-rw-r--r-- | silk/fixed/schur_FIX.c | 2 | ||||
-rw-r--r-- | silk/float/schur_FLP.c | 3 |
6 files changed, 12 insertions, 13 deletions
diff --git a/silk/SigProc_FIX.h b/silk/SigProc_FIX.h index 8d0999df..0f260176 100644 --- a/silk/SigProc_FIX.h +++ b/silk/SigProc_FIX.h @@ -35,7 +35,7 @@ extern "C" /*#define silk_MACRO_COUNT */ /* Used to enable WMOPS counting */ -#define SILK_MAX_ORDER_LPC 16 /* max order of the LPC analysis in schur() and k2a() */ +#define SILK_MAX_ORDER_LPC 24 /* max order of the LPC analysis in schur() and k2a() */ #include <string.h> /* for memset(), memcpy(), memmove() */ #include "typedef.h" diff --git a/silk/control_codec.c b/silk/control_codec.c index dd6595eb..e21b3610 100644 --- a/silk/control_codec.c +++ b/silk/control_codec.c @@ -318,7 +318,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MIN_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.8, 16 ); psEncC->pitchEstimationLPCOrder = 6; - psEncC->shapingLPCOrder = 8; + psEncC->shapingLPCOrder = 12; psEncC->la_shape = 3 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = 1; psEncC->useInterpolatedNLSFs = 0; @@ -328,7 +328,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.76, 16 ); psEncC->pitchEstimationLPCOrder = 8; - psEncC->shapingLPCOrder = 10; + psEncC->shapingLPCOrder = 14; psEncC->la_shape = 5 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = 1; psEncC->useInterpolatedNLSFs = 0; @@ -338,7 +338,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MIN_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.8, 16 ); psEncC->pitchEstimationLPCOrder = 6; - psEncC->shapingLPCOrder = 8; + psEncC->shapingLPCOrder = 12; psEncC->la_shape = 3 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = 2; psEncC->useInterpolatedNLSFs = 0; @@ -348,7 +348,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.76, 16 ); psEncC->pitchEstimationLPCOrder = 8; - psEncC->shapingLPCOrder = 10; + psEncC->shapingLPCOrder = 14; psEncC->la_shape = 5 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = 2; psEncC->useInterpolatedNLSFs = 0; @@ -358,7 +358,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.74, 16 ); psEncC->pitchEstimationLPCOrder = 10; - psEncC->shapingLPCOrder = 12; + psEncC->shapingLPCOrder = 16; psEncC->la_shape = 5 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = 2; psEncC->useInterpolatedNLSFs = 1; @@ -368,7 +368,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.72, 16 ); psEncC->pitchEstimationLPCOrder = 12; - psEncC->shapingLPCOrder = 14; + psEncC->shapingLPCOrder = 20; psEncC->la_shape = 5 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = 3; psEncC->useInterpolatedNLSFs = 1; @@ -378,7 +378,7 @@ static opus_int silk_setup_complexity( psEncC->pitchEstimationComplexity = SILK_PE_MAX_COMPLEX; psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.7, 16 ); psEncC->pitchEstimationLPCOrder = 16; - psEncC->shapingLPCOrder = 16; + psEncC->shapingLPCOrder = 24; psEncC->la_shape = 5 * psEncC->fs_kHz; psEncC->nStatesDelayedDecision = MAX_DEL_DEC_STATES; psEncC->useInterpolatedNLSFs = 1; diff --git a/silk/define.h b/silk/define.h index dd2e29b6..11df87d2 100644 --- a/silk/define.h +++ b/silk/define.h @@ -148,7 +148,7 @@ extern "C" #define USE_HARM_SHAPING 1 /* Max LPC order of noise shaping filters */ -#define MAX_SHAPE_LPC_ORDER 16 +#define MAX_SHAPE_LPC_ORDER 24 #define HARM_SHAPE_FIR_TAPS 3 diff --git a/silk/fixed/schur64_FIX.c b/silk/fixed/schur64_FIX.c index 764a10ef..4d3b0932 100644 --- a/silk/fixed/schur64_FIX.c +++ b/silk/fixed/schur64_FIX.c @@ -43,7 +43,7 @@ opus_int32 silk_schur64( /* O returns residual ene opus_int32 C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ]; opus_int32 Ctmp1_Q30, Ctmp2_Q30, rc_tmp_Q31; - silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 ); + silk_assert( order <= SILK_MAX_ORDER_LPC ); /* Check for invalid input */ if( c[ 0 ] <= 0 ) { diff --git a/silk/fixed/schur_FIX.c b/silk/fixed/schur_FIX.c index c4c0ef23..9fe7f419 100644 --- a/silk/fixed/schur_FIX.c +++ b/silk/fixed/schur_FIX.c @@ -43,7 +43,7 @@ opus_int32 silk_schur( /* O Returns residual ene opus_int32 C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ]; opus_int32 Ctmp1, Ctmp2, rc_tmp_Q15; - silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 ); + silk_assert( order <= SILK_MAX_ORDER_LPC ); /* Get number of leading zeros */ lz = silk_CLZ32( c[ 0 ] ); diff --git a/silk/float/schur_FLP.c b/silk/float/schur_FLP.c index d44389fd..f4b4072f 100644 --- a/silk/float/schur_FLP.c +++ b/silk/float/schur_FLP.c @@ -41,7 +41,7 @@ silk_float silk_schur_FLP( /* O returns residual energy double C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ]; double Ctmp1, Ctmp2, rc_tmp; - silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 ); + silk_assert( order <= SILK_MAX_ORDER_LPC ); /* Copy correlations */ for( k = 0; k < order+1; k++ ) { @@ -67,4 +67,3 @@ silk_float silk_schur_FLP( /* O returns residual energy /* Return residual energy */ return (silk_float)C[ 0 ][ 1 ]; } - |