Loading...
Searching...
No Matches

Decodes DXV DXT1/DXT5 (Resolume) format to GPU. More...

Inheritance diagram for score::gfx::DXVDecoder:
score::gfx::GPUVideoDecoder

Detailed Description

Decodes DXV DXT1/DXT5 (Resolume) format to GPU.

DXV stores GPU-compressed texture data (BC1/BC3 blocks) with an intermediate compression layer (DXTR opcodes, LZF, or raw). We bypass ffmpeg's CPU decompression and upload raw BC blocks directly to the GPU.

Classes

struct  PacketHeader
 

Public Types

enum  DXVFormat : uint32_t { FMT_DXT1 = 0x44585431 , FMT_DXT5 = 0x44585435 , FMT_YCG6 = 0x59434736 , FMT_YG10 = 0x59473130 }
 

Public Member Functions

 DXVDecoder (QRhiTexture::Format fmt, Video::ImageFormat &d, QString filter="")
 
std::pair< QShader, QShader > init (RenderList &r) override
 Initialize a GPUVideoDecoder.
 
void exec (RenderList &, QRhiResourceUpdateBatch &res, AVFrame &frame) override
 Decode and upload a video frame to the GPU.
 
- Public Member Functions inherited from score::gfx::GPUVideoDecoder
void release (RenderList &)
 This method will release all the created samplers and textures.
 

Static Public Member Functions

static PacketHeader parseHeader (const uint8_t *pkt, int pktSize)
 
- Static Public Member Functions inherited from score::gfx::GPUVideoDecoder
static QRhiTextureSubresourceUploadDescription createTextureUpload (uint8_t *pixels, int w, int h, int bytesPerPixel, int stride)
 Utility method to create a QRhiTextureSubresourceUploadDescription.
 
static QString vertexShader (bool invertY=false) noexcept
 

Additional Inherited Members

- Public Attributes inherited from score::gfx::GPUVideoDecoder
std::vector< Samplersamplers
 

Member Function Documentation

◆ exec()

void score::gfx::DXVDecoder::exec ( RenderList ,
QRhiResourceUpdateBatch &  res,
AVFrame &  frame 
)
overridevirtual

Decode and upload a video frame to the GPU.

Implements score::gfx::GPUVideoDecoder.

◆ init()

std::pair< QShader, QShader > score::gfx::DXVDecoder::init ( RenderList r)
overridevirtual

Initialize a GPUVideoDecoder.

This method must :

  • Create samplers and textures for the video format.
  • Create shaders that will render the data put into these textures.

It returns a {vertex, fragment} shader pair.

Implements score::gfx::GPUVideoDecoder.


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