Hi Jean-Marc, On Jun 15, 2013, at 12:20 PMEDT, Jean-Marc Valin wrote:> > >> So I still wonder, if you set up a custom mode, but then had all the >> settings the same as a normal mode, would the codec perform worse, or >> the same? > > You'll have to try normal vs custom modes and choose. The only thing I'm > telling you is don't run a 48 kHz encoder at 44.1 kHz.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.?) I'm trying to understand if there's something especially deficient about the custom modes, or whether it's simply normal tradeoffs of frame size vs. ability to compress, etc. etc. Thanks! Marc
Timothy B. Terriberry
2013-Jun-15 18:18 UTC
[opus] running at 44.1K but with standard frame sizes
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).
Hi Tim, Thanks for the detailed breakdown! Now clearly understand the tradeoff involved in specific terms. Having a list of which options are disabled/enabled for custom mode would be a great addition to the documentation. Combined with the previous comments I'm more than convinced that for my immediate needs, I should focus on the standard coder. Thanks again. On Jun 15, 2013, at 2:18 PMEDT, Timothy B. Terriberry wrote:> 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). > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus