From bd7113d89e33139ee17325e8717ece7d22a101a3 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 12 Jun 2025 14:44:48 +0200 Subject: [PATCH 1/7] port float MR 1413 --- lib_com/ivas_prot_fx.h | 3 +++ lib_com/options.h | 1 + lib_dec/ivas_jbm_dec_fx.c | 4 ++++ lib_dec/ivas_mono_dmx_renderer_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 b1a03bd2e..3ca3c90c8 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -1155,6 +1155,9 @@ void ivas_mono_stereo_downmix_mcmasa_fx( ); void ivas_apply_non_diegetic_panning_fx( +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + float *input_f, /* i : non-diegetic object */ +#endif Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain */ const Word16 output_frame /* i : output frame length per channel */ diff --git a/lib_com/options.h b/lib_com/options.h index 51319adce..27a2da35a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -140,6 +140,7 @@ /* #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF */ /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */ #define FIX_1008_EXTORIENT_TARGET_INTERPOLATION /* FhG: issue #1008, external orientation init was wrong for 5ms */ +#define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index beb6535a2..80749ed4a 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -1992,7 +1992,11 @@ ivas_error ivas_jbm_dec_render_fx( } ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_NON_DIEGETIC_DOWNMIX ) ) { +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + ivas_apply_non_diegetic_panning_fx(p_tc_fx[0], st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); +#else ivas_apply_non_diegetic_panning_fx( p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); +#endif } #ifdef DEBUGGING ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) ) diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 66b14cc56..48cad29f8 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -318,6 +318,9 @@ void ivas_mono_stereo_downmix_mcmasa_fx( *------------------------------------------------------------------------*/ void ivas_apply_non_diegetic_panning_fx( +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + float *input_f, /* i : non-diegetic object */ +#endif Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain Q15*/ const Word16 output_frame /* i : output frame length per channel Q11*/ @@ -328,8 +331,13 @@ void ivas_apply_non_diegetic_panning_fx( pan_left_fx = add( mult( non_diegetic_pan_gain_fx, 16384 ), 16384 ); // 0.5.Q15 = 16384 pan_right_fx = sub( 32767, pan_left_fx ); +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + v_multc_fixed( input_f, L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); + v_multc_fixed( input_f, L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); +#else v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); +#endif return; } -- GitLab From 9034d45d6ddeec3b11c4ff7efb5a1abd5e6439ee Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 12 Jun 2025 14:54:32 +0200 Subject: [PATCH 2/7] fix formatting --- lib_dec/ivas_jbm_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 80749ed4a..1e5daaf5d 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -1993,7 +1993,7 @@ ivas_error ivas_jbm_dec_render_fx( ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_NON_DIEGETIC_DOWNMIX ) ) { #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - ivas_apply_non_diegetic_panning_fx(p_tc_fx[0], st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); + ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); #else ivas_apply_non_diegetic_panning_fx( p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); #endif -- GitLab From 67a8805b82ba76a3c3ffa2e05deb158f50dfd89d Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 12 Jun 2025 14:59:04 +0200 Subject: [PATCH 3/7] fix compile error --- lib_dec/ivas_jbm_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 1e5daaf5d..64896a1ff 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -1993,7 +1993,7 @@ ivas_error ivas_jbm_dec_render_fx( ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_NON_DIEGETIC_DOWNMIX ) ) { #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); + ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); #else ivas_apply_non_diegetic_panning_fx( p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); #endif -- GitLab From 90ebdced188553f03c754d75a7225b98786acc0d Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 12 Jun 2025 15:36:08 +0200 Subject: [PATCH 4/7] fix formatting --- lib_dec/ivas_jbm_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec_fx.c b/lib_dec/ivas_jbm_dec_fx.c index 64896a1ff..57063e7b7 100644 --- a/lib_dec/ivas_jbm_dec_fx.c +++ b/lib_dec/ivas_jbm_dec_fx.c @@ -1993,7 +1993,7 @@ ivas_error ivas_jbm_dec_render_fx( ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_NON_DIEGETIC_DOWNMIX ) ) { #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); + ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); #else ivas_apply_non_diegetic_panning_fx( p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered ); #endif -- GitLab From 59693e942b661393647b79abcdd9f741e35856c9 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 12 Jun 2025 16:00:24 +0200 Subject: [PATCH 5/7] fix variable types --- lib_com/ivas_prot_fx.h | 2 +- lib_dec/ivas_mono_dmx_renderer_fx.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index 3ca3c90c8..d989a1f68 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -1156,7 +1156,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( void ivas_apply_non_diegetic_panning_fx( #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - float *input_f, /* i : non-diegetic object */ + Word32 *input_f_fx, /* i : non-diegetic object */ #endif Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain */ diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 48cad29f8..7029f8b8d 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -319,7 +319,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( void ivas_apply_non_diegetic_panning_fx( #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - float *input_f, /* i : non-diegetic object */ + Word32 *input_f_fx, /* i : non-diegetic object */ #endif Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain Q15*/ @@ -332,8 +332,8 @@ void ivas_apply_non_diegetic_panning_fx( pan_right_fx = sub( 32767, pan_left_fx ); #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - v_multc_fixed( input_f, L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); - v_multc_fixed( input_f, L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); + v_multc_fixed( input_f_fx, L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); + v_multc_fixed( input_f_fx, L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); #else v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); -- GitLab From e281e4add6092352c2203716c80bf1a2900f8bef Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 13 Jun 2025 08:58:06 +0200 Subject: [PATCH 6/7] fix comments in ivas_mono_dmx_renderer_fx.c --- lib_dec/ivas_mono_dmx_renderer_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 7029f8b8d..1ee8676e2 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -319,9 +319,9 @@ void ivas_mono_stereo_downmix_mcmasa_fx( void ivas_apply_non_diegetic_panning_fx( #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - Word32 *input_f_fx, /* i : non-diegetic object */ + Word32 *input_f_fx, /* i : non-diegetic object */ #endif - Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ + Word32 *output_f_fx[], /* o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain Q15*/ const Word16 output_frame /* i : output frame length per channel Q11*/ ) -- GitLab From 3921fa88ab7dda258e924c1c48263355eb14daed Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Fri, 13 Jun 2025 09:09:52 +0200 Subject: [PATCH 7/7] fix formatting --- lib_dec/ivas_mono_dmx_renderer_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_mono_dmx_renderer_fx.c b/lib_dec/ivas_mono_dmx_renderer_fx.c index 1ee8676e2..4f04c4dd8 100644 --- a/lib_dec/ivas_mono_dmx_renderer_fx.c +++ b/lib_dec/ivas_mono_dmx_renderer_fx.c @@ -319,7 +319,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( void ivas_apply_non_diegetic_panning_fx( #ifdef FIX_1009_ISM_NONDIEGETIC_PANNING - Word32 *input_f_fx, /* i : non-diegetic object */ + Word32 *input_f_fx, /* i : non-diegetic object */ #endif Word32 *output_f_fx[], /* o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain Q15*/ -- GitLab