"L. Spiro Engine"
Classes | Typedefs | Enumerations | Functions | Variables

lsi Namespace Reference

Classes

struct  LSI_BITMAPFILEHEADER
struct  LSI_BITMAPINFOHEADER
struct  LSI_BITMAPCOLORMASK
union  LSI_BITMAPPALETTE
class  CDds
 Handles loading of .DDS files. More...
class  CGif
 Loading a GIF file. More...
class  CImage
 The main class that holds loaded image information. More...
struct  LSI_ENTRIES
struct  LSI_DIR_ENTRY
class  CBio
 Implementation of an individual bit input-output (BIO). More...
struct  dwt_local
union  v4
struct  v4dwt_local
class  CEvent
 Implementation of the event callback system. More...
class  CJ2k
 The JPEG-2000 Codestream Reader/Writer (J2K). More...
class  CJp2
 The JPEG-2000 file format Reader/Writer (JP2). More...
class  CJpegCommonStructs
 Common structures within the library. More...
class  CJpegFixed
 Implementation of operations of specific multiplication (FIX). More...
class  CJpegImage
 Implementation of operations on images. More...
class  CJpegInt
 Implementation of operations on integers (INT). More...
class  CJpt
 JPT-stream reader (JPEG 2000, JPIP). More...
class  CMct
 Implementation of a multi-component transforms (MCT). More...
class  CMqc
 Implementation of an MQ-Coder (MQC). More...
class  COpenJpeg
 OpenJpeg declarations. More...
class  CPi
 Implementation of a packet iterator (PI). More...
class  CRaw
 Implementation of operations for raw encoding (RAW). More...
class  CT1
 Implementation of the tier-1 coding (coding of code-block coefficients) (T1). More...
class  CTcd
 Implementation of a tile coder/decoder (TCD). More...
class  CTgt
 Implementation of a tag-tree coder (TGT). More...
class  CImageLib
 Image-related functions. More...
class  CLzwDictionary
class  CImageUtils
 Miscellaneous utility functions related to image manipulation.. More...
class  CPng
 Handles the loading of 8-bit PNG files. More...
class  CResampler
 A resampler capable of resizing images up or down using various filters. More...
class  CTga
 Loading a TGA file. More...

Typedefs

typedef struct
lsi::LSI_BITMAPFILEHEADER
LPLSI_BITMAPFILEHEADER
typedef struct
lsi::LSI_BITMAPFILEHEADER 
LPCLSI_BITMAPFILEHEADER
typedef struct
lsi::LSI_BITMAPINFOHEADER
LPLSI_BITMAPINFOHEADER
typedef struct
lsi::LSI_BITMAPINFOHEADER 
LPCLSI_BITMAPINFOHEADER
typedef struct
lsi::LSI_BITMAPCOLORMASK
LPLSI_BITMAPCOLORMASK
typedef struct
lsi::LSI_BITMAPCOLORMASK 
LPCLSI_BITMAPCOLORMASK
typedef union
lsi::LSI_BITMAPPALETTE
LPLSI_BITMAPPALETTE
typedef union
lsi::LSI_BITMAPPALETTE 
LPCLSI_BITMAPPALETTE
typedef struct lsi::LSI_ENTRIESLPLSI_ENTRIES
typedef struct lsi::LSI_ENTRIES LPCLSI_ENTRIES
typedef struct lsi::LSI_DIR_ENTRYLPLSI_DIR_ENTRY
typedef struct lsi::LSI_DIR_ENTRY LPCLSI_DIR_ENTRY
typedef struct lsi::dwt_local dwt_t
typedef struct lsi::v4dwt_local v4dwt_t
typedef LSVOID(LSE_CALL * DWT1DFN )(dwt_t *_pdV)
typedef enum lsi::RSIZ_CAPABILITIES OPJ_RSIZ_CAPABILITIES
typedef enum lsi::CINEMA_MODE OPJ_CINEMA_MODE
typedef enum lsi::PROG_ORDER OPJ_PROG_ORDER
typedef enum lsi::CODEC_FORMAT OPJ_CODEC_FORMAT
typedef enum lsi::LIMIT_DECODING OPJ_LIMIT_DECODING
typedef enum lsi::COLOR_SPACE OPJ_COLOR_SPACE

Enumerations

enum  LSI_DDS_PIXEL_FORMAT_FLAGS {
  LSI_DPFF_ALPHAPIXELS = 0x1, LSI_DPFF_ALPHA = 0x2, LSI_DPFF_FOURCC = 0x4, LSI_DPFF_RGB = 0x40,
  LSI_DPFF_YUV = 0x200, LSI_DPFF_LUMINANCE = 0x20000
}
enum  LSI_DDS_FLAGS {
  LSI_DF_CAPS = 0x1, LSI_DF_HEIGHT = 0x2, LSI_DF_WIDTH = 0x4, LSI_DF_PITCH = 0x8,
  LSI_DF_PIXELFORMAT = 0x1000, LSI_DF_MIPMAPCOUNT = 0x20000, LSI_DF_LINEARSIZE = 0x80000, LSI_DF_DEPTH = 0x800000
}
enum  RSIZ_CAPABILITIES { STD_RSIZ = 0, CINEMA2K = 3, CINEMA4K = 4 }
enum  CINEMA_MODE { OFF = 0, CINEMA2K_24 = 1, CINEMA2K_48 = 2, CINEMA4K_24 = 3 }
enum  PROG_ORDER {
  PROG_UNKNOWN = -1, LRCP = 0, RLCP = 1, RPCL = 2,
  PCRL = 3, CPRL = 4
}
enum  CODEC_FORMAT { CODEC_UNKNOWN = -1, CODEC_J2K = 0, CODEC_JPT = 1, CODEC_JP2 = 2 }
enum  LIMIT_DECODING { NO_LIMITATION = 0, LIMIT_TO_MAIN_HEADER = 1, DECODE_ALL_BUT_PACKETS = 2 }
enum  COLOR_SPACE {
  CLRSPC_UNKNOWN = -1, CLRSPC_UNSPECIFIED = 0, CLRSPC_SRGB = 1, CLRSPC_GRAY = 2,
  CLRSPC_SYCC = 3
}
enum  LSI_PIXEL_FORMAT {
  LSI_PF_A8, LSI_PF_R3G3B2, LSI_PF_R5G6B5, LSI_PF_R4G4B4A4,
  LSI_PF_R5G5B5A1, LSI_PF_R8G8B8, LSI_PF_R8G8B8A8, LSI_PF_R16G16B16A16,
  LSI_PF_TOTAL_INT, LSI_PF_R16G16B16A16F = LSI_PF_TOTAL_INT, LSI_PF_R32G32B32A32F, LSI_PF_TOTAL,
  LSI_PF_DXT1 = 100, LSI_PF_DXT2 = 101, LSI_PF_DXT3 = 102, LSI_PF_DXT4 = 103,
  LSI_PF_DXT5 = 104, LSI_PF_ANY = 10000, LSI_PF_HIGHEST_INT = LSI_PF_R16G16B16A16
}
enum  LSI_PIXEL_COMPONENTS {
  LSI_PC_R, LSI_PC_G, LSI_PC_B, LSI_PC_A,
  LSI_PC_INVALID
}

Functions

LSSTD_ERRORS LSE_CALL LoadPackFromMemory (const LSUINT8 *_pui8Data, LSUINTPTR _uiptrLen)
LSSTD_ERRORS LSE_CALL LoadPackFromFile (const LSCHAR *_pcPath)
LSSTD_ERRORS LSE_CALL LoadPackFromSteam (const lsstd::IStream &_sStream)
LSVOID LSE_CALL Reset ()
CImage *LSE_CALL GetImageByName (const CString _sName)

Variables

__pad0__
F LSUINT32 _ui32DataLen
F LSUINT32 LSUINT32 & _ui32Width
F LSUINT32 LSUINT32 LSUINT32 & _ui32Height
F LSUINT32 LSUINT32 LSUINT32
LSI_PIXEL_FORMAT
_pfFormat
F LSUINT32 LSUINT32 LSUINT32
LSI_PIXEL_FORMAT
CImageLib::CTexelBuffer
_tbReturn
LSI_F_BILINEAR_FILTER
LSI_F_KAISER_FILTER
LSI_F_LANCZOS3_FILTER
LSI_F_LANCZOS4_FILTER
LSI_F_LANCZOS6_FILTER
LSI_F_LANCZOS8_FILTER
LSI_F_LANCZOS12_FILTER
LSI_F_LANCZOS64_FILTER
LSI_F_MITCHELL_FILTER
LSI_F_CATMULLROM_FILTER
LSI_F_ANY
CMap< CString, LSI_ENTRIESm_mDictionary
CVector< CVector< LSUINT8,
LSUINT32 >, LSUINT32 > 
m_vCompressedImages
CMap< CString, CImage * > m_mUnpackedImages
LSINT32 openmode
LSUINT8 * buffer
LSINT32 length
LSUINT8 * start
LSUINT8 * end
LSUINT8 * bp
 opj_cio_t
CJpegImage::opj_image_timage
CJ2k::opj_cp_tcp
 opj_t2_t

Detailed Description

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Loading a bitmap file.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Handles loading of .DDS files.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Loading a GIF file.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: The main class that holds loaded image information.

Copyright L. Spiro 2012 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Handles loading of an L. Spiro Image Pack and distributing shared pointers to images within the pack. Memory is conserved as much as possible, and images from the pack are only expanded when first requested.

Copyright L. Spiro 2008 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: A dictionary of codes + characters for use with LZW compression and decompression.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Miscellaneous utility functions related to image manipulation.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Handles the loading of 8-bit PNG files.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: A resampler capable of resizing images up or down using various filters. This is a heavily modified port of Rich Geldreich's open-source resampler demonstration code.

Copyright L. Spiro 2011 All rights reserved.

Written by: Shawn (L. Spiro) Wilcoxen

This code may not be sold or traded for any personal gain without express written consent. You may use this code in your own projects and modify it to suit your needs as long as this disclaimer remains intact. You may not take credit for having written this code.

Description: Loading a TGA file.


Typedef Documentation

typedef LSVOID(LSE_CALL * lsi::DWT1DFN)(dwt_t *_pdV)

Virtual function type for wavelet transform in 1-D.

Parameters:
_pdVUndocumented parameter from the OpenJpeg Library.
typedef struct lsi::dwt_local lsi::dwt_t

Undocumented OpenJpeg Library structure.

Bitmap color mask.

The bitmap file header.

The bitmap info header.

Bitmap palette data.

Directory entry.

The pack dictionary of entries.

Digital cinema operation mode.

Supported codec.

Supported image color spaces.

Limit decoding to certain portions of the codestream.

Progression order.

Rsiz capabilities.

Undocumented OpenJpeg Library structure.


Enumeration Type Documentation

Digital cinema operation mode.

Enumerator:
CINEMA2K_24 

Not Digital Cinema.

CINEMA2K_48 

2K Digital Cinema at 24 fps.

CINEMA4K_24 

2K Digital Cinema at 48 fps.

Supported codec.

Enumerator:
CODEC_UNKNOWN 

Place-holder.

CODEC_J2K 

JPEG-2000 codestream: read/write.

CODEC_JPT 

JPT-stream (JPEG 2000, JPIP): read only.

CODEC_JP2 

JPEG-2000 file format: read/write.

Supported image color spaces.

Enumerator:
CLRSPC_UNKNOWN 

Not supported by the library.

CLRSPC_UNSPECIFIED 

Not specified in the codestream.

CLRSPC_SRGB 

sRGB.

CLRSPC_GRAY 

Grayscale.

CLRSPC_SYCC 

YUV.

Limit decoding to certain portions of the codestream.

Enumerator:
NO_LIMITATION 

No limitation for the decoding. The entire codestream will de decoded.

LIMIT_TO_MAIN_HEADER 

The decoding is limited to the Main Header.

DECODE_ALL_BUT_PACKETS 

Decode everything except the JPEG 2000 packets.

DDS flags.

Enumerator:
LSI_DF_CAPS 

Required in every .dds file.

LSI_DF_HEIGHT 

Required in every .dds file.

LSI_DF_WIDTH 

Required in every .dds file.

LSI_DF_PITCH 

Required when pitch is provided for an uncompressed texture.

LSI_DF_PIXELFORMAT 

Required in every .dds file.

LSI_DF_MIPMAPCOUNT 

Required in a mipmapped texture.

LSI_DF_LINEARSIZE 

Required when pitch is provided for a compressed texture.

LSI_DF_DEPTH 

Required in a depth texture.

Pixel format flags.

Enumerator:
LSI_DPFF_ALPHAPIXELS 

Texture contains alpha data; ui32RGBAlphaBitMask contains valid data.

LSI_DPFF_ALPHA 

Used in some older DDS files for alpha channel only uncompressed data (ui32RGBBitCount contains the alpha channel bitcount; ui32ABitMask contains valid data).

LSI_DPFF_FOURCC 

Texture contains compressed RGB data; ui32FourCC contains valid data.

LSI_DPFF_RGB 

Texture contains uncompressed RGB data; dwRGBBitCount and the RGB masks (ui32RBitMask, ui32RBitMask, ui32RBitMask) contain valid data.

LSI_DPFF_YUV 

Used in some older DDS files for YUV uncompressed data (ui32RGBBitCount contains the YUV bit count; ui32RBitMask contains the Y mask, ui32GBitMask contains the U mask, ui32BBitMask contains the V mask).

LSI_DPFF_LUMINANCE 

Used in some older DDS files for single channel color uncompressed data (ui32RGBBitCount contains the luminance channel bit count; ui32RBitMask contains the channel mask). Can be combined with LSI_DPFF_ALPHAPIXELS for a two-channel DDS file.

Component order.

Enumerator:
LSI_PC_R 

Red.

LSI_PC_G 

Green.

LSI_PC_B 

Blue.

LSI_PC_A 

Alpha.

LSI_PC_INVALID 

Invalid.

Pixel formats we support natively.

Enumerator:
LSI_PF_A8 

8-bit alpha channel.

LSI_PF_R3G3B2 

8-bit no alpha.

LSI_PF_R5G6B5 

16-bit no alpha.

LSI_PF_R4G4B4A4 

16-bit with full alpha.

LSI_PF_R5G5B5A1 

16-bit with basic alpha.

LSI_PF_R8G8B8 

24-bit no alpha.

LSI_PF_R8G8B8A8 

32-bit with full alpha.

LSI_PF_R16G16B16A16 

64-bit with full alpha.

LSI_PF_TOTAL_INT 

Total integer formats.

LSI_PF_R16G16B16A16F 

64-bit floating-point format.

LSI_PF_R32G32B32A32F 

128-bit floating-point format.

LSI_PF_TOTAL 

Total formats.

LSI_PF_DXT1 

DTX-1 format. Special-case format.

LSI_PF_DXT2 

DTX-2 format. Special-case format.

LSI_PF_DXT3 

DTX-3 format. Special-case format.

LSI_PF_DXT4 

DTX-4 format. Special-case format.

LSI_PF_DXT5 

DTX-5 format. Special-case format.

LSI_PF_ANY 

Whatever format is in the file.

LSI_PF_HIGHEST_INT 

The highest-quality integer format.

Progression order.

Enumerator:
PROG_UNKNOWN 

Place-holder.

LRCP 

Layer-resolution-component-precinct order.

RLCP 

Resolution-layer-component-precinct order.

RPCL 

Resolution-precinct-component-layer order.

PCRL 

Precinct-component-resolution-layer order.

CPRL 

Component-precinct-resolution-layer order.

Rsiz capabilities.

Enumerator:
CINEMA2K 

Standard JPEG2000 profile.

CINEMA4K 

Profile name for a 2K image.


Function Documentation

CImage* LSE_CALL lsi::GetImageByName ( const CString  _sName)

Gets a pointer to a CImage by name. If the given name does not represent a valid image NULL is returned. The first time an image is request from the pack it is decompressed and its compressed data is released.

Parameters:
_sNameThe name of the image to get from the packed image archive.
Returns:
Returns a pointer to the respective CImage or NULL if no image with the given name exists.
LSSTD_ERRORS LSE_CALL lsi::LoadPackFromFile ( const LSCHAR *  _pcPath)

Loads an LSIP file from disk. Returns an error code on failure.

Parameters:
_pcPathThe path to the LSIP file to load.
Returns:
Returns LSSTD_E_SUCCESS on success or another error code on failure.
LSSTD_ERRORS LSE_CALL lsi::LoadPackFromMemory ( const LSUINT8 *  _pui8Data,
LSUINTPTR  _uiptrLen 
)

Loads an LSIP file from memory. Returns an error code on failure.

Parameters:
_pui8DataThe data for the LSIP file loaded to memory.
_uiptrLenThe length of the data in bytes.
Returns:
Returns LSSTD_E_SUCCESS on success or another error code on failure.
LSSTD_ERRORS LSE_CALL lsi::LoadPackFromSteam ( const lsstd::IStream _sStream)

Load an LSIP from a stream. Returns an error code on failure.

Parameters:
_sStreamThe stream from which to read the LSIP data.
Returns:
Returns LSSTD_E_SUCCESS on success or another error code on failure.
LSVOID LSE_CALL lsi::Reset ( )

Resets the pack completely, freeing all memory.

Reset everything. Clears all resources created by this instance.

Reset all contents.


Variable Documentation

A box filter.

LSUINT8* lsi::bp

Pointer to the current position.

LSUINT8* lsi::buffer

Pointer to the start of the buffer.

Pointer to the image coding parameters.

LSUINT8* lsi::end

Pointer to the end of the stream.

Encoding: pointer to the source image. Decoding: pointer to the destination image.

LSINT32 lsi::length

Buffer size in bytes.

Any filter.

A bilinear filter. Good for scaling up images that are intended to be rescaled back down.

A Catmull-Rom filter.

A Kaiser filter. Good for scaling down images. Best for mipmaps.

A Lanczos filter with 12 sampling points.

A Lanczos filter with 3 sampling points.

A Lanczos filter with 4 sampling points.

A Lanczos filter with 64 sampling points.

A Lanczos filter with 6 sampling points.

A Lanczos filter with 8 sampling points.

A Mitchell filter. The best filter for scaling up, unless the image is intended to be rescaled back down to its original size.

The entries sorted by name.

CMap<CString, CImage *> lsi::m_mUnpackedImages

Entries that have been requested to be unpacked.

CVector<CVector<LSUINT8, LSUINT32>, LSUINT32> lsi::m_vCompressedImages

The compressed images. Images are deleted when decompressed.

LSINT32 lsi::openmode

Open mode (read/write) either OPJ_STREAM_READ or OPJ_STREAM_WRITE.

LSUINT8* lsi::start

Pointer to the start of the stream.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator