Supporting V4L2_PIX_FMT_SBGGR12P format in camera_common.c and sensor_common.c

I am trying to add the support for V4L2_PIX_FMT_SBGGR12P in camera_common.c in camera_common_color_fmts.

I am seeing that there I can follow below post for adding support for V4L2_PIX_FMT_SBGGR12 as below (seeing this post)


For V4L2_PIX_FMT_SBGGR12, I can find entries in v4l2-common.c and

{ .format = V4L2_PIX_FMT_SBGGR12, .pixel_enc = V4L2_PIXEL_ENC_BAYER, .mem_planes = 1, .comp_planes = 1, .bpp = { 2, 0, 0, 0 }, .hdiv = 1, .vdiv = 1 },

(If i use pixel_t)

        else if (strncmp(pixel_t, "bayer_bggr12", size) == 0)
                *format = V4L2_PIX_FMT_SBGGR12;

Also for MEDIA_BUS_FMT_SBGGR12_1X12 its defined in include/uapi/linux/media-bus-format.h

But, when I try to add support for V4L2_PIX_FMT_SBGGR12P I cannot find and definition in the code v4l2-common.c and sensor_common.c (for bayer_bggr12 for packed). Also the bigger problem is I see no define for MEDIA_BUS_FMT_SBGGR12_1X12 (for packed format) in uapi/linux/media-bus-format.h.

So could any one know how to add support for BGGR12P and if the support is available in upstream?

hello sau,

please refer to Xavier TRM and dig into [7.2.2 Video Input (VI)] chapter.
you may check [ PIXFMT] for the support formats. this format BGGR12P is not supported.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.