From a68bf2498f1219cf79e23e4d38dfc42c026368c3 Mon Sep 17 00:00:00 2001 From: rtyag Date: Fri, 9 Sep 2022 16:56:22 +1000 Subject: [PATCH] issue 99 : Fix for incorrect internal_config when output format is HOA2 --- lib_com/options.h | 1 + lib_dec/ivas_output_init.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 6a9861f02e..275b3549e4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -149,6 +149,7 @@ #define FIX_ADAP_STEFI_SHIFT /* Issue 89: fix bug in parameter shift of adaptive stereo filling */ #define SPAR_SCALING_HARMONIZATION /* Issue 80: Changes to harmonize scaling in spar */ +#define SBA_INTERN_CONFIG_FIX_HOA2 /* Issue 99 : Fix for incorrect internal_config when output format is HOA2 or FOA*/ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_output_init.c b/lib_dec/ivas_output_init.c index 2a5cc02682..af74b7571c 100644 --- a/lib_dec/ivas_output_init.c +++ b/lib_dec/ivas_output_init.c @@ -511,7 +511,18 @@ void ivas_renderer_select( if ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_mode == SBA_MODE_SPAR && ( output_config != AUDIO_CONFIG_5_1 && output_config != AUDIO_CONFIG_5_1_2 && output_config != AUDIO_CONFIG_5_1_4 && output_config != AUDIO_CONFIG_7_1 && output_config != AUDIO_CONFIG_7_1_4 && output_config != AUDIO_CONFIG_LS_CUSTOM ) ) { +#ifdef SBA_INTERN_CONFIG_FIX_HOA2 + if ( output_config == AUDIO_CONFIG_HOA2 || output_config == AUDIO_CONFIG_FOA ) + { + *internal_config = output_config; + } + else + { + *internal_config = AUDIO_CONFIG_HOA3; + } +#else *internal_config = AUDIO_CONFIG_HOA3; +#endif st_ivas->renderer_type = RENDERER_SBA_LINEAR_DEC; } else if ( ( st_ivas->ivas_format == MASA_FORMAT && output_config == AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) || -- GitLab