From 80e67aedf29ffe7e7ccd8b1c1525dc76a4611384 Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Thu, 9 Feb 2023 00:22:23 +0000 Subject: [PATCH] Camera: Document limitation on private reprocessing For private reprocessing, the ImageReader used to produce images into the ImageWriter isn't aware of the overridden format. If the HAL decides to override the input IMPLEMENTATION_DEFINED format, reprocessing will fail. Document this limitation in the HAL interface. Test: Build Bug: 266954992 Change-Id: I9bd05e9682e4d11870bf9bd25763f28291faef75 --- camera/device/3.2/types.hal | 11 +++++++---- .../android/hardware/camera/device/HalStream.aidl | 5 ++++- current.txt | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/camera/device/3.2/types.hal b/camera/device/3.2/types.hal index 276e92a3ee..3989161667 100644 --- a/camera/device/3.2/types.hal +++ b/camera/device/3.2/types.hal @@ -346,15 +346,18 @@ struct HalStream { * An override pixel format for the buffers in this stream. * * The HAL must respect the requested format in Stream unless it is - * IMPLEMENTATION_DEFINED, in which case the override format here must be - * used by the client instead, for this stream. This allows cross-platform - * HALs to use a standard format since IMPLEMENTATION_DEFINED formats often - * require device-specific information. In all other cases, the + * IMPLEMENTATION_DEFINED output, in which case the override format + * here must be used by the client instead, for this stream. This allows + * cross-platform HALs to use a standard format since IMPLEMENTATION_DEFINED + * formats often require device-specific information. In all other cases, the * overrideFormat must match the requested format. * * When HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform * gralloc module must select a format based on the usage flags provided by * the camera device and the other endpoint of the stream. + * + * For private reprocessing, the HAL must not override the input stream's + * IMPLEMENTATION_DEFINED format. */ android.hardware.graphics.common@1.0::PixelFormat overrideFormat; diff --git a/camera/device/aidl/android/hardware/camera/device/HalStream.aidl b/camera/device/aidl/android/hardware/camera/device/HalStream.aidl index b8ec3deec5..25a80bc16c 100644 --- a/camera/device/aidl/android/hardware/camera/device/HalStream.aidl +++ b/camera/device/aidl/android/hardware/camera/device/HalStream.aidl @@ -38,7 +38,7 @@ parcelable HalStream { * An override pixel format for the buffers in this stream. * * The HAL must respect the requested format in Stream unless it is - * IMPLEMENTATION_DEFINED, in which case the override format here must be + * IMPLEMENTATION_DEFINED output, in which case the override format here must be * used by the client instead, for this stream. This allows cross-platform * HALs to use a standard format since IMPLEMENTATION_DEFINED formats often * require device-specific information. In all other cases, the @@ -47,6 +47,9 @@ parcelable HalStream { * When HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED is used, then the platform * gralloc module must select a format based on the usage flags provided by * the camera device and the other endpoint of the stream. + * + * For private reprocessing, the HAL must not override the input stream's + * IMPLEMENTATION_DEFINED format. */ android.hardware.graphics.common.PixelFormat overrideFormat; diff --git a/current.txt b/current.txt index ef1f65a4b6..358d05a60e 100644 --- a/current.txt +++ b/current.txt @@ -934,5 +934,6 @@ b7ce2d87841585551b082fca6d099622e63b7099e0d8013f687ea1a1dc35c4dc android.hardwar 42abd285a4293dadb8c89bc63b90cae2872fbffe90c4517aa3ea4965e8aecff7 android.hardware.graphics.common@1.2::types 4f1a02d21a22104c734f71cdbba19b6f7e93d4ee107ff79f0dbdd171a8430e0e android.hardware.automotive.vehicle@2.0::types a2fbd9747fbb9ceb8c1090b5a24138312246502d5af0654a8c2b603a9bf521fc android.hardware.gnss@1.0::IGnssCallback +889b59e3e7a59afa67bf19882a44f51a2f9e43b6556ec52baa9ec3efd1ef7fbe android.hardware.camera.device@3.2::types # There will be no more HIDL HALs. Use AIDL instead.