git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
83f7c79
)
removed two buffer copy operations in low pass filter
author
Matthias Kramm
<kramm@quiss.org>
Tue, 27 Jan 2009 16:37:56 +0000
(17:37 +0100)
committer
Matthias Kramm
<kramm@quiss.org>
Tue, 27 Jan 2009 16:37:56 +0000
(17:37 +0100)
lib/modules/swfbits.c
patch
|
blob
|
history
diff --git
a/lib/modules/swfbits.c
b/lib/modules/swfbits.c
index
4f6b310
..
88ba8b9
100644
(file)
--- a/
lib/modules/swfbits.c
+++ b/
lib/modules/swfbits.c
@@
-1399,12
+1399,12
@@
static void blurImage(RGBA*src, int width, int height, int r)
}
int range = r*e/2;
}
int range = r*e/2;
- RGBA*dest = malloc(sizeof(RGBA)*width*height);
+ RGBA*tmp = malloc(sizeof(RGBA)*width*height);
int y;
for(y=0;y<height;y++) {
RGBA*s = &src[y*width];
int y;
for(y=0;y<height;y++) {
RGBA*s = &src[y*width];
- RGBA*d = &dest[y*width];
+ RGBA*d = &tmp[y*width];
for(x=0;x<range;x++) {
d[x] = s[x];
}
for(x=0;x<range;x++) {
d[x] = s[x];
}
@@
-1432,11
+1432,9
@@
static void blurImage(RGBA*src, int width, int height, int r)
}
}
}
}
- memcpy(src, dest, width*height*sizeof(RGBA));
-
for(x=0;x<width;x++) {
for(x=0;x<width;x++) {
- RGBA*s = &src[x];
- RGBA*d = &dest[x];
+ RGBA*s = &tmp[x];
+ RGBA*d = &src[x];
int yy=0;
for(y=0;y<range;y++) {
d[yy] = s[yy];
int yy=0;
for(y=0;y<range;y++) {
d[yy] = s[yy];
@@
-1468,9
+1466,8
@@
static void blurImage(RGBA*src, int width, int height, int r)
yy += width;
}
}
yy += width;
}
}
- memcpy(src, dest, width*height*sizeof(RGBA));
- free(dest);
+ free(tmp);
free(weights);
free(gauss);
}
free(weights);
free(gauss);
}