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.

DM368 output YCC8 at NTSC with bad vertical parameters

Under YCC8, standard mode (VENC.VMOD = 0x1001), I tried digital output from DM368 to an HDMI transmitter.

The HDMI transmitter receives from DM368:
244/243 active lines for 2 fields,
vertical blanking 19/19 lines,
vertical back porch 12/12 lines,
vertial front porch 4/3 lines.

The above are actually wrong. the correct should be
240/240 active lines for 2 fields,
vertical blanking 22/23 lines,
vertical back porch 15/15 lines,
vertial front porch 4/4 lines.

Under the structure defined by davinci encoder manager, the driver for this HDMI transmitter should be written as following:
.standards[0] = {
.name = VID_ENC_STD_NTSC,
.std = 1,
.if_type = VID_ENC_IF_YCC8,
.interlaced = 1,
.xres = 720,
.yres = 480,
.left_margin = 138,
.right_margin = 0,
.upper_margin = 21,
.lower_margin = 24,
.hsync_len = 127,
.vsync_len = 6,
.flags = 0
},

After we investigated the HDMI transmitter, we found that DM368 might not send digital output correctly according to the specification. The worst part is that vertical interval, though set, does not follow what is told to be. Veritcal front and back porch do not seem like being able to be adjusted.

Has anybody succeeded in connecting an encoder using YCC8 as the interface and run NTSC?

  • Joel,

    The parameters that's listed in the structure may not directly map to the sync, front and back porch values. So, it will be better if you dump the VENC registers and see what is the value set. Also you can try setting the values at runtime using devmem/devmem2 tool. Then you'll be able to figure out the right values. Also have you verified the horizontal sync parameter's accuracy?

  • Dear Renijith,

    The root cause of this issue appears to be timing - the timing in embedded sync and data active (out of DM368 LCD_OE pin). The HDMI transmitter can lock to the output video signals of DM368, but it mistakes vertical active lines as 243/244 (should be 240/240), vertical blanking as 22/23 (should be 19/19), vertical front porch as 4/3 (should be 4/4), vertical back porch as 15/15 (should be 12/12). Neither setting standard mode VENC.VMOD=0x1001 or non-standard mode 0x1211 can change the above errors.

    The following is the dump of VENC. Some values are different from the above posts. But they reflect correctly what I wanna write to the registers.


    0x01c71e00: 00001001 00006000 00000000 00000000
    0x01c71e10: 0000007f 00000006 00000359 00000077
    0x01c71e20: 000002d0 0000020c 00000015 000001e0
    0x01c71e30: 00000000 00000000 00000001 00000000
    0x01c71e40: 0000ff00 00000000 00000000 00000001
    0x01c71e50: 00000000 00000000 00000000 00000000
    0x01c71e60: 00000000 00000800 00000001 00000000
    0x01c71e70: 00000000 00000000 00000000 00000000
    0x01c71e80: 00000000 00000000 00000000 00000000
    0x01c71e90: 00000000 00000000 00000000 00000000
    0x01c71ea0: 00000000 00000000 00000000 00000000
    0x01c71eb0: 00000000 00000000 00000000 00000000
    0x01c71ec0: 00000000 00007000 00000000 0000017a
    0x01c71ed0: 00000000 00000000 00000000 00000000
    0x01c71ee0: 00000100 00000000 00000000 00000000
    0x01c71ef0: 00000000 00000000 00000000 00000000
    0x01c71f00: 00000400 0000057c 00000159 000002cb
    0x01c71f10: 000006ee 00000400 0000057c 00000159
    0x01c71f20: 000002cb 000006ee 00000000 00000001
    0x01c71f30: 00000002 00000000 00000000 00000000
    0x01c71f40: 00000010 00000000 00000000 00000000
    0x01c71f50: 00000000 00000000 00000000 00000000
    0x01c71f60: 00000000 00000000 00000000 00000000
    0x01c71f70: 0000d642 00000000

    About horizontal sync parameters, I have not done much. You can see in the register dump that horizontal sync carries no delay. Measuring LCD_OE pin indicates horizontal frequency runs at around 15.735kHz - which is correct.

    What can I do to make sure the horizontal sync parameter's accuracy? Please comment. Thank you in advance.

  • Joel,

    If you are already using LCD_OE pins etc, why dont you try using PRGB mode. It should work straight away, if the pins are connected properly and pinmuxes are configured appropriately. Have you tried that? 

    All sync parameters are really accurate and its proven in many platforms. It works according to the documentation as far as I have observed. You can try with PRGB mode and try to connect an oscilloscope and verify. 

  • Hello Renjith, You are correct. DM368 can actually output pretty accurately according to BT 656. We found the issue resides in the HDMI transmitter. Thanks for your assistance.