linux-stable/drivers/media/test-drivers/vivid
Max Staudt f0b4a2c037 media: vivid: Extend FPS rates offered by simulated webcam
This adds an option for higher frame rates from a simulated webcam.

Currently, vivid emulates (amongst other things) a webcam with somewhat
limited bandwidth - higher resolutions deliver fewer frames per second.

$ yavta --enum-formats -c /dev/video0
Device /dev/video0 opened.
Device `vivid' on `platform:vivid-000' (driver 'vivid') supports video, capture, without mplanes.
- Available formats:
	Format 0: YUYV (56595559)
	Type: Video capture (1)
	Name: YUYV 4:2:2
	Frame size: 320x180 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30, 1/40, 1/50, 1/60)
	Frame size: 640x360 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30, 1/40)
	Frame size: 640x480 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25)
	Frame size: 1280x720 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25)
	Frame size: 1920x1080 (1/1, 1/2, 1/4, 1/5)
	Frame size: 3840x2160 (1/1, 1/2)

In some test cases, it is useful to allow for higher frame rates, as
configurations such as 720p@30 FPS have become commonplace now.

This patch allows:
   0- 719p - 120fps
 720-1079p - 60fps
1080-2159p - 30fps
     2160p - 15fps

$ yavta --enum-formats -c /dev/video0
Device /dev/video0 opened.
Device `vivid' on `platform:vivid-000' (driver 'vivid') supports video, capture, without mplanes.
- Available formats:
	Format 0: YUYV (56595559)
	Type: Video capture (1)
	Name: YUYV 4:2:2
	Frame size: 320x180 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30, 1/40, 1/50, 1/60, 1/120)
	Frame size: 640x360 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30, 1/40, 1/50, 1/60, 1/120)
	Frame size: 640x480 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30, 1/40, 1/50, 1/60, 1/120)
	Frame size: 1280x720 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30, 1/40, 1/50, 1/60)
	Frame size: 1920x1080 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15, 1/25, 1/30)
	Frame size: 3840x2160 (1/1, 1/2, 1/4, 1/5, 1/10, 2/25, 1/15)

Passes: v4l2-compliance 1.25.0-5039 from v4l-utils git ccc08732823f

Signed-off-by: Max Staudt <mstaudt@chromium.org>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: unsigned -> unsigned int]
2023-05-25 16:21:20 +02:00
..
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile
vivid-cec.c media: vivid: add signal-free time for cec message xfer 2021-09-30 10:07:55 +02:00
vivid-cec.h media: vivid: add signal-free time for cec message xfer 2021-09-30 10:07:55 +02:00
vivid-core.c media: vivid-core: Convert to platform remove callback returning void 2023-04-11 16:59:21 +02:00
vivid-core.h media: vivid: drop bitmap and clipping output overlay support 2023-03-20 00:30:27 +01:00
vivid-ctrls.c vivid: add INTEGER and INTEGER64 test control arrays 2022-10-24 19:03:53 +02:00
vivid-ctrls.h
vivid-kthread-cap.c media: vivid: drop bitmap and clipping output overlay support 2023-03-20 00:30:27 +01:00
vivid-kthread-cap.h
vivid-kthread-out.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vivid-kthread-out.h
vivid-kthread-touch.c media: vivid: use time_is_after_jiffies() instead of open coding it 2022-02-22 09:41:13 +01:00
vivid-kthread-touch.h
vivid-meta-cap.c
vivid-meta-cap.h
vivid-meta-out.c
vivid-meta-out.h
vivid-osd.c media: vivid: drop GFP_DMA32 2022-10-25 16:43:00 +01:00
vivid-osd.h
vivid-radio-common.c
vivid-radio-common.h
vivid-radio-rx.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vivid-radio-rx.h
vivid-radio-tx.c
vivid-radio-tx.h
vivid-rds-gen.c
vivid-rds-gen.h
vivid-sdr-cap.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vivid-sdr-cap.h
vivid-touch-cap.c treewide: use get_random_u32_below() instead of deprecated function 2022-11-18 02:15:15 +01:00
vivid-touch-cap.h
vivid-vbi-cap.c media: vivid: use vb2_queue_change_type 2021-06-08 12:06:55 +02:00
vivid-vbi-cap.h
vivid-vbi-gen.c media: vivid: remove redundant assignment to variable checksum 2022-10-24 19:03:54 +02:00
vivid-vbi-gen.h
vivid-vbi-out.c
vivid-vbi-out.h
vivid-vid-cap.c media: vivid: Extend FPS rates offered by simulated webcam 2023-05-25 16:21:20 +02:00
vivid-vid-cap.h media: vivid: drop overlay support 2023-03-20 00:29:46 +01:00
vivid-vid-common.c media: vivid: Add support for the new YUVA and YUVX formats 2022-07-15 15:01:51 +01:00
vivid-vid-common.h
vivid-vid-out.c media: vivid: drop bitmap and clipping output overlay support 2023-03-20 00:30:27 +01:00
vivid-vid-out.h