diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 7e95c097e440489ce0f2198ccba45d54ac2e52ce..de2f35b03637fbc177c1306cb8dcad4dae1198aa 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3371,6 +3371,9 @@ void ivas_dirac_param_est_enc( DIRAC_ENC_HANDLE hDirAC, IVAS_QDIRECTION *q_direction, const uint8_t useLowerRes, +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + int16_t *dirac_mono_flag, +#endif float data_f[][L_FRAME48k], float **pp_fr_real, float **pp_fr_imag, @@ -4473,6 +4476,10 @@ ivas_error ivas_spar_md_enc_process( const int16_t nchan_inp, const int16_t sba_order, /* i : Ambisonic (SBA) order */ float *prior_mixer[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i : prior mixer_matrix */ +#ifdef FIX_527_MONO_HEURISTICS + , + int16_t *dirac_mono_flag +#endif ); void ivas_compute_spar_params( @@ -5434,6 +5441,10 @@ void computeReferencePower_enc( const IVAS_FORMAT ivas_format, /* i : ivas_format */ int16_t ref_power_w, /* i : use 0 if hodirac is enabled */ const int16_t nchan_ana /* i : number of analysis channels */ +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + , + int16_t *dirac_mono_flag +#endif ); ivas_error ivas_mono_dmx_renderer_open( diff --git a/lib_com/ivas_qmetadata_com.c b/lib_com/ivas_qmetadata_com.c index 32b4653d2f4c40a1dc9befe955c442ce71241a23..65ae24da1db39595779a5f87430d165a1e09cfdc 100644 --- a/lib_com/ivas_qmetadata_com.c +++ b/lib_com/ivas_qmetadata_com.c @@ -74,6 +74,10 @@ ivas_error ivas_qmetadata_open( ( *hQMetaData )->surcoh_band_data = NULL; ( *hQMetaData )->bandMap = NULL; +#if defined( FIX_527_MONO_HEURISTICS ) || defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT ) + ( *hQMetaData )->dirac_mono_flag = 0; +#endif + return IVAS_ERR_OK; } diff --git a/lib_com/ivas_stat_com.h b/lib_com/ivas_stat_com.h index 51337f1c5cd79e35aae5242e3804638d60b080c3..848f55d305e6785eb51797168234e32ead4fccd6 100644 --- a/lib_com/ivas_stat_com.h +++ b/lib_com/ivas_stat_com.h @@ -542,6 +542,9 @@ typedef struct ivas_masa_qmetadata_frame_struct int16_t metadata_max_bits; /* maximum allowed number of bits for metadata per frame */ uint8_t useLowerRes; uint8_t useLowerBandRes; +#ifdef FIX_527_SBA_MONO_INPUT + int16_t dirac_mono_flag; +#endif IVAS_SURROUND_COHERENCE_BAND_DATA *surcoh_band_data; /* Additional helper values to include all data required for writing to output file */ diff --git a/lib_com/options.h b/lib_com/options.h old mode 100755 new mode 100644 index 4ba6b5c48eb5be1109518400a3f4d96625cb4ebb..94404f454c01e76b60fec4b74012cfede759b9d1 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,6 +166,11 @@ #define FIX_558_PLC_DISCONT /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */ #define FIX_564 /* Nokia: Issue 564: Fix gains in JBM path for SBA with parametric binaural renderer */ +#define FIX_527_SBA_MONO_INPUT /* FhG: fix issue 527, artifacts in mono signals coded in SBA mode */ +/*#define FIX_527_MONO_HEURISTICS*/ + +/*#define FIX_527_SBA_MONO_INPUT_ORDER_BIT*/ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 622d314181956d3fa96a143d4d35e7490ae99f39..cd27189f3e8070e1b97ed75e64ccca793ac32ee9 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1672,6 +1672,11 @@ void ivas_dirac_dec_read_BS( b = st->bit_stream[( st->next_bit_pos )--]; ( *nb_bits )++; +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) && !defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT ) + hQMetaData->dirac_mono_flag = st->bit_stream[( st->next_bit_pos )--]; + ( *nb_bits )++; +#endif + if ( b == 1 ) /* WB 4TCs condition, no other metadata to read*/ { orig_dirac_bands = hQMetaData->q_direction[0].cfg.nbands; @@ -1736,9 +1741,16 @@ void ivas_dirac_dec_read_BS( /* subtract mode signaling bits, since bitstream was moved after mode reading */ st->next_bit_pos = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC - 1 - SID_FORMAT_NBITS ); + /* 1 bit flag for SPAR/DirAC, already read in read format function */ b = st->bit_stream[( st->next_bit_pos )--]; ( *nb_bits )++; + +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) && !defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT ) + hQMetaData->dirac_mono_flag = st->bit_stream[( st->next_bit_pos )--]; + ( *nb_bits )++; +#endif + hQMetaData->sba_inactive_mode = 1; orig_dirac_bands = hQMetaData->q_direction[0].cfg.nbands; @@ -1777,13 +1789,26 @@ void ivas_dirac_dec_read_BS( st->next_bit_pos = next_bit_pos_orig; } +#if defined( FIX_527_SBA_MONO_INPUT ) + if ( hQMetaData->dirac_mono_flag ) + { + for ( b = 0; b < hQMetaData->q_direction[0].cfg.nbands; b++ ) + { + set_zero( hQMetaData->q_direction[0].band_data[b].energy_ratio, MAX_PARAM_SPATIAL_SUBFRAMES ); + set_zero( hQMetaData->q_direction[0].band_data[b].energy_ratio, MAX_PARAM_SPATIAL_SUBFRAMES ); + } + } +#endif + if ( hDirAC != NULL ) { + ivas_qmetadata_to_dirac( hQMetaData, hDirAC, NULL, ivas_total_brate, SBA_FORMAT, hodirac_flag, dirac_to_spar_md_bands ); } + return; } diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 45bbac0faba3b13b3587bd1f0ed540349bb0840b..ebd32a2d059a3b8973251f57f2d63db851a5335a 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -129,6 +129,26 @@ ivas_error ivas_dec_setup( st_ivas->sba_order = st_ivas->bit_stream[num_bits_read + 1]; st_ivas->sba_order += 2 * st_ivas->bit_stream[num_bits_read]; +#ifdef FIX_527_SBA_MONO_INPUT_ORDER_BIT + if ( st_ivas->hQMetaData != NULL ) + { + st_ivas->hQMetaData->dirac_mono_flag = 0; + if ( st_ivas->sba_order == 0 ) + { + st_ivas->hQMetaData->dirac_mono_flag = 1; + st_ivas->sba_order = st_ivas->sba_order_nonmono; + } + else + { + st_ivas->sba_order_nonmono = st_ivas->sba_order; + } + } + else + { + st_ivas->sba_order_nonmono = st_ivas->sba_order; + } +#endif + /* set Ambisonic (SBA) order used for analysis and coding */ st_ivas->sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, st_ivas->sba_order ); diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index 92e18c5c2c56a735f1f3ed1c5939ab4bcc082228..c833b5b013f6e8498de4237444858f21ce92225f 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -678,6 +678,51 @@ void ivas_spar_md_dec_process( ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode, st_ivas->last_active_ivas_total_brate ); +#ifdef FIX_527_MONO_HEURISTICS + { + int16_t lmf; + int16_t ndm; + int16_t ndec; + int16_t i; + + lmf = 1; + for ( b = 0; b < SPAR_DIRAC_SPLIT_START_BAND; b++ ) + { + ndm = hMdDec->spar_md_cfg.num_dmx_chans_per_band[b * bw]; + ndec = hMdDec->spar_md_cfg.num_decorr_per_band[b * bw]; + + for ( i = 0; i < DIRAC_TO_SPAR_HBR_PRED_CHS; i++ ) + { + if ( hMdDec->spar_md.band_coeffs[b].pred_quant_re[i] != 0.0f ) + { + lmf = 0; + } + } + + for ( i = 0; i < num_md_chs - ndm; i++ ) + { + for ( j = 0; j < ndm - 1; j++ ) + { + if ( hMdDec->spar_md.band_coeffs[0].C_quant_re[i][j] != 0.f ) + { + lmf = 0; + } + } + } + + for ( i = ndm; i < num_md_chs; i++ ) + { + if ( hMdDec->spar_md.band_coeffs[0].P_re[i] != 0.f ) + { + lmf = 0; + } + } + } + st_ivas->hQMetaData->dirac_mono_flag = lmf; + } +#endif + + #if 0 { char f_name[100]; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index ad767f0e308c3d94707125b0792dc7f675fce887..e1c23c4bb3129e6584cd17d9ece7958b96b37a97 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -1344,6 +1344,10 @@ typedef struct Decoder_Struct int16_t ism_extmeta_active; /* Extended metadata active in decoder */ int16_t ism_extmeta_cnt; /* Change frame counter for extended metadata */ +#ifdef FIX_527_SBA_MONO_INPUT_ORDER_BIT + int16_t sba_order_nonmono; +#endif + } Decoder_Struct; /* clang-format on */ diff --git a/lib_enc/ivas_dirac_enc.c b/lib_enc/ivas_dirac_enc.c index 1a25541d313e2caf29de099c1b5e3c83fb594dee..66bf0b3d88832e258a1ca204bf6986373afe1c03 100644 --- a/lib_enc/ivas_dirac_enc.c +++ b/lib_enc/ivas_dirac_enc.c @@ -299,7 +299,24 @@ void ivas_dirac_enc( int16_t i, j, b, i_ts; push_wmops( "ivas_dirac_enc" ); - ivas_dirac_param_est_enc( hDirAC, hQMetaData->q_direction, hQMetaData->useLowerRes, data_f, ppIn_FR_real, ppIn_FR_imag, input_frame, ivas_format, hodirac_flag, hodirac_flag ? HOA2_CHANNELS : FOA_CHANNELS ); +#ifdef FIX_527_SBA_MONO_INPUT + hQMetaData->dirac_mono_flag = 0; +#endif + + ivas_dirac_param_est_enc( + hDirAC, + hQMetaData->q_direction, + hQMetaData->useLowerRes, +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + &hQMetaData->dirac_mono_flag, +#endif + data_f, + ppIn_FR_real, + ppIn_FR_imag, + input_frame, + ivas_format, + hodirac_flag, + hodirac_flag ? HOA2_CHANNELS : FOA_CHANNELS ); if ( hQMetaData->q_direction->cfg.nbands > 0 ) { @@ -310,6 +327,11 @@ void ivas_dirac_enc( /* WB 4TC mode bit : disable for now*/ push_next_indice( hMetaData, 0, 1 ); +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) && !defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT ) + /* flag to indicate a mono input signal */ + push_next_indice( hMetaData, hQMetaData->dirac_mono_flag, 1 ); +#endif + ivas_qmetadata_enc_encode( hMetaData, hQMetaData, hodirac_flag ); } else @@ -347,6 +369,11 @@ void ivas_dirac_enc( /* 1 bit to indicate mode MD coding : temp solution*/ push_next_indice( hMetaData, 1, 1 ); +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) && !defined( FIX_527_SBA_MONO_INPUT_ORDER_BIT ) + /* flag to indicate a mono input signal */ + push_next_indice( hMetaData, hQMetaData->dirac_mono_flag, 1 ); +#endif + /* encode SID parameters */ ivas_qmetadata_enc_sid_encode( hMetaData, hQMetaData, -1, SBA_FORMAT ); } @@ -404,6 +431,10 @@ void computeReferencePower_enc( const IVAS_FORMAT ivas_format, /* i : ivas_format */ int16_t ref_power_w, /* i : use 0 if hodirac is enabled */ const int16_t nchan_ana /* i : number of analysis channels */ +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + , + int16_t *dirac_mono_flag +#endif ) { int16_t brange[2]; @@ -411,6 +442,13 @@ void computeReferencePower_enc( float reference_power_W[DIRAC_MAX_NBANDS]; +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + if ( dirac_mono_flag != NULL ) + { + *dirac_mono_flag = 1; + } +#endif + for ( i = 0; i < num_freq_bands; i++ ) { brange[0] = band_grouping[i + enc_param_start_band]; @@ -432,6 +470,13 @@ void computeReferencePower_enc( reference_power[i] += ( Cldfb_RealBuffer[ch_idx][j] * Cldfb_RealBuffer[ch_idx][j] ) + ( Cldfb_ImagBuffer[ch_idx][j] * Cldfb_ImagBuffer[ch_idx][j] ); } } + +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + if ( reference_power[i] - reference_power_W[i] > EPSILON && dirac_mono_flag != NULL ) + { + *dirac_mono_flag = 0; + } +#endif } v_multc( reference_power, 0.5f, reference_power, num_freq_bands ); @@ -457,6 +502,9 @@ void ivas_dirac_param_est_enc( DIRAC_ENC_HANDLE hDirAC, IVAS_QDIRECTION *q_direction, const uint8_t useLowerRes, +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + int16_t *dirac_mono_flag, +#endif float data_f[][L_FRAME48k], float **pp_fr_real, float **pp_fr_imag, @@ -571,7 +619,13 @@ void ivas_dirac_param_est_enc( num_freq_bands, ivas_format, hodirac_flag ? 0 : 1, - FOA_CHANNELS ); + FOA_CHANNELS +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + , + dirac_mono_flag +#endif + ); + computeIntensityVector_enc( hDirAC, diff --git a/lib_enc/ivas_enc.c b/lib_enc/ivas_enc.c index da553657a975a9ae4872831483f55b102fc7aa44..e3567947194b04f82288855629ba83192285f673 100644 --- a/lib_enc/ivas_enc.c +++ b/lib_enc/ivas_enc.c @@ -207,7 +207,16 @@ ivas_error ivas_enc( push_indice( st->hBstr, IND_SMODE, hEncoderConfig->sba_planar, SBA_PLANAR_BITS ); /* Write SBA order */ - push_indice( st->hBstr, IND_SMODE, hEncoderConfig->sba_order, SBA_ORDER_BITS ); +#ifdef FIX_527_SBA_MONO_INPUT_ORDER_BIT + if ( st_ivas->hQMetaData->dirac_mono_flag == 1 ) + { + push_indice( st->hBstr, IND_SMODE, 0, SBA_ORDER_BITS ); + } + else +#endif + { + push_indice( st->hBstr, IND_SMODE, hEncoderConfig->sba_order, SBA_ORDER_BITS ); + } } else { diff --git a/lib_enc/ivas_mcmasa_enc.c b/lib_enc/ivas_mcmasa_enc.c index 3bafe7ceab7853045570c7e71880158740cdfc36..4bd7b0100c254c3066d98cfa487f262022912992 100644 --- a/lib_enc/ivas_mcmasa_enc.c +++ b/lib_enc/ivas_mcmasa_enc.c @@ -979,7 +979,12 @@ void ivas_mcmasa_param_est_enc( num_freq_bands, MC_FORMAT, 0, - FOA_CHANNELS ); + FOA_CHANNELS +#if defined( FIX_527_SBA_MONO_INPUT ) && !defined( FIX_527_MONO_HEURISTICS ) + , + NULL +#endif + ); /* Fill buffers of length "averaging_length" time slots for intensity and energy */ hMcMasa->index_buffer_intensity = ( hMcMasa->index_buffer_intensity % hMcMasa->no_col_avg_diff ) + 1; /* averaging_length = 32 */ diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 436a649f46a4456a81b379149112eb5a8a4338cc..d9455693212ea74c3fd2579247caaa3c76a935f0 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -519,6 +519,19 @@ static ivas_error ivas_spar_enc_process( ivas_dirac_enc( st_ivas->hDirAC, hQMetaData, hMetaData, data_f, ppIn_FR_real, ppIn_FR_imag, input_frame, dtx_vad, hEncoderConfig->ivas_format, hodirac_flag ); +#ifdef FIX_527_SBA_MONO_INPUT + if ( hQMetaData->dirac_mono_flag ) + { + for ( b = hQMetaData->q_direction->cfg.start_band; b < hQMetaData->q_direction->cfg.nbands; b++ ) + { + for ( i_ts = 0; i_ts < ( ( dtx_vad == 1 ) ? hQMetaData->q_direction[0].cfg.nblocks : 1 ); i_ts++ ) + { + hQMetaData->q_direction[0].band_data[b].energy_ratio[i_ts] = 0.0f; + } + } + } +#endif + /*-----------------------------------------------------------------------------------------* * Set SPAR bitrates *-----------------------------------------------------------------------------------------*/ @@ -564,7 +577,12 @@ static ivas_error ivas_spar_enc_process( if ( hSpar->hMdEnc->spar_hoa_md_flag == 0 ) { - ivas_spar_md_enc_process( hSpar->hMdEnc, hEncoderConfig, cov_real, cov_dtx_real, hMetaData, dtx_vad, nchan_inp, sba_order, hSpar->hFbMixer->prior_mixer ); + ivas_spar_md_enc_process( hSpar->hMdEnc, hEncoderConfig, cov_real, cov_dtx_real, hMetaData, dtx_vad, nchan_inp, sba_order, hSpar->hFbMixer->prior_mixer +#ifdef FIX_527_MONO_HEURISTICS + , + &hQMetaData->dirac_mono_flag +#endif + ); } if ( hSpar->hMdEnc->spar_hoa_dirac2spar_md_flag ) @@ -612,7 +630,12 @@ static ivas_error ivas_spar_enc_process( if ( hSpar->hMdEnc->spar_hoa_md_flag ) { - ivas_spar_md_enc_process( hSpar->hMdEnc, hEncoderConfig, cov_real, cov_dtx_real, hMetaData, dtx_vad, nchan_inp, sba_order, hSpar->hFbMixer->prior_mixer ); + ivas_spar_md_enc_process( hSpar->hMdEnc, hEncoderConfig, cov_real, cov_dtx_real, hMetaData, dtx_vad, nchan_inp, sba_order, hSpar->hFbMixer->prior_mixer +#ifdef FIX_527_MONO_HEURISTICS + , + &hQMetaData->dirac_mono_flag +#endif + ); } #ifdef DEBUG_LBR_SBA @@ -800,17 +823,17 @@ static ivas_error ivas_spar_enc_process( #ifdef SPAR_HOA_DBG /*FILE *fp = fopen("int_enc_dmx.raw", "ab"); - for (int16_t t = 0; t < 960; t++) +for (int16_t t = 0; t < 960; t++) +{ + for (int16_t c = 0; c < hSpar->hFbMixer->filterbank_num_out_chans; c++) { - for (int16_t c = 0; c < hSpar->hFbMixer->filterbank_num_out_chans; c++) + for ( k = 0; k < 2; k++ ) { - for ( k = 0; k < 2; k++ ) - { - fb_mixer_in_buf.ppMixer[i][j][k] = hSpar->hMdEnc->mixer_mat[i][j]; - } + fb_mixer_in_buf.ppMixer[i][j][k] = hSpar->hMdEnc->mixer_mat[i][j]; } } - fclose( fp );*/ +} +fclose( fp );*/ #endif /*-----------------------------------------------------------------------------------------* * AGC @@ -891,8 +914,8 @@ static ivas_error ivas_spar_enc_process( /* ToDo: Commented for now */ /*total_md_bits = hMetaData->nb_bits_tot - start_nb_bits; - total_sba_bits = ivas_sba_get_max_md_bits( st_ivas ); - assert( total_md_bits <= total_sba_bits );*/ +total_sba_bits = ivas_sba_get_max_md_bits( st_ivas ); +assert( total_md_bits <= total_sba_bits );*/ return error; } diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index dbca3809ccfc5988867a0ae38ccda187a4ec880b..11b14b24e33ae9efd941e07a017632c7d52a4777 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -566,6 +566,10 @@ ivas_error ivas_spar_md_enc_process( const int16_t nchan_inp, const int16_t sba_order, /* i : Ambisonic (SBA) order */ float *prior_mixer[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i : prior mixer_matrix */ +#ifdef FIX_527_MONO_HEURISTICS + , + int16_t *dirac_mono_flag +#endif ) { float pred_coeffs_re[IVAS_SPAR_MAX_CH - 1][IVAS_MAX_NUM_BANDS]; @@ -1005,6 +1009,44 @@ ivas_error ivas_spar_md_enc_process( } } +#ifdef FIX_527_MONO_HEURISTICS + { + *dirac_mono_flag = 1; + for ( b = 0; b < SPAR_DIRAC_SPLIT_START_BAND; b++ ) + { + ndm = hMdEnc->spar_md_cfg.num_dmx_chans_per_band[b * bands_bw]; + ndec = hMdEnc->spar_md_cfg.num_decorr_per_band[b * bands_bw]; + + for ( i = 0; i < DIRAC_TO_SPAR_HBR_PRED_CHS; i++ ) + { + if ( hMdEnc->spar_md.band_coeffs[b].pred_quant_re[i] != 0.0f ) + { + *dirac_mono_flag = 0; + } + } + + for ( i = 0; i < num_ch - ndm; i++ ) + { + for ( j = 0; j < ndm - 1; j++ ) + { + if ( hMdEnc->spar_md.band_coeffs[0].C_quant_re[i][j] != 0.f ) + { + *dirac_mono_flag = 0; + } + } + } + + for ( i = ndm; i < num_ch; i++ ) + { + if ( hMdEnc->spar_md.band_coeffs[0].P_re[i] != 0.f ) + { + *dirac_mono_flag = 0; + } + } + } + } +#endif + #ifdef DEBUGGING if ( dtx_vad == 1 ) { diff --git a/lib_enc/ivas_stat_enc.h b/lib_enc/ivas_stat_enc.h index b3a6e6c16b3d39ea81ffc08991bd66a4c4185b8d..f519197e72a2afcd368256c72dbfdf37713c7b3c 100644 --- a/lib_enc/ivas_stat_enc.h +++ b/lib_enc/ivas_stat_enc.h @@ -599,6 +599,7 @@ 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]; + int16_t firstrun_sector_params; float sec_I_vec_smth_x[NUM_ANA_SECTORS][IVAS_MAX_NUM_BANDS];