Loading apps/decoder.c +7 −3 Original line number Diff line number Diff line Loading @@ -1713,9 +1713,13 @@ static ivas_error initOnFirstGoodFrame( if ( arg.rtpOutSR && srRtp != NULL ) { FILE *fParamsSR = NULL; char srParamsFile[FILENAME_MAX], *ext = ".sr.txt"; strncpy( srParamsFile, arg.outputWavFilename, FILENAME_MAX - sizeof( ext ) ); strncat( srParamsFile, ext, sizeof( ext ) + 1 ); char srParamsFile[FILENAME_MAX]; const char *ext = ".sr.txt"; strncpy( srParamsFile, arg.outputWavFilename, FILENAME_MAX - strlen( ext ) - 1 ); srParamsFile[FILENAME_MAX - strlen( ext ) - 1] = '\0'; strncat( srParamsFile, ext, strlen( ext ) ); srParamsFile[FILENAME_MAX - 1] = '\0'; /* Write the Split Rendering Params passed from SDP to srParamsFile */ fParamsSR = fopen( srParamsFile, "w" ); Loading lib_com/cldfb_evs_fx.c +0 −2 Original line number Diff line number Diff line Loading @@ -996,10 +996,8 @@ ivas_error openCldfb( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for CLDFB" ); } #ifdef FIX_2319_CLDFB_INIT_FLAGS hs->flags = 0; move16(); #endif hs->type = type; move16(); Loading lib_com/gs_noisefill_fx.c +0 −24 Original line number Diff line number Diff line Loading @@ -751,19 +751,11 @@ void highband_exc_dct_in_fx( test(); IF( bfi || LT_32( core_brate, 6000 ) || ( LT_32( core_brate, 8600 ) && EQ_16( coder_type, UNVOICED ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107, MBANDS_GN ); /*0.4 in Q15 */ #else set16_fx( noisepb, 13107, last_bin ); /*0.4 in Q15 */ #endif } ELSE IF( EQ_16( GSC_IVAS_mode, 3 ) || ( GSC_IVAS_mode > 0 && EQ_16( GSC_noisy_speech, 1 ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107 /*0.4f*/, MBANDS_GN16k ); #else set16_fx( noisepb, 13107 /*0.4f*/, last_bin ); #endif } ELSE { Loading @@ -780,11 +772,7 @@ void highband_exc_dct_in_fx( test(); IF( GSC_IVAS_mode == 0 && GSC_noisy_speech && !bfi && LE_16( element_mode, IVAS_SCE ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 3277, MBANDS_GN ); #else set16_fx( noisepb, 3277, last_bin ); #endif } test(); IF( LT_32( core_brate, 6000 ) && LE_16( coder_type, UNVOICED ) ) Loading Loading @@ -1153,19 +1141,11 @@ void highband_exc_dct_in_ivas_fx( test(); IF( bfi || LT_32( core_brate, 6000 ) || ( LT_32( core_brate, 8600 ) && EQ_16( coder_type, UNVOICED ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107, MBANDS_GN ); /*0.4 in Q15 */ #else set16_fx( noisepb, 13107, last_bin ); /*0.4 in Q15 */ #endif } ELSE IF( EQ_16( GSC_IVAS_mode, 3 ) || ( GSC_IVAS_mode > 0 && EQ_16( GSC_noisy_speech, 1 ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107 /*0.4f*/, MBANDS_GN16k ); #else set16_fx( noisepb, 13107 /*0.4f*/, last_bin ); #endif } ELSE { Loading @@ -1182,11 +1162,7 @@ void highband_exc_dct_in_ivas_fx( IF( GSC_IVAS_mode == 0 && GSC_noisy_speech && !bfi && LE_16( element_mode, IVAS_SCE ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 3277, MBANDS_GN ); #else set16_fx( noisepb, 3277, last_bin ); #endif } test(); Loading lib_com/ivas_prot_fx.h +34 −11 Original line number Diff line number Diff line Loading @@ -1359,20 +1359,10 @@ void stereo_tcx_init_dec_fx( void stereo_icBWE_enc_fx( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ #ifdef REMOVE_SCALING_SHB_SPEECH const Word16 shb_speech_ref_fx16[], /* i : SHB speech ref channel Q0*/ Word16 shb_speech_nonref_fx_16[], /* i/o: SHB speech non-ref channel shb_speech_nonref_e*/ #else const Word32 shb_speech_ref_fx[], /* i : SHB speech ref channel */ const Word16 shb_speech_ref_e, /* i : SHB speech ref channel */ Word32 shb_speech_nonref_fx[], /* i/o: SHB speech non-ref channel */ #endif Word16 shb_speech_nonref_e, /* i/o: SHB speech non-ref channel */ #ifdef REMOVE_SCALING_SHB_SPEECH const Word16 *voice_factors_fx /* i : voicing factors Q15 */ #else const Word32 *voice_factors_fx /* i : voicing factors Q31 */ #endif ); void initMdctStereoDecData_fx( Loading Loading @@ -1597,10 +1587,15 @@ void ivas_hq_core_dec_fx( const Word16 output_frame, /* i : output frame length */ const Word16 hq_core_type, /* i : HQ core type */ const Word16 core_switching_flag, /* i : ACELP->HQ switching frame flag */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *output_32_fx /* o : synthesis @internal_Fs, Q11 */ #else Word16 output[], Word16 *Q_output #endif ); #ifndef HARMONIZE_TBE void ivas_HQ_FEC_Mem_update_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Word32 *t_audio_q_fx, /*Q12*/ Loading @@ -1616,6 +1611,7 @@ void ivas_HQ_FEC_Mem_update_fx( Word16 hq_core_type, /* i : normal or low-rate MDCT(HQ) core */ Word16 output_frame ); #endif /* o : Consumed bits Q0 */ Word16 ivas_hq_classifier_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Loading Loading @@ -1865,6 +1861,7 @@ void stereoFdCngCoherence_fx( Word16 fft_exp ); #ifndef HARMONIZE_TBE void ivas_wb_tbe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ const Word16 coder_type, /* i : coding type */ Loading Loading @@ -1893,11 +1890,15 @@ void GenShapedWBExcitation_ivas_fx( const Word16 uv_flag, /* i : unvoiced flag */ const Word16 igf_flag ); #endif /* o : Q_syn_hb*/ Word16 ivas_wb_bwe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 output_fx32[], /* o : synthesis @internal Fs Q11*/ #else const Word16 output[], /* i : suntehsis @ internal Fs Q_input */ #endif Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis Q0/Qpost */ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */ Loading Loading @@ -2060,24 +2061,46 @@ UWord32 ivas_syn_output_fx( Word16 *synth_out /* o : integer 16 bits synthesis signal */ ); #ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER void ivas_buffer_interleaved_to_deinterleaved_fx( Word32 *audio_in, /* i : interleaved audio buffer */ Word32 *audio_out[], /* o : pointers to each channel of deinterleaved audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length /* i : frame length (one channel) */ ); #else void ivas_buffer_interleaved_to_deinterleaved_fx( Word32 *audio, /* i/o: audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length, /* i : frame length (one channel) */ const Word16 n_samp_full /* i : full frame length (one channel) */ ); #endif #ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER void ivas_buffer_deinterleaved_to_interleaved_fx( Word32 *audio_in[], /* i : pointers to each channel of deinterleaved audio buffer */ Word32 *audio_out, /* o : interleaved audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length /* i : frame length (one channel) */ ); #else void ivas_buffer_deinterleaved_to_interleaved_fx( Word32 *audio[], /* i : deinterleaved audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length, /* i : frame length (one channel) */ Word32 *audio_out /* o : interleaved audio buffer */ ); #endif void stereo_tcx_core_dec_fx( Decoder_State *st, /* i/o: decoder state structure */ const FRAME_MODE frameMode, /* i : Decoder frame mode */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *signal_out_32_fx, /* o : synthesis @internal_Fs, Q11 */ #else Word16 *signal_out, /* o : synthesis @internal_Fs, Q0 */ #endif Word16 *signal_outFB, /* o : synthesis @output_Fs, Q0 */ Word16 pitch_buf[], /* o : floating pitch for each subframe, Q6 */ const Word16 sba_dirac_stereo_flag, /* i : signal stereo output for SBA DirAC */ Loading lib_com/ivas_rotation_com_fx.c +16 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ void Copy_Quat_fx( /*------------------------------------------------------------------------- * Scale_Quat_fx() * modify_Quat_q_fx() * * Quaternion q factor modification *------------------------------------------------------------------------*/ Loading @@ -124,10 +124,18 @@ void modify_Quat_q_fx( Word16 q_new /* i : quaternion describing the rotation */ ) { #ifdef FIX_BASOP_2361_OTR Word16 shift = sub( q_new, in_quat->q_fact ); out_quat->w_fx = L_shl_sat( in_quat->w_fx, shift ); // q_new out_quat->x_fx = L_shl_sat( in_quat->x_fx, shift ); // q_new out_quat->y_fx = L_shl_sat( in_quat->y_fx, shift ); // q_new out_quat->z_fx = L_shl_sat( in_quat->z_fx, shift ); // q_new #else out_quat->w_fx = L_shl_sat( in_quat->w_fx, sub( q_new, in_quat->q_fact ) ); // q_new out_quat->x_fx = L_shl_sat( in_quat->x_fx, sub( q_new, in_quat->q_fact ) ); // q_new out_quat->y_fx = L_shl_sat( in_quat->y_fx, sub( q_new, in_quat->q_fact ) ); // q_new out_quat->z_fx = L_shl_sat( in_quat->z_fx, sub( q_new, in_quat->q_fact ) ); // q_new #endif out_quat->q_fact = q_new; return; } Loading @@ -147,12 +155,19 @@ void modify_Rmat_q_fx( ) { Word16 j, k; #ifdef FIX_BASOP_2361_OTR Word16 shift = sub( q_new, q_cur ); #endif FOR( j = 0; j < 3; j++ ) { FOR( k = 0; k < 3; k++ ) { #ifdef FIX_BASOP_2361_OTR Rmat_out[j][k] = L_shl( Rmat_in[j][k], shift ); #else Rmat_out[j][k] = L_shl( Rmat_in[j][k], sub( q_new, q_cur ) ); #endif move32(); } } Loading Loading
apps/decoder.c +7 −3 Original line number Diff line number Diff line Loading @@ -1713,9 +1713,13 @@ static ivas_error initOnFirstGoodFrame( if ( arg.rtpOutSR && srRtp != NULL ) { FILE *fParamsSR = NULL; char srParamsFile[FILENAME_MAX], *ext = ".sr.txt"; strncpy( srParamsFile, arg.outputWavFilename, FILENAME_MAX - sizeof( ext ) ); strncat( srParamsFile, ext, sizeof( ext ) + 1 ); char srParamsFile[FILENAME_MAX]; const char *ext = ".sr.txt"; strncpy( srParamsFile, arg.outputWavFilename, FILENAME_MAX - strlen( ext ) - 1 ); srParamsFile[FILENAME_MAX - strlen( ext ) - 1] = '\0'; strncat( srParamsFile, ext, strlen( ext ) ); srParamsFile[FILENAME_MAX - 1] = '\0'; /* Write the Split Rendering Params passed from SDP to srParamsFile */ fParamsSR = fopen( srParamsFile, "w" ); Loading
lib_com/cldfb_evs_fx.c +0 −2 Original line number Diff line number Diff line Loading @@ -996,10 +996,8 @@ ivas_error openCldfb( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for CLDFB" ); } #ifdef FIX_2319_CLDFB_INIT_FLAGS hs->flags = 0; move16(); #endif hs->type = type; move16(); Loading
lib_com/gs_noisefill_fx.c +0 −24 Original line number Diff line number Diff line Loading @@ -751,19 +751,11 @@ void highband_exc_dct_in_fx( test(); IF( bfi || LT_32( core_brate, 6000 ) || ( LT_32( core_brate, 8600 ) && EQ_16( coder_type, UNVOICED ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107, MBANDS_GN ); /*0.4 in Q15 */ #else set16_fx( noisepb, 13107, last_bin ); /*0.4 in Q15 */ #endif } ELSE IF( EQ_16( GSC_IVAS_mode, 3 ) || ( GSC_IVAS_mode > 0 && EQ_16( GSC_noisy_speech, 1 ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107 /*0.4f*/, MBANDS_GN16k ); #else set16_fx( noisepb, 13107 /*0.4f*/, last_bin ); #endif } ELSE { Loading @@ -780,11 +772,7 @@ void highband_exc_dct_in_fx( test(); IF( GSC_IVAS_mode == 0 && GSC_noisy_speech && !bfi && LE_16( element_mode, IVAS_SCE ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 3277, MBANDS_GN ); #else set16_fx( noisepb, 3277, last_bin ); #endif } test(); IF( LT_32( core_brate, 6000 ) && LE_16( coder_type, UNVOICED ) ) Loading Loading @@ -1153,19 +1141,11 @@ void highband_exc_dct_in_ivas_fx( test(); IF( bfi || LT_32( core_brate, 6000 ) || ( LT_32( core_brate, 8600 ) && EQ_16( coder_type, UNVOICED ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107, MBANDS_GN ); /*0.4 in Q15 */ #else set16_fx( noisepb, 13107, last_bin ); /*0.4 in Q15 */ #endif } ELSE IF( EQ_16( GSC_IVAS_mode, 3 ) || ( GSC_IVAS_mode > 0 && EQ_16( GSC_noisy_speech, 1 ) ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 13107 /*0.4f*/, MBANDS_GN16k ); #else set16_fx( noisepb, 13107 /*0.4f*/, last_bin ); #endif } ELSE { Loading @@ -1182,11 +1162,7 @@ void highband_exc_dct_in_ivas_fx( IF( GSC_IVAS_mode == 0 && GSC_noisy_speech && !bfi && LE_16( element_mode, IVAS_SCE ) ) { #ifndef FIX_1478_UNINIT_ON_BFI set16_fx( noisepb, 3277, MBANDS_GN ); #else set16_fx( noisepb, 3277, last_bin ); #endif } test(); Loading
lib_com/ivas_prot_fx.h +34 −11 Original line number Diff line number Diff line Loading @@ -1359,20 +1359,10 @@ void stereo_tcx_init_dec_fx( void stereo_icBWE_enc_fx( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ #ifdef REMOVE_SCALING_SHB_SPEECH const Word16 shb_speech_ref_fx16[], /* i : SHB speech ref channel Q0*/ Word16 shb_speech_nonref_fx_16[], /* i/o: SHB speech non-ref channel shb_speech_nonref_e*/ #else const Word32 shb_speech_ref_fx[], /* i : SHB speech ref channel */ const Word16 shb_speech_ref_e, /* i : SHB speech ref channel */ Word32 shb_speech_nonref_fx[], /* i/o: SHB speech non-ref channel */ #endif Word16 shb_speech_nonref_e, /* i/o: SHB speech non-ref channel */ #ifdef REMOVE_SCALING_SHB_SPEECH const Word16 *voice_factors_fx /* i : voicing factors Q15 */ #else const Word32 *voice_factors_fx /* i : voicing factors Q31 */ #endif ); void initMdctStereoDecData_fx( Loading Loading @@ -1597,10 +1587,15 @@ void ivas_hq_core_dec_fx( const Word16 output_frame, /* i : output frame length */ const Word16 hq_core_type, /* i : HQ core type */ const Word16 core_switching_flag, /* i : ACELP->HQ switching frame flag */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *output_32_fx /* o : synthesis @internal_Fs, Q11 */ #else Word16 output[], Word16 *Q_output #endif ); #ifndef HARMONIZE_TBE void ivas_HQ_FEC_Mem_update_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Word32 *t_audio_q_fx, /*Q12*/ Loading @@ -1616,6 +1611,7 @@ void ivas_HQ_FEC_Mem_update_fx( Word16 hq_core_type, /* i : normal or low-rate MDCT(HQ) core */ Word16 output_frame ); #endif /* o : Consumed bits Q0 */ Word16 ivas_hq_classifier_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Loading Loading @@ -1865,6 +1861,7 @@ void stereoFdCngCoherence_fx( Word16 fft_exp ); #ifndef HARMONIZE_TBE void ivas_wb_tbe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ const Word16 coder_type, /* i : coding type */ Loading Loading @@ -1893,11 +1890,15 @@ void GenShapedWBExcitation_ivas_fx( const Word16 uv_flag, /* i : unvoiced flag */ const Word16 igf_flag ); #endif /* o : Q_syn_hb*/ Word16 ivas_wb_bwe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 output_fx32[], /* o : synthesis @internal Fs Q11*/ #else const Word16 output[], /* i : suntehsis @ internal Fs Q_input */ #endif Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis Q0/Qpost */ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */ Loading Loading @@ -2060,24 +2061,46 @@ UWord32 ivas_syn_output_fx( Word16 *synth_out /* o : integer 16 bits synthesis signal */ ); #ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER void ivas_buffer_interleaved_to_deinterleaved_fx( Word32 *audio_in, /* i : interleaved audio buffer */ Word32 *audio_out[], /* o : pointers to each channel of deinterleaved audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length /* i : frame length (one channel) */ ); #else void ivas_buffer_interleaved_to_deinterleaved_fx( Word32 *audio, /* i/o: audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length, /* i : frame length (one channel) */ const Word16 n_samp_full /* i : full frame length (one channel) */ ); #endif #ifdef FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER void ivas_buffer_deinterleaved_to_interleaved_fx( Word32 *audio_in[], /* i : pointers to each channel of deinterleaved audio buffer */ Word32 *audio_out, /* o : interleaved audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length /* i : frame length (one channel) */ ); #else void ivas_buffer_deinterleaved_to_interleaved_fx( Word32 *audio[], /* i : deinterleaved audio buffer */ const Word16 n_channels, /* i : number of channels */ const Word16 frame_length, /* i : frame length (one channel) */ Word32 *audio_out /* o : interleaved audio buffer */ ); #endif void stereo_tcx_core_dec_fx( Decoder_State *st, /* i/o: decoder state structure */ const FRAME_MODE frameMode, /* i : Decoder frame mode */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *signal_out_32_fx, /* o : synthesis @internal_Fs, Q11 */ #else Word16 *signal_out, /* o : synthesis @internal_Fs, Q0 */ #endif Word16 *signal_outFB, /* o : synthesis @output_Fs, Q0 */ Word16 pitch_buf[], /* o : floating pitch for each subframe, Q6 */ const Word16 sba_dirac_stereo_flag, /* i : signal stereo output for SBA DirAC */ Loading
lib_com/ivas_rotation_com_fx.c +16 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ void Copy_Quat_fx( /*------------------------------------------------------------------------- * Scale_Quat_fx() * modify_Quat_q_fx() * * Quaternion q factor modification *------------------------------------------------------------------------*/ Loading @@ -124,10 +124,18 @@ void modify_Quat_q_fx( Word16 q_new /* i : quaternion describing the rotation */ ) { #ifdef FIX_BASOP_2361_OTR Word16 shift = sub( q_new, in_quat->q_fact ); out_quat->w_fx = L_shl_sat( in_quat->w_fx, shift ); // q_new out_quat->x_fx = L_shl_sat( in_quat->x_fx, shift ); // q_new out_quat->y_fx = L_shl_sat( in_quat->y_fx, shift ); // q_new out_quat->z_fx = L_shl_sat( in_quat->z_fx, shift ); // q_new #else out_quat->w_fx = L_shl_sat( in_quat->w_fx, sub( q_new, in_quat->q_fact ) ); // q_new out_quat->x_fx = L_shl_sat( in_quat->x_fx, sub( q_new, in_quat->q_fact ) ); // q_new out_quat->y_fx = L_shl_sat( in_quat->y_fx, sub( q_new, in_quat->q_fact ) ); // q_new out_quat->z_fx = L_shl_sat( in_quat->z_fx, sub( q_new, in_quat->q_fact ) ); // q_new #endif out_quat->q_fact = q_new; return; } Loading @@ -147,12 +155,19 @@ void modify_Rmat_q_fx( ) { Word16 j, k; #ifdef FIX_BASOP_2361_OTR Word16 shift = sub( q_new, q_cur ); #endif FOR( j = 0; j < 3; j++ ) { FOR( k = 0; k < 3; k++ ) { #ifdef FIX_BASOP_2361_OTR Rmat_out[j][k] = L_shl( Rmat_in[j][k], shift ); #else Rmat_out[j][k] = L_shl( Rmat_in[j][k], sub( q_new, q_cur ) ); #endif move32(); } } Loading