Loading apps/decoder.c +0 −239 Original line number Diff line number Diff line Loading @@ -164,16 +164,9 @@ 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 ); static void do_object_editing_fx( 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 /*------------------------------------------------------------------------------------------* Loading Loading @@ -464,17 +457,6 @@ int main( } } #ifndef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT /*-----------------------------------------------------------------* * 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 /*-------------------------------------------------------------------* * Load renderer configuration from file Loading Loading @@ -509,13 +491,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 ) Loading Loading @@ -595,27 +575,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. Loading Loading @@ -668,7 +632,6 @@ int main( hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID; } #ifdef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT /*-----------------------------------------------------------------* * Print config information *-----------------------------------------------------------------*/ Loading @@ -678,7 +641,6 @@ int main( fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif /*------------------------------------------------------------------------------------------* * Allocate output data buffer Loading @@ -704,11 +666,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 { Loading Loading @@ -1689,11 +1647,7 @@ static void resetHeadRotation( pPos[i].x_fx = 0; pPos[i].y_fx = 0; pPos[i].z_fx = 0; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION pPos[i].q_fact = 31; #else pPos[i].q_fact = 25; #endif } return; Loading Loading @@ -2139,13 +2093,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 ) Loading Loading @@ -2308,27 +2260,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 ) ); Loading Loading @@ -2369,34 +2305,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 Loading Loading @@ -2876,9 +2789,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 ) { Loading Loading @@ -3035,14 +2945,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 ) { Loading Loading @@ -3076,29 +2984,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; Loading Loading @@ -3330,35 +3221,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; } Loading Loading @@ -4051,110 +3918,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_fx, 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 apps/encoder.c +0 −15 Original line number Diff line number Diff line Loading @@ -363,7 +363,6 @@ int main( } } #ifdef FIX_FMSW_DEC /*------------------------------------------------------------------------------------------* * Open remote requests file for rtp packing (E-bytes) *------------------------------------------------------------------------------------------*/ Loading @@ -383,7 +382,6 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Handle Channel-aware mode Loading Loading @@ -678,19 +676,6 @@ int main( } } #ifndef FIX_FMSW_DEC /*------------------------------------------------------------------------------------------* * 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 /*------------------------------------------------------------------------------------------* * Run the encoder *------------------------------------------------------------------------------------------*/ Loading apps/renderer.c +0 −42 Original line number Diff line number Diff line Loading @@ -1174,7 +1174,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 ) { Loading Loading @@ -1220,7 +1219,6 @@ int main( goto cleanup; } } #endif if ( args.renderConfigFilePath[0] != '\0' ) { Loading @@ -1246,13 +1244,11 @@ int main( fprintf( stderr, "\nFailed to read renderer configuration from file %s\n", args.renderConfigFilePath ); 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_fx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", args.directivityPatternId[0], args.directivityPatternId[1], args.directivityPatternId[2], args.directivityPatternId[3] ); Loading @@ -1266,27 +1262,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, "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. Loading Loading @@ -1731,27 +1711,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, "Invalid acoustic environment configuration parameters\n\n" ); goto cleanup; } } else { fprintf( stderr, "Failed 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 ) ); Loading Loading @@ -3203,11 +3167,7 @@ static void IsmPositionProvider_getNextFrame( } #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 ( LT_32( objectMetadataBuffer->positions[objIdx].azimuth_fx, 0 ) ) { Loading @@ -3218,13 +3178,11 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].azimuth_fx = L_sub( objectMetadataBuffer->positions[objIdx].azimuth_fx, DEG_360_IN_Q22 ); } #ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW IF( objectMetadataBuffer->positions[objIdx].non_diegetic_flag && objectMetadataBuffer->positions[objIdx].azimuth_fx >= DEG_180_IN_Q22 ) { /* Wrap azimuth to lie within [-180, 180) range for non-diegetic panning */ objectMetadataBuffer->positions[objIdx].azimuth_fx = L_sub( objectMetadataBuffer->positions[objIdx].azimuth_fx, DEG_360_IN_Q22 ); } #endif /* Clamp elevation to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].elevation_fx = L_min( L_max( objectMetadataBuffer->positions[objIdx].elevation_fx, -DEG_90_IN_Q22 ), DEG_90_IN_Q22 ); Loading lib_com/ari_fx.c +0 −21 Original line number Diff line number Diff line Loading @@ -9,27 +9,6 @@ #include "cnst.h" #ifndef FIX_2402_SIMPLIFY_ARI_CODEC /** * \brief 31x16 Bit multiply (x*y) * * \param[i] xh high part, bit [30..15] * \param[i] xl low part, 15 LSBits * \param[i] y * * \return x*y */ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y ) { Word32 z; z = L_shl( L_mult0( xh, y ), 15 ); z = L_mac0( z, xl, y ); return z; } #endif /*--------------------------------------------------------------- Ari 14 bits common routines -------------------------------------------------------------*/ Loading lib_com/cldfb_evs_fx.c +1 −13 Original line number Diff line number Diff line Loading @@ -1216,12 +1216,8 @@ void analysisCldfbEncoder_fx( &enerScale.lb_scale16 ); /* get the energy */ #ifdef HARMONIZE_2564_GetEnergyCldfb GetEnergyCldfb( EVS_MONO, #else GetEnergyCldfb( #endif &st_fx->energyCoreLookahead_Fx, &st_fx->sf_energyCoreLookahead_Fx, num_slots, Loading @@ -1240,12 +1236,8 @@ void analysisCldfbEncoder_fx( } #ifdef HARMONIZE_2564_GetEnergyCldfb void GetEnergyCldfb( Word16 element_mode, /*!< i: | Is IVAS or EVS? */ #else void GetEnergyCldfb( #endif Word32 *energyLookahead, /*!< o: Q(*sf_energyLookahead) | pointer to the result in the core look-ahead slot */ Word16 *sf_energyLookahead, /*!< o: pointer to the scalefactor of the result in the core look-ahead slot */ const Word16 numLookahead, /*!< i: Q0 the number of look-ahead time-slots */ Loading Loading @@ -1320,15 +1312,11 @@ void GetEnergyCldfb( move16(); energyValuesSum[j] = L_shr_r( energyValuesSum[j], 1 ); move32(); #ifdef HARMONIZE_2564_GetEnergyCldfb nrg = L_shr_r( nrg, 1 ); if ( EQ_16( element_mode, EVS_MONO ) ) { #endif nrg = L_shr_r( energyValues[k][j], 1 ); #ifdef HARMONIZE_2564_GetEnergyCldfb } #endif } energyValuesSum[j] = L_add( energyValuesSum[j], nrg ); move32(); Loading Loading
apps/decoder.c +0 −239 Original line number Diff line number Diff line Loading @@ -164,16 +164,9 @@ 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 ); static void do_object_editing_fx( 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 /*------------------------------------------------------------------------------------------* Loading Loading @@ -464,17 +457,6 @@ int main( } } #ifndef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT /*-----------------------------------------------------------------* * 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 /*-------------------------------------------------------------------* * Load renderer configuration from file Loading Loading @@ -509,13 +491,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 ) Loading Loading @@ -595,27 +575,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. Loading Loading @@ -668,7 +632,6 @@ int main( hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID; } #ifdef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT /*-----------------------------------------------------------------* * Print config information *-----------------------------------------------------------------*/ Loading @@ -678,7 +641,6 @@ int main( fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #endif /*------------------------------------------------------------------------------------------* * Allocate output data buffer Loading @@ -704,11 +666,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 { Loading Loading @@ -1689,11 +1647,7 @@ static void resetHeadRotation( pPos[i].x_fx = 0; pPos[i].y_fx = 0; pPos[i].z_fx = 0; #ifdef FIX_BASOP_2023_TDREND_DISTATT_PRECISION pPos[i].q_fact = 31; #else pPos[i].q_fact = 25; #endif } return; Loading Loading @@ -2139,13 +2093,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 ) Loading Loading @@ -2308,27 +2260,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 ) ); Loading Loading @@ -2369,34 +2305,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 Loading Loading @@ -2876,9 +2789,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 ) { Loading Loading @@ -3035,14 +2945,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 ) { Loading Loading @@ -3076,29 +2984,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; Loading Loading @@ -3330,35 +3221,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; } Loading Loading @@ -4051,110 +3918,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_fx, 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
apps/encoder.c +0 −15 Original line number Diff line number Diff line Loading @@ -363,7 +363,6 @@ int main( } } #ifdef FIX_FMSW_DEC /*------------------------------------------------------------------------------------------* * Open remote requests file for rtp packing (E-bytes) *------------------------------------------------------------------------------------------*/ Loading @@ -383,7 +382,6 @@ int main( goto cleanup; } } #endif /*------------------------------------------------------------------------------------------* * Handle Channel-aware mode Loading Loading @@ -678,19 +676,6 @@ int main( } } #ifndef FIX_FMSW_DEC /*------------------------------------------------------------------------------------------* * 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 /*------------------------------------------------------------------------------------------* * Run the encoder *------------------------------------------------------------------------------------------*/ Loading
apps/renderer.c +0 −42 Original line number Diff line number Diff line Loading @@ -1174,7 +1174,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 ) { Loading Loading @@ -1220,7 +1219,6 @@ int main( goto cleanup; } } #endif if ( args.renderConfigFilePath[0] != '\0' ) { Loading @@ -1246,13 +1244,11 @@ int main( fprintf( stderr, "\nFailed to read renderer configuration from file %s\n", args.renderConfigFilePath ); 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_fx ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", args.directivityPatternId[0], args.directivityPatternId[1], args.directivityPatternId[2], args.directivityPatternId[3] ); Loading @@ -1266,27 +1262,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, "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. Loading Loading @@ -1731,27 +1711,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, "Invalid acoustic environment configuration parameters\n\n" ); goto cleanup; } } else { fprintf( stderr, "Failed 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 ) ); Loading Loading @@ -3203,11 +3167,7 @@ static void IsmPositionProvider_getNextFrame( } #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 ( LT_32( objectMetadataBuffer->positions[objIdx].azimuth_fx, 0 ) ) { Loading @@ -3218,13 +3178,11 @@ static void IsmPositionProvider_getNextFrame( objectMetadataBuffer->positions[objIdx].azimuth_fx = L_sub( objectMetadataBuffer->positions[objIdx].azimuth_fx, DEG_360_IN_Q22 ); } #ifdef FIX_1548_HARMONIZE_NON_DIEGETIC_PANNING_LAW IF( objectMetadataBuffer->positions[objIdx].non_diegetic_flag && objectMetadataBuffer->positions[objIdx].azimuth_fx >= DEG_180_IN_Q22 ) { /* Wrap azimuth to lie within [-180, 180) range for non-diegetic panning */ objectMetadataBuffer->positions[objIdx].azimuth_fx = L_sub( objectMetadataBuffer->positions[objIdx].azimuth_fx, DEG_360_IN_Q22 ); } #endif /* Clamp elevation to lie within [-90, 90] range (can't be wrapped easily) */ objectMetadataBuffer->positions[objIdx].elevation_fx = L_min( L_max( objectMetadataBuffer->positions[objIdx].elevation_fx, -DEG_90_IN_Q22 ), DEG_90_IN_Q22 ); Loading
lib_com/ari_fx.c +0 −21 Original line number Diff line number Diff line Loading @@ -9,27 +9,6 @@ #include "cnst.h" #ifndef FIX_2402_SIMPLIFY_ARI_CODEC /** * \brief 31x16 Bit multiply (x*y) * * \param[i] xh high part, bit [30..15] * \param[i] xl low part, 15 LSBits * \param[i] y * * \return x*y */ Word32 L_multi31x16_X2( Word16 xh, Word16 xl, Word16 y ) { Word32 z; z = L_shl( L_mult0( xh, y ), 15 ); z = L_mac0( z, xl, y ); return z; } #endif /*--------------------------------------------------------------- Ari 14 bits common routines -------------------------------------------------------------*/ Loading
lib_com/cldfb_evs_fx.c +1 −13 Original line number Diff line number Diff line Loading @@ -1216,12 +1216,8 @@ void analysisCldfbEncoder_fx( &enerScale.lb_scale16 ); /* get the energy */ #ifdef HARMONIZE_2564_GetEnergyCldfb GetEnergyCldfb( EVS_MONO, #else GetEnergyCldfb( #endif &st_fx->energyCoreLookahead_Fx, &st_fx->sf_energyCoreLookahead_Fx, num_slots, Loading @@ -1240,12 +1236,8 @@ void analysisCldfbEncoder_fx( } #ifdef HARMONIZE_2564_GetEnergyCldfb void GetEnergyCldfb( Word16 element_mode, /*!< i: | Is IVAS or EVS? */ #else void GetEnergyCldfb( #endif Word32 *energyLookahead, /*!< o: Q(*sf_energyLookahead) | pointer to the result in the core look-ahead slot */ Word16 *sf_energyLookahead, /*!< o: pointer to the scalefactor of the result in the core look-ahead slot */ const Word16 numLookahead, /*!< i: Q0 the number of look-ahead time-slots */ Loading Loading @@ -1320,15 +1312,11 @@ void GetEnergyCldfb( move16(); energyValuesSum[j] = L_shr_r( energyValuesSum[j], 1 ); move32(); #ifdef HARMONIZE_2564_GetEnergyCldfb nrg = L_shr_r( nrg, 1 ); if ( EQ_16( element_mode, EVS_MONO ) ) { #endif nrg = L_shr_r( energyValues[k][j], 1 ); #ifdef HARMONIZE_2564_GetEnergyCldfb } #endif } energyValuesSum[j] = L_add( energyValuesSum[j], nrg ); move32(); Loading