[MPlayer-cvslog] r27201 - trunk/libvo/vo_gl.c
reimar
subversion at mplayerhq.hu
Fri Jul 4 23:19:27 CEST 2008
Author: reimar
Date: Fri Jul 4 23:19:27 2008
New Revision: 27201
Log:
100l: finally understood ATI PBO problem: width must be a power of two.
Modified:
trunk/libvo/vo_gl.c
Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c (original)
+++ trunk/libvo/vo_gl.c Fri Jul 4 23:19:27 2008
@@ -691,8 +691,11 @@ static uint32_t get_image(mp_image_t *mp
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,
More information about the MPlayer-cvslog
mailing list