summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-19 12:23:34 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-19 12:23:34 +0000
commit77ec0f850d1e096ca72dab0675da62bcfb11845f (patch)
treeb9d89093bcf1fcbbf2cd7d630bf7dcf7737696ad /libvo
parentf37f504f2ab027bd12347e8db8a31faa8254d0ee (diff)
downloadmpv-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')
-rw-r--r--libvo/vo_gl.c6
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);