Blender V2.61 - r43446
|
#include "dpxfile.h"
#include "dpxlib.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <string.h>
#include "cin_debug_stuff.h"
#include "logmemfile.h"
Go to the source code of this file.
Defines | |
#define | LFMEMFILE 0 |
#define | LFREALFILE 1 |
Functions | |
static void | fillDpxChannelInfo (DpxFile *dpx, DpxChannelInformation *chan, int des) |
static void | dumpDpxChannelInfo (DpxChannelInformation *chan) |
static void | fillDpxFileInfo (DpxFile *dpx, DpxFileInformation *fileInfo, const char *filename) |
static void | dumpDpxFileInfo (DpxFileInformation *fileInfo) |
static void | fillDpxImageInfo (DpxFile *dpx, DpxImageInformation *imageInfo) |
static void | dumpDpxImageInfo (DpxImageInformation *imageInfo) |
static void | fillDpxOriginationInfo (DpxFile *dpx, DpxOriginationInformation *originInfo, DpxFileInformation *fileInfo) |
static void | dumpDpxOriginationInfo (DpxOriginationInformation *originInfo) |
static void | initDpxMainHeader (DpxFile *dpx, DpxMainHeader *header, const char *shortFilename) |
static void | dumpDpxMainHeader (DpxMainHeader *header) |
void | dpxSetVerbose (int verbosity) |
static void | verboseMe (DpxFile *dpx) |
int | dpxGetRowBytes (DpxFile *dpx, unsigned short *row, int y) |
int | dpxSetRowBytes (DpxFile *dpx, const unsigned short *row, int y) |
static DpxFile * | intern_dpxOpen (int mode, const char *bytestuff, int bufsize) |
DpxFile * | dpxOpen (const char *filename) |
DpxFile * | dpxOpenFromMem (unsigned char *buffer, unsigned int size) |
int | dpxIsMemFileCineon (void *buffer) |
DpxFile * | dpxCreate (const char *filename, int width, int height, int depth) |
void | dpxClose (DpxFile *dpx) |
void | dpxDump (const char *filename) |
Variables | |
static int | verbose = 0 |
Definition in file dpxlib.c.
#define LFMEMFILE 0 |
Definition at line 382 of file dpxlib.c.
Referenced by dpxOpenFromMem(), and intern_dpxOpen().
#define LFREALFILE 1 |
Definition at line 383 of file dpxlib.c.
Referenced by dpxOpen(), and intern_dpxOpen().
void dpxClose | ( | DpxFile * | dpx | ) |
Definition at line 660 of file dpxlib.c.
References _Log_Image_File_t_::file, addon::engine::free(), _Log_Image_File_t_::lineBuffer, and _Log_Image_File_t_::pixelBuffer.
Referenced by dpxCreate(), and intern_dpxOpen().
DpxFile* dpxCreate | ( | const char * | filename, |
int | width, | ||
int | height, | ||
int | depth | ||
) |
Definition at line 571 of file dpxlib.c.
References _Log_Image_File_t_::bitsPerPixel, DpxImageInformation::channel, _Log_Image_File_t_::close, d_printf, _Log_Image_File_t_::depth, LogImageByteConversionParameters::doLogarithm, dpxClose(), dpxSetRowBytes(), _Log_Image_File_t_::file, _Log_Image_File_t_::fileYPos, _Log_Image_File_t_::getRow, _Log_Image_File_t_::height, DpxMainHeader::imageInfo, _Log_Image_File_t_::imageOffset, initDpxMainHeader(), _Log_Image_File_t_::lineBuffer, _Log_Image_File_t_::lineBufferLength, logImageGetByteConversionDefaults(), _Log_Image_File_t_::params, _Log_Image_File_t_::pixelBuffer, _Log_Image_File_t_::pixelBufferUsed, pixelsToLongs(), _Log_Image_File_t_::reading, _Log_Image_File_t_::setRow, setupLut(), DpxChannelInformation::transfer_characteristics, verbose, and _Log_Image_File_t_::width.
Referenced by logImageCreate().
void dpxDump | ( | const char * | filename | ) |
Definition at line 685 of file dpxlib.c.
References d_printf, and dumpDpxMainHeader().
Referenced by logImageDump().
int dpxGetRowBytes | ( | DpxFile * | dpx, |
unsigned short * | row, | ||
int | y | ||
) |
Definition at line 228 of file dpxlib.c.
References d_printf, _Log_Image_File_t_::depth, LogImageByteConversionParameters::doLogarithm, _Log_Image_File_t_::fileYPos, _Log_Image_File_t_::imageOffset, _Log_Image_File_t_::lineBuffer, logimage_fread(), logimage_fseek(), _Log_Image_File_t_::lut10_16, _Log_Image_File_t_::params, _Log_Image_File_t_::pixelBuffer, _Log_Image_File_t_::pixelBufferUsed, pixelsToLongs(), verbose, and _Log_Image_File_t_::width.
Referenced by intern_dpxOpen().
int dpxIsMemFileCineon | ( | void * | buffer | ) |
DpxFile* dpxOpen | ( | const char * | filename | ) |
Definition at line 553 of file dpxlib.c.
References intern_dpxOpen(), and LFREALFILE.
Referenced by logImageOpen().
DpxFile* dpxOpenFromMem | ( | unsigned char * | buffer, |
unsigned int | size | ||
) |
Definition at line 558 of file dpxlib.c.
References intern_dpxOpen(), and LFMEMFILE.
Referenced by logImageOpenFromMem().
int dpxSetRowBytes | ( | DpxFile * | dpx, |
const unsigned short * | row, | ||
int | y | ||
) |
Definition at line 306 of file dpxlib.c.
References d_printf, _Log_Image_File_t_::depth, LogImageByteConversionParameters::doLogarithm, _Log_Image_File_t_::file, _Log_Image_File_t_::fileYPos, _Log_Image_File_t_::height, _Log_Image_File_t_::imageOffset, _Log_Image_File_t_::lineBuffer, logimage_fseek(), _Log_Image_File_t_::lut16_16, _Log_Image_File_t_::params, _Log_Image_File_t_::pixelBuffer, _Log_Image_File_t_::pixelBufferUsed, pixelsToLongs(), verbose, and _Log_Image_File_t_::width.
Referenced by dpxCreate().
void dpxSetVerbose | ( | int | verbosity | ) |
static void dumpDpxChannelInfo | ( | DpxChannelInformation * | chan | ) | [static] |
Definition at line 65 of file dpxlib.c.
References DpxChannelInformation::bits_per_pixel, d_printf, DpxChannelInformation::data_offset, DpxChannelInformation::designator1, ntohf(), DpxChannelInformation::packing, DpxChannelInformation::ref_high_data, DpxChannelInformation::ref_high_quantity, DpxChannelInformation::ref_low_data, DpxChannelInformation::ref_low_quantity, and DpxChannelInformation::signage.
Referenced by dumpDpxImageInfo().
static void dumpDpxFileInfo | ( | DpxFileInformation * | fileInfo | ) | [static] |
Definition at line 115 of file dpxlib.c.
References DpxFileInformation::copyright, DpxFileInformation::create_date, DpxFileInformation::creator, d_printf, DpxFileInformation::ditto_key, DpxFileInformation::file_name, DpxFileInformation::file_size, DpxFileInformation::gen_hdr_size, DpxFileInformation::ind_hdr_size, DpxFileInformation::key, DpxFileInformation::magic_num, DpxFileInformation::offset, DpxFileInformation::project, DpxFileInformation::user_data_size, and DpxFileInformation::vers.
Referenced by dumpDpxMainHeader().
static void dumpDpxImageInfo | ( | DpxImageInformation * | imageInfo | ) | [static] |
Definition at line 150 of file dpxlib.c.
References DpxImageInformation::channel, DpxImageInformation::channels_per_image, d_printf, dumpDpxChannelInfo(), i, DpxImageInformation::lines_per_image, DpxImageInformation::orientation, and DpxImageInformation::pixels_per_line.
Referenced by dumpDpxMainHeader().
static void dumpDpxMainHeader | ( | DpxMainHeader * | header | ) | [static] |
Definition at line 203 of file dpxlib.c.
References dumpDpxFileInfo(), dumpDpxImageInfo(), dumpDpxOriginationInfo(), DpxMainHeader::fileInfo, DpxMainHeader::filmHeader, DpxMainHeader::imageInfo, and DpxMainHeader::originInfo.
Referenced by dpxDump().
static void dumpDpxOriginationInfo | ( | DpxOriginationInformation * | originInfo | ) | [static] |
Definition at line 177 of file dpxlib.c.
References DpxOriginationInformation::creation_time, d_printf, DpxOriginationInformation::file_name, DpxOriginationInformation::input_device, DpxOriginationInformation::input_serial_number, ntohf(), DpxOriginationInformation::x_centre, DpxOriginationInformation::x_offset, DpxOriginationInformation::x_original_size, DpxOriginationInformation::y_centre, DpxOriginationInformation::y_offset, and DpxOriginationInformation::y_original_size.
Referenced by dumpDpxMainHeader().
static void fillDpxChannelInfo | ( | DpxFile * | dpx, |
DpxChannelInformation * | chan, | ||
int | des | ||
) | [static] |
Definition at line 43 of file dpxlib.c.
References DpxChannelInformation::bits_per_pixel, DpxChannelInformation::channel_padding, DpxChannelInformation::colourimetry, DpxChannelInformation::data_offset, DpxChannelInformation::description, DpxChannelInformation::designator1, DpxChannelInformation::encoding, htonf(), DpxChannelInformation::line_padding, DpxChannelInformation::packing, DpxChannelInformation::ref_high_data, DpxChannelInformation::ref_high_quantity, DpxChannelInformation::ref_low_data, DpxChannelInformation::ref_low_quantity, DpxChannelInformation::signage, and DpxChannelInformation::transfer_characteristics.
Referenced by fillDpxImageInfo().
static void fillDpxFileInfo | ( | DpxFile * | dpx, |
DpxFileInformation * | fileInfo, | ||
const char * | filename | ||
) | [static] |
Definition at line 78 of file dpxlib.c.
References DpxFileInformation::copyright, DpxFileInformation::create_date, DpxFileInformation::creator, _Log_Image_File_t_::depth, DpxFileInformation::ditto_key, DPX_FILE_MAGIC, DpxFileInformation::file_name, DpxFileInformation::file_size, DpxFileInformation::gen_hdr_size, _Log_Image_File_t_::height, _Log_Image_File_t_::imageOffset, DpxFileInformation::ind_hdr_size, DpxFileInformation::key, DpxFileInformation::magic_num, DpxFileInformation::offset, pixelsToLongs(), DpxFileInformation::project, DpxFileInformation::user_data_size, DpxFileInformation::vers, and _Log_Image_File_t_::width.
Referenced by initDpxMainHeader().
static void fillDpxImageInfo | ( | DpxFile * | dpx, |
DpxImageInformation * | imageInfo | ||
) | [static] |
Definition at line 134 of file dpxlib.c.
References DpxImageInformation::channel, DpxImageInformation::channels_per_image, _Log_Image_File_t_::depth, fillDpxChannelInfo(), _Log_Image_File_t_::height, DpxImageInformation::lines_per_image, DpxImageInformation::orientation, DpxImageInformation::pixels_per_line, and _Log_Image_File_t_::width.
Referenced by initDpxMainHeader().
static void fillDpxOriginationInfo | ( | DpxFile * | dpx, |
DpxOriginationInformation * | originInfo, | ||
DpxFileInformation * | fileInfo | ||
) | [static] |
Definition at line 167 of file dpxlib.c.
Referenced by initDpxMainHeader().
static void initDpxMainHeader | ( | DpxFile * | dpx, |
DpxMainHeader * | header, | ||
const char * | shortFilename | ||
) | [static] |
Definition at line 192 of file dpxlib.c.
References DpxMainHeader::fileInfo, fillDpxFileInfo(), fillDpxImageInfo(), fillDpxOriginationInfo(), DpxMainHeader::filmHeader, DpxMainHeader::imageInfo, and DpxMainHeader::originInfo.
Referenced by dpxCreate().
static DpxFile* intern_dpxOpen | ( | int | mode, |
const char * | bytestuff, | ||
int | bufsize | ||
) | [static] |
Definition at line 386 of file dpxlib.c.
References DpxChannelInformation::bits_per_pixel, _Log_Image_File_t_::bitsPerPixel, DpxImageInformation::channel, DpxImageInformation::channels_per_image, _Log_Image_File_t_::close, d_printf, _Log_Image_File_t_::depth, DpxChannelInformation::designator1, LogImageByteConversionParameters::doLogarithm, DPX_FILE_MAGIC, dpxClose(), dpxGetRowBytes(), _Log_Image_File_t_::file, DpxMainHeader::fileInfo, _Log_Image_File_t_::fileYPos, _Log_Image_File_t_::getRow, _Log_Image_File_t_::height, DpxMainHeader::imageInfo, _Log_Image_File_t_::imageOffset, LFMEMFILE, LFREALFILE, _Log_Image_File_t_::lineBuffer, _Log_Image_File_t_::lineBufferLength, DpxImageInformation::lines_per_image, logimage_fread(), logimage_fseek(), logImageGetByteConversionDefaults(), DpxFileInformation::magic_num, _Log_Image_File_t_::membuffer, _Log_Image_File_t_::membuffersize, _Log_Image_File_t_::memcursor, DpxFileInformation::offset, DpxChannelInformation::packing, _Log_Image_File_t_::params, _Log_Image_File_t_::pixelBuffer, _Log_Image_File_t_::pixelBufferUsed, DpxImageInformation::pixels_per_line, pixelsToLongs(), _Log_Image_File_t_::reading, _Log_Image_File_t_::setRow, setupLut(), DpxChannelInformation::transfer_characteristics, verbose, verboseMe(), and _Log_Image_File_t_::width.
Referenced by dpxOpen(), and dpxOpenFromMem().
static void verboseMe | ( | DpxFile * | dpx | ) | [static] |
Definition at line 219 of file dpxlib.c.
References d_printf, _Log_Image_File_t_::depth, _Log_Image_File_t_::height, _Log_Image_File_t_::imageOffset, _Log_Image_File_t_::lineBufferLength, pixelsToLongs(), and _Log_Image_File_t_::width.
Referenced by intern_dpxOpen().
int verbose = 0 [static] |
Definition at line 212 of file dpxlib.c.
Referenced by dpxCreate(), dpxGetRowBytes(), dpxSetRowBytes(), dpxSetVerbose(), and intern_dpxOpen().