|
RawSpeed
fast raw decoding library
|
#include "decoders/MrwDecoder.h"
Public Member Functions | |
| MrwDecoder (Buffer file) | |
| RawImage | decodeRawInternal () override |
| void | checkSupportInternal (const CameraMetaData *meta) override |
| void | decodeMetaDataInternal (const CameraMetaData *meta) override |
| void | checkSupport (const CameraMetaData *meta) |
| RawImage | decodeRaw () |
| void | decodeMetaData (const CameraMetaData *meta) |
| virtual TiffIFD * | getRootIFD () |
Static Public Member Functions | |
| static int | isMRW (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 | |
| 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 |
Protected Attributes | |
| Buffer | mFile |
| Hints | hints |
Private Member Functions | |
| int | getDecoderVersion () const override |
| void | parseHeader () |
Private Attributes | |
| TiffRootIFDOwner | rootIFD |
| uint32_t | raw_width = 0 |
| uint32_t | raw_height = 0 |
| Buffer | imageData |
| uint32_t | bpp = 0 |
| uint32_t | packed = 0 |
| Optional< std::array< float, 4 > > | wb_coeffs |
Definition at line 37 of file MrwDecoder.h.
|
explicit |
Definition at line 45 of file MrwDecoder.cpp.
References rawspeed::RawDecoder::RawDecoder(), and parseHeader().
|
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().
|
inherited |
Definition at line 354 of file RawDecoder.cpp.
References checkSupportInternal(), and ThrowRDE.
|
overridevirtual |
Implements rawspeed::RawDecoder.
Definition at line 182 of file MrwDecoder.cpp.
References rawspeed::RawDecoder::checkCameraSupported(), rootIFD, and ThrowRDE.
|
inherited |
Definition at line 342 of file RawDecoder.cpp.
References decodeMetaDataInternal(), and ThrowRDE.
|
overridevirtual |
Implements rawspeed::RawDecoder.
Definition at line 190 of file MrwDecoder.cpp.
References rawspeed::RawDecoder::hints, rawspeed::RawDecoder::mRaw, rootIFD, rawspeed::RawDecoder::setMetaData(), ThrowRDE, and wb_coeffs.
|
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.
|
overridevirtual |
Implements rawspeed::RawDecoder.
Definition at line 159 of file MrwDecoder.cpp.
References rawspeed::big, imageData, rawspeed::RawDecoder::mRaw, rawspeed::MSB, packed, raw_height, and raw_width.
|
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().
|
inlinenodiscardoverrideprivatevirtual |
Implements rawspeed::RawDecoder.
Definition at line 55 of file MrwDecoder.h.
|
protectedvirtualinherited |
Reimplemented in rawspeed::RafDecoder, and rawspeed::Rw2Decoder.
Definition at line 316 of file RawDecoder.cpp.
References mRaw.
Referenced by setMetaData().
|
inlinevirtualinherited |
Reimplemented in rawspeed::AbstractTiffDecoder.
Definition at line 69 of file RawDecoder.h.
|
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().
|
static |
Definition at line 47 of file MrwDecoder.cpp.
References rawspeed::Buffer::begin(), and rawspeed::Buffer::getSubView().
Referenced by rawspeed::RawParser::getDecoder(), and parseHeader().
|
private |
Definition at line 53 of file MrwDecoder.cpp.
References assert(), rawspeed::big, bpp, rawspeed::ByteStream::check(), rawspeed::ByteStream::getBuffer(), rawspeed::ByteStream::getByte(), rawspeed::ByteStream::getPosition(), rawspeed::ByteStream::getRemainSize(), rawspeed::ByteStream::getSubStream(), rawspeed::Buffer::getSubView(), rawspeed::ByteStream::getU16(), rawspeed::ByteStream::getU32(), imageData, isMRW(), rawspeed::RawDecoder::mFile, packed, rawspeed::TiffParser::parse(), raw_height, raw_width, rootIFD, rawspeed::ByteStream::setPosition(), rawspeed::ByteStream::skipBytes(), ThrowRDE, and wb_coeffs.
Referenced by MrwDecoder().
|
protectedvirtualinherited |
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().
|
inherited |
Definition at line 96 of file RawDecoder.h.
Referenced by rawspeed::RafDecoder::applyCorrections(), rawspeed::ArwDecoder::decodeRawInternal(), and setMetaData().
|
inherited |
Definition at line 93 of file RawDecoder.h.
Referenced by rawspeed::DngDecoder::handleMetadata().
|
private |
Definition at line 43 of file MrwDecoder.h.
Referenced by parseHeader().
|
inherited |
Definition at line 85 of file RawDecoder.h.
Referenced by rawspeed::DngDecoder::checkSupportInternal(), and handleCameraSupport().
|
inherited |
Definition at line 105 of file RawDecoder.h.
Referenced by rawspeed::RafDecoder::applyCorrections().
|
protectedinherited |
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().
|
private |
Definition at line 42 of file MrwDecoder.h.
Referenced by decodeRawInternal(), and parseHeader().
|
inherited |
Definition at line 89 of file RawDecoder.h.
Referenced by decodeRaw().
|
protectedinherited |
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().
|
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().
|
inherited |
Definition at line 117 of file RawDecoder.h.
Referenced by handleCameraSupport().
|
private |
Definition at line 44 of file MrwDecoder.h.
Referenced by decodeRawInternal(), and parseHeader().
|
inherited |
Definition at line 109 of file RawDecoder.h.
|
private |
Definition at line 41 of file MrwDecoder.h.
Referenced by decodeRawInternal(), and parseHeader().
|
private |
Definition at line 40 of file MrwDecoder.h.
Referenced by decodeRawInternal(), and parseHeader().
|
private |
Definition at line 38 of file MrwDecoder.h.
Referenced by checkSupportInternal(), decodeMetaDataInternal(), and parseHeader().
|
inherited |
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().
Definition at line 45 of file MrwDecoder.h.
Referenced by decodeMetaDataInternal(), and parseHeader().