forge
Explore
Log in

Don't you dare go Hollow

Record the three swept decision constants

Browse files at this commit

b939e05aa5a60bf5f61c12a318a6280ed21beeb5Ahmet Kaan GümüşParent: 1bfd070
  • docs
    • record the three swept decision constants
Show full message
docs(lane): record the three swept decision constants

Chroma cost, the intra penalty in P pictures and the P_Skip rebate, with
the per-QP rows showing the intra penalty was not a rate-quality trade,
and why the synthetic fixture now disagrees in sign.
lanes/h264x264-r1.report.mdmodified+54 -0
@@ -152,3 +152,57 @@ Synthetic default -5.202 -> -5.140 dB, floor retightened to -5.25. Full `ec-h264
152 The same RD treatment has not been applied to Intra_8x8 mode selection, `choose_chroma_mode`,152 The same RD treatment has not been applied to Intra_8x8 mode selection, `choose_chroma_mode`,
153 or `choose_inter` (still SATD + `motion_rate`). Those are the rest of the ~1.4 dB the153 or `choose_inter` (still SATD + `motion_rate`). Those are the rest of the ~1.4 dB the
154 `subme=1` ablation priced. P_8x8 sub-partitions remain unmeasured.154 `subme=1` ablation priced. P_8x8 sub-partitions remain unmeasured.
155+
156+## Round 3 -- the thumbs on the scale (main 81d18a3, 9268484, ff0baca)
157+
158+ Three constants in the macroblock decision were checked by sweeping them. Two were wrong,
159+ and one of them was worth more than everything in rounds 1 and 2 put together.
160+
161+ **Chroma mode (81d18a3).** Picked on SAD with no rate term while everything else costs on
162+ SATD. SATD plus the mode's ue(v) signalling, at no measurable time:
163+
164+ | clip | all-intra | GOP 10 |
165+ |---|---|---|
166+ | 3840x1608 film | -0.620 -> -0.535 dB | -1.495 -> -1.404 dB |
167+ | 2560x1440 screen capture | -0.231 -> -0.197 dB | -0.062 -> -0.033 dB |
168+
169+ **The intra penalty in P pictures (9268484).** The comparison added eight bits to the intra
170+ side, for "an intra macroblock also costs the next picture's prediction quality". Sweeping it:
171+
172+ | penalty (bits) | film GOP 10 |
173+ |---|---|
174+ | 32 | -3.065 dB |
175+ | 16 | -1.940 dB |
176+ | 8 (what it was) | -1.404 dB |
177+ | 4 | -0.704 dB |
178+ | 0 | **-0.233 dB** |
179+ | -1 / -2 / -4 / -8 | -0.140 / -0.113 / -0.106 / -0.115 dB |
180+
181+ Zero is the flat part of the curve, not a tuned value. Per-QP, it is not a rate-quality
182+ trade at all -- the unpenalised encoder is *smaller and better at every QP*:
183+
184+ | QP | penalty 8 | penalty 0 |
185+ |---|---|---|
186+ | 22 | 23313152 b, 55.48 dB | 23253064 b, 55.63 dB |
187+ | 26 | 16041512 b, 51.94 dB | 15986488 b, 52.93 dB |
188+ | 30 | 11411616 b, 48.26 dB | 11360328 b, 49.73 dB |
189+ | 34 | 8086824 b, 46.05 dB | 8035984 b, 47.28 dB |
190+
191+ The suppressed intra macroblocks were what stopped drift accumulating across the GOP.
192+
193+ **The P_Skip rebate (ff0baca).** Four bits, swept to 0/2/4/8: film reads
194+ -0.113 / -0.110 / -0.233 / -0.708 dB. Set to two, the top of the flat region, since skipping
195+ does save signalling.
196+
197+ Where the film clip stands after the three: **-0.110 dB at GOP 10** (from -2.992 dB when the
198+ lane opened) and the screen capture is **+0.068 dB**, i.e. ahead of x264.
199+
200+### The synthetic gate clip now disagrees in sign
201+
202+ Removing the intra penalty costs the 352x288 `render_smooth` fixture 0.41 dB (-5.291 ->
203+ -5.702), and the floor moved -5.40 -> -5.75. It spends 5% more bits for the same quality
204+ there: smooth ramps are exactly what inter prediction is best at, so any intra macroblock in
205+ a P picture is waste, and a SATD comparison cannot see that. Two contents disagreeing in
206+ sign is the signal that this decision belongs on real coded cost -- both branches already
207+ compute SSD-plus-real-bits internally (`intra_mb_bits`, `inter_mb_bits`), so the next slice
208+ is to compare them there instead of tuning the threshold back toward the fixture.