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

Method decodeMetaDataInternal

src/librawspeed/decoders/PefDecoder.cpp:104–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void PefDecoder::decodeMetaDataInternal(const CameraMetaData* meta) {
105 int iso = 0;
106 mRaw->cfa.setCFA(iPoint2D(2,2), CFA_RED, CFA_GREEN, CFA_GREEN, CFA_BLUE);
107
108 if (mRootIFD->hasEntryRecursive(ISOSPEEDRATINGS))
109 iso = mRootIFD->getEntryRecursive(ISOSPEEDRATINGS)->getU32();
110
111 setMetaData(meta, "", iso);
112
113 // Read black level
114 if (mRootIFD->hasEntryRecursive(static_cast<TiffTag>(0x200))) {
115 TiffEntry* black = mRootIFD->getEntryRecursive(static_cast<TiffTag>(0x200));
116 if (black->count == 4) {
117 for (int i = 0; i < 4; i++)
118 mRaw->blackLevelSeparate[i] = black->getU32(i);
119 }
120 }
121
122 // Set the whitebalance
123 if (mRootIFD->hasEntryRecursive(static_cast<TiffTag>(0x0201))) {
124 TiffEntry* wb = mRootIFD->getEntryRecursive(static_cast<TiffTag>(0x0201));
125 if (wb->count == 4) {
126 mRaw->metadata.wbCoeffs[0] = wb->getU32(0);
127 mRaw->metadata.wbCoeffs[1] = wb->getU32(1);
128 mRaw->metadata.wbCoeffs[2] = wb->getU32(3);
129 }
130 }
131}
132
133} // namespace rawspeed

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected