diff options
author | Vasiliy Ulyanov <v.ulyanov@samsung.com> | 2016-02-11 12:12:23 +0300 |
---|---|---|
committer | Vasiliy Ulyanov <v.ulyanov@samsung.com> | 2016-05-24 14:34:36 +0300 |
commit | 3ebe62f47fa1e765c633425403bb6915ce87b89d (patch) | |
tree | e0b8adb75a41193177598d98f5af99f2a08549a5 | |
parent | d98c8ec78b523aec19bab5a1125fbe0ca7939e32 (diff) | |
download | emulator-yagl-accepted/tizen/ivi/20160526.110918.tar.gz emulator-yagl-accepted/tizen/ivi/20160526.110918.tar.bz2 emulator-yagl-accepted/tizen/ivi/20160526.110918.zip |
YaGL: Y-invert YUV imagessubmit/tizen/20160526.080841accepted/tizen/wearable/20160526.110857accepted/tizen/tv/20160526.110838accepted/tizen/mobile/20160526.110821accepted/tizen/ivi/20160526.110918accepted/tizen/common/20160526.150358
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.c | 5 |
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; |