vf_boxblur: cosmetics to reduce diff to qatar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7bfa2f25c0
commit
b5572ab861
@ -155,12 +155,12 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
boxblur->hsub = desc->log2_chroma_w;
|
boxblur->hsub = desc->log2_chroma_w;
|
||||||
boxblur->vsub = desc->log2_chroma_h;
|
boxblur->vsub = desc->log2_chroma_h;
|
||||||
|
|
||||||
var_values[VAR_W] = inlink->w;
|
var_values[VAR_W] = inlink->w;
|
||||||
var_values[VAR_H] = inlink->h;
|
var_values[VAR_H] = inlink->h;
|
||||||
var_values[VAR_CW] = cw = w>>boxblur->hsub;
|
var_values[VAR_CW] = cw = w>>boxblur->hsub;
|
||||||
var_values[VAR_CH] = ch = h>>boxblur->vsub;
|
var_values[VAR_CH] = ch = h>>boxblur->vsub;
|
||||||
var_values[VAR_HSUB] = 1<<boxblur->hsub;
|
var_values[VAR_HSUB] = 1<<boxblur->hsub;
|
||||||
var_values[VAR_VSUB] = 1<<boxblur->vsub;
|
var_values[VAR_VSUB] = 1<<boxblur->vsub;
|
||||||
|
|
||||||
#define EVAL_RADIUS_EXPR(comp) \
|
#define EVAL_RADIUS_EXPR(comp) \
|
||||||
expr = boxblur->comp##_radius_expr; \
|
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.
|
* and subtracting 1 input pixel.
|
||||||
* The following code adopts this faster variant.
|
* The following code adopts this faster variant.
|
||||||
*/
|
*/
|
||||||
int x, sum = 0;
|
|
||||||
const int length = radius*2 + 1;
|
const int length = radius*2 + 1;
|
||||||
const int inv = ((1<<16) + length/2)/length;
|
const int inv = ((1<<16) + length/2)/length;
|
||||||
|
int x, sum = 0;
|
||||||
|
|
||||||
for (x = 0; x < radius; x++)
|
for (x = 0; x < radius; x++)
|
||||||
sum += src[x*src_step]<<1;
|
sum += src[x*src_step]<<1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user