Loading...
Searching...
No Matches
DrmPixelFormat.hpp
Go to the documentation of this file.
1#pragma once
2
25
26#include <score_plugin_gfx_export.h>
27
28#include <cstdint>
29
30namespace score::gfx::interop
31{
32
34constexpr uint32_t drmPixelFourcc(char a, char b, char c, char d) noexcept
35{
36 return uint32_t(uint8_t(a)) | (uint32_t(uint8_t(b)) << 8)
37 | (uint32_t(uint8_t(c)) << 16) | (uint32_t(uint8_t(d)) << 24);
38}
39
41SCORE_PLUGIN_GFX_EXPORT
42VideoPixelFormat fromDrmFourcc(uint32_t fourcc) noexcept;
43
47SCORE_PLUGIN_GFX_EXPORT
48uint32_t toDrmFourcc(VideoPixelFormat f) noexcept;
49
50} // namespace score::gfx::interop
constexpr uint32_t drmPixelFourcc(char a, char b, char c, char d) noexcept
Build a DRM fourcc from its characters, least-significant byte first.
Definition DrmPixelFormat.hpp:34
Vendor-neutral pixel format vocabulary + descriptive metadata.