forge
Explore
Log in

Don't you dare go Hollow

S9: drop EncoderConfig::rdoq_estimate; default on, so RDOQ always prices trials with the fracbits table

Browse files at this commit

6c44dc76cb8b93a8f29d3ca71abd7f9d43b5fdfcAhmet Kaan GümüşParent: c4a3d04
crates/ec-h265/src/ctu.rsmodified+1 -2
@@ -234,7 +234,6 @@ impl<'a> CtuEncoder<'a> {
234234 intra_nxn: bool,
235235 sign_hiding: bool,
236236 rdoq: bool,
237- rdoq_estimate: bool,
238237 transform_skip: TransformSkip,
239238 rqt: bool,
240239 min_cb_log2: u32,
@@ -272,7 +271,7 @@ impl<'a> CtuEncoder<'a> {
272271 rqt,
273272 rdoq_enc: {
274273 let mut enc = CabacEncoder::counter(Contexts::new(qp.clamp(0, 51)));
275- enc.set_estimating(rdoq_estimate);
274+ enc.set_estimating(true);
276275 enc
277276 },
278277 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 {
187187 /// coder's own price for the whole block, so dropping a level is priced
188188 /// with the significance map and last position that follow from it.
189189 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,
200190 /// Whether 4x4 TUs may skip the integer transform.
201191 ///
202192 /// `Rd` by default: the tool is the screen-content lever, and it wants a
@@ -315,7 +305,6 @@ impl EncoderConfig {
315305 intra_nxn: true,
316306 sign_hiding: false,
317307 rdoq: true,
318- rdoq_estimate: true,
319308 transform_skip: TransformSkip::Rd,
320309 rqt: true,
321310 video_signal_type: None,
@@ -867,7 +856,6 @@ impl Encoder {
867856 self.cfg.intra_nxn,
868857 self.cfg.sign_hiding,
869858 self.cfg.rdoq,
870- self.cfg.rdoq_estimate,
871859 self.cfg.transform_skip,
872860 self.cfg.rqt,
873861 self.cfg.min_cu_size.max(8).trailing_zeros(),