|
RawSpeed
fast raw decoding library
|
#include "decoders/RawDecoder.h"
Classes | |
| struct | RawSlice |
Public Member Functions | |
| RawDecoder (Buffer file) | |
| virtual | ~RawDecoder ()=default |
| void | checkSupport (const CameraMetaData *meta) |
| RawImage | decodeRaw () |
| void | decodeMetaData (const CameraMetaData *meta) |
| virtual TiffIFD * | getRootIFD () |
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 | |
| virtual RawImage | decodeRawInternal ()=0 |
| virtual void | decodeMetaDataInternal (const CameraMetaData *meta)=0 |
| virtual void | checkSupportInternal (const CameraMetaData *meta)=0 |
| bool | handleCameraSupport (const CameraMetaData *meta, const std::string &make, const std::string &model, const std::string &mode) |
| bool | checkCameraSupported (const CameraMetaData *meta, const std::string &make, const std::string &model, const std::string &mode) |
| virtual void | setMetaData (const CameraMetaData *meta, const std::string &make, const std::string &model, const std::string &mode, int iso_speed=0) |
| virtual iRectangle2D | getDefaultCrop () |
| void | decodeUncompressed (const TiffIFD *rawIFD, BitOrder order) const |
| virtual int | getDecoderVersion () const =0 |
Protected Attributes | |
| Buffer | mFile |
| Hints | hints |
Definition at line 37 of file RawDecoder.h.
|
explicit |
Definition at line 54 of file RawDecoder.cpp.
References mFile.
Referenced by rawspeed::AbstractTiffDecoder::AbstractTiffDecoder(), rawspeed::CrwDecoder::CrwDecoder(), rawspeed::MrwDecoder::MrwDecoder(), and rawspeed::NakedDecoder::NakedDecoder().
|
virtualdefault |
|
protected |
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().
| void rawspeed::RawDecoder::checkSupport | ( | const CameraMetaData * | meta | ) |
Definition at line 354 of file RawDecoder.cpp.
References checkSupportInternal(), and ThrowRDE.
|
protectedpure virtual |
Implemented in rawspeed::AbstractTiffDecoder, rawspeed::Cr2Decoder, rawspeed::CrwDecoder, rawspeed::DngDecoder, rawspeed::IiqDecoder, rawspeed::MosDecoder, rawspeed::MrwDecoder, rawspeed::NakedDecoder, rawspeed::NefDecoder, rawspeed::RafDecoder, rawspeed::Rw2Decoder, and rawspeed::SrwDecoder.
Referenced by checkSupport().
| void rawspeed::RawDecoder::decodeMetaData | ( | const CameraMetaData * | meta | ) |
Definition at line 342 of file RawDecoder.cpp.
References decodeMetaDataInternal(), and ThrowRDE.
|
protectedpure virtual |
Implemented in rawspeed::ArwDecoder, rawspeed::Cr2Decoder, rawspeed::CrwDecoder, rawspeed::DcrDecoder, rawspeed::DcsDecoder, rawspeed::DngDecoder, rawspeed::ErfDecoder, rawspeed::IiqDecoder, rawspeed::KdcDecoder, rawspeed::MefDecoder, rawspeed::MosDecoder, rawspeed::MrwDecoder, rawspeed::NakedDecoder, rawspeed::NefDecoder, rawspeed::OrfDecoder, rawspeed::PefDecoder, rawspeed::RafDecoder, rawspeed::Rw2Decoder, rawspeed::SrwDecoder, rawspeed::StiDecoder, and rawspeed::ThreefrDecoder.
Referenced by decodeMetaData().
| rawspeed::RawImage rawspeed::RawDecoder::decodeRaw | ( | ) |
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.
|
protectedpure virtual |
Implemented in rawspeed::ArwDecoder, rawspeed::Cr2Decoder, rawspeed::CrwDecoder, rawspeed::DcrDecoder, rawspeed::DcsDecoder, rawspeed::DngDecoder, rawspeed::ErfDecoder, rawspeed::IiqDecoder, rawspeed::KdcDecoder, rawspeed::MefDecoder, rawspeed::MosDecoder, rawspeed::MrwDecoder, rawspeed::NakedDecoder, rawspeed::NefDecoder, rawspeed::OrfDecoder, rawspeed::PefDecoder, rawspeed::RafDecoder, rawspeed::Rw2Decoder, rawspeed::SrwDecoder, rawspeed::StiDecoder, and rawspeed::ThreefrDecoder.
Referenced by decodeRaw().
|
protected |
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().
|
nodiscardprotectedpure virtual |
Implemented in rawspeed::ArwDecoder, rawspeed::Cr2Decoder, rawspeed::CrwDecoder, rawspeed::DcrDecoder, rawspeed::DcsDecoder, rawspeed::DngDecoder, rawspeed::ErfDecoder, rawspeed::IiqDecoder, rawspeed::KdcDecoder, rawspeed::MefDecoder, rawspeed::MosDecoder, rawspeed::MrwDecoder, rawspeed::NakedDecoder, rawspeed::NefDecoder, rawspeed::OrfDecoder, rawspeed::PefDecoder, rawspeed::RafDecoder, rawspeed::Rw2Decoder, rawspeed::SrwDecoder, rawspeed::StiDecoder, and rawspeed::ThreefrDecoder.
Referenced by checkCameraSupported().
|
protectedvirtual |
Reimplemented in rawspeed::RafDecoder, and rawspeed::Rw2Decoder.
Definition at line 316 of file RawDecoder.cpp.
References mRaw.
Referenced by setMetaData().
|
inlinevirtual |
Reimplemented in rawspeed::AbstractTiffDecoder.
Definition at line 69 of file RawDecoder.h.
|
protected |
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().
|
protectedvirtual |
Reimplemented in rawspeed::AbstractTiffDecoder.
Definition at line 225 of file RawDecoder.cpp.
References applyCrop, rawspeed::iPoint2D::area(), rawspeed::Array2DRef(), assert(), rawspeed::Camera::blackAreas, rawspeed::Camera::canonical_alias, rawspeed::Camera::canonical_id, rawspeed::Camera::canonical_make, rawspeed::Camera::canonical_model, rawspeed::Camera::cfa, rawspeed::Camera::color_matrix, rawspeed::Camera::cropAvailable, rawspeed::Camera::cropPos, rawspeed::Camera::cropSize, rawspeed::CameraMetaData::getCamera(), getDefaultCrop(), rawspeed::Camera::getSensorInfo(), rawspeed::ColorFilterArray::getSize(), handleCameraSupport(), hints, rawspeed::implicit_cast(), mRaw, rawspeed::splitString(), rawspeed::iPoint2D::x, and rawspeed::iPoint2D::y.
Referenced by rawspeed::CrwDecoder::decodeMetaDataInternal(), rawspeed::MosDecoder::decodeMetaDataInternal(), rawspeed::MrwDecoder::decodeMetaDataInternal(), and rawspeed::NakedDecoder::decodeMetaDataInternal().
| bool rawspeed::RawDecoder::applyCrop {true} |
Definition at line 96 of file RawDecoder.h.
Referenced by rawspeed::RafDecoder::applyCorrections(), rawspeed::ArwDecoder::decodeRawInternal(), and setMetaData().
| bool rawspeed::RawDecoder::applyStage1DngOpcodes {true} |
Definition at line 93 of file RawDecoder.h.
Referenced by rawspeed::DngDecoder::handleMetadata().
| bool rawspeed::RawDecoder::failOnUnknown {false} |
Definition at line 85 of file RawDecoder.h.
Referenced by rawspeed::DngDecoder::checkSupportInternal(), and handleCameraSupport().
| bool rawspeed::RawDecoder::fujiRotate {true} |
Definition at line 105 of file RawDecoder.h.
Referenced by rawspeed::RafDecoder::applyCorrections().
|
protected |
Definition at line 167 of file RawDecoder.h.
Referenced by rawspeed::RafDecoder::applyCorrections(), checkCameraSupported(), rawspeed::CrwDecoder::decodeMetaDataInternal(), rawspeed::MrwDecoder::decodeMetaDataInternal(), decodeRaw(), rawspeed::CrwDecoder::decodeRawInternal(), rawspeed::NefDecoder::decodeRawInternal(), rawspeed::RafDecoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawInternal(), rawspeed::SrwDecoder::decodeRawInternal(), rawspeed::ArwDecoder::decodeTransitionalArw(), rawspeed::ArwDecoder::DecodeUncompressed(), rawspeed::NefDecoder::DecodeUncompressed(), rawspeed::Cr2Decoder::getHue(), rawspeed::KdcDecoder::getInputBuffer(), rawspeed::NefDecoder::parseWhiteBalance(), setMetaData(), and rawspeed::Cr2Decoder::sRawInterpolate().
| struct { ... } rawspeed::RawDecoder::iiq |
Referenced by rawspeed::IiqDecoder::CorrectPhaseOneC(), and rawspeed::IiqDecoder::decodeRawInternal().
| bool rawspeed::RawDecoder::interpolateBadPixels {true} |
Definition at line 89 of file RawDecoder.h.
Referenced by decodeRaw().
|
protected |
Definition at line 154 of file RawDecoder.h.
Referenced by RawDecoder(), rawspeed::NefDecoder::D100IsCompressed(), rawspeed::NefDecoder::DecodeD100Uncompressed(), rawspeed::DngDecoder::decodeData(), rawspeed::ArwDecoder::DecodeLJpeg(), rawspeed::Cr2Decoder::decodeNewFormat(), rawspeed::Cr2Decoder::decodeOldFormat(), rawspeed::ArwDecoder::decodeRawInternal(), rawspeed::DcrDecoder::decodeRawInternal(), rawspeed::DcsDecoder::decodeRawInternal(), rawspeed::ErfDecoder::decodeRawInternal(), rawspeed::IiqDecoder::decodeRawInternal(), rawspeed::MefDecoder::decodeRawInternal(), rawspeed::MosDecoder::decodeRawInternal(), rawspeed::NakedDecoder::decodeRawInternal(), rawspeed::NefDecoder::decodeRawInternal(), rawspeed::PefDecoder::decodeRawInternal(), rawspeed::Rw2Decoder::decodeRawInternal(), rawspeed::SrwDecoder::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(), decodeUncompressed(), rawspeed::KdcDecoder::getInputBuffer(), rawspeed::OrfDecoder::handleSlices(), rawspeed::ArwDecoder::ParseA100WB(), rawspeed::MrwDecoder::parseHeader(), and rawspeed::SimpleTiffDecoder::prepareForRawDecoding().
| RawImage rawspeed::RawDecoder::mRaw = RawImage::create() |
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().
| bool rawspeed::RawDecoder::noSamples = false |
Definition at line 117 of file RawDecoder.h.
Referenced by handleCameraSupport().
| bool rawspeed::RawDecoder::quadrantMultipliers = true |
Definition at line 109 of file RawDecoder.h.
| bool rawspeed::RawDecoder::uncorrectedRawValues {false} |
Definition at line 102 of file RawDecoder.h.
Referenced by rawspeed::RafDecoder::applyCorrections(), rawspeed::Cr2Decoder::decodeOldFormat(), rawspeed::ArwDecoder::decodeRawInternal(), rawspeed::DcrDecoder::decodeRawInternal(), rawspeed::DcsDecoder::decodeRawInternal(), rawspeed::NefDecoder::decodeRawInternal(), and rawspeed::DngDecoder::handleMetadata().