[xiph-commits] r18789 - websites/opus-codec.org/downloads

jm at svn.xiph.org jm at svn.xiph.org
Tue Feb 5 21:55:12 PST 2013


Author: jm
Date: 2013-02-05 21:55:12 -0800 (Tue, 05 Feb 2013)
New Revision: 18789

Added:
   websites/opus-codec.org/downloads/constant_bwexp.patch
Log:
Patch that goes with the hacks article


Added: websites/opus-codec.org/downloads/constant_bwexp.patch
===================================================================
--- websites/opus-codec.org/downloads/constant_bwexp.patch	                        (rev 0)
+++ websites/opus-codec.org/downloads/constant_bwexp.patch	2013-02-06 05:55:12 UTC (rev 18789)
@@ -0,0 +1,31 @@
+diff --git a/silk/fixed/noise_shape_analysis_FIX.c b/silk/fixed/noise_shape_analysis_FIX.c
+index d230e48..c5b5fb4 100644
+--- a/silk/fixed/noise_shape_analysis_FIX.c
++++ b/silk/fixed/noise_shape_analysis_FIX.c
+@@ -237,10 +237,7 @@ void silk_noise_shape_analysis_FIX(
+     /*******************************/
+     /* Control bandwidth expansion */
+     /*******************************/
+-    /* More BWE for signals with high prediction gain */
+-    strength_Q16 = silk_SMULWB( psEncCtrl->predGain_Q16, SILK_FIX_CONST( FIND_PITCH_WHITE_NOISE_FRACTION, 16 ) );
+-    BWExp1_Q16 = BWExp2_Q16 = silk_DIV32_varQ( SILK_FIX_CONST( BANDWIDTH_EXPANSION, 16 ),
+-        silk_SMLAWW( SILK_FIX_CONST( 1.0, 16 ), strength_Q16, strength_Q16 ), 16 );
++    BWExp1_Q16 = BWExp2_Q16 = SILK_FIX_CONST( BANDWIDTH_EXPANSION, 16 );
+     delta_Q16  = silk_SMULWB( SILK_FIX_CONST( 1.0, 16 ) - silk_SMULBB( 3, psEncCtrl->coding_quality_Q14 ),
+         SILK_FIX_CONST( LOW_RATE_BANDWIDTH_EXPANSION_DELTA, 16 ) );
+     BWExp1_Q16 = silk_SUB32( BWExp1_Q16, delta_Q16 );
+diff --git a/silk/float/noise_shape_analysis_FLP.c b/silk/float/noise_shape_analysis_FLP.c
+index 33bfd20..ecdded7 100644
+--- a/silk/float/noise_shape_analysis_FLP.c
++++ b/silk/float/noise_shape_analysis_FLP.c
+@@ -208,9 +208,7 @@ void silk_noise_shape_analysis_FLP(
+     /*******************************/
+     /* Control bandwidth expansion */
+     /*******************************/
+-    /* More BWE for signals with high prediction gain */
+-    strength = FIND_PITCH_WHITE_NOISE_FRACTION * psEncCtrl->predGain;           /* between 0.0 and 1.0 */
+-    BWExp1 = BWExp2 = BANDWIDTH_EXPANSION / ( 1.0f + strength * strength );
++    BWExp1 = BWExp2 = BANDWIDTH_EXPANSION;
+     delta  = LOW_RATE_BANDWIDTH_EXPANSION_DELTA * ( 1.0f - 0.75f * psEncCtrl->coding_quality );
+     BWExp1 -= delta;
+     BWExp2 += delta;



More information about the commits mailing list