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.

720p, TVP7002, and general weirdness

Other Parts Discussed in Thread: TVP7002

I'm using the latest SDK 4.2.0.6 for the DM368.  When I try to capture 720p on the component input it fails to detect the video standard.  This is because the 7002 driver reads 749 lines instead of 750. So I decide to give the driver a bit of fudge room on that compare and then I can capture.  However the picture jiggles in the vertical and isn't centered in the horz.

Now this is our own board design, but when I tried it on the EVM I got the same line count error.  This tells me to be suspicious of our video.  The video is from an upscaling DVD player that has no component output.  So I run the HDMI into an HDMI to component convertor.  My TV monitor tells me that it's 720p standard.  The fact that the EVM gets the same error tells me that my problem may be the converted signal.  But I thought that I would throw this question out to see if anyone has had this experience.

I would be more comforting to know that our encoder could handle signals as well as the TV monitor.

JohnA

  • Well, I don't think it has anything to do with the convertor.  I got it working on 525p60 right out of the DVD player and the picture isn't centered properly.  Nobody else has problems with the tvp7002 register settings?

    Also it doesn't appear that there is a way to detect sync on the video while encoding.  When you check to see if video is present it loads the 7002 registers and glitches the video.

    JohnA

  • Hi John,

    Can you try out this branch http://arago-project.org/git/projects/?p=linux-davinci.git;a=shortlog;h=refs/heads/422-420SP this has been tested

    for tvp7002 capture on dm365evm and dm368 evm. here are some sample apps

    http://arago-project.org/git/projects/?p=examples-davinci.git;a=shortlog;h=refs/heads/422-420SP

    in this branch.

    Thx,

    --Prabhakar Lad

  • I did get the 7002 to recognize the correct number of lines in the picture by adjusting the "Line Length Tolerance" to the recommended value.  The problem I'm having now is centering the picture.  Any advice on the registers that will modify the centering?

    JohnA

  • Hi JohnA,

         We are also using the DM368 with the latest DVSDK and HDMI to component converter (actually we have tried with several converters in order to discard that it is the problem) and we are having the same issue, have you made some progress on this? If so, could you share your thoughts? Any help on this will be really appreciated!

    Regards,
    -David 

  • Adjusting the Line Length Tolerance helped with the invalid number of lines, which was causing it to fail to detect the standard.  However I still have the video shifting by line or two in the vertical, which looks like occasional vertical jitter.  This design is going to be hooked up to a specific camera.  So I've suspended trying to tweak it until I get that camera and in the meantime working on other variations of the product.

    JohnA

  • Hi John,

              We were seeing the same problem, after changing the line length tolerance to the recommended value according to the tvp7002 datasheet. We were able to detect the standard without problems, it seems that these converters have some instability in their video, changing the value from the value set by TI (which is less than the recommended value in the datasheet!!!) we got the problem occasionally, so we change it from the recommended to the maximum value suggested in the datasheet as well and this solved the problem with the jitter. Moreover, we were seeing an horizontal offset which we were able to solve modifying the AVID pixel start in the driver as well, here are the changes the we did:

    Index: kernel/linux-2.6.32.17-psp03.01.01.39/drivers/media/video/tvp7002.c
    ===================================================================
    --- kernel.orig/linux-2.6.32.17-psp03.01.01.39/drivers/media/video/tvp7002.c 2012-06-04 10:37:58.748491323 -0600
    +++ kernel/linux-2.6.32.17-psp03.01.01.39/drivers/media/video/tvp7002.c 2012-06-04 10:37:59.158485341 -0600
    @@ -135,7 +135,7 @@
    /* 0x3a: read only */
    /* 0x3b: read only */
    /* 0x3c: read only */
    - { TVP7002_L_LENGTH_TOL, 0x03 },
    + { TVP7002_L_LENGTH_TOL, 0x06 },
    { TVP7002_VIDEO_BWTH_CTL, 0x00 },
    { TVP7002_AVID_START_PIXEL_LSBS, 0x01 },
    { TVP7002_AVID_START_PIXEL_MSBS, 0x2c },
    @@ -619,6 +619,10 @@
    tvp7002_write_reg(sd, TVP7002_AVID_START_PIXEL_HIGH,
    TVP7002_AVID_START_PIXEL_DEFAULT);

    + err |=
    + tvp7002_write_reg(sd, TVP7002_LINE_LENGTH_TOLERENCE,
    + TVP7002_LINE_LENGTH_TOLERENCE_MAX);
    +
    if (err < 0) {
    err = -EINVAL;
    return err;
    Index: kernel/linux-2.6.32.17-psp03.01.01.39/include/media/tvp7002.h
    ===================================================================
    --- kernel.orig/linux-2.6.32.17-psp03.01.01.39/include/media/tvp7002.h 2012-06-04 10:37:58.898485440 -0600
    +++ kernel/linux-2.6.32.17-psp03.01.01.39/include/media/tvp7002.h 2012-06-04 10:51:04.988527095 -0600
    @@ -234,6 +234,8 @@
    #define TVP7002_VSYNC_ALIGNMENT_DEFAULT 0x10
    #define TVP7002_SYNC_BYPASS_DEFAULT 0x00
    #define TVP7002_LINE_LENGTH_TOLERENCE_DEFAULT 0x03
    +#define TVP7002_LINE_LENGTH_TOLERENCE_REC 0x06
    +#define TVP7002_LINE_LENGTH_TOLERENCE_MAX 0x7F
    #define TVP7002_ADC_REF_SETUP_DEFAULT 0x04
    #define TVP7002_POWER_DOWN 0x7F
    #define TVP7002_VIDEO_BANDWIDTH_CONTROL_DEFAULT 0x01
    @@ -247,7 +249,7 @@
    #define PHASE_SELECT_720p 0x16
    #define POST_DIVIDER_720p 0x0
    #define HPLL_CONTROL_720p 0xA0
    -#define AVID_START_PIXEL_LSB_720p 0x43
    +#define AVID_START_PIXEL_LSB_720p 0x23
    #define AVID_START_PIXEL_MSB_720p 0x01
    #define AVID_STOP_PIXEL_LSB_720p 0x4B
    #define AVID_STOP_PIXEL_MSB_720p 0x06

    I hope this can solve your problem as well,

    Regards, 

    -David

  • Thanks David,

    I will give these changes a try.  I also have the horz offset problem.

    JohnA