#4126 closed defect (outdated)
aspect ratio correction garbage pixels in recent snapshot
Reported by: | SF/ewelsh42 | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Graphics |
Version: | Keywords: | ||
Cc: | Game: |
Description
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.
Ticket imported from: #2542162. Ticket imported from: bugs/4126.
Attachments (1)
Change History (7)
by , 16 years ago
Attachment: | intern.h.diff added |
---|
comment:1 by , 16 years ago
Thank you for the report. It looks like this was already fixed the 27th, however. Could you confirm it works in current SVN?
comment:2 by , 16 years ago
Resolution: | → outdated |
---|---|
Status: | new → pending |
comment:3 by , 16 years ago
Status: | pending → new |
---|
comment:5 by , 16 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:6 by , 6 years ago
Component: | --Unset-- → Graphics |
---|
fix uint32 overflow in interpolate32_1_1()