[FFmpeg-cvslog] avfilter/vf_boxblur: avoid one addition per line
Michael Niedermayer
git at videolan.org
Sun Dec 21 01:13:51 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 21 00:59:23 2014 +0100| [f622ff16cde3b4a66dfacb3db0d89528fbd16999] | committer: Michael Niedermayer
avfilter/vf_boxblur: avoid one addition per line
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f622ff16cde3b4a66dfacb3db0d89528fbd16999
---
libavfilter/vf_boxblur.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index a908b6d..bc604e6 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -221,11 +221,10 @@ static inline void blur(uint8_t *dst, int dst_step, const uint8_t *src, int src_
*/
const int length = radius*2 + 1;
const int inv = ((1<<16) + length/2)/length;
- int x, sum = 0;
+ int x, sum = src[radius*src_step];
for (x = 0; x < radius; x++)
sum += src[x*src_step]<<1;
- sum += src[radius*src_step];
sum = sum*inv + (1<<15);
More information about the ffmpeg-cvslog
mailing list