exynos: replace G2D_DOUBLE_TO_FIXED macro with function
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Tue, 24 Feb 2015 14:20:40 +0000 (15:20 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 10 Mar 2015 19:04:35 +0000 (19:04 +0000)
commit1d7e78d7877f054f7b96d6a35d50255e76aed44f
tree1f78133802b99ea91f1ac0daf3055b70c6cc6cfc
parent0ca03a4087a550646de7f26b6b53a932e8546474
exynos: replace G2D_DOUBLE_TO_FIXED macro with function

This also avoids the floating point conversion steps and just
uses pure integer arithmetic.
Since the G2D hardware scaling approach is a bit unintuitive,
document it in the function as well.

v2: Explicitly mention the normalization constant.
v3: Use common commenting style as pointed out by
    Emil Velikov <emil.l.velikov@gmail.com>.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
exynos/exynos_fimg2d.c
exynos/fimg2d.h