diff --git a/apps/encoder.c b/apps/encoder.c index df7c0915d4f6b5f1306d69b25b011cdc75ece738..dc97a1acfdde0e74d68c60c5fafda488e4352864 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -1489,7 +1489,7 @@ static bool parseCmdlIVAS_enc( arg->inputFormatConfig.stereoToMonoDownmix = true; i++; } - else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // VE: should be renamed to "-pca" + else if ( strcmp( argv_to_upper, "-BYPASS" ) == 0 ) // TODO: should be renamed to "-pca" { i++; if ( i < argc - 4 ) diff --git a/apps/renderer.c b/apps/renderer.c index 3ed5d4996e9fb6fcfc6ec21a70808f390d0d9278..c02785a616ebd600a33cd617656261f23f3da3b1 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -242,7 +242,11 @@ static const CmdLnParser_Option cliOptions[] = { .id = CmdLnOptionId_nonDiegeticPan, .match = "non_diegetic_pan", .matchShort = "ndp", +#ifdef FIX_TODO_NON_DIEGETIC_PAN_NOT_IMPLELENTED_IN_RENDERER + .description = "Panning mono non diegetic sound to stereo -90<= pan <= 90\nleft or l or 90->left, right or r or -90->right, center or c or 0 ->middle\n", +#else .description = "Panning mono non diegetic sound to stereo -90<= pan <= 90\nleft or l or 90->left, right or r or -90->right, center or c or 0 ->middle\n(todo: implementation)", +#endif }, { .id = CmdLnOptionId_orientationTracking, @@ -987,7 +991,7 @@ int main( else { error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ); - if ( ( error != IVAS_ERR_OK ) && ( error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC + if ( error != IVAS_ERR_OK && error != IVAS_ERR_INVALID_OUTPUT_FORMAT ) { fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) ); exit( -1 ); diff --git a/lib_com/bits_alloc.c b/lib_com/bits_alloc.c index 5ae9cb84d02ca54dcb42c640e33ab79da1cf4182..56e523b39225dcfd923c9ef48b9fad9514ee7b8e 100644 --- a/lib_com/bits_alloc.c +++ b/lib_com/bits_alloc.c @@ -737,7 +737,7 @@ ivas_error config_acelp1( } else /* L_frame == L_FRAME16k */ { - acelp_cfg->lsf_bits = 41; /* TBV: currently LSFQ @16kHz is not flexible (only 31/41 bits supported */ + acelp_cfg->lsf_bits = 41; } } @@ -1360,7 +1360,7 @@ ivas_error config_acelp1( acelp_cfg->ubits = acelp_cfg->lsf_bits - 46; acelp_cfg->lsf_bits = 46; } - else if ( acelp_cfg->lsf_bits > 42 && L_frame == L_FRAME ) /* TBV: verify maximum supported LSF Q bitbudget (for some reason 43 bits LSFQ decreases segSNR by 0.7 dB) */ + else if ( acelp_cfg->lsf_bits > 42 && L_frame == L_FRAME ) { acelp_cfg->ubits = acelp_cfg->lsf_bits - 42; acelp_cfg->lsf_bits = 42; diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index 17cd5964cf1266f94b07c8a423099c319990075f..c9571d41c16a95edb92e88f5e6b4b06825b8abf4 100755 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -2903,9 +2903,6 @@ ivas_error preview_indices( break; case SID_ISM: st_ivas->ivas_format = ISM_FORMAT; - /* temporary hack to make mode signaling work with the current 1-object ISM DTX: read padding bits */ - /* Todo: how to apply this here? maybe pt_stream += ... would work? */ - /* st->bit_stream += ( IVAS_SID_4k4 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; */ break; case SID_MULTICHANNEL: st_ivas->ivas_format = MC_FORMAT; @@ -3070,7 +3067,7 @@ ivas_error read_indices( file_read_FECpattern( &st_ivas->bfi ); st_ivas->bfi |= bfi; - if ( bfi == FRAMEMODE_MISSING ) /* TODO(mcjbm): This fixes channel-aware mode BE. Still requires review from a bitstream reading expert */ + if ( bfi == FRAMEMODE_MISSING ) { for ( k = 0; k < num_bits; k++ ) { @@ -3236,7 +3233,7 @@ ivas_error read_indices( /* handle bad/lost speech frame(and CS bad SID frame) in the decoders CNG synthesis settings pair (total_brate, bfi) */ if ( ( - bfi != FRAMEMODE_FUTURE && /* TODO(mcjbm): This fixes channel-aware mode BE. Still requires review from a bitstream reading expert */ + bfi != FRAMEMODE_FUTURE && ( *CNG != 0 ) && ( ( speech_bad != 0 ) || ( speech_lost != 0 ) ) ) || /* SP_BAD or SPEECH_LOST) --> stay in CNG */ ( sid_upd_bad != 0 ) ) /* SID_UPD_BAD --> start CNG */ { @@ -3280,8 +3277,7 @@ ivas_error read_indices( } /* GOOD frame */ - if ( st_ivas->bfi == 0 || st_ivas->bfi == FRAMEMODE_FUTURE /* TODO(mcjbm): This fixes channel-aware mode BE. Still requires review from a bitstream reading expert */ - ) + if ( st_ivas->bfi == 0 || st_ivas->bfi == FRAMEMODE_FUTURE ) { /* GOOD frame - convert ITU-T G.192 words to short values */ st_ivas->hDecoderConfig->ivas_total_brate = total_brate; diff --git a/lib_com/gs_bitallocation.c b/lib_com/gs_bitallocation.c index 7f7809428f9fb765f68dd2aceba11f608a4a8c85..d099c2200c04e574b5c48971238635190c2135e0 100644 --- a/lib_com/gs_bitallocation.c +++ b/lib_com/gs_bitallocation.c @@ -616,7 +616,7 @@ void bands_and_bit_alloc( * Complete the bit allocation per frequency band for 16kHz high brate mode *--------------------------------------------------------------------------*/ - if ( L_frame == L_FRAME16k && core_brate > ACELP_32k ) /* TBV if applicable */ + if ( L_frame == L_FRAME16k && core_brate > ACELP_32k ) { for ( j = st_band; j < nb_bands; j++ ) { diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 1e7ca7ae8e7ac03724af12ae7971f779c8e6084f..2107a5b9172875a328f8f5a052cd5f0b98f1ab1b 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -106,8 +106,8 @@ typedef enum AUDIO_CONFIG_ISM2, /* ISM2 */ AUDIO_CONFIG_ISM3, /* ISM3 */ AUDIO_CONFIG_ISM4, /* ISM4 */ - AUDIO_CONFIG_MASA1, /* MASA1 */ // TBV: seems not to be used - AUDIO_CONFIG_MASA2, /* MASA2 */ // TBV: seems not to be used + AUDIO_CONFIG_MASA1, /* MASA1 */ // TODO: seems not to be used + AUDIO_CONFIG_MASA2, /* MASA2 */ // TODO: seems not to be used AUDIO_CONFIG_EXTERNAL /* external renderer */ } AUDIO_CONFIG; @@ -898,7 +898,7 @@ typedef enum { /*----------------------------------------------------------------------------------* * General Parametric Coding Constants *----------------------------------------------------------------------------------*/ -// VE: this should be renamed to e.g. N_SPATIAL_SUBFRAMES + #define MAX_PARAM_SPATIAL_SUBFRAMES 4 /* Maximum number of subframes for parameteric spatial coding */ #define L_SPATIAL_SUBFR_48k (L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES) #define CLDFB_SLOTS_PER_SUBFRAME ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ) /* Number of CLDFB slots per subframe */ @@ -924,7 +924,7 @@ typedef enum { SBA_MODE_NONE, SBA_MODE_DIRAC, - SBA_MODE_SPAR, // VE: this is actually SBA_MODE_SPAR_DIRAC + SBA_MODE_SPAR, } SBA_MODE; #endif @@ -1066,7 +1066,7 @@ typedef enum #define IVAS_SPAR_BR_TABLE_LEN 20 -/* TD decorr */ // VE: not all 16CH are currently supported -> t be revisited later +/* TD decorr */ // ToDo: not all 16CH are currently supported -> to be revisited later enum { IVAS_TD_DECORR_OUT_1CH = 1, diff --git a/lib_com/ivas_pca_tools.c b/lib_com/ivas_pca_tools.c index 63285dabb10afe8a6a03c277d0ae8343a223caf8..a1f8efd6298aeb66beab96d8f1a289a7cb060cda 100644 --- a/lib_com/ivas_pca_tools.c +++ b/lib_com/ivas_pca_tools.c @@ -645,7 +645,7 @@ static void norm_quat( norm_q = dotp( q, q, IVAS_PCA_INTERP ); - norm_q = inv_sqrt( norm_q ); // VE: TBV: possible division by 0 + norm_q = inv_sqrt( norm_q ); // TODO: possible division by 0 for ( i = 0; i < IVAS_PCA_INTERP; i++ ) { diff --git a/lib_com/options.h b/lib_com/options.h index 42d6a6a471ab5435d1a3a9f231170ff625e39eeb..4e48199891b0bdfb8dfb7ee09c7b46000897c3b7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -188,7 +188,7 @@ #define ARITH_HUFF_CODER_CHANGES /* DLB: Optimization of metadata memory for Huffman and arithmetic coders */ #define FIX_463_TD_RENDERER_DIRECTIVITY_RESET /* Eri: Remove unintentional reset of directivity pattern */ -#define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ +#define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ #define FIX_443_FD_CNG_INIT /* FhG: correct bitrate value for FD-CNG init */ #define VARIABLE_SPEED_DECODING /* FhG: Contribution 37: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: Contribution 37: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ @@ -228,6 +228,9 @@ #define FIX_510 /* FhG: fix issue 510, misleading error message for invalid input format */ #define FIX_509 /* FhG: fix issue 509, too low number of bitsream indices in SBA */ +#define FIX_TODO_NON_DIEGETIC_PAN_NOT_IMPLELENTED_IN_RENDERER /* ..\apps\renderer.c(240): .... (todo: implementation)",*/ +#define REMOVE_OBS_CODE /* FhG: Remove unnecessary assignement after LFE cleanup (Issue #451)*/ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_com/rom_com.c b/lib_com/rom_com.c index e4b8ec9db90d6e036d74a6910cc82c7aa7347412..800362b576aa87dab26af8f1704ed4830b28e43b 100755 --- a/lib_com/rom_com.c +++ b/lib_com/rom_com.c @@ -15684,11 +15684,7 @@ const float finegain_4[16] = {-1.3234321f, -1.1164439f, -0.9153915f, -0.7248241f const float finegain_5[32] = {-1.3099370f, -1.1532731f, -0.9939113f, -0.8627403f, -0.7693628f, -0.6901322f, -0.6188556f, -0.5438313f, -0.4899869f, -0.4145289f, -0.3440915f, -0.2936875f, -0.2241453f, -0.1636186f, -0.1052746f, -0.0292431f, 0.0273763f, 0.0848355f, 0.1443042f, 0.2095194f, 0.2794882f, 0.3366661f, 0.4131591f, 0.4740591f, 0.5545165f, 0.6196313f, 0.6719442f, 0.7650533f, 0.9012053f, 1.0432675f, 1.2264170f, 1.5085750f}; const float * const finegain[5] = { finegain_1, finegain_2, finegain_3, finegain_4, finegain_5 }; -/* getk(16,8)+ maxqKIind=40 --> KMAX=127 needs support , 32bit- saturates at dim=6 - getK(21,9)+ maxqKInd=64 --> KMAX=512, needs support , 32bit saturates at dim=5 - getK(TBD,TBD)+ maxqKInd=TBD --> KMAX=1024, needs support , 32bit saturates at dim~=4 - getK(TBD,TBD)+ maxqKInd=TBD --> KMAX=32767, needs support, 32bit saturates at dim =3 -*/ + const uint8_t hBitsMinus1_N01[2] = {1, 7}; const uint8_t hBitsMinus1_N02[65]= diff --git a/lib_com/stl.h b/lib_com/stl.h index 234aec9e1609d68771d2cd80be104a0d4b17126c..c9ca42280642ae4ba91cc65258d8a567b04a195c 100644 --- a/lib_com/stl.h +++ b/lib_com/stl.h @@ -57,7 +57,7 @@ #ifndef _STL_H #define _STL_H -#include "options.h" /* TODO: TEMPORARY during BASOP development - to be removed */ +#include "options.h" /* note: needed until BASOP_NOGLOB is accepted */ #include "typedef.h" #include "basop32.h" #include "move.h" diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index 0c073cb9fd6bb09fb77333686caef14e5bc9b08d..eb2e84f598c8f4d0dd102fdf6abf06bd3980cd8f 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -616,7 +616,7 @@ ivas_error acelp_core_dec( config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, tc_subfr_tmp, 1, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); - if ( st->coder_type == TRANSITION && tc_subfr < L_SUBFR && st->L_frame == L_FRAME ) /* ISfm: why is this called again after above */ + if ( st->coder_type == TRANSITION && tc_subfr < L_SUBFR && st->L_frame == L_FRAME ) { config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, tc_subfr, 2, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); } @@ -1079,7 +1079,7 @@ ivas_error acelp_core_dec( * Formant post-filter *-----------------------------------------------------------------*/ - if ( st->hPFstat != NULL && st->last_bwidth >= WB && ( st->core_brate > ACELP_24k40 || st->element_mode > EVS_MONO ) && st->core_brate <= ACELP_32k ) /* VE2TV: TBV for TD stereo */ + if ( st->hPFstat != NULL && st->last_bwidth >= WB && ( st->core_brate > ACELP_24k40 || st->element_mode > EVS_MONO ) && st->core_brate <= ACELP_32k ) { mvr2r( syn, temp_buf + L_SYN_MEM, L_FRAME16k ); diff --git a/lib_dec/core_switching_dec.c b/lib_dec/core_switching_dec.c index 9ae8550e40faf6e4db9ed51c99c883ae38eac6f4..e70b1d59d7bed6fc4f19a37cc37dfcbc97726c14 100644 --- a/lib_dec/core_switching_dec.c +++ b/lib_dec/core_switching_dec.c @@ -374,7 +374,7 @@ ivas_error core_switching_pre_dec( st->gc_threshold = 0.0f; set_f( st->dispMem, 0, 8 ); - st->last_coder_type = GENERIC; /* fcs : this might be superfluous */ + st->last_coder_type = GENERIC; fer_energy( output_frame, UNVOICED_CLAS, st->previoussynth, -1, &st->enr_old, 1 ); st->lp_gainp = 0.0f; diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index 9896d1d8c024016b4b074c4b25a73a8e5dbe503f..8a574c95f6aa933a8d595bfb7055bdc6f061ed3a 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -1507,7 +1507,7 @@ void decoder_tcx_tns( if ( ( L_frame == st->L_frame >> 1 ) && st->tcxonly && isTCX5 ) { - if ( st->element_mode == EVS_MONO || L_spec < L_frameTCX ) /* TBC: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ + if ( st->element_mode == EVS_MONO || L_spec < L_frameTCX ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ { tcx5TnsUngrouping( L_frameTCX >> 1, hTcxCfg->tnsConfig[0][0].iFilterBorders[0] >> 1, x, DEC ); } @@ -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; /* TBV - or maybe used min(L_frame_TCX,L_FRAME48k) ... */ + st->old_fpitchFB = st->old_fpitch * (float) L_frameTCX_glob / (float) L_frame_glob; /* TODO - or maybe used min(L_frame_TCX,L_FRAME48k) ... */ } else { diff --git a/lib_dec/gs_dec.c b/lib_dec/gs_dec.c index 2e7fb267ab9cc29bcbf59c8dcaded51a698907b5..ff684b47d36375e0b6d28a53ba3622f007b53307 100644 --- a/lib_dec/gs_dec.c +++ b/lib_dec/gs_dec.c @@ -541,8 +541,7 @@ void gsc_dec( i++; } - if ( st->element_mode > EVS_MONO && coder_type == AUDIO && - st->core_brate <= STEREO_GSC_BIT_RATE_ALLOC && brate_intermed_tbl[i] == ACELP_9k60 ) /* Bit allocation should be mapped to 8 kb/s instead of 9.6 kb/s in this case */ + if ( st->element_mode > EVS_MONO && coder_type == AUDIO && st->core_brate <= STEREO_GSC_BIT_RATE_ALLOC && brate_intermed_tbl[i] == ACELP_9k60 ) /* Bit allocation is mapped to 8 kb/s instead of 9.6 kb/s in this case */ { i--; } diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 240205706faeda8bf15f4572ee9da594e0c5324d..d4bd43f5449af438e31bda4e766d88ff08e3cd25 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -151,14 +151,15 @@ static ivas_error ivas_binRenderer_convModuleOpen( if ( !isLoudspeaker ) { #ifdef UPDATE_SBA_FILTER - hBinRenderer->nInChannels = audioCfg2channels( input_config ); // TODO maybe an audioCfg2channels_woLFE() function? Works as long as only 1 LFE is present + hBinRenderer->nInChannels = audioCfg2channels( input_config ); #else hBinRenderer->nInChannels = 16; #endif } else { - hBinRenderer->nInChannels = ( audioCfg2channels( input_config ) - isLoudspeaker ); // TODO maybe an audioCfg2channels_woLFE() function? Works as long as only 1 LFE is present + /* Note: needs to be revisited if multiple LFE support is required */ + hBinRenderer->nInChannels = ( audioCfg2channels( input_config ) - isLoudspeaker ); } if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && hRenderConfig->roomAcoustics.use_brir ) @@ -518,7 +519,7 @@ static void ivas_binaural_obtain_DMX( { int16_t chIdx, bandIdx, k; - // ToDo: hBinRenderer->ivas_format is never set to ISM_FORMAT -> TBV + // ToDo: hBinRenderer->ivas_format is never set to ISM_FORMAT if ( hBinRenderer->ivas_format == MC_FORMAT || hBinRenderer->ivas_format == ISM_FORMAT ) { /* Obtain the downmix */ diff --git a/lib_dec/ivas_cpe_dec.c b/lib_dec/ivas_cpe_dec.c index 3717501c831a671f3a92a58a7938a7ca54974846..a19fb21dc2fdcbb8574a9147eb0989cc936c662b 100755 --- a/lib_dec/ivas_cpe_dec.c +++ b/lib_dec/ivas_cpe_dec.c @@ -292,7 +292,7 @@ ivas_error ivas_cpe_dec( } else { - /* subtract metadata bitbudget */ /* IVAS_fmToDo: TBC whether it is not better to distribute the metadata bits equally between 2 channels */ + /* subtract metadata bitbudget */ sts[0]->bits_frame_channel -= nb_bits_metadata; } } @@ -832,11 +832,13 @@ void destroy_cpe_dec( int16_t n; Decoder_State *st; +#ifndef REMOVE_OBS_CODE /* make sure we deallocate a potential distinct hTcxCfg for a MCT LFE channel (can only happen in rs) */ /*TODO Check this again with LFE clean up!*/ if ( hCPE->hCoreCoder[1] != NULL && hCPE->hCoreCoder[1]->hTcxCfg != hCPE->hCoreCoder[0]->hTcxCfg ) { hCPE->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; } +#endif for ( n = 0; n < CPE_CHANNELS; n++ ) { diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 587f3c34fcca79503c75d6ccecf6b8512d602143..82f03fdb3b24e501cc8ef073e9c1b69a220cc1d2 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -57,8 +57,8 @@ ivas_error ivas_dec( ) { int16_t n, output_frame, nchan_out; - Decoder_State *st; /* used for bitstream handling */ - float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ /* IVAS_fmToDo: buffer can be allocated dynamically based on the actual number of output channels */ + Decoder_State *st; /* used for bitstream handling */ + float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ int16_t nchan_remapped; float output_lfe_ch[L_FRAME48k]; int16_t nb_bits_metadata[MAX_SCE]; @@ -168,7 +168,6 @@ ivas_error ivas_dec( } else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { - // VE: call ivas_ism_metadata_dec() with 'st_ivas' - TBD if ( ( error = ivas_ism_metadata_dec( ivas_total_brate, st_ivas->nchan_ism, &( st_ivas->nchan_transport ), st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->bfi, nb_bits_metadata, st_ivas->ism_mode, st_ivas->hISMDTX, st_ivas->hDirAC->hParamIsm, &st_ivas->ism_extmeta_active, &st_ivas->ism_extmeta_cnt ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_dec/ivas_dirac_decorr_dec.c b/lib_dec/ivas_dirac_decorr_dec.c index bcaa6cf2a13916ccb0b68bd275d0f243ba4df33d..8c19d9698b29c3fc6d4f84edcc0a1826e9d20b39 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; /* fcs: fixed for now but can be adaptive in an extended version */ + freq_domain_decorr_ap_params->use_ducker = 1; /* ToDo: fcs: fixed for now but can be adaptive in an extended version */ 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_init_dec.c b/lib_dec/ivas_init_dec.c index b23207841709c995ef975c77d470299c96f9ab52..2452b34edb91c8f22d80675802b95e0c7bbb5e4b 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -485,7 +485,6 @@ static ivas_error ivas_read_format( int16_t tc_mode_offset; tc_mode_offset = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC - 1 ); idx = st_ivas->bit_stream[tc_mode_offset]; - // TBD: needs more work for HOA if ( st_ivas->sba_analysis_order == 0 ) { st_ivas->sba_analysis_order = SBA_FOA_ORDER; diff --git a/lib_dec/ivas_ism_dtx_dec.c b/lib_dec/ivas_ism_dtx_dec.c index 6dd301f1610afa04f7ba1efd6afbe3fbdb088243..054603a15ea3c27ae68f0828c0f800aec1e29b57 100644 --- a/lib_dec/ivas_ism_dtx_dec.c +++ b/lib_dec/ivas_ism_dtx_dec.c @@ -80,7 +80,6 @@ ivas_error ivas_ism_dtx_dec( if ( nchan_ism != nchan_ism_prev ) { - /* IVAS_fmToDo: more work needed when the number of transported objects is not constant */ return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "wrong number of objects signalled!" ); } diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index e269d1e6041209e0336d7e8df22a5d7f8d46ce47..a39c496ab6e3e0f4f7bd1d131a8ebdb559673073 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -219,7 +219,6 @@ ivas_error ivas_ism_metadata_dec( if ( *nchan_transport != nchan_transport_prev ) { - /* IVAS_fmToDo: more work needed when the number of transported objects is not constant */ return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "wrong number of objects signalled!" ); } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 987c55f2218b8614f00d39fbc8284d9182bfde88..04ae4904146b577b413d189be0648e46aca1ec04 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -69,8 +69,8 @@ ivas_error ivas_jbm_dec_tc( ) { int16_t n, output_frame, nchan_out; - Decoder_State *st; /* used for bitstream handling */ - float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */ /* IVAS_fmToDo: buffer can be allocated dynamically based on the actual number of output channels */ + Decoder_State *st; /* used for bitstream handling */ + float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */ int16_t nchan_remapped, hodirac_flag; float output_lfe_ch[L_FRAME48k]; int16_t nb_bits_metadata[MAX_SCE]; @@ -641,7 +641,7 @@ ivas_error ivas_jbm_dec_render( { int16_t n, nchan_out; int16_t nchan_transport; - float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ /* IVAS_fmToDo: buffer can be allocated dynamically based on the actual number of output channels */ + float output[MAX_OUTPUT_CHANNELS][L_FRAME48k]; /* 'float' buffer for output synthesis, MAX_OUTPUT_CHANNELS channels */ int16_t nchan_remapped; int32_t output_Fs; AUDIO_CONFIG output_config; diff --git a/lib_dec/ivas_pca_dec.c b/lib_dec/ivas_pca_dec.c index 4444a73cee237441b406bcbce27b60ff7adff240..e73b3aa1d61f6025322a0913b7b8ea964680ab23 100644 --- a/lib_dec/ivas_pca_dec.c +++ b/lib_dec/ivas_pca_dec.c @@ -232,7 +232,7 @@ void ivas_pca_dec( mvr2r( &hPCA->mem_eigVec_interp[IVAS_PCA_N_SLOTS * 16], hPCA->mem_eigVec_interp, IVAS_PCA_DELAY_CMP * 16 ); - /* @@@TODO: check how ivas_total_brate is set if bfi == 1 */ // VE: and what happens in DTX where "ivas_total_brate" can be close to zero? + /* @@@TODO: check how ivas_total_brate is set if bfi == 1 */ // ToDo: and what happens in DTX where "ivas_total_brate" can be close to zero? /* handle bit rate switching */ if ( ivas_total_brate != PCA_BRATE || ( ivas_total_brate == PCA_BRATE && n_channels > FOA_CHANNELS ) ) @@ -240,8 +240,6 @@ void ivas_pca_dec( /* set PCA by-pass mode in current frame and interpolate transform as previous frame used PCA */ pca_dec_reset_dquat( ql, qr ); - // VE: todo - rather call PCA resets in the first PCA frame - if ( ( last_ivas_total_brate != PCA_BRATE ) || ( last_ivas_total_brate == PCA_BRATE && hPCA->prev_pca_bypass > 1 ) ) { pca_dec_reset_mem_eigvec( hPCA ); diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index 3c077a5d90d5ac85652e5e7feff1f948e6dd503d..cfd748afde8b0959e535b91ced447c6f87a2c65c 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -2406,7 +2406,7 @@ static uint16_t ivas_qmetadata_DecodeQuasiUniform( uint16_t tresh, value; #ifdef DEBUGGING - assert( ( alphabet_size >= 1 ) ); /*fcs: to check if this additional conditon is really needed: && (alphabet_size <= (1U << 31) - 1));*/ + assert( ( alphabet_size >= 1 ) ); /* ToDo: fcs: to check if this additional conditon is really needed: && (alphabet_size <= (1U << 31) - 1));*/ #endif bits = 30 - norm_l( alphabet_size ); /* bits = floor(log2(alphabet_size)) */ diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c old mode 100644 new mode 100755 index 2d4c4cb2ab46d4eb2d91a5feff23f7dafffc6648..478749ddc09ad76efd5c1417bcda8a0ff86ff0f9 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -66,7 +66,7 @@ void ivas_sba_set_cna_cng_flag( #endif { /* skip as done in init function */ - /* st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; */ /* Todo: Check if these can be enabled */ + /* st_ivas->hSCE[0]->hCoreCoder[0]->cna_dirac_flag = 0; */ /* st_ivas->hSCE[0]->hCoreCoder[0]->cng_sba_flag = 0; */ } else if ( st_ivas->nchan_transport == 1 && ( ( st_ivas->renderer_type == RENDERER_DIRAC && st_ivas->hDirAC->synthesisConf == DIRAC_SYNTHESIS_GAIN_SHD ) || ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) ) ) @@ -78,7 +78,7 @@ void ivas_sba_set_cna_cng_flag( { for ( n = 0; n < CPE_CHANNELS; n++ ) { - st_ivas->hCPE[0]->hCoreCoder[n]->cna_dirac_flag = 0; /* Todo: Check if these can be enabled */ + st_ivas->hCPE[0]->hCoreCoder[n]->cna_dirac_flag = 0; st_ivas->hCPE[0]->hCoreCoder[n]->cng_sba_flag = 1; } } diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index f9d34970c25e5177f2833d8bbf782e0fd1f5e4ad..cf03e7b9d849ac4bdc232cdfee206a5e34a7f419 100755 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -43,7 +43,6 @@ #include "wmc_auto.h" #include "ivas_stat_dec.h" -/*#define ENABLE_DITHER */ /* IVAS_fmToDo: development switch */ /*------------------------------------------------------------------------------------------* * Local constants @@ -606,10 +605,10 @@ static ivas_error ivas_spar_set_dec_config( case 4: /* FOA_CHANNELS */ hMdDec->num_decorr = IVAS_TD_DECORR_OUT_3CH; break; - case 9: /* IVAS_HOA_2_CH */ // VE: is this relevant? + case 9: /* IVAS_HOA_2_CH */ hMdDec->num_decorr = IVAS_TD_DECORR_OUT_5CH; break; - case 16: /* IVAS_HOA_3_CH */ // VE: is this relevant? + case 16: /* IVAS_HOA_3_CH */ // ToDo: is this relevant? hMdDec->num_decorr = IVAS_TD_DECORR_OUT_12CH; break; case 6: /* IVAS_HOA_2_CH */ diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index aacaa7aa0fec389b47261af8833f31569ab8788e..cd565f3eae6f541f11504f3887c48735156761ea 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -852,7 +852,6 @@ typedef struct ivas_spar_md_dec_state_t int16_t td_decorr_flag; int16_t spar_plc_enable_fadeout_flag; float ***mixer_mat; - /*TODO : reuse hFbMixer->prior_mixer for this as that buffer is unused in decoder with FB_HARMONIZATION*/ float mixer_mat_prev[MAX_PARAM_SPATIAL_SUBFRAMES + 1][IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH][IVAS_MAX_NUM_BANDS]; ivas_spar_md_com_cfg spar_md_cfg; ivas_arith_coeffs_t arith_coeffs; @@ -1286,7 +1285,7 @@ typedef struct Decoder_Struct int16_t ini_active_frame; /* initialization active frames counter */ int16_t bfi; /* FEC - bad frame indicator */ - int16_t BER_detect; /* BER detect flag */ /* IVAS_fmToDo: eventually replace hCoreCoder->BER_detect by a pointer to ease the updating of this main parameter */ + int16_t BER_detect; /* BER detect flag */ uint16_t *bit_stream; /* Pointer to bitstream buffer */ int16_t writeFECoffset; /* parameter for debugging JBM stuff */ diff --git a/lib_dec/ivas_stereo_icbwe_dec.c b/lib_dec/ivas_stereo_icbwe_dec.c index 78196eaaa8522dbbb31c96757d5ea3104efbb0c9..13722f2b2ab74d76c773fd093fd10481215f424f 100644 --- a/lib_dec/ivas_stereo_icbwe_dec.c +++ b/lib_dec/ivas_stereo_icbwe_dec.c @@ -739,7 +739,7 @@ void stereo_icBWE_decproc( { if ( hCPE->element_mode == IVAS_CPE_TD ) { - /* QC: TBV */ + /* QC: TODO - TBV */ v_add( output[0], hStereoICBWE->memOutHB[hStereoICBWE->prev_refChanIndx_bwe], output[0], memOffset ); v_add( output[1], hStereoICBWE->memOutHB[!hStereoICBWE->prev_refChanIndx_bwe], output[1], memOffset ); } diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c index 88d82ac17b8d7732c94bd2260191d40e91185d3b..013cc24660264ccf974f7bd9529ca8de09dc9d46 100644 --- a/lib_dec/ivas_stereo_switching_dec.c +++ b/lib_dec/ivas_stereo_switching_dec.c @@ -1545,7 +1545,6 @@ void stereo_switching_dec( mvr2r( sts[0]->hHQ_core->old_out, sts[1]->hHQ_core->old_out, L_FRAME48k ); mvr2r( sts[0]->delay_buf_out, sts[1]->delay_buf_out, HQ_DELTA_MAX * HQ_DELAY_COMP ); mvr2r( sts[0]->hTcxDec->old_syn_Overl, sts[1]->hTcxDec->old_syn_Overl, 256 ); - /* Todo: apply panning to buffers instead of simply using dmx in left and right channel */ } } else if ( hCPE->element_mode == IVAS_CPE_TD && hCPE->last_element_mode == IVAS_CPE_MDCT ) diff --git a/lib_dec/ivas_vbap.c b/lib_dec/ivas_vbap.c index cda52c1aec8e7c74c9b05d1016cc429e99fb6151..841f3df132015ea8ac0505bde28ffb4374ec315c 100644 --- a/lib_dec/ivas_vbap.c +++ b/lib_dec/ivas_vbap.c @@ -178,11 +178,13 @@ ivas_error vbap_init_data( push_wmops( "vbap_init" ); /* Basic init checks */ + /* If the requested layout is invalid, hVBAPdata is set to NULL and the signal will + * be distributed with an equal gain into all output channels. + * The surrounding code needs to handle the NULL pointer properly. */ if ( num_speaker_nodes > VBAP_MAX_NUM_SPEAKER_NODES || num_speaker_nodes < 3 ) { hVBAPdata = NULL; pop_wmops(); - /* TODO: are these two paths correct behaviour or should and error be returned ? */ return IVAS_ERR_OK; } diff --git a/lib_dec/swb_bwe_dec.c b/lib_dec/swb_bwe_dec.c index e7eda534ae5817eaeaf22c5051753828f1ec478d..a89a17cca85be7d365bcd352253ca615c1c233f0 100644 --- a/lib_dec/swb_bwe_dec.c +++ b/lib_dec/swb_bwe_dec.c @@ -586,8 +586,8 @@ void swb_bwe_dec( if ( st->element_mode == IVAS_CPE_DFT && !use_cldfb_for_dft ) { - /* TBD - wtda() does not support L_FRAME length; thus temporarily resample the signal */ - /* TBV - delay output[] by 1.25ms ? */ + /* todo - wtda() does not support L_FRAME length; thus temporarily resample the signal */ + /* todo - delay output[] by 1.25ms ? */ lerp( output, ysynth, L_FRAME16k, st->L_frame ); /* windowing of the ACELP core synthesis */ @@ -734,7 +734,7 @@ void swb_bwe_dec( } else if ( frica_flag == 1 && hBWE_FD->prev_frica_flag == 0 ) { - /* IVAS_fmToDo: TBD - synth[] is @internal_Fs!!! */ + /* IVAS_fmToDo: synth[] is @internal_Fs!!! */ time_reduce_pre_echo( synth, hb_synth, hBWE_FD->prev_td_energy, l_subfr ); } else diff --git a/lib_dec/swb_tbe_dec.c b/lib_dec/swb_tbe_dec.c index 79fe3b0e68df74513fc47ddd79198162d95365bc..e4f211b2aab46b252bb8b9f8560c99f34b05959b 100644 --- a/lib_dec/swb_tbe_dec.c +++ b/lib_dec/swb_tbe_dec.c @@ -577,7 +577,6 @@ void swb_tbe_dec( set_f( GainShape, hBWE_TD->prev_GainShape, NUM_SHB_SUBFR ); } - /* this never happens */ mvr2r( hBWE_TD->lsp_prevfrm, lsf_shb, LPC_SHB_ORDER ); set_f( shb_res_gshape, 0.2f, NB_SUBFR16k ); } @@ -1864,19 +1863,16 @@ static void dequantizeSHBparams( lsf_q[LATTICE_DIM + 1] = dotp( lsf_q, &LastCoefPred_1bit[2 * ( LATTICE_DIM + 1 ) * Idx_pred + LATTICE_DIM + 1], LATTICE_DIM ); } - /* !!! TODO: read empty bits - should be removed */ if ( nbits < NUM_BITS_SHB_MSLVQ ) { Idx_pred = get_next_indice( st, NUM_BITS_SHB_MSLVQ - nbits ); } - /* !!! end empty bits */ v_add( SHB_LSF_mean, lsf_q, lsf_q, LPC_SHB_ORDER ); v_sort( lsf_q, 0, LPC_SHB_ORDER - 1 ); } else { - /* !!!! this purposely reverts the inclusion of extl_brate == SWB_TBE_1k75 into the logic - remove this comment when this macro is deleted !!!!! */ if ( extl_brate == SWB_TBE_1k6 || extl_brate == FB_TBE_1k8 || extl_brate == SWB_TBE_2k8 || extl_brate == FB_TBE_3k0 ) { for ( i = 0; i < NUM_Q_LSF; i++ ) diff --git a/lib_enc/core_switching_enc.c b/lib_enc/core_switching_enc.c index ad52e197b940c5a39fcbd2e3f434a0f7982e07eb..2b16b49d46d5a5e7a2d69b9d34ed460ba19516e3 100644 --- a/lib_enc/core_switching_enc.c +++ b/lib_enc/core_switching_enc.c @@ -258,7 +258,7 @@ void core_switching_pre_enc( /* reset BWE memories */ if ( st->hBWE_TD != NULL ) { - set_f( st->hBWE_FD->old_syn_12k8_16k, 0, NS2SA( 16000, DELAY_FD_BWE_ENC_NS ) ); /* TBV: this might not be needed */ + set_f( st->hBWE_FD->old_syn_12k8_16k, 0, NS2SA( 16000, DELAY_FD_BWE_ENC_NS ) ); /* TODO - TBV: this might not be needed */ } } diff --git a/lib_enc/evs_enc.c b/lib_enc/evs_enc.c index c45bb444f3aac3fd061469feb5ec6a3b816a3d43..8a0a92c76a29628d2b24654c249e512a6b18cf2f 100644 --- a/lib_enc/evs_enc.c +++ b/lib_enc/evs_enc.c @@ -264,8 +264,7 @@ ivas_error evs_enc( core_switching_post_enc( st, old_inp_12k8, old_inp_16k, A ); -#if !defined( FIX_I4_OL_PITCH ) - /* ToDo: this is a hack to keep bitexactness wrt. EVS but the logic is wrong */ +#ifndef FIX_I4_OL_PITCH if ( st->core == HQ_CORE ) { mvs2s( pitch_orig, st->pitch, 3 ); /* original open-loop pitch values might be altered in core_acelp_tcx20_switching() */ diff --git a/lib_enc/fd_cng_enc.c b/lib_enc/fd_cng_enc.c index 3ac5b8d6908fc3756e7d4a403ad6fd118a65f726..99e0e9c8dbb61736542e84f962110a6b46b535bd 100644 --- a/lib_enc/fd_cng_enc.c +++ b/lib_enc/fd_cng_enc.c @@ -1280,7 +1280,7 @@ void FdCngEncodeDiracMDCTStereoSID( for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { E[ch] = 0.0f; - for ( p = 0; p < NPART; p++ ) /* TBD Note: NPART should likely be N[ch] if N[ch] may change */ + for ( p = 0; p < NPART; p++ ) /* TODO Note: NPART should likely be N[ch] if N[ch] may change */ { ms_ptr[ch][p] = 10.f * log10f( lr_in_ptr[ch][p] + EPSILON ); E[ch] += ms_ptr[ch][p]; @@ -1288,9 +1288,9 @@ void FdCngEncodeDiracMDCTStereoSID( } /* M/S transform on log envelopes */ - convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ + convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ - E[0] = sum_f( ms_ptr[0], NPART ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ + E[0] = sum_f( ms_ptr[0], NPART ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ /* Quantize M noise shape */ @@ -1326,7 +1326,7 @@ void FdCngEncodeDiracMDCTStereoSID( set_zero( ms_ptr[1], NPART ); /* compute M gain */ - gain[0] = sum_f( ms_ptr[0], NPART ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ + gain[0] = sum_f( ms_ptr[0], NPART ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ gain[0] = ( E[0] - gain[0] ) / (float) N[0]; apply_scale( &gain[0], sts[0]->hFdCngEnc->hFdCngCom->CngBandwidth, sts[0]->hDtxEnc->last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO ); @@ -1338,7 +1338,7 @@ void FdCngEncodeDiracMDCTStereoSID( gain[1] = gain[0]; /* undo M/S */ - convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); /* TBD Note: NPART should likely be N[0] if N[0] may change */ + convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ /* restore channel noise envelopes */ for ( ch = 0; ch < CPE_CHANNELS; ch++ ) @@ -1346,7 +1346,7 @@ void FdCngEncodeDiracMDCTStereoSID( HANDLE_FD_CNG_ENC hFdCngEnc = sts[ch]->hFdCngEnc; HANDLE_FD_CNG_COM hFdCngCom = hFdCngEnc->hFdCngCom; - for ( p = 0; p < NPART; p++ ) /* TBD Note: NPART should likely be N[0] if N[0] may change */ + for ( p = 0; p < NPART; p++ ) /* TODO Note: NPART should likely be N[0] if N[0] may change */ { lr_out_ptr[ch][p] = powf( 10.f, ( ms_ptr[ch][p] + gain[ch] ) / 10.f ); } diff --git a/lib_enc/init_enc.c b/lib_enc/init_enc.c index 42b4e8957d92ab0290e02ad72d9101b03aca4e72..1c1071570194160514f83ab3fcdbe2e1492ac3a0 100644 --- a/lib_enc/init_enc.c +++ b/lib_enc/init_enc.c @@ -704,7 +704,7 @@ ivas_error init_encoder( * TCX core *-----------------------------------------------------------------*/ - // VE: reduction possible for MCT_CHAN_MODE_LFE channel - see I1-172 + // ToDo: reduction possible for MCT_CHAN_MODE_LFE channel - see I1-172 if ( idchan == 0 || st->element_mode == IVAS_CPE_MDCT ) { if ( ( st->hTcxEnc = (TCX_ENC_HANDLE) malloc( sizeof( TCX_ENC_DATA ) ) ) == NULL ) diff --git a/lib_enc/ivas_agc_enc.c b/lib_enc/ivas_agc_enc.c index 83dbdad1e183efb3bb5990657633b3c68323b389..03cb2aa2edef36792b2d7c0a36d8e99eb2c125fc 100644 --- a/lib_enc/ivas_agc_enc.c +++ b/lib_enc/ivas_agc_enc.c @@ -455,7 +455,6 @@ void ivas_agc_enc_process( /* writing to a temporary bitstream file */ if ( ivas_agc_writeBits( agcOut, n_channels, pState ) ) { - /* TODO: return error once error codes are harmonized */ IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "SPAR ENC AGC Failed to open agcOut\n " ); } #endif @@ -477,7 +476,6 @@ static int16_t ivas_agc_writeBits( FILE *stream, const int16_t n_channels, ivas_ if ( pState->gain_data[i].absGainExpCurr < 0 || pState->gain_data[i].absGainExpCurr >= (int16_t) pow( 2, pState->agc_com.betaE ) ) { - /* TODO: return error once error codes are harmonized */ IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Error Gain values to write!!\n\n" ); } diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index c4dc434d1c2b0dcbbe6c3aefa0a5cb3ec6e44bab..5f19a5395af55a358fd8aafc4e25255acc3cf257 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -274,7 +274,7 @@ ivas_error ivas_cpe_enc( } else { - /* note; "bits_frame_nominal" needed in TD stereo as well */ /* IVAS_fmToDo: is "bits_frame_nominal" set optimaly in TD stereo? */ + /* note; "bits_frame_nominal" needed in TD stereo as well */ stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } } diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index de15725b6514d2669b1a5ddf9a16f6728dc7f08c..5aa872e4341fc2928e2886dbd0fc839642eea62e 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -417,11 +417,6 @@ void ivas_dirac_enc( if ( Opt_DTX_ON ) { - /* ToDo: If DIRAC_MIN_BITRATE_4_TRANS_CHAN is reached with DTX on (possible only with bitrate switching) - metadata is not quantized since it can be deduced at the decoder from transmitted TCs. - The solution would be to switch to active-only/ignore and resume DTX operation when switching back to a supported bitrate. - */ - if ( !( hQMetaData->no_directions == 1 && hQMetaData->numCodingBands == 5 ) ) { float orig_azi[DIRAC_MAX_NBANDS][MAX_PARAM_SPATIAL_SUBFRAMES]; diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index 64ed5c9c02fc8aab96f0dc8a456d82d47035d63a..89a97ea0b079cfc7d8e906fed1665b7681df3dbe 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -62,7 +62,7 @@ ivas_error ivas_enc( BSTR_ENC_HANDLE hMetaData; Encoder_State *st; /* used for bitstream handling */ int16_t nb_bits_metadata[MAX_SCE]; - float data_f[MAX_INPUT_CHANNELS][L_FRAME48k]; /* IVAS_fmToDo: buffer can be allocated dynamically based on the number of analysed channels */ + float data_f[MAX_INPUT_CHANNELS][L_FRAME48k]; int32_t ivas_total_brate; ivas_error error; error = IVAS_ERR_OK; diff --git a/lib_enc/ivas_front_vad.c b/lib_enc/ivas_front_vad.c index 3810df1de9b28e7e949841fec3c6baac389da498..9593f6682f0b24b050b3941f77904b5fac487609 100644 --- a/lib_enc/ivas_front_vad.c +++ b/lib_enc/ivas_front_vad.c @@ -407,8 +407,8 @@ ivas_error front_vad_spar( mvr2r( st->old_wsp, old_wsp, L_WSP_MEM ); wsp = old_wsp + L_WSP_MEM; - st->core_brate = -1; /* updated in dtx() */ - st->input_bwidth = st->last_input_bwidth; // VE: TBD - this might be updated by actual detected BW + st->core_brate = -1; /* updated in dtx() */ + st->input_bwidth = st->last_input_bwidth; /*------------------------------------------------------------------* * compensate for SPAR filterbank delay diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index 8780573773897d6fefa66e19af82cff6919f80d1..6c6a0c8837a378e879f6ac180d4291a546f7a51c 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -225,16 +225,11 @@ ivas_error ivas_ism_enc( } else if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { - // VE: call ivas_ism_metadata_enc() with 'st_ivas' - TBD - ivas_ism_metadata_enc( st_ivas->hEncoderConfig->ivas_total_brate, - nchan_ism, - st_ivas->nchan_transport, st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->hSCE[st_ivas->nSCE - 1]->hMetaData, nb_bits_metadata, vad_flag, st_ivas->ism_mode, st_ivas->hDirAC->hParamIsm, st_ivas->hEncoderConfig->ism_extended_metadata_flag ); + ivas_ism_metadata_enc( st_ivas->hEncoderConfig->ivas_total_brate, nchan_ism, st_ivas->nchan_transport, st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->hSCE[st_ivas->nSCE - 1]->hMetaData, nb_bits_metadata, vad_flag, st_ivas->ism_mode, st_ivas->hDirAC->hParamIsm, st_ivas->hEncoderConfig->ism_extended_metadata_flag ); } else /* ISM_MODE_DISC */ { - ivas_ism_metadata_enc( st_ivas->hEncoderConfig->ivas_total_brate, - nchan_ism, - st_ivas->nchan_transport, st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->hSCE[st_ivas->nSCE - 1]->hMetaData, nb_bits_metadata, vad_flag, st_ivas->ism_mode, NULL, st_ivas->hEncoderConfig->ism_extended_metadata_flag ); + ivas_ism_metadata_enc( st_ivas->hEncoderConfig->ivas_total_brate, nchan_ism, st_ivas->nchan_transport, st_ivas->hIsmMetaData, st_ivas->hSCE, st_ivas->hSCE[st_ivas->nSCE - 1]->hMetaData, nb_bits_metadata, vad_flag, st_ivas->ism_mode, NULL, st_ivas->hEncoderConfig->ism_extended_metadata_flag ); } update_last_metadata( nchan_ism, st_ivas->hIsmMetaData, md_diff_flag ); diff --git a/lib_enc/ivas_lfe_enc.c b/lib_enc/ivas_lfe_enc.c index 9a5b7549420355b92f1219f695e7f9205e2831b0..a76c31cdc5fd96f9542547cf45d25dd17c15e8fc 100644 --- a/lib_enc/ivas_lfe_enc.c +++ b/lib_enc/ivas_lfe_enc.c @@ -320,7 +320,6 @@ static void ivas_lfe_enc_quant( { if ( quant_strategy < ( num_quant_strategies - 1 ) ) { - /* reset all indices that were already written - TODO: maybe better store them temporarily first and write at the very end? */ #ifdef IND_LIST_DYN for ( j = hBstr->nb_ind_tot - 1; j >= nb_ind_tot; j-- ) #else diff --git a/lib_enc/ivas_masa_enc.c b/lib_enc/ivas_masa_enc.c index cfed98617a399aae4595419dacd301aaeeaa9fdb..707e1b3397656913137b85d9a92f6c7041937509 100644 --- a/lib_enc/ivas_masa_enc.c +++ b/lib_enc/ivas_masa_enc.c @@ -2104,7 +2104,6 @@ static uint8_t are_masa_subframes_similar( } } - /* TODO: a nicer negation */ // VE: ?? if ( sf_differ ) { return FALSE; diff --git a/lib_enc/ivas_mcmasa_enc.c b/lib_enc/ivas_mcmasa_enc.c index 0c158afbb74a4570c7d147deebf9424fe5b5d692..09fe5e3f402fa864e908524cfa47c86c9bcdd574 100644 --- a/lib_enc/ivas_mcmasa_enc.c +++ b/lib_enc/ivas_mcmasa_enc.c @@ -1255,10 +1255,10 @@ void ivas_mcmasa_param_est_enc( *--------------------------------------------------------------------------*/ void ivas_mcmasa_dmx_modify( - const int16_t n_samples, /* i : input frame length in samples */ - float dmx[][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )], /* i/o: downmix signal to be transformed into another format. TODO: buffer size into define? */ - const int16_t n_chnls_dmx_old, /* i : number of downmix channels in the old format */ - const int16_t n_chnls_dmx_new ) /* i : number of downmix channels in the target format */ + const int16_t n_samples, /* i : input frame length in samples */ + float dmx[][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )], /* i/o: downmix signal to be transformed into another format */ + const int16_t n_chnls_dmx_old, /* i : number of downmix channels in the old format */ + const int16_t n_chnls_dmx_new ) /* i : number of downmix channels in the target format */ { /* assumed data ordering in **dmx: [sce][cpe_chnl0][cpe_chnl1], i.e., [c][l][r] */ int16_t i; diff --git a/lib_enc/ivas_qmetadata_enc.c b/lib_enc/ivas_qmetadata_enc.c index a9cb5c763166fd0f4f045c9b0393ae5a65e125dc..213c0ce7563047d24e60cf4e22cd565cb53fb588 100644 --- a/lib_enc/ivas_qmetadata_enc.c +++ b/lib_enc/ivas_qmetadata_enc.c @@ -2314,7 +2314,7 @@ static void ivas_qmetadata_encode_quasi_uniform( int16_t bits; uint16_t tresh; #ifdef DEBUGGING - assert( ( alphabet_size >= 1 ) ); /*fcs: to check if this additional conditon is really needed: && (alphabet_size <= (1U << 31) - 1));*/ + assert( ( alphabet_size >= 1 ) ); /* ToDo: fcs: to check if this additional conditon is really needed: && (alphabet_size <= (1U << 31) - 1));*/ assert( value < alphabet_size ); #endif @@ -2553,7 +2553,7 @@ static int16_t ivas_qmetadata_encode_quasi_uniform_length( int16_t bits; uint16_t tresh; #ifdef DEBUGGING - assert( ( alphabet_size >= 1 ) ); /*fcs: to check if this additional conditon is really needed: && (alphabet_size <= (1U << 31) - 1));*/ + assert( ( alphabet_size >= 1 ) ); /* ToDo: fcs: to check if this additional conditon is really needed: && (alphabet_size <= (1U << 31) - 1));*/ assert( value < alphabet_size ); #endif diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 57e6ce003e3749ed75e8a631b94d7f386ada0b11..5956ef03dd28b76e89be3f2830d6c0354f5807bb 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -353,8 +353,6 @@ ivas_error ivas_spar_enc( error = IVAS_ERR_OK; hEncoderConfig = st_ivas->hEncoderConfig; - // VE2DB: can hFbMixer->ppFilterbank_prior_input be replaced by st->input ? - /* check last sba_mode */ #ifndef SBA_MODE_CLEAN_UP if ( ivas_sba_mode_select() == SBA_MODE_DIRAC ) @@ -377,7 +375,6 @@ ivas_error ivas_spar_enc( } /* update FB prior input */ - // VE: last 1ms of 'ppFilterbank_prior_input' is not correct for ( int16_t i = 0; i < st_ivas->nchan_transport; i++ ) { mvr2r( ( sts[i]->input_buff + NS2SA( hEncoderConfig->input_Fs, IVAS_FB_ENC_DELAY_NS ) ), diff --git a/lib_enc/ivas_stereo_dft_enc.c b/lib_enc/ivas_stereo_dft_enc.c index dbc06622554a01af8246712094ef87be2d10d0e5..36e577b48248c0e15903729fcc39097a17f6704e 100644 --- a/lib_enc/ivas_stereo_dft_enc.c +++ b/lib_enc/ivas_stereo_dft_enc.c @@ -767,7 +767,7 @@ void stereo_dft_enc_analyze( { int16_t tmp[1024]; - /*fcs: stereo side info is only simulated */ + /* stereo side info is only simulated */ for ( i = 0; i < input_frame; i++ ) { tmp[i] = (int16_t) ( input[0][i] + 0.5f ); diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index d1c18a9bafe00fafe49682cf75c40bcdd42943e2..37c3e57ab5c31a317b1223714d9b17e98e1b09b6 100755 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -904,10 +904,9 @@ static ivas_error configureEncoder( ) ) #else if ( hEncoderConfig->Opt_DTX_ON && hEncoderConfig->ivas_format != MONO_FORMAT && - ( ( hEncoderConfig->ivas_format == MASA_FORMAT && hEncoderConfig->ivas_total_brate > IVAS_128k ) || // ToDo: remove the bitrate limitation - ( hEncoderConfig->ivas_format == SBA_FORMAT && ivas_get_sba_num_TCs( hEncoderConfig->ivas_total_brate, 1 ) > 2 ) || // ToDo: support for 3+ TCs to be done - hEncoderConfig->ivas_format == MC_FORMAT // ToDo: TBD - ) ) + ( ( hEncoderConfig->ivas_format == MASA_FORMAT && hEncoderConfig->ivas_total_brate > IVAS_128k ) || // ToDo: remove the bitrate limitation + ( hEncoderConfig->ivas_format == SBA_FORMAT && ivas_get_sba_num_TCs( hEncoderConfig->ivas_total_brate, 1 ) > 2 ) || + hEncoderConfig->ivas_format == MC_FORMAT ) ) #endif { return IVAS_ERROR( IVAS_ERR_DTX_NOT_SUPPORTED, "DTX is not supported in this IVAS format and element mode." ); @@ -1297,7 +1296,6 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( * Main function to encode one frame to a compact bitstream (bytestream) *---------------------------------------------------------------------*/ -/* IVAS_fmToDo: Currently unused and untested */ ivas_error IVAS_ENC_EncodeFrameToCompact( IVAS_ENC_HANDLE hIvasEnc, /* i/o: IVAS encoder handle */ int16_t *inputBuffer, /* i : PCM input */ diff --git a/lib_enc/voiced_enc.c b/lib_enc/voiced_enc.c index b32692b983a426cdd3b8435fcdd666e943612901..18a3305902680b9bea1ea5952820d76310fbae1f 100644 --- a/lib_enc/voiced_enc.c +++ b/lib_enc/voiced_enc.c @@ -498,7 +498,6 @@ ivas_error ppp_voiced_encoder( error = IVAS_ERR_OK; - /* TODO: deallocation missing */ if ( ( error = DTFS_new( &CURRP_NQ ) ) != IVAS_ERR_OK ) { IVAS_ERROR( error, "Error creating DTFS structure" ); diff --git a/lib_rend/ivas_crend.c b/lib_rend/ivas_crend.c index 76af4a17c8755e4a6bdccfbe435c0524e304fa4a..8a013bc71536b5f2ca9d311a37db77c88dc71a62 100644 --- a/lib_rend/ivas_crend.c +++ b/lib_rend/ivas_crend.c @@ -1090,7 +1090,6 @@ ivas_error ivas_rend_openCrend( HRTFS_CREND_HANDLE hSetOfHRTF, const int32_t output_Fs ) { - /* TODO tmu : Based on ivas_crend_open() - could be harmonized / refactored */ int16_t i, subframe_length; int16_t max_total_ir_len; HRTFS_HANDLE hHrtf; diff --git a/lib_rend/ivas_objectRenderer_hrFilt.c b/lib_rend/ivas_objectRenderer_hrFilt.c index 6a2bf00278d535f817c46af256111b1a5acd87a4..6463261ec47145ba640e0bb77312f4afce673dc9 100644 --- a/lib_rend/ivas_objectRenderer_hrFilt.c +++ b/lib_rend/ivas_objectRenderer_hrFilt.c @@ -79,7 +79,7 @@ ivas_error TDREND_REND_RenderSourceHRFilt( v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length ); v_add( RightOutputFrame, output_buf[1], output_buf[1], subframe_length ); - Src_p->InputFrame_p += subframe_length; /* Increment input pointer -- todo: should we remove this and input the current subframe instead? */ + Src_p->InputFrame_p += subframe_length; /* Increment input pointer */ return IVAS_ERR_OK; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index cd4f16aaa72e87ab56219fa4bb2a83205f58997e..41f68b652037f6721543ad487190ba0c27521e38 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -1812,7 +1812,7 @@ static ivas_error initMcBinauralRendering( outSampleRate = *inputMc->base.ctx.pOutSampleRate; - /* TODO tmu : needs review allocate both renderers; needed if headrotation is toggled so the renderer can be switched */ + /* Needs optimization, see issue 513 */ // bool initTDRend; // initTDRend = false; // if ( outConfig != IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM ) @@ -4390,7 +4390,6 @@ static ivas_error renderIsmToBinaural( copyBufferTo2dArray( ismInput->base.inputBuffer, tmpTDRendBuffer ); - /* TODO tmu : missing: interpolation between positions, 5ms rendering */ if ( ( error = ivas_td_binaural_renderer_ext( &ismInput->tdRendWrapper, ismInput->base.inConfig, NULL, @@ -4445,7 +4444,6 @@ static ivas_error renderIsmToBinauralRoom( { copyBufferTo2dArray( ismInput->base.inputBuffer, tmpRendBuffer ); - /* TODO tmu : missing: interpolation between positions, 5ms rendering */ if ( ( error = ivas_td_binaural_renderer_ext( &ismInput->tdRendWrapper, ismInput->base.inConfig, NULL, @@ -4478,9 +4476,9 @@ static ivas_error renderIsmToBinauralRoom( (void) subframe_len; // avoid warning } - /* TODO tmu : missing: interpolation between positions, 5ms rendering */ - /* TODO(sgi): Possible optimization: less processing needed if position didn't change */ - /* TODO tmu2sgi: needs a lot of cleanup, we could also add rot_gains_prev to ismInput and use that */ + /* TODO tmu : see issue #518 */ + /* Possible optimization: less processing needed if position didn't change + * needs a lot of cleanup, we could also add rot_gains_prev to ismInput and use that */ /* previous position gains */ if ( headRotData->headRotEnabled ) { @@ -4871,7 +4869,6 @@ static ivas_error renderMcToBinaural( accumulate2dArrayToBuffer( tmpRendBuffer, &outAudio ); - /* TODO tmu : needs delay compensation */ if ( ( error = renderLfeToBinaural( mcInput, outAudio ) ) != IVAS_ERR_OK ) { return error; @@ -4955,7 +4952,6 @@ static ivas_error renderMcToBinauralRoom( accumulate2dArrayToBuffer( tmpRendBuffer, &outAudio ); - /* TODO tmu : needs delay compensation */ if ( ( error = renderLfeToBinaural( mcInput, outAudio ) ) != IVAS_ERR_OK ) { return error; @@ -5042,7 +5038,6 @@ static ivas_error renderMcCustomLsToBinauralRoom( accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio ); - /* TODO tmu : needs delay compensation */ if ( ( error = renderLfeToBinaural( mcInput, outAudio ) ) != IVAS_ERR_OK ) { return error; @@ -5509,7 +5504,6 @@ static void renderMasaToMc( copyBufferTo2dArray( masaInput->base.inputBuffer, tmpBuffer ); copyMasaMetadataToDiracRenderer( &masaInput->masaMetadata, masaInput->decDummy->hDirAC ); - /* TODO(sgi): Remove code duplication w.r.t. MASA rendering to other output configs */ if ( masaInput->decDummy->renderer_type == RENDERER_STEREO_PARAMETRIC ) { ivas_dirac_dec_binaural( masaInput->decDummy, tmpBuffer, masaInput->base.inputBuffer.config.numChannels ); diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 727a0d8928bbb18d67de68a351407aa85d4ea2f8..33cbd78f56c6a20d34ef5845fe0a4d7818abb355 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -145,7 +145,6 @@ ivas_error IVAS_REND_ConfigureCustomOutputLoudspeakerLayout( const IVAS_CUSTOM_LS_DATA layout /* i : custom loudspeaker layout for renderer output */ ); -/* Support for custom HRTFs will be added in the future. */ /* Note: this affects output delay */ ivas_error IVAS_REND_SetCustomHrtf( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ diff --git a/lib_util/ism_file_writer.c b/lib_util/ism_file_writer.c index 470b02e698b61da0d4f3dbb375fcd6c312cfe9e0..ca845323e72b69afa5c0cd9c1bb1b7228c136676 100644 --- a/lib_util/ism_file_writer.c +++ b/lib_util/ism_file_writer.c @@ -113,7 +113,6 @@ ivas_error IsmFileWriter_writeFrame( file = ismWriter->file; - /* IVAS_fmToDo: work in progress; currently position_azimuth, position_elevation, position_radius, spread, gain_factor */ snprintf( char_buff, sizeof( char_buff ), "%+07.2f,%+06.2f,%05.2f,%06.2f,%04.2f,%+07.2f,%+06.2f,%d\n", ismMetadata.azimuth, ismMetadata.elevation, ismMetadata.radius, ismMetadata.spread, ismMetadata.gainFactor, ismMetadata.yaw, ismMetadata.pitch, ismMetadata.non_diegetic_flag ); if ( file ) { diff --git a/lib_util/tinywaveout_c.h b/lib_util/tinywaveout_c.h index b82c0cd131a20a9fea782b08e523ebdb56ac6e3d..393633a745a76f31626d9120f7112f99e8b775bf 100644 --- a/lib_util/tinywaveout_c.h +++ b/lib_util/tinywaveout_c.h @@ -205,7 +205,7 @@ static WAVEFILEOUT *CreateBWF( wfch.blockAlignment = LittleEndian16( (int16_t) blockAlignment ); wfch.sampleRate = LittleEndian32( sampleRate ); wfch.bytesPerSecond = LittleEndian32( sampleRate * blockAlignment ); - /* tbd: wavfmt ext hdr here */ + /* ToDo: tbd: wavfmt ext hdr here */ /* write to file */ self->fmtChunkOffset = ByteCnt; ByteCnt += (uint32_t) fwrite( &wfch, 1, sizeof( wfch ), self->theFile );