summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasiliy Ulyanov <v.ulyanov@samsung.com>2016-02-11 12:12:23 +0300
committerVasiliy Ulyanov <v.ulyanov@samsung.com>2016-05-24 14:34:36 +0300
commit3ebe62f47fa1e765c633425403bb6915ce87b89d (patch)
treee0b8adb75a41193177598d98f5af99f2a08549a5
parentd98c8ec78b523aec19bab5a1125fbe0ca7939e32 (diff)
downloademulator-yagl-3ebe62f47fa1e765c633425403bb6915ce87b89d.tar.gz
emulator-yagl-3ebe62f47fa1e765c633425403bb6915ce87b89d.tar.bz2
emulator-yagl-3ebe62f47fa1e765c633425403bb6915ce87b89d.zip
EGL images created from tbm surfaces appear flipped vertically. In case of planar data we have to make conversion anyway so it can be handled as well. Change-Id: I8242bdffdd1f0340b616cb1f5912ea51a5c27026 Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
-rw-r--r--EGL/yagl_onscreen_image_tizen_sfc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/EGL/yagl_onscreen_image_tizen_sfc.c b/EGL/yagl_onscreen_image_tizen_sfc.c
index aa750b3..44fdf4d 100644
--- a/EGL/yagl_onscreen_image_tizen_sfc.c
+++ b/EGL/yagl_onscreen_image_tizen_sfc.c
@@ -94,6 +94,7 @@ static bool yagl_onscreen_image_tizen_sfc_convert(struct yagl_onscreen_image_tiz
}
dst = image->drm_sfc->gem.vaddr;
+ dst += info.width * info.height - info.width;
switch (info.format) {
case TBM_FORMAT_NV21:
@@ -103,7 +104,7 @@ static bool yagl_onscreen_image_tizen_sfc_convert(struct yagl_onscreen_image_tiz
v = info.planes[1].ptr[i * info.width / 2 + (j & ~1) + 0];
u = info.planes[1].ptr[i * info.width / 2 + (j & ~1) + 1];
- *dst++ = yuv2argb(y, u, v);
+ *(dst - i * info.width + j) = yuv2argb(y, u, v);
}
}
break;
@@ -114,7 +115,7 @@ static bool yagl_onscreen_image_tizen_sfc_convert(struct yagl_onscreen_image_tiz
u = info.planes[1].ptr[(i / 2) * (info.width / 2) + (j / 2)];
v = info.planes[2].ptr[(i / 2) * (info.width / 2) + (j / 2)];
- *dst++ = yuv2argb(y, u, v);
+ *(dst - i * info.width + j) = yuv2argb(y, u, v);
}
}
break;