19.08.2014 03:02, Keith Packard wrote:
Siarhei Siamashka <[email protected]> writes:

Do you have a reproducible testcase for this problem? Being off by
several pixels seems to be very wrong. Especially if this happens
often.

Non-affine transforms cause problems. I noticed this with RandR when
doing keystone correction.

Here's a simple example:

Desired matrix:

  33.13915858   15.17037037     -16384.00000000
  0.00000000    23.73634938     0.00000000
  -0.00057170   -0.00182142     25.70348287

Rounded to 16.16 fixed matrix:

  33.13916016   15.17036438     -16384.00000000
  0.00000000    23.73634338     0.00000000
  -0.00056458   -0.00181580     25.70347595

Actual bits:

  { 0x00014dba, 0x000098c6, 0xfd7b7d45 },
  { 0x00000000, 0x0000ef09, 0x00000000 },
  { 0xffffffff, 0xfffffffb, 0x000102d9 },

Take the point 2560,1600 and transform:

desired:        4348.04, 1780.87
actual:         4342.50, 1778.60

error:          5.99

Sorry, but I think that we have bigger problems. Please look at https://bugs.freedesktop.org/show_bug.cgi?id=39949 (which was a blocker for xserver-1.12 and makes mouse input on scaled displays unusable in some cases). Since there was no manpower to review that bug for years, I think that the best course for now is to prohibit all transforms that do not amount to mere translation. You can change my opinion by reviewing the patch in the bug.


Floating point format supports a wider range of values (unnecessary
if the rest of XRENDER remains restricted to 16-bit coordinates) but
has much worse accuracy in corner cases and is poorly predictable.
The 32-bit floating point format does not look like an obvious
upgrade over 16.16 fixed point.

Transforms are different than specifying geometry though; they actually
need the wide dynamic range offered by floating point.



_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


--
Alexander E. Patrakov
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to