edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
| 1 | # lane-keyq -- key-frame quantizer offset (Pyramid::key_q_offset, 5th env field) |
| 2 | # gate: encode::tests::bd_rate_film_long_gop (48 pictures, gop 48), release lib binary, |
| 3 | # --test-threads 1, <= 2 arms in parallel. Rows keyed by the log's own header. |
| 4 | # spec = EC_AV1_PYRAMID=<mini_gop>:<arf>:<leaf>:<mid>:<key>; control = unset (default 8:-32:16:-8:0). |
| 5 | |
| 6 | ## long-GOP (48 pictures, gop 48) -- BD-rate vs libaom cpu-used 6 / vs rav1e speed 6 |
| 7 | | key offset | film A | film B | |
| 8 | |---|---|---| |
| 9 | | control (0, unset) | +52.0 / +11.7 | +144.5 / +44.3 | |
| 10 | | -32 | +45.3 / +6.7 | +132.8 / +36.8 | |
| 11 | | -48 | +43.5 / +4.6 | +131.3 / +35.0 | |
| 12 | | -64 | +44.9 / +3.8 | +140.7 / +37.5 | |
| 13 | | -16 | +48.8 / +9.4 | +138.0 / +40.2 | |
| 14 | | -48, arf -40 | +44.4 / +5.1 | +137.4 / +38.6 | |
| 15 | |
| 16 | WINNER key -48 at arf -32: both films improve on both columns against the control |
| 17 | (film A -8.5 / -7.1, film B -13.2 / -9.3). -64 overshoots on film B (+140.7) and a |
| 18 | deeper ARF (-40) with the same key gives the bytes back on both films, so the anchor |
| 19 | is what the ARFs wanted, not more ARF. |
| 20 | |
| 21 | ## 12-frame gate (encode::tests::bd_rate_screen_native) at the winner |
| 22 | | clip | control (key 0) | key -48 | |
| 23 | |---|---|---| |
| 24 | | bars 1080p | +1.7 / -14.3 | +2.0 / -14.0 | |
| 25 | | bars 2160p | +13.7 / -9.5 | +13.1 / -9.6 | |
| 26 | | film A | +43.3 / +15.0 | +38.5 / +8.2 | |
| 27 | | film B | +66.9 / +35.1 | +58.2 / +26.5 | |
| 28 | | screen capture | +33.4 / -23.8 | +33.4 / -23.8 (pyramid gated off, byte-identical) | |
| 29 | |
| 30 | Both film rows improve on both columns at 12 frames too, so key_q_offset is NOT |
| 31 | gated on GOP length (unlike mid_q_offset). |
| 32 | |
| 33 | ## rate loop |
| 34 | The key slot cannot steer the offset back (one key frame per run), so the finer key |
| 35 | ran bitrate_target_lands_within_10_percent_over_48_frames +10.8% over target. The |
| 36 | loop now prices the key's share through the calibration slope |
| 37 | (KEY_WEIGHT * exp(-key_q_offset / GAIN)) and takes it out of the other gop-1 |
| 38 | pictures: 768 kbps pyramid arm -0.3%, 1536 kbps -6.2%. |
| 39 | |
| 40 | ## per-level census after (film B, q150, EC_AV1_BITCENSUS=1 + examples/syntax_census) |
| 41 | stream 89,239 B (the gate's own first point, byte-identical), 88,079 B censused, |
| 42 | PSNR-Y mean 45.432 dB over 48 displayed pictures, display-0 47.67 dB. |
| 43 | |
| 44 | | level | before (3-level, key at base q) | after (key -48) | |
| 45 | |---|---|---| |
| 46 | | key | 1 @ 150: 8,399 B (10.2%) | 1 @ 102: 19,321 B (21.9%) | |
| 47 | | arf top+mid | 12: 64,980 B | 12: 58,457 B (66.4%) | |
| 48 | | leaf | 35: 9,117 B | 35: 10,301 B (11.7%) | |
| 49 | | stream / mean PSNR-Y | 82,496 B / 45.096 dB | 89,239 B / 45.432 dB | |
| 50 | |
| 51 | Key share 10.2% -> 21.9%, inside the references' 22-37% band (rav1e 31.6%, libaom |
| 52 | 36.9% on film A); display-0 PSNR 45.0 -> 47.67 dB against rav1e's 47.1 at its own |
| 53 | matched point. |