libpgf: PGFtypes.h File Reference

| libpgf 7.21.2 PGF - Progressive Graphics File

Loading...
Searching...
No Matches
PGFtypes.h File Reference

PGF definitions. More...

`#include "PGFplatform.h"`

Go to the source code of this file.

## Classes
struct | PGFMagicVersion
| PGF identification and version. More...
struct | PGFPreHeader
| PGF pre-header. More...
struct | PGFVersionNumber
| version number stored in header since major version 7 More...
struct | PGFHeader
| PGF header. More...
struct | PGFPostHeader
| Optional PGF post-header. More...
union | ROIBlockHeader
| Block header used with ROI coding scheme. More...
struct | ROIBlockHeader::RBH
| Named ROI block header (part of the union). More...
struct | IOException
| PGF exception. More...
struct | PGFRect
| Rectangle. More...

## Macros
#define | PGFMajorNumber 7
#define | PGFYear 21
#define | PGFWeek 07
#define | PPCAT_NX(A, B)
#define | PPCAT(A, B)
#define | STRINGIZE_NX(A)
#define | STRINGIZE(A)
#define | PGFCodecVersionID PPCAT(PPCAT(PPCAT(0x0, PGFMajorNumber), PGFYear), PGFWeek)
#define | PGFCodecVersion STRINGIZE(PPCAT(PPCAT(PPCAT(PPCAT(PGFMajorNumber, .), PGFYear), .), PGFWeek))
#define | PGFMagic "PGF"
| PGF identification.
#define | MaxLevel 30
| maximum number of transform levels
#define | NSubbands 4
| number of subbands per level
#define | MaxChannels 8
| maximum number of (color) channels
#define | DownsampleThreshold 3
| if quality is larger than this threshold than downsampling is used
#define | ColorTableLen 256
| size of color lookup table (clut)
#define | Version2 2
| data structure PGFHeader of major version 2
#define | PGF32 4
| 32 bit values are used -> allows at maximum 30 input bits, otherwise 16 bit values are used -> allows at maximum 14 input bits
#define | PGFROI 8
| supports Regions Of Interest
#define | Version5 16
| new coding scheme since major version 5
#define | Version6 32
| hSize in PGFPreHeader uses 32 bits instead of 16 bits
#define | Version7 64
| Codec major and minor version number stored in PGFHeader.
#define | PGFVersion (Version2 | PGF32 | Version5 | Version6 | Version7)
| current standard version
#define | BufferSize 16384
| must be a multiple of WordWidth, BufferSize <= UINT16_MAX
#define | RLblockSizeLen 15
| block size length (< 16): ld(BufferSize) < RLblockSizeLen <= 2*ld(BufferSize)
#define | LinBlockSize 8
| side length of a coefficient block in a HH or LL subband
#define | InterBlockSize 4
| side length of a coefficient block in a HL or LH subband
#define | MaxBitPlanes 31
| maximum number of bit planes of m_value: 32 minus sign bit
#define | MaxBitPlanesLog 5
| number of bits to code the maximum number of bit planes (in 32 or 16 bit mode)
#define | MaxQuality MaxBitPlanes
| maximum quality
#define | MagicVersionSize sizeof(PGFMagicVersion)
#define | PreHeaderSize sizeof(PGFPreHeader)
#define | HeaderSize sizeof(PGFHeader)
#define | ColorTableSize (ColorTableLen*sizeof(RGBQUAD))
#define | DataTSize sizeof(DataT)
#define | MaxUserDataSize 0x7FFFFFFF

## Typedefs
typedef INT32 | DataT
typedef void(* | RefreshCB) (void *p)

## Enumerations
enum | Orientation { LL = 0 , HL = 1 , LH = 2 , HH = 3 }
enum | ProgressMode { PM_Relative , PM_Absolute }
enum | UserdataPolicy { UP_Skip = 0 , UP_CachePrefix = 1 , UP_CacheAll = 2 }

## Detailed Description

PGF definitions.

Author
  C. Stamm

Definition in file PGFtypes.h.

## Macro Definition Documentation

## ◆ BufferSize

#define BufferSize 16384

must be a multiple of WordWidth, BufferSize <= UINT16_MAX

Definition at line 84 of file PGFtypes.h.

## ◆ ColorTableLen

#define ColorTableLen 256

size of color lookup table (clut)

Definition at line 66 of file PGFtypes.h.

## ◆ ColorTableSize

#define ColorTableSize (ColorTableLen*sizeof(RGBQUAD))

Definition at line 282 of file PGFtypes.h.

## ◆ DataTSize

#define DataTSize sizeof(DataT)

Definition at line 283 of file PGFtypes.h.

## ◆ DownsampleThreshold

#define DownsampleThreshold 3

if quality is larger than this threshold than downsampling is used

Definition at line 65 of file PGFtypes.h.

## ◆ HeaderSize

#define HeaderSize sizeof(PGFHeader)

Definition at line 281 of file PGFtypes.h.

## ◆ InterBlockSize

#define InterBlockSize 4

side length of a coefficient block in a HL or LH subband

Definition at line 87 of file PGFtypes.h.

## ◆ LinBlockSize

#define LinBlockSize 8

side length of a coefficient block in a HH or LL subband

Definition at line 86 of file PGFtypes.h.

## ◆ MagicVersionSize

#define MagicVersionSize sizeof(PGFMagicVersion)

Definition at line 279 of file PGFtypes.h.

## ◆ MaxBitPlanes

#define MaxBitPlanes 31

maximum number of bit planes of m_value: 32 minus sign bit

Definition at line 89 of file PGFtypes.h.

## ◆ MaxBitPlanesLog

#define MaxBitPlanesLog 5

number of bits to code the maximum number of bit planes (in 32 or 16 bit mode)

Definition at line 93 of file PGFtypes.h.

## ◆ MaxChannels

#define MaxChannels 8

maximum number of (color) channels

Definition at line 64 of file PGFtypes.h.

## ◆ MaxLevel

#define MaxLevel 30

maximum number of transform levels

Definition at line 62 of file PGFtypes.h.

## ◆ MaxQuality

#define MaxQuality MaxBitPlanes

maximum quality

Definition at line 94 of file PGFtypes.h.

## ◆ MaxUserDataSize

#define MaxUserDataSize 0x7FFFFFFF

Definition at line 284 of file PGFtypes.h.

## ◆ NSubbands

#define NSubbands 4

number of subbands per level

Definition at line 63 of file PGFtypes.h.

## ◆ PGF32

#define PGF32 4

32 bit values are used -> allows at maximum 30 input bits, otherwise 16 bit values are used -> allows at maximum 14 input bits

Definition at line 69 of file PGFtypes.h.

## ◆ PGFCodecVersion

#define PGFCodecVersion STRINGIZE(PPCAT(PPCAT(PPCAT(PPCAT(PGFMajorNumber, .), PGFYear), .), PGFWeek))

Definition at line 56 of file PGFtypes.h.

## ◆ PGFCodecVersionID

#define PGFCodecVersionID PPCAT(PPCAT(PPCAT(0x0, PGFMajorNumber), PGFYear), PGFWeek)

Definition at line 54 of file PGFtypes.h.

## ◆ PGFMagic

#define PGFMagic "PGF"

PGF identification.

Definition at line 61 of file PGFtypes.h.

## ◆ PGFMajorNumber

#define PGFMajorNumber 7

Definition at line 44 of file PGFtypes.h.

## ◆ PGFROI

#define PGFROI 8

supports Regions Of Interest

Definition at line 70 of file PGFtypes.h.

## ◆ PGFVersion

#define PGFVersion (Version2 | PGF32 | Version5 | Version6 | Version7)

current standard version

Definition at line 76 of file PGFtypes.h.

## ◆ PGFWeek

#define PGFWeek 07

Definition at line 46 of file PGFtypes.h.

## ◆ PGFYear

#define PGFYear 21

Definition at line 45 of file PGFtypes.h.

## ◆ PPCAT

#define PPCAT | ( |  | A,
|  |  | B )

Value:
PPCAT_NX(A, B)
PPCAT_NX
#define PPCAT_NX(A, B)
Definition PGFtypes.h:48

Definition at line 49 of file PGFtypes.h.

## ◆ PPCAT_NX

#define PPCAT_NX | ( |  | A,
|  |  | B )

Value:
A ## B

Definition at line 48 of file PGFtypes.h.

## ◆ PreHeaderSize

#define PreHeaderSize sizeof(PGFPreHeader)

Definition at line 280 of file PGFtypes.h.

## ◆ RLblockSizeLen

#define RLblockSizeLen 15

block size length (< 16): ld(BufferSize) < RLblockSizeLen <= 2*ld(BufferSize)

Definition at line 85 of file PGFtypes.h.

## ◆ STRINGIZE

#define STRINGIZE | ( |  | A | ) |

Value:
STRINGIZE_NX(A)
STRINGIZE_NX
#define STRINGIZE_NX(A)
Definition PGFtypes.h:50

Definition at line 51 of file PGFtypes.h.

## ◆ STRINGIZE_NX

#define STRINGIZE_NX | ( |  | A | ) |

Value:
#A

Definition at line 50 of file PGFtypes.h.

## ◆ Version2

#define Version2 2

data structure PGFHeader of major version 2

Definition at line 68 of file PGFtypes.h.

## ◆ Version5

#define Version5 16

new coding scheme since major version 5

Definition at line 71 of file PGFtypes.h.

## ◆ Version6

#define Version6 32

hSize in PGFPreHeader uses 32 bits instead of 16 bits

Definition at line 72 of file PGFtypes.h.

## ◆ Version7

#define Version7 64

Codec major and minor version number stored in PGFHeader.

Definition at line 73 of file PGFtypes.h.

## Typedef Documentation

## ◆ DataT

typedef INT32 DataT

Definition at line 269 of file PGFtypes.h.

## ◆ RefreshCB

typedef void(* RefreshCB) (void *p)

Definition at line 274 of file PGFtypes.h.

## Enumeration Type Documentation

## ◆ Orientation

enum Orientation

Enumerator
LL |
HL |
LH |
HH |

Definition at line 99 of file PGFtypes.h.

99{ LL = 0, HL = 1, LH = 2, HH = 3 };
LL
@ LL
Definition PGFtypes.h:99
HL
@ HL
Definition PGFtypes.h:99
LH
@ LH
Definition PGFtypes.h:99
HH
@ HH
Definition PGFtypes.h:99

## ◆ ProgressMode

enum ProgressMode

Enumerator
PM_Relative |
PM_Absolute |

Definition at line 100 of file PGFtypes.h.

100{ PM_Relative, PM_Absolute };
PM_Relative
@ PM_Relative
Definition PGFtypes.h:100
PM_Absolute
@ PM_Absolute
Definition PGFtypes.h:100

## ◆ UserdataPolicy

enum UserdataPolicy

Enumerator
UP_Skip |
UP_CachePrefix |
UP_CacheAll |

Definition at line 101 of file PGFtypes.h.

101{ UP_Skip = 0, UP_CachePrefix = 1, UP_CacheAll = 2 };
UP_CachePrefix
@ UP_CachePrefix
Definition PGFtypes.h:101
UP_Skip
@ UP_Skip
Definition PGFtypes.h:101
UP_CacheAll
@ UP_CacheAll
Definition PGFtypes.h:101