From 1986afdb1333b48858f3cbb8976074bbf2552ded Mon Sep 17 00:00:00 2001 From: Stefan Doehla Date: Tue, 20 Aug 2024 07:43:19 +0200 Subject: [PATCH 1/4] [readme] add section on use of IVAS libraries and thread-safety disclaimer --- readme.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/readme.txt b/readme.txt index cd5a01d4be..4e2c66d80d 100644 --- a/readme.txt +++ b/readme.txt @@ -150,6 +150,24 @@ executables are "IVAS_cod.exe", "IVAS_dec.exe", "IVAS_rend.exe", and "ISAR_post_rend.exe". All reside in the c-code main directory. + INTEGRATION AS LIBRARIES + ======================== + +While this package contains the necessary applications to execute the IVAS encoder, +decoder, renderer and ISAR post renderer, it is envisioned that the libraries used +would be integrated into custom applications. + +It should be noted that this library is not thread-safe by default. Thus, wen using +the IVAS libraries in a mult-threaded environment, proper synchronization of API +calls is required to prevent race conditions by concurrent access to IVAS internal +state memory, FIFO queues buffers or any other data structures. Potential mechanisms +include e.g. mutexes, spinlocks and semaphores. The API calls are at the present not +optimized for fine-granular locking of just critical sections. Some sensitive +sections have thus been marked with a comment in the form /* LOCK XYZ BEGIN */ and +/* LOCK XYZ END */ to provide guidance where code could be modified to prevent +some potential race conditions. + + RUNNING THE SOFTWARE ==================== -- GitLab From 958999da81891c56e74e1b950004f87620a93c17 Mon Sep 17 00:00:00 2001 From: "Singh, Ripinder" Date: Wed, 28 Aug 2024 10:34:38 +1000 Subject: [PATCH 2/4] [Issue 1136] Introduce comments to indicate critical section in JBM * Comment added to critical section in alloc/free data in jbm_jb4sb.c Signed-off-by: Singh, Ripinder --- lib_dec/jbm_jb4sb.c | 4 ++++ readme.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib_dec/jbm_jb4sb.c b/lib_dec/jbm_jb4sb.c index 6e09e58e2b..8ea0e54d82 100644 --- a/lib_dec/jbm_jb4sb.c +++ b/lib_dec/jbm_jb4sb.c @@ -381,9 +381,11 @@ JB4_DATAUNIT_HANDLE JB4_AllocDataUnit( JB4_dropFromBuffer( h ); } + /* LOCK JBM MEMORY SLOT BEGIN */ --h->nFreeMemorySlots; dataUnit = h->freeMemorySlots[h->nFreeMemorySlots]; h->freeMemorySlots[h->nFreeMemorySlots] = NULL; + /* LOCK JBM MEMORY SLOT END */ assert( dataUnit != NULL ); return dataUnit; @@ -397,8 +399,10 @@ void JB4_FreeDataUnit( { assert( dataUnit != NULL ); assert( h->nFreeMemorySlots < MAX_JBM_SLOTS ); + /* LOCK JBM MEMORY SLOT BEGIN */ h->freeMemorySlots[h->nFreeMemorySlots] = dataUnit; h->nFreeMemorySlots++; + /* LOCK JBM MEMORY SLOT END */ return; } diff --git a/readme.txt b/readme.txt index 4e2c66d80d..e6fbd729ea 100644 --- a/readme.txt +++ b/readme.txt @@ -157,8 +157,8 @@ While this package contains the necessary applications to execute the IVAS encod decoder, renderer and ISAR post renderer, it is envisioned that the libraries used would be integrated into custom applications. -It should be noted that this library is not thread-safe by default. Thus, wen using -the IVAS libraries in a mult-threaded environment, proper synchronization of API +It should be noted that this library is not thread-safe by default. Thus, when using +the IVAS libraries in a multi-threaded environment, proper synchronization of API calls is required to prevent race conditions by concurrent access to IVAS internal state memory, FIFO queues buffers or any other data structures. Potential mechanisms include e.g. mutexes, spinlocks and semaphores. The API calls are at the present not -- GitLab From 835706272f3cf14f5021188ff9468ebeb1dea098 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 17 Sep 2024 17:02:14 +0200 Subject: [PATCH 3/4] Add ODG analysis to create_histogram_summary.py, and improve newline handling in figures --- scripts/create_histogram_summary.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/create_histogram_summary.py b/scripts/create_histogram_summary.py index 6e940c883a..ae5ead4260 100644 --- a/scripts/create_histogram_summary.py +++ b/scripts/create_histogram_summary.py @@ -43,7 +43,7 @@ if __name__ == "__main__": "--measure", type=str, nargs=1, - help="Measure, any of: MLD, DIFF, SSNR, default: MLD", + help="Measure, any of: MLD, DIFF, SSNR, ODG, default: MLD", default=["MLD"], ) parser.add_argument( @@ -67,6 +67,7 @@ if __name__ == "__main__": "MLD": ("MLD", [0, 5, 10, math.inf]), "DIFF": ("MAXIMUM ABS DIFF", [0, 1024, 16384, 32769]), "SSNR": ("MIN_SSNR", [-math.inf, 0, 20, 40, 60, 100]), + "ODG": ("MIN_ODG", [-5, -4, -3, -2, -1, 0]), } (measure_label, limits) = limits_per_measure[measure] @@ -85,7 +86,7 @@ if __name__ == "__main__": # Output CSV file with open(csv_summary, "w") as fp: limits_labels = [ - f"{str(a)} --\n {str(b)}" for (a, b) in zip(limits[0:-1], limits[1:]) + f"{str(a)} -- {str(b)}" for (a, b) in zip(limits[0:-1], limits[1:]) ] + ["None"] # Zero difference is treated as a special category for MLD and MAXIMUM ABS DIFF if measure_label == "MLD" or measure_label == "MAXIMUM ABS DIFF": @@ -124,7 +125,8 @@ if __name__ == "__main__": fp.write(line) # Matplotlib histogram - ax.bar(limits_labels, data, 0.5, label=cat, bottom=bottom) + labels = [x if len(x) < 10 else x.replace('--','--\n') for x in limits_labels] + ax.bar(labels, data, 0.5, label=cat, bottom=bottom) bottom += data # Histogram layout -- GitLab From ae1083a38c80d833ebd5c781ab9cb9b996df324e Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Wed, 18 Sep 2024 07:28:40 +0200 Subject: [PATCH 4/4] Add PEAQ ODG to summary html page --- ci/basop-pages/create_summary_page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/basop-pages/create_summary_page.py b/ci/basop-pages/create_summary_page.py index 0f19f28100..1f146c4cbb 100644 --- a/ci/basop-pages/create_summary_page.py +++ b/ci/basop-pages/create_summary_page.py @@ -2,7 +2,7 @@ import argparse from create_report_pages import SUBPAGE_TMPL_CSS, FORMATS -MEASURES = ["MLD","DIFF","SSNR"] +MEASURES = ["MLD","DIFF","SSNR","ODG"] SUMMARY_PAGE_TMPL_HTML = """ -- GitLab