summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2023-08-02 18:31:57 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2023-08-02 18:39:57 +0900
commit2cc3686c589bbcac7e06020647827e0420f71e54 (patch)
tree74d49383cfab52a452943821ac23cc4883355981
parent3d2ef6f3b42def3613b7b1c0af83fddf785786d6 (diff)
downloadlibtbm-vc4-2cc3686c589bbcac7e06020647827e0420f71e54.tar.gz
libtbm-vc4-2cc3686c589bbcac7e06020647827e0420f71e54.tar.bz2
libtbm-vc4-2cc3686c589bbcac7e06020647827e0420f71e54.zip
YUYV, YVYU, UYVY, VYUY format each four bytes is two pixels Change-Id: I0be7ff65eee266da0a7c4c1bcd832293445675b1
-rw-r--r--src/tbm_backend_vc4.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tbm_backend_vc4.c b/src/tbm_backend_vc4.c
index 6622966..4938377 100644
--- a/src/tbm_backend_vc4.c
+++ b/src/tbm_backend_vc4.c
@@ -611,6 +611,13 @@ tbm_vc4_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);
+ _align_height = SIZE_ALIGN(height, TBM_SURFACE_ALIGNMENT_HEIGHT_YUV);
+ _size = SIZE_ALIGN(_pitch * _align_height, TBM_SURFACE_ALIGNMENT_PLANE);
+ _bo_idx = 0;
+ break;
case HAL_TBM_FORMAT_AYUV:
bpp = 32;
_offset = 0;