Commit 03fc220a authored by multrus's avatar multrus
Browse files

[cleanup] accept HARMONIZE_2508_InitTransientDetection

parent 1046d8c4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -96,7 +96,6 @@
#define FIX_2402_SIMPLIFY_ARI_CODEC                     /* FhG: basop issue 2402: simplified arithmetic in TCX arithmetic coder */
#define FIX_2402_REPL_EVS_ARI_CODEC_ENC                 /* FhG: basop issue 2402: replace EVS arith encoder with IVAS arith encoder */
#define FIX_BASOP_2551_HARM_SCALAR_QUAN                 /* FhG: issue 2551: Harmonize function pair tcx_scalar_quantization_fx*/
#define HARMONIZE_2508_InitTransientDetection           /* FhG: harmonize GetAttackForTCXDecision derivates for evs/ivas  */
#define HARMONIZE_2564_GetEnergyCldfb                   /* FhG: harmonize GetEnergyCldfb derivates for evs/ivas  */
#define FIX_BASOP_2555_FRAMELEN_CALC                    /* FhG: BASOP issue 2555: Simplify (sub-)framelength calculation in ivas_mdct_core_tns_ns_fx() */
#define FIX_BASOP_2095_REMOVE_TABLES_PT01               /* FhG: BASOP issue 2095: remove unused tables, part 01 */
+0 −8
Original line number Diff line number Diff line
@@ -1211,19 +1211,11 @@ ivas_error init_encoder_fx(

    IF( GT_16( st->element_mode, EVS_MONO ) )
    {
#ifdef HARMONIZE_2508_InitTransientDetection
        InitTransientDetection_fx( input_frame, 0, st->hTranDet, 1, 1 /* > EVS_MONO */ );
#else
        InitTransientDetection_ivas_fx( input_frame, 0, st->hTranDet, 1 );
#endif
    }
    ELSE
    {
#ifdef HARMONIZE_2508_InitTransientDetection
        InitTransientDetection_fx( input_frame, NS2SA_FX2( st->input_Fs, DELAY_FIR_RESAMPL_NS ), st->hTranDet, 0, EVS_MONO );
#else
        InitTransientDetection_fx( input_frame, NS2SA_FX2( st->input_Fs, DELAY_FIR_RESAMPL_NS ), st->hTranDet );
#endif
    }

    /*-----------------------------------------------------------------*
+0 −4
Original line number Diff line number Diff line
@@ -1195,11 +1195,7 @@ static ivas_error ivas_mc_enc_reconfig_fx(
            {
                return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Transient Detection\n" ) );
            }
#ifdef HARMONIZE_2508_InitTransientDetection
            InitTransientDetection_fx( extract_l( Mult_32_16( st->input_Fs, INV_FRAME_PER_SEC_Q15 ) ), NS2SA_FX2( st->input_Fs, DELAY_FIR_RESAMPL_NS ), st->hTranDet, 0, st->element_mode );
#else
            InitTransientDetection_ivas_fx( extract_l( Mult_32_16( st->input_Fs, INV_FRAME_PER_SEC_Q15 ) ), NS2SA_FX2( st->input_Fs, DELAY_FIR_RESAMPL_NS ), st->hTranDet, 0 );
#endif
        }

        IF( st->hIGFEnc == NULL )
+0 −13
Original line number Diff line number Diff line
@@ -883,25 +883,12 @@ void calculate_hangover_attenuation_gain_fx(
 *        Don't include the delay of the MDCT overlap.
 * @param pTransientDetection Structure to be initialized. It contains all transient detectors to be used.
 */
#ifdef HARMONIZE_2508_InitTransientDetection
void InitTransientDetection_fx(
    const Word16 nFrameLength,
    const Word16 nTCXDelay,
    TRAN_DET_HANDLE hTranDet,
    const Word16 ext_mem_flag,
    Word16 element_mode );
#else
void InitTransientDetection_fx(
    const Word16 nFrameLength,
    const Word16 nTCXDelay,
    TRAN_DET_HANDLE hTranDet );

void InitTransientDetection_ivas_fx(
    const Word16 nFrameLength,
    const Word16 nTCXDelay,
    TRAN_DET_HANDLE hTranDet,
    const Word16 ext_mem_flag );
#endif

/** Runs transient detection.
 * Runs all transient detectors defined in pTransientDetection
+0 −4
Original line number Diff line number Diff line
@@ -162,11 +162,7 @@ typedef struct


/* Attack detection function. */
#ifdef HARMONIZE_2508_InitTransientDetection
typedef void ( *TCheckSubblocksForAttack_fx )( Word32 const *pSubblockNrg, Word32 const *pAccSubblockNrg, Word16 nSubblocks, Word16 nPastSubblocks, Word16 attackRatioThreshold, Word16 *pbIsAttackPresent, Word16 *pAttackIndex, Word16 element_mode );
#else
typedef void ( *TCheckSubblocksForAttack_fx )( Word32 const *pSubblockNrg, Word32 const *pAccSubblockNrg, Word16 nSubblocks, Word16 nPastSubblocks, Word16 attackRatioThreshold, Word16 *pbIsAttackPresent, Word16 *pAttackIndex );
#endif

/* Transient detector. */
typedef struct TransientDetector
Loading