From 0463d891a8a480d47feb6922b541fbaecabc2a70 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Thu, 6 Nov 2025 20:25:48 +0200 Subject: [PATCH 1/8] Port float MR 2105 to BASOP. --- apps/decoder.c | 56 +++++++++++++++++ lib_com/common_api_types.h | 10 ++++ lib_com/ivas_cnst.h | 15 +++++ lib_com/options.h | 1 + lib_dec/ivas_init_dec_fx.c | 67 +++++++++++++++++++++ lib_dec/ivas_stat_dec.h | 3 + lib_dec/lib_dec.h | 3 + lib_dec/lib_dec_fx.c | 9 +++ lib_rend/ivas_prot_rend_fx.h | 7 +++ lib_rend/ivas_render_config_fx.c | 100 +++++++++++++++++++++++++++++++ lib_rend/ivas_rom_rend.h | 14 +++++ lib_rend/ivas_rom_rend_fx.c | 100 +++++++++++++++++++++++++++---- 12 files changed, 375 insertions(+), 10 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 94bfab14d..a3fa7595f 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -129,6 +129,9 @@ typedef struct uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; char *objEditFileName; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + IVAS_ROOM_SIZE_T roomSize; +#endif } DecArguments; @@ -410,9 +413,15 @@ int main( asked_frame_size = arg.renderFramesize; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, + arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.roomSize, arg.non_diegetic_pan_enabled, + arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) +#else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) +#endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -886,6 +895,10 @@ static bool parseCmdlIVAS_dec( arg->objEditEnabled = false; arg->objEditFileName = NULL; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + arg->roomSize = IVAS_ROOM_SIZE_AUTO; +#endif + /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ @@ -1360,6 +1373,45 @@ static bool parseCmdlIVAS_dec( } i++; } +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + else if ( strcmp( argv_to_upper, "-ROOM_SIZE" ) == 0 ) + { + i++; + if ( argc - i <= 3 || argv[i][0] == '-' ) + { + fprintf( stderr, "Error: Room size selector not specified!\n\n" ); + usage_dec(); + return false; + } + + if ( strlen( argv[i] ) != 1 ) + { + fprintf( stderr, "Error: Unsupported room size selector %s!\n\n", argv[i] ); + usage_dec(); + return false; + } + switch ( argv[i][0] ) + { + case 'S': + case 's': + arg->roomSize = IVAS_ROOM_SIZE_SMALL; + break; + case 'M': + case 'm': + arg->roomSize = IVAS_ROOM_SIZE_MEDIUM; + break; + case 'L': + case 'l': + arg->roomSize = IVAS_ROOM_SIZE_LARGE; + break; + default: + fprintf( stderr, "Error: Unsupported room size selector %s!\n\n", argv[i] ); + usage_dec(); + return false; + } + i++; + } +#endif /*-----------------------------------------------------------------* * Option not recognized @@ -1565,6 +1617,10 @@ static void usage_dec( void ) fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + fprintf( stdout, "-room_size (S|M|L) : Selects default reverb based on a room size (S - small | M - medium | L - large)\n" ); + fprintf( stdout, " for BINAURAL_ROOM_REVERB output configuration,\n" ); +#endif fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); fprintf( stdout, " default is deactivated\n" ); fprintf( stdout, "\n" ); diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 6259b5f8d..be4f532ab 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -189,6 +189,16 @@ typedef enum } IVAS_RENDER_FRAMESIZE; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +typedef enum +{ + IVAS_ROOM_SIZE_AUTO = -1, + IVAS_ROOM_SIZE_SMALL, + IVAS_ROOM_SIZE_MEDIUM, + IVAS_ROOM_SIZE_LARGE +} IVAS_ROOM_SIZE_T; +#endif + typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE; typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE; diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index c445d0299..790139882 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1648,11 +1648,26 @@ typedef enum #define RV_LENGTH_NR_FC ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1 #define RV_LENGTH_NR_FC_16KHZ ( RV_FILTER_MAX_FFT_SIZE / 4 ) + 1 +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +#define IVAS_REVERB_DEFAULT_L_N_BANDS 31 +#define IVAS_REVERB_DEFAULT_M_N_BANDS 31 +#define IVAS_REVERB_DEFAULT_S_N_BANDS 60 +#else #define IVAS_REVERB_DEFAULT_N_BANDS 31 +#endif #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) #define LR_IAC_LENGTH_NR_FC_16KHZ ( RV_LENGTH_NR_FC_16KHZ ) +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +typedef enum +{ + DEFAULT_REVERB_SMALL, + DEFAULT_REVERB_MEDIUM, + DEFAULT_REVERB_LARGE +} IVAS_DefaultReverbSize; +#endif + /*----------------------------------------------------------------------------------* * FB mixer constants diff --git a/lib_com/options.h b/lib_com/options.h index f792698a9..a3548f68c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -139,6 +139,7 @@ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_1344_REND_MASA_LOW_FS /* Nokia: Issue 1344: Fix sanitizer errors when using IVAS_rend to render MASA with lower sampling rates */ #define NONBE_1412_AVOID_ROUNDING_AZ_ELEV /* FhG: Avoid rounding when passing azimuth and elevation to efap_determine_gains() */ +#define FIX_1318_ROOM_SIZE_CMD_LINE /* Philips/Nokia: Default room sizes support */ // object-editing feature porting #define TMP_FIX_SPLIT_REND // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index dff92f4e4..7a31eb5d5 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1665,16 +1665,83 @@ ivas_error ivas_init_decoder_fx( } } +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + /*--------------------------------------------------------------------------* + * Allocate and initialize HRTF Statistics handle, get default reverb values + *--------------------------------------------------------------------------*/ +#else /*--------------------------------------------------------------------* * Allocate and initialize HRTF Statistics handle *--------------------------------------------------------------------*/ +#endif IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { + /* Init HRTF statistics */ IF( NE_32( ( error = ivas_HRTF_statistics_init_fx( &st_ivas->hHrtfStatistics, output_Fs ) ), IVAS_ERR_OK ) ) { return error; } + + #ifdef FIX_1318_ROOM_SIZE_CMD_LINE + /* Get default reverb values based on format, if custom values were not given */ + IF( EQ_16(st_ivas->hDecoderConfig->Opt_RendConfigCustom, 0) ) + { + IVAS_DefaultReverbSize defaultReverbSize; + SWITCH( st_ivas->hDecoderConfig->Opt_RoomSize ) + { + case IVAS_ROOM_SIZE_AUTO: + SWITCH( st_ivas->ivas_format ) + { + case ISM_FORMAT: + defaultReverbSize = DEFAULT_REVERB_LARGE; + move32(); + BREAK; + case SBA_FORMAT: + defaultReverbSize = DEFAULT_REVERB_SMALL; + move32(); + BREAK; + case MASA_FORMAT: + defaultReverbSize = DEFAULT_REVERB_SMALL; + move32(); + BREAK; + case MC_FORMAT: + defaultReverbSize = DEFAULT_REVERB_MEDIUM; + move32(); + BREAK; + case MASA_ISM_FORMAT: + defaultReverbSize = DEFAULT_REVERB_MEDIUM; + move32(); + BREAK; + case SBA_ISM_FORMAT: + defaultReverbSize = DEFAULT_REVERB_MEDIUM; + move32(); + BREAK; + default: + defaultReverbSize = DEFAULT_REVERB_LARGE; + move32(); + } + BREAK; + case IVAS_ROOM_SIZE_SMALL: + defaultReverbSize = DEFAULT_REVERB_SMALL; + move32(); + BREAK; + case IVAS_ROOM_SIZE_MEDIUM: + defaultReverbSize = DEFAULT_REVERB_MEDIUM; + move32(); + BREAK; + case IVAS_ROOM_SIZE_LARGE: + default: + defaultReverbSize = DEFAULT_REVERB_LARGE; + move32(); + BREAK; + } + if ( NE_32( error = ivas_render_config_change_defaults( st_ivas->hRenderConfig, defaultReverbSize ), IVAS_ERR_OK ) ) + { + return error; + } + } +#endif } /*-----------------------------------------------------------------* diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 4a464705d..c4e52f8bf 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1086,6 +1086,9 @@ typedef struct decoder_config_structure Word16 Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ Word16 Opt_Headrotation; /* indicates whether head-rotation is used */ Word16 Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + IVAS_ROOM_SIZE_T Opt_RoomSize; /* Selected room size */ +#endif IVAS_HEAD_ORIENT_TRK_T orientation_tracking; /* indicates orientation tracking type */ Word16 Opt_non_diegetic_pan; /* indicates diegetic or not */ Word16 non_diegetic_pan_gain_fx; /* non diegetic panning gain, Q15 */ diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index e911a5fca..2bf376d65 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -118,6 +118,9 @@ ivas_error IVAS_DEC_Configure( const bool enableExternalOrientation, /* i : enable external orientations */ const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ +#endif const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ const Word16 non_diegetic_pan_gain_fx, /* i : non diegetic panning gain */ const bool dpidEnabled, /* i : enable directivity pattern option */ diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 7d3ee4ffd..572464eef 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -359,6 +359,9 @@ static void init_decoder_config( hDecoderConfig->Opt_HRTF_binary = 0; hDecoderConfig->Opt_Headrotation = 0; hDecoderConfig->Opt_RendConfigCustom = 0; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + hDecoderConfig->Opt_RoomSize = IVAS_ROOM_SIZE_AUTO; +#endif hDecoderConfig->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain_fx = 0; // Q15 @@ -517,6 +520,9 @@ ivas_error IVAS_DEC_Configure( const bool enableExternalOrientation, /* i : enable external orientations */ const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ +#endif const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ const Word16 non_diegetic_pan_gain_fx, /* i : non diegetic panning gain */ const bool dpidEnabled, /* i : enable directivity pattern option */ @@ -585,6 +591,9 @@ ivas_error IVAS_DEC_Configure( hDecoderConfig->orientation_tracking = orientation_tracking; hDecoderConfig->Opt_HRTF_binary = (Word16) hrtfReaderEnabled; hDecoderConfig->Opt_RendConfigCustom = (Word16) renderConfigEnabled; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + hDecoderConfig->Opt_RoomSize = roomSize; +#endif hDecoderConfig->Opt_non_diegetic_pan = (Word16) non_diegetic_pan_enabled; hDecoderConfig->non_diegetic_pan_gain_fx = non_diegetic_pan_gain_fx; // Q15 hDecoderConfig->Opt_delay_comp = (Word16) delayCompensationEnabled; diff --git a/lib_rend/ivas_prot_rend_fx.h b/lib_rend/ivas_prot_rend_fx.h index 86586520e..9dce43a97 100644 --- a/lib_rend/ivas_prot_rend_fx.h +++ b/lib_rend/ivas_prot_rend_fx.h @@ -1347,6 +1347,13 @@ ivas_error ivas_render_config_init_from_rom_fx( RENDER_CONFIG_HANDLE *hRenderConfig /* i/o: Renderer config handle */ ); +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +ivas_error ivas_render_config_change_defaults( + RENDER_CONFIG_HANDLE hRenderConfig, /* i/o: Renderer config handle */ + IVAS_DefaultReverbSize reverbDefault /* i: Reverb default size */ +); + +#endif /*----------------------------------------------------------------------------------* * Quaternion operations diff --git a/lib_rend/ivas_render_config_fx.c b/lib_rend/ivas_render_config_fx.c index 3c43b59e1..780908c71 100644 --- a/lib_rend/ivas_render_config_fx.c +++ b/lib_rend/ivas_render_config_fx.c @@ -42,8 +42,19 @@ * Local constants *-----------------------------------------------------------------------*/ +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +#define IVAS_REVERB_DEFAULT_L_PRE_DELAY_FX 2147484 // 0.016 +#define IVAS_REVERB_DEFAULT_L_INPUT_DELAY_FX 13421773 // 0.1 + +#define IVAS_REVERB_DEFAULT_S_PRE_DELAY_FX 1677722 // 0.0125f +#define IVAS_REVERB_DEFAULT_S_INPUT_DELAY_FX 0 // 0.0f + +#define IVAS_REVERB_DEFAULT_M_PRE_DELAY_FX 1677722 // 0.0125f +#define IVAS_REVERB_DEFAULT_M_INPUT_DELAY_FX 0 // 0.0f +#else #define IVAS_REVERB_DEFAULT_PRE_DELAY_FX 2147484 // 0.016 #define IVAS_REVERB_DEFAULT_INPUT_DELAY_FX 13421773 // 0.1 +#endif #define IVAS_REVERB_DEFAULT_USE_ER 0 @@ -107,21 +118,36 @@ ivas_error ivas_render_config_init_from_rom_fx( { return IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Unexpected null pointer while attempting to fill renderer configuration from ROM" ); } +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_L_N_BANDS; + move16(); + ( *hRenderConfig )->roomAcoustics.acousticPreDelay_fx = IVAS_REVERB_DEFAULT_L_PRE_DELAY_FX; + move32(); + ( *hRenderConfig )->roomAcoustics.inputPreDelay_fx = IVAS_REVERB_DEFAULT_L_INPUT_DELAY_FX; + move32(); +#else ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_N_BANDS; move16(); ( *hRenderConfig )->roomAcoustics.acousticPreDelay_fx = IVAS_REVERB_DEFAULT_PRE_DELAY_FX; move32(); ( *hRenderConfig )->roomAcoustics.inputPreDelay_fx = IVAS_REVERB_DEFAULT_INPUT_DELAY_FX; move32(); +#endif ( *hRenderConfig )->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; move16(); set32_fx( &( *hRenderConfig )->roomAcoustics.pFc_input_fx[0], 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( &( *hRenderConfig )->roomAcoustics.pAcoustic_rt60_fx[0], 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( &( *hRenderConfig )->roomAcoustics.pAcoustic_dsr_fx[0], 0, CLDFB_NO_CHANNELS_MAX ); +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + Copy32( ivas_reverb_default_large_fc_fx, ( *hRenderConfig )->roomAcoustics.pFc_input_fx, IVAS_REVERB_DEFAULT_L_N_BANDS ); + Copy32( ivas_reverb_default_large_RT60_fx, ( *hRenderConfig )->roomAcoustics.pAcoustic_rt60_fx, IVAS_REVERB_DEFAULT_L_N_BANDS ); + Copy32( ivas_reverb_default_large_DSR_fx, ( *hRenderConfig )->roomAcoustics.pAcoustic_dsr_fx, IVAS_REVERB_DEFAULT_L_N_BANDS ); +#else Copy32( ivas_reverb_default_fc_fx, ( *hRenderConfig )->roomAcoustics.pFc_input_fx, IVAS_REVERB_DEFAULT_N_BANDS ); Copy32( ivas_reverb_default_RT60_fx, ( *hRenderConfig )->roomAcoustics.pAcoustic_rt60_fx, IVAS_REVERB_DEFAULT_N_BANDS ); Copy32( ivas_reverb_default_DSR_fx, ( *hRenderConfig )->roomAcoustics.pAcoustic_dsr_fx, IVAS_REVERB_DEFAULT_N_BANDS ); +#endif FOR( i = 0; i < MAX_NUM_OBJECTS; i++ ) { @@ -161,3 +187,77 @@ ivas_error ivas_render_config_init_from_rom_fx( return IVAS_ERR_OK; } + +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE + +/*-------------------------------------------------------------------* + * ivas_render_config_change_defaults() + * + * Changes default values from ROM + *-------------------------------------------------------------------*/ + +ivas_error ivas_render_config_change_defaults( + RENDER_CONFIG_HANDLE hRenderConfig, /* i/o: Renderer config handle */ + IVAS_DefaultReverbSize defaultReverbSize /* i: Reverb default size */ +) +{ + SWITCH( defaultReverbSize ) + { + case DEFAULT_REVERB_SMALL: + hRenderConfig->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_S_N_BANDS; + move16(); + hRenderConfig->roomAcoustics.acousticPreDelay_fx = IVAS_REVERB_DEFAULT_S_PRE_DELAY_FX; + move32(); + hRenderConfig->roomAcoustics.inputPreDelay_fx = IVAS_REVERB_DEFAULT_S_INPUT_DELAY_FX; + move32(); + hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; + move16(); + set_zero_fx( &hRenderConfig->roomAcoustics.pFc_input_fx[0], CLDFB_NO_CHANNELS_MAX ); + set_zero_fx( &hRenderConfig->roomAcoustics.pAcoustic_rt60_fx[0], CLDFB_NO_CHANNELS_MAX ); + set_zero_fx( &hRenderConfig->roomAcoustics.pAcoustic_dsr_fx[0], CLDFB_NO_CHANNELS_MAX ); + + Copy32( ivas_reverb_default_small_fc_fx, hRenderConfig->roomAcoustics.pFc_input_fx, IVAS_REVERB_DEFAULT_S_N_BANDS ); + Copy32( ivas_reverb_default_small_RT60_fx, hRenderConfig->roomAcoustics.pAcoustic_rt60_fx, IVAS_REVERB_DEFAULT_S_N_BANDS ); + Copy32( ivas_reverb_default_small_DSR_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, IVAS_REVERB_DEFAULT_S_N_BANDS ); + BREAK; + case DEFAULT_REVERB_MEDIUM: + hRenderConfig->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_M_N_BANDS; + move16(); + hRenderConfig->roomAcoustics.acousticPreDelay_fx = IVAS_REVERB_DEFAULT_M_PRE_DELAY_FX; + move32(); + hRenderConfig->roomAcoustics.inputPreDelay_fx = IVAS_REVERB_DEFAULT_M_INPUT_DELAY_FX; + move32(); + hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; + move16(); + set_zero_fx( &hRenderConfig->roomAcoustics.pFc_input_fx[0], CLDFB_NO_CHANNELS_MAX ); + set_zero_fx( &hRenderConfig->roomAcoustics.pAcoustic_rt60_fx[0], CLDFB_NO_CHANNELS_MAX ); + set_zero_fx( &hRenderConfig->roomAcoustics.pAcoustic_dsr_fx[0], CLDFB_NO_CHANNELS_MAX ); + + Copy32( ivas_reverb_default_medium_fc_fx, hRenderConfig->roomAcoustics.pFc_input_fx, IVAS_REVERB_DEFAULT_M_N_BANDS ); + Copy32( ivas_reverb_default_medium_RT60_fx, hRenderConfig->roomAcoustics.pAcoustic_rt60_fx, IVAS_REVERB_DEFAULT_M_N_BANDS ); + Copy32( ivas_reverb_default_medium_DSR_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, IVAS_REVERB_DEFAULT_M_N_BANDS ); + BREAK; + case DEFAULT_REVERB_LARGE: + hRenderConfig->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_L_N_BANDS; + move16(); + hRenderConfig->roomAcoustics.acousticPreDelay_fx = IVAS_REVERB_DEFAULT_L_PRE_DELAY_FX; + move32(); + hRenderConfig->roomAcoustics.inputPreDelay_fx = IVAS_REVERB_DEFAULT_L_INPUT_DELAY_FX; + move32(); + hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; + move16(); + set_zero_fx( &hRenderConfig->roomAcoustics.pFc_input_fx[0], CLDFB_NO_CHANNELS_MAX ); + set_zero_fx( &hRenderConfig->roomAcoustics.pAcoustic_rt60_fx[0], CLDFB_NO_CHANNELS_MAX ); + set_zero_fx( &hRenderConfig->roomAcoustics.pAcoustic_dsr_fx[0], CLDFB_NO_CHANNELS_MAX ); + + Copy32( ivas_reverb_default_large_fc_fx, hRenderConfig->roomAcoustics.pFc_input_fx, IVAS_REVERB_DEFAULT_L_N_BANDS ); + Copy32( ivas_reverb_default_large_RT60_fx, hRenderConfig->roomAcoustics.pAcoustic_rt60_fx, IVAS_REVERB_DEFAULT_L_N_BANDS ); + Copy32( ivas_reverb_default_large_DSR_fx, hRenderConfig->roomAcoustics.pAcoustic_dsr_fx, IVAS_REVERB_DEFAULT_L_N_BANDS ); + BREAK; + default: + return IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING; + } + + return IVAS_ERR_OK; +} +#endif diff --git a/lib_rend/ivas_rom_rend.h b/lib_rend/ivas_rom_rend.h index 5b0f33864..916cd5145 100644 --- a/lib_rend/ivas_rom_rend.h +++ b/lib_rend/ivas_rom_rend.h @@ -107,9 +107,23 @@ extern const Word32 t_design_11_elevation_int[70]; /*Q-22*/ * Reverberator ROM tables *-----------------------------------------------------------------------*/ +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +extern const Word32 ivas_reverb_default_small_fc_fx[]; /*Q-16*/ +extern const Word32 ivas_reverb_default_small_RT60_fx[]; /*Q-26*/ +extern const Word32 ivas_reverb_default_small_DSR_fx[]; /*Q-30*/ + +extern const Word32 ivas_reverb_default_medium_fc_fx[]; /*Q-16*/ +extern const Word32 ivas_reverb_default_medium_RT60_fx[]; /*Q-26*/ +extern const Word32 ivas_reverb_default_medium_DSR_fx[]; /*Q-30*/ + +extern const Word32 ivas_reverb_default_large_fc_fx[]; /*Q-16*/ +extern const Word32 ivas_reverb_default_large_RT60_fx[]; /*Q-26*/ +extern const Word32 ivas_reverb_default_large_DSR_fx[]; /*Q-30*/ +#else extern const Word32 ivas_reverb_default_fc_fx[]; /*Q-16*/ extern const Word32 ivas_reverb_default_RT60_fx[]; /*Q-26*/ extern const Word32 ivas_reverb_default_DSR_fx[]; /*Q-30*/ +#endif /*----------------------------------------------------------------------------------* * EFAP ROM tables diff --git a/lib_rend/ivas_rom_rend_fx.c b/lib_rend/ivas_rom_rend_fx.c index f3f034c4d..4c7f0c3d6 100644 --- a/lib_rend/ivas_rom_rend_fx.c +++ b/lib_rend/ivas_rom_rend_fx.c @@ -252,20 +252,96 @@ const Word32 t_design_11_elevation_int[70] = //Q22 * Reverberator ROM tables *-----------------------------------------------------------------------*/ -const Word32 ivas_reverb_default_fc_fx[IVAS_REVERB_DEFAULT_N_BANDS] /*Q16*/ = +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +const Word32 ivas_reverb_default_small_fc_fx[IVAS_REVERB_DEFAULT_S_N_BANDS] = { - 1310720 , 1638400 , 2064384 , 2621440 , 3276800 , - 4128768 , 5242880 , 6553600 , 8192000 , - 10485760 , 13107200 , 16384000 , 20643840 , - 26214400 , 32768000 , 41287680 , 52428800 , - 65536000 , 81920000 , 104857600 , 131072000 , - 163840000 , 206438400 , 262144000 , 327680000 , - 412876800 , 524288000 , 655360000 , 819200000 , - 1048576000 , 1310720000 + 13107200, 39321600, 65536000, 91750400, 117964800, 144179200, 170393600, 196608000, 222822400, 249036800, + 275251200, 301465600, 327680000, 353894400, 380108800, 406323200, 432537600, 458752000, 484966400, 511180800, + 537395200, 563609600, 589824000, 616038400, 642252800, 668467200, 694681600, 720896000, 747110400, 773324800, + 799539200, 825753600, 851968000, 878182400, 904396800, 930611200, 956825600, 983040000, 1009254400, 1035468800, + 1061683200, 1087897600, 1114112000, 1140326400, 1166540800, 1192755200, 1218969600, 1245184000, 1271398400, 1297612800, + 1323827200, 1350041600, 1376256000, 1402470400, 1428684800, 1454899200, 1481113600, 1507328000, 1533542400, 1559756800 }; -const Word32 ivas_reverb_default_RT60_fx[IVAS_REVERB_DEFAULT_N_BANDS] /*Q26*/ = +const Word32 ivas_reverb_default_small_RT60_fx[IVAS_REVERB_DEFAULT_S_N_BANDS] = +{ + 20132660, 18371052, 17846998, 17702244, 17822236, 17568430, 16977738, 16495426, 15933590, 15312162, + 14732812, 14167755, 13640682, 13163001, 12694380, 12243073, 11827065, 11416157, 11022631, 10656284, + 10291077, 9953050, 9614419, 9287733, 8987823, 8690128, 8409345, 8176074, 7940388, 7726244, + 7560149, 7379157, 7211854, 7067302, 6912616, 6763433, 6618880, 6473925, 6330715, 6188578, + 6047516, 5909405, 5773644, 5641238, 5524872, 5405753, 5293279, 5208588, 5113897, 5027662, + 4972901, 4903511, 4842106, 4808954, 4762649, 4743657, 4712653, 4689433, 4693326, 4685541 +}; + +const Word32 ivas_reverb_default_small_DSR_fx[IVAS_REVERB_DEFAULT_S_N_BANDS] = +{ + 16773, 7628, 5046, 4620, 5666, 6853, 7771, 9876, 11530, 12337, + 11421, 10287, 8791, 7565, 6305, 5215, 4504, 3860, 3627, 4363, + 5246, 6739, 8151, 9611, 10088, 10416, 10154, 9187, 8628, 8012, + 7491, 6931, 6320, 6074, 5589, 5145, 4977, 4646, 4558, 4411, + 4331, 4253, 4147, 4018, 3821, 3629, 3428, 3361, 3361, 3361, + 3361, 3361, 3361, 3361, 3361, 3361, 3361, 3361, 3361, 3361 +}; + +const Word32 ivas_reverb_default_medium_fc_fx[IVAS_REVERB_DEFAULT_M_N_BANDS] = +{ + 1310720, 1638400, 2064384, 2621440, 3276800, + 4128768, 5242880, 6553600, 8192000, + 10485760, 13107200, 16384000, 20643840, + 26214400, 32768000, 41287680, 52428800, + 65536000, 81920000, 104857600, 131072000, + 163840000, 206438400, 262144000, 327680000, + 412876800, 524288000, 655360000, 819200000, + 1048576000, 1310720000 +}; + +const Word32 ivas_reverb_default_medium_RT60_fx[IVAS_REVERB_DEFAULT_M_N_BANDS] = +{ + 14763950, 15099494, 15535702, 16106127, + 16777216, 17649632, 18790482, 20132660, + 21810380, 24159192, 26843546, 26591888, + 26264732, 25836912, 25333596, 24785364, + 24530840, 24231400, 24127968, 24134494, + 24058024, 23406682, 22445968, 21003330, + 19424124, 17708016, 15804674, 13936498, + 12319828, 10826874, 9549390 +}; + +const Word32 ivas_reverb_default_medium_DSR_fx[IVAS_REVERB_DEFAULT_M_N_BANDS] = { + 15978, 16341, 16813, 17430, + 18156, 19101, 20335, 21788, + 23603, 26145, 29050, 27037, + 24421, 20999, 16973, 12614, + 10726, 8506, 8047, 8659, + 10526, 12575, 17260, 19074, + 13653, 7464, 6609, 12688, + 7607, 3835, 2373 +}; +#endif + +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +const Word32 ivas_reverb_default_large_fc_fx[IVAS_REVERB_DEFAULT_L_N_BANDS] /*Q16*/ = +#else +const Word32 ivas_reverb_default_fc_fx[IVAS_REVERB_DEFAULT_N_BANDS] /*Q16*/ = +#endif +{ + 1310720, 1638400, 2064384, 2621440, 3276800, + 4128768, 5242880, 6553600, 8192000, + 10485760, 13107200, 16384000, 20643840, + 26214400, 32768000, 41287680, 52428800, + 65536000, 81920000, 104857600, 131072000, + 163840000, 206438400, 262144000, 327680000, + 412876800, 524288000, 655360000, 819200000, + 1048576000, 1310720000 +}; + +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +const Word32 ivas_reverb_default_large_RT60_fx[IVAS_REVERB_DEFAULT_L_N_BANDS] /*Q26*/ = +#else +const Word32 ivas_reverb_default_RT60_fx[IVAS_REVERB_DEFAULT_N_BANDS] /*Q26*/ = +#endif + { 91415696, 97213904, 88368952, 105944760, 99092952, 93643712, 86496616, 90341952, 72202424, 69799928, 73618424, 72813120, @@ -276,7 +352,11 @@ const Word32 ivas_reverb_default_RT60_fx[IVAS_REVERB_DEFAULT_N_BANDS] /*Q26*/ = 48281472, 41394088, 40286124 }; +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE +const Word32 ivas_reverb_default_large_DSR_fx[IVAS_REVERB_DEFAULT_L_N_BANDS] /*Q30*/ = +#else const Word32 ivas_reverb_default_DSR_fx[IVAS_REVERB_DEFAULT_N_BANDS] /*Q30*/ = +#endif { 20, 23, 15, 16, 13, 20, 25, 42, -- GitLab From 30190e4633128dcd69a3e43c881cb0258340e12e Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Thu, 6 Nov 2025 20:33:20 +0200 Subject: [PATCH 2/8] Fix BASOP --- lib_dec/ivas_init_dec_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 7a31eb5d5..634b31891 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1683,7 +1683,7 @@ ivas_error ivas_init_decoder_fx( return error; } - #ifdef FIX_1318_ROOM_SIZE_CMD_LINE +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /* Get default reverb values based on format, if custom values were not given */ IF( EQ_16(st_ivas->hDecoderConfig->Opt_RendConfigCustom, 0) ) { @@ -1736,7 +1736,7 @@ ivas_error ivas_init_decoder_fx( move32(); BREAK; } - if ( NE_32( error = ivas_render_config_change_defaults( st_ivas->hRenderConfig, defaultReverbSize ), IVAS_ERR_OK ) ) + IF( NE_32( error = ivas_render_config_change_defaults( st_ivas->hRenderConfig, defaultReverbSize ), IVAS_ERR_OK ) ) { return error; } -- GitLab From bf2d1cee11adada2368edb1f48cf6241da4ffdb4 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 7 Nov 2025 11:26:51 +0200 Subject: [PATCH 3/8] Apply clang format partially. --- lib_dec/ivas_init_dec_fx.c | 4 ++-- lib_dec/ivas_stat_dec.h | 18 +++++++++--------- lib_dec/lib_dec_fx.c | 12 ++++++------ lib_rend/ivas_rom_rend.h | 12 ++++++------ 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 634b31891..daf16a208 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1667,8 +1667,8 @@ ivas_error ivas_init_decoder_fx( #ifdef FIX_1318_ROOM_SIZE_CMD_LINE /*--------------------------------------------------------------------------* - * Allocate and initialize HRTF Statistics handle, get default reverb values - *--------------------------------------------------------------------------*/ + * Allocate and initialize HRTF Statistics handle, get default reverb values + *--------------------------------------------------------------------------*/ #else /*--------------------------------------------------------------------* * Allocate and initialize HRTF Statistics handle diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index c4e52f8bf..a10d55094 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1077,15 +1077,15 @@ typedef struct jbm_metadata_structure typedef struct decoder_config_structure { - Word32 ivas_total_brate; /* IVAS total bitrate in bps */ - Word32 last_ivas_total_brate; /* last IVAS total bitrate in bps */ - Word32 output_Fs; /* output signal sampling frequency in Hz */ - Word16 nchan_out; /* number of output audio channels */ - AUDIO_CONFIG output_config; /* output audio configuration */ - Word16 Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */ - Word16 Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ - Word16 Opt_Headrotation; /* indicates whether head-rotation is used */ - Word16 Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ + Word32 ivas_total_brate; /* IVAS total bitrate in bps */ + Word32 last_ivas_total_brate; /* last IVAS total bitrate in bps */ + Word32 output_Fs; /* output signal sampling frequency in Hz */ + Word16 nchan_out; /* number of output audio channels */ + AUDIO_CONFIG output_config; /* output audio configuration */ + Word16 Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */ + Word16 Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ + Word16 Opt_Headrotation; /* indicates whether head-rotation is used */ + Word16 Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ #ifdef FIX_1318_ROOM_SIZE_CMD_LINE IVAS_ROOM_SIZE_T Opt_RoomSize; /* Selected room size */ #endif diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index 572464eef..db08a7d26 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -523,12 +523,12 @@ ivas_error IVAS_DEC_Configure( #ifdef FIX_1318_ROOM_SIZE_CMD_LINE const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ #endif - const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ - const Word16 non_diegetic_pan_gain_fx, /* i : non diegetic panning gain */ - const bool dpidEnabled, /* i : enable directivity pattern option */ - const UWord16 acousticEnvironmentId, /* i : Acoustic environment ID */ - const bool objEditEnabled, /* i : enable object editing */ - const bool delayCompensationEnabled /* i : enable delay compensation */ + const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ + const Word16 non_diegetic_pan_gain_fx, /* i : non diegetic panning gain */ + const bool dpidEnabled, /* i : enable directivity pattern option */ + const UWord16 acousticEnvironmentId, /* i : Acoustic environment ID */ + const bool objEditEnabled, /* i : enable object editing */ + const bool delayCompensationEnabled /* i : enable delay compensation */ ) { Decoder_Struct *st_ivas; diff --git a/lib_rend/ivas_rom_rend.h b/lib_rend/ivas_rom_rend.h index 916cd5145..121f019df 100644 --- a/lib_rend/ivas_rom_rend.h +++ b/lib_rend/ivas_rom_rend.h @@ -108,17 +108,17 @@ extern const Word32 t_design_11_elevation_int[70]; /*Q-22*/ *-----------------------------------------------------------------------*/ #ifdef FIX_1318_ROOM_SIZE_CMD_LINE -extern const Word32 ivas_reverb_default_small_fc_fx[]; /*Q-16*/ -extern const Word32 ivas_reverb_default_small_RT60_fx[]; /*Q-26*/ -extern const Word32 ivas_reverb_default_small_DSR_fx[]; /*Q-30*/ +extern const Word32 ivas_reverb_default_small_fc_fx[]; /*Q-16*/ +extern const Word32 ivas_reverb_default_small_RT60_fx[]; /*Q-26*/ +extern const Word32 ivas_reverb_default_small_DSR_fx[]; /*Q-30*/ extern const Word32 ivas_reverb_default_medium_fc_fx[]; /*Q-16*/ extern const Word32 ivas_reverb_default_medium_RT60_fx[]; /*Q-26*/ extern const Word32 ivas_reverb_default_medium_DSR_fx[]; /*Q-30*/ -extern const Word32 ivas_reverb_default_large_fc_fx[]; /*Q-16*/ -extern const Word32 ivas_reverb_default_large_RT60_fx[]; /*Q-26*/ -extern const Word32 ivas_reverb_default_large_DSR_fx[]; /*Q-30*/ +extern const Word32 ivas_reverb_default_large_fc_fx[]; /*Q-16*/ +extern const Word32 ivas_reverb_default_large_RT60_fx[]; /*Q-26*/ +extern const Word32 ivas_reverb_default_large_DSR_fx[]; /*Q-30*/ #else extern const Word32 ivas_reverb_default_fc_fx[]; /*Q-16*/ extern const Word32 ivas_reverb_default_RT60_fx[]; /*Q-26*/ -- GitLab From 9a82740cd2d27a2d94bce61103bc352c603f7e04 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 7 Nov 2025 11:39:34 +0200 Subject: [PATCH 4/8] Add clang format off to a critical section. --- lib_dec/ivas_init_dec_fx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index daf16a208..a376b78e3 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1666,6 +1666,9 @@ ivas_error ivas_init_decoder_fx( } #ifdef FIX_1318_ROOM_SIZE_CMD_LINE +// clang-format off + /* This section is correctly formatted but clang-format in CI messes this up. Can probably be removed with accepted switches */ + /*--------------------------------------------------------------------------* * Allocate and initialize HRTF Statistics handle, get default reverb values *--------------------------------------------------------------------------*/ @@ -1741,6 +1744,7 @@ ivas_error ivas_init_decoder_fx( return error; } } +// clang-format on #endif } -- GitLab From 889e51469c74adaa39b64664310a6db3b5b37779 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 7 Nov 2025 11:58:23 +0200 Subject: [PATCH 5/8] Try another section. --- lib_dec/ivas_init_dec_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index a376b78e3..77c1c4e6d 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1665,8 +1665,8 @@ ivas_error ivas_init_decoder_fx( } } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE // clang-format off +#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /* This section is correctly formatted but clang-format in CI messes this up. Can probably be removed with accepted switches */ /*--------------------------------------------------------------------------* @@ -1744,9 +1744,9 @@ ivas_error ivas_init_decoder_fx( return error; } } -// clang-format on #endif } +// clang-format on /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles -- GitLab From 9bca5e35b4e6ee2d5ba5cc267f4b03bf43c69fba Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 7 Nov 2025 12:11:54 +0200 Subject: [PATCH 6/8] Try different approach to satisfy clang format. --- lib_dec/ivas_init_dec_fx.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 77c1c4e6d..19f057def 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1665,18 +1665,10 @@ ivas_error ivas_init_decoder_fx( } } -// clang-format off #ifdef FIX_1318_ROOM_SIZE_CMD_LINE - /* This section is correctly formatted but clang-format in CI messes this up. Can probably be removed with accepted switches */ - /*--------------------------------------------------------------------------* * Allocate and initialize HRTF Statistics handle, get default reverb values *--------------------------------------------------------------------------*/ -#else - /*--------------------------------------------------------------------* - * Allocate and initialize HRTF Statistics handle - *--------------------------------------------------------------------*/ -#endif IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) { @@ -1686,7 +1678,6 @@ ivas_error ivas_init_decoder_fx( return error; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /* Get default reverb values based on format, if custom values were not given */ IF( EQ_16(st_ivas->hDecoderConfig->Opt_RendConfigCustom, 0) ) { @@ -1744,9 +1735,21 @@ ivas_error ivas_init_decoder_fx( return error; } } -#endif } -// clang-format on +#else + /*--------------------------------------------------------------------* + * Allocate and initialize HRTF Statistics handle + *--------------------------------------------------------------------*/ + + IF( EQ_32( st_ivas->hOutSetup.output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) + { + /* Init HRTF statistics */ + IF( NE_32( ( error = ivas_HRTF_statistics_init_fx( &st_ivas->hHrtfStatistics, output_Fs ) ), IVAS_ERR_OK ) ) + { + return error; + } + } +#endif /*-----------------------------------------------------------------* * Allocate and initialize SCE/CPE and other handles -- GitLab From f23cda5bfab914e5dab8a2bb408588b62e5ad8e0 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 7 Nov 2025 12:19:21 +0200 Subject: [PATCH 7/8] Final clang format --- lib_dec/ivas_init_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 19f057def..f9eb53b82 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1679,7 +1679,7 @@ ivas_error ivas_init_decoder_fx( } /* Get default reverb values based on format, if custom values were not given */ - IF( EQ_16(st_ivas->hDecoderConfig->Opt_RendConfigCustom, 0) ) + IF( EQ_16( st_ivas->hDecoderConfig->Opt_RendConfigCustom, 0 ) ) { IVAS_DefaultReverbSize defaultReverbSize; SWITCH( st_ivas->hDecoderConfig->Opt_RoomSize ) -- GitLab From 129fd690b23f14c975a83b0f9600c23f4726fefa Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 7 Nov 2025 12:26:56 +0200 Subject: [PATCH 8/8] Fix wrong argument --- apps/decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index a3fa7595f..7a000f9c5 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -416,7 +416,7 @@ int main( #ifdef FIX_1318_ROOM_SIZE_CMD_LINE if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.roomSize, arg.non_diegetic_pan_enabled, - arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) + arg.non_diegetic_pan_gain_fx, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, -- GitLab