diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-19 12:23:34 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-08-19 12:23:34 +0000 |
commit | 77ec0f850d1e096ca72dab0675da62bcfb11845f (patch) | |
tree | b9d89093bcf1fcbbf2cd7d630bf7dcf7737696ad /libvo/vo_gl.c | |
parent | f37f504f2ab027bd12347e8db8a31faa8254d0ee (diff) | |
download | mpv-77ec0f850d1e096ca72dab0675da62bcfb11845f.tar.bz2 mpv-77ec0f850d1e096ca72dab0675da62bcfb11845f.tar.xz |
less weird OSD alpha transformation.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16273 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r-- | libvo/vo_gl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 775d7333c0..f0b9d311c8 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -331,8 +331,10 @@ static void create_osd_texture(int x0, int y0, int w, int h, { 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); |