Commit 583a9b65 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_AGC_WINFUNC_MEMORY

parent 38de434b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@
#define FIX_I1_113                                      /* under review : MCT bit distribution optimization for SBA high bitrates*/
#define FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS              /* Issue 124: do not allocate unused plc struct in IVAS modes which is only used in EVS mono */
#define SBA_BR_SWITCHING                                /* Issue 114: Changes for sba bit rate switching*/
#define FIX_AGC_WINFUNC_MEMORY                          /* Issue 62: lower agc_com.winFunc memory consumption */
#define FIX_ITD                                         /* Contribution 16: TD renderer ITD improvement and code cleanup */
#define REMOVE_SID_HARM_LEFTOVERS                       /* Issue 192: remove leftovers from the SID bitrate harmonization */
#define FIX_MCT_UNINIT_MEM                              /* Issue 166: Reading of uninitialized memory in TCX range coder */
+0 −14
Original line number Diff line number Diff line
@@ -100,11 +100,7 @@ ivas_error ivas_spar_agc_dec_open(
)
{
    ivas_agc_dec_state_t *hAgc;
#ifdef FIX_AGC_WINFUNC_MEMORY
    int16_t output_frame, delay;
#else
    int16_t output_frame;
#endif

    if ( ( hAgc = (ivas_agc_dec_state_t *) count_malloc( sizeof( ivas_agc_dec_state_t ) ) ) == NULL )
    {
@@ -112,15 +108,9 @@ ivas_error ivas_spar_agc_dec_open(
    }

    output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC );
#ifdef FIX_AGC_WINFUNC_MEMORY
    delay = NS2SA( output_Fs, ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) );
#endif

#ifdef FIX_AGC_WINFUNC_MEMORY
    if ( ( hAgc->agc_com.winFunc = (float *) count_malloc( sizeof( float ) * ( output_frame - delay ) ) ) == NULL )
#else
    if ( ( hAgc->agc_com.winFunc = (float *) count_malloc( sizeof( float ) * output_frame ) ) == NULL )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AGC decoder" );
    }
@@ -135,11 +125,7 @@ ivas_error ivas_spar_agc_dec_open(
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for AGC decoder" );
    }

#ifdef FIX_AGC_WINFUNC_MEMORY
    ivas_agc_dec_init( hAgc, output_frame, delay );
#else
    ivas_agc_dec_init( hAgc, output_frame, NS2SA( output_Fs, ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) ) );
#endif

    *hAgcDec = hAgc;

+0 −14
Original line number Diff line number Diff line
@@ -153,11 +153,7 @@ ivas_error ivas_spar_agc_enc_open(
)
{
    ivas_agc_enc_state_t *hAgc;
#ifdef FIX_AGC_WINFUNC_MEMORY
    int16_t input_frame, delay;
#else
    int16_t input_frame;
#endif

    if ( ( hAgc = (ivas_agc_enc_state_t *) count_malloc( sizeof( ivas_agc_enc_state_t ) ) ) == NULL )
    {
@@ -165,15 +161,9 @@ ivas_error ivas_spar_agc_enc_open(
    }

    input_frame = (int16_t) ( input_Fs / FRAMES_PER_SEC );
#ifdef FIX_AGC_WINFUNC_MEMORY
    delay = NS2SA( input_Fs, ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) );
#endif

#ifdef FIX_AGC_WINFUNC_MEMORY
    if ( ( hAgc->agc_com.winFunc = (float *) count_malloc( sizeof( float ) * ( input_frame - delay ) ) ) == NULL )
#else
    if ( ( hAgc->agc_com.winFunc = (float *) count_malloc( sizeof( float ) * input_frame ) ) == NULL )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR AGC encoder" );
    }
@@ -188,11 +178,7 @@ ivas_error ivas_spar_agc_enc_open(
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for SPAR AGC encoder" );
    }

#ifdef FIX_AGC_WINFUNC_MEMORY
    ivas_agc_enc_init( hAgc, input_frame, nchan_inp, delay );
#else
    ivas_agc_enc_init( hAgc, input_frame, nchan_inp, NS2SA( input_Fs, ( IVAS_ENC_DELAY_NS + IVAS_DEC_DELAY_NS ) ) );
#endif

    *hAgcEnc = hAgc;