|
Blender
V2.93
|
#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) |
| LogImageFile * | logImageOpenFromFile (const char *filename, int cineon) |
| LogImageFile * | logImageOpenFromMemory (const unsigned char *buffer, unsigned int size) |
| LogImageFile * | logImageCreate (const char *filename, 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 float * | getLinToLogLut (LogImageFile *logImage, LogImageElement logElement) |
| static float * | getLogToLinLut (LogImageFile *logImage, LogImageElement logElement) |
| static float * | getLinToSrgbLut (LogImageElement logElement) |
| static float * | getSrgbToLinLut (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 |
Cineon image file format library routines.
Definition in file logImageCore.c.
|
static |
Definition at line 1366 of file logImageCore.c.
References float_uint(), getLinToLogLut(), getLogToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN, LogImageElement::transfer, transfer_Linear, transfer_Logarithmic, transfer_PrintingDensity, transfer_UserDefined, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1537 of file logImageCore.c.
References clamp_float(), float(), getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, LogImageFile::width, and y1.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1420 of file logImageCore.c.
References clamp_float(), float(), getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, LogImageFile::width, and y.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1452 of file logImageCore.c.
References Freestyle::a, clamp_float(), float(), getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, LogImageFile::width, and y.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1485 of file logImageCore.c.
References clamp_float(), float(), getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, LogImageFile::width, and y1.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1643 of file logImageCore.c.
References convertABGR_RGBA(), convertCbYACrYA_RGBA(), convertCbYCr_RGBA(), convertCbYCrA_RGBA(), convertCbYCrY_RGBA(), convertLuminance_RGBA(), convertRGB_RGBA(), convertRGBA_RGBA(), convertYA_RGBA(), LogImageElement::descriptor, descriptor_ABGR, descriptor_CbYACrYA, descriptor_CbYCr, descriptor_CbYCrA, descriptor_CbYCrY, descriptor_Luminance, descriptor_RGB, descriptor_RGBA, descriptor_YA, float_uint(), getSrgbToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN, and LogImageFile::width.
Referenced by logImageGetDataRGBA().
|
static |
Definition at line 1591 of file logImageCore.c.
References clamp_float(), float(), getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1266 of file logImageCore.c.
References float_uint(), getLinToLogLut(), getLogToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN, LogImageElement::transfer, transfer_Linear, transfer_Logarithmic, transfer_PrintingDensity, transfer_Unspecified, transfer_UserDefined, verbose, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1211 of file logImageCore.c.
References float_uint(), getLinToLogLut(), getLogToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN, LogImageElement::transfer, transfer_Linear, transfer_Logarithmic, transfer_PrintingDensity, transfer_Unspecified, transfer_UserDefined, verbose, and LogImageFile::width.
Referenced by convertRGBAToLogElement().
|
static |
Definition at line 1321 of file logImageCore.c.
References float_uint(), getLinToLogLut(), getLogToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN, LogImageElement::transfer, transfer_Linear, transfer_Logarithmic, transfer_PrintingDensity, transfer_UserDefined, and LogImageFile::width.
Referenced by convertLogElementToRGBA(), and convertRGBAToLogElement().
|
static |
Definition at line 1713 of file logImageCore.c.
References convertRGBA_RGB(), convertRGBA_RGBA(), LogImageElement::descriptor, descriptor_ABGR, descriptor_CbYACrYA, descriptor_CbYCr, descriptor_CbYCrA, descriptor_CbYCrY, descriptor_Luminance, descriptor_RGB, descriptor_RGBA, descriptor_YA, float_uint(), getLinToSrgbLut(), LogImageFile::height, imb_alloc_pixels(), LogImageElement::maxValue, MEM_freeN, NULL, and LogImageFile::width.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 1617 of file logImageCore.c.
References clamp_float(), float(), getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1090 of file logImageCore.c.
References LogImageFile::gamma, LogImageElement::maxValue, MEM_mallocN, powf, LogImageFile::referenceBlack, LogImageFile::referenceWhite, and LogImageElement::refHighQuantity.
Referenced by convertABGR_RGBA(), convertRGB_RGBA(), convertRGBA_RGB(), and convertRGBA_RGBA().
|
static |
Definition at line 1169 of file logImageCore.c.
References col, float(), if(), LogImageElement::maxValue, MEM_mallocN, and powf.
Referenced by convertRGBAToLogElement().
|
static |
Definition at line 1117 of file logImageCore.c.
References LogImageFile::gamma, LogImageElement::maxValue, MEM_mallocN, powf, LogImageFile::referenceBlack, LogImageFile::referenceWhite, and LogImageElement::refHighQuantity.
Referenced by convertABGR_RGBA(), convertRGB_RGBA(), convertRGBA_RGB(), and convertRGBA_RGBA().
| size_t getRowLength | ( | size_t | width, |
| LogImageElement | logElement | ||
| ) |
Definition at line 212 of file logImageCore.c.
References LogImageElement::bitsPerSample, LogImageElement::depth, ELEM, LogImageElement::packing, and width.
Referenced by cineonOpen(), fillCineonMainHeader(), fillDpxMainHeader(), logImageElementGetData10Packed(), logImageElementGetData12Packed(), logImageElementGetData8(), logImageSetData10(), logImageSetData12(), logImageSetData16(), and logImageSetData8().
|
static |
Definition at line 1190 of file logImageCore.c.
References col, float(), if(), LogImageElement::maxValue, MEM_mallocN, and powf.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1026 of file logImageCore.c.
References float(), LogImageElement::maxValue, LogImageElement::refHighData, LogImageElement::refLowData, and LogImageElement::transfer.
Referenced by convertCbYACrYA_RGBA(), convertCbYCr_RGBA(), convertCbYCrA_RGBA(), convertCbYCrY_RGBA(), convertLuminance_RGBA(), and convertYA_RGBA().
| void logImageClose | ( | LogImageFile * | logImage | ) |
Definition at line 190 of file logImageCore.c.
References LogImageFile::file, MEM_freeN, and NULL.
Referenced by cineonCreate(), cineonOpen(), dpxCreate(), dpxOpen(), imb_load_dpx_cineon(), and imb_save_dpx_cineon().
| LogImageFile* logImageCreate | ( | const char * | filename, |
| int | cineon, | ||
| int | width, | ||
| int | height, | ||
| int | bitsPerSample, | ||
| int | isLogarithmic, | ||
| int | hasAlpha, | ||
| int | referenceWhite, | ||
| int | referenceBlack, | ||
| float | gamma, | ||
| const char * | creator | ||
| ) |
Definition at line 159 of file logImageCore.c.
References cineonCreate(), dpxCreate(), height, NULL, and width.
Referenced by imb_save_dpx_cineon().
|
static |
Definition at line 677 of file logImageCore.c.
References LogImageElement::bitsPerSample, data, ELEM, logImageElementGetData1(), logImageElementGetData10(), logImageElementGetData10Packed(), logImageElementGetData12(), logImageElementGetData12Packed(), logImageElementGetData16(), logImageElementGetData8(), and LogImageElement::packing.
Referenced by logImageGetDataRGBA().
|
static |
Definition at line 711 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, float(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), swap_uint(), verbose, LogImageFile::width, x, and y.
Referenced by logImageElementGetData().
|
static |
Definition at line 770 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, LogImageFile::depth, float(), format_DPX, LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), LogImageElement::packing, LogImageFile::srcFormat, swap_uint(), verbose, LogImageFile::width, x, and y.
Referenced by logImageElementGetData().
|
static |
Definition at line 842 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, float(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), swap_uint(), verbose, LogImageFile::width, x, and y.
Referenced by logImageElementGetData().
|
static |
Definition at line 898 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, float(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_ushort(), LogImageElement::packing, swap_ushort(), verbose, and LogImageFile::width.
Referenced by logImageElementGetData().
|
static |
Definition at line 936 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, float(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), swap_uint(), verbose, LogImageFile::width, x, and y.
Referenced by logImageElementGetData().
|
static |
Definition at line 992 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, float(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_ushort(), swap_ushort(), verbose, and LogImageFile::width.
Referenced by logImageElementGetData().
|
static |
Definition at line 742 of file logImageCore.c.
References data, LogImageElement::dataOffset, LogImageElement::depth, float(), getRowLength(), LogImageFile::height, logimage_fseek(), logimage_read_uchar(), verbose, LogImageFile::width, x, and y.
Referenced by logImageElementGetData().
| int logImageGetDataRGBA | ( | LogImageFile * | logImage, |
| float * | data, | ||
| int | dataIsLinearRGB | ||
| ) |
Definition at line 436 of file logImageCore.c.
References convertLogElementToRGBA(), data, LogImageElement::depth, LogImageFile::depth, LogImageElement::descriptor, descriptor_ABGR, descriptor_Alpha, descriptor_Blue, descriptor_CbYACrYA, descriptor_CbYCr, descriptor_CbYCrA, descriptor_CbYCrY, descriptor_Chrominance, descriptor_Composite, descriptor_Depth, descriptor_Green, descriptor_Luminance, descriptor_Red, descriptor_RGB, descriptor_RGBA, descriptor_YA, ELEM, LogImageFile::element, LogImageFile::height, imb_alloc_pixels(), logImageElementGetData(), MEM_freeN, NULL, LogImageFile::numElements, verbose, width, and LogImageFile::width.
Referenced by imb_load_dpx_cineon().
| void logImageGetSize | ( | LogImageFile * | logImage, |
| int * | width, | ||
| int * | height, | ||
| int * | depth | ||
| ) |
Definition at line 201 of file logImageCore.c.
References LogImageFile::depth, height, LogImageFile::height, width, and LogImageFile::width.
Referenced by imb_load_dpx_cineon().
| int logImageIsCineon | ( | const void * | buffer, |
| const unsigned int | size | ||
| ) |
Definition at line 109 of file logImageCore.c.
References buffer, CINEON_FILE_MAGIC, size(), and swap_uint().
Referenced by imb_is_a_cineon(), logImageOpenFromFile(), and logImageOpenFromMemory().
| int logImageIsDpx | ( | const void * | buffer, |
| const unsigned int | size | ||
| ) |
Definition at line 99 of file logImageCore.c.
References buffer, DPX_FILE_MAGIC, size(), and swap_uint().
Referenced by imb_is_a_dpx(), logImageOpenFromFile(), and logImageOpenFromMemory().
| LogImageFile* logImageOpenFromFile | ( | const char * | filename, |
| int | cineon | ||
| ) |
Definition at line 119 of file logImageCore.c.
References BLI_fopen(), cineonOpen(), dpxOpen(), logImageIsCineon(), logImageIsDpx(), and NULL.
| LogImageFile* logImageOpenFromMemory | ( | const unsigned char * | buffer, |
| unsigned int | size | ||
| ) |
Definition at line 147 of file logImageCore.c.
References buffer, cineonOpen(), dpxOpen(), logImageIsCineon(), logImageIsDpx(), NULL, and size().
Referenced by imb_load_dpx_cineon().
|
static |
Definition at line 322 of file logImageCore.c.
References data, LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fwrite(), MEM_freeN, MEM_mallocN, NULL, swap_uint(), verbose, LogImageFile::width, x, and y.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 368 of file logImageCore.c.
References data, LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fwrite(), MEM_freeN, MEM_mallocN, NULL, swap_ushort(), verbose, LogImageFile::width, x, and y.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 400 of file logImageCore.c.
References data, LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fwrite(), MEM_freeN, MEM_mallocN, NULL, swap_ushort(), verbose, LogImageFile::width, x, and y.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 291 of file logImageCore.c.
References data, LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, logimage_fwrite(), MEM_freeN, MEM_mallocN, NULL, verbose, LogImageFile::width, x, and y.
Referenced by logImageSetDataRGBA().
| int logImageSetDataRGBA | ( | LogImageFile * | logImage, |
| float * | data, | ||
| int | dataIsLinearRGB | ||
| ) |
Definition at line 248 of file logImageCore.c.
References LogImageElement::bitsPerSample, convertRGBAToLogElement(), data, LogImageFile::depth, LogImageFile::element, LogImageFile::height, imb_alloc_pixels(), logImageSetData10(), logImageSetData12(), logImageSetData16(), logImageSetData8(), MEM_freeN, NULL, and LogImageFile::width.
Referenced by imb_save_dpx_cineon().
| void logImageSetVerbose | ( | int | verbosity | ) |
Definition at line 88 of file logImageCore.c.
References cineonSetVerbose(), dpxSetVerbose(), and verbose.
Referenced by imb_load_dpx_cineon(), and imb_save_dpx_cineon().
|
static |
Definition at line 86 of file logImageCore.c.
Referenced by convertRGB_RGBA(), convertRGBA_RGB(), logImageElementGetData1(), logImageElementGetData10(), logImageElementGetData10Packed(), logImageElementGetData12(), logImageElementGetData12Packed(), logImageElementGetData16(), logImageElementGetData8(), logImageGetDataRGBA(), logImageSetData10(), logImageSetData12(), logImageSetData16(), logImageSetData8(), and logImageSetVerbose().