| 71 | } |
| 72 | |
| 73 | void 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 |
nothing calls this directly
no test coverage detected