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

Method decodeRawInternal

src/librawspeed/decoders/DcsDecoder.cpp:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54RawImage 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
78void DcsDecoder::decodeMetaDataInternal(const CameraMetaData* meta) {
79 setMetaData(meta, "", 0);

Callers

nothing calls this directly

Calls 5

getU16ArrayMethod · 0.80
getSubViewMethod · 0.80
ByteStreamClass · 0.70
DataBufferClass · 0.50
getEntryRecursiveMethod · 0.45

Tested by

no test coverage detected