Commit 6fdaedf5 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

remove unreachable code in ivas_osba_stereo_add_channels

parent 636b5563
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5671,7 +5671,9 @@ void ivas_osba_stereo_add_channels(
    const float gain,                                           /* i  : gain bed value                          */
    const int16_t nchan_out,                                    /* i  : number of output channels               */
    const int16_t nchan_ism,                                    /* i  : number of ISM channels                  */
#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    const int16_t ism_mode,                                     /* i  : ISM mode                                */
#endif
    const int16_t n_samples_to_render                           /* i  : output frame length per channel         */
);

+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@
/* ################### Start FIXES switches ########################### */

#define TEMP_FIX_2088_MSAN_INIT_ERROR                   /* Eri: Temporary fix for Issue 2088 - MSAN error. Will come with later port of JBM+Split rendering update */
#define FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT /* FhG: remove unreachable code in ivas_osba_stereo_add_channels */

/* #################### End FIXES switches ############################ */

+4 −0
Original line number Diff line number Diff line
@@ -1168,7 +1168,11 @@ ivas_error ivas_jbm_dec_render(
                ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered );

                /* add already rendered SBA part */
#ifdef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
                ivas_osba_stereo_add_channels( p_tc, p_output, st_ivas->hSbaIsmData->gain_bed, nchan_out, st_ivas->nchan_ism, *nSamplesRendered );
#else
                ivas_osba_stereo_add_channels( p_tc, p_output, st_ivas->hSbaIsmData->gain_bed, nchan_out, st_ivas->nchan_ism, st_ivas->ism_mode, *nSamplesRendered );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
            {
+7 −0
Original line number Diff line number Diff line
@@ -266,14 +266,18 @@ void ivas_osba_stereo_add_channels(
    const float gain,                 /* i  : gain bed value                    */
    const int16_t nchan_out,          /* i  : number of output channels         */
    const int16_t nchan_ism,          /* i  : number of ISM channels            */
#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    const int16_t ism_mode,           /* i  : ISM mode                          */
#endif
    const int16_t n_samples_to_render /* i  : output frame length per channel   */
)
{
    int16_t n;

#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    if ( ism_mode == ISM_SBA_MODE_DISC )
    {
#endif
        if ( gain != 1.0f && gain >= 0.0f )
        {
            int16_t i;
@@ -292,6 +296,7 @@ void ivas_osba_stereo_add_channels(
                v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render );
            }
        }
#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    }
    else
    {
@@ -300,6 +305,8 @@ void ivas_osba_stereo_add_channels(
            v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render );
        }
    }
#endif


    return;
}