[PATCH] cam: Convert RGB variations to BGR
Milan Zamazal
mzamazal at redhat.com
Mon May 12 20:00:08 CEST 2025
Pavel Machek <pavel at ucw.cz> writes:
> Hi!
>
>> > From looking at the code, soft ISP seemed to be able to do other stuff
>> > than ARGB, but for some reason ARGB is selected by default, and I
>> > guess I can get better performance by forcing right format.
>>
>> Software ISP debayering supports multiple output formats and `cam' can
>> request a particular output format. For example,
>>
>> cam -c1 -C4 -s pixelformat=BGR888 -Ffoo#.ppm
>>
>> outputs the right thing. Example of requesting an output in a different
>> format:
>>
>> cam -c1 -C4 -s pixelformat=ARGB8888 -Ffoo#.raw
>>
>> It works; is it a problem in your application?
>
> Well, problem is that if you do something like "cam -c1 -Ffoo#.ppm" it
> decides to use ARGB8888 and fails writing into ppm. That is not great.
Maybe `cam' could be enhanced to select BGR888, if available, in case
ppm file output is requested.
More information about the libcamera-devel
mailing list