| OLD | NEW |
| 1 /* Copyright (c) 2014, Cisco Systems, INC | 1 /* Copyright (c) 2014, Cisco Systems, INC |
| 2 Written by XiangMingZhu WeiZhou MinPeng YanWang | 2 Written by XiangMingZhu WeiZhou MinPeng YanWang |
| 3 | 3 |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 opus_int32 HarmShapeFIRPacked_Q14, /* I
*/ | 64 opus_int32 HarmShapeFIRPacked_Q14, /* I
*/ |
| 65 opus_int Tilt_Q14, /* I Spectral tilt
*/ | 65 opus_int Tilt_Q14, /* I Spectral tilt
*/ |
| 66 opus_int32 LF_shp_Q14, /* I
*/ | 66 opus_int32 LF_shp_Q14, /* I
*/ |
| 67 opus_int32 Gain_Q16, /* I
*/ | 67 opus_int32 Gain_Q16, /* I
*/ |
| 68 opus_int offset_Q10, /* I
*/ | 68 opus_int offset_Q10, /* I
*/ |
| 69 opus_int length, /* I Input length
*/ | 69 opus_int length, /* I Input length
*/ |
| 70 opus_int32 table[][4] /* I
*/ | 70 opus_int32 table[][4] /* I
*/ |
| 71 ); | 71 ); |
| 72 | 72 |
| 73 void silk_NSQ_sse4_1( | 73 void silk_NSQ_sse4_1( |
| 74 const silk_encoder_state *psEncC, /* I
/O Encoder State */ | 74 const silk_encoder_state *psEncC, /* I
Encoder State */ |
| 75 silk_nsq_state *NSQ, /* I
/O NSQ state */ | 75 silk_nsq_state *NSQ, /* I
/O NSQ state */ |
| 76 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ | 76 SideInfoIndices *psIndices, /* I
/O Quantization Indices */ |
| 77 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ | 77 const opus_int32 x_Q3[], /* I
Prefiltered input signal */ |
| 78 opus_int8 pulses[], /* O
Quantized pulse signal */ | 78 opus_int8 pulses[], /* O
Quantized pulse signal */ |
| 79 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ | 79 const opus_int16 PredCoef_Q12[ 2 * MAX_LPC_ORDER ], /* I
Short term prediction coefs */ |
| 80 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ | 80 const opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ], /* I
Long term prediction coefs */ |
| 81 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ | 81 const opus_int16 AR2_Q13[ MAX_NB_SUBFR * MAX_SHAPE_LPC_ORDER ], /
* I Noise shaping coefs */ |
| 82 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ | 82 const opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ], /* I
Long term shaping coefs */ |
| 83 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ | 83 const opus_int Tilt_Q14[ MAX_NB_SUBFR ], /* I
Spectral tilt */ |
| 84 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ | 84 const opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ], /* I
Low frequency shaping coefs */ |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 x_Q3 += psEncC->subfr_length; | 227 x_Q3 += psEncC->subfr_length; |
| 228 pulses += psEncC->subfr_length; | 228 pulses += psEncC->subfr_length; |
| 229 pxq += psEncC->subfr_length; | 229 pxq += psEncC->subfr_length; |
| 230 } | 230 } |
| 231 | 231 |
| 232 /* Update lagPrev for next frame */ | 232 /* Update lagPrev for next frame */ |
| 233 NSQ->lagPrev = pitchL[ psEncC->nb_subfr - 1 ]; | 233 NSQ->lagPrev = pitchL[ psEncC->nb_subfr - 1 ]; |
| 234 | 234 |
| 235 /* Save quantized speech and noise shaping signals */ | 235 /* Save quantized speech and noise shaping signals */ |
| 236 /* DEBUG_STORE_DATA( enc.pcm, &NSQ->xq[ psEncC->ltp_mem_length ], psEncC->fr
ame_length * sizeof( opus_int16 ) ) */ | |
| 237 silk_memmove( NSQ->xq, &NSQ->xq[ psEncC->frame_length ],
psEncC->ltp_mem_length * sizeof( opus_int16 ) ); | 236 silk_memmove( NSQ->xq, &NSQ->xq[ psEncC->frame_length ],
psEncC->ltp_mem_length * sizeof( opus_int16 ) ); |
| 238 silk_memmove( NSQ->sLTP_shp_Q14, &NSQ->sLTP_shp_Q14[ psEncC->frame_length ],
psEncC->ltp_mem_length * sizeof( opus_int32 ) ); | 237 silk_memmove( NSQ->sLTP_shp_Q14, &NSQ->sLTP_shp_Q14[ psEncC->frame_length ],
psEncC->ltp_mem_length * sizeof( opus_int32 ) ); |
| 239 RESTORE_STACK; | 238 RESTORE_STACK; |
| 240 } | 239 } |
| 241 | 240 |
| 242 /***********************************/ | 241 /***********************************/ |
| 243 /* silk_noise_shape_quantizer_10_16 */ | 242 /* silk_noise_shape_quantizer_10_16 */ |
| 244 /***********************************/ | 243 /***********************************/ |
| 245 static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( | 244 static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( |
| 246 silk_nsq_state *NSQ, /* I/O NSQ state
*/ | 245 silk_nsq_state *NSQ, /* I/O NSQ state
*/ |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 710 |
| 712 /* Scale short-term prediction and shaping states */ | 711 /* Scale short-term prediction and shaping states */ |
| 713 for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) { | 712 for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) { |
| 714 NSQ->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] )
; | 713 NSQ->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] )
; |
| 715 } | 714 } |
| 716 for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) { | 715 for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) { |
| 717 NSQ->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] )
; | 716 NSQ->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] )
; |
| 718 } | 717 } |
| 719 } | 718 } |
| 720 } | 719 } |
| OLD | NEW |