1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #ifdef HAVE_CONFIG_H
- #include "config.h"
- #endif
- #include "main.h"
- void silk_NLSF_unpack(
- opus_int16 ec_ix[],
- opus_uint8 pred_Q8[],
- const silk_NLSF_CB_struct *psNLSF_CB,
- const opus_int CB1_index
- )
- {
- opus_int i;
- opus_uint8 entry;
- const opus_uint8 *ec_sel_ptr;
- ec_sel_ptr = &psNLSF_CB->ec_sel[ CB1_index * psNLSF_CB->order / 2 ];
- for( i = 0; i < psNLSF_CB->order; i += 2 ) {
- entry = *ec_sel_ptr++;
- ec_ix [ i ] = silk_SMULBB( silk_RSHIFT( entry, 1 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 );
- pred_Q8[ i ] = psNLSF_CB->pred_Q8[ i + ( entry & 1 ) * ( psNLSF_CB->order - 1 ) ];
- ec_ix [ i + 1 ] = silk_SMULBB( silk_RSHIFT( entry, 5 ) & 7, 2 * NLSF_QUANT_MAX_AMPLITUDE + 1 );
- pred_Q8[ i + 1 ] = psNLSF_CB->pred_Q8[ i + ( silk_RSHIFT( entry, 4 ) & 1 ) * ( psNLSF_CB->order - 1 ) + 1 ];
- }
- }
|