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.

Video capturing problem with DM642

Other Parts Discussed in Thread: CCSTUDIO



Hi,

I'm using the VPORTs of DM642 to capture four NTSC camera video and doing some
image processing (like mirroring or rotations) and then output the processed
video image to VPORT for display. The video decoder I use is ADV7180.

I have a question about the video port configuration. Please refer the code
below for my current settings.

        #define LINE_SZ   720
        #define NUM_LINES 240

        #define    START_Y        9

        VPORTCAP_Params DM642_vCapParamsChan = {
            VPORT_MODE_BT656_8BIT,                 /* cmode:3  */

            VPORT_FLDOP_FRAME,                     /* fldOp:3  */

             VPORT_SCALING_DISABLE,              /* scale:1  */
            VPORT_RESMPL_DISABLE,               /* resmpl:1 */
            VPORTCAP_BPK_10BIT_ZERO_EXTENDED,     /*bpk10Bit:2*/

            VPORTCAP_HRST_SAV,                     /*hCtRst:1  */

            VPORTCAP_VRST_END_VBLK,              /*vCtRst:1  */


            VPORTCAP_FLDD_DISABLE,               /*fldDect:1 */

            VPORTCAP_EXC_DISABLE,                 /*extCtl:1  */

            VPORTCAP_FINV_ENABLE,               /* fldInv:1 */

            0,                                     /*fldXStrt1 */
            START_Y,                               /*fldYStrt1 : 1*/

            0,                                     /*fldXStrt2 */
            START_Y+1,                            /*fldYStrt2 : 1*/

            LINE_SZ-1,                             /*fldXStop1 */
            NUM_LINES+START_Y,                    /*fldYStop1 */

            LINE_SZ-1,                             /*fldXStop2 */
            NUM_LINES+START_Y,                    /*fldYStop2 */

            ((LINE_SZ)>>3),                      /*thrld     */
            3,                                     /*numFrmBufs*/
            128,                                 /*alignment */

            VPORT_FLDS_MERGED,                     /*mergeFlds */
            NULL,                                  /*segId     */
            EDMA_OPT_PRI_HIGH,                     /* edmaPri       */
            8
        };

With this configuration, in one of the captured video image, there is a grey
flickering horizontal line which slowly moves upward from the bottom of the
video image. When the line reaches top of of the image, it disappear for a
while (about 8 seconds) and then appears at the bottom and moves upward again.
It takes 73 seconds for the line move from the bottom to the top.

Here were the experiments I did.
1. If I change the value of NUM_LINES from 240 to 243, the flickering line disappears.
2. I change the configuration according to the file evmdm642_vcapparamsNTSC_EMBEDDED.c
   which I found in \CCStudio_v3.1\boards\evmdm642\examples\video\scaling (the
   installation of my evmdm642). So here is the new configuration:

    #define LINE_SZ   720
    #define NUM_LINES 240


    VPORTCAP_Params DM642_vCapParamsChan = {
        VPORT_MODE_BT656_8BIT, /* cmode:3  */
        VPORT_FLDOP_FRAME,     /* fldOp:3  */

        VPORT_SCALING_DISABLE, /* scale:1  */
        VPORT_RESMPL_DISABLE,  /* resmpl:1 */
        VPORTCAP_BPK_10BIT_ZERO_EXTENDED, /*bpk10Bit:2   */

        VPORTCAP_HRST_SAV,     /*hCtRst:1  */
        VPORTCAP_VRST_EAV_V0,  /*vCtRst:1  */
        VPORTCAP_FLDD_DISABLE, /*fldDect:1 */
        VPORTCAP_EXC_DISABLE,  /*extCtl:1  */
        VPORTCAP_FINV_ENABLE,  /* fldInv:1 */

        0,                     /*fldXStrt1 */
        18,//1,                     /*fldYStrt1 */
        0,                     /*fldXStrt2 */
        18,//1, //15,               /*fldYStrt2 */

        LINE_SZ-1,             /*fldXStop1 */
        NUM_LINES+18, //+14,      /*fldYStop1 */

        LINE_SZ-1,             /*fldXStop2 */
        NUM_LINES+18, //+14,      /*fldYStop2 */

        (LINE_SZ>>3),          /*thrld     */
        3,                     /*numFrmBufs*/
        128,                     /*alignment */
        VPORT_FLDS_MERGED,     /*mergeFlds */
        NULL,                  /*segId     */
        EDMA_OPT_PRI_HIGH,     /*edmaPri   */
        8                      /* irqId    */
    };


  I notice that except the start and stop settings, there is another difference
  between the two configurations, the "vCtRst".

  I'm new to DM642 so I'm not sure what correct configuration will be.

  Please help.

  Thanks a lot!


  Leo Chen

  • Is the noise in the captured video buffer or is it a display artifact?

    If it is in the captured buffer, see if you can figure out how it is moving through the data. This may give you a better idea what might be out of sync. You have 3 buffers, so you should be able to halt the processor and look at the three buffers and see the exact pixels where the noise begins.

  •  

    Thank you for your reply.

    I found this noise in the capture buffer. And the noise moves the same way as I see on the display.

    By the way, I think the settings I used for my project is a bit weired.

    According to the document spru692, p.62, if I use VPORTCAP_VRST_END_VBLK (=1) mode for the vertical counter reset, I should set fldYStrt1 and fldYStrt2 as 1 instead of 9 to capture the active lines. But for the reality, if I set them as 1, I get several black lines on top of the image.

    On the other hand, if I use the VPORTCAP_VRST_EAV_V0 (=0) mode, according to the spru692, fldYStrt1 and fldYStrt2 should be 20, which is close to the settings I used, 18. And with this mode, I don't have the noise.

    Any idea or suggestion about this?

    Thanks a lot!

     

    Leo