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:
Diffstat (limited to 'source/blender/imbuf/intern/filter.c')
-rw-r--r--source/blender/imbuf/intern/filter.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 0e6567d2c6b..bc5e85a3c55 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -1,6 +1,4 @@
/*
- *
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -33,13 +31,10 @@
* \ingroup imbuf
*/
-
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
-
-
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_filter.h"
@@ -52,7 +47,7 @@
static void filtrow(unsigned char *point, int x)
{
- unsigned int c1,c2,c3,error;
+ unsigned int c1, c2, c3, error;
if (x>1) {
c1 = c2 = *point;
@@ -72,7 +67,7 @@ static void filtrow(unsigned char *point, int x)
static void filtrowf(float *point, int x)
{
- float c1,c2,c3;
+ float c1, c2, c3;
if (x>1) {
c1 = c2 = *point;
@@ -92,7 +87,7 @@ static void filtrowf(float *point, int x)
static void filtcolum(unsigned char *point, int y, int skip)
{
- unsigned int c1,c2,c3,error;
+ unsigned int c1, c2, c3, error;
unsigned char *point2;
if (y>1) {
@@ -115,7 +110,7 @@ static void filtcolum(unsigned char *point, int y, int skip)
static void filtcolumf(float *point, int y, int skip)
{
- float c1,c2,c3, *point2;
+ float c1, c2, c3, *point2;
if (y>1) {
c1 = c2 = *point;
@@ -148,23 +143,23 @@ void IMB_filtery(struct ImBuf *ibuf)
for (;x>0;x--) {
if (point) {
- if (ibuf->planes > 24) filtcolum(point,y,skip);
+ if (ibuf->planes > 24) filtcolum(point, y, skip);
point++;
- filtcolum(point,y,skip);
+ filtcolum(point, y, skip);
point++;
- filtcolum(point,y,skip);
+ filtcolum(point, y, skip);
point++;
- filtcolum(point,y,skip);
+ filtcolum(point, y, skip);
point++;
}
if (pointf) {
- if (ibuf->planes > 24) filtcolumf(pointf,y,skip);
+ if (ibuf->planes > 24) filtcolumf(pointf, y, skip);
pointf++;
- filtcolumf(pointf,y,skip);
+ filtcolumf(pointf, y, skip);
pointf++;
- filtcolumf(pointf,y,skip);
+ filtcolumf(pointf, y, skip);
pointf++;
- filtcolumf(pointf,y,skip);
+ filtcolumf(pointf, y, skip);
pointf++;
}
}
@@ -186,23 +181,23 @@ void imb_filterx(struct ImBuf *ibuf)
for (;y>0;y--) {
if (point) {
- if (ibuf->planes > 24) filtrow(point,x);
+ if (ibuf->planes > 24) filtrow(point, x);
point++;
- filtrow(point,x);
+ filtrow(point, x);
point++;
- filtrow(point,x);
+ filtrow(point, x);
point++;
- filtrow(point,x);
+ filtrow(point, x);
point+=skip;
}
if (pointf) {
- if (ibuf->planes > 24) filtrowf(pointf,x);
+ if (ibuf->planes > 24) filtrowf(pointf, x);
pointf++;
- filtrowf(pointf,x);
+ filtrowf(pointf, x);
pointf++;
- filtrowf(pointf,x);
+ filtrowf(pointf, x);
pointf++;
- filtrowf(pointf,x);
+ filtrowf(pointf, x);
pointf+=skip;
}
}
@@ -304,7 +299,7 @@ void IMB_mask_filter_extend(char *mask, int width, int height)
void IMB_mask_clear(ImBuf *ibuf, char *mask, int val)
{
- int x,y;
+ int x, y;
if (ibuf->rect_float) {
for (x=0; x<ibuf->x; x++) {
for (y=0; y<ibuf->y; y++) {
@@ -399,7 +394,7 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter)
if (!check_pixel_assigned(srcbuf, srcmask, index, depth, is_float)) {
float tmp[4];
float wsum=0;
- float acc[4]={0,0,0,0};
+ float acc[4]={0, 0, 0, 0};
k = 0;
if (check_pixel_assigned(srcbuf, srcmask, filter_make_index(x-1, y, width, height), depth, is_float) ||