Commit 74da034e authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

avoid arithmetic with NULL pointers in DirAC synthesis

parent 93521388
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1522,7 +1522,10 @@ void ivas_dirac_dec_output_synthesis_process_subframe_psd_ls(
        }

        /*Diffuse stream*/
        if ( h_dirac_output_synthesis_params->max_band_decorr != 0 )
        {
            p_power_smooth_diff = h_dirac_output_synthesis_state->proto_diffuse_buffer_f + buf_idx * 2 * h_dirac_output_synthesis_params->max_band_decorr * nchan_out_woLFE;
        }
        p_gain_1 = gains_diff;
        p_gain_2 = h_dirac_output_synthesis_state->gains_diff_prev;
        for ( k = 0; k < nchan_out_woLFE; k++ )
+5 −0
Original line number Diff line number Diff line
@@ -1642,6 +1642,11 @@ void ivas_dirac_dec_compute_diffuse_proto(

    num_freq_bands_diff = h_dirac_output_synthesis_params->max_band_decorr;

    if ( num_freq_bands_diff == 0 )
    {
        return;
    }

    p_diff_buffer = h_dirac_output_synthesis_state->proto_diffuse_buffer_f + slot_idx * 2 * num_freq_bands_diff * hDirACRend->hOutSetup.nchan_out_woLFE;
    p_diff_buffer_1 = p_diff_buffer + 1;
    p_power_smooth = h_dirac_output_synthesis_state->proto_power_diff_smooth;