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

#include "decompressors/Cr2LJpegDecoder.h"

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

Public Member Functions

 Cr2LJpegDecoder (ByteStream bs, const RawImage &img)
void decode (const Cr2SliceWidths &slicing)
int getSamplePrecision () const

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

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

ByteStream::size_type decodeScan () override
virtual void anchor () const

Private Attributes

Cr2SliceWidths slicing
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 32 of file Cr2LJpegDecoder.h.

Constructor & Destructor Documentation

◆ Cr2LJpegDecoder()

rawspeed::Cr2LJpegDecoder::Cr2LJpegDecoder ( ByteStream bs,
const RawImage & img )

Definition at line 43 of file Cr2LJpegDecoder.cpp.

References rawspeed::AbstractLJpegDecoder::AbstractLJpegDecoder(), rawspeed::AbstractLJpegDecoder::mRaw, ThrowRDE, and rawspeed::UINT16.

Here is the call graph for this function:

Member Function Documentation

◆ anchor()

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

Definition at line 44 of file AbstractLJpegDecoder.cpp.

◆ decode()

void rawspeed::Cr2LJpegDecoder::decode ( const Cr2SliceWidths & slicing)

Definition at line 156 of file Cr2LJpegDecoder.cpp.

References rawspeed::AbstractLJpegDecoder::decodeSOI(), slicing, and ThrowRDE.

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

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

◆ decodeScan()

Buffer::size_type rawspeed::Cr2LJpegDecoder::decodeScan ( )
nodiscardoverrideprivatevirtual

◆ decodeSOI()

void rawspeed::AbstractLJpegDecoder::decodeSOI ( )
protectedinherited

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
inlinenodiscardprotectedvirtualinherited

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
inlinenodiscardprotectedinherited

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)
protectedinherited

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
inlinenodiscardprotectedinherited

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
inlinenodiscardinherited

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)
protectedinherited

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)
protectedinherited

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 )
protectedinherited

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)
protectedinherited

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
protectedinherited

Definition at line 95 of file AbstractLJpegDecoder.h.

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

◆ frame

◆ fullDecodeHT

bool rawspeed::AbstractLJpegDecoder::fullDecodeHT = true
protectedinherited

Definition at line 96 of file AbstractLJpegDecoder.h.

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

◆ huff

std::array<const PrefixCodeDecoder<>*, 4> rawspeed::AbstractLJpegDecoder::huff
privateinherited
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
privateinherited

Definition at line 78 of file AbstractLJpegDecoder.h.

Referenced by parseDHT().

◆ input

◆ mRaw

◆ numMCUsPerRestartInterval

uint16_t rawspeed::AbstractLJpegDecoder::numMCUsPerRestartInterval = 0
protectedinherited

◆ predictorMode

uint32_t rawspeed::AbstractLJpegDecoder::predictorMode = 0
protectedinherited

◆ PrefixCodeDecoderStore

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

Definition at line 80 of file AbstractLJpegDecoder.h.

Referenced by parseDHT().

◆ Pt

uint32_t rawspeed::AbstractLJpegDecoder::Pt = 0
privateinherited

Definition at line 82 of file AbstractLJpegDecoder.h.

Referenced by getInitialPredictors(), and parseSOS().

◆ slicing

Cr2SliceWidths rawspeed::Cr2LJpegDecoder::slicing
private

Definition at line 33 of file Cr2LJpegDecoder.h.

Referenced by decode(), and decodeScan().


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