[PATCH] savage: Fix Xv scaling on non-native resolutions
mattst88 at gmail.com
Sat Sep 17 08:52:07 PDT 2011
On Sat, Sep 17, 2011 at 5:22 AM, Tormod Volden <lists.tormod at gmail.com> wrote:
> From: Hans-Juergen Mauser <hjmauser at gmx.net>
> If I set the resolution to 800x600 for example (to be able to use the
> TV output in full screen mode), I only can see 800/1024 = 0,78 of the
> real video width, no matter if the video is displayed in a small player
> window or enlarged to full screen. On the right of the video display,
> the remaining width is filled with a black (or sometimes blue) bar.
> The problem was mainly that only the drawing starting point was modified
> by the scaling factor, but not the size-defining end of the drawing
> Signed-off-by: Hans-Juergen Mauser <hjmauser at gmx.net>
> Reviewed-by: Tormod Volden <debian.tormod at gmail.com>
> src/savage_video.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
> diff --git a/src/savage_video.c b/src/savage_video.c
> index 9f860c7..7d571ad 100644
> --- a/src/savage_video.c
> +++ b/src/savage_video.c
> @@ -1508,9 +1508,13 @@ SavageDisplayVideoOld(
> drw_h = (float)(drw_h * psav->YExp1)/(float)psav->YExp2+1;
> dstBox->x1 = (float)(dstBox->x1 * psav->XExp1)/(float)psav->XExp2;
> dstBox->y1 = (float)(dstBox->y1 * psav->YExp1)/(float)psav->YExp2;
> + dstBox->x2 = (dstBox->x2 * psav->XExp1) / psav->XExp2;
> + dstBox->y2 = (dstBox->y2 * psav->YExp1) / psav->YExp2;
I'm wondering why the added lines don't have (float) casts when the
x1, y1 lines do? If they're not necessary, perhaps a follow-on patch
would be nice.
I don't know the hardware or Xv, but the changes look reasonable.
There are enough changes in -savage since the last release to warrant
a new one. Once this lands, let's do a new -savage release.
More information about the xorg-devel