Commit Graph
5 Commits
Author SHA1 Message Date
shinyobjectz 3a08d33f37 openh264 keeps every block of a slowly changing dark ground at --quality master (#169)
Its background detection took a dim glow drifting over black for still and copied old blocks forward: 6-8% of dark
blocks stepped in every sampled frame, at any bitrate or quantiser. Off, 0.1%, as a lossless encode of the same frames.
a_dark_glow_drifting_keeps_every_block_at_master asks under 3% (5.3% before, 1.6% now).
2026-11-19 14:30:17 -08:00
shinyobjectz a00a49319e The copies part of #28 added are folded (dupes 297 -> 295): urls.rs takes the writer of a file's URL as a parameter instead of a test-only twin of raea_io_home::src, and the fixed-quantiser tests join io/soft/tests/quality.rs, sharing its frames of rings and its MP4 encode. tools/dupes.max goes down to exact=295 2026-11-07 18:00:09 -08:00
shinyobjectz 0c419d8164 openh264 takes the fixed quantiser it's asked for (part of #28). With rate control off it ignored the QP range and wrote QP 26: the optimized copy's QP 16 and a GOP's QP gave the same bytes as any other. fixed_qp now uses its Quality mode with the range pinned. That mode needs a bitrate other than 0 (it moves nothing once the QP is pinned), and it refuses a QP under 14, so a lower one is raised to 14. A frame too detailed for openh264's buffer at QP 16 (some 1.6 MB a 1080p frame, noise rather than footage) fails with Native:3, so the copy is made again at QP 26, as every copy was before. io/soft/tests/qp.rs: QP 16 writes over twice QP 40's bytes for the copy and a GOP, a GOP is the same bytes each time, and QP 4 is QP 14; before, 12 and 40 were identical 2026-11-07 18:00:09 -08:00
shinyobjectz 298d32431b #28 (3): --quality reaches openh264 (Windows' and Linux's encoder). It ignored EncodeOpts.quality, so draft and master wrote byte-identical files. openh264 has no constant-quality mode the crate reaches (a fixed QP with rate control off is dropped, since the crate never sets the layer's QP; Quality mode and a pinned QP range under Bitrate mode fail with Native:3), so the quality now scales the bitrate: io/soft quality_kbps, 2x per 0.1 from high (0.85, the given bitrate unchanged), so master is twice it and draft under a fifth. No --quality keeps the bitrate as before. io/soft/tests/quality.rs encodes three seconds of 640x360 at draft, high and master and needs each a quarter larger than the last (before: one file, three times). Encode speed is openh264's at a different bitrate, nothing added per frame (part of #28) 2026-11-07 17:10:13 -08:00
shinyobjectz 08a4b7df02 openh264's MP4s say they are BT.709: both encoders (io/soft h264_encoder and GopEncoder) write the colour description in the stream's VUI (BT.709 primaries, transfer and matrix, limited range), as frames are converted and as the Mac's encoder tags them. Untagged, ffmpeg and other players read Windows and Linux renders as BT.601 and shifted reds and greens. io/soft's colour test reads the SPS each encoder writes. (closes #25) 2026-11-07 15:24:00 -08:00