Commit
83f49b78a0185ad67a5d398d174e84c986461bc5
by falcontrau: add TFO frame insert/extract functions
In 2025-02 functions were added for encoding and decoding TFO frames,
which are slightly modified TRAU-UL frames. Those functions are
slightly modified versions of regular TRAU frame encoding and
decoding functions, implemented in trau_frame layer. However,
a more useful API for TFO applications (TFO-equipped transcoder
implementations) is one level up: inserting a TFO frame into a block
of 160 G.711 PCM samples or extracting a frame from such sample
block. This slightly higher level is also more amenable to unit
testing: unit tests can perform decoding of TFO frames captured
from historical E1-based TRAU equipment, providing a cross-check
against actual reality and not just our own reading of the specs.
The present patch adds the desired next-level-up TFO frame insertion
and extraction functions, as well as unit tests that exercise both
the present new addition and the underlying functions added in
2025-02.
Unit testing is done in two stages:
1) TFO frame extraction and decoding direction is tested by decoding
from E1 timeslot captures that were taken from Nokia TCSM2.
2) TFO frame encoding and insertion direction is tested via round
trip conversion. Since the decoding direction is verified against
TCSM2, correct round trip conversion implies correct logic in
the encoding direction.
Credit goes to fixeria (Vadim Yanitskiy) for integrating the second
part of the unit test into testsuite.at framework.
Change-Id: Idf149ec682e4064f0e63d67ac757d92402f22dca