1 /* 2 * Copyright (C) 2019 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include <system/camera_metadata_tags.h> 18 19 #include "device3/CoordinateMapper.h" 20 21 namespace android { 22 23 namespace camera3 { 24 25 /** 26 * Metadata keys to correct when adjusting coordinates for distortion correction 27 * or for crop and rotate 28 */ 29 30 // Both capture request and result 31 constexpr std::array<uint32_t, 3> CoordinateMapper::kMeteringRegionsToCorrect = { 32 ANDROID_CONTROL_AF_REGIONS, 33 ANDROID_CONTROL_AE_REGIONS, 34 ANDROID_CONTROL_AWB_REGIONS 35 }; 36 37 // Both capture request and result, not applicable to crop and rotate 38 constexpr std::array<uint32_t, 1> CoordinateMapper::kRectsToCorrect = { 39 ANDROID_SCALER_CROP_REGION, 40 }; 41 42 // Only for capture result 43 constexpr std::array<uint32_t, 2> CoordinateMapper::kResultPointsToCorrectNoClamp = { 44 ANDROID_STATISTICS_FACE_RECTANGLES, // Says rectangles, is really points 45 ANDROID_STATISTICS_FACE_LANDMARKS, 46 }; 47 48 } // namespace camera3 49 50 } // namespace android 51