linux/drivers/media
Pedro Terra 9b4a9b31b9 media: vimc: Enable set resolution at the scaler src pad
Modify the scaler subdevice to accept setting the resolution of the source
pad (previously the source resolution would always be 3 times the sink for
both dimensions). Now any resolution can be set at src (even smaller ones)
and the sink video will be scaled to match it.

Test example: With the vimc module up (using the default vimc topology)
media-ctl -d platform:vimc -V '"Sensor A":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Debayer A":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Scaler":0[fmt:RGB888_1X24/640x480]'
media-ctl -d platform:vimc -V '"Scaler":0[crop:(100,50)/400x150]'
media-ctl -d platform:vimc -V '"Scaler":1[fmt:RGB888_1X24/300x700]'
v4l2-ctl -z platform:vimc -d "RGB/YUV Capture" -v width=300,height=700
v4l2-ctl -z platform:vimc -d "Raw Capture 0" -v pixelformat=BA81
v4l2-ctl --stream-mmap --stream-count=10 -z platform:vimc -d "RGB/YUV Capture" \
	--stream-to=test.raw

The result will be a cropped stream that can be checked with the command
ffplay -loglevel warning -v info -f rawvideo -pixel_format rgb24 \
	-video_size "300x700" test.raw

Co-developed-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com>
Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@gmail.com>
Co-developed-by: Gabriel Francisco Mandaji <gfmandaji@gmail.com>
Signed-off-by: Gabriel Francisco Mandaji <gfmandaji@gmail.com>
Signed-off-by: Pedro Terra <pedro@terraco.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-09-30 10:07:59 +02:00
..
cec media: cec-pin: fix off-by-one SFT check 2021-09-30 10:07:54 +02:00
common media: videobuf2: handle non-contiguous DMA allocations 2021-09-30 10:07:57 +02:00
dvb-core media: videobuf2: add queue memory coherency parameter 2021-09-30 10:07:57 +02:00
dvb-frontends media: cxd2820r: include the right header 2021-09-30 10:07:43 +02:00
firewire media: firewire: firedtv-avc: fix a buffer overflow in avc_ca_pmt() 2021-09-30 10:07:54 +02:00
i2c media: i2c: ths8200 needs V4L2_ASYNC 2021-09-30 10:07:58 +02:00
mc media: Request API is no longer experimental 2021-09-30 10:07:55 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: saa7164: Remove redundant assignment of pointer t 2021-09-30 10:07:59 +02:00
platform media: rcar-vin: Use user provided buffers when starting 2021-09-30 10:07:59 +02:00
radio media: radio: si4713: constify static struct v4l2_ioctl_ops 2021-06-02 13:26:11 +02:00
rc media: rc: sunxi-cir: Make use of the helper function devm_platform_ioremap_resource() 2021-09-30 10:07:51 +02:00
spi media: cxd2880-spi: Fix a null pointer dereference on error handling path 2021-09-30 10:07:40 +02:00
test-drivers media: vimc: Enable set resolution at the scaler src pad 2021-09-30 10:07:59 +02:00
tuners media: tuners: mxl5007t: Removed unnecessary 'return' 2021-09-30 10:07:40 +02:00
usb media: usb: stkwebcam: Update the reference count of the usb device structure 2021-09-30 10:07:58 +02:00
v4l2-core media: videobuf2: handle V4L2_MEMORY_FLAG_NON_COHERENT flag 2021-09-30 10:07:57 +02:00
Kconfig media: Correct 'so' 2021-03-22 11:52:09 +01:00
Makefile