The bt.656 standard is rarely involved in analog signal acquisition. Because common analog video signal acquisition chips support the output of digital signals of bt.656, what is the format of bt.656?
This article describes the standard 8bit bt656 () YCbCr sdtv (SD) digital video signal format. It is mainly used for beginners who are just getting started with analog video acquisition.
1. Frame Concept)
A video sequence consists of N frames. There are generally two scanning methods for Image Collection, one is progressive scanning ), one is interlaced scanning ). For line-breaking scanning, each frame usually has two fields, one is the top field and the other is the bottom field ). Assume that a frame of image is 720 rows.IncludeAll the even rows, while the base fieldIncludeAll the odd rows.
2. Field)
Note that the top and bottom fields mentioned above use the word "include", rather than the latter, because in the bt.656 standard, a field consists of three parts:
Field = first vertical blanking + active video + Second vertical blanking)
For the top field, the valid data row is all the even rows of a frame image. For the bottom field, the valid data row is all the odd rows of a frame image. The number of blank rows in the top field and the bottom field is also different. For a standard 8-bit bt656 () sdtv (SD) video, for a frame of image, the format is defined as follows:
As you can know, for the PAL system, each frame has 625 rows. Among them, there are 288 rows of valid data in the top field, 288 rows of valid data in the bottom field, and the remaining rows are vertical hidden signals. Why is the number of rows 288? Because the resolution of PAL sdtv or D1 is 720*576, that is, one frame has 576 rows, so one field has 288 rows.
We can also know that the starting behavior of valid data in the top field is 23rd rows, and that of valid data in the bottom field is 335th rows.
In addition, the F field indicates the parity field, and the V field indicates whether the vertical blanking signal is used.
3. Lines)
The following describes the composition of each row. A Row consists of four parts:
Line = end code (EAV) + horizontal vertical blanking) + start code (SAV) + active video)
Shows the typical data structure of a row:
The start code (SAV) and end code (EAV) indicate the beginning and end of a line. They also contain other important information, which will be discussed later.
Why is the horizontal elimination of 280 bytes? I haven't figured out yet. I don't know if it's a standard definition.
Why is the valid data in a row 1440 bytes? Because the resolution of PAL sdtv or D1 is 720*576, that is, a row has 720 valid points. Because a colored image is collected, one line is based on the brightness information (y) and the color difference information (cbcr). Because the format is ycbcr422, there are 720 columns of Y and 720 columns of cbcr in a row, the number of valid bytes for a row is 720x2 = 1440 bytes.
4. EAV and Sav
Both EAV and Sav are 4 bytes (bytes). As you can see from the figure above, Sav is followed by valid video data. What is the format of EAV and sav?
The format of the four bytes of EAV and Sav is as follows (represented in hexadecimal notation below ):
Ff 00 00 XY
Among them, the first three bytes are fixed and must be ff 00 00, while the first 4th bytes (xy) are determined based on the field and blanking information. Their 8 bit meanings are as follows: 1 f v h P3 P2 P1 P0
Where, F: indicates the field information. When the top field is transmitted, It is 0, and when the bottom field is 1.
V: indicates the amount of information that is hidden. The value is 1 when the data is transmitted, and the value is 0 when the valid video data is transmitted.
H: Mark EAV or Sav, sav as 0, and EAV as 1
P0 ~ To protect bits, P3 depends on F, H, and V and performs verification. The calculation method is as follows:
5. Summary
This article only describes some of the most basic concepts in the bt.656 format. Many video capture chips will be involved in this aspect. If you have any questions, please leave a message for discussion. Finally, I would like to thank a brief introduction to digital video for its introduction to bt.656, which is very well written. I basically learned about bt656 and wrote this article based on it, if you are interested, take a look.
---------------------------------------------------------
Conversion from privileged blog http://www.eefocus.com/ilove314/blog/11-09/231422_89195.html below
ITU-RBT.656 video standard interface
ITU-RBT.656 video standard interface PAL standard (720*576) each game consists of four parts.
● Valid video data is divided into odd and even fields, which are composed of 288 rows. Each row contains 1440 bytes, of which 720 are y, 360 are CB, and 360 are Cr. The value of Y is 16 ~ 235; the CB and Cr values are 16 ~ 240.
● Horizontal invisibility, with 280 bytes.
● Vertical blanking.
● Control word.
The format of valid data rows is 1. EAV and Sav are embedded control words, indicating the end point and start point of the valid video respectively. Both EAV and Sav are composed of four bytes. The first three bytes ff, 00, and 00 are fixed headers, and "XY" is the control word. The meaning of the eight bits of "XY" is as follows:
● Bit7 (const), constant, total 1.
● Bit6 (f): The field synchronization signal, indicating whether the data in this row is in an odd or even field.
● Bit5 (V), Vertical Synchronous signal, indicating whether it is in the field blanking interval or the main range (valid data rows ).
● Bit4 (h): horizontal synchronous signal, indicating "SAV" or "EAV ".
● Bit3-0 (p3p2p1p0), error correction bit. P3 = V (XOR) h; P2 = f (XOR) h; P1 = f (XOR) V; p0 = f (XOR) V (XOR) H.
Detailed definitions of EAV and Sav are shown in table 1.
Table 1
Bit7 |
Bit6 |
Bit5 |
Bit4 |
Bit3-0 (p3p2p1p0) |
HEX |
Description |
1 |
0 |
0 |
0 |
0000 |
0x80 |
Even, active, Sav |
1 |
0 |
0 |
1 |
1101 |
0x9d |
Even, active, EAV |
1 |
0 |
1 |
0 |
1011 |
0xab |
Even, blank, Sav |
1 |
0 |
1 |
1 |
0110 |
0xb6 |
Even, blank, EAV |
1 |
1 |
0 |
0 |
0111 |
0xc7 |
Odd, active, Sav |
1 |
1 |
0 |
1 |
1010 |
0xda |
Odd, active, EAV |
1 |
1 |
1 |
0 |
1100 |
0xec |
Odd, blank, Sav |
1 |
1 |
1 |
1 |
0001 |
0xf1 |
Odd, blank, EAV |
The blingking is a horizontal hidden area, usually filled with 80 h/10 h.
Figure 1
For the valid data (valid data) area in figure 1, the data arrangement order is 2. Y: CB: Cr = "4": 2: 2. From the pixel point of the image, each pixel has a separate y value, while the CB and Cr data of the adjacent two pixels are the same.
Figure 2
The format of a Data row in Pal is 3.
Figure 3
In engineering practice, EAV and Sav are used to detect row and field information and separate valid data. The difference between EAV and Sav is that the control word XY data is different. Therefore, Table 2 maps the control word XY to the relationship between rows and fields, and theoretically controls the word XY data stream to appear in the order from top to bottom and left to right of table 2. However, in actual engineering, privileged students found that the order of odd and even fields seems to be the opposite of the definition here.
Table 2
Number of rows |
F |
V |
EAV |
Sav |
1 ~ 22 |
0 |
1 |
0xb6 |
0xab |
23 ~ 310 |
0 |
0 |
0x9d |
0x80 |
311 ~ 312 |
0 |
1 |
0xb6 |
0xab |
313 ~ 335 |
1 |
1 |
0xf1 |
0xec |
336 ~ 623 |
1 |
0 |
0xda |
0xc7 |
624 ~ 625 |
1 |
1 |
0xf1 |
0xec |