diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index ca39a3138bba37476a01f35d7fad695b1bcf9b62..c37bef77f0bb193e02b0bd07b286551720a6ba1b 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -3894,7 +3894,9 @@ void ivas_osba_stereo_add_channels_fx( const Word32 gain_bed_fx, /* i : gain bed value Q11 */ const Word16 nchan_out, /* i : number of output channels */ const Word16 nchan_ism, /* i : number of ISM channels */ +#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT const Word16 ism_mode, /* i : ISM mode */ +#endif const UWord16 n_samples_to_render /* i : output frame length per channel */ ); diff --git a/lib_com/options.h b/lib_com/options.h index f658a0ace707fbb02819fb9b308a65709bf53dd1..7079c9e030df7443584fb1d169442571f052f2d7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,6 +101,8 @@ #define FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING /* Orange: Fix for issue 2184 - to prevent one channel from becoming inaudible in the mono downmix output */ #define FIX_2148_OBJ_EDIT_ISSUE_WITH_OSBA /* Nokia: Add missing code to solve issue */ +#define FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT /* FhG: remove unreachable code in ivas_osba_stereo_add_channels */ + /* ################### End FIXES switches ########################### */ /* #################### Start BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 7eab2caf8a198ff875193461fb9403841f7e55c6..7426801bc2c53071cb61467b0f21c63c068bba62 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -2051,7 +2051,11 @@ ivas_error ivas_jbm_dec_render_fx( ivas_ism_render_sf_fx( st_ivas, st_ivas->renderer_type, p_output_fx, *nSamplesRendered ); /* add already rendered SBA part */ +#ifdef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT + ivas_osba_stereo_add_channels_fx( p_tc_fx, p_output_fx, st_ivas->hSbaIsmData->gain_bed_fx, nchan_out, st_ivas->nchan_ism, *nSamplesRendered ); +#else ivas_osba_stereo_add_channels_fx( p_tc_fx, p_output_fx, st_ivas->hSbaIsmData->gain_bed_fx, nchan_out, st_ivas->nchan_ism, st_ivas->ism_mode, *nSamplesRendered ); +#endif } ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_OSBA_AMBI ) || EQ_32( st_ivas->renderer_type, RENDERER_OSBA_LS ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ) { diff --git a/lib_dec/ivas_osba_dec_fx.c b/lib_dec/ivas_osba_dec_fx.c index f81a8e8a2303743eb55adb8edf1effccfbb527fb..07570b86697e4ffdcd7694ef93e5308b8348e327 100644 --- a/lib_dec/ivas_osba_dec_fx.c +++ b/lib_dec/ivas_osba_dec_fx.c @@ -372,19 +372,23 @@ ivas_error ivas_osba_render_sf_fx( *-------------------------------------------------------------------------*/ void ivas_osba_stereo_add_channels_fx( - Word32 *tc_fx[], /* i : transport channels */ - Word32 *output_fx[], /* i/o: output channels */ - const Word32 gain_bed_fx, /* i : gain bed value */ - const Word16 nchan_out, /* i : number of output channels */ - const Word16 nchan_ism, /* i : number of ISM channels */ - const Word16 ism_mode, /* i : ISM mode */ + Word32 *tc_fx[], /* i : transport channels */ + Word32 *output_fx[], /* i/o: output channels */ + const Word32 gain_bed_fx, /* i : gain bed value */ + const Word16 nchan_out, /* i : number of output channels */ + const Word16 nchan_ism, /* i : number of ISM channels */ +#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT + const Word16 ism_mode, /* i : ISM mode */ +#endif const UWord16 n_samples_to_render /* i : output frame length per channel */ ) { Word16 n, i; +#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT IF( EQ_16( ism_mode, ISM_SBA_MODE_DISC ) ) { +#endif Word32 gain = gain_bed_fx; move32(); @@ -412,6 +416,7 @@ void ivas_osba_stereo_add_channels_fx( } } } +#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT } ELSE { @@ -423,6 +428,8 @@ void ivas_osba_stereo_add_channels_fx( } } } +#endif + return; }