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.

1080p60 video capture using tvp7002 on DM8168 EVM using DVR-RDK3.50.00.05

Other Parts Discussed in Thread: TVP7002, TVP5158, THS7368

Hi,

I am using DVR-RDK3.50.00.05 for DM8168 EVM.

I want to capture 1080p60 resolution video through tvp7002. As demos in the rdk doesn't support tvp7002 capture, i have configured tvp7002 through i2c utility in 1080p60 16-bit embedded sync mode.

I made an application which capture and display using MCFW APIs. I gave capture create time parameters as follows,

CaptureLink_CreateParams_Init(&capturePrm);

capturePrm.numVipInst    = 1;

capturePrm.outQueParams[0].nextLink = gVdisModuleContext.displayId[0];

capturePrm.tilerEnable              = FALSE;

capturePrm.enableSdCrop             = FALSE;

pCaptureInstPrm                     = &capturePrm.vipInst[0];

pCaptureInstPrm->vipInstId          = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId)%SYSTEM_CAPTURE_INST_MAX;

pCaptureInstPrm->videoDecoderId     = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV; //Other then SYSTEM_DEVICE_VID_DEC_TVP5158_DRV

pCaptureInstPrm->inDataFormat       = SYSTEM_DF_YUV422P;

pCaptureInstPrm->standard           = SYSTEM_STD_1080P_60;

pCaptureInstPrm->numOutput          = 1;

pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];

pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;

pCaptureOutPrm->scEnable            = FALSE;
pCaptureOutPrm->scOutWidth          = 0;
pCaptureOutPrm->scOutHeight         = 0;
pCaptureOutPrm->outQueId            = 0;

System_linkCreate (gVcapModuleContext.captureId, &capturePrm, sizeof(capturePrm));

But this application doesn't display captured output properly. There is lots of distortion present in the output.

I am attaching the result of this application.


You can see in this image that there is lots of noise in the video.

I have doubts in the rdk application or framework or in configuring tvp7002 through i2c.

Is there anything wrong with the above capture create time parameters ?

I am also attaching list of i2c commands configuring tvp7002 registers.

#i2cset -y 2 0x21 0x0f 0xfb
i2cset -y 2 0x21 0x0f 0xCB
i2cdump -y -r 0-0xff 2 0x5d b
i2cset -y 2 0x5d 0x01 0x89
i2cset -y 2 0x5d 0x02 0x80
i2cset -y 2 0x5d 0x03 0xE0
i2cset -y 2 0x5d 0x04 0x80
i2cset -y 2 0x5d 0x05 0x32
i2cset -y 2 0x5d 0x06 0x20
i2cset -y 2 0x5d 0x07 0x2C
i2cset -y 2 0x5d 0x0B 0x80
i2cset -y 2 0x5d 0x0C 0x90
i2cset -y 2 0x5d 0x0D 0x80
i2cset -y 2 0x5d 0x0E 0x3F
i2cset -y 2 0x5d 0x0F 0x2E
i2cset -y 2 0x5d 0x10 0x5D
i2cset -y 2 0x5d 0x11 0x40
i2cset -y 2 0x5d 0x12 0x00
i2cset -y 2 0x5d 0x13 0x01
i2cset -y 2 0x5d 0x15 0x47
i2cset -y 2 0x5d 0x16 0x01
i2cset -y 2 0x5d 0x17 0x00
i2cset -y 2 0x5d 0x18 0x01
i2cset -y 2 0x5d 0x19 0x00
i2cset -y 2 0x5d 0x1A 0x8F

i2cset -y 2 0x5c 0x21 0x35 
i2cset -y 2 0x5c 0x22 0x00 
i2cset -y 2 0x5c 0x26 0x80 
i2cset -y 2 0x5c 0x28 0x53 
i2cset -y 2 0x5c 0x2A 0x87 
i2cset -y 2 0x5c 0x2B 0x00 
i2cset -y 2 0x5c 0x2C 0x80 
i2cset -y 2 0x5c 0x2D 0x00 
i2cset -y 2 0x5c 0x2E 0x80 
i2cset -y 2 0x5c 0x31 0x5A 

i2cset -y 2 0x5d 0x34 0x09
i2cset -y 2 0x5d 0x3F 0x0F
i2cset -y 2 0x5d 0x40 0x07
i2cset -y 2 0x5d 0x41 0x01
i2cset -y 2 0x5d 0x42 0x8B
i2cset -y 2 0x5d 0x43 0x08
i2cset -y 2 0x5d 0x44 0x04
i2cset -y 2 0x5d 0x45 0x04
i2cset -y 2 0x5d 0x46 0x2D
i2cset -y 2 0x5d 0x47 0x2D
i2cset -y 2 0x5d 0x48 0x00
i2cset -y 2 0x5d 0x49 0x00
i2cdump -y -r 0-0xff 2 0x5d b

Am i doing anything wrong in configuring tvp7002 ?

Please help me to solve this issue.

Note: I have also configured tvp7002 in 720p60 16-bit embedded mode and ran above application by changing pCaptureInstPrm->standard to SYSTEM_STD_720P_60.This application was working fine with 720p60.

Seeking quick response.

Thanks in advance,

Shabbir Limdiwala

  • Hi Shabbir,

     

    Could you check if filter in front of the TVP7002 is configured for 1080p60 mode?

     

    regards,

    Brijesh Jadav

  • Hi Brijesh,

    Thanks for your reply, but on EVM daughter card available filter chip(THS7368) is not configurable. We can only enable or disable filter. Please check and confirm. If this filter chip is configurable then please let me know how to configure it.

    Thanks

    Shabbir

  • Hi Shabbir,

     

    There are two input pins to this filter, filter1 and filter2, could you check in your schematic how to control these pins? Try setting both of these pins to high for the 1080p60 input.

     

    Regards,

    Brijesh Jadav

  • Hi Brijesh,

    Filter1 & Filter2 pins are set by ioexpander(PCF8575-0x21). We have programmed its port0 to 0xCB. Which sets filter1 & filter2 pins to 11.

    Please check I2C script attached with my first post.

    --

    Shabbir

  • Hi Shabbir,

     

    Can you dump a frame from the capture and see if it is from capture?

     

    Regards,

    Brijesh Jadav

  • Hi Brijesh,

    Yes It is from capture. I have dumped captured YUV frame and verified. It is as per my very first post.I can't able to attached as its a large file.

    Please check my i2c script which configures tvp7002. Let me know if there is any issue.

    __

    Shabbir

  • Hi Brijesh,

    Any update on last post ?

    __

    Shabbir

  • Hi Shabbir,

     

    Could you check the 1080p settings in Linux TVP7002 driver? These settings has been tested, so they are correct.

     

    Regards,

    Brijesh Jadav

  • Hi Brijesh,

    Yes I have tried tvp register settings from linux tvp7002 driver. But i am getting the same result.

    I have also performed similar thing. I tried to capture 1080p60 using V4l2 and I used i2cdump to get registers setting of tvp7002. Then i compared this i2cdump with my tvp register setting. All the register's values are same except 0x14, 0x23, 0x24, 0x25 registers which are read only registers.

    I am attaching both the dump. One is taken while running v4l2 application and other one is taken while running RDK application.

         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 02 89 80 e0 a0 32 20 60 00 00 00 80 80 80 24 2e    ?????2 `...???$.
    10: 5d 47 01 00 6f 47 01 00 01 00 67 77 07 00 10 10    ]G?.oG?.?.gw?.??
    20: 10 08 00 28 7b 2f 80 08 53 08 07 00 50 00 80 00    ??.({/??S??.P.?.
    30: 04 5a 18 60 03 10 00 65 24 5f 00 02 05 03 04 01    ?Z?`??.e$_.?????
    40: 00 01 84 08 05 00 2d 00 00 00 e3 16 4f 02 ce 06    .????.-...??O???
    50: ab f3 00 10 55 fc 78 f1 88 fe 00 10 00 00 00 00    ??.?U?x???.?....
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
    00: 02 89 80 e0 a0 32 20 60 00 00 00 80 80 80 24 2e    ?????2 `...???$.
    10: 5d 47 01 00 73 47 01 00 01 00 67 77 07 00 10 10    ]G?.sG?.?.gw?.??
    20: 10 08 00 26 7a 2d 80 08 53 08 07 00 50 00 80 00    ??.&z-??S??.P.?.
    30: 04 5a 18 60 03 10 00 65 24 5f 00 02 05 03 04 01    ?Z?`??.e$_.?????
    40: 00 01 84 08 05 00 2d 00 00 00 e3 16 4f 02 ce 06    .????.-...??O???
    50: ab f3 00 10 55 fc 78 f1 88 fe 00 10 00 00 00 00    ??.?U?x???.?....
    60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................

    Please see these dumped values. May be this helps us to identify the real issue.

    __

    Shabbir

  • Hi Brijesh,

    Is there any update on above issue?

    Thanks & Regards,

    Rakesh Modi

  • Hi Shabbir,

     

    Could you check the polarity of the clock configured in the VIP port in both the cases? Since TVP registers and filter configuration is same, i doubt that there is some configurating wrong in VIP. Could you please try inverting clock polarity?

     

    Regards,

    Brijesh

  • Hi Brijesh,

    Thanks for answer. By inverting pixel clock in vpss driver, we can get proper result.

    Thanks

    Rakesh Modi

  • Hi Rakesh,

    I'm curious as to the exact change you made.

    Did you change the file ti_tools/hdvpss/dvr_rdk_hdvpss/packages/ti/psp/vps/drivers/capture/src/vpsdrv_captureVip.c ?

    In particular I'm looking at line 263:             vipPortConfig->pixClkEdgePol = pUserPortConfig->pixClkEdgePol;

    Thanks,
    Philipp

  • Hi Philipp,

     

    there is an user interface for configuring polarity of each signal. please go throgh the user guide to get the idea about this interface.

     

    Regards,

    Brijesh

  • Hi, BriJesh,

    Same Problems occurs on my Evm with tvp7002 and programmes, I use DVRRDK_04.00.00.03. but I can't find the interface about capture clk polarity in vpss userguide, could you provide me with more details about the solution to the problem? Thanks in Advance.

    Regards,

    Dong