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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-28 17:29:33 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-28 17:29:33 +0400
commitb9ff5840a617ec836f2d09bb0f04d60e5c3b8f67 (patch)
tree8a196777f4ee32e3ee089c12b667caa2c82dec75 /source/blender/blenkernel
parent1f02209957fc8afde957b48f1be41fc399a725b0 (diff)
Code refactoring: add unified image buffer functions for doing float => byte,
byte => float, float => float, byte => byte conversions with profile, dither and predivide. Previously code for this was spread out too much. There should be no functional changes, this is so the predivide/table/dither patches can work correctly.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_colortools.h3
-rw-r--r--source/blender/blenkernel/intern/colortools.c39
2 files changed, 0 insertions, 42 deletions
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h
index fd3a3fea2bb..b358209a0f4 100644
--- a/source/blender/blenkernel/BKE_colortools.h
+++ b/source/blender/blenkernel/BKE_colortools.h
@@ -45,9 +45,6 @@ struct rctf;
# define DO_INLINE static inline
#endif
-void floatbuf_to_srgb_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int w);
-void floatbuf_to_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int w);
-
struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
void curvemapping_free(struct CurveMapping *cumap);
struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 2f568aa01eb..67bd6a22348 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -52,45 +52,6 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-
-void floatbuf_to_srgb_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int UNUSED(w))
-{
- int x, y;
- float *rf= rectf;
- float srgb[3];
- unsigned char *rc= rectc;
-
- for(y=y1; y<y2; y++) {
- for(x=x1; x<x2; x++, rf+=4, rc+=4) {
- srgb[0]= linearrgb_to_srgb(rf[0]);
- srgb[1]= linearrgb_to_srgb(rf[1]);
- srgb[2]= linearrgb_to_srgb(rf[2]);
-
- rc[0]= FTOCHAR(srgb[0]);
- rc[1]= FTOCHAR(srgb[1]);
- rc[2]= FTOCHAR(srgb[2]);
- rc[3]= FTOCHAR(rf[3]);
- }
- }
-}
-
-void floatbuf_to_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int UNUSED(w))
-{
- int x, y;
- float *rf= rectf;
- unsigned char *rc= rectc;
-
- for(y=y1; y<y2; y++) {
- for(x=x1; x<x2; x++, rf+=4, rc+=4) {
- rc[0]= FTOCHAR(rf[0]);
- rc[1]= FTOCHAR(rf[1]);
- rc[2]= FTOCHAR(rf[2]);
- rc[3]= FTOCHAR(rf[3]);
- }
- }
-}
-
-
/* ********************************* color curve ********************* */
/* ***************** operations on full struct ************* */