Vendor-neutral GPU-encoder selection keyed on VideoPixelFormat. More...
Detailed Description
Vendor-neutral GPU-encoder selection keyed on VideoPixelFormat.
Every capture-card addon needs to turn "the on-wire pixel format the card wants" into "the GPU encoder that produces those exact bytes". AJA, DeckLink, Bluefish and Deltacast all carry the same handful of SDI/HDMI wire formats; without this factory each addon re-writes the same 60-line switch over its own vendor enum.
The addon's job shrinks to a one-line translation table (vendorFmt -> VideoPixelFormat); the actual encoder choice + the byte-layout knowledge lives here, once.
makeWireEncoder(VideoPixelFormat)-> render (fragment) encoder. Default output path (works on every QRhi backend).makeWireComputeEncoder(VideoPixelFormat)-> compute encoder for the GPU-direct path that writes straight into an imported buffer.wireComputeSupports(VideoPixelFormat, width)-> whether the compute encoder can handle that (format, width) (v210 needs width % 6 == 0, etc).
Both return nullptr for formats with no GPU encoder yet (e.g. P210, Mono, Bayer); callers fall back / report unsupported. The mapping reproduces exactly the encoders the AJA path validated on hardware, so an addon that maps its vendor enum to the matching VideoPixelFormat gets byte-identical output.
Go to the source code of this file.
Namespaces | |
| namespace | score |
| Base toolkit upon which the software is built. | |
| namespace | score::gfx |
| Graphics rendering pipeline for ossia score. | |
Functions | |
| std::unique_ptr< GPUVideoEncoder > | score::gfx::makeWireEncoder (score::gfx::interop::VideoPixelFormat fmt) |
| std::unique_ptr< ComputeEncoder > | score::gfx::makeWireComputeEncoder (score::gfx::interop::VideoPixelFormat fmt) |
| bool | score::gfx::wireComputeSupports (score::gfx::interop::VideoPixelFormat fmt, int width) |