RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
rawspeed::AbstractLJpegDecoder Class Referenceabstract

#include "decompressors/AbstractLJpegDecoder.h"

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

Public Member Functions

 AbstractLJpegDecoder (ByteStream bs, RawImage img)
int getSamplePrecision () const
virtual ~AbstractLJpegDecoder ()=default

Protected Member Functions

virtual bool erratumImplicitEOIMarkerAfterScan () const
void decodeSOI ()
void parseSOF (ByteStream data, SOFInfo *i)
void parseSOS (ByteStream data)
void parseDHT (ByteStream data)
void parseDRI (ByteStream dri)
JpegMarker getNextMarker (bool allowskip)
std::vector< const PrefixCodeDecoder<> * > getPrefixCodeDecoders (int N_COMP) const
std::vector< uint16_tgetInitialPredictors (int N_COMP) const
virtual ByteStream::size_type decodeScan ()=0

Protected Attributes

bool fixDng16Bug = false
bool fullDecodeHT = true
ByteStream input
RawImage mRaw
SOFInfo frame
uint16_t numMCUsPerRestartInterval = 0
uint32_t predictorMode = 0

Private Member Functions

virtual void anchor () const

Private Attributes

std::vector< std::unique_ptr< const HuffmanCode< BaselineCodeTag > > > huffmanCodeStore
std::vector< std::unique_ptr< const PrefixCodeDecoder<> > > PrefixCodeDecoderStore
uint32_t Pt = 0
std::array< const PrefixCodeDecoder<> *, 4 > huff

Detailed Description

Definition at line 75 of file AbstractLJpegDecoder.h.

Constructor & Destructor Documentation

◆ AbstractLJpegDecoder()

rawspeed::AbstractLJpegDecoder::AbstractLJpegDecoder ( ByteStream bs,
RawImage img )

Definition at line 49 of file AbstractLJpegDecoder.cpp.

References rawspeed::big, input, mRaw, and ThrowRDE.

Referenced by rawspeed::Cr2LJpegDecoder::Cr2LJpegDecoder(), anonymous_namespace{DummyLJpegDecoder.cpp}::DummyLJpegDecoder::DummyLJpegDecoder(), rawspeed::HasselbladLJpegDecoder::HasselbladLJpegDecoder(), and rawspeed::LJpegDecoder::LJpegDecoder().

Here is the caller graph for this function:

◆ ~AbstractLJpegDecoder()

virtual rawspeed::AbstractLJpegDecoder::~AbstractLJpegDecoder ( )
virtualdefault

Member Function Documentation

◆ anchor()

void rawspeed::AbstractLJpegDecoder::anchor ( ) const
privatevirtual

Definition at line 44 of file AbstractLJpegDecoder.cpp.

◆ decodeScan()

virtual ByteStream::size_type rawspeed::AbstractLJpegDecoder::decodeScan ( )
nodiscardprotectedpure virtual

Implemented in anonymous_namespace{DummyLJpegDecoder.cpp}::DummyLJpegDecoder, rawspeed::Cr2LJpegDecoder, rawspeed::HasselbladLJpegDecoder, and rawspeed::LJpegDecoder.

Referenced by parseSOS().

Here is the caller graph for this function:

◆ decodeSOI()

void rawspeed::AbstractLJpegDecoder::decodeSOI ( )
protected

Definition at line 65 of file AbstractLJpegDecoder.cpp.

References rawspeed::DHT, rawspeed::DQT, rawspeed::DRI, rawspeed::EOI, erratumImplicitEOIMarkerAfterScan(), frame, getNextMarker(), input, parseDHT(), parseDRI(), parseSOF(), parseSOS(), rawspeed::ByteStream::skipBytes(), rawspeed::SOF3, rawspeed::SOI, rawspeed::SOS, and ThrowRDE.

Referenced by rawspeed::Cr2LJpegDecoder::decode(), rawspeed::HasselbladLJpegDecoder::decode(), and rawspeed::LJpegDecoder::decode().

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

◆ erratumImplicitEOIMarkerAfterScan()

virtual bool rawspeed::AbstractLJpegDecoder::erratumImplicitEOIMarkerAfterScan ( ) const
inlinenodiscardprotectedvirtual

Reimplemented in rawspeed::HasselbladLJpegDecoder.

Definition at line 101 of file AbstractLJpegDecoder.h.

Referenced by decodeSOI().

Here is the caller graph for this function:

◆ getInitialPredictors()

std::vector< uint16_t > rawspeed::AbstractLJpegDecoder::getInitialPredictors ( int N_COMP) const
inlinenodiscardprotected

Definition at line 128 of file AbstractLJpegDecoder.h.

References frame, Pt, and ThrowRDE.

Referenced by rawspeed::Cr2LJpegDecoder::decodeScan(), rawspeed::HasselbladLJpegDecoder::decodeScan(), and rawspeed::LJpegDecoder::decodeScan().

Here is the caller graph for this function:

◆ getNextMarker()

JpegMarker rawspeed::AbstractLJpegDecoder::getNextMarker ( bool allowskip)
protected

Definition at line 282 of file AbstractLJpegDecoder.cpp.

References rawspeed::advanceToNextMarker(), input, rawspeed::peekMarker(), and ThrowRDE.

Referenced by decodeSOI().

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

◆ getPrefixCodeDecoders()

std::vector< const PrefixCodeDecoder<> * > rawspeed::AbstractLJpegDecoder::getPrefixCodeDecoders ( int N_COMP) const
inlinenodiscardprotected

Definition at line 113 of file AbstractLJpegDecoder.h.

References frame, huff, rawspeed::implicit_cast(), and ThrowRDE.

Referenced by rawspeed::Cr2LJpegDecoder::decodeScan(), rawspeed::HasselbladLJpegDecoder::decodeScan(), and rawspeed::LJpegDecoder::decodeScan().

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

◆ getSamplePrecision()

int rawspeed::AbstractLJpegDecoder::getSamplePrecision ( ) const
inlinenodiscard

Definition at line 90 of file AbstractLJpegDecoder.h.

References frame.

Referenced by rawspeed::Cr2Decoder::decodeNewFormat(), and rawspeed::Cr2Decoder::decodeOldFormat().

Here is the caller graph for this function:

◆ parseDHT()

void rawspeed::AbstractLJpegDecoder::parseDHT ( ByteStream data)
protected

Definition at line 230 of file AbstractLJpegDecoder.cpp.

References assert(), fixDng16Bug, fullDecodeHT, rawspeed::ByteStream::getBuffer(), rawspeed::ByteStream::getByte(), rawspeed::ByteStream::getRemainSize(), huff, huffmanCodeStore, PrefixCodeDecoderStore, rawspeed::HuffmanCode< CodeTag >::setCodeValues(), rawspeed::HuffmanCode< CodeTag >::setNCodesPerLength(), and ThrowRDE.

Referenced by decodeSOI().

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

◆ parseDRI()

void rawspeed::AbstractLJpegDecoder::parseDRI ( ByteStream dri)
protected

Definition at line 276 of file AbstractLJpegDecoder.cpp.

References rawspeed::ByteStream::getRemainSize(), rawspeed::ByteStream::getU16(), numMCUsPerRestartInterval, and ThrowRDE.

Referenced by decodeSOI().

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

◆ parseSOF()

void rawspeed::AbstractLJpegDecoder::parseSOF ( ByteStream data,
SOFInfo * i )
protected

Definition at line 127 of file AbstractLJpegDecoder.cpp.

References rawspeed::SOFInfo::compInfo, rawspeed::SOFInfo::cps, frame, rawspeed::ByteStream::getByte(), rawspeed::ByteStream::getRemainSize(), rawspeed::ByteStream::getU16(), rawspeed::SOFInfo::h, rawspeed::SOFInfo::initialized, mRaw, rawspeed::SOFInfo::prec, ThrowRDE, and rawspeed::SOFInfo::w.

Referenced by decodeSOI().

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

◆ parseSOS()

void rawspeed::AbstractLJpegDecoder::parseSOS ( ByteStream data)
protected

Definition at line 181 of file AbstractLJpegDecoder.cpp.

References decodeScan(), frame, rawspeed::ByteStream::getByte(), rawspeed::ByteStream::getRemainSize(), huff, input, invariant, predictorMode, Pt, and ThrowRDE.

Referenced by decodeSOI().

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

Member Data Documentation

◆ fixDng16Bug

bool rawspeed::AbstractLJpegDecoder::fixDng16Bug = false
protected

Definition at line 95 of file AbstractLJpegDecoder.h.

Referenced by rawspeed::LJpegDecoder::decode(), and parseDHT().

◆ frame

◆ fullDecodeHT

bool rawspeed::AbstractLJpegDecoder::fullDecodeHT = true
protected

Definition at line 96 of file AbstractLJpegDecoder.h.

Referenced by rawspeed::HasselbladLJpegDecoder::decode(), and parseDHT().

◆ huff

std::array<const PrefixCodeDecoder<>*, 4> rawspeed::AbstractLJpegDecoder::huff
private
Initial value:
{
{}}

Definition at line 83 of file AbstractLJpegDecoder.h.

Referenced by getPrefixCodeDecoders(), parseDHT(), and parseSOS().

◆ huffmanCodeStore

std::vector<std::unique_ptr<const HuffmanCode<BaselineCodeTag> > > rawspeed::AbstractLJpegDecoder::huffmanCodeStore
private

Definition at line 78 of file AbstractLJpegDecoder.h.

Referenced by parseDHT().

◆ input

◆ mRaw

◆ numMCUsPerRestartInterval

uint16_t rawspeed::AbstractLJpegDecoder::numMCUsPerRestartInterval = 0
protected

◆ predictorMode

uint32_t rawspeed::AbstractLJpegDecoder::predictorMode = 0
protected

◆ PrefixCodeDecoderStore

std::vector<std::unique_ptr<const PrefixCodeDecoder<> > > rawspeed::AbstractLJpegDecoder::PrefixCodeDecoderStore
private

Definition at line 80 of file AbstractLJpegDecoder.h.

Referenced by parseDHT().

◆ Pt

uint32_t rawspeed::AbstractLJpegDecoder::Pt = 0
private

Definition at line 82 of file AbstractLJpegDecoder.h.

Referenced by getInitialPredictors(), and parseSOS().


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