Commit 802c3b71 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

small optimization for ALLRAD memory allocation

parent 34c6b03f
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@
#define FIX_155_HP20_ISSUE                              /* Issue 155: apply hp20 on all input channels instead of just 2 channels */
#define EFAP_FIX_POLY                                   /* Issue 167: fix bug in EFAP polygon selection */
#define SBA_HOA_HBR_IMPROV                              /* issue 91: Improvements to SBA high bitrate HOA3 coding */
#define ALLRAD_OPTIM                                    /* Issue 159: Optimize memory allocation for ALLRAD */


/* ################## End DEVELOPMENT switches ######################### */
+4 −0
Original line number Diff line number Diff line
@@ -108,7 +108,11 @@ ivas_error ivas_sba_get_hoa_dec_matrix(

    /* Allocate memory */
    assert( *hoa_dec_mtx == NULL && "hoa_dec_mtx != NULL" );
#ifdef ALLRAD_OPTIM
    if ( ( *hoa_dec_mtx = (float *) count_malloc( SBA_NHARM_HOA3 * ( hOutSetup.nchan_out_woLFE + hOutSetup.num_lfe ) * sizeof( float ) ) ) == NULL )
#else
    if ( ( *hoa_dec_mtx = (float *) count_malloc( SBA_NHARM_HOA3 * MAX_OUTPUT_CHANNELS * sizeof( float ) ) ) == NULL )
#endif
    {
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "ALLRAD: Cannot allocate memory!" ) );
    }