Commit 0e798db4 authored by multrus's avatar multrus
Browse files

[cleanup] accept HARM_2456_APPLY_SCALE

parent cf21d21e
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -872,11 +872,7 @@ void cng_params_upd_fx(
            Word16 index = 0;
            move32();
            move16();
#ifdef HARM_2456_APPLY_SCALE
            index = apply_scale_ind( &att_fx, bwidth, last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO );
#else
            apply_scale_ivas_fx( &att_fx, bwidth, last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO, &index );
#endif
            att_fx = pow_10_q23[index]; // Q23
            move32();
            tmp = extract_h( att_fx ); // Q7
+0 −28
Original line number Diff line number Diff line
@@ -1759,34 +1759,6 @@ Word16 apply_scale_ind(
    return i;
}

#ifndef HARM_2456_APPLY_SCALE
void apply_scale_ivas_fx(
    Word32 *scale,                 /* o  : scalefactor             */
    const Word16 bwmode,           /* i  : audio bandwidth         */
    const Word32 bitrate,          /* i  : Bit rate                */
    const SCALE_SETUP *scaleTable, /* i  : Scale table Q7             */
    const Word16 scaleTableSize,   /* i  : Size of scale table     */
    Word16 *index )
{
    Word16 i;
    FOR( i = 0; i < scaleTableSize; i++ )
    {
        cast16();
        IF( s_and( (Word16) EQ_16( bwmode, (Word16) scaleTable[i].bwmode ),
                   s_and( L_sub( bitrate, scaleTable[i].bitrateFrom ) >= 0,
                          L_sub( bitrate, scaleTable[i].bitrateTo ) < 0 ) ) )
        {
            BREAK;
        }
    }
    assert( i < scaleTableSize );

    *scale = L_add( *scale, L_deposit_h( scaleTable[i].scale ) );
    move32();
    *index = i;
    move16();
}
#endif
/*-------------------------------------------------------------------
 * bandcombinepow()
 *
+0 −1
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define HARM_HQ_CORE_KEEP_BE                            /* hack to keep all BE after HQ core functions harmonization; pending resolving issues #2450, #2451, #2452 */
#define HARM_2456_APPLY_SCALE                           /* FhG basop issue 2456: Harmonize apply_scale_ind(), apply_scale_ivas_fx() */
#define HARM_2454_TCX_RES_Q_SPEC                        /* FhG: harmonization of tcx_res_Q_spec_fx() and tcx_res_Q_spec_ivas_fx() */
#define FIX_FLOAT_1535_ARI_RES_Q_CLEANUP                /* FhG: remove dead code from tcx_ari_res_Q_spec() */
#define HQ_ALIGN_DUPLICATED_CODE                        /* Eri: Align duplicated code */
+0 −9
Original line number Diff line number Diff line
@@ -4708,15 +4708,6 @@ Word16 apply_scale_ind(
    const SCALE_SETUP *scaleTable, /* i  : Scale table             */
    const Word16 scaleTableSize    /* i  : Size of scale table     */
);
#ifndef HARM_2456_APPLY_SCALE
void apply_scale_ivas_fx(
    Word32 *scale,                 /* o  : scalefactor             */
    const Word16 bwmode,           /* i  : audio bandwidth         */
    const Word32 bitrate,          /* i  : Bit rate                */
    const SCALE_SETUP *scaleTable, /* i  : Scale table             */
    const Word16 scaleTableSize,   /* i  : Size of scale table     */
    Word16 *index );
#endif

/* Compute the power for each partition */
void bandcombinepow(
+0 −6
Original line number Diff line number Diff line
@@ -1679,14 +1679,8 @@ static Word16 shb_DTX_fx(
    {
        Word32 att_fx32 = 0;
        move32();
#ifdef HARM_2456_APPLY_SCALE

        apply_scale( &att_fx32, st->hFdCngEnc->hFdCngCom->CngBandwidth, st->hFdCngEnc->hFdCngCom->CngBitrate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO ); // Q23;
#else
        Word16 index;

        apply_scale_ivas_fx( &att_fx32, st->hFdCngEnc->hFdCngCom->CngBandwidth, st->hFdCngEnc->hFdCngCom->CngBitrate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO, &index ); // Q23;
#endif

        att_fx = extract_l( L_shr( att_fx32, 15 ) ); // Q8
    }