Loading...
Searching...
No Matches
WireEncoderFactory.hpp File Reference

Vendor-neutral GPU-encoder selection keyed on Video::VideoPixelFormat. More...

Detailed Description

Vendor-neutral GPU-encoder selection keyed on Video::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 -> Video::VideoPixelFormat); the actual encoder choice + the byte-layout knowledge lives here, once.

  • makeWireEncoder(Video::VideoPixelFormat) -> render (fragment) encoder. Default output path (works on every QRhi backend).
  • makeWireComputeEncoder(Video::VideoPixelFormat) -> compute encoder for the GPU-direct path that writes straight into an imported buffer.
  • wireComputeSupports(Video::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 Video::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 (Video::VideoPixelFormat fmt, bool contiguousFramestore=false)
 Render (fragment-shader) encoder producing fmt's exact on-wire bytes.
 
std::unique_ptr< ComputeEncoder > score::gfx::makeWireComputeEncoder (Video::VideoPixelFormat fmt)
 
bool score::gfx::wireComputeSupports (Video::VideoPixelFormat fmt, int width)