Loading lib_dec/lib_dec.c +3 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,9 @@ ivas_error IVAS_DEC_Open( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS decoder handle" ); } hIvasDec = *phIvasDec; hIvasDec->hVoIP = NULL; hIvasDec->apaExecBuffer = NULL; hIvasDec->hTimeScaler = NULL; Loading Loading @@ -205,7 +207,7 @@ ivas_error IVAS_DEC_Open( st_ivas = hIvasDec->st_ivas; /* initialize Decoder Config. handle */ init_decoder_config( hIvasDec->st_ivas->hDecoderConfig ); init_decoder_config( st_ivas->hDecoderConfig ); /* initialize pointers to handles to NULL */ ivas_initialize_handles_dec( st_ivas ); Loading lib_rend/lib_rend.c +19 −18 Original line number Diff line number Diff line Loading @@ -51,19 +51,16 @@ /* Maximum buffer length (per channel) in samples. * Keep this separate from L_FRAME48k in case we want to support different size later */ #define MAX_BUFFER_LENGTH_PER_CHANNEL ( L_FRAME48k ) #ifdef SPLIT_REND_WITH_HEAD_ROT #define MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL ( MAX_BUFFER_LENGTH_PER_CHANNEL * 2 ) #endif /* Maximum buffer length (total) in samples. */ /* Maximum buffer length (total) in samples. */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #ifdef SPLIT_REND_WITH_HEAD_ROT /* Split rendering buffer lengths */ #define MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL ( MAX_BUFFER_LENGTH_PER_CHANNEL * 2 ) #define MAX_CLDFB_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #define MAX_BIN_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) #define MAX_CLDFB_BIN_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) #else #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #endif #define MAX_BIN_DELAY_SAMPLES 150 /* Maximum supported rendering latency for binaural IRs */ Loading Loading @@ -210,9 +207,8 @@ typedef struct int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */ IVAS_REND_BitstreamBuffer *hBits; } input_split_post_rend; #endif #endif typedef struct { input_base base; Loading Loading @@ -282,6 +278,7 @@ static ivas_error initMasaExtRenderer( input_masa *inputMasa, const AUDIO_CONFIG static void freeMasaExtRenderer( MASA_EXT_REND_HANDLE *hMasaExtRendOut ); /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ Loading Loading @@ -495,6 +492,7 @@ static void accumulate2dArrayToBuffer( return; } /*-------------------------------------------------------------------* * limitRendererOutput() * Loading Loading @@ -548,6 +546,7 @@ static int32_t limitRendererOutput( } #endif /*-------------------------------------------------------------------* * validateOutputAudioConfig() * Loading Loading @@ -2059,6 +2058,7 @@ static ivas_error updateMcPanGainsForAmbiOut( { ++ch_out; } ivas_dirac_dec_get_response( (int16_t) spkAzi[ch_in], (int16_t) spkEle[ch_in], inputMc->panGains[ch_out], outAmbiOrder ); } } Loading Loading @@ -2135,6 +2135,7 @@ static ivas_error updateMcPanGains( default: return IVAS_ERR_INVALID_OUTPUT_FORMAT; } /* Check error here to keep switch statement more compact */ if ( error != IVAS_ERR_OK ) { Loading Loading @@ -3285,6 +3286,7 @@ ivas_error IVAS_REND_Open( hIvasRend->hHrtfs.hHrtfTD = NULL; hIvasRend->hHrtfs.hSetOfHRTF = NULL; hIvasRend->hHrtfs.hHrtfStatistics = NULL; if ( asHrtfBinary ) { if ( ( error = ivas_HRTF_binary_open( &( hIvasRend->hHrtfs.hHrtfTD ) ) ) != IVAS_ERR_OK ) Loading Loading @@ -5671,6 +5673,7 @@ static ivas_error renderIsmToMc( push_wmops( "renderIsmToMc" ); position_changed = !ismInput->firstFrameRendered || checkObjectPositionChanged( &ismInput->currentPos, &ismInput->previousPos ); if ( *ismInput->base.ctx.pOutConfig == IVAS_AUDIO_CONFIG_STEREO ) { if ( ismInput->nonDiegeticPan ) Loading Loading @@ -8814,7 +8817,6 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( DIRAC_REND_HANDLE hDirACRend; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; error = IVAS_ERR_OK; hDirACRend = NULL; output_Fs = *( inputMasa->base.ctx.pOutSampleRate ); Loading Loading @@ -9108,7 +9110,7 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( } /* output synthesis */ if ( ( ivas_dirac_dec_output_synthesis_open( hSpatParamRendCom, hDirACRend, RENDERER_DIRAC, nchan_transport, output_Fs, 0 ) ) != IVAS_ERR_OK ) if ( ( error = ivas_dirac_dec_output_synthesis_open( hSpatParamRendCom, hDirACRend, RENDERER_DIRAC, nchan_transport, output_Fs, 0 ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -9156,7 +9158,7 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( inputMasa->hMasaExtRend->hDirACRend = hDirACRend; return error; return IVAS_ERR_OK; } Loading @@ -9179,7 +9181,6 @@ static ivas_error ivas_masa_ext_rend_parambin_init( int16_t pos_idx; #endif error = IVAS_ERR_OK; phHrtfParambin = inputMasa->hMasaExtRend->hHrtfParambin; /* Set common variables and defaults */ Loading Loading @@ -9309,7 +9310,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( inputMasa->hMasaExtRend->hDiracDecBin = hDiracDecBin; #endif return error; return IVAS_ERR_OK; } Loading Loading
lib_dec/lib_dec.c +3 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,9 @@ ivas_error IVAS_DEC_Open( { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for IVAS decoder handle" ); } hIvasDec = *phIvasDec; hIvasDec->hVoIP = NULL; hIvasDec->apaExecBuffer = NULL; hIvasDec->hTimeScaler = NULL; Loading Loading @@ -205,7 +207,7 @@ ivas_error IVAS_DEC_Open( st_ivas = hIvasDec->st_ivas; /* initialize Decoder Config. handle */ init_decoder_config( hIvasDec->st_ivas->hDecoderConfig ); init_decoder_config( st_ivas->hDecoderConfig ); /* initialize pointers to handles to NULL */ ivas_initialize_handles_dec( st_ivas ); Loading
lib_rend/lib_rend.c +19 −18 Original line number Diff line number Diff line Loading @@ -51,19 +51,16 @@ /* Maximum buffer length (per channel) in samples. * Keep this separate from L_FRAME48k in case we want to support different size later */ #define MAX_BUFFER_LENGTH_PER_CHANNEL ( L_FRAME48k ) #ifdef SPLIT_REND_WITH_HEAD_ROT #define MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL ( MAX_BUFFER_LENGTH_PER_CHANNEL * 2 ) #endif /* Maximum buffer length (total) in samples. */ /* Maximum buffer length (total) in samples. */ #ifdef SPLIT_REND_WITH_HEAD_ROT #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #ifdef SPLIT_REND_WITH_HEAD_ROT /* Split rendering buffer lengths */ #define MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL ( MAX_BUFFER_LENGTH_PER_CHANNEL * 2 ) #define MAX_CLDFB_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #define MAX_BIN_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) #define MAX_CLDFB_BIN_BUFFER_LENGTH ( MAX_CLDFB_BUFFER_LENGTH_PER_CHANNEL * BINAURAL_CHANNELS ) #else #define MAX_BUFFER_LENGTH ( MAX_BUFFER_LENGTH_PER_CHANNEL * MAX_INPUT_CHANNELS ) #endif #define MAX_BIN_DELAY_SAMPLES 150 /* Maximum supported rendering latency for binaural IRs */ Loading Loading @@ -210,9 +207,8 @@ typedef struct int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */ IVAS_REND_BitstreamBuffer *hBits; } input_split_post_rend; #endif #endif typedef struct { input_base base; Loading Loading @@ -282,6 +278,7 @@ static ivas_error initMasaExtRenderer( input_masa *inputMasa, const AUDIO_CONFIG static void freeMasaExtRenderer( MASA_EXT_REND_HANDLE *hMasaExtRendOut ); /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ Loading Loading @@ -495,6 +492,7 @@ static void accumulate2dArrayToBuffer( return; } /*-------------------------------------------------------------------* * limitRendererOutput() * Loading Loading @@ -548,6 +546,7 @@ static int32_t limitRendererOutput( } #endif /*-------------------------------------------------------------------* * validateOutputAudioConfig() * Loading Loading @@ -2059,6 +2058,7 @@ static ivas_error updateMcPanGainsForAmbiOut( { ++ch_out; } ivas_dirac_dec_get_response( (int16_t) spkAzi[ch_in], (int16_t) spkEle[ch_in], inputMc->panGains[ch_out], outAmbiOrder ); } } Loading Loading @@ -2135,6 +2135,7 @@ static ivas_error updateMcPanGains( default: return IVAS_ERR_INVALID_OUTPUT_FORMAT; } /* Check error here to keep switch statement more compact */ if ( error != IVAS_ERR_OK ) { Loading Loading @@ -3285,6 +3286,7 @@ ivas_error IVAS_REND_Open( hIvasRend->hHrtfs.hHrtfTD = NULL; hIvasRend->hHrtfs.hSetOfHRTF = NULL; hIvasRend->hHrtfs.hHrtfStatistics = NULL; if ( asHrtfBinary ) { if ( ( error = ivas_HRTF_binary_open( &( hIvasRend->hHrtfs.hHrtfTD ) ) ) != IVAS_ERR_OK ) Loading Loading @@ -5671,6 +5673,7 @@ static ivas_error renderIsmToMc( push_wmops( "renderIsmToMc" ); position_changed = !ismInput->firstFrameRendered || checkObjectPositionChanged( &ismInput->currentPos, &ismInput->previousPos ); if ( *ismInput->base.ctx.pOutConfig == IVAS_AUDIO_CONFIG_STEREO ) { if ( ismInput->nonDiegeticPan ) Loading Loading @@ -8814,7 +8817,6 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( DIRAC_REND_HANDLE hDirACRend; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; error = IVAS_ERR_OK; hDirACRend = NULL; output_Fs = *( inputMasa->base.ctx.pOutSampleRate ); Loading Loading @@ -9108,7 +9110,7 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( } /* output synthesis */ if ( ( ivas_dirac_dec_output_synthesis_open( hSpatParamRendCom, hDirACRend, RENDERER_DIRAC, nchan_transport, output_Fs, 0 ) ) != IVAS_ERR_OK ) if ( ( error = ivas_dirac_dec_output_synthesis_open( hSpatParamRendCom, hDirACRend, RENDERER_DIRAC, nchan_transport, output_Fs, 0 ) ) != IVAS_ERR_OK ) { return error; } Loading Loading @@ -9156,7 +9158,7 @@ static ivas_error ivas_masa_ext_rend_dirac_rend_init( inputMasa->hMasaExtRend->hDirACRend = hDirACRend; return error; return IVAS_ERR_OK; } Loading @@ -9179,7 +9181,6 @@ static ivas_error ivas_masa_ext_rend_parambin_init( int16_t pos_idx; #endif error = IVAS_ERR_OK; phHrtfParambin = inputMasa->hMasaExtRend->hHrtfParambin; /* Set common variables and defaults */ Loading Loading @@ -9309,7 +9310,7 @@ static ivas_error ivas_masa_ext_rend_parambin_init( inputMasa->hMasaExtRend->hDiracDecBin = hDiracDecBin; #endif return error; return IVAS_ERR_OK; } Loading