Skip to content

Proposed STL2026 release #190

Open
ludomal wants to merge 169 commits into
openitu:devfrom
ludomal:STL2026_sv56_wavio
Open

Proposed STL2026 release #190
ludomal wants to merge 169 commits into
openitu:devfrom
ludomal:STL2026_sv56_wavio

Conversation

FhGSpCo and others added 30 commits June 29, 2025 21:06
Add bitno parameter to init_speech_voltmeter() to allow the P.56
Method B speech voltmeter to operate correctly with 24-bit and 32-bit
A/D converters instead of being limited to 16-bit (approx. 90 dB
dynamic range).

Changes:
- sv-p56.h: SVP56_state now stores bitno and thres_no (bitno-1);
  arrays expanded to 31 elements to support 32-bit; init_speech_voltmeter
  prototype updated to accept bitno parameter
- sv-p56.c: init_speech_voltmeter() derives threshold count from bitno
  (N-1); maxP/maxN are now computed as ±2^(bitno-1) instead of
  hard-coded ±32768; speech_voltmeter() uses state->thres_no instead
  of THRES_NO macro
- actlevel.c: passes bitno to init_speech_voltmeter()
- sv56demo.c: passes bitno to init_speech_voltmeter()

Backward compatible: 16-bit input produces identical results to the
original implementation (THRES_NO=15, maxP=-32768, maxN=32767).

Note: No C compiler available in this environment to verify compilation.
Build should be verified with 'cmake --build build && ctest' before merging.
* Set minimum CMake version to 3.1...3.25 in CMakeLists.txt
* Remove unnecessary entries from .gitignore
* Add .vscode/ to .gitignore for IDE configuration
… the STL build; add regression tests under src/gain_chk/test_data and README for build/ctest usage.
* Update LongTermLevel and Delta array size to support SVP56_MAX_THRESHOLDS.
* Modify threshold-related structures to accommodate dynamic bit depth.
* Add new entries to .gitignore for build artifacts and output files.
Introduce wav_io library (src/utl/wav_io.c, wav_io.h) providing
transparent WAV and raw PCM file handling for all STL tools.

Features:
- Auto-detect WAV input via RIFF header magic bytes
- Output format determined by filename extension (.wav = WAV, else raw)
- Supports 8-bit, 16-bit, 24-bit, 32-bit PCM and 32-bit IEEE float
- Multi-channel WAV: extracts channel 1 with warning
- Parameter validation: expected sample rate, channels, and bit depth
- Full backward compatibility: raw PCM workflows unchanged

Integrated into 28 tools across all categories:
- Codecs: g711demo, g711iplc, g722demo, encg722, decg722, g726demo,
  vbr-g726, g727demo, rpedemo
- Filters: firdemo, filter, cirsdemo, pcmdemo, c712demo
- Measurement: sv56demo, actlevel, bs1770demo, mnrudemo, calc-snr,
  esdru, freqresp
- Processing: reverb, stereoop
- Utilities: scaldemo, signal-diff, astrip, fdelay, measure, oper

Includes unit tests (test_wav_io) and LaTeX manual documentation.
The random tool was developed to have pseudo-random selection
of entries from a list based on a master seed as required by
the EVS processing scripts.
… algorithm, command line syntax, and implementation. Integrate the new chapter into the STL manual.
…djusted equation formatting for clarity and added gain_chk.tex to the build process.
- CMakeLists.txt, src/wmc_tool/CMakeLists.txt: Update cmake_minimum_required
  to VERSION 3.10...3.31 (range syntax required by CMake >= 3.28)
- shiftbit.c: Pass FILE* (Fi) instead of int fd (fi) to fread()
- mnru.c: Assign 0 instead of NULL to long field s->seed
- endian.c: Add void return types to reverse_endian_short/long,
  use unsigned types in test functions to match signatures
Replace K&R-style empty-parentheses function declarations with proper
ANSI C prototypes. The missing prototypes caused default argument
promotion (float->double) at call sites, while function bodies expected
float parameters. This ABI mismatch causes segfaults on GCC 6+, Clang,
MSVC, and ARM64 platforms.

Convert two K&R function definitions (RES_ENG, A_SST) to ANSI style.
Fix all forward declarations in .c files to include parameter types.

Add platform-specific bit-exact verification tests with ARM64 reference
files. The x86 path uses the original voice.out/voice-pf.out references.

Fixes openitu#132, Fixes openitu#41
- .gitattributes: Force LF for basop CSV references and freqresp
  asciiOut.ref (prevents CRLF mismatch with test output on systems
  with core.autocrlf=true). Mark cftest1.dat as binary to prevent
  git from injecting CR bytes into the test input file.

- src/fir/CMakeLists.txt: Add -equiv 1 tolerance to filter21/22/25/26/27
  verify tests. These IIR cascade filters produce ±1 LSB differences
  across platforms due to floating-point rounding — consistent with
  all other filter tests which already use -equiv 1.

- src/g711iplc/CMakeLists.txt: Add -abstol 1 to g711iplc1/3-verify.
  Same ±1 LSB cross-platform rounding differences.

- src/esdru/CMakeLists.txt: Add missing -double flag to esdru1-verify.
  The test compares double-precision files but was reading them as
  16-bit shorts, causing spurious mismatches.

- src/wmc_tool/CMakeLists.txt: Replace deprecated find_package(PythonInterp)
  with find_package(Python3 COMPONENTS Interpreter). The old module fails
  to find Python on modern systems, causing all wmc_tool tests to report
  BAD_COMMAND.

All fixes are transparent: no tool source code is modified, no algorithm
behavior changes. Tools produce identical output on all platforms.
* Update sv56.tex to include new parameters for bit depth.
* Modify CMakeLists.txt to add new executables for testing.
* Enhance actlevel.c to support variable bit-width input files.
* Introduce sv56-convert.c for converting PCM files with different bit depths.
* Create sv56-util.h for utility functions related to bit-width handling.
* Add sv56test.c for testing the speech voltmeter with variable bit widths.
  - Replace Travis CI with GitHub Actions (Linux/macOS/Windows + LaTeX)
  - src/unsup/compfile.c: replace read()/lseek() with fread()/fseek()
  - src/basop/test_framework/test/test_precision.c: binary mode CSV output

  Relates to openitu#120, openitu#142
Add .gitattributes with eol=native for .ref files so they are checked
out with platform-native line endings, matching gain_chk stderr output.
Normalize stored ref files to LF.
- Move chapter after freqresp (spectral analysis tools grouped together)
- Add labels to chapter and all sections for cross-referencing
- Add output file format subsection describing -t results structure
- Add usage examples with sample output and threshold check
- Fix data format description (remove incorrect endianness wording)
Pr 179 fixes CRLF and improves doc. Thanks to @ludomal
Ludovic Malfait and others added 14 commits June 8, 2026 14:00
Same ±1 LSB cross-platform FP rounding as other IIR/FIR filter tests.
Guard Python-dependent wmc_tool tests with if(Python3_FOUND) so they
are cleanly skipped on platforms without Python3 (e.g. i386 container).
Better use of bitno and WAV integration
reltol was used uninitialized when -reltol flag not provided,
causing a crash in MSVC debug builds on Windows.
±1 LSB cross-platform FP rounding at clipping boundary (seen on WSL).
Catches bugs like the reltol issue at compile time rather than
relying on Debug-mode runtime checks that cause dialog popups.
cf (compfile) does not support -equiv flag; signal-diff does.
- item_type: could be used uninitialized if no region type matched
- ps: could be used uninitialized if keyword had no delimiter

Detected by clang -Wconditional-uninitialized and MSVC /we4700.
@ludomal ludomal force-pushed the STL2026_sv56_wavio branch from 95bdd97 to 2f6150e Compare June 9, 2026 17:15
Jan.Reimes and others added 7 commits June 9, 2026 21:56
/we4700 on C++ causes wmc_tool runtime test failures on MSVC due to
optimizer behavior differences, even with the uninit vars fixed.
Keep it for C only where it catches real bugs (like compfile reltol).
Same pattern as sv56demo: auto-detect bit depth from WAV header,
use -bits flag for A/D resolution override. Demonstrates 32-bit
detecting speech at -91 dBov while 16-bit reports zero activity.

Tests: 24-bit normal, 32-bit vquiet, 16-bit ADC simulation, multi-file.
feat(sv56): WAV I/O integration with multi-bit-depth support
@ludomal ludomal changed the title Proposed STL2026 release Proposed STL2026 release - For Consent at ITU-T SG12 Jun 10, 2026
Ludovic Malfait added 3 commits June 10, 2026 21:58
- src/eid/bs-stats.c: initialize out_file to "-" (default stdout)
- src/g728/g728fixed/g728fpdec.c: initialize gaindb to 0
- src/is54/lag.c: initialize E to 0.0
- src/mnru/p50fbmnru.c: initialize dcFilterMode to 0
- src/mnru/snr.c: initialize total_snr_dB in reset block
- src/wmc_tool/c_parser.cpp: use calloc instead of malloc for
  Insert Table allocation (zeroes padding bytes)

Remaining: test_precision.c is a consequence of basop W_round issue (openitu#189)
- src/eid/bs-stats.c: initialize out_file to "-" (default stdout)
- src/g728/g728fixed/g728fpdec.c: initialize d->ogaindb in decoder state
- src/is54/g_quant.c: initialize Rpc0, Rcc00, Rcc01, Rcc02, savePtr
- src/is54/init.c: calloc all global arrays (prevents tainted data)
- src/mnru/p50fbmnru.c: initialize dcFilterMode to 0
- src/mnru/snr.c: initialize total_snr_dB in reset block
- src/wmc_tool/c_parser.cpp: memset Insert record, use calloc for table
- src/wmc_tool/wmc_tool.cpp: memset ParseContext to zero

Verified with Clang Memory Sanitizer: all uninitialized reads resolved
except test_precision.c (consequence of basop W_round bug, issue openitu#189).
@ludomal ludomal changed the title Proposed STL2026 release - For Consent at ITU-T SG12 Proposed STL2026 release Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

g722 segfault

6 participants