diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-15 12:37:17 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-01-15 12:37:17 +0400 |
commit | 0ce2d278b7a895a96c673f2c74020543b94413a3 (patch) | |
tree | 7f4bb96666c5cf26ca218c0bc53b6ec0d6edf06b /source/blender/imbuf | |
parent | 4f7465cac13262ca47e1196fe1cd585b79bcfe1f (diff) |
Follow general mathutils rules for naming straight<->premul functions
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 6 | ||||
-rw-r--r-- | source/blender/imbuf/intern/divers.c | 20 | ||||
-rw-r--r-- | source/blender/imbuf/intern/png.c | 6 |
3 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 2c6e46cb664..86f47fe07c4 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1222,7 +1222,7 @@ static void *display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle) } else if (channels == 4) { rgba_uchar_to_float(fp, cp); - straight_to_premul_v4(fp, fp); + straight_to_premul_v4(fp); } else { BLI_assert(!"Buffers of 3 or 4 channels are only supported here"); @@ -2347,7 +2347,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe else if (byte_buffer) { rgba_uchar_to_float(pixel, byte_buffer + linear_index); IMB_colormanagement_colorspace_to_scene_linear_v3(pixel, rect_colorspace); - straight_to_premul_v4(pixel, pixel); + straight_to_premul_v4(pixel); } if (!is_data) { @@ -2361,7 +2361,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe } else { float pixel_straight[4]; - premul_to_straight_v4(pixel_straight, pixel); + premul_to_straight_v4_v4(pixel_straight, pixel); rgba_float_to_uchar(display_buffer + display_index, pixel_straight); } } diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 84339b51721..20d51fddb35 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -255,7 +255,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from, /* no color space conversion */ if (dither && predivide) { for (x = 0; x < width; x++, from += 4, to += 4) { - premul_to_straight_v4(straight, from); + premul_to_straight_v4_v4(straight, from); float_to_byte_dither_v4(to, straight, di); } } @@ -265,7 +265,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from, } else if (predivide) { for (x = 0; x < width; x++, from += 4, to += 4) { - premul_to_straight_v4(straight, from); + premul_to_straight_v4_v4(straight, from); rgba_float_to_uchar(to, straight); } } @@ -281,7 +281,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from, if (dither && predivide) { for (x = 0; x < width; x++, from += 4, to += 4) { - premul_to_straight_v4(straight, from); + premul_to_straight_v4_v4(straight, from); linearrgb_to_srgb_ushort4(us, from); ushort_to_byte_dither_v4(to, us, di); } @@ -294,7 +294,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from, } else if (predivide) { for (x = 0; x < width; x++, from += 4, to += 4) { - premul_to_straight_v4(straight, from); + premul_to_straight_v4_v4(straight, from); linearrgb_to_srgb_ushort4(us, from); ushort_to_byte_v4(to, us); } @@ -690,20 +690,20 @@ void IMB_buffer_float_clamp(float *buf, int width, int height) void IMB_buffer_float_unpremultiply(float *buf, int width, int height) { int total = width * height; - float *cp = buf; + float *fp = buf; while (total--) { - premul_to_straight_v4(cp, cp); - cp += 4; + premul_to_straight_v4(fp); + fp += 4; } } void IMB_buffer_float_premultiply(float *buf, int width, int height) { int total = width * height; - float *cp = buf; + float *fp = buf; while (total--) { - straight_to_premul_v4(cp, cp); - cp += 4; + straight_to_premul_v4(fp); + fp += 4; } } diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c index 02aea4b9965..cc73f688e70 100644 --- a/source/blender/imbuf/intern/png.c +++ b/source/blender/imbuf/intern/png.c @@ -204,7 +204,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags) if (is_16bit) { if (has_float) { for (i = ibuf->x * ibuf->y; i > 0; i--) { - premul_to_straight_v4(from_straight, from_float); + premul_to_straight_v4_v4(from_straight, from_float); to16[0] = ftoshort(chanel_colormanage_cb(from_straight[0])); to16[1] = ftoshort(chanel_colormanage_cb(from_straight[1])); to16[2] = ftoshort(chanel_colormanage_cb(from_straight[2])); @@ -237,7 +237,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags) if (is_16bit) { if (has_float) { for (i = ibuf->x * ibuf->y; i > 0; i--) { - premul_to_straight_v4(from_straight, from_float); + premul_to_straight_v4_v4(from_straight, from_float); to16[0] = ftoshort(chanel_colormanage_cb(from_straight[0])); to16[1] = ftoshort(chanel_colormanage_cb(from_straight[1])); to16[2] = ftoshort(chanel_colormanage_cb(from_straight[2])); @@ -267,7 +267,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags) if (is_16bit) { if (has_float) { for (i = ibuf->x * ibuf->y; i > 0; i--) { - premul_to_straight_v4(from_straight, from_float); + premul_to_straight_v4_v4(from_straight, from_float); to16[0] = ftoshort(chanel_colormanage_cb(from_straight[0])); to16++; from_float += 4; } |