MCPcopy Create free account
hub / github.com/darktable-org/rawspeed / decodeMetaDataInternal

Method decodeMetaDataInternal

src/librawspeed/decoders/ThreefrDecoder.cpp:73–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void ThreefrDecoder::decodeMetaDataInternal(const CameraMetaData* meta) {
74 mRaw->cfa.setCFA(iPoint2D(2,2), CFA_RED, CFA_GREEN, CFA_GREEN, CFA_BLUE);
75
76 setMetaData(meta, "", 0);
77
78 if (mRootIFD->hasEntryRecursive(BLACKLEVEL)) {
79 TiffEntry* bl = mRootIFD->getEntryRecursive(BLACKLEVEL);
80 if (bl->count == 1)
81 mRaw->blackLevel = bl->getFloat();
82 }
83
84 if (mRootIFD->hasEntryRecursive(WHITELEVEL)) {
85 TiffEntry* wl = mRootIFD->getEntryRecursive(WHITELEVEL);
86 if (wl->count == 1)
87 mRaw->whitePoint = wl->getFloat();
88 }
89
90 // Fetch the white balance
91 if (mRootIFD->hasEntryRecursive(ASSHOTNEUTRAL)) {
92 TiffEntry *wb = mRootIFD->getEntryRecursive(ASSHOTNEUTRAL);
93 if (wb->count == 3) {
94 for (uint32_t i = 0; i < 3; i++) {
95 const float div = wb->getFloat(i);
96 if (div == 0.0F)
97 ThrowRDE("Can not decode WB, multiplier is zero/");
98
99 mRaw->metadata.wbCoeffs[i] = 1.0F / div;
100 }
101 }
102 }
103}
104
105} // namespace rawspeed

Callers

nothing calls this directly

Calls 5

setCFAMethod · 0.80
iPoint2DClass · 0.70
hasEntryRecursiveMethod · 0.45
getEntryRecursiveMethod · 0.45
getFloatMethod · 0.45

Tested by

no test coverage detected