Skip to content

Memory allocation in ivas_dirac_dec_output_synthesis_process_slot_fx()

Basic info

  • Float reference:
    • Encoder (float): n/a
    • Decoder (float): n/a
  • Fixed point:

Bug description

In the function ivas_dirac_dec_output_synthesis_process_slot_fx() , which is called 16x per frame, is a small malloc(), free():

Line 820:

/*Direct gain*/

Word16 *Q_temp_cy_cross_dir_smooth_fx = (Word16 *) malloc( num_freq_bands * num_channels_dir * sizeof( Word16 ) ); 

Line 1164:

free( Q_temp_cy_cross_dir_smooth_fx );

This should be avoided for fast execution. Ideally, the open/free should be moved to ivas_dirac_dec_output_synthesis_close_fx() and ivas_dirac_dec_output_synthesis_close_fx(), and a pointer to the allocated memory should be added to DIRAC_REND_HANDLE hDirACRend.

Edited by multrus