-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
staging: vc04_services: Add a V4L2 M2M codec driver
This adds a V4L2 memory to memory device that wraps the MMAL video decode and video_encode components for H264 and MJPEG encode and decode, MPEG4, H263, and VP8 decode (and MPEG2 decode if the appropriate licence has been purchased). Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
- Loading branch information
Showing
6 changed files
with
2,408 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
config VIDEO_CODEC_BCM2835 | ||
tristate "BCM2835 Video codec support" | ||
depends on MEDIA_SUPPORT | ||
depends on VIDEO_V4L2 && (ARCH_BCM2835 || COMPILE_TEST) | ||
select BCM2835_VCHIQ_MMAL | ||
select VIDEOBUF2_DMA_CONTIG | ||
select V4L2_MEM2MEM_DEV | ||
help | ||
Say Y here to enable the V4L2 video codecs for | ||
Broadcom BCM2835 SoC. This operates over the VCHIQ interface | ||
to a service running on VideoCore. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
bcm2835-codec-objs := bcm2835-v4l2-codec.o | ||
|
||
obj-$(CONFIG_VIDEO_CODEC_BCM2835) += bcm2835-codec.o | ||
|
||
ccflags-y += \ | ||
-Idrivers/staging/vc04_services \ | ||
-D__VCCOREVER__=0x04000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
1) Convert to be a platform driver. | ||
|
||
Right now when the module probes, it tries to initialize VCHI and | ||
errors out if it wasn't ready yet. If bcm2835-v4l2 was built in, then | ||
VCHI generally isn't ready because it depends on both the firmware and | ||
mailbox drivers having already loaded. | ||
|
||
We should have VCHI create a platform device once it's initialized, | ||
and have this driver bind to it, so that we automatically load the | ||
v4l2 module after VCHI loads. | ||
|
||
2) Support SELECTION API to define crop region on the image for encode. | ||
|
||
Particularly for resolutions that aren't a multiple of the macroblock | ||
size, the codec will report a resolution that is a multiple of the macroblock | ||
size (it has to have the memory to decode into), and then a different crop | ||
region within that buffer. | ||
The most common example is 1080P, where the buffer will be 1920x1088 with a | ||
crop region of 1920x1080. | ||
|
||
3) Refactor so that the component creation is only on queue_setup, not open. | ||
|
||
Fixes v4l2-compliance failure on trying to open 100 instances of the | ||
device. |
Oops, something went wrong.