Loading camera/camera_platform.aconfig +6 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,9 @@ flag { bug: "300515796" } flag { namespace: "camera_platform" name: "camera_manual_flash_strength_control" description: "Flash brightness level control in manual flash mode" bug: "238348881" } camera/ndk/impl/ACameraMetadata.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,7 @@ ACameraMetadata::isCaptureRequestTag(const uint32_t tag) { case ACAMERA_CONTROL_AUTOFRAMING: case ACAMERA_EDGE_MODE: case ACAMERA_FLASH_MODE: case ACAMERA_FLASH_STRENGTH_LEVEL: case ACAMERA_HOT_PIXEL_MODE: case ACAMERA_JPEG_GPS_COORDINATES: case ACAMERA_JPEG_GPS_PROCESSING_METHOD: Loading camera/ndk/include/camera/NdkCameraMetadataTags.h +119 −0 Original line number Diff line number Diff line Loading @@ -2358,6 +2358,125 @@ typedef enum acamera_metadata_tag { */ ACAMERA_FLASH_STATE = // byte (acamera_metadata_enum_android_flash_state_t) ACAMERA_FLASH_START + 5, /** * <p>Flash strength level to be used when manual flash control is active.</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li> * <li>ACaptureRequest</li> * </ul></p> * * <p>Flash strength level to use in capture mode i.e. when the applications control * flash with either SINGLE or TORCH mode.</p> * <p>Use android.flash.info.singleStrengthMaxLevel and * android.flash.info.torchStrengthMaxLevel to check whether the device supports * flash strength control or not. * If the values of android.flash.info.singleStrengthMaxLevel and * android.flash.info.torchStrengthMaxLevel are greater than 1, * then the device supports manual flash strength control.</p> * <p>If the ACAMERA_FLASH_MODE <code>==</code> TORCH the value must be >= 1 * and <= android.flash.info.torchStrengthMaxLevel. * If the application doesn't set the key and * android.flash.info.torchStrengthMaxLevel > 1, * then the flash will be fired at the default level set by HAL in * android.flash.info.torchStrengthDefaultLevel. * If the ACAMERA_FLASH_MODE <code>==</code> SINGLE, then the value must be >= 1 * and <= android.flash.info.singleStrengthMaxLevel. * If the application does not set this key and * android.flash.info.singleStrengthMaxLevel > 1, * then the flash will be fired at the default level set by HAL * in android.flash.info.singleStrengthDefaultLevel. * If ACAMERA_CONTROL_AE_MODE is set to any of ON_AUTO_FLASH, ON_ALWAYS_FLASH, * ON_AUTO_FLASH_REDEYE, ON_EXTERNAL_FLASH values, then the strengthLevel will be ignored.</p> * * @see ACAMERA_CONTROL_AE_MODE * @see ACAMERA_FLASH_MODE */ ACAMERA_FLASH_STRENGTH_LEVEL = // int32 ACAMERA_FLASH_START + 6, /** * <p>Maximum flash brightness level for manual flash control in SINGLE mode.</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Maximum flash brightness level in camera capture mode and * ACAMERA_FLASH_MODE set to SINGLE. * Value will be > 1 if the manual flash strength control feature is supported, * otherwise the value will be equal to 1. * Note that this level is just a number of supported levels (the granularity of control). * There is no actual physical power units tied to this level.</p> * * @see ACAMERA_FLASH_MODE */ ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL = // int32 ACAMERA_FLASH_START + 7, /** * <p>Default flash brightness level for manual flash control in SINGLE mode.</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>If flash unit is available this will be greater than or equal to 1 and less * or equal to <code>android.flash.info.singleStrengthMaxLevel</code>. * Note for devices that do not support the manual flash strength control * feature, this level will always be equal to 1.</p> */ ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL = // int32 ACAMERA_FLASH_START + 8, /** * <p>Maximum flash brightness level for manual flash control in TORCH mode</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Maximum flash brightness level in camera capture mode and * ACAMERA_FLASH_MODE set to TORCH. * Value will be > 1 if the manual flash strength control feature is supported, * otherwise the value will be equal to 1.</p> * <p>Note that this level is just a number of supported levels(the granularity of control). * There is no actual physical power units tied to this level. * There is no relation between android.flash.info.torchStrengthMaxLevel and * android.flash.info.singleStrengthMaxLevel i.e. the ratio of * android.flash.info.torchStrengthMaxLevel:android.flash.info.singleStrengthMaxLevel * is not guaranteed to be the ratio of actual brightness.</p> * * @see ACAMERA_FLASH_MODE */ ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL = // int32 ACAMERA_FLASH_START + 9, /** * <p>Default flash brightness level for manual flash control in TORCH mode</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>If flash unit is available this will be greater than or equal to 1 and less * or equal to android.flash.info.torchStrengthMaxLevel. * Note for the devices that do not support the manual flash strength control feature, * this level will always be equal to 1.</p> */ ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL = // int32 ACAMERA_FLASH_START + 10, ACAMERA_FLASH_END, /** Loading services/camera/libcameraservice/aidl/VndkVersionMetadataTags.h +5 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,10 @@ std::map<int, std::vector<camera_metadata_tag>> static_api_level_to_keys{ {34, { ANDROID_CONTROL_AUTOFRAMING_AVAILABLE, ANDROID_CONTROL_AVAILABLE_SETTINGS_OVERRIDES, ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL, ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL, ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL, ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL, ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS, ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS, Loading Loading @@ -108,6 +112,7 @@ std::map<int, std::vector<camera_metadata_tag>> dynamic_api_level_to_keys{ ANDROID_CONTROL_SETTINGS_OVERRIDING_FRAME_NUMBER, ANDROID_EXTENSION_CURRENT_TYPE, ANDROID_EXTENSION_STRENGTH, ANDROID_FLASH_STRENGTH_LEVEL, ANDROID_SCALER_RAW_CROP_REGION, } }, }; Loading
camera/camera_platform.aconfig +6 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,9 @@ flag { bug: "300515796" } flag { namespace: "camera_platform" name: "camera_manual_flash_strength_control" description: "Flash brightness level control in manual flash mode" bug: "238348881" }
camera/ndk/impl/ACameraMetadata.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,7 @@ ACameraMetadata::isCaptureRequestTag(const uint32_t tag) { case ACAMERA_CONTROL_AUTOFRAMING: case ACAMERA_EDGE_MODE: case ACAMERA_FLASH_MODE: case ACAMERA_FLASH_STRENGTH_LEVEL: case ACAMERA_HOT_PIXEL_MODE: case ACAMERA_JPEG_GPS_COORDINATES: case ACAMERA_JPEG_GPS_PROCESSING_METHOD: Loading
camera/ndk/include/camera/NdkCameraMetadataTags.h +119 −0 Original line number Diff line number Diff line Loading @@ -2358,6 +2358,125 @@ typedef enum acamera_metadata_tag { */ ACAMERA_FLASH_STATE = // byte (acamera_metadata_enum_android_flash_state_t) ACAMERA_FLASH_START + 5, /** * <p>Flash strength level to be used when manual flash control is active.</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li> * <li>ACaptureRequest</li> * </ul></p> * * <p>Flash strength level to use in capture mode i.e. when the applications control * flash with either SINGLE or TORCH mode.</p> * <p>Use android.flash.info.singleStrengthMaxLevel and * android.flash.info.torchStrengthMaxLevel to check whether the device supports * flash strength control or not. * If the values of android.flash.info.singleStrengthMaxLevel and * android.flash.info.torchStrengthMaxLevel are greater than 1, * then the device supports manual flash strength control.</p> * <p>If the ACAMERA_FLASH_MODE <code>==</code> TORCH the value must be >= 1 * and <= android.flash.info.torchStrengthMaxLevel. * If the application doesn't set the key and * android.flash.info.torchStrengthMaxLevel > 1, * then the flash will be fired at the default level set by HAL in * android.flash.info.torchStrengthDefaultLevel. * If the ACAMERA_FLASH_MODE <code>==</code> SINGLE, then the value must be >= 1 * and <= android.flash.info.singleStrengthMaxLevel. * If the application does not set this key and * android.flash.info.singleStrengthMaxLevel > 1, * then the flash will be fired at the default level set by HAL * in android.flash.info.singleStrengthDefaultLevel. * If ACAMERA_CONTROL_AE_MODE is set to any of ON_AUTO_FLASH, ON_ALWAYS_FLASH, * ON_AUTO_FLASH_REDEYE, ON_EXTERNAL_FLASH values, then the strengthLevel will be ignored.</p> * * @see ACAMERA_CONTROL_AE_MODE * @see ACAMERA_FLASH_MODE */ ACAMERA_FLASH_STRENGTH_LEVEL = // int32 ACAMERA_FLASH_START + 6, /** * <p>Maximum flash brightness level for manual flash control in SINGLE mode.</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Maximum flash brightness level in camera capture mode and * ACAMERA_FLASH_MODE set to SINGLE. * Value will be > 1 if the manual flash strength control feature is supported, * otherwise the value will be equal to 1. * Note that this level is just a number of supported levels (the granularity of control). * There is no actual physical power units tied to this level.</p> * * @see ACAMERA_FLASH_MODE */ ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL = // int32 ACAMERA_FLASH_START + 7, /** * <p>Default flash brightness level for manual flash control in SINGLE mode.</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>If flash unit is available this will be greater than or equal to 1 and less * or equal to <code>android.flash.info.singleStrengthMaxLevel</code>. * Note for devices that do not support the manual flash strength control * feature, this level will always be equal to 1.</p> */ ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL = // int32 ACAMERA_FLASH_START + 8, /** * <p>Maximum flash brightness level for manual flash control in TORCH mode</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Maximum flash brightness level in camera capture mode and * ACAMERA_FLASH_MODE set to TORCH. * Value will be > 1 if the manual flash strength control feature is supported, * otherwise the value will be equal to 1.</p> * <p>Note that this level is just a number of supported levels(the granularity of control). * There is no actual physical power units tied to this level. * There is no relation between android.flash.info.torchStrengthMaxLevel and * android.flash.info.singleStrengthMaxLevel i.e. the ratio of * android.flash.info.torchStrengthMaxLevel:android.flash.info.singleStrengthMaxLevel * is not guaranteed to be the ratio of actual brightness.</p> * * @see ACAMERA_FLASH_MODE */ ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL = // int32 ACAMERA_FLASH_START + 9, /** * <p>Default flash brightness level for manual flash control in TORCH mode</p> * * <p>Type: int32</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>If flash unit is available this will be greater than or equal to 1 and less * or equal to android.flash.info.torchStrengthMaxLevel. * Note for the devices that do not support the manual flash strength control feature, * this level will always be equal to 1.</p> */ ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL = // int32 ACAMERA_FLASH_START + 10, ACAMERA_FLASH_END, /** Loading
services/camera/libcameraservice/aidl/VndkVersionMetadataTags.h +5 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,10 @@ std::map<int, std::vector<camera_metadata_tag>> static_api_level_to_keys{ {34, { ANDROID_CONTROL_AUTOFRAMING_AVAILABLE, ANDROID_CONTROL_AVAILABLE_SETTINGS_OVERRIDES, ANDROID_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL, ANDROID_FLASH_SINGLE_STRENGTH_MAX_LEVEL, ANDROID_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL, ANDROID_FLASH_TORCH_STRENGTH_MAX_LEVEL, ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS, ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION, ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS, Loading Loading @@ -108,6 +112,7 @@ std::map<int, std::vector<camera_metadata_tag>> dynamic_api_level_to_keys{ ANDROID_CONTROL_SETTINGS_OVERRIDING_FRAME_NUMBER, ANDROID_EXTENSION_CURRENT_TYPE, ANDROID_EXTENSION_STRENGTH, ANDROID_FLASH_STRENGTH_LEVEL, ANDROID_SCALER_RAW_CROP_REGION, } }, };