Deriving the transform from what the decoder already has.
The mechanism is a substitution. Where a conventional codec spends bits to say which transform it used, GIRC has the decoder work it out, and the encoder only has to correct it when the guess is wrong.
A research format, on purpose
GIRC's bitstream is its own research format, not VVC-conformant. That is deliberate: the mechanism has to be measured with everything else held constant, and a conformant bitstream would force the comparison to inherit every other design decision of the standard.
"GIRC" 4 bytes magic
version u16, little endian
flags u16, little endian bit 0: inferred signalling
width u32, little endian
height u32, little endian
qp u8
payload len u32, little endian
payload range-coded words
The flags field records the signalling mode, so a stream is self-describing: the two modes
have different syntax, and a decoder that guessed wrong would desynchronise. What
is conformant is the signalling the mechanism removes: the explicit mode writes
the same bins the reference implementation writes for mts_idx, checked
against VVenC's own output over 187,834 transform units.
One bin for the answer, two for the correction
The explicit mode codes the transform type with a truncated binary code: the plain DCT-II costs one bin and the other four cost two to four.
The inferred mode codes one bin saying whether the decoder's prediction was right. When it was wrong, two further bins select between the four modes the prediction ruled out.
That second part is what makes the design worth having. The naive form spends a bin on the correction and then the full type again, which is three bins against the explicit mode's two. Coding the correction relative to the prediction brings it back to two, so an override never costs more than the signalling it replaces.
Read from the decoder's own reconstruction
The decoder reads a 16-sample square window ending at the block's top-left corner. Every sample in it has already been reconstructed, so reading it costs nothing in signalling.
| Feature | Count | What it measures |
|---|---|---|
| orientation histogram | 8 | The gradient orientation field, over the full circle |
| gradient energy | 1 | The total magnitude, log-scaled |
| dominance | 1 | The strongest bin's share of the total |
| isotropy | 1 | The entropy of the histogram |
| reference coverage | 1 | How much of the immediate reference is present |
| horizontal, vertical energy | 2 | The per-axis gradient magnitude, log-scaled |
| axis correlation | 1 | Whether the two axes agree: an edge or a corner |
| quantization parameter | 1 | Which transform wins depends on it |
| intra mode | 10 | One-hot; decoded before the transform mode |
| neighbour modes | 20 | One-hot per neighbour, over the five modes: left, above, above-left, above-right |
The gradient is taken with central differences over a genuine two-dimensional window. Restricting it to the two reference lines — the top row and the left column — throws away the diagonal information that distinguishes the transforms, and leaves four of the eight orientation bins permanently empty.
The neighbour context is free: the decoder already knows every already-coded neighbour's transform mode, because it decoded them. The intra mode is the strongest single signal and it is available on both sides, because the mode is decoded before the transform type.
One model over five modes, fitted on the encoder's own choices
The predictor models the joint mode: one multinomial logistic regression over the five modes. An earlier version modelled the two axes separately and composed them, because each axis on its own was well above the majority class — about 53.9% against 50.1% — and the composed mode came out below it, at 48.8%. The five modes are not a product space, so composing two independent per-axis models cannot recover the joint distribution, and the measurement showed it losing. One model over the five modes is both simpler and better.
The regression is a weight vector and a bias per mode, and the prediction is the highest logit. It is a pure function of its weights and the feature vector, so the encoder and the decoder always agree.
The model is trained on the encoder's own decisions. The collection pass runs the encoder and records, for every block, the geometry features and the transform the rate-distortion search actually chose. The training set is therefore the encoder's behaviour and not a proxy for it.
The pipeline also reports the predictability ceiling: a gradient-boosted tree fitted over the same features gives an upper bound on what any model over them can achieve, so a report can state what the features can support rather than only what the shipped model achieves.
The one free parameter, and why it is necessary
The mechanism's free parameter is the margin: the amount of rate-distortion cost the encoder is willing to give up to avoid signalling the transform type. When the predicted transform is within the margin of the search's own choice, the encoder takes the predicted one and spends nothing.
The margin is the honest form of the mechanism. Without it the encoder takes the strictly optimal transform and overrides whenever the prediction differs, and the inferred mode is reliably larger than the explicit one, because the signalling it removes is smaller than the distortion it costs. The margin is what lets the two balance.
The margin applies only to the inferred mode. The explicit mode stays a clean rate-distortion optimum, so the comparison between them is not confounded by the explicit baseline being deliberately handicapped.
One variable, so the rate difference is attributable
The two modes share the intra prediction, the quantization, the transform arithmetic, the residual coding and the entropy coder. They differ in one place: how the transform type reaches the decoder. A difference in the measured rate is therefore attributable to the signalling mechanism alone.
The transform arithmetic is the real thing. The integer transforms are bit-exact against Fraunhofer HHI's VVenC 1.14.0, checked by a test that drives the reference implementation's own kernels and compares the results bit for bit across all twelve transform and size combinations.
GIRC codes 4:2:0 content. No chroma transform type is signalled — H.266 codes one for the luma plane only — so the mechanism is a luma mechanism, exactly where the standard signals a transform type at all. That is why the benchmark reports two rate axes: the luma rate, which is the mechanism's own effect, and the whole-frame rate, which is what a deployment would save.