Blender V2.27

dpxfile.h

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