From df3e7add2611087b9fc22e6a8481111da0056fec Mon Sep 17 00:00:00 2001 From: malenov Date: Thu, 1 Jun 2023 08:50:59 +0200 Subject: [PATCH 01/14] remove comment - the for loop updating st->prev_tilt_code_dec can be run either with NB_SUBFR or NB_SUBFR16k depending on core Fs but it would hardly have any impact on quality. --- lib_dec/updt_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/updt_dec.c b/lib_dec/updt_dec.c index 81f4027221..b4bea68b3f 100644 --- a/lib_dec/updt_dec.c +++ b/lib_dec/updt_dec.c @@ -550,7 +550,7 @@ void updt_dec_common( st->prev_use_partial_copy = st->use_partial_copy; st->prev_tilt_code_dec = 0.0f; - for ( i = 0; i < NB_SUBFR; i++ ) /* ToDo: why it supposes 12.8 kHz only and not 16kHz core? */ + for ( i = 0; i < NB_SUBFR; i++ ) { st->prev_tilt_code_dec += st->tilt_code_dec[i] * 0.25f; } -- GitLab From 78cd95adc14f2fbf05c0a60880650bdd74a95682 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 5 Jun 2023 11:11:59 +0200 Subject: [PATCH 02/14] remove superfluous todo --- lib_util/tinywavein_c.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_util/tinywavein_c.h b/lib_util/tinywavein_c.h index 2d9a218934..cddcb64501 100644 --- a/lib_util/tinywavein_c.h +++ b/lib_util/tinywavein_c.h @@ -180,7 +180,6 @@ static WAVEFILEIN *OpenWav( } /* skip some potential chunks up to fmt chunk */ - /* todo: merge "bext" reading into this loop */ while ( strncmp( "fmt ", fmt_chunk.chunkID, 4 ) != 0 ) { uint32_t chunkSize = 0; -- GitLab From 27ea113782515ad8f92389c7168d0d923bcd6f6e Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 5 Jun 2023 11:16:38 +0200 Subject: [PATCH 03/14] remove superfluous todo --- lib_util/tinywaveout_c.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_util/tinywaveout_c.h b/lib_util/tinywaveout_c.h index 393633a745..db60146a02 100644 --- a/lib_util/tinywaveout_c.h +++ b/lib_util/tinywaveout_c.h @@ -205,7 +205,6 @@ static WAVEFILEOUT *CreateBWF( wfch.blockAlignment = LittleEndian16( (int16_t) blockAlignment ); wfch.sampleRate = LittleEndian32( sampleRate ); wfch.bytesPerSecond = LittleEndian32( sampleRate * blockAlignment ); - /* ToDo: tbd: wavfmt ext hdr here */ /* write to file */ self->fmtChunkOffset = ByteCnt; ByteCnt += (uint32_t) fwrite( &wfch, 1, sizeof( wfch ), self->theFile ); -- GitLab From 3e8bc6c88e84ddb27e4a94026c621bb2c2471dae Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 5 Jun 2023 11:33:31 +0200 Subject: [PATCH 04/14] remove todo-comment --- lib_com/core_com_config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_com/core_com_config.c b/lib_com/core_com_config.c index 7f9b385c3f..a3f003f979 100644 --- a/lib_com/core_com_config.c +++ b/lib_com/core_com_config.c @@ -742,7 +742,6 @@ void init_tcx_window_cfg( hTcxCfg->tcx_mdct_window_min_length = (int16_t) ( sr_core * INV_CLDFB_BANDWIDTH ); hTcxCfg->tcx_mdct_window_min_lengthFB = (int16_t) ( input_Fs * INV_CLDFB_BANDWIDTH ); /* save complexity by copying the small windows if they have the same length */ - /* TODO: is this always the case ? */ if ( hTcxCfg->tcx_mdct_window_min_length == hTcxCfg->tcx_mdct_window_trans_length ) { mvr2r( hTcxCfg->tcx_mdct_window_trans, hTcxCfg->tcx_mdct_window_minimum, hTcxCfg->tcx_mdct_window_min_length ); -- GitLab From e5a3d532f8fb6eab89bb8df817c03a0bcfb632b4 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 5 Jun 2023 12:50:17 +0200 Subject: [PATCH 05/14] remove (rotten) code under FIX_IVAS_337 + corresponding todo --- lib_dec/ivas_tcx_core_dec.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index ab82fb4e07..61fb5df443 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -45,8 +45,6 @@ #include "stat_com.h" #include "ivas_prot.h" -/*defne FIX_IVAS_337*/ // TODO: needs more work - /*-------------------------------------------------------------* * Local prototypes *-------------------------------------------------------------*/ @@ -189,9 +187,6 @@ void stereo_tcx_core_dec( /*Concealment*/ int16_t bfi; -#ifdef FIX_IVAS_337 /*IVAS-337 consider BER */ - int16_t tcx_last_overlap_mode, tcx_current_overlap_mode; -#endif float psd[L_FRAME16k], psd_part[NPART_SHAPING]; @@ -267,28 +262,9 @@ void stereo_tcx_core_dec( if ( !bfi ) { st->second_last_core = st->last_core; -#ifdef FIX_IVAS_337 /*IVAS-337 consider BER */ - tcx_last_overlap_mode = st->hTcxCfg->tcx_last_overlap_mode; - tcx_current_overlap_mode = st->hTcxCfg->tcx_curr_overlap_mode; -#endif dec_prm_tcx( st, param, param_lpc, &total_nbbits, last_element_mode, &bitsRead ); -#ifdef FIX_IVAS_337 /*IVAS-337 consider BER */ - if ( !st->rate_switching_init && st->BER_detect ) - { - st->coder_type = st->last_coder_type; - st->last_core = st->second_last_core; - st->hTcxCfg->tcx_last_overlap_mode = tcx_last_overlap_mode; - st->hTcxCfg->tcx_curr_overlap_mode = tcx_current_overlap_mode; - st->bfi = 1; - bfi = 1; - st->flagGuidedAcelp = 0; - st->nbLostCmpt++; - st->core_brate = st->last_core_brate; - st->core = GetPLCModeDecision( st ); - } -#endif } else { -- GitLab From eae183ca62a5b344a8f66f72ef0c018ff4c8af73 Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Tue, 6 Jun 2023 09:58:02 +0200 Subject: [PATCH 06/14] cleanup todo for updating old_fpitchFB as unnecessary --- lib_dec/dec_tcx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index 8a574c95f6..78ce952276 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1742,7 +1742,7 @@ void decoder_tcx_imdct( if ( st->element_mode > EVS_MONO ) { - st->old_fpitchFB = st->old_fpitch * (float) L_frameTCX_glob / (float) L_frame_glob; /* TODO - or maybe used min(L_frame_TCX,L_FRAME48k) ... */ + st->old_fpitchFB = st->old_fpitch * (float) L_frameTCX_glob / (float) L_frame_glob; } else { -- GitLab From 2f98af4b5f3e36c5a8d3d435602ff5651aa7df26 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 6 Jun 2023 13:10:54 +0200 Subject: [PATCH 07/14] remove obsolete ToDo concerning the ducker in the DirAC CLDFB decorrelator --- lib_dec/ivas_dirac_decorr_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_dirac_decorr_dec.c b/lib_dec/ivas_dirac_decorr_dec.c index 8c19d9698b..5e156a38b2 100644 --- a/lib_dec/ivas_dirac_decorr_dec.c +++ b/lib_dec/ivas_dirac_decorr_dec.c @@ -156,7 +156,7 @@ ivas_error ivas_dirac_dec_decorr_open( freq_domain_decorr_ap_params->max_frequency = ( DIRAC_MAX_DECORR_CLDFB_BANDS * 24000 ) / CLDFB_NO_CHANNELS_MAX; } - freq_domain_decorr_ap_params->use_ducker = 1; /* ToDo: fcs: fixed for now but can be adaptive in an extended version */ + freq_domain_decorr_ap_params->use_ducker = 1; assert( ( freq_domain_decorr_ap_params->max_frequency >= 0 ) && ( freq_domain_decorr_ap_params->max_frequency <= output_Fs / 2 ) && "Error: max_frequency invalid!" ); -- GitLab From ab818f5aefe1bd476f237b060f767bb6b98c5fcf Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 6 Jun 2023 14:31:41 +0200 Subject: [PATCH 08/14] remove comment documented in issue 533 --- lib_rend/lib_rend.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 41f68b6520..0bc20fc347 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4127,7 +4127,6 @@ static void renderBufferChannelLerp( /* Otherwise use weighted average between previous and current gain */ do { - /* TODO(sgi): This is calculated for each output channel - can be optimised */ fadeIn = (float) i / ( outAudio.config.numSamplesPerChannel - 1 ); fadeOut = 1.0f - fadeIn; -- GitLab From efb48b931e589546fe77605767e26fd1ac2ebde6 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 6 Jun 2023 14:35:39 +0200 Subject: [PATCH 09/14] remove comment documented in issue 534 --- apps/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/renderer.c b/apps/renderer.c index c02785a616..0e83e59215 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -212,7 +212,7 @@ static const CmdLnParser_Option cliOptions[] = { .id = CmdLnOptionId_sampleRate, .match = "sample_rate", .matchShort = "fs", - .description = "Input sampling rate in kHz (16, 32, 48) - required only with raw PCM inputs", /* TODO(sgi): Add sampling rate to scene description files */ + .description = "Input sampling rate in kHz (16, 32, 48) - required only with raw PCM inputs", }, { .id = CmdLnOptionId_trajFile, -- GitLab From 03170f2ee6b60ca890a67752ea20cc03c60bbe24 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Jun 2023 07:40:12 +0200 Subject: [PATCH 10/14] resolve comments --- lib_dec/ivas_post_proc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_dec/ivas_post_proc.c b/lib_dec/ivas_post_proc.c index da00426116..0321a646f9 100644 --- a/lib_dec/ivas_post_proc.c +++ b/lib_dec/ivas_post_proc.c @@ -146,7 +146,6 @@ void ivas_post_proc( { /*Use channel 0 side info.*/ tcx_ltp_post( sts[0], hTcxLtpDec, TCX_20_CORE, output_frame, NS2SA( output_Fs, STEREO_DFT32MS_OVL_NS ), output[k], hCPE->output_mem[k] ); - /* IVAS_fmToDo: harmonize buffers hCPE->output_mem and hTcxDec->FBTCXdelayBuf ?? */ } } #endif -- GitLab From e76ad68571d16b21eeee893744a6eb0cc14bb68d Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Jun 2023 07:44:12 +0200 Subject: [PATCH 11/14] add "ToDo" to existing comments --- lib_enc/ivas_spar_encoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 2731fdaf40..8f87e3fb93 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -407,12 +407,12 @@ static ivas_error ivas_spar_enc_process( float wyzx_del_buf[FOA_CHANNELS][IVAS_FB_1MS_48K_SAMP]; int16_t nchan_fb_in; - /*Commented for now*/ + /* ToDo: Commented for now*/ /*int16_t start_nb_bits; int16_t total_md_bits, total_sba_bits;*/ push_wmops( "ivas_spar_enc_process" ); - /*Commented for now*/ + /* ToDo: Commented for now*/ // start_nb_bits = hMetaData->nb_bits_tot; /*-----------------------------------------------------------------------------------------* @@ -902,7 +902,7 @@ static ivas_error ivas_spar_enc_process( pop_wmops(); - /*Commented for now*/ + /* ToDo: Commented for now */ /*total_md_bits = hMetaData->nb_bits_tot - start_nb_bits; total_sba_bits = ivas_sba_get_max_md_bits( st_ivas ); assert( total_md_bits <= total_sba_bits );*/ -- GitLab From 32d77eb9cc0eca2df93ee5d7f37e57bb666d3e50 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Jun 2023 09:34:03 +0200 Subject: [PATCH 12/14] resolve todo wrt. IVAS_ERR_INVALID_CICP_INDEX name --- lib_com/ivas_error.h | 4 ++-- lib_enc/lib_enc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 0fae8ff215..8e7f252dd6 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -56,7 +56,7 @@ typedef enum IVAS_ERR_INVALID_SAMPLING_RATE, IVAS_ERR_NOT_CONFIGURED, IVAS_ERR_INVALID_STEREO_MODE, - IVAS_ERR_INVALID_CICP_INDEX, /* ToDo: rename, CICP not used in IVAS anymore */ + IVAS_ERR_INVALID_MC_LAYOUT, IVAS_ERR_INVALID_BITRATE, IVAS_ERR_INVALID_MASA_CONFIG, IVAS_ERR_TOO_MANY_INPUTS, @@ -190,7 +190,7 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Handle has not been configured"; case IVAS_ERR_INVALID_STEREO_MODE: return "Invalid stereo mode"; - case IVAS_ERR_INVALID_CICP_INDEX: + case IVAS_ERR_INVALID_MC_LAYOUT: return "Invalid speaker layout"; case IVAS_ERR_INVALID_BITRATE: return "Invalid bitrate"; diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 28a733d3a3..472497bea5 100755 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -665,7 +665,7 @@ ivas_error IVAS_ENC_ConfigureForMultichannel( hEncoderConfig->mc_input_setup = MC_LS_SETUP_7_1_4; break; default: - return IVAS_ERR_INVALID_CICP_INDEX; + return IVAS_ERR_INVALID_MC_LAYOUT; break; } -- GitLab From c5f326fe196dc6a6cbb64fec41cab0132ee6a9e8 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Jun 2023 10:16:25 +0200 Subject: [PATCH 13/14] clang-format --- lib_dec/ivas_dirac_decorr_dec.c | 2 +- lib_dec/ivas_tcx_core_dec.c | 1 - lib_dec/updt_dec.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib_dec/ivas_dirac_decorr_dec.c b/lib_dec/ivas_dirac_decorr_dec.c index 5e156a38b2..3687ed53b1 100644 --- a/lib_dec/ivas_dirac_decorr_dec.c +++ b/lib_dec/ivas_dirac_decorr_dec.c @@ -156,7 +156,7 @@ ivas_error ivas_dirac_dec_decorr_open( freq_domain_decorr_ap_params->max_frequency = ( DIRAC_MAX_DECORR_CLDFB_BANDS * 24000 ) / CLDFB_NO_CHANNELS_MAX; } - freq_domain_decorr_ap_params->use_ducker = 1; + freq_domain_decorr_ap_params->use_ducker = 1; assert( ( freq_domain_decorr_ap_params->max_frequency >= 0 ) && ( freq_domain_decorr_ap_params->max_frequency <= output_Fs / 2 ) && "Error: max_frequency invalid!" ); diff --git a/lib_dec/ivas_tcx_core_dec.c b/lib_dec/ivas_tcx_core_dec.c index 61fb5df443..c250b0b7b5 100644 --- a/lib_dec/ivas_tcx_core_dec.c +++ b/lib_dec/ivas_tcx_core_dec.c @@ -264,7 +264,6 @@ void stereo_tcx_core_dec( st->second_last_core = st->last_core; dec_prm_tcx( st, param, param_lpc, &total_nbbits, last_element_mode, &bitsRead ); - } else { diff --git a/lib_dec/updt_dec.c b/lib_dec/updt_dec.c index b4bea68b3f..7ff9c9ee05 100644 --- a/lib_dec/updt_dec.c +++ b/lib_dec/updt_dec.c @@ -550,7 +550,7 @@ void updt_dec_common( st->prev_use_partial_copy = st->use_partial_copy; st->prev_tilt_code_dec = 0.0f; - for ( i = 0; i < NB_SUBFR; i++ ) + for ( i = 0; i < NB_SUBFR; i++ ) { st->prev_tilt_code_dec += st->tilt_code_dec[i] * 0.25f; } -- GitLab From 105019c1bcf65f65f41fbf01f98dac33ed8f6586 Mon Sep 17 00:00:00 2001 From: knj Date: Wed, 7 Jun 2023 10:35:30 +0200 Subject: [PATCH 14/14] remove obsolete TODO comments in front vad code --- lib_enc/ivas_front_vad.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib_enc/ivas_front_vad.c b/lib_enc/ivas_front_vad.c index 9593f6682f..9f9acdbaf2 100644 --- a/lib_enc/ivas_front_vad.c +++ b/lib_enc/ivas_front_vad.c @@ -176,7 +176,6 @@ ivas_error front_vad( /* Preemphasis */ preemph( hFrontVad->buffer_12k8 + L_FFT / 2, PREEMPH_FAC, L_FRAME, &hFrontVad->mem_preemph ); - /* TODO: this may need adaption if ever using this for MDCT-Stereo (see conditional inside of analy_sp) */ analy_sp( IVAS_CPE_TD, hCPE, sts[0]->input_Fs, hFrontVad->buffer_12k8 + L_FFT / 2 - 3 * ( L_SUBFR / 2 ), Bin_E, Bin_E_old, fr_bands[n], lf_E[n], &Etot_LR[n], sts[0]->min_band, sts[0]->max_band, band_energies, PS, fft_buffLR ); /* add up energies for later calculating average of channel energies */ @@ -210,8 +209,6 @@ ivas_error front_vad( vad_flag_dtx[0] = vad_flag_dtx[0] || vad_flag_dtx[1]; } - /* TODO: if using this for MDCT-Stereo, this may need to be done on both channels? or maybe some more logic is needed */ - /* TODO: do we really need this for VAD only ? */ if ( sts[0]->hFdCngEnc != NULL ) { resetFdCngEnc( sts[0] ); -- GitLab