Commit 031172b2 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'main' into 1053-reverb-reconfiguration-runtime-aeid-file-tests

parents 8327a95b a826f47f
Loading
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
import argparse
import csv
import sys
import numpy as np


THRESH = 0.01
COLS = [
    [3, 5, 7, 9], # wmops_all
    [3,5,7,8,10,12,13,15,17], # ram_all
    [3,5,7,9,11,13,15,17,19], # rom_all
]


def main(args):
    linewise_logfiles = [args.wmops_logfile, args.ram_logfile, args.rom_logfile]
    changes_found_linewise = any([check_linewise_logfile(f, c) for f, c in zip(linewise_logfiles, COLS)])

    if changes_found_linewise:
        print("Global max of WMOPS, RAM or ROM changed")

    return int(changes_found_linewise)


def check_linewise_logfile(filepath, cols):
    with open(filepath) as f:
        contents = [line for line in csv.reader(f, delimiter=" ")]

    curr = contents[-1]
    prev = contents[-2]

    change_ratios = [abs(float(curr[i]) / float(prev[i]) - 1) > THRESH for i in cols]
    changes_found = any(change_ratios)

    return changes_found


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("wmops_logfile")
    parser.add_argument("ram_logfile")
    parser.add_argument("rom_logfile")
    args = parser.parse_args()

    sys.exit(main(args))
+6 −1
Original line number Diff line number Diff line
@@ -86,4 +86,9 @@ ${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameF
# generate java script from database
tcsh ${scriptDir}/genWebpageData_Rom.csh ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/graphs_rom_flc.js Graphs_ROM

python3 ${scriptDir}/check_for_changes.py ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt
if [ "$?" != "0" ]; then
    ret_val=1
fi

exit $ret_val
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@
#define REVERT_ZERO_FLUSH_TRESH                               /* FhG: issue 1069: revert threshold value introduced with !1518 due to significant complexity increase*/ 
#define NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC            /* FhG: fix out-of-bound errors when switching from SID frame to active frame*/
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING             /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
#define NONBE_1131_ACELP_OOB                                  /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */

/* ##################### End NON-BE switches ########################### */

+4 −0
Original line number Diff line number Diff line
@@ -703,7 +703,11 @@ ivas_error acelp_core_dec(
                old_exc_s = st->old_exc + L_EXC_MEM_DEC - st->L_frame;
                tmpF = *old_exc_s;
                st->mem_deemph = old_exc_s[st->L_frame - 1];
#ifdef NONBE_1131_ACELP_OOB
                preemph( old_exc_s, st->preemph_fac, st->L_frame, &tmpF );
#else
                preemph( old_exc_s, st->preemph_fac, L_FRAME16k, &tmpF );
#endif
                mvr2r( old_exc_s + st->L_frame - M, st->mem_syn2, M );
                residu( Aq, M, old_exc_s, old_exc + L_EXC_MEM_DEC - st->L_frame, st->L_frame );
            }