Skip to content
Snippets Groups Projects
Forked from Xiph.Org / Opus
Loading
Timothy B. Terriberry's avatar
Timothy B. Terriberry authored
Neither the encoder nor decoder were incrementing the side-channel
 index for a mid-only frame.
Unfortunately, they used that index to index the VAD flags and LBRR
 flags.
This made the VAD flags for the side channel particularly useless,
 as you couldn't tell which frame a flag belonged to without
 decoding most of the packet.
It also desynched the LBRR information, as look at the wrong LBRR
 flags to decide when it had to code a mid-only flag.
If some frames were skipped in the side channel, then the last few
 VAD flags and LBRR flags would be garbage, but still get encoded.

This patch fixes this by continuing to increment nFramesDecoded or
 nFramesEncoded, even when skipping a frame in the side channel.
This makes the side-channel VAD and LBRR flags correspond to the
 correct time periods for frames greater than 20 ms.
It also fixes a bug where if DTX was not used on the packet where
 the side channel got turned off, it would never get used again
 until the encoder attempted to encode something in the side
 channel again.
1e03a6eb
History
This is a prototype codec and for now it has limited functionality. 

To build from a distribution tarball, you only need to do the following:

% ./configure
% make

To build from the git repository, the following steps are necessary:

1) Clone the repository:

% git clone git://git.opus-codec.org/opus.git
% cd opus

1) Compiling

% ./autogen.sh
% ./configure
% make


Once you have compiled the codec, there will be a test_opus executable in
the top directory.

Usage: test_opus [-e] <application> <sampling rate (Hz)> <channels (1/2)>
         <bits per second> [options] <input> <output>
       test_opus -d <sampling rate (Hz)> <channels (1/2)> [options]
         <input> <output>

mode: voip | audio | restricted-lowdelay
options:
-e                   : only runs the encoder (output the bit-stream)
-d                   : only runs the decoder (reads the bit-stream as input)
-cbr                 : enable constant bitrate; default: variable bitrate
-cvbr                : enable constrained variable bitrate; default:
-unconstrained
-bandwidth <NB|MB|WB|SWB|FB> : audio bandwidth (from narrowband to fullband);
                               default: sampling rate
-framesize <2.5|5|10|20|40|60> : frame size in ms; default: 20
-max_payload <bytes> : maximum payload size in bytes, default: 1024
-complexity <comp>   : complexity, 0 (lowest) ... 10 (highest); default: 10
-inbandfec           : enable SILK inband FEC
-forcemono           : force mono encoding, even for stereo input
-dtx                 : enable SILK DTX
-loss <perc>         : simulate packet loss, in percent (0-100); default: 0

input and output are 16-bit PCM files (machine endian) or opus bitstreams
with simple test_opus propritary framing.