Blender V4.3
logImageCore.h File Reference
#include <stdio.h>
#include "BLI_sys_types.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Classes

struct  LogImageElement
 
struct  LogImageFile
 

Macros

#define PATHSEP_CHAR   '/'
 

Typedefs

typedef struct LogImageElement LogImageElement
 
typedef struct LogImageFile LogImageFile
 

Enumerations

enum  format { format_DPX , format_Cineon }
 
enum  transfer {
  transfer_UserDefined , transfer_PrintingDensity , transfer_Linear , transfer_Logarithmic ,
  transfer_Unspecified , transfer_Smpte240M , transfer_Ccir7091 , transfer_Ccir6012BG ,
  transfer_Ccir6012M , transfer_NTSC , transfer_PAL , transfer_ZLinear ,
  transfer_Homogeneous
}
 
enum  descriptor {
  descriptor_UserDefined , descriptor_Red , descriptor_Green , descriptor_Blue ,
  descriptor_Alpha , descriptor_Luminance = 6 , descriptor_Chrominance , descriptor_Depth ,
  descriptor_Composite , descriptor_RGB = 50 , descriptor_RGBA , descriptor_ABGR ,
  descriptor_CbYCrY = 100 , descriptor_CbYACrYA , descriptor_CbYCr , descriptor_CbYCrA ,
  descriptor_UserDefined2Elt = 150 , descriptor_UserDefined3Elt , descriptor_UserDefined4Elt , descriptor_UserDefined5Elt ,
  descriptor_UserDefined6Elt , descriptor_UserDefined7Elt , descriptor_UserDefined8Elt , descriptor_YA
}
 

Functions

void logImageSetVerbose (int verbosity)
 
int logImageIsDpx (const void *buffer, unsigned int size)
 
int logImageIsCineon (const void *buffer, unsigned int size)
 
LogImageFilelogImageOpenFromMemory (const unsigned char *buffer, unsigned int size)
 
LogImageFilelogImageOpenFromFile (const char *filepath, int cineon)
 
void logImageGetSize (const LogImageFile *logImage, int *width, int *height, int *depth)
 
LogImageFilelogImageCreate (const char *filepath, int cineon, int width, int height, int bitsPerSample, int isLogarithmic, int hasAlpha, int referenceWhite, int referenceBlack, float gamma, const char *creator)
 
void logImageClose (LogImageFile *logImage)
 
size_t getRowLength (size_t width, const LogImageElement *logElement)
 
int logImageSetDataRGBA (LogImageFile *logImage, const float *data, int dataIsLinearRGB)
 
int logImageGetDataRGBA (LogImageFile *logImage, float *data, int dataIsLinearRGB)
 
BLI_INLINE unsigned short swap_ushort (unsigned short x, int swap)
 
BLI_INLINE unsigned int swap_uint (unsigned int x, int swap)
 
BLI_INLINE float swap_float (float x, int swap)
 
BLI_INLINE unsigned int clamp_uint (unsigned int x, unsigned int low, unsigned int high)
 
BLI_INLINE float clamp_float (float x, float low, float high)
 
BLI_INLINE unsigned int float_uint (float value, unsigned int max)
 

Detailed Description

Cineon image file format library definitions. Cineon and DPX common structures.

This header file contains private details. User code should generally use cineonlib.h and dpxlib.h only. Hmm. I thought the two formats would have more in common!

Definition in file logImageCore.h.

Macro Definition Documentation

◆ PATHSEP_CHAR

#define PATHSEP_CHAR   '/'

Definition at line 26 of file logImageCore.h.

Referenced by cineonCreate(), and dpxCreate().

Typedef Documentation

◆ LogImageElement

typedef struct LogImageElement LogImageElement

◆ LogImageFile

typedef struct LogImageFile LogImageFile

Enumeration Type Documentation

◆ descriptor

enum descriptor
Enumerator
descriptor_UserDefined 
descriptor_Red 
descriptor_Green 
descriptor_Blue 
descriptor_Alpha 
descriptor_Luminance 
descriptor_Chrominance 
descriptor_Depth 
descriptor_Composite 
descriptor_RGB 
descriptor_RGBA 
descriptor_ABGR 
descriptor_CbYCrY 
descriptor_CbYACrYA 
descriptor_CbYCr 
descriptor_CbYCrA 
descriptor_UserDefined2Elt 
descriptor_UserDefined3Elt 
descriptor_UserDefined4Elt 
descriptor_UserDefined5Elt 
descriptor_UserDefined6Elt 
descriptor_UserDefined7Elt 
descriptor_UserDefined8Elt 
descriptor_YA 

Definition at line 145 of file logImageCore.h.

◆ format

enum format
Enumerator
format_DPX 
format_Cineon 

Definition at line 39 of file logImageCore.h.

◆ transfer

enum transfer
Enumerator
transfer_UserDefined 
transfer_PrintingDensity 
transfer_Linear 
transfer_Logarithmic 
transfer_Unspecified 
transfer_Smpte240M 
transfer_Ccir7091 
transfer_Ccir6012BG 
transfer_Ccir6012M 
transfer_NTSC 
transfer_PAL 
transfer_ZLinear 
transfer_Homogeneous 

Definition at line 103 of file logImageCore.h.

Function Documentation

◆ clamp_float()

◆ clamp_uint()

BLI_INLINE unsigned int clamp_uint ( unsigned int x,
unsigned int low,
unsigned int high )

Definition at line 247 of file logImageCore.h.

References x.

◆ float_uint()

◆ getRowLength()

size_t getRowLength ( size_t width,
const LogImageElement * logElement )

Definition at line 238 of file logImageCore.cc.

References getRowLength().

◆ logImageClose()

void logImageClose ( LogImageFile * logImage)

◆ logImageCreate()

LogImageFile * logImageCreate ( const char * filepath,
int cineon,
int width,
int height,
int bitsPerSample,
int isLogarithmic,
int hasAlpha,
int referenceWhite,
int referenceBlack,
float gamma,
const char * creator )

Definition at line 155 of file logImageCore.cc.

References cineonCreate(), and dpxCreate().

Referenced by imb_save_dpx_cineon().

◆ logImageGetDataRGBA()

◆ logImageGetSize()

void logImageGetSize ( const LogImageFile * logImage,
int * width,
int * height,
int * depth )

Definition at line 195 of file logImageCore.cc.

References LogImageFile::depth, LogImageFile::height, and LogImageFile::width.

Referenced by imb_load_dpx_cineon().

◆ logImageIsCineon()

int logImageIsCineon ( const void * buffer,
unsigned int size )

Definition at line 105 of file logImageCore.cc.

References CINEON_FILE_MAGIC, and swap_uint().

Referenced by imb_is_a_cineon(), logImageOpenFromFile(), and logImageOpenFromMemory().

◆ logImageIsDpx()

int logImageIsDpx ( const void * buffer,
unsigned int size )

Definition at line 95 of file logImageCore.cc.

References DPX_FILE_MAGIC, and swap_uint().

Referenced by logImageOpenFromFile(), and logImageOpenFromMemory().

◆ logImageOpenFromFile()

LogImageFile * logImageOpenFromFile ( const char * filepath,
int cineon )

Definition at line 115 of file logImageCore.cc.

References BLI_fopen(), cineonOpen(), dpxOpen(), logImageIsCineon(), and logImageIsDpx().

◆ logImageOpenFromMemory()

LogImageFile * logImageOpenFromMemory ( const unsigned char * buffer,
unsigned int size )

Definition at line 143 of file logImageCore.cc.

References cineonOpen(), dpxOpen(), logImageIsCineon(), and logImageIsDpx().

Referenced by imb_load_dpx_cineon().

◆ logImageSetDataRGBA()

◆ logImageSetVerbose()

void logImageSetVerbose ( int verbosity)

Definition at line 84 of file logImageCore.cc.

References cineonSetVerbose(), dpxSetVerbose(), and verbose.

Referenced by imb_load_dpx_cineon(), and imb_save_dpx_cineon().

◆ swap_float()

BLI_INLINE float swap_float ( float x,
int swap )

Definition at line 225 of file logImageCore.h.

References b, and x.

Referenced by cineonOpen(), dpxOpen(), fillCineonMainHeader(), and fillDpxMainHeader().

◆ swap_uint()

◆ swap_ushort()

BLI_INLINE unsigned short swap_ushort ( unsigned short x,
int swap )