Skip to content
......@@ -601,6 +601,7 @@ typedef struct ivas_mc_paramupmix_dec_data_structure
#ifdef NONBE_FIX_727_MC_PARAMUPMIX_HEADROTATION
float *hoa_encoder;
#endif
} MC_PARAMUPMIX_DEC_DATA, *MC_PARAMUPMIX_DEC_HANDLE;
......@@ -706,6 +707,18 @@ typedef struct ivas_spar_dec_lib_t
} SPAR_DEC_DATA, *SPAR_DEC_HANDLE;
#ifdef FIX_782_OSBA_FUNCTION_NAMES
/* Data structure for SBA_ISM rendering */
typedef struct ivas_osba_data
{
float **delayBuffer;
int16_t delayBuffer_size;
int16_t delayBuffer_nchan;
} SBA_ISM_DATA, *SBA_ISM_DATA_HANDLE;
#endif
/*----------------------------------------------------------------------------------*
* SCE decoder structure
*----------------------------------------------------------------------------------*/
......@@ -865,6 +878,7 @@ typedef struct ivas_binaural_rendering_struct
} BINAURAL_RENDERER, *BINAURAL_RENDERER_HANDLE;
#endif
/*----------------------------------------------------------------------------------*
* MASA decoder structures
*----------------------------------------------------------------------------------*/
......@@ -934,72 +948,9 @@ typedef struct ivas_masa_ism_data_structure
/*----------------------------------------------------------------------------------*
* Decoder configuration structure
* JBM structures
*----------------------------------------------------------------------------------*/
typedef struct decoder_config_structure
{
int32_t ivas_total_brate; /* IVAS total bitrate in bps */
int32_t last_ivas_total_brate; /* last IVAS total bitrate in bps */
int32_t output_Fs; /* output signal sampling frequency in Hz */
int16_t nchan_out; /* number of output audio channels */
AUDIO_CONFIG output_config; /* output audio configuration */
int16_t Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */
int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */
int16_t Opt_Headrotation; /* indicates whether head-rotation is used */
int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */
IVAS_HEAD_ORIENT_TRK_T orientation_tracking; /* indicates orientation tracking type */
int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */
float non_diegetic_pan_gain; /* non diegetic panning gain*/
int16_t Opt_AMR_WB; /* flag indicating AMR-WB IO mode */
int16_t Opt_ExternalOrientation; /* indiates whether external orientations are used */
#ifdef FIX_708_DPID_COMMAND_LINE
int16_t Opt_dpid_on; /* indicates whether Directivity pattern option is used */
#endif
#ifdef FIX_708_AEID_COMMAND_LINE
int16_t Opt_aeid_on; /* indicates whether Acoustic environment option is used */
#endif
/* temp. development parameters */
#ifdef DEBUGGING
int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */
#endif
int16_t Opt_tsm;
#ifdef SPLIT_REND_WITH_HEAD_ROT
int16_t Opt_Limiter;
#endif
int16_t Opt_5ms;
int16_t Opt_delay_comp; /* flag indicating delay compensation active */
} DECODER_CONFIG, *DECODER_CONFIG_HANDLE;
#ifdef SPLIT_REND_WITH_HEAD_ROT
typedef struct
{
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];
} IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA, *IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE;
typedef struct
{
float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
AUDIO_CONFIG config;
} IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA, *IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE;
typedef struct
{
IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE hMultiBinCldfbData; /*scratch buffer for frame by frame processing*/
IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits; /*scratch buffer for frame by frame processing*/
SPLIT_REND_WRAPPER splitrend;
IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE hCldfbDataOut; /*buffer to store cldfb data before binauralization*/
float *tdDataOut; /*buffer to store TD data before binauralization*/
int16_t numTdSamplesPerChannelCached;
} IVAS_DEC_SPLIT_REND_WRAPPER;
#endif
typedef struct decoder_tc_buffer_structure
{
float *tc_buffer; /* the buffer itself */
......@@ -1043,6 +994,80 @@ typedef struct jbm_metadata_structure
} JBM_METADATA, *JBM_METADATA_HANDLE;
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*----------------------------------------------------------------------------------*
* Split rendering structures
*----------------------------------------------------------------------------------*/
typedef struct
{
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];
} IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA, *IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE;
typedef struct
{
float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
AUDIO_CONFIG config;
} IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA, *IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE;
typedef struct
{
IVAS_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE hMultiBinCldfbData; /*scratch buffer for frame by frame processing*/
IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits; /*scratch buffer for frame by frame processing*/
SPLIT_REND_WRAPPER splitrend;
IVAS_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE hCldfbDataOut; /*buffer to store cldfb data before binauralization*/
float *tdDataOut; /*buffer to store TD data before binauralization*/
int16_t numTdSamplesPerChannelCached;
} IVAS_DEC_SPLIT_REND_WRAPPER;
#endif
/*----------------------------------------------------------------------------------*
* Decoder configuration structure
*----------------------------------------------------------------------------------*/
typedef struct decoder_config_structure
{
int32_t ivas_total_brate; /* IVAS total bitrate in bps */
int32_t last_ivas_total_brate; /* last IVAS total bitrate in bps */
int32_t output_Fs; /* output signal sampling frequency in Hz */
int16_t nchan_out; /* number of output audio channels */
AUDIO_CONFIG output_config; /* output audio configuration */
int16_t Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */
int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */
int16_t Opt_Headrotation; /* indicates whether head-rotation is used */
int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */
IVAS_HEAD_ORIENT_TRK_T orientation_tracking; /* indicates orientation tracking type */
int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */
float non_diegetic_pan_gain; /* non diegetic panning gain*/
int16_t Opt_AMR_WB; /* flag indicating AMR-WB IO mode */
int16_t Opt_ExternalOrientation; /* indiates whether external orientations are used */
#ifdef FIX_708_DPID_COMMAND_LINE
int16_t Opt_dpid_on; /* indicates whether Directivity pattern option is used */
#endif
#ifdef FIX_708_AEID_COMMAND_LINE
int16_t Opt_aeid_on; /* indicates whether Acoustic environment option is used */
#endif
/* temp. development parameters */
#ifdef DEBUGGING
int16_t force_rend; /* forced TD/CLDFB binaural renderer (for ISM and MC) */
#endif
int16_t Opt_tsm;
#ifdef SPLIT_REND_WITH_HEAD_ROT
int16_t Opt_Limiter;
#endif
int16_t Opt_5ms;
int16_t Opt_delay_comp; /* flag indicating delay compensation active */
} DECODER_CONFIG, *DECODER_CONFIG_HANDLE;
/*----------------------------------------------------------------------------------*
*
* Main IVAS decoder structure
......@@ -1142,7 +1167,10 @@ typedef struct Decoder_Struct
COMBINED_ORIENTATION_HANDLE hCombinedOrientationData; /* Combined external and head orientation data structure */
DIRAC_REND_HANDLE hDirACRend; /* DirAC renderer handle */
SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; /* Spatial parametric (DirAC rend, ParamBin, ParamISM) rendering common data handle. */
MASA_ISM_DATA_HANDLE hMasaIsmData;
MASA_ISM_DATA_HANDLE hMasaIsmData; /* OMASA rendering handle */
#ifdef FIX_782_OSBA_FUNCTION_NAMES
SBA_ISM_DATA_HANDLE hSbaIsmData; /* OSBA rendering handle */
#endif
int16_t flag_omasa_brate;
......
......@@ -261,7 +261,6 @@ static void stereo_dft_generate_comfort_noise(
hStereoCng->cm[b] = hStereoCng->coh[b];
}
}
else if ( hStereoCng->nr_dft_frames < CM_INIT && hStereoCng->nr_sid_frames < SID_INIT )
{
if ( hStereoCng->nr_corr_frames > CORR_INIT )
......@@ -273,7 +272,6 @@ static void stereo_dft_generate_comfort_noise(
hStereoCng->cm[b] = ( 1 - A_GFILT ) * hStereoCng->coh[b] + A_GFILT * hStereoCng->cm[b];
}
}
else
{
hStereoCng->cm[b] = ( 1 - A_GFILT ) * hStereoCng->coh[b] + A_GFILT * hStereoCng->cm[b];
......@@ -578,6 +576,7 @@ static void stereo_dft_generate_comfort_noise(
ptr_level++;
}
}
/* Compute noise level */
lp_noise = 0.0f;
ptr_level = hFdCngCom->cngNoiseLevel;
......@@ -677,8 +676,7 @@ void stereo_dtf_cng(
for ( n = 0; n < CPE_CHANNELS; n++ )
{
stereo_dft_generate_comfort_noise( hCPE->hStereoDft, hCPE->hStereoCng, hCPE->last_element_mode, sts[0], DFT, sts[1],
hCPE->hStereoTCA->targetGain, n, output_frame );
stereo_dft_generate_comfort_noise( hCPE->hStereoDft, hCPE->hStereoCng, hCPE->last_element_mode, sts[0], DFT, sts[1], hCPE->hStereoTCA->targetGain, n, output_frame );
}
}
}
......@@ -733,6 +731,7 @@ void stereo_cng_dec_update(
}
hCPE->hCoreCoder[0]->hFdCngDec->hFdCngCom->active_frame_counter = hCPE->hStereoCng->active_frame_counter;
return;
}
......
......@@ -294,8 +294,7 @@ ivas_error stereo_dft_dec_create(
stereo_dft_config( hStereoDft_loc->hConfig, element_brate, &tmpS, &tmpS );
}
stereo_dft_dec_open( hStereoDft_loc, output_Fs,
nchan_transport );
stereo_dft_dec_open( hStereoDft_loc, output_Fs, nchan_transport );
*hStereoDft = hStereoDft_loc;
......@@ -366,7 +365,6 @@ static void stereo_dft_dec_open(
hStereoDft->nbands = stereo_dft_band_config( hStereoDft->band_limits, hStereoDft->band_res[0], hStereoDft->NFFT, DEC );
hStereoDft->hb_stefi_delay = NS2SA( output_Fs, STEREO_DFT_TD_STEFI_DELAY_NS );
if ( nchan_transport > 2 )
{
hStereoDft->min_smooth_gains = min_smooth_gains2;
......@@ -405,10 +403,6 @@ void stereo_dft_dec_reset(
set_s( hStereoDft->side_gain_index, 15, STEREO_DFT_BAND_MAX );
set_s( hStereoDft->side_gain_index_previous, 15, STEREO_DFT_BAND_MAX );
/*IPD*/
/*ITD*/
/*residual prediction*/
set_s( hStereoDft->res_pred_mode, hStereoDft->hConfig->res_pred_mode, STEREO_DFT_DEC_DFT_NB );
for ( i = 0; i < STEREO_DFT_PAST_MAX; i++ )
......@@ -421,7 +415,6 @@ void stereo_dft_dec_reset(
set_s( hStereoDft->res_pred_index_previous, 0, STEREO_DFT_BAND_MAX );
for ( i = 0; i < STEREO_DFT_BAND_MAX; i++ )
{
hStereoDft->res_gains_ind[0][i] = 15.f;
......@@ -446,6 +439,7 @@ void stereo_dft_dec_reset(
hStereoDft->bpf_error_signal_last = 0.0f;
hStereoDft->bpf_error_ratio_mem = 1.0f;
hStereoDft->res_hb_nrg_mem = 0.0f;
/*reset parameters*/
set_zero( hStereoDft->side_gain, STEREO_DFT_DEC_DFT_NB * STEREO_DFT_BAND_MAX );
set_zero( hStereoDft->gipd, STEREO_DFT_DEC_DFT_NB );
......@@ -518,7 +512,6 @@ void stereo_dft_dec_reset(
hStereoDft->g_L_prev = 0.f;
hStereoDft->g_R_prev = 0.f;
return;
}
......@@ -1162,7 +1155,6 @@ void stereo_dft_dec(
HANDLE_FD_CNG_DEC hFdCngDec = st0->hFdCngDec;
HANDLE_FD_CNG_COM hFdCngCom = hFdCngDec->hFdCngCom;
int16_t *cna_seed = &( hFdCngCom->seed );
float DFT_W, DFT_Y;
output_frame = (int16_t) ( st0->output_Fs / FRAMES_PER_SEC );
......@@ -1206,11 +1198,7 @@ void stereo_dft_dec(
/* Smoothing for the current frame */
if ( sba_dirac_stereo_flag )
{
ivas_sba_dirac_stereo_smooth_parameters( hStereoDft,
hMdDec,
cross_fade_start_offset,
output_Fs,
num_md_sub_frames );
ivas_sba_dirac_stereo_smooth_parameters( hStereoDft, hMdDec, cross_fade_start_offset, output_Fs, num_md_sub_frames );
}
else
{
......@@ -1304,7 +1292,6 @@ void stereo_dft_dec(
}
}
#ifdef DEBUGGING
if ( dbgflag( "write_res" ) )
{
......@@ -1316,7 +1303,6 @@ void stereo_dft_dec(
dbgread( pDFT_RES, sizeof( float ), 2 * hStereoDft->band_limits[hStereoDft->res_cod_band_max], "dec_res.float" );
}
#endif
/* Apply active DMX */
/* pDFT_RES is used for the second channel in inactive frames */
if ( hStereoDft->frame_sid_nodata && !sba_dirac_stereo_flag )
......@@ -1357,7 +1343,6 @@ void stereo_dft_dec(
dbgwrite( &g, sizeof( float ), 1, 1, "./res/stereo_dft_dec_g.pcm" );
}
#endif
/* No residual coding in inactive frames, instead pDFT_RES is used for the second channel */
if ( b >= hStereoDft->res_cod_band_max && !hStereoDft->frame_sid_nodata && !( sba_dirac_stereo_flag && hMdDec ) )
{
......@@ -1396,6 +1381,7 @@ void stereo_dft_dec(
DFT_L[2 * i + 1] = ( 1 + g ) * pDFT_DMX[2 * i + 1] + gamma * pDFT_RES[2 * i + 1];
DFT_R[2 * i + 1] = ( 1 - g ) * pDFT_DMX[2 * i + 1] - gamma * pDFT_RES[2 * i + 1];
}
if ( pgIpd[0] != 0.f )
{
c0 = cosf( pgIpd[0] );
......@@ -1537,11 +1523,8 @@ void stereo_dft_dec(
}
else
{
for ( i = hStereoDft->band_limits[b]; i < min( stop, hStereoDft->band_limits[b + 1] ); i++ )
{
tmp = g * pDFT_DMX[2 * i] + pDFT_RES[2 * i] + DFT_PRED_RES[2 * i];
DFT_L[2 * i] = pDFT_DMX[2 * i] + tmp;
......@@ -1810,7 +1793,6 @@ void stereo_dft_dec_res(
}
}
#endif
mvr2r( win, output, L_FRAME8k );
#ifdef DEBUG_MODE_DFT
......@@ -1824,7 +1806,6 @@ void stereo_dft_dec_res(
dbgwrite( tmp, sizeof( int16_t ), L_FRAME8k, 1, "./res/stereo_dft_dec_res_decoded.pcm" );
}
#endif
if ( hCPE->hCoreCoder[0]->core == ACELP_CORE )
{
/* bass post-filter */
......@@ -1931,7 +1912,6 @@ void stereo_dft_dec_read_BS(
assert( *nb_bits <= 800 );
#endif
/*------------------------------------------------------------------*
* Initialization
*-----------------------------------------------------------------*/
......@@ -2469,6 +2449,7 @@ void stereo_dft_dec_read_BS(
return;
}
/*-------------------------------------------------------------------------
* stereo_dft_compute_td_stefi_params()
*
......@@ -2927,7 +2908,6 @@ void stereo_dft_generate_res_pred(
}
pop_wmops();
return;
}
......
......@@ -56,11 +56,9 @@
void stereo_dft_dmx_out_reset(
STEREO_DFT_DMX_DATA_HANDLE hStereoDftDmx /* i/o: DFT stereo DMX decoder */
)
{
{
hStereoDftDmx->targetGain = 1.0f;
hStereoDftDmx->prevTargetGain = 1.0f;
}
set_zero( hStereoDftDmx->memOutHB, NS2SA( 48000, STEREO_DFT32MS_OVL_NS ) );
set_zero( hStereoDftDmx->memTransitionHB, NS2SA( 48000, STEREO_DFT32MS_OVL_NS ) );
......@@ -124,7 +122,6 @@ void stereo_dft_unify_dmx(
dmx_nrg = stereo_dft_dmx_swb_nrg( DFT[0], DFT[0] + STEREO_DFT32MS_N_MAX, min( hStereoDft->NFFT, STEREO_DFT32MS_N_32k ) );
}
/* Analyze nature of current frame */
hStereoDft->trans = ( ( ( st0->clas_dec == ONSET ) || ( st0->clas_dec == SIN_ONSET ) || ( st0->clas_dec == UNVOICED_CLAS ) || ( st0->clas_dec == UNVOICED_TRANSITION ) ) || ( st0->stab_fac <= 0.25f ) ) ||
( st0->core == TCX_20_CORE && ( ( st0->hTcxCfg->tcx_last_overlap_mode == MIN_OVERLAP ) || ( st0->hTcxCfg->tcx_last_overlap_mode == HALF_OVERLAP ) ) ) || ( st0->core == TCX_10_CORE );
......@@ -243,6 +240,7 @@ void stereo_dft_unify_dmx(
return;
}
/*-------------------------------------------------------------------*
* add_HB_to_mono_dmx()
*
......
......@@ -68,10 +68,10 @@ static void ic_bwe_dec_reset(
set_f( hStereoICBWE->memShb_fsout_nonref, 0, INTERP_3_2_MEM_LEN );
hStereoICBWE->syn_dm_phase_nonref = 0;
return;
}
/*-------------------------------------------------------------------*
* stereo_icBWE_dec()
*
......
......@@ -270,13 +270,12 @@ void stereo_decoder_tcx(
}
}
}
else
{
if ( mdct_stereo_mode[k] != SMDCT_DUAL_MONO )
#ifdef DEBUGGING
else if ( mdct_stereo_mode[k] != SMDCT_DUAL_MONO )
{
assert( !"Not supported MDCT stereo mode!\n" );
}
}
#endif
if ( igf )
{
......@@ -308,10 +307,12 @@ void stereo_decoder_tcx(
}
}
}
#ifdef DEBUGGING
else if ( hStereoMdct->IGFStereoMode[k] != SMDCT_DUAL_MONO )
{
assert( !"Not supported MDCT stereo mode!\n" );
}
#endif
}
if ( !mct_on )
......
......@@ -44,6 +44,12 @@
#include "wmc_auto.h"
#include <math.h>
/*-------------------------------------------------------------------*
* Local constants
*-------------------------------------------------------------------*/
#define DFT2TD_CORR_THRESH 0.9f
/*-------------------------------------------------------------------*
* Function allocate_CoreCoder_TCX()
......@@ -421,8 +427,7 @@ ivas_error stereo_memory_dec(
deallocate_CoreCoder( hCPE->hCoreCoder[1] );
/* allocate DFT stereo data structure */
if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, 0,
nchan_transport ) ) != IVAS_ERR_OK )
if ( ( error = stereo_dft_dec_create( &( hCPE->hStereoDft ), hCPE->element_brate, output_Fs, 0, nchan_transport ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -1180,8 +1185,12 @@ void synchro_synthesis(
/*----------------------------------------------------------------*
* TD/MDCT stereo synchro
*----------------------------------------------------------------*/
if ( sba_dirac_stereo_flag )
{
return;
}
if ( hCPE->element_mode == IVAS_CPE_TD || hCPE->element_mode == IVAS_CPE_MDCT )
{
/* handling of DFT->TD switching */
......@@ -1783,8 +1792,6 @@ static float ncross_corr_self(
* switching from DFT stereo to TD stereo
*-------------------------------------------------------------------*/
#define DFT2TD_CORR_THRESH 0.9f
void smooth_dft2td_transition(
CPE_DEC_HANDLE hCPE, /* i/o: CPE decoder structure */
float *output[CPE_CHANNELS], /* i/o: synthesis @external Fs */
......
......@@ -77,6 +77,7 @@ void stereo_td_init_dec(
return;
}
/*-------------------------------------------------------------------*
* tdm_configure_dec()
*
......@@ -272,9 +273,7 @@ void tdm_configure_dec(
* bitbudget distribution between channels (taking into account also metadata bitbudget)
*----------------------------------------------------------------*/
tdm_bit_alloc( ivas_format,
ism_mode,
hCPE->element_brate - nb_bits_metadata * FRAMES_PER_SEC + hCPE->brate_surplus,
tdm_bit_alloc( ivas_format, ism_mode, hCPE->element_brate - nb_bits_metadata * FRAMES_PER_SEC + hCPE->brate_surplus,
hStereoTD->tdm_lp_reuse_flag, &( sts[0]->total_brate ), &( sts[1]->total_brate ),
&hStereoTD->tdm_low_rate_mode, sts[1]->coder_type, *tdm_ratio_idx, hStereoTD->tdm_Pitch_reuse_flag,
sts[0]->bwidth, sts[1]->bwidth, sts[0]->flag_ACELP16k, hStereoTD->tdm_LRTD_flag, mod_ct, tdm_inst_ratio_idx );
......@@ -400,6 +399,7 @@ static void tdm_upmix_fade(
return;
}
/*-------------------------------------------------------------------*
* stereo_tdm_combine()
*
......
......@@ -46,12 +46,14 @@
/*-----------------------------------------------------------------------*
* Local constants
*-----------------------------------------------------------------------*/
/* The SVD is sensitive to changes to the following constants, so please be careful when trying to tune things */
#define SVD_MINIMUM_VALUE 1e-32f /* minimum value */
#define CONVERGENCE_FACTOR 1.19209290e-07f /* factor for SVD convergence */
#define SVD_MAX_NUM_ITERATION 75 /* maximum number of interations before exiting the SVD */
#define SVD_ZERO_FLUSH_THRESHOLD 1.0e-20f
/*-----------------------------------------------------------------------*
* Local function prototypes
*-----------------------------------------------------------------------*/
......
......@@ -156,8 +156,7 @@ ivas_error vbap_init_data(
VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */
const float *speaker_node_azi_deg, /* i : vector of speaker node azimuths (positive left) */
const float *speaker_node_ele_deg, /* i : vector of speaker node elevations (positive up) */
const int16_t num_speaker_nodes /* i : number of speaker nodes in the set */
,
const int16_t num_speaker_nodes, /* i : number of speaker nodes in the set */
const IVAS_FORMAT ivas_format /* i : IVAS format */
)
{
......@@ -470,8 +469,7 @@ void vbap_determine_gains(
const VBAP_HANDLE hVBAPdata, /* i : prepared VBAP structure */
float *gains, /* o : gain vector for loudspeakers for given direction */
const int16_t azi_deg, /* i : azimuth in degrees for panning direction (positive left) */
const int16_t ele_deg /* i : elevation in degrees for panning direction (positive up)*/
,
const int16_t ele_deg, /* i : elevation in degrees for panning direction (positive up) */
const int16_t use_object_mode /* i : select between object mode panning and spatial mode panning */
)
{
......@@ -765,8 +763,7 @@ static void determine_virtual_speaker_node_division_gains(
int16_t connections[][2], /* i : vector of all connections */
const enum VirtualSpeakerNodeType type, /* i : virtual speaker node typel */
const int16_t max_num_connections, /* i : max number of connections */
const int16_t num_speaker_nodes /* i : max number of speaker nodes */
,
const int16_t num_speaker_nodes, /* i : max number of speaker nodes */
const int16_t use_object_mode /* i : use VBAP in object panning mode vs. spatial panning mode */
)
{
......
......@@ -105,31 +105,26 @@ static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_form
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 );
static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered,
#if defined SPLIT_REND_WITH_HEAD_ROT
const IVAS_DEC_PCM_TYPE pcmType,
void *data
#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 );
#else
int16_t *data
static ivas_error IVAS_DEC_Setup( IVAS_DEC_HANDLE hIvasDec, uint16_t *nTcBufferGranularity, uint8_t *nTransportChannels, uint8_t *nOutChannels, uint16_t *nSamplesRendered, int16_t *data );
#endif
);
static ivas_error IVAS_DEC_GetTcSamples( IVAS_DEC_HANDLE hIvasDec, float *pcmBuf, int16_t *nOutSamples );
static ivas_error IVAS_DEC_RendererFeedTcSamples( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *pcmBuf );
static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext,
#if defined SPLIT_REND_WITH_HEAD_ROT
IVAS_DEC_PCM_TYPE pcmType,
void *pcmBuf
#ifdef SPLIT_REND_WITH_HEAD_ROT
static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext, const IVAS_DEC_PCM_TYPE pcmType, void *pcmBuf );
#else
int16_t *pcmBuf
static ivas_error IVAS_DEC_GetRenderedSamples( IVAS_DEC_HANDLE hIvasDec, const uint16_t nSamplesForRendering, uint16_t *nSamplesRendered, uint16_t *nSamplesAvailableNext, int16_t *pcmBuf );
#endif
);
static ivas_error IVAS_DEC_GetBufferedNumberOfSamples( IVAS_DEC_HANDLE hIvasDec, int16_t *nSamplesBuffered );
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
static PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType );
static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t offset );
static ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int16_t nZeroSamples );
static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, const int32_t offset );
static ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, const int16_t nZeroSamples );
#endif
/*---------------------------------------------------------------------*
* IVAS_DEC_Open()
*
......@@ -373,7 +368,7 @@ ivas_error IVAS_DEC_Configure(
const uint32_t sampleRate, /* i : output sampling frequency */
const AUDIO_CONFIG outputConfig, /* i : output configuration */
const int16_t tsmEnabled, /* i : enable TSM */
const int16_t enable5ms,
const int16_t enable5ms, /* i : enable 5ms rendering path */
const int16_t customLsOutputEnabled, /* i : enable custom loudspeaker setup handle */
const int16_t hrtfReaderEnabled, /* i : enable HRTF binary file input */
const int16_t enableHeadRotation, /* i : enable head rotation for binaural output */
......@@ -435,6 +430,8 @@ ivas_error IVAS_DEC_Configure(
hDecoderConfig->nchan_out = audioCfg2channels( hDecoderConfig->output_config );
}
hDecoderConfig->Opt_tsm = tsmEnabled;
hDecoderConfig->Opt_5ms = enable5ms;
hDecoderConfig->Opt_LsCustom = customLsOutputEnabled;
hDecoderConfig->Opt_Headrotation = enableHeadRotation;
hDecoderConfig->orientation_tracking = orientation_tracking;
......@@ -451,6 +448,13 @@ ivas_error IVAS_DEC_Configure(
hDecoderConfig->Opt_aeid_on = acousticEnvironmentId != 65535 ? TRUE : FALSE;
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
{
hDecoderConfig->Opt_Headrotation = TRUE;
}
#endif
/* Set decoder parameters to initial values */
if ( ( error = ivas_init_decoder_front( st_ivas ) ) != IVAS_ERR_OK )
{
......@@ -462,8 +466,6 @@ ivas_error IVAS_DEC_Configure(
hIvasDec->st_ivas->ivas_format = MONO_FORMAT;
}
hDecoderConfig->Opt_tsm = tsmEnabled;
hDecoderConfig->Opt_5ms = enable5ms;
hIvasDec->nSamplesFrame = (uint16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC );
hIvasDec->nSamplesAvailableNext = 0;
hIvasDec->nSamplesRendered = 0;
......@@ -473,7 +475,8 @@ ivas_error IVAS_DEC_Configure(
return error;
}
#if defined( SPLIT_REND_WITH_HEAD_ROT )
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*---------------------------------------------------------------------*
* IVAS_DEC_EnableSplitRendering( )
*
......@@ -500,13 +503,34 @@ ivas_error IVAS_DEC_EnableSplitRendering(
hDecoderConfig->Opt_Headrotation = 1;
hDecoderConfig->Opt_5ms = false;
hDecoderConfig->Opt_Limiter = 0;
return error;
}
#endif
/*---------------------------------------------------------------------*
* IVAS_DEC_Set5msFlag( )
*
* Get the 5ms flag
*---------------------------------------------------------------------*/
ivas_error IVAS_DEC_Set5msFlag(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
const int16_t enable5ms /* i : 5ms flag */
)
{
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hDecoderConfig == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
}
hIvasDec->st_ivas->hDecoderConfig->Opt_5ms = enable5ms;
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_Get5msFlag( )
*
......@@ -528,6 +552,7 @@ ivas_error IVAS_DEC_Get5msFlag(
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_EnableVoIP( )
*
......@@ -570,13 +595,12 @@ ivas_error IVAS_DEC_EnableVoIP(
}
#endif
if ( ( error = input_format_API_to_internal( inputFormat, &hIvasDec->bitstreamformat, &hIvasDec->sdp_hf_only, true ) ) != IVAS_ERR_OK )
{
return error;
}
hIvasDec->hVoIP = malloc( sizeof( IVAS_DEC_VOIP ) );
if ( hIvasDec->hVoIP == NULL )
if ( ( hIvasDec->hVoIP = malloc( sizeof( IVAS_DEC_VOIP ) ) ) == NULL )
{
return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" );
}
......@@ -600,6 +624,7 @@ ivas_error IVAS_DEC_EnableVoIP(
{
return error;
}
if ( JB4_Init( hIvasDec->hVoIP->hJBM, jbmSafetyMargin ) != 0 )
{
return IVAS_ERR_FAILED_ALLOC;
......@@ -624,8 +649,6 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
{
ivas_error error;
error = IVAS_ERR_OK;
if ( !hIvasDec->isInitialized )
{
/* Once first frame is fed, finish initialization in EVS Mono.
......@@ -678,7 +701,10 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
}
}
error = read_indices( hIvasDec->st_ivas, serial, num_bits, &hIvasDec->prev_ft_speech, &hIvasDec->CNG, bfi );
if ( ( error = read_indices( hIvasDec->st_ivas, serial, num_bits, &hIvasDec->prev_ft_speech, &hIvasDec->CNG, bfi ) ) != IVAS_ERR_OK )
{
return error;
}
/* Update redundant frame information in EVS (post- read indices) */
if ( hIvasDec->mode == IVAS_DEC_MODE_EVS &&
......@@ -696,7 +722,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
hIvasDec->nSamplesRendered = 0;
hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame;
return error;
return IVAS_ERR_OK;
}
......@@ -708,7 +734,7 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
static ivas_error _GetSamples(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
const PCM_RESOLUTION pcm_resolution,
void *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */
#else
......@@ -720,8 +746,6 @@ static ivas_error _GetSamples(
Decoder_Struct *st_ivas;
ivas_error error;
error = IVAS_ERR_OK;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
......@@ -736,12 +760,11 @@ static ivas_error _GetSamples(
#if defined DEBUGGING && defined SPLIT_REND_WITH_HEAD_ROT
assert( pcm_resolution == PCM_INT16 );
#endif
if ( ( error = evs_dec_main( st_ivas, *nOutSamples, NULL,
#if defined SPLIT_REND_WITH_HEAD_ROT
(int16_t *)
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = evs_dec_main( st_ivas, *nOutSamples, NULL, (int16_t *) pcmBuf ) ) != IVAS_ERR_OK )
#else
if ( ( error = evs_dec_main( st_ivas, *nOutSamples, NULL, pcmBuf ) ) != IVAS_ERR_OK )
#endif
pcmBuf ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -749,12 +772,12 @@ static ivas_error _GetSamples(
else if ( hIvasDec->mode == IVAS_DEC_MODE_IVAS )
{
/* run the main IVAS decoding routine */
if ( ( error = ivas_dec( st_ivas,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcm_resolution,
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = ivas_dec( st_ivas, pcm_resolution, pcmBuf ) ) != IVAS_ERR_OK )
#else
if ( ( error = ivas_dec( st_ivas, pcmBuf ) ) != IVAS_ERR_OK )
#endif
pcmBuf ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -767,34 +790,34 @@ static ivas_error _GetSamples(
hIvasDec->hasDecodedFirstGoodFrame = true;
}
return error;
return IVAS_ERR_OK;
}
ivas_error IVAS_DEC_GetSamples(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
const int16_t nSamplesAsked, /* i : number of samples wanted by the caller */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */
void *pcmBuf, /* o : output synthesis signal */
#else
int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */
#endif
int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */
bool *needNewFrame /* indication that the decoder needs a new frame */
bool *needNewFrame /* o :indication that the decoder needs a new frame */
)
{
ivas_error error;
int16_t nOutSamplesElse, result, nSamplesToRender;
uint16_t nSamplesRendered, nSamplesRendered_loop, l_ts, nTimeScalerOutSamples;
uint8_t nTransportChannels, nOutChannels;
error = IVAS_ERR_OK;
nSamplesRendered = 0;
nOutChannels = 0;
nSamplesRendered_loop = 0;
l_ts = 0;
nTransportChannels = 0;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
......@@ -806,7 +829,7 @@ ivas_error IVAS_DEC_GetSamples(
*needNewFrame = true;
*nOutSamples = 0;
hIvasDec->needNewFrame = true;
return error;
return IVAS_ERR_OK;
}
/* check if we are still at the beginning with bad frames, put out zeroes, keep track of subframes */
......@@ -831,35 +854,35 @@ ivas_error IVAS_DEC_GetSamples(
if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame )
{
/* setup */
if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcmType,
pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels )
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, pcmType, pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) ) ) != IVAS_ERR_OK )
#else
pcmBuf + nSamplesRendered * nOutChannels
if ( ( error = IVAS_DEC_Setup( hIvasDec, &l_ts, &nTransportChannels, &nOutChannels, &nSamplesRendered_loop, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK )
#endif
) ) != IVAS_ERR_OK )
{
return error;
}
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
/* :TODO: change nSamplesAsked also if we are in 5ms 0dof split rendering... */
#endif
}
if ( !hIvasDec->st_ivas->hDecoderConfig->Opt_5ms )
{
if ( ( error = _GetSamples( hIvasDec,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcm_type_API_to_internal( pcmType ),
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = _GetSamples( hIvasDec, pcm_type_API_to_internal( pcmType ), pcmBuf, nOutSamples ) ) != IVAS_ERR_OK )
#else
if ( ( error = _GetSamples( hIvasDec, pcmBuf, nOutSamples ) ) != IVAS_ERR_OK )
#endif
pcmBuf, nOutSamples ) ) != IVAS_ERR_OK )
{
return error;
}
#ifdef DEBUGGING
assert( *nOutSamples == nSamplesAsked );
#endif
hIvasDec->nSamplesAvailableNext = 0;
hIvasDec->nSamplesRendered = *nOutSamples;
nSamplesRendered = *nOutSamples;
......@@ -874,10 +897,15 @@ ivas_error IVAS_DEC_GetSamples(
{
int16_t nResidualSamples, nSamplesTcsScaled;
nSamplesRendered += nSamplesRendered_loop;
if ( nTransportChannels != hIvasDec->nTransportChannelsOld )
{
IVAS_DEC_VoIP_reconfigure( hIvasDec, nTransportChannels, l_ts );
if ( ( error = IVAS_DEC_VoIP_reconfigure( hIvasDec, nTransportChannels, l_ts ) ) != IVAS_ERR_OK )
{
return error;
}
}
/* decode TCs only */
if ( ( error = IVAS_DEC_GetTcSamples( hIvasDec, hIvasDec->apaExecBuffer, &nOutSamplesElse ) ) != IVAS_ERR_OK )
{
......@@ -904,8 +932,6 @@ ivas_error IVAS_DEC_GetSamples(
nSamplesTcsScaled = nTimeScalerOutSamples / nTransportChannels;
/* render IVAS frames */
if ( ( error = IVAS_DEC_RendererFeedTcSamples( hIvasDec, nSamplesTcsScaled, &nResidualSamples, hIvasDec->apaExecBuffer ) ) != IVAS_ERR_OK )
{
return error;
......@@ -921,20 +947,19 @@ ivas_error IVAS_DEC_GetSamples(
}
hIvasDec->hasBeenFedFrame = false;
}
/* render IVAS frames directly to the output buffer */
nSamplesToRender = nSamplesAsked - nSamplesRendered;
if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcmType,
pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels )
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, pcmType, pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ) ) ) != IVAS_ERR_OK )
#else
pcmBuf + nSamplesRendered * nOutChannels
if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesRendered_loop, &hIvasDec->nSamplesAvailableNext, pcmBuf + nSamplesRendered * nOutChannels ) ) != IVAS_ERR_OK )
#endif
) ) != IVAS_ERR_OK )
{
return error;
}
nSamplesRendered += nSamplesRendered_loop;
nSamplesToRender -= nSamplesRendered_loop;
if ( hIvasDec->nSamplesAvailableNext == 0 )
......@@ -951,16 +976,23 @@ ivas_error IVAS_DEC_GetSamples(
*nOutSamples = nSamplesRendered;
return error;
return IVAS_ERR_OK;
}
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*---------------------------------------------------------------------*
* IVAS_DEC_GetSplitBinauralBitstream( )
*
*
*---------------------------------------------------------------------*/
ivas_error IVAS_DEC_GetSplitBinauralBitstream(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
void *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */
IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode*/
uint8_t *splitRendBitsBuf, /* o : output split rendering bits */
int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */
bool *needNewFrame /* indication that the decoder needs a new frame */
bool *needNewFrame /* o : indication that the decoder needs a new frame */
)
{
Decoder_Struct *st_ivas;
......@@ -978,7 +1010,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
ivas_error error;
IVAS_DEC_SPLIT_REND_WRAPPER *hSplitBinRend;
int16_t max_band;
int16_t pcm_out;
int16_t pcm_out_flag;
int16_t td_input;
int16_t numPoses;
......@@ -988,13 +1020,17 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
output_Fs = st_ivas->hDecoderConfig->output_Fs;
numSamplesPerChannelToDecode = (int16_t) ( output_Fs / FRAMES_PER_SEC );
*needNewFrame = FALSE;
*needNewFrame = false;
hSplitBinRend = &st_ivas->hSplitBinRend;
ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, hSplitRendBits );
if ( ( error = ivas_set_split_rend_setup( hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, splitRendBitsBuf ) ) != IVAS_ERR_OK )
{
return error;
}
numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses;
if ( st_ivas->hDecoderConfig->Opt_5ms &&
hIvasDec->st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS &&
if ( st_ivas->hDecoderConfig->Opt_5ms && hIvasDec->st_ivas->hRenderConfig->split_rend_config.codec == IVAS_SPLIT_REND_CODEC_LC3PLUS &&
( hIvasDec->st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE ||
hIvasDec->st_ivas->hRenderConfig->split_rend_config.dof == 0 ) )
{
......@@ -1004,8 +1040,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
if ( hSplitBinRend->tdDataOut == NULL )
{
/* Allocate enough space to save all decoded samples that will not be split encoded directly after decoding */
hSplitBinRend->tdDataOut = malloc( numSamplesPerChannelCacheSize * BINAURAL_CHANNELS * numPoses * sizeof( float ) );
if ( hSplitBinRend->tdDataOut == NULL )
if ( ( hSplitBinRend->tdDataOut = malloc( numSamplesPerChannelCacheSize * BINAURAL_CHANNELS * numPoses * sizeof( float ) ) ) == NULL )
{
return IVAS_ERR_FAILED_ALLOC;
}
......@@ -1025,14 +1060,7 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
if ( numSamplesPerChannelToDecode == numSamplesPerChannelToSplitEncode || hSplitBinRend->numTdSamplesPerChannelCached == 0 )
{
/* Decode and render */
error = IVAS_DEC_GetSamples(
hIvasDec,
numSamplesPerChannelToDecode,
IVAS_DEC_PCM_FLOAT,
pcmBuf,
nOutSamples,
needNewFrame );
if ( error != IVAS_ERR_OK )
if ( ( error = IVAS_DEC_GetSamples( hIvasDec, numSamplesPerChannelToDecode, IVAS_DEC_PCM_FLOAT, pcmBuf, nOutSamples, needNewFrame ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -1082,11 +1110,12 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream(
{
pOutput[i] = output[i];
}
max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 );
pcm_out = ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0;
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;
error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend,
if ( ( error = ivas_renderMultiBinToSplitBinaural( &hSplitBinRend->splitrend,
st_ivas->hHeadTrackData->Quaternions[0],
st_ivas->hRenderConfig->split_rend_config.splitRendBitRate,
st_ivas->hRenderConfig->split_rend_config.codec,
......@@ -1094,42 +1123,29 @@ 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 );
if ( error != IVAS_ERR_OK )
max_band, pOutput, 1, !td_input, pcm_out_flag ) ) != IVAS_ERR_OK )
{
return error;
}
/* convert to int16 with limiting for BINAURAL_SPLIT_PCM */
if ( pcm_out )
if ( pcm_out_flag )
{
if ( st_ivas->hDecoderConfig->Opt_5ms )
{
#ifndef DISABLE_LIMITER
ivas_limiter_dec( st_ivas->hLimiter, pOutput,
st_ivas->hDecoderConfig->nchan_out,
numSamplesPerChannelToSplitEncode, st_ivas->BER_detect );
ivas_limiter_dec( st_ivas->hLimiter, pOutput, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToSplitEncode, st_ivas->BER_detect );
#endif
}
else
{
ivas_limiter_dec( st_ivas->hLimiter, pOutput,
st_ivas->hDecoderConfig->nchan_out,
numSamplesPerChannelToSplitEncode, st_ivas->BER_detect );
ivas_limiter_dec( st_ivas->hLimiter, pOutput, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToSplitEncode, st_ivas->BER_detect );
}
#ifdef DEBUGGING
st_ivas->noClipping +=
#endif
ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode,
st_ivas->hDecoderConfig->nchan_out,
(int16_t *) pcmBuf_out );
ivas_syn_output( pOutput, numSamplesPerChannelToSplitEncode, st_ivas->hDecoderConfig->nchan_out, (int16_t *) pcmBuf_out );
}
free( st_ivas->hSplitBinRend.hMultiBinCldfbData );
......@@ -1151,7 +1167,7 @@ static ivas_error IVAS_DEC_Setup(
uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */
uint8_t *nOutChannels, /* o : number of decoded out channels (PCM or CLDFB) */
uint16_t *nSamplesRendered, /* o : number of samples flushed from the last frame */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */
void *data /* o : output synthesis signal */
#else
......@@ -1161,8 +1177,6 @@ static ivas_error IVAS_DEC_Setup(
{
ivas_error error;
error = IVAS_ERR_OK;
*nSamplesRendered = 0;
if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
......@@ -1194,11 +1208,11 @@ static ivas_error IVAS_DEC_Setup(
if ( st_ivas->bfi == 0 )
{
if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcm_type_API_to_internal( pcmType ),
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, pcm_type_API_to_internal( pcmType ), data ) ) != IVAS_ERR_OK )
#else
if ( ( error = ivas_dec_setup( st_ivas, nSamplesRendered, data ) ) != IVAS_ERR_OK )
#endif
data ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -1209,7 +1223,7 @@ static ivas_error IVAS_DEC_Setup(
*nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out;
}
return error;
return IVAS_ERR_OK;
}
......@@ -1228,8 +1242,6 @@ static ivas_error IVAS_DEC_GetTcSamples(
Decoder_Struct *st_ivas;
ivas_error error;
error = IVAS_ERR_OK;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
......@@ -1262,9 +1274,10 @@ static ivas_error IVAS_DEC_GetTcSamples(
hIvasDec->hasDecodedFirstGoodFrame = true;
}
return error;
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_Rendered_FeedTcSamples( )
*
......@@ -1282,8 +1295,6 @@ static ivas_error IVAS_DEC_RendererFeedTcSamples(
ivas_error error;
error = IVAS_ERR_OK;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
......@@ -1292,14 +1303,12 @@ static ivas_error IVAS_DEC_RendererFeedTcSamples(
st_ivas = hIvasDec->st_ivas;
/* feed the TCs to the IVAS renderer */
if ( ( error = ivas_jbm_dec_feed_tc_to_renderer( st_ivas, nSamplesForRendering, nSamplesResidual, pcmBuf ) ) != IVAS_ERR_OK )
{
return error;
}
error = ivas_jbm_dec_feed_tc_to_renderer( st_ivas, nSamplesForRendering, nSamplesResidual, pcmBuf );
return error;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_GetRenderedSamples( )
*
......@@ -1311,7 +1320,7 @@ static ivas_error IVAS_DEC_GetRenderedSamples(
const uint16_t nSamplesForRendering, /* i : number of TC samples wanted from the renderer */
uint16_t *nSamplesRendered, /* o : number of samples rendered */
uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the renerer pipeline */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
IVAS_DEC_PCM_TYPE pcmType,
void *pcmBuf
#else
......@@ -1322,8 +1331,6 @@ static ivas_error IVAS_DEC_GetRenderedSamples(
Decoder_Struct *st_ivas;
ivas_error error;
error = IVAS_ERR_OK;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
......@@ -1332,15 +1339,11 @@ static ivas_error IVAS_DEC_GetRenderedSamples(
st_ivas = hIvasDec->st_ivas;
/* run the main IVAS decoding routine */
if ( ( error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcm_type_API_to_internal( pcmType ),
#ifdef SPLIT_REND_WITH_HEAD_ROT
error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext, pcm_type_API_to_internal( pcmType ), pcmBuf );
#else
error = ivas_jbm_dec_render( st_ivas, nSamplesForRendering, nSamplesRendered, nSamplesAvailableNext, pcmBuf );
#endif
pcmBuf ) ) != IVAS_ERR_OK )
{
return error;
}
return error;
}
......@@ -1357,21 +1360,19 @@ static ivas_error IVAS_DEC_GetBufferedNumberOfSamples(
int16_t *nSamplesBuffered /* o : number of samples still buffered */
)
{
ivas_error error;
error = IVAS_ERR_OK;
*nSamplesBuffered = 0;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
}
/* check if the TC buffer already exists, otherweise nothing is buffered anyway */
if ( hIvasDec->st_ivas->hTcBuffer != NULL )
{
*nSamplesBuffered = hIvasDec->st_ivas->hTcBuffer->n_samples_buffered - hIvasDec->st_ivas->hTcBuffer->n_samples_rendered;
}
return error;
return IVAS_ERR_OK;
}
......@@ -1556,7 +1557,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */
IVAS_VECTOR3 Pos, /* i : listener position */
const int16_t subframe_idx /*subframe index*/
const int16_t subframe_idx /* i : subframe index */
#ifdef SPLIT_REND_WITH_HEAD_ROT
,
const IVAS_SPLIT_REND_ROT_AXIS rot_axis
......@@ -1564,6 +1565,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
)
{
HEAD_TRACK_DATA_HANDLE hHeadTrackData;
ivas_error error;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
......@@ -1584,12 +1586,15 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
Euler2Quat( deg2rad( orientation.x ), deg2rad( orientation.y ), deg2rad( orientation.z ), &orientation );
}
ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[subframe_idx] );
if ( ( error = ivas_orient_trk_Process( hHeadTrackData->OrientationTracker, orientation, FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES, &hHeadTrackData->Quaternions[subframe_idx] ) ) != IVAS_ERR_OK )
{
return error;
}
hHeadTrackData->Pos[subframe_idx].x = Pos.x;
hHeadTrackData->Pos[subframe_idx].y = Pos.y;
hHeadTrackData->Pos[subframe_idx].z = Pos.z;
#ifdef SPLIT_REND_WITH_HEAD_ROT
hHeadTrackData->sr_pose_pred_axis = rot_axis;
#endif
......@@ -1837,7 +1842,15 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle(
return IVAS_ERR_OK;
}
static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_RENDER_CONFIG_HANDLE hRCout )
/*---------------------------------------------------------------------*
* copyRendererConfigStruct( )
*
*
*---------------------------------------------------------------------*/
static ivas_error copyRendererConfigStruct(
RENDER_CONFIG_HANDLE hRCin,
IVAS_RENDER_CONFIG_HANDLE hRCout )
{
if ( hRCin == NULL || hRCout == NULL )
{
......@@ -1883,6 +1896,7 @@ static ivas_error copyRendererConfigStruct( RENDER_CONFIG_HANDLE hRCin, IVAS_REN
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_GetRenderConfig( )
*
......@@ -2268,7 +2282,7 @@ ivas_error IVAS_DEC_VoIP_SetScale(
ivas_error IVAS_DEC_VoIP_GetSamples(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
IVAS_DEC_PCM_TYPE pcmType,
void *pcmBuf,
#else
......@@ -2280,7 +2294,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
JbmTraceFileWriterFn jbmWriterFn,
void *jbmWriter
#endif
)
{
Decoder_Struct *st_ivas;
......@@ -2295,13 +2308,10 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
int16_t nSamplesRendered;
uint8_t nOutChannels;
error = IVAS_ERR_OK;
st_ivas = hIvasDec->st_ivas;
hDecoderConfig = st_ivas->hDecoderConfig;
hVoIP = hIvasDec->hVoIP;
timeScalingDone = 0;
nOutChannels = (uint8_t) st_ivas->hDecoderConfig->nchan_out;
nSamplesRendered = 0;
......@@ -2319,24 +2329,24 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
nSamplesBuffered = 0;
if ( hIvasDec->hasBeenFedFirstGoodFrame )
{
IVAS_DEC_GetBufferedNumberOfSamples( hIvasDec, &nSamplesBuffered );
if ( ( error = IVAS_DEC_GetBufferedNumberOfSamples( hIvasDec, &nSamplesBuffered ) ) != IVAS_ERR_OK )
{
return error;
}
}
extBufferedSamples = nSamplesRendered + nSamplesBuffered;
extBufferedSamples = nSamplesRendered + nSamplesBuffered;
extBufferedTime_ms = extBufferedSamples * 1000 / hDecoderConfig->output_Fs;
dataUnit = NULL;
/* pop one access unit from the jitter buffer */
result = JB4_PopDataUnit( hVoIP->hJBM, systemTimestamp_ms, extBufferedTime_ms, &dataUnit, &scale, &maxScaling );
if ( result != 0 )
{
return IVAS_ERR_UNKNOWN;
}
maxScaling = maxScaling * hDecoderConfig->output_Fs / 1000;
/* avoid time scaling multiple times in one sound card slot */
if ( scale != 100U )
{
......@@ -2360,7 +2370,10 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
scale = APA_MAX_SCALE;
}
IVAS_DEC_VoIP_SetScale( hIvasDec, (int16_t) maxScaling, (int16_t) scale );
if ( ( error = IVAS_DEC_VoIP_SetScale( hIvasDec, (int16_t) maxScaling, (int16_t) scale ) ) != IVAS_ERR_OK )
{
return error;
}
/* copy bitstream into decoder state */
if ( dataUnit )
......@@ -2368,12 +2381,20 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
hIvasDec->hVoIP->hCurrentDataUnit = dataUnit;
bsCompactToSerial( dataUnit->data, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize );
IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 );
if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, dataUnit->dataSize, 0 ) ) != IVAS_ERR_OK )
{
return error;
}
}
else if ( hIvasDec->hasDecodedFirstGoodFrame )
{
/* Decoder has been initialized with first good frame - do PLC */
IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 );
if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, hIvasDec->hVoIP->bs_conversion_buf, 0, 1 ) ) != IVAS_ERR_OK )
{
return error;
}
}
#ifdef SUPPORT_JBM_TRACEFILE
......@@ -2399,22 +2420,25 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
{
hVoIP->lastDecodedWasActive = !dataUnit->silenceIndicator;
}
/* data unit memory is no longer used */
JB4_FreeDataUnit( hVoIP->hJBM, dataUnit );
}
if ( !hIvasDec->hasBeenFedFirstGoodFrame )
{
hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame;
hIvasDec->nSamplesRendered = 0;
}
}
/* decode */
if ( !hIvasDec->hasBeenFedFirstGoodFrame )
{
/* codec mode to use not known yet - simply output silence */
/* directly set output zero */
int16_t nSamplesToZero = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext );
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
set_pcm_buffer_to_zero( pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ), pcmType, nSamplesToZero * nOutChannels );
#else
set_s( pcmBuf + nSamplesRendered * nOutChannels, 0, nSamplesToZero * nOutChannels );
......@@ -2430,23 +2454,23 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
nSamplesToRender = nSamplesPerChannel - nSamplesRendered;
/* render IVAS frames directly to the output buffer */
if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcmType,
pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ),
#ifdef SPLIT_REND_WITH_HEAD_ROT
if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmType, pcm_buffer_offset( pcmBuf, pcmType, nSamplesRendered * nOutChannels ), &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK )
#else
pcmBuf + nSamplesRendered * nOutChannels,
if ( ( error = IVAS_DEC_GetSamples( hIvasDec, nSamplesToRender, pcmBuf + nSamplesRendered * nOutChannels, &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK )
#endif
&nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK )
{
return error;
}
nSamplesRendered += nSamplesRendered_loop;
}
}
return error;
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_VoIP_Flush( )
*
......@@ -2456,7 +2480,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
ivas_error IVAS_DEC_Flush(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
const IVAS_DEC_PCM_TYPE pcmType,
void *pcmBuf,
#else
......@@ -2469,20 +2493,17 @@ ivas_error IVAS_DEC_Flush(
uint16_t nSamplesToRender;
uint16_t nSamplesFlushedLocal;
error = IVAS_ERR_OK;
*nSamplesFlushed = min( nSamplesPerChannel, hIvasDec->nSamplesAvailableNext );
nSamplesToRender = (uint16_t) *nSamplesFlushed;
/* render IVAS frames */
if ( ( error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext,
#if defined SPLIT_REND_WITH_HEAD_ROT
pcmType,
#ifdef SPLIT_REND_WITH_HEAD_ROT
error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmType, pcmBuf );
#else
error = IVAS_DEC_GetRenderedSamples( hIvasDec, nSamplesToRender, &nSamplesFlushedLocal, &hIvasDec->nSamplesAvailableNext, pcmBuf );
#endif
pcmBuf ) ) != IVAS_ERR_OK )
{
return error;
}
return error;
}
......@@ -2719,6 +2740,7 @@ static ivas_error get_channel_config(
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* printConfigInfo_dec( )
*
......@@ -2899,20 +2921,25 @@ static ivas_error printConfigInfo_dec(
/*-----------------------------------------------------------------*
* Print TSM mode info
*-----------------------------------------------------------------*/
if ( st_ivas->hDecoderConfig->Opt_tsm )
{
fprintf( stdout, "TSM mode: ON\n" );
}
/*-----------------------------------------------------------------*
* Print 5ms API mode info
*-----------------------------------------------------------------*/
if ( st_ivas->hDecoderConfig->Opt_5ms )
{
fprintf( stdout, "API 5ms mode: ON\n" );
}
return IVAS_ERR_OK;
}
/*---------------------------------------------------------------------*
* IVAS_DEC_PrintConfig( )
*
......@@ -3018,8 +3045,6 @@ static ivas_error evs_dec_main(
int16_t ch;
ivas_error error;
error = IVAS_ERR_OK;
hCoreCoder = st_ivas->hSCE[0]->hCoreCoder;
hCoreCoder[0]->total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
......@@ -3083,10 +3108,7 @@ static ivas_error evs_dec_main(
v_multc( output[0], mixer_left, output[0], nOutSamples );
}
if ( !st_ivas->hDecoderConfig->Opt_tsm && st_ivas->hDecoderConfig->Opt_5ms
)
if ( !st_ivas->hDecoderConfig->Opt_tsm && st_ivas->hDecoderConfig->Opt_5ms )
{
ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples );
}
......@@ -3110,12 +3132,11 @@ static ivas_error evs_dec_main(
ivas_syn_output( p_output, nOutSamples, st_ivas->hDecoderConfig->nchan_out, pcmBuf );
}
return error;
return IVAS_ERR_OK;
}
#ifdef DEBUGGING
/*---------------------------------------------------------------------*
* IVAS_DEC_GetBer_detect_flag()
*
......@@ -3327,16 +3348,14 @@ static int16_t IVAS_DEC_VoIP_GetRenderGranularity(
*
*
*---------------------------------------------------------------------*/
static ivas_error IVAS_DEC_VoIP_reconfigure(
IVAS_DEC_HANDLE hIvasDec,
const uint16_t nTransportChannels,
const uint16_t l_ts )
{
int16_t apa_buffer_size;
ivas_error error;
apa_buffer_size = hIvasDec->nSamplesFrame;
if ( hIvasDec->apaExecBuffer == NULL )
......@@ -3378,8 +3397,8 @@ static ivas_error IVAS_DEC_VoIP_reconfigure(
{
return IVAS_ERR_INIT_ERROR;
}
if ( apa_init( &hIvasDec->hTimeScaler,
nTransportChannels ) != IVAS_ERR_OK ||
if ( apa_init( &hIvasDec->hTimeScaler, nTransportChannels ) != IVAS_ERR_OK ||
apa_set_rate( hIvasDec->hTimeScaler, hDecoderConfig->output_Fs ) != 0 ||
apa_set_complexity_options( hIvasDec->hTimeScaler, wss, css ) != 0 ||
apa_set_quality( hIvasDec->hTimeScaler, startQuality, 4, 4 ) != 0 ||
......@@ -3388,7 +3407,6 @@ static ivas_error IVAS_DEC_VoIP_reconfigure(
return IVAS_ERR_INIT_ERROR;
}
if ( hIvasDec->mode == IVAS_DEC_MODE_EVS )
{
if ( apa_set_evs_compat_mode( hIvasDec->hTimeScaler, true ) != 0 )
......@@ -3396,8 +3414,8 @@ static ivas_error IVAS_DEC_VoIP_reconfigure(
return IVAS_ERR_INIT_ERROR;
}
}
if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL )
if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL )
{
return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" );
}
......@@ -3426,9 +3444,7 @@ static ivas_error IVAS_DEC_VoIP_reconfigure(
hIvasDec->nTransportChannelsOld = nTransportChannels;
error = IVAS_ERR_OK;
return error;
return IVAS_ERR_OK;
}
......@@ -3456,6 +3472,7 @@ ivas_error IVAS_DEC_GetSplitRendBits(
splitRendBits->buf_len = hIvasDec->st_ivas->hSplitBinRend.hSplitRendBits->buf_len;
splitRendBits->codec = hIvasDec->st_ivas->hSplitBinRend.hSplitRendBits->codec;
splitRendBits->pose_correction = hIvasDec->st_ivas->hSplitBinRend.hSplitRendBits->pose_correction;
splitRendBits->codec_frame_size_ms = hIvasDec->st_ivas->hSplitBinRend.hSplitRendBits->codec_frame_size_ms;
return IVAS_ERR_OK;
}
......@@ -3480,8 +3497,6 @@ ivas_error IVAS_DEC_GetCldfbSamples(
ivas_error error;
int16_t ch, b, slot_idx, num_chs, maxBand, num_samples;
error = IVAS_ERR_OK;
if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )
{
return IVAS_ERR_UNEXPECTED_NULL_POINTER;
......@@ -3519,12 +3534,22 @@ ivas_error IVAS_DEC_GetCldfbSamples(
*nOutSamples = num_samples;
return error;
return IVAS_ERR_OK;
}
#endif
#if defined SPLIT_REND_WITH_HEAD_ROT
void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t offset )
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*---------------------------------------------------------------------*
* pcm_buffer_offset()
*
*
*---------------------------------------------------------------------*/
static void *pcm_buffer_offset(
void *buffer,
const IVAS_DEC_PCM_TYPE pcmType,
const int32_t offset )
{
switch ( pcmType )
{
......@@ -3545,10 +3570,19 @@ void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int32_t
}
}
ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, int16_t nZeroSamples )
/*---------------------------------------------------------------------*
* set_pcm_buffer_to_zero()
*
*
*---------------------------------------------------------------------*/
static ivas_error set_pcm_buffer_to_zero(
void *buffer,
const IVAS_DEC_PCM_TYPE pcmType,
const int16_t nZeroSamples )
{
ivas_error error;
error = IVAS_ERR_OK;
switch ( pcmType )
{
......@@ -3561,13 +3595,23 @@ ivas_error set_pcm_buffer_to_zero( void *buffer, const IVAS_DEC_PCM_TYPE pcmType
default:
error = IVAS_ERR_INTERNAL;
}
return error;
return IVAS_ERR_OK;
}
PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType )
/*---------------------------------------------------------------------*
* pcm_type_API_to_internal()
*
*
*---------------------------------------------------------------------*/
PCM_RESOLUTION pcm_type_API_to_internal(
const IVAS_DEC_PCM_TYPE pcmType )
{
PCM_RESOLUTION pcm_resolution;
pcm_resolution = PCM_NOT_KNOW;
switch ( pcmType )
{
case IVAS_DEC_PCM_FLOAT:
......@@ -3579,6 +3623,7 @@ PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType )
default:
pcm_resolution = PCM_NOT_KNOW;
}
return pcm_resolution;
}
......
......@@ -74,7 +74,7 @@ typedef enum _IVAS_DEC_FORCED_REND_MODE
} IVAS_DEC_FORCED_REND_MODE;
#endif
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
typedef enum _IVAS_DEC_PCM_TYPE
{
IVAS_DEC_PCM_INT16,
......@@ -162,27 +162,25 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
ivas_error IVAS_DEC_GetSamples(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
const int16_t nSamplesAsked, /* i : number of samples wanted by the caller */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */
void *pcmBuf, /* o : output synthesis signal */
#else
int16_t *pcmBuf, /* i/o: buffer for decoded PCM output. The memory must already be allocated and be able to hold the expected number of output samples, based on frame size and number of output channels */
#endif
int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */
bool *needNewFrame /* indication that the decoder needs a new frame */
bool *needNewFrame /* o : indication that the decoder needs a new frame */
);
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
ivas_error IVAS_DEC_GetSplitBinauralBitstream(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
void *pcmBuf_out, /* o : output synthesis signal for BINAURAL_SPLIT_PCM */
IVAS_SPLIT_REND_BITS_HANDLE hSplitRendBits, /* o : bitstream output for split rendering mode */
uint8_t *splitRendBitsBuf, /* o : output split rendering bits */
int16_t *nOutSamples, /* o : number of samples per channel written to output buffer */
bool *needNewFrame /* indication that the decoder needs a new frame */
bool *needNewFrame /* o : indication that the decoder needs a new frame */
);
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*! r: decoder error code */
ivas_error IVAS_DEC_GetSplitRendBits(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
......@@ -219,7 +217,7 @@ ivas_error IVAS_DEC_FeedHeadTrackData(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
IVAS_QUATERNION orientation, /* i : head-tracking data, listener orientation */
IVAS_VECTOR3 Pos, /* i : listener position */
const int16_t subframe_idx /*subframe index*/
const int16_t subframe_idx /* i : subframe index */
#ifdef SPLIT_REND_WITH_HEAD_ROT
,
IVAS_SPLIT_REND_ROT_AXIS rot_axis /* i : external control for rotation axis for split rendering */
......@@ -270,7 +268,7 @@ ivas_error IVAS_DEC_VoIP_SetScale(
ivas_error IVAS_DEC_VoIP_GetSamples(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
IVAS_DEC_PCM_TYPE pcmType,
void *pcmBuf,
#else
......@@ -286,7 +284,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples(
ivas_error IVAS_DEC_Flush(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
const int16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */
#if defined SPLIT_REND_WITH_HEAD_ROT
#ifdef SPLIT_REND_WITH_HEAD_ROT
const IVAS_DEC_PCM_TYPE pcmType,
void *pcmBuf,
#else
......@@ -305,18 +303,22 @@ ivas_error IVAS_DEC_EnableVoIP(
);
#ifdef SPLIT_REND_WITH_HEAD_ROT
/*! r: error code */
ivas_error IVAS_DEC_EnableSplitRendering(
IVAS_DEC_HANDLE hIvasDec /* i/o: IVAS decoder handle */
);
#endif
ivas_error IVAS_DEC_Set5msFlag(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
const int16_t enable5ms /* i : 5ms flag */
);
ivas_error IVAS_DEC_Get5msFlag(
IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */
int16_t *enable5ms /* o : 5ms flag */
);
#ifdef DEBUGGING
bool IVAS_DEC_GetBerDetectFlag(
IVAS_DEC_HANDLE hIvasDec /* i : IVAS decoder handle */
......
......@@ -1064,7 +1064,6 @@ typedef struct Decoder_State
AMRWB_IO_DEC_HANDLE hAmrwb_IO;
/*----------------------------------------------------------------------------------*
* SC-VBR parameters
*----------------------------------------------------------------------------------*/
......@@ -1159,7 +1158,6 @@ typedef struct Decoder_State
FD_BWE_DEC_HANDLE hBWE_FD;
/*----------------------------------------------------------------------------------*
* LD music post-filter
*----------------------------------------------------------------------------------*/
......@@ -1177,7 +1175,6 @@ typedef struct Decoder_State
TCX_DEC_HANDLE hTcxDec;
/*----------------------------------------------------------------------------------*
* Mode 2
*----------------------------------------------------------------------------------*/
......@@ -1336,7 +1333,7 @@ typedef struct Decoder_State
TEC_DEC_HANDLE hTECDec;
/*----------------------------------------------------------------------------------*
* Stereo/IVAS parameters
* IVAS parameters
*----------------------------------------------------------------------------------*/
int16_t tdm_LRTD_flag; /* LRTD stereo mode flag */
......
......@@ -255,8 +255,7 @@ void dtx(
/* reset the bitstream (IVAS format signaling was already written) */
if ( st->element_mode != IVAS_CPE_MDCT && st->hBstr != NULL )
{
reset_indices_enc( st->hBstr,
st->hBstr->nb_ind_tot );
reset_indices_enc( st->hBstr, st->hBstr->nb_ind_tot );
}
}
......
......@@ -169,9 +169,7 @@ ivas_error encod_ppp(
}
/* delete previous indices */
reset_indices_enc( hBstr,
hBstr->nb_ind_tot );
reset_indices_enc( hBstr, hBstr->nb_ind_tot );
/* signaling matrix (writing of signaling bits) */
signaling_enc( st );
......
......@@ -923,11 +923,9 @@ void stereoFdCngCoherence(
else if ( sts[0]->core_brate <= SID_2k40 && sts[1]->core_brate <= SID_2k40 )
{
/* case: no VAD for both channels -> INACTIVE FRAME */
reset_indices_enc( sts[0]->hBstr,
sts[0]->hBstr->nb_ind_tot );
reset_indices_enc( sts[0]->hBstr, sts[0]->hBstr->nb_ind_tot );
reset_indices_enc( sts[1]->hBstr,
sts[1]->hBstr->nb_ind_tot );
reset_indices_enc( sts[1]->hBstr, sts[1]->hBstr->nb_ind_tot );
/* synchronize SID sending for variable SID rate */
if ( sts[0]->core_brate != sts[1]->core_brate )
......
......@@ -63,7 +63,7 @@ ivas_error init_encoder(
const ISM_MODE ism_mode /* i : ISM mode */
#ifdef IGF_MEMORY_ALLOC_OPT
,
const int32_t element_brate
const int32_t element_brate /* i : element bitrate */
#endif
)
{
......@@ -873,6 +873,7 @@ ivas_error init_encoder(
/*-----------------------------------------------------------------*
* Transient detector
*-----------------------------------------------------------------*/
if ( ( st->hTranDet = (TRAN_DET_HANDLE) malloc( sizeof( TRAN_DET_DATA ) ) ) == NULL )
{
return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for Transient Detection\n" ) );
......
......@@ -96,6 +96,7 @@ ivas_error ivas_corecoder_enc_reconfig(
/*-----------------------------------------------------------------*
* Switching between SCE(s)/CPE(s)/MCT
*-----------------------------------------------------------------*/
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
if ( nchan_transport_real == nchan_transport_old_real && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old ) /* in McMASA, nchan_transport may be the same, but nSCE/nCPE differs */
#else
......@@ -294,15 +295,10 @@ ivas_error ivas_corecoder_enc_reconfig(
mvr2r( input_buff[sce_id], st_ivas->hSCE[sce_id]->hCoreCoder[0]->input_buff, len_inp_memory );
}
/* only reset indices if it is not the first index list, this already contains the IVAS format bits */
if ( sce_id > 0 || hEncoderConfig->ivas_format == MASA_ISM_FORMAT )
{
reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr,
st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->nb_ind_tot );
}
else
{
reset_indices_enc( st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr, st_ivas->hSCE[sce_id]->hCoreCoder[0]->hBstr->nb_ind_tot );
}
}
}
......@@ -325,11 +321,7 @@ ivas_error ivas_corecoder_enc_reconfig(
( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->nSCE > 0 ) ||
( hEncoderConfig->ivas_format == MASA_ISM_FORMAT && st_ivas->nSCE > 0 ) )
{
reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr,
st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_ind_tot );
}
else
{
reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_ind_tot );
}
}
}
......@@ -360,11 +352,7 @@ ivas_error ivas_corecoder_enc_reconfig(
/* only reset indices if it is not the first index list, this already contains the IVAS format bits */
if ( cpe_id * CPE_CHANNELS + n > 0 || ( st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->nSCE > 0 ) )
{
reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr,
st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_ind_tot );
}
else
{
reset_indices_enc( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr, st_ivas->hCPE[cpe_id]->hCoreCoder[n]->hBstr->nb_ind_tot );
}
if ( hEncoderConfig->Opt_DTX_ON )
......@@ -449,13 +437,7 @@ ivas_error ivas_corecoder_enc_reconfig(
st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode );
#ifdef IGF_MEMORY_ALLOC_OPT
if ( ( error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc,
st_ivas->hCPE[0]->hCoreCoder[n]->igf,
1,
st_ivas->hCPE[0]->element_brate,
st_ivas->hCPE[0]->hCoreCoder[n]->bwidth,
st_ivas->hCPE[0]->hCoreCoder[n]->element_mode,
st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode ) ) != IVAS_ERR_OK )
if ( ( error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc, st_ivas->hCPE[0]->hCoreCoder[n]->igf, 1, st_ivas->hCPE[0]->element_brate, st_ivas->hCPE[0]->hCoreCoder[n]->bwidth, st_ivas->hCPE[0]->hCoreCoder[n]->element_mode, st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -535,13 +517,7 @@ ivas_error ivas_corecoder_enc_reconfig(
st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode );
#ifdef IGF_MEMORY_ALLOC_OPT
if ( ( error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc,
st_ivas->hCPE[0]->hCoreCoder[n]->igf,
1,
st_ivas->hCPE[0]->element_brate,
st_ivas->hCPE[0]->hCoreCoder[n]->bwidth,
st_ivas->hCPE[0]->hCoreCoder[n]->element_mode,
st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode ) ) != IVAS_ERR_OK )
if ( ( error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc, st_ivas->hCPE[0]->hCoreCoder[n]->igf, 1, st_ivas->hCPE[0]->element_brate, st_ivas->hCPE[0]->hCoreCoder[n]->bwidth, st_ivas->hCPE[0]->hCoreCoder[n]->element_mode, st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode ) ) != IVAS_ERR_OK )
{
return error;
}
......
......@@ -279,10 +279,8 @@ ivas_error ivas_cpe_enc(
}
if ( hCPE->element_mode != IVAS_CPE_MDCT && ( hCPE->element_brate != hCPE->last_element_brate || hCPE->last_element_mode != hCPE->element_mode ||
sts[0]->ini_frame == 0 ||
( ivas_total_brate != st_ivas->hEncoderConfig->last_ivas_total_brate ) ||
sts[0]->last_core_brate <= SID_2k40 ) ) /* If the last frame was SID or NO_DATA, we need to run stereo_dft_config here since VAD decision is not known yet */
if ( hCPE->element_mode != IVAS_CPE_MDCT && ( hCPE->element_brate != hCPE->last_element_brate || hCPE->last_element_mode != hCPE->element_mode || sts[0]->ini_frame == 0 ||
( ivas_total_brate != st_ivas->hEncoderConfig->last_ivas_total_brate ) || sts[0]->last_core_brate <= SID_2k40 ) ) /* If the last frame was SID or NO_DATA, we need to run stereo_dft_config here since VAD decision is not known yet */
{
if ( st_ivas->hQMetaData != NULL )
{
......@@ -575,10 +573,7 @@ ivas_error ivas_cpe_enc(
{
tdm_ol_pitch_comparison( hCPE, pitch_fr, voicing_fr );
tdm_configure_enc(
ivas_format,
st_ivas->ism_mode,
hCPE, Etot_last, tdm_SM_or_LRTD_Pri, tdm_ratio_idx, tdm_ratio_idx_SM, attack_flag[0], nb_bits_metadata );
tdm_configure_enc( ivas_format, st_ivas->ism_mode, hCPE, Etot_last, tdm_SM_or_LRTD_Pri, tdm_ratio_idx, tdm_ratio_idx_SM, attack_flag[0], nb_bits_metadata );
if ( hEncoderConfig->Opt_DTX_ON )
{
......@@ -916,11 +911,10 @@ ivas_error create_cpe_enc(
st->total_brate = hCPE->element_brate / ( st_ivas->nCPE > 1 ? 1 : CPE_CHANNELS ); /* dummy initialization for getting right pointers initialization of input buffers in init_coder_ace_plus() */
st->mct_chan_mode = MCT_CHAN_MODE_REGULAR;
if ( ( error = init_encoder( st, st_ivas, n, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 0,
#ifdef IGF_MEMORY_ALLOC_OPT
ISM_MODE_NONE, hCPE->element_brate ) ) != IVAS_ERR_OK )
if ( ( error = init_encoder( st, st_ivas, n, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 0, ISM_MODE_NONE, hCPE->element_brate ) ) != IVAS_ERR_OK )
#else
ISM_MODE_NONE ) ) != IVAS_ERR_OK )
if ( ( error = init_encoder( st, st_ivas, n, hEncoderConfig->var_SID_rate_flag, hEncoderConfig->interval_SID, 0, ISM_MODE_NONE ) ) != IVAS_ERR_OK )
#endif
{
return error;
......
......@@ -346,8 +346,7 @@ void ivas_decision_matrix_enc(
}
}
if ( st->element_mode >= IVAS_CPE_DFT && st->core == ACELP_CORE && ( st->extl == SWB_TBE || st->extl == FB_TBE ) &&
!( st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) )
if ( st->element_mode >= IVAS_CPE_DFT && st->core == ACELP_CORE && ( st->extl == SWB_TBE || st->extl == FB_TBE ) && !( st->element_mode == IVAS_CPE_TD && st->tdm_LRTD_flag ) )
{
icbwe_brate += STEREO_ICBWE_MSFLAG_BITS * FRAMES_PER_SEC;
}
......@@ -413,7 +412,6 @@ void ivas_signaling_enc(
push_indice( hBstr, IND_SMODE, ind, NBITS_ELEMENT_MODE );
}
/*--------------------------------------------------------------------------
* Write band-width info
*--------------------------------------------------------------------------*/
......