86 unsigned int magicNum;
87 if (
size <
sizeof(magicNum)) {
90 magicNum = *(
unsigned int *)
buffer;
96 unsigned int magicNum;
97 if (
size <
sizeof(magicNum)) {
100 magicNum = *(
unsigned int *)
buffer;
106 unsigned int magicNum;
115 if (fread(&magicNum,
sizeof(magicNum), 1, f) != 1) {
123 return dpxOpen((
const unsigned char *)filepath, 0, 0);
126 return cineonOpen((
const unsigned char *)filepath, 0, 0);
177 if (logImage !=
NULL) {
178 if (logImage->
file) {
179 fclose(logImage->
file);
190 *depth = logImage->
depth;
202 return ((
width * logElement.
depth - 1) / 32 + 1) * 4;
205 return ((
width * logElement.
depth - 1) / 4 + 1) * 4;
209 return ((
width * logElement.
depth * 10 - 1) / 32 + 1) * 4;
212 return ((
width * logElement.
depth - 1) / 3 + 1) * 4;
217 return ((
width * logElement.
depth * 12 - 1) / 32 + 1) * 4;
239 logImage->
width, logImage->
height, logImage->
depth,
sizeof(
float), __func__);
240 if (elementData ==
NULL) {
245 data, elementData, logImage, logImage->
element[0], dataIsLinearRGB) != 0) {
281 row = (
unsigned char *)
MEM_mallocN(rowLength, __func__);
284 printf(
"DPX/Cineon: Cannot allocate row.\n");
288 memset(row, 0, rowLength);
290 for (
size_t y = 0;
y < logImage->
height;
y++) {
291 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
297 printf(
"DPX/Cineon: Error while writing file.\n");
310 unsigned int pixel, index;
313 row = (
unsigned int *)
MEM_mallocN(rowLength, __func__);
316 printf(
"DPX/Cineon: Cannot allocate row.\n");
321 for (
size_t y = 0;
y < logImage->
height;
y++) {
326 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
343 printf(
"DPX/Cineon: Error while writing file.\n");
358 row = (
unsigned short *)
MEM_mallocN(rowLength, __func__);
361 printf(
"DPX/Cineon: Cannot allocate row.\n");
366 for (
size_t y = 0;
y < logImage->
height;
y++) {
367 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
375 printf(
"DPX/Cineon: Error while writing file.\n");
390 row = (
unsigned short *)
MEM_mallocN(rowLength, __func__);
393 printf(
"DPX/Cineon: Cannot allocate row.\n");
398 for (
size_t y = 0;
y < logImage->
height;
y++) {
399 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
407 printf(
"DPX/Cineon: Error while writing file.\n");
424 int i, j, returnValue, sortedElementData[8], hasAlpha;
425 float *elementData[8];
426 float *elementData_ptr[8];
428 unsigned int sampleIndex;
433 memset(&elementData, 0, 8 *
sizeof(
float *));
442 if (elementData[i] ==
NULL) {
444 printf(
"DPX/Cineon: Cannot allocate memory for elementData[%d]\n.", i);
446 for (j = 0; j < i; j++) {
447 if (elementData[j] !=
NULL) {
453 elementData_ptr[i] = elementData[i];
458 printf(
"DPX/Cineon: Cannot read elementData[%d]\n.", i);
460 for (j = 0; j < i; j++) {
461 if (elementData[j] !=
NULL) {
477 elementData[0],
data, logImage, logImage->
element[0], dataIsLinearRGB);
488 memset(&sortedElementData, -1,
sizeof(
int[8]));
502 sortedElementData[0] = i;
513 sortedElementData[1] = i;
524 sortedElementData[2] = i;
529 sortedElementData[mergedElement.
depth - 1] = i;
542 if (mergedElement.
depth == 2) {
545 else if (mergedElement.
depth == 3) {
553 else if (mergedElement.
depth == 4) {
559 if (mergedElement.
depth == 1 || (mergedElement.
depth == 2 && hasAlpha == 1)) {
560 sortedElementData[0] = i;
563 sortedElementData[1] = i;
572 if (mergedElement.
depth == 2) {
575 else if (mergedElement.
depth == 3) {
583 else if (mergedElement.
depth == 4) {
589 if (sortedElementData[0] == -1) {
590 sortedElementData[0] = i;
593 sortedElementData[2] = i;
605 sortedElementData[0] = i;
615 sortedElementData[0] = i;
626 logImage->
width, logImage->
height, mergedElement.
depth,
sizeof(
float), __func__);
627 if (mergedData ==
NULL) {
629 printf(
"DPX/Cineon: Cannot allocate mergedData.\n");
632 if (elementData[i] !=
NULL) {
640 while (sampleIndex < logImage->
width * logImage->
height * mergedElement.
depth) {
642 for (j = 0; j < logImage->
element[sortedElementData[i]].
depth; j++) {
643 mergedData[sampleIndex++] = *(elementData_ptr[sortedElementData[i]]++);
650 if (elementData[i] !=
NULL) {
656 mergedData,
data, logImage, mergedElement, dataIsLinearRGB);
703 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
709 for (
size_t y = 0;
y < logImage->
height;
y++) {
710 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x += 32) {
713 printf(
"DPX/Cineon: EOF reached\n");
733 for (
size_t y = 0;
y < logImage->
height;
y++) {
737 printf(
"DPX/Cineon: Couldn't seek at %d\n", (
int)(logElement.
dataOffset +
y * rowLength));
742 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
745 printf(
"DPX/Cineon: EOF reached\n");
764 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
770 for (
size_t y = 0;
y < logImage->
height;
y++) {
772 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
778 else if (logElement.
packing == 2) {
784 printf(
"DPX/Cineon: EOF reached\n");
797 for (
size_t y = 0;
y < logImage->
height;
y++) {
799 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
805 else if (logElement.
packing == 2) {
811 printf(
"DPX/Cineon: EOF reached\n");
832 unsigned int pixel, oldPixel;
835 for (
size_t y = 0;
y < logImage->
height;
y++) {
839 printf(
"DPX/Cineon: Couldn't seek at %u\n",
840 (
unsigned int)(
y * rowLength + logElement.
dataOffset));
849 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
858 else if (
offset + 10 > 32) {
860 oldPixel = (pixel >>
offset);
869 printf(
"DPX/Cineon: EOF reached\n");
876 (
float)((((pixel << offset2) >>
offset) & 0x3ff) | oldPixel) / 1023.0f;
887 unsigned int sampleIndex;
888 unsigned int numSamples = logImage->
width * logImage->
height * logElement.
depth;
889 unsigned short pixel;
894 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
902 for (sampleIndex = 0; sampleIndex < numSamples; sampleIndex++) {
905 printf(
"DPX/Cineon: EOF reached\n");
912 data[sampleIndex] = (
float)(pixel >> 4) / 4095.0f;
914 else if (logElement.
packing == 2) {
915 data[sampleIndex] = (
float)pixel / 4095.0f;
926 unsigned int pixel, oldPixel;
929 for (
size_t y = 0;
y < logImage->
height;
y++) {
933 printf(
"DPX/Cineon: Couldn't seek at %u\n",
934 (
unsigned int)(
y * rowLength + logElement.
dataOffset));
943 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
952 else if (
offset + 12 > 32) {
954 oldPixel = (pixel >>
offset);
963 printf(
"DPX/Cineon: EOF reached\n");
970 (
float)((((pixel << offset2) >>
offset) & 0xfff) | oldPixel) / 4095.0f;
981 unsigned int numSamples = logImage->
width * logImage->
height * logElement.
depth;
982 unsigned int sampleIndex;
983 unsigned short pixel;
988 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
993 for (sampleIndex = 0; sampleIndex < numSamples; sampleIndex++) {
996 printf(
"DPX/Cineon: EOF reached\n");
1001 data[sampleIndex] = (
float)pixel / 65535.0f;
1013 float scaleY, scaleCbCr;
1017 scaleY = 1.0f / (refHighData - refLowData);
1018 scaleCbCr = scaleY * ((940.0f - 64.0f) / (960.0f - 64.0f));
1022 matrix[0] = 1.0f * scaleY;
1023 matrix[1] = 1.0f * scaleCbCr;
1024 matrix[2] = 1.0f * scaleCbCr;
1025 matrix[3] = 1.0f * scaleY;
1026 matrix[4] = 1.0f * scaleCbCr;
1027 matrix[5] = 1.0f * scaleCbCr;
1028 matrix[6] = 1.0f * scaleY;
1029 matrix[7] = 1.0f * scaleCbCr;
1030 matrix[8] = 1.0f * scaleCbCr;
1034 matrix[0] = 1.0000f * scaleY;
1035 matrix[1] = 0.0000f * scaleCbCr;
1036 matrix[2] = 1.5756f * scaleCbCr;
1037 matrix[3] = 1.0000f * scaleY;
1038 matrix[4] = -0.2253f * scaleCbCr;
1039 matrix[5] = -0.5000f * scaleCbCr;
1040 matrix[6] = 1.0000f * scaleY;
1041 matrix[7] = 1.8270f * scaleCbCr;
1042 matrix[8] = 0.0000f * scaleCbCr;
1046 matrix[0] = 1.000000f * scaleY;
1047 matrix[1] = 0.000000f * scaleCbCr;
1048 matrix[2] = 1.574800f * scaleCbCr;
1049 matrix[3] = 1.000000f * scaleY;
1050 matrix[4] = -0.187324f * scaleCbCr;
1051 matrix[5] = -0.468124f * scaleCbCr;
1052 matrix[6] = 1.000000f * scaleY;
1053 matrix[7] = 1.855600f * scaleCbCr;
1054 matrix[8] = 0.000000f * scaleCbCr;
1059 matrix[0] = 1.000000f * scaleY;
1060 matrix[1] = 0.000000f * scaleCbCr;
1061 matrix[2] = 1.402000f * scaleCbCr;
1062 matrix[3] = 1.000000f * scaleY;
1063 matrix[4] = -0.344136f * scaleCbCr;
1064 matrix[5] = -0.714136f * scaleCbCr;
1065 matrix[6] = 1.000000f * scaleY;
1066 matrix[7] = 1.772000f * scaleCbCr;
1067 matrix[8] = 0.000000f * scaleCbCr;
1078 float gain, negativeFilmGamma,
offset, step;
1079 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1082 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLinToLogLut");
1084 negativeFilmGamma = 0.6;
1089 negativeFilmGamma * logImage->
gamma / 1.7f));
1092 for (i = 0; i < lutsize; i++) {
1095 (step / negativeFilmGamma)) /
1105 float breakPoint, gain, kneeGain, kneeOffset, negativeFilmGamma,
offset, step, softClip;
1107 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1110 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLogToLinLut");
1114 negativeFilmGamma = 0.6;
1124 negativeFilmGamma * logImage->
gamma / 1.7f));
1126 kneeOffset =
powf(10,
1127 (breakPoint - logImage->
referenceWhite) * step / negativeFilmGamma *
1128 logImage->
gamma / 1.7f) *
1131 kneeGain = (logElement.
maxValue - kneeOffset) /
powf(5 * softClip, softClip / 100);
1133 for (i = 0; i < lutsize; i++) {
1134 if (i < logImage->referenceBlack) {
1137 else if (i > breakPoint) {
1138 lut[i] = (
powf(i - breakPoint, softClip / 100) * kneeGain + kneeOffset) /
1143 ((
float)i - logImage->
referenceWhite) * step / negativeFilmGamma *
1144 logImage->
gamma / 1.7f) *
1157 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1160 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLogToLinLut");
1162 for (i = 0; i < lutsize; i++) {
1164 if (
col < 0.0031308f) {
1165 lut[i] = (
col < 0.0f) ? 0.0f :
col * 12.92f;
1168 lut[i] = 1.055f *
powf(
col, 1.0f / 2.4f) - 0.055f;
1178 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1181 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLogToLinLut");
1183 for (i = 0; i < lutsize; i++) {
1185 if (
col < 0.04045f) {
1186 lut[i] = (
col < 0.0f) ? 0.0f :
col * (1.0f / 12.92f);
1189 lut[i] =
powf((
col + 0.055f) * (1.0f / 1.055f), 2.4f);
1200 int elementIsSource)
1203 float *src_ptr =
src;
1204 float *dst_ptr = dst;
1211 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1212 *(dst_ptr++) = *(src_ptr++);
1213 *(dst_ptr++) = *(src_ptr++);
1214 *(dst_ptr++) = *(src_ptr++);
1224 if (elementIsSource == 1) {
1231 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1245 printf(
"DPX/Cineon: Unknown transfer %d.\n", logElement.
transfer);
1255 int elementIsSource)
1258 float *src_ptr =
src;
1259 float *dst_ptr = dst;
1266 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1267 *(dst_ptr++) = *(src_ptr++);
1268 *(dst_ptr++) = *(src_ptr++);
1269 *(dst_ptr++) = *(src_ptr++);
1270 *(dst_ptr++) = 1.0f;
1279 if (elementIsSource == 1) {
1286 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1290 *(dst_ptr++) = 1.0f;
1300 printf(
"DPX/Cineon: Unknown transfer %d.\n", logElement.
transfer);
1310 int elementIsSource)
1313 float *src_ptr =
src;
1314 float *dst_ptr = dst;
1320 memcpy(dst,
src, 4 * (
size_t)logImage->
width * (
size_t)logImage->
height *
sizeof(
float));
1327 if (elementIsSource == 1) {
1334 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1338 *(dst_ptr++) = *(src_ptr++);
1355 int elementIsSource)
1358 float *src_ptr =
src;
1359 float *dst_ptr = dst;
1365 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1367 *(dst_ptr++) = *(src_ptr--);
1368 *(dst_ptr++) = *(src_ptr--);
1369 *(dst_ptr++) = *(src_ptr--);
1370 *(dst_ptr++) = *(src_ptr--);
1379 if (elementIsSource == 1) {
1386 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1391 *(dst_ptr++) = *(src_ptr--);
1411 float conversionMatrix[9], refLowData,
y, cb, cr;
1412 float *src_ptr =
src;
1413 float *dst_ptr = dst;
1421 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1422 cb = *(src_ptr++) - 0.5f;
1423 y = *(src_ptr++) - refLowData;
1424 cr = *(src_ptr++) - 0.5f;
1427 y * conversionMatrix[0] + cb * conversionMatrix[1] + cr * conversionMatrix[2], 0.0f, 1.0f);
1429 y * conversionMatrix[3] + cb * conversionMatrix[4] + cr * conversionMatrix[5], 0.0f, 1.0f);
1431 y * conversionMatrix[6] + cb * conversionMatrix[7] + cr * conversionMatrix[8], 0.0f, 1.0f);
1432 *(dst_ptr++) = 1.0f;
1443 float conversionMatrix[9], refLowData,
y, cb, cr,
a;
1444 float *src_ptr =
src;
1445 float *dst_ptr = dst;
1453 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1454 cb = *(src_ptr++) - 0.5f;
1455 y = *(src_ptr++) - refLowData;
1456 cr = *(src_ptr++) - 0.5f;
1460 y * conversionMatrix[0] + cb * conversionMatrix[1] + cr * conversionMatrix[2], 0.0f, 1.0f);
1462 y * conversionMatrix[3] + cb * conversionMatrix[4] + cr * conversionMatrix[5], 0.0f, 1.0f);
1464 y * conversionMatrix[6] + cb * conversionMatrix[7] + cr * conversionMatrix[8], 0.0f, 1.0f);
1476 float conversionMatrix[9], refLowData,
y1, y2, cb, cr;
1477 float *src_ptr =
src;
1478 float *dst_ptr = dst;
1486 for (i = 0; i < logImage->
width * logImage->
height / 2; i++) {
1487 cb = *(src_ptr++) - 0.5f;
1488 y1 = *(src_ptr++) - refLowData;
1489 cr = *(src_ptr++) - 0.5f;
1490 y2 = *(src_ptr++) - refLowData;
1492 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[0] + cb * conversionMatrix[1] +
1493 cr * conversionMatrix[2],
1496 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[3] + cb * conversionMatrix[4] +
1497 cr * conversionMatrix[5],
1500 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[6] + cb * conversionMatrix[7] +
1501 cr * conversionMatrix[8],
1504 *(dst_ptr++) = 1.0f;
1505 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[0] + cb * conversionMatrix[1] +
1506 cr * conversionMatrix[2],
1509 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[3] + cb * conversionMatrix[4] +
1510 cr * conversionMatrix[5],
1513 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[6] + cb * conversionMatrix[7] +
1514 cr * conversionMatrix[8],
1517 *(dst_ptr++) = 1.0f;
1528 float conversionMatrix[9], refLowData,
y1, y2, cb, cr, a1, a2;
1529 float *src_ptr =
src;
1530 float *dst_ptr = dst;
1538 for (i = 0; i < logImage->
width * logImage->
height / 2; i++) {
1539 cb = *(src_ptr++) - 0.5f;
1540 y1 = *(src_ptr++) - refLowData;
1542 cr = *(src_ptr++) - 0.5f;
1543 y2 = *(src_ptr++) - refLowData;
1546 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[0] + cb * conversionMatrix[1] +
1547 cr * conversionMatrix[2],
1550 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[3] + cb * conversionMatrix[4] +
1551 cr * conversionMatrix[5],
1554 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[6] + cb * conversionMatrix[7] +
1555 cr * conversionMatrix[8],
1559 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[0] + cb * conversionMatrix[1] +
1560 cr * conversionMatrix[2],
1563 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[3] + cb * conversionMatrix[4] +
1564 cr * conversionMatrix[5],
1567 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[6] + cb * conversionMatrix[7] +
1568 cr * conversionMatrix[8],
1582 float conversionMatrix[9], value, refLowData;
1583 float *src_ptr =
src;
1584 float *dst_ptr = dst;
1592 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1593 value =
clamp_float((*(src_ptr++) - refLowData) * conversionMatrix[0], 0.0f, 1.0f);
1594 *(dst_ptr++) = value;
1595 *(dst_ptr++) = value;
1596 *(dst_ptr++) = value;
1597 *(dst_ptr++) = 1.0f;
1608 float conversionMatrix[9], value, refLowData;
1609 float *src_ptr =
src;
1610 float *dst_ptr = dst;
1618 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1619 value =
clamp_float((*(src_ptr++) - refLowData) * conversionMatrix[0], 0.0f, 1.0f);
1620 *(dst_ptr++) = value;
1621 *(dst_ptr++) = value;
1622 *(dst_ptr++) = value;
1623 *(dst_ptr++) = *(src_ptr++);
1681 if (dstIsLinearRGB) {
1686 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1705 float *src_ptr =
src;
1708 if (srcIsLinearRGB != 0) {
1711 logImage->
width, logImage->
height, 4,
sizeof(
float), __func__);
1712 if (srgbSrc ==
NULL) {
1716 memcpy(srgbSrc,
src, 4 * (
size_t)logImage->
width * (
size_t)logImage->
height *
sizeof(
float));
1717 srgbSrc_ptr = srgbSrc;
1721 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1757 if (srcIsLinearRGB != 0) {
typedef float(TangentPoint)[2]
File and directory operations.
FILE * BLI_fopen(const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
void * imb_alloc_pixels(unsigned int x, unsigned int y, unsigned int channels, size_t typesize, const char *name)
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void cineonSetVerbose(int verbosity)
LogImageFile * cineonCreate(const char *filepath, int width, int height, int bitsPerSample, const char *creator)
LogImageFile * cineonOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize)
#define CINEON_FILE_MAGIC
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
void dpxSetVerbose(int verbosity)
LogImageFile * dpxCreate(const char *filepath, int width, int height, int bitsPerSample, int hasAlpha, int isLogarithmic, int referenceWhite, int referenceBlack, float gamma, const char *creator)
LogImageFile * dpxOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize)
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
static int logImageElementGetData10Packed(LogImageFile *logImage, LogImageElement logElement, float *data)
static int convertRGBA_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
static float * getLinToLogLut(LogImageFile *logImage, LogImageElement logElement)
static int logImageElementGetData10(LogImageFile *logImage, LogImageElement logElement, float *data)
static int convertABGR_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
static int logImageElementGetData12Packed(LogImageFile *logImage, LogImageElement logElement, float *data)
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)
static int logImageSetData12(LogImageFile *logImage, LogImageElement logElement, float *data)
static int convertRGBAToLogElement(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int srcIsLinearRGB)
static float * getLinToSrgbLut(LogImageElement logElement)
static int logImageSetData16(LogImageFile *logImage, LogImageElement logElement, float *data)
void logImageSetVerbose(int verbosity)
static int logImageElementGetData1(LogImageFile *logImage, LogImageElement logElement, float *data)
int logImageIsCineon(const void *buffer, const unsigned int size)
static float * getSrgbToLinLut(LogImageElement logElement)
static int convertLogElementToRGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int dstIsLinearRGB)
static int convertCbYCrA_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
static int convertRGB_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
static int convertRGBA_RGB(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement, int elementIsSource)
LogImageFile * logImageOpenFromMemory(const unsigned char *buffer, unsigned int size)
LogImageFile * logImageOpenFromFile(const char *filepath, int cineon)
static int logImageElementGetData(LogImageFile *logImage, LogImageElement logElement, float *data)
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 logImageSetData10(LogImageFile *logImage, LogImageElement logElement, float *data)
static float * getLogToLinLut(LogImageFile *logImage, LogImageElement logElement)
void logImageClose(LogImageFile *logImage)
static int convertCbYCrY_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
static int logImageElementGetData16(LogImageFile *logImage, LogImageElement logElement, float *data)
int logImageIsDpx(const void *buffer, const unsigned int size)
static int logImageElementGetData12(LogImageFile *logImage, LogImageElement logElement, float *data)
size_t getRowLength(size_t width, LogImageElement logElement)
static int logImageSetData8(LogImageFile *logImage, LogImageElement logElement, float *data)
void logImageGetSize(LogImageFile *logImage, int *width, int *height, int *depth)
int logImageSetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB)
int logImageGetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB)
static int convertYA_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
static int convertCbYCr_RGBA(float *src, float *dst, LogImageFile *logImage, LogImageElement logElement)
static int logImageElementGetData8(LogImageFile *logImage, LogImageElement logElement, float *data)
static int getYUVtoRGBMatrix(float *matrix, LogImageElement logElement)
BLI_INLINE float clamp_float(float x, float low, float high)
@ transfer_PrintingDensity
BLI_INLINE unsigned short swap_ushort(unsigned short x, int swap)
BLI_INLINE unsigned int swap_uint(unsigned int x, int swap)
BLI_INLINE unsigned int float_uint(float value, unsigned int max)
int logimage_read_ushort(unsigned short *x, LogImageFile *logFile)
int logimage_read_uchar(unsigned char *x, LogImageFile *logFile)
int logimage_fseek(LogImageFile *logFile, intptr_t offset, int origin)
int logimage_read_uint(unsigned int *x, LogImageFile *logFile)
int logimage_fwrite(void *buffer, size_t size, unsigned int count, LogImageFile *logFile)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
LogImageElement element[8]