mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 13:21:28 +00:00
4c92d4096e
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> |
||
---|---|---|
.. | ||
gstbayer.c | ||
gstbayer2rgb.c | ||
gstbayerelements.h | ||
gstbayerorc-dist.c | ||
gstbayerorc-dist.h | ||
gstbayerorc.orc | ||
gstrgb2bayer.c | ||
gstrgb2bayer.h | ||
meson.build |