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

#include "decompressors/PanasonicV5Decompressor.h"

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

Classes

struct  Block
struct  PacketDsc
class  ProxyStream

Public Member Functions

 PanasonicV5Decompressor (RawImage img, ByteStream input_, uint32_t bps_)
void decompress () const noexcept

Private Member Functions

void chopInputIntoBlocks (const PacketDsc &dsc)
template<const PacketDsc & dsc>
void processPixelPacket (BitStreamerLSB &bs, int row, int col) const
template<const PacketDsc & dsc>
void processBlock (const Block &block) const
template<const PacketDsc & dsc>
void decompressInternal () const noexcept

Private Attributes

RawImage mRaw
ByteStream input
const uint32_t bps
uint64_t numBlocks
std::vector< Blockblocks

Static Private Attributes

static constexpr uint32_t BlockSize = 0x4000
static constexpr uint32_t sectionSplitOffset = 0x1FF8
static constexpr uint32_t bytesPerPacket = 16
static constexpr uint32_t bitsPerPacket = 8 * bytesPerPacket
static constexpr uint32_t PacketsPerBlock = BlockSize / bytesPerPacket
static const PacketDsc TwelveBitPacket
static const PacketDsc FourteenBitPacket

Detailed Description

Definition at line 34 of file PanasonicV5Decompressor.h.

Constructor & Destructor Documentation

◆ PanasonicV5Decompressor()

rawspeed::PanasonicV5Decompressor::PanasonicV5Decompressor ( RawImage img,
ByteStream input_,
uint32_t bps_ )

Definition at line 70 of file PanasonicV5Decompressor.cpp.

References BlockSize, bps, chopInputIntoBlocks(), FourteenBitPacket, rawspeed::ByteStream::getRemainSize(), rawspeed::implicit_cast(), input, invariant, mRaw, numBlocks, PacketsPerBlock, rawspeed::ByteStream::peekStream(), rawspeed::PanasonicV5Decompressor::PacketDsc::pixelsPerPacket, rawspeed::roundUpDivisionSafe(), ThrowRDE, TwelveBitPacket, and rawspeed::UINT16.

Referenced by rawspeed::PanasonicV5Decompressor::PacketDsc::PacketDsc().

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

Member Function Documentation

◆ chopInputIntoBlocks()

void rawspeed::PanasonicV5Decompressor::chopInputIntoBlocks ( const PacketDsc & dsc)
private

Definition at line 117 of file PanasonicV5Decompressor.cpp.

References assert(), blocks, BlockSize, dim, rawspeed::implicit_cast(), input, invariant, mRaw, numBlocks, PacketsPerBlock, and rawspeed::PanasonicV5Decompressor::PacketDsc::pixelsPerPacket.

Referenced by PanasonicV5Decompressor().

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

◆ decompress()

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

Definition at line 253 of file PanasonicV5Decompressor.cpp.

References bps, and decompressInternal().

Referenced by rawspeed::Rw2Decoder::decodeRawInternal().

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

◆ decompressInternal()

template<const PanasonicV5Decompressor::PacketDsc & dsc>
void rawspeed::PanasonicV5Decompressor::decompressInternal ( ) const
privatenoexcept

Definition at line 237 of file PanasonicV5Decompressor.cpp.

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

Referenced by decompress().

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

◆ processBlock()

template<const PanasonicV5Decompressor::PacketDsc & dsc>
void rawspeed::PanasonicV5Decompressor::processBlock ( const Block & block) const
private

Definition at line 210 of file PanasonicV5Decompressor.cpp.

References rawspeed::PanasonicV5Decompressor::Block::beginCoord, BlockSize, rawspeed::PanasonicV5Decompressor::Block::bs, bytesPerPacket, rawspeed::PanasonicV5Decompressor::Block::endCoord, rawspeed::Buffer::getAsArray1DRef(), rawspeed::PanasonicV5Decompressor::ProxyStream::getStream(), invariant, mRaw, rawspeed::ByteStream::peekRemainingBuffer(), processPixelPacket(), rawspeed::iPoint2D::x, and rawspeed::iPoint2D::y.

Referenced by decompressInternal().

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

◆ processPixelPacket()

template<const PanasonicV5Decompressor::PacketDsc & dsc>
void rawspeed::PanasonicV5Decompressor::processPixelPacket ( BitStreamerLSB & bs,
int row,
int col ) const
inlineprivate

Definition at line 191 of file PanasonicV5Decompressor.cpp.

References rawspeed::BitStreamer< Tag >::fill(), rawspeed::BitStreamer< Tag >::getBitsNoFill(), rawspeed::BitStreamer< Tag >::getFillLevel(), rawspeed::implicit_cast(), invariant, mRaw, and rawspeed::BitStreamer< Tag >::skipBitsNoFill().

Referenced by processBlock().

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

Member Data Documentation

◆ bitsPerPacket

uint32_t rawspeed::PanasonicV5Decompressor::bitsPerPacket = 8 * bytesPerPacket
staticconstexprprivate

◆ blocks

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

Definition at line 87 of file PanasonicV5Decompressor.h.

Referenced by chopInputIntoBlocks(), and decompressInternal().

◆ BlockSize

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

◆ bps

const uint32_t rawspeed::PanasonicV5Decompressor::bps
private

Definition at line 69 of file PanasonicV5Decompressor.h.

Referenced by PanasonicV5Decompressor(), and decompress().

◆ bytesPerPacket

uint32_t rawspeed::PanasonicV5Decompressor::bytesPerPacket = 16
staticconstexprprivate

Definition at line 49 of file PanasonicV5Decompressor.h.

Referenced by processBlock().

◆ FourteenBitPacket

PanasonicV5Decompressor::PacketDsc rawspeed::PanasonicV5Decompressor::FourteenBitPacket
staticconstexprprivate

◆ input

ByteStream rawspeed::PanasonicV5Decompressor::input
private

Definition at line 67 of file PanasonicV5Decompressor.h.

Referenced by PanasonicV5Decompressor(), and chopInputIntoBlocks().

◆ mRaw

RawImage rawspeed::PanasonicV5Decompressor::mRaw
private

◆ numBlocks

uint64_t rawspeed::PanasonicV5Decompressor::numBlocks
private

Definition at line 71 of file PanasonicV5Decompressor.h.

Referenced by PanasonicV5Decompressor(), and chopInputIntoBlocks().

◆ PacketsPerBlock

uint32_t rawspeed::PanasonicV5Decompressor::PacketsPerBlock = BlockSize / bytesPerPacket
staticconstexprprivate

Definition at line 52 of file PanasonicV5Decompressor.h.

Referenced by PanasonicV5Decompressor(), and chopInputIntoBlocks().

◆ sectionSplitOffset

uint32_t rawspeed::PanasonicV5Decompressor::sectionSplitOffset = 0x1FF8
staticconstexprprivate

◆ TwelveBitPacket

PanasonicV5Decompressor::PacketDsc rawspeed::PanasonicV5Decompressor::TwelveBitPacket
staticconstexprprivate
Initial value:

Definition at line 58 of file PanasonicV5Decompressor.h.

Referenced by PanasonicV5Decompressor().


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