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