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

Commit 784bead1 authored by Sam Hasinoff's avatar Sam Hasinoff Committed by android-build-merger
Browse files

Merge "Fix sample spacing in lens shading map saved to DNG" into pi-dev am: 40c43221

am: ca222320

Change-Id: I54eae2f95b2f7b2411b1e97260996835cfaf1583
parents cc39884e ca222320
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <inttypes.h>

#include <algorithm>
#include <vector>
#include <math.h>

@@ -61,8 +62,8 @@ status_t OpcodeListBuilder::addGainMapsForMetadata(uint32_t lsmWidth,
                                                   const float* lensShadingMap) {
    uint32_t activeAreaWidth = activeAreaRight - activeAreaLeft;
    uint32_t activeAreaHeight = activeAreaBottom - activeAreaTop;
    double spacingV = 1.0 / lsmHeight;
    double spacingH = 1.0 / lsmWidth;
    double spacingV = 1.0 / std::max(1u, lsmHeight - 1);
    double spacingH = 1.0 / std::max(1u, lsmWidth - 1);

    std::vector<float> redMapVector(lsmWidth * lsmHeight);
    float *redMap = redMapVector.data();