Record the Intra_4x4 rate-distortion refinement round
Browse files at this commit947e714504774330a3846fb29f93eff2f64dfc8bParent: 8cda34e- docs
- record the Intra_4x4 rate-distortion refinement round
1 changed file +41 -0
- lanes/h264x264-r1.report.md +41 -0
lanes/h264x264-r1.report.mdmodified+41 -0
| @@ -111,3 +111,44 @@ Synthetic default -5.202 -> -5.140 dB, floor retightened to -5.25. Full `ec-h264 | ||
| 111 | 111 | reconstruction SSD. That is the next build slice, and it is worth about 1.4 dB. P_8x8 |
| 112 | 112 | sub-partitions and the search itself stay unmeasured but are bounded above by what is left |
| 113 | 113 | after that. |
| 114 | + | |
| 115 | +## Round 2 -- the first mode-decision slice (main 931f413) | |
| 116 | + | |
| 117 | + Acting on that attribution: SATD still ranks the nine Intra_4x4 modes, but the top | |
| 118 | + `I4_RD_CANDIDATES = 3` are now re-costed by actually quantising, dequantising and | |
| 119 | + reconstructing the block, and charging reconstruction SSD plus coded bits. A mode that | |
| 120 | + predicts a little worse can quantise to far fewer levels, and SATD cannot see that. | |
| 121 | + | |
| 122 | + | clip | all-intra | GOP 10 | | |
| 123 | + |---|---|---| | |
| 124 | + | 3840x1608 film | -0.749 -> **-0.620** | -1.557 -> **-1.495** | | |
| 125 | + | 2560x1440 screen capture | -0.225 -> **-0.137** | +0.173 -> **+0.216** | | |
| 126 | + | 352x288 synthetic ramp (the gate's) | - | -5.140 -> -5.297 | | |
| 127 | + | |
| 128 | + Cost 3-4% encode time. Survivor count saturates at three: all nine landed within 0.002 dB of | |
| 129 | + three for 7% more time. | |
| 130 | + | |
| 131 | + **The rate term had to be calibrated before the search worked at all.** With `block_bits` | |
| 132 | + charged in full the search got monotonically *worse* the more candidates it saw | |
| 133 | + (K=1 -0.749, K=9 -0.830 all-intra) -- which reads as "RD does not help here" and is wrong. | |
| 134 | + `block_bits` counts CAVLC-ish widths that over-state what the coder in force spends, and the | |
| 135 | + repo already corrects for that elsewhere with `ZERO_BLOCK_LAMBDA = 0.4`. Scaling the rate | |
| 136 | + term by the same constant turns every real-content measurement from a loss into a gain: | |
| 137 | + | |
| 138 | + | rate-term scale | all-intra, film | | |
| 139 | + |---|---| | |
| 140 | + | 1.0, K=3 | -0.814 dB | | |
| 141 | + | 0.5, K=3 | -0.644 dB | | |
| 142 | + | **0.4, K=3** | **-0.620 dB** | | |
| 143 | + | 0.4, K=9 | -0.618 dB | | |
| 144 | + | |
| 145 | + The synthetic clip pays 0.157 dB for the change and `BD_PSNR_VS_X264_FLOOR` moved -5.25 -> | |
| 146 | + -5.40. Accepted deliberately: its smooth ramps quantise unlike anything in a real frame, all | |
| 147 | + four real-content measurements gain, and the floor's doc comment says so rather than | |
| 148 | + claiming -5.3 dB is fine. | |
| 149 | + | |
| 150 | +### Still open after round 2 | |
| 151 | + | |
| 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 the | |
| 154 | + `subme=1` ablation priced. P_8x8 sub-partitions remain unmeasured. |