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

#include "decompressors/UncompressedDecompressor.h"

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

Public Member Functions

 UncompressedDecompressor (ByteStream input, RawImage img, const iRectangle2D &crop, int inputPitchBytes, int bitPerPixel, BitOrder order)
void readUncompressedRaw ()
template<bool uncorrectedRawValues>
void decode8BitRaw ()
template<Endianness e>
void decode12BitRawWithControl ()
template<Endianness e>
void decode12BitRawUnpackedLeftAligned ()

Private Member Functions

void sanityCheck (const uint32_t *h, int bytesPerLine) const
void sanityCheck (uint32_t w, const uint32_t *h, int bpp) const
template<typename Pump, typename NarrowFpType>
void decodePackedFP (int rows, int row) const
template<typename Pump>
void decodePackedInt (int rows, int row) const

Static Private Member Functions

static int bytesPerLine (int w, bool skips)

Private Attributes

ByteStream input
RawImage mRaw
const iPoint2D size
const iPoint2D offset
int inputPitchBytes
int bitPerPixel
BitOrder order
uint32_t skipBytes

Detailed Description

Definition at line 37 of file UncompressedDecompressor.h.

Constructor & Destructor Documentation

◆ UncompressedDecompressor()

rawspeed::UncompressedDecompressor::UncompressedDecompressor ( ByteStream input,
RawImage img,
const iRectangle2D & crop,
int inputPitchBytes,
int bitPerPixel,
BitOrder order )

Definition at line 106 of file UncompressedDecompressor.cpp.

References bitPerPixel, dim, rawspeed::implicit_cast(), input, inputPitchBytes, invariant, rawspeed::JPEG, rawspeed::LSB, mRaw, rawspeed::MSB, rawspeed::MSB16, rawspeed::MSB32, offset, order, sanityCheck(), size, skipBytes, ThrowRDE, rawspeed::UINT16, and y.

Here is the call graph for this function:

Member Function Documentation

◆ bytesPerLine()

int rawspeed::UncompressedDecompressor::bytesPerLine ( int w,
bool skips )
staticprivate

Definition at line 88 of file UncompressedDecompressor.cpp.

References invariant, and ThrowIOE.

Referenced by decode12BitRawWithControl(), and sanityCheck().

Here is the caller graph for this function:

◆ decode12BitRawUnpackedLeftAligned()

template<Endianness e>
template void rawspeed::UncompressedDecompressor::decode12BitRawUnpackedLeftAligned< Endianness::big > ( )

Definition at line 357 of file UncompressedDecompressor.cpp.

References rawspeed::Array2DRef(), rawspeed::implicit_cast(), input, rawspeed::little, mRaw, sanityCheck(), and size.

Referenced by rawspeed::UncompressedDecompressor::decode12BitRawUnpackedLeftAligned< Endianness::big >(), and rawspeed::UncompressedDecompressor::decode12BitRawUnpackedLeftAligned< Endianness::little >().

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

◆ decode12BitRawWithControl()

template<Endianness e>
template void rawspeed::UncompressedDecompressor::decode12BitRawWithControl< Endianness::big > ( )

Definition at line 297 of file UncompressedDecompressor.cpp.

References rawspeed::Array2DRef(), rawspeed::big, bytesPerLine(), rawspeed::implicit_cast(), input, rawspeed::little, mRaw, sanityCheck(), size, and x.

Referenced by rawspeed::UncompressedDecompressor::decode12BitRawWithControl< Endianness::big >(), and rawspeed::UncompressedDecompressor::decode12BitRawWithControl< Endianness::little >().

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

◆ decode8BitRaw()

template<bool uncorrectedRawValues>
template void rawspeed::UncompressedDecompressor::decode8BitRaw< true > ( )

Definition at line 271 of file UncompressedDecompressor.cpp.

References rawspeed::Array2DRef(), input, mRaw, sanityCheck(), and size.

Here is the call graph for this function:

◆ decodePackedFP()

template<typename Pump, typename NarrowFpType>
void rawspeed::UncompressedDecompressor::decodePackedFP ( int rows,
int row ) const
private

Definition at line 172 of file UncompressedDecompressor.cpp.

References rawspeed::extendBinaryFloatingPoint(), input, mRaw, offset, size, and skipBytes.

Referenced by readUncompressedRaw().

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

◆ decodePackedInt()

template<typename Pump>
void rawspeed::UncompressedDecompressor::decodePackedInt ( int rows,
int row ) const
private

Definition at line 189 of file UncompressedDecompressor.cpp.

References bitPerPixel, rawspeed::implicit_cast(), input, mRaw, size, skipBytes, and x.

Referenced by readUncompressedRaw().

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

◆ readUncompressedRaw()

void rawspeed::UncompressedDecompressor::readUncompressedRaw ( )

Definition at line 202 of file UncompressedDecompressor.cpp.

References bitPerPixel, rawspeed::copyPixels(), decodePackedFP(), decodePackedInt(), rawspeed::F32, rawspeed::getHostEndianness(), rawspeed::implicit_cast(), input, inputPitchBytes, rawspeed::little, rawspeed::LSB, mRaw, rawspeed::MSB, rawspeed::MSB16, rawspeed::MSB32, offset, order, size, ThrowRDE, and y.

Referenced by anonymous_namespace{UncompressedDecompressorBenchmark.cpp}::BM_UncompressedDecompressor(), rawspeed::AbstractDngDecompressor::decompressThread(), and LLVMFuzzerTestOneInput().

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

◆ sanityCheck() [1/2]

void rawspeed::UncompressedDecompressor::sanityCheck ( const uint32_t * h,
int bytesPerLine ) const
private

Definition at line 52 of file UncompressedDecompressor.cpp.

References bytesPerLine(), input, invariant, and ThrowIOE.

Referenced by UncompressedDecompressor(), decode12BitRawUnpackedLeftAligned(), decode12BitRawWithControl(), decode8BitRaw(), and sanityCheck().

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

◆ sanityCheck() [2/2]

void rawspeed::UncompressedDecompressor::sanityCheck ( uint32_t w,
const uint32_t * h,
int bpp ) const
private

Definition at line 76 of file UncompressedDecompressor.cpp.

References invariant, and sanityCheck().

Here is the call graph for this function:

Member Data Documentation

◆ bitPerPixel

int rawspeed::UncompressedDecompressor::bitPerPixel
private

◆ input

◆ inputPitchBytes

int rawspeed::UncompressedDecompressor::inputPitchBytes
private

Definition at line 43 of file UncompressedDecompressor.h.

Referenced by UncompressedDecompressor(), and readUncompressedRaw().

◆ mRaw

◆ offset

const iPoint2D rawspeed::UncompressedDecompressor::offset
private

◆ order

BitOrder rawspeed::UncompressedDecompressor::order
private

Definition at line 45 of file UncompressedDecompressor.h.

Referenced by UncompressedDecompressor(), and readUncompressedRaw().

◆ size

◆ skipBytes

uint32_t rawspeed::UncompressedDecompressor::skipBytes
private

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