Blender  V3.3
Functions | Variables
logImageCore.c File Reference
#include "logImageCore.h"
#include "cineonlib.h"
#include "dpxlib.h"
#include "logmemfile.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "BLI_fileops.h"
#include "BLI_utildefines.h"
#include "IMB_imbuf.h"
#include "MEM_guardedalloc.h"

Go to the source code of this file.

Functions

static int logImageSetData8 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageSetData10 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageSetData12 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageSetData16 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData1 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData8 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData10 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData10Packed (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData12 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData12Packed (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int logImageElementGetData16 (LogImageFile *logImage, LogImageElement logElement, float *data)
 
static int convertLogElementToRGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int dstIsLinearRGB)
 
static int convertRGBAToLogElement (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int srcIsLinearRGB)
 
void logImageSetVerbose (int verbosity)
 
int logImageIsDpx (const void *buffer, const unsigned int size)
 
int logImageIsCineon (const void *buffer, const unsigned int size)
 
LogImageFilelogImageOpenFromFile (const char *filepath, int cineon)
 
LogImageFilelogImageOpenFromMemory (const unsigned char *buffer, unsigned int size)
 
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)
 
void logImageGetSize (LogImageFile *logImage, int *width, int *height, int *depth)
 
size_t getRowLength (size_t width, LogImageElement logElement)
 
int logImageSetDataRGBA (LogImageFile *logImage, float *data, int dataIsLinearRGB)
 
int logImageGetDataRGBA (LogImageFile *logImage, float *data, int dataIsLinearRGB)
 
static int getYUVtoRGBMatrix (float *matrix, LogImageElement logElement)
 
static floatgetLinToLogLut (LogImageFile *logImage, LogImageElement logElement)
 
static floatgetLogToLinLut (LogImageFile *logImage, LogImageElement logElement)
 
static floatgetLinToSrgbLut (LogImageElement logElement)
 
static floatgetSrgbToLinLut (LogImageElement logElement)
 
static int convertRGBA_RGB (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
 
static int convertRGB_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
 
static int convertRGBA_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
 
static int convertABGR_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
 
static int convertCbYCr_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
 
static int convertCbYCrA_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
 
static int convertCbYCrY_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
 
static int convertCbYACrYA_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
 
static int convertLuminance_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
 
static int convertYA_RGBA (float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
 

Variables

static int verbose = 0
 

Detailed Description

Cineon image file format library routines.

Definition in file logImageCore.c.

Function Documentation

◆ convertABGR_RGBA()

static int convertABGR_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement,
int  elementIsSource 
)
static

◆ convertCbYACrYA_RGBA()

static int convertCbYACrYA_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ convertCbYCr_RGBA()

static int convertCbYCr_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ convertCbYCrA_RGBA()

static int convertCbYCrA_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ convertCbYCrY_RGBA()

static int convertCbYCrY_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ convertLogElementToRGBA()

static int convertLogElementToRGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement,
int  dstIsLinearRGB 
)
static

◆ convertLuminance_RGBA()

static int convertLuminance_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ convertRGB_RGBA()

static int convertRGB_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement,
int  elementIsSource 
)
static

◆ convertRGBA_RGB()

static int convertRGBA_RGB ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement,
int  elementIsSource 
)
static

◆ convertRGBA_RGBA()

static int convertRGBA_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement,
int  elementIsSource 
)
static

◆ convertRGBAToLogElement()

static int convertRGBAToLogElement ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement,
int  srcIsLinearRGB 
)
static

◆ convertYA_RGBA()

static int convertYA_RGBA ( float src,
float dst,
LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ getLinToLogLut()

static float* getLinToLogLut ( LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ getLinToSrgbLut()

static float* getLinToSrgbLut ( LogImageElement  logElement)
static

Definition at line 1154 of file logImageCore.c.

References col, float(), if(), LogImageElement::maxValue, MEM_mallocN, and powf.

Referenced by convertRGBAToLogElement().

◆ getLogToLinLut()

static float* getLogToLinLut ( LogImageFile logImage,
LogImageElement  logElement 
)
static

◆ getRowLength()

size_t getRowLength ( size_t  width,
LogImageElement  logElement 
)

◆ getSrgbToLinLut()

static float* getSrgbToLinLut ( LogImageElement  logElement)
static

Definition at line 1175 of file logImageCore.c.

References col, float(), if(), LogImageElement::maxValue, MEM_mallocN, and powf.

Referenced by convertLogElementToRGBA().

◆ getYUVtoRGBMatrix()

static int getYUVtoRGBMatrix ( float matrix,
LogImageElement  logElement 
)
static

◆ 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().

◆ logImageElementGetData()

static int logImageElementGetData ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData1()

static int logImageElementGetData1 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData10()

static int logImageElementGetData10 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData10Packed()

static int logImageElementGetData10Packed ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData12()

static int logImageElementGetData12 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData12Packed()

static int logImageElementGetData12Packed ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData16()

static int logImageElementGetData16 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageElementGetData8()

static int logImageElementGetData8 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ 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,
const unsigned int  size 
)

◆ logImageIsDpx()

int logImageIsDpx ( const void buffer,
const 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().

◆ logImageSetData10()

static int logImageSetData10 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageSetData12()

static int logImageSetData12 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageSetData16()

static int logImageSetData16 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ logImageSetData8()

static int logImageSetData8 ( LogImageFile logImage,
LogImageElement  logElement,
float data 
)
static

◆ 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().

Variable Documentation

◆ verbose

int verbose = 0
static