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

JPEG2000.h File Reference

This graph shows which files directly or indirectly include this file:


Defines

#define JP2K_Old_sLUM_SPACE   0
 The standard luminance space (same gamma as sRGB).
#define JP2K_Old_sRGB_SPACE   1
 The standard RGB space.
#define JP2K_Old_sYCC_SPACE   2
 YCC derivative of sRGB.
#define JP2K_Old_iccLUM_SPACE   3
 Monochrome space described by an embedded ICC profile.
#define JP2K_Old_iccRGB_SPACE   4
 3-colour space described by an embedded ICC profile
#define JP2K_bilevel1_SPACE   0
 used to indicate a bi-level image in which 0 means white and 1 means black.
#define JP2K_YCbCr1_SPACE   1
 Commonly used for data that originated from a video signal.
#define JP2K_YCbCr2_SPACE   3
 Commmonly used for data that originated as RGB, but has been converted to luminance and chrominance samples.
#define JP2K_YCbCr3_SPACE   4
 Commonly used for data that originated from a video signal.
#define JP2K_PhotoYCC_SPACE   9
 This is the colour encoding method used in the Photo CD system.
#define JP2K_CMY_SPACE   11
 Cyan-Magenta-Yellow colour space suitable for printing.
#define JP2K_CMYK_SPACE   12
 Same as JP2K_CMY_SPACE but with an extra channel for black ink.
#define JP2K_YCCK_SPACE   13
 This is an opponent representation for the JP2K_CMYK_SPACE.
#define JP2K_CIELab_SPACE   14
 This is the CIE Lab colour space.
#define JP2K_bilevel2_SPACE   15
 Same as JP2K_bilevel1_SPACE, exept that a value of 1 means white and 0 means black.
#define JP2K_sRGB_SPACE   16
 This is the standard RGB space used by JP2 files.
#define JP2K_sLUM_SPACE   17
 This is the standard luminance space used by JP2 files.
#define JP2K_sYCC_SPACE   18
 This is the standard opponent colour space used by JP2 files.
#define JP2K_CIEJab_SPACE   19
 This colour space is based on CIECAM97s (CIE Publication 131).
#define JP2K_esRGB_SPACE   20
 This is an extended form of the sRGB colour space, designed to allow colours with a larger gamut than that of sRGB to be represented.
#define JP2K_ROMMRGB_SPACE   21
 As defined in PIMA 7666.
#define JP2K_YPbPr60_SPACE   22
 Opponent colour space used by HDTV systems.
#define JP2K_YPbPr50_SPACE   23
 The standard indicates that this space has a slightly different opponent colour transform than JP2K_YPbPr60_SPACE; however, I have been unable to confirm this.
#define JP2K_esYCC_SPACE   24
 This is an extended form of sYCC, whose definition may be found in Annex B of PIMA 7667. Although the basic principles are similar to those associated with esRGB, this colour space is NOT obtained simply by applying the irreversible colour transform to the esRGB coordinates.
#define JP2K_iccLUM_SPACE   100
 Mono space described by restricted ICC profile.
#define JP2K_iccRGB_SPACE   101
 3-colour space given by restricted ICC profile
#define JP2K_iccANY_SPACE   102
 Unrestricted ICC profile (any number of colours).
#define JP2K_vendor_SPACE   200
 Vendor-defined colour space.
#define JP2K_CIE_DAY   ((((DWORD) 'C')<<24) + (((DWORD) 'T')<<16))
#define JP2K_CIE_D50   ((DWORD) 0x00443530)
#define JP2K_CIE_D65   ((DWORD) 0x00443635)
#define JP2K_CIE_D75   ((DWORD) 0x00443735)
#define JP2K_CIE_SA   ((DWORD) 0x00005341)
#define JP2K_CIE_SC   ((DWORD) 0x00005343)
#define JP2K_CIE_F2   ((DWORD) 0x00004632)
#define JP2K_CIE_F7   ((DWORD) 0x00004637)
#define JP2K_CIE_F11   ((DWORD) 0x00463131)
#define JP2K_PROCESS_R_53   0
 Reversible process 5/3 (with RCT if RGB input/output).
#define JP2K_PROCESS_IR_97   1
 Irreversible process 9/7 (with ICT).
#define JP2K_IsInterlaced   0x0001
 if 0, other interlace bits are irrelevent
#define JP2K_1FieldPerSample   0x0002
 else 2 fields per media sample
#define JP2K_Field1First   0x0004
 else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2?
#define JP2K_1FramePerSample   0x0008
 1 frame per media sample which is interlaced
#define JP2K_FieldPatternMask   0x0030
 use this mask with JP2K_FieldPat*
#define JP2K_FieldPatField1Only   0x0000
 stream never contains a Field2
#define JP2K_FieldPatField2Only   0x0010
 stream never contains a Field1
#define JP2K_FieldPatBothRegular   0x0020
 There will be a Field2 for every Field1 (required for Weave?).
#define JP2K_FieldPatBothIrregular   0x0030
 Random pattern of Field1s and Field2s.
#define JP2K_DisplayModeMask   0x00c0
 use this mask with JP2K_DisplayMode*
#define JP2K_DisplayModeBobOnly   0x0000
 use BOB only deintelacing
#define JP2K_DisplayModeWeaveOnly   0x0040
 use WEAVE only deintelacing
#define JP2K_DisplayModeBobOrWeave   0x0080
 use BOB or WEAVE adaptative deintelacing depending of each frame content
#define JP2K_BYPASS   1
#define JP2K_RESET   2
#define JP2K_RESTART   4
#define JP2K_CAUSAL   8
#define JP2K_ERTERM   16
#define JP2K_SEGMARK   32
#define JP2K_LRCP   0
#define JP2K_RLCP   1
#define JP2K_RPCL   2
#define JP2K_PCRL   3
#define JP2K_CPRL   4
#define WIDTHBYTES(bits)   ((DWORD)(((bits)+31) & (~31)) / 8)
#define DIBWIDTHBYTES(bi)   (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
#define _DIBSIZE(bi)   (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
#define DIBSIZE(bi)   ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi))
#define FCC(ch4)
 Compression state. Used in VFW/VCM by ICGetState and ICSetState.
#define TCC(ch2)
#define SOC   TCC(0xFF4F)
#define SIZ   TCC(0xFF51)
#define COD   TCC(0xFF52)
#define COC   TCC(0xFF53)
#define QCD   TCC(0xFF5C)
#define QCC   TCC(0xFF5D)
#define RGN   TCC(0xFF5E)
#define POC   TCC(0xFF5F)
#define PPM   TCC(0xFF60)
#define TLM   TCC(0xFF55)
#define PLM   TCC(0xFF57)
#define COM   TCC(0xFF64)
#define SOT   TCC(0xFF90)
#define SOD   TCC(0xFF93)
#define SOP   TCC(0xFF91)
#define EPH   TCC(0xFF92)
#define CRG   TCC(0xFF63)
#define PLT   TCC(0xFF58)
#define PPT   TCC(0xFF61)
#define EOC   TCC(0xFFD9)
#define YUY2   FCC('YUY2')
 Input/Output, YUY2 16-bits packed.
#define UYVY   FCC('UYVY')
 Input/Output, UYVY 16-bits packed.
#define YV12   FCC('YV12')
 Input/Output, YV12 12-bits planar.
#define I420   FCC('I420')
 Input/Output, I420 12-bits planar.
#define RGB32   DWORD(0)
 Input/Output, RGB 32-bits packed.
#define RGB24   DWORD(0)
 Input/Output, RGB 24-bits packed.
#define RGB8   DWORD(0)
 Input/Output, RGB 8-bits planar (Grayscale).
#define RGB16   DWORD(3)
 Output only, RGB 16-bits packed (R:5-bits, G:6-bits, B:5-bits).
#define RGB15   DWORD(0)
 Output only, RGB 16-bits packed (R:5-bits, G:5-bits, B:5-bits).
#define MJ2C   FCC('MJ2C')
 MJ2C FOURCC.

Typedefs

typedef _JPEG2000INFOHEADER JPEG2000INFOHEADER
 Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.
typedef _JPEG2000INFOHEADERPJPEG2000INFOHEADER
 Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.
typedef _JPEG2000EXTRAHEADER JPEG2000EXTRAHEADER
 Extension to JPEG2000INFOHEADER.
typedef _JPEG2000EXTRAHEADERPJPEG2000EXTRAHEADER
 Extension to JPEG2000INFOHEADER.
typedef _JPEG2000INFOHEADER2 JPEG2000INFOHEADER2
 Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.
typedef _JPEG2000INFOHEADER2PJPEG2000INFOHEADER2
 Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.
typedef _MJ2CINFOHEADER MJ2CINFOHEADER
 Using BITMAPINFOHEADER when JPEG2000INFOHEADER or JPEG2000INFOHEADER2 are absent.
typedef _MJ2CINFOHEADERPMJ2CINFOHEADER
 Using BITMAPINFOHEADER when JPEG2000INFOHEADER or JPEG2000INFOHEADER2 are absent.

Functions

static BOOL InitJP2KHdrRGB (PJPEG2000INFOHEADER2 pJP2K)
 Initialize a JPEG2000INFOHEADER2 to compress RGB 24 or 32-bits input data (8-bits per component).
static BOOL InitJP2KHdrY (PJPEG2000INFOHEADER2 pJP2K)
 Initialize a JPEG2000INFOHEADER2 to compress Y 8-bits (luminance) or RGB 8-bits (grayscale) input data.
static BOOL InitJP2KHdrYUV (PJPEG2000INFOHEADER2 pJP2K)
 Initialize a JPEG2000INFOHEADER2 to compress YUV 24-bits input data (8-bits per component, no subsampling).
static BOOL InitJP2KHdrYUV422 (PJPEG2000INFOHEADER2 pJP2K)
 Initialize a JPEG2000INFOHEADER2 to compress YUV 16-bits input data (8-bits per component, 4:2:2 subsampling).
static BOOL InitJP2KHdrYUV420 (PJPEG2000INFOHEADER2 pJP2K)
 Initialize a JPEG2000INFOHEADER2 to compress YUV 12-bits input data (8-bits per component, 4:2:0 subsampling).
static WORD GetInterlaceFlags (BITMAPINFOHEADER *pbi)
 Get Interlace Flags.
static BOOL GetInterlaceFlags (BITMAPINFOHEADER *pbi, WORD flag)
 Get flag of Interlace Flags.
static BOOL IsInterlaced (BITMAPINFOHEADER *pbi)
 Is JP2K_IsInterlaced set in Interlace Flags.
static BOOL GetField1First (BITMAPINFOHEADER *pbi)
 Is JP2K_Field1First set in Interlace Flags.
static BOOL GetFieldsSize (BITMAPINFOHEADER *pbi, PDWORD pSizeField1, PDWORD pSizeField2)
 Get pointers to SizeField1 and SizeField2 of a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER pointed by pbi.
static BOOL SetFieldsSize (BITMAPINFOHEADER *pbi, DWORD dwSizeField1, DWORD dwSizeField2)
 Set values of SizeField1 and SizeField2 in a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER pointed by pbi.
static PBITMAPINFOHEADER GetPbmiHeader (const CMediaType *pMediaType)
 Get a pointer to the BITMAPINFOHEADER present in pMediaType.
static WORD GetInterlaceFlags (const CMediaType *pMediaType)
 Get Interlace Flags.
static BOOL GetInterlaceFlags (const CMediaType *pMediaType, WORD flag)
 Get flag of Interlace Flags.
static BOOL IsInterlaced (const CMediaType *pMediaType)
 Is JP2K_Field1First set in Interlace Flags.
static BOOL GetField1First (const CMediaType *pMediaType)
 Is JP2K_Field1First set in Interlace Flags.
static BOOL GetFieldsSize (const CMediaType *pMediaType, PDWORD pSizeField1, PDWORD pSizeField2)
 Get pointers to SizeField1 and SizeField2 of a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.
static BOOL SetFieldsSize (const CMediaType *pMediaType, DWORD dwSizeField1, DWORD dwSizeField2)
 Set values of SizeField1 and SizeField2 in a JPEG2000INFOHEADER2, a JPEG2000INFOHEADER or a MJ2CINFOHEADER which extents the BITMAPINFOHEADER present in pMediaType.

Variables

static const JPEG2000INFOHEADER2 JP2K_RGB_DEF
 Default initialization table for RGB 24-bits.

Define Documentation

#define JP2K_PROCESS_R_53   0
 

Reversible process 5/3 (with RCT if RGB input/output).

Process Definitions

#define JP2K_PROCESS_IR_97   1
 

Irreversible process 9/7 (with ICT).

#define WIDTHBYTES bits   )     ((DWORD)(((bits)+31) & (~31)) / 8)
 

Examples:
jp2_decodeMT.cpp, and jp2_encodeMT.cpp.

#define DIBWIDTHBYTES bi   )     (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
 

#define _DIBSIZE bi   )     (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
 

#define DIBSIZE bi   )     ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi))
 

Examples:
simple_examples.cpp.

#define FCC ch4   ) 
 

Value:

((((DWORD)(ch4) & 0xFF) << 24) |     \
                  (((DWORD)(ch4) & 0xFF00) << 8) |    \
                  (((DWORD)(ch4) & 0xFF0000) >> 8) |  \
                  (((DWORD)(ch4) & 0xFF000000) >> 24))
Compression state. Used in VFW/VCM by ICGetState and ICSetState.

Examples:
dat2avi.cpp, and simple_examples.cpp.

#define TCC ch2   ) 
 

Value:

((((WORD)(ch2) & 0x00FF) << 8) |     \
                  (((WORD)(ch2) & 0xFF00) >> 8))
Examples:
dat2avi.cpp.

#define SOC   TCC(0xFF4F)
 

#define SIZ   TCC(0xFF51)
 

#define COD   TCC(0xFF52)
 

#define COC   TCC(0xFF53)
 

#define QCD   TCC(0xFF5C)
 

#define QCC   TCC(0xFF5D)
 

#define RGN   TCC(0xFF5E)
 

#define POC   TCC(0xFF5F)
 

#define PPM   TCC(0xFF60)
 

#define TLM   TCC(0xFF55)
 

#define PLM   TCC(0xFF57)
 

#define COM   TCC(0xFF64)
 

#define SOT   TCC(0xFF90)
 

#define SOD   TCC(0xFF93)
 

#define SOP   TCC(0xFF91)
 

#define EPH   TCC(0xFF92)
 

#define CRG   TCC(0xFF63)
 

#define PLT   TCC(0xFF58)
 

#define PPT   TCC(0xFF61)
 

#define EOC   TCC(0xFFD9)
 


Typedef Documentation

typedef struct _JPEG2000INFOHEADER JPEG2000INFOHEADER
 

Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.

typedef struct _JPEG2000INFOHEADER * PJPEG2000INFOHEADER
 

Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.

typedef struct _JPEG2000EXTRAHEADER JPEG2000EXTRAHEADER
 

Extension to JPEG2000INFOHEADER.

typedef struct _JPEG2000EXTRAHEADER * PJPEG2000EXTRAHEADER
 

Extension to JPEG2000INFOHEADER.

typedef struct _JPEG2000INFOHEADER2 JPEG2000INFOHEADER2
 

Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.

typedef struct _JPEG2000INFOHEADER2 * PJPEG2000INFOHEADER2
 

Extension to the BITMAPINFOHEADER which is widely used in Video For Windows and DirectShow.

typedef struct _MJ2CINFOHEADER MJ2CINFOHEADER
 

Using BITMAPINFOHEADER when JPEG2000INFOHEADER or JPEG2000INFOHEADER2 are absent.

We map a new struct MJ2CINFOHEADER on BITMAPINFOHEADER.

This is essentially usefull to add extended information to MJ2C AVI created without the JPEG2000INFOHEADER(2) in the 'strf' chunck.

This way 'old' MJ2C AVI can be patch to support new features like h/w deinterlacing or color correction.

It is resonably safe because we overide elements above which are commonly unused and set to 0

  • LONG biXPelsPerMeter;
  • LONG biYPelsPerMeter;
  • DWORD biClrImportant;

typedef struct _MJ2CINFOHEADER * PMJ2CINFOHEADER
 

Using BITMAPINFOHEADER when JPEG2000INFOHEADER or JPEG2000INFOHEADER2 are absent.

We map a new struct MJ2CINFOHEADER on BITMAPINFOHEADER.

This is essentially usefull to add extended information to MJ2C AVI created without the JPEG2000INFOHEADER(2) in the 'strf' chunck.

This way 'old' MJ2C AVI can be patch to support new features like h/w deinterlacing or color correction.

It is resonably safe because we overide elements above which are commonly unused and set to 0

  • LONG biXPelsPerMeter;
  • LONG biYPelsPerMeter;
  • DWORD biClrImportant;


   

© Morgan Multimedia 1990-2005