Skip to content
......@@ -795,7 +795,7 @@ static void ivas_SplitRenderer_code_md_base2(
const int16_t bands_pitch,
const int16_t pred_real_bands_roll,
const int16_t pred_imag_bands_roll,
ivas_split_rend_bits_t *pBits )
IVAS_SPLIT_REND_BITS_HANDLE pBits )
{
int16_t pos_idx, b, ch1, ch2, sf_idx;
int16_t min_pred_idx, min_gd_idx, min_p_gd_idx, pred_code_len, gd_code_len, p_gd_code_len, num_poses;
......@@ -941,7 +941,7 @@ static void ivas_SplitRenderer_code_md_huff(
const int16_t bands_pitch,
const int16_t pred_real_bands_roll,
const int16_t pred_imag_bands_roll,
ivas_split_rend_bits_t *pBits )
IVAS_SPLIT_REND_BITS_HANDLE pBits )
{
int16_t pos_idx, b, ch1, ch2, sf_idx, num_poses;
int16_t sym_adj_idx[BINAURAL_CHANNELS][BINAURAL_CHANNELS];
......@@ -1080,7 +1080,7 @@ static void ivas_SplitRenderer_quant_code(
const BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend,
const IVAS_QUATERNION headPosition,
MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int16_t low_res_pre_rend_rot,
const int32_t target_md_bits )
{
......@@ -1405,7 +1405,7 @@ void ivas_rend_CldfbSplitPreRendProcess(
MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,
float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int32_t target_md_bits,
const int16_t low_res_pre_rend_rot )
{
......@@ -2046,7 +2046,7 @@ void ivas_split_renderer_close(
static ivas_error splitRendLc3plusEncodeAndWrite(
SPLIT_REND_WRAPPER *hSplitBin,
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int32_t SplitRendBitRate,
float *in[] )
{
......@@ -2099,7 +2099,7 @@ static ivas_error ivas_renderMultiTDBinToSplitBinaural(
const IVAS_QUATERNION headPosition,
const int32_t SplitRendBitRate,
const int16_t codec_frame_size_ms,
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int16_t max_bands,
float *in[],
const int16_t low_res_pre_rend_rot,
......@@ -2322,7 +2322,7 @@ ivas_error ivas_renderMultiBinToSplitBinaural(
const int32_t SplitRendBitRate,
IVAS_SPLIT_REND_CODEC splitCodec,
int16_t codec_frame_size_ms,
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
const int16_t max_bands,
......
......@@ -92,7 +92,7 @@ void ivas_mat_mult_2by2_complex(
*------------------------------------------------------------------------*/
void ivas_split_rend_bitstream_init(
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int32_t buf_len_bytes,
uint8_t *pbuf )
{
......@@ -373,7 +373,7 @@ void ivas_SplitRenderer_getdiagdiff(
*------------------------------------------------------------------------*/
int32_t ivas_split_rend_bitstream_read_int32(
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int32_t bits )
{
int32_t val, k, bit_val;
......@@ -403,7 +403,7 @@ int32_t ivas_split_rend_bitstream_read_int32(
*------------------------------------------------------------------------*/
void ivas_split_rend_bitstream_write_int32(
ivas_split_rend_bits_t *pBits,
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int32_t val,
const int32_t bits )
{
......
......@@ -668,6 +668,7 @@ typedef struct ivas_external_orientation_struct
int16_t numFramesToTargetOrientation[MAX_PARAM_SPATIAL_SUBFRAMES]; /* Number of frames until target orientation is reached */
IVAS_QUATERNION Quaternions[MAX_PARAM_SPATIAL_SUBFRAMES]; /* External orientation in quaternions */
int16_t num_subframes;
} EXTERNAL_ORIENTATION_DATA, *EXTERNAL_ORIENTATION_HANDLE;
/*----------------------------------------------------------------------------------*
......@@ -706,6 +707,7 @@ typedef struct ivas_combined_orientation_struct
int8_t isExtOrientationFrozen;
int8_t isHeadRotationFrozen;
int16_t num_subframes;
} COMBINED_ORIENTATION_DATA, *COMBINED_ORIENTATION_HANDLE;
......@@ -829,8 +831,8 @@ typedef struct
float soundspeed;
float air_coeff;
shoebox_config_t cal;
} shoebox_obj_t;
} shoebox_obj_t;
typedef struct shoebox_data_t
{
......@@ -839,7 +841,6 @@ typedef struct shoebox_data_t
} shoebox_data_t;
typedef struct
{
uint16_t n_sources;
......@@ -851,6 +852,7 @@ typedef struct
} shoebox_output_t;
/*----------------------------------------------------------------------------------*
* Reflections structure
*----------------------------------------------------------------------------------*/
......@@ -1072,8 +1074,8 @@ typedef struct TDREND_SRC_REND_s
float SrcGainMax_p[SPAT_BIN_MAX_INPUT_CHANNELS];
float DirGain_p[SPAT_BIN_MAX_INPUT_CHANNELS];
float DistGain_p[SPAT_BIN_MAX_INPUT_CHANNELS];
} TDREND_SRC_REND_t;
} TDREND_SRC_REND_t;
/* Source spatial parameters */
typedef struct
......@@ -1106,6 +1108,7 @@ typedef struct
float mem_hrf_right[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1];
float Gain;
float prevGain;
} TDREND_SRC_t;
/* Top level TD binaural renderer handle */
......@@ -1224,7 +1227,7 @@ typedef struct ivas_binaural_rendering_struct
#endif
/*------------------------------------------------------------------------------------------*
* HRTF structures - htrfs from binary files
* HRTF structures - hrtfs from binary files
*------------------------------------------------------------------------------------------*/
typedef struct ivas_hrtfs_crend_structure
......@@ -1237,9 +1240,7 @@ typedef struct ivas_hrtfs_crend_structure
} HRTFS_CREND, *HRTFS_CREND_HANDLE;
/* Fastconv binaural data structure */
typedef struct ivas_hrtfs_fastconv_struct
{
float FASTCONV_HOA3_latency_s;
......@@ -1279,7 +1280,6 @@ typedef struct ivas_hrtfs_fastconv_struct
} HRTFS_FASTCONV, *HRTFS_FASTCONV_HANDLE;
typedef struct ivas_hrtfs_parambin_struct
{
float hrtfShCoeffsRe[BINAURAL_CHANNELS][HRTF_SH_CHANNELS][HRTF_NUM_BINS];
......@@ -1512,7 +1512,6 @@ typedef struct ivas_LS_setupconversion_struct
} LSSETUP_CONVERSION_STRUCT, *LSSETUP_CONVERSION_HANDLE;
typedef struct ivas_LS_setupconversion_matrix
{
int16_t index;
......@@ -1562,6 +1561,7 @@ typedef struct
int32_t binaural_latency_ns;
BINAURAL_RENDERER_HANDLE hCldfbRend;
HRTFS_FASTCONV_HANDLE hHrtfFastConv;
} CLDFB_REND_WRAPPER;
#endif
......
......@@ -197,7 +197,6 @@ typedef struct
#else
rotation_gains rot_gains_prev;
#endif
float *bufferData;
DIRAC_ANA_HANDLE hDirAC;
} input_sba;
......@@ -342,7 +341,7 @@ static float *getSmplPtr(
#ifdef SPLIT_REND_WITH_HEAD_ROT
static void convertBitsBufferToInternalBitsBuff(
const IVAS_REND_BitstreamBuffer outBits,
ivas_split_rend_bits_t *hBits )
IVAS_SPLIT_REND_BITS_HANDLE hBits )
{
hBits->bits_buf = outBits.bits;
hBits->bits_read = outBits.config.bitsRead;
......@@ -357,7 +356,7 @@ static void convertBitsBufferToInternalBitsBuff(
static void convertInternalBitsBuffToBitsBuffer(
IVAS_REND_BitstreamBuffer *hOutBits,
const ivas_split_rend_bits_t bits )
const IVAS_SPLIT_REND_BITS_DATA bits )
{
hOutBits->bits = bits.bits_buf;
hOutBits->config.bitsRead = bits.bits_read;
......@@ -433,7 +432,7 @@ static void accumulateCLDFBArrayToBuffer(
return;
}
#endif /* SPLIT_REND_WITH_HEAD_ROT */
#endif
static void copyBufferTo2dArray(
const IVAS_REND_AudioBuffer buffer,
......@@ -1438,6 +1437,7 @@ static ivas_error setRendInputActiveIsm(
{
return error;
}
if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
{
if ( ( error = ivas_reverb_open( &( inputIsm->hReverb ), outConfig, NULL, inputIsm->tdRendWrapper.hBinRendererTd->HrFiltSet_p->lr_energy_and_iac, hRendCfg, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
......@@ -1460,11 +1460,7 @@ static ivas_error setRendInputActiveIsm(
}
else if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR )
{
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate, rendCtx.pSplitRendWrapper->multiBinPoseData.num_poses ) ) != IVAS_ERR_OK )
#else
if ( ( error = ivas_rend_openCrend( &inputIsm->crendWrapper, IVAS_AUDIO_CONFIG_7_1_4, outConfig, hRendCfg, NULL, *rendCtx.pOutSampleRate ) ) != IVAS_ERR_OK )
#endif
{
return error;
}
......@@ -1688,9 +1684,7 @@ static ivas_error getRendInputNumChannels(
int16_t *numInChannels )
{
/* Using a void pointer for this function to be reusable for any input type (input_ism, input_mc, input_sba).
Assumptions:
- input_base is always the first member in the input struct
*/
Assumptions: - input_base is always the first member in the input struct */
ivas_error error;
const input_base *pInputBase;
......@@ -1901,19 +1895,13 @@ static ivas_error updateLfePanGainsForMcOut(
for ( i = 0; i < numLfeIn; i++ )
{
/* panning gains */
if ( ( error = getEfapGains( *inputMc->base.ctx.pEfapOutWrapper,
inputMc->lfeRouting.lfeOutputAzimuth,
inputMc->lfeRouting.lfeOutputElevation,
inputMc->lfeRouting.lfePanMtx[i] ) ) != IVAS_ERR_OK )
if ( ( error = getEfapGains( *inputMc->base.ctx.pEfapOutWrapper, inputMc->lfeRouting.lfeOutputAzimuth, inputMc->lfeRouting.lfeOutputElevation, inputMc->lfeRouting.lfePanMtx[i] ) ) != IVAS_ERR_OK )
{
return error;
}
/* linear input gain */
v_multc( inputMc->lfeRouting.lfePanMtx[i],
inputMc->lfeRouting.lfeInputGain,
inputMc->lfeRouting.lfePanMtx[i],
numOutChannels );
v_multc( inputMc->lfeRouting.lfePanMtx[i], inputMc->lfeRouting.lfeInputGain, inputMc->lfeRouting.lfePanMtx[i], numOutChannels );
}
return error;
......@@ -1945,16 +1933,10 @@ static ivas_error updateLfePanGainsForAmbiOut(
for ( i = 0; i < numLfeIn; i++ )
{
/* panning gains */
ivas_dirac_dec_get_response( (int16_t) inputMc->lfeRouting.lfeOutputAzimuth,
(int16_t) inputMc->lfeRouting.lfeOutputElevation,
inputMc->lfeRouting.lfePanMtx[i],
outAmbiOrder );
ivas_dirac_dec_get_response( (int16_t) inputMc->lfeRouting.lfeOutputAzimuth, (int16_t) inputMc->lfeRouting.lfeOutputElevation, inputMc->lfeRouting.lfePanMtx[i], outAmbiOrder );
/* linear input gain */
v_multc( inputMc->lfeRouting.lfePanMtx[i],
inputMc->lfeRouting.lfeInputGain,
inputMc->lfeRouting.lfePanMtx[i],
IVAS_MAX_OUTPUT_CHANNELS );
v_multc( inputMc->lfeRouting.lfePanMtx[i], inputMc->lfeRouting.lfeInputGain, inputMc->lfeRouting.lfePanMtx[i], IVAS_MAX_OUTPUT_CHANNELS );
}
return error;
......@@ -2216,12 +2198,11 @@ static ivas_error initMcBinauralRendering(
/* if we need to use TD renderer and CREND was open, close it */
if ( useTDRend )
{
ivas_rend_closeCrend( &inputMc->crendWrapper
#ifdef SPLIT_REND_WITH_HEAD_ROT
,
inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses
ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses );
#else
ivas_rend_closeCrend( &inputMc->crendWrapper );
#endif
);
}
if ( !reconfigureFlag || ( !useTDRend && outConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && inputMc->hReverb != NULL ) )
......@@ -2510,7 +2491,6 @@ static void clearInputMc(
efap_free_data( &inputMc->efapInWrapper.hEfap );
}
#ifdef SPLIT_REND_WITH_HEAD_ROT
ivas_rend_closeCrend( &inputMc->crendWrapper, inputMc->base.ctx.pSplitRendWrapper->multiBinPoseData.num_poses );
#else
......@@ -2965,12 +2945,10 @@ static ivas_error initMasaDummyDecForMcOut(
int16_t numCldfbSyntheses;
int16_t i;
DecoderDummy *decDummy;
decDummy = inputMasa->decDummy;
decDummy = inputMasa->decDummy;
decDummy->hDecoderConfig->output_config = outConfig;
decDummy->sba_analysis_order = 1;
decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */
decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */
......@@ -3049,16 +3027,14 @@ static ivas_error initMasaDummyDecForSbaOut(
DecoderDummy *decDummy;
decDummy = inputMasa->decDummy;
decDummy->hDecoderConfig->output_config = outConfig;
decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */
decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */
decDummy->sba_analysis_order = 1;
ivas_output_init( &( decDummy->hOutSetup ), outConfig );
ivas_output_init( &( decDummy->hIntSetup ), outConfig );
decDummy->renderer_type = RENDERER_DIRAC;
decDummy->ivas_format = MASA_FORMAT;
decDummy->transport_config = IVAS_AUDIO_CONFIG_INVALID;
......@@ -3118,16 +3094,16 @@ static ivas_error initMasaDummyDecForBinauralOut(
decDummy = inputMasa->decDummy;
decDummy->hDecoderConfig->output_config = outConfig;
decDummy->sba_analysis_order = 1;
decDummy->hDecoderConfig->ivas_total_brate = IVAS_512k; /* Todo Nokia: This is preventing initialization of 2TC as 1TC, should be fixed properly in ivas_dirac_dec_config() */
decDummy->mc_mode = MC_MODE_NONE; /* Todo Nokia: This should be also refactored in such way that it is not checked if not in MC mode */
ivas_output_init( &( decDummy->hOutSetup ), outConfig );
if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL
#ifdef SPLIT_REND_WITH_HEAD_ROT
|| outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || outConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
#else
if ( outConfig == IVAS_AUDIO_CONFIG_BINAURAL )
#endif
)
{
decDummy->renderer_type = RENDERER_BINAURAL_PARAMETRIC;
}
......@@ -3204,10 +3180,11 @@ static DecoderDummy *initDecoderDummy(
const int32_t sampleRate,
const int16_t numTransChannels,
const AUDIO_CONFIG outConfig,
const uint8_t enableRenderConfig
#ifdef SPLIT_REND_WITH_HEAD_ROT
,
const uint8_t enableRenderConfig,
const SPLIT_REND_WRAPPER *pSplitRendWrapper
#else
const uint8_t enableRenderConfig
#endif
)
{
......@@ -3246,6 +3223,7 @@ static DecoderDummy *initDecoderDummy(
}
}
#endif
decDummy->hEFAPdata = NULL;
decDummy->hCrendWrapper = NULL;
decDummy->hHrtfTD = NULL;
......@@ -3253,6 +3231,7 @@ static DecoderDummy *initDecoderDummy(
decDummy->hoa_dec_mtx = NULL;
decDummy->hVBAPdata = NULL; // note: not used at the moment
decDummy->hMasa = NULL;
#ifdef SPLIT_REND_WITH_HEAD_ROT
for ( i = 0; i < MAX_HEAD_ROT_POSES; i++ )
{
......@@ -3261,6 +3240,7 @@ static DecoderDummy *initDecoderDummy(
#else
decDummy->hDiracDecBin = NULL;
#endif
decDummy->hDirACRend = NULL;
decDummy->hSpatParamRendCom = NULL;
decDummy->hQMetaData = NULL;
......@@ -3421,10 +3401,12 @@ static void freeDecoderDummy(
}
free( pDecDummy->hHeadTrackData );
}
if ( pDecDummy->hExtOrientationData != NULL )
{
free( pDecDummy->hExtOrientationData );
}
if ( pDecDummy->hCombinedOrientationData != NULL )
{
free( pDecDummy->hCombinedOrientationData );
......@@ -4346,14 +4328,9 @@ ivas_error IVAS_REND_ConfigureCustomInputLoudspeakerLayout(
* set for the MC input. */
inputMc->customLsInput = makeCustomLsSetup( layout );
inputMc->lfeRouting = defaultLfeRouting( inputMc->base.inConfig,
inputMc->customLsInput,
hIvasRend->outputConfig,
*inputMc->base.ctx.pCustomLsOut );
inputMc->lfeRouting = defaultLfeRouting( inputMc->base.inConfig, inputMc->customLsInput, hIvasRend->outputConfig, *inputMc->base.ctx.pCustomLsOut );
if ( ( error = initEfap( &inputMc->efapInWrapper,
inputMc->base.inConfig,
&inputMc->customLsInput ) ) != IVAS_ERR_OK )
if ( ( error = initEfap( &inputMc->efapInWrapper, inputMc->base.inConfig, &inputMc->customLsInput ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -4805,6 +4782,7 @@ ivas_error IVAS_REND_FeedInputAudio(
{
return error;
}
if ( ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_MASA1 || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_MASA2 ) && inputBase->inConfig == IVAS_AUDIO_CONFIG_OBA )
{
numInputChannels = (int16_t) hIvasRend->inputsIsm[0].total_num_objects;
......@@ -5174,9 +5152,10 @@ ivas_error IVAS_REND_SetHeadRotation(
const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */
const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */
#ifdef SPLIT_REND_WITH_HEAD_ROT
IVAS_SPLIT_REND_ROT_AXIS rot_axis,
const IVAS_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering */
#endif
const int16_t sf_idx )
const int16_t sf_idx /* i : subframe index */
)
{
int16_t i;
IVAS_QUATERNION rotQuat;
......@@ -5196,17 +5175,15 @@ ivas_error IVAS_REND_SetHeadRotation(
hIvasRend->headRotData.headRotEnabled = 1;
/* reconfigure binaural rendering to allocate
the necessary renderers and free unused ones */
/* reconfigure binaural rendering to allocate the necessary renderers and free unused ones */
for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
{
if ( hIvasRend->inputsMc[i].base.inConfig != IVAS_AUDIO_CONFIG_INVALID )
{
initMcBinauralRendering( &hIvasRend->inputsMc[i],
hIvasRend->inputsMc[i].base.inConfig,
hIvasRend->outputConfig,
hIvasRend->hRendererConfig,
TRUE );
if ( ( error = initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, TRUE ) ) != IVAS_ERR_OK )
{
return error;
}
}
}
......@@ -5246,6 +5223,7 @@ ivas_error IVAS_REND_DisableHeadRotation(
)
{
int16_t i;
ivas_error error;
/* Validate function arguments */
if ( hIvasRend == NULL )
......@@ -5255,19 +5233,18 @@ ivas_error IVAS_REND_DisableHeadRotation(
hIvasRend->headRotData.headRotEnabled = 0;
/* reconfigure binaural rendering to allocate
the necessary renderers and free unused ones */
/* reconfigure binaural rendering to allocate the necessary renderers and free unused ones */
if ( getAudioConfigType( hIvasRend->outputConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL )
{
for ( i = 0; i < RENDERER_MAX_MC_INPUTS; ++i )
{
if ( hIvasRend->inputsMc[i].base.inConfig != IVAS_AUDIO_CONFIG_INVALID )
{
initMcBinauralRendering( &hIvasRend->inputsMc[i],
hIvasRend->inputsMc[i].base.inConfig,
hIvasRend->outputConfig,
hIvasRend->hRendererConfig,
TRUE );
if ( ( error = initMcBinauralRendering( &hIvasRend->inputsMc[i], hIvasRend->inputsMc[i].base.inConfig, hIvasRend->outputConfig, hIvasRend->hRendererConfig, TRUE ) ) != IVAS_ERR_OK )
{
return error;
}
}
}
}
......@@ -5631,7 +5608,6 @@ static ivas_error rotateFrameMc(
ivas_error error;
push_wmops( "rotateFrameMc" );
if ( ( error = chooseCrossfade( headRotData, &crossfade ) ) != IVAS_ERR_OK )
{
return error;
......@@ -5744,7 +5720,6 @@ static ivas_error rotateFrameMc(
}
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -6585,7 +6560,6 @@ static ivas_error renderMcToBinaural(
}
push_wmops( "renderMcToBinaural" );
inConfig = mcInput->base.inConfig;
hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData;
......@@ -6621,13 +6595,11 @@ static ivas_error renderMcToBinaural(
tmpRotBuffer.data = malloc( tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels * sizeof( float ) );
set_zero( tmpRotBuffer.data, tmpRotBuffer.config.numSamplesPerChannel * tmpRotBuffer.config.numChannels );
if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData,
#ifdef SPLIT_REND_WITH_HEAD_ROT
mcInput->rot_gains_prev[0],
if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev[0], mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ) != IVAS_ERR_OK )
#else
mcInput->rot_gains_prev,
if ( ( error = rotateFrameMc( mcInput->base.inputBuffer, mcInput->base.inConfig, &mcInput->customLsInput, mcInput->base.ctx.pHeadRotData, mcInput->base.ctx.pCombinedOrientationData, mcInput->rot_gains_prev, mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ) != IVAS_ERR_OK )
#endif
mcInput->efapInWrapper.hEfap, tmpRotBuffer ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -6666,7 +6638,6 @@ static ivas_error renderMcToBinaural(
}
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -6692,7 +6663,6 @@ static ivas_error renderMcToBinauralRoom(
}
push_wmops( "renderMcToBinauralRoom" );
inConfig = mcInput->base.inConfig;
hCombinedOrientationData = mcInput->base.ctx.pCombinedOrientationData;
......@@ -6772,7 +6742,6 @@ static ivas_error renderMcToBinauralRoom(
}
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -6795,7 +6764,6 @@ static ivas_error renderMcCustomLsToBinauralRoom(
int16_t subframe_idx;
push_wmops( "renderMcCustomLsToBinauralRoom" );
tmpRotBuffer = outAudio; /* avoid compilation warning */
for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ )
......@@ -6885,7 +6853,6 @@ static ivas_error renderMcCustomLsToBinauralRoom(
free( tmpMcBuffer.data );
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -6898,7 +6865,6 @@ static void renderMcToMc(
IVAS_REND_AudioBuffer inAudio;
push_wmops( "renderMcToMc" );
inAudio = mcInput->base.inputBuffer;
for ( i = 0; i < inAudio.config.numChannels; ++i )
......@@ -6907,7 +6873,6 @@ static void renderMcToMc(
}
pop_wmops();
return;
}
......@@ -6920,7 +6885,6 @@ static void renderMcToSba(
IVAS_REND_AudioBuffer inAudio;
push_wmops( "renderMcToSba" );
inAudio = mcInput->base.inputBuffer;
for ( i = 0; i < inAudio.config.numChannels; ++i )
......@@ -6929,7 +6893,6 @@ static void renderMcToSba(
}
pop_wmops();
return;
}
......@@ -6941,7 +6904,6 @@ static void renderMcToMasa(
float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k];
push_wmops( "renderMcToMasa" );
copyBufferTo2dArray( mcInput->base.inputBuffer, tmpRendBuffer );
ivas_mcmasa_ana( mcInput->hMcMasa, tmpRendBuffer, mcInput->base.inputBuffer.config.numSamplesPerChannel, outAudio.config.numChannels, mcInput->base.inputBuffer.config.numChannels );
......@@ -6949,7 +6911,6 @@ static void renderMcToMasa(
accumulate2dArrayToBuffer( tmpRendBuffer, &outAudio );
pop_wmops();
return;
}
......@@ -6975,7 +6936,6 @@ static ivas_error renderMcToSplitBinaural(
COMBINED_ORIENTATION_HANDLE pCombinedOrientationDataLocal;
push_wmops( "renderMcToSplitBinaural" );
inConfig = mcInput->base.inConfig;
output_frame = mcInput->base.inputBuffer.config.numSamplesPerChannel;
......@@ -7045,8 +7005,7 @@ static ivas_error renderMcToSplitBinaural(
pCombinedOrientationDataLocal = &combinedOrientationDataLocal;
/* Render */
if ( ( error = ivas_td_binaural_renderer_ext( ( pos_idx == 0 ) ? &mcInput->tdRendWrapper : &mcInput->splitTdRendWrappers[pos_idx - 1], mcInput->base.inConfig, &mcInput->customLsInput, &pCombinedOrientationDataLocal,
NULL, mcInput->hReverb, 0, /* Ism Audio Metadata Delay Sync in ms for External Renderer */ *mcInput->base.ctx.pOutSampleRate, mcInput->base.inputBuffer.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK )
if ( ( error = ivas_td_binaural_renderer_ext( ( pos_idx == 0 ) ? &mcInput->tdRendWrapper : &mcInput->splitTdRendWrappers[pos_idx - 1], mcInput->base.inConfig, &mcInput->customLsInput, &pCombinedOrientationDataLocal, NULL, mcInput->hReverb, 0, /* Ism Audio Metadata Delay Sync in ms for External Renderer */ *mcInput->base.ctx.pOutSampleRate, mcInput->base.inputBuffer.config.numSamplesPerChannel, tmpRendBuffer ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -7079,8 +7038,7 @@ static ivas_error renderMcToSplitBinaural(
copyBufferTo2dArray( tmpRotBuffer, tmpRendBuffer );
/* call CREND (rotation already performed) */
if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, mcInput->base.inConfig, outConfig, NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate,
getNumSubframesInBuffer( &mcInput->base.inputBuffer, *mcInput->base.ctx.pOutSampleRate ), pos_idx ) ) != IVAS_ERR_OK )
if ( ( error = ivas_rend_crendProcess( mcInput->crendWrapper, mcInput->base.inConfig, outConfig, NULL, NULL, NULL, NULL, p_tmpRendBuffer, *mcInput->base.ctx.pOutSampleRate, getNumSubframesInBuffer( &mcInput->base.inputBuffer, *mcInput->base.ctx.pOutSampleRate ), pos_idx ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -7112,7 +7070,6 @@ static ivas_error renderMcToSplitBinaural(
accumulate2dArrayToBuffer( tmpSplitBinauralBuffer, &outAudio );
pop_wmops();
return IVAS_ERR_OK;
}
#endif
......@@ -7137,10 +7094,7 @@ static ivas_error renderInputMc(
mcInput->base.numNewSamplesPerChannel = 0;
/* Apply input gain to new audio */
v_multc( inAudio.data,
mcInput->base.gain,
inAudio.data,
inAudio.config.numSamplesPerChannel * inAudio.config.numChannels );
v_multc( inAudio.data, mcInput->base.gain, inAudio.data, inAudio.config.numSamplesPerChannel * inAudio.config.numChannels );
switch ( getAudioConfigType( outConfig ) )
{
......@@ -7222,7 +7176,6 @@ static void renderSbaToMc(
IVAS_REND_AudioBuffer inAudio;
push_wmops( "renderSbaToMc" );
inAudio = sbaInput->base.inputBuffer;
for ( i = 0; i < inAudio.config.numChannels; ++i )
......@@ -7231,7 +7184,6 @@ static void renderSbaToMc(
}
pop_wmops();
return;
}
......@@ -7244,7 +7196,6 @@ static void renderSbaToSba(
IVAS_REND_AudioBuffer inAudio;
push_wmops( "renderSbaToSba" );
inAudio = sbaInput->base.inputBuffer;
for ( i = 0; i < inAudio.config.numChannels; ++i )
......@@ -7253,14 +7204,13 @@ static void renderSbaToSba(
}
pop_wmops();
return;
}
#ifdef SPLIT_REND_WITH_HEAD_ROT
static ivas_error splitBinLc3plusDecode(
SPLIT_POST_REND_WRAPPER *hSplitBin,
ivas_split_rend_bits_t *bits,
IVAS_SPLIT_REND_BITS_HANDLE bits,
float outputBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k],
IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction )
{
......@@ -7269,7 +7219,6 @@ static ivas_error splitBinLc3plusDecode(
int32_t lc3plusBitrateId, lc3plusBitstreamSize;
push_wmops( "splitBinLc3plusDecode" );
assert( hSplitBin->hLc3plusDec != NULL );
/* Find next byte boundary */
......@@ -7292,7 +7241,6 @@ static ivas_error splitBinLc3plusDecode(
}
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -7309,7 +7257,7 @@ static ivas_error renderSplitBinauralWithPostRot(
float Cldfb_ImagBuffer_Binaural_5ms[MAX_PARAM_SPATIAL_SUBFRAMES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
IVAS_QUATERNION QuaternionsPost[MAX_PARAM_SPATIAL_SUBFRAMES];
int16_t sf_idx, ch_idx;
ivas_split_rend_bits_t bits;
IVAS_SPLIT_REND_BITS_DATA bits;
float tmpCrendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k];
float tmpCrendBuffer_sf[BINAURAL_CHANNELS][L_FRAME48k];
COMBINED_ORIENTATION_HANDLE pCombinedOrientationData;
......@@ -7354,9 +7302,6 @@ static ivas_error renderSplitBinauralWithPostRot(
config.samplerate = *splitBinInput->base.ctx.pOutSampleRate;
if ( ( error = IVAS_LC3PLUS_DEC_Open( config,
#ifdef LC3PLUS_DEC_ALLOW_DISABLE_CACHING
0 /* caching disabled */,
#endif
&splitBinInput->splitPostRendWrapper.hLc3plusDec ) ) != IVAS_ERR_OK )
{
return error;
......@@ -7555,7 +7500,6 @@ static ivas_error renderSplitBinauralWithPostRot(
accumulate2dArrayToBuffer( tmpCrendBuffer, &outAudio );
pop_wmops();
return error;
}
......@@ -7635,11 +7579,7 @@ static ivas_error renderSbaToMultiBinaural(
/* call CREND */
if ( ( error = ivas_rend_crendProcess( sbaInput->crendWrapper, sbaInput->base.inConfig, outConfig, NULL, NULL, NULL, NULL, p_tmpCrendBuffer, *sbaInput->base.ctx.pOutSampleRate,
getNumSubframesInBuffer( &sbaInput->base.inputBuffer, *sbaInput->base.ctx.pOutSampleRate ),
#ifdef SPLIT_REND_WITH_HEAD_ROT
pos_idx
#endif
) ) != IVAS_ERR_OK )
getNumSubframesInBuffer( &sbaInput->base.inputBuffer, *sbaInput->base.ctx.pOutSampleRate ), pos_idx ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -7720,7 +7660,6 @@ static ivas_error renderSbaToSplitBinaural(
}
pop_wmops();
return error;
}
#endif
......@@ -7741,7 +7680,6 @@ static ivas_error renderSbaToBinaural(
int16_t subframe_idx;
push_wmops( "renderSbaToBinaural" );
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( sbaInput->base.ctx.hhRendererConfig[0]->split_rend_config.rendererSelection == IVAS_SPLIT_REND_RENDERER_SELECTION_FASTCONV )
{
......@@ -7822,7 +7760,6 @@ static ivas_error renderSbaToBinaural(
}
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -7845,7 +7782,6 @@ static ivas_error renderSbaToBinauralRoom(
int16_t subframe_idx;
tmpRotBuffer = outAudio; /* avoid compilation warning */
push_wmops( "renderSbaToBinauralRoom" );
for ( i = 0; i < MAX_OUTPUT_CHANNELS; i++ )
......@@ -7930,7 +7866,6 @@ static ivas_error renderSbaToBinauralRoom(
free( tmpMcBuffer.data );
pop_wmops();
return IVAS_ERR_OK;
}
......@@ -7975,13 +7910,11 @@ static void renderSbaToMasa(
float tmpRendBuffer[MAX_OUTPUT_CHANNELS][L_FRAME48k];
push_wmops( "renderMcToMasa" );
copyBufferTo2dArray( sbaInput->base.inputBuffer, tmpRendBuffer );
ivas_dirac_ana( sbaInput->hDirAC, tmpRendBuffer, sbaInput->base.inputBuffer.config.numSamplesPerChannel, outAudio.config.numChannels );
accumulate2dArrayToBuffer( tmpRendBuffer, &outAudio );
pop_wmops();
return;
}
......@@ -7998,7 +7931,6 @@ static ivas_error renderInputSba(
#endif
error = IVAS_ERR_OK;
inAudio = sbaInput->base.inputBuffer;
#ifdef SPLIT_REND_WITH_HEAD_ROT
......@@ -8014,10 +7946,7 @@ static ivas_error renderInputSba(
sbaInput->base.numNewSamplesPerChannel = 0;
/* Apply input gain to new audio */
v_multc( inAudio.data,
sbaInput->base.gain,
inAudio.data,
inAudio.config.numSamplesPerChannel * inAudio.config.numChannels );
v_multc( inAudio.data, sbaInput->base.gain, inAudio.data, inAudio.config.numSamplesPerChannel * inAudio.config.numChannels );
switch ( getAudioConfigType( outConfig ) )
{
......@@ -8210,10 +8139,11 @@ static void renderMasaToSba(
static void renderMasaToBinaural(
input_masa *masaInput,
IVAS_REND_AudioBuffer outAudio
#ifdef SPLIT_REND_WITH_HEAD_ROT
,
IVAS_REND_AudioBuffer outAudio,
const int16_t is_split_rend_mode
#else
IVAS_REND_AudioBuffer outAudio
#endif
)
{
......@@ -8423,10 +8353,7 @@ static ivas_error renderInputMasa(
masaInput->base.numNewSamplesPerChannel = 0;
/* Apply input gain to new audio */
v_multc( inAudio.data,
masaInput->base.gain,
inAudio.data,
inAudio.config.numSamplesPerChannel * inAudio.config.numChannels );
v_multc( inAudio.data, masaInput->base.gain, inAudio.data, inAudio.config.numSamplesPerChannel * inAudio.config.numChannels );
switch ( getAudioConfigType( outConfig ) )
{
......@@ -8664,7 +8591,7 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects(
ivas_error IVAS_REND_SetIsmMetadataDelay(
IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */
const float sync_md_delay /* i : Ism Metadata Delay in ms to sync with audio delay */
const float sync_md_delay /* i : ISM Metadata Delay in ms to sync with audio delay */
)
{
int16_t i;
......@@ -8682,6 +8609,7 @@ ivas_error IVAS_REND_SetIsmMetadataDelay(
return IVAS_ERR_OK;
}
/*-------------------------------------------------------------------*
* getSamplesInternal()
*
......@@ -8690,10 +8618,11 @@ ivas_error IVAS_REND_SetIsmMetadataDelay(
static ivas_error getSamplesInternal(
IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */
IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */
#ifdef SPLIT_REND_WITH_HEAD_ROT
,
IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */,
IVAS_REND_BitstreamBuffer *hBits /*i/o: buffer for input/output bitstream. Needed in split rendering mode*/
#else
IVAS_REND_AudioBuffer outAudio /* i/o: buffer for output audio */
#endif
)
{
......@@ -8712,8 +8641,7 @@ static ivas_error getSamplesInternal(
#ifdef SPLIT_REND_WITH_HEAD_ROT
cldfb2tdSampleFact = ( outAudio.config.is_cldfb ) ? 2 : 1;
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( outAudio.config.numSamplesPerChannel <= 0 || ( MAX_BUFFER_LENGTH_PER_CHANNEL < outAudio.config.numSamplesPerChannel && outAudio.config.is_cldfb == 0 ) ||
( ( MAX_BUFFER_LENGTH_PER_CHANNEL * cldfb2tdSampleFact ) < outAudio.config.numSamplesPerChannel && outAudio.config.is_cldfb == 1 ) )
#else
......@@ -8777,11 +8705,11 @@ static ivas_error getSamplesInternal(
return error;
}
if ( numOutChannels != outAudio.config.numChannels
#ifdef SPLIT_REND_WITH_HEAD_ROT
&& hIvasRend->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && hIvasRend->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
if ( numOutChannels != outAudio.config.numChannels && hIvasRend->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && hIvasRend->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
#else
if ( numOutChannels != outAudio.config.numChannels )
#endif
)
{
return IVAS_ERR_WRONG_NUM_CHANNELS;
}
......@@ -8798,10 +8726,7 @@ static ivas_error getSamplesInternal(
int16_t num_poses_orig;
num_poses_orig = hIvasRend->splitRendWrapper.multiBinPoseData.num_poses;
outAudio = hIvasRend->splitRendEncBuffer;
ivas_renderSplitGetMultiBinPoseData(
&hIvasRend->hRendererConfig->split_rend_config,
&hIvasRend->splitRendWrapper.multiBinPoseData,
hIvasRend->headRotData.sr_pose_pred_axis );
ivas_renderSplitGetMultiBinPoseData( &hIvasRend->hRendererConfig->split_rend_config, &hIvasRend->splitRendWrapper.multiBinPoseData, hIvasRend->headRotData.sr_pose_pred_axis );
assert( num_poses_orig == hIvasRend->splitRendWrapper.multiBinPoseData.num_poses && "number of poses should not change dynamically" );
/* Clear output buffer for split rendering bitstream */
......@@ -8844,7 +8769,7 @@ static ivas_error getSamplesInternal(
limitRendererOutput( hIvasRend->hLimiter, outAudio.data, outAudio.config.numSamplesPerChannel, IVAS_LIMITER_THRESHOLD );
#endif
}
#else /* SPLIT_REND_WITH_HEAD_ROT */
#else
#ifndef DISABLE_LIMITER
#ifdef DEBUGGING
......@@ -8852,12 +8777,12 @@ static ivas_error getSamplesInternal(
#endif
limitRendererOutput( hIvasRend->hLimiter, outAudio.data, outAudio.config.numSamplesPerChannel, IVAS_LIMITER_THRESHOLD );
#endif
#endif /* SPLIT_REND_WITH_HEAD_ROT */
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
{
ivas_split_rend_bits_t bits;
IVAS_SPLIT_REND_BITS_DATA bits;
int16_t cldfb_in_flag;
float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
......@@ -8883,19 +8808,8 @@ static ivas_error getSamplesInternal(
/* Encode split rendering bitstream */
convertBitsBufferToInternalBitsBuff( *hBits, &bits );
if ( ( error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper,
hIvasRend->headRotData.headPositions[0],
hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate,
hIvasRend->hRendererConfig->split_rend_config.codec,
hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms,
&bits,
Cldfb_RealBuffer_Binaural,
Cldfb_ImagBuffer_Binaural,
( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ),
tmpBinaural,
1,
cldfb_in_flag,
( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK )
if ( ( error = ivas_renderMultiBinToSplitBinaural( &hIvasRend->splitRendWrapper, hIvasRend->headRotData.headPositions[0], hIvasRend->hRendererConfig->split_rend_config.splitRendBitRate, hIvasRend->hRendererConfig->split_rend_config.codec, hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms,
&bits, Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, cldfb_in_flag, ( hIvasRend->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0 ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -8910,7 +8824,7 @@ static ivas_error getSamplesInternal(
accumulate2dArrayToBuffer( tmpBinaural_buff, &outAudio );
}
}
#endif /* SPLIT_REND_WITH_HEAD_ROT */
#endif
return IVAS_ERR_OK;
}
......@@ -8930,7 +8844,6 @@ ivas_error IVAS_REND_GetSamples(
#ifdef SPLIT_REND_WITH_HEAD_ROT
return getSamplesInternal( hIvasRend, outAudio, NULL );
#else
return getSamplesInternal( hIvasRend, outAudio );
#endif
......
......@@ -48,19 +48,6 @@
#define RENDERER_MAX_BIN_INPUTS 1
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*----------------------------------------------------------------------------------*
* Split rendering bitrate constants
*----------------------------------------------------------------------------------*/
#define SPLIT_REND_256k 256000
#define SPLIT_REND_320k 320000
#define SPLIT_REND_384k 384000
#define SPLIT_REND_512k 512000
#define SPLIT_REND_768k 768000
#define SPLIT_REND_MAX_BRATE SPLIT_REND_768k
#define SPLIT_REND_ADDITIONAL_BYTES_TO_READ 1
#endif
/*---------------------------------------------------------------------*
* Renderer structures
......@@ -275,9 +262,9 @@ ivas_error IVAS_REND_SetHeadRotation(
const IVAS_QUATERNION headRot, /* i : head orientations for next rendering call */
const IVAS_VECTOR3 Pos, /* i : listener positions for next rendering call */
#ifdef SPLIT_REND_WITH_HEAD_ROT
IVAS_SPLIT_REND_ROT_AXIS rot_axis,
const IVAS_SPLIT_REND_ROT_AXIS rot_axis, /* i : external control for rotation axis for split rendering*/
#endif
const int16_t sf_idx
const int16_t sf_idx /* i : subframe index */
);
/* Head rotation becomes enabled by calling IVAS_REND_SetHeadRotation. Use this to disable. */
......
......@@ -2874,6 +2874,7 @@ ivas_error RenderConfigReader_getDirectivity(
id[n] = last_specified_id;
}
for ( n = 0; n < MAX_NUM_OBJECTS; n++ )
{
idExists = false;
......
......@@ -354,7 +354,7 @@ ivas_error split_rend_read_bits_from_file(
{
return IVAS_ERR_FAILED_FILE_READ;
}
for ( i = 0; i < SPLIT_REND_ADDITIONAL_BYTES_TO_READ; i++ )
for ( i = 0; i < IVAS_SPLIT_REND_ADDITIONAL_BYTES_TO_READ; i++ )
{
bits[num_bytes + i] = 0;
}
......
......@@ -1254,6 +1254,11 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP HOA3 32 netsimoutput testv/stv3OA32c.wav_SBA_80000_32-32_HOA3_JBM5.tst
// SBA at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5
../IVAS_cod -sba 1 13200 48 testv/stvFOA48c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
../IVAS_dec -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvFOA32c.wav_SBA_13200_48-48_BINAURAL_JBM5.tst
// Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out, 7_1_4 out, JBM Prof 5
../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.wav bit
networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0
......
......@@ -67,7 +67,7 @@ ivas_br_FOA = [
]
ivas_br_HOA2 = ["256000", "384000", "512000"]
ivas_br_HOA3 = ["256000", "384000", "512000"]
SID_list = [0, 1]
sample_rate_list = ["48", "32", "16"]
bypass_list = [1, 2]
gain_list = [0, 1]
......@@ -162,6 +162,7 @@ def test_bypass_enc(
@pytest.mark.parametrize("tag", tag_list)
@pytest.mark.parametrize("fs", sample_rate_list)
@pytest.mark.parametrize("gain_flag", gain_list)
@pytest.mark.parametrize("SID", SID_list)
def test_sba_enc_system(
dut_encoder_frontend: EncoderFrontend,
dut_decoder_frontend: DecoderFrontend,
......@@ -178,17 +179,19 @@ def test_sba_enc_system(
tag,
fs,
gain_flag,
SID,
):
SID = 0
if dtx == "1" and ivas_br not in ["13200", "16400", "24400", "32000", "64000"]:
# skip high bitrates for DTX until DTX issue is resolved
pytest.skip()
if ivas_br == "sw_24k4_256k.bin" and gain_flag != 1:
if SID == 1:
if ivas_br not in ["13200", "16400", "64000"] or fs == "16" or gain_flag == 1 or dtx == "0":
pytest.skip()
if ivas_br == "13200" or ivas_br == "16400":
if dtx == "1" and gain_flag == 0 and fs != "16":
SID = 1
else:
if ivas_br in ["13200","16400"]:
pytest.skip()
if ivas_br == "sw_24k4_256k.bin" and gain_flag != 1:
pytest.skip()
if gain_flag == 1 and ivas_br not in ["13200", "16400", "24400", "32000"]:
pytest.skip()
......