mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
lavfi/minterpolate: fix blending calc issue.
the right blending calc is: (alpha * Frame_2 + (MAX - alpha) * Frame_1 + 512) >> 10 Signed-off-by: Jun Zhao <mypopydev@gmail.com>
This commit is contained in:
parent
c126065947
commit
eb776a16ea
@ -1122,8 +1122,8 @@ static void interpolate(AVFilterLink *inlink, AVFrame *avf_out)
|
||||
for (y = 0; y < height; y++) {
|
||||
for (x = 0; x < width; x++) {
|
||||
avf_out->data[plane][x + y * avf_out->linesize[plane]] =
|
||||
alpha * mi_ctx->frames[2].avf->data[plane][x + y * mi_ctx->frames[2].avf->linesize[plane]] +
|
||||
((ALPHA_MAX - alpha) * mi_ctx->frames[1].avf->data[plane][x + y * mi_ctx->frames[1].avf->linesize[plane]] + 512) >> 10;
|
||||
(alpha * mi_ctx->frames[2].avf->data[plane][x + y * mi_ctx->frames[2].avf->linesize[plane]] +
|
||||
(ALPHA_MAX - alpha) * mi_ctx->frames[1].avf->data[plane][x + y * mi_ctx->frames[1].avf->linesize[plane]] + 512) >> 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user