Merge "android_media_Utils: update camera_jpeg_blob definition to match aidl." into tm-dev am: dc95eae46e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17915803 Change-Id: I4c02c49754d87aee6006fc48ad160f8fb82092fa Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
#define LOG_TAG "AndroidMediaUtils"
|
||||
|
||||
#include <aidl/android/hardware/graphics/common/PlaneLayoutComponentType.h>
|
||||
#include <hardware/camera3.h>
|
||||
#include <ui/GraphicBufferMapper.h>
|
||||
#include <ui/GraphicTypes.h>
|
||||
#include <utils/Log.h>
|
||||
|
||||
#include "android_media_Utils.h"
|
||||
|
||||
#define ALIGN(x, mask) ( ((x) + (mask) - 1) & ~((mask) - 1) )
|
||||
@@ -122,8 +122,8 @@ uint32_t Image_getBlobSize(LockedImage* buffer, bool usingRGBAOverride) {
|
||||
}
|
||||
|
||||
// First check for BLOB transport header at the end of the buffer
|
||||
uint8_t* header = blobBuffer + (width - sizeof(struct camera3_jpeg_blob));
|
||||
struct camera3_jpeg_blob *blob = (struct camera3_jpeg_blob*)(header);
|
||||
uint8_t* header = blobBuffer + (width - sizeof(struct camera3_jpeg_blob_v2));
|
||||
struct camera3_jpeg_blob_v2 *blob = (struct camera3_jpeg_blob_v2*)(header);
|
||||
if (blob->jpeg_blob_id == CAMERA3_JPEG_BLOB_ID ||
|
||||
blob->jpeg_blob_id == CAMERA3_HEIC_BLOB_ID) {
|
||||
size = blob->jpeg_size;
|
||||
|
||||
@@ -50,6 +50,20 @@ int getBufferWidth(BufferItem *buffer);
|
||||
|
||||
int getBufferHeight(BufferItem *buffer);
|
||||
|
||||
// Must be in sync with AIDL CameraBlob : android.hardware.camera.device.CameraBlob
|
||||
// HALs must NOT copy this definition.
|
||||
// for details: http://b/229688810
|
||||
typedef struct camera3_jpeg_blob_v2 {
|
||||
uint32_t jpeg_blob_id;
|
||||
uint32_t jpeg_size;
|
||||
} camera3_jpeg_blobv2_t;
|
||||
|
||||
// Must be in sync with AIDL CameraBlob : android.hardware.camera.device.CameraBlobId
|
||||
enum {
|
||||
CAMERA3_JPEG_BLOB_ID = 0x00FF,
|
||||
CAMERA3_JPEG_APP_SEGMENTS_BLOB_ID = 0x0100,
|
||||
};
|
||||
|
||||
}; // namespace android
|
||||
|
||||
#endif // _ANDROID_MEDIA_UTILS_H_
|
||||
|
||||
Reference in New Issue
Block a user