|
Blender V4.3
|
#include "logImageCore.h"#include "cineonlib.h"#include "dpxlib.h"#include "logmemfile.h"#include <cmath>#include <cstdlib>#include <cstring>#include "BLI_fileops.h"#include "BLI_utildefines.h"#include "IMB_imbuf.hh"#include "MEM_guardedalloc.h"Go to the source code of this file.
Functions | |
| static int | logImageSetData8 (LogImageFile *logImage, const LogImageElement &logElement, const float *data) |
| static int | logImageSetData10 (LogImageFile *logImage, const LogImageElement &logElement, const float *data) |
| static int | logImageSetData12 (LogImageFile *logImage, const LogImageElement &logElement, const float *data) |
| static int | logImageSetData16 (LogImageFile *logImage, const LogImageElement &logElement, const float *data) |
| static int | logImageElementGetData (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData1 (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData8 (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData10 (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData10Packed (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData12 (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData12Packed (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | logImageElementGetData16 (LogImageFile *logImage, const LogImageElement &logElement, float *data) |
| static int | convertLogElementToRGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement, int dstIsLinearRGB) |
| static int | convertRGBAToLogElement (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement, int srcIsLinearRGB) |
| void | logImageSetVerbose (int verbosity) |
| int | logImageIsDpx (const void *buffer, const uint size) |
| int | logImageIsCineon (const void *buffer, const uint size) |
| LogImageFile * | logImageOpenFromFile (const char *filepath, int cineon) |
| LogImageFile * | logImageOpenFromMemory (const uchar *buffer, uint size) |
| 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) |
| void | logImageClose (LogImageFile *logImage) |
| void | logImageGetSize (const LogImageFile *logImage, int *width, int *height, int *depth) |
| static size_t | getRowLength (size_t width, const LogImageElement &logElement) |
| 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) |
| static int | getYUVtoRGBMatrix (float *matrix, const LogImageElement &logElement) |
| static float * | getLinToLogLut (const LogImageFile *logImage, const LogImageElement &logElement) |
| static float * | getLogToLinLut (const LogImageFile *logImage, const LogImageElement &logElement) |
| static float * | getLinToSrgbLut (const LogImageElement &logElement) |
| static float * | getSrgbToLinLut (const LogImageElement &logElement) |
| static int | convertRGBA_RGB (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement, int elementIsSource) |
| static int | convertRGB_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement, int elementIsSource) |
| static int | convertRGBA_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement, int elementIsSource) |
| static int | convertABGR_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement, int elementIsSource) |
| static int | convertCbYCr_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement) |
| static int | convertCbYCrA_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement) |
| static int | convertCbYCrY_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement) |
| static int | convertCbYACrYA_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement) |
| static int | convertLuminance_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement) |
| static int | convertYA_RGBA (const float *src, float *dst, const LogImageFile *logImage, const LogImageElement &logElement) |
Variables | |
| static int | verbose = 0 |
Cineon image file format library routines.
Definition in file logImageCore.cc.
|
static |
Definition at line 1383 of file logImageCore.cc.
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 1554 of file logImageCore.cc.
References clamp_float(), float, getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1437 of file logImageCore.cc.
References clamp_float(), float, getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, LogImageFile::width, and y.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1469 of file logImageCore.cc.
References clamp_float(), float, getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, LogImageFile::width, and y.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1502 of file logImageCore.cc.
References clamp_float(), float, getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1660 of file logImageCore.cc.
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 1608 of file logImageCore.cc.
References clamp_float(), float, getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1283 of file logImageCore.cc.
References float_uint(), getLinToLogLut(), getLogToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN(), printf, LogImageElement::transfer, transfer_Linear, transfer_Logarithmic, transfer_PrintingDensity, transfer_Unspecified, transfer_UserDefined, verbose, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1228 of file logImageCore.cc.
References float_uint(), getLinToLogLut(), getLogToLinLut(), LogImageFile::height, LogImageElement::maxValue, MEM_freeN(), printf, LogImageElement::transfer, transfer_Linear, transfer_Logarithmic, transfer_PrintingDensity, transfer_Unspecified, transfer_UserDefined, verbose, and LogImageFile::width.
Referenced by convertRGBAToLogElement().
|
static |
Definition at line 1338 of file logImageCore.cc.
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 1733 of file logImageCore.cc.
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(), and LogImageFile::width.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 1634 of file logImageCore.cc.
References clamp_float(), float, getYUVtoRGBMatrix(), LogImageFile::height, LogImageElement::maxValue, LogImageElement::refLowData, and LogImageFile::width.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1107 of file logImageCore.cc.
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 1186 of file logImageCore.cc.
References col, float, LogImageElement::maxValue, MEM_mallocN, and powf.
Referenced by convertRGBAToLogElement().
|
static |
Definition at line 1134 of file logImageCore.cc.
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 206 of file logImageCore.cc.
References LogImageElement::bitsPerSample, LogImageElement::depth, ELEM, and LogImageElement::packing.
Referenced by cineonOpen(), fillCineonMainHeader(), fillDpxMainHeader(), getRowLength(), logImageElementGetData10Packed(), logImageElementGetData12Packed(), logImageElementGetData8(), logImageSetData10(), logImageSetData12(), logImageSetData16(), and logImageSetData8().
| size_t getRowLength | ( | size_t | width, |
| const LogImageElement * | logElement ) |
Definition at line 238 of file logImageCore.cc.
References getRowLength().
|
static |
Definition at line 1207 of file logImageCore.cc.
References col, float, LogImageElement::maxValue, MEM_mallocN, and powf.
Referenced by convertLogElementToRGBA().
|
static |
Definition at line 1043 of file logImageCore.cc.
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 184 of file logImageCore.cc.
References LogImageFile::file, and MEM_freeN().
Referenced by cineonCreate(), cineonOpen(), dpxCreate(), dpxOpen(), imb_load_dpx_cineon(), and imb_save_dpx_cineon().
| 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().
|
static |
Definition at line 690 of file logImageCore.cc.
References LogImageElement::bitsPerSample, ELEM, logImageElementGetData1(), logImageElementGetData10(), logImageElementGetData10Packed(), logImageElementGetData12(), logImageElementGetData12Packed(), logImageElementGetData16(), logImageElementGetData8(), and LogImageElement::packing.
Referenced by logImageGetDataRGBA().
|
static |
Definition at line 726 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, float, LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), printf, swap_uint(), verbose, and LogImageFile::width.
Referenced by logImageElementGetData().
|
static |
Definition at line 789 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, LogImageFile::depth, float, format_DPX, LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), LogImageElement::packing, printf, LogImageFile::srcFormat, swap_uint(), verbose, LogImageFile::width, and x.
Referenced by logImageElementGetData().
|
static |
Definition at line 861 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, float, getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), printf, swap_uint(), verbose, LogImageFile::width, and x.
Referenced by logImageElementGetData().
|
static |
Definition at line 916 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, float, LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_ushort(), LogImageElement::packing, printf, swap_ushort(), verbose, and LogImageFile::width.
Referenced by logImageElementGetData().
|
static |
Definition at line 954 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, float, getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_uint(), printf, swap_uint(), verbose, LogImageFile::width, and x.
Referenced by logImageElementGetData().
|
static |
Definition at line 1009 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, float, LogImageFile::height, LogImageFile::isMSB, logimage_fseek(), logimage_read_ushort(), printf, swap_ushort(), verbose, and LogImageFile::width.
Referenced by logImageElementGetData().
|
static |
Definition at line 759 of file logImageCore.cc.
References LogImageElement::dataOffset, LogImageElement::depth, float, getRowLength(), LogImageFile::height, logimage_fseek(), logimage_read_uchar(), printf, verbose, LogImageFile::width, and x.
Referenced by logImageElementGetData().
| int logImageGetDataRGBA | ( | LogImageFile * | logImage, |
| float * | data, | ||
| int | dataIsLinearRGB ) |
Definition at line 445 of file logImageCore.cc.
References convertLogElementToRGBA(), 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(), LogImageFile::numElements, printf, verbose, and LogImageFile::width.
Referenced by imb_load_dpx_cineon().
| 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().
Definition at line 105 of file logImageCore.cc.
References CINEON_FILE_MAGIC, and swap_uint().
Referenced by imb_is_a_cineon(), logImageOpenFromFile(), and logImageOpenFromMemory().
Definition at line 95 of file logImageCore.cc.
References DPX_FILE_MAGIC, and swap_uint().
Referenced by logImageOpenFromFile(), and logImageOpenFromMemory().
| LogImageFile * logImageOpenFromFile | ( | const char * | filepath, |
| int | cineon ) |
Definition at line 115 of file logImageCore.cc.
References BLI_fopen(), cineonOpen(), dpxOpen(), logImageIsCineon(), and logImageIsDpx().
| LogImageFile * logImageOpenFromMemory | ( | const uchar * | buffer, |
| uint | size ) |
Definition at line 143 of file logImageCore.cc.
References cineonOpen(), dpxOpen(), logImageIsCineon(), and logImageIsDpx().
Referenced by imb_load_dpx_cineon().
|
static |
Definition at line 326 of file logImageCore.cc.
References LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fwrite(), MEM_freeN(), MEM_mallocN, printf, swap_uint(), verbose, and LogImageFile::width.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 373 of file logImageCore.cc.
References LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fwrite(), MEM_freeN(), MEM_mallocN, printf, swap_ushort(), verbose, LogImageFile::width, and x.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 407 of file logImageCore.cc.
References LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, LogImageFile::isMSB, logimage_fwrite(), MEM_freeN(), MEM_mallocN, printf, swap_ushort(), verbose, LogImageFile::width, and x.
Referenced by logImageSetDataRGBA().
|
static |
Definition at line 293 of file logImageCore.cc.
References LogImageFile::depth, float_uint(), getRowLength(), LogImageFile::height, logimage_fwrite(), MEM_freeN(), MEM_mallocN, printf, verbose, LogImageFile::width, and x.
Referenced by logImageSetDataRGBA().
| int logImageSetDataRGBA | ( | LogImageFile * | logImage, |
| const float * | data, | ||
| int | dataIsLinearRGB ) |
Definition at line 249 of file logImageCore.cc.
References LogImageElement::bitsPerSample, convertRGBAToLogElement(), LogImageFile::depth, LogImageFile::element, LogImageFile::height, imb_alloc_pixels(), logImageSetData10(), logImageSetData12(), logImageSetData16(), logImageSetData8(), MEM_freeN(), and LogImageFile::width.
Referenced by imb_save_dpx_cineon().
| 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().
|
static |
Definition at line 82 of file logImageCore.cc.
Referenced by convertRGB_RGBA(), convertRGBA_RGB(), logImageElementGetData1(), logImageElementGetData10(), logImageElementGetData10Packed(), logImageElementGetData12(), logImageElementGetData12Packed(), logImageElementGetData16(), logImageElementGetData8(), logImageGetDataRGBA(), logImageSetData10(), logImageSetData12(), logImageSetData16(), logImageSetData8(), and logImageSetVerbose().