[MPlayer-users] Bicubic scaling in vo_gl - does it ever work?

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Jun 19 22:24:08 CEST 2006


Hi,
On Mon, Jun 19, 2006 at 11:11:28AM +0200, Reimar D?ffinger wrote:
> Please try the attached patch, I read that some cards/implementations
> have trouble with GL_REPEAT textures.

Please try this one instead, I always confuse CLAMP and CLAMP_TO_EDGE

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libvo/gl_common.c
===================================================================
--- libvo/gl_common.c	(revision 18746)
+++ libvo/gl_common.c	(working copy)
@@ -642,7 +642,7 @@
   glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_PRIORITY, 1.0);
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-  glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+  glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
   ActiveTexture(GL_TEXTURE0);
 }
 
@@ -665,6 +665,7 @@
 
 static const char *bicub_filt_template_2D =
   "MAD coord.xy, fragment.texcoord[%c], {%f, %f}, {0.5, 0.5};"
+  "FRC coord.xy, coord;"
   "TEX parmx, coord.x, texture[%c], 1D;"
   "MUL cdelta.xz, parmx.rrgg, {-%f, 0, %f, 0};"
   "TEX parmy, coord.y, texture[%c], 1D;"
@@ -673,6 +674,7 @@
 
 static const char *bicub_filt_template_RECT =
   "ADD coord, fragment.texcoord[%c], {0.5, 0.5};"
+  "FRC coord.xy, coord;"
   "TEX parmx, coord.x, texture[%c], 1D;"
   "MUL cdelta.xz, parmx.rrgg, {-1, 0, 1, 0};"
   "TEX parmy, coord.y, texture[%c], 1D;"


More information about the MPlayer-users mailing list