diff options
Diffstat (limited to 'libkms++/pixelformats.h')
-rw-r--r-- | libkms++/pixelformats.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libkms++/pixelformats.h b/libkms++/pixelformats.h index d6f41d7..813eaef 100644 --- a/libkms++/pixelformats.h +++ b/libkms++/pixelformats.h @@ -1,5 +1,8 @@ #pragma once +#include <cstdint> +#include <string> + namespace kms { constexpr uint32_t MakeFourCC(const char *fourcc) @@ -42,4 +45,19 @@ static inline std::string PixelFormatToFourCC(PixelFormat f) return std::string(buf); } +struct PixelFormatPlaneInfo +{ + uint8_t bitspp; + uint8_t xsub; + uint8_t ysub; +}; + +struct PixelFormatInfo +{ + uint8_t num_planes; + struct PixelFormatPlaneInfo planes[4]; +}; + +const struct PixelFormatInfo& get_pixel_format_info(PixelFormat format); + } |