STL 2026 ITU Submission#6
Draft
ludomal wants to merge 111 commits into
Draft
Conversation
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.
… 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
* Add voice_16bit.ref with audio level data * Add voice_24bit.ref with audio level data * Add voice_32bit.ref with audio level data * Add voice_24.src and voice_32.src as binary files
cfdbb16 to
1c16a0d
Compare
added 27 commits
May 31, 2026 22:16
The run-on-arch approach segfaults in the linker under QEMU user-mode. Cross-compiling natively and using QEMU only for test execution avoids this.
Delay-and-error profile to frame-erasure pattern conversion tool.
Provided by Fraunhofer IIS via 3GPP Tdoc S4-121077.
Changes vs original PR:
- Moved from src/dlyerr_2_errpat/ into src/eid/ (groups all EID tools)
- Added argc bounds checks before argv[2] access
- Replaced abort() with error return code
- Error paths now return non-zero via retval
- Fixed strstr("-help") to use exact strcmp
- Added braces on while loop
- No change to root CMakeLists.txt (already has src/eid)
EID for 3GPP AMR codec using G.192 frame erasure patterns. Originally by Balazs Kovesi & Stephane Ragot (Orange SA), from 3GPP S4-120998. Changes vs original PR: - Moved from src/eid-amr/ into src/eid/ (groups all EID tools) - Links softbit.c and uses read_g192() instead of raw fread - Uses ugstdemo.h RB/WB macros for portable binary file open - Uses G192_FER/G192_SYNC constants instead of magic numbers - Added ITU-T GPL license header - Fixed printf format: %ld for long counters - Division-by-zero guard on empty input - Better error message on invalid pattern value - No change to root CMakeLists.txt (already has src/eid)
- SHQ2/SHQ3: super-high-quality low-pass filters for rate-change factors 2 and 3 - HP50_32KHZ/HP50_48KHZ: 50 Hz high-pass filters at 32 and 48 kHz - Updated filter.c main to support new filter names - Added filter coefficients in fir-flat.c and fir-wb.c - Added CTest cases (filter28-31) with reference outputs - Updated doc/manual/rate.tex with frequency response figures - Added PDF graphics for new filter responses From PR openitu#188 by Stephane Ragot (Orange SA), used in 3GPP SA4 EVS/IVAS.
Adds section describing the EID-AMR tool's purpose, its relationship to eid-xor, and the AMR-specific frame erasure mechanism (NO_DATA=0x03).
Comprehensive documentation including: - Description of AMR serial frame format (250 words, ETSI/3GPP TS 26.073) - Algorithm: how G.192 erasure flags map to NO_DATA frame type - Command-line usage syntax - Worked example with gen-patt pipeline - Provenance (3GPP S4-120998, authors)
- src/eid/README.md: file listing entry + full usage/format/example section - doc/manual/eid.tex: new section with algorithm description (two-pass histogram + classification), input format spec, output formats, usage syntax, worked examples, and provenance
- Links softbit.c, includes ugstdemo.h and softbit.h - G.192 word mode now uses save_g192() (proper binary fwrite) - G.192 byte mode now uses save_byte() - Opens output in binary mode (WB) for G.192 formats - Uses G192_FER/G192_SYNC constants instead of ASCII tricks - Text modes unchanged (fprintf with '0'/'1') - Regenerated test references from updated tool
doc/manual/rate.tex: - Fix SHQ3 caption: 'High-quality' -> 'Super-high-quality' - Fix HP50 figure (b): '32 kHz..' -> '48 kHz.' - Fix broken LaTeX cross-references (shq-frq-1-2 -> shq2, etc.) - Add filter specs (729 coefs, -80dB for SHQ; 1119/1679 coefs for HP50) src/fir/filter.c: - Remove duplicate SHQ/HP50 entries with stray printf artifacts in comment src/fir/firflt.h: - Add missing function prototypes for shq_*_init and hp50_*_init (fixes -Wimplicit-function-declaration errors on C99+) src/fir/CMakeLists.txt: - Fix filter28: add -up flag (reference was generated with upsampling) - Fix filter28-verify: output filename test-shq2.flt (was tst-shq2.flt) - Add -equiv 1 tolerance to filter28/29 verify (matches convention) src/fir/README.md: - Add fir-wb.c entry listing SHQ and HP50 filters
Document the random tool from PR openitu#182 (3GPP S4-121078) in the unsup.tex appendix with algorithm description, usage examples, options reference, and test information.
Update sv56.tex to document: - init_speech_voltmeter now takes a 3rd parameter (bitno, range 1-32) - SVP56_state struct has new fields: thres_no, bitno - Arrays sized dynamically (up to SVP56_MAX_THRESHOLDS=31) - Demo programs accept -bits option for non-16-bit signals - Updated example code to show new API
# Conflicts: # .github/workflows/ci.yml
# Conflicts: # src/fir/CMakeLists.txt
# Conflicts: # doc/manual/eid.tex # src/eid/CMakeLists.txt # src/eid/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merged branches: