diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-02-10 04:07:22 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-02-10 04:07:22 +0000 |
commit | cd7dd7805e0ef236c6b7281cc2fcecbd4793fe14 (patch) | |
tree | 12b7f0c21004993cfffbe3c4273c3ba877fc9a55 | |
parent | 8adc25dc0f877c425e91e570dbdd272847912239 (diff) | |
parent | f43b544c0e407234643304c7bfdf658333e3dfc5 (diff) | |
download | libhardware-cd7dd7805e0ef236c6b7281cc2fcecbd4793fe14.tar.gz |
Snap for 5297348 from f43b544c0e407234643304c7bfdf658333e3dfc5 to qt-release
Change-Id: I1176688d6f424b068335a46d3804de8a4d2b5b79
-rw-r--r-- | include/hardware/camera3.h | 31 | ||||
-rw-r--r-- | include/hardware/gralloc.h | 3 |
2 files changed, 23 insertions, 11 deletions
diff --git a/include/hardware/camera3.h b/include/hardware/camera3.h index 75efa28f..03db10cd 100644 --- a/include/hardware/camera3.h +++ b/include/hardware/camera3.h @@ -196,6 +196,10 @@ * stream_configuration_counter to camera3_stream_configuration_t to address the potential * race condition between signal_stream_flush() call and configure_streams() call. * + * - Add CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID to support BLOB with only JPEG apps + * segments and thumbnail (without main image bitstream). Camera framework + * uses such stream togerther with a HAL YUV_420_888/IMPLEMENTATION_DEFINED + * stream to encode HEIC (ISO/IEC 23008-12) image. */ /** @@ -1964,21 +1968,25 @@ typedef struct camera3_stream_buffer_set { /** * camera3_jpeg_blob: * - * Transport header for compressed JPEG buffers in output streams. + * Transport header for compressed JPEG or JPEG_APP_SEGMENTS buffers in output streams. * - * To capture JPEG images, a stream is created using the pixel format + * To capture JPEG or JPEG_APP_SEGMENTS images, a stream is created using the pixel format * HAL_PIXEL_FORMAT_BLOB. The buffer size for the stream is calculated by the - * framework, based on the static metadata field android.jpeg.maxSize. Since - * compressed JPEG images are of variable size, the HAL needs to include the - * final size of the compressed image using this structure inside the output - * stream buffer. The JPEG blob ID field must be set to CAMERA3_JPEG_BLOB_ID. + * framework, based on the static metadata field android.jpeg.maxSize for JPEG, + * and android.jpeg.maxAppsSegments for JPEG_APP_SEGMENTS. * - * Transport header should be at the end of the JPEG output stream buffer. That + * Since compressed JPEG/JPEG_APP_SEGMENTS images are of variable size, the HAL needs to + * include the final size of the image using this structure inside the output + * stream buffer. The JPEG blob ID field must be set to CAMERA3_JPEG_BLOB_ID for + * JPEG and CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID for APP segments. + * + * Transport header should be at the end of the output stream buffer. That * means the jpeg_blob_id must start at byte[buffer_size - * sizeof(camera3_jpeg_blob)], where the buffer_size is the size of gralloc buffer. - * Any HAL using this transport header must account for it in android.jpeg.maxSize - * The JPEG data itself starts at the beginning of the buffer and should be - * jpeg_size bytes long. + * The blob data itself starts at the beginning of the buffer and should be + * jpeg_size bytes long. HAL using this transport header for JPEG must account for + * it in android.jpeg.maxSize. For JPEG APP segments, camera framework makes + * sure that the output stream buffer is large enough for the transport header. */ typedef struct camera3_jpeg_blob { uint16_t jpeg_blob_id; @@ -1986,7 +1994,8 @@ typedef struct camera3_jpeg_blob { } camera3_jpeg_blob_t; enum { - CAMERA3_JPEG_BLOB_ID = 0x00FF + CAMERA3_JPEG_BLOB_ID = 0x00FF, + CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID = 0x0100, }; /********************************************************************** diff --git a/include/hardware/gralloc.h b/include/hardware/gralloc.h index 5dafea02..b4f7e5a4 100644 --- a/include/hardware/gralloc.h +++ b/include/hardware/gralloc.h @@ -131,6 +131,9 @@ enum { * handle this flag. */ GRALLOC_USAGE_FOREIGN_BUFFERS = 0x00200000U, + /* buffer will be used as input to HW HEIC image encoder */ + GRALLOC_USAGE_HW_IMAGE_ENCODER = 0x08000000U, + /* Mask of all flags which could be passed to a gralloc module for buffer * allocation. Any flags not in this mask do not need to be handled by * gralloc modules. */ |