Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ #define FIX_2391_INIT_HQ_GENERIC_OFFSET /* FhG/Eri: basop issue 2391: make sure hq_generic_offset is initialized inside hq_hr_dec_fx() */ #define FIX_2397_COPY_AQ_MDCT_CORE_BFI /* FhG: prevent copying of uninit memory in MDCT stereo core if bfi is set */ #define HARMONIZE_TBE /* VA: harmonize core-coder TBE function duplications */ #define HARMONIZE_READ_DECODE_TNS /* FhG: issue 2389: Harmonization of two pairs ReadTnsData() and DecodeTnsData()*/ /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ Loading lib_com/parameter_bitmaping_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -228,8 +228,15 @@ void SetParameters_fx( IF( s_and( param->pSubParamBitMap != NULL, value > 0 ) ) { pTmp = pParameter; #ifdef HARMONIZE_READ_DECODE_TNS if ( pSubStruct != NULL ) { pTmp = pSubStruct; } #else if ( pSubStruct != NULL ) pTmp = pSubStruct; #endif SetParameters( param->pSubParamBitMap, value, pTmp, pStream, pnSize ); } } Loading lib_com/prot_fx.h +23 −7 Original line number Diff line number Diff line Loading @@ -8375,7 +8375,21 @@ void tcx_hm_modify_envelope( Word32 env[], /* i/o: envelope Q16 */ Word16 L_frame /* i: number of spectral lines Q0 */ ); #ifdef HARMONIZE_READ_DECODE_TNS Word16 ReadTnsData( STnsConfig const *pTnsConfig, Decoder_State *st, Word16 *pnBits, Word16 *stream, Word16 *pnSize ); Word16 DecodeTnsData( STnsConfig const *pTnsConfig, Word16 const *stream, /*Q0*/ Word16 *pnSize, /*Q0*/ STnsData *pTnsData ); #else Word16 ReadTnsData( STnsConfig const *pTnsConfig, Decoder_State *st, Loading @@ -8402,6 +8416,7 @@ Word16 DecodeTnsData_ivas_fx( Word16 *pnSize, STnsData *pTnsData ); #endif void GetParameters( ParamsBitMap const *paramsBitMap, const Word16 nParams, Loading Loading @@ -11062,12 +11077,6 @@ void EncodeTnsData( Word16 *pnBits /* o : number of written bits */ ); Word16 DecodeTnsData_ivas( STnsConfig const *pTnsConfig, const Word16 *stream, Word16 *pnSize, STnsData *pTnsData ); void WriteTnsData( const STnsConfig *pTnsConfig, /* i : TNS Configuration struct */ const Word16 *stream, /* i : internal data stream */ Loading @@ -11075,7 +11084,7 @@ void WriteTnsData( BSTR_ENC_HANDLE hBstr, /* o : bitstream */ Word16 *pnBits /* o : number of written bits */ ); #ifndef HARMONIZE_READ_DECODE_TNS void ReadTnsData_ivas( STnsConfig const *pTnsConfig, Decoder_State *st, Loading @@ -11083,6 +11092,13 @@ void ReadTnsData_ivas( Word16 *stream, Word16 *pnSize ); Word16 DecodeTnsData_ivas( STnsConfig const *pTnsConfig, const Word16 *stream, Word16 *pnSize, STnsData *pTnsData ); #endif // HARMONIZE_READ_DECODE_TNS void analysisCldfbEncoder_ivas_fx( Encoder_State *st, /* i/o: encoder state structure */ Word32 *timeIn, /*q11*/ lib_dec/dec_prm_fx.c +16 −1 Original line number Diff line number Diff line Loading @@ -394,7 +394,13 @@ void getTCXparam_fx( } ELSE { #ifdef HARMONIZE_READ_DECODE_TNS (void) ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st0, &nTnsBits, prm + j, &nTnsParams ); #else ReadTnsData_ivas_fx( st->hTcxCfg->pCurrentTnsConfig, st0, &nTnsBits, prm + j, &nTnsParams ); #endif // HARMONIZE_READ_DECODE_TNS } hTcxDec->tnsActive[k] = 0; // Q0 move16(); Loading Loading @@ -1351,7 +1357,11 @@ void dec_prm_fx( IF( st->hTcxCfg->fIsTNSAllowed ) { SetTnsConfig( st->hTcxCfg, 1, (Word16) EQ_16( st->last_core_from_bs, ACELP_CORE ) ); #ifdef HARMONIZE_READ_DECODE_TNS (void) ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #else ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #endif // HARMONIZE_READ_DECODE_TNS j = add( j, nTnsParams ); // Q0 } Loading Loading @@ -1675,8 +1685,13 @@ void dec_prm_fx( test(); test(); SetTnsConfig( st->hTcxCfg, 0, ( st->last_core_from_bs == ACELP_CORE ) && ( k == 0 ) ); #ifdef HARMONIZE_READ_DECODE_TNS (void) ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #else ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #endif // DEBUG j = add( j, nTnsParams ); } Loading lib_dec/dec_tcx_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -4204,7 +4204,7 @@ void decoder_tcx_invQ_fx( test(); IF( !bfi && hTcxCfg->fIsTNSAllowed ) { *fUseTns = DecodeTnsData_ivas_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); *fUseTns = DecodeTnsData( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); move16(); } ELSE Loading Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ #define FIX_2391_INIT_HQ_GENERIC_OFFSET /* FhG/Eri: basop issue 2391: make sure hq_generic_offset is initialized inside hq_hr_dec_fx() */ #define FIX_2397_COPY_AQ_MDCT_CORE_BFI /* FhG: prevent copying of uninit memory in MDCT stereo core if bfi is set */ #define HARMONIZE_TBE /* VA: harmonize core-coder TBE function duplications */ #define HARMONIZE_READ_DECODE_TNS /* FhG: issue 2389: Harmonization of two pairs ReadTnsData() and DecodeTnsData()*/ /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ Loading
lib_com/parameter_bitmaping_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -228,8 +228,15 @@ void SetParameters_fx( IF( s_and( param->pSubParamBitMap != NULL, value > 0 ) ) { pTmp = pParameter; #ifdef HARMONIZE_READ_DECODE_TNS if ( pSubStruct != NULL ) { pTmp = pSubStruct; } #else if ( pSubStruct != NULL ) pTmp = pSubStruct; #endif SetParameters( param->pSubParamBitMap, value, pTmp, pStream, pnSize ); } } Loading
lib_com/prot_fx.h +23 −7 Original line number Diff line number Diff line Loading @@ -8375,7 +8375,21 @@ void tcx_hm_modify_envelope( Word32 env[], /* i/o: envelope Q16 */ Word16 L_frame /* i: number of spectral lines Q0 */ ); #ifdef HARMONIZE_READ_DECODE_TNS Word16 ReadTnsData( STnsConfig const *pTnsConfig, Decoder_State *st, Word16 *pnBits, Word16 *stream, Word16 *pnSize ); Word16 DecodeTnsData( STnsConfig const *pTnsConfig, Word16 const *stream, /*Q0*/ Word16 *pnSize, /*Q0*/ STnsData *pTnsData ); #else Word16 ReadTnsData( STnsConfig const *pTnsConfig, Decoder_State *st, Loading @@ -8402,6 +8416,7 @@ Word16 DecodeTnsData_ivas_fx( Word16 *pnSize, STnsData *pTnsData ); #endif void GetParameters( ParamsBitMap const *paramsBitMap, const Word16 nParams, Loading Loading @@ -11062,12 +11077,6 @@ void EncodeTnsData( Word16 *pnBits /* o : number of written bits */ ); Word16 DecodeTnsData_ivas( STnsConfig const *pTnsConfig, const Word16 *stream, Word16 *pnSize, STnsData *pTnsData ); void WriteTnsData( const STnsConfig *pTnsConfig, /* i : TNS Configuration struct */ const Word16 *stream, /* i : internal data stream */ Loading @@ -11075,7 +11084,7 @@ void WriteTnsData( BSTR_ENC_HANDLE hBstr, /* o : bitstream */ Word16 *pnBits /* o : number of written bits */ ); #ifndef HARMONIZE_READ_DECODE_TNS void ReadTnsData_ivas( STnsConfig const *pTnsConfig, Decoder_State *st, Loading @@ -11083,6 +11092,13 @@ void ReadTnsData_ivas( Word16 *stream, Word16 *pnSize ); Word16 DecodeTnsData_ivas( STnsConfig const *pTnsConfig, const Word16 *stream, Word16 *pnSize, STnsData *pTnsData ); #endif // HARMONIZE_READ_DECODE_TNS void analysisCldfbEncoder_ivas_fx( Encoder_State *st, /* i/o: encoder state structure */ Word32 *timeIn, /*q11*/
lib_dec/dec_prm_fx.c +16 −1 Original line number Diff line number Diff line Loading @@ -394,7 +394,13 @@ void getTCXparam_fx( } ELSE { #ifdef HARMONIZE_READ_DECODE_TNS (void) ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st0, &nTnsBits, prm + j, &nTnsParams ); #else ReadTnsData_ivas_fx( st->hTcxCfg->pCurrentTnsConfig, st0, &nTnsBits, prm + j, &nTnsParams ); #endif // HARMONIZE_READ_DECODE_TNS } hTcxDec->tnsActive[k] = 0; // Q0 move16(); Loading Loading @@ -1351,7 +1357,11 @@ void dec_prm_fx( IF( st->hTcxCfg->fIsTNSAllowed ) { SetTnsConfig( st->hTcxCfg, 1, (Word16) EQ_16( st->last_core_from_bs, ACELP_CORE ) ); #ifdef HARMONIZE_READ_DECODE_TNS (void) ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #else ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #endif // HARMONIZE_READ_DECODE_TNS j = add( j, nTnsParams ); // Q0 } Loading Loading @@ -1675,8 +1685,13 @@ void dec_prm_fx( test(); test(); SetTnsConfig( st->hTcxCfg, 0, ( st->last_core_from_bs == ACELP_CORE ) && ( k == 0 ) ); #ifdef HARMONIZE_READ_DECODE_TNS (void) ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #else ReadTnsData( st->hTcxCfg->pCurrentTnsConfig, st, &nTnsBits, prm + j, &nTnsParams ); #endif // DEBUG j = add( j, nTnsParams ); } Loading
lib_dec/dec_tcx_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -4204,7 +4204,7 @@ void decoder_tcx_invQ_fx( test(); IF( !bfi && hTcxCfg->fIsTNSAllowed ) { *fUseTns = DecodeTnsData_ivas_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); *fUseTns = DecodeTnsData( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); move16(); } ELSE Loading