[vlc-commits] XCB/XVideo: pad pictures to 32x16

Rémi Denis-Courmont git at videolan.org
Wed Jul 24 18:41:50 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 24 19:41:26 2013 +0300| [4581f88b10339b8f6046e6f67e9a9fb501a842e1] | committer: Rémi Denis-Courmont

XCB/XVideo: pad pictures to 32x16

This reenables direct rendering with libavcodec in most cases.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4581f88b10339b8f6046e6f67e9a9fb501a842e1
---

 modules/video_output/xcb/xvideo.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index c59cf17..905c2e1 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -318,8 +318,8 @@ FindFormat (vlc_object_t *obj, xcb_connection_t *conn, video_format_t *fmt,
             continue;
 
         /* VLC pads scanline to 16 pixels internally */
-        unsigned width = fmt->i_width;
-        unsigned height = fmt->i_height;
+        unsigned width = (fmt->i_width + 31) & ~31;
+        unsigned height = (fmt->i_height + 15) & ~15;
         xcb_xv_query_image_attributes_reply_t *i;
         i = xcb_xv_query_image_attributes_reply (conn,
             xcb_xv_query_image_attributes (conn, a->base_id, f->id,



More information about the vlc-commits mailing list