edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | # lane-arfq -- pyramid ladder shape after the key/ARF anchors moved (key -48). |
| 2 | # gate: encode::tests::bd_rate_film_long_gop (48 pictures, gop 48), release lib binary, |
| 3 | # --test-threads 1, <= 2 arms in parallel, each arm keyed by the log's own |
| 4 | # "pyramid requested/effective" print. spec = <mini_gop>:<arf>:<leaf>:<mid>:<key>. |
| 5 | # logs: lanes/arfq/*.log |
| 6 | |
| 7 | ## long-GOP (48 pictures, gop 48) -- BD-rate vs libaom cpu-used 6 / vs rav1e speed 6 |
| 8 | | arm | spec | film A | film B | |
| 9 | |---|---|---|---| |
| 10 | | control | 8:-32:16:-8:-48 (default) | +43.5 / +4.6 | +131.3 / +35.0 | |
| 11 | | leaf 8 | 8:-32:8:-8:-48 | +43.4 / +5.1 | +127.6 / +34.1 | |
| 12 | | leaf 12 | 8:-32:12:-8:-48 | +43.1 / +4.6 | +129.0 / +34.3 | |
| 13 | | leaf 24 | 8:-32:24:-8:-48 | +45.6 / +5.6 | +138.8 / +38.4 | |
| 14 | | mid -12 (leaf 12) | 8:-32:12:-12:-48 | +43.4 / +5.0 | +128.1 / +33.8 | |
| 15 | | mid -16 (leaf 12) | 8:-32:12:-16:-48 | +44.0 / +5.6 | +127.7 / +34.1 | |
| 16 | | arf -24 (leaf 12) | 8:-24:12:-8:-48 | +44.5 / +5.2 | +128.6 / +33.3 | |
| 17 | | mini_gop 16 (leaf 12) | 16:-32:12:-8:-48 | +47.2 / +6.3 | +134.7 / +35.6 | |
| 18 | |
| 19 | WINNER leaf 12 (8:-32:12:-8:-48): film A +43.5/+4.6 -> +43.1/+4.6 (libaom -0.4, rav1e |
| 20 | flat), film B +131.3/+35.0 -> +129.0/+34.3 (libaom -2.3, rav1e -0.7). Keep rule met by |
| 21 | "one film >= 0.5 down on both columns, the other flat". |
| 22 | |
| 23 | Rejected, all four mixed or worse: |
| 24 | * leaf 8 buys film B (-3.7/-0.9) but costs film A rav1e (+0.5) -- past the optimum. |
| 25 | * leaf 24 is worse on all four numbers: the leaves are already too coarse. |
| 26 | * a deeper mid (-12, -16) trades film A away for film B on every row and the trend is |
| 27 | monotone in film A, so mid -20 was not run; the mid stays -8. |
| 28 | * arf -24 (a shallower top ARF under the finer leaves) is the same trade: film B -0.4, |
| 29 | film A +1.4 -- with key -48 in place the top ARF still wants its -32. |
| 30 | * mini_gop 16 is worse on all four: one mid frame cannot carry 15 leaves (the pyramid |
| 31 | has exactly three levels), so the longer group does not amortise the top ARF. |
| 32 | |
| 33 | ## 12-frame gate (encode::tests::bd_rate_screen_native) at the winner |
| 34 | | clip | control (leaf 16) | leaf 12 | |
| 35 | |---|---|---| |
| 36 | | bars 1080p | +2.0 / -14.0 | +1.7 / -14.5 | |
| 37 | | bars 2160p | +13.1 / -9.6 | +12.2 / -10.2 | |
| 38 | | film A | +38.5 / +8.2 | +37.5 / +7.6 | |
| 39 | | film B | +58.2 / +26.5 | +54.1 / +23.9 | |
| 40 | | screen capture | +33.4 / -23.8 | +33.4 / -23.8 (pyramid gated off, byte-identical) | |
| 41 | |
| 42 | Every row improves, so leaf_q_offset is NOT gated on GOP length (unlike mid_q_offset). |
| 43 | Both control arms reproduce the charter's numbers exactly on this head. |
| 44 | |
| 45 | ## rate loop (encoder::tests::bitrate_target_lands_within_10_percent_over_48_frames) |
| 46 | 768 kbps pyramid -0.4% (flat -1.8%), 1536 kbps pyramid -6.3% (flat -3.0%): the same |
| 47 | numbers lane-keyq left (-0.3% / -6.2%), so the finer leaves need no change to the |
| 48 | loop's model -- the leaf share is what the loop already steers on. |
| 49 | |
| 50 | ## per-level census, film B q150, 48 frames (examples/enc_probe + syntax_census) |
| 51 | Both arms through the SAME probe on the gate's own pixels (the crop's raw yuv420p |
| 52 | md5 matches the gate's ffmpeg recipe byte for byte). |
| 53 | |
| 54 | | level | leaf 16 (control) | leaf 12 | |
| 55 | |---|---|---| |
| 56 | | key | 1 @ 15,160 B (26.0%) | 1 @ 15,160 B (25.6%) -- byte-identical | |
| 57 | | arf (top+mid) | 12 @ 35,513 B (61.0%) | 12 @ 35,513 B (59.9%) -- byte-identical | |
| 58 | | leaf | 35 @ 7,543 B (13.0%) | 35 @ 8,647 B (14.6%) | |
| 59 | | censused / stream | 58,216 / 59,358 B | 59,320 / 60,466 B | |
| 60 | | PSNR-Y mean / display-0 | 46.491 / 48.42 dB | 46.525 / 48.42 dB | |
| 61 | |
| 62 | 1,104 bytes (+1.9% of the stream) move into the leaves and nothing else changes; the |
| 63 | anchors are untouched, which is why the win is uniform across both gates. |
| 64 | |
| 65 | OPEN, carried out of this lane: the enc_probe/syntax_census route codes 59-60 kB for |
| 66 | the very pixels the long-GOP gate codes as 89-91 kB at q=150 (the raw crop md5 is |
| 67 | identical and the pyramid census is 1 key / 12 arf / 35 leaf either way), so the |
| 68 | "byte-identical to the gate's own first point" note in lanes/keyq.sweep.txt does NOT |
| 69 | reproduce here. The census above is therefore probe-relative -- valid as a before/after |
| 70 | through one tool, not as the gate's own byte breakdown. Unblocker: find what the test |
| 71 | binary's encode path arms that the example's does not (class `stale output faked a |
| 72 | measurement` / `gate-recipe confound`). |