shithub: opus

Download patch

ref: 4e28e7426638655959294670c36d0c52be44fb74
parent: 2524e7ccf9eebdcd974c7c0fd3d85ce9e4f81376
author: Jean-Marc Valin <[email protected]>
date: Wed Feb 2 14:24:23 EST 2011

Debug fixes

--- a/src_FIX/SKP_Silk_NLSF_MSVQ_encode_FIX.c
+++ b/src_FIX/SKP_Silk_NLSF_MSVQ_encode_FIX.c
@@ -49,16 +49,6 @@
     SKP_int32   se_Q15, wsse_Q20, bestRateDist_Q20;
 #endif
 
-#if( LOW_COMPLEXITY_ONLY == 1 )
-    SKP_int32   pRateDist_Q18[  NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED_LC_MODE ];
-    SKP_int32   pRate_Q5[       MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];
-    SKP_int32   pRate_new_Q5[   MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];
-    SKP_int     pTempIndices[   MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];
-    SKP_int     pPath[          MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * NLSF_MSVQ_MAX_CB_STAGES ];
-    SKP_int     pPath_new[      MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * NLSF_MSVQ_MAX_CB_STAGES ];
-    SKP_int     pRes_Q15[       MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];
-    SKP_int     pRes_new_Q15[   MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];
-#else
     SKP_int32   pRateDist_Q18[  NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED ];
     SKP_int32   pRate_Q5[       MAX_NLSF_MSVQ_SURVIVORS ];
     SKP_int32   pRate_new_Q5[   MAX_NLSF_MSVQ_SURVIVORS ];
@@ -67,7 +57,6 @@
     SKP_int     pPath_new[      MAX_NLSF_MSVQ_SURVIVORS * NLSF_MSVQ_MAX_CB_STAGES ];
     SKP_int     pRes_Q15[       MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];
     SKP_int     pRes_new_Q15[   MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];
-#endif
 
     const SKP_int   *pConstInt;
           SKP_int   *pInt;
@@ -75,7 +64,6 @@
     const SKP_Silk_NLSF_CBS *pCurrentCBStage;
 
     SKP_assert( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS );
-    SKP_assert( ( LOW_COMPLEXITY_ONLY == 0 ) || ( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ) );
 
 #ifdef SAVE_ALL_INTERNAL_DATA
     DEBUG_STORE_DATA( NLSF.dat,    pNLSF_Q15,    LPC_order * sizeof( SKP_int   ) );
--- a/src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c
+++ b/src_FLP/SKP_Silk_NLSF_MSVQ_encode_FLP.c
@@ -49,16 +49,6 @@
     SKP_float   se, wsse, bestRateDist;
 #endif
 
-#if( LOW_COMPLEXITY_ONLY == 1 )
-    SKP_float   pRateDist[      NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED_LC_MODE ];
-    SKP_float   pRate[          MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];
-    SKP_float   pRate_new[      MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];
-    SKP_int     pTempIndices[   MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ];
-    SKP_int     pPath[          MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * NLSF_MSVQ_MAX_CB_STAGES ];
-    SKP_int     pPath_new[      MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * NLSF_MSVQ_MAX_CB_STAGES ];
-    SKP_float   pRes_Q8[        MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];
-    SKP_float   pRes_Q8_new[    MAX_NLSF_MSVQ_SURVIVORS_LC_MODE * MAX_LPC_ORDER ];
-#else
     SKP_float   pRateDist[      NLSF_MSVQ_TREE_SEARCH_MAX_VECTORS_EVALUATED ];
     SKP_float   pRate[          MAX_NLSF_MSVQ_SURVIVORS ];
     SKP_float   pRate_new[      MAX_NLSF_MSVQ_SURVIVORS ];
@@ -67,7 +57,6 @@
     SKP_int     pPath_new[      MAX_NLSF_MSVQ_SURVIVORS * NLSF_MSVQ_MAX_CB_STAGES ];
     SKP_float   pRes_Q8[        MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];
     SKP_float   pRes_Q8_new[    MAX_NLSF_MSVQ_SURVIVORS * MAX_LPC_ORDER ];
-#endif
 
     const SKP_float *pConstFloat;
           SKP_float *pFloat;
@@ -77,7 +66,6 @@
     const SKP_Silk_NLSF_CBS *pCurrentCBStage;
 
     SKP_assert( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS );
-    SKP_assert( ( LOW_COMPLEXITY_ONLY == 0 ) || ( NLSF_MSVQ_Survivors <= MAX_NLSF_MSVQ_SURVIVORS_LC_MODE ) );
 
 #ifdef SAVE_ALL_INTERNAL_DATA
     DEBUG_STORE_DATA( NLSF.dat,    pNLSF,    LPC_order * sizeof( SKP_float ) );
--- a/src_FLP/SKP_Silk_encode_frame_FLP.c
+++ b/src_FLP/SKP_Silk_encode_frame_FLP.c
@@ -80,7 +80,7 @@
     } else {
         psEnc->sCmn.noSpeechCounter = 0;
         psEnc->sCmn.inDTX           = 0;
-        sEncCtrl.sCmn.signalType = TYPE_UNVOICED;
+        sEncCtrl.sCmn.signalType    = TYPE_UNVOICED;
     }
 
     /*******************************************/
--- a/src_common/SKP_Silk_define.h
+++ b/src_common/SKP_Silk_define.h
@@ -89,9 +89,6 @@
 #define CONCEC_SWB_SMPLS_THRES                  480 * 15    /* 300 ms                                       */
 #define WB_DETECT_ACTIVE_SPEECH_MS_THRES        15000       /* ms of active speech needed for WB detection  */
 
-/* Low complexity setting */
-#define LOW_COMPLEXITY_ONLY                     0
-
 /* Activate bandwidth transition filtering for mode switching */
 #define SWITCH_TRANSITION_FILTERING             1
 
--- a/src_common/SKP_Silk_setup_complexity.h
+++ b/src_common/SKP_Silk_setup_complexity.h
@@ -35,13 +35,8 @@
 {
     SKP_int ret = 0;
 
-    /* Check that settings are valid */
-    if( LOW_COMPLEXITY_ONLY && Complexity != 0 ) { 
-        ret = SKP_SILK_ENC_INVALID_COMPLEXITY_SETTING;
-    }
-
     /* Set encoding complexity */
-    if( Complexity < 2 || LOW_COMPLEXITY_ONLY ) {
+    if( Complexity < 2 ) {
         psEncC->pitchEstimationComplexity       = SKP_Silk_PE_MIN_COMPLEX;
         psEncC->pitchEstimationThreshold_Q16    = SKP_FIX_CONST( 0.8, 16 );
         psEncC->pitchEstimationLPCOrder         = 6;
@@ -52,7 +47,7 @@
         psEncC->LTPQuantLowComplexity           = 1;
         psEncC->NLSF_MSVQ_Survivors             = 2;
         psEncC->warping_Q16                     = 0;
-    } else if( Complexity < 4 || LOW_COMPLEXITY_ONLY ) {
+    } else if( Complexity < 4 ) {
         psEncC->pitchEstimationComplexity       = SKP_Silk_PE_MID_COMPLEX;
         psEncC->pitchEstimationThreshold_Q16    = SKP_FIX_CONST( 0.76, 16 );
         psEncC->pitchEstimationLPCOrder         = 8;