• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /*  Four-character-code (FOURCC) */
9 #define v4l2_fourcc(a, b, c, d)\
10 	((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
11 #define v4l2_fourcc_be(a, b, c, d)	(v4l2_fourcc(a, b, c, d) | (1U << 31))
12 
13 /* Rockchip yuv422sp frame buffer compression encoder */
14 #define V4L2_PIX_FMT_FBC2     v4l2_fourcc('F', 'B', 'C', '2')
15 /* Rockchip yuv420sp frame buffer compression encoder */
16 #define V4L2_PIX_FMT_FBC0     v4l2_fourcc('F', 'B', 'C', '0')
17 #define V4L2_PIX_FMT_FBCG     v4l2_fourcc('F', 'B', 'C', 'G')
18 /* embedded data 8-bit */
19 #define V4l2_PIX_FMT_EBD8     v4l2_fourcc('E', 'B', 'D', '8')
20 /* shield pix data 16-bit */
21 #define V4l2_PIX_FMT_SPD16    v4l2_fourcc('S', 'P', 'D', '6')
22 
23 /* Vendor specific - used for Rockchip ISP1 camera sub-system */
24 #define V4L2_META_FMT_RK_ISP1_PARAMS	v4l2_fourcc('R', 'K', '1', 'P') /* Rockchip ISP1 params */
25 #define V4L2_META_FMT_RK_ISP1_STAT_3A	v4l2_fourcc('R', 'K', '1', 'S') /* Rockchip ISP1 3A statistics */
26 #define V4L2_META_FMT_RK_ISP1_STAT_LUMA	v4l2_fourcc('R', 'K', '1', 'L') /* Rockchip ISP1 luma statistics */
27 #define V4L2_META_FMT_RK_ISPP_PARAMS	v4l2_fourcc('R', 'K', 'P', 'P') /* Rockchip ISPP params */
28 #define V4L2_META_FMT_RK_ISPP_STAT	v4l2_fourcc('R', 'K', 'P', 'S') /* Rockchip ISPP statistics */
29 
30 /* sensor embedded data format */
31 #define MEDIA_BUS_FMT_EBD_1X8		0x5002
32 /* sensor shield pix data format */
33 #define MEDIA_BUS_FMT_SPD_2X8		0x5003
34 
35 #endif /* _UAPI_RK_VIDEO_FORMAT_H */
36