Skip to content

Added resampling filter coefficients as in ITU-T Rec. P863 and ETSI TR 103 138#195

Open
annallag wants to merge 3 commits into
openitu:STL2026_sv56_waviofrom
annallag:pr-190
Open

Added resampling filter coefficients as in ITU-T Rec. P863 and ETSI TR 103 138#195
annallag wants to merge 3 commits into
openitu:STL2026_sv56_waviofrom
annallag:pr-190

Conversation

@annallag

Copy link
Copy Markdown
Contributor

In several Q9 recommendations, the use of input speech signals at fixed sampling rates are suggested (e.g. 48kHz for fullband input signals and 8kHz for narrowband input signals). However, in case of speech signals at different sampling rates from those target sampling rates, no standardized way to resample the input signals is recommended. To close this gap, we suggest using for this purpose the resampling (up- and down-sampling) filter coefficients as used internally in ITU-T Rec. P.863 and also published in ETSI TR 103 138.

Anna Llagostera and others added 2 commits June 11, 2026 12:28
Integrate resampling FIR filter coefficients as used in ITU-T Rec. P.863
(POLQA), ITU-T Rec. P.863.2 (PAMD), and published in ETSI TR 103 138.

Filters:
- Factor 2: 256 taps, normalized cutoff 0.475
- Factor 3: 384 taps, normalized cutoff 0.475
- Factor 4: 512 taps, normalized cutoff 0.475
- Factor 6: 768 taps, normalized cutoff 0.475

Changes:
- New file: src/fir/fir-resamp.c (init functions for all 8 filters)
- New file: src/fir/resampcoeff.h (factor 4/6 coefficient arrays)
- filter.c: add P863_2/P863_3/P863_4/P863_6 filter types (-up/-down)
- firdemo.c: add factors 4 and 6 to up/down-sampling parameters
- firflt.h: add p863_*_init prototypes
- CMakeLists.txt: add fir-resamp.c to builds + 24 CTests
- Test vectors: white noise at 48/8 kHz, raw and WAV, with references
- Documentation: rate.tex, g191.md, g191_Annex_A.md

Usage examples:
  filter -down P863_3 input_48k.wav output_16k.wav
  filter -up P863_6 input_8k.raw output_48k.raw
@ludomal

ludomal commented Jun 11, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution.

I have submitted a PR on your repository for your consideration (annallag#2).

I have also added a number of test-cases that evaluation raw to raw, wav to wav, raw to wav and wav to raw samples to test wav-io integration.

@jr2804 - please review too if you have the chance.

Add P.863/P.863.2 resampling filters (factors 2, 3, 4, 6)
@annallag

Copy link
Copy Markdown
Contributor Author

Your changes look good to me, I have accepted the PR

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.

2 participants