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/YUYV422.hpp>
41#include <Video/VideoInterface.hpp>
48inline std::unique_ptr<GPUVideoDecoder>
56 return std::make_unique<UYVY422Decoder>(d);
58 return std::make_unique<YUYV422Decoder>(d);
61 return std::make_unique<YUYV422Decoder>(d,
true);
63 return std::make_unique<UYVY422Decoder>(d,
true);
67 return std::make_unique<V210Decoder>(d);
71 return std::make_unique<PackedDecoder>(QRhiTexture::BGRA8, 4, d);
73 return std::make_unique<PackedDecoder>(QRhiTexture::RGBA8, 4, d);
81 return std::make_unique<PackedDecoder>(
82 QRhiTexture::BGRA8, 4, d,
"processed.rgba = vec4(tex.rgb, 1.0);");
84 return std::make_unique<PackedDecoder>(
85 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.rgb, 1.0);");
87 return std::make_unique<PackedDecoder>(
88 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.gba, tex.r);");
90 return std::make_unique<PackedDecoder>(
91 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.gba, 1.0);");
93 return std::make_unique<PackedDecoder>(
94 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.abg, tex.r);");
96 return std::make_unique<PackedDecoder>(
97 QRhiTexture::RGBA8, 4, d,
"processed.rgba = vec4(tex.abg, 1.0);");
107 return std::make_unique<PackedDecoder>(
108 QRhiTexture::R8, 1, d,
109 "processed.rgba = vec4(tex.r, tex.r, tex.r, 1.0);");
114 return std::make_unique<PackedDecoder>(
115 QRhiTexture::R16, 2, d,
116 "processed.rgba = vec4(vec3(tex.r * 64.0625), 1.0);");
118 return std::make_unique<PackedDecoder>(
119 QRhiTexture::R16, 2, d,
120 "processed.rgba = vec4(vec3(tex.r * 16.0039), 1.0);");
122 return std::make_unique<PackedDecoder>(
123 QRhiTexture::R16, 2, d,
124 "processed.rgba = vec4(tex.r, tex.r, tex.r, 1.0);");
131 return std::make_unique<BayerDecoder>(
134 return std::make_unique<BayerDecoder>(
137 return std::make_unique<BayerDecoder>(
140 return std::make_unique<BayerDecoder>(
143 return std::make_unique<BayerDecoder>(
146 return std::make_unique<BayerDecoder>(
149 return std::make_unique<BayerDecoder>(
152 return std::make_unique<BayerDecoder>(
155 return std::make_unique<BayerDecoder>(
158 return std::make_unique<BayerDecoder>(
161 return std::make_unique<BayerDecoder>(
167 return std::make_unique<PackedDecoder>(
168 QRhiTexture::RG8, 2, d,
169 "float be = (tex.r * 255.0 * 256.0 + tex.g * 255.0) / 65535.0;"
170 "processed.rgba = vec4(be, be, be, 1.0);",
179 {.containerBytes = 1, .bigEndian =
false,
180 .r = {5, 3}, .g = {2, 3}, .b = {0, 2}, .a = {0, 0}}, d);
183 {.containerBytes = 2, .bigEndian =
false,
184 .r = {11, 5}, .g = {5, 6}, .b = {0, 5}, .a = {0, 0}}, d);
187 {.containerBytes = 2, .bigEndian =
true,
188 .r = {11, 5}, .g = {5, 6}, .b = {0, 5}, .a = {0, 0}}, d);
191 {.containerBytes = 2, .bigEndian =
false,
192 .r = {10, 5}, .g = {5, 5}, .b = {0, 5}, .a = {0, 0}}, d);
195 {.containerBytes = 2, .bigEndian =
true,
196 .r = {10, 5}, .g = {5, 5}, .b = {0, 5}, .a = {0, 0}}, d);
199 {.containerBytes = 2, .bigEndian =
false,
200 .r = {10, 5}, .g = {5, 5}, .b = {0, 5}, .a = {15, 1}}, d);
203 {.containerBytes = 2, .bigEndian =
false,
204 .r = {8, 4}, .g = {4, 4}, .b = {0, 4}, .a = {0, 0}}, d);
207 {.containerBytes = 2, .bigEndian =
false,
208 .r = {8, 4}, .g = {4, 4}, .b = {0, 4}, .a = {12, 4}}, d);
218 return std::make_unique<PackedBitfieldYUVDecoder>(
219 d, PackedBitfieldYUVLayout{
220 .y = {8, 4}, .u = {4, 4}, .v = {0, 4}, .a = {0, 0}});
222 return std::make_unique<PackedBitfieldYUVDecoder>(
223 d, PackedBitfieldYUVLayout{
224 .y = {10, 5}, .u = {5, 5}, .v = {0, 5}, .a = {0, 0}});
226 return std::make_unique<PackedBitfieldYUVDecoder>(
227 d, PackedBitfieldYUVLayout{
228 .y = {11, 5}, .u = {5, 6}, .v = {0, 5}, .a = {0, 0}});
232 return std::make_unique<R210Decoder>(d);
236 return std::make_unique<RGB24Decoder>(d);
241 return std::make_unique<RGB24Decoder>(
242 d,
"processed.rgb = tex.bgr;");
244 return std::make_unique<RGB48Decoder>(d);
248 return std::make_unique<NV12Decoder>(d,
false);
250 return std::make_unique<NV12Decoder>(d,
true);
252 return std::make_unique<NV16Decoder>(d,
false);
254 return std::make_unique<NV16Decoder>(d,
true);
256 return std::make_unique<NV24Decoder>(d,
false);
258 return std::make_unique<NV24Decoder>(d,
true);
260 return std::make_unique<VUYADecoder>(d,
false);
262 return std::make_unique<VUYADecoder>(d,
true);
265 return std::make_unique<VUYADecoder>(d,
false,
"gba",
'r');
267 return std::make_unique<VUYADecoder>(d,
true,
"gba",
'r');
269 return std::make_unique<VUYADecoder>(d,
false,
"rgb",
'a');
271 return std::make_unique<VUYADecoder>(d,
true,
"rgb",
'a');
273 return std::make_unique<YUV420Decoder>(d,
false);
275 return std::make_unique<YUV420Decoder>(d,
true);
277 return std::make_unique<YUV422Decoder>(d);
279 return std::make_unique<P010Decoder>(d);
281 return std::make_unique<YUV422P10Decoder>(d);
284 return std::make_unique<YUV422P12Decoder>(d);
286 return std::make_unique<YUV420P10Decoder>(d);
288 return std::make_unique<YUV444Decoder>(d);
290 return std::make_unique<YUV444P10Decoder>(d);
292 return std::make_unique<YUV444P12Decoder>(d);
294 return std::make_unique<P210Decoder>(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