diff options
author | Shuzhen Wang <shuzhenwang@google.com> | 2018-12-04 18:14:35 -0800 |
---|---|---|
committer | Shuzhen Wang <shuzhenwang@google.com> | 2019-02-04 16:44:16 -0800 |
commit | 55386823a318309bfe1cc40175afa615225cabb1 (patch) | |
tree | afcb01c65793da6425a5c7f2f50fa9a6ffb15e2c /graphics | |
parent | 911c78b4c37f355e549446b446b56915e538841b (diff) | |
download | android_hardware_interfaces-55386823a318309bfe1cc40175afa615225cabb1.tar.gz android_hardware_interfaces-55386823a318309bfe1cc40175afa615225cabb1.tar.bz2 android_hardware_interfaces-55386823a318309bfe1cc40175afa615225cabb1.zip |
Camera: Add HAL interface change for HEIC
- Add new usage flag to indicate the consumer of the buffer is HEIC
encoder.
- Add new data space to indicate that the BLOB buffer is HEIC encoded.
- Add new BlobId to specify JPEG APPs segments.
Test: testHeic CTS test
Bug: 79465976
Change-Id: Iaa6a1d017223e84fc1c5dd0a9d90d9f09240e827
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/common/1.2/types.hal | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/graphics/common/1.2/types.hal b/graphics/common/1.2/types.hal index 3da617634..ebea1dcc7 100644 --- a/graphics/common/1.2/types.hal +++ b/graphics/common/1.2/types.hal @@ -49,6 +49,32 @@ enum Dataspace : @1.1::Dataspace { * Embedded depth metadata following the dynamic depth specification. */ DYNAMIC_DEPTH = 0x1002, + + /** + * JPEG APP segments format as specified by JEIDA spec + * + * The buffer must only contain APP1 (Application Marker) segment followed + * by zero or more APPn segments, as is specified by JEITA CP-3451C section 4.5.4. + * The APP1 segment optionally contains a thumbnail. The buffer will not + * contain main compressed image. + * + * This value is valid with formats: + * HAL_PIXEL_FORMAT_BLOB: JPEG APP segments optionally containing thumbnail image + * in APP1. BLOB buffer with this dataspace is output by HAL, and used by + * camera framework to encode into a HEIC image. + */ + JPEG_APP_SEGMENTS = 0x1003, + + /** + * ISO/IEC 23008-12 + * + * High Efficiency Image File Format (HEIF) + * + * This value is valid with formats: + * HAL_PIXEL_FORMAT_BLOB: A HEIC image encoded by HEIC or HEVC encoder + * according to ISO/IEC 23008-12. + */ + HEIF = 0x1004, }; enum ColorMode : @1.1::ColorMode { @@ -70,6 +96,18 @@ enum ColorMode : @1.1::ColorMode { }; /** + * Buffer usage definitions. + */ +enum BufferUsage : @1.1::BufferUsage { + /** + * Buffer is used as input for HEIC encoder. + */ + HW_IMAGE_ENCODER = 1ULL << 27, + + /* bits 28 and 32-47 must be zero and are reserved for future versions */ +}; + +/** * HIDL counterpart of `AHardwareBuffer_Desc`. * * An `AHardwareBuffer_Desc` object can be converted to and from a |