Skip to content

Updates to filter tool and additon of eid-amr #188

Open
ragotsa wants to merge 15 commits into
openitu:devfrom
ragotsa:dev
Open

Updates to filter tool and additon of eid-amr #188
ragotsa wants to merge 15 commits into
openitu:devfrom
ragotsa:dev

Conversation

@ragotsa

@ragotsa ragotsa commented May 31, 2026

Copy link
Copy Markdown

Changed to filter tool (SHQ and HP50 filters) and eid (eid-amr added) to reflect 3GPP processing tools used in EVS and/or IVAS

Stephane Ragot and others added 15 commits May 26, 2026 14:06
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)
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
Proposed improvements to eid-amr
Proposed fixes for SHQ/HP50 filter additions
Revert "Proposed improvements to eid-amr"
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.

1 participant