JPEGEncoder Class Reference

#include <JPEGEncoder.h>

List of all members.

Public Member Functions

 JPEGEncoder ()
 ~JPEGEncoder ()
bool Init (const antStackRef &ipstack)
bool GetJPEG (OFbkImageVectorData *imageVec, OFbkImageLayer layer, bool reconstruction, int quality, byte **jpeg, int *size)
void FreeJPEG (byte *jpeg)
void Save (OFbkImageVectorData *imageVec, OFbkImageLayer layer, int quality, char *path)

Static Public Attributes

const int NUM_JPEG_BUF = 4

Private Member Functions

byteAllocate ()
void Free (byte *buf)
void ConvertYCbCr (OFbkImageVectorData *imageVec, OFbkImageLayer layer, byte *image, int *width, int *height)
void ReconstructAndConvertYCbCr (OFbkImageVectorData *imageVec, OFbkImageLayer layer, byte *image, int *width, int *height)
void PutYCbCrPixel (byte *img, int w, int x, int y, byte ypix, byte cb, byte cr)
byte ClipRange (int val)

Private Attributes

antStackRef ipstackRef
bytepixelInterleavedYCbCr
antSharedBuffer jpegBuf [NUM_JPEG_BUF]
list< byte * > freeJpegBufList

Static Private Attributes

const int IMAGE_BUFSIZE = 3*(2*208)*(2*160)
const int JPEG_BUFSIZE = 64*1024


Constructor & Destructor Documentation

JPEGEncoder::JPEGEncoder  ) 
 

Definition at line 17 of file JPEGEncoder.cc.

JPEGEncoder::~JPEGEncoder  )  [inline]
 

Definition at line 23 of file JPEGEncoder.h.


Member Function Documentation

byte * JPEGEncoder::Allocate  )  [private]
 

Definition at line 100 of file JPEGEncoder.cc.

References byte, and freeJpegBufList.

Referenced by GetJPEG().

byte JPEGEncoder::ClipRange int  val  )  [inline, private]
 

Definition at line 69 of file JPEGEncoder.h.

References byte.

Referenced by ReconstructAndConvertYCbCr().

void JPEGEncoder::ConvertYCbCr OFbkImageVectorData *  imageVec,
OFbkImageLayer  layer,
byte image,
int *  width,
int *  height
[private]
 

Definition at line 116 of file JPEGEncoder.cc.

References byte.

Referenced by GetJPEG(), and Save().

void JPEGEncoder::Free byte buf  )  [private]
 

Definition at line 110 of file JPEGEncoder.cc.

References freeJpegBufList.

Referenced by FreeJPEG().

void JPEGEncoder::FreeJPEG byte jpeg  ) 
 

Definition at line 54 of file JPEGEncoder.cc.

References Free().

Referenced by W3AIBO::SendImageCont().

bool JPEGEncoder::GetJPEG OFbkImageVectorData *  imageVec,
OFbkImageLayer  layer,
bool  reconstruction,
int  quality,
byte **  jpeg,
int *  size
 

Definition at line 60 of file JPEGEncoder.cc.

References Allocate(), byte, ConvertYCbCr(), JPEG_BUFSIZE, pixelInterleavedYCbCr, ReconstructAndConvertYCbCr(), and write_jpeg_mem().

Referenced by W3AIBO::NotifyImage().

bool JPEGEncoder::Init const antStackRef &  ipstack  ) 
 

Definition at line 24 of file JPEGEncoder.cc.

References byte, freeJpegBufList, IMAGE_BUFSIZE, ipstackRef, JPEG_BUFSIZE, jpegBuf, and pixelInterleavedYCbCr.

Referenced by W3AIBO::DoInit().

void JPEGEncoder::PutYCbCrPixel byte img,
int  w,
int  x,
int  y,
byte  ypix,
byte  cb,
byte  cr
[inline, private]
 

Definition at line 61 of file JPEGEncoder.h.

References byte.

Referenced by ReconstructAndConvertYCbCr().

void JPEGEncoder::ReconstructAndConvertYCbCr OFbkImageVectorData *  imageVec,
OFbkImageLayer  layer,
byte image,
int *  width,
int *  height
[private]
 

Definition at line 153 of file JPEGEncoder.cc.

References byte, ClipRange(), and PutYCbCrPixel().

Referenced by GetJPEG().

void JPEGEncoder::Save OFbkImageVectorData *  imageVec,
OFbkImageLayer  layer,
int  quality,
char *  path
 

Definition at line 84 of file JPEGEncoder.cc.

References ConvertYCbCr(), pixelInterleavedYCbCr, and write_jpeg_file().


Member Data Documentation

list<byte*> JPEGEncoder::freeJpegBufList [private]
 

Definition at line 78 of file JPEGEncoder.h.

Referenced by Allocate(), Free(), and Init().

const int JPEGEncoder::IMAGE_BUFSIZE = 3*(2*208)*(2*160) [static, private]
 

Definition at line 49 of file JPEGEncoder.h.

Referenced by Init().

antStackRef JPEGEncoder::ipstackRef [private]
 

Definition at line 75 of file JPEGEncoder.h.

Referenced by Init().

const int JPEGEncoder::JPEG_BUFSIZE = 64*1024 [static, private]
 

Definition at line 50 of file JPEGEncoder.h.

Referenced by GetJPEG(), and Init().

antSharedBuffer JPEGEncoder::jpegBuf[NUM_JPEG_BUF] [private]
 

Definition at line 77 of file JPEGEncoder.h.

Referenced by Init().

const int JPEGEncoder::NUM_JPEG_BUF = 4 [static]
 

Definition at line 35 of file JPEGEncoder.h.

byte* JPEGEncoder::pixelInterleavedYCbCr [private]
 

Definition at line 76 of file JPEGEncoder.h.

Referenced by GetJPEG(), Init(), and Save().


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 23:04:33 2007 for openSDK by  doxygen 1.3.9.1