Loading Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading lib_debug/snr.c +2 −1 Original line number Diff line number Diff line Loading @@ -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 */ Loading @@ -99,7 +100,7 @@ static void set_f( return; } #endif static float sum2_f( const float *vec, /* i : input vector */ Loading lib_dec/lib_dec.c +0 −14 Original line number Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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() * Loading lib_enc/ivas_qmetadata_enc.c +1 −100 Original line number Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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 ); Loading Loading @@ -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() * Loading lib_rend/lib_rend.c +0 −21 Original line number Diff line number Diff line Loading @@ -1278,27 +1278,6 @@ static TDREND_WRAPPER defaultTdRendWrapper( } static CREND_WRAPPER defaultCrendWrapper( void ) { CREND_WRAPPER w; #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t i; for ( i = 0; i < MAX_HEAD_ROT_POSES; i++ ) { w.hCrend[i] = NULL; } #else w.hCrend = NULL; #endif w.hHrtfCrend = NULL; w.binaural_latency_ns = 0; return w; } static bool isIoConfigPairSupported( const AUDIO_CONFIG inConfig, const AUDIO_CONFIG outConfig ) Loading Loading
Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
lib_debug/snr.c +2 −1 Original line number Diff line number Diff line Loading @@ -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 */ Loading @@ -99,7 +100,7 @@ static void set_f( return; } #endif static float sum2_f( const float *vec, /* i : input vector */ Loading
lib_dec/lib_dec.c +0 −14 Original line number Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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() * Loading
lib_enc/ivas_qmetadata_enc.c +1 −100 Original line number Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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 ); Loading Loading @@ -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() * Loading
lib_rend/lib_rend.c +0 −21 Original line number Diff line number Diff line Loading @@ -1278,27 +1278,6 @@ static TDREND_WRAPPER defaultTdRendWrapper( } static CREND_WRAPPER defaultCrendWrapper( void ) { CREND_WRAPPER w; #ifdef SPLIT_REND_WITH_HEAD_ROT int16_t i; for ( i = 0; i < MAX_HEAD_ROT_POSES; i++ ) { w.hCrend[i] = NULL; } #else w.hCrend = NULL; #endif w.hHrtfCrend = NULL; w.binaural_latency_ns = 0; return w; } static bool isIoConfigPairSupported( const AUDIO_CONFIG inConfig, const AUDIO_CONFIG outConfig ) Loading