Skip to content
......@@ -160,7 +160,11 @@ void ivas_renderer_select(
{
*internal_config = IVAS_AUDIO_CONFIG_HOA3;
#ifdef NONBE_FIX_935_SBA_REVERB
if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL
#else
if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
|| output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
......@@ -371,7 +375,11 @@ void ivas_renderer_select(
{
*internal_config = IVAS_AUDIO_CONFIG_HOA3;
}
#ifdef FIX_959_MASA_LINEAR_REND
*renderer_type = RENDERER_SBA_LINEAR_DEC;
#else
st_ivas->renderer_type = RENDERER_SBA_LINEAR_DEC;
#endif
}
else if ( ( ivas_format == MASA_FORMAT && output_config == IVAS_AUDIO_CONFIG_MONO && st_ivas->nchan_transport == 1 ) ||
( ivas_format == SBA_FORMAT && ( output_config == IVAS_AUDIO_CONFIG_STEREO || output_config == IVAS_AUDIO_CONFIG_MONO ) ) )
......
......@@ -194,7 +194,11 @@ ivas_error ivas_sba_dec_reconfigure(
}
else
{
#ifdef NONBE_FIX_935_SBA_REVERB
if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL
#else
if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
|| st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM
#endif
......
......@@ -249,7 +249,13 @@ ivas_error ivas_spar_dec_open(
nchan_to_allocate = 2 * BINAURAL_CHANNELS;
}
if ( st_ivas->ivas_format == SBA_ISM_FORMAT && ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
if ( st_ivas->ivas_format == SBA_ISM_FORMAT &&
#ifdef NONBE_FIX_935_SBA_REVERB
st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL &&
#else
( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) &&
#endif
st_ivas->ism_mode == ISM_SBA_MODE_DISC )
{
/* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */
granularity = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) );
......
......@@ -216,6 +216,7 @@ ivas_error IVAS_DEC_Open(
st_ivas->transport_config = IVAS_AUDIO_CONFIG_INVALID;
st_ivas->intern_config = IVAS_AUDIO_CONFIG_INVALID;
st_ivas->writeFECoffset = 0;
hIvasDec->hasDecodedFirstGoodFrame = true; /* Functionality to suppress output for initial lost frames is disabled in EVS operation */
return IVAS_ERR_OK;
}
......@@ -1051,6 +1052,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
int16_t pcm_out_flag;
int16_t td_input;
int16_t numPoses;
int16_t ro_md_flag;
error = IVAS_ERR_OK;
st_ivas = hIvasDec->st_ivas;
......@@ -1153,6 +1155,15 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
pcm_out_flag = ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC;
if ( st_ivas->hBinRendererTd != NULL )
{
ro_md_flag = 1;
}
else
{
ro_md_flag = 0;
}
if ( ( error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend,
st_ivas->hHeadTrackData->Quaternions[0],
st_ivas->hRenderConfig->split_rend_config.splitRendBitRate,
......@@ -1161,7 +1172,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
hSplitBinRend->hSplitRendBits,
hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural,
hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural,
max_band, pOutput, 1, !td_input, pcm_out_flag ) ) != IVAS_ERR_OK )
max_band, pOutput, 1, !td_input, pcm_out_flag, ro_md_flag ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -1871,7 +1882,11 @@ ivas_error IVAS_DEC_FeedCustomLsData(
ivas_error IVAS_DEC_GetHrtfHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */
#else
IVAS_DEC_HRTF_HANDLE *hHrtfTD /* o : HRTF handle */
#endif
)
{
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfTD == NULL )
......@@ -1879,7 +1894,11 @@ ivas_error IVAS_DEC_GetHrtfHandle(
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
*hHrtfTD = &hIvasDec->st_ivas->hHrtfTD;
#else
*hHrtfTD = hIvasDec->st_ivas->hHrtfTD;
#endif
return IVAS_ERR_OK;
}
......@@ -1893,7 +1912,11 @@ ivas_error IVAS_DEC_GetHrtfHandle(
ivas_error IVAS_DEC_GetHrtfCRendHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */
#else
IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* o : Set of HRTF handle */
#endif
)
{
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hSetOfHRTF == NULL )
......@@ -1901,7 +1924,11 @@ ivas_error IVAS_DEC_GetHrtfCRendHandle(
return IVAS_ERR_WRONG_PARAMS;
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
*hSetOfHRTF = &hIvasDec->st_ivas->hSetOfHRTF;
#else
*hSetOfHRTF = hIvasDec->st_ivas->hSetOfHRTF;
#endif
return IVAS_ERR_OK;
}
......@@ -1915,7 +1942,11 @@ ivas_error IVAS_DEC_GetHrtfCRendHandle(
ivas_error IVAS_DEC_GetHrtfFastConvHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv /* o : FASTCONV HRTF handle */
#else
IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv /* o : FASTCONV HRTF handle */
#endif
)
{
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfFastConv == NULL )
......@@ -1923,7 +1954,11 @@ ivas_error IVAS_DEC_GetHrtfFastConvHandle(
return IVAS_ERR_WRONG_PARAMS;
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
*hHrtfFastConv = &hIvasDec->st_ivas->hHrtfFastConv;
#else
*hHrtfFastConv = hIvasDec->st_ivas->hHrtfFastConv;
#endif
return IVAS_ERR_OK;
}
......@@ -1937,7 +1972,11 @@ ivas_error IVAS_DEC_GetHrtfFastConvHandle(
ivas_error IVAS_DEC_GetHrtfParamBinHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o : Parametric binauralizer HRTF handle */
#else
IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* o : Parametric binauralizer HRTF handle */
#endif
)
{
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfParambin == NULL )
......@@ -1945,7 +1984,11 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle(
return IVAS_ERR_WRONG_PARAMS;
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
*hHrtfParambin = &hIvasDec->st_ivas->hHrtfParambin;
#else
*hHrtfParambin = hIvasDec->st_ivas->hHrtfParambin;
#endif
return IVAS_ERR_OK;
}
......@@ -3699,6 +3742,7 @@ static ivas_error set_pcm_buffer_to_zero(
{
ivas_error error;
error = IVAS_ERR_OK;
switch ( pcmType )
{
case IVAS_DEC_PCM_FLOAT:
......
......@@ -406,23 +406,39 @@ ivas_error IVAS_DEC_FeedCustomLsData(
/*! r: error code */
ivas_error IVAS_DEC_GetHrtfHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_HANDLE **hHrtfTD /* o : HRTF handle */
#else
IVAS_DEC_HRTF_HANDLE *hHrtfTD /* o : HRTF handle */
#endif
);
/*! r: error code */
ivas_error IVAS_DEC_GetHrtfCRendHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF /* o : Set of HRTF handle */
#else
IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* o : Set of HRTF handle */
#endif
);
ivas_error IVAS_DEC_GetHrtfFastConvHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv/* o : FASTCONV HRTF handle */
#else
IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv /* o : FASTCONV HRTF handle */
#endif
);
ivas_error IVAS_DEC_GetHrtfParamBinHandle(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin/* o : Parametric binauralizer HRTF handle */
#else
IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* o : Parametric binauralizer HRTF handle */
#endif
);
......
......@@ -242,10 +242,6 @@ void transf_cdbk_enc(
x_tran[i] = (float) ( x_norm[i] );
}
#ifndef FIX_938_GCC_12_WARNINGS
set_f( x_tran + Nsv * WIDTH_BAND, 0.0f, L_SUBFR - WIDTH_BAND * Nsv );
#endif
if ( st->coder_type != INACTIVE && st->core_brate >= MIN_BRATE_AVQ_EXC && st->core_brate <= MAX_BRATE_AVQ_EXC_TD && !harm_flag_acelp )
{
mvr2r( x_tran, code_preQ, L_SUBFR );
......
......@@ -519,22 +519,6 @@ ivas_error ivas_cpe_enc(
* Core codec configuration
*----------------------------------------------------------------*/
#ifndef NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW
/* 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 ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) )
{
int16_t igf;
igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->rf_mode );
if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
{
return error;
}
}
}
#endif
if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->hMCT == NULL )
{
/* set coded BW for MDCT stereo */
......@@ -556,7 +540,6 @@ ivas_error ivas_cpe_enc(
}
}
#ifdef NONBE_FIX_943_RECONFIG_IGF_AFTER_SETTING_BW
/* IGF reconfiguration */
for ( n = 0; n < n_CoreChannels; n++ )
{
......@@ -570,7 +553,6 @@ ivas_error ivas_cpe_enc(
}
}
}
#endif
/* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */
for ( n = 0; n < n_CoreChannels; n++ )
......
......@@ -275,7 +275,6 @@ ivas_error ivas_enc(
else if ( ivas_format == MASA_ISM_FORMAT )
{
float *data_separated_object;
int16_t idx_separated_object;
int16_t flag_omasa_ener_brate;
......
......@@ -55,7 +55,6 @@
#define ISM_MAX_ELEVATION_DIFF_IDX ( ISM_ELEVATION_NBITS - 1 /*zero*/ - 1 /*sign*/ )
#define ISM_MAX_RADIUS_DIFF_IDX ( ISM_RADIUS_NBITS - 1 /*zero*/ - 1 /*sign*/ )
#define ISM_FEC_MAX 10
#define ISM_MD_FEC_DIFF 10
#define ISM_MD_INC_DIFF_CNT_MAX 6
#define ISM_MD_FEC_CNT_MAX 25
......@@ -429,6 +428,7 @@ ivas_error ivas_ism_metadata_enc(
}
idx_angle1_abs = ism_quant_meta( hIsmMetaData->azimuth, &valQ, ism_azimuth_borders, ISM_Q_STEP, ISM_Q_STEP_BORDER, 1 << ISM_AZIMUTH_NBITS );
encode_angle_indices( hBstr, &( hIsmMetaData->position_angle ), hIsmMetaData->last_ism_metadata_flag, hSCE[0]->hCoreCoder[0]->ini_frame, idx_angle1_abs, 0, &flag_abs_azimuth[ch], NULL );
}
else
......@@ -443,6 +443,7 @@ ivas_error ivas_ism_metadata_enc(
idx_angle1_abs = hParamIsm->azi_index[ch];
idx_angle2_abs = hParamIsm->ele_index[ch];
}
encode_angle_indices( hBstr, &( hIsmMetaData->position_angle ), hIsmMetaData->last_ism_metadata_flag, ini_frame, idx_angle1_abs, idx_angle2_abs, &flag_abs_azimuth[ch], &flag_abs_elevation[ch] );
/*----------------------------------------------------------------*
......
......@@ -45,6 +45,12 @@
#include "wmc_auto.h"
/*-------------------------------------------------------------------------
* Local constants
*------------------------------------------------------------------------*/
#define OMASA_FEC_MAX 5
/*-------------------------------------------------------------------------
* Local function prototypes
*------------------------------------------------------------------------*/
......@@ -133,6 +139,7 @@ ivas_error ivas_omasa_enc_open(
set_zero( hOMasa->broadband_energy_prev, MAX_NUM_OBJECTS + MASA_MAX_TRANSPORT_CHANNELS );
hOMasa->prev_selected_object = 0;
hOMasa->changing_object = 0;
hOMasa->since_obj_change_cnt = 0;
input_frame = (int16_t) ( st_ivas->hEncoderConfig->input_Fs / FRAMES_PER_SEC );
for ( i = 0; i < input_frame; i++ )
......@@ -495,6 +502,22 @@ void ivas_omasa_enc(
{
hOMasa->broadband_energy_prev[i] = broadband_energy[i];
}
/* force absolute MD coding in case of change of separated object */
if ( hOMasa->prev_selected_object != selected_object )
{
hOMasa->since_obj_change_cnt = 0;
hIsmMeta[0]->position_angle.angle1_diff_cnt = ISM_FEC_MAX;
}
else
{
hOMasa->since_obj_change_cnt++;
hOMasa->since_obj_change_cnt = min( OMASA_FEC_MAX, hOMasa->since_obj_change_cnt );
if ( hOMasa->since_obj_change_cnt < OMASA_FEC_MAX )
{
hIsmMeta[0]->position_angle.angle1_diff_cnt = ISM_FEC_MAX;
}
}
hOMasa->prev_selected_object = selected_object;
/* Separate the selected object */
......
......@@ -72,7 +72,11 @@ static void ivas_merge_sba_transports(
{
for ( j = 0; j < input_frame; j++ )
{
#ifdef NONBE_FIX_977_OSBA_GAIN_MISMATCH
data_out_f[i][j] = 0.5f * ( data_in_f1[i][j] + data_in_f2[i][j] );
#else
data_out_f[i][j] = ( data_in_f1[i][j] + data_in_f2[i][j] );
#endif
}
}
......@@ -443,7 +447,9 @@ static void ivas_osba_render_ism_to_sba(
int16_t azimuth, elevation;
float gains[MAX_INPUT_CHANNELS];
float g1, g2;
#ifndef NONBE_FIX_977_OSBA_GAIN_MISMATCH
float output_gain;
#endif
int16_t nchan_sba;
......@@ -478,6 +484,7 @@ static void ivas_osba_render_ism_to_sba(
}
/* Gain with loudness-matching gains */
#ifndef NONBE_FIX_977_OSBA_GAIN_MISMATCH
output_gain = 0.7499f;
for ( j = 0; j < nchan_sba; j++ )
{
......@@ -486,6 +493,7 @@ static void ivas_osba_render_ism_to_sba(
data_out_f[j][k] *= output_gain;
}
}
#endif
return;
}
......@@ -788,6 +788,7 @@ typedef struct ivas_omasa_enc_state_structure
float broadband_energy_prev[MAX_NUM_OBJECTS + MASA_MAX_TRANSPORT_CHANNELS];
int16_t prev_selected_object;
uint8_t changing_object;
int16_t since_obj_change_cnt;
float fade_out_gain[L_FRAME48k];
float fade_in_gain[L_FRAME48k];
......
This diff is collapsed.
......@@ -54,6 +54,10 @@ ivas_error ivas_HRTF_binary_open(
return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for HRTF binary!" );
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
set_c( (int8_t *) ( *hHrtfTD ), 0, (int32_t) sizeof( TDREND_HRFILT_FiltSet_t ) );
#endif
return IVAS_ERR_OK;
}
......@@ -183,6 +187,10 @@ ivas_error ivas_HRTF_parambin_binary_open(
return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for parametric binauralizer HRTF tables!" );
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
set_c( (int8_t *) ( *hHrtfParambin ), 0, (int32_t) sizeof( HRTFS_PARAMBIN ) );
#endif
return IVAS_ERR_OK;
}
......
......@@ -672,7 +672,11 @@ ivas_error ivas_td_binaural_open_ext(
directivity = hRendCfg->directivity;
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
return ivas_td_binaural_open_unwrap( pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns );
#else
return ivas_td_binaural_open_unwrap( &pTDRend->hHrtfTD, outFs, nchan_transport, ivas_format, transport_config, directivity, hTransSetup, &pTDRend->hBinRendererTd, &pTDRend->binaural_latency_ns );
#endif
}
......
......@@ -38,6 +38,9 @@
#include "ivas_error.h"
#include "wmc_auto.h"
#include "ivas_rom_rend.h"
#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
#include "ivas_rom_binaural_crend_head.h"
#endif
#ifdef DEBUGGING
#include "debug.h"
#endif
......@@ -144,7 +147,11 @@ void TDREND_MIX_Dealloc(
hBinRendererTd->Listener_p = NULL;
}
/* Dealloc HR filter set */
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
if ( ( *hBinRendererTd->pHrFiltSet_p != NULL ) && ( hBinRendererTd->HrFiltSet_p != NULL ) )
#else
if ( hBinRendererTd->HrFiltSet_p != NULL )
#endif
{
if ( hBinRendererTd->HrFiltSet_p->FilterMethod == TDREND_HRFILT_Method_BSplineModel )
{
......@@ -174,8 +181,17 @@ void TDREND_MIX_Dealloc(
}
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
if ( hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == 1 )
{
free( hBinRendererTd->HrFiltSet_p );
hBinRendererTd->HrFiltSet_p = NULL;
*hBinRendererTd->pHrFiltSet_p = NULL;
}
#else
free( hBinRendererTd->HrFiltSet_p );
hBinRendererTd->HrFiltSet_p = NULL;
#endif
}
return;
......@@ -239,6 +255,10 @@ ivas_error TDREND_MIX_Init(
hBinRendererTd->HrFiltSet_p = *hHrtfTD;
}
#ifdef NONBE_FIX_BINARY_BINAURAL_READING
hBinRendererTd->pHrFiltSet_p = hHrtfTD;
#endif
if ( hBinRendererTd->HrFiltSet_p->SampleRate != output_Fs )
{
return ( IVAS_ERROR( IVAS_ERR_INVALID_SAMPLING_RATE, "The sampling rate for the HR filter set does not match the output sampling rate.\n" ) );
......
......@@ -545,7 +545,7 @@ ivas_error ivas_orient_trk_SetReferenceVector(
case IVAS_HEAD_ORIENT_TRK_REF:
case IVAS_HEAD_ORIENT_TRK_AVG:
case IVAS_HEAD_ORIENT_TRK_REF_VEC:
acousticFrontVector = VectorSubtract( listenerPos, refPos );
acousticFrontVector = VectorSubtract( refPos, listenerPos );
break;
case IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV:
/* ignore the height difference between listener position and reference position */
......@@ -554,7 +554,7 @@ ivas_error ivas_orient_trk_SetReferenceVector(
listenerPosLevel.y = listenerPos.y;
refPosLevel.x = refPos.x;
refPosLevel.y = refPos.y;
acousticFrontVector = VectorSubtract( listenerPosLevel, refPosLevel );
acousticFrontVector = VectorSubtract( refPosLevel, listenerPosLevel );
break;
default:
return IVAS_ERR_WRONG_PARAMS;
......@@ -568,7 +568,7 @@ ivas_error ivas_orient_trk_SetReferenceVector(
return IVAS_ERR_WRONG_PARAMS;
}
ivasForwardVector.x = -1.0f;
ivasForwardVector.x = 1.0f;
ivasForwardVector.y = 0.0f;
ivasForwardVector.z = 0.0f;
VectorRotationToQuaternion( ivasForwardVector, acousticFrontVector, &pOTR->refRot );
......
......@@ -918,26 +918,6 @@ ivas_error ivas_rend_initCrendWrapper(
#endif
);
#ifndef FIX_911_REMOVE_CREND_DUPLICATION
ivas_error ivas_rend_crendProcess(
const CREND_WRAPPER *pCrend,
const AUDIO_CONFIG inConfig,
const AUDIO_CONFIG outConfig,
DECODER_CONFIG_HANDLE hDecoderConfig,
COMBINED_ORIENTATION_HANDLE hCombinedOrientationData,
IVAS_OUTPUT_SETUP_HANDLE hIntSetup,
EFAP_HANDLE hEFAPdata,
float *output[], /* i/o: input/output audio channels */
const int32_t output_Fs,
#ifdef SPLIT_REND_WITH_HEAD_ROT
const int16_t num_subframes, /* i : number of subframes to render */
const int16_t pos_idx /* i : pose index */
#else
const int16_t num_subframes /* i : number of subframes to render */
#endif
);
#endif
ivas_error ivas_rend_crendProcessSubframe(
const CREND_WRAPPER *pCrend, /* i/o: Crend wrapper handle */
const AUDIO_CONFIG inConfig, /* i : input audio configuration */
......@@ -1587,7 +1567,8 @@ ivas_error ivas_renderMultiBinToSplitBinaural(
float *output[],
const int16_t low_res_pre_rend_rot,
const int16_t cldfb_in_flag,
const int16_t pcm_out_flag
const int16_t pcm_out_flag,
const int16_t ro_md_flag
);
void ivas_rend_CldfbSplitPreRendProcess(
......@@ -1598,7 +1579,8 @@ void ivas_rend_CldfbSplitPreRendProcess(
float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
IVAS_SPLIT_REND_BITS_HANDLE pBits,
const int32_t target_md_bits,
const int16_t low_res_pre_rend_rot
const int16_t low_res_pre_rend_rot,
const int16_t ro_md_flag
);
void ivas_rend_CldfbSplitPostRendProcess(
......@@ -1677,7 +1659,8 @@ void ivas_SplitRenderer_GetRotMd(
MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,
float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Reference Binaural signals */
float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Reference Binaural signals */
const int16_t low_res
const int16_t low_res,
const int16_t ro_md_flag
);
void ivas_SplitRenderer_PostRenderer(
......
......@@ -59,10 +59,17 @@ static uint16_t LC_mixing_7_1[7] = { 0, 1, 2, 3, 4, 3, 4 };
static uint16_t LC_mixing_5_1_2[7] = { 0, 1, 2, 3, 4, 0, 1 };
#ifdef NONBE_FIX_935_EARLY_REFLECTIONS_WRONG_ORDER
static uint16_t LC_mixing_5_1_4[9] = { 0, 1, 2, 3, 4, 0, 1, 3, 4 };
#else
static uint16_t LC_mixing_5_1_4[9] = { 0, 1, 2, 3, 4, 0, 1, 2, 3 };
#endif
#ifdef NONBE_FIX_935_EARLY_REFLECTIONS_WRONG_ORDER
static uint16_t LC_mixing_7_1_4[11] = { 0, 1, 2, 3, 4, 3, 4, 0, 1, 3, 4 };
#else
static uint16_t LC_mixing_7_1_4[11] = { 0, 1, 2, 3, 4, 3, 4, 0, 1, 2, 3 };
#endif
/*-----------------------------------------------------------------------------------------*
* Function ivas_er_init()
......
......@@ -714,6 +714,14 @@ void ivas_reverb_get_hrtf_set_properties(
const float norm_freq = out_freq_step * out_bin_idx;
/* Computing the bin index in the source data */
#ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB
if ( in_freq_count == out_freq_count )
{
base_idx = out_bin_idx;
}
else
{
#endif
const float tbl_index = ( norm_freq - inp_freq_offset ) / inp_freq_step;
if ( tbl_index <= 0.0f ) /* In case of extrapolation (below 1st bin), choose nearest */
......@@ -731,6 +739,9 @@ void ivas_reverb_get_hrtf_set_properties(
relative_pos = 1.0f;
}
}
#ifdef NONBE_FIX_AVG_IAC_CLDFB_REVERB
}
#endif
/* Computing 2 bins data for later interpolation */
......