v4l2src0: "Could not negotiate format" with V4L2_PIX_FMT_SBGGR16

v4l2src0: "Could not negotiate format" with V4L2_PIX_FMT_SBGGR16

This question is not answered

Hello (HELP!),

We have an Aptina LI-5M03 CCDC camera for the Leopardboard (MT0P031).
This produces a 12-bit output in Bayer format.  We would like to use
16-bit Bayer define for Video4Linux using the RidgeRun SDK.
Currently, I see that the code sets the .pix_fmt to
V4L2_PIX_FMT_SBGGR8 which does work...but the colors are all green/
pink (really bad).  We do see video though...just really bad. It's all pink/green.

Whenever I change the video 4 linux format to: .pix_fmt =
V4L2_PIX_FMT_SBGGR16, I get the following error (see below).

Question: Does RR's SDK support V4L2_PIX_FMT_SBGGR16 or V4L2_PIX_FMT_SGRBG10?
Question: Is there another place to modify to get 16-bit format?

Thanks!
Tim Liebau

I changed 2 items:
1) vpfe_capture.c file.  I change the #ifndef to cover the first
element instead of the second.  This should force the V4L2_STD_VGA
(defined as 0) to take the first element as 16-bit Bayer.  But,
whenever I do this...I get the "Could not negotiate format" error.
(See the static struct vpfe_pixel_format structure below)

2) ccdc_dm355.c file.  I changed the .data_sz to _12BITS and
the .datasft = 2 (shift data by two).

vpfe_capture.c changes:
----------------------------------------------------------------------------------------
static struct vpfe_pixel_format
 vpfe_pix_fmts[VPFE_MAX_PIX_FORMATS] = {
#ifndef CONFIG_MACH_DM355_LEOPARD
        {
                .pix_fmt = V4L2_PIX_FMT_SBGGR8,
                .desc = "Raw Bayer GrRBGb 8bit A-Law compressed",
                .hw_fmt = VPFE_BAYER_8BIT_PACK_ALAW,
                },
#endif
        {
                .pix_fmt = V4L2_PIX_FMT_SBGGR16,
                .desc = "Raw Bayer GrRBGb - 16bit",
                .hw_fmt = VPFE_BAYER,
        },

Gstreamer output error:
---------------------------------------------------------------------------

---------------------------
. . .
[42949403.260000] vpfe-capture: VIDIOC_QUERYCTRL
[42949403.260000] mt9t031 1-0048: invalid control id 9963805
[42949403.270000] vpfe-capture: VIDIOC_QUERYCTRL
[42949403.270000] mt9t031 1-0048: invalid control id 9963806
[42949403.280000] vpfe-capture: VIDIOC_G_STD
[42949403.280000] mt9t031 1-0048: Current STD: VGA<6>vpfe-capture:
VIDIOC_G_INPUT
[42949403.290000] vpfe-capture: VIDIOC_ENUM_FMT
[42949403.300000] vpfe-capture: <vpfe_release>
[42949403.310000] vpfe-capture: </vpfe_release>
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
not negotiate format
Additional debug info:
../../../../src/libs/gst/base/gstbasesrc.c(2540): gst_base_src_start
(): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
Freeing pipeline ...

All Replies
  • Hi tliebau,

    have u solved this problem?

    Regards

    Ashwani