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 | intra_nxn: bool, | 234 | intra_nxn: bool, |
| 235 | sign_hiding: bool, | 235 | sign_hiding: bool, |
| 236 | rdoq: bool, | 236 | rdoq: bool, |
| 237 | - rdoq_estimate: bool, | ||
| 238 | transform_skip: TransformSkip, | 237 | transform_skip: TransformSkip, |
| 239 | rqt: bool, | 238 | rqt: bool, |
| 240 | min_cb_log2: u32, | 239 | min_cb_log2: u32, |
| @@ -272,7 +271,7 @@ impl<'a> CtuEncoder<'a> { | |||
| 272 | rqt, | 271 | rqt, |
| 273 | rdoq_enc: { | 272 | rdoq_enc: { |
| 274 | let mut enc = CabacEncoder::counter(Contexts::new(qp.clamp(0, 51))); | 273 | let mut enc = CabacEncoder::counter(Contexts::new(qp.clamp(0, 51))); |
| 275 | - enc.set_estimating(rdoq_estimate); | 274 | + enc.set_estimating(true); |
| 276 | enc | 275 | enc |
| 277 | }, | 276 | }, |
| 278 | min_cb_log2: min_cb_log2.clamp(MIN_CB_LOG2, 5), | 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 | /// coder's own price for the whole block, so dropping a level is priced | 187 | /// coder's own price for the whole block, so dropping a level is priced |
| 188 | /// with the significance map and last position that follow from it. | 188 | /// with the significance map and last position that follow from it. |
| 189 | pub rdoq: bool, | 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 | /// Whether 4x4 TUs may skip the integer transform. | 190 | /// Whether 4x4 TUs may skip the integer transform. |
| 201 | /// | 191 | /// |
| 202 | /// `Rd` by default: the tool is the screen-content lever, and it wants a | 192 | /// `Rd` by default: the tool is the screen-content lever, and it wants a |
| @@ -315,7 +305,6 @@ impl EncoderConfig { | |||
| 315 | intra_nxn: true, | 305 | intra_nxn: true, |
| 316 | sign_hiding: false, | 306 | sign_hiding: false, |
| 317 | rdoq: true, | 307 | rdoq: true, |
| 318 | - rdoq_estimate: true, | ||
| 319 | transform_skip: TransformSkip::Rd, | 308 | transform_skip: TransformSkip::Rd, |
| 320 | rqt: true, | 309 | rqt: true, |
| 321 | video_signal_type: None, | 310 | video_signal_type: None, |
| @@ -867,7 +856,6 @@ impl Encoder { | |||
| 867 | self.cfg.intra_nxn, | 856 | self.cfg.intra_nxn, |
| 868 | self.cfg.sign_hiding, | 857 | self.cfg.sign_hiding, |
| 869 | self.cfg.rdoq, | 858 | self.cfg.rdoq, |
| 870 | - self.cfg.rdoq_estimate, | ||
| 871 | self.cfg.transform_skip, | 859 | self.cfg.transform_skip, |
| 872 | self.cfg.rqt, | 860 | self.cfg.rqt, |
| 873 | self.cfg.min_cu_size.max(8).trailing_zeros(), | 861 | self.cfg.min_cu_size.max(8).trailing_zeros(), |