Skip to content
Commits on Source (39)
variables:
# note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this
# see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information
IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 4eb4c0dfbdc845280a9994b5f7540f69c737537b
IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF f5e61349c22ededcdfe1cc54e533dea477f2d003
include:
- local: .gitlab-ci/variables.yml
- local: .gitlab-ci/rules-basis.yml
- project: ivas-codec-pc/ivas-codec-ci
ref: *IVAS_CODEC_CI_REF
file: main.yml
......@@ -326,10 +327,6 @@ workflow:
- rm -rf tests/dut tests/ref
variables:
USE_LTV: 0
DUT_ENCODER_PATH: ./IVAS_cod_ref
DUT_DECODER_PATH: ./IVAS_dec_ref
MERGE_TARGET_ENCODER_PATH: ./IVAS_cod_ref
MERGE_TARGET_DECODER_PATH: ./IVAS_dec_ref
.check-be-to-target-job:
extends:
......@@ -448,9 +445,6 @@ workflow:
extends:
- .check-be-job
stage: test
needs:
- job: "check-be-to-target-short-enc-0db"
artifacts: true
timeout: "300 minutes"
variables:
XML_REPORT_BRANCH: "report-junit-branch-$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA.xml"
......@@ -645,8 +639,6 @@ workflow:
- report-junit.xml
.ivas-pytest-compare-to-input-anchor: &ivas-pytest-compare-to-input-anchor
extends:
- .job-linux
stage: test
needs: ["build-codec-linux-make"]
timeout: "360 minutes"
......@@ -911,6 +903,9 @@ check-be-to-target-short-enc-0db:
TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER"
# -/-0dB
LEVEL_SCALING: "1.0"
# overwrite decoder with float reference one
DUT_DECODER_PATH: "$REF_DECODER_PATH"
MERGE_TARGET_DECODER_PATH: "$REF_DECODER_PATH"
check-be-to-target-short-enc-+10db:
extends:
......@@ -919,6 +914,9 @@ check-be-to-target-short-enc-+10db:
TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER"
# +10dB
LEVEL_SCALING: "3.162"
# overwrite decoder with float reference one
DUT_DECODER_PATH: "$REF_DECODER_PATH"
MERGE_TARGET_DECODER_PATH: "$REF_DECODER_PATH"
check-be-to-target-short-enc--10db:
extends:
......@@ -927,6 +925,9 @@ check-be-to-target-short-enc--10db:
TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER"
# -10dB
LEVEL_SCALING: "0.3162"
# overwrite decoder with float reference one
DUT_DECODER_PATH: "$REF_DECODER_PATH"
MERGE_TARGET_DECODER_PATH: "$REF_DECODER_PATH"
check-be-to-target-short-dec-0db:
extends:
......@@ -935,6 +936,9 @@ check-be-to-target-short-dec-0db:
TEST_SUITE: "$SHORT_TEST_SUITE"
# +/-0dB
LEVEL_SCALING: "1.0"
# overwrite encoder with float reference one
DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"
check-be-to-target-short-dec-+10db:
extends:
......@@ -943,6 +947,9 @@ check-be-to-target-short-dec-+10db:
TEST_SUITE: "$SHORT_TEST_SUITE"
# +10dB
LEVEL_SCALING: "3.162"
# overwrite encoder with float reference one
DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"
check-be-to-target-short-dec--10db:
extends:
......@@ -951,55 +958,94 @@ check-be-to-target-short-dec--10db:
TEST_SUITE: "$SHORT_TEST_SUITE"
# -10dB
LEVEL_SCALING: "0.3162"
# overwrite encoder with float reference one
DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"
### jobs that check for regressions on non-BE testcases
check-regressions-short-enc-0db:
extends:
- .check-regressions-pytest-job
needs:
- job: "check-be-to-target-short-enc-0db"
artifacts: true
variables:
TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER"
# +/-0dB
LEVEL_SCALING: "1.0"
# overwrite decoder with float reference one
DUT_DECODER_PATH: "$REF_DECODER_PATH"
MERGE_TARGET_DECODER_PATH: "$REF_DECODER_PATH"
check-regressions-short-enc-+10db:
extends:
- .check-regressions-pytest-job
needs:
- job: "check-be-to-target-short-enc-+10db"
artifacts: true
variables:
TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER"
# +10dB
LEVEL_SCALING: "3.162"
# overwrite decoder with float reference one
DUT_DECODER_PATH: "$REF_DECODER_PATH"
MERGE_TARGET_DECODER_PATH: "$REF_DECODER_PATH"
check-regressions-short-enc--10db:
extends:
- .check-regressions-pytest-job
needs:
- job: "check-be-to-target-short-enc--10db"
artifacts: true
variables:
TEST_SUITE: "$SHORT_TEST_SUITE_ENCODER"
# -10dB
LEVEL_SCALING: "0.3162"
# overwrite decoder with float reference one
DUT_DECODER_PATH: "$REF_DECODER_PATH"
MERGE_TARGET_DECODER_PATH: "$REF_DECODER_PATH"
check-regressions-short-dec-0db:
extends:
- .check-regressions-pytest-job
needs:
- job: "check-be-to-target-short-dec-0db"
artifacts: true
variables:
TEST_SUITE: "$SHORT_TEST_SUITE"
# +/-0dB
LEVEL_SCALING: "1"
# overwrite encoder with float reference one
DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"
check-regressions-short-dec-+10db:
extends:
- .check-regressions-pytest-job
needs:
- job: "check-be-to-target-short-dec-+10db"
artifacts: true
variables:
TEST_SUITE: "$SHORT_TEST_SUITE"
# +10dB
LEVEL_SCALING: "3.162"
# overwrite encoder with float reference one
DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"
check-regressions-short-dec--10db:
extends:
- .check-regressions-pytest-job
needs:
- job: "check-be-to-target-short-dec--10db"
artifacts: true
variables:
TEST_SUITE: "$SHORT_TEST_SUITE"
# -10dB
LEVEL_SCALING: "0.3162"
# overwrite encoder with float reference one
DUT_ENCODER_PATH: "$REF_ENCODER_PATH"
MERGE_TARGET_ENCODER_PATH: "$REF_ENCODER_PATH"
# ---------------------------------------------------------------
# Short test jobs for running from web interface or schedule
......@@ -1549,6 +1595,7 @@ voip-be-on-merge-request:
GET_WMOPS_ARGS: "mem_only"
timeout: 3 hours 30 minutes
before_script:
- !reference [ .test-job-linux, before_script ]
- bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh
- bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/basop/update-scripts-repo.sh
- bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh
......
# overwrites the default rules in the IVAS CI repository
# should be refactored and unified
.rules-basis:
rules:
# see https://docs.gitlab.com/ee/ci/yaml/workflow.html#switch-between-branch-pipelines-and-merge-request-pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
variables:
IVAS_PIPELINE_NAME: 'MR pipeline: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
### disabled for now because pipeline cd is redundant with MR pipeline with current workflow
# - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Pushes to main
# variables:
# IVAS_PIPELINE_NAME: 'Push pipeline: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'default' # for testing
variables:
IVAS_PIPELINE_NAME: 'Web run pipeline: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare'
variables:
IVAS_PIPELINE_NAME: 'Run comparison tools against float ref: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-enc-dmx'
variables:
IVAS_PIPELINE_NAME: 'Run encoder dmx comparison against float ref: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-long'
variables:
IVAS_PIPELINE_NAME: 'Run comparison tools against float ref (long test vectors): $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-compare-to-input'
variables:
IVAS_PIPELINE_NAME: 'Run comparison tools against input (pass-through only): $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-saturation-smoke-test'
variables:
IVAS_PIPELINE_NAME: 'Run saturation smoke-test: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'evs-26444'
variables:
IVAS_PIPELINE_NAME: 'EVS 26.444 test: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'sanitizer'
variables:
IVAS_PIPELINE_NAME: 'Short testvectors sanitizers'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'pytest-renderer'
variables:
IVAS_PIPELINE_NAME: 'Renderer test: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'complexity'
variables:
IVAS_PIPELINE_NAME: 'Complexity Measurement on $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'voip-be-test'
variables:
IVAS_PIPELINE_NAME: 'Voip BE test on $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'web' && $MANUAL_PIPELINE_TYPE == 'peaq-enc-passthrough'
variables:
IVAS_PIPELINE_NAME: 'PEAQ encoder pass-through test: $CI_COMMIT_BRANCH'
- if: $CI_PIPELINE_SOURCE == 'schedule' # Scheduled in any branch
variables:
IVAS_PIPELINE_NAME: 'Scheduled pipeline: $CI_COMMIT_BRANCH'
......@@ -1409,15 +1409,6 @@ Word32 BASOP_Util_Divide3232_Scale_newton( Word32 x, Word32 y, Word16 *s )
*s = 0;
return ( (Word32) 0 );
}
#if 0
sign = L_xor( x, y ); /* check (sign < 0) for result negation */
if ( x < 0 )
{
x = L_negate( x );
}
#else
IF( EQ_32( y, 0x80000000 ) )
{
/* Division by -1.0: same as negation of numerator */
......@@ -1429,7 +1420,6 @@ Word32 BASOP_Util_Divide3232_Scale_newton( Word32 x, Word32 y, Word16 *s )
}
sign = y;
move32();
#endif
if ( y < 0 )
{
y = L_negate( y );
......
......@@ -52,7 +52,6 @@
int16_t FEC_seed = 12558; /* Seed for random FEC generator */
FILE *FEC_pattern = NULL; /* FEC pattern file (for simulation of FEC) */
#ifndef IVAS_CODE
float FEC_random = 0; /* FEC rate in percent (for simulation of FEC) */
/*-------------------------------------------------------------------*
* file_read_FECpattern()
......@@ -109,7 +108,6 @@ static int16_t file_read_FECpattern( void )
return bfi;
}
#endif
#endif
/*-------------------------------------------------------------------*
* pack_bit()
*
......
......@@ -981,10 +981,6 @@ ivas_error openCldfb(
const Word16 type, /*!< analysis or synthesis */
const Word16 maxCldfbBands, /*!< number of cldfb bands */
const Word16 frameSize /*!< FrameSize */
#ifdef ADD_IVAS_CLDFB
,
CLDFB_PROTOTYPE prototype /* i : CLDFB version (1.25ms/5ms delay) */
#endif
)
{
HANDLE_CLDFB_FILTER_BANK hs;
......@@ -996,9 +992,6 @@ ivas_error openCldfb(
}
hs->type = type;
#ifdef ADD_IVAS_CLDFB
hs->prototype = prototype;
#endif
move16();
IF( type == CLDFB_ANALYSIS )
......
......@@ -246,67 +246,18 @@ Word16 getTcxonly_ivas_fx(
}
Word16 getTcxonly(
#ifdef IVAS_CODE_SWITCHING
const Word16 element_mode, /* i : IVAS element mode */
#endif
const Word32 total_brate /* i : total bitrate */
#ifdef IVAS_CODE_SWITCHING
,
const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/
const int16_t is_ism_format /* i : flag indicating ISM format */
#endif
)
{
Word16 tcxonly;
tcxonly = 0;
move16();
#ifdef IVAS_CODE_SWITCHING
SWITCH( element_mode )
{
case EVS_MONO:
#endif
if ( GT_32( total_brate, 32000 ) )
{
tcxonly = 1;
move16();
}
#ifdef IVAS_CODE_SWITCHING
break;
case IVAS_SCE:
if ( is_ism_format )
{
if ( total_brate > MAX_ACELP_BRATE_ISM )
{
tcxonly = 1;
}
}
else
{
if ( total_brate > MAX_ACELP_BRATE )
{
tcxonly = 1;
}
}
break;
case IVAS_CPE_DFT:
case IVAS_CPE_TD:
if ( total_brate > MAX_ACELP_BRATE )
{
tcxonly = 1;
}
break;
case IVAS_CPE_MDCT:
if ( total_brate >= ( MCT_flag ? IVAS_32k : IVAS_48k ) )
{
tcxonly = 1;
}
break;
#endif
#ifdef IVAS_CODE_SWITCHING
}
#endif
return tcxonly; /*Q0*/
}
......
......@@ -303,11 +303,7 @@ void hq_configure_evs_fx(
*start_norm = 0;
move16();
#ifndef SOLVED_COMP_ENC_DEC
IF( EQ_16( length, L_FRAME48k ) ) /*tbv SOLVED_COMP_ENC_DEC*/
#else
IF( EQ_16( length, L_SPEC48k ) )
#endif
{
IF( EQ_16( hqswb_clas, HQ_GEN_FB ) )
{
......
......@@ -63,11 +63,7 @@ void interleave_spectrum_fx(
/* Common inits */
p1 = coefs; /*Q12*/
p_out = coefs_out;
#ifdef SOLVED_COMP_ENC_DEC
IF( EQ_16( length, L_SPEC48k ) )
#else
IF( EQ_16( length, L_FRAME48k ) )
#endif
{
bw = intl_bw_48; /*Q0*/
cnt = intl_cnt_48; /*Q0*/
......@@ -337,20 +333,12 @@ void de_interleave_spectrum_fx(
p1 = coefs_out;
l_frame = length;
move16();
#ifdef SOLVED_COMP_ENC_DEC
IF( EQ_16( length, L_SPEC48k ) )
#else
IF( EQ_16( length, L_FRAME48k ) )
#endif
{
bw = intl_bw_48; /*Q0*/
cnt = intl_cnt_48; /*Q0*/
grps = N_INTL_GRP_48;
move16();
#ifdef SOLVED_COMP_ENC_DEC
l_frame = L_FRAME48k;
move16();
#endif
p2 = coefs_out + sublen[2]; /* 240, length/4 */
p3 = coefs_out + sublen[4]; /* 480, 2*length/4 */
p4 = coefs_out + sublen[5]; /* 720, 3*length/4 */
......
......@@ -4746,7 +4746,7 @@ ivas_error stereo_memory_enc_fx(
void stereo_switching_enc_fx(
CPE_ENC_HANDLE hCPE, /* i : CPE encoder structure */
Word16 old_input_signal_pri[], /* i : old input signal of primary channel */
Word32 old_input_signal_pri[], /* i : old input signal of primary channel */
const Word16 input_frame, /* i : input frame length */
const Word16 q_inp );
......
......@@ -3061,22 +3061,7 @@ void GenShapedSHBExcitation_fx(
Word16 n_mem2, /* i : n_mem2 scale factor to adjust 24.4/32kbps memories */
Word16 prev_Q_bwe_syn, /* i : st_fx->prev_Q_bwe_syn */
const Word32 bitrate,
const Word16 prev_bfi
#ifdef ADD_IVAS_TBE_CODE
, /* i : previous frame was concealed */
const Word16 element_mode, /* i : element mode */
const Word16 flag_ACELP16k, /* i : ACELP@16kHz flag */
Word16 *nlExc16k, /* i/o: NL exc for IC-BWE */
Word16 *mixExc16k, /* i/o: exc spreading for IC-BWE */
const Word32 extl_brate, /* i : extension layer bitarte */
const Word16 MSFlag, /* i : Multi Source flag */
Word16 EnvSHBres_4k[], /* i/o: TD envelope of the SHB residual signal */
Word16 *prev_pow_exc16kWhtnd, /* i/o: power of the LB excitation signal in the previous frame */
Word16 *prev_mix_factor, /* i/o: mixing factor in the previous frame */
Word16 *Env_error, /* o : error in SHB residual envelope modelling*/
Word16 Env_error_part[] /* o : per-segment error in SHB residual envelope modelling */
#endif
);
const Word16 prev_bfi );
 
void GenShapedSHBExcitation_ivas_enc_fx(
Word16 *excSHB, /* o : synthesized shaped shb excitation Q_bwe_exc*/
......@@ -3151,9 +3136,7 @@ void GenShapedSHBExcitation_ivas_dec_fx(
Word16 n_mem2, /* i : n_mem2 scale factor to adjust 24.4/32kbps memories */
Word16 prev_Q_bwe_syn, /* i : st_fx->prev_Q_bwe_syn */
const Word32 bitrate,
const Word16 prev_bfi
#if 1 // def ADD_IVAS_TBE_CODE
, /* i : previous frame was concealed */
const Word16 prev_bfi, /* i : previous frame was concealed */
const Word16 element_mode, /* i : element mode */
const Word16 flag_ACELP16k, /* i : ACELP@16kHz flag */
Word16 *nlExc16k, /* i/o: NL exc for IC-BWE */
......@@ -3165,7 +3148,6 @@ void GenShapedSHBExcitation_ivas_dec_fx(
Word16 *prev_mix_factor, /* i/o: mixing factor in the previous frame */
Word16 *Env_error, /* o : error in SHB residual envelope modelling*/
Word16 Env_error_part[] /* o : per-segment error in SHB residual envelope modelling */
#endif
);
 
void GenSHBSynth_fx(
......@@ -3309,9 +3291,6 @@ void synthesise_fb_high_band_fx(
#ifndef REMOVE_EVS_DUPLICATES
void prep_tbe_exc_fx(
const Word16 L_frame_fx, /* i : length of the frame */
#ifdef ADD_IVAS_TBE_CODE
const Word16 L_subfr,
#endif
const Word16 i_subfr_fx, /* i : subframe index */
const Word16 gain_pit_fx, /* i : Pitch gain Q14*/
const Word32 gain_code_fx, /* i : algebraic codebook gain 16+Q_exc*/
......@@ -3326,21 +3305,12 @@ void prep_tbe_exc_fx(
Word16 T0_frac, /* i : Fractional pitch variables Q0*/
const Word16 coder_type, /* i : coding type */
Word32 core_brate /* i :core bitrate */
#ifdef ADD_IVAS_TBE_CODE
,
const Word16 element_mode, /* i : element mode */
const Word16 idchan, /* i : channel ID */
const Word16 flag_TD_BWE, /* i : flag indicating whether hTD_BWE exists */
const Word16 tdm_LRTD_flag /* i : LRTD stereo mode flag */
#endif
);
#endif
 
void prep_tbe_exc_ivas_fx(
const Word16 L_frame_fx, /* i : length of the frame */
#if 1 // def ADD_IVAS_TBE_CODE
const Word16 L_subfr,
#endif
const Word16 i_subfr_fx, /* i : subframe index */
const Word16 gain_pit_fx, /* i : Pitch gain Q14*/
const Word32 gain_code_fx, /* i : algebraic codebook gain 16+Q_exc*/
......@@ -3354,14 +3324,11 @@ void prep_tbe_exc_ivas_fx(
Word16 T0, /* i : integer pitch variables Q0 */
Word16 T0_frac, /* i : Fractional pitch variables Q0*/
const Word16 coder_type, /* i : coding type */
Word32 core_brate
#if 1 // def ADD_IVAS_TBE_CODE
, /* i : core bitrate */
Word32 core_brate, /* i : core bitrate */
const Word16 element_mode, /* i : element mode */
const Word16 idchan, /* i : channel ID */
const Word16 flag_TD_BWE, /* i : flag indicating whether hTD_BWE exists */
const Word16 tdm_LRTD_flag /* i : LRTD stereo mode flag */
#endif
);
 
Word16 swb_formant_fac_fx( /* o : Formant filter strength [0,1] */
......@@ -4180,15 +4147,7 @@ Word16 get_codec_mode(
);
 
Word16 getTcxonly(
#ifdef IVAS_CODE_SWITCHING
const Word16 element_mode, /* i : IVAS element mode */
#endif
const Word32 total_brate /* i : total bitrate */
#ifdef IVAS_CODE_SWITCHING
,
const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0)*/
const int16_t is_ism_format /* i : flag indicating ISM format */
#endif
);
 
Word16 getTcxonly_fx(
......@@ -6577,12 +6536,7 @@ void TonalMDCTConceal_SaveFreqSignal(
Word16 nNewSamplesCore,
const Word16 *scaleFactors,
const Word16 *scaleFactors_exp,
const Word16 gain_tcx_exp
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
,
const Word16 infoIGFStartLine
#endif
);
const Word16 gain_tcx_exp );
 
void TonalMDCTConceal_SaveFreqSignal_ivas_fx(
TonalMDCTConcealPtr hTonalMDCTConc,
......@@ -6650,9 +6604,6 @@ void TonalMDCTConceal_InsertNoise(
Word16 *pSeed, /*IN/OUT*/
const Word16 tiltCompFactor,
Word16 crossfadeGain,
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
const Word16concealment_noise[L_FRAME48k],
#endif
const Word16 crossOverFreq );
 
void TonalMDCTConceal_SaveTimeSignal(
......@@ -7646,9 +7597,6 @@ void configureFdCngDec_fx(
Word16 ApplyFdCng_fx(
Word16 *timeDomainInput, /* i : pointer to time domain i */
Word16 Q,
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
Word16 *powerSpectrum,
#endif
Word32 **cldfbBufferReal, /* i/o: real part of the CLDFB buffer */
Word32 **cldfbBufferImag, /* i/o: imaginary part of the CLDFB buffer */
Word16 *cldfbBufferScale, /* o : pointer to the scalefactor for real and imaginary part of the CLDFB buffer */
......@@ -7672,9 +7620,6 @@ Word16 ApplyFdCng_ivas_fx(
void perform_noise_estimation_dec_fx(
const Word16 *timeDomainInput, /* i: pointer to time domain i */
const Word16 Q,
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
float *power_spectrum,
#endif
HANDLE_FD_CNG_DEC hFdCngDec /* i/o: FD_CNG structure containing all buffers and variables */
);
 
......@@ -8389,10 +8334,6 @@ void improv_amr_wb_gs_fx(
const Word16 Last_ener_fx, /* i : Last energy (Q8) Q0*/
const Word16 rate_switching_reset, /* i : rate switching reset flag Q0*/
const Word16 last_coder_type /* i : Last coder_type Q0*/
#ifdef ADD_IVAS_GS_DEC_IMPR
,
const Word16 VeryLowRateSTflag /* i : Enable the noise enhancement for very low rate stereo generic mode */
#endif
);
 
// dec_amr_wb_fx.c
......@@ -8444,18 +8385,7 @@ ivas_error ppp_quarter_decoder_fx(
void open_decoder_LPD_fx(
Decoder_State *st,
const Word32 total_brate, /* Q0 */
#ifdef NEW_IVAS_OPEN_DEC
const Word32 last_total_brate,
#endif
const Word16 bwidth /* Q0 */
#ifdef NEW_IVAS_OPEN_DEC
,
const Word16 is_mct, /* i : MCT mode flag */
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
const Word16 last_element_mode,
#endif
const Word16 is_init /* i : indicate call from init_decoder() to avoid double TC initialization */
#endif
);
void open_decoder_LPD_ivas_fx(
Decoder_State *st, /* i/o: decoder state structure */
......@@ -9010,28 +8940,18 @@ void tcx_hm_modify_envelope(
);
 
// tns_base_dec_fx.c
#ifdef IVAS_CODE
void
#else
Word16
#endif
ReadTnsData( STnsConfig const *pTnsConfig,
Decoder_State *st,
Word16 *pnBits,
Word16 *stream,
Word16 *pnSize );
#define IVAS_CODE
#ifdef IVAS_CODE
void
#else
Word16
#endif
ReadTnsData_ivas_fx( STnsConfig const *pTnsConfig,
void ReadTnsData_ivas_fx( STnsConfig const *pTnsConfig,
Decoder_State *st,
Word16 *pnBits,
Word16 *stream,
Word16 *pnSize );
#undef IVAS_CODE
 
Word16 DecodeTnsData( STnsConfig const *pTnsConfig,
Word16 const *stream,
......@@ -9454,10 +9374,6 @@ void con_tcx_fx(
const Word16 coh, /* i : coherence of stereo signal */
Word16 *noise_seed, /* i/o: noise seed for stereo */
const Word16 only_left /* i : TD-PLC only in left channel */
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
,
const float *A_cng /* i : CNG LP filter coefficients */
#endif
#endif
 
);
......
This diff is collapsed.
......@@ -123,9 +123,6 @@ void mdct_window_sine(
Word16 n /* Q0 */
)
{
#ifdef IVAS_CODE
if ( element_mode == EVS_MONO )
#endif
{
const PWord16 *table;
table = getSineWindowTable( n );
......@@ -138,42 +135,6 @@ void mdct_window_sine(
}
// PMT("getSineWindowTable needs to be updated for IVAS")
}
#ifdef IVAS_CODE
else
{
const float *window_table = 0;
Word16 buf_in_size = 0;
switch ( window_type )
{
case FULL_OVERLAP:
window_table = tcx_mdct_window_48;
buf_in_size = 420;
break;
case HALF_OVERLAP:
window_table = tcx_mdct_window_half_48;
buf_in_size = 180;
break;
case TRANSITION_OVERLAP:
case MIN_OVERLAP:
window_table = tcx_mdct_window_trans_48;
buf_in_size = 60;
break;
default:
assert( 0 && "Unsupported window type" );
break;
}
if ( Fs == 48000 )
{
mvr2r( window_table, window, n );
}
else
{
lerp( window_table, window, n, buf_in_size );
}
}
#endif
}
......
......@@ -96,10 +96,8 @@ void InitTnsConfiguration(
Word32 nSampleRate;
Word16 s1;
Word16 s2;
#ifndef ADD_IVAS_TNS
(void) ( element_mode );
(void) ( is_mct );
#endif
nSampleRate = bwMode2fs[bwidth];
move32();
startLineFilter = &pTnsConfig->iFilterBorders[1];
......@@ -138,21 +136,6 @@ void InitTnsConfiguration(
ELSE
IF( GT_32( nSampleRate, INT_FS_16k ) )
{
#ifdef ADD_IVAS_TNS
if ( ( element_mode > IVAS_SCE ) && ( total_brate >= ( is_mct ? IVAS_32k : IVAS_48k ) ) )
{
pTnsConfig->nMaxFilters = sizeof( tnsParameters32kHz_Stereo ) / sizeof( tnsParameters32kHz_Stereo[0] );
if ( nSampleRate == 100 * frameLength ) /* sub-frame length is <= 10 ms */
{
pTnsConfig->pTnsParameters = tnsParameters32kHz_grouped;
}
else
{
pTnsConfig->pTnsParameters = tnsParameters32kHz_Stereo;
}
}
else
#endif
{
move16();
......@@ -212,9 +195,6 @@ void InitTnsConfiguration(
move16();
pTnsConfig->iFilterBorders[0] = frameLength;
}
#ifdef ADD_IVAS_TNS
pTnsConfig->allowTnsOnWhite = 0;
#endif
return; /*TNS_NO_ERROR;*/
}
......
This diff is collapsed.
......@@ -740,15 +740,6 @@ static void CorrectF0(
Word16 tmp;
#ifdef IVAS_CODE
FOR( i = 0; i < MAX_PEAKS_FROM_PITCH - 1; i++ )
{
diff[i] = 0;
sortedDiff[i] = 0;
move16));
move16));
}
#endif
F0 = *pF0; /*Q10*/
test();
......
......@@ -1287,12 +1287,7 @@ ivas_error acelp_core_dec_fx(
/*Noise estimate*/
IF( NE_16( st_fx->element_mode, IVAS_CPE_TD ) /* && !st->cng_ism_flag IVAS_CODE */ )
{
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
PMT( "Code for IVAS_CODE_CNG_FIX185_PLC_FADEOUT not done" )
ApplyFdCng_fx( syn, st_fx->Q_syn, NULL, realBuffer, imagBuffer, st, 0, ( st->coder_type == AUDIO && !st->GSC_noisy_speech ) );
#else
ApplyFdCng_fx( syn_fx, st_fx->Q_syn, realBuffer, imagBuffer, NULL, st_fx, 0, ( EQ_16( st_fx->coder_type, AUDIO ) && st_fx->GSC_noisy_speech == 0 ) );
#endif
}
/* CNA: Generate additional comfort noise to mask potential coding artefacts */
}
......
......@@ -813,15 +813,10 @@ ivas_error amr_wb_dec_fx(
st_fx->VAD = 0;
move16();
}
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
PMT( "Fixed point not done here " )
ApplyFdCng_fx( syn, NULL, NULL, NULL, st, 0, 0 );
#else
#ifdef REMOVE_EVS_DUPLICATES
ApplyFdCng_ivas_fx( syn_fx, st_fx->Q_syn, NULL, 0, NULL, NULL, NULL, st_fx, 0, 0 );
#else
ApplyFdCng_fx( syn_fx, st_fx->Q_syn, NULL, NULL, NULL, st_fx, 0, 0 );
#endif
#endif
st_fx->hFdCngDec->hFdCngCom->frame_type_previous = st_fx->m_frame_type;
move16();
......
......@@ -20,18 +20,7 @@
void open_decoder_LPD_fx(
Decoder_State *st,
const Word32 total_brate, /* Q0 */
#ifdef NEW_IVAS_OPEN_DEC
const Word32 last_total_brate,
#endif
const Word16 bwidth /* Q0 */
#ifdef NEW_IVAS_OPEN_DEC
,
const Word16 is_mct, /* i : MCT mode flag */
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
const Word16 last_element_mode,
#endif
const Word16 is_init /* i : indicate call from init_decoder() to avoid double TC initialization */
#endif
)
{
Word16 i;
......@@ -50,10 +39,8 @@ void open_decoder_LPD_fx(
hTcxLtpDec = st->hTcxLtpDec;
hTcxDec = st->hTcxDec;
#ifndef NEW_IVAS_OPEN_DEC
st->total_brate = total_brate;
move32();
#endif
if ( NE_16( st->codec_mode, MODE1 ) ) /*already updated in MODE1*/
{
......@@ -70,40 +57,18 @@ void open_decoder_LPD_fx(
/* initializing variables for frame lengths etc. right in the beginning */
st->L_frame = extract_l( Mult_32_16( st->sr_core, 0x0290 ) );
move16();
#ifndef NEW_IVAS_OPEN_DEC
hTcxDec->L_frameTCX = extract_l( Mult_32_16( st->output_Fs, 0x0290 ) );
move16();
#endif
IF( st->ini_frame == 0 )
{
st->last_L_frame = st->L_frame_past = st->L_frame;
move16();
move16();
#ifndef NEW_IVAS_OPEN_DEC
st->L_frameTCX_past = hTcxDec->L_frameTCX;
#endif
move16();
}
#ifdef NEW_IVAS_OPEN_DEC
IF( st->hTcxDec != NULL )
{
hTcxDec->L_frameTCX = extract_l( Mult_32_16( st->output_Fs, 0x0290 ) );
IF( st->ini_frame == 0 )
{
st->L_frameTCX_past = st->hTcxDec->L_frameTCX;
move16();
}
}
#endif
st->tcxonly = getTcxonly(
#ifdef IVAS_CODE_SWITCHING
st->element_mode,
#endif
st->total_brate
#ifdef IVAS_CODE_SWITCHING
,
is_mct
#endif
/*, st->is_ism_format Needed in the last version of float IVAS */
);
move16();
......@@ -155,9 +120,6 @@ void open_decoder_LPD_fx(
// st->pit_res_max = initPitchLagParameters(12800, &st->pit_min, &st->pit_fr1, &st->pit_fr1b, &st->pit_fr2, &st->pit_max);
// hTcxDec->pit_max_TCX = (int16_t)(st->pit_max * st->output_Fs / 12800);
// hTcxDec->pit_min_TCX = (int16_t)(st->pit_min * st->output_Fs / 12800);
#if 0
PMT("Fixed point to be verified here")
#endif
i = mult_r( hTcxDec->L_frameTCX, getInvFrameLen( L_FRAME ) ); /* Q6 */
hTcxDec->pit_max_TCX = extract_l( L_shr( L_mult( st->pit_max, i ), 7 ) ); /* Q0 */
move16();
......@@ -243,7 +205,6 @@ void open_decoder_LPD_fx(
}
/*TCX config*/
#ifndef NEW_IVAS_OPEN_DEC
st->hTcxCfg->preemph_fac = st->preemph_fac;
move16();
st->hTcxCfg->tcx_mdct_window_length_old = st->hTcxCfg->tcx_mdct_window_length;
......@@ -304,34 +265,6 @@ void open_decoder_LPD_fx(
}
resetTecDec_Fx( st->hTECDec );
#else
if ( st->hIGFDec != NULL )
{
PMT( "To be done" )
// IF (!is_init || st->element_mode != IVAS_CPE_MDCT)
//{
// init_tcx_cfg(st->hTcxCfg, total_brate, st->sr_core, st->output_Fs, st->L_frame, st->bwidth, st->hTcxDec->L_frameTCX, st->fscale, encoderLookahead, encoderLookaheadFB, st->preemph_fac, st->tcxonly, st->rf_flag, st->igf, st->hIGFDec->infoIGFStopFreq, st->element_mode, st->ini_frame, MCT_flag);
// }
// else
//{
// st->hTcxCfg->tcx_curr_overlap_mode = st->hTcxCfg->tcx_last_overlap_mode = ALDO_WINDOW;
// st->hTcxCfg->last_aldo = 1;
// }
}
/*Constraint for adaptive BPF, otherwise parameter estimation and post-processing not time aligned*/
IF( st->tcxonly == 0 )
{
assert( 0 == ( st->hTcxCfg->lfacNext > 0 ? st->hTcxCfg->lfacNext : 0 ) );
}
// IF (st->tecDec_fx != NULL)
{
resetTecDec_Fx( &( st->tecDec_fx ) );
}
#endif
/* Initialize decoder delay */
......@@ -447,7 +380,6 @@ void open_decoder_LPD_fx(
move16();
/*PLC*/
#ifndef NEW_IVAS_OPEN_DEC
IF( st->prev_bfi != 0 )
{
PWord16 const *w;
......@@ -498,10 +430,6 @@ void open_decoder_LPD_fx(
hTcxDec->Q_syn_Overl_TDAC = hHQ_core->Q_old_wtda_LB;
move16();
}
#else
PMT( "acelp_plc_mdct_transition is missing" )
// acelp_plc_mdct_transition(st);
#endif
}
test();
......@@ -545,9 +473,6 @@ void open_decoder_LPD_fx(
set16_fx( hTcxDec->syn_Overl_TDAC, 0, L_FRAME32k / 2 ); /*HQ-CORE(bfi)->TCX don't need it*/ /* Q_syn_Overl_TDAC */
set16_fx( hTcxDec->syn_Overl_TDACFB, 0, L_FRAME_MAX / 2 ); /*HQ-CORE(bfi)->TCX don't need it*/ /* Q_syn_Overl_TDACFB */
set16_fx( hTcxDec->syn_Overl, 0, L_FRAME32k / 2 ); /*HQ-CORE(bfi)->TCX don't need it*/ /* Q_syn_Overl */
#if 0
PMT("to be moved to reset_tcx_overl_buf")
#endif
}
IF( st->hTcxCfg != NULL )
{
......@@ -575,15 +500,6 @@ void open_decoder_LPD_fx(
cldfb_reset_memory( st->cldfbAna );
cldfb_reset_memory( st->cldfbBPF );
cldfb_reset_memory( st->cldfbSyn );
#ifndef NEW_IVAS_OPEN_DEC
#if 0
PMT("cldfbSynHB is missing ")
#endif
// IF (st->cldfbSynHB != NULL)
//{
// cldfb_reset_memory(st->cldfbSynHB);
// }
#endif
}
ELSE IF( ( NE_16( st->L_frame, st->last_L_frame ) ) && ( LE_16( st->L_frame, L_FRAME16k ) ) && ( LE_16( st->last_L_frame, L_FRAME16k ) ) ) /* Rate switching between 12.8 and 16 kHz*/
{
......@@ -817,10 +733,6 @@ void open_decoder_LPD_fx(
test();
IF( EQ_16( st->core, ACELP_CORE ) && EQ_16( st->last_core, HQ_CORE ) )
{
/*_DIFF_FLOAT_FIX_*/
#if 0
PMT("floating point is using L_frameTCX instead of output_frame, is it ok?")
#endif
frame_ener_fx( st->output_frame_fx, UNVOICED_CLAS, st->previoussynth_fx, -1, &st->enr_old_fx, 1, 0, 0, 0 );
}
}
......@@ -840,20 +752,6 @@ void open_decoder_LPD_fx(
move16();
if ( st->hTcxDec != NULL )
{
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
/* Todo: should be considered for other stereo modes as well */
IF( is_init || MCT_flag || !( st->element_mode == IVAS_CPE_MDCT && st->element_mode == last_element_mode ) )
{
PMT( "Fixed point to be done" )
st->hTcxDec->CngLevelBackgroundTrace_bfi = PLC_MIN_CNG_LEV;
st->hTcxDec->NoiseLevelIndex_bfi = PLC_MIN_STAT_BUFF_SIZE - 1;
st->hTcxDec->CurrLevelIndex_bfi = 0;
st->hTcxDec->LastFrameLevel_bfi = PLC_MIN_CNG_LEV;
set_f( st->hTcxDec->NoiseLevelMemory_bfi, PLC_MIN_CNG_LEV, PLC_MIN_STAT_BUFF_SIZE );
st->hTcxDec->cummulative_damping_tcx = 1.0f;
}
#else
hTcxDec->conCngLevelBackgroundTrace = PLC_MIN_CNG_LEV_Q21; /*Q21*/
move16();
hTcxDec->conNoiseLevelIndex = PLC_MIN_STAT_BUFF_SIZE - 1; /* Q0 */
......@@ -871,7 +769,6 @@ void open_decoder_LPD_fx(
hTcxDec->cummulative_damping_tcx = 32767 /*1.0f Q15*/;
move16();
#endif
}
st->cummulative_damping = 32767 /*1.0f Q15*/;
move16();
......@@ -891,10 +788,8 @@ void open_decoder_LPD_fx(
st->old_fpitch = L_deposit_h( st->pit_min );
move32();
#ifndef NEW_IVAS_OPEN_DEC
st->old_fpitchFB = L_deposit_h( hTcxDec->pit_min_TCX );
move32();
#endif
st->rate_switching_init = 1;
move16();
......@@ -924,9 +819,6 @@ void open_decoder_LPD_fx(
test();
IF( hTcxLtpDec != NULL && ( EQ_16( st->ini_frame, 0 ) || ( EQ_16( st->last_codec_mode, MODE1 ) && st->element_mode == EVS_MONO ) ) )
{
#if 0
PMT("TO be verify, update seems to differ from float")
#endif
hTcxLtpDec->tcxltp_pitch_int = st->pit_max; /* Q0 */
move16();
hTcxLtpDec->tcxltp_pitch_fr = 0; /* Q0 */
......@@ -1059,12 +951,6 @@ void open_decoder_LPD_fx(
move16();
st->second_last_core = -1;
move16();
#ifdef NEW_IVAS_OPEN_DEC
IF( st->hTcxCfg != NULL && st->element_mode != EVS_MONO )
{
st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( is_init ? total_brate : st->bits_frame_nominal * FRAMES_PER_SEC, st->igf );
}
#endif
IF( hTcxDec != NULL )
{
hTcxDec->tcxltp_second_last_pitch = st->old_fpitch; /*15Q16*/
......@@ -1105,10 +991,8 @@ void open_decoder_LPD_fx(
hTcxDec->tcx_hm_LtpPitchLag = -1;
move16();
}
#ifndef NEW_IVAS_OPEN_DEC
st->hTcxCfg->na_scale = 32767 /*1.0f Q15*/;
move16();
#endif
if ( hTcxLtpDec != NULL )
{
hTcxLtpDec->tcxltp_gain = 0; /* Q15 */
......
......@@ -13,18 +13,7 @@ void mode_switch_decoder_LPD_fx(
Decoder_State *st, /* i/o: decoder state structure */
Word16 bwidth, /* i : audio bandwidth Q0*/
Word32 total_brate, /* i : total bitrate Q0*/
#ifdef IVAS_CODE_SWITCHING
const Word32 last_total_brate, /* i : last frame total bitrate */
#endif
Word16 frame_size_index /* i : index determining the frame size Q0*/
#ifdef IVAS_CODE_SWITCHING
,
const Word16 MCT_flag /* i : hMCT handle allocated (1) or not (0)*/
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
,
const Word16 last_element_mode
#endif
#endif
)
{
Word16 fscale, switchWB;
......@@ -100,15 +89,7 @@ void mode_switch_decoder_LPD_fx(
test();
IF( NE_16( fscale, st->fscale ) || ( switchWB != 0 ) || ( bSwitchFromAmrwbIO != 0 ) || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset )
{
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
open_decoder_LPD_fx( st, total_brate, last_total_brate, bwidth, MCT_flag, last_element_mode, 0 );
#else
#ifdef IVAS_CODE
open_decoder_LPD_fx( st, total_brate, last_total_brate, bwidth, is_mct, 0 );
#else
open_decoder_LPD_fx( st, total_brate, bwidth );
#endif
#endif
}
ELSE
{
......@@ -153,9 +134,6 @@ void mode_switch_decoder_LPD_fx(
IF( ( st->hTcxCfg->fIsTNSAllowed != 0 ) && st->hIGFDec != NULL )
{
InitTnsConfigs( bwidth, st->hTcxCfg->tcx_coded_lines, st->hTcxCfg->tnsConfig, st->hIGFDec->infoIGFStopFreq, total_brate, st->element_mode, 0 /* 0 should be replaced with MCT_flag*/ );
#ifdef IVAS_CODE
SetAllowTnsOnWhite( st->hTcxCfg->tnsConfig, st->element_mode == IVAS_CPE_MDCT );
#endif
}
}
}
......
......@@ -574,11 +574,7 @@ void decoder_LPD_fx(
IF( bfi != 0 && ( st->last_core != ACELP_CORE ) )
{
/* PLC: [TCX: TD PLC] */
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
con_tcx_fx( st, &synthFB[0], -1.f, NULL, 0, NULL );
#else
con_tcx_fx( st, &synthFB[0] );
#endif
lerp( synthFB, synth, st->L_frame, hTcxDec->L_frameTCX );
st->con_tcx = 1;
move16();
......@@ -778,11 +774,7 @@ void decoder_LPD_fx(
{
TonalMDCTConceal_SaveTimeSignal( st->hTonalMDCTConc, synthFB, L_frameTCX );
}
#ifdef IVAS_CODE_CNG_FIX185_PLC_FADEOUT
decoder_tcx_post_fx( st, synth, synthFB, Aq, bfi, 0 );
#else
decoder_tcx_post_fx( st, synth, synthFB, Aq, bfi );
#endif
IF( EQ_16( st->core, TCX_20_CORE ) )
{
/* LPC Interpolation for BWE/post-processing */
......