Loading...
Searching...
No Matches
score::gfx::V210ComputeEncoder Struct Referencefinal

Compute-shader RGBA -> v210 encoder targeting an external SSBO. More...

Inheritance diagram for score::gfx::V210ComputeEncoder:
score::gfx::ComputeEncoder

Detailed Description

Compute-shader RGBA -> v210 encoder targeting an external SSBO.

Unlike the fragment V210Encoder, this writes directly to a caller-owned QRhiBuffer (Storage). Designed for the AJA tier-3 path: the buffer is backed by a SHARED, CUDA-importable, AJA-DMA-locked GPU allocation, so the encoder's writes ARE the bytes AJA P2P-DMAs to the card. Zero intermediate copies, zero CUDA-side conversion.

Each compute thread handles one 6-pixel v210 group: reads 6 RGBA pixels, applies the colour matrix from %1, averages chroma pairs, packs the four 32-bit v210 words, writes 4 ULWords to the SSBO.

Constraints:

  • Source width must be a multiple of 6 (1920, 3840, 7680).
  • The output buffer's effective layout follows v210 line stride ((width + 47) / 48) * 128 bytes per row.

Public Member Functions

bool init (QRhi &rhi, const RenderState &state, QRhiTexture *inputRGBA, int width, int height, QRhiBuffer *outputBuffer, const QString &colorConversion=colorMatrixOut()) override
 
void exec (QRhi &rhi, QRhiCommandBuffer &cb, QRhiResourceUpdateBatch *res) override
 
void release () override
 

Public Attributes

QRhiBuffer * m_paramsUBO {}
 
QRhiSampler * m_sampler {}
 
QRhiShaderResourceBindings * m_srb {}
 
QRhiComputePipeline * m_pipeline {}
 
int m_width {}
 
int m_height {}
 
int m_groupsPerRow {}
 
uint32_t m_lineStrideBytes {}
 

Static Public Attributes

static constexpr const char * compute_shader
 

Member Function Documentation

◆ exec()

void score::gfx::V210ComputeEncoder::exec ( QRhi &  rhi,
QRhiCommandBuffer &  cb,
QRhiResourceUpdateBatch *  res 
)
inlineoverridevirtual

◆ init()

bool score::gfx::V210ComputeEncoder::init ( QRhi &  rhi,
const RenderState state,
QRhiTexture *  inputRGBA,
int  width,
int  height,
QRhiBuffer *  outputBuffer,
const QString &  colorConversion = colorMatrixOut() 
)
inlineoverridevirtual

◆ release()

void score::gfx::V210ComputeEncoder::release ( )
inlineoverridevirtual

The documentation for this struct was generated from the following file: