aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-02-17 09:42:46 +0100
committerPaul B Mahol <onemda@gmail.com>2016-02-17 09:42:46 +0100
commit4dc58803813f6008085a24f42084ecacf354341e (patch)
tree8232b97d9bf55dce624cd507feffa8797ae4962c
parent5589698e0bd64d7ea3a12619dbabc33fec6a9647 (diff)
downloadffmpeg-4dc58803813f6008085a24f42084ecacf354341e.tar.gz
avfilter/vf_drawbox: reindent
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavfilter/vf_drawbox.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index 3d5e2da176..88bb9ae5c0 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -240,32 +240,32 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
}
} else {
- for (y = FFMAX(yb, 0); y < frame->height && y < (yb + s->h); y++) {
- row[0] = frame->data[0] + y * frame->linesize[0];
-
- for (plane = 1; plane < 3; plane++)
- row[plane] = frame->data[plane] +
- frame->linesize[plane] * (y >> s->vsub);
-
- if (s->invert_color) {
- for (x = FFMAX(xb, 0); x < xb + s->w && x < frame->width; x++)
- if ((y - yb < s->thickness) || (yb + s->h - 1 - y < s->thickness) ||
- (x - xb < s->thickness) || (xb + s->w - 1 - x < s->thickness))
- row[0][x] = 0xff - row[0][x];
- } else {
- for (x = FFMAX(xb, 0); x < xb + s->w && x < frame->width; x++) {
- double alpha = (double)s->yuv_color[A] / 255;
-
- if ((y - yb < s->thickness) || (yb + s->h - 1 - y < s->thickness) ||
- (x - xb < s->thickness) || (xb + s->w - 1 - x < s->thickness)) {
- row[0][x ] = (1 - alpha) * row[0][x ] + alpha * s->yuv_color[Y];
- row[1][x >> s->hsub] = (1 - alpha) * row[1][x >> s->hsub] + alpha * s->yuv_color[U];
- row[2][x >> s->hsub] = (1 - alpha) * row[2][x >> s->hsub] + alpha * s->yuv_color[V];
+ for (y = FFMAX(yb, 0); y < frame->height && y < (yb + s->h); y++) {
+ row[0] = frame->data[0] + y * frame->linesize[0];
+
+ for (plane = 1; plane < 3; plane++)
+ row[plane] = frame->data[plane] +
+ frame->linesize[plane] * (y >> s->vsub);
+
+ if (s->invert_color) {
+ for (x = FFMAX(xb, 0); x < xb + s->w && x < frame->width; x++)
+ if ((y - yb < s->thickness) || (yb + s->h - 1 - y < s->thickness) ||
+ (x - xb < s->thickness) || (xb + s->w - 1 - x < s->thickness))
+ row[0][x] = 0xff - row[0][x];
+ } else {
+ for (x = FFMAX(xb, 0); x < xb + s->w && x < frame->width; x++) {
+ double alpha = (double)s->yuv_color[A] / 255;
+
+ if ((y - yb < s->thickness) || (yb + s->h - 1 - y < s->thickness) ||
+ (x - xb < s->thickness) || (xb + s->w - 1 - x < s->thickness)) {
+ row[0][x ] = (1 - alpha) * row[0][x ] + alpha * s->yuv_color[Y];
+ row[1][x >> s->hsub] = (1 - alpha) * row[1][x >> s->hsub] + alpha * s->yuv_color[U];
+ row[2][x >> s->hsub] = (1 - alpha) * row[2][x >> s->hsub] + alpha * s->yuv_color[V];
+ }
}
}
}
}
- }
return ff_filter_frame(inlink->dst->outputs[0], frame);
}
@@ -379,30 +379,30 @@ static int drawgrid_filter_frame(AVFilterLink *inlink, AVFrame *frame)
}
}
} else {
- for (y = 0; y < frame->height; y++) {
- row[0] = frame->data[0] + y * frame->linesize[0];
-
- for (plane = 1; plane < 3; plane++)
- row[plane] = frame->data[plane] +
- frame->linesize[plane] * (y >> drawgrid->vsub);
-
- if (drawgrid->invert_color) {
- for (x = 0; x < frame->width; x++)
- if (pixel_belongs_to_grid(drawgrid, x, y))
- row[0][x] = 0xff - row[0][x];
- } else {
- for (x = 0; x < frame->width; x++) {
- double alpha = (double)drawgrid->yuv_color[A] / 255;
-
- if (pixel_belongs_to_grid(drawgrid, x, y)) {
- row[0][x ] = (1 - alpha) * row[0][x ] + alpha * drawgrid->yuv_color[Y];
- row[1][x >> drawgrid->hsub] = (1 - alpha) * row[1][x >> drawgrid->hsub] + alpha * drawgrid->yuv_color[U];
- row[2][x >> drawgrid->hsub] = (1 - alpha) * row[2][x >> drawgrid->hsub] + alpha * drawgrid->yuv_color[V];
+ for (y = 0; y < frame->height; y++) {
+ row[0] = frame->data[0] + y * frame->linesize[0];
+
+ for (plane = 1; plane < 3; plane++)
+ row[plane] = frame->data[plane] +
+ frame->linesize[plane] * (y >> drawgrid->vsub);
+
+ if (drawgrid->invert_color) {
+ for (x = 0; x < frame->width; x++)
+ if (pixel_belongs_to_grid(drawgrid, x, y))
+ row[0][x] = 0xff - row[0][x];
+ } else {
+ for (x = 0; x < frame->width; x++) {
+ double alpha = (double)drawgrid->yuv_color[A] / 255;
+
+ if (pixel_belongs_to_grid(drawgrid, x, y)) {
+ row[0][x ] = (1 - alpha) * row[0][x ] + alpha * drawgrid->yuv_color[Y];
+ row[1][x >> drawgrid->hsub] = (1 - alpha) * row[1][x >> drawgrid->hsub] + alpha * drawgrid->yuv_color[U];
+ row[2][x >> drawgrid->hsub] = (1 - alpha) * row[2][x >> drawgrid->hsub] + alpha * drawgrid->yuv_color[V];
+ }
}
}
}
}
- }
return ff_filter_frame(inlink->dst->outputs[0], frame);
}