Commit 58c3c80f authored by Devansh Kandpal's avatar Devansh Kandpal
Browse files

Fixed Q format and cleaned up interpolate_acoustic_data()

parent 456adba6
Loading
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -872,8 +872,6 @@ void ivas_reverb_interp_on_freq_grid_fx(
            move16();
            rel_offset = 0;
            move32();
            rel_offset_e = 0;
            move16();
        }
        ELSE
        {
@@ -882,10 +880,8 @@ void ivas_reverb_interp_on_freq_grid_fx(
            {
                input_idx = sub( input_grid_size, 2 );
                input_idx_next = add( input_idx, 1 );
                rel_offset = ONE_IN_Q15;
                rel_offset = ONE_IN_Q31;
                move32();
                rel_offset_e = 1;
                move16();
            }
            /* otherwise use linear interpolation between 2 consecutive points in the input table */
            ELSE
@@ -895,10 +891,8 @@ void ivas_reverb_interp_on_freq_grid_fx(
                    input_idx = add( input_idx, 1 );
                }
                input_idx_next = add( input_idx, 1 );
                rel_offset = BASOP_Util_Divide3232_Scale( L_sub( pOutput_fc[output_idx], pInput_fc[input_idx] ), L_sub( pInput_fc[input_idx + 1], pInput_fc[input_idx] ), &rel_offset_e ); // Q15
                rel_offset = L_shl_sat( rel_offset, add( 16, rel_offset_e ) );
                rel_offset_e = 0;
                move16();
                rel_offset = BASOP_Util_Divide3232_Scale( L_sub( pOutput_fc[output_idx], pInput_fc[input_idx] ), L_sub( pInput_fc[input_idx_next], pInput_fc[input_idx] ), &rel_offset_e ); // Q15
                rel_offset = L_shl_sat( rel_offset, add( 16, rel_offset_e ) );                                                                                                              // Q31
            }
        }

+0 −1
Original line number Diff line number Diff line
@@ -85,7 +85,6 @@ ivas_error ivas_reverb_prepare_cldfb_params(
    }

    ivas_reverb_interp_on_freq_grid_fx( pInput_params->nBands, pInput_params->pFc_input_fx, pInput_params->pAcoustic_rt60_fx, CLDFB_NO_CHANNELS_MAX, output_fc_fx, output_t60_fx ); // Q26
    ivas_reverb_interp_on_freq_grid_fx( pInput_params->nBands, pInput_params->pFc_input_fx, pInput_params->pAcoustic_dsr_fx, CLDFB_NO_CHANNELS_MAX, output_fc_fx, output_ene_fx );  // Q30

    /* adjust DSR for the delay difference */
    delay_diff_fx = L_sub( pInput_params->inputPreDelay_fx, pInput_params->acousticPreDelay_fx ); // Q27