Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Side by Side Diff: silk/fixed/noise_shape_analysis_FIX.c

Issue 882843002: Update to opus-HEAD-66611f1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/opus.git@master
Patch Set: Add the contents of Makefile.mips back. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /*********************************************************************** 1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without 3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions 4 modification, are permitted provided that the following conditions
5 are met: 5 are met:
6 - Redistributions of source code must retain the above copyright notice, 6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer. 7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright 8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the 9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution. 10 documentation and/or other materials provided with the distribution.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 den_Q24 = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), coefs_ana_Q24[ 0 ], l ambda_Q16 ); 131 den_Q24 = silk_SMLAWB( SILK_FIX_CONST( 1.0, 24 ), coefs_ana_Q24[ 0 ], l ambda_Q16 );
132 gain_ana_Q16 = silk_DIV32_varQ( nom_Q16, den_Q24, 24 ); 132 gain_ana_Q16 = silk_DIV32_varQ( nom_Q16, den_Q24, 24 );
133 for( i = 0; i < order; i++ ) { 133 for( i = 0; i < order; i++ ) {
134 coefs_syn_Q24[ i ] = silk_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] ) ; 134 coefs_syn_Q24[ i ] = silk_SMULWW( gain_syn_Q16, coefs_syn_Q24[ i ] ) ;
135 coefs_ana_Q24[ i ] = silk_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] ) ; 135 coefs_ana_Q24[ i ] = silk_SMULWW( gain_ana_Q16, coefs_ana_Q24[ i ] ) ;
136 } 136 }
137 } 137 }
138 silk_assert( 0 ); 138 silk_assert( 0 );
139 } 139 }
140 140
141 #if defined(MIPSr1_ASM)
142 #include "mips/noise_shape_analysis_FIX_mipsr1.h"
143 #endif
144
141 /**************************************************************/ 145 /**************************************************************/
142 /* Compute noise shaping coefficients and initial gain values */ 146 /* Compute noise shaping coefficients and initial gain values */
143 /**************************************************************/ 147 /**************************************************************/
148 #ifndef OVERRIDE_silk_noise_shape_analysis_FIX
144 void silk_noise_shape_analysis_FIX( 149 void silk_noise_shape_analysis_FIX(
145 silk_encoder_state_FIX *psEnc, /* I /O Encoder state FIX */ 150 silk_encoder_state_FIX *psEnc, /* I /O Encoder state FIX */
146 silk_encoder_control_FIX *psEncCtrl, /* I /O Encoder control FIX */ 151 silk_encoder_control_FIX *psEncCtrl, /* I /O Encoder control FIX */
147 const opus_int16 *pitch_res, /* I LPC residual from pitch analysis */ 152 const opus_int16 *pitch_res, /* I LPC residual from pitch analysis */
148 const opus_int16 *x, /* I Input signal [ frame_length + la_shape ] */ 153 const opus_int16 *x, /* I Input signal [ frame_length + la_shape ] */
149 int arch /* I Run-time architecture */ 154 int arch /* I Run-time architecture */
150 ) 155 )
151 { 156 {
152 silk_shape_state_FIX *psShapeSt = &psEnc->sShape; 157 silk_shape_state_FIX *psShapeSt = &psEnc->sShape;
153 opus_int k, i, nSamples, Qnrg, b_Q14, warping_Q16, scale = 0; 158 opus_int k, i, nSamples, Qnrg, b_Q14, warping_Q16, scale = 0;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 silk_SMLAWB( psShapeSt->HarmShapeGain_smth_Q16, HarmShapeGain_Q16 - psShapeSt->HarmShapeGain_smth_Q16, SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) ); 441 silk_SMLAWB( psShapeSt->HarmShapeGain_smth_Q16, HarmShapeGain_Q16 - psShapeSt->HarmShapeGain_smth_Q16, SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );
437 psShapeSt->Tilt_smth_Q16 = 442 psShapeSt->Tilt_smth_Q16 =
438 silk_SMLAWB( psShapeSt->Tilt_smth_Q16, Tilt_Q16 - psShapeSt->Tilt_smth_Q16, SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) ); 443 silk_SMLAWB( psShapeSt->Tilt_smth_Q16, Tilt_Q16 - psShapeSt->Tilt_smth_Q16, SILK_FIX_CONST( SUBFR_SMTH_COEF, 16 ) );
439 444
440 psEncCtrl->HarmBoost_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psSha peSt->HarmBoost_smth_Q16, 2 ); 445 psEncCtrl->HarmBoost_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psSha peSt->HarmBoost_smth_Q16, 2 );
441 psEncCtrl->HarmShapeGain_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psSha peSt->HarmShapeGain_smth_Q16, 2 ); 446 psEncCtrl->HarmShapeGain_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psSha peSt->HarmShapeGain_smth_Q16, 2 );
442 psEncCtrl->Tilt_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psSha peSt->Tilt_smth_Q16, 2 ); 447 psEncCtrl->Tilt_Q14[ k ] = ( opus_int )silk_RSHIFT_ROUND( psSha peSt->Tilt_smth_Q16, 2 );
443 } 448 }
444 RESTORE_STACK; 449 RESTORE_STACK;
445 } 450 }
451 #endif /* OVERRIDE_silk_noise_shape_analysis_FIX */
OLDNEW
« no previous file with comments | « silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h ('k') | silk/fixed/pitch_analysis_core_FIX.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698