Commit 97d71705 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Merge branch '1862_basop_mr1517_lfe_lpf' into 'main'

[non-BE][split-non-BE][allow regression] BASOP fix for issue 1862

See merge request !1992
parents 5f80c06d 71e8a35b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1562,7 +1562,9 @@ typedef enum
typedef enum
{
    IVAS_FILTER_ORDER_1 = 1,
#ifndef NONBE_FIX_MC_LFE_LPF
    IVAS_FILTER_ORDER_2 = 2,
#endif
    IVAS_FILTER_ORDER_4 = 4,
} ivas_filter_order;

+8 −0
Original line number Diff line number Diff line
@@ -64,7 +64,11 @@ void ivas_filters_init_fx(


    test();
#ifdef NONBE_FIX_MC_LFE_LPF
    IF( EQ_16( order, IVAS_FILTER_ORDER_1 ) )
#else
    IF( EQ_16( order, IVAS_FILTER_ORDER_2 ) || EQ_16( order, IVAS_FILTER_ORDER_1 ) )
#endif
    {
        filter_state->filt_len = add( order, 1 );
        move16();
@@ -166,7 +170,9 @@ void ivas_filter_process_fx(
    SWITCH( filter_state->order )
    {
        case IVAS_FILTER_ORDER_1:
#ifndef NONBE_FIX_MC_LFE_LPF
        case IVAS_FILTER_ORDER_2:
#endif
            set_val_Word16( pIn_Out_e, sub( Q31, q_factor ), length );
            ivas_iir_2_filter_fx( filter_state, pIn_Out_fx, length, IVAS_FILTER_STAGE_0, pIn_Out_e );
            /* Scale pIn_Out_fx back to input Q */
@@ -205,7 +211,9 @@ void ivas_filter_process_exp_fx(
    SWITCH( filter_state->order )
    {
        case IVAS_FILTER_ORDER_1:
#ifndef NONBE_FIX_MC_LFE_LPF
        case IVAS_FILTER_ORDER_2:
#endif
            ivas_iir_2_filter_fx( filter_state, pIn_Out_fx, length, IVAS_FILTER_STAGE_0, pIn_Out_e );
            /* Scale pIn_Out_fx back to input Q */
            BREAK;
+3 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ void ivas_lfe_lpf_select_filt_coeff_fx(
{
    SWITCH( order )
    {

#ifndef NONBE_FIX_MC_LFE_LPF
        case IVAS_FILTER_ORDER_2:
            SWITCH( sampling_rate )
            {
@@ -74,6 +76,7 @@ void ivas_lfe_lpf_select_filt_coeff_fx(
                    BREAK;
            }
            BREAK;
#endif
        case IVAS_FILTER_ORDER_4:
            SWITCH( sampling_rate )
            {
+4 −0
Original line number Diff line number Diff line
@@ -864,7 +864,11 @@ void ivas_lfe_dec_close_fx(
ivas_error ivas_create_lfe_dec_fx(
    LFE_DEC_HANDLE *hLFE_out,             /* o  : IVAS LFE decoder structure                           */
    const Word32 output_Fs,               /* i  : output sampling rate                                 */
#ifdef NONBE_FIX_MC_LFE_LPF
    const Word32 delay_ns                 /* i  : additional LFE delay to sync other channel outputs */
#else
    const Word32 binauralization_delay_ns /* i  : additional LFE delay to sync with binaural renderer  */
#endif
);

void ivas_lfe_dec_fx(
+3 −0
Original line number Diff line number Diff line
@@ -2585,6 +2585,9 @@ const Word16 ivas_lfe_num_dct_pass_bins_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP] = { 8
const Word16 ivas_lfe_min_shift_tbl[IVAS_LFE_NUM_COEFFS_IN_SUBGRP] = { 1, 0 };

const Word16 ivas_lfe_lpf_delay_Q15[2] = { 57, 114 };
#ifdef NONBE_FIX_MC_LFE_LPF
const Word32 ivas_lfe_lpf_delay_ns[2] = { 1750000, 3500000 };
#endif

const Word16 dirac_gains_P_idx[16] = 
{
Loading