video: Fix errors in calculation of transform 28/253328/2 submit/tizen_6.0/20210209.075821
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 3 Dec 2020 22:59:24 +0000 (07:59 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Tue, 9 Feb 2021 07:21:58 +0000 (07:21 +0000)
It was discovered that change of video wasn't able to be applied with
the state, which was destination area out bound of screen with
WL_OUTPUT_TRANSFORM_90.

It turned out because of errors in calculation of transform. That error
made source(input) area empty and empty area cannot be applied.

The transform value which caused this issue was as follow:

wl_subsurface_set_position(840, 0)
wl_viewport_set_destination(1080, 1920)
wl_viewport_set_source(0, 1936, 1080, 2160)
wl_surface_set_buffer_transform(WL_OUTPUT_TRANSFORM_90)

* The state of output: size (1920x1080) transform (0)

Change-Id: I3134980d46305a03965076c843a568fd84f226d0

src/bin/video/iface/e_video_hwc.c

index a802817ed3ce932ebdab9f4dde38ed96ef13c515..d517ebf7117b5cbc5fdc12ddb5d474493de123e2 100644 (file)
@@ -812,13 +812,13 @@ _e_video_hwc_coord_transform(Eina_Rectangle *src_rect, Eina_Rectangle *dst_rect,
          *dx = sx, *dy = sy;
          break;
       case WL_OUTPUT_TRANSFORM_270:
-         *dx = sx, *dy = src_rect->w - sx;
+         *dx = sy, *dy = src_rect->w - sx;
          break;
       case WL_OUTPUT_TRANSFORM_180:
-         *dx = src_rect->w - sx, *dy = dst_rect->h - sy;
+         *dx = src_rect->w - sx, *dy = src_rect->h - sy;
          break;
       case WL_OUTPUT_TRANSFORM_90:
-         *dx = src_rect->y - sy, *dy = sx;
+         *dx = src_rect->h - sy, *dy = sx;
          break;
       case WL_OUTPUT_TRANSFORM_FLIPPED:
          *dx = src_rect->w - sx, *dy = sy;