18#include <Gfx/Graph/decoders/Bayer.hpp>
19#include <Gfx/Graph/decoders/NV12.hpp>
22#include <Gfx/Graph/decoders/NV16.hpp>
23#include <Gfx/Graph/decoders/NV24.hpp>
24#include <Gfx/Graph/decoders/P010.hpp>
25#include <Gfx/Graph/decoders/R210.hpp>
26#include <Gfx/Graph/decoders/RGBA.hpp>
27#include <Gfx/Graph/decoders/VUYA.hpp>
28#include <Gfx/Graph/decoders/YUV420.hpp>
29#include <Gfx/Graph/decoders/YUV422.hpp>
30#include <Gfx/Graph/decoders/V210.hpp>
31#include <Gfx/Graph/decoders/YUV422P10.hpp>
32#include <Gfx/Graph/decoders/YUV444.hpp>
33#include <Gfx/Graph/decoders/YUV444P12.hpp>
34#include <Gfx/Graph/decoders/YUV444P10.hpp>
35#include <Gfx/Graph/decoders/YUV422P12.hpp>
36#include <Gfx/Graph/decoders/YUV420P10.hpp>
37#include <Gfx/Graph/decoders/P210.hpp>
38#include <Gfx/Graph/decoders/PA16.hpp>
39#include <Gfx/Graph/decoders/UYVA.hpp>
40#include <Gfx/Graph/decoders/YUYV422.hpp>
43#include <Video/VideoInterface.hpp>
50inline std::unique_ptr<GPUVideoDecoder>
58 return std::make_unique<UYVY422Decoder>(d);
60 return std::make_unique<YUYV422Decoder>(d);
63 return std::make_unique<YUYV422Decoder>(d,
true);
65 return std::make_unique<UYVY422Decoder>(d,
true);
69 return std::make_unique<V210Decoder>(d);
73 return std::make_unique<PackedDecoder>(QRhiTexture::BGRA8, 4, d);
75 return std::make_unique<PackedDecoder>(QRhiTexture::RGBA8, 4, d);
83 return std::make_unique<PackedDecoder>(
84 QRhiTexture::BGRA8, 4, d,
"processed.rgba = vec4(tex.rgb, 1.0);");
86 return std::make_unique<PackedDecoder>(
87 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.rgb, 1.0);");
89 return std::make_unique<PackedDecoder>(
90 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.gba, tex.r);");
92 return std::make_unique<PackedDecoder>(
93 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.gba, 1.0);");
95 return std::make_unique<PackedDecoder>(
96 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.abg, tex.r);");
98 return std::make_unique<PackedDecoder>(
99 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.abg, 1.0);");
109 return std::make_unique<PackedDecoder>(
110 QRhiTexture::R8, 1, d,
111 "processed.rgba = vec4(tex.r, tex.r, tex.r, 1.0);");
116 return std::make_unique<PackedDecoder>(
117 QRhiTexture::R16, 2, d,
118 "processed.rgba = vec4(vec3(tex.r * 64.0625), 1.0);");
120 return std::make_unique<PackedDecoder>(
121 QRhiTexture::R16, 2, d,
122 "processed.rgba = vec4(vec3(tex.r * 16.0039), 1.0);");
124 return std::make_unique<PackedDecoder>(
125 QRhiTexture::R16, 2, d,
126 "processed.rgba = vec4(tex.r, tex.r, tex.r, 1.0);");
133 return std::make_unique<BayerDecoder>(
136 return std::make_unique<BayerDecoder>(
139 return std::make_unique<BayerDecoder>(
142 return std::make_unique<BayerDecoder>(
145 return std::make_unique<BayerDecoder>(
148 return std::make_unique<BayerDecoder>(
151 return std::make_unique<BayerDecoder>(
154 return std::make_unique<BayerDecoder>(
157 return std::make_unique<BayerDecoder>(
160 return std::make_unique<BayerDecoder>(
163 return std::make_unique<BayerDecoder>(
169 return std::make_unique<PackedDecoder>(
170 QRhiTexture::RG8, 2, d,
171 "float be = (tex.r * 255.0 * 256.0 + tex.g * 255.0) / 65535.0;"
172 "processed.rgba = vec4(be, be, be, 1.0);",
181 {.containerBytes = 1, .bigEndian =
false,
182 .r = {5, 3}, .g = {2, 3}, .b = {0, 2}, .a = {0, 0}}, d);
185 {.containerBytes = 2, .bigEndian =
false,
186 .r = {11, 5}, .g = {5, 6}, .b = {0, 5}, .a = {0, 0}}, d);
189 {.containerBytes = 2, .bigEndian =
true,
190 .r = {11, 5}, .g = {5, 6}, .b = {0, 5}, .a = {0, 0}}, d);
193 {.containerBytes = 2, .bigEndian =
false,
194 .r = {10, 5}, .g = {5, 5}, .b = {0, 5}, .a = {0, 0}}, d);
197 {.containerBytes = 2, .bigEndian =
true,
198 .r = {10, 5}, .g = {5, 5}, .b = {0, 5}, .a = {0, 0}}, d);
201 {.containerBytes = 2, .bigEndian =
false,
202 .r = {10, 5}, .g = {5, 5}, .b = {0, 5}, .a = {15, 1}}, d);
205 {.containerBytes = 2, .bigEndian =
false,
206 .r = {8, 4}, .g = {4, 4}, .b = {0, 4}, .a = {0, 0}}, d);
209 {.containerBytes = 2, .bigEndian =
false,
210 .r = {8, 4}, .g = {4, 4}, .b = {0, 4}, .a = {12, 4}}, d);
220 return std::make_unique<PackedBitfieldYUVDecoder>(
221 d, PackedBitfieldYUVLayout{
222 .y = {8, 4}, .u = {4, 4}, .v = {0, 4}, .a = {0, 0}});
224 return std::make_unique<PackedBitfieldYUVDecoder>(
225 d, PackedBitfieldYUVLayout{
226 .y = {10, 5}, .u = {5, 5}, .v = {0, 5}, .a = {0, 0}});
228 return std::make_unique<PackedBitfieldYUVDecoder>(
229 d, PackedBitfieldYUVLayout{
230 .y = {11, 5}, .u = {5, 6}, .v = {0, 5}, .a = {0, 0}});
234 return std::make_unique<R210Decoder>(d);
238 return std::make_unique<RGB24Decoder>(d);
243 return std::make_unique<RGB24Decoder>(
244 d,
"processed.rgb = tex.bgr;");
246 return std::make_unique<RGB48Decoder>(d);
250 return std::make_unique<NV12Decoder>(d,
false);
252 return std::make_unique<NV12Decoder>(d,
true);
254 return std::make_unique<NV16Decoder>(d,
false);
256 return std::make_unique<NV16Decoder>(d,
true);
258 return std::make_unique<NV24Decoder>(d,
false);
260 return std::make_unique<NV24Decoder>(d,
true);
262 return std::make_unique<VUYADecoder>(d,
false);
264 return std::make_unique<VUYADecoder>(d,
true);
267 return std::make_unique<VUYADecoder>(d,
false,
"gba",
'r');
269 return std::make_unique<VUYADecoder>(d,
true,
"gba",
'r');
271 return std::make_unique<VUYADecoder>(d,
false,
"rgb",
'a');
273 return std::make_unique<VUYADecoder>(d,
true,
"rgb",
'a');
275 return std::make_unique<YUV420Decoder>(d,
false);
277 return std::make_unique<YUV420Decoder>(d,
true);
279 return std::make_unique<YUV422Decoder>(d);
281 return std::make_unique<P010Decoder>(d);
283 return std::make_unique<YUV422P10Decoder>(d);
286 return std::make_unique<YUV422P12Decoder>(d);
288 return std::make_unique<YUV420P10Decoder>(d);
290 return std::make_unique<YUV444Decoder>(d);
292 return std::make_unique<YUV444P10Decoder>(d);
294 return std::make_unique<YUV444P12Decoder>(d);
296 return std::make_unique<P210Decoder>(d);
300 return std::make_unique<P210Decoder>(d);
304 return std::make_unique<UYVADecoder>(d);
306 return std::make_unique<PA16Decoder>(d);
Decoder for RGB packed into bit fields narrower than a byte.
YUV packed into sub-byte bit fields (V4L2 Y444 / YUVO / YUVP).
Graphics rendering pipeline for ossia score.
Definition Filter/PreviewWidget.hpp:11
std::unique_ptr< GPUVideoDecoder > makePackedBitfieldDecoder(const PackedBitfieldLayout &l, Video::ImageFormat &d)
Convenience: the decoder for a packed-bitfield format.
Definition PackedBitfield.hpp:87