Commit graph

9 commits

Author SHA1 Message Date
Marek Vasut 920851945f bayer2rgb: Add comment on bayer_orc_horiz_upsample
Explain how the bayer_orc_horiz_upsample function works and
what it does with the pixels, as this may not be obvious.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 4efe11a705 bayer2rgb: Pass filter pointer into gst_bayer2rgb_split_and_upsample_horiz()
Instead of passing a single element of GstBayer2RGB structure into the
gst_bayer2rgb_split_and_upsample_horiz(), pass the entire pointer and
let the funciton pick out whatever it needs out of the structure. This
is a preparatory patch. No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut fbd02b3e2a bayer2rgb: Pass all parameters to LINE() macro
Pass all three parameters used by the LINE() macro to the LINE() macro
and unroll the code for readability. Add more comments regarding which
of these LINE()s point to which data in the temporary buffer to make
the code less confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 8bec6828f4 bayer2rgb: Fold src_stride into gst_bayer2rgb_process()
The source stride parameter can be easily obtained from GstBayer2RGB
structure, do it within gst_bayer2rgb_process() and drop the parameter.
No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut ddcb45ffc0 bayer2rgb: Inline the j=0 value
The j variable is used as an iterator further down in this code, but
here it can be just inlined in the macro parameters to make the code
easier to read. This is done in preparation for further changes. No
functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 484e31c1d9 bayer2rgb: Disable in-place transform
The bayer2rgb process implemented doesn't support in-place tranform.
This element doesn't implement a "transform_ip" vmethod of
GstBaseTransform it will revert to using the "tranform" vmethod.
It's misleading to set it to TRUE, here. Change this to FALSE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Marek Vasut 0763fb107d rgb2bayer: Support video/x-bayer 10/12/14/16 bit depths
Add support for conversion to 10/12/14/16 bit bayer pattern.
The implementation is rather simplistic, just take the ARGB
input, generate 16-bit data out of it instead of 8-bit, shift
them as required by the output bitness, and apply endian swap.

Example usage:
```
$ gst-launch-1.0 videotestsrc num-buffers=1 ! \
    video/x-raw,width=512,height=512,format=ARGB ! \
    rgb2bayer ! \
    video/x-bayer,format=bggr12le ! \
    filesink location=/tmp/bayer12.raw
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4686>
2023-06-15 08:26:12 +00:00
Thibault Saunier 6a4425e46a meson: Call pkgconfig.generate in the loop where we declare plugins dependencies
Removing some copy pasted code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2970>
2022-09-01 21:17:35 +00:00
Thibault Saunier 019971a3c7 Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00