1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

vf_boxblur: cosmetics to reduce diff to qatar

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-28 19:12:42 +01:00
parent 7bfa2f25c0
commit b5572ab861

View File

@ -155,12 +155,12 @@ static int config_input(AVFilterLink *inlink)
boxblur->hsub = desc->log2_chroma_w;
boxblur->vsub = desc->log2_chroma_h;
var_values[VAR_W] = inlink->w;
var_values[VAR_H] = inlink->h;
var_values[VAR_W] = inlink->w;
var_values[VAR_H] = inlink->h;
var_values[VAR_CW] = cw = w>>boxblur->hsub;
var_values[VAR_CH] = ch = h>>boxblur->vsub;
var_values[VAR_HSUB] = 1<<boxblur->hsub;
var_values[VAR_VSUB] = 1<<boxblur->vsub;
var_values[VAR_HSUB] = 1<<boxblur->hsub;
var_values[VAR_VSUB] = 1<<boxblur->vsub;
#define EVAL_RADIUS_EXPR(comp) \
expr = boxblur->comp##_radius_expr; \
@ -226,9 +226,9 @@ static inline void blur(uint8_t *dst, int dst_step, const uint8_t *src, int src_
* and subtracting 1 input pixel.
* The following code adopts this faster variant.
*/
int x, sum = 0;
const int length = radius*2 + 1;
const int inv = ((1<<16) + length/2)/length;
int x, sum = 0;
for (x = 0; x < radius; x++)
sum += src[x*src_step]<<1;