[FFmpeg-user] Inconsistent format info vs demosaicing for bayer_rggb8

Paul B Mahol onemda at gmail.com
Fri Mar 4 19:34:43 EET 2022


On 3/4/22, Sebastian Wallkötter <sebastian at wallkoetter.net> wrote:
> 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!

It is there as stub and meaningless.

When debayering ffmpeg uses all bits in pattern.
There are bunch of ways how to do debayering.

>
> Best,
> Sebastian
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list