Commit ca907584 authored by Adam Mills's avatar Adam Mills
Browse files

Adding in a switch for the code changes

parent 4725d6c2
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1424,6 +1424,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;

+7 −0
Original line number Diff line number Diff line
@@ -62,7 +62,11 @@ void ivas_filters_init(
    int16_t i;
    filter_state->order = order;

#ifdef NONBE_FIX_MC_LFE_LPF
    if ( order == IVAS_FILTER_ORDER_1 )
#else
    if ( order == IVAS_FILTER_ORDER_2 || order == IVAS_FILTER_ORDER_1 )
#endif
    {
        filter_state->filt_len = order + 1;

@@ -116,6 +120,9 @@ void ivas_filter_process(
    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( filter_state, pIn_Out, length, IVAS_FILTER_STAGE_0 );
            break;
        case IVAS_FILTER_ORDER_4:
+18 −0
Original line number Diff line number Diff line
@@ -60,6 +60,24 @@ void ivas_lfe_lpf_select_filt_coeff(
{
    switch ( order )
    {
#ifndef NONBE_FIX_MC_LFE_LPF
        case IVAS_FILTER_ORDER_2:
            switch ( sampling_rate )
            {
                case 16000:
                    *ppFilt_coeff = ivas_lpf_2_butter_16k;
                    break;
                case 32000:
                    *ppFilt_coeff = ivas_lpf_2_butter_32k;
                    break;
                case 48000:
                    *ppFilt_coeff = ivas_lpf_2_butter_48k;
                    break;
                default:
                    break;
            }
            break;
#endif
        case IVAS_FILTER_ORDER_4:
            switch ( sampling_rate )
            {
+4 −0
Original line number Diff line number Diff line
@@ -5507,7 +5507,11 @@ void ivas_lfe_enc(
ivas_error ivas_create_lfe_dec( 
    LFE_DEC_HANDLE *hLFE_out,                                   /* o  : IVAS LFE decoder structure              */
    const int32_t output_Fs,                                    /* i  : output sampling rate                    */
#ifdef NONBE_FIX_MC_LFE_LPF
    const int32_t delay_ns                                      /* i  : additional LFE delay to sync other channel outputs */
#else
    const int32_t binauralization_delay_ns                      /* i  : additional LFE delay to sync with binaural renderer */
#endif
);

void ivas_lfe_dec_close( 
+7 −0
Original line number Diff line number Diff line
@@ -3079,6 +3079,12 @@ const float ivas_lpf_4_butter_48k_sos[IVAS_BIQUAD_FILT_LEN << 2] =
    1.00000000471366f, 1.f , -1.98677297369091f,    0.987060670205863f 
};
#ifndef NONBE_FIX_MC_LFE_LPF
const float ivas_lpf_2_butter_16k[IVAS_BIQUAD_FILT_LEN << 1] = 
{
    0.000628720643081143f,    0.00125744128616229f, 0.000628720643081143f, 1.f, -1.92783286977036f,    0.930347752342683f 
};
const float ivas_lpf_2_butter_32k[IVAS_BIQUAD_FILT_LEN << 1] = 
{
    0.000159990787823749f,    0.000319981575647499f,    0.000159990787823749f, 1.f, -1.96390539174033f,    0.964545354891623f 
@@ -3088,6 +3094,7 @@ const float ivas_lpf_2_butter_48k[IVAS_BIQUAD_FILT_LEN << 1] =
{
    7.15317998432330e-05f,    0.000143063599686466f,    7.15317998432330e-05f, 1.f, -1.97593552482925f,    0.976221652028620f 
};
#endif
const ivas_lfe_freq_models ivas_str_lfe_freq_models = 
{
Loading