Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

CMJ2EncMT Class Reference

Simple implementation of a Multi-Threaded CMJ2Enc. More...

#include <iMJ2Enc.h>

Inheritance diagram for CMJ2EncMT:

Inheritance graph
Collaboration diagram for CMJ2EncMT:

Collaboration graph

Public Member Functions

 CMJ2EncMT (BOOL bInterlaced, BOOL bMT, DWORD dwIdealProcessor, const GUID *pOEM_LIC)
 Constructor.
 ~CMJ2EncMT ()
 Destructor.
virtual int prepare (JPEG2000INFOHEADER2 *jp2, int argc, char **argv, BYTE *in, int in_size, int in_ofs, int in_row, int in_width, int in_height, DWORD in_fcc, int in_bits, BYTE *out, int out_size, int out_quality, int out_desired_size)
 Prepare 1st field or frame encoding in a multi-threaded operation (bMT was TRUE when passed to constructor CMJ2EncMT()).
virtual int encode (JPEG2000INFOHEADER2 *jp2, int argc, char **argv, BYTE *in, int in_size, int in_ofs, int in_row, int in_width, int in_height, DWORD in_fcc, int in_bits, BYTE *out, int out_size, int out_quality, int out_desired_size)
 Encode 1 frame/field or 2 frames/fields.
virtual int sync ()
 Wait for completion of 1st field or frame encoding in a multi-threaded operation (bMT was TRUE when passed to constructor CMJ2EncMT()).

Private Attributes

CMJ2EncTm_pSlave
 Slave CMJ2EncT driven by CMJ2EncMT.

Detailed Description

Simple implementation of a Multi-Threaded CMJ2Enc.

If bMT is TRUE:

If bMT is FALSE:
Remarks:
bMT is passed to constructor CMJ2EncMT().
The calling sequence in a multi-threaded operation is :
Examples:

jp2_encodeMT.cpp.


Constructor & Destructor Documentation

CMJ2EncMT::CMJ2EncMT BOOL  bInterlaced,
BOOL  bMT,
DWORD  dwIdealProcessor,
const GUID *  pOEM_LIC
[inline]
 

Constructor.

Parameters:
bInterlaced Interlace encoding flag (see IMJ2Enc()).
bMT Multi-threaded operation flag (see above).
dwIdealProcessor Ideal Processor for 1st field/frame encoding in multi-threaded operation (see CMJ2EncT()).
pOEM_LIC Pointer to the OEM license GUID (&OEM_LIC).

CMJ2EncMT::~CMJ2EncMT  )  [inline]
 

Destructor.


Member Function Documentation

virtual int CMJ2EncMT::prepare JPEG2000INFOHEADER2 jp2,
int  argc,
char **  argv,
BYTE *  in,
int  in_size,
int  in_ofs,
int  in_row,
int  in_width,
int  in_height,
DWORD  in_fcc,
int  in_bits,
BYTE *  out,
int  out_size,
int  out_quality,
int  out_desired_size
[inline, virtual]
 

Prepare 1st field or frame encoding in a multi-threaded operation (bMT was TRUE when passed to constructor CMJ2EncMT()).

Parameters:
see IMJ2Enc::encode().
Returns:
  • 0 on success.
  • -1 if bMT was FALSE when passed to constructor CMJ2EncMT().
Examples:
jp2_encodeMT.cpp.

Here is the call graph for this function:

virtual int CMJ2EncMT::encode JPEG2000INFOHEADER2 jp2,
int  argc,
char **  argv,
BYTE *  in,
int  in_size,
int  in_ofs,
int  in_row,
int  in_width,
int  in_height,
DWORD  in_fcc,
int  in_bits,
BYTE *  out,
int  out_size,
int  out_quality,
int  out_desired_size
[inline, virtual]
 

Encode 1 frame/field or 2 frames/fields.

Parameters:
see IMJ2Enc::encode().
If bMT was FALSE when passed to constructor CMJ2EncMT():
  • Encode 1 frame or field.
If bMT was TRUE when passed to constructor CMJ2EncMT():
  • Encode 2 frames or 2 fields in a multi-threaded operation.
Returns:
  • If bMT was FALSE: The size in bytes of the field or frame encoded.
  • If bMT was TRUE: The size in bytes of the 2nd field or frame encoded.

Reimplemented from IMJ2Enc.

Examples:
jp2_encodeMT.cpp.

Here is the call graph for this function:

virtual int CMJ2EncMT::sync  )  [inline, virtual]
 

Wait for completion of 1st field or frame encoding in a multi-threaded operation (bMT was TRUE when passed to constructor CMJ2EncMT()).

Returns:
  • The size in bytes of the 1st field or frame encoded.
  • 0 if bMT was FALSE when passed to constructor CMJ2EncMT().
Examples:
jp2_encodeMT.cpp.

Here is the call graph for this function:


Field Documentation

CMJ2EncT* CMJ2EncMT::m_pSlave [private]
 

Slave CMJ2EncT driven by CMJ2EncMT.


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

   

© Morgan Multimedia 1990-2005