diff --git a/apps/decoder.c b/apps/decoder.c index b078c2441e79184f712047d6fe466f963393aa3d..9a8fd77005d5ebf6a6d40767e2c1c08d2354a3ee 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -80,6 +80,7 @@ static #endif #define RANDOM_INITSEED_DEC ( 0xFADE ) + /*------------------------------------------------------------------------------------------* * Local structure for storing cmdln arguments *------------------------------------------------------------------------------------------*/ @@ -179,31 +180,8 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); -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 ); -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 ); +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 ); +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 ); 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 ); @@ -471,8 +449,8 @@ int main( asked_frame_size = arg.renderFramesize; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : IVAS_DEFAULT_AEID; - arg.enableHeadRotation = arg.enableHeadRotation || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM; + if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.roomSize, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) @@ -618,7 +596,6 @@ int main( if ( arg.renderConfigEnabled ) { - /* sanity check */ if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false ) @@ -807,11 +784,7 @@ int main( if ( arg.voipMode ) { - error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, - &splitRendBits, - &renderConfig, - &hIvasDec, - pcmBuf ); + error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &renderConfig, &hIvasDec, pcmBuf ); } else { @@ -3107,6 +3080,7 @@ static ivas_error printBitstreamInfoVoip( else { auPtr = au; /* might have been set to RTP packet in prev call */ + error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSizeBits, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ @@ -3200,6 +3174,7 @@ static ivas_error decodeVoIP( int32_t delayTimeScale = -1; int16_t i; IVAS_DEC_HANDLE hIvasDec = *phIvasDec; + bool restartNeeded; IVAS_RTP ivasRtp = { 0 }; IVAS_RTP srRtp = { 0 }; @@ -3282,7 +3257,6 @@ static ivas_error decodeVoIP( goto cleanup; } - #ifdef SUPPORT_JBM_TRACEFILE if ( arg.jbmTraceFilename != NULL ) { @@ -3314,7 +3288,9 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ + error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); + initialTsOffsetSystemAndRTP = rtpTimeStamp - systemTime_ms * 16; /* For time mapping */ /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ @@ -3510,6 +3486,7 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ + error = IVAS_RTP_ReadNextFrame( &ivasRtp, au, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); /* IVAS RTP payload format has timescale 16000, JBM uses 1000 internally */ @@ -3564,6 +3541,7 @@ static ivas_error decodeVoIP( ivasRtp.nProcPiData += numPiData; } + if ( isSplitRend ) { #ifdef SUPPORT_JBM_TRACEFILE @@ -3801,6 +3779,7 @@ static ivas_error decodeVoIP( srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms; srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD; srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms; + if ( ( error = IVAS_RTP_WriteNextFrame( &srRtp, splitRendBits->bits_buf, &srInfo, (int16_t) splitRendBits->bits_written, false, false ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while pushing SR audio bitstream to RTP pack\n", ivas_error_to_string( error ) ); @@ -4052,7 +4031,8 @@ static void do_object_editing( editableParameters->ism_metadata[obj_idx].elevation = readInfo->obj_ele[obj_idx]; } } - /* object direction editing only for diegetic objects */ + + /* object orientation editing only for diegetic objects */ if ( readInfo->obj_yaw_edited[obj_idx] ) { if ( readInfo->obj_yaw_relative[obj_idx] ) @@ -4348,9 +4328,10 @@ static ivas_error restartDecoder( hIvasDec = *phIvasDec; - uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : 65535; + 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->renderFramesize, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, arg->enableHeadRotation, arg->enableExternalOrientation, arg->orientation_tracking, arg->renderConfigEnabled, arg->roomSize, arg->non_diegetic_pan_enabled, arg->non_diegetic_pan_gain, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) @@ -4365,7 +4346,6 @@ static ivas_error restartDecoder( goto cleanup; } - if ( arg->voipMode ) { if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg->inputFormat ) ) != IVAS_ERR_OK ) diff --git a/apps/encoder_fmtsw.c b/apps/encoder_fmtsw.c index 0b7cf0271d01c8b5d04dbabafffff64888073608..9c347dffb4eb4650b22ca212a443d1ad90497fb7 100644 --- a/apps/encoder_fmtsw.c +++ b/apps/encoder_fmtsw.c @@ -256,6 +256,7 @@ int main( cleanup: IVAS_RTP_Term( &ivasRtp ); + if ( FmtSWFile ) { fclose( FmtSWFile ); @@ -1156,7 +1157,6 @@ static bool parseCmdlIVAS_enc( arg->rtpdumpOutput = false; arg->sceneOrientationTrajFileName = NULL; arg->deviceOrientationTrajFileName = NULL; - #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; arg->forcedModeFile = NULL; diff --git a/apps/isar_post_rend.c b/apps/isar_post_rend.c index cdcdad49015d4752e04de34f399e00b257b4898e..47ffdfb70118bba7683dc6fa563bb30ed4afbb65 100644 --- a/apps/isar_post_rend.c +++ b/apps/isar_post_rend.c @@ -398,6 +398,7 @@ static IVAS_AUDIO_CONFIG parseAudioConfig( *srRtp = true; return IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED; } + return IVAS_AUDIO_CONFIG_INVALID; } @@ -455,6 +456,7 @@ static CmdlnArgs defaultArgs( clearString( args.inputFilePath ); clearString( args.outputFilePath ); clearString( args.srParamsFilePath ); + args.sampleRate = 0; args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; @@ -560,7 +562,6 @@ static void parseOption( fprintf( stderr, "Unknown or invalid option for frame size: %s\n", optionValues[0] ); exit( -1 ); } - break; case CmdLnOptionId_srParamsFile: assert( numOptionValues == 1 ); @@ -695,6 +696,7 @@ static void convertOutputBuffer( return; } + static void trim( char *str ) { char c; @@ -712,6 +714,7 @@ static void trim( char *str ) str[w] = 0; } + static ivas_error parseSRParamsFile( const char *srParamsFilePath, const char *rtpFilePath, @@ -803,6 +806,7 @@ static ivas_error parseSRParamsFile( return IVAS_ERR_OK; } + /*------------------------------------------------------------------------------------------* * main() * diff --git a/apps/renderer.c b/apps/renderer.c index 63db453f3cea1f4e09b66ab3c468714c1f80dcaa..491433d645a25ba2da700da30c92c9187391f336 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -226,7 +226,7 @@ typedef enum CmdLnOptionId_syncMdDelay, CmdLnOptionId_directivityPatternId, CmdLnOptionId_acousticEnvironmentId, - CmdLnOptionId_roomSize, + CmdLnOptionId_roomSize } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -1127,7 +1127,7 @@ int main( if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { - aeID = args.aeSequence.count > 0 ? args.aeSequence.pID[0] : 65535; + aeID = args.aeSequence.count > 0 ? args.aeSequence.pID[0] : IVAS_DEFAULT_AEID; if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) @@ -1433,12 +1433,7 @@ int main( audioWriter = NULL; } - if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, - &bitsBuffer.config.codec, - &bitsBuffer.config.poseCorrection, - &bitsBuffer.config.codec_frame_size_ms, - &bitsBuffer.config.isar_frame_size_ms, - &bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, &bitsBuffer.config.isar_frame_size_ms, &bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_REND_GetSplitRendBitstreamHeader()!\n" ); goto cleanup; diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 3e038de0a4000857adab7af4b4b314d840e268bf..609fb930aca67722e39b8bcacf6bb9eaf46c0aff 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -180,7 +180,6 @@ typedef enum #define EDIT_GAIN_MIN 0.0630957f /* Minimum allowed gain edit with parametric modes: -24 dB */ #define EDIT_GAIN_MAX 3.9810719f /* Maximum allowed gain edit: +12 dB */ - typedef enum { TC_BUFFER_MODE_RENDERER, @@ -1486,6 +1485,7 @@ typedef enum #define LS_ANGLE_RAD_30_DEG 0.52359879f /* 30.0f * PI_OVER_180 */ #define INV_TAN_LS_ANGLE_RAD_30_DEG 1.7320507f /* 1.0f/tanf(30.0f * PI_OVER_180) */ + /*----------------------------------------------------------------------------------* * Binaural Rendering Constants *----------------------------------------------------------------------------------*/ @@ -1604,6 +1604,7 @@ typedef enum DEFAULT_REVERB_LARGE, } IVAS_DefaultReverbSize; + /*----------------------------------------------------------------------------------* * FB mixer constants *----------------------------------------------------------------------------------*/ diff --git a/lib_com/ivas_omasa_com.c b/lib_com/ivas_omasa_com.c index 36ad0d009cc854aacd4c70450b71712b4e26c4df..cc2897729687f8d4fa8427f15aa9222e2c933b60 100644 --- a/lib_com/ivas_omasa_com.c +++ b/lib_com/ivas_omasa_com.c @@ -64,6 +64,8 @@ #define PAN_MAX_DEG 30.0f #define ONE_OVER_PAN_STEP_DEG 10.0f #define SIN_LS_ANGLE 0.5f /* sinf( 30.0f * PI_OVER_180 ) */ + + /*--------------------------------------------------------------- * ivas_omasa_ism_mode_select() * diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 3e8f951eff62e0aba074b342bd1688ebefac42c9..f779a6bbb58489ac68a730512a596238b3e417bc 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -811,6 +811,7 @@ void QuaternionInverse( IVAS_QUATERNION *const r ); + /*----------------------------------------------------------------------------------* * JBM prototypes *----------------------------------------------------------------------------------*/ @@ -5188,7 +5189,7 @@ void ivas_binaural_add_LFE( /*---------------------------------------------------------------------------------* - * Multi-pose ring buffer Prototypes + * Multi-pose ring buffer Prototypes for split-rendering *-----------------------------------------------------------------------------------*/ ivas_error ivas_CLDFB_RINGBUF_Open( diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index 431613466e96b6939e14289ed57a86c75c4c6262..367304f633b8bd7ddd3e9db3275cee5a01a00610 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -2992,6 +2992,7 @@ const float ivas_tan_panning_gain_tbl[OMASA_PAN_TBL_LEN] = 0.9999695f }; + /*----------------------------------------------------------------------------------* * ISM ROM tables *----------------------------------------------------------------------------------*/ diff --git a/lib_com/options.h b/lib_com/options.h index df9d70b75cfa11c7350f207420f9f7eda17dc9e2..75c88d2be42cf382dd2a735268cb78cedd24502d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -136,7 +136,6 @@ /*#define DEBUG_AGC_ENCODER_CMD_OPTION*/ /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */ /*#define DEBUG_JBM_CMD_OPTION*/ /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */ /*#define VARIABLE_SPEED_DECODING*/ /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */ -/*#define DISABLE_LIMITER*/ /* disable the limiter */ /*#define DEBUG_APA_SILENCE_NON_SCALED*/ /* Switch APA into mode that replaces contents of non-scaled frames with silence. Useful for identifying scaled regions in the audio output of the decoder */ /*Split Rendering Debug switches*/ @@ -151,32 +150,30 @@ /* #################### End DEBUGGING switches ############################ */ - /* keep as part of options.h */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ /*#define DISABLE_LIMITER */ /* test switch for testing BE between 5ms and 20ms rendering */ -/* ################## Start DEVELOPMENT switches ######################### */ - +/* ################## Start MAINTENANCE switches ######################### */ /* ################### Start BE switches ################################# */ -/* only BE switches wrt selection floating point code */ +/* only BE switches wrt wrt. TS 26.258 V3.0 */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #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. */ + /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ +/* any switch which is non-be wrt. TS 26.258 V3.0 */ -/* any switch which is non-be wrt selection floating point code */ -/* all switches in this category should start with "NONBE_" */ -#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. */ /* ##################### End NON-BE switches ########################### */ -/* ################## End DEVELOPMENT switches ######################### */ +/* ################## End MAINTENANCE switches ######################### */ /* clang-format on */ diff --git a/lib_dec/fd_cng_dec.c b/lib_dec/fd_cng_dec.c index 1a90e0060663ad170bc9090b9218866eb8830422..472c8aa20d34b6d0bb7a7813befc556f24a7e90e 100644 --- a/lib_dec/fd_cng_dec.c +++ b/lib_dec/fd_cng_dec.c @@ -2342,6 +2342,7 @@ void FdCngDecodeDiracMDCTStereoSID( lpc_from_spectrum( hFdCngCom, hFdCngCom->startBand, hFdCngCom->stopFFTbin, sts[ch]->preemph_fac ); } + for ( i = 0; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { sts[0]->hFdCngDec->hFdCngCom->coherence[i] = 0.0f; diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 857fdf6078687c33268344a0c041400db79f4e95..1a461939fdbe280275d874b066cfeb438f825bbb 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -2065,7 +2065,6 @@ void ivas_dirac_dec_render_sf( } } - /*-----------------------------------------------------------------* * Compute DirAC parameters at decoder side *-----------------------------------------------------------------*/ @@ -2074,6 +2073,7 @@ void ivas_dirac_dec_render_sf( { mvs2s( &hSpatParamRendCom->azimuth[md_idx][hDirAC->hConfig->enc_param_start_band], &azimuth[hDirAC->hConfig->enc_param_start_band], hSpatParamRendCom->num_freq_bands - hDirAC->hConfig->enc_param_start_band ); mvs2s( &hSpatParamRendCom->elevation[md_idx][hDirAC->hConfig->enc_param_start_band], &elevation[hDirAC->hConfig->enc_param_start_band], hSpatParamRendCom->num_freq_bands - hDirAC->hConfig->enc_param_start_band ); + if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) { num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; @@ -2391,8 +2391,7 @@ void ivas_dirac_dec_render_sf( if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { binRenderer_split( st_ivas->hBinRenderer, st_ivas->hSplitBinRend, st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx], - Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer, - hSpatParamRendCom->num_freq_bands, st_ivas->hDecoderConfig->nchan_out ); + Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->hDecoderConfig->nchan_out ); } else { diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index ac639b7dbaf021ae5e16bf0007bc0767cfa53c72..5cecda4b974fe1c487ec9090a4c6f3990ca5a0d7 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -258,6 +258,7 @@ ivas_error ivas_dec_get_format( { masaRestartCandidate = 1; } + st_ivas->nchan_transport = 2; element_mode_flag = 1; } @@ -267,6 +268,7 @@ ivas_error ivas_dec_get_format( { masaRestartCandidate = 1; } + st_ivas->nchan_transport = 1; } @@ -1508,11 +1510,12 @@ ivas_error ivas_init_decoder( { return error; } + /* Get default reverb values based on format, if custom values were not given */ if ( st_ivas->hDecoderConfig->Opt_RendConfigCustom == 0 ) { IVAS_DefaultReverbSize defaultReverbSize; - switch ( st_ivas->hDecoderConfig->Opt_RoomSize ) + switch ( st_ivas->hDecoderConfig->room_size ) { case IVAS_ROOM_SIZE_AUTO: switch ( st_ivas->ivas_format ) @@ -1578,7 +1581,6 @@ ivas_error ivas_init_decoder( else if ( st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->nchan_transport = CPE_CHANNELS; - st_ivas->nSCE = 0; st_ivas->nCPE = 1; /* in stereo, there is always only one CPE */ cpe_id = 0; diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index 410449b7b150477be919ae40d75cbdcc72cb11f1..df9c71f76d768ec8ad28cfc358864526652e06e2 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -1061,11 +1061,13 @@ void ivas_ism_metadata_sid_dec( { hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[i] = 1.0f; } + continue; } idx = get_next_indice( st0, nBits_coh ); hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[0] = (float) ( idx ) / (float) ( ( 1 << nBits_coh ) - 1 ); + for ( i = 1; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[i] = hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[0]; diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index f364e5e1a065ee2884eea64e26c6e1963ad094af..1cd6be9e50f77a666a862b02c9564c4be18a3d1a 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -709,6 +709,7 @@ void ivas_ism_dec_digest_tc( ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) { int16_t i; + /* we have a full frame interpolator, adapt it */ /* for BE testing */ if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available ) @@ -757,6 +758,7 @@ void ivas_ism_dec_digest_tc( st_ivas->hCombinedOrientationData == NULL ) { float elevation = st_ivas->hIsmMetaData[i]->edited_elevation; + if ( st_ivas->hIntSetup.is_planar_setup ) { /* If no elevation support in output format, then rendering should be done with zero elevation */ @@ -778,6 +780,7 @@ void ivas_ism_dec_digest_tc( azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_azimuth + 0.5f ); elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_elevation + 0.5f ); + /*get HOA gets for direction (ACN/SN3D)*/ ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order ); v_multc( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_gain, st_ivas->hIsmRendererData->gains[i], ivas_sba_get_nchan( st_ivas->hIntSetup.ambisonics_order, 0 ) ); @@ -1268,6 +1271,7 @@ void ivas_param_ism_params_to_masa_param_mapping( if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; + energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[0], 2.0f ); hSpatParamRendCom->numSimultaneousDirections = 1; diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 4f69fd6b0c74fd5e8ac868c347c6dc4805706f10..20d009e286a80833cd15bb2cc23ee773a3751d57 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -165,6 +165,7 @@ static void dec_prm_tcx_sidebits( { st->last_core = TCX_20_CORE; } + getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st0 ); st->hTcxDec->kernel_type[0] = st->hTcxDec->kernel_type[1] = MDCT_IV; diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index e9d347e15d2374e10de827ae5e4c39282b68ec93..ddb3df80033558d9f65cc04b1e3efe5143f34368 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -786,6 +786,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( cldfbAnalysis_ts( &( p_rend_obj[n][num_cldfb_bands * slot_idx] ), Cldfb_RealBuffer, Cldfb_ImagBuffer, num_cldfb_bands, st_ivas->hSplitBinRend->splitrend.hCldfbHandles->cldfbAna[n] ); ivas_CLDFB_RINGBUF_GetByIdx( st_ivas->hSplitBinRend->hMultiBinCldfbData[n], &re, &im, slot_idx - cldfb_slots ); + v_add( re, Cldfb_RealBuffer, re, num_cldfb_bands ); v_add( im, Cldfb_ImagBuffer, im, num_cldfb_bands ); } diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 9b3041c09a543af98a9d35741c88dc633e2282a9..cc2599b018bfff3d0edbeae0784acca41efc3bff 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -179,6 +179,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( cldfbAnalysis_ts( &( output_f[n][num_cldfb_bands * slot_idx] ), Cldfb_RealBuffer, Cldfb_ImagBuffer, num_cldfb_bands, st_ivas->hSplitBinRend->splitrend.hCldfbHandles->cldfbAna[n] ); ivas_CLDFB_RINGBUF_GetByIdx( st_ivas->hSplitBinRend->hMultiBinCldfbData[n], &re, &im, slot_idx - cldfb_slots ); + v_add( re, Cldfb_RealBuffer, re, num_cldfb_bands ); v_add( im, Cldfb_ImagBuffer, im, num_cldfb_bands ); } diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index c755bb6041a3f52ba47c8921426547b063725e1f..44e8d81d936d2ae05ecca0e7c8f05513c6858cb9 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -187,6 +187,7 @@ static float get_panning( { float aziRad, eleRad, y, mappedX, aziRadMapped, panning; float A, A2, A3; + aziRad = aziDeg * PI_OVER_180; eleRad = eleDeg * PI_OVER_180; y = ( sinf( aziRad ) * cosf( eleRad ) ); @@ -210,6 +211,7 @@ static float get_panning( A3 = 1.0f / ( A2 * A2 + 1.0f ); panning = 2 * A3 - 1.0f; } + return panning; } diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index dcfb151479c73f0c89d74607ea7a0ab443b94d72..3ce93da9de0415ba6743ffca7b4a8b44a71f2335 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -998,7 +998,7 @@ typedef struct decoder_config_structure int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ int16_t Opt_Headrotation; /* indicates whether head-rotation is used */ int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ - IVAS_ROOM_SIZE_T Opt_RoomSize; /* Selected room size */ + IVAS_ROOM_SIZE_T room_size; /* Selected room size */ IVAS_HEAD_ORIENT_TRK_T orientation_tracking; /* indicates orientation tracking type */ int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */ float non_diegetic_pan_gain; /* non diegetic panning gain*/ @@ -1113,6 +1113,7 @@ typedef struct Decoder_Struct IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pAcousticEnvironments; /* Acoustic environment array */ uint16_t acousticEnvironmentsCount; /* Number of acoustic environments in the array*/ + int16_t flag_omasa_brate; ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE hSplitBinRend; /* ISAR split binaural rendering handle */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index b6b8efc3a5cdfca8769acdc2a609b262e9052dcf..0f94ce541776c8a6cc8e222cd01a164f8a85f70d 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -307,7 +307,7 @@ static void init_decoder_config( hDecoderConfig->Opt_HRTF_binary = 0; hDecoderConfig->Opt_Headrotation = 0; hDecoderConfig->Opt_RendConfigCustom = 0; - hDecoderConfig->Opt_RoomSize = IVAS_ROOM_SIZE_AUTO; + hDecoderConfig->room_size = IVAS_ROOM_SIZE_AUTO; hDecoderConfig->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain = 0; @@ -344,11 +344,12 @@ void IVAS_DEC_Close( ( *phIvasDec )->hVoIP = NULL; } - if ( ( *phIvasDec )->st_ivas ) { /* destroy Split binaural renderer (ISAR) handle */ ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); + + /* destroy IVAS decoder handles */ ivas_destroy_dec( ( *phIvasDec )->st_ivas ); ( *phIvasDec )->st_ivas = NULL; } @@ -509,7 +510,7 @@ ivas_error IVAS_DEC_Configure( hDecoderConfig->orientation_tracking = orientation_tracking; hDecoderConfig->Opt_HRTF_binary = (int16_t) hrtfReaderEnabled; hDecoderConfig->Opt_RendConfigCustom = (int16_t) renderConfigEnabled; - hDecoderConfig->Opt_RoomSize = roomSize; + hDecoderConfig->room_size = roomSize; hDecoderConfig->Opt_non_diegetic_pan = (int16_t) non_diegetic_pan_enabled; hDecoderConfig->non_diegetic_pan_gain = non_diegetic_pan_gain; hDecoderConfig->Opt_delay_comp = (int16_t) delayCompensationEnabled; @@ -1683,6 +1684,7 @@ ivas_error IVAS_DEC_SetEditableParameters( if ( fabsf( st_ivas->hIsmMetaData[obj]->edited_gain - hIvasEditableParameters.ism_metadata[obj].gain ) > OMASA_GAIN_EDIT_THR ) { st_ivas->hMasaIsmData->ism_gain_is_edited[obj] = 1u; + /* Limit masa gain edit to a range of +12dB to -infdB with discrete OMASA mode and +12dB to -24dB with parametric OMASA mode */ if ( hIvasEditableParameters.ism_metadata[obj].gain > EDIT_GAIN_MAX ) { @@ -1708,12 +1710,14 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hIsmMetaData[obj]->edited_azimuth = hIvasEditableParameters.ism_metadata[obj].azimuth; st_ivas->hIsmMetaData[obj]->edited_elevation = hIvasEditableParameters.ism_metadata[obj].elevation; + if ( ism_mode == ISM_MASA_MODE_DISC ) { st_ivas->hIsmMetaData[obj]->edited_yaw = hIvasEditableParameters.ism_metadata[obj].yaw; st_ivas->hIsmMetaData[obj]->edited_pitch = hIvasEditableParameters.ism_metadata[obj].pitch; st_ivas->hIsmMetaData[obj]->edited_radius = hIvasEditableParameters.ism_metadata[obj].radius; } + if ( hIvasEditableParameters.ism_metadata[obj].gain > EDIT_GAIN_MAX ) { st_ivas->hIsmMetaData[obj]->edited_gain = EDIT_GAIN_MAX; @@ -1726,6 +1730,7 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hIsmMetaData[obj]->edited_gain = hIvasEditableParameters.ism_metadata[obj].gain; } + st_ivas->hIsmMetaData[obj]->non_diegetic_flag = hIvasEditableParameters.ism_metadata[obj].non_diegetic_flag; } } @@ -3848,24 +3853,22 @@ ivas_error IVAS_DEC_TSM_SetQuality( * regular output configs and split rendering configs. *---------------------------------------------------------------------*/ -static ivas_error ivas_dec_voip_get_samples_common - - ( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ - void *pcmBuf, /* o : output synthesis signal */ - ISAR_SPLIT_REND_BITS_DATA *splitRendBits, /* o : output split rendering bits */ - float **p_head_pose_buf, /* i : PCM buffer with head-pose data */ +static ivas_error ivas_dec_voip_get_samples_common( + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ + void *pcmBuf, /* o : output synthesis signal */ + ISAR_SPLIT_REND_BITS_DATA *splitRendBits, /* o : output split rendering bits */ + float **p_head_pose_buf, /* i : PCM buffer with head-pose data */ #ifdef SUPPORT_JBM_TRACEFILE - JbmTraceFileWriterFn jbmWriterFn, - void *jbmWriter, + JbmTraceFileWriterFn jbmWriterFn, + void *jbmWriter, #endif - bool *bitstreamReadDone, /* o : flag indicating that bitstream was read */ - uint16_t *nSamplesRendered, /* o : number of samples rendered */ - bool *parametersAvailableForEditing, /* o : indicates whether objects editing is available */ - const uint32_t systemTimestamp_ms /* i : current system timestamp */ - ) + bool *bitstreamReadDone, /* o : flag indicating that bitstream was read */ + uint16_t *nSamplesRendered, /* o : number of samples rendered */ + bool *parametersAvailableForEditing, /* o : indicates whether objects editing is available */ + const uint32_t systemTimestamp_ms /* i : current system timestamp */ +) { Decoder_Struct *st_ivas; DECODER_CONFIG_HANDLE hDecoderConfig; diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index f62087b9af80dcbaa68a43d292c05f81e1aa9890..e9c866e3b63aebdd1ad883c57a786453349ccaaa 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -119,7 +119,7 @@ ivas_error IVAS_DEC_Configure( const bool enableExternalOrientation, /* i : enable external orientations */ const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ - const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ + const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ const bool dpidEnabled, /* i : enable directivity pattern option */ @@ -340,6 +340,7 @@ ivas_error IVAS_DEC_isRestartNeeded( bool *restartNeeded /* o : flag to signal decoder restart */ ); + /* Setter functions - apply changes to decoder configuration */ /*! r: error code */ diff --git a/lib_enc/fd_cng_enc.c b/lib_enc/fd_cng_enc.c index c8bc3302d5adf32ae4dcd87c465819dee5179201..2984ff7c36366f7afa7f78a72d7339ec9c81b6ec 100644 --- a/lib_enc/fd_cng_enc.c +++ b/lib_enc/fd_cng_enc.c @@ -1004,7 +1004,6 @@ void stereoFdCngCoherence( pt_fftR += L_FFT; } - return; } @@ -1246,7 +1245,6 @@ void FdCngEncodeMDCTStereoSID( push_indice( sts[1]->hBstr, IND_ENERGY, coh_idx, 4 ); } - return; } @@ -1385,6 +1383,7 @@ void FdCngEncodeDiracMDCTStereoSID( sts[ch]->hDtxEnc->last_CNG_L_frame = sts[ch]->L_frame; } + sts[0]->hFdCngEnc->hFdCngCom->coherence[0] = 0.0f; sts[1]->hFdCngEnc->hFdCngCom->coherence[0] = 0.0f; diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index fb5d6f63b02d74138d90f78ca482f7cabef20ce5..ebd5bb1281e48fc59901007aa8a07548b1e3a9fd 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -554,14 +554,14 @@ ivas_error ivas_cpe_enc( /* IGF reconfiguration */ for ( n = 0; n < n_CoreChannels; n++ ) { - if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth || ( sts[n]->last_core_brate == SID_2k40 || sts[n]->last_core_brate == FRAME_NO_DATA ) ) && - ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) ) + if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth || ( sts[n]->last_core_brate == SID_2k40 || sts[n]->last_core_brate == FRAME_NO_DATA ) ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) ) { int16_t igf; int16_t bw; bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : max_bwidth; igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->rf_mode ); + if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) { return error; diff --git a/lib_enc/ivas_stereo_dft_enc.c b/lib_enc/ivas_stereo_dft_enc.c index 6c87583ee61c9cb6836adb22968a91769676c4b5..26b2ad7b4ddf96b1b7a473848beca15f675522da 100644 --- a/lib_enc/ivas_stereo_dft_enc.c +++ b/lib_enc/ivas_stereo_dft_enc.c @@ -1319,6 +1319,7 @@ void stereo_dft_enc_process( /* Note: this variable is used as an in-between step when passing the angle to the trig functions. * this keeps the compilter from applying optimizations at higher optimizaton levels which can break bit-exactness */ volatile float alpha_tmp; + /*time shift channels*/ alpha = -2.0f * EVS_PI * hStereoDft->hItd->deltaItd[k_offset] / hStereoDft->NFFT; c = 1.f; /*cos(0)*/ diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index c3e13f4b7104899c355f693b3902f6f7247fc188..a2d7375d825c258fe3cba0da87b2e419e304ce82 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -870,6 +870,7 @@ void stereo_dft_enc_compute_itd( { float alphaD, c, s, c1, s1, ctmp, vtmp; volatile float alphaD_tmp; + alphaD = -2.f * EVS_PI * ( (float) hItd->td_itd[k_offset] - hItd->td_itd[k_offset - 1] ) / hStereoDft->NFFT; alphaD_tmp = alphaD; c1 = cosf( alphaD_tmp ); diff --git a/lib_enc/ivas_stereo_dmx_evs.c b/lib_enc/ivas_stereo_dmx_evs.c index 8017d101c973db0a6f398099ac0167580f614c12..3da5d0f3fe0b202b95215109f4779abbe1dad1e4 100644 --- a/lib_enc/ivas_stereo_dmx_evs.c +++ b/lib_enc/ivas_stereo_dmx_evs.c @@ -1224,6 +1224,7 @@ static void calc_energy( lvlff = ( lvli > *lvl ) ? STEREO_DMX_EVS_LVLU_FORGETTING : STEREO_DMX_EVS_LVLD_FORGETTING; *lvl = lvlff * *lvl + ( 1.0f - lvlff ) * lvli; } + return; } @@ -1395,7 +1396,6 @@ void stereo_dmx_evs_enc( const bool is_binaural /* i : indication that input is binaural audio */ ) { - float dmx_weight, corr; int16_t k, m, n, pha_len, fad_len, input_subframe, input_frame, n_fad_r, n_fad_g, m_fad_g, n_fad_cnt, sbfad_len; float data_f[CPE_CHANNELS][L_FRAME48k]; @@ -1466,6 +1466,7 @@ void stereo_dmx_evs_enc( } hPHA->phitd = hStereoDmxEVS->itd * PI2 / input_frame; + create_M_signal( data_f[0], data_f[1], dmx_poc_data, dmx_weight, input_frame, hStereoDmxEVS->s_wnd, hStereoDmxEVS->dmx_weight, hStereoDmxEVS->pre_dmx_energy, hStereoDmxEVS->aux_dmx_energy, hPHA ); diff --git a/lib_rend/ivas_cldfb_ring_buffer.c b/lib_rend/ivas_cldfb_ring_buffer.c index b78b899d2d97184edea28a511277d85150883bc1..79be9a60bc1984a0cf632ea22db4cb515a0f041c 100644 --- a/lib_rend/ivas_cldfb_ring_buffer.c +++ b/lib_rend/ivas_cldfb_ring_buffer.c @@ -41,6 +41,7 @@ #endif #include "wmc_auto.h" + /*---------------------------------------------------------------------* * CLDFB ring-buffer functions needed in split-rendering outputs *---------------------------------------------------------------------*/ diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index f8e7211fe7f6f85ca09d0e2d3d8e2f04020af400..e14414c57e57c0f3849dbf1cac313b58f5d11364 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -844,13 +844,9 @@ static void ivas_dirac_dec_binaural_internal( mvr2r( st_ivas->hDiracDecBin[0]->ChCrossRe, hDiracDecBin->ChCrossRe, hSpatParamRendCom->num_freq_bands ); mvr2r( st_ivas->hDiracDecBin[0]->ChCrossIm, hDiracDecBin->ChCrossIm, hSpatParamRendCom->num_freq_bands ); - ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, - subFrameTotalEne, IIReneLimiter, st_ivas->hMasaIsmData ); + ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, subFrameTotalEne, IIReneLimiter, st_ivas->hMasaIsmData ); - ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, - nchanSeparateChannels, st_ivas->hMasaIsmData ); + ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, nchanSeparateChannels, st_ivas->hMasaIsmData ); /* re-use reverb and decorr from main direction for the sides */ ivas_dirac_dec_binaural_process_output( hDiracDecBin, hSpatParamRendCom, st_ivas->cldfbSynDec, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, @@ -3406,9 +3402,11 @@ static void ivas_masa_ext_rend_parambin_internal( ivas_dirac_dec_binaural_formulate_input_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, subframe, subFrameTotalEne, IIReneLimiter ); + ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, subFrameTotalEne, IIReneLimiter, NULL ); + ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, 0, NULL ); diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 967d70bb8e5fd62688d419868c8b5c4617940410..ba5ac041dbc6d869c43e406d7427da3deffb07ab 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1345,7 +1345,7 @@ ivas_error ivas_render_config_init_from_rom( ivas_error ivas_render_config_change_defaults( RENDER_CONFIG_HANDLE hRenderConfig, /* i/o: Renderer config handle */ - IVAS_DefaultReverbSize reverbDefault /* i: Reverb default size */ + IVAS_DefaultReverbSize reverbDefault /* i : Reverb default size */ ); diff --git a/lib_rend/ivas_rom_rend.h b/lib_rend/ivas_rom_rend.h index 880408e69d184b3c8aba26db1eecc380f09a4aa8..ecda759ccbfab1806fac1ed9d3de37ca42c70704 100644 --- a/lib_rend/ivas_rom_rend.h +++ b/lib_rend/ivas_rom_rend.h @@ -108,7 +108,6 @@ extern const float norm_sn3d_hoa3[16]; extern const float t_design_11_azimuth[70]; extern const float t_design_11_elevation[70]; - /*----------------------------------------------------------------------* * Reverberator ROM tables *-----------------------------------------------------------------------*/ @@ -125,7 +124,6 @@ extern const float ivas_reverb_default_large_fc[]; extern const float ivas_reverb_default_large_RT60[]; extern const float ivas_reverb_default_large_DSR[]; - /*----------------------------------------------------------------------------------* * Renderer SBA & MC enc/dec matrices *----------------------------------------------------------------------------------*/ @@ -133,14 +131,12 @@ extern const float ivas_reverb_default_large_DSR[]; extern const float ls_azimuth_CICP1[1]; extern const float ls_elevation_CICP1[1]; - /*----------------------------------------------------------------------------------* * EFAP ROM tables *----------------------------------------------------------------------------------*/ extern const int8_t efap_poly_limit[MAX_OUTPUT_CHANNELS]; - /*----------------------------------------------------------------------------------* * LS Configuration Converter ROM tables *----------------------------------------------------------------------------------*/ diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 3910ddea87cb7d32755e6db6dafd51c0dcbf30e3..7777a147c23dddaab5b3c8d08446e66a33aee2db 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -1079,6 +1079,7 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternion_frozen_head = identity; hCombinedOrientationData->isHeadRotationFrozen = 0; } + /* Disable head rotation if diegetic PI data indicating non-diegetic audio is received */ if ( hCombinedOrientationData->isDiegeticInputPISet && !hCombinedOrientationData->isDiegeticInputPI[0] && !hCombinedOrientationData->isDiegeticInputPI[1] && !hCombinedOrientationData->isDiegeticInputPI[2] && !hCombinedOrientationData->isDiegeticInputPI[3] && !hCombinedOrientationData->isDiegeticInputPI[4] ) { diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index bcb948d05d5648e060e6e72d59a42cbf6e8e04f7..e935c9f9bc6839568c908bd95be431d127d4de94 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -712,6 +712,7 @@ typedef struct ivas_combined_orientation_struct int16_t cur_subframe_samples_rendered_start; bool isDiegeticInputPI[1 + IVAS_MAX_NUM_OBJECTS]; bool isDiegeticInputPISet; + } COMBINED_ORIENTATION_DATA, *COMBINED_ORIENTATION_HANDLE; /*----------------------------------------------------------------------------------* diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ed8c0f008f886d81f81f53cd7b057bec0efd1a45..d413aa66941a246eb62a044547872442ee30cb34 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -55,6 +55,7 @@ #define MAX_BUFFER_LENGTH ( L_FRAME_MAX * MAX_INPUT_CHANNELS ) #define MAX_BIN_DELAY_SAMPLES 150 /* Maximum supported rendering latency for binaural IRs */ + /*-------------------------------------------------------------------* * Local types *-------------------------------------------------------------------*/ @@ -3780,6 +3781,14 @@ static ivas_error isar_pre_rend_init( return IVAS_ERR_OK; } + + +/*------------------------------------------------------------------------- + * Function getDefaultReverbSize() + * + * + *------------------------------------------------------------------------*/ + static IVAS_ROOM_SIZE_T getDefaultReverbSize( input_ism *ismInputs, input_masa *masaInputs, @@ -5181,11 +5190,13 @@ ivas_error IVAS_REND_GetCombinedOrientation( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * IVAS_REND_GetCombinedOrientation() * * *---------------------------------------------------------------------*/ + ivas_error IVAS_REND_GetReverbRoomSize( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ IVAS_ROOM_SIZE_T *reverbRoomSize /* o : Reverb room size */ @@ -5211,11 +5222,13 @@ ivas_error IVAS_REND_GetReverbRoomSize( return IVAS_ERR_OK; } + /*---------------------------------------------------------------------* * IVAS_REND_GetCombinedOrientation() * * *---------------------------------------------------------------------*/ + ivas_error IVAS_REND_SetReverbRoomSize( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ const IVAS_ROOM_SIZE_T reverbRoomSize /* i : Reverb room size */ diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 267b24b6ea1525090b3583db6bb8a9e10fa46891..8ab8f33f1ce9bc0738589062d54abadc315129ab 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -382,7 +382,7 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects( ivas_error IVAS_REND_SetIsmMetadataDelay( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ - const int16_t sync_md_delay /* i : Metadata Delay in ms to sync with audio delay */ + const int16_t sync_md_delay /* i : Metadata Delay in ms to sync with audio delay */ ); ivas_error IVAS_REND_GetNumAllObjects( diff --git a/lib_util/ivas_rtp_api.h b/lib_util/ivas_rtp_api.h index bce34092d08159bdca4331005ca13bd6660952d6..16d63582fd28ffa271f146df001d23095d6df719 100644 --- a/lib_util/ivas_rtp_api.h +++ b/lib_util/ivas_rtp_api.h @@ -272,6 +272,7 @@ typedef struct IVAS_RTP_SR_TRANSPORT codec; /* SR Transport Codec used*/ } IVAS_RTP_SR_INFO; + /**********************************************/ /* IVAS RTP PACKER API */ /**********************************************/ diff --git a/lib_util/ivas_rtp_internal.h b/lib_util/ivas_rtp_internal.h index 1fd4def72b7a5e52600f74819640f00e9321291c..d8ac0bc231481f6008620f6f650c03b1e5b735bb 100644 --- a/lib_util/ivas_rtp_internal.h +++ b/lib_util/ivas_rtp_internal.h @@ -123,7 +123,6 @@ enum IVAS_RTP_HEADER_BITS }; - #define ERR_CHECK_RETURN( err ) \ { \ if ( ( err ) != IVAS_ERR_OK ) \ @@ -132,7 +131,6 @@ enum IVAS_RTP_HEADER_BITS } \ } - typedef struct { uint32_t size; diff --git a/lib_util/ivas_rtp_payload.c b/lib_util/ivas_rtp_payload.c index 3c7c942b17e142e19e2da7764de2a0b368e136cd..f027ed40121ae2510dc623e2052b3de97d4436d2 100644 --- a/lib_util/ivas_rtp_payload.c +++ b/lib_util/ivas_rtp_payload.c @@ -29,12 +29,11 @@ the United Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ + #include #include #include #include "common_api_types.h" - - #include "ivas_rtp_internal.h" #include "ivas_bpool.h" #include "ivas_queue.h" @@ -227,6 +226,8 @@ static void InitRtpHeader( { memset( header, 0, sizeof( *header ) ); header->version = 2; + + return; } static ivas_error PackRtpHeader( @@ -797,10 +798,12 @@ static void packEBytes( uint8_t fmtEByte = ( EBYTE_FORMAT_REQUEST | ( (uint8_t) format & MASK_3BIT ) ); eByte[nByte++] = isSubFormatProvided ? EBYTE_SUBFORMAT_REQUEST : fmtEByte; } + if ( isSubFormatProvided && nByte < maxNumEBytes ) { eByte[nByte++] = ( (uint8_t) subFormat & MASK_6BIT ); /* Requested Coded subFormat */ } + /* Subsequent E-bytes - Split Renderer Configuration Request */ if ( isSRConfigProvided && nByte < maxNumEBytes ) { @@ -831,6 +834,7 @@ static ivas_error getSRToCByte( { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Unsupported codec framesize for SR provided" ); } + if ( srInfo->bitrateKbps < 256000 || srInfo->bitrateKbps > 512000 ) { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Unsupported bitrate for SR" ); @@ -846,6 +850,7 @@ static ivas_error getSRToCByte( return IVAS_ERR_OK; } + static void addPackedPiDataToFrame( PIDATA_FRAME *piDataFrm, const PIDATA_PACKED *packedPiData, uint32_t piDataType ) { piDataFrm->piData[piDataType].size = packedPiData->size; @@ -1430,6 +1435,7 @@ static ivas_error parseToCByte( const IVAS_DATA_BUFFER *payload, uint32_t *numBy { uint8_t SR_BR; static const uint8_t codecFrameSizeMap[4] = { 0, 5, 10, 20 }; + byte = payload->buffer[nBytes++]; SR_BR = ( byte >> 3 ) & MASK_2BIT; if ( SR_BR == 0 ) @@ -1621,7 +1627,6 @@ ivas_error IVAS_RTP_UNPACK_PushPayload( nBytes = parseSubsequentEByte( payload, nBytes, hUnpack->requests, &piDataIndicated ); /* Unpack the ToC Bytes => Extract number of frames in packet */ - error = parseToCByte( payload, &nBytes, &numFrames, toc, sizeof( toc ) / sizeof( toc[0] ) ); ERR_CHECK_RETURN( error ); diff --git a/lib_util/ivas_rtp_pi_data.c b/lib_util/ivas_rtp_pi_data.c index 250ea9c72c3350a02259cd63635c27c2b762d1c0..353256ca37904e27c75ae0bfba03d289a7515b12 100644 --- a/lib_util/ivas_rtp_pi_data.c +++ b/lib_util/ivas_rtp_pi_data.c @@ -34,7 +34,6 @@ #include "ivas_rtp_internal.h" #include #include - #ifndef min #define min( x, y ) ( ( x ) < ( y ) ? ( x ) : ( y ) ) #endif @@ -185,7 +184,6 @@ static ivas_error unpackQuaternion( const uint8_t *buffer, IVAS_QUATERNION *orie return IVAS_ERR_OK; } - static ivas_error packUnsupportedData( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { (void) piData; @@ -285,6 +283,7 @@ static ivas_error packISMOrientation( const IVAS_PIDATA_GENERIC *piData, uint8_t { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect PI ID in Orientation PI data" ); } + /* Orientation data is 4 bytes, header is 2 bytes */ if ( maxDataBytes < 4 * IVAS_MAX_NUM_OBJECTS + 2 ) { @@ -297,6 +296,7 @@ static ivas_error packISMOrientation( const IVAS_PIDATA_GENERIC *piData, uint8_t { nBytes += packQuaternion( orientation->orientation[n], &buffer[nBytes] ); } + *nBytesWritten = nBytes; return IVAS_ERR_OK; } @@ -313,6 +313,7 @@ static ivas_error unpackOrientation( const uint8_t *buffer, uint32_t numDataByte piData->size = sizeof( IVAS_PIDATA_ORIENTATION ); unpackQuaternion( buffer, &( orientation->orientation ) ); + return IVAS_ERR_OK; } @@ -334,6 +335,7 @@ static ivas_error unpackISMOrientation( const uint8_t *buffer, uint32_t numDataB { unpackQuaternion( &buffer[4 * n], &( ism_orientation->orientation[n] ) ); } + for ( ; n < IVAS_MAX_NUM_OBJECTS; n++ ) { ism_orientation->orientation[n].w = 0.0f; @@ -982,6 +984,8 @@ static ivas_error unpackAudioFocusCommon( const uint8_t *buffer, uint32_t numDat return IVAS_ERR_OK; } + + static ivas_error packISMNum( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0; @@ -1031,6 +1035,7 @@ static ivas_error unpackISMNum( const uint8_t *buffer, uint32_t numDataBytes, IV return IVAS_ERR_OK; } + static ivas_error packISMID( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0, n; @@ -1092,6 +1097,7 @@ static ivas_error unpackISMID( const uint8_t *buffer, uint32_t numDataBytes, IVA return IVAS_ERR_OK; } + static ivas_error packPiLatency( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t typeBits; @@ -1157,6 +1163,7 @@ static ivas_error unpackPiLatency( const uint8_t *buffer, uint32_t numDataBytes, return IVAS_ERR_OK; } + static ivas_error packISMGain( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0, n, idx; @@ -1324,6 +1331,7 @@ static ivas_error unpackISMDistanceAttenuation( const uint8_t *buffer, uint32_t } return IVAS_ERR_OK; } + static ivas_error packISMDirectivity( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0, n; @@ -1596,7 +1604,6 @@ static ivas_error unpackReverseISMDirection( const uint8_t *buffer, uint32_t num return IVAS_ERR_OK; } - static const PACK_PI_FN packPiDataFuntions[IVAS_PI_MAX_ID] = { packOrientation, /* SCENE_ORIENTATION */ packOrientation, /* DEVICE_ORIENTATION_COMPENSATED */ diff --git a/lib_util/ivas_rtp_pi_data.h b/lib_util/ivas_rtp_pi_data.h index 4b2d8e927a89f9e30c1c626d7fe213d96369ea5f..47e0f070e3b182a4f8d57463c89de8efef132a24 100644 --- a/lib_util/ivas_rtp_pi_data.h +++ b/lib_util/ivas_rtp_pi_data.h @@ -215,7 +215,7 @@ typedef struct { size_t size; /* sizeof(IVAS_PIDATA_ISM_ID) */ uint32_t piDataType; /* IVAS_PI_ISM_ID */ - uint16_t numObjects; /* number of objects */ + uint16_t numObjects; /* number of objects */ uint8_t id[IVAS_MAX_NUM_OBJECTS]; /* 8-bit ISM id of object */ } IVAS_PIDATA_ISM_ID; @@ -224,7 +224,7 @@ typedef struct { size_t size; /* sizeof(IVAS_PIDATA_ISM_GAIN) */ uint32_t piDataType; /* IVAS_PI_ISM_GAIN */ - uint16_t numObjects; /* number of objects */ + uint16_t numObjects; /* number of objects */ int8_t dB[IVAS_MAX_NUM_OBJECTS]; /* ISM gain in dB per object [-96, +3] */ } IVAS_PIDATA_ISM_GAIN; @@ -233,7 +233,7 @@ typedef struct { size_t size; /* sizeof(IVAS_PIDATA_ISM_ORIENTATION) */ uint32_t piDataType; /* IVAS_PI_ISM_ORIENTATION */ - uint16_t numObjects; /* number of objects */ + uint16_t numObjects; /* number of objects */ IVAS_QUATERNION orientation[IVAS_MAX_NUM_OBJECTS]; /* Orientation of audio objects in ISM(s) */ } IVAS_PIDATA_ISM_ORIENTATION; @@ -242,7 +242,7 @@ typedef struct { size_t size; /* sizeof(IVAS_PIDATA_ISM_POSITION) */ uint32_t piDataType; /* IVAS_PI_ISM_POSITION */ - uint16_t numObjects; /* number of objects */ + uint16_t numObjects; /* number of objects */ IVAS_COORDINATE position[IVAS_MAX_NUM_OBJECTS]; /* Position of audio objects in ISM(s) */ } IVAS_PIDATA_ISM_POSITION; @@ -262,7 +262,7 @@ typedef struct { size_t size; /* sizeof(IVAS_PIDATA_ISM_ATTENUATION) */ uint32_t piDataType; /* IVAS_PI_ISM_DISTANCE_ATTENUATION */ - uint16_t numObjects; /* number of objects */ + uint16_t numObjects; /* number of objects */ IVAS_DIST_ATTEN distAtten[IVAS_MAX_NUM_OBJECTS]; /* Distance attenuation of audio objects */ } IVAS_PIDATA_ISM_ATTENUATION; @@ -282,7 +282,7 @@ typedef struct { size_t size; /* sizeof(IVAS_PIDATA_ISM_DIRECTIVITY) */ uint32_t piDataType; /* IVAS_PI_ISM_DIRECTIVITY */ - uint16_t numObjects; /* number of objects */ + uint16_t numObjects; /* number of objects */ IVAS_ISM_DIRECTIVITY directivity[IVAS_MAX_NUM_OBJECTS]; /* Directivity of audio objects */ } IVAS_PIDATA_ISM_DIRECTIVITY; @@ -420,7 +420,6 @@ typedef struct IVAS_QUATERNION orientation; /* orientation editing request for received ISM */ } IVAS_PIDATA_ISM_EDIT_ORIENTATION; - /* Editing request for ISM direction */ typedef struct { @@ -477,5 +476,4 @@ typedef struct pidata_ts_struct uint32_t timestamp; } PIDATA_TS; - #endif /* IVAS_RTP_PI_DATA_H */ diff --git a/lib_util/obj_edit_file_reader.h b/lib_util/obj_edit_file_reader.h index 9a9277d949da9a04c5e8d018dbc63e47b2b3f2aa..f1fe5ca3666a1a068464d9ada1ea2ca5f1805131 100644 --- a/lib_util/obj_edit_file_reader.h +++ b/lib_util/obj_edit_file_reader.h @@ -40,10 +40,10 @@ the United Nations Convention on Contracts on the International Sales of Goods. /*---------------------------------------------------------------------* * Constants ans structures *---------------------------------------------------------------------*/ -#define OBJ_EDIT_GAIN_MIN 0.0f /* -inf dB */ -#define OBJ_EDIT_GAIN_MAX 3.9810719f /* +12 dB */ -#define OBJ_EDIT_RADIUS_MAX 15.75f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */ +#define OBJ_EDIT_GAIN_MIN 0.0f /* -inf dB */ +#define OBJ_EDIT_GAIN_MAX 3.9810719f /* +12 dB */ +#define OBJ_EDIT_RADIUS_MAX 15.75f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */ typedef struct ObjectEditFileReader ObjectEditFileReader; typedef struct ReadObjectEditInfo ReadObjectEditInfo; diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index d7cf2cf19580b326bd0070a895d40a9c834560ba..b9bb2e5a609ade0167533ec651f1744a8badf162 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -38,6 +38,7 @@ #include "cmdl_tools.h" #include "ivas_cnst.h" + /*------------------------------------------------------------------------------------------* * PreProc Local Macros *------------------------------------------------------------------------------------------*/ @@ -2916,11 +2917,13 @@ ivas_error RenderConfigReader_read( return IVAS_ERR_OK; } + /*------------------------------------------------------------------------------------------* * RenderConfigReader_getAcousticEnvironmentCount() * * Gets number of acoustic environments available *------------------------------------------------------------------------------------------*/ + uint32_t RenderConfigReader_getAcousticEnvironmentCount( RenderConfigReader *pRenderConfigReader /* i : RenderConfigReader handle */ ) @@ -2928,11 +2931,13 @@ uint32_t RenderConfigReader_getAcousticEnvironmentCount( return pRenderConfigReader->nAE; } + /*------------------------------------------------------------------------------------------* * RenderConfigReader_getAcousticEnvironments() * * Gets all acoustic environments *------------------------------------------------------------------------------------------*/ + ivas_error RenderConfigReader_getAcousticEnvironments( RenderConfigReader *pRenderConfigReader, /* i : RenderConfigReader handle */ IVAS_ROOM_ACOUSTICS_CONFIG_DATA **ppAcEnv /* o : Acoustic environment array pointer */ @@ -2996,6 +3001,7 @@ ivas_error RenderConfigReader_getAcousticEnvironments( return IVAS_ERR_OK; } + /*------------------------------------------------------------------------------------------* * RenderConfigReader_getAcousticEnvironment() * diff --git a/lib_util/render_config_reader.h b/lib_util/render_config_reader.h index 885f9ceb1796fbae297eb314937427f2609366be..9530adf8efc9612a95862d6490bff05bc8a514d9 100644 --- a/lib_util/render_config_reader.h +++ b/lib_util/render_config_reader.h @@ -53,7 +53,7 @@ ivas_error RenderConfigReader_open( /* Get number of acoustic environments */ uint32_t RenderConfigReader_getAcousticEnvironmentCount( - RenderConfigReader *pRenderConfigReader /* i : RenderConfigReader handle */ + RenderConfigReader *pRenderConfigReader /* i : RenderConfigReader handle */ ); /* Get all acoustic environments */