Skip to content
Commits on Source (58)
......@@ -59,7 +59,7 @@ if(UNIX)
# C compiler flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter -Wno-unused-function")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Wno-unused-parameter")
# CLANG
if(CLANG)
find_program(clangBin NAMES /home/amm-archiv/soft/Linux/clang/current/bin/clang clang REQUIRED)
......@@ -162,10 +162,6 @@ if(INCLUDE_SPLIT)
endif()
endif()
if(INCLUDE_SPLIT)
file(GLOB libCldfbTransCodecSrcs "lib_rend/ivas_cldfb_trans_codec/*.c")
file(GLOB libCldfbTransCodecHeaders "lib_rend/ivas_cldfb_trans_codec/*.h")
endif()
file(GLOB libRendSrcs "lib_rend/*.c")
file(GLOB libRendHeaders "lib_rend/*.h")
if(NOT INCLUDE_SPLIT)
......@@ -184,11 +180,7 @@ if(NOT INCLUDE_SPLIT)
list(FILTER libRendHeaders EXCLUDE REGEX ".*lib_rend\/.*ivas_lcld_rom_tables.*\.h$")
endif()
if(INCLUDE_SPLIT)
add_library(lib_rend ${libRendSrcs} ${libCldfbTransCodecSrcs} ${libRendHeaders} ${libCldfbTransCodecHeaders})
else()
add_library(lib_rend ${libRendSrcs} ${libRendHeaders})
endif()
target_link_libraries(lib_rend lib_dec lib_com lib_debug) # Todo refactor: This dependency on lib_dec should be removed.
if(INCLUDE_SPLIT)
target_link_libraries(lib_rend lib_lc3plus)
......
......@@ -58,7 +58,7 @@ endif
CFLAGS += -std=c99 -pedantic -Wcast-qual -Wall -W -Wextra -Wno-long-long \
-Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Werror-implicit-function-declaration \
-Wno-unused-function -Wno-implicit-fallthrough
-Wno-implicit-fallthrough
# libs to link
LDLIBS += -lm
......
......@@ -3834,7 +3834,7 @@ static ivas_error parseLfePanMtxFile(
/* set default panning matrix to all zeros
any subsequent issue in file reading will gracefully exit the function */
for ( lfe_in = 0; lfe_in < IVAS_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
for ( lfe_in = 0; lfe_in < RENDERER_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
{
for ( i = 0; i < IVAS_MAX_OUTPUT_CHANNELS; i++ )
{
......@@ -3842,7 +3842,7 @@ static ivas_error parseLfePanMtxFile(
}
}
for ( lfe_in = 0; lfe_in < IVAS_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
for ( lfe_in = 0; lfe_in < RENDERER_MAX_INPUT_LFE_CHANNELS; lfe_in++ )
{
ch_out = 0;
......
......@@ -46,7 +46,6 @@
#define IVAS_NUM_FRAMES_PER_SEC 50
#define IVAS_MAX_FRAME_SIZE ( 48000 / IVAS_NUM_FRAMES_PER_SEC )
#define IVAS_MAX_BITS_PER_FRAME ( 512000 / IVAS_NUM_FRAMES_PER_SEC )
#define IVAS_MAX_NUM_OBJECTS 4
......@@ -54,10 +53,8 @@
#define IVAS_MAX_OUTPUT_CHANNELS 16
#define IVAS_CLDFB_NO_COL_MAX 16
#define IVAS_CLDFB_NO_CHANNELS_MAX 60
#define IVAS_MAX_INPUT_LFE_CHANNELS 4
#define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4
#define IVAS_ROOM_ABS_COEFF 6
/*----------------------------------------------------------------------------------*
......
......@@ -1822,29 +1822,11 @@ typedef enum
* Early Reflection constants
*----------------------------------------------------------------------------------*/
#define ER_ABS_COEFF 6
#define ER_MAX_SOURCES 25
#define ER_REF_ORDER 1
#define ER_NUM_REF 6
#define ER_AIR_COEFF (0.00137f)
#define ER_SOUND_SPEED (343.0f)
#define ER_MIN_WALL_DIST (0.1f)
#define ER_EUCLIDEAN_SCALE (1.29246971E-26f)
#define ER_DEFAULT_ROOM_L (3.0f)
#define ER_DEFAULT_ROOM_W (4.0f)
#define ER_DEFAULT_ROOM_H (5.0f)
#define ER_RADIUS (1.0f)
#define ER_LIST_ORIGIN_X (0.0f)
#define ER_LIST_ORIGIN_Y (0.0f)
#define ER_LIST_HEIGHT (1.6f)
#define ER_MIN_ROOM_DIMENSION (1.0f)
#define ER_MAX_ROOM_DIMENSION (999.0f)
#define ER_MIN_ABS_COEFF (0.0f)
#define ER_MAX_ABS_COEFF (1.0f)
/*----------------------------------------------------------------------------------*
* Stereo downmix EVS constants
......
......@@ -159,6 +159,7 @@
#define FIX_852_FIX_HANDLE_DEREF /* VA: issue 852: Fix missing handle dereferencing of hIsmMetadaData in ivas_ism_metadata_close() */
#define FIX_520_REMOVE_MEMMOVE_JBM /* VA: issue 520: Remove memmove() from JBM code */
#define FIX_853_ARRAY_SIZE_MISMATCH /* Nokia: Issue #853: Mismatch of declaration and definition of computeIntensityVector_ana and computeReferencePower_ana */
#define FIX_814_DOUBLE_PREC_IN_REVERB /* Philips: Issue 814: Replace double precision arithmetic in reverb */
/* #################### End BE switches ################################## */
......@@ -172,8 +173,11 @@
#define BE_FIX_832_ASAN_ERROR_EFAP_OSBA /* FhG: issue #832: fix ASAN error caused by re-allocating EFAP memories in OSBA*/
#define NONBE_FIX_819_DOUBLE_PREC_COMB_FORMATS /* VA: issue 820: Double precision arithmetic in combined formats */
#define NONBE_FIX_849_OMASA_BFI_CRASH /* VA: issue 849: fix OMASA 2TC and FEC crashes */
#define NONBE_FIX_856_TCX_LTP_SYNTH_FILTER /* FhG: issue 856: correct filtering length for tcx-ltp synth filtering*/
#define NONBE_UNIFIED_DECODING_PATHS /* FhG: unify decoding paths */
#define NONBE_FIX_861_MASA_CRASH_STEREO_SWITCHING /* VA: issue 861: fix MASA 2TC crash when switching from MDCT stereo to TD/DFT stereo */
#define BE_FIX_867_PARAMC_RECONFIG /* FhG: issue #867: fix ParamMC CLDFB buffer dealloc when reconfiguring */
/* ##################### End NON-BE switches ########################### */
......
......@@ -740,7 +740,11 @@ static void tcx_ltp_synth_filter_11_unequal_pitch(
gain = prev_gain;
gain_step = -prev_gain / length;
#ifdef NONBE_FIX_856_TCX_LTP_SYNTH_FILTER
for ( j = 0; j < length; j++ )
#else
for ( j = 0; j < length + L; j++ )
#endif
{
s = 0;
s2 = 0;
......@@ -761,8 +765,14 @@ static void tcx_ltp_synth_filter_11_unequal_pitch(
gain += gain_step;
}
#ifdef NONBE_FIX_856_TCX_LTP_SYNTH_FILTER
mvr2r( out - L, temp_buf, length + L );
mvr2r( in + length, temp_buf + length + L, L );
temp_ptr = &temp_buf[0] + L;
#else
mvr2r( out - MAX_TCX_LTP_FILTER_LEN, temp_buf, MAX_TRANSITION_LEN + 2 * MAX_TCX_LTP_FILTER_LEN );
temp_ptr = &temp_buf[0] + MAX_TCX_LTP_FILTER_LEN;
#endif
m0 = temp_ptr;
m1 = temp_ptr - 1;
......
......@@ -84,6 +84,7 @@ static float mem_synth_snr[MAX_INPUT_CHANNELS][M];
here we do not want to include prot.h due to its dependencies
*--------------------------------------------------------------------*/
#ifdef DEBUG_MODE_INFO
static void set_f(
float y[], /* i/o: Vector to set */
const float a, /* i : Value to set the vector to */
......@@ -99,7 +100,7 @@ static void set_f(
return;
}
#endif
static float sum2_f(
const float *vec, /* i : input vector */
......
......@@ -184,6 +184,24 @@ static ivas_error ivas_binRenderer_convModuleOpen(
{
hBinRenConvModule->numTapsArray[bandIdx] = hBinRenConvModule->numTaps;
}
#ifdef FIX_814_DOUBLE_PREC_IN_REVERB
for ( ; bandIdx < 10; bandIdx++ )
{
hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceilf( 0.6f * hBinRenConvModule->numTaps );
}
for ( ; bandIdx < 20; bandIdx++ )
{
hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceilf( 0.5f * hBinRenConvModule->numTaps );
}
for ( ; bandIdx < 30; bandIdx++ )
{
hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceilf( 0.4f * hBinRenConvModule->numTaps );
}
for ( ; bandIdx < hBinRenderer->conv_band; bandIdx++ )
{
hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceilf( 0.3f * hBinRenConvModule->numTaps );
}
#else
for ( ; bandIdx < 10; bandIdx++ )
{
hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceil( 0.6f * hBinRenConvModule->numTaps );
......@@ -200,6 +218,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
{
hBinRenConvModule->numTapsArray[bandIdx] = (int16_t) ceil( 0.3f * hBinRenConvModule->numTaps );
}
#endif
}
else
{
......
......@@ -989,11 +989,19 @@ ivas_error ivas_param_mc_dec_reconfig(
hParamMC->Cldfb_RealBuffer_tc = NULL;
}
#ifdef BE_FIX_867_PARAMC_RECONFIG
if ( hParamMC->Cldfb_ImagBuffer_tc != NULL )
{
free( hParamMC->Cldfb_ImagBuffer_tc );
hParamMC->Cldfb_ImagBuffer_tc = NULL;
}
#else
if ( hParamMC->Cldfb_RealBuffer_tc != NULL )
{
free( hParamMC->Cldfb_RealBuffer_tc );
hParamMC->Cldfb_RealBuffer_tc = NULL;
}
#endif
n_cldfb_slots = DEFAULT_JBM_CLDFB_TIMESLOTS;
if ( st_ivas->hDecoderConfig->Opt_tsm )
......@@ -1019,12 +1027,19 @@ ivas_error ivas_param_mc_dec_reconfig(
free( hParamMC->Cldfb_RealBuffer_tc );
hParamMC->Cldfb_RealBuffer_tc = NULL;
}
#ifdef BE_FIX_867_PARAMC_RECONFIG
if ( hParamMC->Cldfb_ImagBuffer_tc != NULL )
{
free( hParamMC->Cldfb_ImagBuffer_tc );
hParamMC->Cldfb_ImagBuffer_tc = NULL;
}
#else
if ( hParamMC->Cldfb_RealBuffer_tc != NULL )
{
free( hParamMC->Cldfb_RealBuffer_tc );
hParamMC->Cldfb_RealBuffer_tc = NULL;
}
#endif
}
}
#endif
......
......@@ -106,7 +106,6 @@ static void store_JbmData( IVAS_DEC_VOIP *hVoIP, JB4_DATAUNIT_HANDLE dataUnit, c
static ivas_error evs_dec_main( Decoder_Struct *st_ivas, const int16_t nOutSamples, float *floatBuf, int16_t *pcmBuf );
static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled );
static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig );
static int16_t IVAS_DEC_VoIP_GetRenderGranularity( Decoder_Struct *st_ivas );
static ivas_error IVAS_DEC_VoIP_reconfigure( IVAS_DEC_HANDLE hIvasDec, const uint16_t nTransportChannels, const uint16_t l_ts );
#ifdef SPLIT_REND_WITH_HEAD_ROT
static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, const IVAS_DEC_PCM_TYPE pcmType, void *data );
......@@ -2259,7 +2258,7 @@ ivas_error IVAS_DEC_FeedRenderConfig(
hRenderConfig->roomAcoustics.dimensions = renderConfig.roomAcoustics.dimensions;
hRenderConfig->roomAcoustics.ListenerOrigin = renderConfig.roomAcoustics.ListenerOrigin;
mvr2r( renderConfig.roomAcoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, ER_ABS_COEFF );
mvr2r( renderConfig.roomAcoustics.AbsCoeff, hRenderConfig->roomAcoustics.AbsCoeff, IVAS_ROOM_ABS_COEFF );
}
mvr2r( renderConfig.roomAcoustics.pFc_input, hRenderConfig->roomAcoustics.pFc_input, CLDFB_NO_CHANNELS_MAX );
......@@ -3611,19 +3610,6 @@ static ivas_error input_format_API_to_internal(
}
/*---------------------------------------------------------------------*
* IVAS_DEC_VoIP_GetRenderGranularity()
*
*
*---------------------------------------------------------------------*/
static int16_t IVAS_DEC_VoIP_GetRenderGranularity(
Decoder_Struct *st_ivas )
{
return st_ivas->hTcBuffer->n_samples_granularity;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_VoIP_reconfigure()
*
......
......@@ -49,8 +49,8 @@
#ifdef DEBUG_MODE_QMETADATA
static float direction_distance( float elevation[DIRAC_MAX_NBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], float azimuth[DIRAC_MAX_NBANDS][MAX_PARAM_SPATIAL_SUBFRAMES], IVAS_QDIRECTION *q_direction, const int16_t dim1, const int16_t dim2, float mat_dist[DIRAC_MAX_NBANDS][MAX_PARAM_SPATIAL_SUBFRAMES] );
#endif
#endif
static void ivas_qmetadata_quantize_diffuseness_nrg_ratios( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits, const int16_t hodirac_flag );
static int16_t ivas_qmetadata_entropy_encode_diffuseness( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame );
......@@ -115,8 +115,6 @@ static void transform_azimuth_dir2( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *d
static int16_t calc_var_azi( const IVAS_QDIRECTION *q_direction, const int16_t diffuseness_index_max_ec_frame, const float avg_azimuth, float *avg_azimuth_out );
static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame );
static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, const int16_t bits_dir_hr, BSTR_ENC_HANDLE hMetaData );
static int16_t encode_surround_coherence_hr( IVAS_QMETADATA *hQMetaData, BSTR_ENC_HANDLE hMetaData );
......@@ -1454,103 +1452,6 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512(
}
/*-------------------------------------------------------------------------
* ivas_qmetadata_entropy_encode_diffuseness()
*
* encode diffuseness
*------------------------------------------------------------------------*/
static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr(
BSTR_ENC_HANDLE hMetaData,
IVAS_QDIRECTION *q_direction,
uint16_t *diffuseness_index_max_ec_frame )
{
int16_t start_bit_pos;
int16_t diffuseness_bits_raw;
int16_t b;
int16_t min_diffuseness_m_index, max_diffuseness_m_index;
int16_t nbands;
int16_t start_band;
nbands = q_direction->cfg.nbands;
start_band = q_direction->cfg.start_band;
start_bit_pos = hMetaData->nb_bits_tot;
if ( nbands == 1 )
{
/* If there is only one band, diffuseness should be coded directly as raw with no signaling. */
push_next_indice( hMetaData, q_direction->band_data[0].energy_ratio_index[0], MASA_BITS_ER_HR );
*diffuseness_index_max_ec_frame = 10;
return ( hMetaData->nb_bits_tot - start_bit_pos );
}
/* compute the number of raw coding bits */
diffuseness_bits_raw = 0;
for ( b = start_band; b < nbands; b++ )
{
diffuseness_bits_raw += ivas_qmetadata_encode_quasi_uniform_length( q_direction->band_data[b].energy_ratio_index[0], HR_MASA_ER_LEVELS );
}
min_diffuseness_m_index = q_direction->band_data[start_band].energy_ratio_index[0];
max_diffuseness_m_index = q_direction->band_data[start_band].energy_ratio_index[0];
for ( b = start_band; b < nbands; b++ )
{
if ( q_direction->band_data[b].energy_ratio_index[0] < min_diffuseness_m_index )
{
min_diffuseness_m_index = q_direction->band_data[b].energy_ratio_index[0];
}
if ( q_direction->band_data[b].energy_ratio_index[0] > max_diffuseness_m_index )
{
max_diffuseness_m_index = q_direction->band_data[b].energy_ratio_index[0];
}
}
/* Use similarity coding approach or raw coding when there is a low number of bands. */
/* one bit is used to indicate whether diffuseness values are entropy coded or coded raw */
if ( min_diffuseness_m_index == max_diffuseness_m_index ) /* all values are equal */
{
push_next_indice( hMetaData, 0, 1 ); /* dif_use_raw_coding */
push_next_indice( hMetaData, 1, 1 ); /* dif_have_unique_value */
ivas_qmetadata_encode_quasi_uniform( hMetaData, min_diffuseness_m_index, HR_MASA_ER_LEVELS ); /* dif_unique_value */
}
else if ( min_diffuseness_m_index + 1 == max_diffuseness_m_index ) /* only two consecutive values are present */
{
push_next_indice( hMetaData, 0, 1 ); /* dif_use_raw_coding */
push_next_indice( hMetaData, 0, 1 ); /* dif_have_unique_value */
ivas_qmetadata_encode_quasi_uniform( hMetaData, min_diffuseness_m_index, HR_MASA_ER_LEVELS - 1 ); /* dif_min_value */
for ( b = start_band; b < nbands; b++ )
{
push_next_indice( hMetaData, q_direction->band_data[b].energy_ratio_index[0] - min_diffuseness_m_index, 1 ); /* dif_bit_offset_values */
}
}
else /* raw coding */
{
push_next_indice( hMetaData, 1, 1 ); /* dif_use_raw_coding */
for ( b = start_band; b < nbands; b++ )
{
ivas_qmetadata_encode_quasi_uniform( hMetaData, q_direction->band_data[b].energy_ratio_index[0], HR_MASA_ER_LEVELS ); /* dif_values */
}
}
*diffuseness_index_max_ec_frame = 10;
/* adaptively select the diffuseness_index_max_ec threshold */
if ( min_diffuseness_m_index > 10 )
{
*diffuseness_index_max_ec_frame = HR_MASA_ER_LEVELS - 1;
}
#ifdef DEBUGGING
assert( ( hMetaData->nb_bits_tot - start_bit_pos ) <= 1 + diffuseness_bits_raw );
#endif
return ( hMetaData->nb_bits_tot - start_bit_pos );
}
/*-------------------------------------------------------------------------
* ivas_qmetadata_quantize_diffuseness_nrg_ratios()
*
......
......@@ -111,7 +111,12 @@ int16_t select_stereo_mode(
hStereoClassif->lrtd_mode = ( ( hStereoClassif->unclr_decision | hStereoClassif->xtalk_decision ) && is_speech );
stereo_switching_flag = 1;
#ifdef NONBE_FIX_861_MASA_CRASH_STEREO_SWITCHING
if ( hCPE->element_brate >= MIN_BRATE_MDCT_STEREO || ( ( ivas_format == MASA_FORMAT || ivas_format == MASA_ISM_FORMAT ) && ivas_total_brate < MASA_STEREO_MIN_BITRATE )
#else
if ( hCPE->element_brate >= MIN_BRATE_MDCT_STEREO || ( ivas_format >= MASA_FORMAT && ivas_total_brate < MASA_STEREO_MIN_BITRATE )
#endif
#ifdef DEBUGGING
|| ( hCPE->stereo_mode_cmdl == IVAS_CPE_DFT || hCPE->stereo_mode_cmdl == IVAS_CPE_TD )
#endif
......@@ -131,7 +136,12 @@ int16_t select_stereo_mode(
hStereoClassif->lrtd_mode = 0;
element_mode = IVAS_CPE_DFT;
#ifdef NONBE_FIX_861_MASA_CRASH_STEREO_SWITCHING
if ( stereo_switching_flag == 1 && hCPE->element_brate > IVAS_13k2 && hCPE->hCoreCoder[0]->hSpMusClas->past_dlp[0] < 1.0f && hCPE->hCoreCoder[0]->hSpMusClas->wdlp_xtalk < -0.01f && hCPE->hCoreCoder[0]->vad_flag == 1 && ( hCPE->hStereoMdct->sw_uncorr || hStereoClassif->xtalk_decision ) )
#else
if ( hCPE->element_brate > IVAS_13k2 && hCPE->hCoreCoder[0]->hSpMusClas->past_dlp[0] < 1.0f && hCPE->hCoreCoder[0]->hSpMusClas->wdlp_xtalk < -0.01f && hCPE->hCoreCoder[0]->vad_flag == 1 && ( hCPE->hStereoMdct->sw_uncorr || hStereoClassif->xtalk_decision ) )
#endif
{
hStereoClassif->lrtd_mode = 1;
element_mode = IVAS_CPE_TD;
......@@ -145,17 +155,16 @@ int16_t select_stereo_mode(
}
else if ( element_mode < IVAS_CPE_MDCT )
{
#ifdef DEBUGGING
if ( stereo_switching_flag == 0 )
{
#ifdef DEBUGGING
if ( hCPE->stereo_mode_cmdl > 1 )
{
element_mode = hCPE->stereo_mode_cmdl;
}
}
else
#endif
if ( element_mode == IVAS_CPE_TD )
}
else if ( element_mode == IVAS_CPE_TD )
{
if ( hCPE->hStereoTD->prev_fr_LRTD_TD_dec > 0 && is_speech )
{
......@@ -192,6 +201,7 @@ int16_t select_stereo_mode(
if ( hCPE->last_element_mode != IVAS_CPE_DFT && hCPE->last_element_mode != IVAS_CPE_TD )
{
int16_t lrtd_mode = hStereoClassif->lrtd_mode;
/* reset stereo classifier when switching from MDCT stereo to Unified stereo */
stereo_classifier_init( hCPE->hStereoClassif );
......
......@@ -992,7 +992,7 @@ static ivas_error ivas_shoebox_config_init_params(
hShoeboxConfig->room_W = 0.0f;
hShoeboxConfig->room_H = 0.0f;
for ( i = 0; i < ER_ABS_COEFF; i++ )
for ( i = 0; i < IVAS_ROOM_ABS_COEFF; i++ )
{
hShoeboxConfig->abs_coeff[i] = 0.0f;
}
......
......@@ -40,6 +40,7 @@
#include "ivas_error_utils.h"
#include "wmc_auto.h"
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*-------------------------------------------------------------------------
* IVAS_LC3PLUS_DEC_Open()
......@@ -699,3 +700,4 @@ ivas_error IVAS_LC3PLUS_DEC_Conceal(
return IVAS_LC3PLUS_DEC_Decode_or_Conceal_internal( handle, bitstream_in, 0, badFrameIndicator, pcm_out );
}
#endif /* SPLIT_REND_WITH_HEAD_ROT */
......@@ -37,7 +37,7 @@
#include "prot.h"
#include "wmc_auto.h"
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*-------------------------------------------------------------------*
* Function IVAS_LC3PLUS_ENC_Open()
*
......@@ -331,3 +331,4 @@ ivas_error IVAS_LC3PLUS_ENC_Encode(
return IVAS_ERR_OK;
}
#endif /* SPLIT_REND_WITH_HEAD_ROT */
......@@ -51,6 +51,8 @@
* Local constants/tabels
*-----------------------------------------------------------------------------------------*/
#define ER_NUM_REF 6
static uint16_t LC_mixing_5_1[5] = { 0, 1, 2, 0, 1 };
static uint16_t LC_mixing_7_1[7] = { 0, 1, 2, 3, 4, 3, 4 };
......
......@@ -1200,8 +1200,14 @@ ivas_error ivas_reverb_open(
/* Defining appropriate windowing parameters for FFT filters to prevent aliasing */
fft_hist_size = pState->fft_size - pState->fft_subblock_size;
#ifdef FIX_814_DOUBLE_PREC_IN_REVERB
transition_start = (int16_t) roundf( FFT_FILTER_WND_FLAT_REGION * fft_hist_size );
transition_length = (int16_t) roundf( FFT_FILTER_WND_TRANS_REGION * fft_hist_size );
#else
transition_start = (int16_t) round( FFT_FILTER_WND_FLAT_REGION * fft_hist_size );
transition_length = (int16_t) round( FFT_FILTER_WND_TRANS_REGION * fft_hist_size );
#endif
/* Compute the window used for FFT filters */
ivas_reverb_define_window_fft( pTime_window, transition_start, transition_length, nr_fc_fft_filter );
......
......@@ -587,7 +587,11 @@ void ivas_reverb_calc_color_levels(
/* Limiting the frequency response gradients
Find frequency band closest to chosen pivot frequency. */
#ifdef FIX_814_DOUBLE_PREC_IN_REVERB
idx_pivot = (int16_t) roundf( STEP_LIMIT_PIVOT_FREQ / freq_step );
#else
idx_pivot = (int16_t) round( STEP_LIMIT_PIVOT_FREQ / freq_step );
#endif
/* Perform step limiting */
response_step_limit( pTarget_color_L, freq_count, RESPONSE_STEP_LIMIT_LF, RESPONSE_STEP_LIMIT_HF, idx_pivot );
......@@ -723,7 +727,11 @@ void ivas_reverb_get_hrtf_set_properties(
}
else
{
#ifdef FIX_814_DOUBLE_PREC_IN_REVERB
base_idx = (int16_t) floorf( tbl_index );
#else
base_idx = (int16_t) floor( tbl_index );
#endif
relative_pos = tbl_index - base_idx;
if ( base_idx > ( in_freq_count - 2 ) ) /* In case of extrapolation (above last bin), choose nearest */
{
......
......@@ -39,6 +39,19 @@
#include "prot.h"
#include "wmc_auto.h"
/*-------------------------------------------------------------------------
* Local constants
*------------------------------------------------------------------------*/
#define ER_MAX_SOURCES 25
#define ER_REF_ORDER 1
#define ER_AIR_COEFF ( 0.00137f )
#define ER_SOUND_SPEED ( 343.0f )
#define ER_MIN_WALL_DIST ( 0.1f )
#define ER_EUCLIDEAN_SCALE ( 1.29246971E-26f )
/*-----------------------------------------------------------------------------------------*
* Function ivas_shoebox_config_init
*
......