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.

YPbPr(1920x1080i @60fps) output problem on DM368 IPNC

Hi Everyone

I'd like to output analog component  to my TV but i met a strange problem.

Platform : DM368 IPNC

Image Format : YUV420

Output Format : YPbPr(1920x1080i @60fps)

VENC and OSD Register Setting is like below and colorbar test is OK

=========VENC_REG====================
0x01c71e00: 00000183 00001101 00000000 00000000
 0x01c71e10: 00000000 00000000 00000000 00000000
 0x01c71e20: 00000000 00000000 00000000 00000000
 0x01c71e30: 00000000 00000000 00000000 00000000
 0x01c71e40: 0000ff00 00000000 00000000 00000000
 0x01c71e50: 00000000 00000000 00000000 00000000
 0x01c71e60: 00000000 00000000 00000000 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 00000000 00000000 0000017a
 0x01c71ed0: 00000000 00000000 00000000 00000000
 0x01c71ee0: 00000100 00000000 00000000 00000000
 0x01c71ef0: 00000000 00000543 00000000 00000000
 0x01c71f00: 00000400 0000057c 00000159 000002cb
 0x01c71f10: 000006ee 00000400 0000057c 00000159
 0x01c71f20: 000002cb 000006ee 00000000 00000001
 0x01c71f30: 00000002 00000000 00000000 00000000
 0x01c71f40: 00000001 00000000 00000000 00000000
 0x01c71f50: 00000000 00000000 00000000 00000000
 0x01c71f60: 00000000 00000000 00000000 00000000
 0x01c71f70: 0000d642 00000000 00000000 00000000

============OSD_REG===================
0x01c71c00: 00000000 00000303 00000000 00000000
 0x01c71c10: 00000000 00000000 0000103c 0000103c
 0x01c71c20: 00000000 00000000 00003837 00008e80
 0x01c71c30: 00008ba0 00000000 00000000 00000000
 0x01c71c40: 00000060 00000020 00000000 00000000
 0x01c71c50: 00000780 0000021c 00000000 00000000
 0x01c71c60: 00000780 0000021c 00000000 00000000
 0x01c71c70: 00000000 00000000 00000000 00000000
 0x01c71c80: 00000000 00000000 00000000 00000000
 0x01c71c90: 00000000 00000000 00000000 00000000
 0x01c71ca0: 00000000 00000000 00000000 00000000
 0x01c71cb0: 00000000 00000000 00000000 00000000
 0x01c71cc0: 00000000 00000000 00000000 00000000
 0x01c71cd0: 00000000 00000000 00000000 00000000
 0x01c71ce0: 00000000 00000000 00005080 00000000
 0x01c71cf0: 00000000 00000000 00000000 00000000

But my output to TV is like below.

Maybe it related to the OSD Video window offset.

For test purpose, i changed the video window length like below

0x01c71c50 1920 --> 960

0x01c71c60 1920--> 960

At this time the output is ok but i can see only 960x1080 image.

The image is x2 zoom on horizontal direction.

 Is there anyone has same issue like me.

Thanks for reading.

Hennessy

 

 

 

  • Try VIDWINMD (0x01c71e04) = 0x00000101 instead.  It looks like you have VHZ1 (Video window 1 horizontal zoom) enabled to x2 mode.

  • Thanks for the quick response.

    Maybe you mean VIDWINMD at 0x01c71c04 not 0x01c71e04

    In my case VIDWINMD = 0x303, your suggestion : 0x101

    Bit 1: VFF0, Bit9 : VFF1 is for setting video window mode(Frame mode or Field mode)

    so, it's not related to this issue.

    Thanks anyway.

     

  • Hennessy,

    I have one question.

    In your application, is it only 'displaying' or even 'capturing'(loopback) is done?

    ~Nag

     

     

     

     

     

  • Dear Nagabhushana.

    I already did "capturing and displaying" but 'displaying' has problem like my explanation.

    But now the problem is fixed.

    The problem is the OSD_CLK0 and OSD_CLK1 in VENC register block.

    OSD_CLK0 : 0 and OSD_CLK1 = 1 is the correct setting for 1080i @60fps

    Thanks for helping.

     

  • Dear Hennessy,

    I write a scrip to try to enable component output on 1080I60 mode. But I only see the garbage on LCD monitor. If I set VENC_VDPRO to enable color bar, the color bar is no problem. I also check OSD_CLK0/1 that you mention that the value is 0 and 1. What's your PLL2 setting? I can not get 74.25MHz(PLL2->PLLDIV5) when use ARM : 432MHz. The divider just gets the 72MHz for VENC clock. Can you please give me more hints on this portion? Thanks a lot.

    1080I60 Setting :

    =======================================

    #!/bin/sh
    #1080I60

    devmem2 0x01C4002C w 0x081141EF
    #VPSS_CLKCTL
    devmem2 0x01C40044 w 0x0000003A
    #VPSS_VPBE_CLK_CTRL
    devmem2 0x01C70200 w 0x00000019
    #VENC_CLKCTL
    devmem2 0x01C71F40 w 0x00000001
    #VENC_XHINTVL
    devmem2 0x01C71F74 w 0x00000000
    #VENC_OSDCLK0
    devmem2 0x01C71F2C w 0x00000000
    #VENC_OSDCLK1
    devmem2 0x01C71F30 w 0x00000001

    ################################
    #VENC_YCCCTL
    devmem2 0x01C71E38 w 0x00000001
    ################################

    #VENC_CMPNT
    devmem2 0x01C71EE0 w 0x0100

    #OSD_MOD
    devmem2 0x01C71C00 w 0x0000
    #OSD_OSDWIN0MD
    devmem2 0x01C71C08 w 0x3039
    #devmem2 0x01C71C08 w 0x303B for 720P
    #OSD_OSDWIN1MD
    devmem2 0x01C71C0C w 0x8000
    #devmem2 0x01C71C0C w 0x8000 for 720P
    #OSD_RECTCUR
    devmem2 0x01C71C10 w 0x0000
    #OSD_EXTMODE
    devmem2 0x01C71CE4 w 0x0000
    #OSD_VIDWIN0OFST
    devmem2 0x01C71C18 w 0x103C
    #OSD_VIDWIN1OFST
    devmem2 0x01C71C1C w 0x103C
    #OSD_VIDWINADH
    devmem2 0x01C71C28 w 0x201F
    #OSD_VIDWIN0ADL
    devmem2 0x01C71C2C w 0x7C00
    #OSD_OSDWIN0ADL
    devmem2 0x01C71C38 w 0x0000
    #OSD_BASEPX
    devmem2 0x01C71C40 w 0x00D0
    #devmem2 0x01C71C40 w 0x00F0 for 720P
    #OSD_BASEPY
    devmem2 0x01C71C44 w 0x000A
    #devmem2 0x01C71C44 w 0x000A for 720P
    #OSD_VIDWIN0XP
    devmem2 0x01C71C48 w 0x0000
    #OSD_VIDWIN0YP
    devmem2 0x01C71C4C w 0x0000
    #OSD_VIDWIN0XL
    devmem2 0x01C71C50 w 0x0780
    #devmem2 0x01C71C50 w 0x0500 for 720P
    #OSD_VIDWIN0YL
    devmem2 0x01C71C54 w 0x021C
    #devmem2 0x01C71C54 w 0x02D0 for 720P
    #OSD_VIDWIN1XL
    devmem2 0x01C71C60 w 0x0780
    #OSD_VIDWIN1YL
    devmem2 0x01C71C64 w 0x021C
    #OSD_VIDWINMD
    devmem2 0x01C71C04 w 0x0303

    #VENC_VMOD
    devmem2 0x01C71E00 w 0x0183

    ############################
    #VENC_VIDCTL
    devmem2 0x01C71E04 w 0x0101
    ############################

    #VENC_VDPRO
    devmem2 0x01C71E08 w 0x0000
    #VENC_DACTST
    devmem2 0x01C71EC4 w 0x0000
    #VENC_DACSEL
    devmem2 0x01C71EF4 w 0x0453

    =======================================

    B.R.

    OC

  • Dear OC
     
    We do not use PLL2 clock, instead use external 74.25MHz OSC for 1080i60 output.
     
    if color bar is OK, your VENC setting is ok.
     
    please check OSD engine setting like frame buffer address.
     
    Even pixel clock is not 74.25Mhz, the video output itself has no problem.
     
    Best regards
     
    Hennessy
  • Dear Hennessy,

    Thank you so much for your inputs.

    I have another queries want to consult with you.

    1. How do I make sure my output frame buffer address is in SDRAM? Do you know the default address in the DM368IPNC code base?

    2. Are the calculations as below right?  

        OSD_VIDWIN0OFST = 0x1000 | (1920 >> 4);
        OSD_VIDWINADH = ((tmp_addr >> 16) & 0xFFFF); // SDRAM start address higher 7bits
        OSD_VIDWIN0ADL= tmp_addr & 0xFFFF; // VIDWIN0ADL SDRAM start address low 16bits

        OSD_VIDWIN1ADL // Does this register need to fill out? But I do not know what the calculation is.

    B.R.

    OC

       

       

  • Dear Hennessy,

    Let me summarize my situation.

    I still can not bring up 1080I OSD setting when enable component output. Evenif I modify kernel/media/video/davinci/vpbe_osd.c.

    Can you please give me more lights on this portion?

    Thanks a lot.

    B.R.

    OC