From 76548fe3842cf21fd424435c5e31210f39541b1a Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Fri, 11 Jan 2013 13:57:19 -0800 Subject: [PATCH] Camera: Fix ordering of boolean enums, types for curves. - Flipping boolean enumeration definition confused some HAL implementations. - Tonemap curves should all be type float. Bug: 7974125 Change-Id: I533888af5fc7f1fa709d758f1f9de1c2c3b475a3 --- camera/docs/docs.html | 30 ++++++++++++++-------------- camera/docs/metadata_properties.xml | 18 ++++++++--------- camera/include/system/camera_metadata_tags.h | 4 ++-- camera/src/camera_metadata_tag_info.c | 20 +++++++++---------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/camera/docs/docs.html b/camera/docs/docs.html index 94834d1a..9f5ad50b 100644 --- a/camera/docs/docs.html +++ b/camera/docs/docs.html @@ -673,16 +673,16 @@ @@ -1039,17 +1039,17 @@ @@ -9361,7 +9361,7 @@ android.tonemap.curveBlue - byte + float @@ -9393,7 +9393,7 @@ android.tonemap.curveGreen - byte + float @@ -9603,7 +9603,7 @@ android.tonemap.curveBlue - byte + float @@ -9635,7 +9635,7 @@ android.tonemap.curveGreen - byte + float diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml index 99f58440..d0a1d335 100644 --- a/camera/docs/metadata_properties.xml +++ b/camera/docs/metadata_properties.xml @@ -105,13 +105,13 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata + OFF + Autoexposure lock is disabled; the AE algorithm + is free to update its parameters. ON Autoexposure lock is enabled; the AE algorithm must not update the exposure and sensitivity parameters while the lock is active - OFF - Autoexposure lock is disabled; the AE algorithm - is free to update its parameters. Whether AE is currently locked to its latest calculated values @@ -279,14 +279,14 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata - ON - Auto-whitebalance lock is enabled; the AWB - algorithm must not update the exposure and sensitivity - parameters while the lock is active OFF Auto-whitebalance lock is disabled; the AWB algorithm is free to update its parameters if in AUTO mode. + ON + Auto-whitebalance lock is enabled; the AWB + algorithm must not update the exposure and sensitivity + parameters while the lock is active Whether AWB is currently locked to its latest calculated values @@ -2092,13 +2092,13 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
- + Table mapping blue input values to output values same as android.tonemap.curveRed same as android.tonemap.curveRed - + Table mapping green input values to output values same as android.tonemap.curveRed diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h index 2cd5b319..8d20ae83 100644 --- a/camera/include/system/camera_metadata_tags.h +++ b/camera/include/system/camera_metadata_tags.h @@ -323,8 +323,8 @@ typedef enum camera_metadata_enum_android_control_ae_antibanding_mode { // ANDROID_CONTROL_AE_LOCK typedef enum camera_metadata_enum_android_control_ae_lock { - ANDROID_CONTROL_AE_LOCK_ON, ANDROID_CONTROL_AE_LOCK_OFF, + ANDROID_CONTROL_AE_LOCK_ON, } camera_metadata_enum_android_control_ae_lock_t; // ANDROID_CONTROL_AE_MODE @@ -348,8 +348,8 @@ typedef enum camera_metadata_enum_android_control_af_mode { // ANDROID_CONTROL_AWB_LOCK typedef enum camera_metadata_enum_android_control_awb_lock { - ANDROID_CONTROL_AWB_LOCK_ON, ANDROID_CONTROL_AWB_LOCK_OFF, + ANDROID_CONTROL_AWB_LOCK_ON, } camera_metadata_enum_android_control_awb_lock_t; // ANDROID_CONTROL_AWB_MODE diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c index c9161cf7..e8d340a7 100644 --- a/camera/src/camera_metadata_tag_info.c +++ b/camera/src/camera_metadata_tag_info.c @@ -489,9 +489,9 @@ static tag_info_t android_statistics_info[ANDROID_STATISTICS_INFO_END - static tag_info_t android_tonemap[ANDROID_TONEMAP_END - ANDROID_TONEMAP_START] = { [ ANDROID_TONEMAP_CURVE_BLUE - ANDROID_TONEMAP_START ] = - { "curveBlue", TYPE_BYTE }, + { "curveBlue", TYPE_FLOAT }, [ ANDROID_TONEMAP_CURVE_GREEN - ANDROID_TONEMAP_START ] = - { "curveGreen", TYPE_BYTE }, + { "curveGreen", TYPE_FLOAT }, [ ANDROID_TONEMAP_CURVE_RED - ANDROID_TONEMAP_START ] = { "curveRed", TYPE_FLOAT }, [ ANDROID_TONEMAP_MODE - ANDROID_TONEMAP_START ] = @@ -585,14 +585,14 @@ int camera_metadata_enum_snprint(uint32_t tag, } case ANDROID_CONTROL_AE_LOCK: { switch (value) { - case ANDROID_CONTROL_AE_LOCK_ON: - msg = "ON"; - ret = 0; - break; case ANDROID_CONTROL_AE_LOCK_OFF: msg = "OFF"; ret = 0; break; + case ANDROID_CONTROL_AE_LOCK_ON: + msg = "ON"; + ret = 0; + break; default: msg = "error: enum value out of range"; } @@ -667,14 +667,14 @@ int camera_metadata_enum_snprint(uint32_t tag, } case ANDROID_CONTROL_AWB_LOCK: { switch (value) { - case ANDROID_CONTROL_AWB_LOCK_ON: - msg = "ON"; - ret = 0; - break; case ANDROID_CONTROL_AWB_LOCK_OFF: msg = "OFF"; ret = 0; break; + case ANDROID_CONTROL_AWB_LOCK_ON: + msg = "ON"; + ret = 0; + break; default: msg = "error: enum value out of range"; } -- 2.11.0