2#include <Gfx/Graph/decoders/GPUVideoDecoder.hpp>
5#include <libavformat/avformat.h>
22 enum DXVFormat : uint32_t
24 FMT_DXT1 = 0x44585431,
25 FMT_DXT5 = 0x44585435,
26 FMT_YCG6 = 0x59434736,
27 FMT_YG10 = 0x59473130,
33 void exec(
RenderList&, QRhiResourceUpdateBatch& res, AVFrame& frame)
override;
41 const uint8_t* data{};
44 static PacketHeader parseHeader(
const uint8_t* pkt,
int pktSize);
47 void uploadTexture(QRhiResourceUpdateBatch& res,
const uint8_t* data, std::size_t size);
49 QRhiTexture::Format m_format;
53 static constexpr int buffer_size = 1024 * 1024 * 16;
54 std::unique_ptr<char[]> m_buffer = std::make_unique<char[]>(buffer_size);
70 void exec(
RenderList&, QRhiResourceUpdateBatch& res, AVFrame& frame)
override;
76 DXVDecompressContext m_ctx;
78 static constexpr int buffer_size = 1024 * 1024 * 16;
79 std::unique_ptr<char[]> m_yBuffer = std::make_unique<char[]>(buffer_size);
80 std::unique_ptr<char[]> m_cocgBuffer = std::make_unique<char[]>(buffer_size);
Processes and renders a video frame on the GPU.
Definition GPUVideoDecoder.hpp:43
List of nodes to be rendered to an output.
Definition RenderList.hpp:19
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:12
Decodes DXV DXT1/DXT5 (Resolume) format to GPU.
Definition DXV.hpp:20
std::pair< QShader, QShader > init(RenderList &r) override
Initialize a GPUVideoDecoder.
Definition DXV.cpp:106
void exec(RenderList &, QRhiResourceUpdateBatch &res, AVFrame &frame) override
Decode and upload a video frame to the GPU.
Definition DXV.cpp:134
Decodes DXV YCG6/YG10 (YCoCg) format to GPU.
Definition DXV.hpp:65
std::pair< QShader, QShader > init(RenderList &r) override
Initialize a GPUVideoDecoder.
Definition DXV.cpp:269
void exec(RenderList &, QRhiResourceUpdateBatch &res, AVFrame &frame) override
Decode and upload a video frame to the GPU.
Definition DXV.cpp:307