| OLD | NEW |
| 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 pitch_out[ k ] = lag + 2 * silk_CB_lags_stage2[ k ][ CBimax_old ]; | 493 pitch_out[ k ] = lag + 2 * silk_CB_lags_stage2[ k ][ CBimax_old ]; |
| 494 } | 494 } |
| 495 /* Calculate the correlations and energies needed in stage 3 */ | 495 /* Calculate the correlations and energies needed in stage 3 */ |
| 496 silk_P_Ana_calc_corr_st3( crosscorr_st3, input_frame_ptr, start_lag, sf
_length, nb_subfr, complexity ); | 496 silk_P_Ana_calc_corr_st3( crosscorr_st3, input_frame_ptr, start_lag, sf
_length, nb_subfr, complexity ); |
| 497 silk_P_Ana_calc_energy_st3( energies_st3, input_frame_ptr, start_lag, sf
_length, nb_subfr, complexity ); | 497 silk_P_Ana_calc_energy_st3( energies_st3, input_frame_ptr, start_lag, sf
_length, nb_subfr, complexity ); |
| 498 | 498 |
| 499 lag_counter = 0; | 499 lag_counter = 0; |
| 500 silk_assert( lag == silk_SAT16( lag ) ); | 500 silk_assert( lag == silk_SAT16( lag ) ); |
| 501 contour_bias_Q20 = silk_DIV32_16( SILK_FIX_CONST( PE_FLATCONTOUR_BIAS, 2
0 ), lag ); | 501 contour_bias_Q20 = silk_DIV32_16( SILK_FIX_CONST( PE_FLATCONTOUR_BIAS, 2
0 ), lag ); |
| 502 | 502 |
| 503 /* Set up codebook parameters acording to complexity setting and frame l
ength */ | 503 /* Set up codebook parameters according to complexity setting and frame
length */ |
| 504 if( nb_subfr == PE_MAX_NB_SUBFR ) { | 504 if( nb_subfr == PE_MAX_NB_SUBFR ) { |
| 505 nb_cbk_search = (opus_int)silk_nb_cbk_searchs_stage3[ complexity ]
; | 505 nb_cbk_search = (opus_int)silk_nb_cbk_searchs_stage3[ complexity ]
; |
| 506 cbk_size = PE_NB_CBKS_STAGE3_MAX; | 506 cbk_size = PE_NB_CBKS_STAGE3_MAX; |
| 507 Lag_CB_ptr = &silk_CB_lags_stage3[ 0 ][ 0 ]; | 507 Lag_CB_ptr = &silk_CB_lags_stage3[ 0 ][ 0 ]; |
| 508 } else { | 508 } else { |
| 509 nb_cbk_search = PE_NB_CBKS_STAGE3_10MS; | 509 nb_cbk_search = PE_NB_CBKS_STAGE3_10MS; |
| 510 cbk_size = PE_NB_CBKS_STAGE3_10MS; | 510 cbk_size = PE_NB_CBKS_STAGE3_10MS; |
| 511 Lag_CB_ptr = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ]; | 511 Lag_CB_ptr = &silk_CB_lags_stage3_10_ms[ 0 ][ 0 ]; |
| 512 } | 512 } |
| 513 for( d = start_lag; d <= end_lag; d++ ) { | 513 for( d = start_lag; d <= end_lag; d++ ) { |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 } | 736 } |
| 737 nbits += 17 - silk_CLZ16( sum_sqr_len ); | 737 nbits += 17 - silk_CLZ16( sum_sqr_len ); |
| 738 | 738 |
| 739 /* Without a guarantee of saturation, we need to keep the 31st bit free */ | 739 /* Without a guarantee of saturation, we need to keep the 31st bit free */ |
| 740 if( nbits < 31 ) { | 740 if( nbits < 31 ) { |
| 741 return 0; | 741 return 0; |
| 742 } else { | 742 } else { |
| 743 return( nbits - 30 ); | 743 return( nbits - 30 ); |
| 744 } | 744 } |
| 745 } | 745 } |
| OLD | NEW |