Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Commit

Permalink
include: v4l2: add needed formats for userspace libs
Browse files Browse the repository at this point in the history
Signed-off-by: Jesse Chan <[email protected]>
  • Loading branch information
Fevax authored and jesec committed Nov 4, 2017
1 parent 910f20b commit 0dcc452
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/uapi/linux/v4l2-mediabus.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
enum v4l2_mbus_pixelcode {
V4L2_MBUS_FMT_FIXED = 0x0001,

/* RGB - next is 0x100e */
/* RGB - next is 0x100f */
V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001,
V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002,
V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003,
Expand All @@ -50,7 +50,9 @@ enum v4l2_mbus_pixelcode {
V4L2_MBUS_FMT_RGB888_1X24 = 0x100a,
V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b,
V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c,
V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100d,
V4L2_MBUS_FMT_XRGB8888_4X8_BE = 0x100d,
V4L2_MBUS_FMT_XRGB8888_4X8_LE = 0x100e,
V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100f,

/* YUV (including grey) - next is 0x2024 */
V4L2_MBUS_FMT_Y8_1X8 = 0x2001,
Expand All @@ -73,6 +75,7 @@ enum v4l2_mbus_pixelcode {
V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010,
V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011,
V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012,
V4L2_MBUS_FMT_YUV8_1X24 = 0x2013,
V4L2_MBUS_FMT_YDYUYDYV8_1X16 = 0x2014,
V4L2_MBUS_FMT_UYVY10_1X20 = 0x201a,
V4L2_MBUS_FMT_VYUY10_1X20 = 0x201b,
Expand Down
72 changes: 72 additions & 0 deletions include/uapi/linux/videodev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,78 @@ struct v4l2_standard {
__u32 reserved[4];
};

/*
* V I D E O T I M I N G S D V P R E S E T
*/
struct v4l2_dv_preset {
__u32 preset;
__u32 reserved[4];
};

/*
* D V P R E S E T S E N U M E R A T I O N
*/
struct v4l2_dv_enum_preset {
__u32 index;
__u32 preset;
__u8 name[32]; /* Name of the preset timing */
__u32 width;
__u32 height;
__u32 reserved[4];
};

/*
* D V P R E S E T V A L U E S
*/
#define V4L2_DV_INVALID 0
#define V4L2_DV_480P59_94 1 /* BT.1362 */
#define V4L2_DV_576P50 2 /* BT.1362 */
#define V4L2_DV_720P24 3 /* SMPTE 296M */
#define V4L2_DV_720P25 4 /* SMPTE 296M */
#define V4L2_DV_720P30 5 /* SMPTE 296M */
#define V4L2_DV_720P50 6 /* SMPTE 296M */
#define V4L2_DV_720P59_94 7 /* SMPTE 274M */
#define V4L2_DV_720P60 8 /* SMPTE 274M/296M */
#define V4L2_DV_1080I29_97 9 /* BT.1120/ SMPTE 274M */
#define V4L2_DV_1080I30 10 /* BT.1120/ SMPTE 274M */
#define V4L2_DV_1080I25 11 /* BT.1120 */
#define V4L2_DV_1080I50 12 /* SMPTE 296M */
#define V4L2_DV_1080I60 13 /* SMPTE 296M */
#define V4L2_DV_1080P24 14 /* SMPTE 296M */
#define V4L2_DV_1080P25 15 /* SMPTE 296M */
#define V4L2_DV_1080P30 16 /* SMPTE 296M */
#define V4L2_DV_1080P50 17 /* BT.1120 */
#define V4L2_DV_1080P60 18 /* BT.1120 */
#define V4L2_DV_2160P24 19 /* BT.1120 */

#define V4L2_DV_480P60 19
#define V4L2_DV_1080I59_94 20
#define V4L2_DV_1080P59_94 21

#define V4L2_DV_720P60_FP 22
#define V4L2_DV_720P60_SB_HALF 23
#define V4L2_DV_720P60_TB 24
#define V4L2_DV_720P59_94_FP 25
#define V4L2_DV_720P59_94_SB_HALF 26
#define V4L2_DV_720P59_94_TB 27
#define V4L2_DV_720P50_FP 28
#define V4L2_DV_720P50_SB_HALF 29
#define V4L2_DV_720P50_TB 30
#define V4L2_DV_1080P24_FP 31
#define V4L2_DV_1080P24_SB_HALF 32
#define V4L2_DV_1080P24_TB 33
#define V4L2_DV_1080P23_98_FP 34
#define V4L2_DV_1080P23_98_SB_HALF 35
#define V4L2_DV_1080P23_98_TB 36
#define V4L2_DV_1080I60_SB_HALF 37
#define V4L2_DV_1080I59_94_SB_HALF 38
#define V4L2_DV_1080I50_SB_HALF 39
#define V4L2_DV_1080P60_SB_HALF 40
#define V4L2_DV_1080P60_TB 41
#define V4L2_DV_1080P30_FP 42
#define V4L2_DV_1080P30_SB_HALF 43
#define V4L2_DV_1080P30_TB 44

/*
* D V B T T I M I N G S
*/
Expand Down
11 changes: 11 additions & 0 deletions include/uapi/linux/videodev2_exynos_media.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@

#include <linux/videodev2.h>

/* added for lihwjpeg.so */

/* yuv444 of JFIF JPEG */
#define V4L2_PIX_FMT_JPEG_444 v4l2_fourcc('J', 'P', 'G', '4')
/* yuv422 of JFIF JPEG */
#define V4L2_PIX_FMT_JPEG_422 v4l2_fourcc('J', 'P', 'G', '2')
/* yuv420 of JFIF JPEG */
#define V4L2_PIX_FMT_JPEG_420 v4l2_fourcc('J', 'P', 'G', '0')
/* grey of JFIF JPEG */
#define V4L2_PIX_FMT_JPEG_GRAY v4l2_fourcc('J', 'P', 'G', 'G')

/*
* C O N T R O L S
*/
Expand Down

0 comments on commit 0dcc452

Please sign in to comment.