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

Method decodeRawInternal

src/librawspeed/decoders/ThreefrDecoder.cpp:53–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53RawImage ThreefrDecoder::decodeRawInternal() {
54 const auto* raw = mRootIFD->getIFDWithTag(STRIPOFFSETS, 1);
55 uint32_t width = raw->getEntry(IMAGEWIDTH)->getU32();
56 uint32_t height = raw->getEntry(IMAGELENGTH)->getU32();
57 uint32_t off = raw->getEntry(STRIPOFFSETS)->getU32();
58 // STRIPBYTECOUNTS is strange/invalid for the existing 3FR samples...
59
60 const ByteStream bs(DataBuffer(mFile->getSubView(off), Endianness::little));
61
62 mRaw->dim = iPoint2D(width, height);
63
64 HasselbladDecompressor l(bs, mRaw);
65 mRaw->createData();
66
67 int pixelBaseOffset = hints.get("pixelBaseOffset", 0);
68 l.decode(pixelBaseOffset);
69
70 return mRaw;
71}
72
73void ThreefrDecoder::decodeMetaDataInternal(const CameraMetaData* meta) {
74 mRaw->cfa.setCFA(iPoint2D(2,2), CFA_RED, CFA_GREEN, CFA_GREEN, CFA_BLUE);

Callers

nothing calls this directly

Calls 9

getIFDWithTagMethod · 0.80
getSubViewMethod · 0.80
createDataMethod · 0.80
iPoint2DClass · 0.70
DataBufferClass · 0.50
getU32Method · 0.45
getEntryMethod · 0.45
getMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected