Loading apps/decoder.c +25 −1 Original line number Diff line number Diff line Loading @@ -587,7 +587,11 @@ int main( if ( arg.hrtfReaderEnabled ) { #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; #else IVAS_DEC_HRTF_HANDLE hHrtfTD; #endif IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); Loading @@ -598,7 +602,11 @@ int main( } #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; #endif IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) Loading @@ -606,14 +614,22 @@ int main( fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfCRendFileName ); goto cleanup; } #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv = NULL; #else IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv; #endif IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ); if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfCRendFileName ); } #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin = NULL; #else IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin; #endif IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ); if ( ( error = load_parambin_HRTF_from_binary( hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) Loading Loading @@ -702,10 +718,18 @@ cleanup: if ( arg.hrtfReaderEnabled ) { #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; #else IVAS_DEC_HRTF_HANDLE hHrtfTD; #endif IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); dealloc_HRTF_binary( hHrtfTD ); #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; #endif IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); destroy_SetOfHRTF( hSetOfHRTF ); } Loading Loading @@ -1796,7 +1820,6 @@ static ivas_error decodeG192( } } /* Write current frame */ if ( decodedGoodFrame ) { Loading Loading @@ -1882,6 +1905,7 @@ static ivas_error decodeG192( *------------------------------------------------------------------------------------------*/ memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); Loading lib_com/delay_comp.c +14 −1 Original line number Diff line number Diff line Loading @@ -69,10 +69,17 @@ int32_t get_delay( { delay = IVAS_ENC_DELAY_NS; #ifdef FIX_356_ISM_METADATA_SYNC if ( ivas_format == ISM_FORMAT || ivas_format == MASA_FORMAT ) { delay = 0; /* All delay is compensated in the decoder with MASA/ISM */ } #else if ( ivas_format == MASA_FORMAT ) { delay = 0; /* All delay is compensated in the decoder with MASA */ } #endif } if ( ivas_format == SBA_FORMAT ) Loading Loading @@ -104,11 +111,17 @@ int32_t get_delay( delay += IVAS_FB_DEC_DELAY_NS; } #ifdef FIX_356_ISM_METADATA_SYNC if ( ivas_format == ISM_FORMAT || ivas_format == MASA_FORMAT ) { delay += IVAS_ENC_DELAY_NS; /* Compensate also the encoder delay in the decoder with ISM/MASA */ } #else if ( ivas_format == MASA_FORMAT ) { delay += IVAS_ENC_DELAY_NS; /* Compensate also the encoder delay in the decoder with MASA */ } #endif } } Loading lib_com/ivas_cnst.h +10 −0 Original line number Diff line number Diff line Loading @@ -1517,7 +1517,11 @@ typedef enum #define BINAURAL_MAXBANDS 60 /* Max number of bands */ #define BINAURAL_CONVBANDS 50 /* Bands upto which convolution is performed */ #ifdef UPDATE_SBA_FILTER #define BINAURAL_NTAPS 5 #else #define BINAURAL_NTAPS 7 #endif #define BINAURAL_NTAPS_MAX 96 #define HRTF_SH_ORDER 3 Loading @@ -1535,7 +1539,13 @@ typedef enum { BINAURAL_INPUT_AUDIO_CONFIG_INVALID, BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, /* 5_1, 5_1_2, 5_1_4, 7_1, 7_1_4 */ #ifdef UPDATE_SBA_FILTER BINAURAL_INPUT_AUDIO_CONFIG_HOA3, /* HOA3 */ BINAURAL_INPUT_AUDIO_CONFIG_HOA2, /* HOA2 */ BINAURAL_INPUT_AUDIO_CONFIG_FOA, /* FOA */ #else BINAURAL_INPUT_AUDIO_CONFIG_HOA, /* FOA, HOA2, HOA3 */ #endif BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED /* Not used */ } BINAURAL_INPUT_AUDIO_CONFIG; Loading lib_com/ivas_dirac_com.c +26 −8 Original line number Diff line number Diff line Loading @@ -947,9 +947,11 @@ void deindex_spherical_component( *-----------------------------------------------------------------*/ void calculate_hodirac_sector_parameters( #ifdef FIX_485_STATIC_BUFFERS DIRAC_ENC_HANDLE hDirAC, /* i : DirAC handle */ #endif float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector (L+1)^2 x N_bins, real part */ float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector, imaginary part */ const int16_t N_bins, /* i : number of bins */ const float beta, /* i : forgetting factor for average filtering */ const int16_t *band_grouping, /* i : indices of band groups */ const int16_t N_bands, /* i : number of bands (groups) */ Loading @@ -961,13 +963,12 @@ void calculate_hodirac_sector_parameters( ) { int16_t i_sec, i_bin, i_band; float p_real, p_imag, normI, energy, tmp_diff; float sec_I_vec_x[NUM_ANA_SECTORS]; float sec_I_vec_y[NUM_ANA_SECTORS]; float sec_I_vec_z[NUM_ANA_SECTORS]; #ifndef FIX_485_STATIC_BUFFERS static int16_t firstrun_sector_params = 1; static float sec_I_vec_smth_x[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; Loading @@ -977,9 +978,6 @@ void calculate_hodirac_sector_parameters( static float energy_smth[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; static float azi_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; static float ele_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; #ifdef DEBUGGING assert( N_bins <= DIRAC_NO_FB_BANDS_MAX ); #endif for ( i_sec = 0; i_sec < NUM_ANA_SECTORS; i_sec++ ) Loading Loading @@ -1016,6 +1014,15 @@ void calculate_hodirac_sector_parameters( float *p_ene = &ene[i_sec * N_bands + i_band]; float *p_diff = &diff[i_sec * N_bands + i_band]; #ifdef FIX_485_STATIC_BUFFERS float *p_azi_prev = &hDirAC->azi_prev[i_sec * N_bands + i_band]; float *p_ele_prev = &hDirAC->ele_prev[i_sec * N_bands + i_band]; float *p_energy_smth = &hDirAC->energy_smth[i_sec][i_band]; float *p_sec_I_vec_smth_x = &hDirAC->sec_I_vec_smth_x[i_sec][i_band]; float *p_sec_I_vec_smth_y = &hDirAC->sec_I_vec_smth_y[i_sec][i_band]; float *p_sec_I_vec_smth_z = &hDirAC->sec_I_vec_smth_z[i_sec][i_band]; #else float *p_azi_prev = &azi_prev[i_sec * N_bands + i_band]; float *p_ele_prev = &ele_prev[i_sec * N_bands + i_band]; Loading @@ -1023,7 +1030,7 @@ void calculate_hodirac_sector_parameters( float *p_sec_I_vec_smth_x = &sec_I_vec_smth_x[i_sec][i_band]; float *p_sec_I_vec_smth_y = &sec_I_vec_smth_y[i_sec][i_band]; float *p_sec_I_vec_smth_z = &sec_I_vec_smth_z[i_sec][i_band]; #endif *p_sec_I_vec_x = 0.f; *p_sec_I_vec_y = 0.f; *p_sec_I_vec_z = 0.f; Loading Loading @@ -1089,8 +1096,11 @@ void calculate_hodirac_sector_parameters( sec_z_real * sec_z_real + sec_z_imag * sec_z_imag ); } } #ifdef FIX_485_STATIC_BUFFERS if ( hDirAC->firstrun_sector_params ) #else if ( firstrun_sector_params ) #endif { *p_sec_I_vec_smth_x = *p_sec_I_vec_x; *p_sec_I_vec_smth_y = *p_sec_I_vec_y; Loading Loading @@ -1132,7 +1142,11 @@ void calculate_hodirac_sector_parameters( } if ( tmp_diff > 0.5f ) { #ifdef FIX_485_STATIC_BUFFERS if ( hDirAC->firstrun_sector_params ) #else if ( firstrun_sector_params ) #endif { *p_azi = 0.f; *p_ele = 0.f; Loading @@ -1151,7 +1165,11 @@ void calculate_hodirac_sector_parameters( } } #ifdef FIX_485_STATIC_BUFFERS hDirAC->firstrun_sector_params = 0; #else firstrun_sector_params = 0; #endif return; } Loading lib_com/ivas_masa_com.c +17 −4 Original line number Diff line number Diff line Loading @@ -49,9 +49,22 @@ *---------------------------------------------------------------*/ #define MASA_EXTRA_BAND_META_BITS 40 #define MASA_SMALL_INC_META_BITS 10 #ifdef HR_METADATA /*--------------------------------------------------------------- * Local prototypes *---------------------------------------------------------------*/ static int16_t quantize_theta_masa( float x, const int16_t no_cb, float *xhat ); static int16_t quantize_phi_masa( float phi, const int16_t flag_delta, float *phi_hat, const int16_t n ); #endif /*--------------------------------------------------------------- * ivas_masa_setup() * Loading Loading @@ -479,7 +492,7 @@ uint16_t index_theta_phi_16( sign_th = 1; } id_th = quantize_theta( abs_theta, gridData->no_theta, &theta_hat ); id_th = quantize_theta_masa( abs_theta, gridData->no_theta, &theta_hat ); if ( gridData->no_theta > 1 ) { if ( gridData->no_phi[id_th] > 1 ) Loading Loading @@ -547,7 +560,7 @@ uint16_t index_theta_phi_16( *------------------------------------------------------------------------*/ /*! r: output index */ int16_t quantize_theta( static int16_t quantize_theta_masa( float x, /* i : theta value to be quantized */ const int16_t no_cb, /* i : number of codewords */ float *xhat /* o : quantized value */ Loading Loading @@ -589,7 +602,7 @@ int16_t quantize_theta( *------------------------------------------------------------------------*/ /*! r: index azimuth */ int16_t quantize_phi_masa( static int16_t quantize_phi_masa( float phi, /* i : azimuth value */ const int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ float *phi_hat, /* o : quantized azimuth */ Loading Loading
apps/decoder.c +25 −1 Original line number Diff line number Diff line Loading @@ -587,7 +587,11 @@ int main( if ( arg.hrtfReaderEnabled ) { #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; #else IVAS_DEC_HRTF_HANDLE hHrtfTD; #endif IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); Loading @@ -598,7 +602,11 @@ int main( } #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; #endif IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); if ( ( error = create_SetOfHRTF_from_binary( hSetOfHRTF, hrtfReader, arg.output_Fs ) ) != IVAS_ERR_OK ) Loading @@ -606,14 +614,22 @@ int main( fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfCRendFileName ); goto cleanup; } #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv = NULL; #else IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv; #endif IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ); if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfCRendFileName ); } #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin = NULL; #else IVAS_DEC_HRTF_PARAMBIN_HANDLE hHrtfParambin; #endif IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ); if ( ( error = load_parambin_HRTF_from_binary( hHrtfParambin, hrtfReader ) ) != IVAS_ERR_OK ) Loading Loading @@ -702,10 +718,18 @@ cleanup: if ( arg.hrtfReaderEnabled ) { #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_HANDLE hHrtfTD = NULL; #else IVAS_DEC_HRTF_HANDLE hHrtfTD; #endif IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ); dealloc_HRTF_binary( hHrtfTD ); #ifdef UPDATE_SBA_FILTER IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF = NULL; #else IVAS_DEC_HRTF_CREND_HANDLE hSetOfHRTF; #endif IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hSetOfHRTF ); destroy_SetOfHRTF( hSetOfHRTF ); } Loading Loading @@ -1796,7 +1820,6 @@ static ivas_error decodeG192( } } /* Write current frame */ if ( decodedGoodFrame ) { Loading Loading @@ -1882,6 +1905,7 @@ static ivas_error decodeG192( *------------------------------------------------------------------------------------------*/ memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); Loading
lib_com/delay_comp.c +14 −1 Original line number Diff line number Diff line Loading @@ -69,10 +69,17 @@ int32_t get_delay( { delay = IVAS_ENC_DELAY_NS; #ifdef FIX_356_ISM_METADATA_SYNC if ( ivas_format == ISM_FORMAT || ivas_format == MASA_FORMAT ) { delay = 0; /* All delay is compensated in the decoder with MASA/ISM */ } #else if ( ivas_format == MASA_FORMAT ) { delay = 0; /* All delay is compensated in the decoder with MASA */ } #endif } if ( ivas_format == SBA_FORMAT ) Loading Loading @@ -104,11 +111,17 @@ int32_t get_delay( delay += IVAS_FB_DEC_DELAY_NS; } #ifdef FIX_356_ISM_METADATA_SYNC if ( ivas_format == ISM_FORMAT || ivas_format == MASA_FORMAT ) { delay += IVAS_ENC_DELAY_NS; /* Compensate also the encoder delay in the decoder with ISM/MASA */ } #else if ( ivas_format == MASA_FORMAT ) { delay += IVAS_ENC_DELAY_NS; /* Compensate also the encoder delay in the decoder with MASA */ } #endif } } Loading
lib_com/ivas_cnst.h +10 −0 Original line number Diff line number Diff line Loading @@ -1517,7 +1517,11 @@ typedef enum #define BINAURAL_MAXBANDS 60 /* Max number of bands */ #define BINAURAL_CONVBANDS 50 /* Bands upto which convolution is performed */ #ifdef UPDATE_SBA_FILTER #define BINAURAL_NTAPS 5 #else #define BINAURAL_NTAPS 7 #endif #define BINAURAL_NTAPS_MAX 96 #define HRTF_SH_ORDER 3 Loading @@ -1535,7 +1539,13 @@ typedef enum { BINAURAL_INPUT_AUDIO_CONFIG_INVALID, BINAURAL_INPUT_AUDIO_CONFIG_COMBINED, /* 5_1, 5_1_2, 5_1_4, 7_1, 7_1_4 */ #ifdef UPDATE_SBA_FILTER BINAURAL_INPUT_AUDIO_CONFIG_HOA3, /* HOA3 */ BINAURAL_INPUT_AUDIO_CONFIG_HOA2, /* HOA2 */ BINAURAL_INPUT_AUDIO_CONFIG_FOA, /* FOA */ #else BINAURAL_INPUT_AUDIO_CONFIG_HOA, /* FOA, HOA2, HOA3 */ #endif BINAURAL_INPUT_AUDIO_CONFIG_UNDEFINED /* Not used */ } BINAURAL_INPUT_AUDIO_CONFIG; Loading
lib_com/ivas_dirac_com.c +26 −8 Original line number Diff line number Diff line Loading @@ -947,9 +947,11 @@ void deindex_spherical_component( *-----------------------------------------------------------------*/ void calculate_hodirac_sector_parameters( #ifdef FIX_485_STATIC_BUFFERS DIRAC_ENC_HANDLE hDirAC, /* i : DirAC handle */ #endif float RealBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector (L+1)^2 x N_bins, real part */ float ImagBuffer[DIRAC_MAX_ANA_CHANS][DIRAC_NO_FB_BANDS_MAX], /* i : signal vector, imaginary part */ const int16_t N_bins, /* i : number of bins */ const float beta, /* i : forgetting factor for average filtering */ const int16_t *band_grouping, /* i : indices of band groups */ const int16_t N_bands, /* i : number of bands (groups) */ Loading @@ -961,13 +963,12 @@ void calculate_hodirac_sector_parameters( ) { int16_t i_sec, i_bin, i_band; float p_real, p_imag, normI, energy, tmp_diff; float sec_I_vec_x[NUM_ANA_SECTORS]; float sec_I_vec_y[NUM_ANA_SECTORS]; float sec_I_vec_z[NUM_ANA_SECTORS]; #ifndef FIX_485_STATIC_BUFFERS static int16_t firstrun_sector_params = 1; static float sec_I_vec_smth_x[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; Loading @@ -977,9 +978,6 @@ void calculate_hodirac_sector_parameters( static float energy_smth[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; static float azi_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; static float ele_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; #ifdef DEBUGGING assert( N_bins <= DIRAC_NO_FB_BANDS_MAX ); #endif for ( i_sec = 0; i_sec < NUM_ANA_SECTORS; i_sec++ ) Loading Loading @@ -1016,6 +1014,15 @@ void calculate_hodirac_sector_parameters( float *p_ene = &ene[i_sec * N_bands + i_band]; float *p_diff = &diff[i_sec * N_bands + i_band]; #ifdef FIX_485_STATIC_BUFFERS float *p_azi_prev = &hDirAC->azi_prev[i_sec * N_bands + i_band]; float *p_ele_prev = &hDirAC->ele_prev[i_sec * N_bands + i_band]; float *p_energy_smth = &hDirAC->energy_smth[i_sec][i_band]; float *p_sec_I_vec_smth_x = &hDirAC->sec_I_vec_smth_x[i_sec][i_band]; float *p_sec_I_vec_smth_y = &hDirAC->sec_I_vec_smth_y[i_sec][i_band]; float *p_sec_I_vec_smth_z = &hDirAC->sec_I_vec_smth_z[i_sec][i_band]; #else float *p_azi_prev = &azi_prev[i_sec * N_bands + i_band]; float *p_ele_prev = &ele_prev[i_sec * N_bands + i_band]; Loading @@ -1023,7 +1030,7 @@ void calculate_hodirac_sector_parameters( float *p_sec_I_vec_smth_x = &sec_I_vec_smth_x[i_sec][i_band]; float *p_sec_I_vec_smth_y = &sec_I_vec_smth_y[i_sec][i_band]; float *p_sec_I_vec_smth_z = &sec_I_vec_smth_z[i_sec][i_band]; #endif *p_sec_I_vec_x = 0.f; *p_sec_I_vec_y = 0.f; *p_sec_I_vec_z = 0.f; Loading Loading @@ -1089,8 +1096,11 @@ void calculate_hodirac_sector_parameters( sec_z_real * sec_z_real + sec_z_imag * sec_z_imag ); } } #ifdef FIX_485_STATIC_BUFFERS if ( hDirAC->firstrun_sector_params ) #else if ( firstrun_sector_params ) #endif { *p_sec_I_vec_smth_x = *p_sec_I_vec_x; *p_sec_I_vec_smth_y = *p_sec_I_vec_y; Loading Loading @@ -1132,7 +1142,11 @@ void calculate_hodirac_sector_parameters( } if ( tmp_diff > 0.5f ) { #ifdef FIX_485_STATIC_BUFFERS if ( hDirAC->firstrun_sector_params ) #else if ( firstrun_sector_params ) #endif { *p_azi = 0.f; *p_ele = 0.f; Loading @@ -1151,7 +1165,11 @@ void calculate_hodirac_sector_parameters( } } #ifdef FIX_485_STATIC_BUFFERS hDirAC->firstrun_sector_params = 0; #else firstrun_sector_params = 0; #endif return; } Loading
lib_com/ivas_masa_com.c +17 −4 Original line number Diff line number Diff line Loading @@ -49,9 +49,22 @@ *---------------------------------------------------------------*/ #define MASA_EXTRA_BAND_META_BITS 40 #define MASA_SMALL_INC_META_BITS 10 #ifdef HR_METADATA /*--------------------------------------------------------------- * Local prototypes *---------------------------------------------------------------*/ static int16_t quantize_theta_masa( float x, const int16_t no_cb, float *xhat ); static int16_t quantize_phi_masa( float phi, const int16_t flag_delta, float *phi_hat, const int16_t n ); #endif /*--------------------------------------------------------------- * ivas_masa_setup() * Loading Loading @@ -479,7 +492,7 @@ uint16_t index_theta_phi_16( sign_th = 1; } id_th = quantize_theta( abs_theta, gridData->no_theta, &theta_hat ); id_th = quantize_theta_masa( abs_theta, gridData->no_theta, &theta_hat ); if ( gridData->no_theta > 1 ) { if ( gridData->no_phi[id_th] > 1 ) Loading Loading @@ -547,7 +560,7 @@ uint16_t index_theta_phi_16( *------------------------------------------------------------------------*/ /*! r: output index */ int16_t quantize_theta( static int16_t quantize_theta_masa( float x, /* i : theta value to be quantized */ const int16_t no_cb, /* i : number of codewords */ float *xhat /* o : quantized value */ Loading Loading @@ -589,7 +602,7 @@ int16_t quantize_theta( *------------------------------------------------------------------------*/ /*! r: index azimuth */ int16_t quantize_phi_masa( static int16_t quantize_phi_masa( float phi, /* i : azimuth value */ const int16_t flag_delta, /* i : flag indicating if the azimuth codebook is translated or not */ float *phi_hat, /* o : quantized azimuth */ Loading