Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc073aac authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

Camera: DistortionMapper: Move FACE_RECTANGLES to point list

Face rectangles are actually a pair of points, not rects with
(top, left, width, height).

This is very silly but what can you do.

Test: Check metadata output with forced-on distortion correction
Bug: 74434422
Change-Id: I5c0ede9624a198f1dd68328c2dcfa6788ed2d9d9
parent 89c5da18
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -43,13 +43,13 @@ constexpr std::array<uint32_t, 1> DistortionMapper::kRequestRectsToCorrect = {
};

// Only for capture result
constexpr std::array<uint32_t, 2> DistortionMapper::kResultRectsToCorrect = {
constexpr std::array<uint32_t, 1> DistortionMapper::kResultRectsToCorrect = {
    ANDROID_SCALER_CROP_REGION,
    ANDROID_STATISTICS_FACE_RECTANGLES
};

// Only for capture result
constexpr std::array<uint32_t, 1> DistortionMapper::kResultPointsToCorrect = {
constexpr std::array<uint32_t, 2> DistortionMapper::kResultPointsToCorrect = {
    ANDROID_STATISTICS_FACE_RECTANGLES, // Says rectangles, is really points
    ANDROID_STATISTICS_FACE_LANDMARKS,
};

+2 −2
Original line number Diff line number Diff line
@@ -148,10 +148,10 @@ class DistortionMapper {
    static const std::array<uint32_t, 1> kRequestRectsToCorrect;

    // Only capture result
    static const std::array<uint32_t, 2> kResultRectsToCorrect;
    static const std::array<uint32_t, 1> kResultRectsToCorrect;

    // Only for capture results
    static const std::array<uint32_t, 1> kResultPointsToCorrect;
    static const std::array<uint32_t, 2> kResultPointsToCorrect;

    // Utility to create reverse mapping grids
    status_t buildGrids();