82 if (mainlink->
w != alphalink->
w || mainlink->
h != alphalink->
h) {
84 "Input frame sizes do not match (%dx%d vs %dx%d).\n",
85 mainlink->
w, mainlink->
h,
86 alphalink->
w, alphalink->
h);
90 outlink->
w = mainlink->
w;
91 outlink->
h = mainlink->
h;
108 for (y = 0; y < h; y++) {
111 for (x = 0; x < main_buf->
width; x++) {
119 const int main_linesize = main_buf->
linesize[
A];
120 const int alpha_linesize = alpha_buf->
linesize[
Y];
121 for (y = 0; y < h && y < alpha_buf->
height; y++) {
122 memcpy(main_buf->
data[
A] + y * main_linesize,
123 alpha_buf->
data[
Y] + y * alpha_linesize,
124 FFMIN(main_linesize, alpha_linesize));
135 int is_alpha = (inlink == ctx->
inputs[1]);
200 .
name =
"alphamerge",
202 "input into the alpha channel of the first input."),
206 .
inputs = alphamerge_inputs,