xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Tue Dec 1 22:37:18 PST 2009


 src/radeon.h                |    2 ++
 src/radeon_textured_video.c |    3 +++
 src/radeon_video.c          |    7 +++++--
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit f03450796d2e9247a1228c4e2abb1dfad7aecddf
Author: Kusanagi Kouichi <slash at ac.auone-net.jp>
Date:   Wed Dec 2 01:36:37 2009 -0500

    radeon: Lift hardcoded limit from RADEONQueryImageAttributes
    
    The dimension of an XvImage is limited to 2048 x 2048 even if an adaptor
    supports larger image.
    XvCreateImage and XvShmCreateImage lower the width or height of an image.
    XvPutImage and XvShmPutImage return BadValue.
    The cause is that 2048 is hardcoded in RADEONQueryImageAttributes.

diff --git a/src/radeon.h b/src/radeon.h
index c9f388a..182e946 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -949,6 +949,8 @@ typedef struct {
     uint16_t video_decoder_type;
     int overlay_scaler_buffer_width;
     int ecp_div;
+    unsigned int xv_max_width;
+    unsigned int xv_max_height;
 
     /* general */
     Bool              showCache;
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index 7396f6f..2e5d763 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -863,6 +863,9 @@ RADEONSetupImageTexturedVideo(ScreenPtr pScreen)
     if (IS_R500_3D || IS_R300_3D)
 	radeon_load_bicubic_texture(pScrn);
 
+    info->xv_max_width = adapt->pEncodings->width;
+    info->xv_max_height = adapt->pEncodings->height;
+
     return adapt;
 }
 
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 7aaa266..b1b3f15 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -1511,6 +1511,8 @@ RADEONAllocAdaptor(ScrnInfoPtr pScrn)
 	RADEONVIP_init(pScrn, pPriv);
 
     info->adaptor = adapt;
+    info->xv_max_width = 2048;
+    info->xv_max_height = 2048;
 
 	if(!xf86LoadSubModule(pScrn,"theatre_detect")) 
 	{
@@ -3077,10 +3079,11 @@ RADEONQueryImageAttributes(
     unsigned short *w, unsigned short *h,
     int *pitches, int *offsets
 ){
+    const RADEONInfoRec * const info = RADEONPTR(pScrn);
     int size, tmp;
 
-    if(*w > 2048) *w = 2048;
-    if(*h > 2048) *h = 2048;
+    if(*w > info->xv_max_width) *w = info->xv_max_width;
+    if(*h > info->xv_max_height) *h = info->xv_max_height;
 
     *w = (*w + 1) & ~1;
     if(offsets) offsets[0] = 0;


More information about the xorg-commit mailing list