libcineon  0.1
Classes | Typedefs | Enumerations | Functions | Variables
cineon Namespace Reference

libcineon namespace More...

Classes

struct  Block
 Rectangle block definition defined by two points. More...
 
struct  BufferAccess
 
class  Codec
 compress / decompress data segments base class defaults to None More...
 
class  ElementReadStream
 
struct  GenericHeader
 Generic File and Image Header Information. More...
 
struct  Header
 Complete DPX Header. More...
 
struct  ImageElement
 Data Structure for Image Element. More...
 
struct  IndustryHeader
 Motion Picture and Television Industry Specific Information. More...
 
class  Reader
 DPX Image Reader class. More...
 
class  Writer
 DPX Image Writer class. More...
 

Typedefs

typedef unsigned char U8
 Unsigned 8 bit integer. More...
 
typedef unsigned short U16
 Unsigned 16 bit integer. More...
 
typedef unsigned int U32
 Unsigned 32 bit integer. More...
 
typedef signed int S32
 
typedef uint64_t U64
 Unsigned 64 bit integer. More...
 
typedef float R32
 32 bit floating point number More...
 
typedef double R64
 64 bit floating point number More...
 
typedef char ASCII
 ASCII character. More...
 

Enumerations

enum  Endian { kLittleEndian, kBigEndian }
 DPX files can be stored in big- or little-endian byte order. More...
 
enum  DataSize { kByte, kWord, kInt, kLongLong }
 Component Data Storage Data Type. More...
 
enum  Orientation {
  kLeftToRightTopToBottom = 0, kRightToLeftTopToBottom = 1, kLeftToRightBottomToTop = 2, kRightToLeftBottomToTop = 3,
  kTopToBottomLeftToRight = 4, kTopToBottomRightToLeft = 5, kBottomToTopLeftToRight = 6, kBottomToTopRightToLeft = 7,
  kUndefinedOrientation = 0xff
}
 Image Orientation Code. More...
 
enum  Descriptor {
  kGrayscale = 0, kPrintingDensityRed = 1, kPrintingDensityGreen = 2, kPrintingDensityBlue = 3,
  kRec709Red = 4, kRec709Green = 5, kRec709Blue = 6, kUndefinedDescriptor = 0xff
}
 Image element Descriptor (second byte) More...
 
enum  Interleave { kPixel = 0, kLine = 1, kChannel = 2 }
 Component interleaving method. More...
 
enum  Packing {
  kPacked = 0, kByteLeft = 1, kByteRight = 2, kWordLeft = 3,
  kWordRight = 4, kLongWordLeft = 5, kLongWordRight = 6, kPackAsManyAsPossible = 0x80
}
 Component data packing method. More...
 

Functions

void BaseTypeConverter (U8 &src, U8 &dst)
 
void BaseTypeConverter (U8 &src, U16 &dst)
 
void BaseTypeConverter (U8 &src, U32 &dst)
 
void BaseTypeConverter (U8 &src, U64 &dst)
 
void BaseTypeConverter (U8 &src, R32 &dst)
 
void BaseTypeConverter (U8 &src, R64 &dst)
 
void BaseTypeConverter (U16 &src, U8 &dst)
 
void BaseTypeConverter (U16 &src, U16 &dst)
 
void BaseTypeConverter (U16 &src, U32 &dst)
 
void BaseTypeConverter (U16 &src, U64 &dst)
 
void BaseTypeConverter (U16 &src, R32 &dst)
 
void BaseTypeConverter (U16 &src, R64 &dst)
 
void BaseTypeConverter (U32 &src, U8 &dst)
 
void BaseTypeConverter (U32 &src, U16 &dst)
 
void BaseTypeConverter (U32 &src, U32 &dst)
 
void BaseTypeConverter (U32 &src, U64 &dst)
 
void BaseTypeConverter (U32 &src, R32 &dst)
 
void BaseTypeConverter (U32 &src, R64 &dst)
 
void BaseTypeConverter (U64 &src, U8 &dst)
 
void BaseTypeConverter (U64 &src, U16 &dst)
 
void BaseTypeConverter (U64 &src, U32 &dst)
 
void BaseTypeConverter (U64 &src, U64 &dst)
 
void BaseTypeConverter (U64 &src, R32 &dst)
 
void BaseTypeConverter (U64 &src, R64 &dst)
 
void BaseTypeConverter (R32 &src, U8 &dst)
 
void BaseTypeConverter (R32 &src, U16 &dst)
 
void BaseTypeConverter (R32 &src, U32 &dst)
 
void BaseTypeConverter (R32 &src, U64 &dst)
 
void BaseTypeConverter (R32 &src, R32 &dst)
 
void BaseTypeConverter (R32 &src, R64 &dst)
 
void BaseTypeConverter (R64 &src, U8 &dst)
 
void BaseTypeConverter (R64 &src, U16 &dst)
 
void BaseTypeConverter (R64 &src, U32 &dst)
 
void BaseTypeConverter (R64 &src, U64 &dst)
 
void BaseTypeConverter (R64 &src, R32 &dst)
 
void BaseTypeConverter (R64 &src, R64 &dst)
 
bool IdentifyFile (InStream *file)
 determine if the image file is DPX More...
 
bool IdentifyFile (const void *data)
 determine if the image file is DPX More...
 
const char * DefaultExtension ()
 returns a char * of the default DPX file extension More...
 
const char * Version ()
 
const char * LibraryVersion ()
 returns the version string for this library More...
 
template<typename T >
SwapBytes (T &value)
 
template<>
unsigned short SwapBytes (unsigned short &value)
 
template<>
unsigned char SwapBytes (unsigned char &value)
 
template<>
char SwapBytes (char &value)
 
template<typename T >
void SwapBuffer (T *buf, unsigned int len)
 
template<DataSize SIZE>
void EndianSwapImageBuffer (void *data, int length)
 
void EndianSwapImageBuffer (DataSize size, void *data, int length)
 
template<typename IR , typename BUF , int PADDINGBITS>
bool Read10bitFilled (const Header &dpxHeader, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename BUF >
bool Read10bitFilledMethodA (const Header &dpx, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename BUF >
bool Read10bitFilledMethodB (const Header &dpx, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename BUF , U32 MASK, int MULTIPLIER, int REMAIN, int REVERSE>
void UnPackPacked (U32 *readBuf, const int bitDepth, BUF *data, int count, int bufoff)
 
template<typename IR , typename BUF , U32 MASK, int MULTIPLIER, int REMAIN, int REVERSE>
bool ReadPacked (const Header &dpxHeader, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename BUF >
bool Read10bitPacked (const Header &dpxHeader, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename BUF >
bool Read12bitPacked (const Header &dpxHeader, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename SRC , DataSize SRCTYPE, typename BUF , DataSize BUFTYPE>
bool ReadBlockTypes (const Header &dpxHeader, SRC *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename BUF >
bool Read12bitFilledMethodB (const Header &dpxHeader, U16 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR , typename BUF , DataSize BUFTYPE>
bool ReadImageBlock (const Header &dpxHeader, U32 *readBuf, IR *fd, const Block &block, BUF *data)
 
template<typename IR >
bool ReadImageBlock (const Header &dpxHeader, U32 *readBuf, IR *fd, const Block &block, void *data, const DataSize size)
 
template<typename T1 , typename T2 >
void MultiTypeBufferCopy (T1 *dst, T2 *src, const int len)
 
template<typename IB >
void CopyWriteBuffer (DataSize src_size, unsigned char *src, IB *dst, const int len)
 
template<typename IB , int BITDEPTH>
void RleCompress (IB *src, IB *dst, const int bufsize, const int len, BufferAccess &access)
 
template<typename IB , int BITDEPTH>
void WritePackedMethod (IB *src, IB *dst, const int len, const bool reverse, BufferAccess &access)
 
template<typename IB , Packing METHOD>
void WritePackedMethodAB_10bit (IB *src, IB *dst, const int len, const bool reverse, BufferAccess &access)
 
template<typename IB , int BITDEPTH, bool SAMEBUFTYPE>
int WriteBuffer (OutStream *fd, DataSize src_size, void *src_buf, const U32 width, const U32 height, const int noc, const Packing packing, const bool reverse, const int eolnPad, char *blank, bool &status)
 
template<typename IB , int BITDEPTH, bool SAMEBUFTYPE>
int WriteFloatBuffer (OutStream *fd, DataSize src_size, void *src_buf, const U32 width, const U32 height, const int noc, const Packing packing, const int eolnPad, char *blank, bool &status)
 

Variables

Endian systemByteOrder = (*(unsigned char*)lPtr == 0x78 ? cineon::kLittleEndian : cineon::kBigEndian)
 

Detailed Description

libcineon namespace

Typedef Documentation

ASCII character.

float cineon::R32

32 bit floating point number

float cineon::R64

64 bit floating point number

typedef signed int cineon::S32
unsigned short cineon::U16

Unsigned 16 bit integer.

signed char cineon::U32

Unsigned 32 bit integer.

Signed 32 bit integer.

unsigned long long cineon::U64

Unsigned 64 bit integer.

unsigned char cineon::U8

Unsigned 8 bit integer.

Enumeration Type Documentation

Component Data Storage Data Type.

Enumerator
kByte 

8-bit size component

kWord 
kInt 
kLongLong 

64-bit integer

Image element Descriptor (second byte)

Enumerator
kGrayscale 

Grayscale.

kPrintingDensityRed 

Red.

kPrintingDensityGreen 

Green.

kPrintingDensityBlue 

Blue.

kRec709Red 

Red.

kRec709Green 

Green.

kRec709Blue 

Blue.

kUndefinedDescriptor 

Undefined descriptor.

DPX files can be stored in big- or little-endian byte order.

Enumerator
kLittleEndian 

increasing numeric significance with increasing memory

kBigEndian 

big end first

Component interleaving method.

Enumerator
kPixel 

Pixel interleave (rgbrgbrgb...)

kLine 

Line interleave (rrr.ggg.bbb.rrr.ggg.bbb.)

kChannel 

Channel interleave (rrr..ggg..bbb..)

Image Orientation Code.

Enumerator
kLeftToRightTopToBottom 

Oriented left to right, top to bottom.

kRightToLeftTopToBottom 

Oriented right to left, top to bottom.

kLeftToRightBottomToTop 

Oriented left to right, bottom to top.

kRightToLeftBottomToTop 

Oriented right to left, bottom to top.

kTopToBottomLeftToRight 

Oriented top to bottom, left to right.

kTopToBottomRightToLeft 

Oriented top to bottom, right to left.

kBottomToTopLeftToRight 

Oriented bottom to top, left to right.

kBottomToTopRightToLeft 

Oriented bottom to top, right to left.

kUndefinedOrientation 

Undefined orientation.

Component data packing method.

Enumerator
kPacked 

Use all bits (tight packing)

kByteLeft 

Byte (8-bit) boundary, left justified.

kByteRight 

Byte (8-bit) boundary, right justified.

kWordLeft 

Word (16-bit) boundary, left justified.

kWordRight 

Word (16-bit) boundary, right justified.

kLongWordLeft 

Longword (32-bit) boundary, left justified.

kLongWordRight 

Longword (32-bit) boundary, right justified.

kPackAsManyAsPossible 

Bitflag - if present, pack as many fields as possible per cell, only one otherwise.

Function Documentation

void cineon::BaseTypeConverter ( U8 &  src,
U8 &  dst 
)
inline
void cineon::BaseTypeConverter ( U8 &  src,
U16 &  dst 
)
inline
void cineon::BaseTypeConverter ( U8 &  src,
U32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U8 &  src,
U64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U8 &  src,
R32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U8 &  src,
R64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U16 &  src,
U8 &  dst 
)
inline
void cineon::BaseTypeConverter ( U16 &  src,
U16 &  dst 
)
inline
void cineon::BaseTypeConverter ( U16 &  src,
U32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U16 &  src,
U64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U16 &  src,
R32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U16 &  src,
R64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U32 &  src,
U8 &  dst 
)
inline
void cineon::BaseTypeConverter ( U32 &  src,
U16 &  dst 
)
inline
void cineon::BaseTypeConverter ( U32 &  src,
U32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U32 &  src,
U64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U32 &  src,
R32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U32 &  src,
R64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U64 &  src,
U8 &  dst 
)
inline
void cineon::BaseTypeConverter ( U64 &  src,
U16 &  dst 
)
inline
void cineon::BaseTypeConverter ( U64 &  src,
U32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U64 &  src,
U64 &  dst 
)
inline
void cineon::BaseTypeConverter ( U64 &  src,
R32 &  dst 
)
inline
void cineon::BaseTypeConverter ( U64 &  src,
R64 &  dst 
)
inline
void cineon::BaseTypeConverter ( R32 &  src,
U8 &  dst 
)
inline
void cineon::BaseTypeConverter ( R32 &  src,
U16 &  dst 
)
inline
void cineon::BaseTypeConverter ( R32 &  src,
U32 &  dst 
)
inline
void cineon::BaseTypeConverter ( R32 &  src,
U64 &  dst 
)
inline
void cineon::BaseTypeConverter ( R32 &  src,
R32 &  dst 
)
inline
void cineon::BaseTypeConverter ( R32 &  src,
R64 &  dst 
)
inline
void cineon::BaseTypeConverter ( R64 &  src,
U8 &  dst 
)
inline
void cineon::BaseTypeConverter ( R64 &  src,
U16 &  dst 
)
inline
void cineon::BaseTypeConverter ( R64 &  src,
U32 &  dst 
)
inline
void cineon::BaseTypeConverter ( R64 &  src,
U64 &  dst 
)
inline
void cineon::BaseTypeConverter ( R64 &  src,
R32 &  dst 
)
inline
void cineon::BaseTypeConverter ( R64 &  src,
R64 &  dst 
)
inline
template<typename IB >
void cineon::CopyWriteBuffer ( DataSize  src_size,
unsigned char *  src,
IB *  dst,
const int  len 
)
const char * cineon::DefaultExtension ( )
inline

returns a char * of the default DPX file extension

Returns
.dpx file extenion
template<DataSize SIZE>
void cineon::EndianSwapImageBuffer ( void *  data,
int  length 
)
void cineon::EndianSwapImageBuffer ( DataSize  size,
void *  data,
int  length 
)
inline
bool cineon::IdentifyFile ( InStream file)

determine if the image file is DPX

Parameters
filebuffer to read and search
Returns
true/false if identified as DPX
bool cineon::IdentifyFile ( const void *  data)

determine if the image file is DPX

Parameters
datamemory to search
Returns
true/false if identified as DPX
const char * cineon::LibraryVersion ( )
inline

returns the version string for this library

Returns
OpenDPX version
template<typename T1 , typename T2 >
void cineon::MultiTypeBufferCopy ( T1 *  dst,
T2 *  src,
const int  len 
)
template<typename IR , typename BUF , int PADDINGBITS>
bool cineon::Read10bitFilled ( const Header &  dpxHeader,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename BUF >
bool cineon::Read10bitFilledMethodA ( const Header &  dpx,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename BUF >
bool cineon::Read10bitFilledMethodB ( const Header &  dpx,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename BUF >
bool cineon::Read10bitPacked ( const Header &  dpxHeader,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename BUF >
bool cineon::Read12bitFilledMethodB ( const Header &  dpxHeader,
U16 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename BUF >
bool cineon::Read12bitPacked ( const Header &  dpxHeader,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename SRC , DataSize SRCTYPE, typename BUF , DataSize BUFTYPE>
bool cineon::ReadBlockTypes ( const Header &  dpxHeader,
SRC *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR , typename BUF , DataSize BUFTYPE>
bool cineon::ReadImageBlock ( const Header &  dpxHeader,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IR >
bool cineon::ReadImageBlock ( const Header &  dpxHeader,
U32 *  readBuf,
IR *  fd,
const Block &  block,
void *  data,
const DataSize  size 
)
template<typename IR , typename BUF , U32 MASK, int MULTIPLIER, int REMAIN, int REVERSE>
bool cineon::ReadPacked ( const Header &  dpxHeader,
U32 *  readBuf,
IR *  fd,
const Block &  block,
BUF *  data 
)
template<typename IB , int BITDEPTH>
void cineon::RleCompress ( IB *  src,
IB *  dst,
const int  bufsize,
const int  len,
BufferAccess &  access 
)
template<typename T >
void cineon::SwapBuffer ( T *  buf,
unsigned int  len 
)
template<typename T >
T cineon::SwapBytes ( T &  value)
template<>
unsigned short cineon::SwapBytes ( unsigned short &  value)
inline
template<>
unsigned char cineon::SwapBytes ( unsigned char &  value)
inline
template<>
char cineon::SwapBytes ( char &  value)
inline
template<typename BUF , U32 MASK, int MULTIPLIER, int REMAIN, int REVERSE>
void cineon::UnPackPacked ( U32 *  readBuf,
const int  bitDepth,
BUF *  data,
int  count,
int  bufoff 
)
const char * cineon::Version ( )
inline

returns a string of the highest SMPTE DPX version supported by this library

Returns
SMPTE DPX version
template<typename IB , int BITDEPTH, bool SAMEBUFTYPE>
int cineon::WriteBuffer ( OutStream fd,
DataSize  src_size,
void *  src_buf,
const U32  width,
const U32  height,
const int  noc,
const Packing  packing,
const bool  reverse,
const int  eolnPad,
char *  blank,
bool &  status 
)
template<typename IB , int BITDEPTH, bool SAMEBUFTYPE>
int cineon::WriteFloatBuffer ( OutStream fd,
DataSize  src_size,
void *  src_buf,
const U32  width,
const U32  height,
const int  noc,
const Packing  packing,
const int  eolnPad,
char *  blank,
bool &  status 
)
template<typename IB , int BITDEPTH>
void cineon::WritePackedMethod ( IB *  src,
IB *  dst,
const int  len,
const bool  reverse,
BufferAccess &  access 
)
template<typename IB , Packing METHOD>
void cineon::WritePackedMethodAB_10bit ( IB *  src,
IB *  dst,
const int  len,
const bool  reverse,
BufferAccess &  access 
)

Variable Documentation

cineon::Endian cineon::systemByteOrder = (*(unsigned char*)lPtr == 0x78 ? cineon::kLittleEndian : cineon::kBigEndian)