aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glamor/glamor_xv.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-01-04 16:25:32 +0100
committermarha <marha@users.sourceforge.net>2015-01-04 16:25:32 +0100
commit5e5a48ff8cd08f123601cd0625ca62a86675aac9 (patch)
treeea1c2cee139e8e1ce389a7f956e9874db1e0a650 /xorg-server/glamor/glamor_xv.c
parenta1011d63ffb5cc4f41bf0f4622ee3f1493d419d9 (diff)
downloadvcxsrv-5e5a48ff8cd08f123601cd0625ca62a86675aac9.tar.gz
vcxsrv-5e5a48ff8cd08f123601cd0625ca62a86675aac9.tar.bz2
vcxsrv-5e5a48ff8cd08f123601cd0625ca62a86675aac9.zip
fontconfig libX11 mesa xserver git update 4 Jan 2015
xserver commit dc777c346d5d452a53b13b917c45f6a1bad2f20b libX11 commit 446f5f7f41317a85a0cd0efa5e6a1b37bc99fba2 fontconfig commit 4420b27c074821a1d1f9d6ebe822a610176a417d mesa commit 48094d0e6554a9df36bf00fc2793ade46cf92406
Diffstat (limited to 'xorg-server/glamor/glamor_xv.c')
-rw-r--r--xorg-server/glamor/glamor_xv.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/xorg-server/glamor/glamor_xv.c b/xorg-server/glamor/glamor_xv.c
index 26bdef66b..83e24adb2 100644
--- a/xorg-server/glamor/glamor_xv.c
+++ b/xorg-server/glamor/glamor_xv.c
@@ -208,15 +208,14 @@ glamor_xv_query_image_attributes(int id,
switch (id) {
case FOURCC_YV12:
case FOURCC_I420:
- *h = *h;
- *w = *w;
- size = *w;
+ *h = ALIGN(*h, 2);
+ size = ALIGN(*w, 4);
if (pitches)
pitches[0] = size;
size *= *h;
if (offsets)
offsets[1] = size;
- tmp = *w >> 1;
+ tmp = ALIGN(*w >> 1, 4);
if (pitches)
pitches[1] = pitches[2] = tmp;
tmp *= (*h >> 1);
@@ -413,9 +412,6 @@ glamor_xv_put_image(glamor_port_private *port_priv,
s2offset = s3offset = srcPitch2 = 0;
- srcPitch = width;
- srcPitch2 = width >> 1;
-
if (!port_priv->src_pix[0] ||
(width != port_priv->src_pix_w || height != port_priv->src_pix_h)) {
int i;
@@ -439,11 +435,13 @@ glamor_xv_put_image(glamor_port_private *port_priv,
}
top = (src_y) & ~1;
- nlines = (src_y + height) - top;
+ nlines = (src_y + src_h) - top;
switch (id) {
case FOURCC_YV12:
case FOURCC_I420:
+ srcPitch = ALIGN(width, 4);
+ srcPitch2 = ALIGN(width >> 1, 4);
s2offset = srcPitch * height;
s3offset = s2offset + (srcPitch2 * ((height + 1) >> 1));
s2offset += ((top >> 1) * srcPitch2);
@@ -454,18 +452,18 @@ glamor_xv_put_image(glamor_port_private *port_priv,
s3offset = tmp;
}
glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[0],
- 0, 0, srcPitch, nlines,
- port_priv->src_pix[0]->devKind,
+ 0, 0, width, nlines,
+ srcPitch,
buf + (top * srcPitch), 0);
glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[1],
- 0, 0, srcPitch2, (nlines + 1) >> 1,
- port_priv->src_pix[1]->devKind,
+ 0, 0, width >> 1, (nlines + 1) >> 1,
+ srcPitch2,
buf + s2offset, 0);
glamor_upload_sub_pixmap_to_texture(port_priv->src_pix[2],
- 0, 0, srcPitch2, (nlines + 1) >> 1,
- port_priv->src_pix[2]->devKind,
+ 0, 0, width >> 1, (nlines + 1) >> 1,
+ srcPitch2,
buf + s3offset, 0);
break;
default: