diff options
author | David Schleef <ds@schleef.org> | 2008-09-18 15:37:00 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-09-18 15:37:00 +0800 |
commit | 1fbe4d602816c9dfc5fba917b9fdc257d8d025b0 (patch) | |
tree | 98c52eb17364e7f38557eea1a528cbaf3a9ea1f3 | |
parent | bc36608e321e01a2be792688b4b734bb7c0667f7 (diff) |
Bug #17277: fix upscaling limit
Oh duh (i830_video.c):
/* Clamp dst width & height to 7x of src (overlay limit) */
if(drw_w > (src_w * 7))
drw_w = src_w * 7;
if(drw_h > (src_h * 7))
drw_h = src_h * 7;
The condition I see in the documentation appears to be src_h/drw_h < 8, that
is, src_h < 8*drw_h. It appears this was "fixed" incorrectly in e784e152.
It seems difficult to believe that this limitation would exist at all for the
texture unit.
-rw-r--r-- | src/i830_video.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/i830_video.c b/src/i830_video.c index 5e6ebd77..6645daae 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2245,12 +2245,16 @@ I830PutImage(ScrnInfoPtr pScrn, pI830->entityPrivate->XvInUse = i830_crtc_pipe (pPriv->current_crtc);; } - /* Clamp dst width & height to 7x of src (overlay limit) */ - if(drw_w > (src_w * 7)) - drw_w = src_w * 7; + if (!pPriv->textured) { + /* If dst width and height are less than 1/8th the src size, the + * src/dst scale factor becomes larger than 8 and doesn't fit in + * the scale register. */ + if(src_w >= (drw_w * 8)) + drw_w = src_w/7; - if(drw_h > (src_h * 7)) - drw_h = src_h * 7; + if(src_h >= (drw_h * 8)) + drw_h = src_h/7; + } /* Clip */ x1 = src_x; |