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

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

Issue 882843002: Update to opus-HEAD-66611f1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/opus.git@master
Patch Set: 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 basis_ptr = target_ptr - min_lag_4kHz; 175 basis_ptr = target_ptr - min_lag_4kHz;
176 176
177 /* Check that we are within range of the array */ 177 /* Check that we are within range of the array */
178 silk_assert( basis_ptr >= frame_4kHz ); 178 silk_assert( basis_ptr >= frame_4kHz );
179 silk_assert( basis_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kH z ); 179 silk_assert( basis_ptr + sf_length_8kHz <= frame_4kHz + frame_length_4kH z );
180 180
181 celt_pitch_xcorr( target_ptr, target_ptr-max_lag_4kHz, xcorr, sf_length_ 8kHz, max_lag_4kHz - min_lag_4kHz + 1, arch ); 181 celt_pitch_xcorr( target_ptr, target_ptr-max_lag_4kHz, xcorr, sf_length_ 8kHz, max_lag_4kHz - min_lag_4kHz + 1, arch );
182 182
183 /* Calculate first vector products before loop */ 183 /* Calculate first vector products before loop */
184 cross_corr = xcorr[ max_lag_4kHz - min_lag_4kHz ]; 184 cross_corr = xcorr[ max_lag_4kHz - min_lag_4kHz ];
185 normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) + 185 normalizer = silk_energy_FLP( target_ptr, sf_length_8kHz ) +
186 silk_energy_FLP( basis_ptr, sf_length_8kHz ) + 186 silk_energy_FLP( basis_ptr, sf_length_8kHz ) +
187 sf_length_8kHz * 4000.0f; 187 sf_length_8kHz * 4000.0f;
188 188
189 C[ 0 ][ min_lag_4kHz ] += (silk_float)( 2 * cross_corr / normalizer ); 189 C[ 0 ][ min_lag_4kHz ] += (silk_float)( 2 * cross_corr / normalizer );
190 190
191 /* From now on normalizer is computed recursively */ 191 /* From now on normalizer is computed recursively */
192 for( d = min_lag_4kHz + 1; d <= max_lag_4kHz; d++ ) { 192 for( d = min_lag_4kHz + 1; d <= max_lag_4kHz; d++ ) {
193 basis_ptr--; 193 basis_ptr--;
194 194
195 /* Check that we are within range of the array */ 195 /* Check that we are within range of the array */
196 silk_assert( basis_ptr >= frame_4kHz ); 196 silk_assert( basis_ptr >= frame_4kHz );
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 for( j = 0; j < PE_NB_STAGE3_LAGS; j++ ) { 621 for( j = 0; j < PE_NB_STAGE3_LAGS; j++ ) {
622 silk_assert( idx + j < SCRATCH_SIZE ); 622 silk_assert( idx + j < SCRATCH_SIZE );
623 silk_assert( idx + j < lag_counter ); 623 silk_assert( idx + j < lag_counter );
624 energies_st3[ k ][ i ][ j ] = scratch_mem[ idx + j ]; 624 energies_st3[ k ][ i ][ j ] = scratch_mem[ idx + j ];
625 silk_assert( energies_st3[ k ][ i ][ j ] >= 0.0f ); 625 silk_assert( energies_st3[ k ][ i ][ j ] >= 0.0f );
626 } 626 }
627 } 627 }
628 target_ptr += sf_length; 628 target_ptr += sf_length;
629 } 629 }
630 } 630 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698