Mercurial > mplayer.hg
changeset 30036:955a1dc5f68c
Change %f to %e in generated fragment programs to avoid losing precision unnecessarily.
author | reimar |
---|---|
date | Sun, 20 Dec 2009 14:32:34 +0000 |
parents | e05b7683063c |
children | bd46aa50b605 |
files | libvo/gl_common.c |
diffstat | 1 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/gl_common.c Sun Dec 20 14:14:56 2009 +0000 +++ b/libvo/gl_common.c Sun Dec 20 14:32:34 2009 +0000 @@ -833,11 +833,11 @@ "LRP yuv.%c, parmx.b, a.bbbb, a.aaaa;" static const char *bicub_filt_template_2D = - "MAD coord.xy, fragment.texcoord[%c], {%f, %f}, {0.5, 0.5};" + "MAD coord.xy, fragment.texcoord[%c], {%e, %e}, {0.5, 0.5};" "TEX parmx, coord.x, texture[%c], 1D;" - "MUL cdelta.xz, parmx.rrgg, {-%f, 0, %f, 0};" + "MUL cdelta.xz, parmx.rrgg, {-%e, 0, %e, 0};" "TEX parmy, coord.y, texture[%c], 1D;" - "MUL cdelta.yw, parmy.rrgg, {0, -%f, 0, %f};" + "MUL cdelta.yw, parmy.rrgg, {0, -%e, 0, %e};" BICUB_FILT_MAIN("2D"); static const char *bicub_filt_template_RECT = @@ -859,12 +859,12 @@ "SUB "t".y, "t".yyyy, "s";" static const char *bicub_notex_filt_template_2D = - "MAD coord.xy, fragment.texcoord[%c], {%f, %f}, {0.5, 0.5};" + "MAD coord.xy, fragment.texcoord[%c], {%e, %e}, {0.5, 0.5};" "FRC coord.xy, coord.xyxy;" CALCWEIGHTS("parmx", "coord.xxxx") - "MUL cdelta.xz, parmx.rrgg, {-%f, 0, %f, 0};" + "MUL cdelta.xz, parmx.rrgg, {-%e, 0, %e, 0};" CALCWEIGHTS("parmy", "coord.yyyy") - "MUL cdelta.yw, parmy.rrgg, {0, -%f, 0, %f};" + "MUL cdelta.yw, parmy.rrgg, {0, -%e, 0, %e};" BICUB_FILT_MAIN("2D"); static const char *bicub_notex_filt_template_RECT = @@ -885,9 +885,9 @@ "LRP yuv.%c, parmx.b, a.rrrr, b.rrrr;" static const char *bicub_x_filt_template_2D = - "MAD coord.x, fragment.texcoord[%c], {%f}, {0.5};" + "MAD coord.x, fragment.texcoord[%c], {%e}, {0.5};" "TEX parmx, coord, texture[%c], 1D;" - "MUL cdelta.xyz, parmx.rrgg, {-%f, 0, %f};" + "MUL cdelta.xyz, parmx.rrgg, {-%e, 0, %e};" BICUB_X_FILT_MAIN("2D"); static const char *bicub_x_filt_template_RECT = @@ -897,7 +897,7 @@ BICUB_X_FILT_MAIN("RECT"); static const char *unsharp_filt_template = - "PARAM dcoord%c = {%f, %f, %f, %f};" + "PARAM dcoord%c = {%e, %e, %e, %e};" "ADD coord, fragment.texcoord[%c].xyxy, dcoord%c;" "SUB coord2, fragment.texcoord[%c].xyxy, dcoord%c;" "TEX a.r, fragment.texcoord[%c], texture[%c], %s;" @@ -908,11 +908,11 @@ "TEX b.g, coord2.zwzw, texture[%c], %s;" "DP3 b, b, {0.25, 0.25, 0.25};" "SUB b.r, a.r, b.r;" - "MAD yuv.%c, b.r, {%f}, a.r;"; + "MAD yuv.%c, b.r, {%e}, a.r;"; static const char *unsharp_filt_template2 = - "PARAM dcoord%c = {%f, %f, %f, %f};" - "PARAM dcoord2%c = {%f, 0, 0, %f};" + "PARAM dcoord%c = {%e, %e, %e, %e};" + "PARAM dcoord2%c = {%e, 0, 0, %e};" "ADD coord, fragment.texcoord[%c].xyxy, dcoord%c;" "SUB coord2, fragment.texcoord[%c].xyxy, dcoord%c;" "TEX a.r, fragment.texcoord[%c], texture[%c], %s;" @@ -932,13 +932,13 @@ "TEX b.g, coord2.zwzw, texture[%c], %s;" "DP4 b.r, b, {-0.1171875, -0.1171875, -0.1171875, -0.09765625};" "MAD b.r, a.r, {0.859375}, b.r;" - "MAD yuv.%c, b.r, {%f}, a.r;"; + "MAD yuv.%c, b.r, {%e}, a.r;"; static const char *yuv_prog_template = - "PARAM ycoef = {%.4f, %.4f, %.4f};" - "PARAM ucoef = {%.4f, %.4f, %.4f};" - "PARAM vcoef = {%.4f, %.4f, %.4f};" - "PARAM offsets = {%.4f, %.4f, %.4f};" + "PARAM ycoef = {%e, %e, %e};" + "PARAM ucoef = {%e, %e, %e};" + "PARAM vcoef = {%e, %e, %e};" + "PARAM offsets = {%e, %e, %e};" "TEMP res;" "MAD res.rgb, yuv.rrrr, ycoef, offsets;" "MAD res.rgb, yuv.gggg, ucoef, res;" @@ -946,11 +946,11 @@ "END"; static const char *yuv_pow_prog_template = - "PARAM ycoef = {%.4f, %.4f, %.4f};" - "PARAM ucoef = {%.4f, %.4f, %.4f};" - "PARAM vcoef = {%.4f, %.4f, %.4f};" - "PARAM offsets = {%.4f, %.4f, %.4f};" - "PARAM gamma = {%.4f, %.4f, %.4f};" + "PARAM ycoef = {%e, %e, %e};" + "PARAM ucoef = {%e, %e, %e};" + "PARAM vcoef = {%e, %e, %e};" + "PARAM offsets = {%e, %e, %e};" + "PARAM gamma = {%e, %e, %e};" "TEMP res;" "MAD res.rgb, yuv.rrrr, ycoef, offsets;" "MAD res.rgb, yuv.gggg, ucoef, res;" @@ -961,10 +961,10 @@ "END"; static const char *yuv_lookup_prog_template = - "PARAM ycoef = {%.4f, %.4f, %.4f, 0};" - "PARAM ucoef = {%.4f, %.4f, %.4f, 0};" - "PARAM vcoef = {%.4f, %.4f, %.4f, 0};" - "PARAM offsets = {%.4f, %.4f, %.4f, 0.125};" + "PARAM ycoef = {%e, %e, %e, 0};" + "PARAM ucoef = {%e, %e, %e, 0};" + "PARAM vcoef = {%e, %e, %e, 0};" + "PARAM offsets = {%e, %e, %e, 0.125};" "TEMP res;" "MAD res, yuv.rrrr, ycoef, offsets;" "MAD res.rgb, yuv.gggg, ucoef, res;"