Skip to content

nvcodec: Optimize OpenGL interoperability performance

nvenc: Port to GstCudaGraphicsResource

Register openGL resource only once per memory. Also if upstream
provides the registered information, reuse the information
instead of doing it again. This can improve performance dramatically
depending on system since the resource registration might cause
high overhead.
nvdec: Port to GstCudaGraphicsResource

Make it possible to share registered graphics resource among nvidia encoders
and decoders.
cudautils: Add GstCudaGraphicsResource structure for better openGL interoperability

Introduce GstCudaGraphicsResource structure to represent registered
CUDA graphics resources and to enable sharing the information among
nvdec and nvenc. This structure can reduce the number of resource
registration which cause high overhead.
nvdec: Port to openGL PBO memory

For openGL interoperability, nvdec uses cuGraphicsGLRegisterImage API
which is to register openGL texture image.
Meanwhile nvenc uses cuGraphicsGLRegisterBuffer API to registure openGL buffer object.
That means two kinds of graphics resources are registered per memory
when nvdec/nvenc are configured at the same time.
The graphics resource registration brings possibly high overhead
so the registration should be performed only once per resource
from optimization point of view.
nvdec: Filter openGL API version to use

To ensure PBO buffer, openGL API >= 3 is required.
Edited by Seungha Yang

Merge request reports