101 unsigned int magicNum;
102 if (
size <
sizeof(magicNum)) {
105 magicNum = *(
unsigned int *)
buffer;
111 unsigned int magicNum;
112 if (
size <
sizeof(magicNum)) {
115 magicNum = *(
unsigned int *)
buffer;
121 unsigned int magicNum;
130 if (fread(&magicNum,
sizeof(magicNum), 1, f) != 1) {
138 return dpxOpen((
const unsigned char *)filename, 0, 0);
141 return cineonOpen((
const unsigned char *)filename, 0, 0);
192 if (logImage !=
NULL) {
193 if (logImage->
file) {
194 fclose(logImage->
file);
205 *depth = logImage->
depth;
217 return ((
width * logElement.
depth - 1) / 32 + 1) * 4;
220 return ((
width * logElement.
depth - 1) / 4 + 1) * 4;
224 return ((
width * logElement.
depth * 10 - 1) / 32 + 1) * 4;
227 return ((
width * logElement.
depth - 1) / 3 + 1) * 4;
232 return ((
width * logElement.
depth * 12 - 1) / 32 + 1) * 4;
254 logImage->
width, logImage->
height, logImage->
depth,
sizeof(
float), __func__);
255 if (elementData ==
NULL) {
260 data, elementData, logImage, logImage->
element[0], dataIsLinearRGB) != 0) {
296 row = (
unsigned char *)
MEM_mallocN(rowLength, __func__);
299 printf(
"DPX/Cineon: Cannot allocate row.\n");
303 memset(row, 0, rowLength);
305 for (
size_t y = 0;
y < logImage->
height;
y++) {
306 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
312 printf(
"DPX/Cineon: Error while writing file.\n");
325 unsigned int pixel, index;
328 row = (
unsigned int *)
MEM_mallocN(rowLength, __func__);
331 printf(
"DPX/Cineon: Cannot allocate row.\n");
336 for (
size_t y = 0;
y < logImage->
height;
y++) {
341 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
358 printf(
"DPX/Cineon: Error while writing file.\n");
373 row = (
unsigned short *)
MEM_mallocN(rowLength, __func__);
376 printf(
"DPX/Cineon: Cannot allocate row.\n");
381 for (
size_t y = 0;
y < logImage->
height;
y++) {
382 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
390 printf(
"DPX/Cineon: Error while writing file.\n");
405 row = (
unsigned short *)
MEM_mallocN(rowLength, __func__);
408 printf(
"DPX/Cineon: Cannot allocate row.\n");
413 for (
size_t y = 0;
y < logImage->
height;
y++) {
414 for (
size_t x = 0;
x < logImage->
width * logImage->
depth;
x++) {
422 printf(
"DPX/Cineon: Error while writing file.\n");
439 int i, j, returnValue, sortedElementData[8], hasAlpha;
440 float *elementData[8];
441 float *elementData_ptr[8];
443 unsigned int sampleIndex;
448 memset(&elementData, 0, 8 *
sizeof(
float *));
457 if (elementData[i] ==
NULL) {
459 printf(
"DPX/Cineon: Cannot allocate memory for elementData[%d]\n.", i);
461 for (j = 0; j < i; j++) {
462 if (elementData[j] !=
NULL) {
468 elementData_ptr[i] = elementData[i];
473 printf(
"DPX/Cineon: Cannot read elementData[%d]\n.", i);
475 for (j = 0; j < i; j++) {
476 if (elementData[j] !=
NULL) {
492 elementData[0],
data, logImage, logImage->
element[0], dataIsLinearRGB);
503 memset(&sortedElementData, -1,
sizeof(
int[8]));
517 sortedElementData[0] = i;
528 sortedElementData[1] = i;
539 sortedElementData[2] = i;
544 sortedElementData[mergedElement.
depth - 1] = i;
557 if (mergedElement.
depth == 2) {
560 else if (mergedElement.
depth == 3) {
568 else if (mergedElement.
depth == 4) {
574 if (mergedElement.
depth == 1 || (mergedElement.
depth == 2 && hasAlpha == 1)) {
575 sortedElementData[0] = i;
578 sortedElementData[1] = i;
587 if (mergedElement.
depth == 2) {
590 else if (mergedElement.
depth == 3) {
598 else if (mergedElement.
depth == 4) {
604 if (sortedElementData[0] == -1) {
605 sortedElementData[0] = i;
608 sortedElementData[2] = i;
620 sortedElementData[0] = i;
630 sortedElementData[0] = i;
641 logImage->
width, logImage->
height, mergedElement.
depth,
sizeof(
float), __func__);
642 if (mergedData ==
NULL) {
644 printf(
"DPX/Cineon: Cannot allocate mergedData.\n");
647 if (elementData[i] !=
NULL) {
655 while (sampleIndex < logImage->
width * logImage->
height * mergedElement.
depth) {
657 for (j = 0; j < logImage->
element[sortedElementData[i]].
depth; j++) {
658 mergedData[sampleIndex++] = *(elementData_ptr[sortedElementData[i]]++);
665 if (elementData[i] !=
NULL) {
671 mergedData,
data, logImage, mergedElement, dataIsLinearRGB);
718 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
724 for (
size_t y = 0;
y < logImage->
height;
y++) {
725 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x += 32) {
728 printf(
"DPX/Cineon: EOF reached\n");
733 for (
int offset = 0; offset < 32 &&
x + offset < logImage->
width; offset++) {
748 for (
size_t y = 0;
y < logImage->
height;
y++) {
752 printf(
"DPX/Cineon: Couldn't seek at %d\n", (
int)(logElement.
dataOffset +
y * rowLength));
757 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
760 printf(
"DPX/Cineon: EOF reached\n");
779 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
785 for (
size_t y = 0;
y < logImage->
height;
y++) {
787 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
793 else if (logElement.
packing == 2) {
799 printf(
"DPX/Cineon: EOF reached\n");
812 for (
size_t y = 0;
y < logImage->
height;
y++) {
814 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
820 else if (logElement.
packing == 2) {
826 printf(
"DPX/Cineon: EOF reached\n");
847 unsigned int pixel, oldPixel;
850 for (
size_t y = 0;
y < logImage->
height;
y++) {
854 printf(
"DPX/Cineon: Couldn't seek at %u\n",
855 (
unsigned int)(
y * rowLength + logElement.
dataOffset));
864 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
866 offset = 10 - offset2;
870 else if (offset == 32) {
873 else if (offset + 10 > 32) {
875 oldPixel = (pixel >> offset);
876 offset2 = 32 - offset;
884 printf(
"DPX/Cineon: EOF reached\n");
891 (
float)((((pixel << offset2) >> offset) & 0x3ff) | oldPixel) / 1023.0f;
902 unsigned int sampleIndex;
903 unsigned int numSamples = logImage->
width * logImage->
height * logElement.
depth;
904 unsigned short pixel;
909 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
917 for (sampleIndex = 0; sampleIndex < numSamples; sampleIndex++) {
920 printf(
"DPX/Cineon: EOF reached\n");
927 data[sampleIndex] = (
float)(pixel >> 4) / 4095.0f;
929 else if (logElement.
packing == 2) {
930 data[sampleIndex] = (
float)pixel / 4095.0f;
941 unsigned int pixel, oldPixel;
944 for (
size_t y = 0;
y < logImage->
height;
y++) {
948 printf(
"DPX/Cineon: Couldn't seek at %u\n",
949 (
unsigned int)(
y * rowLength + logElement.
dataOffset));
958 for (
size_t x = 0;
x < logImage->
width * logElement.
depth;
x++) {
960 offset = 12 - offset2;
964 else if (offset == 32) {
967 else if (offset + 12 > 32) {
969 oldPixel = (pixel >> offset);
970 offset2 = 32 - offset;
978 printf(
"DPX/Cineon: EOF reached\n");
985 (
float)((((pixel << offset2) >> offset) & 0xfff) | oldPixel) / 4095.0f;
996 unsigned int numSamples = logImage->
width * logImage->
height * logElement.
depth;
997 unsigned int sampleIndex;
998 unsigned short pixel;
1003 printf(
"DPX/Cineon: Couldn't seek at %d\n", logElement.
dataOffset);
1008 for (sampleIndex = 0; sampleIndex < numSamples; sampleIndex++) {
1011 printf(
"DPX/Cineon: EOF reached\n");
1016 data[sampleIndex] = (
float)pixel / 65535.0f;
1028 float scaleY, scaleCbCr;
1032 scaleY = 1.0f / (refHighData - refLowData);
1033 scaleCbCr = scaleY * ((940.0f - 64.0f) / (960.0f - 64.0f));
1037 matrix[0] = 1.0f * scaleY;
1038 matrix[1] = 1.0f * scaleCbCr;
1039 matrix[2] = 1.0f * scaleCbCr;
1040 matrix[3] = 1.0f * scaleY;
1041 matrix[4] = 1.0f * scaleCbCr;
1042 matrix[5] = 1.0f * scaleCbCr;
1043 matrix[6] = 1.0f * scaleY;
1044 matrix[7] = 1.0f * scaleCbCr;
1045 matrix[8] = 1.0f * scaleCbCr;
1049 matrix[0] = 1.0000f * scaleY;
1050 matrix[1] = 0.0000f * scaleCbCr;
1051 matrix[2] = 1.5756f * scaleCbCr;
1052 matrix[3] = 1.0000f * scaleY;
1053 matrix[4] = -0.2253f * scaleCbCr;
1054 matrix[5] = -0.5000f * scaleCbCr;
1055 matrix[6] = 1.0000f * scaleY;
1056 matrix[7] = 1.8270f * scaleCbCr;
1057 matrix[8] = 0.0000f * scaleCbCr;
1061 matrix[0] = 1.000000f * scaleY;
1062 matrix[1] = 0.000000f * scaleCbCr;
1063 matrix[2] = 1.574800f * scaleCbCr;
1064 matrix[3] = 1.000000f * scaleY;
1065 matrix[4] = -0.187324f * scaleCbCr;
1066 matrix[5] = -0.468124f * scaleCbCr;
1067 matrix[6] = 1.000000f * scaleY;
1068 matrix[7] = 1.855600f * scaleCbCr;
1069 matrix[8] = 0.000000f * scaleCbCr;
1074 matrix[0] = 1.000000f * scaleY;
1075 matrix[1] = 0.000000f * scaleCbCr;
1076 matrix[2] = 1.402000f * scaleCbCr;
1077 matrix[3] = 1.000000f * scaleY;
1078 matrix[4] = -0.344136f * scaleCbCr;
1079 matrix[5] = -0.714136f * scaleCbCr;
1080 matrix[6] = 1.000000f * scaleY;
1081 matrix[7] = 1.772000f * scaleCbCr;
1082 matrix[8] = 0.000000f * scaleCbCr;
1093 float gain, negativeFilmGamma, offset, step;
1094 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1097 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLinToLogLut");
1099 negativeFilmGamma = 0.6;
1104 negativeFilmGamma * logImage->
gamma / 1.7f));
1105 offset = gain - logElement.
maxValue;
1107 for (i = 0; i < lutsize; i++) {
1109 log10f(
powf((i + offset) / gain, 1.7f / logImage->
gamma)) /
1110 (step / negativeFilmGamma)) /
1120 float breakPoint, gain, kneeGain, kneeOffset, negativeFilmGamma, offset, step, softClip;
1122 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1125 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLogToLinLut");
1129 negativeFilmGamma = 0.6;
1139 negativeFilmGamma * logImage->
gamma / 1.7f));
1140 offset = gain - logElement.
maxValue;
1141 kneeOffset =
powf(10,
1142 (breakPoint - logImage->
referenceWhite) * step / negativeFilmGamma *
1143 logImage->
gamma / 1.7f) *
1146 kneeGain = (logElement.
maxValue - kneeOffset) /
powf(5 * softClip, softClip / 100);
1148 for (i = 0; i < lutsize; i++) {
1149 if (i < logImage->referenceBlack) {
1152 else if (i > breakPoint) {
1153 lut[i] = (
powf(i - breakPoint, softClip / 100) * kneeGain + kneeOffset) /
1158 ((
float)i - logImage->
referenceWhite) * step / negativeFilmGamma *
1159 logImage->
gamma / 1.7f) *
1172 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1175 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLogToLinLut");
1177 for (i = 0; i < lutsize; i++) {
1179 if (
col < 0.0031308f) {
1180 lut[i] = (
col < 0.0f) ? 0.0f :
col * 12.92f;
1183 lut[i] = 1.055f *
powf(
col, 1.0f / 2.4f) - 0.055f;
1193 unsigned int lutsize = (
unsigned int)(logElement.
maxValue + 1);
1196 lut =
MEM_mallocN(
sizeof(
float) * lutsize,
"getLogToLinLut");
1198 for (i = 0; i < lutsize; i++) {
1200 if (
col < 0.04045f) {
1201 lut[i] = (
col < 0.0f) ? 0.0f :
col * (1.0f / 12.92f);
1204 lut[i] =
powf((
col + 0.055f) * (1.0f / 1.055f), 2.4f);
1215 int elementIsSource)
1218 float *src_ptr = src;
1219 float *dst_ptr = dst;
1226 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1227 *(dst_ptr++) = *(src_ptr++);
1228 *(dst_ptr++) = *(src_ptr++);
1229 *(dst_ptr++) = *(src_ptr++);
1239 if (elementIsSource == 1) {
1246 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1260 printf(
"DPX/Cineon: Unknown transfer %d.\n", logElement.
transfer);
1270 int elementIsSource)
1273 float *src_ptr = src;
1274 float *dst_ptr = dst;
1281 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1282 *(dst_ptr++) = *(src_ptr++);
1283 *(dst_ptr++) = *(src_ptr++);
1284 *(dst_ptr++) = *(src_ptr++);
1285 *(dst_ptr++) = 1.0f;
1294 if (elementIsSource == 1) {
1301 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1305 *(dst_ptr++) = 1.0f;
1315 printf(
"DPX/Cineon: Unknown transfer %d.\n", logElement.
transfer);
1325 int elementIsSource)
1328 float *src_ptr = src;
1329 float *dst_ptr = dst;
1335 memcpy(dst, src, 4 * (
size_t)logImage->
width * (
size_t)logImage->
height *
sizeof(
float));
1342 if (elementIsSource == 1) {
1349 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1353 *(dst_ptr++) = *(src_ptr++);
1370 int elementIsSource)
1373 float *src_ptr = src;
1374 float *dst_ptr = dst;
1380 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1382 *(dst_ptr++) = *(src_ptr--);
1383 *(dst_ptr++) = *(src_ptr--);
1384 *(dst_ptr++) = *(src_ptr--);
1385 *(dst_ptr++) = *(src_ptr--);
1394 if (elementIsSource == 1) {
1401 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1406 *(dst_ptr++) = *(src_ptr--);
1426 float conversionMatrix[9], refLowData,
y, cb, cr;
1427 float *src_ptr = src;
1428 float *dst_ptr = dst;
1436 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1437 cb = *(src_ptr++) - 0.5f;
1438 y = *(src_ptr++) - refLowData;
1439 cr = *(src_ptr++) - 0.5f;
1442 y * conversionMatrix[0] + cb * conversionMatrix[1] + cr * conversionMatrix[2], 0.0f, 1.0f);
1444 y * conversionMatrix[3] + cb * conversionMatrix[4] + cr * conversionMatrix[5], 0.0f, 1.0f);
1446 y * conversionMatrix[6] + cb * conversionMatrix[7] + cr * conversionMatrix[8], 0.0f, 1.0f);
1447 *(dst_ptr++) = 1.0f;
1458 float conversionMatrix[9], refLowData,
y, cb, cr,
a;
1459 float *src_ptr = src;
1460 float *dst_ptr = dst;
1468 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1469 cb = *(src_ptr++) - 0.5f;
1470 y = *(src_ptr++) - refLowData;
1471 cr = *(src_ptr++) - 0.5f;
1475 y * conversionMatrix[0] + cb * conversionMatrix[1] + cr * conversionMatrix[2], 0.0f, 1.0f);
1477 y * conversionMatrix[3] + cb * conversionMatrix[4] + cr * conversionMatrix[5], 0.0f, 1.0f);
1479 y * conversionMatrix[6] + cb * conversionMatrix[7] + cr * conversionMatrix[8], 0.0f, 1.0f);
1491 float conversionMatrix[9], refLowData,
y1, y2, cb, cr;
1492 float *src_ptr = src;
1493 float *dst_ptr = dst;
1501 for (i = 0; i < logImage->
width * logImage->
height / 2; i++) {
1502 cb = *(src_ptr++) - 0.5f;
1503 y1 = *(src_ptr++) - refLowData;
1504 cr = *(src_ptr++) - 0.5f;
1505 y2 = *(src_ptr++) - refLowData;
1507 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[0] + cb * conversionMatrix[1] +
1508 cr * conversionMatrix[2],
1511 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[3] + cb * conversionMatrix[4] +
1512 cr * conversionMatrix[5],
1515 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[6] + cb * conversionMatrix[7] +
1516 cr * conversionMatrix[8],
1519 *(dst_ptr++) = 1.0f;
1520 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[0] + cb * conversionMatrix[1] +
1521 cr * conversionMatrix[2],
1524 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[3] + cb * conversionMatrix[4] +
1525 cr * conversionMatrix[5],
1528 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[6] + cb * conversionMatrix[7] +
1529 cr * conversionMatrix[8],
1532 *(dst_ptr++) = 1.0f;
1543 float conversionMatrix[9], refLowData,
y1, y2, cb, cr, a1, a2;
1544 float *src_ptr = src;
1545 float *dst_ptr = dst;
1553 for (i = 0; i < logImage->
width * logImage->
height / 2; i++) {
1554 cb = *(src_ptr++) - 0.5f;
1555 y1 = *(src_ptr++) - refLowData;
1557 cr = *(src_ptr++) - 0.5f;
1558 y2 = *(src_ptr++) - refLowData;
1561 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[0] + cb * conversionMatrix[1] +
1562 cr * conversionMatrix[2],
1565 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[3] + cb * conversionMatrix[4] +
1566 cr * conversionMatrix[5],
1569 *(dst_ptr++) =
clamp_float(
y1 * conversionMatrix[6] + cb * conversionMatrix[7] +
1570 cr * conversionMatrix[8],
1574 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[0] + cb * conversionMatrix[1] +
1575 cr * conversionMatrix[2],
1578 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[3] + cb * conversionMatrix[4] +
1579 cr * conversionMatrix[5],
1582 *(dst_ptr++) =
clamp_float(y2 * conversionMatrix[6] + cb * conversionMatrix[7] +
1583 cr * conversionMatrix[8],
1597 float conversionMatrix[9], value, refLowData;
1598 float *src_ptr = src;
1599 float *dst_ptr = dst;
1607 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1608 value =
clamp_float((*(src_ptr++) - refLowData) * conversionMatrix[0], 0.0f, 1.0f);
1609 *(dst_ptr++) = value;
1610 *(dst_ptr++) = value;
1611 *(dst_ptr++) = value;
1612 *(dst_ptr++) = 1.0f;
1623 float conversionMatrix[9], value, refLowData;
1624 float *src_ptr = src;
1625 float *dst_ptr = dst;
1633 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1634 value =
clamp_float((*(src_ptr++) - refLowData) * conversionMatrix[0], 0.0f, 1.0f);
1635 *(dst_ptr++) = value;
1636 *(dst_ptr++) = value;
1637 *(dst_ptr++) = value;
1638 *(dst_ptr++) = *(src_ptr++);
1696 if (dstIsLinearRGB) {
1701 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1720 float *src_ptr = src;
1723 if (srcIsLinearRGB != 0) {
1726 logImage->
width, logImage->
height, 4,
sizeof(
float), __func__);
1727 if (srgbSrc ==
NULL) {
1731 memcpy(srgbSrc, src, 4 * (
size_t)logImage->
width * (
size_t)logImage->
height *
sizeof(
float));
1732 srgbSrc_ptr = srgbSrc;
1736 for (i = 0; i < logImage->
width * logImage->
height; i++) {
1772 if (srcIsLinearRGB != 0) {
typedef float(TangentPoint)[2]
File and directory operations.
FILE * BLI_fopen(const char *filename, 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 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
_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
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 * cineonOpen(const unsigned char *byteStuff, int fromMemory, size_t bufferSize)
LogImageFile * cineonCreate(const char *filename, int width, int height, int bitsPerSample, const char *creator)
#define CINEON_FILE_MAGIC
void dpxSetVerbose(int verbosity)
LogImageFile * dpxCreate(const char *filename, 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)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
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)
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)
static int logImageElementGetData12Packed(LogImageFile *logImage, LogImageElement logElement, float *data)
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)
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)
LogImageFile * logImageOpenFromFile(const char *filename, int cineon)
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]