[MPlayer-dev-eng] [PATCH] OSD through EOSD

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Aug 13 20:46:34 CEST 2010


On Fri, Aug 13, 2010 at 07:22:17PM +0200, Nicolas George wrote:
> I thought of that, but does it really matter?

Not/not much really I guess.

> +    scale[0] = table_x[x].left_up;
> +  scale[1] = table_x[x].right_down * table_y[y].left_up >> 16;
> +  scale[2] = table_x[x].left_up * table_y[y].right_down >> 16;
> +  scale[3] = table_x[x].right_down * table_y[y].right_down >> 16;
> +  spu->scaled_image[scaled] =  (color[0] * scale[0] + color[1] * scale[1] + color[2] * scale[2] + color[3] * scale[3]) >> 16;
> +  spu->scaled_aimage[scaled] = (alpha[0] * scale[0] + alpha[1] * scale[1] + alpha[2] * scale[2] + alpha[3] * scale[3]) >> 16;
>    if (spu->scaled_aimage[scaled]){
> -    // ensure that MPlayer's simplified alpha-blending can not overflow
> -    spu->scaled_image[scaled] = FFMIN(spu->scaled_image[scaled], spu->scaled_aimage[scaled]);

Except that it means you definitely can't remove this, at least
bicubic scaling can produce interpolated values with
value > alpha even when value <= alpha for all surrounding
values, and that means _very_ ugly artefacts if in addition
the video background is very bright.


More information about the MPlayer-dev-eng mailing list