diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index 7d11a0427d3557d62c805c4ff3636241b40859d0..95d122ba790d0c26b31856a58ddef9f0d39e2c81 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -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) */ @@ -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]; @@ -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++ ) @@ -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]; @@ -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; @@ -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; @@ -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; @@ -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; } diff --git a/lib_com/ivas_masa_com.c b/lib_com/ivas_masa_com.c index d2226937ff95cd4386a428d5345e217aa56d53ce..22caa5d2cf177e64ef47ef671831b4e9b32bb657 100644 --- a/lib_com/ivas_masa_com.c +++ b/lib_com/ivas_masa_com.c @@ -49,7 +49,20 @@ *---------------------------------------------------------------*/ #define MASA_EXTRA_BAND_META_BITS 40 -#define MASA_SMALL_INC_META_BITS 10 + +#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 /*--------------------------------------------------------------- @@ -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 ) @@ -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 */ @@ -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 */ diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index f4841e2526aff874dbea2ee52a06a14467f11364..9b6871695e56d46bd1beea1d76c54e10aac37b2e 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3119,21 +3119,6 @@ uint16_t index_theta_phi_16( float * p_phi, /* i/o: input azimuth to be indexed */ const SPHERICAL_GRID_DATA *gridData /* i : generated grid data */ ); - -/*! r: output index */ -int16_t quantize_theta( - float x, /* i : theta value to be quantized */ - const int16_t no_cb, /* i : number of codewords */ - float *xhat /* o : quantized value */ -); - -/*! r: index azimuth */ -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 */ - const int16_t n /* i : azimuth codebook size */ -); #endif void reset_metadata_spatial( @@ -3909,9 +3894,8 @@ void ivas_dirac_dec_compute_directional_responses( const int16_t md_idx, #endif const float *surCohRatio, - const int16_t shd_rot_max_order, /* i : split-order rotation method */ - const float *p_Rmat /* i : rotation matrix */ - , + const int16_t shd_rot_max_order, /* i : split-order rotation method */ + const float *p_Rmat, /* i : rotation matrix */ const int16_t hodirac_flag /* i : flag to indicate HO-DirAC mode */ ); @@ -3921,38 +3905,40 @@ void ivas_dirac_dec_get_frequency_axis( const int16_t num_freq_bands ); /* i : number of frequency bands */ void calculate_hodirac_sector_parameters( - 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) */ - const int16_t enc_param_start_band, /* i : first band to process */ - float *azi, /* o : array of sector azimuth angles, flat */ - float *ele, /* o : array of sector elevation angles, flat */ - float *diff, /* o : array of sector diffuseness values, flat */ - float *ene /* o : array of sector energy values, flat */ +#ifdef FIX_485_STATIC_BUFFERS + DIRAC_ENC_HANDLE hDirAC, +#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 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) */ + const int16_t enc_param_start_band, /* i : first band to process */ + float *azi, /* o : array of sector azimuth angles, flat */ + float *ele, /* o : array of sector elevation angles, flat */ + float *diff, /* o : array of sector diffuseness values, flat */ + float *ene /* o : array of sector energy values, flat */ ); void ivas_mc_paramupmix_enc( - Encoder_Struct *st_ivas, /* i/o: IVAS Encoder handle */ - BSTR_ENC_HANDLE hMetaData, /* i/o: IVAS Metadata bitstream handle */ - float data_f[][L_FRAME48k], /* i/o: input: CICP6, CICP12, CICP14, CICP16 or CICP19 MC data */ - const int16_t input_frame /* i : input frame length */ + Encoder_Struct *st_ivas, /* i/o: IVAS Encoder handle */ + BSTR_ENC_HANDLE hMetaData, /* i/o: IVAS Metadata bitstream handle */ + float data_f[][L_FRAME48k], /* i/o: input: CICP6, CICP12, CICP14, CICP16 or CICP19 MC data */ + const int16_t input_frame /* i : input frame length */ ); ivas_error ivas_mc_paramupmix_enc_open( - Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ + Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); void ivas_mc_paramupmix_enc_close( - MC_PARAMUPMIX_ENC_HANDLE *hMCParamUpmix, /* i/o: MC Param-Upmix encoder handle */ + MC_PARAMUPMIX_ENC_HANDLE *hMCParamUpmix, /* i/o: MC Param-Upmix encoder handle */ const int32_t sampling_rate ); void ivas_mc_paramupmix_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + float output_f[][L_FRAME48k] /* i/o: synthesized core-coder transport channels/DirAC output */ ); int16_t ivas_mc_paramupmix_getNumTransportChannels( @@ -3960,19 +3946,19 @@ int16_t ivas_mc_paramupmix_getNumTransportChannels( ); ivas_error ivas_mc_paramupmix_dec_open( - Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); void ivas_mc_paramupmix_dec_close( - MC_PARAMUPMIX_DEC_HANDLE *hMCParamUpmix_out /* i/o: Parametric MC decoder handle */ + MC_PARAMUPMIX_DEC_HANDLE *hMCParamUpmix_out /* i/o: Parametric MC decoder handle */ ); void ivas_mc_paramupmix_dec_read_BS( - const int32_t ivas_total_brate, /* i : IVAS total bitrate */ - Decoder_State *st, /* i/o: decoder state structure */ - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, /* i/o: decoder MC Param-Upmix handle */ - int16_t *nb_bits /* o : number of bits written */ + const int32_t ivas_total_brate, /* i : IVAS total bitrate */ + Decoder_State *st, /* i/o: decoder state structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix, /* i/o: decoder MC Param-Upmix handle */ + int16_t *nb_bits /* o : number of bits written */ ); void ivas_param_mc_metadata_open( diff --git a/lib_com/options.h b/lib_com/options.h index 9e494df9ab06c2c24854724dd6ca6b122de16f4c..22ea7213adc8d7778ae66b786d5b7a76c3d9d441 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,6 +168,8 @@ #define FIX_482_DUMMYDEC_INIT /* Nokia: fix issue #428: missing inits for dummyDec in IVAS_rend */ #define FIX_468_16KHZ_PUPMIX /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */ +#define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index d69d323c9bf9838afb36601f452b1c2efb965d04..025a876d05f14b7f388d0e4a2bb42aa79e8971ad 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -279,7 +279,6 @@ ivas_error ivas_dirac_dec_config( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; hodirac_flag = ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ); - if ( flag_config == DIRAC_RECONFIGURE ) { hDirAC = st_ivas->hDirAC; @@ -433,7 +432,7 @@ ivas_error ivas_dirac_dec_config( if ( nchan_transport_orig > 2 && hDirAC->hOutSetup.is_loudspeaker_setup && st_ivas->renderer_type == RENDERER_DIRAC #ifdef FIX_DIRAC_LS_SYNTHESIS_CONFIG - && !ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) + && !hodirac_flag #endif ) { diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 74acc77d688a43d02d56e7837ca9366f7fa5f11f..2ecbc9b382061bdbc08d816f5b48dc55342f72e7 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -68,7 +68,7 @@ ivas_error ivas_jbm_dec_tc( int16_t n, output_frame, nchan_out; Decoder_State *st; /* used for bitstream handling */ float output[MAX_TRANSPORT_CHANNELS][L_FRAME48k]; /* 'float' buffer for transport channels, MAX_TRANSPORT_CHANNELS channels */ /* IVAS_fmToDo: buffer can be allocated dynamically based on the actual number of output channels */ - int16_t nchan_remapped; + int16_t nchan_remapped, hodirac_flag; float output_lfe_ch[L_FRAME48k]; int16_t nb_bits_metadata[MAX_SCE]; int32_t output_Fs, ivas_total_brate; @@ -88,6 +88,7 @@ ivas_error ivas_jbm_dec_tc( nchan_out = st_ivas->hTcBuffer->nchan_transport_jbm; output_config = st_ivas->hDecoderConfig->output_config; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; + hodirac_flag = ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ); output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); @@ -186,9 +187,7 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->ivas_format == SBA_FORMAT ) { - ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, - st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k, - 0 ); + ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, hodirac_flag, 0 ); } else { @@ -203,15 +202,7 @@ ivas_error ivas_jbm_dec_tc( if ( st_ivas->hQMetaData != NULL ) { st = ( st_ivas->nSCE > 0 ) ? st_ivas->hSCE[0]->hCoreCoder[0] : st_ivas->hCPE[0]->hCoreCoder[0]; - ivas_dirac_dec_read_BS( - ivas_total_brate, - st, - st_ivas->hDirAC, - st_ivas->hQMetaData, - &nb_bits_metadata[0], - st_ivas->sba_mode, - st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k, - st_ivas->hSpar->dirac_to_spar_md_bands ); + ivas_dirac_dec_read_BS( ivas_total_brate, st, st_ivas->hDirAC, st_ivas->hQMetaData, &nb_bits_metadata[0], st_ivas->sba_mode, hodirac_flag, st_ivas->hSpar->dirac_to_spar_md_bands ); } if ( ( error = ivas_spar_dec( st_ivas, nb_bits_metadata ) ) != IVAS_ERR_OK ) diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index efeb322d8508eb51ca073b7342b83d3f0d33a927..283c51c4be7388e1c86ee0040ebf065576360b05 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -79,7 +79,15 @@ ivas_error ivas_dirac_enc_open( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for DirAC Config\n" ) ); } - +#ifdef FIX_485_STATIC_BUFFERS + hDirAC->firstrun_sector_params = 1; + set_zero( hDirAC->sec_I_vec_smth_x[0], NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS ); + set_zero( hDirAC->sec_I_vec_smth_y[0], NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS ); + set_zero( hDirAC->sec_I_vec_smth_z[0], NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS ); + set_zero( hDirAC->azi_prev, NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS ); + set_zero( hDirAC->ele_prev, NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS ); + set_zero( hDirAC->energy_smth[0], NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS ); +#endif /*-----------------------------------------------------------------* * DirAC main configuration *-----------------------------------------------------------------*/ @@ -760,8 +768,23 @@ void ivas_dirac_param_est_enc( if ( hodirac_flag ) { - - calculate_hodirac_sector_parameters( Cldfb_RealBuffer, Cldfb_ImagBuffer, l_ts, 0.20f, hDirAC->band_grouping, hDirAC->hConfig->nbands, hDirAC->hConfig->enc_param_start_band, azi_secs, ele_secs, diff_secs, ene_secs ); +#ifdef DEBUGGING + assert( l_ts <= DIRAC_NO_FB_BANDS_MAX ); +#endif + calculate_hodirac_sector_parameters( +#ifdef FIX_485_STATIC_BUFFERS + hDirAC, +#endif + Cldfb_RealBuffer, + Cldfb_ImagBuffer, + 0.20f, + hDirAC->band_grouping, + hDirAC->hConfig->nbands, + hDirAC->hConfig->enc_param_start_band, + azi_secs, + ele_secs, + diff_secs, + ene_secs ); } if ( hodirac_flag ) diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index ae28c8b8a35aae8875c7d53328245d5ea20dbbeb..651dcb2741d4d35c7a7fc88008570e12e2853aef 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -416,10 +416,9 @@ static ivas_error ivas_spar_enc_process( { float pcm_tmp[DIRAC_MAX_ANA_CHANS][L_FRAME48k * 2]; float *p_pcm_tmp[DIRAC_MAX_ANA_CHANS]; - int16_t i, j, b, i_ts, input_frame, dtx_vad; int16_t transient_det[2]; - + int16_t hodirac_flag; int32_t ivas_total_brate, input_Fs; float *cov_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; float *cov_dtx_real[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH]; @@ -550,10 +549,10 @@ static ivas_error ivas_spar_enc_process( /*-----------------------------------------------------------------------------------------* * DirAC encoding *-----------------------------------------------------------------------------------------*/ - /*tyagiri: TODO: HODIRAC should be disabled for 256 kbps and outputs should be BE w.r.t baseline*/ - ivas_dirac_param_est_enc( st_ivas->hDirAC, hQMetaData->q_direction, hQMetaData->useLowerRes, data_f, ppIn_FR_real, ppIn_FR_imag, input_frame, st_ivas->sba_mode, - st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k, - st_ivas->sba_analysis_order > 1 && ivas_total_brate > IVAS_256k ? HOA2_CHANNELS : FOA_CHANNELS ); + + hodirac_flag = ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ); + + ivas_dirac_param_est_enc( st_ivas->hDirAC, hQMetaData->q_direction, hQMetaData->useLowerRes, data_f, ppIn_FR_real, ppIn_FR_imag, input_frame, st_ivas->sba_mode, hodirac_flag, hodirac_flag ? HOA2_CHANNELS : FOA_CHANNELS ); if ( hQMetaData->q_direction->cfg.nbands > 0 ) { @@ -564,8 +563,7 @@ static ivas_error ivas_spar_enc_process( /* WB 4TC mode bit : disable for now*/ push_next_indice( hMetaData, 0, 1 ); - ivas_qmetadata_enc_encode( hMetaData, hQMetaData, - ivas_get_hodirac_flag( ivas_total_brate, st_ivas->sba_analysis_order ) ); + ivas_qmetadata_enc_encode( hMetaData, hQMetaData, hodirac_flag ); } else { diff --git a/lib_enc/ivas_stat_enc.h b/lib_enc/ivas_stat_enc.h index daff0851ef2d8f58420cd6775ebffccc1d993bb2..806899c3433cc9be83e57dea810beba68ec9371b 100644 --- a/lib_enc/ivas_stat_enc.h +++ b/lib_enc/ivas_stat_enc.h @@ -600,6 +600,17 @@ typedef struct ivas_dirac_enc_data_structure float diffuseness_m[DIRAC_MAX_NBANDS]; int16_t band_grouping[DIRAC_MAX_NBANDS + 1]; int16_t block_grouping[5]; +#ifdef FIX_485_STATIC_BUFFERS + int16_t firstrun_sector_params; + + float sec_I_vec_smth_x[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + float sec_I_vec_smth_y[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + float sec_I_vec_smth_z[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + + float energy_smth[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS]; + float azi_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; + float ele_prev[NUM_ANA_SECTORS * IVAS_MAX_NUM_BANDS]; +#endif int16_t dirac_to_spar_md_bands[DIRAC_MAX_NBANDS]; @@ -609,6 +620,7 @@ typedef struct ivas_dirac_enc_data_structure float **buffer_intensity_real[DIRAC_NUM_DIMS]; float *buffer_energy; + } DIRAC_ENC_DATA, *DIRAC_ENC_HANDLE; /*----------------------------------------------------------------------------------*