1、 1 Scope This standard defines the encoding process of the HD-D5 video compression and its data format for the 1080/59.94i, 50i, 25p, 24p, 23.98p system (hereafter referred to as the 1080 system) and the 720/59.94p system (hereafter referred to as the 720 system). 2 Normative references The followin
2、g standards contain provisions which, through reference in this text, constitute provisions of this standard. At the time of publication, the editions indicated were valid. All standards are subject to revision, and parties to agreements based on this standard are encouraged to investigate the possi
3、bility of applying the most recent edition of the standards indicated below: SMPTE 274M-2003, Television 1920 x 1080 Sample Structure, Digital Representation and Digital Timing Reference Sequences for Multiple Picture Rates SMPTE 296M-2001, Television 1280 x 720 Progressive Image Sample Structure An
4、alog and Digital Representation and Analog Interface 3 Acronyms BUF Buffer memory C Color-difference signal C3RMB Compressed data of 3 RMBs C(t, u) The value of the DCT coefficient at frequency (t, u) CB/CRColor-difference signal CC0 CC2 Categories for C DCT block Ccoef( ) C DCT CG CG Coefficient Gr
5、oup CGNR CG number of one Y/C DCT coefficient block in one RMB CGNS CG number of one Y/C DCT coefficient block in one SMB CN C3RMB number in one RMBG CRcoef( ) Rearranged C DCT CG CS C DCT block number in one SMB CY0 CY3 Categories for Y DCT block DCT Discrete cosine transform DIF Digital interface
6、DIF(n) DIF block numbered n Page 1 of 41 pages SMPTE 342M-2004 Revision of SMPTE 342M-2000 Copyright 2004 by THE SOCIETY OF MOTION PICTURE AND TELEVISION ENGINEERS 595 W. Hartsdale Ave., White Plains, NY 10607 (914) 761-1100 Approved February 3, 2004 SMPTE STANDARD for Television HD-D5 Compressed Vi
7、deo 1080 System and 720 System Encoding Process and Data Format SMPTE 342M-2004 Page 2 of 41 pages DN DIF block number EOB End of block code EOM End of 3 RMBs code exnor Logical exclusive nor f( ) Offset value table for SMBG distribution FCB Category flag of CBDCT block FCB Category flag of CBDCT bl
8、ock FCR Category flag of CRDCT block FCR Category flag of CRDCT FFL Field number flag FMB Category flag of the MB FMB Category flag of the MB FYa FYd Category flags of the four DCT blocks (Ya Yd) of the MB FYa FYd Category flags of the four DCT blocks (Ya Yd) of the MB H The horizontal SMB position
9、number in one video field (1080 system) or one video frame (720 system) HR The column position number of RMB HS The column position number of SMB in one SMBG IDCT Inverse discrete cosine transform int (A) Integer part of A LEN The byte length of C3RMB MB Macro block mod Modulus operator N.A. Not app
10、licable Offset( ) Offset value for RMB shuffling P(r, s) The value of the pixel at the position (r, s) in Y/C DCT block Qno Quantization number Qstep Quantization step value r The horizontal pixel position number in Y/C DCT block Rg The RMBG number within the RMBs RMB Rearranged macro block RMBG Rea
11、rranged macro block group Rn The number of RMB coding order in each RMBG s The vertical pixel position number in Y/C DCT block SA The starting address of the remainder data in buffer memory SABM One byte data of SA (two bytes) Sg The SMBG number in one video field (1080 system) or one video frame (7
12、20 system) SMB Super macro block SMBG Super macro block group t The horizontal frequency number in Y/C DCT coefficient block TableCY0 3 Set up value tables for Y weighting function TableCC0 2 Set up value tables for C weighting function u The vertical frequency number in Y/C DCT coefficient block V
13、The vertical position number of SMB in one video field (1080 system) or one video frame (720 system) VLC Variable length coding VR The row position number of RMB VS The row position number of SMB in one SMBG W(t, u) Weighting value at frequency (t, u) Y Luminance signal Ya Yd Four Y DCT blocks in on
14、e MB Ycoef( ) Y DCT CG YR The Y DCT coefficient block number in one RMB YRcoef( ) Rearranged Y DCT CG YS The Y DCT block number in one SMB Z The row position number of the RMB after RMB shuffling SMPTE 342M-2004 Page 3 of 41 pages ZRL Code of 15 successive zero coefficients followed by a coefficient
15、 of zero amplitude 4 Video processing 4.1 Overview Luminance (Y) and color-difference components (CBand CR) are derived from the following HD video signals: 1080 line / 59.94 Hz field frequency interlace system (1080/59.94i) 720 line / 59.94 Hz frame frequency progressive system (720/59.94p) 1080 li
16、ne / 50 Hz field frequency interlace system (1080/50i) 1080 line / 25 Hz frame frequency progressive system (1080/25p) 1080 line / 24 Hz frame frequency progressive system (1080/24p) 1080 line / 23.98 Hz frame frequency progressive system (1080/23.98p) In the case of a 1080/23.98p, 24p, and 25p syst
17、em, a single progressive frame is separated into two signals (separated fields) that are mapped into a space corresponding to fields in similar way as an interlace system (see annex B). The two separated fields of the 1080/23.98p, 24p and 25p are then processed as two separate fields at field freque
18、ncies of 47.96Hz, 48Hz and 50Hz. NOTE Expression field in this standard is used interchangeably for fields from an interlaced signal format or for fields that that were created by splitting the progressive frame of a 1080 system into two separated fields. The time delay of the encoding system is equ
19、al to a single frame time for all frame frequencies except 720 system, where it is equal two progressive frame time. (24p 41.67msec; 23.98p 41.71msec; 25p / 50i 40msec; 59.94i / p 33.37msec). Indicated delay excludes minor processing delays of the actual signal encoder (compressor) circuitry. After
20、discarding samples in vertical and horizontal blanking periods, active video samples are divided into four super macro block groups (SMBG) per each field in interlaced system or per each separated field in progressive system. Each SMBG consists of 1080 super macro blocks (SMB). Each SMB consists of
21、two MBs. Each MB consists of four luminance DCT blocks (8 x 4 pixel matrix) and one each of CBDCT block (8 x 8 pixel matrix) and CRDCT block (8 x 8 pixel matrix). As described later, two horizontally adjacent luminance DCT blocks are overlapped by one pixel column at their junction. Two horizontally
22、 adjacent chrominance DCT blocks are overlapped by one pixel column at their junction when they are formed into an SMB. Each DCT block is transformed to represent DC and AC coefficients. Coefficients are weighted through the prearranged categories prior to shuffling, then formed into rearranged MBs
23、(RMB). DCT coefficients within one rearranged MB group (RMBG) are quantized, and made into a fixed length data set through VLC. The VLC output code words from one RMBG are formed into 360 DIF blocks. The compressed video data for one 1080 field or one 720 frame consist of 5760 DIF blocks. The block
24、diagram of the outline about compression processing is shown in figure 1. SMPTE 342M-2004 Page 4 of 41 pages 1080i720pBlock formationSMBGDistributionDCTCategorizationWeightingCGShufflingQuantizationRateControlVLC PackingDIF blocksRMBShufflingBase bandVideo SignalFigure 1 Block diagram of outline abo
25、ut compression processing 4.2 Video signal 4.2.1 Sampling process The sampling structure is defined in SMPTE 274M and SMPTE 296M. Sampling structures of the luminance (Y) and the two color-difference signals (CB/CR) are described in table 1. 4.2.1.1 Line structure in one field (1080 system) or frame
26、 (720 system) For the 1080 system, 540 lines for Y, CB, and CRsignals from each field (interlaced or separated) shall be transmitted. In the case of the separated field, the line number is counted as shown in figure 2. For the 720 system, 720 lines for Y, CR, and CBsignals from each frame shall be t
27、ransmitted. The transmitting lines on a television frame are defined in table 1. Table 1 Construction of video signal sampling 1080 system 720 system Y 1920 1280 The number of active pixels per line CB/CR960 640 Total number of lines per frame 1125 750 The number of active lines per frame 1080 720 F
28、ield 1 21 to 560 The active line numbers Field 2 584 to 1123 Frame 26 to 745 Quantization Each sample is linearly quantized to 10 bits for Y, CBand CRScale 4 to 1019 Y Quantized level : Video signal level of white : Video signal level of black : 877 940 64 The relation between video signal level and
29、 quantized level CB/CRQuantized level : Video signal level of gray : 897 512 4.2.1.2 Pixel structure in one field (1080) / in one frame (720p) 1080 system: All sampled pixels, 1920 luminance pixels per line and 960 color-difference pixels, are retained for processing as shown in figure 2. The sampli
30、ng process starts simultaneously for both luminance and color-difference signals. SMPTE 342M-2004 Page 5 of 41 pages 720 system: All sampled pixels, 1280 luminance pixels per line and 640 color-difference pixels, are retained for processing as shown in figure 3. Sampling processes start simultaneous
31、ly for both luminance and color-difference signals. 1.001 / 74.25MHzFirst active line in field 1 line 21line 584line 22line 585line 23line 586First pixel in active periodFirst active line in field 2:0 1 2 3 4 5 6 7 8 - - - - - Y pixel numbers in active area0 1 2 3 4 - - - - - CB/CRpixel numbers in a
32、ctive areathe active line numbers: Transmitting luminance (Y) pixels: Transmitting color difference (CB/CR) pixelswhereFigure 2 Transmitting samples of 1080 system First active line in a frame line 26line 27line 28line 29line 30First pixel in active period:1.001 / 74.25MHz0 1 2 3 4 5 6 7 8 - - - - -
33、 Y pixel numbers in active area0 1 2 3 4 - - - - - CB/CRpixel numbers in active areathe active line numbers: Transmitting luminance (Y) pixels: Transmitting color difference (CB/CR) pixelswhereFigure 3 Transmitting samples of 720 system SMPTE 342M-2004 Page 6 of 41 pages 4.3 Block formation 4.3.1 DC
34、T block, macro block (MB), and super macro block (SMB) 4.3.1.1 DCT block The Y pixels in a field (1080 system) and in a frame (720 system) shall be divided into rectangular areas of 15 horizontal pixels and 4 lines. Two Y DCT blocks (one Y DCT block pair) are made from each one of the rectangular ar
35、eas as shown in figure 4. In each Y DCT block pair, the rightmost pixel in the left DCT block is overlapped with the leftmost pixel in the right DCT block (overlapped blocking). The CB/CRpixels in a field (1080) and in a frame (720) shall be divided into rectangular areas of 15 horizontal pixels and
36、 8 lines. Two C DCT blocks (one C DCT block pair) are made from each one of the rectangular areas as shown in figure 5. In each C DCT block pair, the rightmost pixel in the left block is overlapped with the leftmost pixel in the right block (overlapped blocking). Overlapped blocking is used for the
37、robustness of error (see annex A). Let r be the horizontal pixel position number in Y/C DCT block: r = 0, 1, 2,., 7. Let s be the vertical pixel position number in Y/C DCT block: For Y block, s = 0, 1, 2, 3 For C block, s = 0, 1, 2, ., 7. Let P(r,s) be the value of the pixel at the position (r, s).
38、4.3.1.2 Macro block (MB) Each macro block (MB) in the 1080 system and the 720 system consists of two Y DCT block pairs, one CBDCT block and one CRDCT block. Two Y DCT block pairs are vertically adjacent. The CBDCT block and CRDCT block spatially correspond to the two Y DCT block pairs. Four Y DCT bl
39、ocks (Ya, Yb, Yc, Yd), one CBDCT block, and one CRDCT block are shown in figure 6. 4.3.1.3 Super macro block (SMB) As shown in figure 7, each super macro block (SMB) in the 1080 system and the 720 system consists of two macro blocks which are horizontally adjacent. Two C DCT blocks of CB/CRin one su
40、per macro block are one C DCT block pair of CB/CR. Let YS be the Y DCT block number in each SMB as shown in figure 7: YS = 0, 1, 2,., 7. Let CS be the C DCT block number in each SMB as shown in figure 7: CS = 0, 1. SMPTE 342M-2004 Page 7 of 41 pages TopBottomLeft RightrsLeft DCT Block Right DCT Bloc
41、kY DCT Block Pairoverlaprs0 1 2 3 4 5 6 7012301230 1 2 3 4 5 6 7where represents luminance (Y) pixelsFigure 4 Overlapped blocking of luminance (Y) pixels Left DCT Block Right DCT BlockC DCT Block PairTopBottomLeft Rightrsoverlaprs0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 70123456701234567where represents color
42、difference (CB/CR) pixelsFigure 5 Overlapped blocking of color-difference CB/CRpixels SMPTE 342M-2004 Page 8 of 41 pages Ya YcYb Yd4pixels8pixels8 pixels (CB/CR)CBCR8pixels(CB/CR)8 pixels (Y)15 pixels (Y)8 pixels (Y)Figure 6 Macro block structure in 1080 system and in 720 system 8pixels8 pixels15 pi
43、xelsCS=0 CS=1CS=0 CS=14pixels8pixels8 pixels (Y)15 pixels (Y)30 pixels (Y)YS=0YS=1YS=4YS=5YS=6YS=7YS=2YS=38 pixels8 pixels (Y)CBCRYFigure 7 Super macro block structure in 1080 system and in 720 system SMPTE 342M-2004 Page 9 of 41 pages 4.3.2 Super macro block arrangement 4.3.2.1 1080 system The vert
44、ical field dimension, 540 pixels long, is not divisible into an integer by the vertical dimension of the SMB, 8 pixels long. In order to place all SMBs within the 1920 x 540 pixel matrix of the 1080 field, removal and attachment of half-height SMBs are required as shown in figure 8. 1) Y pixels Pixe
45、ls in four rectangular areas of the horizontal pixel position number from (480 x N) to (59 + 480 x N) and from (360 + 480 x N) to (419 + 480 x N) in the active area and line position number from 536 to 539 in the active area shall be moved horizontally 1020 pixel positions to the right, vertically 4
46、 lines to the bottom (N = 0, 1). Pixels in two rectangular areas of the horizontal pixel position number from (240 + 480 x N) to (359 + 480 x N) in the active area and line position number from 536 to 539 in the active area shall be moved horizontally 840 pixel positions to the right, vertically 4 l
47、ines to the bottom (N = 0, 1). Pixels in four rectangular areas of the horizontal pixel position number from (960 + 480 x N) to (1019 + 480 x N) and from (1320 + 480 x N) to (1379 + 480 x N) in the active area and line position number from 536 to 539 in the active area shall be moved horizontally 90
48、0 pixel positions to the left, vertically 4 lines to the bottom (N = 0, 1). Pixels in two rectangular areas of the horizontal pixel position number from (1 200 + 480 x N) to (1 319 + 480 x N) in the active area and line position number from 536 to 539 in the active area shall be moved horizontally 1
49、080 pixel positions to the left, vertically 4 lines to the bottom (N = 0, 1). 2) CB/CRpixels CB/CRpixels occupy the positions held by the even numbered Y horizontal pixel numbers. The half height SMB replacement operation, identical to the Y pixels as described above, is performed for CB/CRpixels. The arrangement of the SMBs in o