diff --git a/apps/decoder.c b/apps/decoder.c index e63a80e8971e8bff14ba0df175479b18b6caba63..6edb2e1eaccdf91d986d1a4b7f3295fca0cdd41e 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -180,20 +180,13 @@ static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS #else static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #endif -#ifdef FIX_FMSW_DEC static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ); -#else -static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ); -#endif static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #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 ); #endif static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); -#ifndef FIX_FMSW_DEC -static ivas_error restartDecoder( IVAS_DEC_HANDLE *phIvasDec, const IVAS_DEC_MODE decMode, DecArguments *arg, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_CUSTOM_LS_DATA *hLsCustomData ); -#endif /*------------------------------------------------------------------------------------------* @@ -498,98 +491,6 @@ int main( } } -#ifndef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT -#ifdef DEBUGGING - /*-----------------------------------------------------------------* - * Preview bitstream and print config information - *-----------------------------------------------------------------*/ - - if ( arg.voipMode ) - { - if ( ( error = printBitstreamInfoVoip( arg, hBsReader, hIvasDec ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Error while previewing VoIP bitstream: %s\n", ivas_error_to_string( error ) ); - goto cleanup; - } - } - else - { - uint16_t bit_stream[IVAS_MAX_BITS_PER_FRAME + 4 * 8]; - int16_t num_bits; - int16_t bfi = 0; - do - { - if ( BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: input bitstream file %s couldn't be read\n\n", arg.inputBitstreamFilename ); - goto cleanup; - } - } while ( bfi || num_bits < MIN_NUM_BITS_ACTIVE_FRAME || num_bits == NUM_BITS_SID_IVAS_5K2 ); - - BS_Reader_Rewind( hBsReader ); - - IVAS_DEC_PrintConfigWithBitstream( hIvasDec, arg.quietModeEnabled, bit_stream, num_bits ); - -#ifdef VARIABLE_SPEED_DECODING - if ( arg.tsmEnabled ) - { - if ( arg.tsmScaleFileEnabled ) - { - fprintf( stdout, "Variable speed file: %s\n", arg.tsmScaleFileName ); - } - else - { - fprintf( stdout, "Variable speed factor: %i\n", arg.tsmScale ); - } - } -#endif - } - - /*-----------------------------------------------------------------* - * Open Error pattern file for simulation - *-----------------------------------------------------------------*/ - - if ( arg.FEPatternFileName != NULL ) - { - if ( ( FEC_pattern = fopen( arg.FEPatternFileName, "rb" ) ) == NULL ) - { - fprintf( stderr, "Error: Missing or incorrect FEC filename specification\n\n" ); - usage_dec(); - goto cleanup; - } - } - -#ifdef DEBUG_SBA_AUDIO_DUMP - ivas_open_sba_decoder_debug_files( arg.output_Fs, 1, 1 ); -#endif - - /*-----------------------------------------------------------------* - * Print information about FEC - *-----------------------------------------------------------------*/ - - if ( !arg.voipMode && ( arg.FEPatternFileName != NULL || arg.FER > 0 ) ) - { - if ( arg.FEPatternFileName != NULL ) - { - fprintf( stdout, "FEC: %s\n", arg.FEPatternFileName ); - } - else - { - fprintf( stdout, "FEC: %.2f %%\n", arg.FER ); - } - } -#else - /*-----------------------------------------------------------------* - * Print config information - *-----------------------------------------------------------------*/ - - if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } -#endif -#endif /*-------------------------------------------------------------------* * Load renderer configuration from file @@ -623,13 +524,11 @@ int main( goto cleanup; } -#ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } -#endif aeCount = RenderConfigReader_getAcousticEnvironmentCount( renderConfigReader ); if ( aeCount > 0 ) @@ -710,27 +609,11 @@ int main( if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { -#ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID ); goto cleanup; } -#else - if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) - { - if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Invalid reverberation configuration parameters\n\n" ); - goto cleanup; - } - } - else - { - fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", aeID ); - goto cleanup; - } -#endif } /* ISAR frame size is set from command line, not renderer config file. @@ -779,7 +662,6 @@ int main( hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID; } -#ifdef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT #ifdef DEBUGGING /*-----------------------------------------------------------------* * Preview bitstream and print config information @@ -869,7 +751,6 @@ int main( fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#endif #endif /*------------------------------------------------------------------------------------------* @@ -896,11 +777,7 @@ int main( if ( arg.voipMode ) { -#ifdef FIX_FMSW_DEC error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &hIvasDec, pcmBuf ); -#else - error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &renderConfig, &hIvasDec, pcmBuf ); -#endif } else { @@ -2456,13 +2333,11 @@ static ivas_error decodeG192( goto cleanup; } -#ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } -#endif } for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; ++i ) @@ -2662,27 +2537,11 @@ static ivas_error decodeG192( arg.aeSequence.selected = 0; } arg.aeSequence.frameCounter = 0; -#ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.aeSequence.pID[arg.aeSequence.selected], &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get acoustic environment with ID %d\n\n", arg.aeSequence.pID[arg.aeSequence.selected] ); goto cleanup; } -#else - if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, arg.aeSequence.pID[arg.aeSequence.selected], &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) - { - if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Invalid acoustic environment configuratoin parameters\n\n" ); - goto cleanup; - } - } - else - { - fprintf( stderr, "Failed to get acoustic environment with ID %d\n\n", arg.aeSequence.pID[arg.aeSequence.selected] ); - goto cleanup; - } -#endif if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, renderConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); @@ -2758,34 +2617,11 @@ static ivas_error decodeG192( if ( restartNeeded ) { -#ifdef FIX_FMSW_DEC if ( ( error = IVAS_DEC_Restart( hIvasDec, IVAS_DEC_MODE_IVAS ) ) != IVAS_ERR_OK ) /* note: only switching within IVAS formats is supported in G.192 */ { fprintf( stderr, "\nIVAS_DEC_Restart restart failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#else - IVAS_DEC_BS_FORMAT tempFormat; - if ( ( error = IVAS_DEC_GetFormat( hIvasDec, &tempFormat ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetFormat, code: %d\n", error ); - goto cleanup; - } - IVAS_DEC_MODE codecMode = ( tempFormat == IVAS_DEC_BS_MONO ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; - error = restartDecoder( - &hIvasDec, - codecMode, - &arg, - NULL, /* ToDo : Provide rendererConfig */ - NULL /* ToDo : Provide LS Custom Data */ - ); - if ( error != IVAS_ERR_OK ) - { - fprintf( stderr, "\nFailed to restart decoder\n" ); - goto cleanup; - } - *phIvasDec = hIvasDec; /* Update for main()' s free */ -#endif } #endif @@ -3360,9 +3196,6 @@ static ivas_error decodeVoIP( Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, -#ifndef FIX_FMSW_DEC - IVAS_RENDER_CONFIG_DATA *renderConfig, -#endif IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ) { @@ -3521,14 +3354,12 @@ static ivas_error decodeVoIP( /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; -#ifdef FIX_FMSW_DEC_2 arg.decMode = ( ivasRtp.codecId == IVAS_RTP_EVS ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; if ( ( error = IVAS_DEC_Restart( hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) /* note: when the RTP bitstream starts with EVS, do the restart */ { fprintf( stderr, "\nIVAS_DEC_Restart restart failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#endif } if ( error != IVAS_ERR_OK ) { @@ -3562,29 +3393,12 @@ static ivas_error decodeVoIP( /* restart decoder in case of format switching */ if ( ivasRtp.restartNeeded ) { -#ifdef FIX_FMSW_DEC arg.decMode = ( ivasRtp.codecId == IVAS_RTP_EVS ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; if ( ( error = IVAS_DEC_Restart( hIvasDec, arg.decMode ) ) != IVAS_ERR_OK ) /* note: switching between EVS and IVAS is supported in RTP */ { fprintf( stderr, "\nIVAS_DEC_Restart restart failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#else - IVAS_DEC_MODE newDecModeInPacket = ( ivasRtp.codecId == IVAS_RTP_EVS ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; - if ( ( error = restartDecoder( - &hIvasDec, - newDecModeInPacket, - &arg, - renderConfig, - NULL /* ToDo : Provide LS Custom Data */ - ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nFailed to restart decoder from %d to %d\n", arg.decMode, newDecModeInPacket ); - goto cleanup; - } - - *phIvasDec = hIvasDec; /* Update for main()' s free */ -#endif ivasRtp.restartNeeded = false; bitstreamReadDone = false; parametersAvailableForEditing = false; @@ -3816,34 +3630,11 @@ static ivas_error decodeVoIP( if ( restartNeeded ) { -#ifdef FIX_FMSW_DEC if ( ( error = IVAS_DEC_Restart( hIvasDec, IVAS_DEC_MODE_IVAS ) ) != IVAS_ERR_OK ) /* note: only switching within IVAS formats is supported in non-RTP VoIP */ { fprintf( stderr, "\nIVAS_DEC_Restart restart failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#else - IVAS_DEC_BS_FORMAT tempBsFormat; - if ( ( error = IVAS_DEC_GetFormat( hIvasDec, &tempBsFormat ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetFormat, code: %d\n", error ); - goto cleanup; - } - - IVAS_DEC_MODE newDecModeInPacket = ( tempBsFormat == IVAS_DEC_BS_MONO ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; - if ( ( error = restartDecoder( - &hIvasDec, - newDecModeInPacket, - &arg, - NULL, /* ToDo : Provide rendererConfig */ - NULL /* ToDo : Provide LS Custom Data */ - ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nFailed to restart decoder\n" ); - goto cleanup; - } - *phIvasDec = hIvasDec; /* Update for main()' s free */ -#endif bitstreamReadDone = false; parametersAvailableForEditing = false; } @@ -4531,110 +4322,4 @@ static ivas_error load_hrtf_from_file( return IVAS_ERR_OK; } -#ifndef FIX_FMSW_DEC -/*---------------------------------------------------------------------* - * restartDecoder() - * - * Restart decoder in case of IVAS format switching - *---------------------------------------------------------------------*/ - -static ivas_error restartDecoder( - IVAS_DEC_HANDLE *phIvasDec, - const IVAS_DEC_MODE decMode, - DecArguments *arg, - IVAS_RENDER_CONFIG_DATA *renderConfig, - IVAS_CUSTOM_LS_DATA *hLsCustomData ) -{ - ivas_error error = IVAS_ERR_OK; - IVAS_DEC_HANDLE hIvasDec; - - if ( phIvasDec == NULL ) - { - return IVAS_ERR_UNEXPECTED_NULL_POINTER; - } - - if ( NULL != *phIvasDec ) - { - IVAS_DEC_Close( phIvasDec ); - } - - if ( ( error = IVAS_DEC_Open( phIvasDec, decMode ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - arg->decMode = decMode; - - hIvasDec = *phIvasDec; - - uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : IVAS_DEFAULT_AEID; - - IVAS_AUDIO_CONFIG outputConfig = ( decMode == IVAS_DEC_MODE_IVAS ) ? arg->outputConfig : IVAS_AUDIO_CONFIG_MONO; - - if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->render_num_subframes, 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 ) - { - fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - if ( arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) - { - if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nSplit rendering configure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } - - if ( ( error = IVAS_DEC_GetRenderNumSubfr( hIvasDec, &arg->render_num_subframes ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_GetRenderNumSubfr failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - if ( arg->voipMode ) - { - if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg->inputFormat ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } - - /* ISAR frame size is set from command line, not renderer config file. - * This will be ignored if output format is not split rendering. */ - if ( renderConfig != NULL ) - { - renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->render_num_subframes * 5; - } - - if ( arg->renderConfigEnabled && renderConfig != NULL ) - { - if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, *renderConfig ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } - - if ( arg->customLsOutputEnabled && hLsCustomData != NULL ) - { - if ( ( error = IVAS_DEC_FeedCustomLsData( hIvasDec, *hLsCustomData ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nIVAS_DEC_FeedCustomLsData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - } - - return IVAS_ERR_OK; - -cleanup: - IVAS_DEC_Close( phIvasDec ); - return error; -} - -#endif #undef WMC_TOOL_SKIP diff --git a/apps/encoder.c b/apps/encoder.c index 7e03d18bcd14a7a0fd4b8e810ee266c6c25227dd..db33d3deeccbae26285ff4bf13a05ab6a8c5825f 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -367,7 +367,6 @@ int main( } } -#ifdef FIX_FMSW_DEC /*------------------------------------------------------------------------------------------* * Open remote requests file for rtp packing (E-bytes) *------------------------------------------------------------------------------------------*/ @@ -387,7 +386,6 @@ int main( goto cleanup; } } -#endif /*------------------------------------------------------------------------------------------* * Handle Channel-aware mode @@ -682,21 +680,6 @@ int main( } } -#ifndef FIX_FMSW_DEC -#ifdef FIX_1527_CMR_BITRATE_IDX - /*------------------------------------------------------------------------------------------* - * Open remote requests file for rtp packing (E-bytes) - *------------------------------------------------------------------------------------------*/ - if ( arg.requestsFileName != NULL ) - { - if ( ( error = RequestsFileReader_open( arg.requestsFileName, &requestsFileReader ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError: Can't open requests file %s \n\n", arg.requestsFileName ); - goto cleanup; - } - } -#endif -#endif /*------------------------------------------------------------------------------------------* * Run the encoder *------------------------------------------------------------------------------------------*/ diff --git a/apps/renderer.c b/apps/renderer.c index de60458259c9bf8e4c6bb296f5bc6a56cd85f0be..770406167228096406d0b2f69661f82ec1b5c8ee 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1100,7 +1100,6 @@ int main( fprintf( stderr, "\nError in Renderer Config Init: %s\n", ivas_error_to_string( error ) ); goto cleanup; } -#ifdef FIX_1452_DEFAULT_REVERB if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { @@ -1146,7 +1145,6 @@ int main( goto cleanup; } } -#endif if ( args.renderConfigFilePath[0] != '\0' ) { @@ -1173,13 +1171,11 @@ int main( goto cleanup; } -#ifdef FIX_2500_RENDCONF_REFACTOR if ( RenderConfigReader_checkValues( renderConfigReader ) != IVAS_ERR_OK ) { fprintf( stderr, "Invalid renderer configuration parameters\n\n" ); goto cleanup; } -#endif if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, args.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) { @@ -1196,27 +1192,11 @@ int main( if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { aeID = args.aeSequence.count > 0 ? args.aeSequence.pID[0] : IVAS_DEFAULT_AEID; -#ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, aeID, &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nFailed to get acoustic environment with ID: %d\n\n", aeID ); goto cleanup; } -#else - if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) - { - if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nInvalid room acoustics configuration parameters\n\n" ); - goto cleanup; - } - } - else - { - fprintf( stderr, "\nFailed to get acoustic environment with ID: %d\n\n", aeID ); - goto cleanup; - } -#endif } /* ISAR frame size is set from command line, not renderer config file. @@ -1623,27 +1603,11 @@ int main( args.aeSequence.selected = 0; } args.aeSequence.frameCounter = 0; -#ifdef FIX_2500_RENDCONF_REFACTOR if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.aeSequence.pID[args.aeSequence.selected], &renderConfig.roomAcoustics ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nFailed to get acoustic environment with ID %d\n\n", args.aeSequence.pID[args.aeSequence.selected] ); goto cleanup; } -#else - if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, args.aeSequence.pID[args.aeSequence.selected], &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) - { - if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nInvalid acoustic environment configuration parameters\n\n" ); - goto cleanup; - } - } - else - { - fprintf( stderr, "\nFailed to get acoustic environment with ID %d\n\n", args.aeSequence.pID[args.aeSequence.selected] ); - goto cleanup; - } -#endif if ( ( error = IVAS_REND_FeedRenderConfig( hIvasRend, renderConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_REND_FeedRenderConfig failed: %s\n\n", ivas_error_to_string( error ) ); @@ -3102,11 +3066,7 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].non_diegetic_flag = 0; } -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW /* Wrap azimuth to lie within [0, 360) range */ -#else - /* Wrap azimuth to lie within (-180, 180] range */ -#endif while ( objectMetadataBuffer->positions[objIdx].azimuth < 0.0f ) { objectMetadataBuffer->positions[objIdx].azimuth += 360.0f; @@ -3116,13 +3076,11 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].azimuth -= 360.0f; } -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW if ( objectMetadataBuffer->positions[objIdx].non_diegetic_flag && objectMetadataBuffer->positions[objIdx].azimuth >= 180.0f ) { /* Wrap azimuth to lie within [-180, 180) range for non-diegetic panning */ objectMetadataBuffer->positions[objIdx].azimuth -= 360.0f; } -#endif /* Clamp elevation to lie within [-90, 90] range (can't be wrapped easily) */ diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index cbf7af9984d4838b24d737c0ba17d7a9e43ad5bc..7e73893b4916ed3b139a2fcdf212d7b8dd11141b 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -61,9 +61,7 @@ #define IVAS_REVERB_PREDELAY_MAX 20 /* Max input delay for reverb module */ #define IVAS_ER_LIST_HEIGHT 1.6f #define IVAS_DEFAULT_AEID 65535 -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION -#define IVAS_LISTENER_POSITION_MAX 327.67f -#endif +#define IVAS_LISTENER_POSITION_MAX 327.67f /* JBM constants for adaptive-playout */ diff --git a/lib_com/fd_cng_com.c b/lib_com/fd_cng_com.c index dd2d6e7413777af7224a8118d0e7489780222834..016bff7e7597ef71681b9058fd8ad63bb9918431 100644 --- a/lib_com/fd_cng_com.c +++ b/lib_com/fd_cng_com.c @@ -118,9 +118,7 @@ void initFdCngCom( hFdCngCom->stopBand = 0; hFdCngCom->startBand = 0; hFdCngCom->stopFFTbin = 0; -#ifdef FIX_1559 hFdCngCom->nFFTpart = 0; -#endif hFdCngCom->frameSize = 0; hFdCngCom->fftlen = 0; hFdCngCom->seed = 0; diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index c02b1833d5ad68f9940fd1eb09d8c08a15f08656..3a9c905683fab64a1f3b54ab26310642f7cb754f 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1216,12 +1216,8 @@ typedef enum { MASA_STEREO_NOT_DEFINED, MASA_STEREO_SPACED_MICS, -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES MASA_STEREO_DOWNMIX, MASA_DUAL_MONO -#else - MASA_STEREO_DOWNMIX -#endif } MASA_TRANSPORT_SIGNAL_TYPE; typedef enum @@ -1581,7 +1577,6 @@ typedef enum #define IVAS_REVERB_DEFAULT_M_N_BANDS 31 #define IVAS_REVERB_DEFAULT_S_N_BANDS 60 -#ifdef FIX_1452_DEFAULT_REVERB #define IVAS_REVERB_DEFAULT_S_ACOUSTIC_PRE_DELAY 0.015f #define IVAS_REVERB_DEFAULT_S_INPUT_PRE_DELAY 0.02f @@ -1590,7 +1585,6 @@ typedef enum #define IVAS_REVERB_DEFAULT_L_ACOUSTIC_PRE_DELAY 0.01625f #define IVAS_REVERB_DEFAULT_L_INPUT_PRE_DELAY 0.1f -#endif #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) #define LR_IAC_LENGTH_NR_FC_16KHZ ( RV_LENGTH_NR_FC_16KHZ ) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 3538f28f7c53a018adb1c2ca0ef52f3b47a7fb68..c8f870fe12e86cabb5828b7a7cc4cc130973487d 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -434,11 +434,7 @@ void destroy_core_dec( ); void ivas_destroy_dec( -#ifdef FIX_FMSW_DEC Decoder_Struct **st_ivas /* i/o: IVAS decoder structure */ -#else - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ -#endif ); void ivas_initialize_handles_dec( @@ -2950,9 +2946,6 @@ ivas_error stereo_memory_enc( CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ const int32_t input_Fs, /* i : input sampling rate */ const int16_t max_bwidth, /* i : maximum audio bandwidth */ -#ifndef FIX_1594_TDM_LAST_RATIO - float *tdm_last_ratio, /* o : TD stereo last ratio */ -#endif const IVAS_FORMAT ivas_format, /* i : IVAS format */ const int16_t nchan_transport /* i : number transport chans */ ); diff --git a/lib_com/options.h b/lib_com/options.h index b8d8da98a46b7ab0e53232f395531dc3bda0e33a..5c079fce2cc95976007f99cb6aca5453e324be0a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,28 +162,13 @@ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ #define FIX_FLOAT_1539_G192_FORMAT_SWITCH /* Nokia: reintroduce format switching for g192 bitstreams */ -#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Dolby: remove unused ISAR */ -#define FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD /* FhG: float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() */ -#define FIX_1585_ASAN_FORMAT_SW_ALT /* VA,FhG: float issues 1585,1593: alternative fix memory leaks with format switching */ -#define FIX_2570_BUF_OVFL /* Orange: basop issue 2570: global-buffer-overflow in lib_rend/ivas_objectRenderer_sources_fx.c */ -#define FIX_1594_TDM_LAST_RATIO /* VA: float issue 1594: remove obsolete argument 'tdm_last_ratio' from stereo_memory_enc () */ -#define FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT /* Dolby: float issue 1550: Wrong render framesize printout */ /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt. TS 26.258 V3.0 */ -#define FIX_1521_SBA_LOUDNESS_STEREO /* FhG: issue 1521: Fix loudness for SBA to stereo rendering */ -#define FIX_2500_RENDCONF_REFACTOR /* Eri: Basop issue #2500: Renderer configuration range check before conversion to fixed point. Harmonize between BASOP/float */ -#define FIX_BASOP_2023_TDREND_DISTATT_PRECISION /* Eri: Basop issue 2023: Distance attenuation scaling, synch with BASOP updates and adding clamping of distance att input and listener position */ #define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */ -#define FIX_1452_DEFAULT_REVERB /* Nokia/Philips/FhG: Fix default room presets and their usage in renderer */ -#define FIX_1559 /* Eri/FhG: fix for Issue 1559 in FD CNG with bitrate/bw switching */ -#define FIX_FMSW_DEC /* float issue 1542: fix JBM issue in format switching */ -#define FIX_FMSW_DEC_2 /* float issue 1575: fix crash for format switching when bitsream starts with EVS */ -#define FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW /* Orange: float issue 1548: Harmonize non diegetic panning law in ISM and renderers */ -#define FIX_FLOAT_1578_OMASA_REND_SPIKES /* Nokia: Float issue 1578: Fix spikes and collapsed perception in OMASA/MASA rendering to FOA/HOA */ #define FIX_2585_BIT_ALLOCATION_DIFF /* VA : issue 2585, bit allocation different behaviors between float and fixed-point for corner cases */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/fd_cng_dec.c b/lib_dec/fd_cng_dec.c index 73ff86959eac3f61bfe4624459fc16af0ae90a1a..6b8335151f8eabf2d0db4dc422ee7b1acbe7a6ad 100644 --- a/lib_dec/fd_cng_dec.c +++ b/lib_dec/fd_cng_dec.c @@ -191,9 +191,7 @@ void configureFdCngDec( { int16_t j, stopBandFR; HANDLE_FD_CNG_COM hsCom = hFdCngDec->hFdCngCom; -#ifdef FIX_1559 int16_t nFFTpart_prev; -#endif hsCom->CngBandwidth = bwidth; if ( hsCom->CngBandwidth == FB ) @@ -299,10 +297,8 @@ void configureFdCngDec( hsCom->startBand = 2; hsCom->stopBand = hsCom->FdCngSetup.sidPartitions[hsCom->FdCngSetup.numPartitions - 1] + 1; initPartitions( hsCom->FdCngSetup.sidPartitions, hsCom->FdCngSetup.numPartitions, hsCom->startBand, hsCom->stopBand, hsCom->part, &hsCom->npart, hsCom->midband, hsCom->psize, hsCom->psize_inv, 0 ); -#ifdef FIX_1559 nFFTpart_prev = hsCom->nFFTpart; -#endif if ( hsCom->stopFFTbin == 160 ) { hsCom->nFFTpart = 17; @@ -322,7 +318,6 @@ void configureFdCngDec( hsCom->CLDFBpsize_inv[j] = hsCom->psize_inv[j + hsCom->nFFTpart]; } -#ifdef FIX_1559 /* In case of going from a lower number of partitions to a higher number, initialize the higher ines which might be zero and/or outdated with the highest partitions value this avoids almost-zero values to linger around and causing signal bursts after switching to higher bitrate. @@ -334,7 +329,6 @@ void configureFdCngDec( hFdCngDec->partNoiseShape[j] = hFdCngDec->partNoiseShape[nFFTpart_prev - 1]; } } -#endif stopBandFR = (int16_t) floor( 1000.f /*Hz*/ / 25.f /*Hz/Bin*/ ); if ( stopBandFR > hsCom->stopFFTbin ) diff --git a/lib_dec/ivas_corecoder_dec_reconfig.c b/lib_dec/ivas_corecoder_dec_reconfig.c index a8ef4a43c5bbbffac5191189671897051f524853..d4120b6119696aab1c31a2a265ef8a61fcc6504e 100644 --- a/lib_dec/ivas_corecoder_dec_reconfig.c +++ b/lib_dec/ivas_corecoder_dec_reconfig.c @@ -381,9 +381,6 @@ ivas_error ivas_hp20_dec_reconfig( ) { int16_t i, nchan_hp20; -#ifndef FIX_1585_ASAN_FORMAT_SW_ALT - float **old_mem_hp20_out; -#endif ivas_error error; error = IVAS_ERR_OK; @@ -396,7 +393,6 @@ ivas_error ivas_hp20_dec_reconfig( if ( nchan_hp20 > nchan_hp20_old ) { -#ifdef FIX_1585_ASAN_FORMAT_SW_ALT /* create additional hp20 memories */ for ( i = nchan_hp20_old; i < nchan_hp20; i++ ) { @@ -407,70 +403,15 @@ ivas_error ivas_hp20_dec_reconfig( set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM ); } -#else - /* save old mem_hp_20 pointer */ - old_mem_hp20_out = st_ivas->mem_hp20_out; - st_ivas->mem_hp20_out = NULL; - - if ( ( st_ivas->mem_hp20_out = (float **) malloc( nchan_hp20 * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); - } - - for ( i = 0; i < nchan_hp20_old; i++ ) - { - st_ivas->mem_hp20_out[i] = old_mem_hp20_out[i]; - old_mem_hp20_out[i] = NULL; - } - /* create additional hp20 memories */ - for ( ; i < nchan_hp20; i++ ) - { - if ( ( st_ivas->mem_hp20_out[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); - } - - set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM ); - } - - free( old_mem_hp20_out ); - old_mem_hp20_out = NULL; -#endif } else if ( nchan_hp20 < nchan_hp20_old ) { -#ifdef FIX_1585_ASAN_FORMAT_SW_ALT /* remove superfluous hp20 memories */ for ( i = nchan_hp20; i < nchan_hp20_old; i++ ) { free( st_ivas->mem_hp20_out[i] ); st_ivas->mem_hp20_out[i] = NULL; } -#else - /* save old mem_hp_20 pointer */ - old_mem_hp20_out = st_ivas->mem_hp20_out; - st_ivas->mem_hp20_out = NULL; - - if ( ( st_ivas->mem_hp20_out = (float **) malloc( nchan_hp20 * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); - } - - for ( i = 0; i < nchan_hp20; i++ ) - { - st_ivas->mem_hp20_out[i] = old_mem_hp20_out[i]; - old_mem_hp20_out[i] = NULL; - } - /* remove superfluous hp20 memories */ - for ( ; i < nchan_hp20_old; i++ ) - { - free( old_mem_hp20_out[i] ); - old_mem_hp20_out[i] = NULL; - } - - free( old_mem_hp20_out ); - old_mem_hp20_out = NULL; -#endif } return error; diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 1ff5b1e761c78b59112559a2a3ddb34cd6a30652..2cc5512aa022dd4e639d68727c736b9296eb07e9 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -274,11 +274,7 @@ static ivas_error ivas_dirac_rend_config( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES ivas_masa_init_stereotype_detection( hDirACRend->masa_stereo_type_detect, ivas_total_brate ); -#else - ivas_masa_init_stereotype_detection( hDirACRend->masa_stereo_type_detect ); -#endif } else { diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index ac80143c3ebf34328af023600d354a0762c485ff..09b1da5129b40586bb832be75e7afbe2d0d87e82 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -1330,11 +1330,7 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Custom loudspeaker layout handle *--------------------------------------------------------------------*/ -#ifdef FIX_FMSW_DEC if ( st_ivas->hDecoderConfig->Opt_LsCustom && st_ivas->hLsSetupCustom == NULL ) -#else - if ( st_ivas->hDecoderConfig->Opt_LsCustom ) -#endif { if ( ( error = ivas_ls_custom_open( &( st_ivas->hLsSetupCustom ) ) ) != IVAS_ERR_OK ) { @@ -1346,11 +1342,7 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Head-Tracking handle *--------------------------------------------------------------------*/ -#ifdef FIX_FMSW_DEC if ( st_ivas->hDecoderConfig->Opt_Headrotation && st_ivas->hHeadTrackData == NULL ) -#else - if ( st_ivas->hDecoderConfig->Opt_Headrotation ) -#endif { if ( ( error = ivas_headTrack_open( &( st_ivas->hHeadTrackData ) ) ) != IVAS_ERR_OK ) { @@ -1366,11 +1358,7 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize external orientation handle *--------------------------------------------------------------------*/ -#ifdef FIX_FMSW_DEC if ( st_ivas->hDecoderConfig->Opt_ExternalOrientation && st_ivas->hExtOrientationData == NULL ) -#else - if ( st_ivas->hDecoderConfig->Opt_ExternalOrientation ) -#endif { if ( ( error = ivas_external_orientation_open( &( st_ivas->hExtOrientationData ), st_ivas->hDecoderConfig->render_num_subframes ) ) != IVAS_ERR_OK ) { @@ -1382,11 +1370,7 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize combined orientation handle *--------------------------------------------------------------------*/ -#ifdef FIX_FMSW_DEC if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && st_ivas->hCombinedOrientationData == NULL ) -#else - if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) -#endif { if ( ( error = ivas_combined_orientation_open( &( st_ivas->hCombinedOrientationData ), st_ivas->hDecoderConfig->output_Fs, st_ivas->hDecoderConfig->render_num_subframes ) ) != IVAS_ERR_OK ) { @@ -1398,14 +1382,9 @@ ivas_error ivas_init_decoder_front( * Allocate and initialize Binaural Renderer configuration handle *--------------------------------------------------------------------*/ -#ifdef FIX_FMSW_DEC if ( ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) ) && st_ivas->hRenderConfig == NULL ) -#else - if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || - ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_STEREO && st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) ) -#endif { if ( ( error = ivas_render_config_open( &( st_ivas->hRenderConfig ) ) ) != IVAS_ERR_OK ) { @@ -2304,19 +2283,6 @@ ivas_error ivas_init_decoder( /* set number of output channels used for synthesis/decoding */ n = getNumChanSynthesis( st_ivas ); -#ifndef FIX_1585_ASAN_FORMAT_SW_ALT - if ( n > 0 ) - { - if ( ( st_ivas->mem_hp20_out = (float **) malloc( n * sizeof( float * ) ) ) == NULL ) - { - return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HP20 filter memory\n" ) ); - } - } - else - { - st_ivas->mem_hp20_out = NULL; - } -#endif for ( i = 0; i < n; i++ ) { if ( ( st_ivas->mem_hp20_out[i] = (float *) malloc( L_HP20_MEM * sizeof( float ) ) ) == NULL ) @@ -2816,17 +2782,10 @@ void ivas_initialize_handles_dec( st_ivas->hCPE[i] = NULL; } -#ifdef FIX_FMSW_DEC if ( !st_ivas->restartNeeded ) { -#endif st_ivas->bit_stream = NULL; -#ifdef FIX_FMSW_DEC } -#endif -#ifndef FIX_1585_ASAN_FORMAT_SW_ALT - st_ivas->mem_hp20_out = NULL; -#endif st_ivas->hLimiter = NULL; /* ISM metadata handles */ @@ -2870,10 +2829,8 @@ void ivas_initialize_handles_dec( st_ivas->hMasaIsmData = NULL; st_ivas->hSbaIsmData = NULL; -#ifdef FIX_FMSW_DEC if ( !st_ivas->restartNeeded ) { -#endif st_ivas->hHeadTrackData = NULL; st_ivas->hHrtfTD = NULL; st_ivas->hLsSetupCustom = NULL; @@ -2882,9 +2839,7 @@ void ivas_initialize_handles_dec( st_ivas->hCombinedOrientationData = NULL; st_ivas->acousticEnvironmentsCount = 0; st_ivas->pAcousticEnvironments = NULL; -#ifdef FIX_FMSW_DEC } -#endif st_ivas->hSplitBinRend = NULL; for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) @@ -2899,9 +2854,7 @@ void ivas_initialize_handles_dec( for ( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ ) { st_ivas->p_output_f[i] = NULL; -#ifdef FIX_1585_ASAN_FORMAT_SW_ALT st_ivas->mem_hp20_out[i] = NULL; -#endif } return; @@ -2915,17 +2868,11 @@ void ivas_initialize_handles_dec( *-------------------------------------------------------------------------*/ void ivas_destroy_dec( -#ifdef FIX_FMSW_DEC Decoder_Struct **st_ivas_out /* i/o: IVAS decoder handle */ -#else - Decoder_Struct *st_ivas /* i/o: IVAS decoder handle */ -#endif ) { int16_t i; -#ifdef FIX_FMSW_DEC Decoder_Struct *st_ivas = *st_ivas_out; -#endif /* CLDFB handles */ for ( i = 0; i < MAX_INTERN_CHANNELS; i++ ) @@ -2971,7 +2918,6 @@ void ivas_destroy_dec( } /* HP20 filter handles */ -#ifdef FIX_1585_ASAN_FORMAT_SW_ALT for ( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ ) { if ( st_ivas->mem_hp20_out[i] != NULL ) @@ -2980,18 +2926,6 @@ void ivas_destroy_dec( st_ivas->mem_hp20_out[i] = NULL; } } -#else - if ( st_ivas->mem_hp20_out != NULL ) - { - for ( i = 0; i < getNumChanSynthesis( st_ivas ); i++ ) - { - free( st_ivas->mem_hp20_out[i] ); - st_ivas->mem_hp20_out[i] = NULL; - } - free( st_ivas->mem_hp20_out ); - st_ivas->mem_hp20_out = NULL; - } -#endif /* ISM metadata handles */ ivas_ism_metadata_close( st_ivas->hIsmMetaData, 0 ); @@ -3066,19 +3000,15 @@ void ivas_destroy_dec( /* LS config converter handle */ ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); -#ifdef FIX_FMSW_DEC if ( !st_ivas->restartNeeded ) { -#endif /* Custom LS configuration handle */ if ( st_ivas->hLsSetupCustom != NULL ) { free( st_ivas->hLsSetupCustom ); st_ivas->hLsSetupCustom = NULL; } -#ifdef FIX_FMSW_DEC } -#endif /* Mono downmix structure */ ivas_mono_dmx_renderer_close( &st_ivas->hMonoDmxRenderer ); @@ -3115,13 +3045,11 @@ void ivas_destroy_dec( /* HRTF statistics */ ivas_HRTF_statistics_binary_close( &st_ivas->hHrtfStatistics ); -#ifdef FIX_FMSW_DEC /* Limiter struct */ ivas_limiter_close( &( st_ivas->hLimiter ) ); if ( !st_ivas->restartNeeded ) { -#endif /* Config. Renderer */ ivas_render_config_close( &( st_ivas->hRenderConfig ) ); @@ -3132,17 +3060,12 @@ void ivas_destroy_dec( st_ivas->pAcousticEnvironments = NULL; } -#ifndef FIX_FMSW_DEC - /* Limiter struct */ - ivas_limiter_close( &( st_ivas->hLimiter ) ); -#endif /* Decoder configuration structure */ if ( st_ivas->hDecoderConfig != NULL ) { free( st_ivas->hDecoderConfig ); st_ivas->hDecoderConfig = NULL; } -#ifdef FIX_FMSW_DEC } else { @@ -3152,7 +3075,6 @@ void ivas_destroy_dec( st_ivas->mc_mode = MC_MODE_NONE; st_ivas->sba_dirac_stereo_flag = 0; } -#endif /* TC buffer structure */ ivas_dec_tc_buffer_close( &st_ivas->hTcBuffer ); @@ -3170,15 +3092,11 @@ void ivas_destroy_dec( } /* main IVAS handle */ -#ifdef FIX_FMSW_DEC if ( !st_ivas->restartNeeded ) { free( *st_ivas_out ); *st_ivas_out = NULL; } -#else - free( st_ivas ); -#endif return; } diff --git a/lib_dec/ivas_rom_dec.c b/lib_dec/ivas_rom_dec.c index 52123b74807610be773784962e926ab9e8b130c6..09dec93ce93bc975fb2010989a824ac4c8d34291 100644 --- a/lib_dec/ivas_rom_dec.c +++ b/lib_dec/ivas_rom_dec.c @@ -500,76 +500,6 @@ static const int16_t huff_nodes_alpha_1D_DF[64][2] = { -2, -62 } }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES -/* Alpha Fine Huffman table dt */ -static const int16_t huff_nodes_alpha_1D_DT[64][2] = -{ - { -33, 1 }, - { -34, 2 }, - { -32, 3 }, - { 5, 4 }, - { -31, -35 }, - { 7, 6 }, - { -36, 8 }, - { -30, 9 }, - { 11, 10 }, - { -29, -37 }, - { 13, 12 }, - { 15, 14 }, - { -28, -38 }, - { 17, 16 }, - { -27, -39 }, - { 19, 18 }, - { -40, 20 }, - { -26, 21 }, - { 23, 22 }, - { -25, -41 }, - { 25, 24 }, - { -24, -42 }, - { 27, 26 }, - { -23, -43 }, - { 29, 28 }, - { -22, -44 }, - { 31, 30 }, - { -45, 32 }, - { -21, 33 }, - { -20, 34 }, - { -46, 35 }, - { -47, 36 }, - { -19, 37 }, - { -48, 38 }, - { -18, 39 }, - { 41, 40 }, - { -17, -49 }, - { 43, 42 }, - { -50, 44 }, - { -16, 45 }, - { 47, 46 }, - { -51, 48 }, - { -15, 49 }, - { 51, 50 }, - { -52, -65 }, - { -1, -14 }, - { 53, 52 }, - { -53, 54 }, - { -13, 55 }, - { 57, 56 }, - { -12, 58 }, - { -54, 59 }, - { 61, 60 }, - { -11, -55 }, - { -56, 62 }, - { -10, 63 }, - { -9, -57 }, - { -5, -6 }, - { -58, -61 }, - { -7, -59 }, - { -8, -62 }, - { -4, -60 }, - { -3, -64 }, - { -2, -63 } -}; -#endif /* Beta Fine Huffman table df0 */ static const int16_t huff_nodes_first_band_beta[8][2] = @@ -583,13 +513,6 @@ static const int16_t huff_nodes_beta_1D_DF[16][2] = { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { 9, 8 }, { -5, -13 }, { 11, 10 }, { -4, -14 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES -/* Beta Fine Huffman table dt */ -static const int16_t huff_nodes_beta_1D_DT[16][2] = -{ - { -9, 1 }, { -10, 2 }, { -8, 3 }, { -11, 4 }, { -7, 5 }, { 7, 6 }, { -6, -12 }, { -13, 8 }, { -5, 9 }, { -14, 10 }, { -4, 11 }, { -15, 12 }, { -3, 13 }, { -16, 14 }, { -2, 15 }, { -1, -17 } -}; -#endif const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df0 = { @@ -603,12 +526,5 @@ const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_df = huff_nodes_beta_1D_DF }; -#ifndef FIX_2095_REMOVE_UNUSED_ISAR_TABLES -const HUFF_NODE_TABLE ivas_mc_paramupmix_huff_nodes_dt = -{ - huff_nodes_alpha_1D_DT, - huff_nodes_beta_1D_DT -}; -#endif /* clang-format on */ diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index fcc4f941244363590c434f075095a6ff13a2ccd1..cb89f63f57c172d20594f7f438536319e63155cd 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -910,13 +910,8 @@ void ivas_sba_dirac_stereo_dec( synchro_synthesis( st_ivas->hDecoderConfig->ivas_total_brate, hCPE, output, output_frame, 1 /*st_ivas->sba_dirac_stereo_flag*/ ); /* output scaling */ -#ifdef FIX_1521_SBA_LOUDNESS_STEREO if ( !sba_mono_flag ) -#else - if ( !sba_mono_flag && !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_NONE ) ) -#endif { -#ifdef FIX_1521_SBA_LOUDNESS_STEREO if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_NONE ) { /* low bitrate OSBA needs a makeup gain of 2.f to compensate for the encoder side @@ -929,10 +924,6 @@ void ivas_sba_dirac_stereo_dec( v_multc( output[0], INV_SQRT2, output[0], output_frame ); v_multc( output[1], INV_SQRT2, output[1], output_frame ); } -#else - v_multc( output[0], 0.5f, output[0], output_frame ); - v_multc( output[1], 0.5f, output[1], output_frame ); -#endif } /* delay HB synth */ diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 18611feb914ba09edcfb9077a50b8da880f6ae15..93d069a81c11480235dd82dc4174d10f0bd73a08 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1054,11 +1054,7 @@ typedef struct Decoder_Struct uint16_t *bit_stream; /* Pointer to bitstream buffer */ int16_t writeFECoffset; /* parameter for debugging JBM stuff */ -#ifdef FIX_1585_ASAN_FORMAT_SW_ALT float *mem_hp20_out[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; /* output signals HP filter memories */ -#else - float **mem_hp20_out; /* output signals HP filter memories */ -#endif IVAS_LIMITER_HANDLE hLimiter; /* Limiter handle */ /* core-decoder modules */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index feb370ac8899e10adcc2019afd75f3cdf3621e5f..7199ae4e64e49bff16aebe96ebb2d6bfd8069597 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -136,7 +136,6 @@ static int16_t get_render_frame_size_samples( const DECODER_CONFIG_HANDLE hDecod static int16_t ivas_dec_split_rend_cldfb_in( const RENDERER_TYPE renderer_type ); static void update_voip_rendered20ms( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesRendered ); -#ifdef FIX_FMSW_DEC /*---------------------------------------------------------------------* * ivas_dec_handle_init() @@ -168,12 +167,10 @@ static ivas_error ivas_dec_handle_init( st_ivas->writeFECoffset = 0; st_ivas->sba_analysis_order = 0; /* not really used in EVS mode, but initialize here to fix MSAN complaint */ -#ifdef FIX_FMSW_DEC_2 st_ivas->last_ivas_format = UNDEFINED_FORMAT; st_ivas->nSCE = 0; st_ivas->nCPE = 0; -#endif if ( mode == IVAS_DEC_MODE_EVS ) { st_ivas->element_mode_init = EVS_MONO; @@ -202,7 +199,6 @@ static ivas_error ivas_dec_handle_init( return IVAS_ERR_WRONG_PARAMS; } -#endif /*---------------------------------------------------------------------* * IVAS_DEC_Open() @@ -224,13 +220,11 @@ ivas_error IVAS_DEC_Open( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -#ifdef FIX_FMSW_DEC if ( *phIvasDec != NULL ) { return IVAS_ERR_WRONG_PARAMS; } -#endif /*-----------------------------------------------------------------* * Allocate and initialize IVAS application decoder handle *-----------------------------------------------------------------*/ @@ -291,60 +285,15 @@ ivas_error IVAS_DEC_Open( st_ivas = hIvasDec->st_ivas; -#ifdef FIX_FMSW_DEC st_ivas->restartNeeded = 0; -#endif /* initialize Decoder Config. handle */ init_decoder_config( hIvasDec->st_ivas->hDecoderConfig ); -#ifdef FIX_FMSW_DEC /* Set IVAS decoder handles to NULL + set high-level parameters */ return ivas_dec_handle_init( st_ivas, mode, &( hIvasDec->hasDecodedFirstGoodFrame ) ); -#else - /* initialize pointers to handles to NULL */ - ivas_initialize_handles_dec( st_ivas ); - - st_ivas->restartNeeded = 0; - - /* set high-level parameters */ - - st_ivas->codec_mode = 0; /* unknown before first frame */ - st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID; - st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID; - st_ivas->writeFECoffset = 0; - st_ivas->sba_analysis_order = 0; /* not really used in EVS mode, but initialize here to fix MSAN complaint */ - - if ( mode == IVAS_DEC_MODE_EVS ) - { - st_ivas->element_mode_init = EVS_MONO; - st_ivas->ivas_format = MONO_FORMAT; - hIvasDec->hasDecodedFirstGoodFrame = true; /* Functionality to suppress output for initial lost frames is disabled in EVS operation */ - - return IVAS_ERR_OK; - } - else if ( mode == IVAS_DEC_MODE_IVAS ) - { - st_ivas->element_mode_init = -1; - st_ivas->ivas_format = UNDEFINED_FORMAT; - st_ivas->renderer_type = RENDERER_DISABLE; - st_ivas->ini_frame = 0; - st_ivas->ini_active_frame = 0; - - st_ivas->ism_mode = ISM_MODE_NONE; - st_ivas->mc_mode = MC_MODE_NONE; - - st_ivas->sba_order = 0; - st_ivas->sba_planar = 0; - - return IVAS_ERR_OK; - } - - return IVAS_ERR_WRONG_PARAMS; -#endif } -#ifdef FIX_FMSW_DEC /*---------------------------------------------------------------------* * IVAS_DEC_Restart() @@ -368,18 +317,13 @@ ivas_error IVAS_DEC_Restart( { return IVAS_ERR_OK; } -#ifdef FIX_FMSW_DEC_2 else { /* switching between EVS and IVAS signaled in RTP */ hIvasDec->st_ivas->restartNeeded = 1; } -#else - return IVAS_ERR_WRONG_PARAMS; -#endif } -#ifdef FIX_FMSW_DEC_2 if ( hIvasDec->mode != mode ) /* handle switching between EVS and IVAS */ { /* initialize JBM */ @@ -393,7 +337,6 @@ ivas_error IVAS_DEC_Restart( hIvasDec->isInitialized = false; } -#endif hIvasDec->mode = mode; /* destroy Split binaural renderer (ISAR) handle */ @@ -406,7 +349,6 @@ ivas_error IVAS_DEC_Restart( return ivas_dec_handle_init( hIvasDec->st_ivas, mode, &( hIvasDec->hasDecodedFirstGoodFrame ) ); } -#endif /*-------------------------------------------------------------------------* * isar_set_split_rend_setup() @@ -501,12 +443,7 @@ void IVAS_DEC_Close( ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); /* destroy IVAS decoder handles */ -#ifdef FIX_FMSW_DEC ivas_destroy_dec( &( *phIvasDec )->st_ivas ); -#else - ivas_destroy_dec( ( *phIvasDec )->st_ivas ); - ( *phIvasDec )->st_ivas = NULL; -#endif } apa_exit( &( *phIvasDec )->hTimeScaler ); @@ -2758,11 +2695,9 @@ ivas_error IVAS_DEC_FeedHeadTrackData( return error; } -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION Pos.x = max( min( IVAS_LISTENER_POSITION_MAX, Pos.x ), -IVAS_LISTENER_POSITION_MAX ); Pos.y = max( min( IVAS_LISTENER_POSITION_MAX, Pos.y ), -IVAS_LISTENER_POSITION_MAX ); Pos.z = max( min( IVAS_LISTENER_POSITION_MAX, Pos.z ), -IVAS_LISTENER_POSITION_MAX ); -#endif hHeadTrackData->Pos[subframe_idx].x = Pos.x; hHeadTrackData->Pos[subframe_idx].y = Pos.y; hHeadTrackData->Pos[subframe_idx].z = Pos.z; @@ -4970,9 +4905,7 @@ static ivas_error evs_dec_main( } st_ivas->BER_detect = hCoreCoder[0]->BER_detect; -#ifdef FIX_FMSW_DEC st_ivas->last_ivas_format = MONO_FORMAT; -#endif if ( st_ivas->hDecoderConfig->Opt_tsm && st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_MONO ) { diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 4848541b92728aa3c2a42fbac7c3c34c175043fc..9f00f39e792c708d2f9653be1cac8854c359b708 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -126,13 +126,11 @@ ivas_error IVAS_DEC_Configure( const bool delayCompensationEnabled /* i : enable delay compensation */ ); -#ifdef FIX_FMSW_DEC ivas_error IVAS_DEC_Restart( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const IVAS_DEC_MODE mode /* i : compatibility mode (EVS or IVAS) */ ); -#endif void IVAS_DEC_Close( IVAS_DEC_HANDLE *phIvasDec /* i/o: pointer to IVAS decoder handle */ ); diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index ad884e3cdc69a6b5e7f03686b586fe36ce981d28..bc3be07de6bb4d6c41953b385624dca625533722 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -95,15 +95,12 @@ ivas_error ivas_cpe_enc( float fft_buff[CPE_CHANNELS][2 * L_FFT]; /* FFT buffer */ int16_t tdm_ratio_idx, tdm_ratio_idx_SM; /* temp. TD stereo parameters */ int16_t tdm_SM_or_LRTD_Pri; /* temp. TD stereo parameters */ -#ifndef FIX_1594_TDM_LAST_RATIO - float tdm_last_ratio; /* temp. TD stereo parameters */ -#endif - int16_t nb_bits; /* number of DFT stereo side bits */ - float fr_bands[CPE_CHANNELS][2 * NB_BANDS]; /* energy in frequency bands */ - float Etot_LR[CPE_CHANNELS]; /* total energy */ - float lf_E[CPE_CHANNELS][2 * VOIC_BINS]; /* per bin spectrum energy in lf */ - int16_t localVAD_HE_SAD[CPE_CHANNELS]; /* HE-SAD flag without hangover, LR channels */ - float band_energies_LR[2 * NB_BANDS]; /* energy in critical bands without minimum noise floor E_MIN */ + int16_t nb_bits; /* number of DFT stereo side bits */ + float fr_bands[CPE_CHANNELS][2 * NB_BANDS]; /* energy in frequency bands */ + float Etot_LR[CPE_CHANNELS]; /* total energy */ + float lf_E[CPE_CHANNELS][2 * VOIC_BINS]; /* per bin spectrum energy in lf */ + int16_t localVAD_HE_SAD[CPE_CHANNELS]; /* HE-SAD flag without hangover, LR channels */ + float band_energies_LR[2 * NB_BANDS]; /* energy in critical bands without minimum noise floor E_MIN */ float orig_input[CPE_CHANNELS][L_FRAME48k]; float Etot_last[CPE_CHANNELS]; int32_t tmp, input_Fs; @@ -135,9 +132,6 @@ ivas_error ivas_cpe_enc( tdm_SM_or_LRTD_Pri = 0; tdm_ratio_idx = -1; tdm_ratio_idx_SM = -1; -#ifndef FIX_1594_TDM_LAST_RATIO - tdm_last_ratio = 0; -#endif #ifdef DEBUGGING if ( hCPE->hCoreCoder[0]->ini_frame == 0 ) { @@ -208,11 +202,7 @@ ivas_error ivas_cpe_enc( * dynamically allocate data structures depending on the actual stereo mode *----------------------------------------------------------------*/ -#ifdef FIX_1594_TDM_LAST_RATIO if ( ( error = stereo_memory_enc( hCPE, input_Fs, max_bwidth, ivas_format, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) -#else - if ( ( error = stereo_memory_enc( hCPE, input_Fs, max_bwidth, &tdm_last_ratio, ivas_format, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) -#endif { return error; } diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index 8f2cfa69e5bcf8d855c03f77638cbbad08814a48..186dee9c6af9a656a0360cdda8d523df1f324b2e 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -152,11 +152,7 @@ static void stereo_dft_quantize_itd( { int16_t itd; -#ifdef FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD itd = in; -#else - itd = (int16_t) ( sign( in ) * 0.5f + in ); -#endif /*Limit ITD*/ if ( ( ABSVAL( itd ) > STEREO_DFT_ITD_MAX ) || ( ABSVAL( itd ) < STEREO_DFT_ITD_MIN ) ) diff --git a/lib_enc/ivas_stereo_switching_enc.c b/lib_enc/ivas_stereo_switching_enc.c index 6d66bf7c9e099c2c6d0d43ecca07cf6c3d6a0b09..a1fe5b5224c60aa6c6343b23ba28d29bcecae13e 100644 --- a/lib_enc/ivas_stereo_switching_enc.c +++ b/lib_enc/ivas_stereo_switching_enc.c @@ -218,12 +218,9 @@ static void deallocate_CoreCoder_enc( *-------------------------------------------------------------------*/ ivas_error stereo_memory_enc( - CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ - const int32_t input_Fs, /* i : input sampling rate */ - const int16_t max_bwidth, /* i : maximum audio bandwidth */ -#ifndef FIX_1594_TDM_LAST_RATIO - float *tdm_last_ratio, /* o : TD stereo last ratio */ -#endif + CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */ + const int32_t input_Fs, /* i : input sampling rate */ + const int16_t max_bwidth, /* i : maximum audio bandwidth */ const IVAS_FORMAT ivas_format, /* i : ivas format */ const int16_t nchan_transport /* i : number transport chans */ ) @@ -239,12 +236,6 @@ ivas_error stereo_memory_enc( * save parameters from structures that will be freed *---------------------------------------------------------------*/ -#ifndef FIX_1594_TDM_LAST_RATIO - if ( hCPE->last_element_mode == IVAS_CPE_TD ) - { - *tdm_last_ratio = hCPE->hStereoTD->tdm_last_ratio; /* note: this must be set to local variable before data structures are allocated/deallocated */ - } -#endif if ( hCPE->hStereoTCA != NULL && hCPE->last_element_mode == IVAS_CPE_DFT ) { set_s( hCPE->hStereoTCA->prevCorrLagStats, (int16_t) hCPE->hStereoDft->hItd->itd[1], 3 ); diff --git a/lib_rend/ivas_allrad_dec.c b/lib_rend/ivas_allrad_dec.c index f24c5341527992757ed2c966f2ce5b5f6a030998..5de94a40a2f3ef4b4cf8f6ffdd70ccb354c42122 100644 --- a/lib_rend/ivas_allrad_dec.c +++ b/lib_rend/ivas_allrad_dec.c @@ -129,17 +129,10 @@ ivas_error ivas_sba_get_hoa_dec_matrix( } else if ( hOutSetup.output_config == IVAS_AUDIO_CONFIG_STEREO ) { -#ifdef FIX_1521_SBA_LOUDNESS_STEREO ( *hoa_dec_mtx )[0] = INV_SQRT2; ( *hoa_dec_mtx )[1] = INV_SQRT2; ( *hoa_dec_mtx )[SBA_NHARM_HOA3] = INV_SQRT2; ( *hoa_dec_mtx )[SBA_NHARM_HOA3 + 1] = -INV_SQRT2; -#else - ( *hoa_dec_mtx )[0] = 0.5f; - ( *hoa_dec_mtx )[1] = 0.5f; - ( *hoa_dec_mtx )[SBA_NHARM_HOA3] = 0.5f; - ( *hoa_dec_mtx )[SBA_NHARM_HOA3 + 1] = -0.5f; -#endif } else if ( hOutSetup.is_loudspeaker_setup ) { diff --git a/lib_rend/ivas_dirac_output_synthesis_dec.c b/lib_rend/ivas_dirac_output_synthesis_dec.c index f25047762270cd98b9406c3f339ab19ecad01a29..11f20412ca2990563ca26b20d8261bbb27d62066 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec.c @@ -1761,13 +1761,11 @@ void ivas_dirac_dec_compute_directional_responses( direct_response[1] = 1.0f; } } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES else if ( transport_signal_type == MASA_DUAL_MONO ) { direct_response[0] = 1.0f; /* direct_response[1] is not adjusted for dual mono input */ } -#endif else { set_f( direct_response, 1.0f, hDirACRend->num_protos_ambi ); diff --git a/lib_rend/ivas_dirac_rend.c b/lib_rend/ivas_dirac_rend.c index bcdfbd960a56f0fa71110709cbe1c1cf16783f51..9068fd8ac0c32dc5159cabc28a93708c00be5133 100644 --- a/lib_rend/ivas_dirac_rend.c +++ b/lib_rend/ivas_dirac_rend.c @@ -45,7 +45,6 @@ #endif #include "wmc_auto.h" -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES /*------------------------------------------------------------------------------------------* * Local constants *------------------------------------------------------------------------------------------*/ @@ -53,7 +52,6 @@ /* Constants for MASA dual mono detection */ #define MASA_DUAL_MONO_TAU1 0.01562500000000000f /* 2^-6, which is about -18 dB */ #define MASA_DUAL_MONO_TAU2 0.00000762939453125f /* 2^-17, which is about -51 dB */ -#endif /*------------------------------------------------------------------------- * ivas_dirac_allocate_parameters() @@ -1337,13 +1335,10 @@ void protoSignalComputation2( float interpolatorSpaced = 0.0f; float interpolatorDmx = 1.0f; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES float interpolatorDualMono = 0.0f; int16_t max_band_diff_ene; -#endif int16_t dipole_freq_range[2]; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES float tempSpaced, tempDmx, tempDualMono; max_band_diff_ene = IVAS_CLDFB_NO_CHANNELS_MAX; @@ -1351,9 +1346,6 @@ void protoSignalComputation2( { max_band_diff_ene = min( stereo_type_detect->max_band_diff_ene, num_freq_bands ); /* Local version for correct maximum */ } -#else - float tempSpaced, tempDmx; -#endif if ( isloudspeaker ) { @@ -1404,11 +1396,9 @@ void protoSignalComputation2( right_hi_power = 0.0f; total_hi_power = 0.0f; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES stereo_type_detect->inst_diff_bb_power = 0.0f; stereo_type_detect->inst_total_bb_power = 0.0f; -#endif dipole_freq_range[0] = stereo_type_detect->dipole_freq_range[0]; dipole_freq_range[1] = stereo_type_detect->dipole_freq_range[1]; @@ -1423,11 +1413,8 @@ void protoSignalComputation2( { interpolatorSpaced = ( (float) ( stereo_type_detect->interpolator ) ) / ( (float) MASA_STEREO_INTERPOLATION_SLOTS ); interpolatorDmx = 1.0f - interpolatorSpaced; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES interpolatorDualMono = interpolatorDmx; -#endif } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES else if ( stereo_type_detect->type_change_direction == MASA_DUAL_MONO ) { interpolatorDualMono = ( (float) ( stereo_type_detect->interpolator ) ) / ( (float) MASA_STEREO_INTERPOLATION_SLOTS ); @@ -1435,15 +1422,10 @@ void protoSignalComputation2( interpolatorSpaced = interpolatorDmx; } else /* MASA_STEREO_DOWNMIX */ -#else - else -#endif { interpolatorDmx = ( (float) ( stereo_type_detect->interpolator ) ) / ( (float) MASA_STEREO_INTERPOLATION_SLOTS ); interpolatorSpaced = 1.0f - interpolatorDmx; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES interpolatorDualMono = interpolatorSpaced; -#endif } } @@ -1483,7 +1465,6 @@ void protoSignalComputation2( sum_total_ratio[l] = stereo_type_detect->sum_power[l] / ( stereo_type_detect->total_power[l] + EPSILON ); } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES if ( l < max_band_diff_ene ) { RealSubtract = RealBuffer[0][0][l] - RealBuffer[1][0][l]; @@ -1501,38 +1482,12 @@ void protoSignalComputation2( stereo_type_detect->subtract_power_y += RealSubtract * RealSubtract + ImagSubtract * ImagSubtract; } } -#else - if ( l == 0 ) - { - RealSubtract = RealBuffer[0][0][l] - RealBuffer[1][0][l]; - ImagSubtract = ImagBuffer[0][0][l] - ImagBuffer[1][0][l]; - stereo_type_detect->subtract_power_y += RealSubtract * RealSubtract + ImagSubtract * ImagSubtract; - } -#endif /* Compute protos (and their power) for direct sound rendering */ /* W prototype */ if ( stereo_type_detect->interpolator > 0 ) { -#ifndef FIX_FLOAT_1578_OMASA_REND_SPIKES - if ( l < ( dipole_freq_range[1] - 1 ) || l >= MASA_SUM_PROTO_START_BIN ) - { - Real_aux = interpolatorSpaced * 0.5f * Real_aux + interpolatorDmx * Real_aux; - Imag_aux = interpolatorSpaced * 0.5f * Imag_aux + interpolatorDmx * Imag_aux; - proto_power_smooth[l] += Real_aux * Real_aux + Imag_aux * Imag_aux; - p_proto_buffer[2 * l] = Real_aux; - p_proto_buffer[2 * l + 1] = Imag_aux; - } - else - { - tempSpaced = RealBuffer[0][0][l] * RealBuffer[0][0][l] + ImagBuffer[0][0][l] * ImagBuffer[0][0][l]; - tempDmx = Real_aux * Real_aux + Imag_aux * Imag_aux; - proto_power_smooth[l] += interpolatorSpaced * tempSpaced + interpolatorDmx * tempDmx; - p_proto_buffer[2 * l] = interpolatorSpaced * RealBuffer[0][0][l] + interpolatorDmx * Real_aux; - p_proto_buffer[2 * l + 1] = interpolatorSpaced * ImagBuffer[0][0][l] + interpolatorDmx * Imag_aux; - } -#else if ( ( stereo_type_detect->type_change_direction == MASA_STEREO_SPACED_MICS && stereo_type_detect->current_stereo_type == MASA_STEREO_DOWNMIX ) || ( stereo_type_detect->type_change_direction == MASA_STEREO_DOWNMIX && stereo_type_detect->current_stereo_type == MASA_STEREO_SPACED_MICS ) ) { @@ -1584,7 +1539,6 @@ void protoSignalComputation2( p_proto_buffer[2 * l] = Real_aux; p_proto_buffer[2 * l + 1] = Imag_aux; } -#endif } else if ( stereo_type_detect->masa_stereo_type == MASA_STEREO_SPACED_MICS ) { @@ -1603,7 +1557,6 @@ void protoSignalComputation2( p_proto_buffer[2 * l + 1] = ImagBuffer[0][0][l]; } } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES else if ( stereo_type_detect->masa_stereo_type == MASA_DUAL_MONO ) { Real_aux *= 0.5f; @@ -1613,9 +1566,6 @@ void protoSignalComputation2( p_proto_buffer[2 * l + 1] = Imag_aux; } else /* MASA_STEREO_DOWNMIX */ -#else - else -#endif { proto_power_smooth[l] += Real_aux * Real_aux + Imag_aux * Imag_aux; p_proto_buffer[2 * l] = Real_aux; @@ -1625,23 +1575,6 @@ void protoSignalComputation2( /* Y prototype */ if ( stereo_type_detect->interpolator > 0 ) { -#ifndef FIX_FLOAT_1578_OMASA_REND_SPIKES - if ( l < ( dipole_freq_range[0] ) ) - { - p_proto_buffer[2 * num_freq_bands + 2 * l] = interpolatorSpaced * p_proto_buffer[2 * l] + interpolatorDmx * ( RealBuffer[0][0][l] - RealBuffer[1][0][l] ); - p_proto_buffer[2 * num_freq_bands + 2 * l + 1] = interpolatorSpaced * p_proto_buffer[2 * l + 1] + interpolatorDmx * ( ImagBuffer[0][0][l] - ImagBuffer[1][0][l] ); - } - else if ( l < ( dipole_freq_range[1] ) ) - { - p_proto_buffer[2 * num_freq_bands + 2 * l] = interpolatorSpaced * ( ImagBuffer[0][0][l] - ImagBuffer[1][0][l] ) + interpolatorDmx * ( RealBuffer[0][0][l] - RealBuffer[1][0][l] ); - p_proto_buffer[2 * num_freq_bands + 2 * l + 1] = interpolatorSpaced * ( -( RealBuffer[0][0][l] - RealBuffer[1][0][l] ) ) + interpolatorDmx * ( ImagBuffer[0][0][l] - ImagBuffer[1][0][l] ); - } - else - { - p_proto_buffer[2 * num_freq_bands + 2 * l] = interpolatorSpaced * p_proto_buffer[2 * l] + interpolatorDmx * ( RealBuffer[0][0][l] - RealBuffer[1][0][l] ); - p_proto_buffer[2 * num_freq_bands + 2 * l + 1] = interpolatorSpaced * p_proto_buffer[2 * l + 1] + interpolatorDmx * ( ImagBuffer[0][0][l] - ImagBuffer[1][0][l] ); - } -#else if ( ( stereo_type_detect->type_change_direction == MASA_STEREO_SPACED_MICS && stereo_type_detect->current_stereo_type == MASA_STEREO_DOWNMIX ) || ( stereo_type_detect->type_change_direction == MASA_STEREO_DOWNMIX && stereo_type_detect->current_stereo_type == MASA_STEREO_SPACED_MICS ) ) { @@ -1685,7 +1618,6 @@ void protoSignalComputation2( p_proto_buffer[2 * num_freq_bands + 2 * l] = interpolatorDualMono * p_proto_buffer[2 * l] + interpolatorDmx * ( RealBuffer[0][0][l] - RealBuffer[1][0][l] ); p_proto_buffer[2 * num_freq_bands + 2 * l + 1] = interpolatorDualMono * p_proto_buffer[2 * l + 1] + interpolatorDmx * ( ImagBuffer[0][0][l] - ImagBuffer[1][0][l] ); } -#endif proto_power_smooth[l + num_freq_bands] += p_proto_buffer[2 * num_freq_bands + 2 * l] * p_proto_buffer[2 * num_freq_bands + 2 * l] + p_proto_buffer[2 * num_freq_bands + 2 * l + 1] * p_proto_buffer[2 * num_freq_bands + 2 * l + 1]; } else if ( stereo_type_detect->masa_stereo_type == MASA_STEREO_SPACED_MICS ) @@ -1709,7 +1641,6 @@ void protoSignalComputation2( proto_power_smooth[l + num_freq_bands] = proto_power_smooth[l]; } } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES else if ( stereo_type_detect->masa_stereo_type == MASA_DUAL_MONO ) { /* proto = W */ @@ -1718,9 +1649,6 @@ void protoSignalComputation2( proto_power_smooth[l + num_freq_bands] = proto_power_smooth[l]; } else /* MASA_STEREO_DOWNMIX */ -#else - else -#endif { p_proto_buffer[2 * num_freq_bands + 2 * l] = RealBuffer[0][0][l] - RealBuffer[1][0][l]; p_proto_buffer[2 * num_freq_bands + 2 * l + 1] = ImagBuffer[0][0][l] - ImagBuffer[1][0][l]; @@ -2008,12 +1936,8 @@ void computeDirectionAngles( *------------------------------------------------------------------------*/ void ivas_masa_init_stereotype_detection( -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES MASA_STEREO_TYPE_DETECT *stereo_type_detect, int32_t ivas_total_brate ) -#else - MASA_STEREO_TYPE_DETECT *stereo_type_detect ) -#endif { stereo_type_detect->masa_stereo_type = MASA_STEREO_DOWNMIX; stereo_type_detect->current_stereo_type = MASA_STEREO_DOWNMIX; @@ -2045,7 +1969,6 @@ void ivas_masa_init_stereotype_detection( stereo_type_detect->min_sum_total_ratio_db = 0.0f; stereo_type_detect->subtract_target_ratio_db = 0.0f; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES stereo_type_detect->inst_diff_bb_power = 0.0f; stereo_type_detect->inst_total_bb_power = 0.0f; @@ -2055,7 +1978,6 @@ void ivas_masa_init_stereotype_detection( stereo_type_detect->max_band_diff_ene = 18; } -#endif return; } @@ -2082,7 +2004,6 @@ void ivas_masa_stereotype_detection( float min_sum_temp; float lr_total_bb_temp; float lr_total_hi_temp; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES int16_t change_to_dual_mono_selection; float diffPerSum; @@ -2098,7 +2019,6 @@ void ivas_masa_stereotype_detection( } } -#endif /* Determine if the determined features match the spaced mic type */ change_to_spaced_selection = 0; if ( subtract_target_ratio_db < -3.0f ) @@ -2152,15 +2072,11 @@ void ivas_masa_stereotype_detection( } else { -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES if ( change_to_dual_mono_selection == 1 ) { stereo_type_detect->masa_stereo_type = MASA_DUAL_MONO; } else if ( change_to_spaced_selection == 1 ) -#else - if ( change_to_spaced_selection == 1 ) -#endif { stereo_type_detect->masa_stereo_type = MASA_STEREO_SPACED_MICS; } diff --git a/lib_rend/ivas_objectRenderer_sources.c b/lib_rend/ivas_objectRenderer_sources.c index 07e251a59985b7f94a92e34cf7f2670e1e97b4f7..29c66573208c44234a959e96799804d8435cb261 100644 --- a/lib_rend/ivas_objectRenderer_sources.c +++ b/lib_rend/ivas_objectRenderer_sources.c @@ -315,12 +315,8 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( float hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float azim_delta; float elev_delta; -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW float pan; -#endif -#ifdef FIX_2570_BUF_OVFL float wrapped_angle; // -90 <= wrapped_angle <= 90 -#endif /* Evaluate the HR filters from the source and listener positions and orientations */ Listener_p = hBinRendererTd->Listener_p; @@ -394,8 +390,6 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( *Gain = 1.0f; set_f( hrf_left, 0.0f, *filterlength ); set_f( hrf_right, 0.0f, *filterlength ); -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW -#ifdef FIX_2570_BUF_OVFL if ( SrcSpatial_p->Pos_p[1] < -1.f ) { wrapped_angle = -2.f - SrcSpatial_p->Pos_p[1]; @@ -409,15 +403,8 @@ void TDREND_SRC_REND_UpdateFiltersFromSpatialParams( wrapped_angle = SrcSpatial_p->Pos_p[1]; } pan = ( wrapped_angle + 1.f ) * 0.5f; -#else - pan = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f; -#endif hrf_left[0] = sinf( pan * EVS_PI * 0.5f ); hrf_right[0] = cosf( pan * EVS_PI * 0.5f ); -#else - hrf_left[0] = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f; - hrf_right[0] = 1.f - hrf_left[0]; -#endif *intp_count = MAX_INTERPOLATION_STEPS; Src_p->elev_prev = 0; Src_p->azim_prev = 360.0f; /* Dummy angle -- sets max interpolation if switching to TDREND_POSTYPE_ABSOLUTE */ diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 49d889b973d1cc72584f0b3bb6247345d0dc7202..8bddc18f373eec7e018fa18381ad11dda799a8c1 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -341,12 +341,8 @@ void computeDirectionAngles( ); void ivas_masa_init_stereotype_detection( -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES MASA_STEREO_TYPE_DETECT *stereo_type_detect, int32_t ivas_total_brate -#else - MASA_STEREO_TYPE_DETECT *stereo_type_detect -#endif ); void ivas_masa_stereotype_detection( diff --git a/lib_rend/ivas_render_config.c b/lib_rend/ivas_render_config.c index a5cd88eceba4bc623205e69be642b003805f51c0..e31e8b0e82dd9d15546df4f3bcb09b6c1e75639e 100644 --- a/lib_rend/ivas_render_config.c +++ b/lib_rend/ivas_render_config.c @@ -35,9 +35,7 @@ #include "prot.h" #include "ivas_prot_rend.h" #include "ivas_rom_rend.h" -#ifdef FIX_1452_DEFAULT_REVERB #include "ivas_cnst.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -48,16 +46,6 @@ * Local constants *-----------------------------------------------------------------------*/ -#ifndef FIX_1452_DEFAULT_REVERB -#define IVAS_REVERB_DEFAULT_L_PRE_DELAY 0.016f -#define IVAS_REVERB_DEFAULT_L_INPUT_DELAY 0.1f - -#define IVAS_REVERB_DEFAULT_S_PRE_DELAY 0.0125f -#define IVAS_REVERB_DEFAULT_S_INPUT_DELAY 0.0f - -#define IVAS_REVERB_DEFAULT_M_PRE_DELAY 0.0125f -#define IVAS_REVERB_DEFAULT_M_INPUT_DELAY 0.0f -#endif #define IVAS_REVERB_DEFAULT_USE_ER 0 @@ -123,13 +111,8 @@ ivas_error ivas_render_config_init_from_rom( ( *hRenderConfig )->roomAcoustics.aeID = IVAS_DEFAULT_AEID; ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_L_N_BANDS; -#ifdef FIX_1452_DEFAULT_REVERB ( *hRenderConfig )->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_L_ACOUSTIC_PRE_DELAY; ( *hRenderConfig )->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_L_INPUT_PRE_DELAY; -#else - ( *hRenderConfig )->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_L_PRE_DELAY; - ( *hRenderConfig )->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_L_INPUT_DELAY; -#endif ( *hRenderConfig )->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; set_zero( &( *hRenderConfig )->roomAcoustics.pFc_input[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &( *hRenderConfig )->roomAcoustics.pAcoustic_rt60[0], CLDFB_NO_CHANNELS_MAX ); @@ -177,22 +160,14 @@ ivas_error ivas_render_config_change_defaults( IVAS_DefaultReverbSize defaultReverbSize /* i: Reverb default size */ ) { -#ifdef FIX_1452_DEFAULT_REVERB hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; -#endif switch ( defaultReverbSize ) { case DEFAULT_REVERB_SMALL: hRenderConfig->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_S_N_BANDS; -#ifdef FIX_1452_DEFAULT_REVERB hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_S_ACOUSTIC_PRE_DELAY; hRenderConfig->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_S_INPUT_PRE_DELAY; -#else - hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_S_PRE_DELAY; - hRenderConfig->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_S_INPUT_DELAY; - hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; -#endif set_zero( &hRenderConfig->roomAcoustics.pFc_input[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &hRenderConfig->roomAcoustics.pAcoustic_rt60[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &hRenderConfig->roomAcoustics.pAcoustic_dsr[0], CLDFB_NO_CHANNELS_MAX ); @@ -203,14 +178,8 @@ ivas_error ivas_render_config_change_defaults( break; case DEFAULT_REVERB_MEDIUM: hRenderConfig->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_M_N_BANDS; -#ifdef FIX_1452_DEFAULT_REVERB hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_M_ACOUSTIC_PRE_DELAY; hRenderConfig->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_M_INPUT_PRE_DELAY; -#else - hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_M_PRE_DELAY; - hRenderConfig->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_M_INPUT_DELAY; - hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; -#endif set_zero( &hRenderConfig->roomAcoustics.pFc_input[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &hRenderConfig->roomAcoustics.pAcoustic_rt60[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &hRenderConfig->roomAcoustics.pAcoustic_dsr[0], CLDFB_NO_CHANNELS_MAX ); @@ -221,14 +190,8 @@ ivas_error ivas_render_config_change_defaults( break; case DEFAULT_REVERB_LARGE: hRenderConfig->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_L_N_BANDS; -#ifdef FIX_1452_DEFAULT_REVERB hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_L_ACOUSTIC_PRE_DELAY; hRenderConfig->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_L_INPUT_PRE_DELAY; -#else - hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_L_PRE_DELAY; - hRenderConfig->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_L_INPUT_DELAY; - hRenderConfig->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; -#endif set_zero( &hRenderConfig->roomAcoustics.pFc_input[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &hRenderConfig->roomAcoustics.pAcoustic_rt60[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &hRenderConfig->roomAcoustics.pAcoustic_dsr[0], CLDFB_NO_CHANNELS_MAX ); diff --git a/lib_rend/ivas_rom_rend.c b/lib_rend/ivas_rom_rend.c index cb437157340dc7921c6d59c5cca7444bd9eb3e12..346b5f5c8770e4c75f053619094af1a9e4240b25 100644 --- a/lib_rend/ivas_rom_rend.c +++ b/lib_rend/ivas_rom_rend.c @@ -368,21 +368,12 @@ const float ivas_reverb_default_small_RT60[IVAS_REVERB_DEFAULT_S_N_BANDS] = const float ivas_reverb_default_small_DSR[IVAS_REVERB_DEFAULT_S_N_BANDS] = { -#ifdef FIX_1452_DEFAULT_REVERB 6.977828e-06f, 2.937305e-06f, 1.893479e-06f, 1.720667e-06f, 2.123368e-06f, 2.534581e-06f, 2.783227e-06f, 3.439731e-06f, 3.878745e-06f, 3.982148e-06f, 3.536177e-06f, 3.048233e-06f, 2.492192e-06f, 2.053972e-06f, 1.635640e-06f, 1.290742e-06f, 1.063885e-06f, 8.678735e-07f, 7.750435e-07f, 8.864112e-07f, 1.009722e-06f, 1.229591e-06f, 1.404202e-06f, 1.560211e-06f, 1.544859e-06f, 1.499566e-06f, 1.373403e-06f, 1.176021e-06f, 1.041313e-06f, 9.137224e-07f, 8.158574e-07f, 7.161031e-07f, 6.204702e-07f, 5.695733e-07f, 4.978614e-07f, 4.351658e-07f, 3.994684e-07f, 3.529545e-07f, 3.272181e-07f, 2.985224e-07f, 2.757639e-07f, 2.543491e-07f, 2.325021e-07f, 2.108694e-07f, 1.887674e-07f, 1.680334e-07f, 1.489201e-07f, 1.388874e-07f, 1.311031e-07f, 1.241593e-07f, 1.198245e-07f, 1.144179e-07f, 1.097161e-07f, 1.072108e-07f, 1.037510e-07f, 1.023455e-07f, 1.000682e-07f, 9.837678e-08f, 9.865947e-08f, 9.809443e-08f -#else - 1.562141e-05f, 7.104127e-06f, 4.699859e-06f, 4.302786e-06f, 5.277136e-06f, 6.382504e-06f, 7.237492e-06f, 9.198124e-06f, 1.073813e-05f, 1.148954e-05f, - 1.063691e-05f, 9.580873e-06f, 8.187593e-06f, 7.045559e-06f, 5.871790e-06f, 4.857175e-06f, 4.194530e-06f, 3.594923e-06f, 3.377501e-06f, 4.063327e-06f, - 4.885563e-06f, 6.276646e-06f, 7.591577e-06f, 8.950862e-06f, 9.394771e-06f, 9.701081e-06f, 9.456415e-06f, 8.555601e-06f, 8.035221e-06f, 7.461511e-06f, - 6.976915e-06f, 6.454842e-06f, 5.885498e-06f, 5.657134e-06f, 5.205549e-06f, 4.791783e-06f, 4.635302e-06f, 4.326645e-06f, 4.245139e-06f, 4.107671e-06f, - 4.033808e-06f, 3.961318e-06f, 3.862554e-06f, 3.742024e-06f, 3.559007e-06f, 3.379882e-06f, 3.192690e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, - 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f, 3.129763e-06f -#endif }; const float ivas_reverb_default_medium_fc[IVAS_REVERB_DEFAULT_M_N_BANDS] = @@ -411,7 +402,6 @@ const float ivas_reverb_default_medium_RT60[IVAS_REVERB_DEFAULT_M_N_BANDS] = const float ivas_reverb_default_medium_DSR[IVAS_REVERB_DEFAULT_M_N_BANDS] = { -#ifdef FIX_1452_DEFAULT_REVERB 4.958384e-06f, 5.196441e-06f, 5.510329e-06f, 5.927908e-06f, 6.428805e-06f, 7.094248e-06f, 7.986350e-06f, 9.063827e-06f, 1.044713e-05f, 1.244016e-05f, 1.478258e-05f, 1.367982e-05f, @@ -420,16 +410,6 @@ const float ivas_reverb_default_medium_DSR[IVAS_REVERB_DEFAULT_M_N_BANDS] = 4.998400e-06f, 5.861536e-06f, 7.821971e-06f, 8.193953e-06f, 5.489165e-06f, 2.755238e-06f, 2.238094e-06f, 3.695543e-06f, 1.862081e-06f, 7.825131e-07f, 4.032049e-07f -#else - 1.488034e-05f, 1.521853e-05f, 1.565818e-05f, 1.623310e-05f, - 1.690948e-05f, 1.778877e-05f, 1.893862e-05f, 2.029138e-05f, - 2.198233e-05f, 2.434965e-05f, 2.705517e-05f, 2.518051e-05f, - 2.274345e-05f, 1.955652e-05f, 1.580720e-05f, 1.174766e-05f, - 9.989742e-06f, 7.921604e-06f, 7.494128e-06f, 8.064566e-06f, - 9.803470e-06f, 1.171147e-05f, 1.607462e-05f, 1.776450e-05f, - 1.271521e-05f, 6.951610e-06f, 6.154952e-06f, 1.181682e-05f, - 7.084896e-06f, 3.571991e-06f, 2.210372e-06f -#endif }; const float ivas_reverb_default_large_fc[IVAS_REVERB_DEFAULT_L_N_BANDS] = diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 3467424c3d9fec2e9e6507f9c109816435324fa4..9bff1d4945383427e1defd23dd9e62d96bbe5a06 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -310,12 +310,10 @@ typedef struct float min_sum_total_ratio_db; float subtract_target_ratio_db; -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES float inst_diff_bb_power; float inst_total_bb_power; int16_t max_band_diff_ene; -#endif int16_t counter; int16_t interpolator; diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 8bf025824f234631db0eb25f210a09d4ce83419d..2807123253915f411288ee2bf7b5a3b7cba4f64d 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -2211,9 +2211,7 @@ static ivas_error updateMcPanGainsForMcOut( const AUDIO_CONFIG outConfig ) { ivas_error error; -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW float pan; -#endif /* "if" conditions below realize the following mapping: @@ -2237,14 +2235,9 @@ static ivas_error updateMcPanGainsForMcOut( { if ( ( inputMc->base.inConfig == IVAS_AUDIO_CONFIG_MONO ) && ( inputMc->nonDiegeticPan ) ) { -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW pan = ( inputMc->nonDiegeticPanGain + 1.f ) * 0.5f; inputMc->panGains[0][0] = sinf( pan * EVS_PI * 0.5f ); inputMc->panGains[0][1] = cosf( pan * EVS_PI * 0.5f ); -#else - inputMc->panGains[0][0] = ( inputMc->nonDiegeticPanGain + 1.f ) * 0.5f; - inputMc->panGains[0][1] = 1.f - inputMc->panGains[0][0]; -#endif error = IVAS_ERR_OK; } else @@ -2375,21 +2368,14 @@ static ivas_error updateMcPanGainsForAmbiOut( static ivas_error updateMcPanGainsForBinauralOut( input_mc *inputMc ) { -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW float pan; -#endif setZeroPanMatrix( inputMc->panGains ); if ( inputMc->base.inConfig == IVAS_AUDIO_CONFIG_MONO ) { -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW pan = ( inputMc->nonDiegeticPanGain + 1.f ) * 0.5f; inputMc->panGains[0][0] = sinf( pan * EVS_PI * 0.5f ); inputMc->panGains[0][1] = cosf( pan * EVS_PI * 0.5f ); -#else - inputMc->panGains[0][0] = ( inputMc->nonDiegeticPanGain + 1.f ) * 0.5f; - inputMc->panGains[0][1] = 1.f - inputMc->panGains[0][0]; -#endif } else { @@ -4810,9 +4796,7 @@ ivas_error IVAS_REND_FeedRenderConfig( hRenderConfig = hIvasRend->hRendererConfig; hRenderConfig->roomAcoustics.aeID = renderConfig.roomAcoustics.aeID; -#ifdef FIX_1452_DEFAULT_REVERB hIvasRend->selectedRoomReverbSize = DEFAULT_REVERB_UNSET; -#endif hRenderConfig->roomAcoustics.nBands = renderConfig.roomAcoustics.nBands; hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.roomAcoustics.acousticPreDelay; hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.roomAcoustics.inputPreDelay; @@ -5382,12 +5366,7 @@ ivas_error IVAS_REND_SetReverbRoomSize( break; case IVAS_ROOM_SIZE_AUTO: default: -#ifdef FIX_1452_DEFAULT_REVERB assert( 0 && "Room size is not set" ); -#else - hIvasRend->selectedRoomReverbSize = DEFAULT_REVERB_UNSET; - break; /* will be setup in IVAS_REND_AddInput() */ -#endif } if ( hIvasRend->hRendererConfig != NULL ) @@ -6008,9 +5987,7 @@ static ivas_error renderIsmToMc( int8_t position_changed; pan_vector currentPanGains; ivas_error error; -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW float pan; -#endif push_wmops( "renderIsmToMc" ); @@ -6020,14 +5997,9 @@ static ivas_error renderIsmToMc( { if ( ismInput->nonDiegeticPan ) { -#ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW pan = ( ismInput->nonDiegeticPanGain + 1.f ) * 0.5f; ismInput->prev_pan_gains[0] = currentPanGains[0] = sinf( pan * EVS_PI * 0.5f ); ismInput->prev_pan_gains[1] = currentPanGains[1] = cosf( pan * EVS_PI * 0.5f ); -#else - ismInput->prev_pan_gains[0] = currentPanGains[0] = ( ismInput->nonDiegeticPanGain + 1.f ) * 0.5f; - ismInput->prev_pan_gains[1] = currentPanGains[1] = 1.f - currentPanGains[0]; -#endif } else { @@ -8837,11 +8809,7 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC\n" ) ); } -#ifdef FIX_FLOAT_1578_OMASA_REND_SPIKES ivas_masa_init_stereotype_detection( hDirACRend->masa_stereo_type_detect, IVAS_512k ); /* Use 512k to get correct path */ -#else - ivas_masa_init_stereotype_detection( hDirACRend->masa_stereo_type_detect ); -#endif } else { diff --git a/lib_util/ivas_rtp_api.h b/lib_util/ivas_rtp_api.h index c40a512ed9f2336b1bb337c1095c38dd6efb2edb..0f74622b0133584a3aeed1c707fb452b7341b643 100644 --- a/lib_util/ivas_rtp_api.h +++ b/lib_util/ivas_rtp_api.h @@ -82,11 +82,9 @@ /* IVAS Codec Types */ typedef enum { -#ifdef FIX_FMSW_DEC IVAS_RTP_UNDEF = -1, /* undefined = Codec Type not set yet */ -#endif - IVAS_RTP_EVS, /* EVS */ - IVAS_RTP_IVAS /* IVAS */ + IVAS_RTP_EVS, /* EVS */ + IVAS_RTP_IVAS /* IVAS */ } IVAS_RTP_CODEC; /* IVAS Bandwidth Requests */ diff --git a/lib_util/ivas_rtp_file.c b/lib_util/ivas_rtp_file.c index eb85a7e7f8e9d74f2dc8700792c14b4eeb7fda2b..c8576a3c5f36d90721c99dbe1e55976244dda5ff 100644 --- a/lib_util/ivas_rtp_file.c +++ b/lib_util/ivas_rtp_file.c @@ -882,9 +882,7 @@ ivas_error IVAS_RTP_READER_Init( rtp->unpackCfg.maxFramesPerPacket = IVAS_MAX_FRAMES_PER_RTP_PACKET; rtp->rtpPacket.buffer = rtp->packet; rtp->rtpPacket.capacity = sizeof( rtp->packet ); -#ifdef FIX_FMSW_DEC rtp->codecId = IVAS_RTP_UNDEF; -#endif error = IVAS_RTP_UNPACK_Open( &rtp->hUnpack, &rtp->unpackCfg ); if ( error == IVAS_ERR_OK ) @@ -1072,7 +1070,6 @@ ivas_error IVAS_RTP_ReadNextFrame( } else { -#ifdef FIX_FMSW_DEC if ( rtp->codecId != IVAS_RTP_UNDEF && rtp->codecId != codecId ) { rtp->restartNeeded = true; @@ -1081,17 +1078,6 @@ ivas_error IVAS_RTP_ReadNextFrame( ( rtp->codecId == IVAS_RTP_EVS ) ? "EVS" : "IVAS", ( codecId == IVAS_RTP_EVS ) ? "EVS" : "IVAS" ); } -#else - rtp->restartNeeded = ( rtp->codecId != codecId ) || - ( codecId == IVAS_RTP_EVS && ( rtp->isAMRWB_IOmode != isAMRWB_IOmode ) ); - - if ( rtp->restartNeeded ) - { - fprintf( stdout, "\nRTP packet codec changed %s -> %s\n", - ( rtp->codecId == IVAS_RTP_EVS ) ? ( rtp->isAMRWB_IOmode ? "AMRWB_IO" : "EVS" ) : "IVAS", - ( codecId == IVAS_RTP_EVS ) ? ( isAMRWB_IOmode ? "AMRWB_IO" : "EVS" ) : "IVAS" ); - } -#endif rtp->codecId = codecId; rtp->isAMRWB_IOmode = isAMRWB_IOmode; diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index 2fef778ad26b58706e390cbaa708dc9ae299febe..768483eb8dbdb6e8c29afbb097b0e138f6f37307 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -71,7 +71,6 @@ #define IVAS_ER_LIST_ORIGIN_X 0.0f #define IVAS_ER_LIST_ORIGIN_Y 0.0f -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION #define DIST_ATT_MIN_MAXDIST 0.0f #define DIST_ATT_MIN_REFDIST 0.0f #define DIST_ATT_MIN_ROLLOFF 0.0f @@ -85,7 +84,6 @@ #define DIRECTIVITY_MAX_ANGLE 360.0f #define DIRECTIVITY_MIN_ATT_FAC 0.0f #define DIRECTIVITY_MAX_ATT_FAC 1.0f -#endif #ifndef TRUE #define TRUE 1 @@ -1240,7 +1238,6 @@ static int32_t errorHandler( * Verifies if the configuration parameters lie within acceptable limits *------------------------------------------------------------------------------------------*/ -#ifdef FIX_2500_RENDCONF_REFACTOR ivas_error RenderConfigReader_checkValues( RenderConfigReader *pRenderConfigReader /* i/o: Renderer configuration reader */ ) @@ -1388,142 +1385,6 @@ ivas_error RenderConfigReader_checkValues( return IVAS_ERR_OK; } -#else -ivas_error RenderConfigReader_checkValues( - IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* o : Renderer configuration handle */ -) -{ - int16_t band_idx, tab_value_err_count; - IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pRoom_acoustics; - pRoom_acoustics = &hRenderConfig->roomAcoustics; - tab_value_err_count = 0; - int16_t wall_idx; - int16_t i; - - - /* Verify the number of frequency bands in the config input data */ - if ( ( pRoom_acoustics->nBands > N_BANDS_MAX ) || ( pRoom_acoustics->nBands < N_BANDS_MIN ) ) - { - return IVAS_ERR_WRONG_PARAMS; - } - - /* Verify input pre-delay value */ - if ( ( pRoom_acoustics->inputPreDelay > INPUTPREDELAY_MAX ) || ( pRoom_acoustics->inputPreDelay < INPUTPREDELAY_MIN ) ) - { - return IVAS_ERR_WRONG_PARAMS; - } - - /* Verify data per band in the acoustic properties table */ - for ( band_idx = 0; band_idx < pRoom_acoustics->nBands; band_idx++ ) - { - /* Verify if the frequencies are in the ascending order (required for interpolation) */ - if ( band_idx != 0 ) - { - if ( pRoom_acoustics->pFc_input[band_idx] <= pRoom_acoustics->pFc_input[band_idx - 1] ) - { - tab_value_err_count++; - } - } - - /* Check the input frequencies */ - if ( ( pRoom_acoustics->pFc_input[band_idx] > FC_INPUT_MAX ) || ( pRoom_acoustics->pFc_input[band_idx] < FC_INPUT_MIN ) ) - { - tab_value_err_count++; - } - - /* Check the input RT60 values */ - if ( ( pRoom_acoustics->pAcoustic_rt60[band_idx] > ACOUSTIC_RT60_MAX ) || ( pRoom_acoustics->pAcoustic_rt60[band_idx] < ACOUSTIC_RT60_MIN ) ) - { - tab_value_err_count++; - } - - /* Check the input DSR values */ - if ( ( pRoom_acoustics->pAcoustic_dsr[band_idx] > ACOUSTIC_DSR_MAX ) || ( pRoom_acoustics->pAcoustic_dsr[band_idx] < ACOUSTIC_DSR_MIN ) ) - { - tab_value_err_count++; - } - - /* Replace zero DSR values with very small positive values, to avoid issues with coloration filter design */ - if ( pRoom_acoustics->pAcoustic_dsr[band_idx] <= 0.0f ) - { - pRoom_acoustics->pAcoustic_dsr[band_idx] = ACOUSTIC_DSR_EPSILON; - } - } - - if ( tab_value_err_count != 0 ) - { - return IVAS_ERR_WRONG_PARAMS; - } - - if ( pRoom_acoustics->use_er == 1 ) - { - /* Room dimensions */ - if ( pRoom_acoustics->dimensions.x < ER_MIN_ROOM_DIMENSION ) - { - pRoom_acoustics->dimensions.x = ER_MIN_ROOM_DIMENSION; - } - if ( pRoom_acoustics->dimensions.x > ER_MAX_ROOM_DIMENSION ) - { - pRoom_acoustics->dimensions.x = ER_MAX_ROOM_DIMENSION; - } - if ( pRoom_acoustics->dimensions.y < ER_MIN_ROOM_DIMENSION ) - { - pRoom_acoustics->dimensions.y = ER_MIN_ROOM_DIMENSION; - } - if ( pRoom_acoustics->dimensions.y > ER_MAX_ROOM_DIMENSION ) - { - pRoom_acoustics->dimensions.y = ER_MAX_ROOM_DIMENSION; - } - if ( pRoom_acoustics->dimensions.z < ER_MIN_ROOM_DIMENSION ) - { - pRoom_acoustics->dimensions.z = ER_MIN_ROOM_DIMENSION; - } - if ( pRoom_acoustics->dimensions.z > ER_MAX_ROOM_DIMENSION ) - { - pRoom_acoustics->dimensions.z = ER_MAX_ROOM_DIMENSION; - } - - /* Abs Coeff */ - for ( wall_idx = 0; wall_idx < IVAS_ROOM_ABS_COEFF; wall_idx++ ) - { - if ( pRoom_acoustics->AbsCoeff[wall_idx] < ER_MIN_ABS_COEFF ) - { - pRoom_acoustics->AbsCoeff[wall_idx] = ER_MIN_ABS_COEFF; - } - if ( pRoom_acoustics->AbsCoeff[wall_idx] > ER_MAX_ABS_COEFF ) - { - pRoom_acoustics->AbsCoeff[wall_idx] = ER_MAX_ABS_COEFF; - } - } - -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION - /* Verify range of distance attenuation parameters: refDist: 0.0 <= distAtt[1] <= 6.3 */ - /* maxDist: distAtt[1] <= distAtt[0] <= 63.0 */ - /* rollOffFactor: 0 <= distAtt[2] <= 4.0 */ - hRenderConfig->distAtt[1] = min( max( 0, hRenderConfig->distAtt[1] ), DIST_ATT_MAX_REFDIST ); - hRenderConfig->distAtt[0] = min( max( hRenderConfig->distAtt[1], hRenderConfig->distAtt[0] ), DIST_ATT_MAX_MAXDIST ); - hRenderConfig->distAtt[2] = min( max( 0.0f, hRenderConfig->distAtt[2] ), DIST_ATT_MAX_ROLLOFF ); -#else - /* Verify range of distance attenuation parameters: 0.1 <= distAtt[0] <= distAtt[1] */ - /* 0.0 <= distAtt[2] <= 10.0 */ - hRenderConfig->distAtt[0] = max( 0.1f, hRenderConfig->distAtt[0] ); - hRenderConfig->distAtt[1] = max( hRenderConfig->distAtt[0], hRenderConfig->distAtt[1] ); - hRenderConfig->distAtt[2] = max( 0.0f, min( 10.0f, hRenderConfig->distAtt[2] ) ); -#endif - - /* Verify range of directivity patterns */ - for ( i = 0; i < IVAS_MAX_NUM_OBJECTS; i++ ) - { - hRenderConfig->directivity[i * 3] = max( 0.0f, min( 360.0f, hRenderConfig->directivity[i * 3] ) ); - hRenderConfig->directivity[i * 3 + 1] = max( 0.0f, min( 360.0f, hRenderConfig->directivity[i * 3 + 1] ) ); - hRenderConfig->directivity[i * 3 + 2] = max( 0.0f, min( 1.0f, hRenderConfig->directivity[i * 3 + 2] ) ); - } - } - - - return IVAS_ERR_OK; -} -#endif /*------------------------------------------------------------------------------------------* @@ -2550,9 +2411,7 @@ ivas_error RenderConfigReader_read( aeHasERsize = aeHasERabs = FALSE; params_idx = 0; pValue = (char *) calloc( strlen( pParams ), sizeof( char ) ); -#ifdef FIX_1452_DEFAULT_REVERB hRenderConfig->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_L_ACOUSTIC_PRE_DELAY; -#endif while ( sscanf( pParams + params_idx, "%64[^=]=%[^;];", item, pValue ) == 2 ) { params_idx += (int32_t) ( strlen( item ) + strlen( pValue ) + 2 ); @@ -3212,9 +3071,7 @@ ivas_error RenderConfigReader_getAcousticEnvironment( { if ( id == pRenderConfigReader->pAE[n].id ) { -#ifdef FIX_1452_DEFAULT_REVERB pAcEnv->aeID = (uint16_t) pRenderConfigReader->pAE[n].id; -#endif pAcEnv->nBands = (int16_t) pRenderConfigReader->pAE[n].pFG->nrBands; pAcEnv->inputPreDelay = pRenderConfigReader->pAE[n].preDelay; for ( m = 0; m < pAcEnv->nBands; m++ ) diff --git a/lib_util/render_config_reader.h b/lib_util/render_config_reader.h index a46ed261d6b48345e03bfc1dc5f9d433158739db..102467925dbac57df291ef405c168cea401d9bd6 100644 --- a/lib_util/render_config_reader.h +++ b/lib_util/render_config_reader.h @@ -80,11 +80,7 @@ ivas_error RenderConfigReader_getDistanceAttenuation( ); /* Verifies configuration parameters */ ivas_error RenderConfigReader_checkValues( -#ifdef FIX_2500_RENDCONF_REFACTOR RenderConfigReader *pRenderConfigReader /* i/o: Renderer configuration reader */ -#else - IVAS_RENDER_CONFIG_HANDLE hRenderConfig /* o : Renderer configuration handle */ -#endif ); /* Reads a configuration */ diff --git a/lib_util/rotation_file_reader.c b/lib_util/rotation_file_reader.c index b3801c9c6d9be85aa8dea4eeabaafa69c5f9d9df..bcab8a2006eb588571bfb33647bf02bae2572f0d 100644 --- a/lib_util/rotation_file_reader.c +++ b/lib_util/rotation_file_reader.c @@ -35,7 +35,6 @@ #include #include -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION #ifndef min #define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) ) #endif @@ -43,7 +42,6 @@ #ifndef max #define max( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) ) #endif -#endif struct RotFileReader @@ -135,15 +133,9 @@ ivas_error HeadRotationFileReading( pQuaternion->z = z; if ( pPos != NULL ) { -#ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION pPos->x = max( min( IVAS_LISTENER_POSITION_MAX, posx ), -IVAS_LISTENER_POSITION_MAX ); pPos->y = max( min( IVAS_LISTENER_POSITION_MAX, posy ), -IVAS_LISTENER_POSITION_MAX ); pPos->z = max( min( IVAS_LISTENER_POSITION_MAX, posz ), -IVAS_LISTENER_POSITION_MAX ); -#else - pPos->x = posx; - pPos->y = posy; - pPos->z = posz; -#endif } return IVAS_ERR_OK;