diff options
author | Roman Kiryanov <rkir@google.com> | 2019-03-12 16:29:48 -0700 |
---|---|---|
committer | Roman Kiryanov <rkir@google.com> | 2019-03-12 16:41:02 -0700 |
commit | 87b0c2bd272dae3c64e7d6840765d3954011b095 (patch) | |
tree | 28f98c9a6b12617bef6c270e09048a0bffe3a17f /system/OpenglSystemCommon/FormatConversions.cpp | |
parent | 30d08183fc09725c5f36c14f835f49e1c4fc979d (diff) | |
download | goldfish-opengl-87b0c2bd272dae3c64e7d6840765d3954011b095.tar.gz |
Fix the V offset in rgb888_to_yuv420pandroid-q-preview-1
See yuv420p_to_rgb888, yuv420p looks this way in memory:
yyyyyy
yyyyyy
uuuvvv (all U components first and then all V ones)
Bug: 128451131
Test: make -j
Change-Id: Icba7682d124e7a14a2e37edbc1543ac9390a6e7c
Signed-off-by: Roman Kiryanov <rkir@google.com>
Diffstat (limited to 'system/OpenglSystemCommon/FormatConversions.cpp')
-rw-r--r-- | system/OpenglSystemCommon/FormatConversions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/OpenglSystemCommon/FormatConversions.cpp b/system/OpenglSystemCommon/FormatConversions.cpp index d994138e..53f0e838 100644 --- a/system/OpenglSystemCommon/FormatConversions.cpp +++ b/system/OpenglSystemCommon/FormatConversions.cpp @@ -168,7 +168,7 @@ void rgb888_to_yuv420p(char* dest, char* src, int width, int height, for (int j = top; j <= bottom; ++j) { uint8_t *yv12_y = yv12_y0 + j * yStride; uint8_t *yv12_u = yv12_u0 + (j/2) * cStride; - uint8_t *yv12_v = yv12_u + cStride; + uint8_t *yv12_v = yv12_u + cSize; uint8_t *rgb_ptr = rgb_ptr0 + get_rgb_offset(j, width, rgb_stride); bool jeven = (j & 1) == 0; for (int i = left; i <= right; ++i) { |