[MPlayer-dev-eng] [PATCH] OSD through EOSD
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Aug 13 21:51:49 CEST 2010
On Fri, Aug 13, 2010 at 09:11:24PM +0200, Nicolas George wrote:
> > > + 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;
>
> And, shortening the identifiers names to fit in one mail line:
>
> sc_i = (c[0] * sc[0] + c[1] * sc[1] + c[2] * sc[2] + c[3] * sc[3]) >> 16;
> sc_a = (a[0] * sc[0] + a[1] * sc[1] + a[2] * sc[2] + a[3] * sc[3]) >> 16;
>
> color[i] and alpha[i] are the input values, therefore color[i] <= alpha[i]
> (unless the input is bogus). scale[i] are the bilinear coefficients, they
> are the same for both lines. Then color[i] * scale[i] <= alpha[i] *
> scale[i]. Summing and shifting will preserve the relation.
Only if all coefficients are >= 0, and bicubic scaling has negative coefficients.
But after looking at the specifics of the code there is no such issue here.
More information about the MPlayer-dev-eng
mailing list