local preview with DRM
diff --git a/xcore/v4l2_buffer_proxy.cpp b/xcore/v4l2_buffer_proxy.cpp
index 64e7fb5..c867a59 100644
--- a/xcore/v4l2_buffer_proxy.cpp
+++ b/xcore/v4l2_buffer_proxy.cpp
@@ -72,7 +72,7 @@
info.offsets[0] = 0;
info.offsets[1] = info.strides [0] * format.fmt.pix.height;
break;
- case V4L2_PIX_FMT_YUV422P: // 422
+ case V4L2_PIX_FMT_YUV422P: // 422 Planar
info.components = 3;
info.strides [0] = format.fmt.pix.bytesperline / 2;
info.strides [1] = info.strides [0] / 2 ;
@@ -81,6 +81,11 @@
info.offsets[1] = info.strides [0] * format.fmt.pix.height;
info.offsets[2] = info.offsets[1] + info.strides [1] * format.fmt.pix.height;
break;
+ case V4L2_PIX_FMT_YUYV: // 422
+ info.components = 1;
+ info.strides [0] = format.fmt.pix.bytesperline;
+ info.offsets[0] = 0;
+ break;
default:
XCAM_LOG_WARNING (
"unknown v4l2 format(%s) to video info",