Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
cc48435
add "random" tool introduced for EVS in 3GPP S4-121078.
sdoehla-iis May 27, 2026
0dee4f7
add unit tests for random in unsup
sdoehla-iis May 29, 2026
af21e6a
add entry in LaTeX documentation
sdoehla-iis May 29, 2026
4a61aa3
CI: sync with STL_2026_itu_submission (s390x + i386 + LaTeX)
Jun 3, 2026
264f374
Add comprehensive manual documentation for random tool
Jun 2, 2026
37c08f2
Fix LaTeX build: replace \text{} with \mathrm{} in unsup.tex
Jun 2, 2026
14dfbde
Fix LaTeX build: replace \mod with \bmod in unsup.tex
Jun 2, 2026
813fc5b
CI: add python3 to i386 container (needed for wmc_tool tests)
Jun 3, 2026
081eb89
CI: restore 32-bit gcc (-m32) build job
Jun 3, 2026
3351935
feat(sv56): re-integrate WAV I/O with multi-bit-depth support
Jun 4, 2026
4ed394e
Merge branch 'sv56_wavio' into STL2026_sv56_wavio
Jun 4, 2026
276f35e
ci: trigger CI
Jun 4, 2026
f46e277
ci: add STL_2026_itu_submission to pull_request triggers
Jun 4, 2026
559b282
fix(cmake): remove reference to non-existent src/eid-amr
Jun 4, 2026
1546c70
fix(test): use CRLF-tolerant text comparison for log verify tests
Jun 4, 2026
1dd843d
fix(test): use CRLF-tolerant text comparison for log verify tests
Jun 4, 2026
cb2301d
doc(sv56): update README with WAV support and bit-depth comparison
Jun 4, 2026
bcaf5b6
Merge branch 'sv56_wavio' into STL2026_sv56_wavio
Jun 4, 2026
1328b94
Merge branch 'random-s4-121078' into PR182
sdoehla-iis Jun 4, 2026
85cfd61
Merge pull request #2 from ludomal/PR182
sdoehla-iis Jun 4, 2026
c1bfec2
test(sv56): add 12-bit test cases for bitno backward compatibility
Jun 5, 2026
4a1c219
refactor(sv56): remove sv56-util.h, use wav_io.h in actlevel.c
Jun 8, 2026
35f0e8d
Merge branch 'sv56_wavio' into STL2026_sv56_wavio
Jun 8, 2026
2005e30
Merge branch 'sdoehla-random' into STL_2026_itu_submission
Jun 8, 2026
a251fc8
Remove stale add_subdirectory(src/eid-amr) from root CMakeLists.txt
Jun 8, 2026
f1a3a92
Merge branch 'STL_2026_itu_submission' into STL2026_sv56_wavio
Jun 8, 2026
dd3d3b9
doc: update documentation for STL2026
Jun 8, 2026
c9f1724
Merge pull request #187 from ludomal/fix/add-ci
ludomal Jun 8, 2026
563c75d
ci: retrigger CI
Jun 8, 2026
6d30df8
Merge branch 'openitu-dev' into STL2026_sv56_wavio
Jun 8, 2026
e21ef21
fix: resolve merge conflict marker in CMakeLists.txt
Jun 8, 2026
10c4350
fix(test): add -equiv 1 tolerance to HP50 filter verify tests
Jun 8, 2026
7beddfe
fix(test): skip wmc_tool Python tests when Python3 not available
Jun 8, 2026
3352078
Merge pull request #1 from ludomal/sv56_wavio
jr2804 Jun 9, 2026
98d1e36
fix: initialize reltol in compfile.c (pre-existing MSVC crash)
Jun 9, 2026
7905106
Merge branch 'fix/ctest-portability' into STL2026_sv56_wavio
Jun 9, 2026
a208e84
fix(test): add -equiv 1 tolerance to p50fbmnru overflow clipping test
Jun 9, 2026
18f0d87
Merge branch 'fix/ctest-portability' into STL2026_sv56_wavio
Jun 9, 2026
1524d6a
ci: enable MSVC C4700 as error (uninitialized variable use)
Jun 9, 2026
a744e71
fix(test): use signal-diff instead of cf for overflow tolerance test
Jun 9, 2026
84835f4
ci: apply /we4700 only to C (not C++) to avoid wmc_tool issues
Jun 9, 2026
1042ae7
fix: initialize uninitialized variables in wmc_tool c_parser.cpp
Jun 9, 2026
2f6150e
ci: re-enable /we4700 for C++ (wmc_tool uninit vars now fixed)
Jun 9, 2026
f5e49bd
✨ feat(wav_io): add support for 8/16/24/32-bit PCM and 32-bit float WAV
Jun 9, 2026
1e1056a
🐛 fix(wav_io): correct bps check for 8-bit samples (not 1-bit!)
Jun 9, 2026
a06c21d
ci: keep /we4700 only for C on Windows
Jun 9, 2026
545c35e
feat(sv56): update actlev for 24/32-bit WAV support
Jun 9, 2026
b2cbeca
Merge pull request #2 from ludomal/sv56_wavio
jr2804 Jun 9, 2026
9b48cb6
Merge branch 'feature/p56-bitdepth-extension' of https://github.com/j…
Jun 9, 2026
0dbc803
Merge branch 'sv56_wavio' into STL2026_sv56_wavio
Jun 10, 2026
170f12f
fix: initialize uninitialized variables caught by Memory Sanitizer
Jun 10, 2026
743326c
fix: initialize uninitialized variables (MSan-verified)
Jun 10, 2026
e787eca
Merge branch 'fix/uninit-variables' into STL2026_sv56_wavio
Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [dev, main, STL_2026_itu_submission]
pull_request:
branches: [dev, main]
branches: [dev, main, STL_2026_itu_submission]

jobs:
build-and-test:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
# Exclude build directory from Windows Defender to avoid scan delays
powershell -Command "Add-MpPreference -ExclusionPath '${{ github.workspace }}'"
cmake .
cmake . -DCMAKE_C_FLAGS="/we4700"

- name: Build (Unix)
if: runner.os != 'Windows'
Expand Down
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10...3.31)
project(STL2023 VERSION 2023)
project(STL2026 VERSION 2026)

add_definitions( -DVERSION_STL="${CMAKE_PROJECT_NAME}" -DCMAKE_POLICY_VERSION_MINIMUM=3.5 )

Expand All @@ -22,7 +22,6 @@ add_subdirectory(src/basop/test_framework)
add_subdirectory(src/basop/flc)
add_subdirectory(src/bs1770demo)
add_subdirectory(src/eid)
add_subdirectory(src/eid-amr)
add_subdirectory(src/esdru)
add_subdirectory(src/fir)
add_subdirectory(src/freqresp)
Expand Down
5 changes: 5 additions & 0 deletions cmake/CompareTextFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ function(compare_text_files)
message(FATAL_ERROR "Text file mismatch: ${_CTF_LABEL}\n--- got ---\n${_got}\n--- expected ---\n${_want}")
endif()
endfunction()

# Auto-invoke when called via cmake -P with -D variables
if(DEFINED GOT AND DEFINED EXPECTED)
compare_text_files(GOT "${GOT}" EXPECTED "${EXPECTED}" LABEL "${LABEL}")
endif()
22 changes: 9 additions & 13 deletions doc/g191.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,23 @@ Please refer to the official Recommendation ITU-T G.191 for the complete text: [

Recommendation ITU-T G.191 provides source code for speech and audio processing modules for narrowband, wideband and super-wideband telephony applications. The set includes codecs, filters, noise generators.

This edition introduces changes to Annex A, which describes the ITU-T Software Tools (STL) containing a high-quality, portable C code library for speech processing applications. This release of the STL, also known as STL2024, incorporates:
This edition introduces changes to Annex A, which describes the ITU-T Software Tools (STL) containing a high-quality, portable C code library for speech processing applications. This release of the STL, also known as STL2026, incorporates:

* BS1770demo improvements:
* WAV file I/O support with multi-bit-depth (16/24/32-bit) processing for all tools

- a new RMS option disabling the gating function for background noise measurement,
* Extensions to the speech voltmeter (sv56) for arbitrary bit-depth processing

- the handling of the edge case where all gating blacks are below -70 LKFS,
* A delay-and-error profile to frame-erasure pattern conversion tool (dlyerr\_2\_errpat) for jitter buffer emulation (3GPP S4-121077)

- improved reporting with scaling factor being reported in the linear and log domains.
* An EID for 3GPP AMR bitstreams (eid-amr)

* WMC Tool updates:
* A pseudo-random selection tool (random) for EVS processing scripts (3GPP S4-121078)

- New command line parameter to allow control on the number of frames per second (default still 50)
* SHQ2/SHQ3 half-band and HP50 high-pass FIR filters

- Export information on all memory allocations occurring during runtime

- Example script for graphical analysis and profiling of dymanic memory allocation
* Cross-platform portability fixes with expanded CTest regression coverage

- Bugs fixes and code improvements

Recommendation ITU-T G.191 includes an electronic attachment containing STL2024 and manual.
Recommendation ITU-T G.191 includes an electronic attachment containing STL2026 and manual.

## Keywords

Expand Down
27 changes: 27 additions & 0 deletions doc/g191_Annex_A.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ The following programs are examples of the use of the modules:
| `stereoop.c` | on the use of stereo file operations. |
| `esdru.c` | on the use of energy-based spatial distortion reference unit [ITU-T P.811]. |
| `wmc_tool.cpp` | on the use of WMC tool for speech and audio codecs complexity and memory measurement. |
| `dlyerr_2_errpat.c` | on the use of the delay/error profile to frame-erasure pattern conversion tool for jitter buffer emulation. |
| `eid-amr.c` | on the use of the EID for 3GPP AMR codec frame erasure simulation using G.192 error patterns. |
| `random.c` | on the use of the pseudo-random selection tool for deterministic item selection or range drawing. |
||


Expand Down Expand Up @@ -85,6 +88,12 @@ The functions included are as follows:
| `LP12_48kHz_init` | initialize a low-pass filter with a cut-off frequency of 12 kHz at (48-kHz sampling). |
| `LP14_48kHz_init` | initialize a low-pass filter with a cut-off frequency of 14 kHz at 48-kHz sampling). |
| `LP20_48kHz_init` | initialize a low-pass filter with a cut-off frequency of 20 kHz (48-kHz sampling). |
| `shq_up_1_to_2_init` | initialize 1:2 SHQ half-band up-sampling filter. |
| `shq_up_1_to_3_init` | initialize 1:3 SHQ up-sampling filter. |
| `shq_down_2_to_1_init` | initialize 2:1 SHQ half-band down-sampling filter. |
| `shq_down_3_to_1_init` | initialize 3:1 SHQ down-sampling filter. |
| `hp50_32khz_init` | initialize 50-Hz high-pass filter (32-kHz sampling). |
| `hp50_48khz_init` | initialize 50-Hz high-pass filter (48-kHz sampling). |
| `hq_kernel` | FIR filtering function. |
| `hq_reset` | clear state variables. |
| `hq_free` | deallocate FIR-filter memory. |
Expand Down Expand Up @@ -710,4 +719,22 @@ The main program for WMC Tool. Depends on:
`wmc_auto_c.txt` Auto-generated C source file for inclusion in projects.
------------------------------------------------------------------------------------------

## u) Delay/error profile to frame-erasure pattern conversion

Name: `dlyerr_2_errpat.c`

Converts a delay-and-error profile (one entry per packet with network delay in ms and a loss flag) into a frame-erasure error pattern suitable for use with the `eid-xor` tool. Supports fixed-delay and bounded-loss-rate jitter buffer emulation modes. Output formats include G.192 word, G.192 byte, and text.

## v) EID for 3GPP AMR codec

Name: `eid-amr.c`

Applies G.192 frame erasure patterns to 3GPP AMR bitstreams. The standard `eid-xor` tool cannot be used directly with AMR because the AMR bitstream follows the ETSI/3GPP format rather than ITU-T G.192. Lost frames are signalled with frame type NO\_DATA and all data bits are forced to zero.

## w) Pseudo-random selection tool

Name: `random.c`

Provides deterministic pseudo-random selection of items from a list or drawing of integers from a numeric range. Uses the EID linear congruential generator for cross-platform reproducibility. Supports configurable seed, dummy pre-runs, and multi-item selection.

-=Pagebreak=-
6 changes: 3 additions & 3 deletions doc/manual/STLmanual.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
\addtolength{\itemsep}{-20pt}

% Define headers
\def\ugst_title{ ITU-T Software Tool Library, release 2024}
\def\ugst_title{ ITU-T Software Tool Library, release 2026}
\def\us{$\mu$s}
\markboth{ \hspace{1cm} \hfill \ugst_title }%
{ Version: \today \hfill \hspace{1cm} }
Expand Down Expand Up @@ -61,7 +61,7 @@
\pagenumbering{roman}

%==============================================================================
\title{ITU-T Software Tool Library 2024 User's Manual}
\title{ITU-T Software Tool Library 2026 User's Manual}
\author{ITU-T Users' Group on Software Tools}

%------------------------------------------------------------------------------
Expand All @@ -71,7 +71,7 @@

\ruley{100mm}

Copyright \copyright~ 2005, 2006, 2009, 2019, 2022, 2023 and 2024 by the International
Copyright \copyright~ 2005, 2006, 2009, 2019, 2022, 2023, 2024 and 2026 by the International
Telecommunication Union (ITU)

\ruley{15mm}
Expand Down
5 changes: 5 additions & 0 deletions doc/manual/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ \chapter{Introduction}

In 2024, the revision of the STL offers additional features and bug fixes to the BS.1770 demo and WMC tool.

In 2026, the proposed revision of the STL adds: WAV file I/O support with multi-bit-depth (16/24/32-bit) processing for all tools; extensions to the speech voltmeter (sv56) for arbitrary bit-depth processing; a delay-and-error profile to frame-erasure pattern conversion tool (dlyerr\_2\_errpat) for jitter buffer emulation (3GPP S4-121077); an EID for 3GPP AMR bitstreams (eid-amr); a pseudo-random selection tool (random) for EVS processing scripts (3GPP S4-121078); SHQ2/SHQ3 half-band and HP50 high-pass FIR filters; and cross-platform portability fixes with expanded CTest regression coverage.

Since STL2019, the build toolchain uses CMake to generate platform-dependent and tool-dependent build scripts as well as to execute regression tests for each module in the STL.
Modules have been tested on Windows, MacOS and several Linux flavors.

Expand Down Expand Up @@ -195,6 +197,8 @@ \section{Acknowledgements}

For the STL2024, the improvements to BS.1770 demo and WMC Tool were kindly provided by Mr Erik Norvell from Ericsson and Mr Vladimir Malenovsky from VoiceAge Corporation respectively.

For the STL2026, the dlyerr\_2\_errpat tool (delay/error profile to frame-erasure pattern converter) and the random tool were kindly contributed by Mr Stefan Doehla from Fraunhofer IIS via 3GPP SA4. The SHQ2/SHQ3 and HP50 FIR filters and the eid-amr tool (EID for 3GPP AMR bitstreams) were contributed by Mr St\'{e}phane Ragot. Mr Markus Multrus from Fraunhofer IIS contributed bug fixes to the basic operators documentation. The sv56 updates were provided by Mr Jan Reimes from HEAD acoustics. The WAV I/O support, integration of contributions, and maintenance of the GitHub repository were performed by Mr Ludovic Malfait (BT Group).

Above all, special thank goes to ITU-T SG16 Counselor Mr~Sim\~ao Ferraz de Campos Neto, the ``father'' of the STL.

%=============================================================================
Expand Down Expand Up @@ -236,6 +240,7 @@ \chapter{Tutorial}
\item[STL2022] ITU-T Software Tools Library, release 2022.
\item[STL2023] ITU-T Software Tools Library, release 2023.
\item[STL2024] ITU-T Software Tools Library, release 2024.
\item[STL2026] ITU-T Software Tools Library, release 2026.
\item[UGST] Users' Group on Software Tools, of ITU-T Study Group 16.
\end{Descr}

Expand Down
2 changes: 1 addition & 1 deletion doc/manual/unsup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ \section{Source code}
level. For Unix/MSDOS.

\item[random.c:]
randomization tool for selecting items from a list or
randomization tool for selecting items from a list or
drawing numbers from a range. Reuses the EID linear
congruential generator from eid.c. For Unix/MSDOS.

Expand Down
2 changes: 1 addition & 1 deletion src/eid/bs-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ int main (int argc, char *argv[]) {
/* Command line parameters */
char bs_format = g192; /* Generic Speech bitstream format */
char ibs_file[MAX_STRLEN]; /* Input bitstream file */
char out_file[MAX_STRLEN]; /* Output ASCII file */
char out_file[MAX_STRLEN] = "-"; /* Output ASCII file */
char log = 1; /* Flag for en/dis-abling output file */
long fr_len = 0; /* Frame length in bits */
long bs_len; /* BS frame length, with headers */
Expand Down
4 changes: 2 additions & 2 deletions src/fir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ add_test(filter29 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/filter -q SHQ3 test_data/tes
add_test(filter29-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/signal-diff -q -equiv 1 test_data/test-shq3.flt test_data/tst-shq3.ref)

add_test(filter30 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/filter -q HP50_32KHZ test_data/test.src test_data/test-hp50-32khz.flt)
add_test(filter30-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/signal-diff -q test_data/test-hp50-32khz.flt test_data/test-hp50-32khz.ref)
add_test(filter30-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/signal-diff -q -equiv 1 test_data/test-hp50-32khz.flt test_data/test-hp50-32khz.ref)

add_test(filter31 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/filter -q HP50_48KHZ test_data/test.src test_data/test-hp50-48khz.flt)
add_test(filter31-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/signal-diff -q test_data/test-hp50-48khz.flt test_data/test-hp50-48khz.ref)
add_test(filter31-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/signal-diff -q -equiv 1 test_data/test-hp50-48khz.flt test_data/test-hp50-48khz.ref)
3 changes: 2 additions & 1 deletion src/g728/g728fixed/g728fpdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ void g728fp_decinit (G728FpDecData * d) {
d->ferased = 0;
d->fecount = 0;
d->ofecount = 0;
d->ogaindb = 0;
d->tap = 0;
g728fp_zerof (d->etpast, KPMAX);
d->feframesz = 4; /* 10. msec */
Expand All @@ -137,7 +138,7 @@ void g728fp_decode (Short * speech, /* output speech */
Float *aptr; /* For attenuating a or atmp */
Float gptmp[LPCLG];
Gain gain;
Float gaindb;
Float gaindb = 0;
Statelpc et;
Float multfac;
Float rc;
Expand Down
10 changes: 5 additions & 5 deletions src/is54/g_quant.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ Motorola Inc.
static FTYPE corr (FTYPE *vec1Ptr, FTYPE *vec2Ptr);

int G_QUANT (int lag, FTYPE rs00, FTYPE rs11, FTYPE rs22) {
FTYPE Rpc0; /* correlation between the weighted speech and the */
FTYPE Rpc0 = 0.0; /* correlation between the weighted speech and the */
/* weighted pitch excitation vector */
FTYPE Rpc1; /* correlation between the weighted speech and the */
/* weighted 1st codebook excitation vector */
FTYPE Rpc2; /* correlation between the weighted speech and the */
/* weighted 2nd codebook excitation vector */
FTYPE Rcc00; /* Rcc(mn) -- correlation between excitation vector */
FTYPE Rcc00 = 0.0; /* Rcc(mn) -- correlation between excitation vector */
/* m and n, where vector 0 is the pitch excitation, */
/* vector 1 is the 1st codebook excitation, and */
/* vector 2 is the 2nd codebook excitation */
FTYPE Rcc01; /* */
FTYPE Rcc02; /* */
FTYPE Rcc01 = 0.0; /* */
FTYPE Rcc02 = 0.0; /* */
FTYPE Rcc11; /* */
FTYPE Rcc12; /* */
FTYPE Rcc22; /* */
Expand All @@ -63,7 +63,7 @@ int G_QUANT (int lag, FTYPE rs00, FTYPE rs11, FTYPE rs22) {
FTYPE maxVal; /* the current best (maximum) error value */
int code; /* the best GSP0 centroid, returned to T_SUB() */

FTYPE *savePtr, *tmpPtr, *tmpPtr2, *endPtr, *endPtr2;
FTYPE *savePtr = NULL, *tmpPtr, *tmpPtr2, *endPtr, *endPtr2;

errCoefs = (FTYPE *) malloc (GSP0_TERMS * sizeof (FTYPE));

Expand Down
46 changes: 23 additions & 23 deletions src/is54/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ void initTables () {
FILE *fptmp;
char *line;

line = (char *) malloc (MAXLINE * sizeof (char));
line = (char *) calloc (MAXLINE, sizeof (char));

/* allocate input speech buffer, interpolated coef buffer, and residual */
/* energy estimate buffer */
inBuf = (FTYPE *) malloc (INBUFSIZ * sizeof (FTYPE));
I_CBUFF = (FTYPE *) malloc ((NP * 3 * N_SUB) * sizeof (FTYPE));
RS_BUFF = (FTYPE *) malloc ((2 * N_SUB) * sizeof (FTYPE));
inBuf = (FTYPE *) calloc (INBUFSIZ, sizeof (FTYPE));
I_CBUFF = (FTYPE *) calloc (NP * 3 * N_SUB, sizeof (FTYPE));
RS_BUFF = (FTYPE *) calloc (2 * N_SUB, sizeof (FTYPE));

/* initialize codes to zero (in case 1st denominator in FLAT is zero) */
codeBuf = (int *) calloc (numCodes, sizeof (int));
Expand All @@ -109,29 +109,29 @@ void initTables () {
/* (1<<(K_BITS_8+1))-1 + (1<<(K_BITS_9+1))-1 + */
/* (1<<(K_BITS_10+1))-1; */
numDecisionVals = 445;
*r0kAddr = (FTYPE *) malloc (numDecisionVals * sizeof (FTYPE));
sst = (FTYPE *) malloc ((NP + 1) * sizeof (FTYPE));
*r0kAddr = (FTYPE *) calloc (numDecisionVals, sizeof (FTYPE));
sst = (FTYPE *) calloc ((NP + 1), sizeof (FTYPE));

/* T_SUB() and R_SUB() allocations */
T_STATE = (FTYPE *) malloc (NP * sizeof (FTYPE));
T_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
P = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
P_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
W_P_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
BASIS = (FTYPE *) malloc (S_LEN * C_BITS * sizeof (FTYPE));
BASIS_A = (FTYPE *) malloc (S_LEN * C_BITS_A * sizeof (FTYPE));
W_BASIS = (FTYPE *) malloc (S_LEN * C_BITS * sizeof (FTYPE));
BITS = (FTYPE *) malloc (C_BITS * sizeof (FTYPE));
X_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
W_X_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
X_A_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
W_X_A_VEC = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
T_STATE = (FTYPE *) calloc (NP, sizeof (FTYPE));
T_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
P = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
P_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
W_P_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
BASIS = (FTYPE *) calloc (S_LEN * C_BITS, sizeof (FTYPE));
BASIS_A = (FTYPE *) calloc (S_LEN * C_BITS_A, sizeof (FTYPE));
W_BASIS = (FTYPE *) calloc (S_LEN * C_BITS, sizeof (FTYPE));
BITS = (FTYPE *) calloc (C_BITS, sizeof (FTYPE));
X_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
W_X_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
X_A_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
W_X_A_VEC = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));
T_P_STATE = (FTYPE *) calloc (LMAX, sizeof (FTYPE));
xmtExPtr = T_P_STATE + LMAX - S_LEN;
TABLE = (int *) malloc (((1 << C_BITS) - 2) * sizeof (int));
GSP0_TABLE = (FTYPE *) malloc (GSP0_TERMS * GSP0_NUM * sizeof (FTYPE));
TABLE = (int *) calloc (((1 << C_BITS) - 2), sizeof (int));
GSP0_TABLE = (FTYPE *) calloc (GSP0_TERMS * GSP0_NUM, sizeof (FTYPE));
R_P_STATE = (FTYPE *) calloc (LMAX, sizeof (FTYPE));
outBuf = (FTYPE *) malloc (S_LEN * sizeof (FTYPE));
outBuf = (FTYPE *) calloc (S_LEN, sizeof (FTYPE));

/* fill r0 quantization table */
temp = sqrt ((double) S_LEN); /* sqrt (S_LEN * max amplitude squared) */
Expand Down Expand Up @@ -229,7 +229,7 @@ void initTables () {
#include "gray.i" /* gray-code table */

/* store SST bandwidth widening factors for A_SST() */
P_SST = (FTYPE *) malloc ((NP + 1) * sizeof (FTYPE));
P_SST = (FTYPE *) calloc ((NP + 1), sizeof (FTYPE));

nb = log (0.5) / (2.0 * log (cos ((4.0 * atan (1.0) * POST_BEQ_N) / (2.0 * SRATE))));
temp = 1.0;
Expand Down
2 changes: 1 addition & 1 deletion src/is54/lag.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int LAG_SEARCH () {
FTYPE Cl; /* Holds the cross correlation between bl and P, the */
/* weighted speech, for lag l */
FTYPE Gl; /* Holds the energy in bl */
FTYPE E; /* Holds the partial energy of bl for lags greater */
FTYPE E = 0.0; /* Holds the partial energy of bl for lags greater */
/* than S_LEN */
FTYPE ClBest = 0.0; /* Holds the value of Cl for the current best */
/* Cl**2 / Gl */
Expand Down
2 changes: 1 addition & 1 deletion src/mnru/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ add_test(p50fbmnru_Q0_clipping_clamp ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/p50fbmnru
add_test(p50fbmnru_Q0_clipping_clamp-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/cf -q test_data/P501_D_AM_fm_FB_48k_Q0_clamp.ref test_data/P501_D_AM_fm_FB_48k_Q0_clamp.pcm)

add_test(p50fbmnru_Q0_clipping_overflow ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/p50fbmnru test_data/P501_D_AM_fm_FB_48k.pcm test_data/P501_D_AM_fm_FB_48k_Q0_overflow.pcm 0 M --overflow)
add_test(p50fbmnru_Q0_clipping_overflow-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/cf -q test_data/P501_D_AM_fm_FB_48k_Q0_overflow.ref test_data/P501_D_AM_fm_FB_48k_Q0_overflow.pcm)
add_test(p50fbmnru_Q0_clipping_overflow-verify ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/signal-diff -q -equiv 1 test_data/P501_D_AM_fm_FB_48k_Q0_overflow.ref test_data/P501_D_AM_fm_FB_48k_Q0_overflow.pcm)

#TEST: Compute SNR for MNRU files
#TODO: no automatic verification data available
Expand Down
2 changes: 1 addition & 1 deletion src/mnru/p50fbmnru.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int main(int argc, char *argv[])
{
MNRU_state state;
FILE *In, *Out;
char dcFilterMode ;
char dcFilterMode = 0;
short B_Len, BuffLen;
long lFileLen = 0;
int i, B_Max;
Expand Down
1 change: 1 addition & 0 deletions src/mnru/snr.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ float get_SNR (int mode, short *a, short *b, long N, long N2, SNR_state * s) {
s->tot_smpno = 0;
s->total_err = 0;
s->total_sqr = 0;
s->total_snr_dB = 0;
}


Expand Down
Loading
Loading