...
|
...
|
@@ -144,17 +144,17 @@ static int draw_slice(AVFilterLink *inlink, int y0, int h, int slice_dir)
|
144
|
144
|
(x - xb < 3) || (xb + drawbox->w - x < 4))
|
145
|
145
|
row[0][x] = 0xff - row[0][x];
|
146
|
146
|
} else {
|
147
|
|
- for (x = FFMAX(xb, 0); x < (xb + drawbox->w) && x < picref->video->w; x++) {
|
148
|
|
- double alpha = (double)drawbox->yuv_color[A] / 255;
|
149
|
|
-
|
150
|
|
- if ((y - yb < 3) || (yb + drawbox->h - y < 4) ||
|
151
|
|
- (x - xb < 3) || (xb + drawbox->w - x < 4)) {
|
152
|
|
- row[0][x ] = (1 - alpha) * row[0][x ] + alpha * drawbox->yuv_color[Y];
|
153
|
|
- row[1][x >> drawbox->hsub] = (1 - alpha) * row[1][x >> drawbox->hsub] + alpha * drawbox->yuv_color[U];
|
154
|
|
- row[2][x >> drawbox->hsub] = (1 - alpha) * row[2][x >> drawbox->hsub] + alpha * drawbox->yuv_color[V];
|
|
147
|
+ for (x = FFMAX(xb, 0); x < (xb + drawbox->w) && x < picref->video->w; x++) {
|
|
148
|
+ double alpha = (double)drawbox->yuv_color[A] / 255;
|
|
149
|
+
|
|
150
|
+ if ((y - yb < 3) || (yb + drawbox->h - y < 4) ||
|
|
151
|
+ (x - xb < 3) || (xb + drawbox->w - x < 4)) {
|
|
152
|
+ row[0][x ] = (1 - alpha) * row[0][x ] + alpha * drawbox->yuv_color[Y];
|
|
153
|
+ row[1][x >> drawbox->hsub] = (1 - alpha) * row[1][x >> drawbox->hsub] + alpha * drawbox->yuv_color[U];
|
|
154
|
+ row[2][x >> drawbox->hsub] = (1 - alpha) * row[2][x >> drawbox->hsub] + alpha * drawbox->yuv_color[V];
|
|
155
|
+ }
|
155
|
156
|
}
|
156
|
157
|
}
|
157
|
|
- }
|
158
|
158
|
}
|
159
|
159
|
|
160
|
160
|
return ff_draw_slice(inlink->dst->outputs[0], y0, h, 1);
|