Drop the stray duplicated bd_rate doc block and the dead-code warning
Browse files at this commitbd0a79977117047305c53dbf4b3b1afdf49a302aParent: eeee023- chore
- drop the stray duplicated bd_rate doc block and the dead-code warning
2 changed files +1 -75
- crates/ec-av1/src/encode.rs +0 -75
- crates/ec-av1/src/tile.rs +1 -0
crates/ec-av1/src/encode.rsmodified+0 -75
| @@ -8985,81 +8985,6 @@ mod tests { | |||
| 8985 | } | 8985 | } |
| 8986 | } | 8986 | } |
| 8987 | 8987 | ||
| 8988 | - /// The missing instrument: what this encoder costs against libaom and | ||
| 8989 | - /// rav1e at matched fidelity, and how long it takes to get there. | ||
| 8990 | - /// | ||
| 8991 | - /// Recipe, identical on all three sides: 12 consecutive frames of each | ||
| 8992 | - /// clip scaled to 640x384 (a whole number of superblocks), one key frame | ||
| 8993 | - /// then 11 inter frames (`-g 12`, matching our own sequence shape), one | ||
| 8994 | - /// tile, `-threads 1`, no film grain synthesis (neither reference enables | ||
| 8995 | - /// it by default), 4:2:0 8-bit in and out. Reference points: | ||
| 8996 | - /// libaom-av1: `-cpu-used 6 -b:v 0 -crf {5,20,35,45}` | ||
| 8997 | - /// librav1e: `-rav1e-params speed=6:quantizer={50,100,150,200}: | ||
| 8998 | - /// tile_cols=1:tile_rows=1:threads=1` | ||
| 8999 | - /// ours: `base_q_idx {60,90,120,150}`. Every PSNR is all-plane, on | ||
| 9000 | - /// ffmpeg-decoded frames of each encoder's own stream. | ||
| 9001 | - /// | ||
| 9002 | - /// Measured 2026-09-06 after the in-loop filters (lane-av1filt: per-frame | ||
| 9003 | - /// deblocking levels and CDEF strengths, both chosen by re-decoding the | ||
| 9004 | - /// coded tile -- `crate::filter_search`), 12 frames, this box (wall = the | ||
| 9005 | - /// four encodes of that ladder together): | ||
| 9006 | - /// | ||
| 9007 | - /// | clip | ours (q 150/120/90/60) | BD-rate vs libaom | vs rav1e | wall ours:aom:rav1e | | ||
| 9008 | - /// |---|---|---|---|---| | ||
| 9009 | - /// | 1080p fixture | 42.11 dB/17774 B .. 50.99 dB/76838 B | +143.6% | +94.0% | 9.2s:1.1s:2.6s | | ||
| 9010 | - /// | 2160p fixture | 42.84 dB/12480 B .. 51.43 dB/46557 B | +179.5% | +128.8% | 8.6s:1.0s:2.2s | | ||
| 9011 | - /// | screen capture | 39.76 dB/9536 B .. 48.87 dB/29189 B | +88.0% | +21.5% | 7.2s:1.0s:2.1s | | ||
| 9012 | - /// | ||
| 9013 | - /// Re-measured 2026-09-06 after lane-av1fwd, which changed only how long | ||
| 9014 | - /// the encoder takes -- every stream it writes is byte-identical, so the | ||
| 9015 | - /// BD columns are this box's own re-run of the same recipe rather than a | ||
| 9016 | - /// quality move (+141.3/+174.2/+88.9 vs libaom, +91.9/+124.5/+21.6 vs | ||
| 9017 | - /// rav1e). What moved is the wall of the four encodes: | ||
| 9018 | - /// | ||
| 9019 | - /// | clip | wall ours before | after | instructions:u before -> after | | ||
| 9020 | - /// |---|---|---|---| | ||
| 9021 | - /// | 1080p fixture | 9.2s | 7.2s | 191.5G -> 139.8G (-27.0%) | | ||
| 9022 | - /// | 2160p fixture | 8.6s | 6.9s | 183.5G -> 136.4G (-25.6%) | | ||
| 9023 | - /// | screen capture | 7.2s | 6.7s | 157.2G -> 122.5G (-22.1%) | | ||
| 9024 | - /// | ||
| 9025 | - /// Three exact steps, none of which touches a coded bit: the coefficient | ||
| 9026 | - /// rate pricer stopped rebuilding every CDF table per candidate | ||
| 9027 | - /// (`tile::coeff_bits`), the filter search stopped re-decoding its own | ||
| 9028 | - /// tile once per candidate (`decode::FilterReplay`), and the forward | ||
| 9029 | - /// transform stopped transforming the all-zero residual that 70% of its | ||
| 9030 | - /// calls carry. | ||
| 9031 | - /// | ||
| 9032 | - /// The three steps of that lane, same recipe (vs libaom, then vs rav1e): | ||
| 9033 | - /// | ||
| 9034 | - /// | step | 1080p | 2160p | screen | | ||
| 9035 | - /// |---|---|---|---| | ||
| 9036 | - /// | no in-loop filter | +234.0 / +171.9 | +260.3 / +203.2 | +318.5 / +155.3 | | ||
| 9037 | - /// | + deblocking | +198.2 / +143.1 | +218.1 / +162.4 | +136.9 / +52.7 | | ||
| 9038 | - /// | + CDEF | +143.6 / +94.0 | +179.5 / +128.8 | +88.0 / +21.5 | | ||
| 9039 | - /// | ||
| 9040 | - /// Loop restoration is NOT in yet: it is the one filter whose parameters | ||
| 9041 | - /// are per restoration UNIT inside the tile payload, so it needs both | ||
| 9042 | - /// tile writers to code `lr` syntax and an encoder-visible post-CDEF | ||
| 9043 | - /// buffer to solve against -- neither of which this frame-header-level | ||
| 9044 | - /// search reaches. | ||
| 9045 | - /// | ||
| 9046 | - /// The baseline it replaced, before an inter frame's blocks chose their | ||
| 9047 | - /// own partition, was +501.4/+504.4/+440.9 against libaom and | ||
| 9048 | - /// +364.4/+401.0/+206.0 against rav1e at 5.1/4.6/5.9 s. | ||
| 9049 | - /// | ||
| 9050 | - /// So: roughly 2.5-3x libaom's rate and 1.5-2x rav1e's at matched | ||
| 9051 | - /// fidelity, while spending far more time than either (the partition | ||
| 9052 | - /// search's own cost, uncut: see the two intra-pruning variants measured | ||
| 9053 | - /// and rejected in the lane report). No | ||
| 9054 | - /// threshold is asserted yet -- this run sets the baseline; the gate | ||
| 9055 | - /// asserts only four monotone points per ladder and that ffmpeg decodes | ||
| 9056 | - /// our stream sample-exact against our reconstruction. | ||
| 9057 | - /// | ||
| 9058 | - /// Run: | ||
| 9059 | - /// cargo test -p ec-av1 --release --lib -- --ignored \ | ||
| 9060 | - /// bd_rate_vs_libaom_and_rav1e --nocapture | ||
| 9061 | - #[test] | ||
| 9062 | - #[ignore = "the encoder BD-rate baseline: minutes per clip, needs ffmpeg"] | ||
| 9063 | /// The sweep behind [`screen_content`]'s two constants | 8988 | /// The sweep behind [`screen_content`]'s two constants |
| 9064 | /// (`unswept-decision-constants`): the share of 16x16 luma blocks with at | 8989 | /// (`unswept-decision-constants`): the share of 16x16 luma blocks with at |
| 9065 | /// most N distinct colours, per gate clip, at the size the gate codes. | 8990 | /// most N distinct colours, per gate clip, at the size the gate codes. |
crates/ec-av1/src/tile.rsmodified+1 -0
| @@ -2692,6 +2692,7 @@ fn note_palette(n: usize) { | |||
| 2692 | 2692 | ||
| 2693 | /// Reads [`PALETTE_HITS`] and zeroes it, so a gate can attribute the counts to | 2693 | /// Reads [`PALETTE_HITS`] and zeroes it, so a gate can attribute the counts to |
| 2694 | /// its own encode. | 2694 | /// its own encode. |
| 2695 | +#[cfg(test)] | ||
| 2695 | pub(crate) fn take_palette_hits() -> [usize; 9] { | 2696 | pub(crate) fn take_palette_hits() -> [usize; 9] { |
| 2696 | std::array::from_fn(|i| PALETTE_HITS[i].swap(0, std::sync::atomic::Ordering::Relaxed)) | 2697 | std::array::from_fn(|i| PALETTE_HITS[i].swap(0, std::sync::atomic::Ordering::Relaxed)) |
| 2697 | } | 2698 | } |