Style cleanup in OCIO area
Also fixed typo in function name.
This commit is contained in:
@@ -331,7 +331,7 @@ void FallbackImpl::displayTransformRelease(OCIO_DisplayTransformRcPtr *)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OCIO_PackedImageDesc *FallbackImpl::createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
OCIO_PackedImageDesc *FallbackImpl::createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
||||||
long chanStrideBytes, long xStrideBytes, long yStrideBytes)
|
long chanStrideBytes, long xStrideBytes, long yStrideBytes)
|
||||||
{
|
{
|
||||||
OCIO_PackedImageDescription *desc = (OCIO_PackedImageDescription*)MEM_callocN(sizeof(OCIO_PackedImageDescription), "OCIO_PackedImageDescription");
|
OCIO_PackedImageDescription *desc = (OCIO_PackedImageDescription*)MEM_callocN(sizeof(OCIO_PackedImageDescription), "OCIO_PackedImageDescription");
|
||||||
|
|
||||||
|
@@ -238,12 +238,12 @@ void OCIO_displayTransformRelease(OCIO_DisplayTransformRcPtr *dt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OCIO_PackedImageDesc *OCIO_createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
OCIO_PackedImageDesc *OCIO_createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
||||||
long chanStrideBytes, long xStrideBytes, long yStrideBytes)
|
long chanStrideBytes, long xStrideBytes, long yStrideBytes)
|
||||||
{
|
{
|
||||||
return impl->createOCIO_PackedImageDesc(data, width, height, numChannels, chanStrideBytes, xStrideBytes, yStrideBytes);
|
return impl->createOCIO_PackedImageDesc(data, width, height, numChannels, chanStrideBytes, xStrideBytes, yStrideBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OCIO_OCIO_PackedImageDescRelease(OCIO_PackedImageDesc* id)
|
void OCIO_PackedImageDescRelease(OCIO_PackedImageDesc* id)
|
||||||
{
|
{
|
||||||
impl->OCIO_PackedImageDescRelease(id);
|
impl->OCIO_PackedImageDescRelease(id);
|
||||||
}
|
}
|
||||||
|
@@ -105,9 +105,9 @@ void OCIO_displayTransformSetLinearCC(OCIO_DisplayTransformRcPtr *dt, OCIO_Const
|
|||||||
void OCIO_displayTransformRelease(OCIO_DisplayTransformRcPtr *dt);
|
void OCIO_displayTransformRelease(OCIO_DisplayTransformRcPtr *dt);
|
||||||
|
|
||||||
OCIO_PackedImageDesc *OCIO_createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
OCIO_PackedImageDesc *OCIO_createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
||||||
long chanStrideBytes, long xStrideBytes, long yStrideBytes);
|
long chanStrideBytes, long xStrideBytes, long yStrideBytes);
|
||||||
|
|
||||||
void OCIO_OCIO_PackedImageDescRelease(OCIO_PackedImageDesc *p);
|
void OCIO_PackedImageDescRelease(OCIO_PackedImageDesc *p);
|
||||||
|
|
||||||
OCIO_ExponentTransformRcPtr *OCIO_createExponentTransform(void);
|
OCIO_ExponentTransformRcPtr *OCIO_createExponentTransform(void);
|
||||||
void OCIO_exponentTransformSetValue(OCIO_ExponentTransformRcPtr *et, const float *exponent);
|
void OCIO_exponentTransformSetValue(OCIO_ExponentTransformRcPtr *et, const float *exponent);
|
||||||
|
@@ -479,7 +479,7 @@ void OCIOImpl::displayTransformRelease(OCIO_DisplayTransformRcPtr *dt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
OCIO_PackedImageDesc *OCIOImpl::createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
OCIO_PackedImageDesc *OCIOImpl::createOCIO_PackedImageDesc(float *data, long width, long height, long numChannels,
|
||||||
long chanStrideBytes, long xStrideBytes, long yStrideBytes)
|
long chanStrideBytes, long xStrideBytes, long yStrideBytes)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
void *mem = MEM_mallocN(sizeof(PackedImageDesc), __func__);
|
void *mem = MEM_mallocN(sizeof(PackedImageDesc), __func__);
|
||||||
|
@@ -351,9 +351,9 @@ static unsigned char *colormanage_cache_get(ImBuf *ibuf, const ColormanageCacheV
|
|||||||
|
|
||||||
if (cache_data->exposure != view_settings->exposure ||
|
if (cache_data->exposure != view_settings->exposure ||
|
||||||
cache_data->gamma != view_settings->gamma ||
|
cache_data->gamma != view_settings->gamma ||
|
||||||
cache_data->flag != view_settings->flag ||
|
cache_data->flag != view_settings->flag ||
|
||||||
cache_data->curve_mapping != curve_mapping ||
|
cache_data->curve_mapping != curve_mapping ||
|
||||||
cache_data->curve_mapping_timestamp != curve_mapping_timestamp)
|
cache_data->curve_mapping_timestamp != curve_mapping_timestamp)
|
||||||
{
|
{
|
||||||
*cache_handle = NULL;
|
*cache_handle = NULL;
|
||||||
|
|
||||||
@@ -681,7 +681,7 @@ static ColorSpace *display_transform_get_colorspace(const ColorManagedViewSettin
|
|||||||
}
|
}
|
||||||
|
|
||||||
static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *view_transform, const char *display,
|
static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *view_transform, const char *display,
|
||||||
float exposure, float gamma)
|
float exposure, float gamma)
|
||||||
{
|
{
|
||||||
OCIO_ConstConfigRcPtr *config = OCIO_getCurrentConfig();
|
OCIO_ConstConfigRcPtr *config = OCIO_getCurrentConfig();
|
||||||
OCIO_DisplayTransformRcPtr *dt;
|
OCIO_DisplayTransformRcPtr *dt;
|
||||||
@@ -731,7 +731,7 @@ static OCIO_ConstProcessorRcPtr *create_display_buffer_processor(const char *vie
|
|||||||
}
|
}
|
||||||
|
|
||||||
static OCIO_ConstProcessorRcPtr *create_colorspace_transform_processor(const char *from_colorspace,
|
static OCIO_ConstProcessorRcPtr *create_colorspace_transform_processor(const char *from_colorspace,
|
||||||
const char *to_colorspace)
|
const char *to_colorspace)
|
||||||
{
|
{
|
||||||
OCIO_ConstConfigRcPtr *config = OCIO_getCurrentConfig();
|
OCIO_ConstConfigRcPtr *config = OCIO_getCurrentConfig();
|
||||||
OCIO_ConstProcessorRcPtr *processor;
|
OCIO_ConstProcessorRcPtr *processor;
|
||||||
@@ -1591,14 +1591,14 @@ void IMB_colormanagement_colorspace_to_scene_linear(float *buffer, int width, in
|
|||||||
OCIO_PackedImageDesc *img;
|
OCIO_PackedImageDesc *img;
|
||||||
|
|
||||||
img = OCIO_createOCIO_PackedImageDesc(buffer, width, height, channels, sizeof(float),
|
img = OCIO_createOCIO_PackedImageDesc(buffer, width, height, channels, sizeof(float),
|
||||||
channels * sizeof(float), channels * sizeof(float) * width);
|
channels * sizeof(float), channels * sizeof(float) * width);
|
||||||
|
|
||||||
if (predivide)
|
if (predivide)
|
||||||
OCIO_processorApply_predivide(processor, img);
|
OCIO_processorApply_predivide(processor, img);
|
||||||
else
|
else
|
||||||
OCIO_processorApply(processor, img);
|
OCIO_processorApply(processor, img);
|
||||||
|
|
||||||
OCIO_OCIO_PackedImageDescRelease(img);
|
OCIO_PackedImageDescRelease(img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2538,14 +2538,14 @@ void IMB_colormanagement_processor_apply(ColormanageProcessor *cm_processor, flo
|
|||||||
|
|
||||||
/* apply OCIO processor */
|
/* apply OCIO processor */
|
||||||
img = OCIO_createOCIO_PackedImageDesc(buffer, width, height, channels, sizeof(float),
|
img = OCIO_createOCIO_PackedImageDesc(buffer, width, height, channels, sizeof(float),
|
||||||
channels * sizeof(float), channels * sizeof(float) * width);
|
channels * sizeof(float), channels * sizeof(float) * width);
|
||||||
|
|
||||||
if (predivide)
|
if (predivide)
|
||||||
OCIO_processorApply_predivide(cm_processor->processor, img);
|
OCIO_processorApply_predivide(cm_processor->processor, img);
|
||||||
else
|
else
|
||||||
OCIO_processorApply(cm_processor->processor, img);
|
OCIO_processorApply(cm_processor->processor, img);
|
||||||
|
|
||||||
OCIO_OCIO_PackedImageDescRelease(img);
|
OCIO_PackedImageDescRelease(img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user