gstreamer/subprojects/gst-plugins-bad/gst/bayer
Marek Vasut 4c92d4096e bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths
Add support for 10/12/14/16 bit depths . This consists of multiple parts.
First is the parsing of caps, which pulls out the bitness and endianness
from the video/x-bayer format.

Second, gst_bayer2rgb_split_and_upsample_horiz() is split into two similar
functions, one for 8bit bayer handling and another for 16bit bayer handling.
The content is basically identical, except one uses 8bpp and the other 16bpp
inputs and outputs, and they each use different ORC code to match. The 16bpp
variant also handles endian swapping. There is now a wrapper called
gst_bayer2rgb_split_and_upsample_horiz() which selects the correct function
based on bpp from the parser.

Third, gst_bayer2rgb_process() is extended to handle both 8bit and 16bit
bayer data. Yet again there are matching ORC functions to handle the 16bit
data. This time however the 16bit handling of data is slightly special. The
ORC is not able to emit opcodes for 'x2 mergelq', so the trick here is to
store the BG and GR longs into separate 'dtmp' temporary buffer, and then
do one more ORC post-processing step, compensate for the less-than-16bpp
bitness using left shift, and reorder them into the destination frame
using 'mergelq' .

Example usage:
```
$ gst-launch-1.0 videotestsrc ! \
    video/x-bayer,width=512,height=512,format=bggr16le ! \
    bayer2rgb ! \
    video/x-raw,format=RGBA64_LE ! \
    videoconvert ! \
    autovideosink
```

Example usage:
```
$ gst-launch-1.0 videotestsrc ! \
    video/x-raw,width=512,height=512,format=ARGB ! \
    rgb2bayer ! \
    video/x-bayer,format=bggr12le ! \
    bayer2rgb ! \
    video/x-raw,format=RGBA64_LE ! \
    videoconvert ! \
    autovideosink
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
..
gstbayer.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
gstbayer2rgb.c bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths 2023-06-15 08:26:12 +00:00
gstbayerelements.h Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
gstbayerorc-dist.c bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths 2023-06-15 08:26:12 +00:00
gstbayerorc-dist.h bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths 2023-06-15 08:26:12 +00:00
gstbayerorc.orc bayer2rgb: Support video/x-bayer 10/12/14/16 bit depths 2023-06-15 08:26:12 +00:00
gstrgb2bayer.c rgb2bayer: Support video/x-bayer 10/12/14/16 bit depths 2023-06-15 08:26:12 +00:00
gstrgb2bayer.h rgb2bayer: Support video/x-bayer 10/12/14/16 bit depths 2023-06-15 08:26:12 +00:00
meson.build meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00