[FFmpeg-user] Inconsistent format info vs demosaicing for bayer_rggb8
Sebastian Wallkötter
sebastian at wallkoetter.net
Fri Mar 4 18:48:49 EET 2022
Hi!
I'm trying to understand how ffmpeg goes about demosaicing and which Bayer formats are available. Currently, I'm looking at the bayer_rggb8 format, and what is confusing me is that the format info reports that the format has less than 8 bits per component:
https://github.com/FFmpeg/FFmpeg/blob/25c8507818d8559a6654a5b30a0f8aae11a48181/libavutil/pixdesc.c#L1942-L1966
However, when I look up how libswscale does the conversion, it treats the format as having 8bit in each element of the Bayer mosaic:
https://github.com/FFmpeg/FFmpeg/blob/1a502b99e818ee7b8b2b56c4f5c27e31f674c555/libswscale/bayer_template.c#L56-L70
How do these two things reconcile? I am quite certain that this is me misunderstanding something, so a pointer on what I am mixing up would be much appreciated.
Many thanks in advance!
Best,
Sebastian
More information about the ffmpeg-user
mailing list