From fb1524d936325ec519ab251442985d80d05b57d8 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 7 Nov 2025 14:04:02 +0100 Subject: [PATCH 1/2] remove unreachable code in ivas_osba_stereo_add_channels_fx --- lib_com/ivas_prot_fx.h | 2 ++ lib_com/options.h | 2 ++ lib_dec/ivas_jbm_dec_fx.c | 4 ++++ lib_dec/ivas_osba_dec_fx.c | 8 ++++++++ 4 files changed, 16 insertions(+) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index ca39a3138..c37bef77f 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 f658a0ace..7079c9e03 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 7eab2caf8..7426801bc 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 f81a8e8a2..44bd97968 100644 --- a/lib_dec/ivas_osba_dec_fx.c +++ b/lib_dec/ivas_osba_dec_fx.c @@ -377,14 +377,18 @@ void ivas_osba_stereo_add_channels_fx( 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,9 @@ void ivas_osba_stereo_add_channels_fx( } } } +#endif + + return; } -- GitLab From bab8de4b0c963febf43711ee4f2b72ada84d4bcb Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 7 Nov 2025 14:50:22 +0100 Subject: [PATCH 2/2] fix formatting --- lib_dec/ivas_osba_dec_fx.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib_dec/ivas_osba_dec_fx.c b/lib_dec/ivas_osba_dec_fx.c index 44bd97968..07570b866 100644 --- a/lib_dec/ivas_osba_dec_fx.c +++ b/lib_dec/ivas_osba_dec_fx.c @@ -372,13 +372,13 @@ 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 */ + 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 */ + const Word16 ism_mode, /* i : ISM mode */ #endif const UWord16 n_samples_to_render /* i : output frame length per channel */ ) @@ -431,6 +431,5 @@ void ivas_osba_stereo_add_channels_fx( #endif - return; } -- GitLab