sw_engine: float casted on the unsigned int type 01/289001/1
authorMira Grudzinska <m.grudzinska@samsung.com>
Thu, 20 Jan 2022 12:55:05 +0000 (13:55 +0100)
committerMichal Szczecinski <mihashco89@gmail.com>
Mon, 27 Feb 2023 08:22:25 +0000 (09:22 +0100)
uint32_t -> int32_t

Change-Id: I33a7ba842a19acafc2cbe9bfa4bc8f6f79ba7658

src/lib/sw_engine/tvgSwImage.cpp

index 9b57700..f24d2d6 100644 (file)
@@ -84,8 +84,8 @@ bool imagePrepare(SwImage* image, const Matrix* transform, const SwBBox& clipReg
 
     //Fast track: Non-transformed image but just shifted.
     if (image->direct) {
-        image->ox = -static_cast<uint32_t>(round(transform->e13));
-        image->oy = -static_cast<uint32_t>(round(transform->e23));
+        image->ox = -static_cast<int32_t>(round(transform->e13));
+        image->oy = -static_cast<int32_t>(round(transform->e23));
     //Figure out the scale factor by transform matrix
     } else {
         auto scaleX = sqrtf((transform->e11 * transform->e11) + (transform->e21 * transform->e21));