| 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 /* Buffering */ | 298 /* Buffering */ |
| 299 silk_memcpy( samplesOut1_tmp[ 0 ], psDec->sStereo.sMid, 2 * sizeof( opus
_int16 ) ); | 299 silk_memcpy( samplesOut1_tmp[ 0 ], psDec->sStereo.sMid, 2 * sizeof( opus
_int16 ) ); |
| 300 silk_memcpy( psDec->sStereo.sMid, &samplesOut1_tmp[ 0 ][ nSamplesOutDec
], 2 * sizeof( opus_int16 ) ); | 300 silk_memcpy( psDec->sStereo.sMid, &samplesOut1_tmp[ 0 ][ nSamplesOutDec
], 2 * sizeof( opus_int16 ) ); |
| 301 } | 301 } |
| 302 | 302 |
| 303 /* Number of output samples */ | 303 /* Number of output samples */ |
| 304 *nSamplesOut = silk_DIV32( nSamplesOutDec * decControl->API_sampleRate, silk
_SMULBB( channel_state[ 0 ].fs_kHz, 1000 ) ); | 304 *nSamplesOut = silk_DIV32( nSamplesOutDec * decControl->API_sampleRate, silk
_SMULBB( channel_state[ 0 ].fs_kHz, 1000 ) ); |
| 305 | 305 |
| 306 /* Set up pointers to temp buffers */ | 306 /* Set up pointers to temp buffers */ |
| 307 ALLOC( samplesOut2_tmp, | 307 ALLOC( samplesOut2_tmp, |
| 308 decControl->nChannelsAPI == 2 ? *nSamplesOut : 0, opus_int16 ); | 308 decControl->nChannelsAPI == 2 ? *nSamplesOut : ALLOC_NONE, opus_int16
); |
| 309 if( decControl->nChannelsAPI == 2 ) { | 309 if( decControl->nChannelsAPI == 2 ) { |
| 310 resample_out_ptr = samplesOut2_tmp; | 310 resample_out_ptr = samplesOut2_tmp; |
| 311 } else { | 311 } else { |
| 312 resample_out_ptr = samplesOut; | 312 resample_out_ptr = samplesOut; |
| 313 } | 313 } |
| 314 | 314 |
| 315 for( n = 0; n < silk_min( decControl->nChannelsAPI, decControl->nChannelsInt
ernal ); n++ ) { | 315 for( n = 0; n < silk_min( decControl->nChannelsAPI, decControl->nChannelsInt
ernal ); n++ ) { |
| 316 | 316 |
| 317 /* Resample decoded signal to API_sampleRate */ | 317 /* Resample decoded signal to API_sampleRate */ |
| 318 ret += silk_resampler( &channel_state[ n ].resampler_state, resample_out
_ptr, &samplesOut1_tmp[ n ][ 1 ], nSamplesOutDec ); | 318 ret += silk_resampler( &channel_state[ n ].resampler_state, resample_out
_ptr, &samplesOut1_tmp[ n ][ 1 ], nSamplesOutDec ); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 Silk_TOC->inbandFECFlag = flags & 1; | 388 Silk_TOC->inbandFECFlag = flags & 1; |
| 389 for( i = nFramesPerPayload - 1; i >= 0 ; i-- ) { | 389 for( i = nFramesPerPayload - 1; i >= 0 ; i-- ) { |
| 390 flags = silk_RSHIFT( flags, 1 ); | 390 flags = silk_RSHIFT( flags, 1 ); |
| 391 Silk_TOC->VADFlags[ i ] = flags & 1; | 391 Silk_TOC->VADFlags[ i ] = flags & 1; |
| 392 Silk_TOC->VADFlag |= flags & 1; | 392 Silk_TOC->VADFlag |= flags & 1; |
| 393 } | 393 } |
| 394 | 394 |
| 395 return ret; | 395 return ret; |
| 396 } | 396 } |
| 397 #endif | 397 #endif |
| OLD | NEW |