Commit 6afcc2b0 authored by Mingjia Zhang's avatar Mingjia Zhang Committed by Mauro Carvalho Chehab
Browse files

media: mediatek: vcodec: Add capture format to support 10bit tile mode



Define one uncompressed capture format V4L2_PIX_FMT_MT2110T in order to
support 10bit for AV1/VP9/HEVC in mt8195.

Signed-off-by: default avatarMingjia Zhang <mingjia.zhang@mediatek.com>
Co-developed-by: default avatarYunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: default avatarYunfei Dong <yunfei.dong@mediatek.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 0934d375
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -275,6 +275,13 @@ please make a proposal on the linux-media mailing list.

        Decoder's implementation can be found here,
        `aspeed_codec <https://github.com/AspeedTech-BMC/aspeed_codec/>`__
    * .. _V4L2-PIX-FMT-MT2110T:

      - ``V4L2_PIX_FMT_MT2110T``
      - 'MT2110T'
      - This format is two-planar 10-Bit tile mode and having similitude with
        ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for VP9, AV1
        and HEVC.
.. raw:: latex

    \normalsize
+2 −0
Original line number Diff line number Diff line
@@ -262,6 +262,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format)
		{ .format = V4L2_PIX_FMT_VYUY,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 },
		{ .format = V4L2_PIX_FMT_Y212,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 4, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 1 },
		{ .format = V4L2_PIX_FMT_YUV48_12, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 1, .bpp = { 6, 0, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 1, .vdiv = 1 },
		{ .format = V4L2_PIX_FMT_MT2110T, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 2, .comp_planes = 2, .bpp = { 5, 10, 0, 0 }, .bpp_div = { 4, 4, 1, 1 }, .hdiv = 2, .vdiv = 2,
		  .block_w = { 16, 8, 0, 0 }, .block_h = { 32, 16, 0, 0 }},

		/* YUV planar formats */
		{ .format = V4L2_PIX_FMT_NV12,    .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },
+1 −0
Original line number Diff line number Diff line
@@ -1508,6 +1508,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
		case V4L2_PIX_FMT_QC10C:	descr = "QCOM Compressed 10-bit Format"; break;
		case V4L2_PIX_FMT_AJPG:		descr = "Aspeed JPEG"; break;
		case V4L2_PIX_FMT_AV1_FRAME:	descr = "AV1 Frame"; break;
		case V4L2_PIX_FMT_MT2110T:	descr = "Mediatek 10bit Tile Mode"; break;
		default:
			if (fmt->description[0])
				return;
+1 −0
Original line number Diff line number Diff line
@@ -796,6 +796,7 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_Z16      v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
#define V4L2_PIX_FMT_MT21C    v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode  */
#define V4L2_PIX_FMT_MM21     v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */
#define V4L2_PIX_FMT_MT2110T  v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */
#define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
#define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */
#define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */