Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-04-18 20:39:41 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-04-18 20:39:41 +0300
commit2042ed861f03ab205b848f00ca90501a69fa7204 (patch)
tree8a80563438500f019a579cb3b539b0c72257fe25
parente497353df46b24b991d3dc1a6764d9fc64609cd3 (diff)
Using more fine-grained complexity settings for SILKexp_silk_cbr2
Only complexity 0-1 now uses the plain non-delayed-decision NSQ since its quality is pretty bad. Previously 0-3 were using that plain NSQ.
-rw-r--r--silk/control_codec.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/silk/control_codec.c b/silk/control_codec.c
index 044eea3f..9d76e352 100644
--- a/silk/control_codec.c
+++ b/silk/control_codec.c
@@ -319,7 +319,7 @@ static opus_int silk_setup_complexity(
/* Set encoding complexity */
silk_assert( Complexity >= 0 && Complexity <= 10 );
- if( Complexity < 2 ) {
+ if( Complexity < 1 ) {
psEncC->pitchEstimationComplexity = SILK_PE_MIN_COMPLEX;
psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.8, 16 );
psEncC->pitchEstimationLPCOrder = 6;
@@ -330,7 +330,7 @@ static opus_int silk_setup_complexity(
psEncC->LTPQuantLowComplexity = 1;
psEncC->NLSF_MSVQ_Survivors = 2;
psEncC->warping_Q16 = 0;
- } else if( Complexity < 4 ) {
+ } else if( Complexity < 2 ) {
psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX;
psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.76, 16 );
psEncC->pitchEstimationLPCOrder = 8;
@@ -341,6 +341,28 @@ static opus_int silk_setup_complexity(
psEncC->LTPQuantLowComplexity = 0;
psEncC->NLSF_MSVQ_Survivors = 4;
psEncC->warping_Q16 = 0;
+ } else if( Complexity < 3 ) {
+ psEncC->pitchEstimationComplexity = SILK_PE_MIN_COMPLEX;
+ psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.8, 16 );
+ psEncC->pitchEstimationLPCOrder = 6;
+ psEncC->shapingLPCOrder = 8;
+ psEncC->la_shape = 3 * psEncC->fs_kHz;
+ psEncC->nStatesDelayedDecision = 2;
+ psEncC->useInterpolatedNLSFs = 0;
+ psEncC->LTPQuantLowComplexity = 1;
+ psEncC->NLSF_MSVQ_Survivors = 2;
+ psEncC->warping_Q16 = 0;
+ } else if( Complexity < 4 ) {
+ psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX;
+ psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.76, 16 );
+ psEncC->pitchEstimationLPCOrder = 8;
+ psEncC->shapingLPCOrder = 10;
+ psEncC->la_shape = 5 * psEncC->fs_kHz;
+ psEncC->nStatesDelayedDecision = 2;
+ psEncC->useInterpolatedNLSFs = 0;
+ psEncC->LTPQuantLowComplexity = 0;
+ psEncC->NLSF_MSVQ_Survivors = 4;
+ psEncC->warping_Q16 = 0;
} else if( Complexity < 6 ) {
psEncC->pitchEstimationComplexity = SILK_PE_MID_COMPLEX;
psEncC->pitchEstimationThreshold_Q16 = SILK_FIX_CONST( 0.74, 16 );