Blender  V3.3
dpxlib.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 1999-2002 David Hodson <hodsond@acm.org>. */
3 
10 #pragma once
11 
12 #include <math.h>
13 
14 #include "logImageCore.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #define DPX_FILE_MAGIC 0x53445058
21 #define DPX_UNDEFINED_U8 0xFF
22 #define DPX_UNDEFINED_U16 0xFFFF
23 #define DPX_UNDEFINED_U32 0xFFFFFFFF
24 #define DPX_UNDEFINED_R32 NAN
25 #define IS_DPX_UNDEFINED_R32(x) isnan(x)
26 #define DPX_UNDEFINED_CHAR 0
27 
28 typedef struct {
29  unsigned int magic_num;
30  unsigned int offset;
31  char version[8];
32  unsigned int file_size;
33  unsigned int ditto_key;
34  unsigned int gen_hdr_size;
35  unsigned int ind_hdr_size;
36  unsigned int user_data_size;
37  char file_name[100];
38  char creation_date[24];
39  char creator[100];
40  char project[200];
41  char copyright[200];
42  unsigned int key;
43  char reserved[104];
45 
46 typedef struct {
47  unsigned int data_sign;
48  unsigned int ref_low_data;
50  unsigned int ref_high_data;
52  unsigned char descriptor;
53  unsigned char transfer;
54  unsigned char colorimetric;
55  unsigned char bits_per_sample;
56  unsigned short packing;
57  unsigned short encoding;
58  unsigned int data_offset;
59  unsigned int line_padding;
60  unsigned int element_padding;
61  char description[32];
63 
64 typedef struct {
65  unsigned short orientation;
66  unsigned short elements_per_image;
67  unsigned int pixels_per_line;
68  unsigned int lines_per_element;
70  char reserved[52];
72 
73 typedef struct {
74  unsigned int x_offset;
75  unsigned int y_offset;
76  float x_center;
77  float y_center;
78  unsigned int x_original_size;
79  unsigned int y_original_size;
80  char file_name[100];
81  char creation_time[24];
82  char input_device[32];
83  char input_serial_number[32];
84  unsigned short border_validity[4];
85  unsigned int pixel_aspect_ratio[2];
86  char reserved[28];
88 
89 typedef struct {
90  char film_manufacturer_id[2];
91  char film_type[2];
92  char edge_code_perforation_offset[2];
93  char edge_code_prefix[6];
94  char edge_code_count[4];
95  char film_format[32];
96  unsigned int frame_position;
97  unsigned int sequence_length;
98  unsigned int held_count;
99  float frame_rate;
101  char frame_identification[32];
102  char slate_info[100];
103  char reserved[56];
104 } DpxFilmHeader;
105 
106 typedef struct {
107  unsigned int time_code;
108  unsigned int user_bits;
109  unsigned char interlace;
110  unsigned char field_number;
111  unsigned char video_signal;
112  unsigned char padding;
115  float frame_rate;
116  float time_offset;
117  float gamma;
118  float black_level;
119  float black_gain;
120  float breakpoint;
121  float white_level;
123  unsigned char reserved[76];
125 
126 typedef struct {
132 } DpxMainHeader;
133 
134 void dpxSetVerbose(int verbosity);
135 LogImageFile *dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize);
136 LogImageFile *dpxCreate(const char *filepath,
137  int width,
138  int height,
139  int bitsPerSample,
140  int hasAlpha,
141  int isLogarithmic,
142  int referenceWhite,
143  int referenceBlack,
144  float gamma,
145  const char *creator);
146 
147 #ifdef __cplusplus
148 }
149 #endif
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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
ATTR_WARN_UNUSED_RESULT const void * element
void dpxSetVerbose(int verbosity)
Definition: dpxlib.c:31
LogImageFile * dpxCreate(const char *filepath, int width, int height, int bitsPerSample, int hasAlpha, int isLogarithmic, int referenceWhite, int referenceBlack, float gamma, const char *creator)
Definition: dpxlib.c:409
LogImageFile * dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize)
Definition: dpxlib.c:123
vec_base< T, Size > project(const vec_base< T, Size > &p, const vec_base< T, Size > &v_proj)
unsigned int line_padding
Definition: dpxlib.h:59
unsigned int ref_low_data
Definition: dpxlib.h:48
float ref_high_quantity
Definition: dpxlib.h:51
unsigned int element_padding
Definition: dpxlib.h:60
unsigned int data_offset
Definition: dpxlib.h:58
unsigned char bits_per_sample
Definition: dpxlib.h:55
unsigned short encoding
Definition: dpxlib.h:57
unsigned short packing
Definition: dpxlib.h:56
unsigned char colorimetric
Definition: dpxlib.h:54
unsigned char transfer
Definition: dpxlib.h:53
unsigned int ref_high_data
Definition: dpxlib.h:50
float ref_low_quantity
Definition: dpxlib.h:49
unsigned int data_sign
Definition: dpxlib.h:47
unsigned char descriptor
Definition: dpxlib.h:52
unsigned int file_size
Definition: dpxlib.h:32
unsigned int magic_num
Definition: dpxlib.h:29
unsigned int user_data_size
Definition: dpxlib.h:36
unsigned int key
Definition: dpxlib.h:42
unsigned int ind_hdr_size
Definition: dpxlib.h:35
unsigned int offset
Definition: dpxlib.h:30
unsigned int ditto_key
Definition: dpxlib.h:33
unsigned int gen_hdr_size
Definition: dpxlib.h:34
float shutter_angle
Definition: dpxlib.h:100
unsigned int frame_position
Definition: dpxlib.h:96
unsigned int held_count
Definition: dpxlib.h:98
float frame_rate
Definition: dpxlib.h:99
unsigned int sequence_length
Definition: dpxlib.h:97
unsigned int lines_per_element
Definition: dpxlib.h:68
unsigned int pixels_per_line
Definition: dpxlib.h:67
unsigned short elements_per_image
Definition: dpxlib.h:66
unsigned short orientation
Definition: dpxlib.h:65
DpxFileHeader fileHeader
Definition: dpxlib.h:127
DpxTelevisionHeader televisionHeader
Definition: dpxlib.h:131
DpxOrientationHeader orientationHeader
Definition: dpxlib.h:129
DpxFilmHeader filmHeader
Definition: dpxlib.h:130
DpxImageHeader imageHeader
Definition: dpxlib.h:128
unsigned int y_original_size
Definition: dpxlib.h:79
unsigned int x_offset
Definition: dpxlib.h:74
unsigned int x_original_size
Definition: dpxlib.h:78
unsigned int y_offset
Definition: dpxlib.h:75
unsigned char interlace
Definition: dpxlib.h:109
unsigned int time_code
Definition: dpxlib.h:107
unsigned char padding
Definition: dpxlib.h:112
float horizontal_sample_rate
Definition: dpxlib.h:113
unsigned int user_bits
Definition: dpxlib.h:108
float vertical_sample_rate
Definition: dpxlib.h:114
unsigned char field_number
Definition: dpxlib.h:110
float integration_times
Definition: dpxlib.h:122
unsigned char video_signal
Definition: dpxlib.h:111