[Mesa-dev] [Bug 49788] New: vega statetracker unpack methof for RGB 565 is wrong
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri May 11 04:22:44 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=49788
Bug #: 49788
Summary: vega statetracker unpack methof for RGB 565 is wrong
Classification: Unclassified
Product: Mesa
Version: git
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: medium
Component: Mesa core
AssignedTo: mesa-dev at lists.freedesktop.org
ReportedBy: andreas.betz at elektrobit.com
Hi,
i just wanted to show an RGB 565 image using the OpenVG emulation of mesa and
i've found that MESA calculates the RGB 565 wrong.
in src/galium/state_trackers/vega/cg_translate.c
function _vega_unpack_float_span_rgba
the case for VG_sRGB_565 is calculated the following way:
clr[0] = ((*src >> 10) & 31)/31.;
clr[1] = ((*src >> 5) & 95)/95.;
clr[2] = ((*src >> 0) & 31)/31.;
That is wrong.
The correct code is:
clr[0] = ((*src >> 11) & 31)/31.;
clr[1] = ((*src >> 5) & 63)/63.;
clr[2] = ((*src >> 0) & 31)/31.;
Greetings
Andy
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the mesa-dev
mailing list