diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-07-05 15:23:56 +0200 |
---|---|---|
committer | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2023-09-08 17:42:38 +0000 |
commit | 8e5286d4f982b7dd372a8747d5cf55438e74d02d (patch) | |
tree | 19f5af5263ac9f16467a42eff23699a3a614fdca | |
parent | cd3b248cdceacad1ad5cdf146ad8c95fbdd66240 (diff) |
util: add pattern support for DRM_FORMAT_NV{24,42}
Add support for drawing the SMPTE and tiles patterns in buffers using
semi-planar YUV formats with non-subsampled chroma planes.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2:
- Add Reviewed-by.
-rw-r--r-- | tests/util/pattern.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/util/pattern.c b/tests/util/pattern.c index 158c0b16..f45a26cc 100644 --- a/tests/util/pattern.c +++ b/tests/util/pattern.c @@ -698,6 +698,8 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3], case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: + case DRM_FORMAT_NV24: + case DRM_FORMAT_NV42: u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1; v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1; return fill_smpte_yuv_planar(&info->yuv, planes[0], u, v, @@ -1023,6 +1025,8 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3], case DRM_FORMAT_NV21: case DRM_FORMAT_NV16: case DRM_FORMAT_NV61: + case DRM_FORMAT_NV24: + case DRM_FORMAT_NV42: u = info->yuv.order & YUV_YCbCr ? planes[1] : planes[1] + 1; v = info->yuv.order & YUV_YCrCb ? planes[1] : planes[1] + 1; return fill_tiles_yuv_planar(info, planes[0], u, v, |