diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-11-29 00:02:17 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-11-29 00:02:17 +0000 |
commit | 4fb069dda11c8f57a4de4f6479496200ac6e29b0 (patch) | |
tree | 560eb7054498800cd27e93d70c7d09fdfe401d06 | |
parent | 566a4b9e1709bc2fcf2d8d833e796ccf84840b91 (diff) | |
parent | 1e36223ffcc93b39407cc719d876b8135826c91f (diff) | |
download | easel-oreo-m5-release.tar.gz |
Snap for 4448085 from 1e36223ffcc93b39407cc719d876b8135826c91f to oc-m3-releaseandroid-8.1.0_r9android-8.1.0_r7android-8.1.0_r22android-8.1.0_r21android-8.1.0_r18android-8.1.0_r17android-8.1.0_r14android-8.1.0_r13oreo-m5-releaseoreo-m3-release
Change-Id: I9038a59a5d51f5872cfa5c2676d75b4c61193cc1
-rw-r--r-- | camera/include/HdrPlusTypes.h | 91 | ||||
-rw-r--r-- | camera/libhdrplusclient/include/HdrPlusClient.h | 11 |
2 files changed, 29 insertions, 73 deletions
diff --git a/camera/include/HdrPlusTypes.h b/camera/include/HdrPlusTypes.h index 407d67b..9f66ffb 100644 --- a/camera/include/HdrPlusTypes.h +++ b/camera/include/HdrPlusTypes.h @@ -149,6 +149,10 @@ struct SensorMode { // Easel, this offset should be subtracted from AP timestamp. int64_t timestampOffsetNs; + // Sensor timestamp offset due to sensor cropping. When comparing timestamps between AP and + // Easel, this offset should be subtracted from AP timestamp. + int64_t timestampCropOffsetNs; + // Sensor output format as defined in android_pixel_format. int format; @@ -257,34 +261,11 @@ struct StaticMetadata { std::vector<float> availableFocalLengths; // android.lens.info.availableFocalLengths std::array<int32_t, 2> shadingMapSize; // android.lens.info.shadingMapSize uint8_t focusDistanceCalibration; // android.lens.info.focusDistanceCalibration + std::array<int32_t, 2> aeCompensationRange; // android.control.aeCompensationRange + float aeCompensationStep; // android.control.aeCompensationStep uint32_t debugParams; // Use HDRPLUS_DEBUG_PARAM_* - // Check if the contents of lhs and rhs are equal. For vector and array variables, two are - // equal if their elements are equal at the same position. - bool operator==(const StaticMetadata& rhs) const { - return flashInfoAvailable == rhs.flashInfoAvailable && - sensitivityRange == rhs.sensitivityRange && - maxAnalogSensitivity == rhs.maxAnalogSensitivity && - pixelArraySize == rhs.pixelArraySize && - activeArraySize == rhs.activeArraySize && - opticalBlackRegions == rhs.opticalBlackRegions && - availableStreamConfigurations == rhs.availableStreamConfigurations && - referenceIlluminant1 == rhs.referenceIlluminant1 && - referenceIlluminant2 == rhs.referenceIlluminant2 && - calibrationTransform1 == rhs.calibrationTransform1 && - calibrationTransform2 == rhs.calibrationTransform2 && - colorTransform1 == rhs.colorTransform1 && - colorTransform2 == rhs.colorTransform2 && - whiteLevel == rhs.whiteLevel && - colorFilterArrangement == rhs.colorFilterArrangement && - availableApertures == rhs.availableApertures && - availableFocalLengths == rhs.availableFocalLengths && - shadingMapSize == rhs.shadingMapSize && - focusDistanceCalibration == rhs.focusDistanceCalibration && - debugParams == rhs.debugParams; - } - // Convert this static metadata to a string and append it to the specified string. void appendToString(std::string *strOut) const { if (strOut == nullptr) return; @@ -316,6 +297,10 @@ struct StaticMetadata { metadatautils::appendVectorOrArrayToString(strOut, "shadingMapSize", shadingMapSize); metadatautils::appendValueToString(strOut, "focusDistanceCalibration", focusDistanceCalibration); + metadatautils::appendVectorOrArrayToString(strOut, "aeCompensationRange", + aeCompensationRange); + metadatautils::appendValueToString(strOut, "aeCompensationStep", + aeCompensationStep); metadatautils::appendValueToString(strOut, "debugParams", debugParams); } }; @@ -349,31 +334,12 @@ struct FrameMetadata { std::array<float, 4> dynamicBlackLevel; // android.sensor.dynamicBlackLevel std::vector<float> lensShadingMap; // android.statistics.lensShadingMap float focusDistance; // android.lens.focusDistance - - // Check if the contents of lhs and rhs are equal. For vector and array variables, two are - // equal if their elements are equal at the same position. - bool operator==(const FrameMetadata& rhs) const { - return easelTimestamp == rhs.easelTimestamp && - exposureTime == rhs.exposureTime && - sensitivity == rhs.sensitivity && - postRawSensitivityBoost == rhs.postRawSensitivityBoost && - flashMode == rhs.flashMode && - colorCorrectionGains == rhs.colorCorrectionGains && - colorCorrectionTransform == rhs.colorCorrectionTransform && - neutralColorPoint == rhs.neutralColorPoint && - timestamp == rhs.timestamp && - blackLevelLock == rhs.blackLevelLock && - faceDetectMode == rhs.faceDetectMode && - faceIds == rhs.faceIds && - faceLandmarks == rhs.faceLandmarks && - faceRectangles == rhs.faceRectangles && - faceScores == rhs.faceScores && - sceneFlicker == rhs.sceneFlicker && - noiseProfile == rhs.noiseProfile && - dynamicBlackLevel == rhs.dynamicBlackLevel && - lensShadingMap == rhs.lensShadingMap && - focusDistance == rhs.focusDistance; - } + int32_t aeExposureCompensation; // android.control.aeExposureCompensation + uint8_t aeMode; // android.control.aeMode + uint8_t aeLock; // android.control.aeLock + uint8_t aeState; // android.control.aeState + uint8_t aePrecaptureTrigger; // android.control.aePrecaptureTrigger + std::vector<std::array<int32_t, 5>> aeRegions; // android.control.aeRegions // Convert this static metadata to a string and append it to the specified string. void appendToString(std::string *strOut) const { @@ -402,6 +368,12 @@ struct FrameMetadata { metadatautils::appendVectorOrArrayToString(strOut, "dynamicBlackLevel", dynamicBlackLevel); metadatautils::appendVectorOrArrayToString(strOut, "lensShadingMap", lensShadingMap); metadatautils::appendValueToString(strOut, "focusDistance", focusDistance); + metadatautils::appendValueToString(strOut, "aeExposureCompensation", aeExposureCompensation); + metadatautils::appendValueToString(strOut, "aeMode", aeMode); + metadatautils::appendValueToString(strOut, "aeLock", aeLock); + metadatautils::appendValueToString(strOut, "aeState", aeState); + metadatautils::appendValueToString(strOut, "aePrecaptureTrigger", aePrecaptureTrigger); + metadatautils::appendVectorArrayToString(strOut, "aeRegions", aeRegions); } }; @@ -413,21 +385,16 @@ struct FrameMetadata { */ struct RequestMetadata { std::array<int32_t, 4> cropRegion; // android.scaler.cropRegion (x_min, y_min, width, height) + int32_t aeExposureCompensation; // android.control.aeExposureCompensation + bool postviewEnable; // com.google.nexus.experimental2017.stats.postview_enable bool continuousCapturing; // Whether to capture RAW while HDR+ processing. - // Check if the contents of lhs and rhs are equal. For vector and array variables, two are - // equal if their elements are equal at the same position. - bool operator==(const RequestMetadata& rhs) const { - return cropRegion == rhs.cropRegion && - postviewEnable == rhs.postviewEnable && - continuousCapturing == rhs.continuousCapturing; - } - // Convert this static metadata to a string and append it to the specified string. void appendToString(std::string *strOut) const { if (strOut == nullptr) return; metadatautils::appendVectorOrArrayToString(strOut, "cropRegion", cropRegion); + metadatautils::appendValueToString(strOut, "aeExposureCompensation", aeExposureCompensation); metadatautils::appendValueToString(strOut, "postviewEnable", postviewEnable); metadatautils::appendValueToString(strOut, "continuousCapturing", continuousCapturing); } @@ -445,14 +412,6 @@ struct ResultMetadata { // frame. std::string makernote; // Obfuscated capture information. - // Check if the contents of lhs and rhs are equal. For vector and array variables, two are - // equal if their elements are equal at the same position. - bool operator==(const ResultMetadata& rhs) const { - return easelTimestamp == rhs.easelTimestamp && - timestamp == rhs.timestamp && - makernote == rhs.makernote; - } - // Convert this static metadata to a string and append it to the specified string. void appendToString(std::string *strOut) const { if (strOut == nullptr) return; diff --git a/camera/libhdrplusclient/include/HdrPlusClient.h b/camera/libhdrplusclient/include/HdrPlusClient.h index 7896c89..40905cc 100644 --- a/camera/libhdrplusclient/include/HdrPlusClient.h +++ b/camera/libhdrplusclient/include/HdrPlusClient.h @@ -33,7 +33,9 @@ namespace android { */ class HdrPlusClient { public: - HdrPlusClient() {}; + // HdrPlusClientListener is the listener to receive callbacks from HDR+ client. The listener + // must be valid during the life cycle of HdrPlusClient + HdrPlusClient(HdrPlusClientListener *) {}; /* * The recommended way to create an HdrPlusClient instance is via * EaselManagerClient::openHdrPlusClientAsync() or EaselManagerClient::openHdrPlusClientAsync(). @@ -47,17 +49,12 @@ public: * * If EaselManagerClient is used to create the HdrPlusClient, it is already connected. * - * listener is the listener to receive callbacks from HDR+ client. - * * Returns: * 0: on success. * -EEXIST: if it's already connected. * -ENODEV: if connecting failed due to a serious error. */ - virtual status_t connect(HdrPlusClientListener *listener) = 0; - - // Disconnect from HDR+ service. - virtual void disconnect() = 0; + virtual status_t connect() = 0; /* * Set the static metadata of current camera device. |