Commit 1b5a9477 authored by hmund's avatar hmund
Browse files

Merge remote-tracking branch 'origin/main' into dlb_sba_encoder_complexity_opt

parents 6cc23ab1 02c53074
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1065,7 +1065,7 @@ complexity-ism-in-binaural-out:
    - *complexity-measurements-setup
    - in_format=ISM
    - out_format=BINAURAL
    - bash ci/complexity_measurements/getWmops.sh "ISM1 ISM2 ISM3 ISM4" "$out_format"
    - bash ci/complexity_measurements/getWmops.sh "ISM+1 ISM+2 ISM+3 ISM+4" "$out_format"
    - *complexity-measurements-prepare-artifacts

complexity-sba-hoa3-in-hoa3-out:
+18 −3
Original line number Diff line number Diff line
@@ -63,8 +63,7 @@ def main(args):

    assert all([t in SUPPORTED_TESTS for t in tests])

    modes = get_modes(in_format)
    returncode = run_check(modes, out_formats, tests, run_fec=run_fec)
    returncode = run_check(in_format, out_formats, tests, run_fec=run_fec)

    collect_for_sanitizer_test(CONSOLE_OUT_FILE)

@@ -92,7 +91,22 @@ def get_modes(in_format: str) -> list:
    return mode_list


def run_check(modes: list, out_formats: list, tests: list, run_fec: bool = True):
def get_md_file_command(in_format: str) -> list:

    cmd = list()
    if in_format.startswith("ISM"):
        cmd.append("--metadata_files")
        md_filename = "/usr/local/ltv/ltvISM{}.csv"
        n = int(in_format[-1])
        cmd.extend([md_filename.format(i) for i in range(1, n + 1)])

    return cmd


def run_check(in_format: str, out_formats: list, tests: list, run_fec: bool = True):

    modes = get_modes(in_format)
    md_file_command = get_md_file_command(in_format)

    ### always run encoder and decoder with no frameloss
    cmd_no_fec = [
@@ -107,6 +121,7 @@ def run_check(modes: list, out_formats: list, tests: list, run_fec: bool = True)
        *modes,
        "--oc",
        *out_formats,
        *md_file_command,
    ]

    print(
+6 −1
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ fi

cfg=./scripts/config/ci_linux.json
dly_profile=./scripts/dly_error_profiles/dly_error_profile_10.dat
ism_md_cmd="--metadata_files /usr/local/testv/stvISM1.csv /usr/local/testv/stvISM2.csv /usr/local/testv/stvISM3.csv /usr/local/testv/stvISM4.csv"

if [ $BUILD -eq 1 ];then
	# Enable memory macros to find unbalanced memory allocations/deallocations
@@ -74,7 +75,11 @@ if [ $BUILD -eq 1 ];then
fi

# run all modes vanilla-fashion
./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
# treat ISM modes separately because passing the metadata files to MASA modes causes crashes
ism_modes=$(./scripts/runIvasCodec.py -l | grep ISM)
non_ism_modes=$(./scripts/runIvasCodec.py -l | grep -v ISM)
./scripts/runIvasCodec.py -m $non_ism_modes -p $cfg -U 1 $WORKERS | tee smoke_test_output.txt
./scripts/runIvasCodec.py -m $ism_modes -p $cfg -U 1 $WORKERS $ism_md_cmd | tee smoke_test_output.txt
# run the decoding again, but with 15% frame loss
./scripts/runIvasCodec.py -p $cfg -U 1 $WORKERS -D="-fec 15" --decoder_only | tee smoke_test_output_plc.txt

+26 −21
Original line number Diff line number Diff line
@@ -536,6 +536,9 @@ ivas_error config_acelp1(
    const int16_t tdm_lp_reuse_flag, /* i  : LPC reuse flag (can be 1 only with secondary channel */
    const int16_t tdm_low_rate_mode, /* i  : secondary channel low rate mode flag */
    const int16_t idchan,            /* i  : stereo channel ID               */
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
    const int16_t active_cnt, /* i  : Active frame counter            */
#endif
    const int16_t tdm_Pitch_reuse_flag, /* i  : primary channel pitch reuse flag*/
    const int16_t tdm_LRTD_flag,        /* i  : LRTD stereo mode flag           */
    const int16_t GSC_IVAS_mode         /* i  : GSC IVAS mode                   */
@@ -754,11 +757,12 @@ ivas_error config_acelp1(
            bits -= acelp_cfg->mid_lsf_bits;
        }
#ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 )
        else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 )
        {
            bits -= TDM_IC_LSF_PRED_BITS;
        }
#endif

        /* gain Q bit-budget - part 1 */
        if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) )
        {
@@ -1323,6 +1327,7 @@ ivas_error config_acelp1(
                else
                {
                    int16_t nb_prm = 4;

                    if ( tdm_low_rate_mode == 1 )
                    {
                        nb_prm = 2;
+4 −0
Original line number Diff line number Diff line
@@ -1801,7 +1801,11 @@ ivas_error preview_indices(
                if ( bit_stream[2] == 0 )
                {
                    st_ivas->ivas_format = SBA_FORMAT;
#ifndef LBR_SBA
                    st_ivas->sba_mode = ivas_sba_mode_select( total_brate );
#else
                    st_ivas->sba_mode = ivas_sba_mode_select();
#endif
                }
                else
                {
Loading