1、 Copyright 2012 by THE SOCIETY OF MOTION PICTURE AND TELEVISION ENGINEERS 3 Barker Avenue, White Plains, NY 10601 (914) 761-1100 Approved January 31, 2012 Table of Contents Page Foreword . 2 Intellectual Property 2 1 Scope . 32 Guideline of the implementation 32.1 General . 32.2 Filter Implementatio
2、n for 4:2:2 and 4:2:0 Conversion 4Annex A Bibliography (Informative) . 10Page 1 of 10 pages SMPTE Engineering Guideline 4:2:2 / 4:2:0 Format Conversion Minimizing Color Difference Signal Degradation in Concatenated Operations Application SMPTE EG 2050-2:2012 SMPTE EG 2050-2:2012 Page 2 of 10 pages F
3、oreword SMPTE (the Society of Motion Picture and Television Engineers) is an internationally-recognized standards developing organization. Headquartered and incorporated in the United States of America, SMPTE has members in over 80 countries on six continents. SMPTEs Engineering Documents, including
4、 Standards, Recommended Practices, and Engineering Guidelines, are prepared by SMPTEs Technology Committees. Participation in these Committees is open to all with a bona fide interest in their work. SMPTE cooperates closely with other standards-developing organizations, including ISO, IEC and ITU. S
5、MPTE Engineering Documents are drafted in accordance with the rules given in Part XIII of its Administrative Practices. SMPTE EG 2050-2 was prepared by Technology Committee 32NF. Intellectual Property At the time of publication no notice had been received by SMPTE claiming patent rights essential to
6、 the implementation of this Standard. However, attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. SMPTE shall not be held responsible for identifying any or all such patent rights. SMPTE EG 2050-2:2012 Page 3 of 10 pages 1 Scope This
7、 engineering guideline provides details on a possible implementation of the filter defined in SMPTE RP 2050-1. See the introduction of SMPTE RP 2050-1 for information on how the filter is used. 2 Guideline of the Implementation 2.1 General 2.1.1 Definitions The following nomenclature is used in this
8、 guideline. F0-3F4: Filter coefficients for conversion from 4:2:2 to 4:2:0. The value of each coefficient is defined in SMPTE RP 2050-1. The filter normalizing divisor is 1024. F1e-1F1e2, F1o-1F1o2: Filter coefficients from 4:2:0 to 4:2:2. The value of each coefficient is defined in SMPTE RP 2050-1.
9、 The filter normalizing divisor is 1024. NumLS: Number of luminance samples per active line in a 4:2:2 image sampled system. NumAL: Number of active lines per frame for progressive systems, or per field for interlaced systems using 4:2:2 image sampling. Yx,y / CBx,y / CRYx,y / Cx,y: Luminance and co
10、lor-difference samples of color encoding and digital representation in a 4:2:2 image sampled system. Bx,y / CRLimit(y, V): Mathematical notation for limiting of position. This process is defined in the following pseudo C-code function: x,y: Luminance and color-difference samples of color encoding an
11、d digital representation in a 4:2:0 image sampled system. int Limit(y, V) if(y V) return (V); else return y; Clip(v, Min, Max): Mathematical notation for clipping of value. This process is defined in the following pseudo C-code function: int Clip(v, Min, Max) if(v Max) return (Max); else return(v);
12、2.1.2 4:2:2 image format Table 1 indicates the applicable 4:2:2 image formats for this engineering guideline. For each system nomenclature, the constant NumLS and NumAL are used for the 4:2:2/4:2:0 and 4:2:0/4:2:2 conversion processes defined in the Section 2.2. SMPTE EG 2050-2:2012 Page 4 of 10 pag
13、es Table 1 4:2:2 Image format No. System Nomenclature (for all frame rates defined in ST 274M and ST 296M) Luminance samples per active line (NumLS) Active lines per frame Scanning format Active lines per frame for progressive, or per field for Interlace (NumAL) Reference standards 1 1920 1080/P 192
14、0 1080 Progressive 1080 SMPTE ST 274 2 1920 1080/I 1920 1080 Interlace 540 SMPTE ST 274 3 1280 720/P 1280 720 Progressive 720 SMPTE ST 296 2.2 Filter Implementation for 4:2:2 and 4:2:0 Conversion 2.2.1 Mapping of samples 2.2.1.1 Mapping of samples in progressive image formats Figure 1 illustrates th
15、e mapping of Yx,y / CBx,y / CRx,y and Yx,y / CBx,y / CRYx,y / Cx,y in a progressive image. This figure also illustrates the relative position of color difference samples between 4:2:2 and 4:2:0. Bx,y / CRFor Yx,y, the range of x is from 0 to (NumLS - 1), and the range of y is from 0 to (NumAL -1). x
16、,y are the x-th sample position in the y-th active line of a frame with 4:2:2 sampling. For CBx,y and CRYx,y / Cx,y, the range of x is from 0 to (NumLS / 2 - 1), and the range of y is from 0 to (NumAL -1). Bx,y / CRFor Yx,y, the range of x is from 0 to (NumLS - 1), and the range of y is from 0 to (N
17、umAL -1). x,y are the x-th sample position in the y-th active line of a frame with 4:2:0 sampling. For CBx,y and CRx,y, the range of x is from 0 to (NumLS/2 - 1), and the range of y is from 0 to (NumAL/2 -1). SMPTE EG 2050-2:2012 Page 5 of 10 pages Y0,0, Y0,0, CB0,0, CR0,0CB0,0, CR0,0YNumLS -1, 0, Y
18、NumLS -1,0/CBNumLS/2 -1, 0, CRNumLS/2- 1, 0NumLSNumALCBNumLS/2 -1, 0, CRNumLS/2- 1, 0Y0,NumAL- 1, Y0,NumAL-1,CB0,NumAL- 1, CR0,NumAL-1 CB0,NumAL- 1, CR0,NumAL-1 YNumLS -1,NumAL-1, YNumLS-1,NumAL-1,CBNumLS/2 -1,NumAL-1, CRNumLS/2-1,NumAL-1 CBNumLS/2 -1,NumAL/2-1,CRNumLS/2- 1,NumAL/2-1Location of Yx,y
19、, Yx,yLocation of CBx,y, CRx,yLocation of CBx,y, CRx,yFigure 1 Mapping of 4:2:2 and 4:2:0 samples to Yx,y / CBx,y / CRx,y and Yx,y / CBx,y / CRx,y for the progressive image formats 2.2.1.2 Mapping of samples in interlaced image formats Figure 2 llustrates the mapping of Yx,y / CBx,y / CRx,y and Yx,y
20、 / CBx,y / CRYx,y / Cx,y in the first field of an interlaced image. This figure also illustrates the relative position of color difference samples between 4:2:2 and 4:2:0. Bx,y / CRFor Yx,y, the range of x is from 0 to (NumLS - 1), and the range of y is from 0 to (NumAL -1). x,y are the x-th sample
21、position in the y-th active line of the first field of an interlaced image with 4:2:2 sampling. For CBx,y and CRYx,y / Cx,y, the range of x is from 0 to (NumLS / 2 - 1), and the range of y is from 0 to (NumAL -1). Bx,y / CRFor Yx,y, the range of x is from 0 to (NumLS - 1), and the range of y is from
22、 0 to (NumAL -1). x,y are the x-th sample position in the y-th active line of the first field of an interlaced image with 4:2:0 sampling. SMPTE EG 2050-2:2012 Page 6 of 10 pages For CBx,y and CRNumLSNumALY0,0, Y0,0, CB0,0, CR0,0CB0,0, CR0,0YNumLS -1, 0, YNumLS -1,0/CBNumLS/2 -1, 0, CRNumLS/2- 1, 0CB
23、NumLS/2 -1, 0, CRNumLS/2- 1, 0Y0,NumAL- 1, Y0,NumAL-1,CB0,NumAL- 1, CR0,NumAL-1 CB0,NumAL- 1, CR0,NumAL-1 YNumLS -1,NumAL-1, YNumLS-1,NumAL-1,CBNumLS/2 -1,NumAL-1, CRNumLS/2-1,NumAL-1 CBNumLS/2 -1,NumAL/2-1,CRNumLS/2- 1,NumAL/2-1Location of Yx,y, Yx,yLocation of CBx,y, CRx,yLocation of CBx,y, CRx,yx
24、,y, the range of x is from 0 to (NumLS/2 - 1), and the range of y is from 0 to (NumAL/2 -1). Figure 2 Mapping of 4:2:2 and 4:2:0 samples to Yx,y / CBx,y / CRx,y and Yx,y / CBx,y / CRx,y for the first field of interlaced image formats Figure 3 illustrates the mapping of Yx,y / CBx,y / CRx,y and Yx,y
25、/ CBx,y / CRYx,y / Cx,y in the second field of an interlaced image. This figure also illustrates the relative position of color difference samples between 4:2:2 and 4:2:0. Bx,y / CRFor Yx,y, the range of x is from 0 to (NumLS - 1), and the range of y is from 0 to (NumAL -1). x,y are the x-th sample
26、position in the y-th active line of the second field of an interlaced image with 4:2:2 sampling. For CBx,y and CRYx,y / Cx,y, the range of x is from 0 to (NumLS / 2 - 1), and the range of y is from 0 to (NumAL -1). Bx,y / CRFor Yx,y, the range of x is from 0 to (NumLS - 1), and the range of y is fro
27、m 0 to (NumAL -1). x,y are the x-th sample position in the y-th active line of the second field of an interlaced image with 4:2:0 sampling. SMPTE EG 2050-2:2012 Page 7 of 10 pages For CBx,y and CRNumLSNumALY0,0, Y0,0, CB0,0, CR0,0CB0,0, CR0,0YNumLS -1, 0, YNumLS -1,0/CBNumLS/2 -1, 0, CRNumLS/2- 1, 0
28、CBNumLS/2 -1, 0, CRNumLS/2- 1, 0Y0,NumAL- 1, Y0,NumAL-1,CB0,NumAL- 1, CR0,NumAL-1 CB0,NumAL- 1, CR0,NumAL-1 YNumLS -1,NumAL-1, YNumLS-1,NumAL-1,CBNumLS/2 -1,NumAL-1, CRNumLS/2-1,NumAL-1 CBNumLS/2 -1,NumAL/2-1,CRNumLS/2- 1,NumAL/2-1Location of Yx,y, Yx,yLocation of CBx,y, CRx,yLocation of CBx,y, CRx,
29、yx,y, the range of x is from 0 to (NumLS/2 - 1), and the range of y is from 0 to (NumAL/2 -1). Figure 3 Mapping of 4:2:2 and 4:2:0 samples to Yx,y / CBx,y / CRx,y and Yx,y / CBx,y / CRx,y for the second field of interlaced image formats 2.2.2 Conversion Process This section describes the conversion
30、process for 4:2:2 to 4:2:0 and 4:2:0 to 4:2:2. 2.2.2.1 4:2:2 / 4:2:0 conversion process This sub-section describes the conversion process from 4:2:2 sampling to 4:2:0 sampling. In the process of 4:2:2 / 4:2:0 conversion, coefficients defined in SMPTE RP 2050-1 and constants defined in Table 2 are to
31、 be used according to the bit-depth of 4:2:2 sampling and 4:2:0 sampling. SMPTE EG 2050-2:2012 Page 8 of 10 pages Table 2 Constant Values for 4:2:2/4:2:0 conversion process No. Bit Depth of 4:2:2 Sampling Bit Depth of 4:2:0 Sampling C CaCbCcCdCeCfg 1 8 8 1 0 1 512 1024 0 255 2 8 10 4 0 1 128 256 0 1
32、023 3 10 8 1 2 4 2048 4096 0 255 4 10 10 1 0 1 512 1024 0 1023 For Luminance samples, the process defined in Eq. 1 is applied wherein x is from 0 to (NumLS 1) and y is from 0 to (NumAL 1). ( )( )cbaCCyxYCflooryxY += , Eq. 1 For color difference samples, the processes defined in Eq.2 and Eq.3 are app
33、lied wherein x is from 0 to (NumLS/2 1) and y is from 0 to (NumAL/2 1). ( ) +=gfedkBBCCCCNumALkyLimitxCkF0floorclipyxC ,1,2,43Eq. 2 ( ) +=gfedkRRCCCCNumALkyLimitxCkF0floorclipyxC ,1,2,43Eq. 3 2.2.2.2 4:2:0 / 4:2:2 conversion process This sub-section describes the conversion process from 4:2:0 sampli
34、ng to 4:2:2 sampling. In the process of 4:2:0 / 4:2:2 conversion, coefficients defined in SMPTE RP 2050-1 and constants defined in Table 3 are to be used according to the bit-depth of 4:2:0 sampling and 4:2:2 sampling. Table 3 Constant Values for 4:2:0/4:2:2 conversion process No. Bit Depth of 4:2:0
35、 Sampling Bit Depth of 4:2:2 Sampling C ChCiCjCkClCm1 n8 8 1 0 1 512 1024 1 254 2 8 10 4 0 1 128 256 4 1019 3 10 8 1 2 4 2048 4096 1 254 4 10 10 1 0 1 512 1024 4 1019 SMPTE EG 2050-2:2012 Page 9 of 10 pages For Luminance samples, the process defined in Eq.4 is applied wherein x is from 0 to (NumLS 1
36、) and y is from 0 to (NumAL 1). ( )( )jihCCyxYCflooryxY += , Eq. 4 For color difference samples, the process defined in Eq.5, Eq.6, Eq.7, and Eq.8 are applied wherein x is from 0 to (NumLS/2 1) and y is from 0 to (NumAL/2 1). ( ) +=nmlkkBBCCCCNumALkyLimitxCkF1efloorClipyxC ,12/,2,12Eq. 5 ( ) +=+=nml
37、kkBBCCCCNumALkyLimitxCkF1ofloorClipyxC ,12/,12,21Eq. 6 ( ) +=nmlkkRRCCCCNumALkyLimitxCkF1efloorClipyxC ,12/,2,12Eq. 7 ( ) +=+=nmlkkRRCCCCNumALkyLimitxCkF1ofloorClipyxC ,12/,12,21Eq. 8 Clipping can be applied to Yx,y/CBx,y/CRx,y before mapping to interface signal to avoid prohibited values. . SMPTE E
38、G 2050-2:2012 Page 10 of 10 pages Annex A Bibliography (Informative) Note: All references in this document to other SMPTE documents use the current numbering style (e.g. SMPTE ST 274:2008) although, during a transitional phase, the document as published (printed or PDF) may bear an older designation
39、 (such as SMPTE 274M-2008). Documents with the same root number (e.g. 274) and publication year (e.g. 2008) are functionally identical. SMPTE ST 274:2008, Television 1920 1080 Image Sample Structure, Digital Representation and Digital Timing Reference Sequences for Multiple Picture Rates SMPTE ST 29
40、2-1:2012, 1.5 Gb/s Signal/Data Serial Interface SMPTE ST 296:2011, 1280 720 Progressive Image Sample Structure Analog and Digital Representation and Analog Interface SMPTE ST 372:2011, Dual Link 1.5 Gb/s Digital Interface for 1920 1080 and 2048 1080 Picture Formats SMPTE ST 421:2006, VC-1 Compressed
41、 Video Bitstream Format and Decoding Process Amendment 1:2007 to SMPTE ST 421:2006 Amendment 2:2011 to SMPTE ST 421:2006 SMPTE ST 424:2006, Television 3 Gb/s Signal/Data Serial Interface SMPTE RP 2050-1:2012, 4:2:2 / 4:2:0 Format Conversion Minimizing Color Difference Signal Degradation in Concatena
42、ted Operations Filtering ISO/IEC 13818-2:2000, Information Technology Generic Coding of Moving Pictures and Associated Audio Information: Video ITU-T Recommendation H.264, Advanced Video Coding for Generic Audiovisual Services “The 4:2:2/4:2:0 perfect reconstruction filter set and its application in HD-SNG”, SMPTE Motion Imaging Journal, pp29-39, July/August 2009