Blender  V3.3
Classes | Macros | Typedefs | Enumerations | Functions
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 (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, LogImageElement logElement)
 
int logImageSetDataRGBA (LogImageFile *logImage, 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 25 of file logImageCore.h.

Typedef Documentation

◆ 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 144 of file logImageCore.h.

◆ format

enum format
Enumerator
format_DPX 
format_Cineon 

Definition at line 38 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 102 of file logImageCore.h.

Function Documentation

◆ clamp_float()

BLI_INLINE float clamp_float ( float  x,
float  low,
float  high 
)

◆ clamp_uint()

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

Definition at line 246 of file logImageCore.h.

References high(), low(), and x.

◆ float_uint()

BLI_INLINE unsigned int float_uint ( float  value,
unsigned int  max 
)

◆ getRowLength()

size_t getRowLength ( size_t  width,
LogImageElement  logElement 
)

◆ 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 144 of file logImageCore.c.

References cineonCreate(), dpxCreate(), height, NULL, and width.

Referenced by imb_save_dpx_cineon().

◆ logImageGetDataRGBA()

int logImageGetDataRGBA ( LogImageFile logImage,
float data,
int  dataIsLinearRGB 
)

◆ logImageGetSize()

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

Definition at line 186 of file logImageCore.c.

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

Referenced by imb_load_dpx_cineon().

◆ logImageIsCineon()

int logImageIsCineon ( const void buffer,
unsigned int  size 
)

◆ logImageIsDpx()

int logImageIsDpx ( const void buffer,
unsigned int  size 
)

Definition at line 84 of file logImageCore.c.

References buffer, DPX_FILE_MAGIC, size(), and swap_uint().

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

◆ logImageOpenFromFile()

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

Definition at line 104 of file logImageCore.c.

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

◆ logImageOpenFromMemory()

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

Definition at line 132 of file logImageCore.c.

References buffer, cineonOpen(), dpxOpen(), logImageIsCineon(), logImageIsDpx(), NULL, and size().

Referenced by imb_load_dpx_cineon().

◆ logImageSetDataRGBA()

int logImageSetDataRGBA ( LogImageFile logImage,
float data,
int  dataIsLinearRGB 
)

◆ logImageSetVerbose()

void logImageSetVerbose ( int  verbosity)

Definition at line 73 of file logImageCore.c.

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 224 of file logImageCore.h.

References usdtokens::b(), swap(), and x.

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

◆ swap_uint()

BLI_INLINE unsigned int swap_uint ( unsigned int  x,
int  swap 
)

◆ swap_ushort()

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