S9: drop EncoderConfig::rdoq_estimate; default on, so RDOQ always prices trials with the fracbits table
Browse files at this commit6c44dc76cb8b93a8f29d3ca71abd7f9d43b5fdfcParent: c4a3d042 changed files +1 -14
crates/ec-h265/src/ctu.rsmodified+1 -2
| @@ -234,7 +234,6 @@ impl<'a> CtuEncoder<'a> { | ||
| 234 | 234 | intra_nxn: bool, |
| 235 | 235 | sign_hiding: bool, |
| 236 | 236 | rdoq: bool, |
| 237 | - rdoq_estimate: bool, | |
| 238 | 237 | transform_skip: TransformSkip, |
| 239 | 238 | rqt: bool, |
| 240 | 239 | min_cb_log2: u32, |
| @@ -272,7 +271,7 @@ impl<'a> CtuEncoder<'a> { | ||
| 272 | 271 | rqt, |
| 273 | 272 | rdoq_enc: { |
| 274 | 273 | let mut enc = CabacEncoder::counter(Contexts::new(qp.clamp(0, 51))); |
| 275 | - enc.set_estimating(rdoq_estimate); | |
| 274 | + enc.set_estimating(true); | |
| 276 | 275 | enc |
| 277 | 276 | }, |
| 278 | 277 | min_cb_log2: min_cb_log2.clamp(MIN_CB_LOG2, 5), |
crates/ec-h265/src/encoder.rsmodified+0 -12
| @@ -187,16 +187,6 @@ pub struct EncoderConfig { | ||
| 187 | 187 | /// coder's own price for the whole block, so dropping a level is priced |
| 188 | 188 | /// with the significance map and last position that follow from it. |
| 189 | 189 | pub rdoq: bool, |
| 190 | - /// Whether RDOQ's per-candidate bit cost comes from an estimated | |
| 191 | - /// per-context fractional-bit table (x265/HM `entropyBits`-style: the | |
| 192 | - /// entropy of the bin under its context's current probability state) | |
| 193 | - /// instead of replaying the exact adaptive-CABAC coder for every trial. | |
| 194 | - /// Changes output bytes (the estimate is not exact). On by default: | |
| 195 | - /// measured 1.6x faster on `ec-bench`'s h265 encode row and, on the | |
| 196 | - /// synthetic `bd_psnr_vs_x265` clip, a small BD-PSNR-YUV *gain* over the | |
| 197 | - /// exact-replay path (+7.948 vs +7.880 dB against x265) rather than a | |
| 198 | - /// loss. `false` restores exact per-trial CABAC replay for A/B. | |
| 199 | - pub rdoq_estimate: bool, | |
| 200 | 190 | /// Whether 4x4 TUs may skip the integer transform. |
| 201 | 191 | /// |
| 202 | 192 | /// `Rd` by default: the tool is the screen-content lever, and it wants a |
| @@ -315,7 +305,6 @@ impl EncoderConfig { | ||
| 315 | 305 | intra_nxn: true, |
| 316 | 306 | sign_hiding: false, |
| 317 | 307 | rdoq: true, |
| 318 | - rdoq_estimate: true, | |
| 319 | 308 | transform_skip: TransformSkip::Rd, |
| 320 | 309 | rqt: true, |
| 321 | 310 | video_signal_type: None, |
| @@ -867,7 +856,6 @@ impl Encoder { | ||
| 867 | 856 | self.cfg.intra_nxn, |
| 868 | 857 | self.cfg.sign_hiding, |
| 869 | 858 | self.cfg.rdoq, |
| 870 | - self.cfg.rdoq_estimate, | |
| 871 | 859 | self.cfg.transform_skip, |
| 872 | 860 | self.cfg.rqt, |
| 873 | 861 | self.cfg.min_cu_size.max(8).trailing_zeros(), |