diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-07-04 21:19:27 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-07-04 21:19:27 +0000 |
commit | 461557635892d47a7e06042d6ff529cc9b502a50 (patch) | |
tree | 19ea17aad07fcdeeddb163451148ef4ba9e96f86 /libvo | |
parent | 828212b59f2f76ead0ab859c911c8bb81fc409b5 (diff) | |
download | mpv-461557635892d47a7e06042d6ff529cc9b502a50.tar.bz2 mpv-461557635892d47a7e06042d6ff529cc9b502a50.tar.xz |
100l: finally understood ATI PBO problem: width must be a power of two.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27201 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_gl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 7e559cd256..f40f13e719 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -691,8 +691,11 @@ static uint32_t get_image(mp_image_t *mpi) { if (!gl_buffer) GenBuffers(1, &gl_buffer); BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer); - if (ati_hack) - mpi->width = (mpi->width + 255) & ~255; + if (ati_hack) { + int s = 1; + while (s < mpi->width) s *= 2; + mpi->width = s; + } mpi->stride[0] = mpi->width * mpi->bpp / 8; if (mpi->stride[0] * mpi->height > gl_buffersize) { BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->height, |