# HG changeset patch # User reimar # Date 1369773830 0 # Node ID 6feedb93c0738aecb78a8c6dbfc770ed8752459a # Parent d2c43a00a9c9c55d857facc99a9410c99e8bda16 Fix border-pos handling. diff -r d2c43a00a9c9 -r 6feedb93c073 libvo/vo_gl.c --- a/libvo/vo_gl.c Mon May 27 20:36:58 2013 +0000 +++ b/libvo/vo_gl.c Tue May 28 20:43:50 2013 +0000 @@ -225,10 +225,12 @@ scale_y = (double)new_h / (double)vo_dheight; video_matrix[0] *= scale_x; video_matrix[4] *= scale_x; - video_matrix[12] = -1 + apply_border_pos(vo_dwidth, new_w, vo_border_pos_x) * 2.0 / vo_dwidth; + video_matrix[12] *= scale_x; + video_matrix[12] += (apply_border_pos(vo_dwidth, new_w, vo_border_pos_x) - apply_border_pos(vo_dwidth, new_w, 0.5)) * 2.0 / vo_dwidth; video_matrix[1] *= scale_y; video_matrix[5] *= scale_y; - video_matrix[13] = 1 - apply_border_pos(vo_dheight, new_h, vo_border_pos_y) * 2.0 / vo_dheight; + video_matrix[13] *= scale_y; + video_matrix[13] -= (apply_border_pos(vo_dheight, new_h, vo_border_pos_y) - apply_border_pos(vo_dheight, new_h, 0.5)) * 2.0 / vo_dheight; if (vo_rotate & 1) { int tmp = new_w; new_w = new_h; new_h = tmp; }