Commit e0d9f800 authored by vaclav's avatar vaclav
Browse files

editorial improvements

parent 96f1bed0
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -164,7 +164,6 @@ typedef struct

    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics;
#endif

    IVAS_BIN_RENDERER_TYPE binaural_renderer;
    IVAS_BIN_RENDERER_TYPE binaural_renderer_old;
    IVAS_BIN_RENDERER_TYPE binaural_renderer_sec;
@@ -248,7 +247,6 @@ int main(
    hHrtfBinary.hHrtfTD = NULL;         /* just to avoid compilation warning */
    hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */
#endif

    splitRendBits.bits_buf = splitRendBitsBuf;

    /*------------------------------------------------------------------------------------------*
+1 −0
Original line number Diff line number Diff line
@@ -1509,6 +1509,7 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }

        /* Init HRTF statistics */
        if ( ( error = ivas_HRTF_statistics_init_from_rom( &st_ivas->hHrtfStatistics, output_Fs ) ) != IVAS_ERR_OK )
#else
+1 −0
Original line number Diff line number Diff line
@@ -1477,6 +1477,7 @@ void ivas_rend_closeCldfbRend(
    }

    ivas_binRenderer_close( &pCldfbRend->hCldfbRend );

#ifndef FIX_2249_MEMORY_LEAK_IN_SBA
    ivas_binaural_hrtf_close( &pCldfbRend->hHrtfFastConv );
#endif
+19 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
 *
 * Allocate HRTF binary handle for TD renderer
 *-----------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
ivas_error ivas_HRTF_td_binary_open(
    TDREND_HRFILT_FiltSet_t **hHrtfTD )
@@ -70,6 +71,7 @@ ivas_error ivas_HRTF_binary_open(
 *
 * Close HRTF binary handle for TD renderer
 *-------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
void ivas_HRTF_td_binary_close(
    TDREND_HRFILT_FiltSet_t **hHrtfTD )
@@ -137,6 +139,7 @@ void ivas_HRTF_binary_close(
        free( ( *hHrtfTD )->ModelEval.hrfModR );
    }
#endif

    free( *hHrtfTD );
    *hHrtfTD = NULL;

@@ -168,6 +171,7 @@ ivas_error ivas_HRTF_CRend_binary_open(
}

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA

/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_int16()
 *
@@ -188,6 +192,7 @@ ivas_error ivas_HRTF_binary_open_buffers_int16(

    return IVAS_ERR_OK;
}

#endif

/*-----------------------------------------------------------------------*
@@ -195,6 +200,7 @@ ivas_error ivas_HRTF_binary_open_buffers_int16(
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
ivas_error ivas_HRTF_binary_open_buffers_uint16(
    uint16_t **buffer,      /* o  : buffer to allocate      */
@@ -217,11 +223,13 @@ ivas_error ivas_HRTF_CRend_binary_open_buffers_uint16(
    return IVAS_ERR_OK;
}


/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_float()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
ivas_error ivas_HRTF_binary_open_buffers_float(
    float **buffer,         /* o  : buffer to allocate      */
@@ -245,11 +253,13 @@ ivas_error ivas_HRTF_CRend_binary_open_buffers_float(
}

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA

/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_float_ptr()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/

ivas_error ivas_HRTF_binary_open_buffers_float_ptr(
    float ***buffer,        /* o  : buffer to allocate      */
    const uint32_t mem_size /* i  : size of buffer          */
@@ -264,11 +274,14 @@ ivas_error ivas_HRTF_binary_open_buffers_float_ptr(

    return IVAS_ERR_OK;
}


/*-----------------------------------------------------------------------*
 * ivas_HRTF_binary_open_buffers_float_ptr()
 *
 * Allocate buffer with dynamic length for HRTF binary Crend handle
 *-----------------------------------------------------------------------*/

ivas_error ivas_HRTF_binary_open_buffers_float_ptr_const(
    const float ***buffer,  /* o  : buffer to allocate      */
    const uint32_t mem_size /* i  : size of buffer          */
@@ -377,6 +390,7 @@ void ivas_HRTF_fastconv_binary_close(
    {
        return;
    }

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
    /* Fastconv HRTF memories */
    ivas_binaural_hrtf_close( hHrtfFastConv );
@@ -444,9 +458,11 @@ ivas_error ivas_HRTF_statistics_binary_open(
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for statistics HRTF tables!" );
    }

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
    set_c( (int8_t *) ( *hHrtfStatistics ), 0, (int32_t) sizeof( HRTFS_STATISTICS ) );
#endif

    return IVAS_ERR_OK;
}

@@ -456,6 +472,7 @@ ivas_error ivas_HRTF_statistics_binary_open(
 *
 * Close HRTF binary handle for statistics handler
 *-----------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
void ivas_HRTF_statistics_binary_close(
    HRTFS_STATISTICS **hHrtfStatistics )
@@ -468,6 +485,7 @@ void ivas_HRTF_statistics_close(
    {
        return;
    }

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
    if ( ( hHrtfStatistics != NULL ) && ( *hHrtfStatistics != NULL ) && ( ( *hHrtfStatistics )->fromROM == FALSE ) )
    {
@@ -497,6 +515,7 @@ void ivas_HRTF_statistics_close(
 *
 * Allocates HRTF statistics handle and initializes from ROM
 *-----------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
ivas_error ivas_HRTF_statistics_init_from_rom(
    HRTFS_STATISTICS_HANDLE *hHrtfStatistics,
+2 −1
Original line number Diff line number Diff line
@@ -554,6 +554,7 @@ void ivas_masa_ext_dirac_render(
/*----------------------------------------------------------------------------------*
 * HRTF
 *----------------------------------------------------------------------------------*/

#ifdef FIX_2249_MEMORY_LEAK_IN_SBA
ivas_error ivas_HRTF_td_binary_open(
    TDREND_HRFILT_FiltSet_t **hHrtfTD                           /* i/o: TD renderer HRTF handle                 */