5 File formats

26.4523GPPAlternative fixed-point using updated basic operatorsANSI C codeCodec for Enhanced Voice Services (EVS)Release 17TS

5.0 General

This clause describes the file formats used by the encoder and decoder programs. The test sequences defined in [9] also use the file formats described here.

5.1 Speech file (encoder input / decoder output)

Speech files read by the encoder and written by the decoder consist of 16-bit words speech/audio sample. The byte order depends on the host architecture (e.g. LSByte first on PCs, etc.). Both the encoder and the decoder program process complete frames (corresponding to 20 ms, for example, 640 samples at 32 kHz sampling frequency) only.

The encoder will pad the last frame to integer multiples of 20ms frames, i.e. n speech frames will be produced from an input file with a length between [(n-1)*20ms+1 sample; n*20ms]. The files produced by the decoder will always have a length of n*20ms.

5.2 Rate switching profile (encoder input)

The encoder program can optionally read in a rate switching profile which specifies the encoding bitrate for each frame of speech processed. The file is a binary file, generated by ‘gen-rate-profile’, which is part of STL 2009, as contained in ITU-T G.191 [11]. The rate switching profile can contain EVS primary mode bitrates and AMR-WB IO mode bitrates arbitrarily. I.e. switching between the two modes can be specified by the rate switching profile.

5.3 Parameter bitstream file (encoder output / decoder input)

5.3.0 General

The files produced by the speech/audio encoder/expected by the speech decoder contain an arbitrary number of frames in the following available formats.

5.3.1 ITU-T G.192 compliant format

SYNC_WORD

DATA_LENGTH

B1

B2

Bnn

Each box corresponds to one Word16 value in the bitstream file, for a total of 2+nn words or 4+2nn bytes per frame, where nn is the number of encoded bits in the frame. Each encoded bit is represented as follows: Bit 0 = 0x007f, Bit 1 = 0x0081. The fields have the following meaning:

– SYNC_WORD: Word to ensure correct frame synchronization between the encoder and the decoder. It is also used to indicate the occurrences of bad frames.

In the encoder output: (0x6b21)

In the decoder input: Good frames (0x6b21)

Bad frames (0x6b20)

– DATA_LENGTH: Length of the speech data. Codec mode and frame type is extracted in the decoder using this parameter

5.3.2 Compact storage format file

The encoder and decoder programs can optionally write and read a file in the octet-based compact storage format. The compact storage format is specified in clause A.2.6 of [2].

5.4 VoIP parameter bitstream file (decoder input)

Packet size

Arrival time

RTP header

G.192 format (see 5.3.1)

The fields have the following size and meaning:

– Packet size: 32 bit unsigned integer. (= 12 + 2 + DATA_LENGTH)

– Arrival time: 32 bit unsigned integer. in ms.

– RTP header: 96 bits (see RFC 3550 [10]), including RTP timestamp and SSRC.

5.5 Bandwidth switching profile (encoder input)

The encoder program can optionally read in a bandwidth switching profile, which specifies the encoding bandwidth for each frame of speech processed. The file is a text file where each line contains "nb_frames B". B specifies the signal bandwidth that is one of the supported four bandwidths, i.e. NB, WB, SWB or FB. And "nb_frames" is an integer number of frames and specifies the duration of activation of the accompanied signal bandwidth B.

5.6 Channel-aware configuration file (encoder input and decoder output)

The encoder program can optionally read in a configuration file which specifies the values of FEC indicator p and FEC offset o, where FEC indicator, p: LO or HI, and FEC offset, o: 2, 3, 5, or 7 in number of frames. Each line of the configuration file contains the values of p and o separated by a space.

The channel-aware configuration file is meant to simulate channel feedback from a receiver to a sender, i.e. the decoder would generate FEC indication and FEC offset values for receiver feedback that correspond to the current transmission channel characteristics, thereby allowing optimization of the transmission by the encoder which applies the FEC offset and FEC indication when in the channel-aware mode.

5.7 JBM trace file (decoder output)

The decoder can generate a JBM trace file with the –Tracefile switch as a by-product of the decoder operation in case of JBM operation (which is triggered with the –VOIP switch on the decoder side).

The trace file is a CSV file with semi-colon as separator. The trace file starts with one header line that contains the column names in the following order:

rtpSeqNo;rtpTs;rcvTime;playtime;active

For each played out speech frame one entry is written to the trace file. The interval of the playtime values is usually 20ms, but may differ, depending on the JBM operation. Each entry is a line in the trace file that contains values as specified in Table 2.

Table 2: JBM trace file entry format

Name

Unit

Description

rtpSeqNo

1

RTP sequence number of played out speech frame. -1 if no corresponding RTP packet for the speech frame exists.

rtpTs

ms

RTP time stamp of played out speech frame. -1 if no corresponding RTP packet for the speech frame exists

rcvTime

ms

Absolute reception time of the RTP packet that corresponds to the speech frame. -1 if no corresponding RTP packet for the speech frame exists.

playtime

ms

Absolute play time (i.e. the time at which the PCM data is made available by the decoder). Can be floating-point value.

active

0 or 1

Binary entry, which is set to 1 for active speech frames (i.e. frames that are neither SID nor NO_DATA)

Annex A (informative):
Change history

Change history

Date

Meeting

TDoc

CR

Rev

Cat

Subject/Comment

New version

2018-12

SA#82

SP-180978

Presented at SA#82 for approval

1.0.0

2018-12

SA#82

Approved at SA#82

16.0.0

2019-03

SA#83

SP-190036

0001

F

Update of EVS Alt_FX_EVS

16.1.0

2020-07

SA#88-e

SP-200391

0002

1

F

Corrections to EVS Alternative Fixed-Point Source Code

16.2.0

2020-10

Post SA#88-e

Update of the Change History Table

16.2.1

2021-09

SA#93-e

SP-210825

0004

1

F

Corrections to EVS Alternative Fixed-Point Source Code

16.3.0

2021-12

SA#94-e

SP-211345

0005

F

Corrections to EVS Alternative Fixed-Point Source Code

16.4.0

2022-04

Update to Rel-17 version (MCC)

17.0.0