This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62A-LP: GStreamer memory allocation Failure

Part Number: SK-AM62A-LP

Tool/software:

Hi,

We are currently developing the driver for the OS02C10 sensor on the SK-AM62A-LP starter kit. Using the register settings recommended by the Omnivision team, we have successfully probed and initialized the camera sensor over the I2C interface.

As we proceed to capture a basic stream using a GStreamer pipeline, we are encountering memory allocation issues, which are detailed below.

1. Probe and Init of camera sensor

# dmesg | grep os02c10.    
[    5.793944] os02c10 4-0036: OS02C10 sensor probed successfully-changed
[    5.821344] os02c10 4-0036: Silicon revision: 0x2000
[    5.925110] os02c10 4-0036: OS02C10 initialized successfully

2. dmesg on csi2

# dmesg | grep csi 
[    1.173903] i2c 4-0036: Fixed dependency cycle(s) with /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000
[    8.254321] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY

3. Device Detection

# v4l2-ctl --list-devices
j721e-csi2rx (platform:30102000.ticsi2rx):
	/dev/video3
	/dev/video4
	/dev/video5
	/dev/video6
	/dev/video7
	/dev/video8
	/dev/media0

e5010 (platform:e5010):
	/dev/video1

wave5-dec (platform:wave5-dec):
	/dev/video0

wave5-enc (platform:wave5-enc):
	/dev/video2

# media-ctl -p -d /dev/media0 
Media controller API version 6.1.46

Media device information
------------------------
driver          j721e-csi2rx
model           TI-CSI2RX
serial          
bus info        platform:30102000.ticsi2rx
hw revision     0x1
driver version  6.1.46

Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	routes:
		0/0 -> 1/0 [ACTIVE]
	pad0: Sink
		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
		<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
	pad1: Source
		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
		-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
	pad2: Source
		-> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
	pad3: Source
		-> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
	pad4: Source
		-> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
	pad5: Source
		-> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
	pad6: Source
		-> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]

- entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
	routes:
		0/0 -> 1/0 [ACTIVE]
	pad0: Sink
		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
		<- "os02c10 4-0036":0 [ENABLED,IMMUTABLE]
	pad1: Source
		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
		-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
	pad2: Source
	pad3: Source
	pad4: Source

- entity 15: os02c10 4-0036 (1 pad, 1 link, 0 route)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
	pad0: Source
		[stream:0 fmt:SBGGR10_1X10/1920x1080 field:none colorspace:srgb]
		-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video3
	pad0: Sink
		<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

- entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video4
	pad0: Sink
		<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

- entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video5
	pad0: Sink
		<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

- entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video6
	pad0: Sink
		<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

- entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video7
	pad0: Sink
		<- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]

- entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video8
	pad0: Sink
		<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

4. Format settings

# media-ctl -d /dev/media0 -V "'os02c10 4-0036':0 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'cdns_csi2rx.30101000.csi-bridge':0 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'cdns_csi2rx.30101000.csi-bridge':1 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'30102000.ticsi2rx':0 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'30102000.ticsi2rx':1 [fmt:SBGGR10_1X10/1920x1080]"


# media-ctl -p -d /dev/media0 
Media controller API version 6.1.46

Media device information
------------------------
driver          j721e-csi2rx
model           TI-CSI2RX
serial          
bus info        platform:30102000.ticsi2rx
hw revision     0x1
driver version  6.1.46

Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
	routes:
		0/0 -> 1/0 [ACTIVE]
	pad0: Sink
		[stream:0 fmt:SBGGR10_1X10/1920x1080]
		<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
	pad1: Source
		[stream:0 fmt:SBGGR10_1X10/1920x1080]
		-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
	pad2: Source
		-> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
	pad3: Source
		-> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
	pad4: Source
		-> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
	pad5: Source
		-> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
	pad6: Source
		-> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]

- entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 1 route)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
	routes:
		0/0 -> 1/0 [ACTIVE]
	pad0: Sink
		[stream:0 fmt:SBGGR10_1X10/1920x1080]
		<- "os02c10 4-0036":0 [ENABLED,IMMUTABLE]
	pad1: Source
		[stream:0 fmt:SBGGR10_1X10/1920x1080]
		-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
	pad2: Source
	pad3: Source
	pad4: Source

- entity 15: os02c10 4-0036 (1 pad, 1 link, 0 route)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev2
	pad0: Source
		[stream:0 fmt:SBGGR10_1X10/1920x1080 field:none colorspace:srgb]
		-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]

- entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video3
	pad0: Sink
		<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

- entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video4
	pad0: Sink
		<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

- entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video5
	pad0: Sink
		<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

- entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video6
	pad0: Sink
		<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

- entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video7
	pad0: Sink
		<- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]

- entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
             type Node subtype V4L flags 0
             device node name /dev/video8
	pad0: Sink
		<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

5. gst-launch streaming issue

# v4l2-ctl -d /dev/video3 \
>   --set-fmt-video=width=1920,height=1080,pixelformat=BA10 \
>   --stream-mmap --stream-count=1 --stream-to=test.raw
		VIDIOC_STREAMON returned -1 (No such file or directory)

# GDEBUG=0 gst-launch-1.0   v4l2src device=/dev/video3 !   video/x-bayer, width=1920, height=1080, format=bggr !   bayer2rgb !   videoconvert !   video/x-raw, format=RGB16, width=1920, height=1080 !   kmssink driver-name=tidss sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2src.c(777): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.076110248
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../gstreamer-1.20.7/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...

What is the issue causing this memory allocation failure? Is it related to format conversion? 

Looking forward for your guidance on resolving this.
Thanks in Advance.

  • Hello,

    Since the sensor format is SBGGR10, you should use BG10 for v4l2-ctl capture command. For Gstreamer, it should be bggr10 instead of bggr.

    Regards,

    Jianzhong

  • Hi,

    We tried the bggr10 format and are facing the same issue. Below are the detailed logs. 

    # v4l2-ctl -d /dev/video3 --list-formats
    ioctl: VIDIOC_ENUM_FMT
    	Type: Video Capture
    
    	[0]: 'YUYV' (YUYV 4:2:2)
    	[1]: 'UYVY' (UYVY 4:2:2)
    	[2]: 'YVYU' (YVYU 4:2:2)
    	[3]: 'VYUY' (VYUY 4:2:2)
    	[4]: 'BA81' (8-bit Bayer BGBG/GRGR)
    	[5]: 'GBRG' (8-bit Bayer GBGB/RGRG)
    	[6]: 'GRBG' (8-bit Bayer GRGR/BGBG)
    	[7]: 'RGGB' (8-bit Bayer RGRG/GBGB)
    	[8]: 'BG10' (10-bit Bayer BGBG/GRGR)
    	[9]: 'GB10' (10-bit Bayer GBGB/RGRG)
    	[10]: 'BA10' (10-bit Bayer GRGR/BGBG)
    	[11]: 'RG10' (10-bit Bayer RGRG/GBGB)
    	[12]: 'BG12' (12-bit Bayer BGBG/GRGR)
    	[13]: 'GB12' (12-bit Bayer GBGB/RGRG)
    	[14]: 'BA12' (12-bit Bayer GRGR/BGBG)
    	[15]: 'RG12' (12-bit Bayer RGRG/GBGB)
    	[16]: 'RGI0' (10-bit Bayer RGBG/GIrGIr)
    	[17]: 'GRI0' (10-bit Bayer GRGB/IrGIrG)
    	[18]: 'BGI0' (10-bit Bayer BGRG/GIrGIr)
    	[19]: 'GBI0' (10-bit Bayer GBGR/IrGIrG)
    	[20]: 'GIR0' (10-bit Bayer GIrGIr/RGBG)
    	[21]: 'IGR0' (10-bit Bayer IrGIrG/GRGB)
    	[22]: 'GIB0' (10-bit Bayer GIrGIr/BGRG)
    	[23]: 'IGB0' (10-bit Bayer IrGIrG/GBGR)
    

    # v4l2-ctl -d /dev/video3 --set-fmt-video=width=1920,height=1080,pixelformat=BG10 --stream-mmap --stream-count=10 --stream-to=os02c10.raw
    		VIDIOC_STREAMON returned -1 (Broken pipe)

    # GDEBUG=3 gst-launch-1.0 v4l2src device=/dev/video3 ! video/x-bayer, width=1920, height=1080, format=bggr10 ! bayer2rgb !   videoconvert !   video/x-raw, format=RGB16, width=1920, height=1080 ! kmssink driver-name=tidss sync=false
    WARNING: erroneous pipeline: could not link v4l2src0 to bayer2rgb0, bayer2rgb0 can't handle caps video/x-bayer, width=(int)1920, height=(int)1080, format=(string)bggr10
    

    # gst-launch-1.0 v4l2src device=/dev/video3 io-mode=dmabuf ! video/x-bayer, format=bggr10, width=1920, height=1080, framerate=30/1 ! tiovxisp sink_0::device=/dev/v4l-subdev0 sensor-name=SENSOR_OV_OS02C10 dcc-isp-file=/opt/imaging/os02c10/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/os02c10/linear/dcc_2a.bin format-msb=9 !   video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! kmssink driver-name=tidss sync=false
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=6) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
       829.906395 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
       829.907158 s:  VX_ZONE_INIT:Enabled
       829.907376 s:  VX_ZONE_ERROR:Enabled
       829.907514 s:  VX_ZONE_WARNING:Enabled
       829.909109 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
       829.909817 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
    Additional debug info:
    ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2src.c(777): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Buffer pool activation failed
    Execution ended after 0:00:00.015270720
    Setting pipeline to NULL ...
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Additional debug info:
    ../gstreamer-1.20.7/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming stopped, reason not-negotiated (-4)
    Freeing pipeline ...
       830.165070 s:  VX_ZONE_INIT:[tivxHostDeInitLocal:115] De-Initialization Done for HOST !!!
       830.169755 s:  VX_ZONE_INIT:[tivxDeInitLocal:193] De-Initialization Done !!!
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    IPC: Deinit ... !!!
    IPC: DeInit ... Done !!!
    MEM: Deinit ... !!!
    DDR_SHARED_MEM: Alloc's: 0 alloc's of 0 bytes 
    DDR_SHARED_MEM: Free's : 0 free's  of 0 bytes 
    DDR_SHARED_MEM: Open's : 0 allocs  of 0 bytes 
    MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    

  • Hi,

    To add-on to the information above, we are using the MIPI DCG16 (Combined) 1920x1080 @ 30fps, 720 Mbps register configuration.

    For this setup, we have configured the format as MEDIA_BUS_FMT_SBGGR10_1X10, and set the colorspace to V4L2_COLORSPACE_SRGB (value = 8).

    How to format the pipeline to use gstreamer and stream images from the sensor?

    Looking forward for your suggestions.
    Thanks
  • Hi,

    We successfully achieved a basic raw format stream from the OS02C10 sensor using the @@ MIPI DCG16 (Combined) configuration at 1920x1080 @ 30fps with a data rate of 720 Mbps.The commands used for the streaming are as below

    # media-ctl -V '"os02c10 4-0036":0 [fmt:SBGGR10_1X10/1920x1080 field:none]'
    # media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:SBGGR10_1X10/1920x1080 field:none]'
    # media-ctl -V '"30102000.ticsi2rx":0 [fmt:SBGGR10_1X10/1920x1080 field:none]'
    # v4l2-ctl -d /dev/video3 --set-fmt-video=width=1920,height=1080,pixelformat=BG10
    
    # GDEBUG=0 gst-launch-1.0   v4l2src device=/dev/video3 !   video/x-bayer, width=1920, height=1080, format=bggr !   bayer2rgb !   videoconvert !   video/x-raw, format=RGB16, width=1920, height=1080 !   kmssink driver-name=tidss sync=false
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    Redistribute latency...
    0:00:28.4 / 99:99:99.
    

    The current stream output appears grainy, with no clear distinguishable image. Attached is a picture of the stream for your reference.

    Kindly let us know if you have any suggestions or insights on how to improve or correct the output.

    We are also working on adding VPAC configuration to stream using ISP. We have updated TIOVX modules and plugins to inclide support for our sensor.which is detected using gst-inspect-1.0 tiovxisp.

    Moving on, we have generated dcc binary files using the imaging software and the below configuration

            

    The gstreamer pipeline is starting without any errors but we are not able to receive stream on the HDMI monitor.

    # gst-launch-1.0 -v v4l2src device=/dev/video3 io-mode=dmabuf-import !   video/x-bayer, width=1920, height=1080, framerate=30/1, format=bggr10 !   queue !   tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name=SENSOR_OV_OS02C10   dcc-isp-file=/opt/imaging/os02c10/linear/dcc_viss.bin   sink_0::dcc-2a-file=/opt/imaging/os02c10/linear/dcc_2a.bin format-msb=9 !   video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 !   kmssink driver-name=tidss sync=false
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=6) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
      2721.046402 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
      2721.046545 s:  VX_ZONE_INIT:Enabled
      2721.046575 s:  VX_ZONE_ERROR:Enabled
      2721.046602 s:  VX_ZONE_WARNING:Enabled
      2721.048129 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
      2721.048730 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1920
    /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1080
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXIspPad:sink_0: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr10, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    

    Looking forward for your suggestions on streaming the camera with ISP default configuration setup.

    Thanks

  • Hi,

    We are able to successfully stream using the 1920x1080_linearHCG_120fps_10b_960Mbps register settings for which the default ISP DCC files was generated in linear mode.

    However, with the @@ MIPI DCG16 (Combined) configuration at 1920x1080 @ 30fps, the output remains the same as previously reported that is grainy in structure. 

    For DCG16 (Combined), what is the wdr configuration to be done to generate DCC files? What is the format to be set in the driver and the media pipeline? And what is the gstreamer pipeline to stream that data?

    We are setting the driver to MEDIA_BUS_FMT_SBGGR10_1x10 and generated DCC files with following configuration

    SENSOR_ID 5302
    PRJ_DIR ../../../sensor_drv/src/os02c10_dcg
    SENSOR_NAME os02c10
    SENSOR_DCC_NAME OS02C10
    
    SENSOR_WIDTH 1920
    SENSOR_HEIGHT 1080
    
    # 0=RGGB;  1=GRBG;  2=GBRG;  3=BGGR,  4=MONO,
    #10=RGGI, 11=GRIG, 12=BGGI, 13=GBIG, 14=GIRG, 15=IGGR, 16=GIBG, 17=IGGB
    COLOR_PATTERN 3
    
    # sensor mode: 0 for linear (no decompanding), 1 for WDR (decompanding)
    WDR_MODE 1
    
    # raw sensor image BIT_DEPTH: it may be 8, 10, or 12 for linear sensors; typically 12 for WDR mode because of companding
    BIT_DEPTH 12
    
    # WDR BIT_DEPTH: WDR raw sensor image bitdepth after decompanding, typically 20 or 24
    WDR_BIT_DEPTH 24
    
    # WDR decompanding knee points (comma separated without spaces in between)
    WDR_KNEE_X 0,512,640,768,1024,1280,1536,2048,2176,2304,2432,2688,2944,3200,4095
    WDR_KNEE_Y 0,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,16777215
    
    # Sensor black level to subtract before decompanding (for some Sony WDR sensors)
    # When PCID is on for RGBIR sensors, black level might be set to 0
    BLACK_PRE  0
    
    # Sensor black level to subtract after decompanding (for most WDR sensors and all linear sensors)
    # When PCID is on for RGBIR sensors, black level might be set to 0
    BLACK_POST  0
    
    # GAMMA value for compressing 20/24-bit WDR raw to 16-bit ISP internal
    # typically around 50 (0.5) for 24-bit WDR sensors and 70 (0.7) for 20-bit sensors
    GAMMA_PRE 50
    
    # LSB location for H3A input bit range (from bit-H3A_INPUT_LSB to bit-H3A_INPUT_LSB+9) 
    H3A_INPUT_LSB 3
    
    

    We tried streaming using gstreamer but getting a blank stream on the HDMI monitor.

    Kindly let me know what is the proper configuration to be used for DCG16 mode with proper gstreamer pipeline.

    root@am62axx-evm:/opt/edgeai-gst-apps# gst-launch-1.0 -v v4l2src device=/dev/video-rpi-cam0 io-mode=dmabuf-import !   video/x-bayer, width=1920, height=1080, framerate=30/1, format=bggr !   tiovxisp sink_0::device=/dev/v4l-rpi-subdev0 sensor-name="SENSOR_OV_OS02C10"   dcc-isp-file=/opt/imaging/os02c10/wdr/dcc_viss_wdr.bin sink_0::dcc-2a-file=/opt/imaging/os02c10/wdr/dcc_2a_wdr.bin format-msb=9 !   video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! kmssink driver-name=tidss
    APP: Init ... !!!
    MEM: Init ... !!!
    MEM: Initialized DMA HEAP (fd=6) !!!
    MEM: Init ... Done !!!
    IPC: Init ... !!!
    IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
      1171.861236 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
      1171.861373 s:  VX_ZONE_INIT:Enabled
      1171.861389 s:  VX_ZONE_ERROR:Enabled
      1171.861403 s:  VX_ZONE_WARNING:Enabled
      1171.862811 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
      1171.863450 s:  VX_ZONE_INIT:[tivxHostInitLocal:101] Initialization Done for HOST !!!
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1920
    /GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1080
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, interlace-mode=(string)progressive, colorimetry=(string)sRGB
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, interlace-mode=(string)progressive, colorimetry=(string)sRGB
    /GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXIspPad:sink_0: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, interlace-mode=(string)progressive, colorimetry=(string)sRGB
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)bggr, interlace-mode=(string)progressive, colorimetry=(string)sRGB
    /GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXMisoPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1
    /GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1
    Redistribute latency...
    

  • Hi,

    What is MIPI DCG16 (Combined)? Can you capture a raw image and check if it looks good using tools like pixelviewer?

    Thanks,

    Jianzhong