[ scummvm-Bugs-2542162 ] aspect ratio correction garbage pixels in recent snapshot

SourceForge.net noreply at sourceforge.net
Wed Jan 28 05:50:04 CET 2009


Bugs item #2542162, was opened at 2009-01-27 22:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2542162&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Graphics
Group: All Games
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Eric A. Welsh (ewelsh42)
Assigned to: Nobody/Anonymous (nobody)
Summary: aspect ratio correction garbage pixels in recent snapshot

Initial Comment:
Builds from a recent snapshot (January 26th, 2009) exhibit garbage pixels when aspect ratio correction is enabled, independent of which filter is used.  The error was traced back to a (recent?) change in graphics/scaler/intern.h

The interpolate32_1_1() function was overoptimized to save a bit shift.  ((A>>1) + (B>>1)) had been replaced with ((A + B) >> 1).  Unfortunately, adding A + B prior to downshifting can result in a uint32 overflow, resulting in garbage pixel colors.

Reverting to the previous non-overflowing version fixes the problem.  Diff attached.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2542162&group_id=37116




More information about the Scummvm-tracker mailing list