====== ohm_gl_fix — Phase 1 goal formulation, 2026-04-30 ====== Phase 1 of iteration 1. Index: [[ohm_gl_fix:start]]. Origin: [[fourier:phase5_2026-04-30|fourier Phase 5 review handover, 2026-04-30]] — that page identified Mali EGLImage import cost as the binding constraint on the browser-side GL consumer; ohm_gl_fix is the campaign that addresses it directly rather than via browser-side carrier patches. ===== Phase 1 — Goal ===== On ''bbb_1080p30_h264.mp4'' (SHA-16 ''dcf8a7170fbd49bb''), with ''mpv --hwdec=v4l2request --vo=gpu-next'', over a 60 s steady-state window, reduce frame drops from the baseline **1039 / 1440 (72 %)** to within the transient-startup floor measured on the working ''gst v4l2slh264dec → waylandsink'' control path on the same clip and window. Equivalent framing: **EGLImage-import cost ceases to be the binding constraint on per-frame budget on Mali-G52 / RK3566.** ==== Why this framing ==== * **"Within the transient-startup floor" instead of literal zero.** mpv's gpu-next path drops a handful of frames at preroll while format negotiation, decoder priming, and first GLES texture allocation settle. The ''gst → waylandsink'' control path drops 0 / 1440 today, so the realistic floor is 0–N where N is the post-fix steady-state count after preroll. Locking the goal to the control-path floor keeps it falsifiable without being unreachably literal. * **"Binding constraint" instead of a CPU% number.** A CPU% target presumes a particular ratio of import cost to composite cost. If a partial fix unmasks libplacebo composite or NV12→RGB shader fillrate as the new bottleneck, the goal as written still answers ("did import stop binding the budget?") rather than re-litigating the metric. * Phase 3 will validate or invalidate this hypothesis. Loop edge 3→1 stays open per ''feedback_dev_process.md''. ===== Constraints (Phase 3 / 4 review criteria, not the goal itself) ===== * No dropped safety checks. Question redundant per-frame validations where buffer identity is already established at both ends; do not eliminate end-of-pipe sanity checks. * Prefer pointer / fd passing over buffer copies wherever a copy is found. EGLImage caching keyed by dmabuf fd identity is the structural fix this implies; per-frame fresh-import is the structural waste. * Patches and changes must be aligned to upstream in syntax and semantics. No upstream submissions (PRs/MRs/bug reports) without explicit task; flagging upstream-worthy work to Markus is welcomed with a why. * Scope per ''~/src/ohm_gl_fix/README.md'': panfrost EGLImage-from-dmabuf for NV12 with Rockchip-relevant DRM modifiers + EGLImage caching across V4L2 buffer-pool reuse. Out: V4L2 decoder work (fourier), browser carriers (fourier), compositor overlay-plane promotion, Vulkan video. ===== Test discipline ===== * **Primary clip + config (locked):** ''bbb_1080p30_h264.mp4'' (SHA-16 ''dcf8a7170fbd49bb''), ''mpv --hwdec=v4l2request --vo=gpu-next'', 60 s window. * **Control path (locked):** ''gst-launch-1.0'' v4l2slh264dec → waylandsink, paced ''sync=true'', 60 s window — used to define the transient-startup floor. * **Generalisation clip (Phase 6 if primary is met):** named in Phase 4. 1080p60 H.264 is the candidate; locking choice once Phase 2 + 3 expose any clip-class sensitivity in the import path. ===== Source artefacts ===== * Campaign README: ''~/src/ohm_gl_fix/README.md'' * Origin freeze: [[fourier:phase5_2026-04-30|fourier Phase 5 review handover]] * Process spec: ''feedback_dev_process.md'' — the 8-phase loop * Sibling project: [[fourier:start]] ---- //Phase 1 entry locked 2026-04-30 after a goal-vs-constraint separation review with Markus. Phase 2 (situation analysis) is the next entry.//