Geant4  10.01.p02
G4JpegCoder Class Reference

#include <G4RTJpegCoder.hh>

+ Collaboration diagram for G4JpegCoder:

Public Member Functions

 G4JpegCoder (u_char *colorR, u_char *colorG, u_char *colorB)
 
 ~G4JpegCoder (void)
 
void GetJpegData (char **aJpegData, int &size)
 
void SetJpegProperty (const G4JpegProperty &aProperty)
 
int DoCoding (void)
 

Protected Member Functions

void CodeMCU ()
 
void makeYCC (int ux, int uy)
 
void CodeHuffman (int cs)
 
void ForwardDCT (int *picData)
 
void Quantization (int cs)
 
void WriteHeader (void)
 
void WriteEOI (void)
 

Protected Attributes

u_charmRgb [3]
 
int mYBlock [4][64]
 
int mCbBlock [64]
 
int mCrBlock [64]
 
double mCosT [8][8]
 
int mDCTData [64]
 
int mPreDC [3]
 
G4JpegProperty mProperty
 
int mNumVUnits
 
int mNumHUnits
 
G4OutBitStreammOBSP
 

Detailed Description

Definition at line 51 of file G4RTJpegCoder.hh.

Constructor & Destructor Documentation

G4JpegCoder::G4JpegCoder ( u_char colorR,
u_char colorG,
u_char colorB 
)

Definition at line 43 of file G4RTJpegCoder.cc.

References mCosT, mOBSP, mPreDC, mRgb, n, and PaiDiv16.

G4JpegCoder::~G4JpegCoder ( void  )

Definition at line 57 of file G4RTJpegCoder.cc.

Member Function Documentation

void G4JpegCoder::CodeHuffman ( int  cs)
protected

Definition at line 187 of file G4RTJpegCoder.cc.

References CAcHuffmanT, CDcHuffmanT, CEOBidx, G4HuffmanCodeTable::CodeT, CZRLidx, mDCTData, mOBSP, mPreDC, n, G4HuffmanCodeTable::numOfElement, G4OutBitStream::SetBits(), G4HuffmanCodeTable::SizeT, YAcHuffmanT, YDcHuffmanT, YEOBidx, YZRLidx, and Zigzag.

Referenced by CodeMCU().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4JpegCoder::CodeMCU ( void  )
protected

Definition at line 116 of file G4RTJpegCoder.cc.

References CodeHuffman(), ForwardDCT(), mCbBlock, mCrBlock, mYBlock, n, and Quantization().

Referenced by DoCoding().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int G4JpegCoder::DoCoding ( void  )

Definition at line 75 of file G4RTJpegCoder.cc.

References CodeMCU(), M_NoError, M_RuntimeError, makeYCC(), mCbBlock, mCrBlock, mNumHUnits, mNumVUnits, mOBSP, mProperty, G4JpegProperty::nColumn, G4JpegProperty::nRow, WriteEOI(), and WriteHeader().

Referenced by G4RTJpegMaker::CreateFigureFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4JpegCoder::ForwardDCT ( int *  picData)
protected

Definition at line 258 of file G4RTJpegCoder.cc.

References DisSqrt2, mCosT, and mDCTData.

Referenced by CodeMCU().

+ Here is the caller graph for this function:

void G4JpegCoder::GetJpegData ( char **  aJpegData,
int &  size 
)

Definition at line 61 of file G4RTJpegCoder.cc.

References G4OutBitStream::GetStreamAddress(), G4OutBitStream::GetStreamSize(), and mOBSP.

Referenced by G4RTJpegMaker::CreateFigureFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4JpegCoder::makeYCC ( int  ux,
int  uy 
)
protected

Definition at line 133 of file G4RTJpegCoder.cc.

References mCbBlock, mCrBlock, mProperty, mRgb, mYBlock, n, G4JpegProperty::nColumn, and G4JpegProperty::nRow.

Referenced by DoCoding().

+ Here is the caller graph for this function:

void G4JpegCoder::Quantization ( int  cs)
protected

Definition at line 248 of file G4RTJpegCoder.cc.

References CQuantumT, mDCTData, and YQuantumT.

Referenced by CodeMCU().

+ Here is the caller graph for this function:

void G4JpegCoder::SetJpegProperty ( const G4JpegProperty aProperty)

Definition at line 368 of file G4RTJpegCoder.cc.

References G4JpegProperty::Dimension, G4JpegProperty::Format, G4JpegProperty::HThumbnail, G4JpegProperty::MajorRevisions, G4JpegProperty::MinorRevisions, mProperty, G4JpegProperty::SamplePrecision, and G4JpegProperty::VThumbnail.

Referenced by G4RTJpegMaker::CreateFigureFile().

+ Here is the caller graph for this function:

void G4JpegCoder::WriteEOI ( void  )
protected

Definition at line 360 of file G4RTJpegCoder.cc.

References M_EOI, M_Marker, mOBSP, and G4OutBitStream::SetByte().

Referenced by DoCoding().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4JpegCoder::WriteHeader ( void  )
protected

Definition at line 276 of file G4RTJpegCoder.cc.

References AcDhtLength, CAcDht, CDcDht, G4JpegProperty::Comment, G4OutBitStream::CopyByte(), CQuantumT, CSampleF, DcDhtLength, G4JpegProperty::Dimension, G4JpegProperty::HDensity, JFIF, JFIFLength, JFIFVersion, M_APP0, M_COM, M_DQT, M_Marker, M_SOF0, M_SOI, M_SOS, mOBSP, mProperty, G4JpegProperty::nColumn, G4JpegProperty::nRow, G4JpegProperty::SamplePrecision, G4OutBitStream::SetByte(), G4OutBitStream::SetWord(), G4JpegProperty::Units, G4JpegProperty::VDensity, YAcDht, YDcDht, YQuantumT, YSampleF, and Zigzag.

Referenced by DoCoding().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

int G4JpegCoder::mCbBlock[64]
protected

Definition at line 67 of file G4RTJpegCoder.hh.

Referenced by CodeMCU(), DoCoding(), and makeYCC().

double G4JpegCoder::mCosT[8][8]
protected

Definition at line 69 of file G4RTJpegCoder.hh.

Referenced by ForwardDCT(), and G4JpegCoder().

int G4JpegCoder::mCrBlock[64]
protected

Definition at line 68 of file G4RTJpegCoder.hh.

Referenced by CodeMCU(), DoCoding(), and makeYCC().

int G4JpegCoder::mDCTData[64]
protected

Definition at line 70 of file G4RTJpegCoder.hh.

Referenced by CodeHuffman(), ForwardDCT(), and Quantization().

int G4JpegCoder::mNumHUnits
protected

Definition at line 75 of file G4RTJpegCoder.hh.

Referenced by DoCoding().

int G4JpegCoder::mNumVUnits
protected

Definition at line 74 of file G4RTJpegCoder.hh.

Referenced by DoCoding().

G4OutBitStream* G4JpegCoder::mOBSP
protected

Definition at line 77 of file G4RTJpegCoder.hh.

Referenced by CodeHuffman(), DoCoding(), G4JpegCoder(), GetJpegData(), WriteEOI(), and WriteHeader().

int G4JpegCoder::mPreDC[3]
protected

Definition at line 71 of file G4RTJpegCoder.hh.

Referenced by CodeHuffman(), and G4JpegCoder().

G4JpegProperty G4JpegCoder::mProperty
protected

Definition at line 73 of file G4RTJpegCoder.hh.

Referenced by DoCoding(), makeYCC(), SetJpegProperty(), and WriteHeader().

u_char* G4JpegCoder::mRgb[3]
protected

Definition at line 65 of file G4RTJpegCoder.hh.

Referenced by G4JpegCoder(), and makeYCC().

int G4JpegCoder::mYBlock[4][64]
protected

Definition at line 66 of file G4RTJpegCoder.hh.

Referenced by CodeMCU(), and makeYCC().


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