Blender  V2.93
dpxlib.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify it
3  * under the terms of the GNU General Public License as published by the Free
4  * Software Foundation; either version 2 of the License, or (at your option)
5  * any later version.
6  *
7  * This program is distributed in the hope that it will be useful, but
8  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
10  * for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 1999 - 2002 David Hodson <hodsond@acm.org>
17  */
18 
25 #pragma once
26 
27 #include <math.h>
28 
29 #include "logImageCore.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #define DPX_FILE_MAGIC 0x53445058
36 #define DPX_UNDEFINED_U8 0xFF
37 #define DPX_UNDEFINED_U16 0xFFFF
38 #define DPX_UNDEFINED_U32 0xFFFFFFFF
39 #define DPX_UNDEFINED_R32 NAN
40 #define IS_DPX_UNDEFINED_R32(x) isnan(x)
41 #define DPX_UNDEFINED_CHAR 0
42 
43 typedef struct {
44  unsigned int magic_num;
45  unsigned int offset;
46  char version[8];
47  unsigned int file_size;
48  unsigned int ditto_key;
49  unsigned int gen_hdr_size;
50  unsigned int ind_hdr_size;
51  unsigned int user_data_size;
52  char file_name[100];
53  char creation_date[24];
54  char creator[100];
55  char project[200];
56  char copyright[200];
57  unsigned int key;
58  char reserved[104];
60 
61 typedef struct {
62  unsigned int data_sign;
63  unsigned int ref_low_data;
65  unsigned int ref_high_data;
67  unsigned char descriptor;
68  unsigned char transfer;
69  unsigned char colorimetric;
70  unsigned char bits_per_sample;
71  unsigned short packing;
72  unsigned short encoding;
73  unsigned int data_offset;
74  unsigned int line_padding;
75  unsigned int element_padding;
76  char description[32];
78 
79 typedef struct {
80  unsigned short orientation;
81  unsigned short elements_per_image;
82  unsigned int pixels_per_line;
83  unsigned int lines_per_element;
85  char reserved[52];
87 
88 typedef struct {
89  unsigned int x_offset;
90  unsigned int y_offset;
91  float x_center;
92  float y_center;
93  unsigned int x_original_size;
94  unsigned int y_original_size;
95  char file_name[100];
96  char creation_time[24];
97  char input_device[32];
98  char input_serial_number[32];
99  unsigned short border_validity[4];
100  unsigned int pixel_aspect_ratio[2];
101  char reserved[28];
103 
104 typedef struct {
105  char film_manufacturer_id[2];
106  char film_type[2];
107  char edge_code_perforation_offset[2];
108  char edge_code_prefix[6];
109  char edge_code_count[4];
110  char film_format[32];
111  unsigned int frame_position;
112  unsigned int sequence_length;
113  unsigned int held_count;
114  float frame_rate;
116  char frame_identification[32];
117  char slate_info[100];
118  char reserved[56];
119 } DpxFilmHeader;
120 
121 typedef struct {
122  unsigned int time_code;
123  unsigned int user_bits;
124  unsigned char interlace;
125  unsigned char field_number;
126  unsigned char video_signal;
127  unsigned char padding;
130  float frame_rate;
131  float time_offset;
132  float gamma;
133  float black_level;
134  float black_gain;
135  float breakpoint;
136  float white_level;
138  unsigned char reserved[76];
140 
141 typedef struct {
147 } DpxMainHeader;
148 
149 void dpxSetVerbose(int verbosity);
150 LogImageFile *dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize);
151 LogImageFile *dpxCreate(const char *filename,
152  int width,
153  int height,
154  int bitsPerSample,
155  int hasAlpha,
156  int isLogarithmic,
157  int referenceWhite,
158  int referenceBlack,
159  float gamma,
160  const char *creator);
161 
162 #ifdef __cplusplus
163 }
164 #endif
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
ATTR_WARN_UNUSED_RESULT const void * element
void dpxSetVerbose(int verbosity)
Definition: dpxlib.c:46
LogImageFile * dpxCreate(const char *filename, int width, int height, int bitsPerSample, int hasAlpha, int isLogarithmic, int referenceWhite, int referenceBlack, float gamma, const char *creator)
Definition: dpxlib.c:424
LogImageFile * dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize)
Definition: dpxlib.c:138
vector project(vector v, vector v_proj)
Definition: node_math.h:66
unsigned int line_padding
Definition: dpxlib.h:74
unsigned int ref_low_data
Definition: dpxlib.h:63
float ref_high_quantity
Definition: dpxlib.h:66
unsigned int element_padding
Definition: dpxlib.h:75
unsigned int data_offset
Definition: dpxlib.h:73
unsigned char bits_per_sample
Definition: dpxlib.h:70
unsigned short encoding
Definition: dpxlib.h:72
unsigned short packing
Definition: dpxlib.h:71
unsigned char colorimetric
Definition: dpxlib.h:69
unsigned char transfer
Definition: dpxlib.h:68
unsigned int ref_high_data
Definition: dpxlib.h:65
float ref_low_quantity
Definition: dpxlib.h:64
unsigned int data_sign
Definition: dpxlib.h:62
unsigned char descriptor
Definition: dpxlib.h:67
unsigned int file_size
Definition: dpxlib.h:47
unsigned int magic_num
Definition: dpxlib.h:44
unsigned int user_data_size
Definition: dpxlib.h:51
unsigned int key
Definition: dpxlib.h:57
unsigned int ind_hdr_size
Definition: dpxlib.h:50
unsigned int offset
Definition: dpxlib.h:45
unsigned int ditto_key
Definition: dpxlib.h:48
unsigned int gen_hdr_size
Definition: dpxlib.h:49
float shutter_angle
Definition: dpxlib.h:115
unsigned int frame_position
Definition: dpxlib.h:111
unsigned int held_count
Definition: dpxlib.h:113
float frame_rate
Definition: dpxlib.h:114
unsigned int sequence_length
Definition: dpxlib.h:112
unsigned int lines_per_element
Definition: dpxlib.h:83
unsigned int pixels_per_line
Definition: dpxlib.h:82
unsigned short elements_per_image
Definition: dpxlib.h:81
unsigned short orientation
Definition: dpxlib.h:80
DpxFileHeader fileHeader
Definition: dpxlib.h:142
DpxTelevisionHeader televisionHeader
Definition: dpxlib.h:146
DpxOrientationHeader orientationHeader
Definition: dpxlib.h:144
DpxFilmHeader filmHeader
Definition: dpxlib.h:145
DpxImageHeader imageHeader
Definition: dpxlib.h:143
unsigned int y_original_size
Definition: dpxlib.h:94
unsigned int x_offset
Definition: dpxlib.h:89
unsigned int x_original_size
Definition: dpxlib.h:93
unsigned int y_offset
Definition: dpxlib.h:90
unsigned char interlace
Definition: dpxlib.h:124
unsigned int time_code
Definition: dpxlib.h:122
unsigned char padding
Definition: dpxlib.h:127
float horizontal_sample_rate
Definition: dpxlib.h:128
unsigned int user_bits
Definition: dpxlib.h:123
float vertical_sample_rate
Definition: dpxlib.h:129
unsigned char field_number
Definition: dpxlib.h:125
float integration_times
Definition: dpxlib.h:137
unsigned char video_signal
Definition: dpxlib.h:126