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.

AM5728: Video input issue

Part Number: AM5728
Other Parts Discussed in Thread: AM5718

Hi there,

I have some problems using AM5718 VIP1, the following is my system connection diagram.

I want to generate /dev/video1 to capture the video from video ASIC.

Threre are many example related camera sensors, but it not fit my situation.

So what should I do ?

Need help.

Thanks. 

  • ~# dmesg | grep vip  
    [   12.934435] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [   12.961108] vip 48970000.vip: VPDMA firmware loaded
    [   12.991110] vip1-s1: Port A enabled but no endpoints found

  • Hi,

    For any new camera or video source, you should have a video subdevice driver.

    How do you control the ASIC? Is it via i2c/spi?

    If it has no control at all, you can write a platform driver, register a v4l2 subdevice and implement the required ops.

    You need to hard code the values when implementing the ops in the v4l2 subdev driver.

    And return 0 for set_stream kind of operations.

    Once you have this driver read, you can update the endpoints in VIP to point to your DT node and then VIP will call your ASIC driver and if everything is implemented correctly, video device will be registered.

    You can refer ov1063x.c for a list of v4l2 subdev ops that need to be implemented

    Also refer to https://www.ti.com/lit/an/spracd8/spracd8.pdf

    Regards,

    Nikhil D

  • Hi Nikhil D,

    Thanks for your reply.

    The Video ASIC is controlled by external MCU.

    I'll try the method you just mentioned and update the status for this question.

    Thanks.

  • ~# dmesg | grep vip
    [   11.760572] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [   11.791094] vip 48970000.vip: VPDMA firmware loaded
    [   11.801269] vip1-s1: Port A: Using subdev ov1063x 4-0021 for capture
    [   11.825669] vip1-s1: device registered as video1
    
    ----------------------------------------------------------------------------
    
    ~# dmesg | grep ov106
    [    5.524435] ov1063x 4-0021: GPIO lookup for consumer reset
    [    5.524442] ov1063x 4-0021: using device tree for GPIO lookup
    [    5.524463] ov1063x 4-0021: using lookup tables for GPIO lookup
    [    5.524469] ov1063x 4-0021: lookup for GPIO reset failed
    [    5.524476] ov1063x 4-0021: GPIO lookup for consumer powerdown
    [    5.524481] ov1063x 4-0021: using device tree for GPIO lookup
    [    5.524498] ov1063x 4-0021: using lookup tables for GPIO lookup
    [    5.524504] ov1063x 4-0021: lookup for GPIO powerdown failed
    [    5.525044] ov1063x 4-0021: ov1063x Product ID 0 Manufacturer ID 0
    [    5.531297] ov1063x 4-0021: ov1063x 4-0021 sensor driver registered !!
    [   10.346389] Error: Driver 'ov1063x' is already registered, aborting...
    [   10.363173] Error: Driver 'ov1063x' is already registered, aborting...
    [   11.801269] vip1-s1: Port A: Using subdev ov1063x 4-0021 for capture
    
    ----------------------------------------------------------------------------
    
    :~# cat /proc/interrupts | grep vip  
    
    360:          0      CBAR 351 Level     vip1-s0
    361:          0      CBAR 392 Level     vip1-s1
    
    ----------------------------------------------------------------------------
    
    ~# gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw! videoscale ! videoconvert ! ducatih264enc profile=66 rate-preset=1 ! h264parse ! video/x-h264, profile=baseline ! rtph264pay ! udpsink host=127.0.0.1 port=8004 &
    [3] 1091
    root@ok5718-idk:~# Setting pipeline to PAUSED ...
    [  552.357077] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video1' cannot capture at 1920x1080
    Additional debug info:
    ../../../gst-plugins-good-1.8.3/sys/v4l2/gstv4l2object.c(3458): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Call to S_FMT failed for NV12 @ 1920x1080: Invalid argument
    Execution ended after 0:00:00.008766758
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    
    [3]+  Done(1)                 gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw! videoscale ! videoconvert ! ducatih264enc profile=66 rate-preset=1 ! h264parse ! video/x-h264, profile=baseline ! rtph264pay ! udpsink host=127.0.0.1 port=8004
    
    

    I just use the ov106x as the dummy device in order to create the capture device, after that try to use the gst-launch-1.0 stream the video and get some errors.

    There are some logs above.

  • Hi Nikhil D,

    Now I use the ov1063x driver as the template to do the portiing, but can't capture the video.

     use ov1063x_probe(struct i2c_client *client, const struct i2c_device_id *did) to create the /dev/videoX node, is it OK??  BTW, Can you show me some demo code? Thanks.

    static int ov1063x_probe(struct i2c_client *client,
    			 const struct i2c_device_id *did)
    {
    	struct device_node *node = client->dev.of_node;
    	struct ov1063x_priv *priv;
    	struct v4l2_subdev *sd;
    	struct clk *clk;
    	int ret = 0;
    
    	priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
    	if (!priv)
    		return -ENOMEM;
    
    	i2c_set_clientdata(client, priv);
    /*
    	clk = devm_clk_get(&client->dev, "xvclk");
    	if (IS_ERR(clk)) {
    		dev_err(&client->dev, "xvclk reference is missing!\n");
    		ret = PTR_ERR(clk);
    		goto err;
    	}
    	priv->xvclk = clk;
    
    	priv->xvclk_rate = clk_get_rate(clk);
    	dev_dbg(&client->dev, "xvclk_rate: %d (Hz)\n", priv->xvclk_rate);
    
    	if (priv->xvclk_rate < 6000000 ||
    	    priv->xvclk_rate > 27000000) {
    		ret = -EINVAL;
    		goto err;
    	}
    
    	ret = clk_prepare_enable(priv->xvclk);
    	if (ret < 0)
    		goto err;
    
    	ret = ov1063x_of_probe(client, node);
    	if (ret)
    		goto err;
    */
    	/* Default framerate */
    	priv->fps_numerator = 60;
    	priv->fps_denominator = 1;
    	ov1063x_get_default_format(&priv->format);
    	priv->width = priv->format.width;
    	priv->height = priv->format.height;
    
    	sd = &priv->subdev;
    	v4l2_i2c_subdev_init(sd, client, &ov1063x_subdev_ops);
    
    	sd->internal_ops = &ov1063x_sd_internal_ops;
    	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
    		     V4L2_SUBDEV_FL_HAS_EVENTS;
    
    	
    	v4l2_ctrl_handler_init(&priv->hdl, 3);
    	v4l2_ctrl_new_std(&priv->hdl, &ov1063x_ctrl_ops,
    			  V4L2_CID_VFLIP, 0, 1, 1, 0);
    	v4l2_ctrl_new_std(&priv->hdl, &ov1063x_ctrl_ops,
    			  V4L2_CID_HFLIP, 0, 1, 1, 0);
    	priv->colorbar = v4l2_ctrl_new_std_menu_items(&priv->hdl, &ov1063x_ctrl_ops,
    				     V4L2_CID_TEST_PATTERN,
    				     ARRAY_SIZE(ov1063x_test_pattern_menu) - 1,
    				     0, 0, ov1063x_test_pattern_menu);
    	priv->subdev.ctrl_handler = &priv->hdl;
    	if (priv->hdl.error) {
    		ret = priv->hdl.error;
    		goto err;
    	}
    
    	mutex_init(&priv->lock);
    		
    	ret = ov1063x_init_cam_gpios(client);
    	ret = 0;
    	if (ret) {
    		dev_err(&client->dev, "Failed to request cam gpios");
    		goto err;
    	}
    
    	ret = ov1063x_init_gpios(client);
    	if (ret) {
    		dev_err(&client->dev, "Failed to request mux gpios");
    		goto err;
    	}
    
    	ret = ov1063x_video_probe(client);
    
    	if (ret) {
    		v4l2_ctrl_handler_free(&priv->hdl);
    		goto err;
    	}
            
    	sd->dev = &client->dev;
    	ret = v4l2_async_register_subdev(sd);
    
    	dev_info(&client->dev, "%s sensor driver registered !!\n", sd->name);
    
    	pm_runtime_enable(&client->dev);
    
    	return 0;
    err:
    	clk_disable_unprepare(priv->xvclk);
    	return ret;
    }

  • Hi,

    ov1063x is an i2c driver. You cannot reuse it. Better option is to write a platform driver.

    Also, being able to capture the video is last step.

    Your goals should be:

    * probe the platform driver and register a v4l2 subdevice

    * Bind it with the VIP driver using DTS endpoints and register a /dev/video device

    * Make sure you can open the /de/video device and all the subdev calls are going through, format reporting is correct

    * Finally try to do a video capture

    Regards,

    Nikhil D

  • Hi Nikhil D.

    I just need one dummy v4l2 sub-device(pretended as IIC device), rewrite the driver is not easy for me, so choosing the ov1063x driver as start.

    I already did the following operation,

    (1). all IIC operations related with ov1063x return 0;

    (2). rewrite the v4l2 ops function;

    (3). hardcode the support resolution and colorspace;

    Is this ok to complete my wokr ?

    root@ok5718-idk:~# gst-launch-1.0 -v v4l2src io-mode=4  device=/dev/video1 ! video/x-raw ! \
    > videoconvert ! \
    > 'video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=60/1' ! \
    > vpe !  \
    > ducatih264enc profile=66 rate-preset=1 ! h264parse ! video/x-h264, profile=baseline ! \
    > rtph264pay ! udpsink host=127.0.0.1 port=8004 &
    [1] 1036
    root@ok5718-idk:~# Setting pipeline to PAUSED ...
    [  189.500170] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    [  189.550895] In this case xx : [ -22 ], 640 x 480
    [  189.558428] In this case 3 : [ -22 ], 640 x 480
    [  189.564629] PCLK  : [ -1 ]
    [  189.567351] In this case 2![ 0 ], 640 x 480
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)640\,\ hei[  189.580829] ------------[ cut here ]------------
    ght\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interl[  189.590661] WARNING: CPU: 0 PID: 1041 at drivers/media/platform/ti-vpe/vpdma.c:840 vpdma_rawchan_add_out_dtd+0x104/0x110 [ti_vpdma]
    ace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\[  189.611023] Modules linked in:,\ framerate\=\(fraction\)60/1"
    /GstPipeline:pipeline0/GstCapsF bc_example(O)ilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(s sha512_generictring\)NV12\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel- sha512_armaspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progr sha256_genericessive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\ sha1_generic)60/1"
    /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.Gst sha1_arm_neonPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\ sha1_arm=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fract md5ion\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry cbc\=\(string\)bt601\,\ framerate\=\(fraction\)60/1"
    /GstPipeline: xhci_plat_hcdpipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x- xhci_hcdraw\,\ format\=\(string\)NV12\,\ width\=\(int\)640\,\ height\=\( pru_rprocint\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mod usbcoree\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ fram xfrm_usererate\=\(fraction\)60/1"
    /GstPipeline:pipeline0/GstVpe:vpe0.Gst pruss_intcPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\ xfrm4_tunnel=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fract ipcompion\)1/1\,\ framerate\=\(fraction\)60/1"
    /GstPipeline:pipeline0 xfrm_ipcomp/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h26 dwc34\,\ profile\=\(string\)baseline\,\ alignment\=\(string\)au\,\ s rpmsg_prototream-format\=\(string\)byte-stream\,\ width\=\(int\)640\,\ heig prussht\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framera udc_corete\=\(fraction\)60/1"
    /GstPipeline:pipeline0/GstH264Parse:h264p usb_commonarse0.GstPad:sink: caps = "video/x-h264\,\ profile\=\(string\)ba rpmsg_rpcseline\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)by esp4te-stream\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-as ah4pect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)60/1"
    /Gs af_keytPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:sink: xfrm_algo caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\) bluetooth640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1 snd_soc_simple_card\,\ framerate\=\(fraction\)60/1"
    /GstPipeline:pipeline0/GstVpe: snd_soc_simple_card_utilsvpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\ snd_soc_omap_hdmi_audio,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio pvrsrvkm(O)\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ co omap_aes_driverlorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)60/1"
    /Gst c_can_platformPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = c_can "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)640\,\  can_devheight\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ int omap_shamerlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt6 pruss_soc_bus01\,\ framerate\=\(fraction\)60/1"
    /GstPipeline:pipeline0/GstVi ahci_platformdeoConvert:videoconvert0.GstPad:sink: caps = "video/x-raw\,\ for libahci_platformmat\=\(string\)NV12\,\ width\=\(int\)640\,\ height\=\(int\)480\, libahci\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(strin omap_wdtg\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(f libataraction\)60/1"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0 scsi_mod.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ w ti_vipidth\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\( ti_vpefraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colori dwc3_omapmetry\=\(string\)bt601\,\ framerate\=\(fraction\)60/1"
     ti_sc ti_csc extcon_core ti_vpdma ti_cal gpio_pisosr omap_des ov5645_mipi ov5640_mipi omap_hdq rtc_rx8010 des_generic spidev crypto_engine wire snd_soc_wm8960 omap_remoteproc virtio_rpmsg_bus rpmsg_core remoteproc sch_fq_codel uio_module_drv(O) uio gdbserverproxy(O) cryptodev(O) cmemk(O)
    [  189.973484] CPU: 0 PID: 1041 Comm: v4l2src0:src Tainted: G           O    4.9.41 #1
    [  189.981169] Hardware name: Generic DRA72X (Flattened Device Tree)
    [  189.987283] Backtrace: 
    [  189.989750] [<c020b29c>] (dump_backtrace) from [<c020b558>] (show_stack+0x18/0x1c)
    [  189.997349]  r7:00000009 r6:60060013 r5:00000000 r4:c10229d0
    [  190.003033] [<c020b540>] (show_stack) from [<c04ace20>] (dump_stack+0x8c/0xa0)
    [  190.010286] [<c04acd94>] (dump_stack) from [<c022e478>] (__warn+0xec/0x104)
    [  190.017273]  r7:00000009 r6:bf0bf438 r5:00000000 r4:00000000
    [  190.022954] [<c022e38c>] (__warn) from [<c022e548>] (warn_slowpath_null+0x28/0x30)
    [  190.030552]  r9:00000002 r8:bf0bf3cc r7:ee22c85c r6:00000000 r5:00000000 r4:00000000
    [  190.038335] [<c022e520>] (warn_slowpath_null) from [<bf0be4a4>] (vpdma_rawchan_add_out_dtd+0x104/0x110 [ti_vpdma])
    [  190.048737] [<bf0be3a0>] (vpdma_rawchan_add_out_dtd [ti_vpdma]) from [<bf11ced8>] (add_out_dtd+0x10c/0x298 [ti_vip])
    [  190.059301]  r10:00000280 r9:bf121e94 r8:00000000 r7:ee210828 r6:000000ac r5:ee210810
    [  190.067158]  r4:ee22c000
    [  190.069709] [<bf11cdcc>] (add_out_dtd [ti_vip]) from [<bf11d104>] (populate_desc_list+0xa0/0xcc [ti_vip])
    [  190.079314]  r10:fa975ac0 r9:ee1cf010 r8:01e00000 r7:ed8bbd50 r6:ee1cf010 r5:ee210810
    [  190.087172]  r4:ee22c000
    [  190.089722] [<bf11d064>] (populate_desc_list [ti_vip]) from [<bf11d3cc>] (vip_start_streaming+0x29c/0x8d4 [ti_vip])
    [  190.100198]  r7:ed8bbd50 r6:ee22c000 r5:00000000 r4:ee210810
    [  190.105888] [<bf11d130>] (vip_start_streaming [ti_vip]) from [<c07003e0>] (vb2_start_streaming+0x64/0x158)
    [  190.115579]  r10:ee2ae240 r9:00000000 r8:c103f950 r7:c06ebd60 r6:ee22c87c r5:ee22cad8
    [  190.123437]  r4:ee22c9b4
    [  190.125979] [<c070037c>] (vb2_start_streaming) from [<c07021d0>] (vb2_core_streamon+0x130/0x178)
    [  190.134798]  r7:c06ebd60 r6:ee211400 r5:00000000 r4:ee22c87c
    [  190.140479] [<c07020a0>] (vb2_core_streamon) from [<c0704a84>] (vb2_streamon+0x38/0x58)
    [  190.148511]  r5:ee2ae240 r4:00000001
    [  190.152098] [<c0704a4c>] (vb2_streamon) from [<c0704ae8>] (vb2_ioctl_streamon+0x44/0x48)
    [  190.160221] [<c0704aa4>] (vb2_ioctl_streamon) from [<c06ebd84>] (v4l_streamon+0x24/0x28)
    [  190.168342]  r5:40045612 r4:c0704aa4
    [  190.171931] [<c06ebd60>] (v4l_streamon) from [<c06efc80>] (__video_do_ioctl+0x298/0x30c)
    [  190.180051]  r5:40045612 r4:00000001
    [  190.183640] [<c06ef9e8>] (__video_do_ioctl) from [<c06ef69c>] (video_usercopy+0x18c/0x4bc)
    [  190.191936]  r10:00000001 r9:00000000 r8:0024fd24 r7:ec237e18 r6:00000004 r5:00000004
    [  190.199794]  r4:40045612
    [  190.202335] [<c06ef510>] (video_usercopy) from [<c06ef9e4>] (video_ioctl2+0x18/0x1c)
    [  190.210107]  r10:00000000 r9:ec236000 r8:ee1cf0cc r7:0024fd24 r6:40045612 r5:ee2ae240
    [  190.217965]  r4:ee211400
    [  190.220506] [<c06ef9cc>] (video_ioctl2) from [<c06ea740>] (v4l2_ioctl+0xa8/0xe0)
    [  190.227934] [<c06ea698>] (v4l2_ioctl) from [<c03415ec>] (do_vfs_ioctl+0xa8/0x7fc)
    [  190.235445]  r9:ec236000 r8:0024fd24 r7:0000001d r6:ee2ae240 r5:ed84c828 r4:0024fd24
    [  190.243219] [<c0341544>] (do_vfs_ioctl) from [<c0341d7c>] (SyS_ioctl+0x3c/0x64)
    [  190.250556]  r10:00000000 r9:ec236000 r8:0024fd24 r7:40045612 r6:ee2ae240 r5:0000001d
    [  190.258413]  r4:ee2ae241
    [  190.260955] [<c0341d40>] (SyS_ioctl) from [<c0207be0>] (ret_fast_syscall+0x0/0x34)
    [  190.268554]  r9:ec236000 r8:c0207d84 r7:00000036 r6:b6a613c8 r5:b500c130 r4:00000000
    [  190.281509] ---[ end trace 863e7a6f453772af ]---
    [  190.286168] Unable to handle kernel NULL pointer dereference at virtual address 00000008
    [  190.308055] pgd = ec0ec400
    [  190.310772] [00000008] *pgd=ac0eb003, *pmd=be063003
    [  190.319038] Internal error: Oops: a07 [#1] PREEMPT SMP ARM

  • Hi Nikhil,

    Now, I have some progress on my project.

    This is the picture got from webrtc server.

    This is the picture should be.

    Using the following command.

    gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw, format=(string)RGB, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! \
    videoconvert ! \
    vpe ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)60/1' ! \
    ducatih264enc profile=66 rate-preset=1 ! h264parse ! video/x-h264, profile=baseline ! \
    rtph264pay ! udpsink host=127.0.0.1 port=8004 &

    And generate the following warnings.

    0:00:00.212719851  1091   0x14b460 WARN          v4l2bufferpool gstv4l2bufferpool.c:748:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
    0:00:00.219868725  1091   0x14b460 WARN                     vpe gstvpebufferpool.c:425:gst_vpe_buffer_pool_get: Allocating a new input buffer index: 0/128, 0
    0:00:00.606932756  1091   0x14b430 WARN              bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed
    0:00:00.607128607  1091   0x14b460 WARN                     vpe gstvpebufferpool.c:425:gst_vpe_buffer_pool_get: Allocating a new input buffer index: 1/128, 1
    0:00:00.628458599  1091   0x14b430 WARN              bufferpool gstbufferpool.c:300:do_alloc_buffer:<vpebufferpool1> alloc function failed

    Can you give me some advice for this, thanks.

  • Hi Robert,

    Please use one of these gstreamer pipelines

    gst-launch-1.0 -e -v v4l2src device=/dev/video1 io-mode=4 num-buffers=1000 ! 'video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! identity silent=false ! queue ! ducatih264enc level=42 profile=66 bitrate=4000 ! queue ! h264parse ! qtmux ! filesink location=x.mp4

    or 


    gst-launch-1.0 -e -v v4l2src device=/dev/video1 io-mode=5 num-buffers=1000 ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1' ! identity silent=false ! queue ! ducatih264enc level=42 profile=66 bitrate=4000 ! queue ! h264parse ! qtmux ! filesink location=x.mp4

    Don't use videoconvert as this is a software based plugin.

    Thanks

    RamPrasad

  • Hi RamPrasad,

    Thanks for your reply.

    My problem is about the picture output , only one half of the actual.

    And I try the gstreamer command you offered, all the same,warnings about the buffer issues as above.

    Please give me some help, thanks.

  • Hi Nikhil D,

    Now, my problem still not solved. Can you give me some advice?

    I use the followin command to capture the video,

    yavta -c10 -Ftest.yuv -s1920x1080 -t1/30 /dev/video1

    use the default colorspace and the colordeep.

    the following is the result:

     

    I have now idea about the shfit of the picture.

    Need help.

  • Hi,


    First, you have to do the correct setting for active_video.

    This will make sure that the additional pixels/lines around the frame will not be captured.

    The OV1063x is a UYVY camera, that's why it returns the media_bus format which matches with the sensor.

    You have to make sure that the driver passes the correct format which matches with the RGB24 bit video.

    Also, the v4l2-endpoint should describe the correct bus-width to be 24bit so that VIP parser gets configured correctly.

    Regards,

    Nikhil D

  • Hi Nikhil D,

    For the image shift issue, it has been solved.

    I refer the thread https://e2e.ti.com/support/processors/f/791/t/773048?tisearch=e2e-quicksearch&keymatch=vip%20detect

    Do the following modifications.

    I already set the bus width to 24bit, the following is v4l2 sub device code,

    But the output picture isn't ok, the resolution 1080P@30Hz,RGB444。

    Need help.

    Thanks.

  • Hi,

    MEDIA_BUS_FMT_RGB888_1X24 is just the format.

    The bus width is specified in the v4l2 endpoint device tree node

    Regards,

    Nikhil D

  • Hi Nikhil D,

    The format is already set to MEDIA_BUS_FMT_RGB888_1X24  and the bus width set to 24bit.

    And the image I get is abnormal.

    Please refer to the above reply.

    Need help.

    Thanks.

  • Hi,

    Did you add the pinmux for the additional 16 data lines?

    Based on yout custom board scematics, add the pinmux data.

    If done already, you can generate the GPIO probe script which will read the pads to show you the status of the data lines.

    https://git.ti.com/cgit/glsdk/iodelay-config Refer to README for more details on the GPIO probe script (use the -g option)

    This will show you if some lines are toggling or not

    Regards,

    Nikhil D

  • Hi Nikhil D.

    After using the iodelay-config, I get the following result:

    PS: Double check the /sys/class/gpio/* , except gpio103 isn't there,other gpios already exported.

    Individually checking the others pins(D13~D23), there's signal toggle.

    But the image I get still isn't ok.

  • Hi,

    Why are you capturing  resolution 1080P@30Hz,RGB444?

    Please run the test prefixed with strace -f -o ioctl.txt and share the output of ioctl.txt

    This will have details like the negotiated format, etc

    Regards,

    Nikhil D