Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-15 11:47:38 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-15 11:47:38 +0400
commitabff7cac7e0c682bba013036418cc3ea384d74de (patch)
tree8155b73da938e3e32e3a8251dc5f4d88a0e44829 /source/blender/blenkernel/intern/colortools.c
parent27564ed24a8d87a969d66161c487dde2ea9f578b (diff)
Color Management: remove unused function and get rid of unneeded float->byte conversion
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r--source/blender/blenkernel/intern/colortools.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 1bd5786debd..d5d6d31b1e1 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -835,64 +835,6 @@ void curvemapping_evaluate_premulRGB(const CurveMapping *cumap, unsigned char ve
vecout_byte[2] = FTOCHAR(vecout[2]);
}
-
-/* only used for image editor curves */
-void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf)
-{
- ImBuf *tmpbuf;
- int pixel;
- float *pix_in;
- float col[3];
- int stride = 4;
- float *pix_out;
-
- if (ibuf == NULL)
- return;
- if (ibuf->rect_float == NULL)
- IMB_float_from_rect(ibuf);
- else if (ibuf->rect == NULL)
- imb_addrectImBuf(ibuf);
-
- if (!ibuf->rect || !ibuf->rect_float)
- return;
-
- /* work on a temp buffer, so can color manage afterwards.
- * No worse off memory wise than comp nodes */
- tmpbuf = IMB_dupImBuf(ibuf);
-
- curvemapping_premultiply(cumap, 0);
-
- pix_in = ibuf->rect_float;
- pix_out = tmpbuf->rect_float;
-
- if (ibuf->channels)
- stride = ibuf->channels;
-
- for (pixel = ibuf->x * ibuf->y; pixel > 0; pixel--, pix_in += stride, pix_out += stride) {
- if (stride < 3) {
- col[0] = curvemap_evaluateF(cumap->cm, *pix_in);
-
- pix_out[1] = pix_out[2] = pix_out[3] = pix_out[0] = col[0];
- }
- else {
- curvemapping_evaluate_premulRGBF(cumap, col, pix_in);
- pix_out[0] = col[0];
- pix_out[1] = col[1];
- pix_out[2] = col[2];
- if (stride > 3)
- pix_out[3] = pix_in[3];
- else
- pix_out[3] = 1.f;
- }
- }
-
- IMB_rect_from_float(tmpbuf);
- SWAP(unsigned int *, tmpbuf->rect, ibuf->rect);
- IMB_freeImBuf(tmpbuf);
-
- curvemapping_premultiply(cumap, 1);
-}
-
int curvemapping_RGBA_does_something(const CurveMapping *cumap)
{
int a;