diff options
author | Alex Ray <aray@google.com> | 2012-09-27 15:48:23 -0700 |
---|---|---|
committer | Alex Ray <aray@google.com> | 2012-09-27 22:08:55 -0700 |
commit | cecacd4e71c35fd50dbe1e9855cbab0faa17b550 (patch) | |
tree | ae1259beb39c7b159f1d4ea0d00c761f8142e5fd /include | |
parent | 3a90d5964bc17ace1097e06a62d0410241c6c99c (diff) | |
download | hardware_libhardware-cecacd4e71c35fd50dbe1e9855cbab0faa17b550.zip hardware_libhardware-cecacd4e71c35fd50dbe1e9855cbab0faa17b550.tar.gz hardware_libhardware-cecacd4e71c35fd50dbe1e9855cbab0faa17b550.tar.bz2 |
Camera2: Change JPEG transport header
The way buffers are passed to JPEG encoders makes it difficult to
account for a header offset. This explains moving the header to
the end, and clarifies the required header packing.
Bug: 7108816
Change-Id: I569cd0cde37bd6fd7110fbc95d7fced9a55cff9c
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware/camera2.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/hardware/camera2.h b/include/hardware/camera2.h index 8587fc5..5d45325 100644 --- a/include/hardware/camera2.h +++ b/include/hardware/camera2.h @@ -122,11 +122,16 @@ enum { * 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 CAMERA2_JPEG_BLOB_ID. + * + * Transport header should be at the end of the JPEG output stream buffer. That + * means the jpeg_blob_id must start at byte[android.jpeg.maxSize - + * sizeof(camera2_jpeg_blob)]. Any HAL using this transport header must + * account for it in android.jpeg.maxSize. The JPEG data itself starts at + * byte[0] and should be jpeg_size bytes long. */ typedef struct camera2_jpeg_blob { uint16_t jpeg_blob_id; uint32_t jpeg_size; - uint8_t jpeg_data[0]; }; enum { |