[MPlayer-cvslog] r26227 - trunk/libvo/gl_common.c

reimar subversion at mplayerhq.hu
Wed Mar 12 16:17:09 CET 2008


Author: reimar
Date: Wed Mar 12 16:17:06 2008
New Revision: 26227

Log:
Fix and simplify lscale=2 (bicub_x) scaler, produced funny
noise on ATI cards due to cdelta.y never being set.


Modified:
   trunk/libvo/gl_common.c

Modified: trunk/libvo/gl_common.c
==============================================================================
--- trunk/libvo/gl_common.c	(original)
+++ trunk/libvo/gl_common.c	Wed Mar 12 16:17:06 2008
@@ -737,23 +737,23 @@ static const char *bicub_notex_filt_temp
   BICUB_FILT_MAIN("RECT");
 
 #define BICUB_X_FILT_MAIN(textype) \
-  "ADD coord, fragment.texcoord[%c].xyxy, cdelta.xyxw;" \
-  "ADD coord2, fragment.texcoord[%c].xyxy, cdelta.zyzw;" \
+  "ADD coord.xy, fragment.texcoord[%c].xyxy, cdelta.xyxy;" \
+  "ADD coord2.xy, fragment.texcoord[%c].xyxy, cdelta.zyzy;" \
   "TEX a.r, coord, texture[%c], "textype";" \
   "TEX b.r, coord2, texture[%c], "textype";" \
   /* x-interpolation */ \
   "LRP yuv.%c, parmx.b, a.rrrr, b.rrrr;"
 
 static const char *bicub_x_filt_template_2D =
-  "MAD coord.x, fragment.texcoord[%c], {%f, %f}, {0.5, 0.5};"
+  "MAD coord.x, fragment.texcoord[%c], {%f}, {0.5};"
   "TEX parmx, coord, texture[%c], 1D;"
-  "MUL cdelta.xz, parmx.rrgg, {-%f, 0, %f, 0};"
+  "MUL cdelta.xyz, parmx.rrgg, {-%f, 0, %f};"
   BICUB_X_FILT_MAIN("2D");
 
 static const char *bicub_x_filt_template_RECT =
-  "ADD coord.x, fragment.texcoord[%c], {0.5, 0.5};"
+  "ADD coord.x, fragment.texcoord[%c], {0.5};"
   "TEX parmx, coord, texture[%c], 1D;"
-  "MUL cdelta.xz, parmx.rrgg, {-1, 0, 1, 0};"
+  "MUL cdelta.xyz, parmx.rrgg, {-1, 0, 1};"
   BICUB_X_FILT_MAIN("RECT");
 
 static const char *unsharp_filt_template =
@@ -1059,7 +1059,7 @@ static void add_scaler(int scaler, char 
                  in_tex, in_tex, in_tex, in_tex, out_comp);
       else
         snprintf(*prog_pos, *remain, bicub_x_filt_template_2D,
-                 in_tex, (float)texw, (float)texh,
+                 in_tex, (float)texw,
                  texs[0], ptw, ptw,
                  in_tex, in_tex, in_tex, in_tex, out_comp);
       break;



More information about the MPlayer-cvslog mailing list