diff --git a/src/radeon_video.c b/src/radeon_video.c index d4e1f0a..9ee75ff 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -2434,6 +2434,8 @@ RADEONDisplayVideo( CARD32 scale_cntl; double dsr; int tap_set; + int predownscale=0; + int src_w_d; is_rgb=0; switch(id){ @@ -2509,6 +2511,8 @@ RADEONDisplayVideo( step_by_uv = step_by_y; /* if the source width was larger than what would fit in overlay scaler increase step_by values */ +#if 0 + /* XXX this does not appear to work (at least on rv250) */ i=src_w; while(i>pPriv->overlay_scaler_buffer_width){ step_by_y++; @@ -2516,9 +2520,18 @@ RADEONDisplayVideo( h_inc >>=1; i=i/2; } +#else + /* predownscale instead (yes this majorly sucks quality-wise) - will + only work for widths up to 2 times the overlay_scaler_buffer_width */ + src_w_d = src_w; + if (src_w>pPriv->overlay_scaler_buffer_width) { + src_w_d /= 2; /* odd widths? */ + predownscale = 1; + } +#endif - h_inc_d = src_w; + h_inc_d = src_w_d; h_inc_d = h_inc_d/drw_w; /* we could do a tad better - but why bother when this concerns downscaling and the code is so much more @@ -2587,7 +2600,8 @@ #endif RADEONWaitForFifo(pScrn, 10); OUTREG(RADEON_OV0_H_INC, h_inc | ((h_inc_uv >> 1) << 16)); - OUTREG(RADEON_OV0_STEP_BY, step_by_y | (step_by_uv << 8)); + OUTREG(RADEON_OV0_STEP_BY, step_by_y | (step_by_uv << 8) | + predownscale << 4 | predownscale << 12); x_off = 8; y_off = 0;