Loading .gitlab-ci.yml +43 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" date | xargs echo "System time is" .print-common-info-windows: &print-common-info-windows - | echo "Printing common information for build job." echo "Current job is run on commit $CI_COMMIT_SHA" echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) Loading Loading @@ -156,6 +163,11 @@ stages: tags: - ivas-linux .build-job-windows: stage: build timeout: "4 minutes" tags: - ivas-windows # template for test jobs on linux that need the TESTV_DIR .test-job-linux-needs-testv-dir: Loading @@ -172,6 +184,12 @@ stages: exit_codes: - 123 .build-job-windows-with-check-for-warnings: extends: .build-job-windows stage: build allow_failure: exit_codes: - 123 # --------------------------------------------------------------- Loading Loading @@ -262,6 +280,31 @@ build-codec-sanitizers-linux: - *print-common-info - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression build-codec-windows-msbuild: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression # --------------------------------------------------------------- # Test jobs for merge requests # --------------------------------------------------------------- Loading lib_com/ivas_cnst.h +22 −0 Original line number Diff line number Diff line Loading @@ -354,9 +354,26 @@ typedef enum #define PARAM_ISM_MAX_CHAN 16 #define PARAM_ISM_HYS_BUF_SIZE 10 /* ISM DTX */ #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_COH_SCA_BITS 4 #else #define PARAM_ISM_DTX_COH_SCA_BITS 4 #endif #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_AZI_BITS_HIGH 8 #define ISM_DTX_ELE_BITS_HIGH 7 #define ISM_Q_STEP_HIGH (ISM_Q_STEP / 2) #define ISM_Q_STEP_BORDER_HIGH (ISM_Q_STEP_BORDER / 2) #define ISM_DTX_AZI_BITS_LOW 6 #define ISM_DTX_ELE_BITS_LOW 5 #define ISM_Q_STEP_LOW (ISM_Q_STEP * 2) #define ISM_Q_STEP_BORDER_LOW (ISM_Q_STEP_BORDER * 2) #else #define PARAM_ISM_DTX_AZI_BITS 5 #define PARAM_ISM_DTX_ELE_BITS 4 #endif typedef enum { Loading @@ -377,8 +394,13 @@ enum IND_ISM_METADATA_FLAG = IND_ISM_NUM_OBJECTS + MAX_NUM_OBJECTS, #endif IND_ISM_VAD_FLAG = IND_ISM_METADATA_FLAG + MAX_NUM_OBJECTS, #ifdef DISCRETE_ISM_DTX_CNG IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_SCE_ID_DTX, #else IND_ISM_SCE_ID_DTX = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_NOISY_SPEECH_FLAG, #endif IND_ISM_DTX_COH_SCA, /* ------------- loop for objects -------------- */ Loading lib_com/ivas_ism_com.c +112 −29 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ static void bitbudget_to_brate( *-------------------------------------------------------------------*/ ivas_error ivas_ism_config( const int32_t ism_total_brate, /* i : ISms total bitrate */ const int32_t ism_total_brate, /* i : ISM total bitrate */ const int16_t nchan_transport, /* i : number of transport channels */ const int16_t num_obj, /* i : number of objects */ const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ Loading Loading @@ -141,7 +141,7 @@ ivas_error ivas_ism_config( nb_bits_metadata[0] += ISM_EXTENDED_METADATA_BITS; } #endif nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + num_obj; nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + nchan_ism; for ( ch = 0; ch < n_ISms; ch++ ) { Loading Loading @@ -388,6 +388,8 @@ int16_t ism_quant_meta( const float val, /* i : scalar value to quantize */ float *valQ, /* o : quantized value */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ) { Loading @@ -398,19 +400,19 @@ int16_t ism_quant_meta( { qlow = borders[0]; idx_start = 0; step = ISM_Q_STEP_BORDER; step = q_step_border; } else if ( val <= borders[2] ) { qlow = borders[1]; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / q_step_border ); step = q_step; } else { qlow = borders[2]; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP_BORDER; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / q_step_border ); step = q_step_border; } idx = idx_start + (int16_t) max( 0.f, min( cbsize - 1, ( ( val - qlow ) / step + 0.5f ) ) ); Loading @@ -430,29 +432,31 @@ int16_t ism_quant_meta( float ism_dequant_meta( const int16_t idx, /* i : quantizer index */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ) { int16_t idx_start; float qlow, step, valQ; if ( idx <= ( borders[1] - borders[0] ) / ISM_Q_STEP_BORDER ) if ( idx <= ( borders[1] - borders[0] ) / q_step_border ) { qlow = borders[0]; idx_start = 0; step = ISM_Q_STEP_BORDER; step = q_step_border; } else if ( idx <= cbsize - 1 - ( borders[3] - borders[2] ) / ISM_Q_STEP_BORDER ) else if ( idx <= cbsize - 1 - ( borders[3] - borders[2] ) / q_step_border ) { qlow = borders[1]; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / q_step_border ); step = q_step; } else { qlow = borders[2]; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP_BORDER; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / q_step_border ); step = q_step_border; } valQ = ( idx - idx_start ) * step + qlow; Loading @@ -469,12 +473,22 @@ float ism_dequant_meta( void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ #ifdef NCHAN_ISM_PARAMETER , const int16_t nchan_obj /* i : number of ISM channels */ #endif ) { #ifdef NCHAN_ISM_PARAMETER int16_t i; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; #else int16_t i, num_obj; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; num_obj = hParamIsm->num_obj; #endif for ( i = 0; i < hParamIsm->nbands; i++ ) { Loading @@ -482,7 +496,11 @@ void ivas_param_ism_config( } /* for elevation zero compute the max azi quantization indices */ #ifdef NCHAN_ISM_PARAMETER for ( i = 0; i < nchan_obj; i++ ) #else for ( i = 0; i < num_obj; i++ ) #endif { hParamIsm->last_az_diff[i] = 0; hParamIsm->last_az_sgn[i] = 1; Loading Loading @@ -549,3 +567,68 @@ void ivas_ism_metadata_close( return; } #ifdef DISCRETE_ISM_DTX_CNG /*-------------------------------------------------------------------* * update_last_metadata() * * Store last metadata values *-------------------------------------------------------------------*/ void update_last_metadata( const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t updt_flag[] /* i : last metadata update flag */ ) { int16_t ch; for ( ch = 0; ch < nchan_ism; ch++ ) { if ( updt_flag[ch] == 1 ) { hIsmMeta[ch]->last_azimuth = hIsmMeta[ch]->azimuth; hIsmMeta[ch]->last_elevation = hIsmMeta[ch]->elevation; } } return; } /*----------------------------------------------------------------* * ivas_get_ism_sid_quan_bitbudget() * * Set quantization bits based on the number of coded objects *----------------------------------------------------------------*/ void ivas_get_ism_sid_quan_bitbudget( const int16_t nchan_ism, /* i : number of objects */ int16_t *nBits_azimuth, /* o : number of Q bits for azimuth */ int16_t *nBits_elevation, /* o : number of Q bits for elevation */ float *q_step, /* o : quantization step */ float *q_step_border, /* o : quantization step at the border */ int16_t *nBits_coh, /* o : number of Q bits for coherence */ int16_t *nBits_sce_id /* o : number of Q bits for sce_id_dtx */ ) { *nBits_azimuth = ISM_DTX_AZI_BITS_HIGH; *nBits_elevation = ISM_DTX_ELE_BITS_HIGH; *q_step = ISM_Q_STEP_HIGH; *q_step_border = ISM_Q_STEP_BORDER_HIGH; *nBits_coh = ISM_DTX_COH_SCA_BITS; *nBits_sce_id = 1; if ( nchan_ism >= 3 ) { *nBits_azimuth = ISM_DTX_AZI_BITS_LOW; *nBits_elevation = ISM_DTX_ELE_BITS_LOW; *q_step = ISM_Q_STEP_LOW; *q_step_border = ISM_Q_STEP_BORDER_LOW; *nBits_sce_id = 2; } return; } #endif lib_com/ivas_prot.h +125 −33 Original line number Diff line number Diff line Loading @@ -500,8 +500,10 @@ void stereo_tcx_core_dec( const int16_t flag_sec_CNA, /* i : CNA flag for secondary channel */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i : Stereo CNG handle */ const int16_t nchan_out, /* i : number of output channels */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ const ISM_MODE ism_mode /* i : ISM mode (only needed if format is ISM) */ const IVAS_FORMAT ivas_format /* i : IVAS format */ #ifndef DISCRETE_ISM_DTX_CNG ,const ISM_MODE ism_mode /* i : ISM mode (only needed if format is ISM) */ #endif ); void stereo_tcx_init_dec( Loading Loading @@ -744,8 +746,8 @@ void dtx_read_padding_bits( ivas_error ivas_ism_config( const int32_t ism_total_brate, /* i : ISM total bitrate */ const int16_t num_trans_ch, /* i : number of trans channels */ const int16_t num_obj, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ Loading @@ -770,6 +772,8 @@ int16_t ism_quant_meta( const float val, /* i : scalar value to quantize */ float *valQ, /* o : quantized value */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ); Loading @@ -777,6 +781,8 @@ int16_t ism_quant_meta( float ism_dequant_meta( const int16_t idx, /* i : quantizer index */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ); Loading Loading @@ -815,6 +821,9 @@ ivas_error ivas_ism_enc( ivas_error ivas_ism_metadata_enc( const int32_t ism_total_brate, /* i : ISM total bitrate */ #ifdef NCHAN_ISM_PARAMETER const int16_t nchan_ism, /* i : number of ISM channels */ #endif const int16_t nchan_transport, /* i : number of transport channels */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ SCE_ENC_HANDLE hSCE[], /* i/o: SCE encoder handles */ Loading @@ -832,12 +841,18 @@ ivas_error ivas_ism_metadata_enc( ivas_error ivas_ism_metadata_dec( const int32_t ism_total_brate, /* i : ISM total bitrate */ #ifdef NCHAN_ISM_PARAMETER const int16_t nchan_ism, /* i : number of ISM channels */ #endif int16_t *nchan_transport, /* o : number of transport channels */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ SCE_DEC_HANDLE hSCE[], /* i/o: SCE decoder handles */ const int16_t bfi, /* i : bfi flag */ int16_t nb_bits_metadata[], /* o : number of metadata bits */ ISM_MODE ism_mode, /* i : ISM mode */ #ifdef DISCRETE_ISM_DTX_CNG ISM_DTX_DATA_DEC hISMDTX, /* i/o: ISM DTX structure */ #endif const PARAM_ISM_CONFIG_HANDLE hParamIsm /* i : Param ISM Config Handle */ ); Loading Loading @@ -879,6 +894,10 @@ void ivas_param_ism_stereo_dmx( void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ #ifdef NCHAN_ISM_PARAMETER , const int16_t nchan_ism /* i : number of ISM channels */ #endif ); ivas_error ivas_ism_enc_config( Loading @@ -886,8 +905,14 @@ ivas_error ivas_ism_enc_config( ); ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t num_obj /* i : number of objects in the bitstream */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifdef DISCRETE_ISM_DTX_CNG , const ISM_MODE last_ism_mode /* i/o: last ISM mode */ #endif #ifndef NCHAN_ISM_PARAMETER ,const int16_t num_obj /* i : number of objects in the bitstream */ #endif ); ivas_error ivas_param_ism_dec_open( Loading Loading @@ -917,21 +942,75 @@ ivas_error ivas_ism_dtx_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #ifdef DISCRETE_ISM_DTX_CNG /*! r: indication of DTX frame */ int16_t ivas_ism_dtx_enc( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ SCE_ENC_HANDLE hSCE[MAX_SCE], /* i/o: SCE encoder structure */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t nchan_ism, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ int16_t vad_flag[MAX_NUM_OBJECTS], /* i : VAD flag */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ int16_t md_diff_flag[], /* o : metadata differential flag */ int16_t *sid_flag /* o : indication of SID frame */ ); #else /*! r: indication of DTX frame */ int16_t ivas_ism_dtx_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ int16_t *sid_flag /* o : indication of SID frame */ ); #endif ivas_error ivas_ism_dtx_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t *nb_bits_metadata /* o : number of metadata bits */ ); #ifdef DISCRETE_ISM_DTX_CNG void ivas_ism_metadata_sid_enc( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ const int16_t flag_noisy_speech, /* i : noisy speech flag */ const int16_t nchan_ism, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ const ISM_MODE ism_mode, /* i : ISM mode */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t sid_flag, /* i : indication of SID frame */ const int16_t md_diff_flag[], /* i : metadata differental flag */ BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */ int16_t nb_bits_metadata[] /* o : number of metadata bits */ ); #else void ivas_param_ism_metadata_dtx_enc( BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i : ISM metadata handles */ ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ PARAM_ISM_CONFIG_HANDLE hParamIsm /* i : Param ISM Enc Handle */ #ifdef NCHAN_ISM_PARAMETER ,const int16_t nchan_ism /* i : number of ISM channels */ #endif ); #endif #ifdef DISCRETE_ISM_DTX_CNG void ivas_ism_metadata_sid_dec( SCE_DEC_HANDLE hSCE[MAX_SCE], /* i/o: SCE encoder structure */ const int32_t ism_total_brate, /* i : ISms total bitrate */ const int16_t bfi, /* i : bfi flag */ const int16_t nchan_ism, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ const ISM_MODE ism_mode, /* i : ISM mode */ int16_t *flag_noisy_speech, /* o : noisy speech flag */ int16_t *sce_id_dtx, /* o : SCE DTX ID */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ int16_t nb_bits_metadata[] /* o : number of metadata bits */ ); #else void ivas_param_ism_metadata_dtx_dec( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif void ivas_ism_get_sce_id_dtx( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ Loading @@ -944,12 +1023,6 @@ void ivas_param_ism_compute_noisy_speech_flag( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); /*! r: indication of DTX frame */ int16_t ivas_ism_dtx_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ int16_t *sid_flag /* o : indication of SID frame */ ); void ivas_ism_coh_estim_dtx_enc( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ SCE_ENC_HANDLE hSCE[MAX_SCE], /* i/o: SCE encoder structure */ Loading @@ -957,6 +1030,25 @@ void ivas_ism_coh_estim_dtx_enc( const int16_t input_frame /* i : input frame length */ ); #ifdef DISCRETE_ISM_DTX_CNG void update_last_metadata( const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t updt_flag[] /* i : last metadata update flag */ ); void ivas_get_ism_sid_quan_bitbudget( const int16_t nchan_ism, /* i : number of objects */ int16_t *nBits_azimuth, /* o : number of Q bits for azimuth */ int16_t *nBits_elevation, /* o : number of Q bits for elevation */ float *q_step, /* o : quantization step */ float *q_step_border, /* o : quantization step at the border */ int16_t *nBits_coh, /* o : number of Q bits for coherence */ int16_t *nBits_sce_id /* o : number of Q bits for sce_id_dtx */ ); #endif /*----------------------------------------------------------------------------------* * DFT Stereo prototypes *----------------------------------------------------------------------------------*/ Loading Loading @@ -4641,7 +4733,7 @@ void ivas_ism2sba( float buffer_td[][L_FRAME48k], /* i/o: TD signal buffers */ ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ const ISM_METADATA_HANDLE hIsmMetaData[], /* i : object metadata */ const int16_t num_objects, /* i : number of objects */ const int16_t nchan_ism, /* i : number of objects */ const int16_t output_frame, /* i : output frame length per channel */ const int16_t sba_order /* i : SBA order */ ); Loading lib_com/ivas_stat_com.h +10 −0 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
.gitlab-ci.yml +43 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,13 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" date | xargs echo "System time is" .print-common-info-windows: &print-common-info-windows - | echo "Printing common information for build job." echo "Current job is run on commit $CI_COMMIT_SHA" echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression .get-previous-merge-commit-sha: &get-previous-merge-commit-sha - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) Loading Loading @@ -156,6 +163,11 @@ stages: tags: - ivas-linux .build-job-windows: stage: build timeout: "4 minutes" tags: - ivas-windows # template for test jobs on linux that need the TESTV_DIR .test-job-linux-needs-testv-dir: Loading @@ -172,6 +184,12 @@ stages: exit_codes: - 123 .build-job-windows-with-check-for-warnings: extends: .build-job-windows stage: build allow_failure: exit_codes: - 123 # --------------------------------------------------------------- Loading Loading @@ -262,6 +280,31 @@ build-codec-sanitizers-linux: - *print-common-info - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - cmake -G "Visual Studio 15 2017" . -Bbuild - cmake --build build -j | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression build-codec-windows-msbuild: extends: - .build-job-windows-with-check-for-warnings - .rules-basis script: - *print-common-info-windows - $winoutdata = $null - MSBuild.exe .\Workspace_msvc\Workspace_msvc.sln /property:Configuration=Debug | tee -variable winoutdata - $winoutdata | Out-File $BUILD_OUTPUT -Encoding Utf8 - ("& python ci/check_for_warnings.py '$BUILD_OUTPUT'") | Invoke-Expression - ("exit $LASTEXITCODE") | Invoke-Expression # --------------------------------------------------------------- # Test jobs for merge requests # --------------------------------------------------------------- Loading
lib_com/ivas_cnst.h +22 −0 Original line number Diff line number Diff line Loading @@ -354,9 +354,26 @@ typedef enum #define PARAM_ISM_MAX_CHAN 16 #define PARAM_ISM_HYS_BUF_SIZE 10 /* ISM DTX */ #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_COH_SCA_BITS 4 #else #define PARAM_ISM_DTX_COH_SCA_BITS 4 #endif #ifdef DISCRETE_ISM_DTX_CNG #define ISM_DTX_AZI_BITS_HIGH 8 #define ISM_DTX_ELE_BITS_HIGH 7 #define ISM_Q_STEP_HIGH (ISM_Q_STEP / 2) #define ISM_Q_STEP_BORDER_HIGH (ISM_Q_STEP_BORDER / 2) #define ISM_DTX_AZI_BITS_LOW 6 #define ISM_DTX_ELE_BITS_LOW 5 #define ISM_Q_STEP_LOW (ISM_Q_STEP * 2) #define ISM_Q_STEP_BORDER_LOW (ISM_Q_STEP_BORDER * 2) #else #define PARAM_ISM_DTX_AZI_BITS 5 #define PARAM_ISM_DTX_ELE_BITS 4 #endif typedef enum { Loading @@ -377,8 +394,13 @@ enum IND_ISM_METADATA_FLAG = IND_ISM_NUM_OBJECTS + MAX_NUM_OBJECTS, #endif IND_ISM_VAD_FLAG = IND_ISM_METADATA_FLAG + MAX_NUM_OBJECTS, #ifdef DISCRETE_ISM_DTX_CNG IND_ISM_NOISY_SPEECH_FLAG = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_SCE_ID_DTX, #else IND_ISM_SCE_ID_DTX = IND_ISM_VAD_FLAG + MAX_NUM_OBJECTS, IND_ISM_NOISY_SPEECH_FLAG, #endif IND_ISM_DTX_COH_SCA, /* ------------- loop for objects -------------- */ Loading
lib_com/ivas_ism_com.c +112 −29 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ static void bitbudget_to_brate( *-------------------------------------------------------------------*/ ivas_error ivas_ism_config( const int32_t ism_total_brate, /* i : ISms total bitrate */ const int32_t ism_total_brate, /* i : ISM total bitrate */ const int16_t nchan_transport, /* i : number of transport channels */ const int16_t num_obj, /* i : number of objects */ const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ Loading Loading @@ -141,7 +141,7 @@ ivas_error ivas_ism_config( nb_bits_metadata[0] += ISM_EXTENDED_METADATA_BITS; } #endif nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + num_obj; nb_bits_metadata[0] += n_ISms * ISM_METADATA_FLAG_BITS + nchan_ism; for ( ch = 0; ch < n_ISms; ch++ ) { Loading Loading @@ -388,6 +388,8 @@ int16_t ism_quant_meta( const float val, /* i : scalar value to quantize */ float *valQ, /* o : quantized value */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ) { Loading @@ -398,19 +400,19 @@ int16_t ism_quant_meta( { qlow = borders[0]; idx_start = 0; step = ISM_Q_STEP_BORDER; step = q_step_border; } else if ( val <= borders[2] ) { qlow = borders[1]; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / q_step_border ); step = q_step; } else { qlow = borders[2]; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP_BORDER; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / q_step_border ); step = q_step_border; } idx = idx_start + (int16_t) max( 0.f, min( cbsize - 1, ( ( val - qlow ) / step + 0.5f ) ) ); Loading @@ -430,29 +432,31 @@ int16_t ism_quant_meta( float ism_dequant_meta( const int16_t idx, /* i : quantizer index */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ) { int16_t idx_start; float qlow, step, valQ; if ( idx <= ( borders[1] - borders[0] ) / ISM_Q_STEP_BORDER ) if ( idx <= ( borders[1] - borders[0] ) / q_step_border ) { qlow = borders[0]; idx_start = 0; step = ISM_Q_STEP_BORDER; step = q_step_border; } else if ( idx <= cbsize - 1 - ( borders[3] - borders[2] ) / ISM_Q_STEP_BORDER ) else if ( idx <= cbsize - 1 - ( borders[3] - borders[2] ) / q_step_border ) { qlow = borders[1]; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP; idx_start = (int16_t) ( ( borders[1] - borders[0] ) / q_step_border ); step = q_step; } else { qlow = borders[2]; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / ISM_Q_STEP_BORDER ); step = ISM_Q_STEP_BORDER; idx_start = (int16_t) ( cbsize - 1 - ( borders[3] - borders[2] ) / q_step_border ); step = q_step_border; } valQ = ( idx - idx_start ) * step + qlow; Loading @@ -469,12 +473,22 @@ float ism_dequant_meta( void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ #ifdef NCHAN_ISM_PARAMETER , const int16_t nchan_obj /* i : number of ISM channels */ #endif ) { #ifdef NCHAN_ISM_PARAMETER int16_t i; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; #else int16_t i, num_obj; hParamIsm->nbands = MAX_PARAM_ISM_NBANDS; num_obj = hParamIsm->num_obj; #endif for ( i = 0; i < hParamIsm->nbands; i++ ) { Loading @@ -482,7 +496,11 @@ void ivas_param_ism_config( } /* for elevation zero compute the max azi quantization indices */ #ifdef NCHAN_ISM_PARAMETER for ( i = 0; i < nchan_obj; i++ ) #else for ( i = 0; i < num_obj; i++ ) #endif { hParamIsm->last_az_diff[i] = 0; hParamIsm->last_az_sgn[i] = 1; Loading Loading @@ -549,3 +567,68 @@ void ivas_ism_metadata_close( return; } #ifdef DISCRETE_ISM_DTX_CNG /*-------------------------------------------------------------------* * update_last_metadata() * * Store last metadata values *-------------------------------------------------------------------*/ void update_last_metadata( const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t updt_flag[] /* i : last metadata update flag */ ) { int16_t ch; for ( ch = 0; ch < nchan_ism; ch++ ) { if ( updt_flag[ch] == 1 ) { hIsmMeta[ch]->last_azimuth = hIsmMeta[ch]->azimuth; hIsmMeta[ch]->last_elevation = hIsmMeta[ch]->elevation; } } return; } /*----------------------------------------------------------------* * ivas_get_ism_sid_quan_bitbudget() * * Set quantization bits based on the number of coded objects *----------------------------------------------------------------*/ void ivas_get_ism_sid_quan_bitbudget( const int16_t nchan_ism, /* i : number of objects */ int16_t *nBits_azimuth, /* o : number of Q bits for azimuth */ int16_t *nBits_elevation, /* o : number of Q bits for elevation */ float *q_step, /* o : quantization step */ float *q_step_border, /* o : quantization step at the border */ int16_t *nBits_coh, /* o : number of Q bits for coherence */ int16_t *nBits_sce_id /* o : number of Q bits for sce_id_dtx */ ) { *nBits_azimuth = ISM_DTX_AZI_BITS_HIGH; *nBits_elevation = ISM_DTX_ELE_BITS_HIGH; *q_step = ISM_Q_STEP_HIGH; *q_step_border = ISM_Q_STEP_BORDER_HIGH; *nBits_coh = ISM_DTX_COH_SCA_BITS; *nBits_sce_id = 1; if ( nchan_ism >= 3 ) { *nBits_azimuth = ISM_DTX_AZI_BITS_LOW; *nBits_elevation = ISM_DTX_ELE_BITS_LOW; *q_step = ISM_Q_STEP_LOW; *q_step_border = ISM_Q_STEP_BORDER_LOW; *nBits_sce_id = 2; } return; } #endif
lib_com/ivas_prot.h +125 −33 Original line number Diff line number Diff line Loading @@ -500,8 +500,10 @@ void stereo_tcx_core_dec( const int16_t flag_sec_CNA, /* i : CNA flag for secondary channel */ STEREO_CNG_DEC_HANDLE hStereoCng, /* i : Stereo CNG handle */ const int16_t nchan_out, /* i : number of output channels */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ const ISM_MODE ism_mode /* i : ISM mode (only needed if format is ISM) */ const IVAS_FORMAT ivas_format /* i : IVAS format */ #ifndef DISCRETE_ISM_DTX_CNG ,const ISM_MODE ism_mode /* i : ISM mode (only needed if format is ISM) */ #endif ); void stereo_tcx_init_dec( Loading Loading @@ -744,8 +746,8 @@ void dtx_read_padding_bits( ivas_error ivas_ism_config( const int32_t ism_total_brate, /* i : ISM total bitrate */ const int16_t num_trans_ch, /* i : number of trans channels */ const int16_t num_obj, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t localVAD[MAX_NUM_OBJECTS], /* i : local VAD flag */ const int16_t ism_imp[], /* i : ISM importance flags */ Loading @@ -770,6 +772,8 @@ int16_t ism_quant_meta( const float val, /* i : scalar value to quantize */ float *valQ, /* o : quantized value */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ); Loading @@ -777,6 +781,8 @@ int16_t ism_quant_meta( float ism_dequant_meta( const int16_t idx, /* i : quantizer index */ const float borders[], /* i : level borders */ const float q_step, /* i : quantization step */ const float q_step_border, /* i : quantization step at the border */ const int16_t cbsize /* i : codebook size */ ); Loading Loading @@ -815,6 +821,9 @@ ivas_error ivas_ism_enc( ivas_error ivas_ism_metadata_enc( const int32_t ism_total_brate, /* i : ISM total bitrate */ #ifdef NCHAN_ISM_PARAMETER const int16_t nchan_ism, /* i : number of ISM channels */ #endif const int16_t nchan_transport, /* i : number of transport channels */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ SCE_ENC_HANDLE hSCE[], /* i/o: SCE encoder handles */ Loading @@ -832,12 +841,18 @@ ivas_error ivas_ism_metadata_enc( ivas_error ivas_ism_metadata_dec( const int32_t ism_total_brate, /* i : ISM total bitrate */ #ifdef NCHAN_ISM_PARAMETER const int16_t nchan_ism, /* i : number of ISM channels */ #endif int16_t *nchan_transport, /* o : number of transport channels */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ SCE_DEC_HANDLE hSCE[], /* i/o: SCE decoder handles */ const int16_t bfi, /* i : bfi flag */ int16_t nb_bits_metadata[], /* o : number of metadata bits */ ISM_MODE ism_mode, /* i : ISM mode */ #ifdef DISCRETE_ISM_DTX_CNG ISM_DTX_DATA_DEC hISMDTX, /* i/o: ISM DTX structure */ #endif const PARAM_ISM_CONFIG_HANDLE hParamIsm /* i : Param ISM Config Handle */ ); Loading Loading @@ -879,6 +894,10 @@ void ivas_param_ism_stereo_dmx( void ivas_param_ism_config( PARAM_ISM_CONFIG_HANDLE hParamIsm /* i/o: IVAS Param ISM Config Structure */ #ifdef NCHAN_ISM_PARAMETER , const int16_t nchan_ism /* i : number of ISM channels */ #endif ); ivas_error ivas_ism_enc_config( Loading @@ -886,8 +905,14 @@ ivas_error ivas_ism_enc_config( ); ivas_error ivas_ism_dec_config( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t num_obj /* i : number of objects in the bitstream */ Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ #ifdef DISCRETE_ISM_DTX_CNG , const ISM_MODE last_ism_mode /* i/o: last ISM mode */ #endif #ifndef NCHAN_ISM_PARAMETER ,const int16_t num_obj /* i : number of objects in the bitstream */ #endif ); ivas_error ivas_param_ism_dec_open( Loading Loading @@ -917,21 +942,75 @@ ivas_error ivas_ism_dtx_open( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); #ifdef DISCRETE_ISM_DTX_CNG /*! r: indication of DTX frame */ int16_t ivas_ism_dtx_enc( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ SCE_ENC_HANDLE hSCE[MAX_SCE], /* i/o: SCE encoder structure */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t nchan_ism, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ int16_t vad_flag[MAX_NUM_OBJECTS], /* i : VAD flag */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ int16_t md_diff_flag[], /* o : metadata differential flag */ int16_t *sid_flag /* o : indication of SID frame */ ); #else /*! r: indication of DTX frame */ int16_t ivas_ism_dtx_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ int16_t *sid_flag /* o : indication of SID frame */ ); #endif ivas_error ivas_ism_dtx_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ int16_t *nb_bits_metadata /* o : number of metadata bits */ ); #ifdef DISCRETE_ISM_DTX_CNG void ivas_ism_metadata_sid_enc( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ const int16_t flag_noisy_speech, /* i : noisy speech flag */ const int16_t nchan_ism, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ const ISM_MODE ism_mode, /* i : ISM mode */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t sid_flag, /* i : indication of SID frame */ const int16_t md_diff_flag[], /* i : metadata differental flag */ BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */ int16_t nb_bits_metadata[] /* o : number of metadata bits */ ); #else void ivas_param_ism_metadata_dtx_enc( BSTR_ENC_HANDLE hBstr, /* i/o: bitstream handle */ ISM_METADATA_HANDLE hIsmMeta[], /* i : ISM metadata handles */ ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ PARAM_ISM_CONFIG_HANDLE hParamIsm /* i : Param ISM Enc Handle */ #ifdef NCHAN_ISM_PARAMETER ,const int16_t nchan_ism /* i : number of ISM channels */ #endif ); #endif #ifdef DISCRETE_ISM_DTX_CNG void ivas_ism_metadata_sid_dec( SCE_DEC_HANDLE hSCE[MAX_SCE], /* i/o: SCE encoder structure */ const int32_t ism_total_brate, /* i : ISms total bitrate */ const int16_t bfi, /* i : bfi flag */ const int16_t nchan_ism, /* i : number of objects */ const int16_t nchan_transport, /* i : number of transport channels */ const ISM_MODE ism_mode, /* i : ISM mode */ int16_t *flag_noisy_speech, /* o : noisy speech flag */ int16_t *sce_id_dtx, /* o : SCE DTX ID */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ int16_t nb_bits_metadata[] /* o : number of metadata bits */ ); #else void ivas_param_ism_metadata_dtx_dec( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif void ivas_ism_get_sce_id_dtx( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ Loading @@ -944,12 +1023,6 @@ void ivas_param_ism_compute_noisy_speech_flag( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); /*! r: indication of DTX frame */ int16_t ivas_ism_dtx_enc( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ int16_t *sid_flag /* o : indication of SID frame */ ); void ivas_ism_coh_estim_dtx_enc( ISM_DTX_HANDLE hISMDTX, /* i/o: ISM DTX handle */ SCE_ENC_HANDLE hSCE[MAX_SCE], /* i/o: SCE encoder structure */ Loading @@ -957,6 +1030,25 @@ void ivas_ism_coh_estim_dtx_enc( const int16_t input_frame /* i : input frame length */ ); #ifdef DISCRETE_ISM_DTX_CNG void update_last_metadata( const int16_t nchan_ism, /* i : number of objects */ ISM_METADATA_HANDLE hIsmMeta[], /* i/o: ISM metadata handles */ const int16_t updt_flag[] /* i : last metadata update flag */ ); void ivas_get_ism_sid_quan_bitbudget( const int16_t nchan_ism, /* i : number of objects */ int16_t *nBits_azimuth, /* o : number of Q bits for azimuth */ int16_t *nBits_elevation, /* o : number of Q bits for elevation */ float *q_step, /* o : quantization step */ float *q_step_border, /* o : quantization step at the border */ int16_t *nBits_coh, /* o : number of Q bits for coherence */ int16_t *nBits_sce_id /* o : number of Q bits for sce_id_dtx */ ); #endif /*----------------------------------------------------------------------------------* * DFT Stereo prototypes *----------------------------------------------------------------------------------*/ Loading Loading @@ -4641,7 +4733,7 @@ void ivas_ism2sba( float buffer_td[][L_FRAME48k], /* i/o: TD signal buffers */ ISM_RENDERER_HANDLE hIsmRendererData, /* i/o: renderer data */ const ISM_METADATA_HANDLE hIsmMetaData[], /* i : object metadata */ const int16_t num_objects, /* i : number of objects */ const int16_t nchan_ism, /* i : number of objects */ const int16_t output_frame, /* i : output frame length per channel */ const int16_t sba_order /* i : SBA order */ ); Loading
lib_com/ivas_stat_com.h +10 −0 File changed.Preview size limit exceeded, changes collapsed. Show changes