• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Data Converters » Video Converters » Video Converters - Forum » what is the data format of 4-Ch CIF,27M,Single BT.656,Line-Interleaved Mode about TVP5158?
Share
Video Converters
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Check out
Analog Wire blog
  • $core_v2_blog.Current.Name

    RS-485 - Who says you can't teach an old dog new tricks?

    Posted 1 day ago
    by Neel Seshan
    Would you agree that RS-485 has turned out to be one of the most...
  • $core_v2_blog.Current.Name

    Filter for thought

    Posted 2 days ago
    by Soufiane Bendaoud
    Have you ever wondered how engineers designed active filters...
  • $core_v2_blog.Current.Name

    Let’s take this driver out for a spin

    Posted 8 days ago
    by Soufiane Bendaoud
    Before I suggest a suitable op amp to drive an ADC, I look at...

what is the data format of 4-Ch CIF,27M,Single BT.656,Line-Interleaved Mode about TVP5158?

what is the data format of 4-Ch CIF,27M,Single BT.656,Line-Interleaved Mode about TVP5158?

This question is answered
jerry tong
Posted by jerry tong
on Jul 05 2010 03:22 AM
Intellectual260 points

Hi,

           I have got the video data by TVP5158 decoder.It can work well at 1-Ch D1,Non-interleaved, 27M,BT.656 mode. Now, I want to set the TVP5158 working at 4-Ch CIF,27M,Single BT.656,Line-Interleaved mode .But I can't understand the data format of 4-Ch CIF,27M,Single BT.656,Line-Interleaved Mode about TVP5158, from the "3.8.3.4 Metadata Insertion for Line-Interleaved Mode" in datasheet,  I have some questions as follows:

           1)  what's meaning of "P0,P1,P2,P3,P4,P5,P6,P7" and "FID and V data" ?

           2)  what's the length of  the "Channel Data" in 4-Ch CIF mode?

           3)  if I set  the TVP5158 working at 4-Ch CIF,27M,Single BT.656,Line-Interleaved mode , Is the output format about BT656 like these(BT656  PAL :  720*576 ;   CIF :360*288)??:

                EAV + ControlCode + SAV + "Start Code + 356 1-Ch CIF ValidData"    +   "Start Code + 356 2-Ch CIF ValidData"        // first   line  include  720 pixels

                EAV + ControlCode + SAV + "Start Code + 356 3-Ch CIF ValidData"    +   "Start Code + 356 4-Ch CIF ValidData"        // second  line  include    720 pixels

 Best  regards

Jerry   

:

               

TVP5158
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • James Nave
    Posted by James Nave
    on Jul 06 2010 18:55 PM
    Expert6160 points

    Jerry,

    The 4-byte start code, SC[3:0], is inserted into both the luma and chroma data.  Thus, there is a total of 8 bytes of metadata per line.  These 8 bytes were designated P0 to P7 in the TVP5158 datasheet.

    The SAV and EAV codes of the multi-channel super-frame correspond to a progressive frame.  Thus, the F-bit and V-bit of the super-frame are both set to 0.  However, the actual F-bit and V-bit of the channel data is provided in the 4-byte start code.

    I'm not sure what you mean by length of the channel data.  The TVP5158 output includes all active pixels per line (720 for D1 and 360 for CIF) and all lines per frame (525 for NTSC and 625 for PAL) for each video channel.  Each super-frame also includes a few dummy lines.  The dummy lines are inserted whenever the TVP5158 FIFOs are empty.

    The output format for the 8-bit line-interleaved mode is shown in Figure 3-15 of the TVP5158 datasheet.  Each line of the super-frame only includes one video channel.

           SAV + StartCode + 360 1-Ch CIF valid data + EAV

           SAV + StartCode + 360 2-Ch CIF valid data + EAV

           Etc.

    Also, the channel order is not guaranteed in the line-interleaved mode.  Therefore, the channel ID must always be read from the 4-byte start code.

    Regards,

    Jim

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 10 2010 04:30 AM
    Intellectual260 points

    Hi, Jim:

    Thanks for your detailed interpretation.

    as you say, "the F-bit and V-bit of the super-frame are both set to 0.  However, the actual F-bit and V-bit of the channel data is provided in the 4-byte start code." so the SAV and EAV is always 0x80 and 0x9D. Is my understanding  right ?

    Actually, I can get the SAV(0x9D) and EAV(0x80) from the data after I set the register (not crop mode)

    B0 = 0xA3;
    B1 = 0x10;  
    B2 = 0x05;   
    B3 = 0xE4;
    B4 = 0xE4;

    but now , the data I got is not similar with what you said --"SAV + StartCode + 360 1-Ch CIF valid data + EAV", the data that I got is as follows:

    ff 00 00 80  83 83 70 70  99 99 c7 c7   80 10 80 0f   80 0f 80 10   80 0f  80  0f   ff 00 00 9d 
    ff 00 00 80  83 83 70 70  58 58 c7 c7   80 0f 7f  10   80 10 80 10  80 0e 80 0e  ff 00 00 9d 
    ff 00 00 80  81 81 70 70  b6 b6 80 80  80 10 80 0f   81 10 80 10  7f 0e 7e 0e    ff 00 00 9d 
    ff 00 00 80  80 80 71 71  8d 8d 80 80  7f 12 80  0f   81 15 80 8d  80 08 81 08   ff 00 00 9d 
    ff 00 00 80  82 82 70 70  95 95 80 80  80 0f 80 0e   80 0f 80  0f   80 0e 80 0e    ff 00 00 9d 
    ff 00 00 80  80 80 70 70  6d 6d c7 c7       +    1844 bytes Data     +   ff 00 00 9d     

    1) if the "ff 00 00 80" is SAV, then "80 80 70 70  6d 6d c7 c7" is StartCode, and "ff 00 00 9d " is EAV, why  does "360 1-Ch CIF valid data " has so many data(1844 bytes)?

    2)as you say, " The TVP5158 output includes all active pixels per line (720 for D1 and 360 for CIF) and all lines per frame (525 for NTSC and 625 for PAL) for each video channel."   the CIF (PAL) is 360*288, the hight is 288, Does it has 625 lines per frame? I don't know that how to work, would you like to explain it ? 

    Jerry

    Best regards

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 12 2010 06:37 AM
    Intellectual260 points

    Hi , Jim :

    Sorry, I can't  assure that the 4-Ch CIF  Line-Interleaved output data formats,so I have some questions to inquire.

    As you say, if each line of the super-frame only includes one video channel.

           SAV + StartCode + 360 1-Ch CIF valid data + EAV     

    That means "Channel Data" length is 360*2 bytes from Figure 3-15 of the TVP5158 datasheet,  is right?

    and if  all lines per frame (525 for NTSC and 625 for PAL),  a frame CIF data  has 288 lines , is the other lines dummy  lines ?

    or a frame of BT656 data  include 2 frame CIF data ?

     

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James Nave
    Posted by James Nave
    on Jul 12 2010 15:55 PM
    Expert6160 points

    Hello Jerry,

    Yes, the channel data length is 360*2 bytes.

    The lines per frame numbers I provided in my previous response were actually for D1 output formats.

    For the 4-Ch CIF output format, the total number of lines per super frame (default super-frame size) is as follows.

        NTSC: 4*(526/2) + 2 = 1054

        PAL: 4*(626/2) + 2 = 1254

    Each super--frame includes a 2-line vertical sync.  For the nominal horizontal input frequency, the output super-frame typically includes a few dummy lines.  The dummy lines are inserted whenever the TVP5158 output FIFOs are empty. 

    Also, the output frame rate of the super-frame is asynchronous with the input frame rate of all 4 video channels.

    Regards,

    Jim

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 13 2010 06:44 AM
    Intellectual260 points

    Hi, Jim:

    Thanks for your replying, now, I  know the data formats of  4-Ch CIF PAL/NTSC mode , and I can verify it by the data that I received, It is :

    SAV + StartCode + 360  X-Ch CIF valid data + EAV   (X= 0~3)

    SAV is "FF 00 00 80", EAV is "FF 00 00 9D"

    As you say, each super--frame includes a 2-line vertical sync. yes , I find it in the data that I received.

     the SAV and EAV in the 2-line vertical sync  is always  "FF 00 00 AB" and  "FF 00 00 B6" 

    and the 2-line vertical sync  is continuous. after 2-line vertical sync, then the  new  super--frame  is start ,   is right ?

    By the way, I have 4 channel camera data output to TVP5158 , but the chnanel ID I got from StartCode is always 0 and 3, what's the problem?

     

    Jerry

    Best regards

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 13 2010 07:33 AM
    Intellectual260 points

    Hi, Jim:

    I have a another question, I find  F ,V ,H in StartCode SC0 is variable and I find the value "F=1", so I want to know  the CIF formats(TVP5158 output ) is progressive or interlacing ?

    If  the data  of CIF formats is interlacing ,do I need merge a odd frame and a even frame to a whole frame?

     

    Jerry

    best regards

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James Nave
    Posted by James Nave
    on Jul 13 2010 14:49 PM
    Expert6160 points

    Hello Jerry,

    Yes, the new super-frame starts immediately after the 2-line vertical sync.

    In the 4-Ch CIF line-interleaved mode, the output metadata should include all 4 channel IDs.  However, the video channels are not output in any particular order.

    Yes, the CIF output is actually interlaced.  For a true progressive CIF output, the easiest solution is to select the the Half-D1 output format and then drop every other field in the backend.

    Regards,

    Jim

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 14 2010 07:05 AM
    Intellectual260 points

    Hi, Jim:

    Thanks for your explanation, now ,I can get all 4 channel IDs from received data,and show the 4-Ch video image. but the video image is not normal.

    I find each channel has 308 total lines (not include dummy lines), and  283~285 valid lines (V=0, include valid video data),

    I think the total valid lines  of each channel   less than 288  leads  to  the video image  is always moving.

    the total valid lines  of each channel  is 284, is it right?

    How to  get  288  valid lines ?

    Jerry

    best regards

     

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James Nave
    Posted by James Nave
    on Jul 14 2010 18:15 PM
    Expert6160 points

    Hello Jerry,

    The rest of the video lines will be in the next super-frame.

    The total number of lines in a super-frame is a fixed arbitrary number.

    Therefore, the number of actual channel lines per super-frame decreases as the number of dummy lines increases.

    The insertion of dummy lines whenever the TVP5158 output FIFOs are empty is required to maintain synchronization with the input.

    There will always be some dummy lines during normal operation.  The actual number of dummy lines per super-frame depends on the input horizontal frequency of each video channel.

    Regards,

    Jim

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • zhangzhenguo
    Posted by zhangzhenguo
    on Jul 15 2010 01:31 AM
    Prodigy40 points

    Hi,James:

      I am using TVP5158 with DM642. The tvp5158 was be set 2-ch interleaved half-d1 output mode.

      I also found the valid lines each channel is less than 576, you said  " The rest of the video lines will be in the next super-frame." ?

      The size of super-frame is 1250 lines for PAL ,How can I get the rest of video lines from next super-frame?

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • zhangzhenguo
    Posted by zhangzhenguo
    on Jul 15 2010 01:58 AM
    Prodigy40 points

    Hi, James:

    I also found the bit F of SC0 is error, I can't drop one field through it. I only need one field, and How can I do?

     

    Regards,

    Roy

     

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • zhangzhenguo
    Posted by zhangzhenguo
    on Jul 15 2010 05:49 AM
    Prodigy40 points

    Hi, Jerry:

    You have posted:

    I find each channel has 308 total lines (not include dummy lines), and  283~285 valid lines (V=0, include valid video data),

    I think the total valid lines  of each channel   less than 288  leads  to  the video image  is always moving.

    the total valid lines  of each channel  is 284, is it right?

    How to  get  288  valid lines ?

    Do you have resolved the problem?

    Can you help me?

    Roy zhang

    Best Regards!

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 15 2010 06:23 AM
    Intellectual260 points

    Hi, Roy:

    The data order of StartCode(SC3 ,SC3, SC2,SC2,SC1,SC1,SC0,SC0) is

    Data[0],Data[1],Data[2],Data[3],Data[4],Data[5],Data[6],Data[7],

    not Data[7],Data[6],Data[5],Data[4],Data[3],Data[2],Data[1],Data[0].

    You can try it.

    Jerry

    regards

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • James Nave
    Posted by James Nave
    on Jul 15 2010 20:50 PM
    Expert6160 points

    All,

    The TVP5158 output formatter creates super-frames by inserting a 2-line VSYNC into the multiplexed channel data stream at fixed arbitrary time intervals.

    For the 4-Ch CIF output format with PAL inputs, the default super-frame size including the 2-line VSYNC is 1254 lines.

    The nominal duration of a PAL video frame is 40 ms.

    However, the default duration of the 4-Ch CIF super-frame is only 38.64ms.

               (832 pixels) * (1254 lines) / 27MHz  = 38.64ms

    Since the duration of the input frame (40 ms) is longer than the duration of the output super-frame (38.64 ms), it is impossible to fit all the lines of an entire input frame into an output super-frame of this size.  However, it really doesn't matter.  The rest of the video lines will be in the next super-frame and no lines will ever be lost.

    Regards,

    Jim

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • jerry tong
    Posted by jerry tong
    on Jul 15 2010 21:13 PM
    Intellectual260 points

    Hi, Jim:

    Thanks for your useful replying.

    Would you like to explain "832 pixels" in "(832 pixels) * (1254 lines) / 27MHz  = 38.64ms"?

    Why is not "360 pixels"?

    Jerry

    Best regards

    TVP5158
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use