RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
rawspeed::RafDecoder Class Referencefinal

#include "decoders/RafDecoder.h"

Inheritance diagram for rawspeed::RafDecoder:
[legend]
Collaboration diagram for rawspeed::RafDecoder:
[legend]

Public Member Functions

 RafDecoder (TiffRootIFDOwner &&root, Buffer file)
RawImage decodeRawInternal () override
void applyCorrections (const Camera *cam)
void decodeMetaDataInternal (const CameraMetaData *meta) override
void checkSupportInternal (const CameraMetaData *meta) override
iRectangle2D getDefaultCrop () override
TiffIFDgetRootIFD () final
bool checkCameraSupported (const CameraMetaData *meta, const TiffID &id, const std::string &mode)
void setMetaData (const CameraMetaData *meta, const TiffID &id, const std::string &mode, int iso_speed)
void setMetaData (const CameraMetaData *meta, const std::string &mode, int iso_speed)
virtual void setMetaData (const CameraMetaData *meta, const std::string &make, const std::string &model, const std::string &mode, int iso_speed=0)
const TiffIFDgetIFDWithLargestImage (TiffTag filter=TiffTag::IMAGEWIDTH) const
void checkSupport (const CameraMetaData *meta)
RawImage decodeRaw ()
void decodeMetaData (const CameraMetaData *meta)

Static Public Member Functions

static bool isAppropriateDecoder (const TiffRootIFD *rootIFD, Buffer file)
static bool isRAF (Buffer input)

Public Attributes

RawImage mRaw = RawImage::create()
bool failOnUnknown {false}
bool interpolateBadPixels {true}
bool applyStage1DngOpcodes {true}
bool applyCrop {true}
bool uncorrectedRawValues {false}
bool fujiRotate {true}
struct { 
   bool   quadrantMultipliers = true 
iiq
bool noSamples = false

Protected Member Functions

int getDecoderVersion () const override
bool checkCameraSupported (const CameraMetaData *meta, const std::string &make, const std::string &model, const std::string &mode)
bool handleCameraSupport (const CameraMetaData *meta, const std::string &make, const std::string &model, const std::string &mode)
void decodeUncompressed (const TiffIFD *rawIFD, BitOrder order) const

Protected Attributes

TiffRootIFDOwner mRootIFD
Buffer mFile
Hints hints

Private Member Functions

int isCompressed () const
virtual void anchor () const

Private Attributes

bool alt_layout = false

Detailed Description

Definition at line 37 of file RafDecoder.h.

Constructor & Destructor Documentation

◆ RafDecoder()

rawspeed::RafDecoder::RafDecoder ( TiffRootIFDOwner && root,
Buffer file )
inline

Definition at line 42 of file RafDecoder.h.

References rawspeed::AbstractTiffDecoder::AbstractTiffDecoder().

Here is the call graph for this function:

Member Function Documentation

◆ anchor()

void rawspeed::AbstractTiffDecoder::anchor ( ) const
privatevirtualinherited

Reimplemented in rawspeed::SimpleTiffDecoder.

Definition at line 31 of file AbstractTiffDecoder.cpp.

◆ applyCorrections()

void rawspeed::RafDecoder::applyCorrections ( const Camera * cam)

◆ checkCameraSupported() [1/2]

bool rawspeed::AbstractTiffDecoder::checkCameraSupported ( const CameraMetaData * meta,
const TiffID & id,
const std::string & mode )
inlineinherited

Definition at line 48 of file AbstractTiffDecoder.h.

References rawspeed::RawDecoder::checkCameraSupported().

Referenced by checkSupportInternal(), rawspeed::Cr2Decoder::checkSupportInternal(), rawspeed::DngDecoder::checkSupportInternal(), rawspeed::IiqDecoder::checkSupportInternal(), rawspeed::NefDecoder::checkSupportInternal(), rawspeed::RafDecoder::checkSupportInternal(), rawspeed::Rw2Decoder::checkSupportInternal(), rawspeed::SrwDecoder::checkSupportInternal(), and rawspeed::Rw2Decoder::decodeMetaDataInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkCameraSupported() [2/2]

bool rawspeed::RawDecoder::checkCameraSupported ( const CameraMetaData * meta,
const std::string & make,
const std::string & model,
const std::string & mode )
protectedinherited

Definition at line 204 of file RawDecoder.cpp.

References assert(), rawspeed::Camera::decoderVersion, rawspeed::CameraMetaData::getCamera(), getDecoderVersion(), handleCameraSupport(), rawspeed::Camera::hints, hints, mRaw, and ThrowRDE.

Referenced by rawspeed::AbstractTiffDecoder::checkCameraSupported(), rawspeed::CrwDecoder::checkSupportInternal(), rawspeed::MosDecoder::checkSupportInternal(), rawspeed::MrwDecoder::checkSupportInternal(), and rawspeed::NakedDecoder::checkSupportInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkSupport()

void rawspeed::RawDecoder::checkSupport ( const CameraMetaData * meta)
inherited

Definition at line 354 of file RawDecoder.cpp.

References checkSupportInternal(), and ThrowRDE.

Here is the call graph for this function:

◆ checkSupportInternal()

void rawspeed::RafDecoder::checkSupportInternal ( const CameraMetaData * meta)
overridevirtual

Reimplemented from rawspeed::AbstractTiffDecoder.

Definition at line 189 of file RafDecoder.cpp.

References rawspeed::Camera::cfa, rawspeed::AbstractTiffDecoder::checkCameraSupported(), rawspeed::CameraMetaData::getCamera(), isCompressed(), rawspeed::RawDecoder::mRaw, rawspeed::AbstractTiffDecoder::mRootIFD, and ThrowRDE.

Here is the call graph for this function:

◆ decodeMetaData()

void rawspeed::RawDecoder::decodeMetaData ( const CameraMetaData * meta)
inherited

Definition at line 342 of file RawDecoder.cpp.

References decodeMetaDataInternal(), and ThrowRDE.

Here is the call graph for this function:

◆ decodeMetaDataInternal()

◆ decodeRaw()

rawspeed::RawImage rawspeed::RawDecoder::decodeRaw ( )
inherited

Definition at line 320 of file RawDecoder.cpp.

References rawspeed::MSan::CheckMemIsInitialized(), decodeRawInternal(), rawspeed::RawImageData::fixBadPixels(), rawspeed::RawImageData::getByteDataAsUncroppedArray2DRef(), hints, interpolateBadPixels, rawspeed::RawImageData::metadata, rawspeed::ImageMetaData::pixelAspectRatio, and ThrowRDE.

Here is the call graph for this function:

◆ decodeRawInternal()

◆ decodeUncompressed()

void rawspeed::RawDecoder::decodeUncompressed ( const TiffIFD * rawIFD,
BitOrder order ) const
protectedinherited

Definition at line 56 of file RawDecoder.cpp.

References assert(), rawspeed::BITSPERSAMPLE, rawspeed::RawDecoder::RawSlice::count, rawspeed::TiffEntry::count, rawspeed::TiffIFD::getEntry(), rawspeed::TiffEntry::getU32(), rawspeed::RawDecoder::RawSlice::h, rawspeed::IMAGELENGTH, rawspeed::IMAGEWIDTH, rawspeed::implicit_cast(), rawspeed::little, mFile, mRaw, rawspeed::RawDecoder::RawSlice::offset, rawspeed::roundUpDivisionSafe(), rawspeed::ROWSPERSTRIP, s, rawspeed::STRIPBYTECOUNTS, rawspeed::STRIPOFFSETS, and ThrowRDE.

Referenced by rawspeed::PefDecoder::decodeRawInternal(), and rawspeed::SrwDecoder::decodeRawInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDecoderVersion()

int rawspeed::RafDecoder::getDecoderVersion ( ) const
inlinenodiscardoverrideprotectedvirtual

Implements rawspeed::RawDecoder.

Definition at line 53 of file RafDecoder.h.

◆ getDefaultCrop()

iRectangle2D rawspeed::RafDecoder::getDefaultCrop ( )
overridevirtual

Reimplemented from rawspeed::RawDecoder.

Definition at line 415 of file RafDecoder.cpp.

References dim, rawspeed::FUJI_RAFDATA, rawspeed::FUJI_RAWIMAGECROPPEDSIZE, rawspeed::FUJI_RAWIMAGECROPTOPLEFT, rawspeed::AbstractTiffDecoder::mRootIFD, and ThrowRDE.

Referenced by applyCorrections().

Here is the caller graph for this function:

◆ getIFDWithLargestImage()

const TiffIFD * rawspeed::AbstractTiffDecoder::getIFDWithLargestImage ( TiffTag filter = TiffTag::IMAGEWIDTH) const
nodiscardinherited

Definition at line 37 of file AbstractTiffDecoder.cpp.

References rawspeed::TiffEntry::count, rawspeed::TiffEntry::getU32(), rawspeed::IMAGEWIDTH, mRootIFD, and ThrowRDE.

Referenced by rawspeed::NefDecoder::DecodeSNefUncompressed(), rawspeed::NefDecoder::DecodeUncompressed(), rawspeed::NefDecoder::getBitPerSample(), rawspeed::NefDecoder::getMode(), and rawspeed::SimpleTiffDecoder::prepareForRawDecoding().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRootIFD()

TiffIFD * rawspeed::AbstractTiffDecoder::getRootIFD ( )
inlinefinalvirtualinherited

Reimplemented from rawspeed::RawDecoder.

Definition at line 46 of file AbstractTiffDecoder.h.

References mRootIFD.

Referenced by rawspeed::PefDecoder::decodeRawInternal().

Here is the caller graph for this function:

◆ handleCameraSupport()

bool rawspeed::RawDecoder::handleCameraSupport ( const CameraMetaData * meta,
const std::string & make,
const std::string & model,
const std::string & mode )
protectedinherited

Definition at line 146 of file RawDecoder.cpp.

References failOnUnknown, rawspeed::CameraMetaData::getCamera(), noSamples, rawspeed::Camera::supportStatus, ThrowRDE, rawspeed::Camera::UnknownCamera, rawspeed::WARNING, and rawspeed::writeLog().

Referenced by checkCameraSupported(), and setMetaData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAppropriateDecoder()

bool rawspeed::RafDecoder::isAppropriateDecoder ( const TiffRootIFD * rootIFD,
Buffer file )
static

Definition at line 60 of file RafDecoder.cpp.

References rawspeed::TiffRootIFD::getID(), and rawspeed::TiffID::make.

Referenced by rawspeed::FiffParser::getDecoder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCompressed()

int rawspeed::RafDecoder::isCompressed ( ) const
nodiscardprivate

Definition at line 382 of file RafDecoder.cpp.

References rawspeed::FUJI_BITSPERSAMPLE, rawspeed::FUJI_RAWIMAGEFULLHEIGHT, rawspeed::FUJI_RAWIMAGEFULLWIDTH, rawspeed::FUJI_STRIPBYTECOUNTS, rawspeed::FUJI_STRIPOFFSETS, rawspeed::TiffEntry::getU16(), rawspeed::IMAGEWIDTH, rawspeed::AbstractTiffDecoder::mRootIFD, and ThrowRDE.

Referenced by checkSupportInternal(), and decodeRawInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isRAF()

bool rawspeed::RafDecoder::isRAF ( Buffer input)
static

Definition at line 52 of file RafDecoder.cpp.

References rawspeed::Buffer::begin(), and rawspeed::Buffer::getSubView().

Referenced by rawspeed::RawParser::getDecoder().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMetaData() [1/3]

void rawspeed::RawDecoder::setMetaData ( const CameraMetaData * meta,
const std::string & make,
const std::string & model,
const std::string & mode,
int iso_speed = 0 )
virtualinherited

Reimplemented from rawspeed::RawDecoder.

Definition at line 141 of file RawDecoder.cpp.

◆ setMetaData() [2/3]

void rawspeed::AbstractTiffDecoder::setMetaData ( const CameraMetaData * meta,
const std::string & mode,
int iso_speed )
inlineinherited

Definition at line 60 of file AbstractTiffDecoder.h.

References mRootIFD, and setMetaData().

Here is the call graph for this function:

◆ setMetaData() [3/3]

Member Data Documentation

◆ alt_layout

bool rawspeed::RafDecoder::alt_layout = false
private

Definition at line 38 of file RafDecoder.h.

Referenced by applyCorrections(), and decodeRawInternal().

◆ applyCrop

bool rawspeed::RawDecoder::applyCrop {true}
inherited

◆ applyStage1DngOpcodes

bool rawspeed::RawDecoder::applyStage1DngOpcodes {true}
inherited

Definition at line 93 of file RawDecoder.h.

Referenced by rawspeed::DngDecoder::handleMetadata().

◆ failOnUnknown

bool rawspeed::RawDecoder::failOnUnknown {false}
inherited

Definition at line 85 of file RawDecoder.h.

Referenced by rawspeed::DngDecoder::checkSupportInternal(), and handleCameraSupport().

◆ fujiRotate

bool rawspeed::RawDecoder::fujiRotate {true}
inherited

Definition at line 105 of file RawDecoder.h.

Referenced by rawspeed::RafDecoder::applyCorrections().

◆ hints

◆ [struct]

struct { ... } rawspeed::RawDecoder::iiq

◆ interpolateBadPixels

bool rawspeed::RawDecoder::interpolateBadPixels {true}
inherited

Definition at line 89 of file RawDecoder.h.

Referenced by decodeRaw().

◆ mFile

Buffer rawspeed::RawDecoder::mFile
protectedinherited

◆ mRaw

RawImage rawspeed::RawDecoder::mRaw = RawImage::create()
inherited

Definition at line 74 of file RawDecoder.h.

Referenced by rawspeed::RafDecoder::applyCorrections(), checkCameraSupported(), rawspeed::IiqDecoder::checkSupportInternal(), rawspeed::RafDecoder::checkSupportInternal(), rawspeed::IiqDecoder::correctBadColumn(), rawspeed::IiqDecoder::CorrectQuadrantMultipliersCombined(), rawspeed::IiqDecoder::correctSensorDefects(), rawspeed::ArwDecoder::DecodeARW2(), rawspeed::DngDecoder::decodeBlackLevels(), rawspeed::Cr2Decoder::decodeCanonColorData(), rawspeed::NefDecoder::DecodeD100Uncompressed(), rawspeed::DngDecoder::decodeData(), rawspeed::ArwDecoder::DecodeLJpeg(), rawspeed::DngDecoder::decodeMaskedAreas(), rawspeed::ArwDecoder::decodeMetaDataInternal(), rawspeed::Cr2Decoder::decodeMetaDataInternal(), rawspeed::CrwDecoder::decodeMetaDataInternal(), rawspeed::DngDecoder::decodeMetaDataInternal(), rawspeed::ErfDecoder::decodeMetaDataInternal(), rawspeed::IiqDecoder::decodeMetaDataInternal(), rawspeed::KdcDecoder::decodeMetaDataInternal(), rawspeed::MosDecoder::decodeMetaDataInternal(), rawspeed::MrwDecoder::decodeMetaDataInternal(), rawspeed::NefDecoder::decodeMetaDataInternal(), rawspeed::OrfDecoder::decodeMetaDataInternal(), rawspeed::PefDecoder::decodeMetaDataInternal(), rawspeed::RafDecoder::decodeMetaDataInternal(), rawspeed::Rw2Decoder::decodeMetaDataInternal(), rawspeed::SrwDecoder::decodeMetaDataInternal(), rawspeed::ThreefrDecoder::decodeMetaDataInternal(), rawspeed::Cr2Decoder::decodeNewFormat(), rawspeed::NefDecoder::DecodeNikonSNef(), rawspeed::Cr2Decoder::decodeOldFormat(), rawspeed::ArwDecoder::decodeRawInternal(), rawspeed::CrwDecoder::decodeRawInternal(), rawspeed::DcrDecoder::decodeRawInternal(), rawspeed::DcsDecoder::decodeRawInternal(), rawspeed::DngDecoder::decodeRawInternal(), rawspeed::ErfDecoder::decodeRawInternal(), rawspeed::IiqDecoder::decodeRawInternal(), rawspeed::KdcDecoder::decodeRawInternal(), rawspeed::MefDecoder::decodeRawInternal(), rawspeed::MosDecoder::decodeRawInternal(), rawspeed::MrwDecoder::decodeRawInternal(), rawspeed::NakedDecoder::decodeRawInternal(), rawspeed::NefDecoder::decodeRawInternal(), rawspeed::OrfDecoder::decodeRawInternal(), rawspeed::PefDecoder::decodeRawInternal(), rawspeed::RafDecoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawInternal(), rawspeed::SrwDecoder::decodeRawInternal(), rawspeed::StiDecoder::decodeRawInternal(), rawspeed::ThreefrDecoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawV8(), rawspeed::NefDecoder::DecodeSNefUncompressed(), rawspeed::ArwDecoder::decodeSRF(), rawspeed::ArwDecoder::decodeTransitionalArw(), rawspeed::ArwDecoder::DecodeUncompressed(), rawspeed::NefDecoder::DecodeUncompressed(), rawspeed::StiDecoder::DecodeUncompressed(), rawspeed::ThreefrDecoder::DecodeUncompressed(), rawspeed::OrfDecoder::decodeUncompressed(), decodeUncompressed(), rawspeed::OrfDecoder::decodeUncompressedInterleaved(), getDefaultCrop(), rawspeed::Cr2Decoder::getHue(), rawspeed::DngDecoder::getTilingDescription(), rawspeed::ArwDecoder::GetWB(), rawspeed::Rw2Decoder::guessMode(), rawspeed::IiqDecoder::handleBadPixel(), rawspeed::DngDecoder::handleMetadata(), rawspeed::ArwDecoder::ParseA100WB(), rawspeed::DngDecoder::parseACTIVEAREA(), rawspeed::DngDecoder::parseCFA(), rawspeed::OrfDecoder::parseCFA(), rawspeed::Rw2Decoder::parseCFA(), rawspeed::DngDecoder::parseColorMatrix(), rawspeed::Cr2Decoder::parseWhiteBalance(), rawspeed::DngDecoder::parseWhiteBalance(), rawspeed::NefDecoder::parseWhiteBalance(), rawspeed::IiqDecoder::PhaseOneFlatField(), rawspeed::SimpleTiffDecoder::prepareForRawDecoding(), rawspeed::NefDecoder::readCoolpixSplitRaw(), rawspeed::DngDecoder::setBlack(), setMetaData(), and rawspeed::Cr2Decoder::sRawInterpolate().

◆ mRootIFD

TiffRootIFDOwner rawspeed::AbstractTiffDecoder::mRootIFD
protectedinherited

Definition at line 40 of file AbstractTiffDecoder.h.

Referenced by AbstractTiffDecoder(), rawspeed::DngDecoder::DngDecoder(), rawspeed::MosDecoder::MosDecoder(), checkSupportInternal(), rawspeed::Cr2Decoder::checkSupportInternal(), rawspeed::DngDecoder::checkSupportInternal(), rawspeed::IiqDecoder::checkSupportInternal(), rawspeed::NefDecoder::checkSupportInternal(), rawspeed::RafDecoder::checkSupportInternal(), rawspeed::Rw2Decoder::checkSupportInternal(), rawspeed::SrwDecoder::checkSupportInternal(), rawspeed::Cr2Decoder::decodeCanonColorData(), rawspeed::NefDecoder::DecodeD100Uncompressed(), rawspeed::DngDecoder::decodeData(), rawspeed::ArwDecoder::decodeMetaDataInternal(), rawspeed::Cr2Decoder::decodeMetaDataInternal(), rawspeed::DngDecoder::decodeMetaDataInternal(), rawspeed::ErfDecoder::decodeMetaDataInternal(), rawspeed::KdcDecoder::decodeMetaDataInternal(), rawspeed::MosDecoder::decodeMetaDataInternal(), rawspeed::NefDecoder::decodeMetaDataInternal(), rawspeed::OrfDecoder::decodeMetaDataInternal(), rawspeed::PefDecoder::decodeMetaDataInternal(), rawspeed::RafDecoder::decodeMetaDataInternal(), rawspeed::Rw2Decoder::decodeMetaDataInternal(), rawspeed::SrwDecoder::decodeMetaDataInternal(), rawspeed::ThreefrDecoder::decodeMetaDataInternal(), rawspeed::Cr2Decoder::decodeNewFormat(), rawspeed::NefDecoder::DecodeNikonSNef(), rawspeed::Cr2Decoder::decodeOldFormat(), rawspeed::ArwDecoder::decodeRawInternal(), rawspeed::Cr2Decoder::decodeRawInternal(), rawspeed::DcrDecoder::decodeRawInternal(), rawspeed::DcsDecoder::decodeRawInternal(), rawspeed::DngDecoder::decodeRawInternal(), rawspeed::KdcDecoder::decodeRawInternal(), rawspeed::MosDecoder::decodeRawInternal(), rawspeed::NefDecoder::decodeRawInternal(), rawspeed::OrfDecoder::decodeRawInternal(), rawspeed::PefDecoder::decodeRawInternal(), rawspeed::RafDecoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawInternal(), rawspeed::SrwDecoder::decodeRawInternal(), rawspeed::StiDecoder::decodeRawInternal(), rawspeed::ThreefrDecoder::decodeRawInternal(), rawspeed::ArwDecoder::decodeSRF(), rawspeed::ArwDecoder::decodeTransitionalArw(), rawspeed::NefDecoder::DecodeUncompressed(), rawspeed::OrfDecoder::getBitsPerPixel(), rawspeed::RafDecoder::getDefaultCrop(), rawspeed::NefDecoder::getExtendedMode(), rawspeed::Cr2Decoder::getHue(), getIFDWithLargestImage(), rawspeed::KdcDecoder::getInputBuffer(), rawspeed::SrwDecoder::getMode(), rawspeed::Rw2Decoder::getRaw(), getRootIFD(), rawspeed::Cr2Decoder::getSubSampling(), rawspeed::ArwDecoder::GetWB(), rawspeed::OrfDecoder::handleSlices(), rawspeed::RafDecoder::isCompressed(), rawspeed::Cr2Decoder::isSubSampled(), rawspeed::ArwDecoder::ParseA100WB(), rawspeed::OrfDecoder::parseCFA(), rawspeed::Rw2Decoder::parseCFA(), rawspeed::DngDecoder::parseColorMatrix(), rawspeed::Cr2Decoder::parseWhiteBalance(), rawspeed::DngDecoder::parseWhiteBalance(), rawspeed::NefDecoder::parseWhiteBalance(), setMetaData(), and rawspeed::Cr2Decoder::sRawInterpolate().

◆ noSamples

bool rawspeed::RawDecoder::noSamples = false
inherited

Definition at line 117 of file RawDecoder.h.

Referenced by handleCameraSupport().

◆ quadrantMultipliers

bool rawspeed::RawDecoder::quadrantMultipliers = true
inherited

Definition at line 109 of file RawDecoder.h.

◆ uncorrectedRawValues


The documentation for this class was generated from the following files: