From bf3b98444204313c70628d95071ca3519fde694b Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 21 Jan 2025 16:14:51 +0100 Subject: [PATCH 01/39] add script to split complexity csv files by levels --- ci/complexity_measurements/split_by_levels.py | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 ci/complexity_measurements/split_by_levels.py diff --git a/ci/complexity_measurements/split_by_levels.py b/ci/complexity_measurements/split_by_levels.py new file mode 100644 index 0000000000..ef000498b9 --- /dev/null +++ b/ci/complexity_measurements/split_by_levels.py @@ -0,0 +1,82 @@ +#! /usr/bin/env python3 + +# (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository. All Rights Reserved. + +# This software is protected by copyright law and by international treaties. +# The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, +# Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., +# Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, +# Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other +# contributors to this repository retain full ownership rights in their respective contributions in +# the software. This notice grants no license of any kind, including but not limited to patent +# license, nor is any license granted by implication, estoppel or otherwise. + +# Contributors are required to enter into the IVAS codec Public Collaboration agreement before making +# contributions. + +# This software is provided "AS IS", without any express or implied warranties. The software is in the +# development stage. It is intended exclusively for experts who have experience with such software and +# solely for the purpose of inspection. All implied warranties of non-infringement, merchantability +# and fitness for a particular purpose are hereby disclaimed and excluded. + +# Any dispute, controversy or claim arising under or in relation to providing this software shall be +# submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in +# accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and +# the United Nations Convention on Contracts on the International Sales of Goods. + +import pandas as pd +import numpy as np +import argparse +import pathlib + +LEVELS_2_MAX_BR = { + "level_1": (0, 80), + "level_2": (96, 192), + "level_3": (256, 512), +} + + +def main(csv_files: list): + for csv_file in csv_files: + df = pd.read_csv(csv_file, delimiter=";") + + mask_vbr = df["conf"].str.contains("RS") + df_vbr = df[mask_vbr] + filename_vbr = f"{csv_file.stem}_rate_sw{csv_file.suffix}" + df_vbr.to_csv( + filename_vbr, + index=False, + sep=";", + ) + + df_cbr = df[np.logical_not(mask_vbr)] + df_cbr["bitrate"] = df_cbr["conf"].str.extract(r"@(.*) kbps").astype("float") + + for lvl_suffix, (min_br, max_br) in LEVELS_2_MAX_BR.items(): + mask_lvl = np.logical_and( + df_cbr["bitrate"] >= min_br, df_cbr["bitrate"] <= max_br + ) + df_lvl = df_cbr[mask_lvl] + filename_lvl = f"{csv_file.stem}_{lvl_suffix}{csv_file.suffix}" + df_lvl.to_csv( + filename_lvl, + index=False, + sep=";", + ) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument( + "csv_files", + nargs="+", + help="CSV files to split by complexity levels.", + type=pathlib.Path, + ) + + args = parser.parse_args() + main(args.csv_files) -- GitLab From e3b44814de145c8d128c86a970596a898f1b82c4 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 21 Jan 2025 16:47:42 +0100 Subject: [PATCH 02/39] add loop over split csv files --- ci/complexity_measurements/getWmops.sh | 71 +++++++++++++++++--------- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index e38ba3cc23..b375ad982c 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -94,29 +94,54 @@ fi ./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? -# get the info on worst-case operating point: WMOPS number, enc-operating mode, dec-operating mode -### WMOPS -${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcLast}_WMOPS.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_wmops_all.txt - -# create copy of WMOPS csv file with special name to easily get it from artifacts when comparing BASOP to float numbers -cp ${wmopsFilenameFlc}_WMOPS.csv ${wmopsFilenameFlcDir}/latest_WMOPS.csv - -# get memory info for webpage -### RAM -${scriptDir}/mergeNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv >${wmopsFilenameFlc}_RAM.csv -${scriptDir}/parseNewsletterRam.py ${wmopsFilenameFlc}_HEAP.csv ${wmopsFilenameFlc}_STACK.csv ${wmopsFilenameFlcLast}_RAM.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_ram_all.txt - -### ROM -${scriptDir}/mergeNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv >${wmopsFilenameFlc}_ROM.csv -${scriptDir}/parseNewsletterRom.py ${wmopsFilenameFlc}_PROM.csv ${wmopsFilenameFlc}_TROM.csv ${wmopsFilenameFlcLast}_ROM.csv ${commit_sha} ${shortDate} ${fullDate} >>${destDir}/wmops/log_rom_all.txt - -# generate javascript code from log files -# pass the ref log for comparison only if arg is given -if [ "$wmops_ref_logfile" != "" ]; then - python3 ci/complexity_measurements/genWebpageData.py ${destDir}/wmops/log_wmops_all.txt ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/log_ram_all.txt --wmops_per_op_log_for_comparison $wmops_ref_logfile -else - python3 ci/complexity_measurements/genWebpageData.py ${destDir}/wmops/log_wmops_all.txt ${wmopsFilenameFlc}_WMOPS.csv ${destDir}/wmops/log_rom_all.txt ${destDir}/wmops/log_ram_all.txt -fi +./ci/complexity_measurements/split_by_levels.py "${wmopsFilenameFlc}*.csv" + +split_suffixes=("rate_sw", "level_1", "level_2", "level_3") + +for suffix in $split_suffixes; do + + wmopsFilenameFlc_split="${wmopsFilenameFlc}_WMOPS_${suffix}.csv" + wmopsFilenameFlcLast_split="${wmopsFilenameFlcLast}_WMOPS_${suffix}.csv" + log_wmops_all_split="${destDir}/wmops/log_wmops_all_${suffix}.txt" + latest_wmops_split="${wmopsFilenameFlcDir}/latest_WMOPS_${suffix}.csv" + + heapFilenameFlc_split="${wmopsFilenameFlc}_HEAP_${suffix}.csv" + stackFilenameFlc_split="${wmopsFilenameFlc}_STACK_${suffix}.csv" + ramFilenameFlc_split="${wmopsFilenameFlc}_RAM_${suffix}.csv" + ramFilenameFlcLast_split="${wmopsFilenameFlcLast}_RAM_${suffix}.csv" + log_ram_all_split="${destDir}/wmops/log_ram_all_${suffix}.txt" + + promFilenameFlc_split="${wmopsFilenameFlc}_PROM_${suffix}.csv" + tromFilenameFlc_split="${wmopsFilenameFlc}_TROM_${suffix}.csv" + romFilenameFlc_split="${wmopsFilenameFlc}_ROM_${suffix}.csv" + romFilenameFlcLast_split="${wmopsFilenameFlcLast}_ROM_${suffix}.csv" + log_rom_all_split="${destDir}/wmops/log_rom_all_${suffix}.txt" + + # get the info on worst-case operating point: WMOPS number, enc-operating mode, dec-operating mode + ### WMOPS + ${scriptDir}/parseNewsletterWmops.py ${wmopsFilenameFlc_split} ${wmopsFilenameFlcLast_split} ${commit_sha} ${shortDate} ${fullDate} >>${log_wmops_all_split} + + # create copy of WMOPS csv file with special name to easily get it from artifacts when comparing BASOP to float numbers + cp ${wmopsFilenameFlc_split} ${latest_wmops_split} + + # get memory info for webpage + ### RAM + ${scriptDir}/mergeNewsletterRam.py ${heapFilenameFlc_split} ${stackFilenameFlc_split} >${ramFilenameFlc_split} + ${scriptDir}/parseNewsletterRam.py ${heapFilenameFlc_split} ${stackFilenameFlc_split} ${ramFilenameFlcLast_split} ${commit_sha} ${shortDate} ${fullDate} >>${log_ram_all_split} + + ### ROM + ${scriptDir}/mergeNewsletterRom.py ${promFilenameFlc_split} ${tromFilenameFlc_split} >${romFilenameFlc_split} + ${scriptDir}/parseNewsletterRom.py ${promFilenameFlc_split} ${tromFilenameFlc_split} ${romFilenameFlcLast_split} ${commit_sha} ${shortDate} ${fullDate} >>${log_rom_all_split} + + # generate javascript code from log files + # pass the ref log for comparison only if arg is given + if [ "$wmops_ref_logfile" != "" ]; then + python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} --wmops_per_op_log_for_comparison $wmops_ref_logfile + else + python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} + fi + +done 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 -- GitLab From 228de042d430ae4d819564efbc23c02d7b7c65f5 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 21 Jan 2025 16:54:35 +0100 Subject: [PATCH 03/39] pass suffix to genWebpageData.py --- ci/complexity_measurements/genWebpageData.py | 19 +++++++++++++------ ci/complexity_measurements/getWmops.sh | 6 ++++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ci/complexity_measurements/genWebpageData.py b/ci/complexity_measurements/genWebpageData.py index 89247620e3..7708cdf667 100644 --- a/ci/complexity_measurements/genWebpageData.py +++ b/ci/complexity_measurements/genWebpageData.py @@ -204,7 +204,7 @@ FILE_DATA = { "var_name": "Graphs_WMOPS", "elem_name": "wmops_worstcase", "description": "Worst Case WMOPS", - "filename": "graphs_wmops_flc.js", + "filename": "graphs_wmops_flc{}.js", "references": { "3xEVS": REF_WMOPS_3EVS, "6xEVS": REF_WMOPS_6EVS, @@ -215,7 +215,7 @@ FILE_DATA = { "var_name": "Graphs_ROM", "elem_name": "rom_worstcase", "description": "ROM", - "filename": "graphs_rom_flc.js", + "filename": "graphs_rom_flc{}.js", "references": { "requirementRom": 0, }, @@ -224,7 +224,7 @@ FILE_DATA = { "var_name": "Graphs_RAM", "elem_name": "ram_worstcase", "description": "Worst Case RAM", - "filename": "graphs_ram_flc.js", + "filename": "graphs_ram_flc{}.js", "references": { "requirementRam": 0, }, @@ -233,14 +233,19 @@ FILE_DATA = { "var_name": "Graphs_WMOPS_perOP", "elem_name": "wmops_worstcase_per_op", "description": "Worst Case WMOPS per OP", - "filename": "graphs_wmops_flc_perOP.js", + "filename": "graphs_wmops_flc_perOP{}.js", "references": {}, }, } def main( - wmops_log, wmops_per_op_log, rom_log, ram_log, wmops_per_op_log_for_comparison + wmops_log, + wmops_per_op_log, + rom_log, + ram_log, + wmops_per_op_log_for_comparison, + suffix, ): FILE_DATA["wmops"]["log_file"] = wmops_log FILE_DATA["wmops_per_op"]["log_file"] = wmops_per_op_log @@ -286,7 +291,7 @@ def main( displays=displays, ticks=ticks, ) - with open(data["filename"], "w") as f: + with open(data["filename"].format(suffix), "w") as f: print(js_string, file=f) @@ -449,6 +454,7 @@ if __name__ == "__main__": parser.add_argument("rom_log") parser.add_argument("ram_log") parser.add_argument("--wmops_per_op_log_for_comparison", default=None) + parser.add_argument("--suffix", default="") args = parser.parse_args() @@ -458,4 +464,5 @@ if __name__ == "__main__": args.rom_log, args.ram_log, args.wmops_per_op_log_for_comparison, + args.suffix, ) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index b375ad982c..c560741097 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -28,6 +28,8 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. +set -euxo pipefail + function usage { echo "Usage: $0 \"ivas-format(s)\" \"output-format(s)\" \"mode{full(default)|mem_only}\" \"repo{float(default)|basop}\" [wmops_ref_logfile]" exit 1 @@ -136,9 +138,9 @@ for suffix in $split_suffixes; do # generate javascript code from log files # pass the ref log for comparison only if arg is given if [ "$wmops_ref_logfile" != "" ]; then - python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} --wmops_per_op_log_for_comparison $wmops_ref_logfile + python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} --suffix ${suffix} --wmops_per_op_log_for_comparison $wmops_ref_logfile else - python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} + python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} --suffix ${suffix} fi done -- GitLab From 474403535be9c2cd95bd453ff1f6f29c5c9d869c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 22 Jan 2025 12:55:36 +0100 Subject: [PATCH 04/39] preserve full path for split files --- ci/complexity_measurements/split_by_levels.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ci/complexity_measurements/split_by_levels.py b/ci/complexity_measurements/split_by_levels.py index ef000498b9..dae1172bfb 100644 --- a/ci/complexity_measurements/split_by_levels.py +++ b/ci/complexity_measurements/split_by_levels.py @@ -46,9 +46,11 @@ def main(csv_files: list): mask_vbr = df["conf"].str.contains("RS") df_vbr = df[mask_vbr] - filename_vbr = f"{csv_file.stem}_rate_sw{csv_file.suffix}" + filename_vbr = (csv_file.with_suffix("") / "_rate_sw").with_suffix( + csv_file.suffix + ) df_vbr.to_csv( - filename_vbr, + str(filename_vbr), index=False, sep=";", ) @@ -61,9 +63,11 @@ def main(csv_files: list): df_cbr["bitrate"] >= min_br, df_cbr["bitrate"] <= max_br ) df_lvl = df_cbr[mask_lvl] - filename_lvl = f"{csv_file.stem}_{lvl_suffix}{csv_file.suffix}" + filename_lvl = (csv_file.with_suffix("") / lvl_suffix).with_suffix( + csv_file.suffix + ) df_lvl.to_csv( - filename_lvl, + str(filename_lvl), index=False, sep=";", ) -- GitLab From 4fe33c586c50684e70da774c2b62d597b086e4b6 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 22 Jan 2025 13:17:55 +0100 Subject: [PATCH 05/39] correct string concat for paths --- ci/complexity_measurements/split_by_levels.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/ci/complexity_measurements/split_by_levels.py b/ci/complexity_measurements/split_by_levels.py index dae1172bfb..5c83ca1d70 100644 --- a/ci/complexity_measurements/split_by_levels.py +++ b/ci/complexity_measurements/split_by_levels.py @@ -46,11 +46,9 @@ def main(csv_files: list): mask_vbr = df["conf"].str.contains("RS") df_vbr = df[mask_vbr] - filename_vbr = (csv_file.with_suffix("") / "_rate_sw").with_suffix( - csv_file.suffix - ) + filename_vbr = str(csv_file.with_suffix("")) + "_rate_sw" + csv_file.suffix df_vbr.to_csv( - str(filename_vbr), + filename_vbr, index=False, sep=";", ) @@ -63,11 +61,9 @@ def main(csv_files: list): df_cbr["bitrate"] >= min_br, df_cbr["bitrate"] <= max_br ) df_lvl = df_cbr[mask_lvl] - filename_lvl = (csv_file.with_suffix("") / lvl_suffix).with_suffix( - csv_file.suffix - ) + filename_lvl = str(csv_file.with_suffix("")) + suffix + csv_file.suffix df_lvl.to_csv( - str(filename_lvl), + filename_lvl, index=False, sep=";", ) -- GitLab From 75885481f63895dfdc05158eea818508a90884e6 Mon Sep 17 00:00:00 2001 From: kiene Date: Wed, 22 Jan 2025 12:33:27 +0100 Subject: [PATCH 06/39] make script executable --- ci/complexity_measurements/split_by_levels.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 ci/complexity_measurements/split_by_levels.py diff --git a/ci/complexity_measurements/split_by_levels.py b/ci/complexity_measurements/split_by_levels.py old mode 100644 new mode 100755 -- GitLab From 609d381ff658c5a5616234fa4e043440bdcf34ef Mon Sep 17 00:00:00 2001 From: kiene Date: Wed, 22 Jan 2025 13:37:34 +0100 Subject: [PATCH 07/39] fix splitting handling until check_for_changes.py - separate js files are being created now - check for changes still to be adapted --- ci/complexity_measurements/genWebpageData.py | 8 ++++---- ci/complexity_measurements/getWmops.sh | 7 ++++--- ci/complexity_measurements/split_by_levels.py | 11 ++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ci/complexity_measurements/genWebpageData.py b/ci/complexity_measurements/genWebpageData.py index 7708cdf667..1c64aeb0ea 100644 --- a/ci/complexity_measurements/genWebpageData.py +++ b/ci/complexity_measurements/genWebpageData.py @@ -204,7 +204,7 @@ FILE_DATA = { "var_name": "Graphs_WMOPS", "elem_name": "wmops_worstcase", "description": "Worst Case WMOPS", - "filename": "graphs_wmops_flc{}.js", + "filename": "graphs_wmops_flc_{}.js", "references": { "3xEVS": REF_WMOPS_3EVS, "6xEVS": REF_WMOPS_6EVS, @@ -215,7 +215,7 @@ FILE_DATA = { "var_name": "Graphs_ROM", "elem_name": "rom_worstcase", "description": "ROM", - "filename": "graphs_rom_flc{}.js", + "filename": "graphs_rom_flc_{}.js", "references": { "requirementRom": 0, }, @@ -224,7 +224,7 @@ FILE_DATA = { "var_name": "Graphs_RAM", "elem_name": "ram_worstcase", "description": "Worst Case RAM", - "filename": "graphs_ram_flc{}.js", + "filename": "graphs_ram_flc_{}.js", "references": { "requirementRam": 0, }, @@ -233,7 +233,7 @@ FILE_DATA = { "var_name": "Graphs_WMOPS_perOP", "elem_name": "wmops_worstcase_per_op", "description": "Worst Case WMOPS per OP", - "filename": "graphs_wmops_flc_perOP{}.js", + "filename": "graphs_wmops_flc_perOP_{}.js", "references": {}, }, } diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index c560741097..f215cee860 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -96,11 +96,12 @@ fi ./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? -./ci/complexity_measurements/split_by_levels.py "${wmopsFilenameFlc}*.csv" +./ci/complexity_measurements/split_by_levels.py $(ls ${wmopsFilenameFlc}*.csv) -split_suffixes=("rate_sw", "level_1", "level_2", "level_3") +split_suffixes=("rate_sw" "level_1" "level_2" "level_3") -for suffix in $split_suffixes; do +for suffix in "${split_suffixes[@]}"; do + echo "$suffix" wmopsFilenameFlc_split="${wmopsFilenameFlc}_WMOPS_${suffix}.csv" wmopsFilenameFlcLast_split="${wmopsFilenameFlcLast}_WMOPS_${suffix}.csv" diff --git a/ci/complexity_measurements/split_by_levels.py b/ci/complexity_measurements/split_by_levels.py index 5c83ca1d70..3b4320abef 100755 --- a/ci/complexity_measurements/split_by_levels.py +++ b/ci/complexity_measurements/split_by_levels.py @@ -34,9 +34,9 @@ import argparse import pathlib LEVELS_2_MAX_BR = { - "level_1": (0, 80), - "level_2": (96, 192), - "level_3": (256, 512), + "_level_1": (0, 80), + "_level_2": (96, 192), + "_level_3": (256, 512), } @@ -54,6 +54,7 @@ def main(csv_files: list): ) df_cbr = df[np.logical_not(mask_vbr)] + columns = df_cbr.columns df_cbr["bitrate"] = df_cbr["conf"].str.extract(r"@(.*) kbps").astype("float") for lvl_suffix, (min_br, max_br) in LEVELS_2_MAX_BR.items(): @@ -61,8 +62,8 @@ def main(csv_files: list): df_cbr["bitrate"] >= min_br, df_cbr["bitrate"] <= max_br ) df_lvl = df_cbr[mask_lvl] - filename_lvl = str(csv_file.with_suffix("")) + suffix + csv_file.suffix - df_lvl.to_csv( + filename_lvl = str(csv_file.with_suffix("")) + lvl_suffix + csv_file.suffix + df_lvl[columns].to_csv( filename_lvl, index=False, sep=";", -- GitLab From 5afc6bf3c1d319a927fd8c6ba450471fe8be6218 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 22 Jan 2025 14:10:35 +0100 Subject: [PATCH 08/39] add different level graphs for WMOPS rest of page is pretty much destroyed for now --- .../index_complexity.html | 115 +++++++++++------- ci/complexity_measurements/style.css | 12 +- 2 files changed, 79 insertions(+), 48 deletions(-) diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index baa3f531c1..8c0dfd1167 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -44,7 +44,9 @@ - + + + @@ -109,21 +111,32 @@

IVAS FORMAT - Worst Case WMOPS Performance

-
-
-
- -
-
    -
  • Worst case encoder + decoder performance: Encoder and decoder mode might be different.
  • -
  • Worst case codec performance: Encoder and decoder modes are identical.
  • -
  • Worst case encoder performance
  • -
  • Worst case decoder performance
  • -
  • 3xEVS Reference
  • -
  • 6xEVS Reference
  • -
  • 10xEVS Reference
  • -
-
+
+

Level 1 (13.2 - 80 kbps)

+
+
+ +
+

Level 2 (96 - 192 kbps)

+
+
+ +
+

Level 3 (256 - 512 kbps)

+
+
+ +
+
    +
  • Worst case encoder + decoder performance: Encoder and decoder mode might be different.
  • +
  • Worst case codec performance: Encoder and decoder modes are identical.
  • +
  • Worst case encoder performance
  • +
  • Worst case decoder performance
  • +
  • 3xEVS Reference
  • +
  • 6xEVS Reference
  • +
  • 10xEVS Reference
  • +
+

@@ -559,40 +572,48 @@ } $(document).ready(function () { - var max = get_max_y_val_for_plotting(Graphs_WMOPS.wmops_worstcase.displays, 50); - drawGraph($("#wmops-graph"), Graphs_WMOPS.wmops_worstcase, max); + var max = get_max_y_val_for_plotting(Graphs_WMOPS_level_1.wmops_worstcase.displays, 50); + drawGraph($("#wmops-graph-level1"), Graphs_WMOPS_level_1.wmops_worstcase, max); + }); + $(document).ready(function () { + var max = get_max_y_val_for_plotting(Graphs_WMOPS_level_2.wmops_worstcase.displays, 50); + drawGraph($("#wmops-graph-level2"), Graphs_WMOPS_level_2.wmops_worstcase, max); + }); + $(document).ready(function () { + var max = get_max_y_val_for_plotting(Graphs_WMOPS_level_3.wmops_worstcase.displays, 50); + drawGraph($("#wmops-graph-level3"), Graphs_WMOPS_level_3.wmops_worstcase, max); }); - var refData = Graphs_WMOPS.wmops_worstcase.displays[0]; - var testData = Graphs_WMOPS.wmops_worstcase.displays[2]; - var testDataRs = Graphs_WMOPS.wmops_worstcase.displays[6]; - var nEntries = testData.data.length; - - if( testDataRs.data[nEntries-1][1] > testData.data[nEntries-1][1] ) { - testData = testDataRs; - } - - if(testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - document.getElementById("wmops_tl_l").style.color="#FF0000"; - } else if(testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - document.getElementById("wmops_tl_c").style.color="#FFFF00"; - } else { - document.getElementById("wmops_tl_r").style.color="#00FF00"; - } - - if(nEntries > 1) { - if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - document.getElementById("wmops_trend").innerHTML="↑"; - document.getElementById("wmops_trend").style.color="#FF0000"; - } else if(testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - document.getElementById("wmops_trend").innerHTML="↓"; - document.getElementById("wmops_trend").style.color="#00FF00"; - } else { - document.getElementById("wmops_trend").innerHTML="→"; - document.getElementById("wmops_trend").style.color="#FFFFFF"; - } + // var refData = Graphs_WMOPS.wmops_worstcase.displays[0]; + // var testData = Graphs_WMOPS.wmops_worstcase.displays[2]; + // var testDataRs = Graphs_WMOPS.wmops_worstcase.displays[6]; + // var nEntries = testData.data.length; + // + // if( testDataRs.data[nEntries-1][1] > testData.data[nEntries-1][1] ) { + // testData = testDataRs; + // } + // + // if(testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { + // document.getElementById("wmops_tl_l").style.color="#FF0000"; + // } else if(testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { + // document.getElementById("wmops_tl_c").style.color="#FFFF00"; + // } else { + // document.getElementById("wmops_tl_r").style.color="#00FF00"; + // } + // + // if(nEntries > 1) { + // if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { + // document.getElementById("wmops_trend").innerHTML="↑"; + // document.getElementById("wmops_trend").style.color="#FF0000"; + // } else if(testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { + // document.getElementById("wmops_trend").innerHTML="↓"; + // document.getElementById("wmops_trend").style.color="#00FF00"; + // } else { + // document.getElementById("wmops_trend").innerHTML="→"; + // document.getElementById("wmops_trend").style.color="#FFFFFF"; + // } + // } } -} function WMOPS_perOP() { diff --git a/ci/complexity_measurements/style.css b/ci/complexity_measurements/style.css index 5450bf1e86..f81f893f73 100755 --- a/ci/complexity_measurements/style.css +++ b/ci/complexity_measurements/style.css @@ -49,7 +49,17 @@ hr { background-color: #FF8000; border-radius: 20px; } -#wmops-graph { +#wmops-graph-level1 { + height:500px; + width:1600px; + float:left; +} +#wmops-graph-level2 { + height:500px; + width:1600px; + float:left; +} +#wmops-graph-level3 { height:500px; width:1600px; float:left; -- GitLab From 2b35ac13be4a1bb713ada0099c5f3d7f998bb695 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 22 Jan 2025 14:25:23 +0100 Subject: [PATCH 09/39] add rate swithing WMOPS graph + cleanup --- .../index_complexity.html | 47 +++++++++---------- ci/complexity_measurements/style.css | 11 +++-- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index 8c0dfd1167..0eb22b50a3 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -47,6 +47,7 @@ + @@ -113,17 +114,22 @@

Level 1 (13.2 - 80 kbps)

-
+

Level 2 (96 - 192 kbps)

-
+

Level 3 (256 - 512 kbps)

-
+
+
+ +
+

Rate switching (level-independent)

+
@@ -532,37 +538,22 @@ } if( item.series.id == "worst case enc/dec" ){ - text += "Worst case enc: " + graph.runs[x].worstCaseEnc + "
"; - text += "Worst case dec: " + graph.runs[x].worstCaseDec + "
"; + text += "Encoder OP: " + graph.runs[x].worstCaseEnc + "
"; + text += "Decoder OP: " + graph.runs[x].worstCaseDec + "
"; } if( item.series.id == "worst case codec" ){ - text += "Worst case codec: " + graph.runs[x].worstCaseCodec + "
"; + text += "OP: " + graph.runs[x].worstCaseCodec + "
"; } if( item.series.id == "worst case enc" ){ - text += "Worst case enc: " + graph.runs[x].worstCaseEnc + "
"; + text += "OP: " + graph.runs[x].worstCaseEnc + "
"; } if( item.series.id == "worst case dec" ){ - text += "Worst case dec: " + graph.runs[x].worstCaseDec + "
"; - } - if( item.series.id == "worst case enc/dec rs" ){ - text += "Worst case enc rateswitching: " + graph.runs[x].worstCaseEncRs + "
"; - text += "Worst case dec rateswitching: " + graph.runs[x].worstCaseDecRs + "
"; - } - if( item.series.id == "worst case codec rs" ){ - text += "Worst case codec rateswitching: " + graph.runs[x].worstCaseCodecRs + "
"; + text += "OP: " + graph.runs[x].worstCaseDec + "
"; } - if( item.series.id == "worst case enc rs" ){ - text += "Worst case enc rateswitching: " + graph.runs[x].worstCaseEncRs + "
"; - } - if( item.series.id == "worst case dec rs" ){ - text += "Worst case dec rateswitching: " + graph.runs[x].worstCaseDecRs + "
"; - } - text += "
" text += "Revision: " + graph.runs[x].revision + "
"; text += "Date: " + graph.runs[x].fullDate + "
"; - text += "Fixpoint scal. fac. to reach 138 WMOPS: " + graph.runs[x].fixpointScalingFac + "

"; text += "Logfile
"; } @@ -573,15 +564,19 @@ $(document).ready(function () { var max = get_max_y_val_for_plotting(Graphs_WMOPS_level_1.wmops_worstcase.displays, 50); - drawGraph($("#wmops-graph-level1"), Graphs_WMOPS_level_1.wmops_worstcase, max); + drawGraph($("#wmops-graph-level_1"), Graphs_WMOPS_level_1.wmops_worstcase, max); }); $(document).ready(function () { var max = get_max_y_val_for_plotting(Graphs_WMOPS_level_2.wmops_worstcase.displays, 50); - drawGraph($("#wmops-graph-level2"), Graphs_WMOPS_level_2.wmops_worstcase, max); + drawGraph($("#wmops-graph-level_2"), Graphs_WMOPS_level_2.wmops_worstcase, max); }); $(document).ready(function () { var max = get_max_y_val_for_plotting(Graphs_WMOPS_level_3.wmops_worstcase.displays, 50); - drawGraph($("#wmops-graph-level3"), Graphs_WMOPS_level_3.wmops_worstcase, max); + drawGraph($("#wmops-graph-level_3"), Graphs_WMOPS_level_3.wmops_worstcase, max); + }); + $(document).ready(function () { + var max = get_max_y_val_for_plotting(Graphs_WMOPS_rate_sw.wmops_worstcase.displays, 50); + drawGraph($("#wmops-graph-rate_sw"), Graphs_WMOPS_rate_sw.wmops_worstcase, max); }); // var refData = Graphs_WMOPS.wmops_worstcase.displays[0]; diff --git a/ci/complexity_measurements/style.css b/ci/complexity_measurements/style.css index f81f893f73..dcb8fad44d 100755 --- a/ci/complexity_measurements/style.css +++ b/ci/complexity_measurements/style.css @@ -49,17 +49,22 @@ hr { background-color: #FF8000; border-radius: 20px; } -#wmops-graph-level1 { +#wmops-graph-level_1 { height:500px; width:1600px; float:left; } -#wmops-graph-level2 { +#wmops-graph-level_2 { height:500px; width:1600px; float:left; } -#wmops-graph-level3 { +#wmops-graph-level_3 { + height:500px; + width:1600px; + float:left; +} +#wmops-graph-rate_sw { height:500px; width:1600px; float:left; -- GitLab From f6e664a698511f82a26d51e81acab953a89f3c73 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 22 Jan 2025 14:43:04 +0100 Subject: [PATCH 10/39] cleanup + preparation for ram and rom --- .../index_complexity.html | 193 ++++-------------- 1 file changed, 41 insertions(+), 152 deletions(-) diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index 0eb22b50a3..15071dcd8b 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -48,17 +48,23 @@ - + - - - - - + + + + + + + + + + + - -
  • RAM @@ -90,15 +83,6 @@
  • - -
  • ROM @@ -108,6 +92,7 @@
  • FAQ
  • +-->

    IVAS FORMAT - Worst Case WMOPS Performance

    @@ -166,116 +151,39 @@
    +

    IVAS FORMAT - Worst Case RAM Demand

    - - -

    IVAS FORMAT - Worst Case RAM Demand

    - -
    -
    -
    +
    +
    +
    -
    -
      -
    • Max. total RAM Codec: - Encoder + Decoder
    • -
    • Max. total RAM Encoder: - Encoder only
    • -
    • Max. total RAM Decoder: - Decoder only
    • - -
    • Max. HEAP Codec: - Encoder + Decoder
    • -
    • Max. HEAP Encoder - Encoder only
    • -
    • Max. HEAP Decoder - Decoder only
    • - -
    • Max. STACK Codec: - max(Encoder, Decoder)
    • -
    • Max. STACK Encoder: - Encoder only
    • -
    • Max. STACK Decoder: - Decoder only
    • -
    -
    +
    +
      +
    • Max. total RAM Codec: + Encoder + Decoder
    • +
    • Max. total RAM Encoder: + Encoder only
    • +
    • Max. total RAM Decoder: + Decoder only
    • + +
    • Max. HEAP Codec: + Encoder + Decoder
    • +
    • Max. HEAP Encoder + Encoder only
    • +
    • Max. HEAP Decoder + Decoder only
    • + +
    • Max. STACK Codec: + max(Encoder, Decoder)
    • +
    • Max. STACK Encoder: + Encoder only
    • +
    • Max. STACK Decoder: + Decoder only
    • +
    +

    - -

    IVAS FORMAT - Worst Case ROM Demand

    @@ -297,25 +205,6 @@
  • Max. Table ROM Ext Renderer Library: lib_rend only
  • - -

    FAQ

    -- GitLab From 8ee867e7c0377dbf39d729a646ed1fc5f2754707 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 22 Jan 2025 15:28:09 +0100 Subject: [PATCH 11/39] split for wmops and RAM, but not for ROM and wmops_per_op --- ci/complexity_measurements/genWebpageData.py | 30 +++++----- ci/complexity_measurements/getWmops.sh | 60 ++++++++++---------- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/ci/complexity_measurements/genWebpageData.py b/ci/complexity_measurements/genWebpageData.py index 1c64aeb0ea..0ecb31069b 100644 --- a/ci/complexity_measurements/genWebpageData.py +++ b/ci/complexity_measurements/genWebpageData.py @@ -201,10 +201,10 @@ JS_FILE_TEMPLATE = """var {var_name} = {{ FILE_DATA = { "wmops": { - "var_name": "Graphs_WMOPS", + "var_name": "Graphs_WMOPS{}", "elem_name": "wmops_worstcase", "description": "Worst Case WMOPS", - "filename": "graphs_wmops_flc_{}.js", + "filename": "graphs_wmops_flc{}.js", "references": { "3xEVS": REF_WMOPS_3EVS, "6xEVS": REF_WMOPS_6EVS, @@ -212,28 +212,28 @@ FILE_DATA = { }, }, "rom": { - "var_name": "Graphs_ROM", + "var_name": "Graphs_ROM{}", "elem_name": "rom_worstcase", "description": "ROM", - "filename": "graphs_rom_flc_{}.js", + "filename": "graphs_rom_flc{}.js", "references": { "requirementRom": 0, }, }, "ram": { - "var_name": "Graphs_RAM", + "var_name": "Graphs_RAM{}", "elem_name": "ram_worstcase", "description": "Worst Case RAM", - "filename": "graphs_ram_flc_{}.js", + "filename": "graphs_ram_flc{}.js", "references": { "requirementRam": 0, }, }, "wmops_per_op": { - "var_name": "Graphs_WMOPS_perOP", + "var_name": "Graphs_WMOPS_perOP{}", "elem_name": "wmops_worstcase_per_op", "description": "Worst Case WMOPS per OP", - "filename": "graphs_wmops_flc_perOP_{}.js", + "filename": "graphs_wmops_flc_perOP{}.js", "references": {}, }, } @@ -253,6 +253,10 @@ def main( FILE_DATA["ram"]["log_file"] = ram_log for x, data in FILE_DATA.items(): + if data["log_file"] is None: + print(f"Skipping '{x}' because no logfile given") + continue + with open(data["log_file"]) as f: log_lines = f.readlines() @@ -284,7 +288,7 @@ def main( ticks = ",\n".join(ticks) js_string = JS_FILE_TEMPLATE.format( - var_name=data["var_name"], + var_name=data["var_name"].format(suffix), elem_name=data["elem_name"], description=data["description"], runs=runs, @@ -449,10 +453,10 @@ if __name__ == "__main__": parser = argparse.ArgumentParser( description="Generate Javascript code for the complexity webpage" ) - parser.add_argument("wmops_log") - parser.add_argument("wmops_per_op_log") - parser.add_argument("rom_log") - parser.add_argument("ram_log") + parser.add_argument("--wmops_log", default=None) + parser.add_argument("--wmops_per_op_log", default=None) + parser.add_argument("--rom_log", default=None) + parser.add_argument("--ram_log", default=None) parser.add_argument("--wmops_per_op_log_for_comparison", default=None) parser.add_argument("--suffix", default="") diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index f215cee860..b947f6c495 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -96,29 +96,24 @@ fi ./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? +# TODO: only split wmops and ram files ./ci/complexity_measurements/split_by_levels.py $(ls ${wmopsFilenameFlc}*.csv) -split_suffixes=("rate_sw" "level_1" "level_2" "level_3") - +# for wmops and RAM graphs, split by levels +split_suffixes=("_rate_sw" "_level_1" "_level_2" "_level_3") for suffix in "${split_suffixes[@]}"; do echo "$suffix" - wmopsFilenameFlc_split="${wmopsFilenameFlc}_WMOPS_${suffix}.csv" - wmopsFilenameFlcLast_split="${wmopsFilenameFlcLast}_WMOPS_${suffix}.csv" - log_wmops_all_split="${destDir}/wmops/log_wmops_all_${suffix}.txt" - latest_wmops_split="${wmopsFilenameFlcDir}/latest_WMOPS_${suffix}.csv" - - heapFilenameFlc_split="${wmopsFilenameFlc}_HEAP_${suffix}.csv" - stackFilenameFlc_split="${wmopsFilenameFlc}_STACK_${suffix}.csv" - ramFilenameFlc_split="${wmopsFilenameFlc}_RAM_${suffix}.csv" - ramFilenameFlcLast_split="${wmopsFilenameFlcLast}_RAM_${suffix}.csv" - log_ram_all_split="${destDir}/wmops/log_ram_all_${suffix}.txt" + wmopsFilenameFlc_split="${wmopsFilenameFlc}_WMOPS${suffix}.csv" + wmopsFilenameFlcLast_split="${wmopsFilenameFlcLast}_WMOPS${suffix}.csv" + log_wmops_all_split="${destDir}/wmops/log_wmops_all${suffix}.txt" + latest_wmops_split="${wmopsFilenameFlcDir}/latest_WMOPS${suffix}.csv" - promFilenameFlc_split="${wmopsFilenameFlc}_PROM_${suffix}.csv" - tromFilenameFlc_split="${wmopsFilenameFlc}_TROM_${suffix}.csv" - romFilenameFlc_split="${wmopsFilenameFlc}_ROM_${suffix}.csv" - romFilenameFlcLast_split="${wmopsFilenameFlcLast}_ROM_${suffix}.csv" - log_rom_all_split="${destDir}/wmops/log_rom_all_${suffix}.txt" + heapFilenameFlc_split="${wmopsFilenameFlc}_HEAP${suffix}.csv" + stackFilenameFlc_split="${wmopsFilenameFlc}_STACK${suffix}.csv" + ramFilenameFlc_split="${wmopsFilenameFlc}_RAM${suffix}.csv" + ramFilenameFlcLast_split="${wmopsFilenameFlcLast}_RAM${suffix}.csv" + log_ram_all_split="${destDir}/wmops/log_ram_all${suffix}.txt" # get the info on worst-case operating point: WMOPS number, enc-operating mode, dec-operating mode ### WMOPS @@ -132,20 +127,27 @@ for suffix in "${split_suffixes[@]}"; do ${scriptDir}/mergeNewsletterRam.py ${heapFilenameFlc_split} ${stackFilenameFlc_split} >${ramFilenameFlc_split} ${scriptDir}/parseNewsletterRam.py ${heapFilenameFlc_split} ${stackFilenameFlc_split} ${ramFilenameFlcLast_split} ${commit_sha} ${shortDate} ${fullDate} >>${log_ram_all_split} - ### ROM - ${scriptDir}/mergeNewsletterRom.py ${promFilenameFlc_split} ${tromFilenameFlc_split} >${romFilenameFlc_split} - ${scriptDir}/parseNewsletterRom.py ${promFilenameFlc_split} ${tromFilenameFlc_split} ${romFilenameFlcLast_split} ${commit_sha} ${shortDate} ${fullDate} >>${log_rom_all_split} - - # generate javascript code from log files - # pass the ref log for comparison only if arg is given - if [ "$wmops_ref_logfile" != "" ]; then - python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} --suffix ${suffix} --wmops_per_op_log_for_comparison $wmops_ref_logfile - else - python3 ci/complexity_measurements/genWebpageData.py ${log_wmops_all_split} ${wmopsFilenameFlc_split} ${log_rom_all_split} ${log_ram_all_split} --suffix ${suffix} - fi - + # generate javascript code from split log files + python3 ci/complexity_measurements/genWebpageData.py --wmops_log ${log_wmops_all_split} --ram_log ${log_ram_all_split} --suffix ${suffix} done +# for ROM and wmops_per_op graphs, no split is done +promFilenameFlc="${wmopsFilenameFlc}_PROM.csv" +tromFilenameFlc="${wmopsFilenameFlc}_TROM.csv" +romFilenameFlc="${wmopsFilenameFlc}_ROM.csv" +romFilenameFlcLast="${wmopsFilenameFlcLast}_ROM.csv" +log_rom_all="${destDir}/wmops/log_rom_all.txt" + +### ROM +${scriptDir}/mergeNewsletterRom.py ${promFilenameFlc} ${tromFilenameFlc} >${romFilenameFlc} +${scriptDir}/parseNewsletterRom.py ${promFilenameFlc} ${tromFilenameFlc} ${romFilenameFlcLast} ${commit_sha} ${shortDate} ${fullDate} >>${log_rom_all} + +if [ "$wmops_ref_logfile" != "" ]; then + python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc_split} --rom_log ${log_rom_all_split} --wmops_per_op_log_for_comparison $wmops_ref_logfile +else + python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc_split} --rom_log ${log_rom_all_split} +fi + 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 -- GitLab From 0e70ac531494c6c62e42377685478109570ca74c Mon Sep 17 00:00:00 2001 From: kiene Date: Wed, 22 Jan 2025 15:59:19 +0100 Subject: [PATCH 12/39] correct filenames --- ci/complexity_measurements/getWmops.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index b947f6c495..99c48dda8e 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -143,9 +143,9 @@ ${scriptDir}/mergeNewsletterRom.py ${promFilenameFlc} ${tromFilenameFlc} >${romF ${scriptDir}/parseNewsletterRom.py ${promFilenameFlc} ${tromFilenameFlc} ${romFilenameFlcLast} ${commit_sha} ${shortDate} ${fullDate} >>${log_rom_all} if [ "$wmops_ref_logfile" != "" ]; then - python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc_split} --rom_log ${log_rom_all_split} --wmops_per_op_log_for_comparison $wmops_ref_logfile + python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} --wmops_per_op_log_for_comparison $wmops_ref_logfile else - python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc_split} --rom_log ${log_rom_all_split} + python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} fi python3 ${scriptDir}/check_for_changes.py ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt -- GitLab From ea2c971eeaa49309114a076cba2e25a53b8c3348 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 09:52:22 +0100 Subject: [PATCH 13/39] add split RAM graphs + cleanup --- .../index_complexity.html | 352 +++++------------- ci/complexity_measurements/style.css | 17 +- 2 files changed, 110 insertions(+), 259 deletions(-) diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index 15071dcd8b..124e656eff 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -56,44 +56,11 @@ - - - - + - -

    IVAS FORMAT - Worst Case WMOPS Performance

    @@ -131,92 +98,104 @@
    -

    IVAS FORMAT - Worst Case WMOPS Performance per Operating Point

    +

    IVAS FORMAT - Worst Case WMOPS Performance per Operating Point

    Encoder

    -
    -
    -
    +
    +
    +

    Decoder

    -
    -
    -
    +
    +
    +
    -
    -
    -
    +
    +
    +
    -
    +

    IVAS FORMAT - Worst Case RAM Demand

    -
    +

    Level 1 (13.2 - 80 kbps)

    +
    +
    + +
    +

    Level 2 (96 - 192 kbps)

    +
    +
    + +
    +

    Level 3 (256 - 512 kbps)

    +
    +
    + +
    +

    Rate switching (level-independent)

    +
    +
    -
      -
    • Max. total RAM Codec: - Encoder + Decoder
    • -
    • Max. total RAM Encoder: - Encoder only
    • -
    • Max. total RAM Decoder: - Decoder only
    • - -
    • Max. HEAP Codec: - Encoder + Decoder
    • -
    • Max. HEAP Encoder - Encoder only
    • -
    • Max. HEAP Decoder - Decoder only
    • - -
    • Max. STACK Codec: - max(Encoder, Decoder)
    • -
    • Max. STACK Encoder: - Encoder only
    • -
    • Max. STACK Decoder: - Decoder only
    • -
    -
    +
      +
    • Max. total RAM Codec: + Encoder + Decoder
    • +
    • Max. total RAM Encoder: + Encoder only
    • +
    • Max. total RAM Decoder: + Decoder only
    • + +
    • Max. HEAP Codec: + Encoder + Decoder
    • +
    • Max. HEAP Encoder + Encoder only
    • +
    • Max. HEAP Decoder + Decoder only
    • + +
    • Max. STACK Codec: + max(Encoder, Decoder)
    • +
    • Max. STACK Encoder: + Encoder only
    • +
    • Max. STACK Decoder: + Decoder only
    • +
    +
    -
    +
    -

    IVAS FORMAT - Worst Case ROM Demand

    - -
    -
    -
    - -
    -
      -
    • Max. total ROM Codec: Encoder + Decoder
    • - -
    • Max. Program ROM Encoder Library: lib_enc only
    • -
    • Max. Program ROM Decoder Library: lib_dec only
    • -
    • Max. Program ROM Common Library: lib_com only
    • -
    • Max. Program ROM Ext Renderer Library: lib_rend only
    • - -
    • Max. Table ROM Encoder Library: lib_enc only
    • -
    • Max. Table ROM Decoder Library: lib_dec only
    • -
    • Max. Table ROM Common Library: lib_com only
    • -
    • Max. Table ROM Ext Renderer Library: lib_rend only
    • -
    -
    +

    IVAS FORMAT - Worst Case ROM Demand

    + +
    +
    +
    + +
    +
      +
    • Max. total ROM Codec: Encoder + Decoder
    • + +
    • Max. Program ROM Encoder Library: lib_enc only
    • +
    • Max. Program ROM Decoder Library: lib_dec only
    • +
    • Max. Program ROM Common Library: lib_com only
    • +
    • Max. Program ROM Ext Renderer Library: lib_rend only
    • + +
    • Max. Table ROM Encoder Library: lib_enc only
    • +
    • Max. Table ROM Decoder Library: lib_dec only
    • +
    • Max. Table ROM Common Library: lib_com only
    • +
    • Max. Table ROM Ext Renderer Library: lib_rend only
    • +
    +
    + +

    FAQ

    Q:
    Which input files are used for audio-input? What error pattern is used?
    A:
    The input files can be found here. The error pattern is here
    . -
    Q:
    The legend lists some References, but I can't see them in the plot?
    -
    A:
    The plot Axes are scaled to fit the measured numbers. The reference values might be too high to fit into the plot. Put differently: if you can't see the references, you are probably below them (all is well).
    . -
    Q:
    What is the meaning of these funny symbols in the navigation box, in the left upper corner of this page?
    -
    A:
    - 1) Traffic light , or : !!!CURRENTLY NOT WORKING CORRECTLY AS NO REQUIREMENTS DEFINED YET!!! The traffic light symbols show, whether the last datapoint matches the requirement (green) or not (red). A yellow traffic light means that the requirement is matched, but the score is very close (within a 3% margin) to the requirement.
    - 2) Arrow , , : The arrow indicates the trend of the last datapoint, compared to the last but one. An upwards arrow means that the score got higher (i.e. worse), downwards arrow arrow means that the score got lower (i.e. better), and a rightwards arrow means that the score was kept constant (within a 1% margin). -
    @@ -467,36 +446,6 @@ var max = get_max_y_val_for_plotting(Graphs_WMOPS_rate_sw.wmops_worstcase.displays, 50); drawGraph($("#wmops-graph-rate_sw"), Graphs_WMOPS_rate_sw.wmops_worstcase, max); }); - - // var refData = Graphs_WMOPS.wmops_worstcase.displays[0]; - // var testData = Graphs_WMOPS.wmops_worstcase.displays[2]; - // var testDataRs = Graphs_WMOPS.wmops_worstcase.displays[6]; - // var nEntries = testData.data.length; - // - // if( testDataRs.data[nEntries-1][1] > testData.data[nEntries-1][1] ) { - // testData = testDataRs; - // } - // - // if(testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - // document.getElementById("wmops_tl_l").style.color="#FF0000"; - // } else if(testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - // document.getElementById("wmops_tl_c").style.color="#FFFF00"; - // } else { - // document.getElementById("wmops_tl_r").style.color="#00FF00"; - // } - // - // if(nEntries > 1) { - // if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - // document.getElementById("wmops_trend").innerHTML="↑"; - // document.getElementById("wmops_trend").style.color="#FF0000"; - // } else if(testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - // document.getElementById("wmops_trend").innerHTML="↓"; - // document.getElementById("wmops_trend").style.color="#00FF00"; - // } else { - // document.getElementById("wmops_trend").innerHTML="→"; - // document.getElementById("wmops_trend").style.color="#FFFFFF"; - // } - // } } @@ -615,11 +564,11 @@ function WMOPS_perOP() { drawGraph($("#wmops_per_op-graph-dec"), graph_dec, max_dec); }); - var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; + var nEntriesWmopsGraph = Graphs_WMOPS_level_1.wmops_worstcase.runs.length - 1; var legend = "

    Numbers derived from revision " + - Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].revision + + Graphs_WMOPS_level_1.wmops_worstcase.runs[nEntriesWmopsGraph].revision + ", " + - Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].fullDate + + Graphs_WMOPS_level_1.wmops_worstcase.runs[nEntriesWmopsGraph].fullDate + "

    "; document.getElementById("wmops_per_op-legend-enc").innerHTML = legend; @@ -757,34 +706,21 @@ function RAM() { } $(document).ready(function () { - var max = get_max_y_val_for_plotting(Graphs_RAM.ram_worstcase.displays, 50000); - drawGraph($("#ram-graph"), Graphs_RAM.ram_worstcase, max); + var max = get_max_y_val_for_plotting(Graphs_RAM_level_1.ram_worstcase.displays, 50000); + drawGraph($("#ram-graph-level_1"), Graphs_RAM_level_1.ram_worstcase, max); + }); + $(document).ready(function () { + var max = get_max_y_val_for_plotting(Graphs_RAM_level_2.ram_worstcase.displays, 50000); + drawGraph($("#ram-graph-level_2"), Graphs_RAM_level_2.ram_worstcase, max); + }); + $(document).ready(function () { + var max = get_max_y_val_for_plotting(Graphs_RAM_level_3.ram_worstcase.displays, 50000); + drawGraph($("#ram-graph-level_3"), Graphs_RAM_level_3.ram_worstcase, max); + }); + $(document).ready(function () { + var max = get_max_y_val_for_plotting(Graphs_RAM_rate_sw.ram_worstcase.displays, 50000); + drawGraph($("#ram-graph-rate_sw"), Graphs_RAM_rate_sw.ram_worstcase, max); }); - - var testData = Graphs_RAM.ram_worstcase.displays[1]; - var refData = Graphs_RAM.ram_worstcase.displays[0]; - var nEntries = testData.data.length; - - if( testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - document.getElementById("ram_tl_l").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - document.getElementById("ram_tl_c").style.color="#FFFF00"; - } else { - document.getElementById("ram_tl_r").style.color="#00FF00"; - } - - if(nEntries > 1) { - if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - document.getElementById("ram_trend").innerHTML="↑"; - document.getElementById("ram_trend").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - document.getElementById("ram_trend").innerHTML="↓"; - document.getElementById("ram_trend").style.color="#00FF00"; - } else { - document.getElementById("ram_trend").innerHTML="→"; - document.getElementById("ram_trend").style.color="#FFFFFF"; - } - } } @@ -873,56 +809,11 @@ function ROM() { } } -/* - if( item.series.id == "TotalRomCodecScore" ){ - text += "Worst case enc: " + graph.runs[x].TotalRomEnc + "
    "; - text += "Worst case dec: " + graph.runs[x].TotalRomDec + "
    "; - } - if( item.series.id == "TotalRomEncScore" ){ - text += "Worst case enc: " + graph.runs[x].TotalRomEnc + "
    "; - } - if( item.series.id == "TotalRomDecScore" ){ - text += "Worst case dec: " + graph.runs[x].TotalRomDec + "
    "; - } - if( item.series.id == "PROMCodecScore" ){ - text += "Worst case enc: " + graph.runs[x].PromEnc + "
    "; - text += "Worst case dec: " + graph.runs[x].PromDec + "
    "; - } - if( item.series.id == "PROMEncScore" ){ - text += "Worst case enc: " + graph.runs[x].PromEnc + "
    "; - } - if( item.series.id == "PROMDecScore" ){ - text += "Worst case dec: " + graph.runs[x].PromDec + "
    "; - } - if( item.series.id == "TROMCodecScore" ){ - text += "Worst case enc: " + graph.runs[x].TromEnc + "
    "; - text += "Worst case dec: " + graph.runs[x].TromDec + "
    "; - } - if( item.series.id == "TROMEncScore" ){ - text += "Worst case enc: " + graph.runs[x].TromEnc + "
    "; - } - if( item.series.id == "TROMDecScore" ){ - text += "Worst case dec: " + graph.runs[x].TromDec + "
    "; - } -*/ - text += "
    " text += "Revision: " + graph.runs[x].revision + "
    "; text += "Date: " + graph.runs[x].fullDate + "

    "; text += "Logfile
    "; - /* - if( item.series.id == "maxRomFlc" ){ - text += "Logfile
    "; - } - */ - - /* - if( item.series.id == "maxRomBasop" ){ - text += "Logfile
    "; - } - */ - } else { text = "ROM requirement: 800000 bytes"; } @@ -937,61 +828,6 @@ function ROM() { drawGraph($("#rom-graph"), Graphs_ROM.rom_worstcase, max); }); - - /* FLC */ - var testData = Graphs_ROM.rom_worstcase.displays[1]; - var refData = Graphs_ROM.rom_worstcase.displays[0]; - var nEntries = testData.data.length; - - if( testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - document.getElementById("rom_tl_l").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - document.getElementById("rom_tl_c").style.color="#FFFF00"; - } else { - document.getElementById("rom_tl_r").style.color="#00FF00"; - } - - if(nEntries > 1) { - if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - document.getElementById("rom_trend").innerHTML="↑"; - document.getElementById("rom_trend").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - document.getElementById("rom_trend").innerHTML="↓"; - document.getElementById("rom_trend").style.color="#00FF00"; - } else { - document.getElementById("rom_trend").innerHTML="→"; - document.getElementById("rom_trend").style.color="#FFFFFF"; - } - } - - - /* BASOP */ - /* - var testData = Graphs_ROM_BASOP.rom_worstcase.displays[2]; - var refData = Graphs_ROM.rom_worstcase.displays[0]; - var nEntries = testData.data.length; - - if( testData.data[nEntries-1][1] > refData.data[nEntries-1][1] ) { - document.getElementById("rom_basop_tl_l").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] > 0.97 * refData.data[nEntries-1][1] ) { - document.getElementById("rom_basop_tl_c").style.color="#FFFF00"; - } else { - document.getElementById("rom_basop_tl_r").style.color="#00FF00"; - } - - if(nEntries > 1) { - if( testData.data[nEntries-1][1] > 1.01 * testData.data[nEntries-2][1] ) { - document.getElementById("rom_basop_trend").innerHTML="↑"; - document.getElementById("rom_basop_trend").style.color="#FF0000"; - } else if( testData.data[nEntries-1][1] < 0.99 * testData.data[nEntries-2][1] ) { - document.getElementById("rom_basop_trend").innerHTML="↓"; - document.getElementById("rom_basop_trend").style.color="#00FF00"; - } else { - document.getElementById("rom_basop_trend").innerHTML="→"; - document.getElementById("rom_basop_trend").style.color="#FFFFFF"; - } - } - */ } WMOPS(); diff --git a/ci/complexity_measurements/style.css b/ci/complexity_measurements/style.css index dcb8fad44d..4e4d0fa9da 100755 --- a/ci/complexity_measurements/style.css +++ b/ci/complexity_measurements/style.css @@ -104,7 +104,22 @@ hr { width:1600px; float:left; } -#ram-graph { +#ram-graph-level_1 { + height:500px; + width:1600px; + float:left; +} +#ram-graph-level_2 { + height:500px; + width:1600px; + float:left; +} +#ram-graph-level_3 { + height:500px; + width:1600px; + float:left; +} +#ram-graph-rate_sw { height:500px; width:1600px; float:left; -- GitLab From f37ee0c55cb985d80f5c52e3f0dcd10151743fd2 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 09:59:10 +0100 Subject: [PATCH 14/39] remove references --- ci/complexity_measurements/genWebpageData.py | 26 +++++++++++-------- .../index_complexity.html | 6 ++--- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ci/complexity_measurements/genWebpageData.py b/ci/complexity_measurements/genWebpageData.py index 0ecb31069b..2ba61ce059 100644 --- a/ci/complexity_measurements/genWebpageData.py +++ b/ci/complexity_measurements/genWebpageData.py @@ -199,35 +199,39 @@ JS_FILE_TEMPLATE = """var {var_name} = {{ }}; """ +# static references commented out for now FILE_DATA = { "wmops": { "var_name": "Graphs_WMOPS{}", "elem_name": "wmops_worstcase", "description": "Worst Case WMOPS", "filename": "graphs_wmops_flc{}.js", - "references": { - "3xEVS": REF_WMOPS_3EVS, - "6xEVS": REF_WMOPS_6EVS, - "10xEVS": REF_WMOPS_10EVS, - }, + # "references": { + # "3xEVS": REF_WMOPS_3EVS, + # "6xEVS": REF_WMOPS_6EVS, + # "10xEVS": REF_WMOPS_10EVS, + # }, + "references": {}, }, "rom": { "var_name": "Graphs_ROM{}", "elem_name": "rom_worstcase", "description": "ROM", "filename": "graphs_rom_flc{}.js", - "references": { - "requirementRom": 0, - }, + # "references": { + # "requirementRom": 0, + # }, + "references": {}, }, "ram": { "var_name": "Graphs_RAM{}", "elem_name": "ram_worstcase", "description": "Worst Case RAM", "filename": "graphs_ram_flc{}.js", - "references": { - "requirementRam": 0, - }, + # "references": { + # "requirementRam": 0, + # }, + "references": {}, }, "wmops_per_op": { "var_name": "Graphs_WMOPS_perOP{}", diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index 124e656eff..39e882ea51 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -90,9 +90,9 @@
  • Worst case codec performance: Encoder and decoder modes are identical.
  • Worst case encoder performance
  • Worst case decoder performance
  • -
  • 3xEVS Reference
  • -
  • 6xEVS Reference
  • -
  • 10xEVS Reference
  • + + +
    -- GitLab From ef4d88507b1e8e9ad9759d1f1c7732b96d91533c Mon Sep 17 00:00:00 2001 From: kiene Date: Thu, 23 Jan 2025 10:18:15 +0100 Subject: [PATCH 15/39] remove references from genWebpageData.py --- ci/complexity_measurements/genWebpageData.py | 29 +++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/ci/complexity_measurements/genWebpageData.py b/ci/complexity_measurements/genWebpageData.py index 2ba61ce059..bd50f09faf 100644 --- a/ci/complexity_measurements/genWebpageData.py +++ b/ci/complexity_measurements/genWebpageData.py @@ -90,16 +90,16 @@ RUNS_LINE_IDX = { DISPLAY_IDS = { "wmops": [ - "3xEVS", - "6xEVS", - "10xEVS", + #"3xEVS", + #"6xEVS", + #"10xEVS", "worst case codec", "worst case enc/dec", "worst case enc", "worst case dec", ], "rom": [ - "requirementRom", + #"requirementRom", "TotalRomCodecScore", "maxPROMEncScore", "maxPROMDecScore", @@ -111,7 +111,7 @@ DISPLAY_IDS = { "maxTROMRendScore", ], "ram": [ - "requirementRam", + #"requirementRam", "maxTotalRamCodecScore", "maxTotalRamEncScore", "maxTotalRamDecScore", @@ -129,9 +129,12 @@ DISPLAY_IDS = { } # the -1's are for reference lines DISPLAY_LINE_IDX = { - "wmops": [-1, -1, -1, 9, 3, 5, 7], - "rom": [-1, 3, 5, 7, 9, 11, 13, 15, 17, 19], - "ram": [-1, 3, 5, 7, 8, 10, 12, 13, 15, 17], + #"wmops": [-1, -1, -1, 9, 3, 5, 7], + #"rom": [-1, 3, 5, 7, 9, 11, 13, 15, 17, 19], + #"ram": [-1, 3, 5, 7, 8, 10, 12, 13, 15, 17], + "wmops": [9, 3, 5, 7], + "rom": [3, 5, 7, 9, 11, 13, 15, 17, 19], + "ram": [3, 5, 7, 8, 10, 12, 13, 15, 17], "wmops_per_op": [1, 2], } DISPLAY_LABELS = { @@ -144,16 +147,16 @@ REF_COLOR_FOR_COMP_BARS = dict( ) LINE_COLORS = { "wmops": [ - REF_COLORS[0], - REF_COLORS[1], - REF_COLORS[2], + #REF_COLORS[0], + #REF_COLORS[1], + #REF_COLORS[2], "#0080FF", "#FF8000", "#CF4B4B", "#008040", ], "rom": [ - REF_COLORS[0], + #REF_COLORS[0], "#FF0000", "#FF8000", "#FFFF00", @@ -165,7 +168,7 @@ LINE_COLORS = { "#00FF00", ], "ram": [ - REF_COLORS[0], + #REF_COLORS[0], "#FF0000", "#FF8000", "#FFFF00", -- GitLab From 741785da73b9ff6946ff991706cee247437c7208 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 10:22:56 +0100 Subject: [PATCH 16/39] pass all split files to check_for_changes.py --- ci/complexity_measurements/check_for_changes.py | 11 ++++------- ci/complexity_measurements/getWmops.sh | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ci/complexity_measurements/check_for_changes.py b/ci/complexity_measurements/check_for_changes.py index 2048feb044..2c1d899fed 100644 --- a/ci/complexity_measurements/check_for_changes.py +++ b/ci/complexity_measurements/check_for_changes.py @@ -11,10 +11,9 @@ COLS = [ ] -def main(args): - linewise_logfiles = [args.wmops_logfile, args.ram_logfile, args.rom_logfile] +def main(logfiles): changes_found_linewise = any( - [check_linewise_logfile(f, c) for f, c in zip(linewise_logfiles, COLS)] + [check_linewise_logfile(f, c) for f, c in zip(logfiles, COLS)] ) if changes_found_linewise: @@ -59,9 +58,7 @@ def check_linewise_logfile(filepath, cols): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("wmops_logfile") - parser.add_argument("ram_logfile") - parser.add_argument("rom_logfile") + parser.add_argument("logfiles", nargs="+") args = parser.parse_args() - sys.exit(main(args)) + sys.exit(main(args.logfiles)) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 99c48dda8e..344e9aca11 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -148,7 +148,7 @@ else python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} fi -python3 ${scriptDir}/check_for_changes.py ${destDir}/wmops/log_wmops_all.txt ${destDir}/wmops/log_ram_all.txt ${destDir}/wmops/log_rom_all.txt +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 -- GitLab From ec6d8eae02859dd0a2b8a063b33b21c008b12cf3 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 10:25:30 +0100 Subject: [PATCH 17/39] fix file globbing --- ci/complexity_measurements/getWmops.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 344e9aca11..b83b82b26f 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -148,7 +148,7 @@ else python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} fi -python3 ${scriptDir}/check_for_changes.py "${destDir}/wmops/log_wmops_all*.txt" "${destDir}/wmops/log_ram_all*.txt" ${destDir}/wmops/log_rom_all.txt +python3 ${scriptDir}/check_for_changes.py $(ls ${destDir}/wmops/log_wmops_all*.txt) $(ls ${destDir}/wmops/log_ram_all*.txt) ${destDir}/wmops/log_rom_all.txt if [ "$?" != "0" ]; then ret_val=1 fi -- GitLab From f1a719ff304e3e2bd28a0b7bc3312a7967e4c20a Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 10:34:35 +0100 Subject: [PATCH 18/39] reintroduce explicit args --- .../check_for_changes.py | 24 ++++++++++++------- ci/complexity_measurements/getWmops.sh | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ci/complexity_measurements/check_for_changes.py b/ci/complexity_measurements/check_for_changes.py index 2c1d899fed..a3d3948a03 100644 --- a/ci/complexity_measurements/check_for_changes.py +++ b/ci/complexity_measurements/check_for_changes.py @@ -4,16 +4,20 @@ import sys 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 -] +COLS_WMOPS = [3, 5, 7, 9] +COLS_RAM = [3, 5, 7, 8, 10, 12, 13, 15, 17] +COLS_ROM = [3, 5, 7, 9, 11, 13, 15, 17, 19] -def main(logfiles): +def main(args): + linewise_logfiles = [*args.wmops_logfiles, *args.ram_logfiles, args.rom_logfile] + cols = ( + len(args.wmops_logfiles) * [COLS_WMOPS] + + len(args.ram_logfiles) * [COLS_RAM] + + [COLS_ROM] + ) changes_found_linewise = any( - [check_linewise_logfile(f, c) for f, c in zip(logfiles, COLS)] + [check_linewise_logfile(f, c) for f, c in zip(linewise_logfiles, cols)] ) if changes_found_linewise: @@ -58,7 +62,9 @@ def check_linewise_logfile(filepath, cols): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("logfiles", nargs="+") + parser.add_argument("--wmops_logfiles", nargs="+") + parser.add_argument("--ram_logfiles", nargs="+") + parser.add_argument("rom_logfile") args = parser.parse_args() - sys.exit(main(args.logfiles)) + sys.exit(main(args)) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index b83b82b26f..989d4d2291 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -148,7 +148,7 @@ else python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} fi -python3 ${scriptDir}/check_for_changes.py $(ls ${destDir}/wmops/log_wmops_all*.txt) $(ls ${destDir}/wmops/log_ram_all*.txt) ${destDir}/wmops/log_rom_all.txt +python3 ${scriptDir}/check_for_changes.py --wmops_logfiles $(ls ${destDir}/wmops/log_wmops_all*.txt) --ram_logfiles $(ls ${destDir}/wmops/log_ram_all*.txt) ${destDir}/wmops/log_rom_all.txt if [ "$?" != "0" ]; then ret_val=1 fi -- GitLab From 88c850dbafedcd796e5f6735e51129213edca167 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 10:39:21 +0100 Subject: [PATCH 19/39] add arg for rom logfiles --- ci/complexity_measurements/check_for_changes.py | 2 +- ci/complexity_measurements/getWmops.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/complexity_measurements/check_for_changes.py b/ci/complexity_measurements/check_for_changes.py index a3d3948a03..bddb5ffba9 100644 --- a/ci/complexity_measurements/check_for_changes.py +++ b/ci/complexity_measurements/check_for_changes.py @@ -64,7 +64,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--wmops_logfiles", nargs="+") parser.add_argument("--ram_logfiles", nargs="+") - parser.add_argument("rom_logfile") + parser.add_argument("--rom_logfile", nargs=1) args = parser.parse_args() sys.exit(main(args)) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 989d4d2291..8f195f7a57 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -148,7 +148,7 @@ else python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} fi -python3 ${scriptDir}/check_for_changes.py --wmops_logfiles $(ls ${destDir}/wmops/log_wmops_all*.txt) --ram_logfiles $(ls ${destDir}/wmops/log_ram_all*.txt) ${destDir}/wmops/log_rom_all.txt +python3 ${scriptDir}/check_for_changes.py --wmops_logfiles $(ls ${destDir}/wmops/log_wmops_all*.txt) --ram_logfiles $(ls ${destDir}/wmops/log_ram_all*.txt) --rom_logfiles ${destDir}/wmops/log_rom_all.txt if [ "$?" != "0" ]; then ret_val=1 fi -- GitLab From a27f81db71c1985389f0e9e6412171e1d9ad15fb Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 10:40:27 +0100 Subject: [PATCH 20/39] fix typo in arg name --- ci/complexity_measurements/getWmops.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 8f195f7a57..3f49630530 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -148,7 +148,7 @@ else python3 ci/complexity_measurements/genWebpageData.py --wmops_per_op_log ${wmopsFilenameFlc}_WMOPS.csv --rom_log ${log_rom_all} fi -python3 ${scriptDir}/check_for_changes.py --wmops_logfiles $(ls ${destDir}/wmops/log_wmops_all*.txt) --ram_logfiles $(ls ${destDir}/wmops/log_ram_all*.txt) --rom_logfiles ${destDir}/wmops/log_rom_all.txt +python3 ${scriptDir}/check_for_changes.py --wmops_logfiles $(ls ${destDir}/wmops/log_wmops_all*.txt) --ram_logfiles $(ls ${destDir}/wmops/log_ram_all*.txt) --rom_logfile ${destDir}/wmops/log_rom_all.txt if [ "$?" != "0" ]; then ret_val=1 fi -- GitLab From 9b513cf2870643b77837d9b9d596621eef1e92ae Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 10:44:19 +0100 Subject: [PATCH 21/39] fix data type of argument --- ci/complexity_measurements/check_for_changes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/check_for_changes.py b/ci/complexity_measurements/check_for_changes.py index bddb5ffba9..498d0d1a4d 100644 --- a/ci/complexity_measurements/check_for_changes.py +++ b/ci/complexity_measurements/check_for_changes.py @@ -64,7 +64,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--wmops_logfiles", nargs="+") parser.add_argument("--ram_logfiles", nargs="+") - parser.add_argument("--rom_logfile", nargs=1) + parser.add_argument("--rom_logfile") args = parser.parse_args() sys.exit(main(args)) -- GitLab From bb634c286b1f5427baccf6a7d1abf1e913d14d07 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 11:40:18 +0100 Subject: [PATCH 22/39] use specific runner for testing --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d3a624b20..680d7ba1df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2436,7 +2436,7 @@ coverage-test-on-main-scheduled: # still needed as long as no long MASA testvectors are there - .test-job-linux-needs-testv-dir tags: - - ivas-linux-fast + - test-fhg-linux-runner3 timeout: 3 hours 30 minutes stage: test before_script: -- GitLab From b9f5fc558c2b767231b64d657eec70c1035520c7 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 23 Jan 2025 15:10:52 +0100 Subject: [PATCH 23/39] change glob to work for new split files, too --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 680d7ba1df..7e67b03428 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2415,7 +2415,7 @@ coverage-test-on-main-scheduled: &complexity-measurements-prepare-artifacts # prepare artifacts -> move to public directory - public_dir="$CI_JOB_NAME-public" - mkdir $public_dir - - mv -f wmops/log_*_all.txt ./*.js ${public_dir}/ + - mv -f wmops/log_*_all*.txt ./*.js ${public_dir}/ # move logfiles for links - mkdir $public_dir/logs # first move logs -- GitLab From 12383203e1a6a36b8e7ec67123f00d07f501a314 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 4 Feb 2025 13:33:48 +0100 Subject: [PATCH 24/39] issue 1264: Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA; under NONBE_FIX_GSC_BSTR --- lib_com/bits_alloc.c | 53 +++++++++++++++++++++++------- lib_com/gs_inact_switching.c | 21 ++++++++---- lib_com/options.h | 1 + lib_com/prot.h | 42 +++++++++++++---------- lib_dec/FEC.c | 8 +++++ lib_dec/acelp_core_dec.c | 17 +++++++++- lib_dec/acelp_core_switch_dec.c | 4 +++ lib_dec/dec_gen_voic.c | 5 ++- lib_dec/gs_dec.c | 4 +++ lib_dec/ivas_decision_matrix_dec.c | 1 + lib_enc/acelp_core_enc.c | 12 +++++++ lib_enc/acelp_core_switch_enc.c | 4 +++ lib_enc/enc_gen_voic.c | 4 +++ lib_enc/ivas_core_pre_proc.c | 4 +++ lib_enc/transition_enc.c | 8 +++++ 15 files changed, 152 insertions(+), 36 deletions(-) diff --git a/lib_com/bits_alloc.c b/lib_com/bits_alloc.c index 11fd91e587..6ed9365473 100644 --- a/lib_com/bits_alloc.c +++ b/lib_com/bits_alloc.c @@ -531,17 +531,20 @@ static ivas_error acelp_FCB_allocator( *--------------------------------------------------------------------*/ ivas_error config_acelp1( - const int16_t enc_dec, /* i : encoder/decoder flag */ - const int32_t total_brate, /* i : total bitrate */ - const int32_t core_brate_inp, /* i : core bitrate */ - const int16_t core, /* i : core */ - const int16_t extl, /* i : extension layer */ - const int32_t extl_brate, /* i : extension layer bitrate */ - const int16_t L_frame, /* i : frame length at internal Fs */ - const int16_t GSC_noisy_speech, /* i : GSC on SWB noisy speech flag */ - ACELP_config *acelp_cfg, /* i : ACELP bit-allocation */ - const int16_t signaling_bits, /* i : number of signaling bits */ - const int16_t coder_type, /* i : coder type */ + const int16_t enc_dec, /* i : encoder/decoder flag */ + const int32_t total_brate, /* i : total bitrate */ + const int32_t core_brate_inp, /* i : core bitrate */ + const int16_t core, /* i : core */ + const int16_t extl, /* i : extension layer */ + const int32_t extl_brate, /* i : extension layer bitrate */ + const int16_t L_frame, /* i : frame length at internal Fs */ + const int16_t GSC_noisy_speech, /* i : GSC on SWB noisy speech flag */ + ACELP_config *acelp_cfg, /* i : ACELP bit-allocation */ + const int16_t signaling_bits, /* i : number of signaling bits */ + const int16_t coder_type, /* i : coder type */ +#ifdef NONBE_FIX_GSC_BSTR + const int16_t inactive_coder_type_flag, /* i : AVQ (0) or GSC (1) IC flag */ +#endif const int16_t tc_subfr, /* i : TC subfr ID */ const int16_t tc_call, /* i : TC call number (0,1,2,3,5(DEC)) */ int16_t *nBits_es_Pred, /* o : number of bits for Es_pred Q */ @@ -775,7 +778,11 @@ ivas_error config_acelp1( } /* gain Q bit-budget - part 1 */ +#ifdef NONBE_FIX_GSC_BSTR + if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && !inactive_coder_type_flag ) ) +#else 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 ) ) +#endif { *nBits_es_Pred = Es_pred_bits_tbl[BIT_ALLOC_IDX( core_brate, coder_type, -1, -1 )]; bits -= *nBits_es_Pred; @@ -868,7 +875,11 @@ ivas_error config_acelp1( } else if ( core_brate >= ACELP_11k60 && ( coder_type != AUDIO && !( coder_type == INACTIVE && L_frame == L_FRAME ) ) ) { +#ifdef NONBE_FIX_GSC_BSTR + if ( coder_type == INACTIVE && L_frame == L_FRAME16k && inactive_coder_type_flag ) /* GSC Inactive @16kHz */ +#else if ( coder_type == INACTIVE && L_frame == L_FRAME16k && total_brate <= MAX_GSC_INACTIVE_BRATE ) /* GSC Inactive @16kHz */ +#endif { acelp_cfg->ltf_mode = FULL_BAND; } @@ -1052,7 +1063,11 @@ ivas_error config_acelp1( acelp_cfg->fixed_cdk_index[2] = -1; acelp_cfg->fixed_cdk_index[3] = -1; } +#ifdef NONBE_FIX_GSC_BSTR + else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) || core == HQ_CORE ) +#else else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( total_brate > MAX_GSC_INACTIVE_BRATE || coder_type != INACTIVE ) ) || core == HQ_CORE ) +#endif { /* pitch Q & gain Q bit-budget - part 2*/ for ( i = 0; i < nb_subfr; i++ ) @@ -1100,7 +1115,11 @@ ivas_error config_acelp1( } /* algebraic codebook bit-budget */ +#ifdef NONBE_FIX_GSC_BSTR + if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) +#else if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) +#endif { for ( i = 0; i < nb_subfr; i++ ) { @@ -1187,7 +1206,11 @@ ivas_error config_acelp1( } /* AVQ codebook */ +#ifdef NONBE_FIX_GSC_BSTR + if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) +#else if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) +#endif { for ( i = 0; i < nb_subfr; i++ ) { @@ -1222,7 +1245,11 @@ ivas_error config_acelp1( } } } +#ifdef NONBE_FIX_GSC_BSTR + else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && inactive_coder_type_flag ) ) +#else else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) ) +#endif { int32_t Local_BR, Pitch_BR; int16_t Pitch_CT; @@ -1315,7 +1342,11 @@ ivas_error config_acelp1( /* sanity check */ if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || nb_subfr == NB_SUBFR16k ) { +#ifdef NONBE_FIX_GSC_BSTR + if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ +#else if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ +#endif { acelp_cfg->ubits = 0; } diff --git a/lib_com/gs_inact_switching.c b/lib_com/gs_inact_switching.c index fd50f1ec80..b449d24e97 100644 --- a/lib_com/gs_inact_switching.c +++ b/lib_com/gs_inact_switching.c @@ -59,12 +59,17 @@ *-------------------------------------------------------------------*/ void inact_switch_ematch( - float exc2[], /* i/o: CELP/GSC excitation buffer */ - float dct_exc_tmp[], /* i : GSC excitation in DCT domain */ - float lt_ener_per_band[], /* i/o: Long term energy per band */ - const int16_t coder_type, /* i : Coder type */ - const int16_t L_frame, /* i : Frame length */ - const int32_t total_brate, /* i : Total bitrate */ + float exc2[], /* i/o: CELP/GSC excitation buffer */ + float dct_exc_tmp[], /* i : GSC excitation in DCT domain */ + float lt_ener_per_band[], /* i/o: Long term energy per band */ + const int16_t coder_type, /* i : Coder type */ +#ifdef NONBE_FIX_GSC_BSTR + const int16_t inactive_coder_type_flag, /* i : AVQ (0) or GSC (1) IC flag */ +#endif + const int16_t L_frame, /* i : Frame length */ +#ifndef NONBE_FIX_GSC_BSTR + const int32_t total_brate, /* i : Total bitrate */ +#endif const int16_t bfi, /* i : frame lost indicator */ const int16_t last_core, /* i : Last core used */ const int16_t last_codec_mode, /* i : Last codec mode */ @@ -105,7 +110,11 @@ void inact_switch_ematch( lt_ener_per_band[i] = Ener_per_bd[i]; } } +#ifdef NONBE_FIX_GSC_BSTR + else if ( coder_type == INACTIVE && inactive_coder_type_flag ) +#else else if ( coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) +#endif { /* Find spectrum and energy per band for inactive frames */ edct( exc2, dct_exc_tmp, L_frame, element_mode ); diff --git a/lib_com/options.h b/lib_com/options.h index 959eecf6ab..3530e417af 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,6 +172,7 @@ #define NONBE_1217_OBJ_EDIT_FOA /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */ #define NONBE_FIX_1255_OBJ_EDIT_JBM /* VA: issue 1255: restore object editing in JBM */ #define NONBE_FIX_1262_OSBA_STEREO /* FhG: issue 1262: Fix missing scaling factor for OSBA stereo output */ +#define NONBE_FIX_GSC_BSTR /* VA: issue 1264: Fix bitstream synchronization between encoder and decoder in ACELP GSC in OMASA */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_com/prot.h b/lib_com/prot.h index 04afc8cc4e..82d9b90d9c 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -3564,12 +3564,17 @@ void highband_exc_dct_in( ); void inact_switch_ematch( - float exc2[], /* i/o: CELP/GSC excitation buffer */ - float dct_exc_tmp[], /* i : GSC excitation in DCT domain */ - float lt_ener_per_band[], /* i/o: long-term energy per band */ - const int16_t coder_type, /* i : coder type */ - const int16_t L_frame, /* i : frame length */ - const int32_t total_brate, /* i : Total bitrate */ + float exc2[], /* i/o: CELP/GSC excitation buffer */ + float dct_exc_tmp[], /* i : GSC excitation in DCT domain */ + float lt_ener_per_band[], /* i/o: long-term energy per band */ + const int16_t coder_type, /* i : coder type */ +#ifdef NONBE_FIX_GSC_BSTR + const int16_t inactive_coder_type_flag, /* i : AVQ (0) or GSC (1) IC flag */ +#endif + const int16_t L_frame, /* i : frame length */ +#ifndef NONBE_FIX_GSC_BSTR + const int32_t total_brate, /* i : Total bitrate */ +#endif const int16_t bfi, /* i : frame lost indicator */ const int16_t last_core, /* i : Last core used */ const int16_t last_codec_mode, /* i : Last codec mode */ @@ -9093,17 +9098,20 @@ int16_t BITS_ALLOC_config_acelp( ); ivas_error config_acelp1( - const int16_t enc_dec, /* i : encoder/decoder flag */ - const int32_t total_brate, /* i : total bitrate */ - const int32_t core_brate_inp, /* i : core bitrate */ - const int16_t core, /* i : core */ - const int16_t extl, /* i : extension layer */ - const int32_t extl_brate, /* i : extension layer bitrate */ - const int16_t L_frame, /* i : frame length at internal Fs */ - const int16_t GSC_noisy_speech, /* i : GSC on SWB noisy speech flag */ - ACELP_config *acelp_cfg, /* i : ACELP bit-allocation */ - const int16_t signaling_bits, /* i : number of signaling bits */ - const int16_t coder_type, /* i : coder type */ + const int16_t enc_dec, /* i : encoder/decoder flag */ + const int32_t total_brate, /* i : total bitrate */ + const int32_t core_brate_inp, /* i : core bitrate */ + const int16_t core, /* i : core */ + const int16_t extl, /* i : extension layer */ + const int32_t extl_brate, /* i : extension layer bitrate */ + const int16_t L_frame, /* i : frame length at internal Fs */ + const int16_t GSC_noisy_speech, /* i : GSC on SWB noisy speech flag */ + ACELP_config *acelp_cfg, /* i : ACELP bit-allocation */ + const int16_t signaling_bits, /* i : number of signaling bits */ + const int16_t coder_type, /* i : coder type */ +#ifdef NONBE_FIX_GSC_BSTR + const int16_t inactive_coder_type_flag, /* i : AVQ (0) or GSC (1) IC flag */ +#endif const int16_t tc_subfr, /* i : TC subfr ID */ const int16_t tc_call, /* i : TC call number (0,1,2) */ int16_t *nBits_es_Pred, /* o : number of bits for Es_pred Q */ diff --git a/lib_dec/FEC.c b/lib_dec/FEC.c index 3d43af895d..e3856f290f 100644 --- a/lib_dec/FEC.c +++ b/lib_dec/FEC.c @@ -332,7 +332,11 @@ void FEC_exc_estim( * Replicate the last spectrum in case the last good frame was coded by GSC *-----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->inactive_coder_type_flag && !st->Opt_AMR_WB ) +#else if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->total_brate <= MAX_GSC_INACTIVE_BRATE && !st->Opt_AMR_WB ) +#endif { /* Replication of the last spectrum, with a slight downscaling of its dynamic */ st->GSC_noisy_speech = st->Last_GSC_noisy_speech_flag; @@ -405,7 +409,11 @@ void FEC_exc_estim( * Total excitation *-----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->inactive_coder_type_flag && !st->Opt_AMR_WB ) +#else if ( ( st->last_coder_type == AUDIO || st->last_good == INACTIVE_CLAS ) && st->total_brate <= MAX_GSC_INACTIVE_BRATE && !st->Opt_AMR_WB ) +#endif { /* For GSC - the excitation is already computed */ mvr2r( exc, exc2, st->L_frame ); diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index b83c105064..b208654d5d 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -613,11 +613,19 @@ ivas_error acelp_core_dec( nb_bits = -1; } +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, st->inactive_coder_type_flag, tc_subfr_tmp, 1, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#else config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, tc_subfr_tmp, 1, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#endif if ( st->coder_type == TRANSITION && tc_subfr < L_SUBFR && st->L_frame == L_FRAME ) { +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 2, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#else config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, tc_subfr, 2, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#endif } } @@ -839,7 +847,11 @@ ivas_error acelp_core_dec( * Apply energy matching when switching to inactive frames *-----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + inact_switch_ematch( exc2, dct_exc_tmp, st->hGSCDec->lt_ener_per_band, st->coder_type, st->inactive_coder_type_flag, st->L_frame, st->bfi, st->last_core, st->last_codec_mode, tdm_low_rate_mode, st->element_mode ); +#else inact_switch_ematch( exc2, dct_exc_tmp, st->hGSCDec->lt_ener_per_band, st->coder_type, st->L_frame, st->total_brate, st->bfi, st->last_core, st->last_codec_mode, tdm_low_rate_mode, st->element_mode ); +#endif /*------------------------------------------------------------* * Decode information and modify the excitation signal of stationary unvoiced frames @@ -975,8 +987,11 @@ ivas_error acelp_core_dec( } /* Apply energy matching when switching to inactive frames */ +#ifdef NONBE_FIX_GSC_BSTR + inact_switch_ematch( exc2, dct_exc_tmp, st->hGSCDec->lt_ener_per_band, st->coder_type, st->inactive_coder_type_flag, st->L_frame, st->bfi, st->last_core, st->last_codec_mode, tdm_low_rate_mode, st->element_mode ); +#else inact_switch_ematch( exc2, dct_exc_tmp, st->hGSCDec->lt_ener_per_band, st->coder_type, st->L_frame, st->total_brate, st->bfi, st->last_core, st->last_codec_mode, tdm_low_rate_mode, st->element_mode ); - +#endif /* update past excitation signals for LD music post-filter */ if ( st->hMusicPF != NULL ) { diff --git a/lib_dec/acelp_core_switch_dec.c b/lib_dec/acelp_core_switch_dec.c index 881cd0f6aa..b0848f32fd 100644 --- a/lib_dec/acelp_core_switch_dec.c +++ b/lib_dec/acelp_core_switch_dec.c @@ -158,7 +158,11 @@ ivas_error acelp_core_switch_dec( * Excitation decoding *----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( DEC, st->total_brate, cbrate, st->core, -1, -1, st->last_L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, GENERIC, st->inactive_coder_type_flag, -1, -1, &decode_bwe /* dummy */, &i, st->element_mode, &i /*dummy*/, 0, 0, st->idchan, st->active_cnt, 0, 0, 0 /*st->GSC_IVAS_mode*/ ); +#else config_acelp1( DEC, st->total_brate, cbrate, st->core, -1, -1, st->last_L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, GENERIC, -1, -1, &decode_bwe /* dummy */, &i, st->element_mode, &i /*dummy*/, 0, 0, st->idchan, st->active_cnt, 0, 0, 0 /*st->GSC_IVAS_mode*/ ); +#endif decod_gen_voic_core_switch( st, L_frame_for_cs, 0, Aq, exc, cbrate ); diff --git a/lib_dec/dec_gen_voic.c b/lib_dec/dec_gen_voic.c index 8ee1ae425a..a3a9fd4961 100644 --- a/lib_dec/dec_gen_voic.c +++ b/lib_dec/dec_gen_voic.c @@ -174,7 +174,11 @@ ivas_error decod_gen_voic( * Transform-domain contribution decoding (inactive frames) *-----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + if ( !st->inactive_coder_type_flag && st->coder_type == INACTIVE ) +#else if ( st->total_brate >= MAX_GSC_INACTIVE_BRATE && st->coder_type == INACTIVE ) +#endif { transf_cdbk_dec( st, 0, i_subfr, Es_pred, gain_code, &gain_preQ, &norm_gain_preQ, code_preQ, unbits ); } @@ -196,7 +200,6 @@ ivas_error decod_gen_voic( * Add the ACELP pre-quantizer contribution *-----------------------------------------------------------------*/ - /* if( (coder_type == GENERIC && st->core_brate >= MIN_BRATE_AVQ_EXC) || (coder_type == INACTIVE && st->total_brate > MAX_GSC_INACTIVE_BRATE) ) */ if ( gain_preQ != 0 ) { for ( i = 0; i < L_SUBFR; i++ ) diff --git a/lib_dec/gs_dec.c b/lib_dec/gs_dec.c index 5debe3c562..73a1cca369 100644 --- a/lib_dec/gs_dec.c +++ b/lib_dec/gs_dec.c @@ -111,7 +111,11 @@ void decod_audio( } /* set bit-allocation */ +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, st->inactive_coder_type_flag, -1, 1, &nb_bits, NULL, st->element_mode, &nbits /*dummy*/, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#else config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, -1, 1, &nb_bits, NULL, st->element_mode, &nbits /*dummy*/, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#endif /*---------------------------------------------------------------* * Decode energy dynamics diff --git a/lib_dec/ivas_decision_matrix_dec.c b/lib_dec/ivas_decision_matrix_dec.c index 4a27a07e2e..e9bc1c96de 100644 --- a/lib_dec/ivas_decision_matrix_dec.c +++ b/lib_dec/ivas_decision_matrix_dec.c @@ -438,6 +438,7 @@ void ivas_decision_matrix_dec( *-----------------------------------------------------------------*/ st->inactive_coder_type_flag = 0; /* AVQ by default */ + if ( st->total_brate <= MAX_GSC_INACTIVE_BRATE ) { st->inactive_coder_type_flag = 1; /* GSC */ diff --git a/lib_enc/acelp_core_enc.c b/lib_enc/acelp_core_enc.c index e305e0ce80..b12783d1c8 100644 --- a/lib_enc/acelp_core_enc.c +++ b/lib_enc/acelp_core_enc.c @@ -372,7 +372,11 @@ ivas_error acelp_core_enc( if ( !nelp_mode && !ppp_mode ) { +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 0, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#else config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, tc_subfr, 0, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#endif } /*-----------------------------------------------------------------* @@ -492,7 +496,11 @@ ivas_error acelp_core_enc( { tc_classif_enc( st->L_frame, &tc_subfr, &position, attack_flag, st->pitch[0], res ); +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 1, NULL, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#else config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, tc_subfr, 1, NULL, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#endif } /*---------------------------------------------------------------* @@ -550,7 +558,11 @@ ivas_error acelp_core_enc( lsf_syn_mem_restore( st, tilt_code_bck, gc_threshold_bck, clip_var_bck, next_force_sf_bck, lsp_new, lsp_mid, clip_var, mem_AR, mem_MA, lsp_new_bck, lsp_mid_bck, Bin_E, Bin_E_old, mem_syn_bck, mem_w0_bck, streaklimit, pstreaklen ); /* Configure ACELP bit allocation */ +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 0, &nb_bits, unbits, 0, &uc_two_stage_flag, 0, 0, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#else config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, tc_subfr, 0, &nb_bits, unbits, 0, &uc_two_stage_flag, 0, 0, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); +#endif /* redo LSF quantization */ lsf_enc( st, lsf_new, lsp_new, lsp_mid, Aq, tdm_low_rate_mode, 0, NULL ); diff --git a/lib_enc/acelp_core_switch_enc.c b/lib_enc/acelp_core_switch_enc.c index 0af33003c1..4bccaa8076 100644 --- a/lib_enc/acelp_core_switch_enc.c +++ b/lib_enc/acelp_core_switch_enc.c @@ -153,7 +153,11 @@ void acelp_core_switch_enc( * Excitation encoding *----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( ENC, st->total_brate, cbrate, st->core, -1, -1, st->last_L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, GENERIC, st->inactive_coder_type_flag, -1, -1, &j, &i, st->element_mode, &i /*dummy*/, 0 /*tdm_lp_reuse_flag*/, 0 /*tdm_low_rate_mode*/, st->idchan, st->active_cnt, 0 /*tdm_Pitch_reuse_flag*/, 0, 0 /*GSC_IVAS_mode*/ ); +#else config_acelp1( ENC, st->total_brate, cbrate, st->core, -1, -1, st->last_L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, GENERIC, -1, -1, &j, &i, st->element_mode, &i /*dummy*/, 0 /*tdm_lp_reuse_flag*/, 0 /*tdm_low_rate_mode*/, st->idchan, st->active_cnt, 0 /*tdm_Pitch_reuse_flag*/, 0, 0 /*GSC_IVAS_mode*/ ); +#endif encod_gen_voic_core_switch( st, st->last_L_frame, inp, Aq, A, T_op, st->voicing, exc, cbrate ); diff --git a/lib_enc/enc_gen_voic.c b/lib_enc/enc_gen_voic.c index 2416b26afe..f4a6e7dea6 100644 --- a/lib_enc/enc_gen_voic.c +++ b/lib_enc/enc_gen_voic.c @@ -255,7 +255,11 @@ void encod_gen_voic( * Transform-domain contribution (inactive frames) *-----------------------------------------------------------------*/ +#ifdef NONBE_FIX_GSC_BSTR + if ( !st->inactive_coder_type_flag && st->coder_type == INACTIVE ) +#else if ( st->total_brate >= MAX_GSC_INACTIVE_BRATE && st->coder_type == INACTIVE ) +#endif { transf_cdbk_enc( st, 0, i_subfr, cn, exc, p_Aq, p_Aw, h1, xn, xn2, y1, y2, Es_pred, &gain_pit, gain_code, g_corr, clip_gain, &gain_preQ, code_preQ, unbits ); } diff --git a/lib_enc/ivas_core_pre_proc.c b/lib_enc/ivas_core_pre_proc.c index f199579d13..f60b0850ae 100644 --- a/lib_enc/ivas_core_pre_proc.c +++ b/lib_enc/ivas_core_pre_proc.c @@ -209,7 +209,11 @@ ivas_error pre_proc_ivas( } else if ( st->total_brate > MAX_GSC_INACTIVE_BRATE && ( ( st->vad_flag == 0 && st->bwidth >= SWB && st->max_bwidth >= SWB ) || ( st->localVAD == 0 && ( st->bwidth <= WB || st->max_bwidth <= WB ) ) ) ) { +#ifdef NONBE_FIX_GSC_BSTR + /* inactive frames will be coded by AVQ technology (exceptionally it can be later rewritten to GSC technology in ivas_combined_format_brate_sanity()) */ +#else /* inactive frames will be coded by AVQ technology */ +#endif st->coder_type = INACTIVE; } diff --git a/lib_enc/transition_enc.c b/lib_enc/transition_enc.c index 281a5e919e..77b142be30 100644 --- a/lib_enc/transition_enc.c +++ b/lib_enc/transition_enc.c @@ -178,7 +178,11 @@ void transition_enc( if ( *tc_subfr == TC_0_0 ) { /* this is called only to compute unused bits */ +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, L_FRAME, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, TRANSITION, -1, TC_0_0, 3, NULL, unbits_ACELP, st->element_mode, &i /*dummy*/, 0 /*tdm_lp_reuse_flag*/, 0 /*tdm_low_rate_mode*/, st->idchan, st->active_cnt, 0 /*tdm_Pitch_reuse_flag*/, st->tdm_LRTD_flag, 0 /*GSC_IVAS_mode*/ ); +#else config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, L_FRAME, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, TRANSITION, TC_0_0, 3, NULL, unbits_ACELP, st->element_mode, &i /*dummy*/, 0 /*tdm_lp_reuse_flag*/, 0 /*tdm_low_rate_mode*/, st->idchan, st->active_cnt, 0 /*tdm_Pitch_reuse_flag*/, st->tdm_LRTD_flag, 0 /*GSC_IVAS_mode*/ ); +#endif } *clip_gain = gp_clip( st->element_mode, st->core_brate, st->voicing, i_subfr, TRANSITION, xn, gp_cl ); @@ -274,7 +278,11 @@ void transition_enc( if ( i_subfr - *tc_subfr <= L_SUBFR ) { +#ifdef NONBE_FIX_GSC_BSTR + config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, TRANSITION, -1, *tc_subfr, 2, NULL, unbits_ACELP, st->element_mode, &i /*dummy*/, 0 /*tdm_lp_reuse_flag*/, 0 /*tdm_low_rate_mode*/, st->idchan, st->active_cnt, 0 /*tdm_Pitch_reuse_flag*/, st->tdm_LRTD_flag, 0 /*GSC_IVAS_mode*/ ); +#else config_acelp1( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, TRANSITION, *tc_subfr, 2, NULL, unbits_ACELP, st->element_mode, &i /*dummy*/, 0 /*tdm_lp_reuse_flag*/, 0 /*tdm_low_rate_mode*/, st->idchan, st->active_cnt, 0 /*tdm_Pitch_reuse_flag*/, st->tdm_LRTD_flag, 0 /*GSC_IVAS_mode*/ ); +#endif } /*-----------------------------------------------------------------* -- GitLab From 5004a40a2c2559cda9dbad5e44ba7e0b60076f79 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 4 Feb 2025 14:28:28 +0100 Subject: [PATCH 25/39] simplification --- lib_dec/acelp_core_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/acelp_core_dec.c b/lib_dec/acelp_core_dec.c index b208654d5d..66cedb2068 100644 --- a/lib_dec/acelp_core_dec.c +++ b/lib_dec/acelp_core_dec.c @@ -622,7 +622,7 @@ ivas_error acelp_core_dec( if ( st->coder_type == TRANSITION && tc_subfr < L_SUBFR && st->L_frame == L_FRAME ) { #ifdef NONBE_FIX_GSC_BSTR - config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 2, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); + config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, TRANSITION, -1, tc_subfr, 2, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); #else config_acelp1( DEC, st->total_brate, st->core_brate, st->core, st->extl_orig, st->extl_brate_orig, st->L_frame, -1, &( st->acelp_cfg ), st->next_bit_pos, st->coder_type, tc_subfr, 2, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, st->active_cnt, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); #endif -- GitLab From 2dbf8b68209f1827c9919962a8b67d0531c75504 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 5 Feb 2025 21:02:20 +0100 Subject: [PATCH 26/39] [cleanup] accept FIX_1217_OBJECT_EDIT_FILE_INTERFACE --- apps/decoder.c | 61 --------------------------------- lib_com/ivas_error.h | 4 --- lib_com/options.h | 1 - lib_dec/ivas_init_dec.c | 2 -- lib_util/obj_edit_file_reader.c | 2 -- lib_util/obj_edit_file_reader.h | 2 -- 6 files changed, 72 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 9f657b5a8c..48280babde 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -32,9 +32,7 @@ #include "lib_dec.h" #include -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #include -#endif #include "cmdl_tools.h" #include "audio_file_writer.h" #include "bitstream_reader.h" @@ -48,9 +46,7 @@ #include "rotation_file_reader.h" #include "aeid_file_reader.h" #include "split_render_file_read_write.h" -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #include "obj_edit_file_reader.h" -#endif #ifdef VARIABLE_SPEED_DECODING #include "tsm_scale_file_reader.h" #include @@ -157,9 +153,7 @@ typedef struct bool dpidEnabled; uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE char *objEditFileName; -#endif } DecArguments; @@ -188,24 +182,15 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, IVAS_DEC_HANDLE hIvasDec ); -#else -static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); -static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec ); -#endif static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs ); #ifdef DEBUGGING static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); static int16_t app_own_random( int16_t *seed ); static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeChar ); #endif -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); -#else -static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters ); -#endif /*------------------------------------------------------------------------------------------* * main() @@ -236,9 +221,7 @@ int main( int16_t *pcmBuf = NULL; IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader = NULL; -#endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; @@ -442,7 +425,6 @@ int main( } } -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE /*------------------------------------------------------------------------------------------* * Open object editing instruction file *------------------------------------------------------------------------------------------*/ @@ -455,7 +437,6 @@ int main( goto cleanup; } } -#endif /*------------------------------------------------------------------------------------------* * Configure the decoder @@ -775,19 +756,11 @@ int main( if ( arg.voipMode ) { -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec ); -#else - error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec ); -#endif } else { -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, hIvasDec, pcmBuf ); -#else - error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf ); -#endif } if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE ) @@ -851,9 +824,7 @@ cleanup: RotationFileReader_close( &refRotReader ); Vector3PairFileReader_close( &referenceVectorReader ); RenderConfigReader_close( &renderConfigReader ); -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader_close( &objectEditFileReader ); -#endif if ( BS_Reader_Close( &hBsReader ) != IVAS_ERR_OK ) { @@ -1052,9 +1023,7 @@ static bool parseCmdlIVAS_dec( } arg->objEditEnabled = false; -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE arg->objEditFileName = NULL; -#endif /*-----------------------------------------------------------------* * Initialization @@ -1512,7 +1481,6 @@ static bool parseCmdlIVAS_dec( { arg->objEditEnabled = true; i++; -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( argc - i <= 3 || argv[i][0] == '-' ) { fprintf( stderr, "Error: Object editing instruction filename not specified!\n\n" ); @@ -1529,7 +1497,6 @@ static bool parseCmdlIVAS_dec( arg->objEditFileName = argv[i]; /* read edit instructions from this file */ } i++; -#endif } /*-----------------------------------------------------------------* @@ -1732,11 +1699,7 @@ static void usage_dec( void ) fprintf( stdout, "-aeid ID | File : Acoustic environment ID (number > 0)\n" ); fprintf( stdout, " alternatively, it can be a text file where each line contains \"ID duration\"\n" ); fprintf( stdout, " for BINAURAL_ROOM_REVERB output configuration.\n" ); -#ifndef FIX_1217_OBJECT_EDIT_FILE_INTERFACE - fprintf( stdout, "-obj_edit : Enable objects editing\n" ); -#else fprintf( stdout, "-obj_edit File : Object editing instructions file or NULL for built-in example\n" ); -#endif fprintf( stdout, "-level level : Complexity level, level = (1, 2, 3), will be defined after characterisation. \n" ); fprintf( stdout, " Currently, all values default to level 3 (full functionality).\n" ); fprintf( stdout, "-q : Quiet mode, no frame counter\n" ); @@ -2068,9 +2031,7 @@ static ivas_error decodeG192( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader, -#endif ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ) @@ -2468,7 +2429,6 @@ static ivas_error decodeG192( return error; } -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( arg.objEditFileName != NULL ) { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) @@ -2477,14 +2437,9 @@ static ivas_error decodeG192( return error; } } -#endif /* Do object metadata editing here ... */ -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE do_object_editing( &editableParameters, objectEditFileReader ); -#else - do_object_editing( &editableParameters ); -#endif /* set new object parameters */ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) @@ -3007,9 +2962,7 @@ static ivas_error decodeVoIP( RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE ObjectEditFileReader *objectEditFileReader, -#endif IVAS_DEC_HANDLE hIvasDec ) { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ @@ -3289,7 +3242,6 @@ static ivas_error decodeVoIP( } } -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE #ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( arg.objEditEnabled && arg.objEditFileName != NULL && vec_pos_update == 0 ) #else @@ -3302,7 +3254,6 @@ static ivas_error decodeVoIP( return error; } } -#endif /* read all packets with a receive time smaller than the system time */ while ( nextPacketRcvTime_ms <= systemTime_ms ) @@ -3404,11 +3355,7 @@ static ivas_error decodeVoIP( } /* Do object metadata editing here ... */ -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE do_object_editing( &editableParameters, objectEditFileReader ); -#else - do_object_editing( &editableParameters ); -#endif /* set new object parameters */ if ( ( error = IVAS_DEC_SetEditableParameters( hIvasDec, editableParameters ) ) != IVAS_ERR_OK ) @@ -3723,12 +3670,8 @@ cleanup: *---------------------------------------------------------------------*/ static void do_object_editing( -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ) -#else - IVAS_EDITABLE_PARAMETERS *editableParameters ) -#endif { /* put the objects equally spaced at the horizontal plane */ /* and play a little bit with the gains... */ @@ -3744,7 +3687,6 @@ static void do_object_editing( } } -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( objectEditFileReader != NULL ) { ReadObjectEditInfo *readInfo; @@ -3803,7 +3745,6 @@ static void do_object_editing( } else { -#endif if ( num_nondiegetic_objects ) { float start_angle, angle_inc; @@ -3827,9 +3768,7 @@ static void do_object_editing( } editableParameters->gain_bed = 0.5f; -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE } -#endif return; } diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index 6648d0783d..d0930a0733 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -78,9 +78,7 @@ typedef enum IVAS_ERR_DIRECTIVITY_NOT_SUPPORTED, IVAS_ERR_ACOUSTIC_ENVIRONMENT_NOT_SUPPORTED, IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, -#endif IVAS_ERR_INVALID_HRTF, IVAS_ERR_INVALID_HRTF_SAMPLING_RATE, IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA, @@ -261,10 +259,8 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) return "Acoustic environment not supported"; case IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED: return "Objects editing not supported"; -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE case IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED: return "Wrong use of both Object editing and Non-diegetic panning"; -#endif case IVAS_ERR_INVALID_HRTF: return "Unsupported HRTF filter set"; case IVAS_ERR_INVALID_HRTF_SAMPLING_RATE: diff --git a/lib_com/options.h b/lib_com/options.h index 959eecf6ab..992ffcc72f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ -#define FIX_1217_OBJECT_EDIT_FILE_INTERFACE /* Nokia: issue #1217: add decoder functionality to read object edit instructions from a file */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 1e683cac68..03e0667674 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -3227,12 +3227,10 @@ static ivas_error doSanityChecks_IVAS( } } -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on & st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) { return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_AND_PANNING_NOT_SUPPORTED, "Wrong set-up: Only object editing or Non-diegetic panning can be used." ); } -#endif #ifdef DEBUGGING if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || ( output_config != IVAS_AUDIO_CONFIG_BINAURAL && output_config != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) ) { diff --git a/lib_util/obj_edit_file_reader.c b/lib_util/obj_edit_file_reader.c index 945645569f..16634aa48f 100644 --- a/lib_util/obj_edit_file_reader.c +++ b/lib_util/obj_edit_file_reader.c @@ -36,7 +36,6 @@ the United Nations Convention on Contracts on the International Sales of Goods. #include "prot.h" -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE /*-----------------------------------------------------------------------* * ObjectEditFileReader_open() * @@ -275,4 +274,3 @@ void ObjectEditFileReader_close( return; } -#endif diff --git a/lib_util/obj_edit_file_reader.h b/lib_util/obj_edit_file_reader.h index bd4d0011dc..d57ec390a6 100644 --- a/lib_util/obj_edit_file_reader.h +++ b/lib_util/obj_edit_file_reader.h @@ -37,7 +37,6 @@ the United Nations Convention on Contracts on the International Sales of Goods. #include "common_api_types.h" -#ifdef FIX_1217_OBJECT_EDIT_FILE_INTERFACE /*---------------------------------------------------------------------* * Constants ans structures *---------------------------------------------------------------------*/ @@ -108,5 +107,4 @@ void ObjectEditFileReader_close( ObjectEditFileReader **objEditReader /* i/o: pointer to ObjectEditFileReader handle */ ); -#endif #endif /* OBJ_EDIT_FILE_READER_H */ -- GitLab From 87956ac5e287a642faf93ee7d175c1d3ba2382d0 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 5 Feb 2025 21:03:14 +0100 Subject: [PATCH 27/39] [cleanup] accept NONBE_1217_OBJ_EDIT_FOA --- lib_com/options.h | 1 - lib_dec/lib_dec.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 992ffcc72f..f961ba059c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,7 +168,6 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ -#define NONBE_1217_OBJ_EDIT_FOA /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */ #define NONBE_FIX_1255_OBJ_EDIT_JBM /* VA: issue 1255: restore object editing in JBM */ #define NONBE_FIX_1262_OSBA_STEREO /* FhG: issue 1262: Fix missing scaling factor for OSBA stereo output */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 3ac7f16b26..8673b0c606 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1410,10 +1410,8 @@ ivas_error IVAS_DEC_SetEditableParameters( st_ivas->hParamIsmDec->edited_azimuth_values[obj] = hIvasEditableParameters.ism_metadata[obj].azimuth; st_ivas->hParamIsmDec->edited_elevation_values[obj] = hIvasEditableParameters.ism_metadata[obj].elevation; -#ifdef NONBE_1217_OBJ_EDIT_FOA if ( st_ivas->hMasaIsmData != NULL ) { -#endif st_ivas->hMasaIsmData->gain_ism_edited[obj] = hIvasEditableParameters.ism_metadata[obj].gain; /* Detect direction editing in Param-ISM mode */ @@ -1436,20 +1434,14 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hMasaIsmData->ism_gain_is_edited[obj] = 0u; } -#ifdef NONBE_1217_OBJ_EDIT_FOA } -#endif } -#ifdef NONBE_1217_OBJ_EDIT_FOA if ( st_ivas->hMasaIsmData != NULL ) { -#endif /* MASA is not present with the ISM format */ st_ivas->hMasaIsmData->masa_gain_is_edited = 0u; -#ifdef NONBE_1217_OBJ_EDIT_FOA } -#endif } else if ( ism_mode == ISM_MODE_NONE ) { -- GitLab From cd13a1f6ceea34f4dff27ce3a325e0b99988c1de Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 5 Feb 2025 21:04:21 +0100 Subject: [PATCH 28/39] [cleanup] accept NONBE_FIX_1255_OBJ_EDIT_JBM --- apps/decoder.c | 15 --------------- lib_com/options.h | 1 - lib_dec/lib_dec.c | 11 ----------- 3 files changed, 27 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 48280babde..ccc9e77c6b 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -3242,11 +3242,7 @@ static ivas_error decodeVoIP( } } -#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( arg.objEditEnabled && arg.objEditFileName != NULL && vec_pos_update == 0 ) -#else - if ( arg.objEditEnabled && ( arg.objEditFileName != NULL ) ) -#endif { if ( ( error = ObjectEditFileReader_readNextFrame( objectEditFileReader ) ) != IVAS_ERR_OK ) { @@ -3483,22 +3479,12 @@ static ivas_error decodeVoIP( } } -#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; -#else - if ( !arg.quietModeEnabled ) - { - fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); - } - vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; - frame++; -#endif if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } -#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM if ( vec_pos_update == 0 ) { frame++; @@ -3507,7 +3493,6 @@ static ivas_error decodeVoIP( fprintf( stdout, "%-8d\b\b\b\b\b\b\b\b", frame ); } } -#endif #ifdef WMOPS update_mem(); diff --git a/lib_com/options.h b/lib_com/options.h index f961ba059c..634c085f10 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,7 +168,6 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ -#define NONBE_FIX_1255_OBJ_EDIT_JBM /* VA: issue 1255: restore object editing in JBM */ #define NONBE_FIX_1262_OSBA_STEREO /* FhG: issue 1262: Fix missing scaling factor for OSBA stereo output */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 8673b0c606..e45df5f080 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3620,13 +3620,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hIvasDec->nSamplesAvailableNext = hIvasDec->nSamplesFrame; hIvasDec->nSamplesRendered = 0; } -#ifndef NONBE_FIX_1255_OBJ_EDIT_JBM - if ( hIvasDec->hasBeenFedFirstGoodFrame ) - { - *parametersAvailableForEditing = true; - return IVAS_ERR_OK; - } -#endif } /* decode */ @@ -3662,12 +3655,8 @@ ivas_error IVAS_DEC_VoIP_GetSamples( hIvasDec->nSamplesFlushed = nSamplesFlushed_ref; *bitstreamReadDone = false; -#ifdef NONBE_FIX_1255_OBJ_EDIT_JBM *parametersAvailableForEditing = true; return IVAS_ERR_OK; -#else - -#endif } } -- GitLab From 9f54a401c9279e5472857325ff8f92b3adfb278a Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 5 Feb 2025 21:05:21 +0100 Subject: [PATCH 29/39] [cleanup] accept NONBE_FIX_1262_OSBA_STEREO --- lib_com/ivas_prot.h | 3 --- lib_com/options.h | 1 - lib_dec/ivas_jbm_dec.c | 4 ---- lib_dec/ivas_osba_dec.c | 19 ------------------- 4 files changed, 27 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 987455ea7c..08dba288ec 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5592,9 +5592,6 @@ void ivas_osba_stereo_add_channels( const float gain, /* i : gain bed value */ const int16_t nchan_out, /* i : number of output channels */ const int16_t nchan_ism, /* i : number of ISM channels */ -#ifndef NONBE_FIX_1262_OSBA_STEREO - const int16_t ism_mode, /* i : ISM mode */ -#endif const int16_t n_samples_to_render /* i : output frame length per channel */ ); diff --git a/lib_com/options.h b/lib_com/options.h index 634c085f10..efaddf4e6a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -168,7 +168,6 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ -#define NONBE_FIX_1262_OSBA_STEREO /* FhG: issue 1262: Fix missing scaling factor for OSBA stereo output */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index f986791d97..165d2917d2 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1096,11 +1096,7 @@ ivas_error ivas_jbm_dec_render( ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); /* add already rendered SBA part */ -#ifdef NONBE_FIX_1262_OSBA_STEREO ivas_osba_stereo_add_channels( p_tc, p_output, st_ivas->hSbaIsmData->gain_bed, nchan_out, st_ivas->nchan_ism, *nSamplesRendered ); -#else - ivas_osba_stereo_add_channels( p_tc, p_output, st_ivas->hSbaIsmData->gain_bed, nchan_out, st_ivas->nchan_ism, st_ivas->ism_mode, *nSamplesRendered ); -#endif } else if ( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) { diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 473d82dee2..06a19d3586 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -314,18 +314,11 @@ void ivas_osba_stereo_add_channels( const float gain, /* i : gain bed value */ const int16_t nchan_out, /* i : number of output channels */ const int16_t nchan_ism, /* i : number of ISM channels */ -#ifndef NONBE_FIX_1262_OSBA_STEREO - const int16_t ism_mode, /* i : ISM mode */ -#endif const int16_t n_samples_to_render /* i : output frame length per channel */ ) { int16_t n; -#ifndef NONBE_FIX_1262_OSBA_STEREO - if ( ism_mode == ISM_SBA_MODE_DISC ) - { -#endif if ( gain != 1.0f && gain >= 0.0f ) { int16_t i; @@ -344,23 +337,11 @@ void ivas_osba_stereo_add_channels( v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); } } -#ifndef NONBE_FIX_1262_OSBA_STEREO - } - else - { - for ( n = 0; n < nchan_out; n++ ) - { - v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); - } - } -#endif -#ifdef NONBE_FIX_1262_OSBA_STEREO for ( n = 0; n < nchan_out; n++ ) { v_multc( output_f[n], 0.5f, output_f[n], n_samples_to_render ); } -#endif return; } -- GitLab From c5f118bfe479e90b6118a5f1ec8bed1375bf98a7 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 5 Feb 2025 21:08:19 +0100 Subject: [PATCH 30/39] formatting --- lib_dec/ivas_osba_dec.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 06a19d3586..369064214b 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -309,34 +309,34 @@ ivas_error ivas_osba_render_sf( *-------------------------------------------------------------------------*/ void ivas_osba_stereo_add_channels( - float *tc_f[], /* i : transport channels */ - float *output_f[], /* i/o: output channels */ - const float gain, /* i : gain bed value */ - const int16_t nchan_out, /* i : number of output channels */ - const int16_t nchan_ism, /* i : number of ISM channels */ + float *tc_f[], /* i : transport channels */ + float *output_f[], /* i/o: output channels */ + const float gain, /* i : gain bed value */ + const int16_t nchan_out, /* i : number of output channels */ + const int16_t nchan_ism, /* i : number of ISM channels */ const int16_t n_samples_to_render /* i : output frame length per channel */ ) { int16_t n; - if ( gain != 1.0f && gain >= 0.0f ) + if ( gain != 1.0f && gain >= 0.0f ) + { + int16_t i; + for ( n = 0; n < nchan_out; n++ ) { - int16_t i; - for ( n = 0; n < nchan_out; n++ ) + for ( i = 0; i < n_samples_to_render; i++ ) { - for ( i = 0; i < n_samples_to_render; i++ ) - { - output_f[n][i] += tc_f[n + nchan_ism][i] * gain; - } + output_f[n][i] += tc_f[n + nchan_ism][i] * gain; } } - else + } + else + { + for ( n = 0; n < nchan_out; n++ ) { - for ( n = 0; n < nchan_out; n++ ) - { - v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); - } + v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render ); } + } for ( n = 0; n < nchan_out; n++ ) { -- GitLab From 56e16f1c10c187ae5061ec5de244cf9beaf88b3f Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 6 Feb 2025 12:16:15 +0100 Subject: [PATCH 31/39] cleanup + change in tick formatting --- ci/complexity_measurements/genWebpageData.py | 27 +++--- .../index_complexity.html | 83 ++++++++----------- 2 files changed, 46 insertions(+), 64 deletions(-) diff --git a/ci/complexity_measurements/genWebpageData.py b/ci/complexity_measurements/genWebpageData.py index bd50f09faf..c3edad36d9 100644 --- a/ci/complexity_measurements/genWebpageData.py +++ b/ci/complexity_measurements/genWebpageData.py @@ -90,16 +90,16 @@ RUNS_LINE_IDX = { DISPLAY_IDS = { "wmops": [ - #"3xEVS", - #"6xEVS", - #"10xEVS", + # "3xEVS", + # "6xEVS", + # "10xEVS", "worst case codec", "worst case enc/dec", "worst case enc", "worst case dec", ], "rom": [ - #"requirementRom", + # "requirementRom", "TotalRomCodecScore", "maxPROMEncScore", "maxPROMDecScore", @@ -111,7 +111,7 @@ DISPLAY_IDS = { "maxTROMRendScore", ], "ram": [ - #"requirementRam", + # "requirementRam", "maxTotalRamCodecScore", "maxTotalRamEncScore", "maxTotalRamDecScore", @@ -129,9 +129,9 @@ DISPLAY_IDS = { } # the -1's are for reference lines DISPLAY_LINE_IDX = { - #"wmops": [-1, -1, -1, 9, 3, 5, 7], - #"rom": [-1, 3, 5, 7, 9, 11, 13, 15, 17, 19], - #"ram": [-1, 3, 5, 7, 8, 10, 12, 13, 15, 17], + # "wmops": [-1, -1, -1, 9, 3, 5, 7], + # "rom": [-1, 3, 5, 7, 9, 11, 13, 15, 17, 19], + # "ram": [-1, 3, 5, 7, 8, 10, 12, 13, 15, 17], "wmops": [9, 3, 5, 7], "rom": [3, 5, 7, 9, 11, 13, 15, 17, 19], "ram": [3, 5, 7, 8, 10, 12, 13, 15, 17], @@ -147,16 +147,16 @@ REF_COLOR_FOR_COMP_BARS = dict( ) LINE_COLORS = { "wmops": [ - #REF_COLORS[0], - #REF_COLORS[1], - #REF_COLORS[2], + # REF_COLORS[0], + # REF_COLORS[1], + # REF_COLORS[2], "#0080FF", "#FF8000", "#CF4B4B", "#008040", ], "rom": [ - #REF_COLORS[0], + # REF_COLORS[0], "#FF0000", "#FF8000", "#FFFF00", @@ -168,7 +168,7 @@ LINE_COLORS = { "#00FF00", ], "ram": [ - #REF_COLORS[0], + # REF_COLORS[0], "#FF0000", "#FF8000", "#FFFF00", @@ -188,7 +188,6 @@ LINE_COLORS = { JS_FILE_TEMPLATE = """var {var_name} = {{ {elem_name}: {{ description: "{description}", - direction: -1, ticks: [ {ticks} ], diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index 39e882ea51..7f52cf9f66 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -320,8 +320,11 @@ return max; } + function wmopsFormatter(v, axis) { + return v + " WMOPS"; + } + function WMOPS() { - var previousPoint = null; function drawGraph(elt, graph, max_val) { @@ -329,12 +332,7 @@ yaxis: { min: 0, max: max_val, - tickFormatter: function (v, axis) { - if (graph.direction == -1) - return v + " WMOPS"; - return v; - }, - invert: graph.direction == 1 + tickFormatter: wmopsFormatter, }, xaxis: { tickFormatter: function (v, axis) { @@ -375,11 +373,7 @@ var y = item.datapoint[1]; var text = "" + item.series.id + "
    " - text += 'Score: ' + y; - - if (graph.direction == -1) - text += " WMOPS"; - text += "
    "; + text += 'Score: ' + y + " WMOPS" + "
    "; // add more info only if not a reference line if ( !item.series.id.includes("EVS") ) @@ -390,8 +384,7 @@ var diff = Math.round((thisValue - prevValue) * 100) / 100; var pdiff = calcPercentDiff(thisValue, prevValue); var better; - if ((pdiff < 0 && graph.direction == -1) || - (pdiff > 0 && graph.direction == 1)) { + if (pdiff < 0) { better = "worse"; } else { better = "better"; @@ -399,8 +392,7 @@ pdiff = Math.abs(pdiff); if (diff === diff) { text += String.fromCharCode(916) + ": " + diff; - if (graph.direction == -1) - text += " WMOPS"; + text += " WMOPS"; text += " (" + pdiff + "% " + better + ")
    "; } } @@ -450,7 +442,6 @@ function WMOPS_perOP() { - var previousPoint = null; function drawGraph(elt, graph, max_val) { @@ -458,12 +449,7 @@ function WMOPS_perOP() { yaxis: { min: 0, max: max_val, - tickFormatter: function (v, axis) { - if (graph.direction == -1) - return v + " WMOPS"; - return v; - }, - invert: graph.direction == 1 + tickFormatter: wmopsFormatter, }, xaxis: { ticks: graph.ticks @@ -575,9 +561,24 @@ function WMOPS_perOP() { } + function memTickFormatter(v, axis) { + var decimals = axis.tickDecimals; + var str_val = ""; + if (v > 1000000) { + str_val = (v / 1000000).toFixed(decimals) + " MB"; + } + else if (v > 1000) { + str_val = (v / 1000).toFixed(decimals) + " kB"; + } + else { + str_val = v.toFixed(decimals) + " B"; + } + return str_val; + } + function RAM() { - + var previousPoint = null; function drawGraph(elt, graph, max_val) { @@ -585,12 +586,7 @@ function RAM() { yaxis: { min: 0, max: max_val, - tickFormatter: function (v, axis) { - if (graph.direction == -1) - return v + " bytes"; - return v; - }, - invert: graph.direction == 1 + tickFormatter: memTickFormatter, }, xaxis: { tickFormatter: function (v, axis) { @@ -635,8 +631,7 @@ function RAM() { var text = "" + item.series.id + "
    " text += 'Score: ' + y; - if (graph.direction == -1) - text += " bytes"; + text += " bytes"; text += "
    "; if (x > 0) { @@ -645,8 +640,7 @@ function RAM() { var diff = Math.round((thisValue - prevValue) * 100) / 100; var pdiff = calcPercentDiff(thisValue, prevValue); var better; - if ((pdiff < 0 && graph.direction == -1) || - (pdiff > 0 && graph.direction == 1)) { + if (pdiff < 0) { better = "worse"; } else { better = "better"; @@ -654,8 +648,7 @@ function RAM() { pdiff = Math.abs(pdiff); if (diff === diff) { text += String.fromCharCode(916) + ": " + diff; - if (graph.direction == -1) - text += " bytes"; + text += " bytes"; text += " (" + pdiff + "% " + better + ")
    "; } } @@ -726,7 +719,6 @@ function RAM() { function ROM() { - var previousPoint = null; function drawGraph(elt, graph, max_val) { @@ -734,12 +726,7 @@ function ROM() { yaxis: { min: 0, max: max_val, - tickFormatter: function (v, axis) { - if (graph.direction == -1) - return v + " bytes"; - return v; - }, - invert: graph.direction == 1 + tickFormatter: memTickFormatter, }, xaxis: { tickFormatter: function (v, axis) { @@ -784,8 +771,7 @@ function ROM() { var text = "" + item.series.id + "
    " text += 'Score: ' + y; - if (graph.direction == -1) - text += " bytes"; + text += " bytes"; text += "
    "; if (x > 0) { @@ -794,8 +780,7 @@ function ROM() { var diff = Math.round((thisValue - prevValue) * 100) / 100; var pdiff = calcPercentDiff(thisValue, prevValue); var better; - if ((pdiff < 0 && graph.direction == -1) || - (pdiff > 0 && graph.direction == 1)) { + if (pdiff < 0) { better = "worse"; } else { better = "better"; @@ -803,8 +788,7 @@ function ROM() { pdiff = Math.abs(pdiff); if (diff === diff) { text += String.fromCharCode(916) + ": " + diff; - if (graph.direction == -1) - text += " bytes"; + text += " bytes"; text += " (" + pdiff + "% " + better + ")
    "; } } @@ -832,7 +816,6 @@ function ROM() { WMOPS(); WMOPS_perOP(); - RAM(); ROM(); -- GitLab From 1ad9a8ee2346c97f128c1c282b93b272d1ad3c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Thu, 6 Feb 2025 12:44:26 +0100 Subject: [PATCH 32/39] Increase retention time for sanitizer pipelines' artifacts Right now, with the current fixed schedule, the artifacts regularly disappear while the new pipeline has not run yet. Unless one manually saves the files, there is no way to run tests against them manually. Also, it is impossible to compare a new run against the one before. Keeping the artifacts stored for 4 weeks should fix the issue while keeping the total amount of artifacts storage manageable. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 416b86f3fc..0b71920091 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1818,7 +1818,7 @@ ltv-usan: - ivas-linux-fast artifacts: name: "$CI_JOB_NAME--main--sha-$CI_COMMIT_SHORT_SHA" - expire_in: 2 weeks + expire_in: 4 weeks when: always paths: - ep_015.g192 -- GitLab From 2235c684826659e84da1531ac7a314d0184bfe4c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 6 Feb 2025 14:26:15 +0100 Subject: [PATCH 33/39] [revert-me] change length of signal for faster testing --- ci/complexity_measurements/getWmops.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 3f49630530..8621167a48 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -93,7 +93,7 @@ if [ "$ivas_format" == "OSBA" ]; then fi # instrument and build -./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format +./scripts/IvasBuildAndRunChecks.py -U 5 $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? # TODO: only split wmops and ram files -- GitLab From 33711cb65e5f3bb7cb80f3fbc7e11373433b5020 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 6 Feb 2025 14:42:49 +0100 Subject: [PATCH 34/39] Revert "[revert-me] change length of signal for faster testing" This reverts commit 2235c684826659e84da1531ac7a314d0184bfe4c. --- ci/complexity_measurements/getWmops.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 8621167a48..3f49630530 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -93,7 +93,7 @@ if [ "$ivas_format" == "OSBA" ]; then fi # instrument and build -./scripts/IvasBuildAndRunChecks.py -U 5 $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format +./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? # TODO: only split wmops and ram files -- GitLab From 7560251626395af99bd8371dbc72f7568755c6f3 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Thu, 6 Feb 2025 14:43:22 +0100 Subject: [PATCH 35/39] Revert "Revert "[revert-me] change length of signal for faster testing"" This reverts commit 33711cb65e5f3bb7cb80f3fbc7e11373433b5020. --- ci/complexity_measurements/getWmops.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 3f49630530..8621167a48 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -93,7 +93,7 @@ if [ "$ivas_format" == "OSBA" ]; then fi # instrument and build -./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format +./scripts/IvasBuildAndRunChecks.py -U 5 $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? # TODO: only split wmops and ram files -- GitLab From df7dd0bf6e267a739f4262ca0a311ae8725a97ce Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 6 Feb 2025 15:45:43 +0100 Subject: [PATCH 36/39] add comments --- lib_com/bits_alloc.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lib_com/bits_alloc.c b/lib_com/bits_alloc.c index 6ed9365473..5793a35f80 100644 --- a/lib_com/bits_alloc.c +++ b/lib_com/bits_alloc.c @@ -777,9 +777,11 @@ ivas_error config_acelp1( bits -= TDM_IC_LSF_PRED_BITS; } - /* gain Q bit-budget - part 1 */ + /* gain Q bit-budget - part 1: 'Es_pred' of memory-less gain Q */ #ifdef NONBE_FIX_GSC_BSTR - if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && !inactive_coder_type_flag ) ) + if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) /* mid bitrates in GC and VC, low+mid bitrates in TC */ || + ( coder_type == INACTIVE && !inactive_coder_type_flag ) /* AVQ inactive */ + ) #else 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 ) ) #endif @@ -1064,7 +1066,9 @@ ivas_error config_acelp1( acelp_cfg->fixed_cdk_index[3] = -1; } #ifdef NONBE_FIX_GSC_BSTR - else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) || core == HQ_CORE ) + else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || /* @12.8kHz core except of GSC */ + ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) /* @16kHz core GC, TC, AVQ inactive */ + || core == HQ_CORE /* ACELP -> HQ switching in EVS */ ) #else else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( total_brate > MAX_GSC_INACTIVE_BRATE || coder_type != INACTIVE ) ) || core == HQ_CORE ) #endif @@ -1116,7 +1120,9 @@ ivas_error config_acelp1( /* algebraic codebook bit-budget */ #ifdef NONBE_FIX_GSC_BSTR - if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) + if ( flag_hardcoded || /* EVS */ + ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) /* high-birate ACELP except IC */ || + ( !inactive_coder_type_flag && coder_type == INACTIVE ) /* AVQ inactive */ ) #else if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) #endif @@ -1207,7 +1213,8 @@ ivas_error config_acelp1( /* AVQ codebook */ #ifdef NONBE_FIX_GSC_BSTR - if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) + if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) /* high-birate ACELP except IC */ || + ( !inactive_coder_type_flag && coder_type == INACTIVE ) /* AVQ inactive */ ) #else if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) #endif @@ -1246,7 +1253,9 @@ ivas_error config_acelp1( } } #ifdef NONBE_FIX_GSC_BSTR - else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && inactive_coder_type_flag ) ) + else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) /* LBR secondary channel in TD stereo */ || + ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) /* GSC @12.8kHz */ || + ( coder_type == INACTIVE && inactive_coder_type_flag ) /* AVQ inactive */ ) #else else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) ) #endif @@ -1343,7 +1352,8 @@ ivas_error config_acelp1( if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || nb_subfr == NB_SUBFR16k ) { #ifdef NONBE_FIX_GSC_BSTR - if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ + if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) /* GSC Inactive @16kHz */ || + ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* IVAS GSC @16kHz */ #else if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ #endif -- GitLab From c6afcb4b976d185f7bdd2f7a80436fb6f571c038 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 7 Feb 2025 10:24:30 +0100 Subject: [PATCH 37/39] Revert "Revert "Revert "[revert-me] change length of signal for faster testing""" This reverts commit 7560251626395af99bd8371dbc72f7568755c6f3. --- ci/complexity_measurements/getWmops.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/complexity_measurements/getWmops.sh b/ci/complexity_measurements/getWmops.sh index 8621167a48..3f49630530 100755 --- a/ci/complexity_measurements/getWmops.sh +++ b/ci/complexity_measurements/getWmops.sh @@ -93,7 +93,7 @@ if [ "$ivas_format" == "OSBA" ]; then fi # instrument and build -./scripts/IvasBuildAndRunChecks.py -U 5 $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format +./scripts/IvasBuildAndRunChecks.py $mode_arg_script $repo_arg_script -p $config_file --checks COMPLEXITY --create_complexity_tables ${wmopsFilenameFlc} -C $ivas_format $mode_arg -f ${ep} --oc $output_format ret_val=$? # TODO: only split wmops and ram files -- GitLab From 43e4ac2f44ac4336bff2b248465bf67b3ec5b83c Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 7 Feb 2025 10:40:39 +0100 Subject: [PATCH 38/39] add code for handling switch from global to split-by-levels graphs --- .gitlab-ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dc4dd64165..294594d4ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2407,8 +2407,25 @@ coverage-test-on-main-scheduled: - unzip artifacts.zip || true # this may fail on first run, when there are no artifacts there and the zip file is actually just "404"-html - ls - public_dir="$CI_JOB_NAME-public" + # if is needed to catch case when no artifact is there (first run), similarly as above - - if [[ -d $public_dir ]]; then mv $public_dir/* wmops/; fi + - if [[ -d $public_dir ]]; then + - mv $public_dir/* wmops/ + # check here if we have the split-by-levels files present - if not, fake them up with the existing global one + # this is needed for the first run with split graphs on a branch where the global version did run previously + # NOTE: checking only for level_1 file here as this should already be sufficient + # NOTE2: also not chechking for RAM for same reason + - wmops_all_global="wmops/log_wmops_all.txt" + - ram_all_global="wmops/log_ram_all.txt" + - if [ -f "${wmops_all_global}" ] && [ ! -f "wmops/log_wmops_all_level_1.txt" ]; then + - declare -a suffixes=("level_1" "level_2" "level_3" "rate_sw") + - for suffix in "${suffixes[@]}"; do + - cp ${wmops_all_global} wmops/log_wmops_all_${suffix}.txt + - cp ${ram_all_global} wmops/log_ram_all_${suffix}.txt + - done + - fi + - fi + - ls wmops - rm artifacts.zip - rm -rf $public_dir -- GitLab From 6e6c37d7abbb7856adeb2948cf4d8e80c9288eb6 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 7 Feb 2025 10:42:01 +0100 Subject: [PATCH 39/39] Revert "use specific runner for testing" This reverts commit bb634c286b1f5427baccf6a7d1abf1e913d14d07. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 294594d4ec..30e0f22dc5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2455,7 +2455,7 @@ coverage-test-on-main-scheduled: # still needed as long as no long MASA testvectors are there - .test-job-linux-needs-testv-dir tags: - - test-fhg-linux-runner3 + - ivas-linux-fast timeout: 3 hours 30 minutes stage: test before_script: -- GitLab