2#include <Gfx/Graph/decoders/GPUVideoDecoder.hpp>
4#if !defined(__EMSCRIPTEN__)
6#include <libavformat/avformat.h>
23 enum DXVFormat : uint32_t
25 FMT_DXT1 = 0x44585431,
26 FMT_DXT5 = 0x44585435,
27 FMT_YCG6 = 0x59434736,
28 FMT_YG10 = 0x59473130,
34 void exec(
RenderList&, QRhiResourceUpdateBatch& res, AVFrame& frame)
override;
42 const uint8_t* data{};
45 static PacketHeader parseHeader(
const uint8_t* pkt,
int pktSize);
48 void uploadTexture(QRhiResourceUpdateBatch& res,
const uint8_t* data, std::size_t size);
50 QRhiTexture::Format m_format;
54 static constexpr int buffer_size = 1024 * 1024 * 16;
55 std::unique_ptr<char[]> m_buffer = std::make_unique<char[]>(buffer_size);
71 void exec(
RenderList&, QRhiResourceUpdateBatch& res, AVFrame& frame)
override;
77 DXVDecompressContext m_ctx;
79 static constexpr int buffer_size = 1024 * 1024 * 16;
80 std::unique_ptr<char[]> m_yBuffer = std::make_unique<char[]>(buffer_size);
81 std::unique_ptr<char[]> m_cocgBuffer = std::make_unique<char[]>(buffer_size);
Processes and renders a video frame on the GPU.
Definition GPUVideoDecoder.hpp:90
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:21
std::pair< QShader, QShader > init(RenderList &r) override
Initialize a GPUVideoDecoder.
Definition DXV.cpp:107
void exec(RenderList &, QRhiResourceUpdateBatch &res, AVFrame &frame) override
Decode and upload a video frame to the GPU.
Definition DXV.cpp:135
Decodes DXV YCG6/YG10 (YCoCg) format to GPU.
Definition DXV.hpp:66
std::pair< QShader, QShader > init(RenderList &r) override
Initialize a GPUVideoDecoder.
Definition DXV.cpp:270
void exec(RenderList &, QRhiResourceUpdateBatch &res, AVFrame &frame) override
Decode and upload a video frame to the GPU.
Definition DXV.cpp:308