Commit 89202aba authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

applied hp20_fx_32 optimization as hp20_fx_32_opt in decoder

parent 8f7e2fa8
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -341,7 +341,7 @@ void hp20( Word16 signal[], /* i/o: signal to filter any *


#ifdef HP20_FIX32_RECODING
void hp20_fx_32(
void hp20_fx_32_opt(
    Word32 signal_fx[],
    const Word16 lg,
    Word32 mem_fx[],
@@ -513,7 +513,7 @@ void hp20_fx_32(

    return;
}
#else
#endif
void hp20_fx_32(
    Word32 signal_fx[],
    const Word16 lg,
@@ -698,4 +698,3 @@ void hp20_fx_32(

    return;
}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@

#define FIX_1962_FORMAT_CONV_SPECTRAL_DIFF                   /* FhG: Improved precision of targetEnergy in ivas_ls_setup_conversion_process_mdct_fx() */
#define FIX_2003_CON_TCX_OVERFLOW                            /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */
#define HP20_FIX32_RECODING                                  /* FhG: reduced headroom in hp20_fx_32 calculation */
#define HP20_FIX32_RECODING                                  /* FhG: optimized hp20_fx_32 calculation and applied it as hp20_fx_32_opt in decoder */
/* #################### Start BASOP porting switches ############################ */

#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */
+36 −0
Original line number Diff line number Diff line
@@ -159,7 +159,11 @@ ivas_error ivas_jbm_dec_tc_fx(
        /* HP filtering */
        FOR( n = 0; n < s_min( nchan_out, st_ivas->nchan_transport ); n++ )
        {
#ifdef HP20_FIX32_RECODING
            hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
            hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
        }
    }
    ELSE IF( EQ_32( st_ivas->ivas_format, ISM_FORMAT ) )
@@ -226,7 +230,11 @@ ivas_error ivas_jbm_dec_tc_fx(
            }

            /* HP filtering */
#ifdef HP20_FIX32_RECODING
            hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
            hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
        }

        test();
@@ -577,7 +585,11 @@ ivas_error ivas_jbm_dec_tc_fx(
        /* HP filtering */
        FOR( n = 0; n < nchan_remapped; n++ )
        {
#ifdef HP20_FIX32_RECODING
            hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
            hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
        }

        IF( EQ_32( st_ivas->ivas_format, SBA_FORMAT ) )
@@ -770,7 +782,11 @@ ivas_error ivas_jbm_dec_tc_fx(

        FOR( n = 0; n < getNumChanSynthesis( st_ivas ); n++ )
        {
#ifdef HP20_FIX32_RECODING
            hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
            hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
        }

        Word16 output_q = 11;
@@ -1009,7 +1025,11 @@ ivas_error ivas_jbm_dec_tc_fx(
        /* HP filtering */
        FOR( n = 0; n < getNumChanSynthesis( st_ivas ); n++ )
        {
#ifdef HP20_FIX32_RECODING
            hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
            hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
        }

        nchan_remapped = ivas_sba_remapTCs_fx( &p_output_fx[sba_ch_idx], st_ivas, output_frame );
@@ -1122,7 +1142,11 @@ ivas_error ivas_jbm_dec_tc_fx(
            {
                IF( NE_16( n, LFE_CHANNEL ) )
                {
#ifdef HP20_FIX32_RECODING
                    hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
                    hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
                }
            }

@@ -1180,7 +1204,11 @@ ivas_error ivas_jbm_dec_tc_fx(
            {
                IF( NE_16( n, LFE_CHANNEL ) )
                {
#ifdef HP20_FIX32_RECODING
                    hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
                    hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
                }
            }

@@ -1246,7 +1274,11 @@ ivas_error ivas_jbm_dec_tc_fx(
            /* HP filtering */
            FOR( n = 0; n < st_ivas->nchan_transport; n++ )
            {
#ifdef HP20_FIX32_RECODING
                hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
                hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
            }

            /* Rendering */
@@ -1460,7 +1492,11 @@ ivas_error ivas_jbm_dec_tc_fx(
            /* HP filtering */
            FOR( n = 0; n < getNumChanSynthesis( st_ivas ); n++ )
            {
#ifdef HP20_FIX32_RECODING
                hp20_fx_32_opt( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#else
                hp20_fx_32( p_output_fx[n], output_frame, st_ivas->mem_hp20_out_fx[n], output_Fs );
#endif
            }

            IF( EQ_32( st_ivas->renderer_type, RENDERER_MCMASA_MONO_STEREO ) )