Skip to content

perf: libobs: expose mapped staging memory as the video-io cache frame #3202

Open

Description

@zackees

What

libobs/obs-video.c.h:600-657 memcpys the mapped readback into the cache frame for every CPU-encoder output (about 1 ms per frame at 4K NV12).

Proposed change

Let video_output_lock_frame hand out the staging pointers and delay the unmap until the frame is released. Effort L; do it together with the async-upload sub-issue.

Acceptance criteria

  • Before/after numbers (a bench running the real copy plan at 1080p and 4K) in the PR; nothing lands unmeasured.
  • RED then GREEN; Tier 3 parity stays bit-exact unless this issue says otherwise.

Found by a read-only code scout and not yet measured. Parent: #3176.

Activity

  1. added
    enhancement
    P3
    size:L
    on Oct 31, 2026
  2. zackees commented on Oct 31, 2026

    @zackees
    MemberAuthor

    /investigate needs the shared frame-lifetime design with #3201 written down (overlaps #3201) before either can be specified and sized.

  3. added
    needs-investigation
    on Oct 31, 2026
  4. zackees commented on Nov 1, 2026

    @zackees
    MemberAuthor

    The shared frame-lifetime design (a staging slot pool in libobs-graphics, with a fallback when a backend lacks it) is written down on #3201: #3201 (comment). This issue is its step 3. #3200 folds into the same read pool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancementneeds-investigationsize:L

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions