A kind of processing method of digital high-definition video signal
Technical field
The present invention relates to a kind of digital signal processing method, especially relate to a kind of processing method of digital high-definition video signal.
Background technology
Problems such as narrow bandwidth, the image definition of the analog video broadcasts ubiquity picture signal of SD form is low.Along with the development of digital multimedia, digital television techniques, the digital video broadcasting of high-definition format will progressively replace the analog video broadcasts of present SD form, become the main source of TV programme in the future.According to the high definition reference format that American film Television Engineer association announces, the scan format of HDTV has 3 kinds, i.e. 1280 * 720p, 1920 * 1080i and 1920 * 1080p, and that China adopts is 1920 * 1080i/50Hz.Yet because digital TV in high resolution costs an arm and a leg, China especially common family of salary class of user has greatly proposed requirement, wishes still to use present Standard Definition Television machine just can watch high-quality HDTV (High-Definition Television) program.In order to satisfy this demand, to the decoding video signal of digital high-definition format, again digital high-definition video signal is converted to the SD vision signal usually, show on Standard Definition Television by digital-to-analogue conversion then, as shown in Figure 1.The existing method that digital high-definition video signal is converted to the SD vision signal mainly contains two kinds: a kind of is the simple extraction method of sampling, from digital high-definition video signal, directly extract pixel and form the SD vision signal, implementation procedure is simple, but the video visual effect that produces by this method is poor; Another kind is the both full-pixel filter method, it mainly forms the SD vision signal by pixels all in the high-definition video signal being carried out filtering, better by the video visual effect that the method produces, but computing complexity, and if realize then the central processing unit of computer being had relatively high expectations with software, if realized then increasing the complexity and the process chip area of design with hardware, thereby increased cost.
Summary of the invention
Technical problem to be solved by this invention provides a kind of can effectively the assurance digital high-definition video signal is converted to the SD vision signal, and the video visual effect is good, the processing method of computing simple numerical high-definition video signal.
The present invention solves the problems of the technologies described above the technical scheme that is adopted: a kind of processing method of digital high-definition video signal, the resolution of digital high-definition video signal is 1920 * 1080, obtain the frame per second through decoded digital high-definition video signal, be designated as R, it may further comprise the steps:
(1) extraction represents that with luminance matrix A and chrominance matrix B luminance elements is designated as A (i respectively through the brightness value and the chromatic value of any field data of decoded digital high-definition video signal
1, j
1), the colourity element is designated as B (m
1, n
1), to luminance elements A (i
1, j
1) and colourity element B (m
1, n
1) carry out the luminance elements C (i after vertical down-sampling obtains vertical down-sampling
2, j
1) and colourity element D (m
2, n
1), detailed process is as follows:
Defined variable p is luminance elements C (i
2, j
1) capable subscript i
2Remainder divided by 3, i.e. p=i
2Mod 3, and defined variable q is luminance elements C (i
2, j
1) capable subscript i
2Merchant divided by 3, i.e. q=int (i
2/ 3), when p=0, C (i
2, j
1)=A (8q, j
1The 2+A of)>>(8q+1, j
1The 1+A of)>>(8q+2, j
1)>>2; When p=1, C (i
2, j
1)=A (8q+3, j
1The 1+A of)>>(8q+4, j
1)>>1; When p=2, C (i
2, j
1)=A (8q+5, j
1The 2+A of)>>(8q+6, j
1The 1+A of)>>(8q+7, j
1)>>2, in the formula, i
2Be the integer between 0~203, j
1Be the integer between 0~1919, symbol ">>" being the shift right operation symbol, symbol " mod " is the complementation symbol, symbol " int " is the rounding operation symbol;
Defined variable r is colourity element D (m
2, n
1) capable subscript m
2Remainder divided by 3, i.e. r=m
2Mod 3, and defined variable s is colourity element D (m
2, n
1) capable subscript m
2Merchant divided by 3, i.e. s=int (m
2/ 3), when r=0, D (m
2, n
1)=B (4s, n
1The 1+B of)>>(4s, n
1The 2+B of)>>(4s+1, n
1)>>2; When r=1, D (m
2, n
1)=B (4s+1, n
1The 1+B of)>>(4s+2, n
1)>>1; When r=2, D (m
2, n
1)=B (4s+2, n
1The 2+B of)>>(4s+3, n
1The 2+B of)>>(4s+3, n
1)>>1, in the formula, m
2Be the integer between 0~203, n
1It is the integer between 0~1919;
(2) to luminance elements C (i through obtaining behind the vertical down-sampling
2, j
1) and colourity element D (m
2, n
1) carry out horizontal down-sampling, obtain luminance elements E (i
2, j
2) and colourity element F (m
2, n
2), detailed process is as follows:
Defined variable t is luminance elements E (i
2, j
2) row subscript j
2Remainder divided by 3, i.e. t=j
2Mod 3, and defined variable u is luminance elements E (i
2, j
2) row subscript j
2Merchant divided by 3, i.e. u=int (j
2/ 3), when t=0, E (i
2, j
2)=C (i
2, 8u)>>2+C (i
2, 8u+1)>>1+C (i
2, 8u+2)>>2; When t=1, E (i
2, j
2)=C (i
2, 8u+3)>>1+C (i
2, 8u+4)>>1; When t=2, E (i
2, j
2)=C (i
2, 8u+5)>>2+C (i
2, 8u+6)>>1+C (i
2, 8u+7)>>2, in the formula, j
2It is the integer between 0~719;
Defined variable v is colourity element F (m
2, n
2) the row subscript n
2Remainder divided by 3, i.e. v=n
2Mod 3, and defined variable w is colourity element F (m
2, n
2) the row subscript n
2Merchant divided by 3, i.e. w=int (n
2/ 3), when v=0, F (m
2, n
2)=D (m
2, 4w)>>1+D (m
2, 4w)>>2+D (m
2, 4w+1)>>2; When v=1, F (m
2, n
2)=D (m
2, 4w+1)>>1+D (m
2, 4w+2)>>1; When v=2, F (m
2, n
2)=D (m
2, 4w+2)>>2+D (m
2, 4w+3)>>2+D (m
2, 4w+3)>>1, in the formula, n
2It is the integer between 0~719;
(3) to luminance elements E (i through obtaining behind the horizontal down-sampling
2, j
2) and colourity element F (m
2, n
2) add black surround up and down, generate the luminance elements G (i of SD vision signal
3, j
2) and colourity element H (m
3, n
2), obtain the brightness value and the chromatic value of any field data of SD vision signal, represent with luminance matrix G and chrominance matrix H respectively, and the resolution of definite SD vision signal.
When R=50 field/second, the detailed process of described step (3) is:
As 0<=i
3<=41 o'clock, G (i
3, j
2)=0; As 42<=i
3<=245 o'clock, G (i
3, j
2)=E (i
3-42, j
2); As 246<=i
3<=287 o'clock, G (i
3, j
2)=0, in the formula, i
3It is the integer between 0~287; As 0<=m
3<=41 o'clock, H (m
3, n
2)=128; As 42<=m
3<=245 o'clock, H (m
3, n
2)=F (m
3-42, n
2); As 246<=m
3<=287 o'clock, H (m
3, n
2)=128, in the formula, m
3It is the integer between 0~287; And the resolution of definite SD vision signal is 720 * 576.
When R=60 field/second, the detailed process of described step (3) is:
As 0<=i
3<=17 o'clock, G (i
3, j
2)=0; As 18<=i
3<=221 o'clock, G (i
3, j
2)=E (i
3-18, j
2); As 222<=i
3<=239 o'clock, G (i
3, j
2)=0, in the formula, i
3It is the integer between 0~239; As 0<=m
3<=17 o'clock, H (m
3, n
2)=128; As 18<=m
3<=221 o'clock, H (m
3, n
2)=F (m
3-18, n
2); As 222<=m
3<=239 o'clock, H (m
3, n
2)=128, in the formula, m
3It is the integer between 0~239; And the resolution of definite SD vision signal is 720 * 480.
Compared with prior art, the invention has the advantages that because the present invention carries out vertical down-sampling earlier to digital high-definition video signal, carry out horizontal down-sampling again, add black surround at last up and down, guaranteed that not only Standard Definition Television can receive high-definition video signal, and kept 100% input digit high-definition video signal, and compare the extraction sampling method that only keeps 37.5% input signal information, the video visual effect of the SD vision signal of the inventive method output has had tangible lifting.Simultaneously, this method is compared with adopting the both full-pixel filter method, greatly reduces operand, thereby has also reduced the requirement to central processing unit, has reduced the area of process chip.The inventive method is applicable to the realization of various software and hardwares, especially can be applied in the design of video frequency processing chip.
Description of drawings
The processing block diagram that Fig. 1 shows on Standard Definition Television for digital high-definition video signal;
Fig. 2 is the flow chart of the inventive method.
Embodiment
Embodiment describes in further detail the present invention below in conjunction with accompanying drawing.
As shown in Figure 2, a kind of processing method of digital high-definition video signal, the resolution of digital high-definition video signal is 1920 * 1080, obtains the frame per second through decoded digital high-definition video signal, is designated as R, it is characterized in that it may further comprise the steps:
(1) extraction represents that with luminance matrix A and chrominance matrix B luminance elements is designated as A (i respectively through the brightness value and the chromatic value of any field data of decoded digital high-definition video signal
1, j
1), the colourity element is designated as B (m
1, n
1), to luminance elements A (i
1, j
1) and colourity element B (m
1, n
1) carry out the luminance elements C (i after vertical down-sampling obtains vertical down-sampling
2, j
1) and colourity element D (m
2, n
1), detailed process is as follows:
Defined variable p is luminance elements C (i
2, j
1) capable subscript i
2Remainder divided by 3, i.e. p=i
2Mod 3, and defined variable q is luminance elements C (i
2, j
1) capable subscript i
2Merchant divided by 3, i.e. q=int (i
2/ 3), when p=0, C (i
2, j
1)=A (8q, j
1The 2+A of)>>(8q+1, j
1The 1+A of)>>(8q+2, j
1)>>2; When p=1, C (i
2, j
1)=A (8q+3, j
1The 1+A of)>>(8q+4, j
1)>>1; When p=2, C (i
2, j
1)=A (8q+5, j
1The 2+A of)>>(8q+6, j
1The 1+A of)>>(8q+7, j
1)>>2, in the formula, i
2Be the integer between 0~203, j
1Be the integer between 0~1919, symbol ">>" being the shift right operation symbol, symbol " mod " is the complementation symbol, symbol " int " is the rounding operation symbol;
Defined variable r is colourity element D (m
2, n
1) capable subscript m
2Remainder divided by 3, i.e. r=m
2Mod 3, and defined variable s is colourity element D (m
2, n
1) capable subscript m
2Merchant divided by 3, i.e. s=int (m
2/ 3), when r=0, D (m
2, n
1)=B (4s, n
1The 1+B of)>>(4s, n
1The 2+B of)>>(4s+1, n
1)>>2; When r=1, D (m
2, n
1)=B (4s+1, n
1The 1+B of)>>(4s+2, n
1)>>1; When r=2, D (m
2, n
1)=B (4s+2, n
1The 2+B of)>>(4s+3, n
1The 2+B of)>>(4s+3, n
1)>>1, in the formula, m
2Be the integer between 0~203, n
1It is the integer between 0~1919;
(2) to luminance elements C (i through obtaining behind the vertical down-sampling
2, j
1) and colourity element D (m
2, n
1) carry out horizontal down-sampling, obtain luminance elements E (i
2, j
2) and colourity element F (m
2, n
2), detailed process is as follows:
Defined variable t is luminance elements E (i
2, j
2) row subscript j
2Remainder divided by 3, i.e. t=j
2Mod 3, and defined variable u is luminance elements E (i
2, j
2) row subscript j
2Merchant divided by 3, i.e. u=int (j
2/ 3), when t=0, E (i
2, j
2)=C (i
2, 8u)>>2+C (i
2, 8u+1)>>1+C (i
2, 8u+2)>>2; When t=1, E (i
2, j
2)=C (i
2, 8u+3)>>1+C (i
2, 8u+4)>>1; When t=2, E (i
2, j
2)=C (i
2, 8u+5)>>2+C (i
2, 8u+6)>>1+C (i
2, 8u+7)>>2, in the formula, j
2It is the integer between 0~719;
Defined variable v is colourity element F (m
2, n
2) the row subscript n
2Remainder divided by 3, i.e. v=n
2Mod 3, and defined variable w is colourity element F (m
2, n
2) the row subscript n
2Merchant divided by 3, i.e. w=int (n
2/ 3), when v=0, F (m
2, n
2)=D (m
2, 4w)>>1+D (m
2, 4w)>>2+D (m
2, 4w+1)>>2; When v=1, F (m
2, n
2)=D (m
2, 4w+1)>>1+D (m
2, 4w+2)>>1; When v=2, F (m
2, n
2)=D (m
2, 4w+2)>>2+D (m
2, 4w+3)>>2+D (m
2, 4w+3)>>1, in the formula, n
2It is the integer between 0~719;
(3) to luminance elements E (i through obtaining behind the horizontal down-sampling
2, j
2) and colourity element F (m
2, n
2) add black surround up and down, generate the luminance elements G (i of SD vision signal
3, j
2) and colourity element H (m
3, n
2), obtain the brightness value and the chromatic value of any field data of SD vision signal, represent with luminance matrix G and chrominance matrix H respectively, and the resolution of definite SD vision signal.
When R=50 field/second, the detailed process of step (3) is:
As 0<=i
3<=41 o'clock, G (i
3, j
2)=0; As 42<=i
3<=245 o'clock, G (i
3, j
2)=E (i
3-42, j
2); As 246<=i
3<=287 o'clock, G (i
3, j
2)=0, in the formula, i
3It is the integer between 0~287; As 0<=m
3<=41 o'clock, H (m
3, n
2)=128; As 42<=m
3<=245 o'clock, H (m
3, n
2)=F (m
3-42, n
2); As 246<=m
3<=287 o'clock, H (m
3, n
2)=128, in the formula, m
3It is the integer between 0~287; Luminance elements G (i according to the SD vision signal that generates
3, j
2) and colourity element H (m
3, n
2), obtain the brightness value and the chromatic value of any field data of SD vision signal, represent with luminance matrix G and chrominance matrix H respectively; And definite SD vision signal employing PAL standard, its resolution is 720 * 576.
When R=60 field/second, the detailed process of step (3) is:
As 0<=i
3<=17 o'clock, G (i
3, j
2)=0; As 18<=i
3<=221 o'clock, G (i
3, j
2)=E (i
3-18, j
2); As 222<=i
3<=239 o'clock, G (i
3, j
2)=0, in the formula, i
3It is the integer between 0~239; As 0<=m
3<=17 o'clock, H (m
3, n
2)=128; As 18<=m
3<=221 o'clock, H (m
3, n
2)=F (m
3-18, n
2); As 222<=m
3<=239 o'clock, H (m
3, n
2)=128, in the formula, m
3It is the integer between 0~239; Luminance elements G (i according to the SD vision signal that generates
3, j
2) and colourity element H (m
3, n
2), obtain the brightness value and the chromatic value of any field data of SD vision signal, represent with luminance matrix G and chrominance matrix H respectively; And definite SD vision signal employing NTSC standard, its resolution is 720 * 480.
The operand that adopts the inventive method and the filtering of employing both full-pixel is compared, as shown in table 1:
The operand comparison sheet of table 1 the inventive method and both full-pixel filtering method
Method |
Operand |
The inventive method |
176 displacements+110 additions |
The both full-pixel filter method |
352 displacements+286 additions |
The operand that adopts the inventive method as can be seen from Table 1 is 1/2nd of a both full-pixel filter method operand, greatly reduces operand, illustrates that the inventive method is feasible effective.