summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_opengl.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2010-01-21 03:34:46 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2010-01-21 03:34:46 +0000
commitca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60 (patch)
tree6e7945d259b295ace8161791769bded15b55997b /src/video_out/video_out_opengl.c
parent85bd1c93b079c8b42362111efda3bbfab207d149 (diff)
parentf82784e051769a6674639aa0e5080430b4ceaf21 (diff)
downloadxine-lib-ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60.tar.gz
xine-lib-ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60.tar.bz2
Merge from 1.1.
Diffstat (limited to 'src/video_out/video_out_opengl.c')
-rw-r--r--src/video_out/video_out_opengl.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c
index f39a8714c..1840dabf1 100644
--- a/src/video_out/video_out_opengl.c
+++ b/src/video_out/video_out_opengl.c
@@ -611,7 +611,7 @@ static int render_image_fp_yuv (opengl_driver_t *this, opengl_frame_t *frame) {
return 0;
}
- ret = render_help_image_tex (this, frame->width+3, frame->height + h2 + 3,
+ ret = render_help_image_tex (this, w2 + frame->vo_frame.pitches[2] + 3, frame->height + h2 + 3,
GL_LUMINANCE, GL_LUMINANCE);
if (! ret)
return 0;
@@ -633,16 +633,21 @@ static int render_image_fp_yuv (opengl_driver_t *this, opengl_frame_t *frame) {
this->glProgramEnvParameter4fARB (MYGL_FRAGMENT_PROGRAM_ARB, 0,
1.0 /this->tex_width,
(float)(frame->height+2)/this->tex_height,
- (float)(w2+1) /this->tex_width,
+ (float)(w2+2) /this->tex_width,
0);
}
+ if (w2 & 7)
+ for (i = 0; i < h2; i++) {
+ frame->vo_frame.base[1][i*frame->vo_frame.pitches[1]+w2] = 128;
+ frame->vo_frame.base[2][i*frame->vo_frame.pitches[2]+w2] = 128;
+ }
/* Load texture */
CHECKERR ("pre-texsubimage");
- glTexSubImage2D (GL_TEXTURE_2D, 0, 1, 0, frame->width, frame->height,
+ glTexSubImage2D (GL_TEXTURE_2D, 0, 1, 0, frame->vo_frame.pitches[0], frame->height,
GL_LUMINANCE, GL_UNSIGNED_BYTE, frame->vo_frame.base[0]);
- glTexSubImage2D (GL_TEXTURE_2D, 0, 1, frame->height+2, w2, h2,
+ glTexSubImage2D (GL_TEXTURE_2D, 0, 1, frame->height+2, frame->vo_frame.pitches[1], h2,
GL_LUMINANCE, GL_UNSIGNED_BYTE, frame->vo_frame.base[1]);
- glTexSubImage2D (GL_TEXTURE_2D, 0, w2+2, frame->height+2, w2, h2,
+ glTexSubImage2D (GL_TEXTURE_2D, 0, w2+2, frame->height+2, frame->vo_frame.pitches[2], h2,
GL_LUMINANCE, GL_UNSIGNED_BYTE, frame->vo_frame.base[2]);
CHECKERR ("texsubimage");
return 1;