Blender V2.61 - r43446

dpxfile.h

Go to the documentation of this file.
00001 
00004 /*
00005  *   Cineon image file format library definitions.
00006  *   Dpx file format structures.
00007  *
00008  *   This header file contains private details.
00009  *   User code should generally use cineonlib.h only.
00010  *
00011  *   Copyright 1999,2000,2001 David Hodson <hodsond@acm.org>
00012  *
00013  *   This program is free software; you can redistribute it and/or modify it
00014  *   under the terms of the GNU General Public License as published by the Free
00015  *   Software Foundation; either version 2 of the License, or (at your option)
00016  *   any later version.
00017  *
00018  *   This program is distributed in the hope that it will be useful, but
00019  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00020  *   or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
00021  *   for more details.
00022  *
00023  *   You should have received a copy of the GNU General Public License
00024  *   along with this program; if not, write to the Free Software
00025  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00026  *
00027  */
00028 
00029 #ifndef _DPX_FILE_H_
00030 #define _DPX_FILE_H_
00031 
00032 #include "logImageCore.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 typedef struct {
00039         U32     magic_num;              /* magic number */
00040         U32     offset;                     /* offset to image data in bytes */
00041         ASCII vers[8];                  /* which header format version is being used (v1.0) */
00042         U32     file_size;              /* file size in bytes */
00043         U32     ditto_key;              /* I bet some people use this */
00044         U32     gen_hdr_size;           /* generic header length in bytes */
00045         U32     ind_hdr_size;           /* industry header length in bytes */
00046         U32     user_data_size;     /* user-defined data length in bytes */
00047         ASCII file_name[100];       /* image file name */
00048         ASCII create_date[24];  /* file creation date, yyyy:mm:dd:hh:mm:ss:LTZ */
00049         ASCII creator[100];
00050         ASCII project[200];
00051         ASCII copyright[200];
00052         U32     key;                            /* encryption key, FFFFFFF = unencrypted */
00053         ASCII Reserved[104];        /* reserved field TBD (need to pad) */
00054 } DpxFileInformation;
00055 
00056 typedef struct {
00057         U32      signage;
00058         U32      ref_low_data;       /* reference low data code value */
00059         R32      ref_low_quantity; /* reference low quantity represented */
00060         U32      ref_high_data;      /* reference high data code value */
00061         R32      ref_high_quantity;/* reference high quantity represented */
00062         U8       designator1;
00063         U8       transfer_characteristics;
00064         U8       colourimetry;
00065         U8       bits_per_pixel;
00066         U16      packing;
00067         U16      encoding;
00068         U32      data_offset;
00069         U32      line_padding;
00070         U32      channel_padding;
00071         ASCII    description[32];
00072 } DpxChannelInformation;
00073 
00074 typedef struct {
00075         U16      orientation;
00076         U16      channels_per_image;
00077         U32      pixels_per_line;
00078         U32      lines_per_image;
00079         DpxChannelInformation channel[8];
00080         ASCII    reserved[52];
00081 } DpxImageInformation;
00082 
00083 typedef struct {
00084         U32     x_offset;
00085         U32     y_offset;
00086         R32     x_centre;
00087         R32     y_centre;
00088         U32     x_original_size;
00089         U32     y_original_size;
00090         ASCII file_name[100];
00091         ASCII creation_time[24];
00092         ASCII input_device[32];
00093         ASCII input_serial_number[32];
00094         U16     border_validity[4];
00095         U32     pixel_aspect_ratio[2]; /* h:v */
00096         ASCII reserved[28];
00097 } DpxOriginationInformation;
00098 
00099 typedef struct {
00100         ASCII film_manufacturer_id[2];
00101         ASCII film_type[2];
00102         ASCII edge_code_perforation_offset[2];
00103         ASCII edge_code_prefix[6];
00104         ASCII edge_code_count[4];
00105         ASCII film_format[32];
00106         U32     frame_position;
00107         U32     sequence_length;
00108         U32     held_count;
00109         R32     frame_rate;
00110         R32     shutter_angle;
00111         ASCII frame_identification[32];
00112         ASCII slate_info[100];
00113         ASCII reserved[56];
00114 } DpxMPIInformation;
00115 
00116 typedef struct {
00117     DpxFileInformation fileInfo;
00118     DpxImageInformation imageInfo;
00119     DpxOriginationInformation originInfo;
00120     DpxMPIInformation filmHeader;
00121 } DpxMainHeader;
00122 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif /* _DPX_FILE_H_ */