mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 23:39:44 +03:00
android: camera_device: Report AE_EXPOSURE_COMPENSATION
The CaptureResultTest#testCameraCaptureResultAllKeys enforces the presence of the ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION result metadata. Report 0 as the current value for ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION in the result metadata pack. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
520c3664bc
commit
e9c2875aea
1 changed files with 8 additions and 3 deletions
|
@ -705,10 +705,10 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* \todo Keep this in sync with the actual number of entries.
|
* \todo Keep this in sync with the actual number of entries.
|
||||||
* Currently: 53 entries, 842 bytes of static metadata
|
* Currently: 53 entries, 846 bytes of static metadata
|
||||||
*/
|
*/
|
||||||
uint32_t numEntries = 53;
|
uint32_t numEntries = 53;
|
||||||
uint32_t byteSize = 842;
|
uint32_t byteSize = 846;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate space occupation in bytes for dynamically built metadata
|
* Calculate space occupation in bytes for dynamically built metadata
|
||||||
|
@ -1290,6 +1290,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
|
||||||
std::vector<int32_t> availableResultKeys = {
|
std::vector<int32_t> availableResultKeys = {
|
||||||
ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
|
ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
|
||||||
ANDROID_CONTROL_AE_ANTIBANDING_MODE,
|
ANDROID_CONTROL_AE_ANTIBANDING_MODE,
|
||||||
|
ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
|
||||||
ANDROID_CONTROL_AE_LOCK,
|
ANDROID_CONTROL_AE_LOCK,
|
||||||
ANDROID_CONTROL_AE_MODE,
|
ANDROID_CONTROL_AE_MODE,
|
||||||
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
|
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
|
||||||
|
@ -2006,7 +2007,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
|
||||||
* Total bytes for JPEG metadata: 82
|
* Total bytes for JPEG metadata: 82
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<CameraMetadata> resultMetadata =
|
std::unique_ptr<CameraMetadata> resultMetadata =
|
||||||
std::make_unique<CameraMetadata>(41, 157);
|
std::make_unique<CameraMetadata>(42, 161);
|
||||||
if (!resultMetadata->isValid()) {
|
if (!resultMetadata->isValid()) {
|
||||||
LOG(HAL, Error) << "Failed to allocate static metadata";
|
LOG(HAL, Error) << "Failed to allocate static metadata";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -2025,6 +2026,10 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
|
||||||
value = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;
|
value = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;
|
||||||
resultMetadata->addEntry(ANDROID_CONTROL_AE_ANTIBANDING_MODE, &value, 1);
|
resultMetadata->addEntry(ANDROID_CONTROL_AE_ANTIBANDING_MODE, &value, 1);
|
||||||
|
|
||||||
|
int32_t value32 = 0;
|
||||||
|
resultMetadata->addEntry(ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
|
||||||
|
&value32, 1);
|
||||||
|
|
||||||
value = ANDROID_CONTROL_AE_LOCK_OFF;
|
value = ANDROID_CONTROL_AE_LOCK_OFF;
|
||||||
resultMetadata->addEntry(ANDROID_CONTROL_AE_LOCK, &value, 1);
|
resultMetadata->addEntry(ANDROID_CONTROL_AE_LOCK, &value, 1);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue