summaryrefslogtreecommitdiff
path: root/gralloc-headers/pixel-gralloc/format.h
blob: 2edd3ad16a74027ed1035acd9fc94bdb48fb30df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once

#include <aidl/android/hardware/graphics/common/PixelFormat.h>

#include <cstdint>

namespace pixel::graphics {

using FrameworkFormat = aidl::android::hardware::graphics::common::PixelFormat;

#define MapFormat(f) f = static_cast<uint32_t>(FrameworkFormat::f)

enum class Format : uint32_t {
    MapFormat(UNSPECIFIED),
    MapFormat(RGBA_8888),
    MapFormat(RGBX_8888),
    MapFormat(RGB_888),
    MapFormat(RGB_565),
    MapFormat(BGRA_8888),
    MapFormat(YCBCR_422_SP),
    MapFormat(YCRCB_420_SP),
    MapFormat(YCBCR_422_I),
    MapFormat(RGBA_FP16),
    MapFormat(RAW16),
    MapFormat(BLOB),
    MapFormat(IMPLEMENTATION_DEFINED),
    MapFormat(YCBCR_420_888),
    MapFormat(RAW_OPAQUE),
    MapFormat(RAW10),
    MapFormat(RAW12),
    MapFormat(RGBA_1010102),
    MapFormat(Y8),
    MapFormat(Y16),
    MapFormat(YV12),
    MapFormat(DEPTH_16),
    MapFormat(DEPTH_24),
    MapFormat(DEPTH_24_STENCIL_8),
    MapFormat(DEPTH_32F),
    MapFormat(DEPTH_32F_STENCIL_8),
    MapFormat(STENCIL_8),
    MapFormat(YCBCR_P010),
    MapFormat(HSV_888),
    MapFormat(R_8),
    MapFormat(R_16_UINT),
    MapFormat(RG_1616_UINT),
    MapFormat(RGBA_10101010),

    // Pixel specific formats
    GOOGLE_NV12 = 0x301,
    GOOGLE_R8 = 0x303,
};

#undef MapFormat

} // namespace pixel::graphics