media: vim2m: add bayer capture formats
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 1 Feb 2019 12:58:46 +0000 (07:58 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 1 Mar 2019 16:01:50 +0000 (11:01 -0500)
commit1875a7c857cb34632492a990da1e1e8f12ddc3c8
tree286d84a86ddd6851a97ae435c6328842e2e5ffbc
parent26b190053ec0db030697e2e19a8f8f13550b9ff7
media: vim2m: add bayer capture formats

The vim2m device is interesting to simulate a webcam. As most
sensors are arranged using bayer formats, the best is to support
to output data using those formats.

So, add support for them.

All 4 8-bit bayer formats tested with:

$ qvidcap -p &
$ v4l2-ctl --stream-mmap --stream-out-mmap --stream-to-host localhost --stream-lossless --stream-out-hor-speed 1 -v pixelformat=RGGB

It was tested also with GStreamer with:

$ gst-validate-1.0 filesrc location=some_video.mp4 ! qtdemux ! avdec_h264 ! videoconvert ! videoscale ! v4l2convert disable-passthrough=1 extra-controls="s,horizontal_flip=0,vertical_flip=0" ! bayer2rgb ! videoconvert ! xvimagesink

For all possible HFLIP/VFLIP values.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vim2m.c