Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ #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. */ /* #################### End 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 +25 −9 Original line number Diff line number Diff line Loading @@ -8291,7 +8291,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 void ReadTnsData_fx( STnsConfig const *pTnsConfig, Decoder_State *st, Word16 *pnBits, Word16 *stream, Word16 *pnSize ); Word16 DecodeTnsData_fx( STnsConfig const *pTnsConfig, Word16 const *stream, /*Q0*/ Word16 *pnSize, /*Q0*/ STnsData *pTnsData ); #else Word16 ReadTnsData( STnsConfig const *pTnsConfig, Decoder_State *st, Loading @@ -8318,6 +8332,7 @@ Word16 DecodeTnsData_ivas_fx( Word16 *pnSize, STnsData *pTnsData ); #endif void GetParameters( ParamsBitMap const *paramsBitMap, const Word16 nParams, Loading Loading @@ -10981,12 +10996,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 @@ -10994,7 +11003,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 @@ -11002,6 +11011,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 ReadTnsData_fx( 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 ReadTnsData_fx( 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 ReadTnsData_fx( 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 +12 −1 Original line number Diff line number Diff line Loading @@ -297,11 +297,17 @@ void decoder_tcx_fx( IF( ( bfi == 0 ) && ( hTcxCfg->fIsTNSAllowed != 0 ) ) { cast16(); #ifdef HARMONIZE_READ_DECODE_TNS fUseTns = (Word8) DecodeTnsData_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, &tnsData ); #else fUseTns = (Word8) DecodeTnsData( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, &tnsData ); #endif // HARMONIZE_READ_DECODE_TNS } ELSE { Loading Loading @@ -4200,7 +4206,12 @@ void decoder_tcx_invQ_fx( test(); IF( !bfi && hTcxCfg->fIsTNSAllowed ) { #ifdef HARMONIZE_READ_DECODE_TNS *fUseTns = DecodeTnsData_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); #else *fUseTns = DecodeTnsData_ivas_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); #endif // HARMONIZE_READ_DECODE_TNS move16(); } ELSE Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,7 @@ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ #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. */ /* #################### End 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 +25 −9 Original line number Diff line number Diff line Loading @@ -8291,7 +8291,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 void ReadTnsData_fx( STnsConfig const *pTnsConfig, Decoder_State *st, Word16 *pnBits, Word16 *stream, Word16 *pnSize ); Word16 DecodeTnsData_fx( STnsConfig const *pTnsConfig, Word16 const *stream, /*Q0*/ Word16 *pnSize, /*Q0*/ STnsData *pTnsData ); #else Word16 ReadTnsData( STnsConfig const *pTnsConfig, Decoder_State *st, Loading @@ -8318,6 +8332,7 @@ Word16 DecodeTnsData_ivas_fx( Word16 *pnSize, STnsData *pTnsData ); #endif void GetParameters( ParamsBitMap const *paramsBitMap, const Word16 nParams, Loading Loading @@ -10981,12 +10996,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 @@ -10994,7 +11003,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 @@ -11002,6 +11011,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 ReadTnsData_fx( 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 ReadTnsData_fx( 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 ReadTnsData_fx( 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 +12 −1 Original line number Diff line number Diff line Loading @@ -297,11 +297,17 @@ void decoder_tcx_fx( IF( ( bfi == 0 ) && ( hTcxCfg->fIsTNSAllowed != 0 ) ) { cast16(); #ifdef HARMONIZE_READ_DECODE_TNS fUseTns = (Word8) DecodeTnsData_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, &tnsData ); #else fUseTns = (Word8) DecodeTnsData( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, &tnsData ); #endif // HARMONIZE_READ_DECODE_TNS } ELSE { Loading Loading @@ -4200,7 +4206,12 @@ void decoder_tcx_invQ_fx( test(); IF( !bfi && hTcxCfg->fIsTNSAllowed ) { #ifdef HARMONIZE_READ_DECODE_TNS *fUseTns = DecodeTnsData_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); #else *fUseTns = DecodeTnsData_ivas_fx( hTcxCfg->pCurrentTnsConfig, prm_tns, &tnsSize, tnsData ); #endif // HARMONIZE_READ_DECODE_TNS move16(); } ELSE Loading