提交 2c42cdba 编写于 作者: M Mikhail Ulyanov 提交者: Mauro Carvalho Chehab

[media] V4L2: platform: Add Renesas R-Car JPEG codec driver

Here's the driver for the Renesas R-Car JPEG processing unit.

The driver is implemented within the V4L2 framework as a memory-to-memory
device.  It presents two video nodes to userspace, one for the encoding part,
and one for the decoding part.

It was found that the only working mode for encoding is no markers output, so we
generate markers with software. In the current version of driver we also use
software JPEG header parsing because with hardware parsing performance is lower
than desired.

>From a userspace point of view the process is typical (S_FMT, REQBUF,
optionally QUERYBUF, QBUF, STREAMON, DQBUF) for both the source and destination
queues. STREAMON can return -EINVAL in case of mismatch of output and capture
queues format. Also during decoding driver can return buffers if queued
buffer with JPEG image contains image with inappropriate subsampling (e.g.
4:2:0 in JPEG and 4:2:2 in capture).  If JPEG image and queue format dimensions
differ driver will return buffer on QBUF with VB2_BUF_STATE_ERROR flag.

During encoding the available formats are: V4L2_PIX_FMT_NV12M,
V4L2_PIX_FMT_NV12, V4L2_PIX_FMT_NV16, V4L2_PIX_FMT_NV16M for source and
V4L2_PIX_FMT_JPEG for destination.

During decoding the available formats are: V4L2_PIX_FMT_JPEG for source and
V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_NV16M, V4L2_PIX_FMT_NV12, V4L2_PIX_FMT_NV16
for destination.

Performance of current version:
1280x800 NV12 image encoding/decoding
	decoding ~122 FPS
	encoding ~191 FPS
Signed-off-by: NMikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 6951813e
...@@ -231,6 +231,18 @@ config VIDEO_SH_VEU ...@@ -231,6 +231,18 @@ config VIDEO_SH_VEU
Support for the Video Engine Unit (VEU) on SuperH and Support for the Video Engine Unit (VEU) on SuperH and
SH-Mobile SoCs. SH-Mobile SoCs.
config VIDEO_RENESAS_JPU
tristate "Renesas JPEG Processing Unit"
depends on VIDEO_DEV && VIDEO_V4L2
depends on ARCH_SHMOBILE || COMPILE_TEST
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
---help---
This is a V4L2 driver for the Renesas JPEG Processing Unit.
To compile this driver as a module, choose M here: the module
will be called rcar_jpu.
config VIDEO_RENESAS_VSP1 config VIDEO_RENESAS_VSP1
tristate "Renesas VSP1 Video Processing Engine" tristate "Renesas VSP1 Video Processing Engine"
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && HAS_DMA
......
...@@ -44,6 +44,7 @@ obj-$(CONFIG_VIDEO_SH_VOU) += sh_vou.o ...@@ -44,6 +44,7 @@ obj-$(CONFIG_VIDEO_SH_VOU) += sh_vou.o
obj-$(CONFIG_SOC_CAMERA) += soc_camera/ obj-$(CONFIG_SOC_CAMERA) += soc_camera/
obj-$(CONFIG_VIDEO_RENESAS_JPU) += rcar_jpu.o
obj-$(CONFIG_VIDEO_RENESAS_VSP1) += vsp1/ obj-$(CONFIG_VIDEO_RENESAS_VSP1) += vsp1/
obj-y += omap/ obj-y += omap/
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册