Commit cf46c019 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch '159-hoa_dec_mtx-handle-in-sba-decoder' into 'main'

Resolve "hoa_dec_mtx handle in SBA decoder"

See merge request !210
parents 11b4c86c 1311e006
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1319,7 +1319,11 @@ typedef enum
#define PANNING_ELE_RESOLUTION                  5

#define EFAP_MAX_CHAN_NUM                       5                           /* Maximum number of channels that constitute a polygon, 4 or 5 */
#ifdef ALLRAD_OPTIM
#define EFAP_MAX_POLY_SET                       50                          /* Upper bound on number of polygons; with a Speaker setup of 16.0, we obtain 44 polygons/triangles in the matlab implementation. */
#else
#define EFAP_MAX_POLY_SET                       70                          /* Upper bound on number of polygons; with a Speaker setup of 26.0, we obtain 54 polygons/triangles in the matlab implementation. */
#endif

#define EFAP_MODE_EFAP                          0                           /* EFAP Panning */
#define EFAP_MODE_EFIP                          1                           /* EFIP Panning */
+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 */
#define FIX_I178_HQ_BUFFER_OVERRUN                      /* issue 178: Buffer overrun in HQ core decoder -- spectral filling buffer did not account for extended transition frame in IVAS */
#define PRINT_SBA_ORDER                                 /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */

+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 ) * 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!" ) );
    }