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

Commit 8a4a6d3f authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge "DngCreator: Improve black level support; avoid large stack allocation" into nyc-dev

parents 085dd093 45a599d7
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -192,6 +192,18 @@ enum {
    TAG_GPSDATESTAMP = 0x001Du,
};

/**
 * Convenience values for tags with enumerated values
 */

enum {
    TAG_ORIENTATION_NORMAL = 1,
    TAG_ORIENTATION_ROTATE_180 = 3,
    TAG_ORIENTATION_ROTATE_90 = 6,
    TAG_ORIENTATION_ROTATE_270 = 8,
    TAG_ORIENTATION_UNKNOWN = 9
};

/**
 * TIFF_EP_TAG_DEFINITIONS contains tags defined in the TIFF EP spec
 */
@@ -731,7 +743,7 @@ const TagDefinition_t DNG_TAG_DEFINITIONS[] = {
    { // BlackLevel
        "BlackLevel",
        0xC61Au,
        LONG,
        RATIONAL,
        RAW_IFD,
        0,
        UNDEFINED_ENDIAN
+12 −4
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <inttypes.h>

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

namespace android {
@@ -63,10 +64,17 @@ status_t OpcodeListBuilder::addGainMapsForMetadata(uint32_t lsmWidth,
    double spacingV = 1.0 / lsmHeight;
    double spacingH = 1.0 / lsmWidth;

    float redMap[lsmWidth * lsmHeight];
    float greenEvenMap[lsmWidth * lsmHeight];
    float greenOddMap[lsmWidth * lsmHeight];
    float blueMap[lsmWidth * lsmHeight];
    std::vector<float> redMapVector(lsmWidth * lsmHeight);
    float *redMap = redMapVector.data();

    std::vector<float> greenEvenMapVector(lsmWidth * lsmHeight);
    float *greenEvenMap = greenEvenMapVector.data();

    std::vector<float> greenOddMapVector(lsmWidth * lsmHeight);
    float *greenOddMap = greenOddMapVector.data();

    std::vector<float> blueMapVector(lsmWidth * lsmHeight);
    float *blueMap = blueMapVector.data();

    size_t lsmMapSize = lsmWidth * lsmHeight * 4;