| 52 | } |
| 53 | |
| 54 | RawImage DcsDecoder::decodeRawInternal() { |
| 55 | SimpleTiffDecoder::prepareForRawDecoding(); |
| 56 | |
| 57 | TiffEntry *linearization = mRootIFD->getEntryRecursive(GRAYRESPONSECURVE); |
| 58 | if (!linearization || linearization->count != 256 || linearization->type != TIFF_SHORT) |
| 59 | ThrowRDE("Couldn't find the linearization table"); |
| 60 | |
| 61 | assert(linearization != nullptr); |
| 62 | auto table = linearization->getU16Array(256); |
| 63 | |
| 64 | RawImageCurveGuard curveHandler(&mRaw, table, uncorrectedRawValues); |
| 65 | |
| 66 | UncompressedDecompressor u( |
| 67 | ByteStream(DataBuffer(mFile->getSubView(off, c2), Endianness::little)), |
| 68 | mRaw); |
| 69 | |
| 70 | if (uncorrectedRawValues) |
| 71 | u.decode8BitRaw<true>(width, height); |
| 72 | else |
| 73 | u.decode8BitRaw<false>(width, height); |
| 74 | |
| 75 | return mRaw; |
| 76 | } |
| 77 | |
| 78 | void DcsDecoder::decodeMetaDataInternal(const CameraMetaData* meta) { |
| 79 | setMetaData(meta, "", 0); |
nothing calls this directly
no test coverage detected