41 int x,
y, w_opt, h_opt, w, h;
43 unsigned char yuv_color[4];
89 s->
w, s->
y, s->
w, s->
h,
98 int plane, x, y, xb = s->
x, yb = s->
y;
99 unsigned char *row[4];
101 for (y =
FFMAX(yb, 0); y < frame->
height && y < (yb + s->
h); y++) {
104 for (plane = 1; plane < 3; plane++)
105 row[plane] = frame->
data[plane] +
108 for (x =
FFMAX(xb, 0); x < (xb + s->
w) && x < frame->
width; x++) {
111 if ((y - yb < 3) || (yb + s->
h - y < 4) ||
112 (x - xb < 3) || (xb + s->
w - x < 4)) {
113 row[0][x ] = (1 - alpha) * row[0][x ] + alpha * s->
yuv_color[
Y];
123 #define OFFSET(x) offsetof(DrawBoxContext, x)
124 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM
165 .priv_class = &drawbox_class,
169 .
inputs = avfilter_vf_drawbox_inputs,
170 .
outputs = avfilter_vf_drawbox_outputs,