summaryrefslogtreecommitdiff
path: root/test/stream/stream_formats.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-05 23:24:29 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-07 19:18:45 +0300
commit843048499fe1f1f8cea74838c1e3436945c1b1b7 (patch)
tree4d7f10086430d702bb2bdc23f9062b05cc2d8465 /test/stream/stream_formats.cpp
parentf8f6bc657d37e67c9f90762c8862a11e498925cc (diff)
cam: drm: Support per-plane stride values
The stride is not always identical for all planes for multi-planar formats. Semi-planar YUV formats without horizontal subsampling often have a chroma stride equal to twice the luma stride, and tri-planar YUV formats with a 1/2 horizontal subsampling often have a chroma stride equal to half the luma stride. This isn't correctly taken into account when creating a DRM frame buffer, as the same stride is set for all planes. libcamera doesn't report per-plane stride values yet, but uses chroma strides that match the above description for all currently supported platforms. Calculation the chrome strides appropriately in the KMSSink class, and pass them to DRM::createFrameBuffer(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'test/stream/stream_formats.cpp')
0 files changed, 0 insertions, 0 deletions