Loading lib_com/core_com_config_fx.c +70 −0 Original line number Diff line number Diff line Loading @@ -169,7 +169,74 @@ Word16 get_codec_mode( return codec_mode; /*Q0*/ } #ifdef FIX_2385_GETTCXONLY /*-------------------------------------------------------------------* * getTcxonly() * * *-------------------------------------------------------------------*/ Word16 getTcxonly_fx( const Word16 element_mode, /* i : IVAS element mode Q0*/ const Word32 total_brate, /* i : total bitrate Q0*/ const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) Q0*/ const Word16 is_ism_format /* i : flag indicating ISM format Q0*/ ) { Word16 tcxonly = 0; move16(); Word32 temp_flag; SWITCH( element_mode ) { case EVS_MONO: if ( GT_32( total_brate, ACELP_32k ) ) { tcxonly = 1; move16(); } BREAK; case IVAS_SCE: temp_flag = MAX_ACELP_BRATE; move32(); if ( is_ism_format ) { temp_flag = MAX_ACELP_BRATE_ISM; move32(); } if ( GT_32( total_brate, temp_flag ) ) { tcxonly = 1; move16(); } BREAK; case IVAS_CPE_DFT: case IVAS_CPE_TD: if ( GT_32( total_brate, MAX_ACELP_BRATE ) ) { tcxonly = 1; move16(); } BREAK; case IVAS_CPE_MDCT: temp_flag = IVAS_48k; move32(); if ( MCT_flag ) { temp_flag = IVAS_32k; move32(); } if ( GE_32( total_brate, temp_flag ) ) { tcxonly = 1; move16(); } BREAK; } return tcxonly; /*Q0*/ } #else /*-------------------------------------------------------------------* * getTcxonly_ivas() * Loading Loading @@ -244,6 +311,8 @@ Word16 getTcxonly_ivas_fx( return tcxonly; /*Q0*/ } #endif /* FIX_2385_GETTCXONLY */ #ifndef FIX_2385_GETTCXONLY Word16 getTcxonly( const Word32 total_brate /* i : total bitrate */ Loading Loading @@ -331,6 +400,7 @@ Word16 getTcxonly_fx( return tcxonly; /*Q0*/ } #endif /* FIX_2385_GETTCXONLY */ /*-------------------------------------------------------------------* * getCtxHm() Loading lib_com/ivas_prot_fx.h +2 −0 Original line number Diff line number Diff line Loading @@ -1890,9 +1890,11 @@ void TonalMDCTConceal_Detect_ivas_fx( Word16 element_mode ); #ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_ivas_fx( Decoder_State *st /* i/o: decoder memory state pointer */ ); #endif // !HARMONIZE_2427_GETPLC void ivas_DetectTonalComponents_fx( Word16 indexOfTonalPeak[], Loading lib_com/options.h +3 −1 Original line number Diff line number Diff line Loading @@ -89,11 +89,13 @@ #define FIX_2425_REMOVE_RC_DUPLICATES /* VA: basop issue 2425: Remove duplicated RC encoder functions */ #define HARM_LEV_DURBIN /* VA: basop issue 2423: harmonize levinson-Durbin algorithm */ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ #define HARMONIZE_2427_GETPLC /* FhG: basop issue : 2427 Harmonizing getPLCDecision functions:*/ #define HARM_FD_BWE /* VA: harmonize core-coder FD BWE function duplications */ #define FIX_2411_Harmonize_TNSANALYSIS_DETECTTNSFILT /* FhG: basop issue 2411: harmonize TNSAnalysis*_fx(), DetectTnsFilt*_fx()*/ #define HARMONIZE_READ_DECODE_TNS /* FhG basop 2389: Harm between two pairs of functions. */ #define FIX_FLOAT_1526_DIRAC_MEM_LEAK /* FhG: float issue 1526: potential memory leak in DirAC handles in case of format switching */ #define FIX_2437_HARMONIZE_ENCODERINDEX /* FhG: basop issue 2437 EncoderIndex_ivas_fx() and EncoderIndex_fx()*/ #define FIX_2385_GETTCXONLY /* FhG: issue 2385 : harmonizing getTcxonly_ivas_fx() and getTcxonly_ivas_fx() functions */ #define FIX_2436_RENDERER_CLDFBSTATES_EACH_ISM_INPUT /* #################### End BE switches ################################## */ Loading lib_com/prot_fx.h +4 −1 Original line number Diff line number Diff line Loading @@ -3802,10 +3802,12 @@ Word16 get_cng_mode( Word16 get_codec_mode( const Word32 total_brate /* i : total bitrate */ ); #ifndef FIX_2385_GETTCXONLY Word16 getTcxonly( const Word32 total_brate /* i : total bitrate */ ); #endif Word16 getTcxonly_fx( const Word16 element_mode, /* i : IVAS element mode */ Loading Loading @@ -8474,7 +8476,6 @@ void highPassFiltering_fx( const Word16 hp_filt[], /* i: Q15 high pass filter coefficients */ const Word16 l_fir_fer ); /* i: high pass filter length */ Word16 GetPLCModeDecision_fx( Decoder_State *st ); Loading Loading @@ -10270,6 +10271,7 @@ void configureFdCngEnc_ivas_fx( const Word16 bwidth, /* Q0 */ const Word32 total_brate /* Q0 */ ); #ifndef FIX_2385_GETTCXONLY Word16 getTcxonly_ivas_fx( const Word16 element_mode, /* i : IVAS element mode */ Loading @@ -10277,6 +10279,7 @@ Word16 getTcxonly_ivas_fx( const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/ const Word16 is_ism_format /* i : flag indicating ISM format */ ); #endif void SetModeIndex_ivas_fx( Encoder_State *st, /* i : Encoder state */ Loading lib_dec/core_dec_init_fx.c +11 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,12 @@ void open_decoder_LPD_fx( TCX_LTP_DEC_HANDLE hTcxLtpDec; HQ_DEC_HANDLE hHQ_core; TCX_DEC_HANDLE hTcxDec; #ifdef FIX_2385_GETTCXONLY Word16 MCT_flag; MCT_flag = 0; /* TODO: workaround for future harmonization of functions */ move16(); #endif hBPF = st->hBPF; hBWE_TD = st->hBWE_TD; Loading Loading @@ -67,10 +73,15 @@ void open_decoder_LPD_fx( st->L_frameTCX_past = hTcxDec->L_frameTCX; move16(); } #ifdef FIX_2385_GETTCXONLY st->tcxonly = getTcxonly_fx( st->element_mode, total_brate, MCT_flag, st->is_ism_format ); #else st->tcxonly = getTcxonly( st->total_brate /*, st->is_ism_format Needed in the last version of float IVAS */ ); #endif move16(); /* the TD TCX PLC in MODE1 still runs with 80ms subframes */ Loading Loading
lib_com/core_com_config_fx.c +70 −0 Original line number Diff line number Diff line Loading @@ -169,7 +169,74 @@ Word16 get_codec_mode( return codec_mode; /*Q0*/ } #ifdef FIX_2385_GETTCXONLY /*-------------------------------------------------------------------* * getTcxonly() * * *-------------------------------------------------------------------*/ Word16 getTcxonly_fx( const Word16 element_mode, /* i : IVAS element mode Q0*/ const Word32 total_brate, /* i : total bitrate Q0*/ const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) Q0*/ const Word16 is_ism_format /* i : flag indicating ISM format Q0*/ ) { Word16 tcxonly = 0; move16(); Word32 temp_flag; SWITCH( element_mode ) { case EVS_MONO: if ( GT_32( total_brate, ACELP_32k ) ) { tcxonly = 1; move16(); } BREAK; case IVAS_SCE: temp_flag = MAX_ACELP_BRATE; move32(); if ( is_ism_format ) { temp_flag = MAX_ACELP_BRATE_ISM; move32(); } if ( GT_32( total_brate, temp_flag ) ) { tcxonly = 1; move16(); } BREAK; case IVAS_CPE_DFT: case IVAS_CPE_TD: if ( GT_32( total_brate, MAX_ACELP_BRATE ) ) { tcxonly = 1; move16(); } BREAK; case IVAS_CPE_MDCT: temp_flag = IVAS_48k; move32(); if ( MCT_flag ) { temp_flag = IVAS_32k; move32(); } if ( GE_32( total_brate, temp_flag ) ) { tcxonly = 1; move16(); } BREAK; } return tcxonly; /*Q0*/ } #else /*-------------------------------------------------------------------* * getTcxonly_ivas() * Loading Loading @@ -244,6 +311,8 @@ Word16 getTcxonly_ivas_fx( return tcxonly; /*Q0*/ } #endif /* FIX_2385_GETTCXONLY */ #ifndef FIX_2385_GETTCXONLY Word16 getTcxonly( const Word32 total_brate /* i : total bitrate */ Loading Loading @@ -331,6 +400,7 @@ Word16 getTcxonly_fx( return tcxonly; /*Q0*/ } #endif /* FIX_2385_GETTCXONLY */ /*-------------------------------------------------------------------* * getCtxHm() Loading
lib_com/ivas_prot_fx.h +2 −0 Original line number Diff line number Diff line Loading @@ -1890,9 +1890,11 @@ void TonalMDCTConceal_Detect_ivas_fx( Word16 element_mode ); #ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_ivas_fx( Decoder_State *st /* i/o: decoder memory state pointer */ ); #endif // !HARMONIZE_2427_GETPLC void ivas_DetectTonalComponents_fx( Word16 indexOfTonalPeak[], Loading
lib_com/options.h +3 −1 Original line number Diff line number Diff line Loading @@ -89,11 +89,13 @@ #define FIX_2425_REMOVE_RC_DUPLICATES /* VA: basop issue 2425: Remove duplicated RC encoder functions */ #define HARM_LEV_DURBIN /* VA: basop issue 2423: harmonize levinson-Durbin algorithm */ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ #define HARMONIZE_2427_GETPLC /* FhG: basop issue : 2427 Harmonizing getPLCDecision functions:*/ #define HARM_FD_BWE /* VA: harmonize core-coder FD BWE function duplications */ #define FIX_2411_Harmonize_TNSANALYSIS_DETECTTNSFILT /* FhG: basop issue 2411: harmonize TNSAnalysis*_fx(), DetectTnsFilt*_fx()*/ #define HARMONIZE_READ_DECODE_TNS /* FhG basop 2389: Harm between two pairs of functions. */ #define FIX_FLOAT_1526_DIRAC_MEM_LEAK /* FhG: float issue 1526: potential memory leak in DirAC handles in case of format switching */ #define FIX_2437_HARMONIZE_ENCODERINDEX /* FhG: basop issue 2437 EncoderIndex_ivas_fx() and EncoderIndex_fx()*/ #define FIX_2385_GETTCXONLY /* FhG: issue 2385 : harmonizing getTcxonly_ivas_fx() and getTcxonly_ivas_fx() functions */ #define FIX_2436_RENDERER_CLDFBSTATES_EACH_ISM_INPUT /* #################### End BE switches ################################## */ Loading
lib_com/prot_fx.h +4 −1 Original line number Diff line number Diff line Loading @@ -3802,10 +3802,12 @@ Word16 get_cng_mode( Word16 get_codec_mode( const Word32 total_brate /* i : total bitrate */ ); #ifndef FIX_2385_GETTCXONLY Word16 getTcxonly( const Word32 total_brate /* i : total bitrate */ ); #endif Word16 getTcxonly_fx( const Word16 element_mode, /* i : IVAS element mode */ Loading Loading @@ -8474,7 +8476,6 @@ void highPassFiltering_fx( const Word16 hp_filt[], /* i: Q15 high pass filter coefficients */ const Word16 l_fir_fer ); /* i: high pass filter length */ Word16 GetPLCModeDecision_fx( Decoder_State *st ); Loading Loading @@ -10270,6 +10271,7 @@ void configureFdCngEnc_ivas_fx( const Word16 bwidth, /* Q0 */ const Word32 total_brate /* Q0 */ ); #ifndef FIX_2385_GETTCXONLY Word16 getTcxonly_ivas_fx( const Word16 element_mode, /* i : IVAS element mode */ Loading @@ -10277,6 +10279,7 @@ Word16 getTcxonly_ivas_fx( const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/ const Word16 is_ism_format /* i : flag indicating ISM format */ ); #endif void SetModeIndex_ivas_fx( Encoder_State *st, /* i : Encoder state */ Loading
lib_dec/core_dec_init_fx.c +11 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,12 @@ void open_decoder_LPD_fx( TCX_LTP_DEC_HANDLE hTcxLtpDec; HQ_DEC_HANDLE hHQ_core; TCX_DEC_HANDLE hTcxDec; #ifdef FIX_2385_GETTCXONLY Word16 MCT_flag; MCT_flag = 0; /* TODO: workaround for future harmonization of functions */ move16(); #endif hBPF = st->hBPF; hBWE_TD = st->hBWE_TD; Loading Loading @@ -67,10 +73,15 @@ void open_decoder_LPD_fx( st->L_frameTCX_past = hTcxDec->L_frameTCX; move16(); } #ifdef FIX_2385_GETTCXONLY st->tcxonly = getTcxonly_fx( st->element_mode, total_brate, MCT_flag, st->is_ism_format ); #else st->tcxonly = getTcxonly( st->total_brate /*, st->is_ism_format Needed in the last version of float IVAS */ ); #endif move16(); /* the TD TCX PLC in MODE1 still runs with 80ms subframes */ Loading