Loading lib_dec/ivas_cpe_dec.c 100755 → 100644 +5 −11 Original line number Diff line number Diff line Loading @@ -406,10 +406,8 @@ ivas_error ivas_cpe_dec( } else { stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0 , 0, 0, 0, 0 ); stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0, 0, 0, 0, 0 ); } /* synthesis iFFT */ Loading Loading @@ -675,9 +673,7 @@ ivas_error create_cpe_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) { /* for SBA DirAC stereo output CPE element is only used for upmix, core coder is found in SCE element used for core decoding */ break; Loading Loading @@ -711,10 +707,8 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode == IVAS_CPE_DFT || ( st_ivas->sba_dirac_stereo_flag && hCPE->cpe_id == 0 ) ) { if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, st_ivas->sba_dirac_stereo_flag , st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, st_ivas->sba_dirac_stereo_flag, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) { return error; } Loading lib_dec/ivas_dec.c +7 −11 Original line number Diff line number Diff line Loading @@ -322,10 +322,8 @@ ivas_error ivas_dec( ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi ); } ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame , st_ivas->ivas_format == MC_FORMAT ); ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, st_ivas->ivas_format == MC_FORMAT ); } else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) { Loading Loading @@ -570,10 +568,8 @@ ivas_error ivas_dec( if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */ { ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame , 1 ); ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, 1 ); } /* HP filtering */ Loading lib_dec/ivas_init_dec.c 100755 → 100644 +7 −13 Original line number Diff line number Diff line Loading @@ -939,9 +939,7 @@ ivas_error ivas_init_decoder( } /* create CPE element for DFT Stereo like upmix */ if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) { if ( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate / ( st_ivas->nSCE + st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1359,9 +1357,7 @@ ivas_error ivas_init_decoder( } /* CLDFB Interpolation weights */ if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && !st_ivas->sba_dirac_stereo_flag ) if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && !st_ivas->sba_dirac_stereo_flag ) { ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); } Loading Loading @@ -1648,9 +1644,7 @@ void ivas_destroy_dec( if ( st_ivas->hCPE[i] != NULL ) { /* set pointer to NULL as core coder already deallocated in destroy_sce_dec() */ if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) { st_ivas->hCPE[i]->hCoreCoder[0] = NULL; st_ivas->hCPE[i]->hCoreCoder[1] = NULL; Loading lib_dec/ivas_objectRenderer_internal.c +0 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ #include "wmc_auto.h" /*---------------------------------------------------------------------* * ivas_td_binaural_open() * Loading @@ -59,7 +58,6 @@ ivas_error ivas_td_binaural_open( } /*---------------------------------------------------------------------* * ivas_td_binaural_renderer() * Loading lib_dec/ivas_sba_dirac_stereo_dec.c 100755 → 100644 +13 −28 Original line number Diff line number Diff line Loading @@ -184,8 +184,7 @@ static void map_params_dirac_to_stereo( const uint8_t b_wide_panning, /* i : flag indicating wider panning */ const int16_t L_frame /* i : core signal length */ , const int16_t mcmasa ) const int16_t mcmasa ) { int16_t i, b, k; int16_t k_offset; Loading Loading @@ -525,8 +524,7 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( float output[CPE_CHANNELS][L_FRAME48k], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ , const int16_t spar_flag ) const int16_t spar_flag ) { int16_t i; int16_t dftOvlLen; Loading Loading @@ -579,8 +577,7 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft->g_L_prev = g_L; hStereoDft->g_R_prev = g_R; } else if ( max( hStereoDft->td_gain[0], hStereoDft->td_gain[1] ) > 0 ) else if ( max( hStereoDft->td_gain[0], hStereoDft->td_gain[1] ) > 0 ) { win_dft = hStereoDft->win32ms; dftOvlLen = hStereoDft->dft32ms_ovl; Loading Loading @@ -698,7 +695,6 @@ void ivas_sba_dirac_stereo_smooth_parameters( float beta = hStereoDft->smooth_fac[k][b]; hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] = beta * hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] + ( 1 - beta ) * hMdDec->mixer_mat_prev[i_hist][i][j][b]; } } } Loading Loading @@ -741,8 +737,7 @@ void ivas_sba_dirac_stereo_dec( float output[CPE_CHANNELS][L_FRAME48k], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ , const int16_t mcmasa ) const int16_t mcmasa ) { int16_t dtx_flag, fd_cng_flag; int16_t memOffset; Loading Loading @@ -775,10 +770,8 @@ void ivas_sba_dirac_stereo_dec( hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, st_ivas->hDecoderConfig->output_Fs, hStereoDft->NFFT , ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); hStereoDft->NFFT, ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); stereo_dft_dec_update( hStereoDft, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); if ( st_ivas->nchan_transport > 1 ) Loading Loading @@ -808,8 +801,7 @@ void ivas_sba_dirac_stereo_dec( DFT[0], st_ivas->ivas_format == MC_FORMAT, ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ? hSCE->hCoreCoder[0]->L_frame : output_frame, ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ); ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ); if ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) { Loading @@ -822,8 +814,7 @@ void ivas_sba_dirac_stereo_dec( ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : 0, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport ); st_ivas->nchan_transport ); /* DFT synthesis */ stereo_dft_dec_synthesize( hCPE, DFT, 0, output[0], output_frame ); Loading @@ -844,9 +835,7 @@ void ivas_sba_dirac_stereo_dec( mvr2r( tmp_buf, hSCE->prev_hb_synth, memOffset ); } if ( ( hCPE->hCoreCoder[0]->core == ACELP_CORE || hCPE->hCoreCoder[0]->last_core == ACELP_CORE ) && !fd_cng_flag && st_ivas->nchan_transport == 1 ) if ( ( hCPE->hCoreCoder[0]->core == ACELP_CORE || hCPE->hCoreCoder[0]->last_core == ACELP_CORE ) && !fd_cng_flag && st_ivas->nchan_transport == 1 ) { /* upmix ACELP BWE */ ivas_sba_dirac_stereo_compute_hb_gain( hStereoDft, hb_gain ); Loading @@ -856,11 +845,9 @@ void ivas_sba_dirac_stereo_dec( hb_synth_stereo, hSCE->save_hb_synth, hb_gain, output_frame , output_frame, ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ), hStereoDft ); hStereoDft ); } /* add HB to ACELP core */ Loading @@ -868,10 +855,8 @@ void ivas_sba_dirac_stereo_dec( v_add( output[1], hb_synth_stereo[1], output[1], output_frame ); /* apply TD Stereo Filling as is done in ICBWE */ ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft, output, output_frame , ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft, output, output_frame, ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); } return; Loading Loading
lib_dec/ivas_cpe_dec.c 100755 → 100644 +5 −11 Original line number Diff line number Diff line Loading @@ -406,10 +406,8 @@ ivas_error ivas_cpe_dec( } else { stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0 , 0, 0, 0, 0 ); stereo_dft_dec( hCPE->hStereoDft, sts[0], DFT, hCPE->input_mem[1], hCPE->hStereoCng, 0, 0, 0, 0, 0 ); } /* synthesis iFFT */ Loading Loading @@ -675,9 +673,7 @@ ivas_error create_cpe_dec( for ( n = 0; n < CPE_CHANNELS; n++ ) { if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) { /* for SBA DirAC stereo output CPE element is only used for upmix, core coder is found in SCE element used for core decoding */ break; Loading Loading @@ -711,10 +707,8 @@ ivas_error create_cpe_dec( if ( hCPE->element_mode == IVAS_CPE_DFT || ( st_ivas->sba_dirac_stereo_flag && hCPE->cpe_id == 0 ) ) { if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, st_ivas->sba_dirac_stereo_flag , st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, st_ivas->sba_dirac_stereo_flag, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) { return error; } Loading
lib_dec/ivas_dec.c +7 −11 Original line number Diff line number Diff line Loading @@ -322,10 +322,8 @@ ivas_error ivas_dec( ivas_spar_dec_gen_umx_mat( st_ivas->hSpar->hMdDec, st_ivas->nchan_transport, IVAS_MAX_NUM_BANDS, st_ivas->bfi ); } ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame , st_ivas->ivas_format == MC_FORMAT ); ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, st_ivas->ivas_format == MC_FORMAT ); } else if ( st_ivas->ivas_format == MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE && ( ivas_total_brate > IVAS_SID_5k2 || ( ivas_total_brate <= IVAS_SID_5k2 && st_ivas->nCPE > 0 && st_ivas->hCPE[0]->nchan_out == 1 ) ) ) { Loading Loading @@ -570,10 +568,8 @@ ivas_error ivas_dec( if ( st_ivas->sba_dirac_stereo_flag ) /* use the flag to trigger the DFT upmix */ { ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame , 1 ); ivas_sba_dirac_stereo_dec( st_ivas, output, output_frame, 1 ); } /* HP filtering */ Loading
lib_dec/ivas_init_dec.c 100755 → 100644 +7 −13 Original line number Diff line number Diff line Loading @@ -939,9 +939,7 @@ ivas_error ivas_init_decoder( } /* create CPE element for DFT Stereo like upmix */ if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) { if ( ( error = create_cpe_dec( st_ivas, cpe_id, ivas_total_brate / ( st_ivas->nSCE + st_ivas->nCPE ) ) ) != IVAS_ERR_OK ) { Loading Loading @@ -1359,9 +1357,7 @@ ivas_error ivas_init_decoder( } /* CLDFB Interpolation weights */ if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && !st_ivas->sba_dirac_stereo_flag ) if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && !st_ivas->sba_dirac_stereo_flag ) { ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); } Loading Loading @@ -1648,9 +1644,7 @@ void ivas_destroy_dec( if ( st_ivas->hCPE[i] != NULL ) { /* set pointer to NULL as core coder already deallocated in destroy_sce_dec() */ if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) if ( st_ivas->sba_dirac_stereo_flag && st_ivas->nchan_transport == 1 ) { st_ivas->hCPE[i]->hCoreCoder[0] = NULL; st_ivas->hCPE[i]->hCoreCoder[1] = NULL; Loading
lib_dec/ivas_objectRenderer_internal.c +0 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ #include "wmc_auto.h" /*---------------------------------------------------------------------* * ivas_td_binaural_open() * Loading @@ -59,7 +58,6 @@ ivas_error ivas_td_binaural_open( } /*---------------------------------------------------------------------* * ivas_td_binaural_renderer() * Loading
lib_dec/ivas_sba_dirac_stereo_dec.c 100755 → 100644 +13 −28 Original line number Diff line number Diff line Loading @@ -184,8 +184,7 @@ static void map_params_dirac_to_stereo( const uint8_t b_wide_panning, /* i : flag indicating wider panning */ const int16_t L_frame /* i : core signal length */ , const int16_t mcmasa ) const int16_t mcmasa ) { int16_t i, b, k; int16_t k_offset; Loading Loading @@ -525,8 +524,7 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( float output[CPE_CHANNELS][L_FRAME48k], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ , const int16_t spar_flag ) const int16_t spar_flag ) { int16_t i; int16_t dftOvlLen; Loading Loading @@ -579,8 +577,7 @@ static void ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft->g_L_prev = g_L; hStereoDft->g_R_prev = g_R; } else if ( max( hStereoDft->td_gain[0], hStereoDft->td_gain[1] ) > 0 ) else if ( max( hStereoDft->td_gain[0], hStereoDft->td_gain[1] ) > 0 ) { win_dft = hStereoDft->win32ms; dftOvlLen = hStereoDft->dft32ms_ovl; Loading Loading @@ -698,7 +695,6 @@ void ivas_sba_dirac_stereo_smooth_parameters( float beta = hStereoDft->smooth_fac[k][b]; hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] = beta * hStereoDft->mixer_mat_smooth[i][j][b + k * IVAS_MAX_NUM_BANDS] + ( 1 - beta ) * hMdDec->mixer_mat_prev[i_hist][i][j][b]; } } } Loading Loading @@ -741,8 +737,7 @@ void ivas_sba_dirac_stereo_dec( float output[CPE_CHANNELS][L_FRAME48k], /* i/o: output synthesis signal */ const int16_t output_frame /* i : output frame length per channel */ , const int16_t mcmasa ) const int16_t mcmasa ) { int16_t dtx_flag, fd_cng_flag; int16_t memOffset; Loading Loading @@ -775,10 +770,8 @@ void ivas_sba_dirac_stereo_dec( hStereoDft->nbands = ivas_sba_dirac_stereo_band_config( hStereoDft->band_limits, st_ivas->hDecoderConfig->output_Fs, hStereoDft->NFFT , ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); hStereoDft->NFFT, ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); stereo_dft_dec_update( hStereoDft, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); if ( st_ivas->nchan_transport > 1 ) Loading Loading @@ -808,8 +801,7 @@ void ivas_sba_dirac_stereo_dec( DFT[0], st_ivas->ivas_format == MC_FORMAT, ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ? hSCE->hCoreCoder[0]->L_frame : output_frame, ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ); ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ) ); if ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) { Loading @@ -822,8 +814,7 @@ void ivas_sba_dirac_stereo_dec( ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hMdDec : 0, ( st_ivas->hSpar != NULL && !mcmasa ) ? st_ivas->hSpar->hFbMixer->cross_fade_start_offset : 0, st_ivas->hDecoderConfig->output_Fs, st_ivas->nchan_transport ); st_ivas->nchan_transport ); /* DFT synthesis */ stereo_dft_dec_synthesize( hCPE, DFT, 0, output[0], output_frame ); Loading @@ -844,9 +835,7 @@ void ivas_sba_dirac_stereo_dec( mvr2r( tmp_buf, hSCE->prev_hb_synth, memOffset ); } if ( ( hCPE->hCoreCoder[0]->core == ACELP_CORE || hCPE->hCoreCoder[0]->last_core == ACELP_CORE ) && !fd_cng_flag && st_ivas->nchan_transport == 1 ) if ( ( hCPE->hCoreCoder[0]->core == ACELP_CORE || hCPE->hCoreCoder[0]->last_core == ACELP_CORE ) && !fd_cng_flag && st_ivas->nchan_transport == 1 ) { /* upmix ACELP BWE */ ivas_sba_dirac_stereo_compute_hb_gain( hStereoDft, hb_gain ); Loading @@ -856,11 +845,9 @@ void ivas_sba_dirac_stereo_dec( hb_synth_stereo, hSCE->save_hb_synth, hb_gain, output_frame , output_frame, ( st_ivas->sba_mode != SBA_MODE_SPAR || mcmasa ), hStereoDft ); hStereoDft ); } /* add HB to ACELP core */ Loading @@ -868,10 +855,8 @@ void ivas_sba_dirac_stereo_dec( v_add( output[1], hb_synth_stereo[1], output[1], output_frame ); /* apply TD Stereo Filling as is done in ICBWE */ ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft, output, output_frame , ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); ivas_sba_dirac_stereo_apply_td_stefi( hStereoDft, output, output_frame, ( st_ivas->sba_mode == SBA_MODE_SPAR && !mcmasa ) ); } return; Loading