|
RawSpeed
fast raw decoding library
|
#include "decompressors/VC5Decompressor.h"
Classes | |
| struct | BandData |
| class | Wavelet |
| struct | Channel |
Public Member Functions | |
| VC5Decompressor (ByteStream bs, const RawImage &img) | |
| void | decode (unsigned int offsetX, unsigned int offsetY, unsigned int width, unsigned int height) |
Private Types | |
| using | PrefixCodeDecoder |
Private Member Functions | |
| void | initPrefixCodeDecoder () |
| void | initVC5LogTable () |
| void | parseLargeCodeblock (ByteStream bs) |
| template<BayerPhase p> | |
| void | combineFinalLowpassBandsImpl () const noexcept |
| void | combineFinalLowpassBands () const noexcept |
| void | createWaveletBandDecodingTasks (bool &exceptionThrown) const noexcept |
| void | decodeThread (bool &exceptionThrown) const noexcept |
| void | parseVC5 () |
Static Private Member Functions | |
| static std::pair< int16_t, unsigned int > | getRLV (const PrefixCodeDecoder &decoder, BitStreamerMSB &bits) |
Private Attributes | |
| RawImage | mRaw |
| ByteStream | mBs |
| BayerPhase | phase |
| int | outputBits |
| SimpleLUT< unsigned, VC5_LOG_TABLE_BITWIDTH > | mVC5LogTable |
| Optional< PrefixCodeDecoder > | codeDecoder |
| struct { | |
| uint16_t iChannel = 0 | |
| Optional< uint16_t > iSubband | |
| Optional< uint16_t > lowpassPrecision | |
| Optional< int16_t > quantization | |
| const uint16_t imgFormat = 4 | |
| const uint16_t patternWidth = 2 | |
| const uint16_t patternHeight = 2 | |
| const uint16_t cps = 1 | |
| } | mVC5 |
| std::array< Channel, numChannels > | channels |
Static Private Attributes | |
| static constexpr auto | VC5_LOG_TABLE_BITWIDTH = 12 |
| static constexpr int | numWaveletLevels = 3 |
| static constexpr int | numHighPassBands = 3 |
| static constexpr int | numLowPassBands = 1 |
| static constexpr int | numSubbands |
| static constexpr int | numChannels = 4 |
| static constexpr int | numSubbandsTotal = numSubbands * numChannels |
| static constexpr int | numLowPassBandsTotal = numWaveletLevels * numChannels |
Definition at line 95 of file VC5Decompressor.h.
|
private |
Definition at line 105 of file VC5Decompressor.h.
| rawspeed::VC5Decompressor::VC5Decompressor | ( | ByteStream | bs, |
| const RawImage & | img ) |
Definition at line 382 of file VC5Decompressor.cpp.
References rawspeed::VC5Decompressor::Wavelet::bands, channels, rawspeed::GBRG, rawspeed::getAsBayerPhase(), rawspeed::VC5Decompressor::Wavelet::height, rawspeed::implicit_cast(), invariant, rawspeed::VC5Decompressor::Wavelet::maxBands, mBs, mRaw, mVC5, outputBits, parseVC5(), phase, rawspeed::RGGB, rawspeed::roundUpDivisionSafe(), ThrowRDE, rawspeed::UINT16, rawspeed::RawImageData::whitePoint, and rawspeed::VC5Decompressor::Wavelet::width.
|
privatenoexcept |
Definition at line 933 of file VC5Decompressor.cpp.
References combineFinalLowpassBandsImpl(), rawspeed::GBRG, phase, and rawspeed::RGGB.
Referenced by decodeThread().
|
privatenoexcept |
Definition at line 876 of file VC5Decompressor.cpp.
References rawspeed::applyStablePhaseShift(), assert(), rawspeed::VC5Decompressor::Wavelet::bands, channels, rawspeed::Array2DRef< T >::height(), rawspeed::VC5Decompressor::Wavelet::height, mRaw, mVC5LogTable, rawspeed::RGGB, rawspeed::Array2DRef< T >::width(), and rawspeed::VC5Decompressor::Wavelet::width.
Referenced by combineFinalLowpassBands().
|
privatenoexcept |
Definition at line 818 of file VC5Decompressor.cpp.
References channels, rawspeed::VC5Decompressor::Wavelet::maxBands, mRaw, and numWaveletLevels.
Referenced by decodeThread().
| void rawspeed::VC5Decompressor::decode | ( | unsigned int | offsetX, |
| unsigned int | offsetY, | ||
| unsigned int | width, | ||
| unsigned int | height ) |
Definition at line 849 of file VC5Decompressor.cpp.
References assert(), decodeThread(), rawspeed::VC5Decompressor::Wavelet::height, initPrefixCodeDecoder(), initVC5LogTable(), mRaw, ThrowRDE, and rawspeed::VC5Decompressor::Wavelet::width.
Referenced by rawspeed::AbstractDngDecompressor::decompressThread().
|
privatenoexcept |
Definition at line 835 of file VC5Decompressor.cpp.
References combineFinalLowpassBands(), and createWaveletBandDecodingTasks().
Referenced by decode().
|
inlinestaticprivate |
Definition at line 949 of file VC5Decompressor.cpp.
References rawspeed::PrefixCodeVectorDecoder< CodeTag >::decodeCodeValue(), rawspeed::BitStreamer< Tag >::getBitsNoFill(), rawspeed::implicit_cast(), and rawspeed::RLVRunLengthBitWidth.
Referenced by rawspeed::VC5Decompressor::Wavelet::HighPassBand::decode().
|
private |
Definition at line 437 of file VC5Decompressor.cpp.
References assert(), codeDecoder, rawspeed::DecompandedCodeValueBitWidth, rawspeed::isIntN(), and rawspeed::RLVRunLengthBitWidth.
Referenced by decode().
|
private |
Definition at line 464 of file VC5Decompressor.cpp.
References rawspeed::implicit_cast(), mVC5LogTable, outputBits, x, and y.
Referenced by decode().
|
private |
Definition at line 744 of file VC5Decompressor.cpp.
References rawspeed::VC5Decompressor::Wavelet::allBandsValid(), assert(), rawspeed::VC5Decompressor::Wavelet::bands, channels, codeDecoder, rawspeed::Buffer::getAsArray1DRef(), rawspeed::VC5Decompressor::Wavelet::isBandValid(), mVC5, numWaveletLevels, rawspeed::VC5Decompressor::Wavelet::setBandValid(), and ThrowRDE.
Referenced by parseVC5().
|
private |
Definition at line 490 of file VC5Decompressor.cpp.
References rawspeed::big, rawspeed::ChannelCount, rawspeed::ChannelNumber, channels, rawspeed::ComponentsPerSample, rawspeed::extractHighBits(), rawspeed::ImageFormat, rawspeed::ImageHeight, rawspeed::ImageWidth, invariant, rawspeed::is(), rawspeed::LARGE_CHUNK, rawspeed::LargeCodeblock, rawspeed::LowpassPrecision, rawspeed::matches(), rawspeed::MaxBitsPerComponent, mBs, mRaw, mVC5, numChannels, numSubbands, numWaveletLevels, rawspeed::Optional, parseLargeCodeblock(), rawspeed::PatternHeight, rawspeed::PatternWidth, rawspeed::PrescaleShift, rawspeed::Quantization, rawspeed::SMALL_CHUNK, rawspeed::SubbandCount, rawspeed::SubbandNumber, ThrowRDE, rawspeed::val, and VC5_LOG_TABLE_BITWIDTH.
Referenced by VC5Decompressor().
|
private |
Definition at line 225 of file VC5Decompressor.h.
Referenced by VC5Decompressor(), combineFinalLowpassBandsImpl(), createWaveletBandDecodingTasks(), parseLargeCodeblock(), and parseVC5().
|
private |
Definition at line 108 of file VC5Decompressor.h.
Referenced by initPrefixCodeDecoder(), and parseLargeCodeblock().
| const uint16_t rawspeed::VC5Decompressor::cps = 1 |
Definition at line 129 of file VC5Decompressor.h.
| uint16_t rawspeed::VC5Decompressor::iChannel = 0 |
Definition at line 121 of file VC5Decompressor.h.
| const uint16_t rawspeed::VC5Decompressor::imgFormat = 4 |
Definition at line 126 of file VC5Decompressor.h.
Definition at line 122 of file VC5Decompressor.h.
Definition at line 123 of file VC5Decompressor.h.
|
private |
Definition at line 97 of file VC5Decompressor.h.
Referenced by VC5Decompressor(), and parseVC5().
|
private |
Definition at line 96 of file VC5Decompressor.h.
Referenced by VC5Decompressor(), combineFinalLowpassBandsImpl(), createWaveletBandDecodingTasks(), decode(), and parseVC5().
| struct { ... } rawspeed::VC5Decompressor::mVC5 |
Referenced by VC5Decompressor(), parseLargeCodeblock(), and parseVC5().
|
private |
Definition at line 103 of file VC5Decompressor.h.
Referenced by combineFinalLowpassBandsImpl(), and initVC5LogTable().
|
staticconstexprprivate |
Definition at line 222 of file VC5Decompressor.h.
Referenced by parseVC5().
|
staticconstexprprivate |
Definition at line 115 of file VC5Decompressor.h.
|
staticconstexprprivate |
Definition at line 116 of file VC5Decompressor.h.
|
staticconstexprprivate |
Definition at line 224 of file VC5Decompressor.h.
|
staticconstexprprivate |
Definition at line 117 of file VC5Decompressor.h.
Referenced by parseVC5().
|
staticconstexprprivate |
Definition at line 223 of file VC5Decompressor.h.
|
staticconstexprprivate |
Definition at line 114 of file VC5Decompressor.h.
Referenced by createWaveletBandDecodingTasks(), parseLargeCodeblock(), and parseVC5().
|
private |
Definition at line 102 of file VC5Decompressor.h.
Referenced by VC5Decompressor(), and initVC5LogTable().
| const uint16_t rawspeed::VC5Decompressor::patternHeight = 2 |
Definition at line 128 of file VC5Decompressor.h.
| const uint16_t rawspeed::VC5Decompressor::patternWidth = 2 |
Definition at line 127 of file VC5Decompressor.h.
|
private |
Definition at line 99 of file VC5Decompressor.h.
Referenced by VC5Decompressor(), and combineFinalLowpassBands().
Definition at line 124 of file VC5Decompressor.h.
|
staticconstexprprivate |
Definition at line 101 of file VC5Decompressor.h.
Referenced by parseVC5().