History

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

Define one uncompressed capture format V4L2_PIX_FMT_MT2110R in order to support 10bit for H264 in mt8195.

Mingjia Zhang committed 3 years ago

Commit 1dff2be1 parent 6afcc2b4 files · +10 −0Browse files

Unified · Split

4 files
  1. Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +6 −0
  2. drivers/media/v4l2-core/v4l2-common.c +2 −0
  3. drivers/media/v4l2-core/v4l2-ioctl.c +1 −0
  4. include/uapi/linux/videodev2.h +1 −0
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst+6−0
@@ -282,6 +282,12 @@ please make a proposal on the linux-media mailing list. · 281 unmodified lines
282282 - This format is two-planar 10-Bit tile mode and having similitude with
283283 ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for VP9, AV1
284284 and HEVC.
285+ * .. _V4L2-PIX-FMT-MT2110R:
286+
287+ - ``V4L2_PIX_FMT_MT2110R``
288+ - 'MT2110R'
289+ - This format is two-planar 10-Bit raster mode and having similitude with
290+ ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling. Used for AVC.
285291 .. raw:: latex
286292
287293 \normalsize
drivers/media/v4l2-core/v4l2-common.c+2−0
@@ -264,6 +264,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) · 263 unmodified lines
264264 { .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 },
265265 { .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,
266266 .block_w = { 16, 8, 0, 0 }, .block_h = { 32, 16, 0, 0 }},
267+ { .format = V4L2_PIX_FMT_MT2110R, .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,
268+ .block_w = { 16, 8, 0, 0 }, .block_h = { 32, 16, 0, 0 }},
267269
268270 /* YUV planar formats */
269271 { .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 },
drivers/media/v4l2-core/v4l2-ioctl.c+1−0
@@ -1509,6 +1509,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) · 1508 unmodified lines
15091509 case V4L2_PIX_FMT_AJPG: descr = "Aspeed JPEG"; break;
15101510 case V4L2_PIX_FMT_AV1_FRAME: descr = "AV1 Frame"; break;
15111511 case V4L2_PIX_FMT_MT2110T: descr = "Mediatek 10bit Tile Mode"; break;
1512+ case V4L2_PIX_FMT_MT2110R: descr = "Mediatek 10bit Raster Mode"; break;
15121513 default:
15131514 if (fmt->description[0])
15141515 return;
include/uapi/linux/videodev2.h+1−0
@@ -797,6 +797,7 @@ struct v4l2_pix_format { · 796 unmodified lines
797797 #define V4L2_PIX_FMT_MT21C v4l2_fourcc('M', 'T', '2', '1') /* Mediatek compressed block mode */
798798 #define V4L2_PIX_FMT_MM21 v4l2_fourcc('M', 'M', '2', '1') /* Mediatek 8-bit block mode, two non-contiguous planes */
799799 #define V4L2_PIX_FMT_MT2110T v4l2_fourcc('M', 'T', '2', 'T') /* Mediatek 10-bit block tile mode */
800+#define V4L2_PIX_FMT_MT2110R v4l2_fourcc('M', 'T', '2', 'R') /* Mediatek 10-bit block raster mode */
800801 #define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
801802 #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */
802803 #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t