[opus] running at 44.1K but with standard frame sizes
Timothy B. Terriberry
tterribe at xiph.org
Sat Jun 15 11:18:57 PDT 2013
Marc Lindahl wrote:
> Of course, I'm setting up a bunch of tests to evaluate these, what I was asking was more along the lines of,
> If you set up the same exact, including the sample rate, do you get the same results (e.g. same code path, calculations, etc.?)
If you configure a custom mode with the standard parameters (48 kHz
sampling rate and a frame size of 120, 240, 480, or 960), the encoded
format is _exactly_ equivalent to a standard Opus mode, and can even be
decoded by a non-custom Opus decoder.
However, there is a bunch of analysis that runs in opus_encoder.c that
is not enabled for custom modes. A fixed-point standard Opus encoder
with OPUS_APPLICATION_RESTRICTED_LOWDELAY, OPUS_BANDWIDTH_FULLBAND, and
OPUS_SET_FORCE_CHANNELS should give identical results.
In floating point, you will need to call the non-public run_analysis()
API and use the CELT_SET_ANALYSIS() encoder ctl to get equivalent results.
Using OPUS_APPLICATION_RESTRICTED_LOWDELAY disables SILK and automatic
voice/music detection.
Forcing OPUS_BANDWIDTH_FULLBAND in the standard modes disables automatic
bandwidth detection... you could hook something equivalent up for Opus
Custom, but CELT_SET_END_BAND_REQUEST is not exposed in the public API
(and you are _required_ to use end band numbers compatible with standard
Opus modes (13, 17, 19, or 21), or the encoder will fail).
OPUS_SET_FORCE_CHANNELS() will disable automatic rate-dependent
switching between mono and stereo. You can hook up something equivalent
by aping the code in opus_encoder.c.
There may be other differences I've forgotten. In general, custom modes
are not well-tested (in comparison to the standard modes).
More information about the opus
mailing list