From 38d7b45a0c7a88918defb2b7ed3338bbdfb21ce2 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Thu, 19 Sep 2024 13:38:33 +0200 Subject: [PATCH 1/6] insert push_wmops() ... pop_wmops() --- lib_dec/evs_dec_fx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib_dec/evs_dec_fx.c b/lib_dec/evs_dec_fx.c index ba94c988a..eb44da8c9 100644 --- a/lib_dec/evs_dec_fx.c +++ b/lib_dec/evs_dec_fx.c @@ -67,6 +67,9 @@ ivas_error evs_dec_fx( TCX_LTP_DEC_HANDLE hTcxLtpDec; TCX_DEC_HANDLE hTcxDec; ivas_error error; + + push_wmops( "evs_dec_fx" ); + #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); @@ -1502,6 +1505,9 @@ ivas_error evs_dec_fx( } updt_dec_common_fx( st_fx, hq_core_type, concealWholeFrameTmp, output_sp, Qpostd ); } + + pop_wmops(); + return IVAS_ERR_OK; } #endif -- GitLab From febbd71a3102ce0e8313e900d112ab160c811e10 Mon Sep 17 00:00:00 2001 From: malenov Date: Fri, 20 Sep 2024 13:59:06 +0200 Subject: [PATCH 2/6] instrument also main AMR-WB encoder/decoder functions --- lib_dec/amr_wb_dec.c | 3 +++ lib_dec/amr_wb_dec_fx.c | 4 ++++ lib_enc/amr_wb_enc.c | 3 +++ lib_enc/amr_wb_enc_fx.c | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/lib_dec/amr_wb_dec.c b/lib_dec/amr_wb_dec.c index 09242c2a3..7a5baa92c 100644 --- a/lib_dec/amr_wb_dec.c +++ b/lib_dec/amr_wb_dec.c @@ -101,6 +101,8 @@ ivas_error amr_wb_dec( TCX_LTP_DEC_HANDLE hTcxLtpDec = st->hTcxLtpDec; ivas_error error; + push_wmops( "amr_wb_dec" ); + error = IVAS_ERR_OK; /*------------------------------------------------------------------* @@ -810,6 +812,7 @@ ivas_error amr_wb_dec( /* final output of synthesis signal */ mvr2r( synth_out, output, output_frame ); + pop_wmops(); return error; } diff --git a/lib_dec/amr_wb_dec_fx.c b/lib_dec/amr_wb_dec_fx.c index f2acdde1a..ef5b4299e 100644 --- a/lib_dec/amr_wb_dec_fx.c +++ b/lib_dec/amr_wb_dec_fx.c @@ -88,10 +88,13 @@ ivas_error amr_wb_dec_fx( hTcxLtpDec = st_fx->hTcxLtpDec; hTcxDec = st_fx->hTcxDec; + push_wmops( "amr_wb_dec_fx" ); + error = IVAS_ERR_OK; st_fx->idchan = 0; move16(); move16(); + /*------------------------------------------------------------------* * Initialization *------------------------------------------------------------------*/ @@ -1111,6 +1114,7 @@ ivas_error amr_wb_dec_fx( /* final output of synthesis signal */ syn_output_fx( st_fx->codec_mode, synth_out_fx, output_frame, output_sp, st_fx->Q_syn2 ); + pop_wmops(); return error; } diff --git a/lib_enc/amr_wb_enc.c b/lib_enc/amr_wb_enc.c index 054332d5f..8b7281bc3 100644 --- a/lib_enc/amr_wb_enc.c +++ b/lib_enc/amr_wb_enc.c @@ -102,6 +102,8 @@ void amr_wb_enc( LPD_state_HANDLE hLPDmem = st->hLPDmem; + push_wmops( "amr_wb_enc" ); + /*------------------------------------------------------------------* * Initialization *------------------------------------------------------------------*/ @@ -518,6 +520,7 @@ void amr_wb_enc( /* update main codec paramaters */ updt_enc_common( st ); + pop_wmops(); return; } diff --git a/lib_enc/amr_wb_enc_fx.c b/lib_enc/amr_wb_enc_fx.c index d2b2569b5..b07fc980f 100644 --- a/lib_enc/amr_wb_enc_fx.c +++ b/lib_enc/amr_wb_enc_fx.c @@ -89,6 +89,8 @@ void amr_wb_enc_fx( TD_BWE_ENC_HANDLE hBWE_TD = st->hBWE_TD; FD_BWE_ENC_HANDLE hBWE_FD = st->hBWE_FD; + push_wmops( "amr_wb_enc_fx" ); + /*------------------------------------------------------------------* * Initialization *------------------------------------------------------------------*/ @@ -609,6 +611,8 @@ void amr_wb_enc_fx( dbgwrite( &st->vad_flag, sizeof( short ), 1, input_frame, "res/vad_flag" ); #endif + pop_wmops(); + return; } /*---------------------------------------------------------------------* -- GitLab From 1e04812a8bf173e4e3cff0af04480c80614e8c76 Mon Sep 17 00:00:00 2001 From: malenov Date: Fri, 20 Sep 2024 14:06:14 +0200 Subject: [PATCH 3/6] remove unsupported options --- lib_com/options.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index bc5e5f09e..7173e2648 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -57,8 +57,6 @@ //#define WMOPS /* Activate complexity and memory counters */ #ifdef WMOPS /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ -/*#define WMOPS_DETAIL*/ /* Output detailed complexity printout for every function. Increases runtime overhead */ -/*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output detailed complexity analysis for the worst-case frame */ /*#define MEM_COUNT_DETAILS*/ /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */ #endif -- GitLab From 24deb2ae23fed8b462bb26ae3d88d74515ac2e34 Mon Sep 17 00:00:00 2001 From: malenov Date: Fri, 20 Sep 2024 16:04:50 +0200 Subject: [PATCH 4/6] add instrumentation for evs_enc_fx() --- lib_enc/evs_enc_fx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_enc/evs_enc_fx.c b/lib_enc/evs_enc_fx.c index ae2dd4aed..7a86e177b 100644 --- a/lib_enc/evs_enc_fx.c +++ b/lib_enc/evs_enc_fx.c @@ -92,6 +92,7 @@ ivas_error evs_enc_fx( error = IVAS_ERR_OK; + push_wmops( "evs_enc_fx" ); Q_shb_spch = 0; move16(); /* to avoid compiler warnings */ @@ -612,6 +613,8 @@ ivas_error evs_enc_fx( dbgwrite( &st->vad_flag, sizeof( short ), 1, input_frame, "res/vad_flag" ); #endif + pop_wmops(); + return error; } -- GitLab From 7d4a327e517c10bd83d1ffcc3357a52084abcd69 Mon Sep 17 00:00:00 2001 From: malenov Date: Fri, 20 Sep 2024 16:05:39 +0200 Subject: [PATCH 5/6] change free_() to its uninstrumented version --- .gitignore | 51 +++++++++++++++++++++++++++++++++++++++++++++++ lib_com/count.c | 2 +- lib_com/options.h | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..d9949e572 --- /dev/null +++ b/.gitignore @@ -0,0 +1,51 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +/ci +/obj +/res +/scripts +/tests +/tv +/Workspace_msvc/Debug_renderer +/Workspace_msvc/Debug_lib_util +/Workspace_msvc/Debug_lib_rend +/Workspace_msvc/Debug_lib_enc +/Workspace_msvc/Debug_lib_dec +/Workspace_msvc/Debug_lib_debug +/Workspace_msvc/Debug_lib_com +/Workspace_msvc/Debug_encoder +/Workspace_msvc/Debug_decoder +/__backup +/Workspace_msvc +/tracefile_sim +/tmp.192 +/test.json +/syn.wav +/syn.ref +/syn +/stvST32c_-stereo_32000_32.bit +/stvFOA48c_ivasbr13k_DTX1_Gain0_SID.192 +/signer_m_-ism_1_NULL_32000_32.bit +/report.html +/report-junit.xml +/out.wav +/libivasutil.a +/libivasrend.a +/libivasenc.a +/libivasdec.a +/libivasdebug.a +/libivascom.a +/IVAS_rend_ref +/IVAS_rend.exe +/IVAS_rend +/IVAS_dec_ref +/IVAS_dec.exe +/IVAS_dec +/IVAS_cod_ref +/IVAS_cod.exe +/IVAS_cod +/bit +/10dB.fer +*.bak diff --git a/lib_com/count.c b/lib_com/count.c index b93414d8a..eaf6f04f4 100644 --- a/lib_com/count.c +++ b/lib_com/count.c @@ -1082,7 +1082,7 @@ void WMOPS_destroy( void ) { if ( NULL != objectName[i] ) { - free_( objectName[i] ); + free( objectName[i] ); objectName[i] = NULL; } } diff --git a/lib_com/options.h b/lib_com/options.h index 7173e2648..b63b1e708 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -54,7 +54,7 @@ #define SUPPORT_JBM_TRACEFILE /* Support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */ -//#define WMOPS /* Activate complexity and memory counters */ +#define WMOPS /* Activate complexity and memory counters */ #ifdef WMOPS /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ /*#define MEM_COUNT_DETAILS*/ /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */ -- GitLab From cd30416ceb72488615835a7741f092925e19bfe4 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Tue, 24 Sep 2024 13:21:19 +0200 Subject: [PATCH 6/6] cleanup --- .gitignore | 51 ----------------------------------------------- lib_com/options.h | 2 +- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index d9949e572..000000000 --- a/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -################################################################################ -# This .gitignore file was automatically created by Microsoft(R) Visual Studio. -################################################################################ - -/ci -/obj -/res -/scripts -/tests -/tv -/Workspace_msvc/Debug_renderer -/Workspace_msvc/Debug_lib_util -/Workspace_msvc/Debug_lib_rend -/Workspace_msvc/Debug_lib_enc -/Workspace_msvc/Debug_lib_dec -/Workspace_msvc/Debug_lib_debug -/Workspace_msvc/Debug_lib_com -/Workspace_msvc/Debug_encoder -/Workspace_msvc/Debug_decoder -/__backup -/Workspace_msvc -/tracefile_sim -/tmp.192 -/test.json -/syn.wav -/syn.ref -/syn -/stvST32c_-stereo_32000_32.bit -/stvFOA48c_ivasbr13k_DTX1_Gain0_SID.192 -/signer_m_-ism_1_NULL_32000_32.bit -/report.html -/report-junit.xml -/out.wav -/libivasutil.a -/libivasrend.a -/libivasenc.a -/libivasdec.a -/libivasdebug.a -/libivascom.a -/IVAS_rend_ref -/IVAS_rend.exe -/IVAS_rend -/IVAS_dec_ref -/IVAS_dec.exe -/IVAS_dec -/IVAS_cod_ref -/IVAS_cod.exe -/IVAS_cod -/bit -/10dB.fer -*.bak diff --git a/lib_com/options.h b/lib_com/options.h index b63b1e708..2345dd6a6 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -54,7 +54,7 @@ #define SUPPORT_JBM_TRACEFILE /* Support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */ -#define WMOPS /* Activate complexity and memory counters */ +/*#define WMOPS*/ /* Activate complexity and memory counters */ #ifdef WMOPS /*#define WMOPS_PER_FRAME*/ /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */ /*#define MEM_COUNT_DETAILS*/ /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */ -- GitLab