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

Side by Side Diff: silk/float/find_pitch_lags_FLP.c

Issue 107243004: Updating Opus to release 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « silk/float/encode_frame_FLP.c ('k') | silk/float/find_pred_coefs_FLP.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 19 matching lines...) Expand all
30 #endif 30 #endif
31 31
32 #include <stdlib.h> 32 #include <stdlib.h>
33 #include "main_FLP.h" 33 #include "main_FLP.h"
34 #include "tuning_parameters.h" 34 #include "tuning_parameters.h"
35 35
36 void silk_find_pitch_lags_FLP( 36 void silk_find_pitch_lags_FLP(
37 silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ 37 silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */
38 silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */ 38 silk_encoder_control_FLP *psEncCtrl, /* I/O Encoder control FLP */
39 silk_float res[], /* O Residual */ 39 silk_float res[], /* O Residual */
40 const silk_float x[] /* I Speech signal */ 40 const silk_float x[], /* I Speech signal */
41 int arch /* I Run-time architecture */
41 ) 42 )
42 { 43 {
43 opus_int buf_len; 44 opus_int buf_len;
44 silk_float thrhld, res_nrg; 45 silk_float thrhld, res_nrg;
45 const silk_float *x_buf_ptr, *x_buf; 46 const silk_float *x_buf_ptr, *x_buf;
46 silk_float auto_corr[ MAX_FIND_PITCH_LPC_ORDER + 1 ]; 47 silk_float auto_corr[ MAX_FIND_PITCH_LPC_ORDER + 1 ];
47 silk_float A[ MAX_FIND_PITCH_LPC_ORDER ]; 48 silk_float A[ MAX_FIND_PITCH_LPC_ORDER ];
48 silk_float refl_coef[ MAX_FIND_PITCH_LPC_ORDER ]; 49 silk_float refl_coef[ MAX_FIND_PITCH_LPC_ORDER ];
49 silk_float Wsig[ FIND_PITCH_LPC_WIN_MAX ]; 50 silk_float Wsig[ FIND_PITCH_LPC_WIN_MAX ];
50 silk_float *Wsig_ptr; 51 silk_float *Wsig_ptr;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 thrhld -= 0.004f * psEnc->sCmn.pitchEstimationLPCOrder; 110 thrhld -= 0.004f * psEnc->sCmn.pitchEstimationLPCOrder;
110 thrhld -= 0.1f * psEnc->sCmn.speech_activity_Q8 * ( 1.0f / 256.0f ); 111 thrhld -= 0.1f * psEnc->sCmn.speech_activity_Q8 * ( 1.0f / 256.0f );
111 thrhld -= 0.15f * (psEnc->sCmn.prevSignalType >> 1); 112 thrhld -= 0.15f * (psEnc->sCmn.prevSignalType >> 1);
112 thrhld -= 0.1f * psEnc->sCmn.input_tilt_Q15 * ( 1.0f / 32768.0f ); 113 thrhld -= 0.1f * psEnc->sCmn.input_tilt_Q15 * ( 1.0f / 32768.0f );
113 114
114 /*****************************************/ 115 /*****************************************/
115 /* Call Pitch estimator */ 116 /* Call Pitch estimator */
116 /*****************************************/ 117 /*****************************************/
117 if( silk_pitch_analysis_core_FLP( res, psEncCtrl->pitchL, &psEnc->sCmn.i ndices.lagIndex, 118 if( silk_pitch_analysis_core_FLP( res, psEncCtrl->pitchL, &psEnc->sCmn.i ndices.lagIndex,
118 &psEnc->sCmn.indices.contourIndex, &psEnc->LTPCorr, psEnc->sCmn.prev Lag, psEnc->sCmn.pitchEstimationThreshold_Q16 / 65536.0f, 119 &psEnc->sCmn.indices.contourIndex, &psEnc->LTPCorr, psEnc->sCmn.prev Lag, psEnc->sCmn.pitchEstimationThreshold_Q16 / 65536.0f,
119 thrhld, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, p sEnc->sCmn.nb_subfr ) == 0 ) 120 thrhld, psEnc->sCmn.fs_kHz, psEnc->sCmn.pitchEstimationComplexity, p sEnc->sCmn.nb_subfr, arch ) == 0 )
120 { 121 {
121 psEnc->sCmn.indices.signalType = TYPE_VOICED; 122 psEnc->sCmn.indices.signalType = TYPE_VOICED;
122 } else { 123 } else {
123 psEnc->sCmn.indices.signalType = TYPE_UNVOICED; 124 psEnc->sCmn.indices.signalType = TYPE_UNVOICED;
124 } 125 }
125 } else { 126 } else {
126 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) ); 127 silk_memset( psEncCtrl->pitchL, 0, sizeof( psEncCtrl->pitchL ) );
127 psEnc->sCmn.indices.lagIndex = 0; 128 psEnc->sCmn.indices.lagIndex = 0;
128 psEnc->sCmn.indices.contourIndex = 0; 129 psEnc->sCmn.indices.contourIndex = 0;
129 psEnc->LTPCorr = 0; 130 psEnc->LTPCorr = 0;
130 } 131 }
131 } 132 }
OLDNEW
« no previous file with comments | « silk/float/encode_frame_FLP.c ('k') | silk/float/find_pred_coefs_FLP.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698