diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 0781f806b93afdb0273aee4f743b210ef73c0401..61cf9a92acec389f2be4b7f389412cadf06441e8 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -803,7 +803,10 @@ void dtx_read_padding_bits( ); void ivas_apply_non_diegetic_panning( - float *output_f[], /* i/o: core-coder transport mono channel/stereo output */ +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + float *input_f, /* i : non-diegetic object */ +#endif + float *output_f[], /* o : core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ ); diff --git a/lib_com/options.h b/lib_com/options.h index 78b5efbc6483783be3a7c50396291d20062c0783..aebec00146223c347d79b0c9fb6517b9b1ab4172 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -223,6 +223,7 @@ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ #define FIX_1008_EXTORIENT_TARGET_INTERPOLATION /* FhG: issue #1008, external orientation init was wrong for 5ms */ /* #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF */ /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to actiate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on )*/ +#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.c b/lib_dec/ivas_jbm_dec.c index b8ea5cd795db2ae262d4cab7c7eb5c6797c10614..eddc339412df573a5be11121e73859a84b1dab9f 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1080,7 +1080,11 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + ivas_apply_non_diegetic_panning( p_tc[0], p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered ); +#else ivas_apply_non_diegetic_panning( p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered ); +#endif } #ifdef DEBUGGING diff --git a/lib_dec/ivas_mono_dmx_renderer.c b/lib_dec/ivas_mono_dmx_renderer.c index 2059ead6db8f6e67c1964edadae362d3ee0b37f2..07d6011aa69a339d937762c62240026315a38129 100644 --- a/lib_dec/ivas_mono_dmx_renderer.c +++ b/lib_dec/ivas_mono_dmx_renderer.c @@ -220,7 +220,10 @@ void ivas_mono_stereo_downmix_mcmasa( *------------------------------------------------------------------------*/ void ivas_apply_non_diegetic_panning( - float *output_f[], /* i/o: core-coder transport mono channel/stereo output */ +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + float *input_f, /* i : non-diegetic object */ +#endif + float *output_f[], /* o: core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ ) @@ -230,8 +233,13 @@ void ivas_apply_non_diegetic_panning( pan_left = ( non_diegetic_pan_gain + 1.f ) * 0.5f; pan_right = 1.f - pan_left; +#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING + v_multc( input_f, pan_right, output_f[1], output_frame ); + v_multc( input_f, pan_left, output_f[0], output_frame ); +#else v_multc( output_f[0], pan_right, output_f[1], output_frame ); v_multc( output_f[0], pan_left, output_f[0], output_frame ); +#endif return; }