* The Y/RGB and UV registers for the integer downscale factor are reverse to

the usual order of other registers, so I mixed it up: vertical downscaling
  is now working as expected as well.
* The downscaling factor was a tiny bit too low (one pixel from the view).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17414 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-05-10 14:48:38 +00:00
parent e3fe0cd725
commit fc88cd9396
2 changed files with 6 additions and 5 deletions

View File

@ -395,12 +395,13 @@ struct overlay_registers {
uint32 _reserved21[10];
// (0xa0) FASTHSCALE - fast horizontal downscale
uint16 horizontal_scale_rgb;
// (0xa0) FASTHSCALE - fast horizontal downscale (strangely enough,
// the next two registers switch the usual Y/RGB vs. UV order)
uint16 horizontal_scale_uv;
uint16 horizontal_scale_rgb;
// (0xa4) UVSCALEV - vertical downscale
uint16 vertical_scale_rgb;
uint16 vertical_scale_uv;
uint16 vertical_scale_rgb;
uint32 _reserved22[86];

View File

@ -562,8 +562,8 @@ intel_configure_overlay(overlay_token overlayToken, const overlay_buffer *buffer
registers->window_width = right - left;
registers->window_height = bottom - top;
uint32 horizontalScale = ((view->width - 1) << 12) / window->width;
uint32 verticalScale = ((view->height - 1) << 12) / window->height;
uint32 horizontalScale = (view->width << 12) / window->width;
uint32 verticalScale = (view->height << 12) / window->height;
uint32 horizontalScaleUV = horizontalScale >> 1;
uint32 verticalScaleUV = verticalScale >> 1;
horizontalScale = horizontalScaleUV << 1;