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

IMJ2Enc Class Reference

Interface to CMJ2Enc. More...

#include <iMJ2Enc.h>

Inheritance diagram for IMJ2Enc:

Inheritance graph
Collaboration diagram for IMJ2Enc:

Collaboration graph

Public Member Functions

 IMJ2Enc (BOOL bInterlaced, const GUID *pOEM_LIC)
 Constructor.
 ~IMJ2Enc ()
 Destructor.
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 a JPEG2000 codestream.
BOOL IsInterlaced ()
 Determines if the encoding is done interlaced or not.
WORD GetVersion ()
 Determines the version of the library.
BOOL IsLicenseValid ()
 Determines if the license of the library is valid.

Private Attributes

CMJ2Encm_pBind
 Binding pointer to CMJ2Enc.

Detailed Description

Interface to CMJ2Enc.

This class encodes a single frame or field on the current thread.

If bInterlaced is FALSE:
The source frame or field is encoded as-is to the destination frame or field. Then the first line offset, defined by the out_ofs parameter passed to encode(), should be 0.
inline_dotgraph_10

If bInterlaced is TRUE:
The source field is expanded to the destination frame height (WEAVE). Then the first line offset is defined by the out_ofs parameter passed to encode().
inline_dotgraph_11
inline_dotgraph_12

Remarks:
bInterlaced is passed to constructor IMJ2Enc().
Examples:

jp2_encode.cpp.


Constructor & Destructor Documentation

IMJ2Enc::IMJ2Enc BOOL  bInterlaced,
const GUID *  pOEM_LIC
 

Constructor.

Parameters:
bInterlaced Interlaced encoding flag (see above).
pOEM_LIC Pointer to the OEM license GUID (&OEM_LIC).

IMJ2Enc::~IMJ2Enc  ) 
 

Destructor.


Member Function Documentation

virtual int IMJ2Enc::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
[virtual]
 

Encode a JPEG2000 codestream.

Parameters:
jp2 Pointer to a JPEG2000INFOHEADER2 correctly initialized.
argc Reserved for future use, must be 0. An integer specifying how many extra arguments are passed.
argv Reserved for future use, must be NULL. An array of null-terminated strings. The last pointer (argv[argc]) is NULL.
in Pointer to the buffer containing the image to encode.
in_size Size in bytes of the above buffer.
in_ofs Offset in bytes of the first line to encode (see above).
in_row Reserved for future use, must be 0. Size in bytes of a row stride.
in_width Width in pixels of the source image to encode.
in_height Height in pixels of the source image to encode.
in_fcc FOURCC of the input format (see supported Inputs in Input/Output Formats).
in_bits Bit-depth of the input format (see supported Inputs in Input/Output Formats).
out Pointer to the buffer receiving the JPEG2000 codestream.
out_size Size in bytes of the above buffer.
out_quality Desired quality for the encoded image (from 0 to 2400 in % of 1 bit per pixel, q=100 => ~1bpp, q=1000 => ~10bpp, q=2400 => ~24bpp possible for Digital Cinema see Compliance points (Cpoint) for MJPEG2000).
out_desired_size Desired size in bytes for the encoded image.
Returns:
The size in bytes of the encoded image (field or frame).

Reimplemented in CMJ2EncT, and CMJ2EncMT.

Examples:
jp2_encode.cpp.

BOOL IMJ2Enc::IsInterlaced  ) 
 

Determines if the encoding is done interlaced or not.

Returns:
bInterlaced (see above).

WORD IMJ2Enc::GetVersion  ) 
 

Determines the version of the library.

Returns:
The version of MJ2EncDec.lib, current is v2.10 (0x0210).

BOOL IMJ2Enc::IsLicenseValid  ) 
 

Determines if the license of the library is valid.

Returns:
  • TRUE if license is valid.
  • FALSE otherwise, in this case no encoding is performed, encode() always return 0.
Examples:
jp2_encode.cpp, and jp2_encodeMT.cpp.


Field Documentation

CMJ2Enc* IMJ2Enc::m_pBind [private]
 

Binding pointer to CMJ2Enc.


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

   

© Morgan Multimedia 1990-2005