Package: android.hardware.graphics.common@1.1

types

Properties

PixelFormat

enum PixelFormat: @1.0::PixelFormat

Pixel formats for graphics buffers.

Details
Members
DEPTH_16 = 0x30
16-bit format that has a single 16-bit depth component.
The component values are unsigned normalized to the range[0, 1], whose interpretation is defined by the dataspace.
DEPTH_24 = 0x31
32-bit format that has a single 24-bit depth component and, optionally, 8 bits that are unused.
The component values are unsigned normalized to the range[0, 1], whose interpretation is defined by the dataspace.
DEPTH_24_STENCIL_8 = 0x32
32-bit format that has a 24-bit depth component and an 8-bit stencil component packed into 32-bits.
The depth component values are unsigned normalized to the range[0, 1], whose interpretation is defined by the dataspace.The stencil values are unsigned integers, whose interpretation is defined by the dataspace.
DEPTH_32F = 0x33
32-bit format that has a single 32-bit depth component.
The component values are signed floats, whose interpretation is defined by the dataspace.
DEPTH_32F_STENCIL_8 = 0x34
Two-component format that has a 32-bit depth component, an 8-bit stencil component, and optionally 24-bits unused.
The depth component values are signed floats, whose interpretation is defined by the dataspace.The stencil bits are unsigned integers, whose interpretation is defined by the dataspace.
STENCIL_8 = 0x35
8-bit format that has a single 8-bit stencil component.
The component values are unsigned integers, whose interpretation is defined by the dataspace.
YCBCR_P010 = 0x36
P010 is a 4:2:0 YCbCr semiplanar format comprised of a WxH Y plane followed immediately by a Wx(H/2)CbCr plane.Each sample is represented by a 16-bit little-endian value, with the lower 6 bits set to zero.
This format assumes - an even height - a vertical stride equal to the height
stride_in_bytes = stride * 2 y_size = stride_in_bytes * height cbcr_size = stride_in_bytes *(height / 2)cb_offset = y_size cr_offset = cb_offset + 2
This format must be accepted by the allocator when used with the following usage flags:
- BufferUsage::VIDEO_* - BufferUsage::CPU_* - BufferUsage::GPU_TEXTURE
The component values are unsigned normalized to the range[0, 1], whose interpretation is defined by the dataspace.
This format is appropriate for 10bit video content.
Buffers with this format must be locked with IMapper::lockYCbCr or with IMapper::lock.
Annotations
export
name="android_pixel_format_v1_1_t" , value_prefix="HAL_PIXEL_FORMAT_" , export_parent="false"

BufferUsage

enum BufferUsage: @1.0::BufferUsage

Buffer usage definitions.

Details
Members
GPU_CUBE_MAP = 1ULL << 25
buffer is used as a cube map texture
GPU_MIPMAP_COMPLETE = 1ULL << 26
buffer contains a complete mipmap hierarchy

Dataspace

enum Dataspace: @1.0::Dataspace
Details
Members
BT2020_ITU = STANDARD_BT2020 | TRANSFER_SMPTE_170M | RANGE_LIMITED
ITU-R Recommendation 2020(BT.2020)
Ultra High-definition television
Use limited range, BT.709 transfer and BT2020 standard
BT2020_ITU_PQ = STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_LIMITED
ITU-R Recommendation 2100(BT.2100)
High dynamic range television
Use limited/full range, PQ/HLG transfer, and BT2020 standard limited range is the preferred / normative definition for BT.2100
BT2020_ITU_HLG = STANDARD_BT2020 | TRANSFER_HLG | RANGE_LIMITED
BT2020_HLG = STANDARD_BT2020 | TRANSFER_HLG | RANGE_FULL
Annotations
export
name="android_dataspace_v1_1_t" , value_prefix="HAL_DATASPACE_" , export_parent="false"

ColorMode

enum ColorMode: @1.0::ColorMode
Details
Members
BT2020 = 10
BT2020 corresponds with display settings that implement the ITU-R Recommendation BT.2020 / Rec.2020 for UHDTV.
Primaries:x y green 0.170 0.797 blue 0.131 0.046 red 0.708 0.292 white(D65)0.3127 0.3290
Inverse Gamma Correction(IGC): V represents normalized(with[0 to 1]range)value of R, G, or B.
if Vnonlinear<b * 4.5 Vlinear = Vnonlinear / 4.5 else Vlinear =(( Vnonlinear +(a - 1)) / a)^(1/0.45)
Gamma Correction(GC):
if Vlinear<b Vnonlinear = 4.5 * Vlinear else Vnonlinear = a * Vlinear ^ 0.45 -(a - 1)
where
a = 1.09929682680944, b = 0.018053968510807
For practical purposes, these a/b values can be used instead
a = 1.099, b = 0.018 for 10-bit display systems a = 1.0993, b = 0.0181 for 12-bit display systems
BT2100_PQ = 11
BT2100_PQ and BT2100_HLG correspond with display settings that implement the ITU-R Recommendation BT.2100 / Rec.2100 for HDR TV.
Primaries:x y green 0.170 0.797 blue 0.131 0.046 red 0.708 0.292 white(D65)0.3127 0.3290
For BT2100_PQ, the transfer function is Perceptual Quantizer(PQ). For BT2100_HLG, the transfer function is Hybrid Log-Gamma(HLG).
BT2100_HLG = 12
Annotations
export
name="android_color_mode_v1_1_t" , value_prefix="HAL_COLOR_MODE_" , export_parent="false"

RenderIntent

enum RenderIntent: int32_t

RenderIntent defines the mapping from color mode colors to display colors.

A render intent must not change how it maps colors when the color mode changes.That is to say that when a render intent maps color C to color C', the fact that color C can have different pixel values in different color modes should not affect the mapping.

RenderIntent overrides the render intents defined for individual color modes.It is ignored when the color mode is ColorMode::NATIVE, because ColorMode::NATIVE colors are already display colors.

Details
Members
COLORIMETRIC = 0
Colors in the display gamut are unchanged.Colors out of the display gamut are hard-clipped.
This implies that the display must have been calibrated unless ColorMode::NATIVE is the only supported color mode.
ENHANCE = 1
Enhance colors that are in the display gamut.Colors out of the display gamut are hard-clipped.
The enhancement typically picks the biggest standard color space(e.g.DCI-P3)that is narrower than the display gamut and stretches it to the display gamut.The stretching is recommended to preserve skin tones.
TONE_MAP_COLORIMETRIC = 2
Tone map high-dynamic-range colors to the display's dynamic range.The dynamic range of the colors are communicated separately.After tone mapping, the mapping to the display gamut is as defined in COLORIMETRIC.
TONE_MAP_ENHANCE = 3
Tone map high-dynamic-range colors to the display's dynamic range.The dynamic range of the colors are communicated separately.After tone mapping, the mapping to the display gamut is as defined in ENHANCE.
The tone mapping step and the enhancing step must match TONE_MAP_COLORIMETRIC and ENHANCE respectively when they are also supported.
Annotations
export
name="android_render_intent_v1_1_t" , value_prefix="HAL_RENDER_INTENT_" , export_parent="false"