1.11
types.h
1/*
2 * Copyright (C) 2018 Microchip Technology Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef EGT_TYPES_H
7#define EGT_TYPES_H
8
14#include <egt/detail/enum.h>
15#include <egt/detail/meta.h>
16#include <iosfwd>
17#include <memory>
18
19namespace egt
20{
21inline namespace v1
22{
23
29enum class PixelFormat
30{
31 invalid,
32 rgb565,
33 argb8888,
34 xrgb8888,
35 yuyv,
37 nv21,
39 yuv420,
40 yvyu,
41 nv61,
42 yuy2,
43 uyvy,
44 a8,
45};
46
48template<>
49EGT_API const std::pair<PixelFormat, char const*> detail::EnumStrings<PixelFormat>::data[12];
50
52EGT_API std::ostream& operator<<(std::ostream& os, const PixelFormat& format);
53
60namespace detail
61{
62
67
72
77
87EGT_API std::string demangle(const char* name);
88
89}
90
91}
92}
93
94#endif
EGT_API std::string demangle(const char *name)
Demangle a C++ symbol into something human readable.
std::string format(T value, int precision=2)
Format a float/double to a fixed precision and return as a string.
Definition detail/string.h:65
PixelFormat egt_format(uint32_t format)
Convert a DRM format to a pixel format.
std::string gstreamer_format(PixelFormat format)
Convert a pixel format to a gstreamer format.
uint32_t drm_format(PixelFormat format)
Convert a pixel format to a DRM format.
PixelFormat
Supported pixel formats.
Definition types.h:30
@ xrgb8888
32 bpp, 24-bit color
@ rgb565
16 bpp, 16-bit color
@ yuy2
Packed YUY 4:2:2.
@ argb8888
32 bpp, 24-bit color + 8-bit alpha
@ yuyv
Packed format with ½ horizontal chroma resolution, also known.
@ nv21
YUV 4:2:0 planar image, with 8 bit Y samples, followed by.
@ yuv420
Planar format.
@ uyvy
Reverse byte order of YUY2.
@ invalid
Invalid color format.
EGT_API std::ostream & operator<<(std::ostream &os, const Color &color)
Overloaded std::ostream insertion operator.
EGT framework namespace.
Definition animation.h:24
When using enum_to_string() and enum_from_string(), this type needs to be defined and specialized to ...
Definition enum.h:48