Opus tuning: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 6: Line 6:
= Parameters =
= Parameters =


These are some parameters that can be tuned to improve the Opus encoder quality (in no particular order)
== tonality (10 5 1) ==
== tonality (10 5 1) ==


Line 15: Line 16:


== trim (7 7 8) ==
== trim (7 7 8) ==
Trim controls the bit allocation balance between low and high frequencies. This is currently computed by alloc_trim_analysis() around line 677 of celt_encoder.c.


== dynalloc (5 5 9) ==
== dynalloc (5 5 9) ==

Revision as of 00:24, 29 December 2012

This page is meant to provide help on tuning the current Opus encoder. It assumes you are working on the master branch, not 1.0.x. As work progresses, some info (especially any line numbers) may become outdated. The numbers in parentheses represent (in order):

  • Impact on quality
  • Quality of current tuning
  • Difficulty

Parameters

These are some parameters that can be tuned to improve the Opus encoder quality (in no particular order)

tonality (10 5 1)

around line 1574 of celt_encoder.c:

       tonal_target = target + (opus_int32)((coded_bins<<BITRES)*1.2f*tonal);

Replacing the constant 1.2f will change the impact of tonality on the bit-rate. The higher value, the higher the bit-rate of tonal frames/samples.

trim (7 7 8)

Trim controls the bit allocation balance between low and high frequencies. This is currently computed by alloc_trim_analysis() around line 677 of celt_encoder.c.

dynalloc (5 5 9)

stereo saving (4 6 6)

spreading (4 7 7)

tapset (1 4 9)

transient estimator (10 8 8)

transient boost (8 6 6)

tf estimator (6 6 9)

Intensity threshold (7 8 3)

skip threshold (3 6 4)

mode/bandwidth decisions (6 4 4)