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

#include "decompressors/CrwDecompressor.h"

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

Public Member Functions

 CrwDecompressor (RawImage img, uint32_t dec_table_, Array1DRef< const uint8_t > input, Optional< Array1DRef< const uint8_t > > lowbitInput)
void decompress ()

Private Types

using crw_hts = std::array<PrefixCodeDecoder<>, 2>

Static Private Member Functions

static PrefixCodeDecoder makeDecoder (const uint8_t *ncpl, const uint8_t *values)
static crw_hts initHuffTables (uint32_t table)
static void decodeBlock (std::array< int16_t, 64 > *diffBuf, const crw_hts &mHuff, BitStreamerJPEG &bs)

Private Attributes

RawImage mRaw
crw_hts mHuff
Array1DRef< const uint8_t > input
Optional< Array1DRef< const uint8_t > > lowbitInput

Detailed Description

Definition at line 36 of file CrwDecompressor.h.

Member Typedef Documentation

◆ crw_hts

using rawspeed::CrwDecompressor::crw_hts = std::array<PrefixCodeDecoder<>, 2>
private

Definition at line 37 of file CrwDecompressor.h.

Constructor & Destructor Documentation

◆ CrwDecompressor()

rawspeed::CrwDecompressor::CrwDecompressor ( RawImage img,
uint32_t dec_table_,
Array1DRef< const uint8_t > input,
Optional< Array1DRef< const uint8_t > > lowbitInput )

Definition at line 46 of file CrwDecompressor.cpp.

References initHuffTables(), input, invariant, lowbitInput, mHuff, mRaw, ThrowRDE, and rawspeed::UINT16.

Here is the call graph for this function:

Member Function Documentation

◆ decodeBlock()

void rawspeed::CrwDecompressor::decodeBlock ( std::array< int16_t, 64 > * diffBuf,
const crw_hts & mHuff,
BitStreamerJPEG & bs )
inlinestaticprivate

Definition at line 167 of file CrwDecompressor.cpp.

References rawspeed::AbstractPrefixCodeDecoder< CodeTag >::extend(), rawspeed::BitStreamer< Tag >::fill(), rawspeed::BitStreamer< Tag >::getBitsNoFill(), rawspeed::implicit_cast(), invariant, and mHuff.

Referenced by decompress().

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

◆ decompress()

void rawspeed::CrwDecompressor::decompress ( )

Definition at line 210 of file CrwDecompressor.cpp.

References decodeBlock(), rawspeed::Array2DRef< T >::height(), rawspeed::implicit_cast(), input, invariant, rawspeed::isIntN(), lowbitInput, mHuff, mRaw, ThrowRDE, rawspeed::val, and rawspeed::Array2DRef< T >::width().

Referenced by rawspeed::CrwDecoder::decodeRawInternal(), and LLVMFuzzerTestOneInput().

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

◆ initHuffTables()

CrwDecompressor::crw_hts rawspeed::CrwDecompressor::initHuffTables ( uint32_t table)
staticprivate

Definition at line 87 of file CrwDecompressor.cpp.

References makeDecoder(), mHuff, and ThrowRDE.

Referenced by CrwDecompressor().

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

◆ makeDecoder()

PrefixCodeDecoder rawspeed::CrwDecompressor::makeDecoder ( const uint8_t * ncpl,
const uint8_t * values )
staticprivate

Definition at line 74 of file CrwDecompressor.cpp.

References invariant, rawspeed::HuffmanCode< CodeTag >::setCodeValues(), rawspeed::HuffmanCode< CodeTag >::setNCodesPerLength(), and rawspeed::PrefixCodeLUTDecoder< CodeTag, BackendPrefixCodeDecoder >::setup().

Referenced by initHuffTables().

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

Member Data Documentation

◆ input

Array1DRef<const uint8_t> rawspeed::CrwDecompressor::input
private

Definition at line 42 of file CrwDecompressor.h.

Referenced by CrwDecompressor(), and decompress().

◆ lowbitInput

Optional<Array1DRef<const uint8_t> > rawspeed::CrwDecompressor::lowbitInput
private

Definition at line 43 of file CrwDecompressor.h.

Referenced by CrwDecompressor(), and decompress().

◆ mHuff

crw_hts rawspeed::CrwDecompressor::mHuff
private

Definition at line 40 of file CrwDecompressor.h.

Referenced by CrwDecompressor(), decodeBlock(), decompress(), and initHuffTables().

◆ mRaw

RawImage rawspeed::CrwDecompressor::mRaw
private

Definition at line 39 of file CrwDecompressor.h.

Referenced by CrwDecompressor(), and decompress().


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