This application was supporting only debayering of BGGR8 streams:
this is an issue on cameras that are outputting a different format.
Implement quick-debayering of all Bayer 8-bits pixfmts in order to
solve wrong tint issues on many, many camera sensors.
This was tested on a Sony Exmor-RS IMX300 sensor.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
The mbus has to be configured correctly for each of the pixel
formats in order to send the right indications to V4L2.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
As `dcraw_emu` is an example program, Debian doesn't install it to
`/usr/bin`, but to `/usr/lib/libraw` instead, meaning it can't be found
the usual way.
This patch checks for `/usr/lib/libraw/dcraw_emu` if `command` can't
find it. Additionnally, cascaded if's are replaced with if..elif
statements, so we stop searching as soon as a matching program
(preferably `dcraw_emu`) is found.
Instead of simply appending ".tiff" to the existing filename (like
`dcraw_emu` does), `dcraw` fully replaces the file extension, leading
`convert` to subsequently fail as it can't find the `.dng.tiff` file.
Redirecting streams using `&>` is not POSIX-compliant. This causes some
shells (such as `dash`) to evaluate `if` conditions the wrong way.
Sticking to standard `>` redirection fixes this issue.
Some locales use ',' as decimal separator instead of '.', which is taken
into account by sscanf when parsing floating point values.
This can lead to parsing failures for the `colormatrix` and
`forwardmatrix` config options. Setting LC_NUMERIC to "C" solves this
problem.