Loading .gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -660,7 +660,7 @@ clang-format-check: expose_as: 'formatting patch' # check for crashes if first received frame on decoder side is an SID check-first-frame-is-sid: .check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request Loading lib_com/ivas_cnst.h +35 −0 Original line number Diff line number Diff line Loading @@ -1784,6 +1784,41 @@ typedef enum #define IVAS_LIMITER_THRESHOLD 32729 /* -0.01 dBFS */ #define IVAS_LIMITER_ATTACK_SECONDS 0.005f #ifdef ENHANCED_STEREO_DMX /*----------------------------------------------------------------------------------* * Stereo downmix EVS constants *----------------------------------------------------------------------------------*/ #define STEREO_DMX_EVS_PHA_LEN_16 48 #define STEREO_DMX_EVS_FAD_LEN_16 160 #define STEREO_DMX_EVS_PHA_LEN_32 96 #define STEREO_DMX_EVS_FAD_LEN_32 320 #define STEREO_DMX_EVS_PHA_LEN_48 96 #define STEREO_DMX_EVS_FAD_LEN_48 480 #define STEREO_DMX_EVS_SUBBAND_SIZE 2 #define STEREO_DMX_EVS_NB_SUBBAND_MAX (L_FRAME48k / (2 * STEREO_DMX_EVS_SUBBAND_SIZE)) #define STEREO_DMX_EVS_PHA_LEN_MAX 96 /* Max of PHA_LEN */ #define STEREO_DMX_EVS_FAD_LEN_MAX 480 /* Max of FAD_LEN */ #define STEREO_DMX_EVS_DATA_LEN_MAX (STEREO_DMX_EVS_PHA_LEN_MAX + L_FRAME48k) typedef enum { STEREO_DMX_EVS_PHA_IPD, STEREO_DMX_EVS_PHA_IPD2, STEREO_DMX_EVS_NO_PHA } STEREO_DMX_EVS_PHA; typedef enum { STEREO_DMX_EVS_PRC_POC, STEREO_DMX_EVS_PRC_PHA, } STEREO_DMX_EVS_PRC; #endif #endif /* clang-format on */ Loading lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,8 @@ #define FIX_468_16KHZ_PUPMIX /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */ #define FIX_499_DFT_STEREO_PLC /* Eri: Fix for issue 499: Wrong past memory addressed for computing energy of DFT stereo residual ECU frame */ #define FIX_489_COV_SMOOTHING /* Dlb: Fix covariance smoothing for ParamUpmix */ #define FIX_501_TABLE_IDX_INIT /* Dlb: Fix for the issue 501 */ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ #define FIX_I503_ASAN_ERROR_IND_LIST /* VA: fix issue #503: address sanitizer error with IND_LIST_DYN */ #define FIX_473_JITTER_NONDIEGETIC_PANNING /* FhG,Orange: add missing non-diegetic panning to JITTER */ Loading @@ -233,6 +235,7 @@ #define REMOVE_OBS_CODE /* FhG: Remove unnecessary assignement after LFE cleanup (Issue #451)*/ #define FIX_TODO_FD_CNG_SBA_CLEANUP /* FhG: BE, address TODO comment in fd_cng_enc */ #define ENHANCED_STEREO_DMX /* Orange : Contribution 48 - Enhanced stereo downmix. */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/ivas_spar_decoder.c +7 −0 Original line number Diff line number Diff line Loading @@ -123,7 +123,14 @@ ivas_error ivas_spar_dec_open( return error; } hSpar->hMdDec->td_decorr_flag = 1; #ifdef FIX_501_TABLE_IDX_INIT if ( hSpar->hTdDecorr ) { hSpar->hTdDecorr->ducking_flag = ivas_spar_br_table_consts[hSpar->hMdDec->table_idx].td_ducking; } #else hSpar->hMdDec->table_idx = -1; #endif /* set FB config. */ active_w_mixing = -1; Loading lib_dec/ivas_spar_md_dec.c +62 −4 Original line number Diff line number Diff line Loading @@ -83,9 +83,11 @@ static ivas_error ivas_spar_set_dec_config( ivas_spar_md_dec_state_t *hMdDec, co static void ivas_parse_parameter_bitstream_dtx( ivas_spar_md_t *pSpar_md, Decoder_State *st, const int16_t bw, const int16_t num_bands, int16_t *num_dmx_per_band, int16_t *num_dec_per_band ); static ivas_error ivas_deindex_real_index( const int16_t *index, const int16_t q_levels, const float min_value, const float max_value, float *quant, const int16_t num_ch_dim2 ); #ifdef FIX_501_TABLE_IDX_INIT static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode, const int32_t last_active_brate ); #else static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ); #endif /*------------------------------------------------------------------------- * ivas_spar_md_dec_matrix_open() Loading Loading @@ -289,11 +291,29 @@ ivas_error ivas_spar_md_dec_open( return error; } #ifdef FIX_501_TABLE_IDX_INIT if ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { if ( sid_format == SID_SBA_2TC ) { hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_48k, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } else { hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_24k4, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } } else { hMdDec->table_idx = ivas_get_spar_table_idx( hDecoderConfig->ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } #else hMdDec->table_idx = 0; /* just to initialize state variables*/ if ( ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) && ( sid_format == SID_SBA_2TC ) ) { hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_48k, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } #endif if ( ( error = ivas_spar_md_dec_init( hMdDec, hDecoderConfig, num_channels, sba_order ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -671,7 +691,12 @@ void ivas_spar_md_dec_process( ivas_spar_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate, ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode ); ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode #ifdef FIX_501_TABLE_IDX_INIT , st_ivas->last_active_ivas_total_brate #endif ); #if 0 { Loading Loading @@ -1707,7 +1732,12 @@ static void ivas_spar_dec_parse_md_bs( int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ) const int16_t sba_inactive_mode #ifdef FIX_501_TABLE_IDX_INIT , const int32_t last_active_brate #endif ) { int16_t i, j, k, num_bands; int16_t ii, jj, ndec, ndm, b, idx; Loading @@ -1718,6 +1748,9 @@ static void ivas_spar_dec_parse_md_bs( int16_t planarCP; float quant[IVAS_SPAR_MAX_C_COEFF]; int16_t do_repeat[IVAS_MAX_NUM_BANDS]; #ifdef FIX_501_TABLE_IDX_INIT int16_t bw_final, bw_fact; #endif *dtx_vad = 1; *bands_bw = 1; Loading Loading @@ -1790,13 +1823,33 @@ static void ivas_spar_dec_parse_md_bs( ivas_parse_parameter_bitstream_dtx( &hMdDec->spar_md, st0, *bands_bw, *nB, hMdDec->spar_md_cfg.num_dmx_chans_per_band, hMdDec->spar_md_cfg.num_decorr_per_band ); #ifdef FIX_501_TABLE_IDX_INIT if ( last_active_brate >= IVAS_24k4 ) { bw_final = 1; } else { bw_final = 2; } bw_fact = *bands_bw / bw_final; #endif for ( i = *nB - 1; i >= 0; i-- ) { #ifdef FIX_501_TABLE_IDX_INIT ndec = hMdDec->spar_md_cfg.num_decorr_per_band[bw_fact * i]; for ( b = bw_fact - 1; b >= 0; b-- ) { idx = i * bw_fact + b; #else ndec = hMdDec->spar_md_cfg.num_decorr_per_band[( *bands_bw ) * i]; for ( b = *bands_bw - 1; b >= 0; b-- ) { idx = i * *bands_bw + b; #endif for ( j = 0; j < FOA_CHANNELS - 1; j++ ) { hMdDec->spar_md.band_coeffs[idx].pred_re[j] = hMdDec->spar_md.band_coeffs[i].pred_re[j]; Loading @@ -1809,8 +1862,13 @@ static void ivas_spar_dec_parse_md_bs( } } #ifdef FIX_501_TABLE_IDX_INIT *bands_bw = bw_final; *nB = num_bands / bw_final; #else *nB = num_bands; *bands_bw = 1; #endif return; } Loading Loading
.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -660,7 +660,7 @@ clang-format-check: expose_as: 'formatting patch' # check for crashes if first received frame on decoder side is an SID check-first-frame-is-sid: .check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request Loading
lib_com/ivas_cnst.h +35 −0 Original line number Diff line number Diff line Loading @@ -1784,6 +1784,41 @@ typedef enum #define IVAS_LIMITER_THRESHOLD 32729 /* -0.01 dBFS */ #define IVAS_LIMITER_ATTACK_SECONDS 0.005f #ifdef ENHANCED_STEREO_DMX /*----------------------------------------------------------------------------------* * Stereo downmix EVS constants *----------------------------------------------------------------------------------*/ #define STEREO_DMX_EVS_PHA_LEN_16 48 #define STEREO_DMX_EVS_FAD_LEN_16 160 #define STEREO_DMX_EVS_PHA_LEN_32 96 #define STEREO_DMX_EVS_FAD_LEN_32 320 #define STEREO_DMX_EVS_PHA_LEN_48 96 #define STEREO_DMX_EVS_FAD_LEN_48 480 #define STEREO_DMX_EVS_SUBBAND_SIZE 2 #define STEREO_DMX_EVS_NB_SUBBAND_MAX (L_FRAME48k / (2 * STEREO_DMX_EVS_SUBBAND_SIZE)) #define STEREO_DMX_EVS_PHA_LEN_MAX 96 /* Max of PHA_LEN */ #define STEREO_DMX_EVS_FAD_LEN_MAX 480 /* Max of FAD_LEN */ #define STEREO_DMX_EVS_DATA_LEN_MAX (STEREO_DMX_EVS_PHA_LEN_MAX + L_FRAME48k) typedef enum { STEREO_DMX_EVS_PHA_IPD, STEREO_DMX_EVS_PHA_IPD2, STEREO_DMX_EVS_NO_PHA } STEREO_DMX_EVS_PHA; typedef enum { STEREO_DMX_EVS_PRC_POC, STEREO_DMX_EVS_PRC_PHA, } STEREO_DMX_EVS_PRC; #endif #endif /* clang-format on */ Loading
lib_com/options.h +3 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,8 @@ #define FIX_468_16KHZ_PUPMIX /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */ #define FIX_499_DFT_STEREO_PLC /* Eri: Fix for issue 499: Wrong past memory addressed for computing energy of DFT stereo residual ECU frame */ #define FIX_489_COV_SMOOTHING /* Dlb: Fix covariance smoothing for ParamUpmix */ #define FIX_501_TABLE_IDX_INIT /* Dlb: Fix for the issue 501 */ #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ #define FIX_I503_ASAN_ERROR_IND_LIST /* VA: fix issue #503: address sanitizer error with IND_LIST_DYN */ #define FIX_473_JITTER_NONDIEGETIC_PANNING /* FhG,Orange: add missing non-diegetic panning to JITTER */ Loading @@ -233,6 +235,7 @@ #define REMOVE_OBS_CODE /* FhG: Remove unnecessary assignement after LFE cleanup (Issue #451)*/ #define FIX_TODO_FD_CNG_SBA_CLEANUP /* FhG: BE, address TODO comment in fd_cng_enc */ #define ENHANCED_STEREO_DMX /* Orange : Contribution 48 - Enhanced stereo downmix. */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/ivas_spar_decoder.c +7 −0 Original line number Diff line number Diff line Loading @@ -123,7 +123,14 @@ ivas_error ivas_spar_dec_open( return error; } hSpar->hMdDec->td_decorr_flag = 1; #ifdef FIX_501_TABLE_IDX_INIT if ( hSpar->hTdDecorr ) { hSpar->hTdDecorr->ducking_flag = ivas_spar_br_table_consts[hSpar->hMdDec->table_idx].td_ducking; } #else hSpar->hMdDec->table_idx = -1; #endif /* set FB config. */ active_w_mixing = -1; Loading
lib_dec/ivas_spar_md_dec.c +62 −4 Original line number Diff line number Diff line Loading @@ -83,9 +83,11 @@ static ivas_error ivas_spar_set_dec_config( ivas_spar_md_dec_state_t *hMdDec, co static void ivas_parse_parameter_bitstream_dtx( ivas_spar_md_t *pSpar_md, Decoder_State *st, const int16_t bw, const int16_t num_bands, int16_t *num_dmx_per_band, int16_t *num_dec_per_band ); static ivas_error ivas_deindex_real_index( const int16_t *index, const int16_t q_levels, const float min_value, const float max_value, float *quant, const int16_t num_ch_dim2 ); #ifdef FIX_501_TABLE_IDX_INIT static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode, const int32_t last_active_brate ); #else static void ivas_spar_dec_parse_md_bs( ivas_spar_md_dec_state_t *hMdDec, Decoder_State *st, int16_t *nB, int16_t *bands_bw, int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ); #endif /*------------------------------------------------------------------------- * ivas_spar_md_dec_matrix_open() Loading Loading @@ -289,11 +291,29 @@ ivas_error ivas_spar_md_dec_open( return error; } #ifdef FIX_501_TABLE_IDX_INIT if ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { if ( sid_format == SID_SBA_2TC ) { hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_48k, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } else { hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_24k4, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } } else { hMdDec->table_idx = ivas_get_spar_table_idx( hDecoderConfig->ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } #else hMdDec->table_idx = 0; /* just to initialize state variables*/ if ( ( hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) && ( sid_format == SID_SBA_2TC ) ) { hMdDec->table_idx = ivas_get_spar_table_idx( IVAS_48k, sba_order, SPAR_CONFIG_BW, NULL, NULL ); } #endif if ( ( error = ivas_spar_md_dec_init( hMdDec, hDecoderConfig, num_channels, sba_order ) ) != IVAS_ERR_OK ) { return error; Loading Loading @@ -671,7 +691,12 @@ void ivas_spar_md_dec_process( ivas_spar_dec_parse_md_bs( hMdDec, st0, &nB, &bw, &dtx_vad, st_ivas->hDecoderConfig->ivas_total_brate, ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode ); ivas_spar_br_table_consts[hMdDec->table_idx].usePlanarCoeff, st_ivas->hQMetaData->sba_inactive_mode #ifdef FIX_501_TABLE_IDX_INIT , st_ivas->last_active_ivas_total_brate #endif ); #if 0 { Loading Loading @@ -1707,7 +1732,12 @@ static void ivas_spar_dec_parse_md_bs( int16_t *dtx_vad, const int32_t ivas_total_brate, const int16_t use_planar_coeff, const int16_t sba_inactive_mode ) const int16_t sba_inactive_mode #ifdef FIX_501_TABLE_IDX_INIT , const int32_t last_active_brate #endif ) { int16_t i, j, k, num_bands; int16_t ii, jj, ndec, ndm, b, idx; Loading @@ -1718,6 +1748,9 @@ static void ivas_spar_dec_parse_md_bs( int16_t planarCP; float quant[IVAS_SPAR_MAX_C_COEFF]; int16_t do_repeat[IVAS_MAX_NUM_BANDS]; #ifdef FIX_501_TABLE_IDX_INIT int16_t bw_final, bw_fact; #endif *dtx_vad = 1; *bands_bw = 1; Loading Loading @@ -1790,13 +1823,33 @@ static void ivas_spar_dec_parse_md_bs( ivas_parse_parameter_bitstream_dtx( &hMdDec->spar_md, st0, *bands_bw, *nB, hMdDec->spar_md_cfg.num_dmx_chans_per_band, hMdDec->spar_md_cfg.num_decorr_per_band ); #ifdef FIX_501_TABLE_IDX_INIT if ( last_active_brate >= IVAS_24k4 ) { bw_final = 1; } else { bw_final = 2; } bw_fact = *bands_bw / bw_final; #endif for ( i = *nB - 1; i >= 0; i-- ) { #ifdef FIX_501_TABLE_IDX_INIT ndec = hMdDec->spar_md_cfg.num_decorr_per_band[bw_fact * i]; for ( b = bw_fact - 1; b >= 0; b-- ) { idx = i * bw_fact + b; #else ndec = hMdDec->spar_md_cfg.num_decorr_per_band[( *bands_bw ) * i]; for ( b = *bands_bw - 1; b >= 0; b-- ) { idx = i * *bands_bw + b; #endif for ( j = 0; j < FOA_CHANNELS - 1; j++ ) { hMdDec->spar_md.band_coeffs[idx].pred_re[j] = hMdDec->spar_md.band_coeffs[i].pred_re[j]; Loading @@ -1809,8 +1862,13 @@ static void ivas_spar_dec_parse_md_bs( } } #ifdef FIX_501_TABLE_IDX_INIT *bands_bw = bw_final; *nB = num_bands / bw_final; #else *nB = num_bands; *bands_bw = 1; #endif return; } Loading