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

Side by Side Diff: third_party/opus/src/silk/float/pitch_analysis_core_FLP.c

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment Created 3 years, 5 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 silk_float2short_array( frame_8_FIX, frame, frame_length_8kHz ); 152 silk_float2short_array( frame_8_FIX, frame, frame_length_8kHz );
153 } 153 }
154 154
155 /* Decimate again to 4 kHz */ 155 /* Decimate again to 4 kHz */
156 silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) ); 156 silk_memset( filt_state, 0, 2 * sizeof( opus_int32 ) );
157 silk_resampler_down2( filt_state, frame_4_FIX, frame_8_FIX, frame_length_8kH z ); 157 silk_resampler_down2( filt_state, frame_4_FIX, frame_8_FIX, frame_length_8kH z );
158 silk_short2float_array( frame_4kHz, frame_4_FIX, frame_length_4kHz ); 158 silk_short2float_array( frame_4kHz, frame_4_FIX, frame_length_4kHz );
159 159
160 /* Low-pass filter */ 160 /* Low-pass filter */
161 for( i = frame_length_4kHz - 1; i > 0; i-- ) { 161 for( i = frame_length_4kHz - 1; i > 0; i-- ) {
162 frame_4kHz[ i ] += frame_4kHz[ i - 1 ]; 162 frame_4kHz[ i ] = silk_ADD_SAT16( frame_4kHz[ i ], frame_4kHz[ i - 1 ] ) ;
163 } 163 }
164 164
165 /*************************************************************************** *** 165 /*************************************************************************** ***
166 * FIRST STAGE, operating in 4 khz 166 * FIRST STAGE, operating in 4 khz
167 **************************************************************************** **/ 167 **************************************************************************** **/
168 silk_memset(C, 0, sizeof(silk_float) * nb_subfr * ((PE_MAX_LAG >> 1) + 5)); 168 silk_memset(C, 0, sizeof(silk_float) * nb_subfr * ((PE_MAX_LAG >> 1) + 5));
169 target_ptr = &frame_4kHz[ silk_LSHIFT( sf_length_4kHz, 2 ) ]; 169 target_ptr = &frame_4kHz[ silk_LSHIFT( sf_length_4kHz, 2 ) ];
170 for( k = 0; k < nb_subfr >> 1; k++ ) { 170 for( k = 0; k < nb_subfr >> 1; k++ ) {
171 /* Check that we are within range of the array */ 171 /* Check that we are within range of the array */
172 silk_assert( target_ptr >= frame_4kHz ); 172 silk_assert( target_ptr >= frame_4kHz );
(...skipping 448 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
« no previous file with comments | « third_party/opus/src/silk/float/noise_shape_analysis_FLP.c ('k') | third_party/opus/src/silk/float/prefilter_FLP.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698