diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-13 19:55:20 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-13 19:55:20 +0000 |
commit | 36c071082a39878fd910cd235b0a6b58760f6694 (patch) | |
tree | b97efcc68ae7580e8366dfcc84f6ac3d88527cd5 /libvo | |
parent | 8e1c30007dc96eca0b9adeed2ed69da533b6353c (diff) | |
download | mpv-36c071082a39878fd910cd235b0a6b58760f6694.tar.bz2 mpv-36c071082a39878fd910cd235b0a6b58760f6694.tar.xz |
Do not use border for bicubic filter helper texture, since it will cause ATI
cards to switch to software mode and be unusable. Double texture size to avoid
this causing artefacts.
Note: yuv=6 will not be changed, so it will stay unusable with ATI cards unless
ATI starts supporting this.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18696 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/gl_common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c index f0362c76f1..19d0fb9439 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -621,14 +621,14 @@ static void store_weights(float x, GLfloat *dst) { } //! to avoid artefacts this should be rather large -#define LOOKUP_BSPLINE_RES (1024) +#define LOOKUP_BSPLINE_RES (2 * 1024) /** * \brief creates the 1D lookup texture needed for fast higher-order filtering * \param unit texture unit to attach texture to */ static void gen_spline_lookup_tex(GLenum unit) { - GLfloat tex[4 * (LOOKUP_BSPLINE_RES + 2)]; - GLfloat *tp = &tex[4]; + GLfloat tex[4 * LOOKUP_BSPLINE_RES]; + GLfloat *tp = tex; int i; for (i = 0; i < LOOKUP_BSPLINE_RES; i++) { float x = (float)(i + 0.5) / LOOKUP_BSPLINE_RES; @@ -636,9 +636,9 @@ static void gen_spline_lookup_tex(GLenum unit) { tp += 4; } store_weights(0, tex); - store_weights(1, &tex[4 * (LOOKUP_BSPLINE_RES + 1)]); + store_weights(1, &tex[4 * (LOOKUP_BSPLINE_RES - 1)]); ActiveTexture(unit); - glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA16, LOOKUP_BSPLINE_RES + 2, 1, GL_RGBA, GL_FLOAT, tex); + glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA16, LOOKUP_BSPLINE_RES, 0, GL_RGBA, GL_FLOAT, tex); 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); |