diff --git a/apps/decoder.c b/apps/decoder.c index 641445277586061a4bccca81e65d5d51c7aaa444..871738ec0d762256e644bb655b611f6c944e0cf4 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -130,7 +130,6 @@ typedef struct bool tsmEnabled; IVAS_RENDER_FRAMESIZE renderFramesize; #ifdef DEBUGGING - IVAS_DEC_FORCED_REND_MODE forcedRendMode; #ifdef DEBUG_FOA_AGC FILE *agcBitstream; /* temporary */ #endif @@ -183,7 +182,6 @@ static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); -static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); @@ -540,28 +538,6 @@ int main( #endif } - /*------------------------------------------------------------------------------------------* - * Binaural rendering mode: set and print info - *------------------------------------------------------------------------------------------*/ - - if ( arg.forcedRendMode != IVAS_DEC_FORCE_REND_UNFORCED ) - { - if ( ( error = IVAS_DEC_SetForcedRendMode( hIvasDec, arg.forcedRendMode ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: Forcing binaural rendering mode failed (only TDREND and CLDFBREND are expected).\n\n" ); - goto cleanup; - } - - if ( arg.forcedRendMode == IVAS_DEC_FORCE_REND_TD_RENDERER ) - { - fprintf( stdout, "Forcing rendering to: TD renderer\n" ); - } - else if ( arg.forcedRendMode == IVAS_DEC_FORCE_REND_CLDFB_RENDERER ) - { - fprintf( stdout, "Forcing rendering to: CLDFB renderer\n" ); - } - } - /*-----------------------------------------------------------------* * Open Error pattern file for simulation *-----------------------------------------------------------------*/ @@ -970,7 +946,6 @@ static bool parseCmdlIVAS_dec( #ifdef DEBUGGING float ftmp; - arg->forcedRendMode = IVAS_DEC_FORCE_REND_UNFORCED; #ifdef DEBUG_FOA_AGC arg->agcBitstream = NULL; #endif @@ -1140,17 +1115,6 @@ static bool parseCmdlIVAS_dec( } i += 2; } - else if ( strcmp( argv_to_upper, "-FORCE" ) == 0 ) - { - i++; - if ( i < argc - 3 ) - { - strncpy( argv_to_upper, argv[i], sizeof( argv_to_upper ) - 1 ); - argv_to_upper[sizeof( argv_to_upper ) - 1] = '\0'; - arg->forcedRendMode = parseForcedRendModeDec( argv_to_upper ); - i++; - } - } #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK /* Define additional subfolder for debug info output in ./res */ @@ -3967,31 +3931,6 @@ static void do_object_editing( return; } -#ifdef DEBUGGING - -/*---------------------------------------------------------------------* - * parseForcedRendModeDec() - * - * - *---------------------------------------------------------------------*/ - -static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( - char *forcedRendModeChar ) -{ - if ( ( strcmp( to_upper( forcedRendModeChar ), "TDREND" ) == 0 ) ) - { - return IVAS_DEC_FORCE_REND_TD_RENDERER; - } - if ( ( strcmp( to_upper( forcedRendModeChar ), "CLDFBREND" ) == 0 ) ) - { - return IVAS_DEC_FORCE_REND_CLDFB_RENDERER; - } - - return IVAS_DEC_FORCE_REND_UNDEFINED; -} - -#endif - /*---------------------------------------------------------------------* * load_hrtf_from_file() diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 3576f19440641aa1d6312b66ebe82a00e6ef764c..c8b4260434279290b14d30e1a8e5377445c09408 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1167,8 +1167,6 @@ ivas_error ivas_init_decoder_front( #ifdef DEBUGGING st_ivas->noClipping = 0; - - st_ivas->hDecoderConfig->force_rend = -1; #endif /*-------------------------------------------------------------------* * Allocate and initialize Custom loudspeaker layout handle @@ -3226,17 +3224,6 @@ static ivas_error doSanityChecks_IVAS( { return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, "Wrong set-up: Only object editing or Non-diegetic panning can be used." ); } -#ifdef DEBUGGING - if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || ( output_config != IVAS_AUDIO_CONFIG_BINAURAL && output_config != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration: Time Domain object renderer not supported in this configuration" ); - } - - if ( ( st_ivas->hHrtfTD != NULL && st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) ) - { - return IVAS_ERROR( IVAS_ERR_INVALID_FORCE_MODE, "Incorrect debug configuration: Cannot force CLDFB renderer in combination with TD renderer HRTF file" ); - } -#endif return IVAS_ERR_OK; } diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index fa4ff1c7d3459cd4586a99dea30ec4c68304619c..0c147185c9bf0588c17c3a54a1af29cebbb10024 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -95,21 +95,8 @@ void ivas_renderer_select( { if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { -#ifdef DEBUGGING - if ( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) - { - *renderer_type = RENDERER_BINAURAL_FASTCONV; - *internal_config = IVAS_AUDIO_CONFIG_HOA3; /* Render ISM to HOA3 before binauralization*/ - } - else - { - *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; - *internal_config = output_config; - } -#else *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; *internal_config = output_config; -#endif } else { @@ -198,11 +185,7 @@ void ivas_renderer_select( if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { -#ifdef DEBUGGING - if ( ( ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && st_ivas->mc_mode == MC_MODE_MCT && st_ivas->hDecoderConfig->force_rend != FORCE_CLDFB_RENDERER ) -#else if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && st_ivas->mc_mode == MC_MODE_MCT ) -#endif { *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index ac6c6e42ba078e46db565eb0eba71c0faea38026..abdec141463edb24cad4f1dbc89a04d1bdc15d8d 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1031,11 +1031,7 @@ typedef struct decoder_config_structure int16_t Opt_dpid_on; /* indicates whether Directivity pattern option is used */ int16_t Opt_aeid_on; /* indicates whether Acoustic environment option is used */ int16_t Opt_ObjEdit_on; /* indicates whether object editing option is used */ -#ifdef DEBUGGING - /* temp. development parameters */ - int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */ -#endif - int16_t Opt_tsm; /* indicates whether time scaling modification is activated */ + int16_t Opt_tsm; /* indicates whether time scaling modification is activated */ IVAS_RENDER_FRAMESIZE render_framesize; int16_t Opt_delay_comp; /* flag indicating delay compensation active */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index d4032c36d75542c07232948397c8bb168b10fe59..57e3ad0307631c2595c62ea19a57d74d9920168f 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -4829,65 +4829,6 @@ int32_t IVAS_DEC_GetCntFramesLimited( } } - -/*---------------------------------------------------------------------* - * forcedRendModeApiToInternalDec() - * - * - *---------------------------------------------------------------------*/ - -static ivas_error forcedRendModeApiToInternalDec( - const IVAS_DEC_FORCED_REND_MODE forcedRendMode, - int16_t *forcedModeInternal ) -{ - switch ( forcedRendMode ) - { - case IVAS_DEC_FORCE_REND_TD_RENDERER: - *forcedModeInternal = FORCE_TD_RENDERER; - break; - case IVAS_DEC_FORCE_REND_CLDFB_RENDERER: - *forcedModeInternal = FORCE_CLDFB_RENDERER; - break; - case IVAS_DEC_FORCE_REND_UNFORCED: - *forcedModeInternal = -1; - break; - default: - return IVAS_ERR_INVALID_FORCE_MODE; - break; - } - - return IVAS_ERR_OK; -} - - -/*---------------------------------------------------------------------* - * IVAS_DEC_SetForcedRendMode() - * - * - *---------------------------------------------------------------------*/ - -ivas_error IVAS_DEC_SetForcedRendMode( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const IVAS_DEC_FORCED_REND_MODE forcedRendMode /* i : forced renderer mode */ -) -{ - int16_t newForcedRend; - ivas_error error; - - if ( ( error = forcedRendModeApiToInternalDec( forcedRendMode, &newForcedRend ) ) != IVAS_ERR_OK ) - { - return error; - } - - if ( hIvasDec->st_ivas->hDecoderConfig->force_rend != newForcedRend ) - { - hIvasDec->st_ivas->hDecoderConfig->force_rend = newForcedRend; - } - - return IVAS_ERR_OK; -} - - #ifdef DEBUG_SBA_AUDIO_DUMP /*---------------------------------------------------------------------* * IVAS_DEC_GetSbaDebugParams( ) diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 8bc3a1fe1b28686fb1c4564c995ad6659fdf9cc1..22805c7a4226906076b150b9a7fd9f27fb1551ac 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -64,16 +64,6 @@ typedef enum _IVAS_DEC_COMPLEXITY_LEVEL } IVAS_DEC_COMPLEXITY_LEVEL; -#ifdef DEBUGGING -typedef enum _IVAS_DEC_FORCED_REND_MODE -{ - IVAS_DEC_FORCE_REND_CLDFB_RENDERER, - IVAS_DEC_FORCE_REND_TD_RENDERER, - IVAS_DEC_FORCE_REND_UNFORCED, - IVAS_DEC_FORCE_REND_UNDEFINED = 0xffff -} IVAS_DEC_FORCED_REND_MODE; -#endif - typedef enum _IVAS_DEC_PCM_TYPE { IVAS_DEC_PCM_INT16, @@ -402,12 +392,6 @@ int32_t IVAS_DEC_GetCntFramesLimited( IVAS_DEC_HANDLE hIvasDec /* i : IVAS decoder handle */ ); -/*! r: error code */ -ivas_error IVAS_DEC_SetForcedRendMode( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - const IVAS_DEC_FORCED_REND_MODE forcedRendMode /* i : forced renderer mode */ -); - #ifdef DEBUG_SBA_AUDIO_DUMP ivas_error IVAS_DEC_GetSbaDebugParams( const IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */