[libcamera-devel] [PATCH v2 10/18] libcamera: software_isp: Add DebayerCpu class
Pavel Machek
pavel at ucw.cz
Sun Jan 14 18:01:36 CET 2024
Hi!
> Add CPU based debayering implementation. This initial implementation
> only supports debayering packed 10 bits per pixel bayer data in
> the 4 standard bayer orders.
>
> Doxygen documentation by Dennis Bonke.
> +++ b/include/libcamera/internal/software_isp/debayer_cpu.h
> +/**
> + * \class DebayerCpu
> + * \brief Class for debayering on the CPU
> + *
> + * Implementation for CPU based debayering
> + */
> +class DebayerCpu : public Debayer, public Object
> +{
> +public:
> + /*
> + * FIXME this should be a plain (implementation independent) SwStats
> + * this can be fixed once getStats() is dropped.
> + */
Is the FIXME still applicable?
> + /* Skip 30 frames for things to stabilize then measure 30 frames */
> + static const int framesToSkip = 30;
> + static const int framesToMeasure = 60;
> +};
Should the stats be somehow optional? I guess setting framesToMeasure
to -1 does that.
> +// RGR
> +// GBG
> +// RGR
> +#define BGGR_BGR888(p, n, div) \
> + *dst++ = blue_[curr[x] / (div)]; \
> + *dst++ = green_[(prev[x] + curr[x - p] + curr[x + n] + next[x]) / (4 * (div))]; \
> + *dst++ = red_[(prev[x - p] + prev[x + n] + next[x - p] + next[x + n]) / (4 * (div))]; \
> + x++;
I'm not exactly happy about these macros. I'd really like inline
functions; but I guess this can be revisited post-merge, perhaps at
the same time as extending outputformats.
> +/* TODO: this ignores outputFormat since there is only 1 supported
outputFormat for now */
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20240114/d99769cc/attachment.sig>
More information about the libcamera-devel
mailing list