Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avfilter/vf_overlay_videotoolbox: add fast code path for bgra overlay #410

Merged
merged 1 commit into from
Jul 7, 2024

Commits on Jul 4, 2024

  1. avfilter/vf_overlay_videotoolbox: add fast code path for bgra overlay

    The previous implementation needed to convert both main and overlay
    frames to BGRA texture and then convert back to YUV.
    This operation is bandwidth heavy.
    
    Add a faster shader when the overlay is in BGRA format which
    calculates YUV values in the shader. This eliminates the need to
    convert the main frame and does not require extra copy for the
    overlay frame, leading to more than 100% performance improvements
    overlaying 10-bit 1080p HEVC inputs on M1 Max (190fps -> 407fps).
    
    The rgb to yuv formula is currently hard-coded to premultiplied
    BT.709 matrix.
    gnattu committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    87e34ff View commit details
    Browse the repository at this point in the history