10dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh/* 20dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * Copyright (C) 2015 The Android Open Source Project 30dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * 40dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * Licensed under the Apache License, Version 2.0 (the "License"); 50dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * you may not use this file except in compliance with the License. 60dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * You may obtain a copy of the License at 70dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * 80dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * http://www.apache.org/licenses/LICENSE-2.0 90dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * 100dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * Unless required by applicable law or agreed to in writing, software 110dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * distributed under the License is distributed on an "AS IS" BASIS, 120dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 130dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * See the License for the specific language governing permissions and 140dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * limitations under the License. 150dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh */ 160dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 170dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh//#define LOG_NDEBUG 0 180dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#define LOG_TAG "ACameraMetadata" 190dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 200dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#include "ACameraMetadata.h" 210dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh#include <utils/Vector.h> 22c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh#include <system/graphics.h> 23c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh#include "NdkImage.h" 240dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 250dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehusing namespace android; 260dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 270dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh/** 280dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * ACameraMetadata Implementation 290dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh */ 300dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::ACameraMetadata(camera_metadata_t* buffer, ACAMERA_METADATA_TYPE type) : 310dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh mData(buffer), mType(type) { 32ead9146f844ee194a4f4244ba8ae1a3aece12b63Yin-Chia Yeh if (mType == ACM_CHARACTERISTICS) { 33ead9146f844ee194a4f4244ba8ae1a3aece12b63Yin-Chia Yeh filterUnsupportedFeatures(); 34c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filterStreamConfigurations(); 35ead9146f844ee194a4f4244ba8ae1a3aece12b63Yin-Chia Yeh } 36ead9146f844ee194a4f4244ba8ae1a3aece12b63Yin-Chia Yeh // TODO: filter request/result keys 370dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 380dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 390dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehbool 400dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::isNdkSupportedCapability(int32_t capability) { 410dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh switch (capability) { 420dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE: 430dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR: 440dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING: 450dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_RAW: 460dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS: 470dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE: 480dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT: 490dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return true; 500dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING: 510dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING: 520dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO: 530dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return false; 540dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh default: 550dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh // Newly defined capabilities will be unsupported by default (blacklist) 560dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh // TODO: Should we do whitelist or blacklist here? 570dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh ALOGE("%s: Unknonwn capability %d", __FUNCTION__, capability); 580dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return false; 590dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 600dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 610dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 620dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehvoid 630dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::filterUnsupportedFeatures() { 640dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh // Hide unsupported capabilities (reprocessing) 650dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh camera_metadata_entry entry = mData.find(ANDROID_REQUEST_AVAILABLE_CAPABILITIES); 66c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh if (entry.count == 0 || entry.type != TYPE_BYTE) { 670dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh ALOGE("%s: malformed available capability key! count %zu, type %d", 680dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh __FUNCTION__, entry.count, entry.type); 690dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return; 700dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 710dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 720dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh Vector<uint8_t> capabilities; 730dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh capabilities.setCapacity(entry.count); 740dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh for (size_t i = 0; i < entry.count; i++) { 750dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh uint8_t capability = entry.data.u8[i]; 760dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh if (isNdkSupportedCapability(capability)) { 770dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh capabilities.push(capability); 780dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 790dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 800dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh mData.update(ANDROID_REQUEST_AVAILABLE_CAPABILITIES, capabilities); 81c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh} 82c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 83c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 84c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yehvoid 85c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia YehACameraMetadata::filterStreamConfigurations() { 86c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh const int STREAM_CONFIGURATION_SIZE = 4; 87c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh const int STREAM_FORMAT_OFFSET = 0; 88c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh const int STREAM_WIDTH_OFFSET = 1; 89c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh const int STREAM_HEIGHT_OFFSET = 2; 90c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh const int STREAM_IS_INPUT_OFFSET = 3; 91c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh camera_metadata_entry entry = mData.find(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS); 92c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh if (entry.count == 0 || entry.count % 4 || entry.type != TYPE_INT32) { 93c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh ALOGE("%s: malformed available stream configuration key! count %zu, type %d", 94c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh __FUNCTION__, entry.count, entry.type); 95c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh return; 96c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 97c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 98c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh Vector<int32_t> filteredStreamConfigs; 99c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredStreamConfigs.setCapacity(entry.count); 100c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 101c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh for (size_t i=0; i < entry.count; i += STREAM_CONFIGURATION_SIZE) { 102c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t format = entry.data.i32[i + STREAM_FORMAT_OFFSET]; 103c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t width = entry.data.i32[i + STREAM_WIDTH_OFFSET]; 104c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t height = entry.data.i32[i + STREAM_HEIGHT_OFFSET]; 105c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t isInput = entry.data.i32[i + STREAM_IS_INPUT_OFFSET]; 106c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh if (isInput == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT) { 107c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh // Hide input streams 108c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh continue; 109c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 110c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh // Translate HAL formats to NDK format 111c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh if (format == HAL_PIXEL_FORMAT_BLOB) { 112c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh format = AIMAGE_FORMAT_JPEG; 113c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 114c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredStreamConfigs.push_back(format); 115c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredStreamConfigs.push_back(width); 116c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredStreamConfigs.push_back(height); 117c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredStreamConfigs.push_back(isInput); 118c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 119c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 120c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh mData.update(ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, filteredStreamConfigs); 121c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 122c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh entry = mData.find(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS); 123c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh Vector<int32_t> filteredDepthStreamConfigs; 124c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredDepthStreamConfigs.setCapacity(entry.count); 125c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 126c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh for (size_t i=0; i < entry.count; i += STREAM_CONFIGURATION_SIZE) { 127c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t format = entry.data.i32[i + STREAM_FORMAT_OFFSET]; 128c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t width = entry.data.i32[i + STREAM_WIDTH_OFFSET]; 129c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t height = entry.data.i32[i + STREAM_HEIGHT_OFFSET]; 130c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh int32_t isInput = entry.data.i32[i + STREAM_IS_INPUT_OFFSET]; 131c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh if (isInput == ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT) { 132c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh // Hide input streams 133c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh continue; 134c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 135c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh // Translate HAL formats to NDK format 136c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh if (format == HAL_PIXEL_FORMAT_BLOB) { 137c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh format = AIMAGE_FORMAT_DEPTH_POINT_CLOUD; 138c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } else if (format == HAL_PIXEL_FORMAT_Y16) { 139c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh format = AIMAGE_FORMAT_DEPTH16; 140c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 141c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh 142c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredDepthStreamConfigs.push_back(format); 143c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredDepthStreamConfigs.push_back(width); 144c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredDepthStreamConfigs.push_back(height); 145c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh filteredDepthStreamConfigs.push_back(isInput); 146c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh } 147c360382bf257d815b2a411152485d3c3b37a9f46Yin-Chia Yeh mData.update(ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, filteredDepthStreamConfigs); 1480dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1490dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1500dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehbool 1510dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::isVendorTag(const uint32_t tag) { 1520dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh uint32_t tag_section = tag >> 16; 1530dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh if (tag_section >= VENDOR_SECTION) { 1540dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return true; 1550dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 1560dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return false; 1570dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1580dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1590dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 1600dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::getConstEntry(uint32_t tag, ACameraMetadata_const_entry* entry) const { 1610dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh if (entry == nullptr) { 1620dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return ACAMERA_ERROR_INVALID_PARAMETER; 1630dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 1640dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1658aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh Mutex::Autolock _l(mLock); 1668aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh 1670dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh camera_metadata_ro_entry rawEntry = mData.find(tag); 1680dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh if (rawEntry.count == 0) { 1690dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh ALOGE("%s: cannot find metadata tag %d", __FUNCTION__, tag); 1700dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return ACAMERA_ERROR_METADATA_NOT_FOUND; 1710dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 1720dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh entry->tag = tag; 1730dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh entry->type = rawEntry.type; 1740dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh entry->count = rawEntry.count; 1750dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh entry->data.u8 = rawEntry.data.u8; 1760dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return ACAMERA_OK; 1770dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1780dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1790dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 1800dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::update(uint32_t tag, uint32_t count, const uint8_t* data) { 1810dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return updateImpl<uint8_t>(tag, count, data); 1820dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1830dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1840dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 1850dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::update(uint32_t tag, uint32_t count, const int32_t* data) { 1860dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return updateImpl<int32_t>(tag, count, data); 1870dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1880dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1890dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 1900dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::update(uint32_t tag, uint32_t count, const float* data) { 1910dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return updateImpl<float>(tag, count, data); 1920dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1930dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1940dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 1950dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::update(uint32_t tag, uint32_t count, const double* data) { 1960dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return updateImpl<double>(tag, count, data); 1970dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 1980dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 1990dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 2000dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::update(uint32_t tag, uint32_t count, const int64_t* data) { 2010dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return updateImpl<int64_t>(tag, count, data); 2020dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 2030dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 2040dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehcamera_status_t 2050dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::update(uint32_t tag, uint32_t count, const ACameraMetadata_rational* data) { 2060dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return updateImpl<camera_metadata_rational_t>(tag, count, data); 2070dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 2080dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 2098aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yehcamera_status_t 2108aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia YehACameraMetadata::getTags(/*out*/int32_t* numTags, 2118aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh /*out*/const uint32_t** tags) const { 2128aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh Mutex::Autolock _l(mLock); 2138aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh if (mTags.size() == 0) { 2148aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh size_t entry_count = mData.entryCount(); 2158aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh mTags.setCapacity(entry_count); 2168aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh const camera_metadata_t* rawMetadata = mData.getAndLock(); 2178aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh for (size_t i = 0; i < entry_count; i++) { 2188aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh camera_metadata_ro_entry_t entry; 2198aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh int ret = get_camera_metadata_ro_entry(rawMetadata, i, &entry); 2208aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh if (ret != 0) { 2218aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ALOGE("%s: error reading metadata index %zu", __FUNCTION__, i); 2228aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh return ACAMERA_ERROR_UNKNOWN; 2238aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh } 2248aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh // Hide system key from users 2258aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh if (sSystemTags.count(entry.tag) == 0) { 2268aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh mTags.push_back(entry.tag); 2278aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh } 2288aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh } 2298aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh mData.unlock(rawMetadata); 2308aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh } 2318aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh 2328aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh *numTags = mTags.size(); 2338aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh *tags = mTags.array(); 2348aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh return ACAMERA_OK; 2358aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh} 2368aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh 2378aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yehconst CameraMetadata& 2388aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia YehACameraMetadata::getInternalData() { 2398aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh return mData; 2408aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh} 2410dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 2420dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh// TODO: some of key below should be hidden from user 2430dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh// ex: ACAMERA_REQUEST_ID and ACAMERA_REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 2440dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh/*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 2450dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * The key entries below this point are generated from metadata 2460dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * definitions in /system/media/camera/docs. Do not modify by hand or 2470dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * modify the comment blocks at the start or end. 2480dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 2490dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 2500dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yehbool 2510dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia YehACameraMetadata::isCaptureRequestTag(const uint32_t tag) { 2520dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh // Skip check for vendor keys 2530dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh if (isVendorTag(tag)) { 2540dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return true; 2550dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 2560dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 2570dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh switch (tag) { 2580dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_COLOR_CORRECTION_MODE: 2590dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_COLOR_CORRECTION_TRANSFORM: 2600dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_COLOR_CORRECTION_GAINS: 2610dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_COLOR_CORRECTION_ABERRATION_MODE: 2620dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_ANTIBANDING_MODE: 2630dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION: 2640dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_LOCK: 2650dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_MODE: 2660dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_REGIONS: 2670dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_TARGET_FPS_RANGE: 2680dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER: 2690dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AF_MODE: 2700dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AF_REGIONS: 2710dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AF_TRIGGER: 2720dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AWB_LOCK: 2730dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AWB_MODE: 2740dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_AWB_REGIONS: 2750dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_CAPTURE_INTENT: 2760dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_EFFECT_MODE: 2770dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_MODE: 2780dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_SCENE_MODE: 2790dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE: 2800dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST: 281c0dede99d99ab22f59cf34c3b7d262c80d7bbc4aChien-Yu Chen case ACAMERA_CONTROL_ENABLE_ZSL: 2820dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_EDGE_MODE: 2830dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_FLASH_MODE: 2840dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_HOT_PIXEL_MODE: 2850dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_GPS_COORDINATES: 2860dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_GPS_PROCESSING_METHOD: 2870dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_GPS_TIMESTAMP: 2880dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_ORIENTATION: 2890dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_QUALITY: 2900dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_THUMBNAIL_QUALITY: 2910dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_JPEG_THUMBNAIL_SIZE: 2920dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_LENS_APERTURE: 2930dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_LENS_FILTER_DENSITY: 2940dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_LENS_FOCAL_LENGTH: 2950dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_LENS_FOCUS_DISTANCE: 2960dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_LENS_OPTICAL_STABILIZATION_MODE: 2970dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_NOISE_REDUCTION_MODE: 2980dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SCALER_CROP_REGION: 2990dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SENSOR_EXPOSURE_TIME: 3000dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SENSOR_FRAME_DURATION: 3010dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SENSOR_SENSITIVITY: 3020dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SENSOR_TEST_PATTERN_DATA: 3030dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SENSOR_TEST_PATTERN_MODE: 3040dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_SHADING_MODE: 3050dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_STATISTICS_FACE_DETECT_MODE: 3060dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE: 3070dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE: 3080dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_TONEMAP_CURVE_BLUE: 3090dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_TONEMAP_CURVE_GREEN: 3100dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_TONEMAP_CURVE_RED: 3110dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_TONEMAP_MODE: 3120dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_TONEMAP_GAMMA: 3130dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_TONEMAP_PRESET_CURVE: 3140dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh case ACAMERA_BLACK_LEVEL_LOCK: 3150dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return true; 3160dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh default: 3170dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh return false; 3180dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh } 3190dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh} 3200dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh 3218aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh// System tags that should be hidden from users 3228aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yehstd::unordered_set<uint32_t> ACameraMetadata::sSystemTags ({ 3238aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_CONTROL_SCENE_MODE_OVERRIDES, 3248aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_CONTROL_AE_PRECAPTURE_ID, 3258aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_CONTROL_AF_TRIGGER_ID, 3268aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_DEMOSAIC_MODE, 3278aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_EDGE_STRENGTH, 3288aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_FLASH_FIRING_POWER, 3298aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_FLASH_FIRING_TIME, 3308aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_FLASH_COLOR_TEMPERATURE, 3318aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_FLASH_MAX_ENERGY, 3328aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_FLASH_INFO_CHARGE_DURATION, 3338aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_JPEG_MAX_SIZE, 3348aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_JPEG_SIZE, 3358aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_NOISE_REDUCTION_STRENGTH, 3368aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_QUIRKS_METERING_CROP_REGION, 3378aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_QUIRKS_TRIGGER_AF_WITH_AUTO, 3388aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_QUIRKS_USE_ZSL_FORMAT, 3398aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_REQUEST_INPUT_STREAMS, 3408aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_REQUEST_METADATA_MODE, 3418aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_REQUEST_OUTPUT_STREAMS, 3428aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_REQUEST_TYPE, 3438aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_REQUEST_MAX_NUM_REPROCESS_STREAMS, 3448aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS, 3458aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SCALER_AVAILABLE_RAW_SIZES, 3468aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SENSOR_BASE_GAIN_FACTOR, 3478aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS, 3488aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SENSOR_TEMPERATURE, 3498aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SENSOR_PROFILE_HUE_SAT_MAP, 3508aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SENSOR_PROFILE_TONE_CURVE, 3518aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SENSOR_OPAQUE_RAW_SIZE, 3528aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_SHADING_STRENGTH, 3538aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_HISTOGRAM_MODE, 3548aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_SHARPNESS_MAP_MODE, 3558aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_HISTOGRAM, 3568aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_SHARPNESS_MAP, 3578aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_INFO_HISTOGRAM_BUCKET_COUNT, 3588aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_INFO_MAX_HISTOGRAM_COUNT, 3598aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_INFO_MAX_SHARPNESS_MAP_VALUE, 3608aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_STATISTICS_INFO_SHARPNESS_MAP_SIZE, 3618aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh ANDROID_DEPTH_MAX_DEPTH_SAMPLES, 3628aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh}); 3638aac03f4d6c66749803d5708086ba5f509aa88c6Yin-Chia Yeh 3640dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh/*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 3650dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh * End generated code 3660dea57fd9fc4b2ccaab97d9477359fbd5a626f5cYin-Chia Yeh *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 367