GIRC.dev

The mechanism saves 0.236% of the bitrate.

Twelve CIF sequences, ten frames each, four quantization parameters, and the inferred mode comes out 0.236% smaller than the explicit mode on the luma plane, and 0.149% smaller on the whole frame. It is smaller on eleven sequences of the twelve on the luma plane and ten on the whole frame.

The margin sweep below is the whole trade: the rate the encoder gives up in distortion, against the rate it saves in signalling.

Every figure is reproducible from the repository

GIRC runs in both signalling modes over a four-point QP sweep, and the Bjontegaard delta rate is computed by cubic polynomial interpolation over the overlapping PSNR range, as the JVET common test conditions define it. The two GIRC modes differ in exactly one thing: how the transform mode reaches the decoder.

The transform mode is VVC's, not an invention of this repository's: the plain DCT-II, or one of the four per-axis combinations of DCT-VIII and DST-VII that ITU-T H.266 defines as multiple transform selection. The explicit mode codes the mode the way the standard's mts_idx syntax does, which is what the decoder of a real codec would have to read.

The anchors are the real encoders: x265 for HEVC, SVT-AV1 for AV1 and VVenC 1.14.0 for VVC, each coding the same ten frames of the same file, all three planes, and measured by the same PSNR code. Every figure on this page is generated by tools/generate_figures.py from the committed benchmark report, so a figure cannot exist without the run behind it.

The measurement apparatus: one variable, everything else held constant crates/girc-bench/src/main.rs
twelve CIF sequences four quantization parameters ten frames each the explicit mode the same search, the same quantizer the inferred mode the same search, plus a margin the only difference how the transform mode reaches the decoder every other stage is shared by both the anchors are coded the same way, on the same frames, with the same PSNR code the benchmark decodes what it encodes, and refuses a result if the two pictures differ

The mechanism's only free parameter, swept

The margin is the amount of rate-distortion cost the encoder is willing to give up to avoid signalling the transform type. It is the mechanism's only free parameter, and sweeping it shows the whole trade.

The margin sweep: the rate the encoder saves against the distortion it pays research/benchmark/report-v9-joint.json · margin_sweep
-0.3 -0.1 0.1 0.4 0.6 the explicit baseline -0.056 0 -0.119 25 -0.236 50 +0.002 100 +0.515 200 the optimum on this content BD-rate, % margin, in rate-distortion cost units negative is smaller than the explicit mode
Margin Mean BD-rate, luma Prediction mismatch Better on Reading
0 −0.056 46.4% 12 of 12 No margin: the encoder always takes the optimal transform
25 −0.119 44.6% 10 of 12 The margin starts to pay
50 −0.236 42.6% 11 of 12 The optimum on this content
100 +0.002 37.9% 10 of 12 Past the optimum
200 +0.515 30.6% 6 of 12 Distortion dominates

Mean Bjontegaard delta rate of the inferred mode against the explicit mode, over twelve CIF sequences at four QP points, on the luma plane. Negative means the inferred mode is smaller. The whole-frame figure, which includes the chroma planes, is −0.149% at the margin of 50, and the inferred mode is smaller on ten sequences of the twelve.

How often the prediction is wrong, and how the margin buys it back research/benchmark/report-v9-joint.json · margin_sweep
31% 36% 41% 46% 46.4% 0 44.6% 25 42.6% 50 37.9% 100 30.6% 200 the margin is what turns a wrong prediction into a free one margin, in rate-distortion cost units the intra blocks' mismatch is higher than the inter blocks'

Where it pays, and where it does not

The learned predictor against the constant one, per sequence research/benchmark/report-v9-joint.json · mechanism_bd_rate, constant_bd_rate
-1.2 -0.1 1.0 2.1 no gain +1.34 +1.72 akiyo -0.05 -0.29 bus -0.33 -0.48 city -0.45 +0.02 coastguard -0.09 -0.13 container -0.42 -0.06 crew -0.83 -0.86 deadline -0.25 -0.40 flower -0.52 -0.28 foreman -0.32 -0.37 highway -0.27 -0.22 mobile -0.65 -0.08 stefan the shipped learned model the constant predictor, always the plain DCT-II
Sequence BD-rate Content
deadline_cif −0.902 Motion, texture and noise
foreman_cif −0.639 Fine texture, strong edges
stefan_cif −0.565 Motion, texture and noise
coastguard_cif −0.478 Water texture, fine detail
container_cif −0.374 Sharp edges, flat panels
bus_cif −0.334 Moving subject, uniform background
flower_cif −0.330 Fine foliage texture
city_cif −0.284 Dense detail, little large-scale structure
mobile_cif −0.275 Moving subject, detailed background
crew_cif −0.214 Motion and texture
highway_cif +0.129 Fast panning, strong horizontal structure
akiyo_cif +1.403 Flat, high detail, little motion

Margin of 50, QP 22 to 37, luma plane, 8×8 blocks, ten frames per sequence. The mean over the twelve is −0.236% and the median −0.322%. The two sequences where the mechanism loses are the two with the least motion: a flat, high-detail picture gives the predictor nothing directional to work with.

Does the learned predictor earn its keep?

A claim about a trained predictor has to beat the alternative that needs no training and no model: always predict the plain DCT-II. The benchmark runs both over the same content, the same quantization parameters and the same margin, and reports them in the same file.

Predictor Mean BD-rate, luma Better on
Constant, always the plain DCT-II −0.120% 10 of 12
The shipped learned model −0.236% 11 of 12

The learned model is ahead on six of the twelve sequences, and the gap between the two is 0.116 percentage points of BD-rate, which is about half the mechanism's own effect. The model is one multinomial logistic regression over the joint mode, fitted on 570,240 real block records from the twelve sequences.

The predictability ceiling, and where the shipped model sits under it models/girc-predictor.json · training.predictability_ceiling
50.10% majority class: always the plain DCT-II 50.10 of every 100 blocks 50.17% the shipped model, over the joint mode 50.17 of every 100 blocks 50.65% the gradient-boosted ceiling, same features 50.65 of every 100 blocks the gap between the first and the last is what any predictor over these features can earn
Per-class accuracy: the default is learned, the other four modes are not models/girc-predictor.json · training.per_class_test_accuracy
91.7% DCT-II 15.2% DST-VII DST-VII 5.4% DCT-VIII DST-VII 5.7% DST-VII DCT-VIII 6.6% DCT-VIII DCT-VIII the model answers the default correctly almost always, and the four directional modes almost never 114,048 held-out blocks
The honest reading

The joint mode is barely predictable: the ceiling of 50.65% is barely above the 50.10% majority class. The transform choice is driven by the block's own residual, which the decoder has not seen, and the geometry of the neighbourhood constrains it only weakly. The rate-distortion choice between the modes is close to a tie, so there is little for a predictor to predict.

These figures are lower than an earlier revision reported, and the reason is worth stating rather than hiding. An inter block carries a motion vector instead of an intra mode, so the decoder cannot know the mode the encoder would have chosen for it. A feature built from that mode let the encoder predict from information the decoder does not have, and the model trained on it looked better than it could ever be. The shipped code leaves the feature empty for an inter block, and the benchmark decodes every stream it encodes and refuses a result if the decoded picture differs from the encoder's own reconstruction.

Even so, the saving is 0.236%, not a headline number. The explicit signalling is already cheap for a context-adaptive coder to code, and the mechanism removes an overhead that is close to the distortion it costs to remove it. The margin sweep is the honest account of where that balance sits.

The hypothesis holds, and the gain is smaller for inter

Inter prediction is implemented and measured. The inter blocks' mismatch rate is consistently lower than the intra blocks', so the hypothesis holds, but the gain over the majority baseline is smaller for the inter blocks than for the intra ones, because the inter blocks' transform distribution is more concentrated: there is less to gain when one mode already dominates.

Intra against inter: the hypothesis holds, and the gain is smaller for inter research/benchmark/inter-predictability.json
intra, horizontal axis 48.08% majority 40.58% · a gain of +7.50 points over 316,808 records intra, vertical axis 47.98% majority 40.58% · a gain of +7.40 points over 316,808 records inter, horizontal axis 62.39% majority 60.50% · a gain of +1.89 points over 272,440 records inter, vertical axis 62.55% majority 60.50% · a gain of +2.05 points over 272,440 records the inter blocks' transform distribution is more concentrated, so there is less to gain measured on the encoder's own records, not on a model of them
What the encoder actually chose: the plain DCT-II, and four modes that split the rest models/girc-predictor.json · class_distribution
50.1% DCT-II 14.2% DST-VII DST-VII 12.3% DCT-VIII DST-VII 12.4% DST-VII DCT-VIII 10.9% DCT-VIII DCT-VIII 570,240 blocks, the encoder's own rate-distortion choices the majority class is 50.10% the four other modes are 49.90%

Context, not a claim

GIRC is a research codec with a small mode set and integer-sample motion. It is not a VVC competitor, and this table is context rather than a claim. What the table does show is that the measurement apparatus is real: the same content, the same rate and distortion code, the same frames, and all three planes coded on both sides.

Against the anchors: the same content, the same code, and the scale of the gap research/benchmark/report-v9-joint.json · bd_rate_vs_baseline
-93 -68 -43 -17 8 akiyo bus city coastguard container crew deadline flower foreman highway mobile stefan girc-inferred girc-constant x265 svt-av1 vvenc negative is a smaller bitrate than the GIRC explicit mode
Rate-distortion, foreman_cif: the two GIRC modes and the three anchors research/benchmark/report-v9-joint.json · results
33.0 35.4 37.7 40.1 42.5 girc-explicit girc-inferred x265 svt-av1 vvenc the mechanism, at QP 32: 3968 bits apart PSNR, dB bits for ten frames the anchors are better codecs; the gap between the two GIRC lines is the mechanism
Codec QP 22 QP 27 QP 32 QP 37
girc-explicit 301264 b / 44.38 dB 247920 b / 41.57 dB 202224 b / 38.60 dB 177904 b / 35.73 dB
girc-inferred 313744 b / 44.24 dB 251984 b / 41.55 dB 204144 b / 38.58 dB 184016 b / 35.70 dB
x265 119224 b / 45.01 dB 78128 b / 42.66 dB 56176 b / 40.03 dB 42600 b / 37.05 dB
svt-av1 166672 b / 47.52 dB 130752 b / 46.42 dB 97144 b / 45.20 dB 77032 b / 44.16 dB
vvenc 219288 b / 48.90 dB 122224 b / 46.64 dB 67520 b / 44.29 dB 48136 b / 42.53 dB

akiyo_cif, ten frames, whole frame on both sides: the luma plane and the two 4:2:0 chroma planes, coded by every codec. The BD-rate of each against the GIRC-explicit baseline is −73.34% for x265, −73.72% for SVT-AV1 and −79.98% for VVenC: the anchors are better codecs, as expected, and the figure is the scale of the gap. The gap between the two GIRC lines is the mechanism.

Why there are two rate axes

No chroma transform type is signalled: H.266 clause 7.3.9 codes a transform type for the luma plane, and the chroma transform type is inferred, and in 4:2:0 it is always the plain DCT-II. The reference encoder agrees — chroma transform selection is gated on m_useChromaTS, which is off by default and only enabled for 4:4:4. So the mechanism is a luma mechanism, exactly where the standard signals a transform type at all.

The chroma quantization parameter is mapped, not equal, through H.266's chroma quantization parameter mapping, checked against the reference implementation for every quantization parameter. The chroma grid is four by four chroma samples, one chroma block per luma block, and the chroma motion is derived from the luma motion as H.266 does.

Why there are two rate axes: the mechanism is a luma mechanism crates/girc-core/src/chroma.rs, ITU-T H.266 clause 7.3.9
luma: 352 × 288, four samples per chroma sample the transform type is signalled here, and the mechanism removes all of it Cb: 176 × 144 always the plain DCT-II no transform type is signalled Cr: 176 × 144 always the plain DCT-II no transform type is signalled the mechanism changes the luma signalling and nothing else so the benchmark reports the luma rate, which is the mechanism's own effect, and the whole-frame rate, which is what a deployment saves

Where the number would move

A richer residual coder

The transform modes separate more when the residual coder is richer, so the rate-distortion choice between them stops being a tie and the predictor has something to find.

A larger transform set

The overhead the mechanism removes grows with the number of choices to signal and with how evenly they are distributed, so a codec with more transform types has more to save.

Signalling at a coarser grain

Signalling the transform once per region rather than once per block would make the prediction problem much easier and the overhead much larger.