Main Page | Modules | Class List | File List | Class Members | File Members

dpx_io.c File Reference

#include <string.h>
#include <gandalf/image/io/dpx_io.h>
#include <gandalf/image/io/image_io.h>
#include <gandalf/image/image_gl_uint8.h>
#include <gandalf/image/image_gl_uint16.h>
#include <gandalf/image/image_gl_float32.h>
#include <gandalf/image/image_rgb_uint8.h>
#include <gandalf/image/image_rgb_uint16.h>
#include <gandalf/image/image_rgb_float32.h>
#include <gandalf/image/image_rgba_uint8.h>
#include <gandalf/image/image_rgba_uint16.h>
#include <gandalf/image/image_rgba_float32.h>
#include <gandalf/common/misc_error.h>
#include <gandalf/common/allocate.h>
#include <gandalf/common/compare.h>

Defines

#define OFFSET_MAGIC   0
#define OFFSET_IMAGEOFFSET   4
#define OFFSET_VERSION   8
#define OFFSET_FILESIZE   16
#define OFFSET_DITTOKEY   20
#define OFFSET_GENERICSIZE   24
#define OFFSET_INDUSTRYSIZE   28
#define OFFSET_USERSIZE   32
#define OFFSET_FILENAME   36
#define OFFSET_CREATETIME   136
#define OFFSET_CREATOR   160
#define OFFSET_PROJECT   260
#define OFFSET_COPYRIGHT   460
#define OFFSET_ENCRYPTKEY   660
#define OFFSET_RESERVED   664
#define OFFSET_ORIENTATION   0
#define OFFSET_ELEMENTNUMBER   2
#define OFFSET_PIXELSPERLINE   4
#define OFFSET_LINESPERIMAGEELE   8
#define OFFSET_ORIENTATION   0
#define OFFSET_ELEMENTNUMBER   2
#define OFFSET_PIXELSPERLINE   4
#define OFFSET_LINESPERIMAGEELE   8
#define OFFSET_DATASIGN0   12
#define OFFSET_REFLOWDATA0   16
#define OFFSET_REFLOWQUANTITY0   20
#define OFFSET_REFHIGHDATA0   24
#define OFFSET_REFHIGHQUANTITY0   28
#define OFFSET_DESCRIPTOR0   32
#define OFFSET_TRANSFER0   33
#define OFFSET_COLORIMETRIC0   34
#define OFFSET_BITSIZE0   35
#define OFFSET_PACKING0   36
#define OFFSET_ENCODING0   38
#define OFFSET_DATAOFFSET0   40
#define OFFSET_EOLPADDING0   44
#define OFFSET_EOIMAGEPADDING0   48
#define OFFSET_DESCRIPTION0   52
#define OFFSET_ORIENTATION_XOFFSET   0
#define OFFSET_ORIENTATION_YOFFSET   4
#define OFFSET_ORIENTATION_XCENTRE   8
#define OFFSET_ORIENTATION_YCENTRE   12
#define OFFSET_ORIENTATION_XORIGSIZE   16
#define OFFSET_ORIENTATION_YORIGSIZE   20
#define OFFSET_ORIENTATION_FILENAME   24
#define OFFSET_ORIENTATION_CREATIONTIME   124
#define OFFSET_ORIENTATION_INPUTDEV   148
#define OFFSET_ORIENTATION_INPUTSERIAL   180
#define OFFSET_ORIENTATION_BORDER   212
#define OFFSET_ORIENTATION_PIXELASPECT   220
#define OFFSET_FILM_MFGID   0
#define OFFSET_FILM_FILMTYPE   2
#define OFFSET_FILM_OFFSET   4
#define OFFSET_FILM_PREFIX   6
#define OFFSET_FILM_COUNT   12
#define OFFSET_FILM_FORMAT   16
#define OFFSET_FILM_FRAMEPOSITION   48
#define OFFSET_FILM_SEQUENCE_LEN   52
#define OFFSET_FILM_HELDCOUNT   56
#define OFFSET_FILM_FRAMERATE   60
#define OFFSET_FILM_SHUTTERANGLE   64
#define OFFSET_FILM_FRAMEID   68
#define OFFSET_FILM_SLATEINFO   100
#define OFFSET_TV_TIMECODE   0
#define OFFSET_TV_USERBITS   4
#define OFFSET_TV_INTERLACE   8
#define OFFSET_TV_FIELD_NUMBER   9
#define OFFSET_TV_VIDEO_SIGNAL   10
#define OFFSET_TV_HORZSAMPLERATE   12
#define OFFSET_TV_VERTSAMPLERATE   16
#define OFFSET_TV_FRAMERATE   20
#define OFFSET_TV_TIMEOFFSET   24
#define OFFSET_TV_GAMMA   28
#define OFFSET_TV_BLACKLEVEL   32
#define OFFSET_TV_BLACKGAIN   36
#define OFFSET_TV_BREAKPOINT   40
#define OFFSET_TV_WHITELEVEL   44
#define OFFSET_TV_INTEGRATIONTIME   48
#define BIG_BUFFER_SIZE   2048
#define DPX_PACKED   0
#define DPX_FILLED   1
#define OFFSET_ORIENTATION_FILENAME   24
#define OFFSET_ORIENTATION_CREATIONTIME   124
#define OFFSET_ORIENTATION_INPUTDEV   148
#define OFFSET_ORIENTATION_INPUTSERIAL   180
#define OFFSET_ORIENTATION_BORDER   212
#define OFFSET_ORIENTATION_PIXELASPECT   220
#define IMAGE_DATA_OFFSET   8192

Functions

void vReverseEndianness32 (gan_uint32 *pui32Val)
 Reverse the bytes in a 32-bit word.
void vReverseEndianness16 (gan_uint16 *pui16Val)
 Reverse the bytes in a 16-bit word.
gan_uint32 ui32ReverseEndianness (gan_uint32 ui32Val)
 Reverse the bytes in a 32-bit word, returning the new value.
gan_uint16 ui16ReverseEndianness (gan_uint16 ui16Val)
 Reverse the bytes in a 16-bit word, returning the new value.
void vReverseEndiannessArray16 (gan_uint16 *aui16Val, unsigned int uiNumberOfVals)
 Reverse the bytes in an array of 16-bit words.
void vReverseEndiannessArray32 (gan_uint32 *aui32Val, unsigned int uiNumberOfVals)
 Reverse the bytes in an array of 32-bit words.
Gan_ImagepgiRead8BitDPXImageData (FILE *pfInFile, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead10BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, Gan_Bool bPacked, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead12BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, Gan_Bool bPacked, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead16BitDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_ImagepgiRead32BitFloatDPXImageData (FILE *pfInFile, Gan_Bool bReversedEndianness, gan_uint32 ui32eolPadding, gan_uint32 ui32eoImagePadding, Gan_ImageFormat eFormat, Gan_Type eType, gan_uint32 ui32PixelsPerLine, gan_uint32 ui32LinesPerImageEle, Gan_Image *pgiImage, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool gan_image_is_dpx (const unsigned char *magic_string, size_t length)
 Determines whether an image is a DPX image using the magic number.
Gan_Imagegan_read_dpx_image_stream (FILE *infile, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in DPX format from a stream.
Gan_Imagegan_read_dpx_image (const char *filename, Gan_Image *image, const struct Gan_ImageReadControlStruct *ictrlstr, struct Gan_ImageHeaderStruct *header)
 Reads a RGB colour image file in DPX format.
void gan_initialise_dpx_header_struct (Gan_DPXHeaderStruct *octrlstr, Gan_ImageFormat image_format, Gan_Type type)
 Initialises the header structure for DPX files.
gan_uint32 ui32DPXFileSize (unsigned int uiImageDataOffset, Gan_ImageFormat eFormat, gan_uint8 ui8BitSize, Gan_Bool bPacked, unsigned int uiHeight, unsigned int uiWidth, gan_uint32 *pui32eolPadding)
 Not a user function.
Gan_Bool bWrite8BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, unsigned int uieolPadding, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite10BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bPacked, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite12BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bPacked, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite16BitDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool bWrite32BitFloatDPXImageData (FILE *pfOutFile, const Gan_Image *pgiImage, Gan_Bool bNewFile, Gan_Bool bReverseBytes, unsigned int uieolPadding, Gan_Bool bFlip, Gan_Bool bSingleField, Gan_Bool bUpper, Gan_Bool bWholeImage)
 Not a user function.
Gan_Bool gan_write_dpx_image_stream (FILE *outfile, const Gan_Image *image, Gan_Bool new_file, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image to a file stream in DPX format.
Gan_Bool gan_write_dpx_image (const char *filename, const Gan_Image *image, const struct Gan_ImageWriteControlStruct *octrlstr)
 Writes a RGB colour image file in DPX format.

Detailed Description

Module: DPX format image file I/O functions

Part of: Gandalf Library

Version:
1.51
Date:
2006/03/15 15:16:09
Author:
pm
Copyright: (c) 2000 Imagineer Software Limited
Generated on Fri Mar 17 12:44:51 2006 by  doxygen 1.3.9.1