diff options
author | Alex Villacs Lasso <a_villacis@palosanto.com> | 2008-02-28 19:32:42 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2008-02-28 19:32:42 -0500 |
commit | eeea6468df31ee770c8d7c9dab4fac7ff0865bba (patch) | |
tree | e4ef9b9c6a7209e79c69852cf1ea144342ee2522 /src | |
parent | d838ed93a23b4e9dc438ad17875423e8b90f0015 (diff) |
Fix broken downscale past 2:1 - MM8190 and MM8198 can be used together for arbitrary downscale
Diffstat (limited to 'src')
-rw-r--r-- | src/savage_video.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/savage_video.c b/src/savage_video.c index dd6c4a1..a68c191 100644 --- a/src/savage_video.c +++ b/src/savage_video.c @@ -1489,23 +1489,32 @@ SavageDisplayVideoOld( * Process horizontal scaling * upscaling and downscaling smaller than 2:1 controled by MM8198 * MM8190 controls downscaling mode larger than 2:1 + * Together MM8190 and MM8198 can set arbitrary downscale up to 64:1 */ scalratio = 0; ssControl = 0; if (src_w >= (drw_w * 2)) { if (src_w < (drw_w * 4)) { - scalratio = HSCALING(2,1); - } else if (src_w < (drw_w * 8)) { ssControl |= HDSCALE_4; - } else if (src_w < (drw_w * 16)) { + scalratio = HSCALING(src_w,(drw_w*4)); + } else if (src_w < (drw_w * 8)) { ssControl |= HDSCALE_8; - } else if (src_w < (drw_w * 32)) { + scalratio = HSCALING(src_w,(drw_w*8)); + } else if (src_w < (drw_w * 16)) { ssControl |= HDSCALE_16; - } else if (src_w < (drw_w * 64)) { + scalratio = HSCALING(src_w,(drw_w*16)); + } else if (src_w < (drw_w * 32)) { ssControl |= HDSCALE_32; - } else + scalratio = HSCALING(src_w,(drw_w*32)); + } else if (src_w < (drw_w * 64)) { + ssControl |= HDSCALE_64; + scalratio = HSCALING(src_w,(drw_w*64)); + } else { + /* Request beyond maximum downscale! */ ssControl |= HDSCALE_64; + scalratio = HSCALING(2,1); + } } else scalratio = HSCALING(src_w,drw_w); |