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

#include "decompressors/PanasonicV4Decompressor.h"

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

Classes

struct  Block
class  ProxyStream

Public Member Functions

 PanasonicV4Decompressor (RawImage img, ByteStream input_, bool zero_is_not_bad, uint32_t section_split_offset_)
void decompress () const noexcept

Private Member Functions

void chopInputIntoBlocks ()
void processPixelPacket (ProxyStream &bits, int row, int col, std::vector< uint32_t > *zero_pos) const noexcept
void processBlock (const Block &block, std::vector< uint32_t > *zero_pos) const noexcept
void decompressThread () const noexcept

Private Attributes

RawImage mRaw
ByteStream input
bool zero_is_bad
uint32_t section_split_offset
std::vector< Blockblocks

Static Private Attributes

static constexpr uint32_t BlockSize = 0x4000
static constexpr int PixelsPerPacket = 14
static constexpr uint32_t BytesPerPacket = 16
static constexpr uint32_t PacketsPerBlock = BlockSize / BytesPerPacket
static constexpr uint32_t PixelsPerBlock = PixelsPerPacket * PacketsPerBlock

Detailed Description

Definition at line 32 of file PanasonicV4Decompressor.h.

Constructor & Destructor Documentation

◆ PanasonicV4Decompressor()

rawspeed::PanasonicV4Decompressor::PanasonicV4Decompressor ( RawImage img,
ByteStream input_,
bool zero_is_not_bad,
uint32_t section_split_offset_ )

Definition at line 49 of file PanasonicV4Decompressor.cpp.

References BlockSize, BytesPerPacket, chopInputIntoBlocks(), rawspeed::implicit_cast(), input, invariant, mRaw, rawspeed::ByteStream::peekStream(), PixelsPerPacket, rawspeed::roundUp(), section_split_offset, ThrowRDE, rawspeed::UINT16, and zero_is_bad.

Here is the call graph for this function:

Member Function Documentation

◆ chopInputIntoBlocks()

void rawspeed::PanasonicV4Decompressor::chopInputIntoBlocks ( )
private

Definition at line 88 of file PanasonicV4Decompressor.cpp.

References assert(), blocks, BlockSize, BytesPerPacket, rawspeed::implicit_cast(), input, invariant, mRaw, PixelsPerBlock, PixelsPerPacket, and rawspeed::roundUpDivisionSafe().

Referenced by PanasonicV4Decompressor().

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

◆ decompress()

void rawspeed::PanasonicV4Decompressor::decompress ( ) const
noexcept

Definition at line 268 of file PanasonicV4Decompressor.cpp.

References assert(), blocks, and decompressThread().

Here is the call graph for this function:

◆ decompressThread()

void rawspeed::PanasonicV4Decompressor::decompressThread ( ) const
privatenoexcept

Definition at line 243 of file PanasonicV4Decompressor.cpp.

References rawspeed::Array1DRef(), assert(), blocks, rawspeed::implicit_cast(), mRaw, processBlock(), and zero_is_bad.

Referenced by decompress().

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

◆ processBlock()

void rawspeed::PanasonicV4Decompressor::processBlock ( const Block & block,
std::vector< uint32_t > * zero_pos ) const
privatenoexcept

Definition at line 220 of file PanasonicV4Decompressor.cpp.

References invariant, mRaw, PixelsPerPacket, processPixelPacket(), and section_split_offset.

Referenced by decompressThread().

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

◆ processPixelPacket()

void rawspeed::PanasonicV4Decompressor::processPixelPacket ( ProxyStream & bits,
int row,
int col,
std::vector< uint32_t > * zero_pos ) const
inlineprivatenoexcept

Definition at line 173 of file PanasonicV4Decompressor.cpp.

References rawspeed::extractHighBits(), rawspeed::implicit_cast(), mRaw, PixelsPerPacket, and zero_is_bad.

Referenced by processBlock().

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

Member Data Documentation

◆ blocks

std::vector<Block> rawspeed::PanasonicV4Decompressor::blocks
private

Definition at line 71 of file PanasonicV4Decompressor.h.

Referenced by chopInputIntoBlocks(), decompress(), and decompressThread().

◆ BlockSize

uint32_t rawspeed::PanasonicV4Decompressor::BlockSize = 0x4000
staticconstexprprivate

◆ BytesPerPacket

uint32_t rawspeed::PanasonicV4Decompressor::BytesPerPacket = 16
staticconstexprprivate

Definition at line 37 of file PanasonicV4Decompressor.h.

Referenced by PanasonicV4Decompressor(), and chopInputIntoBlocks().

◆ input

ByteStream rawspeed::PanasonicV4Decompressor::input
private

Definition at line 46 of file PanasonicV4Decompressor.h.

Referenced by PanasonicV4Decompressor(), and chopInputIntoBlocks().

◆ mRaw

RawImage rawspeed::PanasonicV4Decompressor::mRaw
private

◆ PacketsPerBlock

uint32_t rawspeed::PanasonicV4Decompressor::PacketsPerBlock = BlockSize / BytesPerPacket
staticconstexprprivate

Definition at line 39 of file PanasonicV4Decompressor.h.

◆ PixelsPerBlock

uint32_t rawspeed::PanasonicV4Decompressor::PixelsPerBlock = PixelsPerPacket * PacketsPerBlock
staticconstexprprivate

Definition at line 41 of file PanasonicV4Decompressor.h.

Referenced by chopInputIntoBlocks().

◆ PixelsPerPacket

int rawspeed::PanasonicV4Decompressor::PixelsPerPacket = 14
staticconstexprprivate

◆ section_split_offset

uint32_t rawspeed::PanasonicV4Decompressor::section_split_offset
private

Definition at line 55 of file PanasonicV4Decompressor.h.

Referenced by PanasonicV4Decompressor(), and processBlock().

◆ zero_is_bad

bool rawspeed::PanasonicV4Decompressor::zero_is_bad
private

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