projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Andrew has fixed Export EDL for CMX3600 output
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
boxblur.C
diff --git
a/cinelerra-5.1/cinelerra/boxblur.C
b/cinelerra-5.1/cinelerra/boxblur.C
index 4b52221382b0d4e2d48345490e35673a3f8d41f1..31f017d8fb4d086e7db47616189e7f2c796479fd 100644
(file)
--- a/
cinelerra-5.1/cinelerra/boxblur.C
+++ b/
cinelerra-5.1/cinelerra/boxblur.C
@@
-5,10
+5,12
@@
template<class dst_t, class src_t> static inline
void blurt(dst_t *dst, int dst_step, src_t *src, int src_step,
int len, int radius, float s)
{
void blurt(dst_t *dst, int dst_step, src_t *src, int src_step,
int len, int radius, float s)
{
- if( radius > len ) radius = len;
+ int n = len/2-1;
+ if( n <= 0 ) return;
+ if( radius > n ) radius = n;
const int length = radius*2 + 1;
const int inv = s * ((1<<16) + length/2)/length;
const int length = radius*2 + 1;
const int inv = s * ((1<<16) + length/2)/length;
- int x,
n,
sum = src[radius*src_step];
+ int x, sum = src[radius*src_step];
for( x=0; x<radius; ++x )
sum += src[x*src_step]<<1;
for( x=0; x<radius; ++x )
sum += src[x*src_step]<<1;