unify include guard defines, __$FILENAME__
[blender-staging.git] / source / blender / imbuf / intern / cineon / dpxfile.h
1 /** \file blender/imbuf/intern/cineon/dpxfile.h
2  *  \ingroup imbcineon
3  */
4 /*
5  *       Cineon image file format library definitions.
6  *       Dpx file format structures.
7  *
8  *       This header file contains private details.
9  *       User code should generally use cineonlib.h only.
10  *
11  *       Copyright 1999,2000,2001 David Hodson <hodsond@acm.org>
12  *
13  *       This program is free software; you can redistribute it and/or modify it
14  *       under the terms of the GNU General Public License as published by the Free
15  *       Software Foundation; either version 2 of the License, or (at your option)
16  *       any later version.
17  *
18  *       This program is distributed in the hope that it will be useful, but
19  *       WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20  *       or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
21  *       for more details.
22  *
23  *       You should have received a copy of the GNU General Public License
24  *       along with this program; if not, write to the Free Software
25  *       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  */
28
29 #ifndef __DPXFILE_H__
30 #define __DPXFILE_H__
31
32 #include "logImageCore.h"
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 typedef struct {
39                 U32             magic_num;                              /* magic number */
40                 U32             offset;                                         /* offset to image data in bytes */
41                 ASCII vers[8];                                  /* which header format version is being used (v1.0) */
42                 U32             file_size;                              /* file size in bytes */
43                 U32             ditto_key;                              /* I bet some people use this */
44                 U32             gen_hdr_size;                   /* generic header length in bytes */
45                 U32             ind_hdr_size;                   /* industry header length in bytes */
46                 U32             user_data_size;         /* user-defined data length in bytes */
47                 ASCII file_name[100];           /* image file name */
48                 ASCII create_date[24];  /* file creation date, yyyy:mm:dd:hh:mm:ss:LTZ */
49                 ASCII creator[100];
50                 ASCII project[200];
51                 ASCII copyright[200];
52                 U32             key;                                                    /* encryption key, FFFFFFF = unencrypted */
53                 ASCII Reserved[104];            /* reserved field TBD (need to pad) */
54 } DpxFileInformation;
55
56 typedef struct {
57                 U32              signage;
58                 U32              ref_low_data;           /* reference low data code value */
59                 R32              ref_low_quantity; /* reference low quantity represented */
60                 U32              ref_high_data;          /* reference high data code value */
61                 R32              ref_high_quantity;/* reference high quantity represented */
62                 U8               designator1;
63                 U8               transfer_characteristics;
64                 U8               colourimetry;
65                 U8               bits_per_pixel;
66                 U16              packing;
67                 U16              encoding;
68                 U32              data_offset;
69                 U32              line_padding;
70                 U32              channel_padding;
71                 ASCII    description[32];
72 } DpxChannelInformation;
73
74 typedef struct {
75                 U16              orientation;
76                 U16              channels_per_image;
77                 U32              pixels_per_line;
78                 U32              lines_per_image;
79                 DpxChannelInformation channel[8];
80                 ASCII    reserved[52];
81 } DpxImageInformation;
82
83 typedef struct {
84                 U32             x_offset;
85                 U32             y_offset;
86                 R32             x_centre;
87                 R32             y_centre;
88                 U32             x_original_size;
89                 U32             y_original_size;
90                 ASCII file_name[100];
91                 ASCII creation_time[24];
92                 ASCII input_device[32];
93                 ASCII input_serial_number[32];
94                 U16             border_validity[4];
95                 U32             pixel_aspect_ratio[2]; /* h:v */
96                 ASCII reserved[28];
97 } DpxOriginationInformation;
98
99 typedef struct {
100                 ASCII film_manufacturer_id[2];
101                 ASCII film_type[2];
102                 ASCII edge_code_perforation_offset[2];
103                 ASCII edge_code_prefix[6];
104                 ASCII edge_code_count[4];
105                 ASCII film_format[32];
106                 U32             frame_position;
107                 U32             sequence_length;
108                 U32             held_count;
109                 R32             frame_rate;
110                 R32             shutter_angle;
111                 ASCII frame_identification[32];
112                 ASCII slate_info[100];
113                 ASCII reserved[56];
114 } DpxMPIInformation;
115
116 typedef struct {
117         DpxFileInformation fileInfo;
118         DpxImageInformation imageInfo;
119         DpxOriginationInformation originInfo;
120         DpxMPIInformation filmHeader;
121 } DpxMainHeader;
122
123 #ifdef __cplusplus
124 }
125 #endif
126
127 #endif /* __DPXFILE_H__ */