Commit c33eac65 authored by vaclav's avatar vaclav
Browse files

separate renderers' buffer sizes fixes under FIX_RENDERER_STACK

parent 90996ca3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,7 @@
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define UNIFIED_DECODING_PATHS_LEFTOVERS                /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */
#define UNIFIED_DECODING_PATHS_LEFTOVERS                /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */
#define FIX_NCHAN_BUFFERS                               /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */
#define FIX_NCHAN_BUFFERS                               /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */

#define FIX_RENDERER_STACK                              /* VA: issue 1322: reduction of renderers' buffers size */


/* #################### End BE switches ################################## */
/* #################### End BE switches ################################## */


+4 −4
Original line number Original line Diff line number Diff line
@@ -1554,7 +1554,7 @@ void ivas_dirac_dec_render(
    uint16_t slot_size, n_samples_sf, ch, nchan_intern;
    uint16_t slot_size, n_samples_sf, ch, nchan_intern;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    float *output_f_local[MAX_OUTPUT_CHANNELS];
    float *output_f_local[MAX_OUTPUT_CHANNELS];
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
    float *p_output_f[MAX_OUTPUT_CHANNELS];
    float *p_output_f[MAX_OUTPUT_CHANNELS];
    float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
    float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
#else
#else
@@ -1570,7 +1570,7 @@ void ivas_dirac_dec_render(
    for ( ch = 0; ch < nchan_intern; ch++ )
    for ( ch = 0; ch < nchan_intern; ch++ )
    {
    {
        output_f_local[ch] = output_f_local_buff[ch];
        output_f_local[ch] = output_f_local_buff[ch];
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
        p_output_f[ch] = output_f[ch];
        p_output_f[ch] = output_f[ch];
#else
#else
        set_zero( output_f_local_buff[ch], nSamplesAsked );
        set_zero( output_f_local_buff[ch], nSamplesAsked );
@@ -1601,7 +1601,7 @@ void ivas_dirac_dec_render(


        for ( ch = 0; ch < nchan_intern; ch++ )
        for ( ch = 0; ch < nchan_intern; ch++ )
        {
        {
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
            /* move to output */
            /* move to output */
            if ( !( ( st_ivas->hDirACRend->hOutSetup.separateChannelEnabled ) && ( st_ivas->hDirACRend->hOutSetup.separateChannelIndex == ch || st_ivas->hDirACRend->hOutSetup.separateChannelIndex + 1 == ch ) ) )
            if ( !( ( st_ivas->hDirACRend->hOutSetup.separateChannelEnabled ) && ( st_ivas->hDirACRend->hOutSetup.separateChannelIndex == ch || st_ivas->hDirACRend->hOutSetup.separateChannelIndex + 1 == ch ) ) )
            {
            {
@@ -1618,7 +1618,7 @@ void ivas_dirac_dec_render(
        ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, n_samples_sf );
        ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, n_samples_sf );
    }
    }


#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
    for ( ch = 0; ch < nchan_intern; ch++ )
    for ( ch = 0; ch < nchan_intern; ch++ )
    {
    {
        if ( !( ( st_ivas->hDirACRend->hOutSetup.separateChannelEnabled ) && ( st_ivas->hDirACRend->hOutSetup.separateChannelIndex == ch || st_ivas->hDirACRend->hOutSetup.separateChannelIndex + 1 == ch ) ) )
        if ( !( ( st_ivas->hDirACRend->hOutSetup.separateChannelEnabled ) && ( st_ivas->hDirACRend->hOutSetup.separateChannelIndex == ch || st_ivas->hDirACRend->hOutSetup.separateChannelIndex + 1 == ch ) ) )
+6 −6
Original line number Original line Diff line number Diff line
@@ -1501,7 +1501,7 @@ static ivas_error ivas_rend_crendConvolver(
    const float *pFreq_filt_re, *pFreq_filt_im;
    const float *pFreq_filt_re, *pFreq_filt_im;
    float *pFreq_buf_re = NULL, *pFreq_buf_im = NULL;
    float *pFreq_buf_re = NULL, *pFreq_buf_im = NULL;
    float *pFreq_buf2_re = NULL, *pFreq_buf2_im = NULL;
    float *pFreq_buf2_re = NULL, *pFreq_buf2_im = NULL;
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
    float pOut[2 /*Re,Im*/ * L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
    float pOut[2 /*Re,Im*/ * L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
    float tmp_out_re[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES], tmp_out_im[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
    float tmp_out_re[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES], tmp_out_im[L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
#else
#else
@@ -1713,7 +1713,7 @@ ivas_error ivas_rend_crendProcessSubframe(
    int16_t subframe_idx, subframe_len;
    int16_t subframe_idx, subframe_len;
    int16_t nchan_out, nchan_in, ch, first_sf, last_sf, slot_size, slots_to_render;
    int16_t nchan_out, nchan_in, ch, first_sf, last_sf, slot_size, slots_to_render;
    float *tc_local[MAX_OUTPUT_CHANNELS];
    float *tc_local[MAX_OUTPUT_CHANNELS];
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
    float *p_output[BINAURAL_CHANNELS];
    float *p_output[BINAURAL_CHANNELS];
    float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
    float pcm_tmp[BINAURAL_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
#else
#else
@@ -1757,7 +1757,7 @@ ivas_error ivas_rend_crendProcessSubframe(
    for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
    for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
    {
    {
        p_pcm_tmp[ch] = pcm_tmp[ch];
        p_pcm_tmp[ch] = pcm_tmp[ch];
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
        p_output[ch] = output[ch];
        p_output[ch] = output[ch];
#endif
#endif
    }
    }
@@ -1840,7 +1840,7 @@ ivas_error ivas_rend_crendProcessSubframe(
            {
            {
                tc_local[ch] += subframe_len;
                tc_local[ch] += subframe_len;
            }
            }
#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
            for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
            for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
            {
            {
                p_pcm_tmp[ch] += subframe_len;
                p_pcm_tmp[ch] += subframe_len;
@@ -1857,7 +1857,7 @@ ivas_error ivas_rend_crendProcessSubframe(
            return IVAS_ERR_INVALID_INPUT_FORMAT;
            return IVAS_ERR_INVALID_INPUT_FORMAT;
        }
        }


#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
        {
        {
            /* move to output */
            /* move to output */
@@ -1871,7 +1871,7 @@ ivas_error ivas_rend_crendProcessSubframe(
        ivas_combined_orientation_update_index( hCombinedOrientationData, subframe_len );
        ivas_combined_orientation_update_index( hCombinedOrientationData, subframe_len );
    }
    }


#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
    /* move to output */
    /* move to output */
    for ( ch = 0; ch < nchan_out; ch++ )
    for ( ch = 0; ch < nchan_out; ch++ )
    {
    {
+5 −5
Original line number Original line Diff line number Diff line
@@ -456,7 +456,7 @@ void ivas_dirac_dec_binaural_render(
    uint16_t nchan_out;
    uint16_t nchan_out;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom;
    float *output_f_local[MAX_OUTPUT_CHANNELS];
    float *output_f_local[MAX_OUTPUT_CHANNELS];
#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
    float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k];
    float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k];
    int16_t output_length;
    int16_t output_length;
#endif
#endif
@@ -468,7 +468,7 @@ void ivas_dirac_dec_binaural_render(
#endif
#endif
    for ( ch = 0; ch < nchan_out; ch++ )
    for ( ch = 0; ch < nchan_out; ch++ )
    {
    {
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_RENDERER_STACK
        output_f_local[ch] = output_f[ch];
        output_f_local[ch] = output_f[ch];
#else
#else
        output_f_local[ch] = output_f_local_buff[ch];
        output_f_local[ch] = output_f_local_buff[ch];
@@ -491,7 +491,7 @@ void ivas_dirac_dec_binaural_render(
#ifdef DEBUGGING
#ifdef DEBUGGING
    assert( slots_to_render == 0 );
    assert( slots_to_render == 0 );
#endif
#endif
#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
    output_length = 0;
    output_length = 0;
#endif
#endif
    for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ )
    for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ )
@@ -504,7 +504,7 @@ void ivas_dirac_dec_binaural_render(
            output_f_local[ch] += n_samples_sf;
            output_f_local[ch] += n_samples_sf;
        }
        }


#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
        output_length += n_samples_sf;
        output_length += n_samples_sf;


#endif
#endif
@@ -512,7 +512,7 @@ void ivas_dirac_dec_binaural_render(
        ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, n_samples_sf );
        ivas_combined_orientation_update_index( st_ivas->hCombinedOrientationData, n_samples_sf );
    }
    }


#ifndef FIX_NCHAN_BUFFERS
#ifndef FIX_RENDERER_STACK
    for ( ch = 0; ch < nchan_out; ch++ )
    for ( ch = 0; ch < nchan_out; ch++ )
    {
    {
        mvr2r( output_f_local_buff[ch], output_f[ch], output_length );
        mvr2r( output_f_local_buff[ch], output_f[ch], output_length );