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

_JPEG2000INFOHEADER2 Struct Reference

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

#include <JPEG2000.h>


Data Fields

DWORD Size
 sizeof(JPEG2000INFOHEADER2) + sizes of ICC profile and J2C Header (default=sizeof(JPEG2000INFOHEADER2))
WORD InterlaceFlags
 Interlace flags (see Interlace Flags, default=0).
WORD WeightsMJP2
 MJP2 weights (1=yes, 0=no, default=1).
WORD ColorSpaceID
 Color space ID (see Color Space IDs, default: see JPEG2000INFOHEADER2 Initialization functions.).
WORD NativeOrder
 Native order (0 = little-endian, 1 = big-endian, default=0).
WORD BitsPerSample
 Bits per sample (default=8).
WORD SampleSigned
 Sample signed (1=yes, 0=no, default=0).
WORD VSubSampling
 V subsampling (default: see JPEG2000INFOHEADER2 Initialization functions.).
WORD VOffset
 V offset (default=0).
WORD HSubSampling
 H subsampling (default: see JPEG2000INFOHEADER2 Initialization functions.).
WORD HOffset
 H offset (default=0).
WORD Levels
 Number of wavelet decomposition levels, or s_es. May not exceed 32. (default=5).
WORD Process
 Wavelet kernels (0=5/3, 1=9/7, default=0 for RGB, 1 for YUV).
WORD Layers
 Number of quality layers. May not exceed 16384 (default=1).
WORD Quality
 Quality (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).
WORD CBR
 Constant bit-rate (1=yes, 0=no, default=0), 0 means VBR.
WORD BitRate
 Average bit-rate expressed in KB/sec with 1KB=1024 bytes, 0 means not defined (default=0).
WORD Lossless
 Lossless (1=yes, 0=no, default=0).
WORD ExtraSize
 sizeof(JPEG2000EXTRAHEADER) + sizes of ICC profile and J2C Header (default=sizeof(JPEG2000EXTRAHEADER))
WORD Profile
 Restricted profile to which the code-stream must conform, 0 to 2, 0=most restrictive, 2=places no restrictions (default=2).
WORD VSize
 Image size: vertical dimension (default=0).
WORD HSize
 Image size: horizontal dimension (default=0).
WORD VOrigin
 Image origin on canvas: vertical coordinate (default=0).
WORD HOrigin
 Image origin on canvas: horizontal coordinate (default=0).
WORD VTile
 Tile partition size: vertical dimension (default=0).
WORD HTile
 Tile partition size: horizontal dimension (default=0).
WORD VTOrigin
 Tile origin on canvas: vertical coordinate (default=0).
WORD HTOrigin
 Tile origin on canvas: horizontal coordinate (default=0).
WORD UseSOP
 Include SOP markers (i.e., resync markers) (1=yes, 0=no, default=0).
WORD UseEPH
 Include EPH markers (marker end of each packet header) (1=yes, 0=no, default=0).
WORD Order
 Default progression order (see Progression Order, default=0=LRCP).
WORD VBlk
 Nominal code-block dimensions: Vertical coordinate (default=64; 0 means default). Must be powers of 2, no less than 4 and no greater than 1024.
WORD HBlk
 Nominal code-block dimensions: Horizontal coordinate (default=64; 0 means default). Must be powers of 2, no less than 4 and no greater than 1024.
WORD VAlignBlkLast
 Last sample of VBlk aligned at a multiple of the block dimension (a power of 2) (1=yes, 0=no, default=0).
WORD HAlignBlkLast
 Last sample of HBlk aligned at a multiple of the block dimension (a power of 2) (1=yes, 0=no, default=0).
WORD Modes
 Block coder mode switches (see Block Coder Mode Switches, default=0).
DWORD SizeField1
 Size in bytes of the Field 1 codestream.
DWORD SizeField2
 Size in bytes of the Field 2 codestream.
WORD Reserved1
 Reserved for future use, must be 0.
WORD Reserved2
 Reserved for future use, must be 0.
WORD ICCSize
 embedded ICC profile size (default=0).
WORD J2CSize
 embedded J2C Main Header and Tile-parts Headers size (default=0).


Detailed Description

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

inline_dotgraph_4

A JPEG2000INFOHEADER2 is the concatenation of a JPEG2000INFOHEADER and a JPEG2000EXTRAHEADER:

inline_dotgraph_5

Especially usefull when JPEG2000 is embedded in AVI or custom file formats other than MJP2.

More generally used in VFW APIs.

Aslo used in DirectShow as a format description of media samples.

Note:
JPEG2000INFOHEADER2.Size defines the size in bytes of the JPEG2000INFOHEADER2 including any embedded ICC profile and/or an embedded J2C header. JPEG2000INFOHEADER2.ExtraSize defines the size in bytes of the JPEG2000EXTRAHEADER including any embedded ICC profile and/or an embedded J2C header. You can use the code fragment below to properly set "Size" fields of a JPEG2000INFOHEADER2 and the BITMAPINFOHEADER it extents :
        void SetSizeFields(PBITMAPINFOHEADER pbi, int size_of_ICC_block, int size_of_J2C_block)
        {
                PJPEG2000INFOHEADER2 pj2 = (PJPEG2000INFOHEADER2)(pbi + 1);

                pj2->ICCSize = size_of_ICC_block;

                pj2->J2CSize = size_of_J2C_block;

                pj2->ExtraSize = sizeof(JPEG2000EXTRAHEADER) + pj2->ICCSize + pj2->J2CSize;

                pj2->Size = sizeof(JPEG2000INFOHEADER) + pj2->ExtraSize;

                pbi->biSize = sizeof(BITMAPINFOHEADER) + pj2->Size;
        }
inline_dotgraph_6
Remarks:
JPEG2000EXTRAHEADER part of JPEG2000INFOHEADER2 is new, most of its features are not yet supported. Embedded ICC profile and embedded J2C Main Header and Tile-parts Headers are not yet implemented.
Examples:

dat2avi.cpp, jp2_encode.cpp, and jp2_encodeMT.cpp.


Field Documentation

DWORD _JPEG2000INFOHEADER2::Size
 

sizeof(JPEG2000INFOHEADER2) + sizes of ICC profile and J2C Header (default=sizeof(JPEG2000INFOHEADER2))

WORD _JPEG2000INFOHEADER2::InterlaceFlags
 

Interlace flags (see Interlace Flags, default=0).

Examples:
dat2avi.cpp.

WORD _JPEG2000INFOHEADER2::WeightsMJP2
 

MJP2 weights (1=yes, 0=no, default=1).

WORD _JPEG2000INFOHEADER2::ColorSpaceID
 

Color space ID (see Color Space IDs, default: see JPEG2000INFOHEADER2 Initialization functions.).

WORD _JPEG2000INFOHEADER2::NativeOrder
 

Native order (0 = little-endian, 1 = big-endian, default=0).

WORD _JPEG2000INFOHEADER2::BitsPerSample
 

Bits per sample (default=8).

WORD _JPEG2000INFOHEADER2::SampleSigned
 

Sample signed (1=yes, 0=no, default=0).

WORD _JPEG2000INFOHEADER2::VSubSampling
 

V subsampling (default: see JPEG2000INFOHEADER2 Initialization functions.).

WORD _JPEG2000INFOHEADER2::VOffset
 

V offset (default=0).

WORD _JPEG2000INFOHEADER2::HSubSampling
 

H subsampling (default: see JPEG2000INFOHEADER2 Initialization functions.).

WORD _JPEG2000INFOHEADER2::HOffset
 

H offset (default=0).

WORD _JPEG2000INFOHEADER2::Levels
 

Number of wavelet decomposition levels, or s_es. May not exceed 32. (default=5).

WORD _JPEG2000INFOHEADER2::Process
 

Wavelet kernels (0=5/3, 1=9/7, default=0 for RGB, 1 for YUV).

WORD _JPEG2000INFOHEADER2::Layers
 

Number of quality layers. May not exceed 16384 (default=1).

WORD _JPEG2000INFOHEADER2::Quality
 

Quality (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).

WORD _JPEG2000INFOHEADER2::CBR
 

Constant bit-rate (1=yes, 0=no, default=0), 0 means VBR.

WORD _JPEG2000INFOHEADER2::BitRate
 

Average bit-rate expressed in KB/sec with 1KB=1024 bytes, 0 means not defined (default=0).

WORD _JPEG2000INFOHEADER2::Lossless
 

Lossless (1=yes, 0=no, default=0).

WORD _JPEG2000INFOHEADER2::ExtraSize
 

sizeof(JPEG2000EXTRAHEADER) + sizes of ICC profile and J2C Header (default=sizeof(JPEG2000EXTRAHEADER))

WORD _JPEG2000INFOHEADER2::Profile
 

Restricted profile to which the code-stream must conform, 0 to 2, 0=most restrictive, 2=places no restrictions (default=2).

WORD _JPEG2000INFOHEADER2::VSize
 

Image size: vertical dimension (default=0).

WORD _JPEG2000INFOHEADER2::HSize
 

Image size: horizontal dimension (default=0).

WORD _JPEG2000INFOHEADER2::VOrigin
 

Image origin on canvas: vertical coordinate (default=0).

WORD _JPEG2000INFOHEADER2::HOrigin
 

Image origin on canvas: horizontal coordinate (default=0).

WORD _JPEG2000INFOHEADER2::VTile
 

Tile partition size: vertical dimension (default=0).

WORD _JPEG2000INFOHEADER2::HTile
 

Tile partition size: horizontal dimension (default=0).

WORD _JPEG2000INFOHEADER2::VTOrigin
 

Tile origin on canvas: vertical coordinate (default=0).

WORD _JPEG2000INFOHEADER2::HTOrigin
 

Tile origin on canvas: horizontal coordinate (default=0).

WORD _JPEG2000INFOHEADER2::UseSOP
 

Include SOP markers (i.e., resync markers) (1=yes, 0=no, default=0).

WORD _JPEG2000INFOHEADER2::UseEPH
 

Include EPH markers (marker end of each packet header) (1=yes, 0=no, default=0).

WORD _JPEG2000INFOHEADER2::Order
 

Default progression order (see Progression Order, default=0=LRCP).

WORD _JPEG2000INFOHEADER2::VBlk
 

Nominal code-block dimensions: Vertical coordinate (default=64; 0 means default). Must be powers of 2, no less than 4 and no greater than 1024.

WORD _JPEG2000INFOHEADER2::HBlk
 

Nominal code-block dimensions: Horizontal coordinate (default=64; 0 means default). Must be powers of 2, no less than 4 and no greater than 1024.

WORD _JPEG2000INFOHEADER2::VAlignBlkLast
 

Last sample of VBlk aligned at a multiple of the block dimension (a power of 2) (1=yes, 0=no, default=0).

WORD _JPEG2000INFOHEADER2::HAlignBlkLast
 

Last sample of HBlk aligned at a multiple of the block dimension (a power of 2) (1=yes, 0=no, default=0).

WORD _JPEG2000INFOHEADER2::Modes
 

Block coder mode switches (see Block Coder Mode Switches, default=0).

DWORD _JPEG2000INFOHEADER2::SizeField1
 

Size in bytes of the Field 1 codestream.

DWORD _JPEG2000INFOHEADER2::SizeField2
 

Size in bytes of the Field 2 codestream.

WORD _JPEG2000INFOHEADER2::Reserved1
 

Reserved for future use, must be 0.

WORD _JPEG2000INFOHEADER2::Reserved2
 

Reserved for future use, must be 0.

WORD _JPEG2000INFOHEADER2::ICCSize
 

embedded ICC profile size (default=0).

WORD _JPEG2000INFOHEADER2::J2CSize
 

embedded J2C Main Header and Tile-parts Headers size (default=0).


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

   

© Morgan Multimedia 1990-2005