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.

capture_dei_encode with custom board

Other Parts Discussed in Thread: TVP5147M1, TVP7002, TVP5147

Greetings

I am attempting to capture video on the DM8168EVM through port VIN_1_A, using a custom board which features a TVP5147M1 decoder, rather than a TVP7002.

I am attempting to use the OpenMax Test Bench example capture_dei_encode.oms, by modifying it to be compatible with the new decoder.

I have already configured the i2c registers on the TVP5147 for 8-bit 4:2:2 YCbCr video with embedded syncs.

Is it possible to remove/modify parts of this oms script which pertain to the TVP7002 and have it remain functional? A particular source of confusion is the presence of a TVP component, which doesn't seem to be defined in the OMX User's Guide, but rather appears to be setting up parameters for the VFCC and control components.

I have tried removing this component from the chain entirely, which causes an error.

I have also tried modifying the parameters given in these commands:

#SET ALL THE PARAMS FOR TVP
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortID eHwPortId vip1_porta
omx api setparam tvp 0 0 0 OMX_TI_IndexParamVFCCHwPortID
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eCaptMode sc_non_mux
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eVifMode 8_bit
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eInColorFormat 422YUYV
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties eScanType progressive
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxWidth 1920
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxHeight 1080
omx setp 0 tvp OMX_TI_IndexParamVFCCHwPortProperties nMaxChnlsPerHwPort 1
omx api setparam tvp 0 0 0 OMX_TI_IndexParamVFCCHwPortProperties
omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoStandard 1080P60
omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoDecoderId tvp7002
omx setp 0 tvp OMX_TI_IndexParamCTRLVidDecInfo videoSystemId auto_detect
omx api setparam tvp 0 0 0 OMX_TI_IndexParamCTRLVidDecInfo

to correspond to the output video format of the TVP5147M1 on the custom board - but the only result is a blank grey screen on the HDMI display from the EVM.

Please advise on how to modify this packaged example to work with a custom decoder if possible!

Thanks

Marcus

  • Hi Marcus,

        On the Ridgerun SDK we don't have the TVP5147M driver working yet but it is something that we could do if you need help just let us know. 

        Meanwhile,   is trying to do the same, maybe you can check this post and get some ideas.

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/326172.aspx?pi199607=1

    Basically If you need to capture from the TVP5147M I think you will need to switch to V4L2 instead of using OMX and create a driver for your video decoder, then you can use something like v4l2src to get frames using the V4L2 API. By default the VIP1 is not enabled in the V4L2 capture driver so you need to modify it as well.

    Moreover, I haven't worked with omtb, I always use gstreamer or the OMX examples, on this post you can find a patch to remove the TVP from the capture_encode demo, however, this is for 1080p cases, you would need to modify it more for the TVP5147M but again, not sure if openMax will be able to capture from that decoder.

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/328344/1143515.aspx#1143515

    With the Ridgerun SDK we already have dual capture enabled in the DM816x board using V4L2 we would need to create the driver and connect it to the VPSS

    https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM8168_EVM#Dual_Capture_Support

    -David

  • Hi David

    Thanks for your suggestions. I tried applying the patch to remove the TVP component from the capture_encode demo, but unfortunately was still unable to capture frames from the TVP5147M1. I have also continued to get no results from modifying the script version of the OpenMax capture example (.oms file).

    I'm now going to try using the V4L2 capture driver like you recommend. This is my first time using such a platform, so I've never created a driver myself before - is it easy to do, and is there somewhere I might find more information on creating a driver for the TVP5147M1 and connecting it to the VPSS?

    Thanks

    Marcus

  • Hi Marcus,

          Yes, using V4L2 is the right approach. Now you can check this link where an introduction is provided:

    http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_Adding_External_Decoders_to_V4L2_Capture_Driver

    The first thing that you need to do is to load the V4L2 firmware into the VPSS instead of the OMX firmware and also you need to load the V4L2 capture driver (ti81xxvin.ko)

        1)   I think that there is already a first implementation of the driver in: linux-2.6.37-psp04.04.00.01/drivers/media/video/tvp514x.c, however you will need to modify it to use the correct i2c address for the TVP5147M1 and to set it in the correct mode - I think you already did this.

         2)  Once the TVP5147M is correctly configured you need to modify the V4L2 capture driver and the VPSS driver, so they can register the TVP5147 when the probe function is run. Files:

    linux-2.6.37-psp04.04.00.01/drivers/media/video/ti81xx/ti81xxvin_main.c
    linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/ti81xx_vpss.c

         3) By default, the V4L2 capture driver (i81xxvin) doesn't have the VIP1 enabled, so just capturing from VIP0 is supported. Ridgerun modified the capture driver to enable capture from VIP1 too, in order to do this you need to modify

    linux-2.6.37-psp04.04.00.01/drivers/media/video/ti81xx/ti81xxvin_main.c

    and also the board file, so you can configure all the external chips present in the DM816x-EVM to let pass the video signals coming from the TVP:

    linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/board-ti8168evm.c
    https://developer.ridgerun.com/wiki/index.php/Getting_Started_Guide_for_DM8168_EVM#Dual_Capture_Support

    I think Lu already did something about it.

           We already have the second video input port working for the TVP7002 or for some FPGA feeding the board with video, however, we haven't added support to capture from the TVP5147, you need to know which is the right configuration for the VPSS to accept the data once it is placed in the inputs.

    Hope this helps,

    -David

  • Hi Marcus,

       In the DM8168-EVM we got the TVP5147 working with V4L2, you can find more info here:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/326172/1170437.aspx#1170437

    -David