Loading .gitlab-ci.yml +13 −40 Original line number Diff line number Diff line Loading @@ -492,6 +492,11 @@ codec-comparison-on-main-push: stage: test tags: - sanitizer_test_main artifacts: name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" when: always paths: - ep_015.g192 sanitizer-test-mono: extends: .sanitizer-test-template Loading Loading @@ -555,11 +560,7 @@ sanitizer-test-ism4: - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-mc-5_1: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -568,11 +569,7 @@ sanitizer-test-mc-5_1: - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_2: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -581,11 +578,7 @@ sanitizer-test-mc-5_1_2: - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_4: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -594,11 +587,7 @@ sanitizer-test-mc-5_1_4: - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -607,11 +596,7 @@ sanitizer-test-mc-7_1: - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1_4: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -620,11 +605,7 @@ sanitizer-test-mc-7_1_4: - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-masa: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -633,11 +614,7 @@ sanitizer-test-masa: - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-sba: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -646,11 +623,7 @@ sanitizer-test-sba: - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-planarsba: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading lib_com/ivas_cnst.h +15 −7 Original line number Diff line number Diff line Loading @@ -805,16 +805,25 @@ enum fea_names #define MAX_MDCT_ITD_BRATE IVAS_64k #define SNS_LOW_BR_MODE -1 #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE #define SNS_NPTS 16 /* Number of downsampled SNS parameters */ #define MDCT_ST_PLC_FADEOUT_START_FRAME 3 #define MDCT_ST_PLC_FADEOUT_MIN_NOISE_NRG 0.001f #ifdef FADE_TO_ZERO_FOR_TOO_LONG_FRAMELOSS #define MDCT_ST_PLC_FADEOUT_MAX_CONC_FRAME 2 * FRAMES_PER_SEC #define MDCT_ST_PLC_FADEOUT_TO_ZERO_LEN 20 #endif typedef enum { EQUAL_CORES, TCX10_IN_0_TCX20_IN_1, TCX20_IN_0_TCX10_IN_1, } TONALMDCTCONC_NOISE_GEN_MODE; typedef enum { ON_FIRST_LOST_FRAME, ON_FIRST_GOOD_FRAME, } TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE; #endif Loading @@ -831,6 +840,9 @@ typedef enum { *----------------------------------------------------------------------------------*/ // VE: this should be renamed to e.g. N_SPATIAL_SUBFRAMES #define MAX_PARAM_SPATIAL_SUBFRAMES 4 /* Maximum number of subframes for parameteric spatial coding */ #ifdef FIX_I106_TDREND_5MS #define L_SPATIAL_SUBFR_48k (L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES) #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -1010,13 +1022,9 @@ enum #define IVAS_DECORR_PARM_LOOKAHEAD_TAU 2e-3f #define IVAS_DECORR_PARM_APD_TAU 20e-3f /* IVAS PCA */ /* IVAS SBA PCA */ #define IVAS_PCA_NB_SUBR 20 /* 80 -> 0.25 ms, 40 -> 0.5 ms... */ #ifdef SPAR_SCALING_HARMONIZATION #define IVAS_PCA_COV_THRES 3e-5f #else #define IVAS_PCA_COV_THRES 1e-9f #endif #define IVAS_PCA_QUAT_EPS 1e-7f #define IVAS_PCA_QBITS 19 #define IVAS_PCA_N1 91 Loading lib_com/ivas_prot.h +46 −34 Original line number Diff line number Diff line Loading @@ -238,11 +238,9 @@ uint32_t ivas_syn_output( int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); #ifdef FIX_I98_HANDLES_TO_NULL void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #endif ivas_error ivas_init_encoder( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading Loading @@ -1952,15 +1950,12 @@ void decoder_tcx_invQ( const int16_t **prm_sqQ, int16_t *nf_seed, const int16_t bfi, /* i : Bad frame indicator */ #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT const int16_t isMCT, #endif const int16_t frame_cnt /* i : frame counter in the super frame */ ); void decoder_tcx_noisefilling( Decoder_State *st, /* i/o: coder memory state */ #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE float concealment_noise[L_FRAME48k], #endif const float A[], /* i : coefficients NxAz[M+1] */ Loading @@ -1975,7 +1970,7 @@ void decoder_tcx_noisefilling( const int16_t *prm_sqQ, int16_t nf_seed, const int16_t bfi, /* i : Bad frame indicator */ #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE const int16_t isMCT, #endif const int16_t frame_cnt /* i : frame counter in the super frame */ Loading Loading @@ -2060,7 +2055,12 @@ void decoder_tcx_IGF_stereo( const int16_t L_frame, /* i : frame length */ const int16_t left_rect, /* i : left part is rectangular */ const int16_t k, /* i : Subframe index */ #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE const int16_t bfi, /* i : bad frame indicator */ const int16_t is_mct /* i : flag to signal MCT or SMDCT */ #else const int16_t bfi /* i : bad frame indicator */ #endif ); void ms_processing( Loading Loading @@ -2093,7 +2093,12 @@ void IGFDecApplyStereo( const int16_t igfGridIdx, /* i : in case of CELP->TCX switching, use 1.25 framelength */ const int16_t *coreMsMask, const int16_t restrict_hopsize, #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE const int16_t bfi, /* i : frame loss == 1, frame good == 0 */ const int16_t bfi_apply_damping /* i : decoder element mode */ #else const int16_t bfi /* i : frame loss == 1, frame good == 0 */ #endif ); void IGFEncStereoEncoder( Loading Loading @@ -3724,9 +3729,6 @@ void ivas_spar_config( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ); Loading Loading @@ -4247,27 +4249,13 @@ int16_t ivas_map_num_decd_r_to_idx( const int16_t num_quant_points_decd_r ); /* Quantization utilities */ void ivas_quantise_real_values( #ifdef QUANTISE_REAL_FCN_CLEAN_UP const float *values, #else float **values, #endif const int16_t q_levels, const float min_value, const float max_value, #ifdef QUANTISE_REAL_FCN_CLEAN_UP int16_t *index, float *quant, #else int16_t **index, float **quant, #endif #ifdef QUANTISE_REAL_FCN_CLEAN_UP const int16_t dim #else const int16_t dim1, const int16_t dim2 #endif ); Loading Loading @@ -4954,12 +4942,21 @@ void TDREND_HRFILT_SetFiltSet( #endif ivas_error TDREND_REND_RenderSourceHRFilt( #ifdef FIX_I106_TDREND_5MS TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ #else const TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ #endif #ifdef TDREND_HRTF_TABLE_METHODS BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ #endif #ifdef FIX_I106_TDREND_5MS float output_buf[][L_SPATIAL_SUBFR_48k], /* o : Output buffer */ const int16_t subframe_length, /* i : Subframe length in use */ #else float output_buf[][L_FRAME48k], /* o : Output buffer */ const int16_t output_frame, /* i : Output frame length in use */ #endif const int32_t output_Fs /* i : Output sample rate */ ); Loading Loading @@ -5099,7 +5096,11 @@ void TDREND_SFX_SpatBin_SetParams( void TDREND_SFX_SpatBin_Execute_Main( SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters handle */ const float *InBuffer_p, /* i : Input buffer */ #ifdef FIX_I106_TDREND_5MS const int16_t subframe_length, /* i : subframe length */ #else const int16_t output_frame, /* i : frame length */ #endif float *LeftOutBuffer_p, /* o : Rendered left channel */ float *RightOutBuffer_p, /* o : Rendered right channel */ int16_t *NoOfUsedInputSamples_p, /* o : Number of input samples actually used */ Loading Loading @@ -5448,7 +5449,7 @@ ivas_error ivas_orient_trk_GetTrackedOrientation( float *roll ); #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE void TonalMdctConceal_create_concealment_noise( float concealment_noise[L_FRAME48k], CPE_DEC_HANDLE hCPE, Loading @@ -5457,9 +5458,21 @@ void TonalMdctConceal_create_concealment_noise( const int16_t idchan, const int16_t subframe_idx, const int16_t core, const int16_t crossfade_gain, const float crossfade_gain, const TONALMDCTCONC_NOISE_GEN_MODE noise_gen_mode ); void TonalMdctConceal_whiten_noise_shape( Decoder_State *st, const int16_t L_frame, const TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE ); int16_t get_igf_startline( Decoder_State *st, int16_t L_frame, int16_t L_frameTCX ); #endif float rand_triangular_signed( Loading @@ -5470,8 +5483,7 @@ float rand_triangular_signed( #ifdef ALIGN_SID_SIZE void dtx_read_padding_bits( DEC_CORE_HANDLE st, int16_t num_bits ); int16_t num_bits ); #endif #endif /* IVAS_PROT_H */ lib_com/ivas_sns_com.c +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #include "ivas_prot.h" #include "rom_com.h" #include <math.h> #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE #include <assert.h> #endif #ifdef DEBUGGING Loading @@ -45,7 +45,7 @@ #endif #include "wmops.h" #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE /*------------------------------------------------------------------- * sns_compute_scf() Loading lib_com/ivas_spar_com_quant_util.c +1 −82 Original line number Diff line number Diff line Loading @@ -41,31 +41,6 @@ #include "ivas_rom_com.h" #include <assert.h> #include "wmops.h" #ifndef QUANTISE_REAL_FCN_CLEAN_UP /*-----------------------------------------------------------------------------------------* * Function ivas_limit_values() * * Limit values within given range *-----------------------------------------------------------------------------------------*/ static void ivas_limit_values( float **ppValues, const float min_value, const float max_value, const int16_t dim1, const int16_t dim2 ) { int16_t i, j; for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { ppValues[i][j] = max( min_value, min( ppValues[i][j], max_value ) ); } } return; } #endif /*-----------------------------------------------------------------------------------------* * Function ivas_quantise_real_values() Loading @@ -73,72 +48,28 @@ static void ivas_limit_values( * Quantize real values *-----------------------------------------------------------------------------------------*/ void ivas_quantise_real_values( #ifdef QUANTISE_REAL_FCN_CLEAN_UP const float *values, #else float **values, #endif const int16_t q_levels, const float min_value, const float max_value, #ifdef QUANTISE_REAL_FCN_CLEAN_UP int16_t *index, float *quant, #else int16_t **index, float **quant, #endif #ifdef QUANTISE_REAL_FCN_CLEAN_UP const int16_t dim #else const int16_t dim1, const int16_t dim2 #endif ) const int16_t dim ) { #ifndef QUANTISE_REAL_FCN_CLEAN_UP int16_t i, j; #else int16_t i; #endif float q_step, one_by_q_step; if ( q_levels == 1 ) { #ifndef QUANTISE_REAL_FCN_CLEAN_UP for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { quant[i][j] = 0; index[i][j] = 0; } } #else for ( i = 0; i < dim; i++ ) { quant[i] = 0; index[i] = 0; } #endif } else if ( q_levels && max_value != min_value ) { #ifndef QUANTISE_REAL_FCN_CLEAN_UP ivas_limit_values( values, min_value, max_value, dim1, dim2 ); #endif q_step = ( max_value - min_value ) / ( q_levels - 1 ); one_by_q_step = ( q_levels - 1 ) / ( max_value - min_value ); #ifndef QUANTISE_REAL_FCN_CLEAN_UP for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { index[i][j] = (int16_t) round( one_by_q_step * values[i][j] ); quant[i][j] = index[i][j] * q_step; } } #else float val; for ( i = 0; i < dim; i++ ) { Loading @@ -146,24 +77,13 @@ void ivas_quantise_real_values( index[i] = (int16_t) round( one_by_q_step * val ); quant[i] = index[i] * q_step; } #endif } else { #ifndef QUANTISE_REAL_FCN_CLEAN_UP for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { quant[i][j] = values[i][j]; } } #else for ( i = 0; i < dim; i++ ) { quant[i] = values[i]; } #endif } return; } Loading Loading @@ -425,7 +345,6 @@ void ivas_clear_band_coeff_idx( for ( i = 0; i < num_bands; i++ ) { set_s( pband_coeff_idx[i].pred_index_re, 0, ( IVAS_SPAR_MAX_CH - 1 ) ); set_s( pband_coeff_idx[i].drct_index_re, 0, IVAS_SPAR_MAX_C_COEFF ); set_s( pband_coeff_idx[i].decd_index_re, 0, ( IVAS_SPAR_MAX_CH - 1 ) ); } Loading Loading
.gitlab-ci.yml +13 −40 Original line number Diff line number Diff line Loading @@ -492,6 +492,11 @@ codec-comparison-on-main-push: stage: test tags: - sanitizer_test_main artifacts: name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" when: always paths: - ep_015.g192 sanitizer-test-mono: extends: .sanitizer-test-template Loading Loading @@ -555,11 +560,7 @@ sanitizer-test-ism4: - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-mc-5_1: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -568,11 +569,7 @@ sanitizer-test-mc-5_1: - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_2: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -581,11 +578,7 @@ sanitizer-test-mc-5_1_2: - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_4: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -594,11 +587,7 @@ sanitizer-test-mc-5_1_4: - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -607,11 +596,7 @@ sanitizer-test-mc-7_1: - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1_4: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -620,11 +605,7 @@ sanitizer-test-mc-7_1_4: - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-masa: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -633,11 +614,7 @@ sanitizer-test-masa: - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT --tests $SANITIZER_TESTS sanitizer-test-sba: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading @@ -646,11 +623,7 @@ sanitizer-test-sba: - python3 ci/run_scheduled_sanitizer_test.py SBA $OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL --tests $SANITIZER_TESTS sanitizer-test-planarsba: extends: - .test-job-linux-needs-testv-dir stage: test tags: - sanitizer_test_main extends: .sanitizer-test-template rules: - if: $IS_SANITIZER_TEST_RUN when: delayed Loading
lib_com/ivas_cnst.h +15 −7 Original line number Diff line number Diff line Loading @@ -805,16 +805,25 @@ enum fea_names #define MAX_MDCT_ITD_BRATE IVAS_64k #define SNS_LOW_BR_MODE -1 #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE #define SNS_NPTS 16 /* Number of downsampled SNS parameters */ #define MDCT_ST_PLC_FADEOUT_START_FRAME 3 #define MDCT_ST_PLC_FADEOUT_MIN_NOISE_NRG 0.001f #ifdef FADE_TO_ZERO_FOR_TOO_LONG_FRAMELOSS #define MDCT_ST_PLC_FADEOUT_MAX_CONC_FRAME 2 * FRAMES_PER_SEC #define MDCT_ST_PLC_FADEOUT_TO_ZERO_LEN 20 #endif typedef enum { EQUAL_CORES, TCX10_IN_0_TCX20_IN_1, TCX20_IN_0_TCX10_IN_1, } TONALMDCTCONC_NOISE_GEN_MODE; typedef enum { ON_FIRST_LOST_FRAME, ON_FIRST_GOOD_FRAME, } TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE; #endif Loading @@ -831,6 +840,9 @@ typedef enum { *----------------------------------------------------------------------------------*/ // VE: this should be renamed to e.g. N_SPATIAL_SUBFRAMES #define MAX_PARAM_SPATIAL_SUBFRAMES 4 /* Maximum number of subframes for parameteric spatial coding */ #ifdef FIX_I106_TDREND_5MS #define L_SPATIAL_SUBFR_48k (L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES) #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -1010,13 +1022,9 @@ enum #define IVAS_DECORR_PARM_LOOKAHEAD_TAU 2e-3f #define IVAS_DECORR_PARM_APD_TAU 20e-3f /* IVAS PCA */ /* IVAS SBA PCA */ #define IVAS_PCA_NB_SUBR 20 /* 80 -> 0.25 ms, 40 -> 0.5 ms... */ #ifdef SPAR_SCALING_HARMONIZATION #define IVAS_PCA_COV_THRES 3e-5f #else #define IVAS_PCA_COV_THRES 1e-9f #endif #define IVAS_PCA_QUAT_EPS 1e-7f #define IVAS_PCA_QBITS 19 #define IVAS_PCA_N1 91 Loading
lib_com/ivas_prot.h +46 −34 Original line number Diff line number Diff line Loading @@ -238,11 +238,9 @@ uint32_t ivas_syn_output( int16_t *synth_out /* o : integer 16 bits synthesis signal */ ); #ifdef FIX_I98_HANDLES_TO_NULL void ivas_initialize_handles_enc( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #endif ivas_error ivas_init_encoder( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading Loading @@ -1952,15 +1950,12 @@ void decoder_tcx_invQ( const int16_t **prm_sqQ, int16_t *nf_seed, const int16_t bfi, /* i : Bad frame indicator */ #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT const int16_t isMCT, #endif const int16_t frame_cnt /* i : frame counter in the super frame */ ); void decoder_tcx_noisefilling( Decoder_State *st, /* i/o: coder memory state */ #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE float concealment_noise[L_FRAME48k], #endif const float A[], /* i : coefficients NxAz[M+1] */ Loading @@ -1975,7 +1970,7 @@ void decoder_tcx_noisefilling( const int16_t *prm_sqQ, int16_t nf_seed, const int16_t bfi, /* i : Bad frame indicator */ #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE const int16_t isMCT, #endif const int16_t frame_cnt /* i : frame counter in the super frame */ Loading Loading @@ -2060,7 +2055,12 @@ void decoder_tcx_IGF_stereo( const int16_t L_frame, /* i : frame length */ const int16_t left_rect, /* i : left part is rectangular */ const int16_t k, /* i : Subframe index */ #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE const int16_t bfi, /* i : bad frame indicator */ const int16_t is_mct /* i : flag to signal MCT or SMDCT */ #else const int16_t bfi /* i : bad frame indicator */ #endif ); void ms_processing( Loading Loading @@ -2093,7 +2093,12 @@ void IGFDecApplyStereo( const int16_t igfGridIdx, /* i : in case of CELP->TCX switching, use 1.25 framelength */ const int16_t *coreMsMask, const int16_t restrict_hopsize, #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE const int16_t bfi, /* i : frame loss == 1, frame good == 0 */ const int16_t bfi_apply_damping /* i : decoder element mode */ #else const int16_t bfi /* i : frame loss == 1, frame good == 0 */ #endif ); void IGFEncStereoEncoder( Loading Loading @@ -3724,9 +3729,6 @@ void ivas_spar_config( void ivas_sba_upmixer_renderer( Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ #ifndef SPAR_SCALING_HARMONIZATION const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ #endif const int16_t output_frame /* i : output frame length */ ); Loading Loading @@ -4247,27 +4249,13 @@ int16_t ivas_map_num_decd_r_to_idx( const int16_t num_quant_points_decd_r ); /* Quantization utilities */ void ivas_quantise_real_values( #ifdef QUANTISE_REAL_FCN_CLEAN_UP const float *values, #else float **values, #endif const int16_t q_levels, const float min_value, const float max_value, #ifdef QUANTISE_REAL_FCN_CLEAN_UP int16_t *index, float *quant, #else int16_t **index, float **quant, #endif #ifdef QUANTISE_REAL_FCN_CLEAN_UP const int16_t dim #else const int16_t dim1, const int16_t dim2 #endif ); Loading Loading @@ -4954,12 +4942,21 @@ void TDREND_HRFILT_SetFiltSet( #endif ivas_error TDREND_REND_RenderSourceHRFilt( #ifdef FIX_I106_TDREND_5MS TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ #else const TDREND_SRC_t *Src_p, /* i/o: The source to be rendered */ #endif #ifdef TDREND_HRTF_TABLE_METHODS BINAURAL_TD_OBJECT_RENDERER_HANDLE hBinRendererTd, /* i/o: TD renderer handle */ #endif #ifdef FIX_I106_TDREND_5MS float output_buf[][L_SPATIAL_SUBFR_48k], /* o : Output buffer */ const int16_t subframe_length, /* i : Subframe length in use */ #else float output_buf[][L_FRAME48k], /* o : Output buffer */ const int16_t output_frame, /* i : Output frame length in use */ #endif const int32_t output_Fs /* i : Output sample rate */ ); Loading Loading @@ -5099,7 +5096,11 @@ void TDREND_SFX_SpatBin_SetParams( void TDREND_SFX_SpatBin_Execute_Main( SFX_SpatBin_t *SfxSpatBin_p, /* i/o: Spatial parameters handle */ const float *InBuffer_p, /* i : Input buffer */ #ifdef FIX_I106_TDREND_5MS const int16_t subframe_length, /* i : subframe length */ #else const int16_t output_frame, /* i : frame length */ #endif float *LeftOutBuffer_p, /* o : Rendered left channel */ float *RightOutBuffer_p, /* o : Rendered right channel */ int16_t *NoOfUsedInputSamples_p, /* o : Number of input samples actually used */ Loading Loading @@ -5448,7 +5449,7 @@ ivas_error ivas_orient_trk_GetTrackedOrientation( float *roll ); #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE void TonalMdctConceal_create_concealment_noise( float concealment_noise[L_FRAME48k], CPE_DEC_HANDLE hCPE, Loading @@ -5457,9 +5458,21 @@ void TonalMdctConceal_create_concealment_noise( const int16_t idchan, const int16_t subframe_idx, const int16_t core, const int16_t crossfade_gain, const float crossfade_gain, const TONALMDCTCONC_NOISE_GEN_MODE noise_gen_mode ); void TonalMdctConceal_whiten_noise_shape( Decoder_State *st, const int16_t L_frame, const TONALMDCTCONC_NOISE_SHAPE_WHITENING_MODE ); int16_t get_igf_startline( Decoder_State *st, int16_t L_frame, int16_t L_frameTCX ); #endif float rand_triangular_signed( Loading @@ -5470,8 +5483,7 @@ float rand_triangular_signed( #ifdef ALIGN_SID_SIZE void dtx_read_padding_bits( DEC_CORE_HANDLE st, int16_t num_bits ); int16_t num_bits ); #endif #endif /* IVAS_PROT_H */
lib_com/ivas_sns_com.c +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #include "ivas_prot.h" #include "rom_com.h" #include <math.h> #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE #include <assert.h> #endif #ifdef DEBUGGING Loading @@ -45,7 +45,7 @@ #endif #include "wmops.h" #ifdef FIX_IVAS_185_MDCT_ST_PLC_FADEOUT #ifdef MDCT_STEREO_PLC_FADE_2_BG_NOISE /*------------------------------------------------------------------- * sns_compute_scf() Loading
lib_com/ivas_spar_com_quant_util.c +1 −82 Original line number Diff line number Diff line Loading @@ -41,31 +41,6 @@ #include "ivas_rom_com.h" #include <assert.h> #include "wmops.h" #ifndef QUANTISE_REAL_FCN_CLEAN_UP /*-----------------------------------------------------------------------------------------* * Function ivas_limit_values() * * Limit values within given range *-----------------------------------------------------------------------------------------*/ static void ivas_limit_values( float **ppValues, const float min_value, const float max_value, const int16_t dim1, const int16_t dim2 ) { int16_t i, j; for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { ppValues[i][j] = max( min_value, min( ppValues[i][j], max_value ) ); } } return; } #endif /*-----------------------------------------------------------------------------------------* * Function ivas_quantise_real_values() Loading @@ -73,72 +48,28 @@ static void ivas_limit_values( * Quantize real values *-----------------------------------------------------------------------------------------*/ void ivas_quantise_real_values( #ifdef QUANTISE_REAL_FCN_CLEAN_UP const float *values, #else float **values, #endif const int16_t q_levels, const float min_value, const float max_value, #ifdef QUANTISE_REAL_FCN_CLEAN_UP int16_t *index, float *quant, #else int16_t **index, float **quant, #endif #ifdef QUANTISE_REAL_FCN_CLEAN_UP const int16_t dim #else const int16_t dim1, const int16_t dim2 #endif ) const int16_t dim ) { #ifndef QUANTISE_REAL_FCN_CLEAN_UP int16_t i, j; #else int16_t i; #endif float q_step, one_by_q_step; if ( q_levels == 1 ) { #ifndef QUANTISE_REAL_FCN_CLEAN_UP for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { quant[i][j] = 0; index[i][j] = 0; } } #else for ( i = 0; i < dim; i++ ) { quant[i] = 0; index[i] = 0; } #endif } else if ( q_levels && max_value != min_value ) { #ifndef QUANTISE_REAL_FCN_CLEAN_UP ivas_limit_values( values, min_value, max_value, dim1, dim2 ); #endif q_step = ( max_value - min_value ) / ( q_levels - 1 ); one_by_q_step = ( q_levels - 1 ) / ( max_value - min_value ); #ifndef QUANTISE_REAL_FCN_CLEAN_UP for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { index[i][j] = (int16_t) round( one_by_q_step * values[i][j] ); quant[i][j] = index[i][j] * q_step; } } #else float val; for ( i = 0; i < dim; i++ ) { Loading @@ -146,24 +77,13 @@ void ivas_quantise_real_values( index[i] = (int16_t) round( one_by_q_step * val ); quant[i] = index[i] * q_step; } #endif } else { #ifndef QUANTISE_REAL_FCN_CLEAN_UP for ( i = 0; i < dim1; i++ ) { for ( j = 0; j < dim2; j++ ) { quant[i][j] = values[i][j]; } } #else for ( i = 0; i < dim; i++ ) { quant[i] = values[i]; } #endif } return; } Loading Loading @@ -425,7 +345,6 @@ void ivas_clear_band_coeff_idx( for ( i = 0; i < num_bands; i++ ) { set_s( pband_coeff_idx[i].pred_index_re, 0, ( IVAS_SPAR_MAX_CH - 1 ) ); set_s( pband_coeff_idx[i].drct_index_re, 0, IVAS_SPAR_MAX_C_COEFF ); set_s( pband_coeff_idx[i].decd_index_re, 0, ( IVAS_SPAR_MAX_CH - 1 ) ); } Loading