encoding.info
You are hereSourcePredictionTransformEntropy codingFiltersFramesDecisionsRate controlPerceptionQualityBitstreamSettingsEncoder map
Page 4 of 6 in Settings decoded

Interaction map: which settings fight and which need each other

Settings decoded · implementation · added 2026-11-15

An encoder's settings are not independent. Some switch others off, some do nothing unless another is set, and some pull the same quantity in opposite directions. x264 resolves many of these cases itself when it starts, often without a message. This page lists selected rules it applies, read from the code that checks the parameters.

What needs what

macroblock-tree
adaptive quantization's offset storage
macroblock-tree
a lookahead, in a first pass
--psy-rd, first strength
--subme 6 or more
--psy-rd, second strength
--trellis 1 or 2
--b-pyramid
--bframes 2 or more
Each arrow reads "needs". When what a gray box names is missing, x264 switches the tool in the teal box off or leaves it without effect, with one exception: for macroblock-tree it switches adaptive quantization back on at strength 0, so macroblock-tree's offsets have somewhere to go. The lookahead rule has exceptions too: unlimited keyframe spacing, intra refresh, and a second pass, which sets the lookahead to 0 and reads the offsets the first pass stored. These are conditions from x264's parameter checks, not a simulation of every combination; the list below has the lines.

Set one thing, see what else moves

Choose a setting to see selected rules it can trigger, each with the line of x264's source that applies it. A row states its condition where it has one, and other options or later checks can change the outcome, so a row is not a prediction of one encode. "With a warning" marks a rule that prints a message when it applies.

Setting affectedRule
Rules listed
Rules with a warning
Rules without one

Simplified demo: an index, not a model. Nothing is encoded. The rules are x264's own, from the function that validates parameters and from its tunings and profiles, at the commit linked under Sources. The list is a selection of the rules that touch options this course explains; x264 has more. A selection can list alternatives, which cannot both apply, and two rows can act on one setting, so the counts are of rules, not of settings changed. "Changed" covers any new value; "No effect" means the option keeps its value and the code that would use it does not run.

Where each tool enters the cost

Most of these tools act on the same decision rule, the cost J = D + λ × R of rate-distortion optimization, which is why they interact. This table says where each one enters, as the pages on each tool established it for x264.

ToolWhat it moves
Rate controlEach frame's quantization parameter (QP), and λ with it
Adaptive quantizationQP, and λ, block by block, from the block's own energy
Macroblock-treeQP, and λ, block by block, from how much later frames use the block
Psychovisual optimizationD: adds a term for lost texture energy
Trellis quantizationThe levels, chosen by D + λ × R inside a block
Motion searchIts own, cheaper cost: a difference measure plus λ times the vector's bits

Adaptive quantization and macroblock-tree each contribute a per-block quantizer adjustment within the active rate control mode, under x264's own rules for when each applies, which is why macroblock-tree stores its offsets through adaptive quantization. An active psychovisual term changes the costs of candidates in the paths that use it, and x264 lowers the chroma offset when one is in effect.

Trade-offs

Sources

Read 2026-11-15, at the commit linked. The order of the command line, the stored offsets a second pass reads, the three records of the settings and the lossless test were read 2026-11-16.