Mercurial > mplayer.hg
changeset 16272:3934a31bcce4
less weird OSD alpha transformation.
author | reimar |
---|---|
date | Fri, 19 Aug 2005 12:23:34 +0000 |
parents | 03884f9a35cc |
children | eda61c6a927f |
files | libvo/vo_gl.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl.c Fri Aug 19 12:16:52 2005 +0000 +++ b/libvo/vo_gl.c Fri Aug 19 12:23:34 2005 +0000 @@ -331,8 +331,10 @@ { int i; char *tmp = (char *)malloc(stride * h); - for (i = 0; i < h * stride; i++) - tmp[i] = ~(-srca[i]); + // convert alpha from weird MPlayer scale. + // in-place is not possible since it is reused for future OSDs + for (i = h * stride; i; i--) + tmp[i] = srca[i] - 1; glUploadTex(gl_target, GL_ALPHA, GL_UNSIGNED_BYTE, tmp, stride, 0, 0, w, h, 0); free(tmp);