Commit cdb214e1 authored by ming qian's avatar ming qian Committed by Nicolas Dufresne
Browse files

v4l2 support nv12_8l128 and nv12_10be_8l128

parent c5eedfc1
Pipeline #452147 waiting for manual action with stages
in 1 minute and 52 seconds
......@@ -636,6 +636,9 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */
#define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */
#define V4L2_PIX_FMT_NV12MT_8L128 v4l2_fourcc('N', 'A', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */
#define V4L2_PIX_FMT_NV12MT_10BE_8L128 v4l2_fourcc('N', 'T', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */
/* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
#define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
......
......@@ -152,6 +152,8 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = {
{V4L2_PIX_FMT_NV12M, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV12MT, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV12MT_16X16, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV12MT_8L128, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV12MT_10BE_8L128, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV21, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV21M, TRUE, GST_V4L2_RAW},
{V4L2_PIX_FMT_NV16, TRUE, GST_V4L2_RAW},
......@@ -1067,6 +1069,8 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt)
case V4L2_PIX_FMT_NV61: /* 16 Y/CrCb 4:2:2 */
case V4L2_PIX_FMT_NV61M: /* Same as NV61 */
case V4L2_PIX_FMT_NV24: /* 24 Y/CrCb 4:4:4 */
case V4L2_PIX_FMT_NV12MT_8L128:
case V4L2_PIX_FMT_NV12MT_10BE_8L128:
rank = YUV_ODD_BASE_RANK;
break;
......@@ -1343,6 +1347,12 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc)
case V4L2_PIX_FMT_NV12MT:
format = GST_VIDEO_FORMAT_NV12_64Z32;
break;
case V4L2_PIX_FMT_NV12MT_8L128:
format = GST_VIDEO_FORMAT_NV12_8L128;
break;
case V4L2_PIX_FMT_NV12MT_10BE_8L128:
format = GST_VIDEO_FORMAT_NV12_10BE_8L128;
break;
case V4L2_PIX_FMT_NV21:
case V4L2_PIX_FMT_NV21M:
format = GST_VIDEO_FORMAT_NV21;
......@@ -1511,6 +1521,8 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc)
case V4L2_PIX_FMT_NV12: /* 12 Y/CbCr 4:2:0 */
case V4L2_PIX_FMT_NV12M:
case V4L2_PIX_FMT_NV12MT:
case V4L2_PIX_FMT_NV12MT_8L128:
case V4L2_PIX_FMT_NV12MT_10BE_8L128:
case V4L2_PIX_FMT_NV21: /* 12 Y/CrCb 4:2:0 */
case V4L2_PIX_FMT_NV21M:
case V4L2_PIX_FMT_NV16: /* 16 Y/CbCr 4:2:2 */
......@@ -1791,6 +1803,12 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps,
case GST_VIDEO_FORMAT_NV12_64Z32:
fourcc_nc = V4L2_PIX_FMT_NV12MT;
break;
case GST_VIDEO_FORMAT_NV12_8L128:
fourcc_nc = V4L2_PIX_FMT_NV12MT_8L128;
break;
case GST_VIDEO_FORMAT_NV12_10BE_8L128:
fourcc_nc = V4L2_PIX_FMT_NV12MT_10BE_8L128;
break;
case GST_VIDEO_FORMAT_NV21:
fourcc = V4L2_PIX_FMT_NV21;
fourcc_nc = V4L2_PIX_FMT_NV21M;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment