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.

tvp5158 2 1ch D1 output with dm6467

Other Parts Discussed in Thread: TVP5158, TVP5154

Hi!

    I use dm6467 vpif0 vpif1 connect with tvp5158 portA and portB. What I wanted is that tvp5158 portA and portB both output

D1 video to dm6467.So I set tvp5158 to not-interleaved mode.By default, tvp5158 portA sellect ch1 and portB sellect ch2.

I got a problem: When I don't set LLC_en bit of  B1h, the videos the dm6467 both get will loss frame sometimes.

When I set LLC_en bit, the port A video output is fine, but port B video output is moving from down to up and have some horizontal line.

That seems portB clk is not correct. But both two port use the same clk line.

 

I do a test , by setting B3h from 0xe4 to 0xe1, so tvp5158 port A sellect ch2 and portB sellect ch1.The result is that both dm6460 vpifs got

ch2 video, and the video is fine.That seems portB still sellect ch2 not ch1. Why?

the reg order I write is :

feh  <---  0x03   #sellect decode write

b0h <-- 0x00

b1h <-- 0x90

b2h <-- 0x25

b3h <-- 0xe4

b4h <-- 0xe4

b5h <-- 0x00

b6h <-- 0x1b

b7h <-- 0x04

 

I see that LLC_en bit is used for port A only, why do effect on port B? And portB how to sellect other channel?

I use tvp5158 patch v02_01_17, is that related?

zcliang


  • Hello zhencheng,

    Recommend that you use one of the line-interleaved output formats with the DM6467.  The line-interleaved mode was specifically designed for use with the DM6467.

    When the line-locked clock is enabled in the non-interleaved mode, the entire multi-channel output formatter of the TVP5158 is bypassed.  Only Port A is intended to be operational in this mode.

    When the line-locked clock  is disabled, the output clock is a fixed 27MHz frequency which causes the EAV2SAV interval to change from line to line.  This is known to cause dropped lines with various back-end devices.

    Regards,

    Jim

  • Hi,James:

    When I disable the line-locked clock, I check the output clock,It's 27.03MHz. And I encore the video as a h264 file.You would see that when human is moving, It will somethings jump to the previous frame.The dm6467 check vpif irq status with 0x10 error always.

    The h264 file:

    http://mail.qq.com/cgi-bin/ftnExs_download?k=5f3563392bfee6cde42ce8234230061d5153550d535406574b0c500c561d005051004e0050540c1f050756000205555354055a0a643534034807550d64&t=exs_ftn_download&code=f5c9d042

    zcliang

  • Hello zhencheng,

    Again, we recommend that you use one of the line-interleaved output formats with the DM6467.  The line-interleaved mode was specifically designed for use with the DM6467.

    We don't recommend or support using the non-interleaved mode with the DM6467.

    If the crystal frequency is 27MHz +/- 50ppm as required, then the output clock will also be 27MHz +/-50ppm in the non-interleaved mode.

    Regards,

    Jim

  • Hi,Jim:

    You mean that tvp5158 non-interleaved mode can not used with the dm6467 ? Is it a known bug ? And the problem

    can't be fixed?

    If so, we must re-deside our produce.

    Thanks.

    zcliang

  • Hello Zhencheng,

    Again, the line-interleaved mode was specifically designed for use with the DM6467.

    I'm not aware of any other approach to reliably interface the TVP5158 to the DM6467.

    Recommend that you try using the 2-Ch D1 line-interleaved mode.  This should not impact your board design.

    Regards,

    Jim

  • Hi,jim:

    I see from the datasheet that the line-interleaved mode does not strictly output one line from each decoder channel sequentially,it

    is possible to output two consecutive lines from the same decoder channel or to skip one decoder channel output.

    The standard BT656 format line output should be 4bytes EAV + 280bytes blankcode + 4bytes SAV + 1440bytes data.

    For 2-ch or 4-ch line-interleaved mode,how do the tvp5158 output ?

    And how do I demux the channel data? I am not sure about that.

    Thanks.

    zcliang

  • Hi,jim;

    I see the Page.29 of the datasheet. The line output format is

    SAV + 8bytes Startcode + data + EAV + BLANK

    So when I demux the line , I need to read each ChID in the Startcode.

    Is it right?

    Do the dm6467 have the auto demux mechanism to  do the work ?

    zcliang

  • Zhengcheng,

    Yes, you need to use the ChID to demux the lines.

    Yes, we have sample code to demux all line-interleaved output formats on the DM6467.

    However, it's currently not available on an external web site.  Therefore, we'll need your email address to send it to you.

    Can you contact the nearest TI sales office and have them forward your email address to us (via our internal video converters forum). 

    Regards,

    Jim

  • Hi,jim;

    I have got the mcvip_tvp5158_v010013_20100211.zip. Is it the sample code you said?

    It just is a lookback demo.I need to merge it to encore code.

    zcliang

  • Zhencheng,

    Yes, that's the sample code I was referring to.

    Regards,

    Jim

  • Hello ZhenCheng,

           I am not sure what's reason leads your issue,but I have one customer in China is using the similiar method(tvp5158 is in non-interleaved mode, just like TVP5154's output) and their backend DSP is DM648 or DM642. They reported the same issue before,but after i asked them to add a driver in 27MHz clock circuit(a CPLD),they fixed the issue.

         As what Jim said,you can use TI's reference code to make TVP5158 in line-interleaved mode,which has demux module.

         BTW, I never heard you and your company. Would you please send your information to me directly? leon-yu@ti.com; mobil phone:13823314063

        Thanks.

  • Hi,LeonYu:

    I have sent email to you.

    What you mean that "add a driver in 27MHz clock circuit(a CPLD)" ?
    The tvp5158 output clk is 27MHz now, we connect it to both dm6467
    vpifs clk.

    By the way, I see that that start code in line-interleaved mode is 8bytes SC3 SC3 SC2 SC2 SC1 SC1 SC0 SC0.

    Is there any difference between SCn and SCn (n= 3 , 2 , 1, 0)?

    And in the mcvip demux code , it use a 32b(4bytes) as the startcode.

    metaData = *(volatile Uint32*)(curAddr);  Why?

    Thanks.

    zcliang

  • Hi,

    I still don't understand the startcode in 8bit Bt656 interface.Is there SC3 SC3 as one byte?

    And in  mcvip_demux, there is a code " curAddr += hndl->v4l2FrameInfo.offsetH; // *2 is required for DM365 only",

    why do it not need *2 for dm6467? I think that the bytesbyline should be 720*2.

     

    zcliang

  • Hello Zhencheng,

    The 4-byte start code, SC[3:0], is completely defined in the TVP5158 data manual.

    The 4-byte start code, SC[3:0], is inserted into "both" the luma bytes and the chroma bytes (e.g. Cb, Y, Cr, Y, etc.) for all line-interleaved output formats.

    Referred to the TVP5158 output, there are 720*2 active pixels plus 8 metadata bytes between the SAV and EAV codes for the 8-bit 4-Ch D1 output mode.

    The previously mentioned sample code to demux all line-interleaved output formats on the DM6467 has been thoroughly tested.

    Regards,

    Jim

  • Hi Jim and  LeonYu,

    I am also using the TVP5158 in non-interleaved mode and facing the back and forth issue. I have posted the full details at http://e2e.ti.com/support/data_converters/videoconverters/f/376/p/53637/190889.aspx#190889

    But in your mailing conversation you ahve mentioned that: In china one of your customer is using the non-interleaved mode and you suggested

    As written by LeonYu on 06-10-2010: "They reported the same issue before,but after i asked them to add a driver in 27MHz clock circuit(a CPLD),they fixed the issue."

    What exactly is this solution? Can you please help me to understand this in detail?

    Thank you,
    Santosh

     

  • Santosh,

    That thread was referring to a DM642 or DM648 application.

    The line-interleaved mode is the only known approach to reliably interface the TVP5158 to the DM6467.

    Regards,

    Jim

  • Hello Jim,

    Thanks again. I went through your reply to other thread at http://e2e.ti.com/support/data_converters/videoconverters/f/376/p/53637/191584.aspx#191584

    Regards,

    santosh

     

     

     

  • Do  you understand the "metaData = *(volatile Uint32 *)(curAddr)"?

  • Yin,

         Because the super frame includes the 8-byte metaData,which is in the begin of every line,so the pointer of curAddr is the metaData.

         For example(the following is the raw data gotten from DSP removed EAV/SAV.....

         80 80 72 72 B2 B2 EC EC 80 12..............................

         81 81 70 70 A0 A0 80 80 79 30 .................................

        

  •  

    thank for your reply! I have some problem to ask  for you.

    LeonYu said:

    Yin,

         Because the super frame includes the 8-byte metaData,which is in the begin of every line,so the pointer of curAddr is the metaData.

         For example(the following is the raw data gotten from DSP removed EAV/SAV.....

         80 80 72 72 B2 B2 EC EC 80 12..............................

         81 81 70 70 A0 A0 80 80 79 30 .................................

        

    the metadata is Uint32 type, so i  have some problem about it. You say  DSP removed EAV/SAV, it means 5158 caputre data through ?

  • Yin,this is the structure of super frame.Wish this can help you.

     

  • the function mcvip_demux_run in mcvip_demux.c  demux the superframe,is not  it? I find the file it has blank code(sav/eav,..,etc.) and metadata(EOL,BOL,...,etc).