From e4ae90ad5fd7a7c1d2a03b4641dc556bd7b348d6 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Wed, 2 Aug 2023 18:43:47 +0900 Subject: Fix stride of 4:2:2 YUV format YUYV, YVYU, UYVY, VYUY format each four bytes is two pixels Change-Id: Icebe4ccb49a312617be8ca7c155c0899fbe05bdf --- src/tbm_backend_dumb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tbm_backend_dumb.c b/src/tbm_backend_dumb.c index 6680e7a..ad38ca9 100644 --- a/src/tbm_backend_dumb.c +++ b/src/tbm_backend_dumb.c @@ -447,6 +447,12 @@ tbm_dumb_bufmgr_get_plane_data(hal_tbm_bufmgr *bufmgr, case HAL_TBM_FORMAT_YVYU: case HAL_TBM_FORMAT_UYVY: case HAL_TBM_FORMAT_VYUY: + bpp = 16; + _offset = 0; + _pitch = SIZE_ALIGN((width * bpp)>>3, TBM_SURFACE_ALIGNMENT_PITCH_YUV); + _size = SIZE_ALIGN(_pitch * height, TBM_SURFACE_ALIGNMENT_PLANE); + _bo_idx = 0; + break; case HAL_TBM_FORMAT_AYUV: bpp = 32; _offset = 0; -- cgit v1.2.3