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

Add support for zero-copy pipeline #3

Open
ABeltramo opened this issue Jun 22, 2024 · 0 comments · May be fixed by #8
Open

Add support for zero-copy pipeline #3

ABeltramo opened this issue Jun 22, 2024 · 0 comments · May be fixed by #8
Labels
enhancement New feature or request

Comments

@ABeltramo
Copy link
Member

ABeltramo commented Jun 22, 2024

In our pipeline we are currently doing one unnecessary GPU -> CPU copy in order to expose our raw frame buffer as a
gstreamer buffer. The rationale behind it is explained in
the docs.
This will cause some overhead that will eventually be a bottleneck when going with high resolutions and frame rates (on
Discord it has been reported that the current pipeline can't handle 1080p when going over 200 fps).

There are at least two ways to achieve this in Gstreamer:

  • OpenGL: exposing the buffer as
    a GstGLBuffer, design docs
    • We'll have to share the OpenGL context between our comp and the Gstreamer pipeline.
    • I guess worst case this will end up doing GPU->GPU copy?
  • DMA-BUF: exposing the buffer as a GstBuffer backed by
    a dmabuf, design docs
    • Cuda doesn't seem to support this directly, (vaapi should) it should be possible to import DMABuf
      using glupload -> cudaupload.
    • I guess worst case this will end up doing GPU->GPU copy?

This needs more research...

Useful links

@ABeltramo ABeltramo added the enhancement New feature or request label Jun 22, 2024
@ABeltramo ABeltramo added this to WIP Jun 22, 2024
@ABeltramo ABeltramo linked a pull request Nov 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant