xref: /OK3568_Linux_fs/kernel/include/uapi/linux/rk-video-format.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: (GPL-2.0+ WITH Linux-syscall-note) OR MIT
2  *
3  * Copyright (C) 2021 Rockchip Electronics Co., Ltd.
4  */
5 #ifndef _UAPI_RK_VIDEO_FORMAT_H
6 #define _UAPI_RK_VIDEO_FORMAT_H
7 
8 #include <linux/types.h>
9 
10 /*  Four-character-code (FOURCC) */
11 #define v4l2_fourcc(a, b, c, d)\
12 	((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
13 #define v4l2_fourcc_be(a, b, c, d)	(v4l2_fourcc(a, b, c, d) | (1U << 31))
14 
15 /* Rockchip yuv422sp frame buffer compression encoder */
16 #define V4L2_PIX_FMT_FBC2     v4l2_fourcc('F', 'B', 'C', '2')
17 /* Rockchip yuv420sp frame buffer compression encoder */
18 #define V4L2_PIX_FMT_FBC0     v4l2_fourcc('F', 'B', 'C', '0')
19 #define V4L2_PIX_FMT_FBCG     v4l2_fourcc('F', 'B', 'C', 'G')
20 /* embedded data 8-bit */
21 #define V4l2_PIX_FMT_EBD8     v4l2_fourcc('E', 'B', 'D', '8')
22 /* shield pix data 16-bit */
23 #define V4l2_PIX_FMT_SPD16    v4l2_fourcc('S', 'P', 'D', '6')
24 
25 /* Vendor specific - used for Rockchip ISP1 camera sub-system */
26 #define V4L2_META_FMT_RK_ISP1_PARAMS	v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 params */
27 #define V4L2_META_FMT_RK_ISP1_STAT_3A	v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A statistics */
28 #define V4L2_META_FMT_RK_ISP1_STAT_LUMA	v4l2_fourcc('R', 'K', '1', 'L') /* Rockchip ISP1 luma statistics */
29 #define V4L2_META_FMT_RK_ISPP_PARAMS	v4l2_fourcc('R', 'K', 'P', 'P') /* Rockchip ISPP params */
30 #define V4L2_META_FMT_RK_ISPP_STAT	v4l2_fourcc('R', 'K', 'P', 'S') /* Rockchip ISPP statistics */
31 
32 /* sensor embedded data format */
33 #define MEDIA_BUS_FMT_EBD_1X8		0x5002
34 /* sensor shield pix data format */
35 #define MEDIA_BUS_FMT_SPD_2X8		0x5003
36 
37 #endif /* _UAPI_RK_VIDEO_FORMAT_H */
38