Loading lib_com/ivas_prot_fx.h +6 −0 Original line number Diff line number Diff line Loading @@ -4008,6 +4008,12 @@ ivas_error ivas_output_buff_dec_fx( const Word16 nchan_out_buff /* i : number of output channels */ ); /*! r: flag to indicate if split rendering is enabled */ Word16 is_split_rendering_enabled( const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* i : Render config data structure */ ); ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ UWord16 *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ Loading lib_dec/lib_dec_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -1390,7 +1390,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( move16(); } IF( EQ_16( IVAS_DEC_is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ), 0 ) ) IF( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) == 0 ) { return IVAS_ERR_WRONG_PARAMS; } Loading Loading @@ -2893,7 +2893,7 @@ ivas_error IVAS_DEC_GetDelay( } move32(); #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], EQ_16( (Word16) hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], (Word16) EQ_16( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); move16(); #else nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], hDecoderConfig->output_config ) ); Loading lib_isar/isar_MSPred.c +19 −8 Original line number Diff line number Diff line Loading @@ -39,16 +39,26 @@ #include "basop_util.h" #include "enh64.h" #include <assert.h> /*-------------------------------------------------------------------* * Function _round() * Function cplxmult() * * *-------------------------------------------------------------------*/ static int32_t _round( float val ) void cplxmult_fx( Word32 *pr1, Word32 *pi1, const Word32 r2, const Word32 i2 ) { return ( val > 0.0f ? (int32_t) ( val + 0.5f ) : (int32_t) ( val - 0.5f ) ); Word32 r1 = *pr1, i1 = *pi1; *pr1 = L_sub( Mpy_32_32( r1, r2 ), Mpy_32_32( i1, i2 ) ); *pi1 = L_add( Mpy_32_32( r1, i2 ), Mpy_32_32( i1, r2 ) ); return; } Loading @@ -59,8 +69,8 @@ static int32_t _round( *-------------------------------------------------------------------*/ Word32 quantPhase_fx( Word32 phase, Word16 exp ) // i:31? const Word32 phase, const Word16 exp ) // i:31? { Word32 phaseQ; Loading Loading @@ -114,7 +124,7 @@ Word32 requantPhase( Word32 quantPred_fx( const Word32 pred, Word16 exp ) // i:Q31 const Word16 exp ) // i:Q31 { // int32_t predQ = _round(pred * PRED_QUANT_FACTOR); Word32 predQ = W_round32_s( W_shl( W_mult_32_32( pred, (Word32) PRED_QUANT_FACTOR ), exp ) ); Loading @@ -131,7 +141,8 @@ Word32 quantPred_fx( * *-------------------------------------------------------------------*/ Word32 dequantPred_fx( Word32 predQ ) Word32 dequantPred_fx( const Word32 predQ ) { if ( predQ == 12 ) { Loading lib_isar/isar_lcld_prot.h +7 −7 Original line number Diff line number Diff line Loading @@ -99,15 +99,15 @@ Word32 DecodeLCLDFrame( *----------------------------------------------------------------------------------*/ Word32 quantPhase_fx( Word32 phase, Word16 exp const Word32 phase, const Word16 exp ); void cplxmult_fx( Word32 *pr1, Word32 *pi1, Word32 r2, Word32 i2 const Word32 r2, const Word32 i2 ); Word32 requantPhase( Loading @@ -116,11 +116,11 @@ Word32 requantPhase( Word32 quantPred_fx( const Word32 pred, Word16 exp const Word16 exp ); Word32 dequantPred_fx( Word32 predQ const Word32 predQ ); Word32 PrepEncode( Loading lib_isar/isar_prot.h +17 −45 Original line number Diff line number Diff line Loading @@ -55,16 +55,16 @@ void ISAR_SPLIT_REND_BITStream_write_int32( ivas_error isar_splitBinLCLDEncOpen( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE *hSplitBinLCLDEnc, const int32_t iSampleRate, const int16_t iChannels, const int32_t iDataRate, const int16_t iNumBlocks, const int16_t iNumIterations const Word32 iSampleRate, const Word16 iChannels, const Word32 iDataRate, const Word16 iNumBlocks, const Word16 iNumIterations ); ivas_error isar_splitBinRendPLCOpen( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC, int16_t iNumSubSets ); const Word16 iNumSubSets ); void isar_splitBinRendPLCClose( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC Loading @@ -86,9 +86,9 @@ void isar_splitBinRendPLCsaveState( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, Word32 Cldfb_RealBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_ImagBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const int16_t num_chs, const int16_t iNumBlocks, const int16_t iNumIterations const Word16 num_chs, const Word16 iNumBlocks, const Word16 iNumIterations ); void isar_splitBinRendPLC_xf_fx( Loading Loading @@ -119,11 +119,11 @@ void isar_log_cldfb2wav_data( float Cldfb_In_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], HANDLE_CLDFB_FILTER_BANK *cldfbSyn, const int16_t num_chs, const int16_t num_freq_bands, const int32_t output_Fs, const int16_t start_slot_idx, const int16_t md_band_idx, const Word16 num_chs, const Word16 num_freq_bands, const Word32 output_Fs, const Word16 start_slot_idx, const Word16 md_band_idx, const char *filename ); #endif Loading Loading @@ -186,7 +186,7 @@ void isar_split_rend_init_huff_cfg( ivas_error isar_splitBinPostRendOpen( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE *hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, const int32_t output_Fs const Word32 output_Fs ); void isar_splitBinPostRendClose( Loading Loading @@ -228,21 +228,6 @@ void isar_split_rend_get_quant_params_fx( Word16 *num_quant_strats ); void isar_split_rend_get_quant_params( const int16_t num_md_bands, int16_t pred_real_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_imag_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_quant_pnts_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], float pred_quantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], float pred_1byquantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t d_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t *num_quant_strats, int16_t *num_complex_bands ); void isar_splitBinPostRendMdDec_fx( ISAR_SPLIT_REND_BITS_HANDLE pBits, ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, Loading @@ -260,15 +245,6 @@ void Quat2EulerDegree( float *roll /* o : roll */ ); void ivas_mat_mult_2by2_complex( float in_re1[2][2], float in_im1[2][2], float in_re2[2][2], float in_im2[2][2], float out_re2[2][2], float out_im2[2][2] ); void isar_mat_mult_2by2_complex_fx( Word32 in_re1_fx[2][2], Word16 exp_re1, Loading Loading @@ -340,7 +316,7 @@ ivas_error isar_splitBinPreRendOpen( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE *hBinHrSplitPreRend, #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, const int32_t output_Fs const Word32 output_Fs #else MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData #endif Loading Loading @@ -369,7 +345,7 @@ Word32 isar_get_lcld_bitrate( ivas_error splitRendLc3plusEncodeAndWrite( SPLIT_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE pBits, const int32_t available_bits, const Word32 available_bits, Word32 *in[], Word16 Q_sig ); Loading Loading @@ -399,10 +375,6 @@ void ISAR_SPLIT_REND_BITStream_init( UWord8 *pbuf ); void isar_split_rend_huffman_dec_init_min_max_len( isar_split_rend_huffman_cfg_t *p_huff_cfg ); Word16 wrap_a( Word16 val, const Word16 min_val, Loading Loading
lib_com/ivas_prot_fx.h +6 −0 Original line number Diff line number Diff line Loading @@ -4008,6 +4008,12 @@ ivas_error ivas_output_buff_dec_fx( const Word16 nchan_out_buff /* i : number of output channels */ ); /*! r: flag to indicate if split rendering is enabled */ Word16 is_split_rendering_enabled( const DECODER_CONFIG_HANDLE hDecoderConfig, /* i : configuration structure */ const IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* i : Render config data structure */ ); ivas_error ivas_dec_setup( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ UWord16 *nSamplesRendered, /* o : number of samples flushed from the previous frame (JBM) */ Loading
lib_dec/lib_dec_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -1390,7 +1390,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( move16(); } IF( EQ_16( IVAS_DEC_is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ), 0 ) ) IF( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) == 0 ) { return IVAS_ERR_WRONG_PARAMS; } Loading Loading @@ -2893,7 +2893,7 @@ ivas_error IVAS_DEC_GetDelay( } move32(); #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], EQ_16( (Word16) hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbSynDec[0], (Word16) EQ_16( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) ); move16(); #else nSamples[1] = NS2SA_FX2( hDecoderConfig->output_Fs, get_delay_fx( DEC, hDecoderConfig->output_Fs, st_ivas->ivas_format, st_ivas->cldfbAnaDec[0], hDecoderConfig->output_config ) ); Loading
lib_isar/isar_MSPred.c +19 −8 Original line number Diff line number Diff line Loading @@ -39,16 +39,26 @@ #include "basop_util.h" #include "enh64.h" #include <assert.h> /*-------------------------------------------------------------------* * Function _round() * Function cplxmult() * * *-------------------------------------------------------------------*/ static int32_t _round( float val ) void cplxmult_fx( Word32 *pr1, Word32 *pi1, const Word32 r2, const Word32 i2 ) { return ( val > 0.0f ? (int32_t) ( val + 0.5f ) : (int32_t) ( val - 0.5f ) ); Word32 r1 = *pr1, i1 = *pi1; *pr1 = L_sub( Mpy_32_32( r1, r2 ), Mpy_32_32( i1, i2 ) ); *pi1 = L_add( Mpy_32_32( r1, i2 ), Mpy_32_32( i1, r2 ) ); return; } Loading @@ -59,8 +69,8 @@ static int32_t _round( *-------------------------------------------------------------------*/ Word32 quantPhase_fx( Word32 phase, Word16 exp ) // i:31? const Word32 phase, const Word16 exp ) // i:31? { Word32 phaseQ; Loading Loading @@ -114,7 +124,7 @@ Word32 requantPhase( Word32 quantPred_fx( const Word32 pred, Word16 exp ) // i:Q31 const Word16 exp ) // i:Q31 { // int32_t predQ = _round(pred * PRED_QUANT_FACTOR); Word32 predQ = W_round32_s( W_shl( W_mult_32_32( pred, (Word32) PRED_QUANT_FACTOR ), exp ) ); Loading @@ -131,7 +141,8 @@ Word32 quantPred_fx( * *-------------------------------------------------------------------*/ Word32 dequantPred_fx( Word32 predQ ) Word32 dequantPred_fx( const Word32 predQ ) { if ( predQ == 12 ) { Loading
lib_isar/isar_lcld_prot.h +7 −7 Original line number Diff line number Diff line Loading @@ -99,15 +99,15 @@ Word32 DecodeLCLDFrame( *----------------------------------------------------------------------------------*/ Word32 quantPhase_fx( Word32 phase, Word16 exp const Word32 phase, const Word16 exp ); void cplxmult_fx( Word32 *pr1, Word32 *pi1, Word32 r2, Word32 i2 const Word32 r2, const Word32 i2 ); Word32 requantPhase( Loading @@ -116,11 +116,11 @@ Word32 requantPhase( Word32 quantPred_fx( const Word32 pred, Word16 exp const Word16 exp ); Word32 dequantPred_fx( Word32 predQ const Word32 predQ ); Word32 PrepEncode( Loading
lib_isar/isar_prot.h +17 −45 Original line number Diff line number Diff line Loading @@ -55,16 +55,16 @@ void ISAR_SPLIT_REND_BITStream_write_int32( ivas_error isar_splitBinLCLDEncOpen( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE *hSplitBinLCLDEnc, const int32_t iSampleRate, const int16_t iChannels, const int32_t iDataRate, const int16_t iNumBlocks, const int16_t iNumIterations const Word32 iSampleRate, const Word16 iChannels, const Word32 iDataRate, const Word16 iNumBlocks, const Word16 iNumIterations ); ivas_error isar_splitBinRendPLCOpen( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC, int16_t iNumSubSets ); const Word16 iNumSubSets ); void isar_splitBinRendPLCClose( ISAR_SPLIT_REND_PLC_HANDLE *phSplitRendPLC Loading @@ -86,9 +86,9 @@ void isar_splitBinRendPLCsaveState( ISAR_SPLIT_REND_PLC_HANDLE hSplitRendPLC, Word32 Cldfb_RealBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], Word32 Cldfb_ImagBuffer_Binaural_fx[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], const int16_t num_chs, const int16_t iNumBlocks, const int16_t iNumIterations const Word16 num_chs, const Word16 iNumBlocks, const Word16 iNumIterations ); void isar_splitBinRendPLC_xf_fx( Loading Loading @@ -119,11 +119,11 @@ void isar_log_cldfb2wav_data( float Cldfb_In_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], HANDLE_CLDFB_FILTER_BANK *cldfbSyn, const int16_t num_chs, const int16_t num_freq_bands, const int32_t output_Fs, const int16_t start_slot_idx, const int16_t md_band_idx, const Word16 num_chs, const Word16 num_freq_bands, const Word32 output_Fs, const Word16 start_slot_idx, const Word16 md_band_idx, const char *filename ); #endif Loading Loading @@ -186,7 +186,7 @@ void isar_split_rend_init_huff_cfg( ivas_error isar_splitBinPostRendOpen( ISAR_BIN_HR_SPLIT_POST_REND_HANDLE *hBinHrSplitPostRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, const int32_t output_Fs const Word32 output_Fs ); void isar_splitBinPostRendClose( Loading Loading @@ -228,21 +228,6 @@ void isar_split_rend_get_quant_params_fx( Word16 *num_quant_strats ); void isar_split_rend_get_quant_params( const int16_t num_md_bands, int16_t pred_real_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_imag_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_quant_pnts_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], float pred_quantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], float pred_1byquantstep_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t d_bands_yaw[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t bands_pitch[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_real_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t pred_imag_bands_roll[ISAR_SPLIT_REND_NUM_QUANT_STRATS], int16_t *num_quant_strats, int16_t *num_complex_bands ); void isar_splitBinPostRendMdDec_fx( ISAR_SPLIT_REND_BITS_HANDLE pBits, ISAR_BIN_HR_SPLIT_POST_REND_HANDLE hBinHrSplitPostRend, Loading @@ -260,15 +245,6 @@ void Quat2EulerDegree( float *roll /* o : roll */ ); void ivas_mat_mult_2by2_complex( float in_re1[2][2], float in_im1[2][2], float in_re2[2][2], float in_im2[2][2], float out_re2[2][2], float out_im2[2][2] ); void isar_mat_mult_2by2_complex_fx( Word32 in_re1_fx[2][2], Word16 exp_re1, Loading Loading @@ -340,7 +316,7 @@ ivas_error isar_splitBinPreRendOpen( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE *hBinHrSplitPreRend, #ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, const int32_t output_Fs const Word32 output_Fs #else MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData #endif Loading Loading @@ -369,7 +345,7 @@ Word32 isar_get_lcld_bitrate( ivas_error splitRendLc3plusEncodeAndWrite( SPLIT_REND_WRAPPER *hSplitBin, ISAR_SPLIT_REND_BITS_HANDLE pBits, const int32_t available_bits, const Word32 available_bits, Word32 *in[], Word16 Q_sig ); Loading Loading @@ -399,10 +375,6 @@ void ISAR_SPLIT_REND_BITStream_init( UWord8 *pbuf ); void isar_split_rend_huffman_dec_init_min_max_len( isar_split_rend_huffman_cfg_t *p_huff_cfg ); Word16 wrap_a( Word16 val, const Word16 min_val, Loading