CN102186070B - Method for realizing rapid video coding by adopting hierarchical structure anticipation - Google Patents
Method for realizing rapid video coding by adopting hierarchical structure anticipation Download PDFInfo
- Publication number
- CN102186070B CN102186070B CN 201110098369 CN201110098369A CN102186070B CN 102186070 B CN102186070 B CN 102186070B CN 201110098369 CN201110098369 CN 201110098369 CN 201110098369 A CN201110098369 A CN 201110098369A CN 102186070 B CN102186070 B CN 102186070B
- Authority
- CN
- China
- Prior art keywords
- macro block
- current coding
- coding macro
- inter
- mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Abstract
The invention discloses a method for realizing rapid video coding by adopting hierarchical structure anticipation, which relates to the field of video compression coding. The method comprises the following steps of: extracting the brightness information of a current coded macro block from original video data; defining, calculating and comparing time/space correlation characteristics of the current coded macro block, and anticipating whether the macro block may adopt inter-frame prediction or intra-frame prediction; and if the macro block adopts the inter-frame prediction, defining and calculating the flatness characteristic of the macro block, dividing the current coded macro block into one type of a flat macro block, a texture-rich macro block and a characteristic-unremarkable macro block according to the flatness characteristic, anticipating a set of inter-frame prediction mode to be adopted in a targeted way, determining an optimal inter-frame prediction mode in advance to realize rapid inter-frame compression coding. By the method provided by the invention, the inter-frame coding complexity and coding time are greatly reduced on the premise of ensuring lossless video quality, not increasing compression code rate and keeping an output code stream structure, and the high performance of high compression ratio of a conventional standard algorithm is maintained.
Description
Technical field
The present invention relates to the video compression coding field, Design and implementation a kind of Fast video coding method of hierarchy anticipation.
Background technology
Mainly comprise three kinds of redundant informations in video sequence: spatial redundancy, time redundancy, statistical redundancy.Usually utilize video information self correlation, can remove the redundant information in video data, reach the purpose of video compression.Main I frame and P (B) the frame coding techniques of adopting in video compression; The I frame is inner frame coding method, namely a certain frame in video is encoded separately, is used for eliminating spatial redundancy; P (B) frame is the interframe encode method, utilizes the correlation of consecutive frame to eliminate time redundancy; The recycling entropy coding method is eliminated statistical redundancy.
H.264/AVC (hereinafter to be referred as H.264) is as up-to-date video encoding standard, introduced numerous advanced persons' coding techniques, as the estimation of the inter prediction encoding of multidirectional intraframe predictive coding, variable-block, 1/4 pixel accuracy, multi-reference frame coding etc., it is had than the outstanding coding efficiency of standard in the past, be subject to the people in the industry and paid attention to widely and welcome.
Yet H.264 the acquisition of higher coding efficiency is take huge encoder complexity as cost.Under identical signal to noise ratio condition, H.264 more H.263 code check saves 50% left and right; But the computation complexity of H.264 encoding is about H.263 4 ~ 5 times, is about 3 times of MPEG-4, and the coding real-time is relatively poor.Therefore, how to reduce H.264 the computation complexity of codec just become H.264 can enter as early as possible extensive actual commercial, one of key factor of achieving success.
Studies show that, the computation complexity of H.264 encoding 80% mainly from estimation and model selection.Especially inter mode decision technology travels through in the mode of full search current coding macro block and calculates all predictive modes lower in interframe and frame, calculates very complexity, as Fig. 1.
In order to obtain forced coding efficient, reduce that video encoding standard in the past adopts single macro-block partition mode and H.264 the encoding error that brings in interframe encode, adopts the coding mode of variable size block, each current coding macro block can be divided into: 16 * 16,16 * 8,8 * 16 and 8 * 8, wherein 8 * 8 are called again the sub-split pattern, can also continue to be divided into 8 * 8,8 * 4,4 * 8 and 4 * 4, as Fig. 2.Support simultaneously the Skip pattern, i.e. the coding mode of corresponding macro block in the last reference frame of direct copying.H.264 the motion search in is take sub-block as unit, so each sub-block in 16 * 16 macro blocks has an independently motion vector.Obviously, the partition in macro block must be healed carefully, and is just little to the residual values required figure place of encoding, but the problem of therefore bringing is to have more motion vector to encode, and this can cause the required bit number of whole macroblock coding to increase.Therefore, need to optimize the coding mode of selecting macro block according to the motion vector encoder cost of the size of the residual values after estimation and needs when specific coding.
In infra-frame prediction, H.264 take full advantage of the spatial coherence of neighbor, support Intra4 * 4 and Intra16 * 16 two kind of intraframe predictive coding.For the luminance component of current coding macro block, Intra4 * 4 comprise 9 kinds of prediction direction (vertical prediction, horizontal forecast, consensus forecasts, the prediction of left diagonal angle, the prediction of right diagonal angle, vertical right diagonal angle prediction, level is predicted downwards, vertical left diagonal angle prediction, level is prediction upwards); Intra16 * 16 comprise 4 kinds of prediction direction (horizontal forecast, vertical prediction, DC prediction and planar prediction).For the chromatic component of current coding macro block, infra-frame prediction is similar to the Intra16 of luminance component * 16, also comprises 4 kinds of prediction direction.Therefore, the infra-frame prediction of current coding macro block can reach [4+ (16 * 9)] * 4=592 time, and amount of calculation is considerable.
H.264 based on the rate distortion costs criterion, by Lagrangian rate-distortion optimization function (Rate-Distortion Optimization, RDO), calculate the rate distortion costs value (RD-cost) of every kind of predictive mode, the predictive mode of selecting to have minimum RD-cost is optimum inter-frame forecast mode (seeing Fig. 3).Although this method can be selected the inter-frame forecast mode with optimum rate distortion meaning, amount of calculation significantly increases, and causes H.264 coding rate to descend, and becomes to limit one of its bottleneck of using in the real-time video field.
Summary of the invention
Proposition of the present invention is mainly based on following technical thought:
Video image can be divided into background texture flat site, the careful zone of background texture and moving region three major types substantially: very large proportion is occupied in the mild zone of background texture flat site or motion in video content usually, mostly takes Skip (mode0) or macro-block level prediction (mode1 ~ 3); Only sub-split prediction (mode4 ~ 7) is used in or zone that move violent complicated at texture; Only just select infra-frame prediction (seeing Table 1) in the marginal portion of video image.
Various inter prediction encoding pattern utilance % in the dissimilar video sequence of table 1
By as seen from Table 1, various inter-frame forecast modes right and wrong in video image are equally distributed.
For Akiyo, Miss America, Mother﹠amp; Smooth or mild video sequence more employing Skip and the macro-block level prediction of moving of the textures such as Daughter; And Coastguard, Foreman, texture-rich or the more employing sub-split predictions of the violent video sequence that moves such as Mobile; The macro-block level prediction is obviously predicted more than sub-split on the whole; No matter the video sequence of which kind of type selects the probability of infra-frame prediction all very low.
If can be according to flatness characteristic or the movement degree of current coding macro block, the layering anticipation goes out the predictive mode set that may adopt, and exclude the less predictive mode set of probability of occurrence, can reduce in a large number undoubtedly by the rate distortion costs of traversal formula and calculate the encoder complexity that brings, improve simultaneously the coding real-time performance.And the prerequisite of realizing this goal is how to judge fast and accurately the macro block classification, and then selects different predictive mode set to carry out anticipation.And can guarantee not introduce additional computational overhead, and inherit the H.264 superior function of high compression ratio, become and reduce the H.264 key of encoder complexity.The present invention under this research background, has proposed the fast encoding method based on the layering anticipation of macro block time and space empty correlation and flatness feature just, is intended to the whole coding rate that improves H.264.
In the present invention: at first according to the time of current coding macro block and the magnitude relationship of spatial coherence characteristic value, carry out the ground floor prediction, inter prediction or infra-frame prediction are adopted in anticipation, if the temporal correlation of macro block greater than spatial coherence, need not carry out rate distortion costs to the numerous prediction direction in Intra16 * 16 and Intra4 * 4 and calculate; Secondly, if inter prediction has been selected in the ground floor anticipation, then carry out second layer anticipation, emphasis is considered the flatness feature of current coding macro block and the relevance between inter-frame forecast mode, realize the advance decision of optimum inter-frame forecast mode, reach the purpose that reduces computation complexity.
The inventive method specifically comprises the steps:
Step 1: the luma component values of extracting current coding macro block from frame of video;
Step 2: utilize current coding macro block time and spatial coherence to screen in advance the current coding macro block predictive mode, time and spatial coherence that the squared differences between use primary signal and reconstruction signal and SSD (s, c|QP) represent current coding macro block:
In formula, Horizontal number of pixels and the Vertical number of pixels of 16 expression current coding macro block, QP is the coded quantization step-length, and s is the original video luminance signal, and c is for adopting the reconstruction video luminance signal after predictive mode is encoded, s
Y[x, y|QP] and c
YWhen [x, y|QP] represents that respectively quantization step is QP, the value of original and reconstruction video luminance signal, x, y are the position of current macro in frame of video.
Specifically comprise the following steps:
1) SSD
IntraRepresent the current coding macro block spatial coherence, SSD
InterRepresent the current coding macro block temporal correlation;
SSD
IntraComputing formula be:
In formula, SSD
IntraAs predict pixel, through the squared differences of vertical and horizontal direction prediction and, s with neighbor around current coding macro block
Y[x+m, y+n] is the pixel brightness value of current coding macro block in frame of video, c
Y[x+m-1, y+n], c
Y[x+m, y+n-1] be with current coding macro block at the vertical and pixel brightness value horizontal direction adjacent macroblocks, x, y are the position of current coding macro block in frame of video, m, n represent the position of pixel in current coding macro block;
SSD
InterComputing formula be:
In formula, SSD
InterFor the prediction squared differences of current coding macro block and front frame macro block and, s
YThe pixel brightness value of [x+m, y+n] expression current coding macro block, c
YThe pixel brightness value of correspondence position macro block in frame before [x+m, y+n] expression, x, y represent the position of current coding macro block in frame of video, and m, n represent the position of pixel in current coding macro block;
2) compare SSD
IntraAnd SSD
InterSize, the screening current coding macro block predictive mode type that should adopt is introduced and is adjusted factor-alpha and β; Discrimination formula is:
Th
1=α·SSD
intra-SSD
inter (4)
Th
2=SSD
intra-β·SSD
inter
In following formula, α, β are the real number of value between [0,1], if Th
1Greater than zero, the squared differences of intra prediction mode is described and greater than the squared differences of inter-frame forecast mode and, the frame-to-frame correlation of proof current coding macro block is greater than in-frame correlation, directly give up intra prediction mode, macro block adopts inter-frame forecast mode, must to the current coding macro block estimation of taking exercises, enter step 3; Otherwise, judgement Th
2Whether less than zero, if Th
2Less than zero, the squared differences of inter-frame forecast mode is described and greater than the squared differences of intra prediction mode and, prove the in-frame correlation of current coding macro block greater than frame-to-frame correlation, directly give up inter-frame forecast mode, current coding macro block adopts intra prediction mode, enters step 4; Otherwise, illustrating that current coding macro block time and empty correlative character are not remarkable, any predictive mode in can not giving up in interframe or frame is first carried out intra prediction mode, then is entered step 3;
Step 3: determine best interframe encoding mode, adopt Lagrangian rate-distortion optimization criterion, as the judgement foundation of estimation and model selection, the optimum interframe encoding mode on the selection rate distortion sense; The rate distortion costs value, i.e. RD cost, can calculate according to following formula:
J
mode(s,c,MODE|λ
mode)=SSD(s,c|QP)+λ
mode×R(s,c,MODE|QP)(5)
In formula, MODE represents the inter-frame forecast mode that current coding macro block adopts; S is the original video luminance signal; C is for adopting the reconstruction video luminance signal after the MODE predictive mode is encoded; λ
ModeBe Lagrange multiplier; J
Mode(s, c, MODE| λ
Mode) rate distortion costs value RD cost under expression MODE pattern; R (s, c, MODE|QP) is the total number of bits that comprises macro block header, motion vector and all DCT block messages relevant with predictive mode and quantization parameter; QP is the coded quantization step-length; SSD (s, c|QP) be between original video luminance signal and reconstruction video luminance signal squared differences and; According to current coding macro block flatness feature, with the current coding macro block classification, and then preferentially select possible inter prediction encoding set of modes, realize the quick judgement of inter-frame forecast mode; Specifically comprise the following steps:
1) characterize the current coding macro block flatness
Statistics current coding macro block luminance component comprises the pixel count of each gray scale, obtains the current coding macro block grey level histogram, and its shape has reflected the degree of enriching of current coding macro block image detail just, can be used for estimating the flatness of current coding macro block; In the current coding macro block grey level histogram, certainly exist the gray scale of an ordinate maximum, the pixel sum that will belong to maximum gray scale is defined as the maximum pixel number of current coding macro block, is designated as Max Value.If the maximum pixel number in the current coding macro block grey level histogram is relatively large, the probability that some gray scale appearance are described is very high, be the main gray component composition of current coding macro block, in current coding macro block, pixel interdependence is larger, and namely current coding macro block is smooth; On the contrary, if the current coding macro block histogram relatively disperses, a plurality of gray scales occur, corresponding maximum pixel is counted less, illustrates that current coding macro block is made of a plurality of gray scales, and grain details is abundant, variation is violent, i.e. the current coding macro block texture-rich.
For smooth current coding macro block, can directly select macro-block level inter-frame forecast mode set (Skip, Inter16 * 16, Inter16 * 8, Inter8 * 16), interrupt simultaneously the set of sub-split inter-frame forecast mode (Inter8 * 8, Inter8 * 4, Inter4 * 8, Inter4 * 4) traversal search; Otherwise, for the current coding macro block of texture-rich, directly select the sub-split inter-frame forecast mode, interrupt simultaneously the traversal search to the macro-block level inter-frame forecast mode.
2) judgement current coding macro block type
For reducing, the unconspicuous current coding macro block of feature is made erroneous judgement, the inter-frame forecast mode set of adopting dynamic bi-threshold judgement current coding macro block type and may adopting, detailed process is as follows:
(1) calculate the current coding macro block grey level histogram, record its maximum pixel and count Max Value;
(2) capping threshold value Th
HighWith lower threshold Th
low, Th
HighAnd Th
lowBe the integer between [0,255];
(3) if Max is Value〉Th
High, think that current coding macro block is smooth, directly carry out the large scale inter prediction, determine optimum inter-frame forecast mode, enter step 4;
(4) if Max is Value<Th
low, think and directly carry out the small size inter prediction by the current coding macro block texture-rich, determine optimum inter-frame forecast mode, enter step 4;
(5) if Th
low<Max Value<Th
High, think that current coding macro block flatness feature is not remarkable, carry out whole inter-frame forecast modes;
For making upper limit threshold Th
HighWith lower threshold Th
lowCan be with the variation of current coding macro block flatness adaptively changing, adopt following strategy:
(1) if the Max Value of current coding macro block greater than current upper limit threshold Th
High, upgrade upper limit threshold:
With this mean value as new upper limit threshold Th
High
(2) if the Max Value of current coding macro block less than current lower threshold Th
low, upgrade lower threshold:
With this mean value as new lower threshold Th
low
(3) if the Max Value of current coding macro block between upper limit threshold Th
HighWith lower limit Th
lowBetween, keep former upper and lower limit threshold value constant;
Step 4: according to the rate distortion criterion, the residual error under the predictive coding pattern with minimum rate distortion costs is carried out conversion, quantification, entropy coding;
Step 5: export final compressed video bit stream, preserve coded message.
The present invention has following beneficial effect:
The inventive method has proposed fast prediction coding new approaches.Analysing in depth on the basis of inter prediction encoding principle H.264, excavate the relevance of inter-frame forecast mode and macro block characteristics, give macro block time and spatial coherence and the new definition of flatness feature, adopt layering anticipation step by step, effectively improve H.264 coding rate, be applicable to the in real time application scenario such as video conference, remote monitoring.Coding method versatility provided by the invention is good, and the video sequence different to movement degree, that the texture flatness is different is saved in the scramble time and all obtained good effect of optimization, and has strictly controlled the code check increase.The inventive method is launched research mainly for the P frame, and same coding techniques can expand to the B frame, has stronger portability, also can be combined with other fast encoding methods H.264, further reduces encoder complexity and scramble time.
Description of drawings
Alternative predictive coding pattern diagram in Fig. 1 standard interframe prediction encoding method.
Fig. 2 inter macroblocks is cut apart schematic diagram.
Fig. 3 standard inter prediction encoding method flow diagram.
Fig. 4 the present invention proposes the structured flowchart of coding method.
The fast encoding method flow chart that Fig. 5 the present invention proposes.
Embodiment
Below in conjunction with description of drawings and embodiment, the present invention is described in further detail.
More responsive than chrominance information to monochrome information in view of human eye, the inventive method is encoded for the luminance component in video sequence.First read in the video sequence of yuv format, extract its luminance component, encoder calls fast coding module of the present invention and completes video compression coding.
In concrete enforcement, complete following program in computer:
Step 3.1: as Fig. 5 step 3.1, if satisfy Th
1=α SSD
Intra-SSD
Inter0 condition, the frame-to-frame correlation of current coding macro block is described greater than in-frame correlation, can directly give up infra-frame prediction, macro block is selected inter prediction, jumps to step 4; Otherwise, enter step 3.2;
Step 3.2: as Fig. 5 step 3.2, judge whether to satisfy Th
2=SSD
Intra-β SSD
Inter<0 condition if satisfy, illustrates the in-frame correlation of current coding macro block greater than frame-to-frame correlation, and macro block is selected infra-frame prediction, gives up inter prediction, jumps to step 5; Otherwise, illustrate that macro block time and spatial coherence feature are not remarkable, need to carry out in frame and the dual prediction of interframe, enter step 4;
Step 4: determine the inter-frame forecast mode set, as Fig. 4 the 4th step, calculate the grey level histogram of current coding macro block, record its maximum pixel and count Max Value, and with self adaptation upper limit threshold Th
HighWith lower limit Th
lowCompare respectively, differentiate the current coding macro block flatness;
Step 4.1 is as Fig. 5 step 4.1: if Max is Value〉Th
High, think that current coding macro block is smooth, directly carry out the macro-block level inter prediction, determine optimum inter-frame forecast mode, upgrade upper limit threshold Th
High, jump to step 5; Otherwise, enter step 4.2;
Step 4.2 is as Fig. 5 step 4.2: if Max is Value<Th
low, think and directly carry out the sub-split inter prediction by the current coding macro block texture-rich, determine optimum inter-frame forecast mode, upgrade lower threshold Th
low, jump to step 5; Otherwise, enter step 4.3;
Step 4.3 is as Fig. 5 step 4.3: if Th
low<Max Value<Th
High, think that current coding macro block flatness feature is not remarkable, traversal macro-block level and sub-split inter prediction are kept former upper and lower limit threshold value Th
HighAnd Th
lowConstant, determine optimum inter-frame forecast mode;
Step 5: determine optimum inter-frame forecast mode, go on foot as Fig. 4 the 5th: according to the rate distortion criterion, the residual error under the predictive coding pattern with minimum rate distortion costs is carried out conversion, quantification, entropy coding;
Step 6: the output squeezing code stream goes on foot as Fig. 4 the 6th: export final compressed video bit stream, preserve coded message.
The setting of adaptive threshold makes the threshold value can be according to the flatness of current coding macro block and real time altering is realized the real-time adjustment of threshold value.Adopt dual threshold, both can directly judge the inter-frame forecast mode that it adopts to the obvious current coding macro block of flatness feature, again the unconspicuous current coding macro block of flatness feature is kept the primary standard method, effectively reduce erroneous judgement, strictly controlling code check increases.
Be the validity of check put forward the methods of the present invention, the cycle tests of having selected to have different characteristics, Coastguard as more violent in movement degree and Forman sequence; The Akiyo that movement degree is milder, Miss America and Mother﹠amp; The Daughter sequence; The Mobile sequence of texture-rich smooth motion.From scramble time, compression bit rate and Y-PSNR three aspects:, the inventive method and standard code method are H.264 compared statistics (seeing Table 2).Adopt H.264 coding checkout model JM12.2, the experiment condition configuration is as follows:
Main frame is P42.8CPU, the 512M internal memory, and coding 100 frames, frame per second 30f/s, code flow structure are IPPP, and quantization parameter QP is made as 28, and entropy is encoded to CAVLC, 5 reference frames.
By table 2 statistics, the inventive method is compared with standard code method H.264, the Y-PSNR 0.046dB that on average descends, and video quality is free of losses almost; Average bit rate reduces by 0.536%, has kept the superior function of high compression ratio, on average saves the scramble time 69.59%, has effectively improved coding rate., motion mild Claire smooth for texture particularly, Container, Miss America, the Akiyo video sequence is saved the scramble time near 80%.This is because most macro blocks in comparatively mild video sequence have been selected the macro-block level predictive mode, and the possibility that anticipation in advance goes out the optimum code pattern is larger, has omitted a large amount of calculating to the sub-split predictive mode; And greater than the spatial coherence between intra-frame macro block, given up more the calculating to intra prediction mode due to the temporal correlation between consecutive frame, greatly saved the scramble time.
The performance comparison result statistics of table 2. the inventive method and standard code method H.264
In table 2, PSNR represents Y-PSNR, represents reconstruction video picture quality after predictive coding.Symbol "+" expression strengthens or increases; Symbol "-" expression descends or reduces.
Claims (1)
1. the Fast video coding method of hierarchy anticipation, filter out in advance optimum inter prediction encoding pattern according to the current coding macro block feature, adopt the layering anticipation, at first judge in advance that according to current coding macro block time and spatial coherence this macro block should adopt inter prediction or infra-frame prediction; If selection inter prediction, select targetedly the larger inter-frame forecast mode set of probability of occurrence according to the flatness feature of current coding macro block again, give up the less inter-frame forecast mode set of probability of occurrence, thereby the traversal search method that replaces exhaustive in primary standard motion estimation algorithm H.264/AVC, determine in advance optimum inter-frame forecast mode, realize compressed encoding between fast frame; It is characterized in that comprising the steps:
Step 1: the luma component values of extracting current coding macro block from frame of video;
Step 2: utilize current coding macro block time and spatial coherence to screen in advance the current coding macro block predictive mode, time and spatial coherence that the squared differences between use primary signal and reconstruction signal and SSD (s, c|QP) represent current coding macro block:
In formula, 16 is Horizontal number of pixels and the Vertical number of pixels of current coding macro block, and QP is the coded quantization step-length, and s is the original video luminance signal, and c is for adopting the reconstruction video luminance signal after predictive mode is encoded, s
Y[x, y|QP], c
YWhen [x, y|QP] represents that respectively quantization step is QP, the value of original and reconstruction video luminance signal, x, y are the position of current coding macro block in frame of video, specifically comprise the following steps:
1) SSD
IntraRepresent the current coding macro block spatial coherence, SSD
InterRepresent the current coding macro block temporal correlation;
SSD
IntraComputing formula be:
(2)
In formula, SSD
IntraAs predict pixel, through the squared differences of vertical and horizontal direction prediction and, s with neighbor around current coding macro block
Y[x+m, y+n] is the pixel brightness value of current coding macro block in frame of video, c
Y[x+m-1, y+n], c
Y[x+m, y+n-1] be with current coding macro block at the vertical and pixel brightness value horizontal direction adjacent macroblocks, x, y are the position of current coding macro block in frame of video, m, n represent the position of pixel in current coding macro block;
SSD
InterComputing formula be:
In formula, SSD
InterFor the prediction squared differences of current coding macro block and front frame macro block and, s
YThe pixel brightness value of [x+m, y+n] expression current coding macro block, c
YThe pixel brightness value of correspondence position macro block in frame before [x+m, y+n] expression, x, y represent the position of current coding macro block in frame of video, and m, n represent the position of pixel in current coding macro block;
2) compare SSD
IntraAnd SSD
InterSize, the screening current coding macro block predictive mode type that should adopt is introduced and is adjusted factor-alpha and β; Discrimination formula is:
Th
1=α·SSD
intra-SSD
inter (4)
TH
2=SSD
intra-β·SSD
inter
In following formula, α, β are the real number of value between [0,1], if Th
1Greater than zero, the squared differences of intra prediction mode is described and greater than the squared differences of inter-frame forecast mode and, the frame-to-frame correlation of proof current coding macro block is greater than in-frame correlation, directly give up intra prediction mode, macro block adopts inter-frame forecast mode, must to the current coding macro block estimation of taking exercises, enter step 3; Otherwise, judgement Th
2Whether less than zero, if Th
2Less than zero, the squared differences of inter-frame forecast mode is described and greater than the squared differences of intra prediction mode and, prove the in-frame correlation of current coding macro block greater than frame-to-frame correlation, directly give up inter-frame forecast mode, current coding macro block adopts intra prediction mode, enters step 4; Otherwise, illustrating that current coding macro block time and spatial coherence feature are not remarkable, any predictive mode in can not giving up in interframe or frame is first carried out intra prediction mode, then is entered step 3;
Step 3: determine best interframe encoding mode, adopt Lagrangian rate-distortion optimization criterion, as the judgement foundation of estimation and model selection, the optimum interframe encoding mode on the selection rate distortion sense; The rate distortion costs value, i.e. RD cost, can calculate according to following formula:
J
mode(s,c,MODE|λ
mode)=SSD(s,c|QP)+λ
mode×R(s,c,MODE|QP)(5)
In formula, MODE represents the inter-frame forecast mode that current coding macro block adopts; S is raw video signal; C is for adopting the reconstruction video signal after the MODE predictive mode is encoded; λ
ModeBe Lagrange multiplier; J
Mode(s, c, MODE| λ
Mode) rate distortion costs value RD cost under expression MODE pattern; R (s, c, MODE|QP) is the total number of bits that comprises macro block header, motion vector and all DCT block messages relevant with predictive mode and quantization parameter; QP is the coded quantization step-length; SSD (s, c|QP) be between original video luminance signal and reconstruction video luminance signal squared differences and; According to current coding macro block flatness feature, with the current coding macro block classification, and then preferentially select possible inter prediction encoding set of modes, realize the quick judgement of inter-frame forecast mode; Specifically comprise the following steps:
1) characterize the current coding macro block flatness
Statistics current coding macro block luminance component comprises the pixel count of each gray scale, obtains the current coding macro block grey level histogram, and its shape has reflected the degree of enriching of current coding macro block image detail just, can be used for estimating the flatness of current coding macro block; In the current coding macro block grey level histogram, certainly exist the gray scale of an ordinate maximum, the pixel sum that will belong to maximum gray scale is defined as the maximum pixel number of current coding macro block, is designated as Max Value;
2) judgement current coding macro block type
For reducing, the unconspicuous current coding macro block of feature is made erroneous judgement, the inter-frame forecast mode set of adopting dynamic bi-threshold judgement current coding macro block type and may adopting, detailed process is as follows:
(1) calculate the current coding macro block grey level histogram, record its maximum pixel and count Max Value;
(2) capping threshold value Th
HighWith lower threshold Th
low, Th
HighAnd Th
lowBe the integer between [0,255];
(3) if Max is Value〉Th
High, think that current coding macro block is smooth, directly carry out the large scale inter prediction, determine optimum inter-frame forecast mode, enter step 4;
(4) if Max is Value<Th
low, think and directly carry out the small size inter prediction by the current coding macro block texture-rich, determine optimum inter-frame forecast mode, enter step 4;
(5) if Th
low<Max Value<Th
High, think that current coding macro block flatness feature is not remarkable, carry out whole inter-frame forecast modes;
For making upper limit threshold Th
HighWith lower threshold Th
lowCan be with the variation of current coding macro block flatness adaptively changing, adopt following strategy:
(1) if the Max Value of current coding macro block greater than current upper limit threshold Th
High, upgrade upper limit threshold:
With this mean value as new upper limit threshold Th
High
(2) if the Max Value of current coding macro block less than current lower threshold Th
low, upgrade lower threshold:
With this mean value as new lower threshold Th
low
(3) if the Max Value of current coding macro block between upper limit threshold Th
HighWith lower threshold Th
lowBetween, keep former upper and lower limit threshold value constant;
Step 4: according to the rate distortion criterion, the residual error under the predictive coding pattern with minimum rate distortion costs is carried out conversion, quantification, entropy coding;
Step 5: export final compressed video bit stream, preserve coded message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110098369 CN102186070B (en) | 2011-04-20 | 2011-04-20 | Method for realizing rapid video coding by adopting hierarchical structure anticipation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201110098369 CN102186070B (en) | 2011-04-20 | 2011-04-20 | Method for realizing rapid video coding by adopting hierarchical structure anticipation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102186070A CN102186070A (en) | 2011-09-14 |
CN102186070B true CN102186070B (en) | 2013-06-05 |
Family
ID=44572131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201110098369 Expired - Fee Related CN102186070B (en) | 2011-04-20 | 2011-04-20 | Method for realizing rapid video coding by adopting hierarchical structure anticipation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102186070B (en) |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102790878B (en) * | 2011-12-07 | 2015-02-18 | 北京邮电大学 | Coding mode choosing method and device for video coding |
CN102438148B (en) * | 2011-12-23 | 2014-08-20 | 上海交通大学 | Fast mode selection method based on DVS for H.264 intra prediction coding |
CN102625101B (en) * | 2012-03-16 | 2014-02-12 | 北京航空航天大学 | Method for rapidly selecting H.264 interframe predication mode based on random pixel method |
CN102984513B (en) * | 2012-09-29 | 2015-04-15 | 天津大学 | Depth video coding method |
CN103517077B (en) * | 2012-12-14 | 2017-02-15 | 深圳百科信息技术有限公司 | Method and device for rapidly selecting prediction mode |
KR102053689B1 (en) * | 2013-01-14 | 2019-12-09 | 삼성전자 주식회사 | Compressing Method of image data for camera and Electronic Device supporting the same |
CN103188496B (en) * | 2013-03-26 | 2016-03-09 | 北京工业大学 | Based on the method for coding quick movement estimation video of motion vector distribution prediction |
CN103491369B (en) | 2013-09-18 | 2016-09-28 | 华为技术有限公司 | A kind of interframe prediction encoding method and encoder |
CN103686169A (en) * | 2013-10-25 | 2014-03-26 | 四川大学 | Intra-frame prediction rapid algorithm based on macro-block characteristics |
US9693077B2 (en) * | 2013-12-13 | 2017-06-27 | Qualcomm Incorporated | Controlling sub prediction unit (sub-PU) motion parameter inheritance (MPI) in three dimensional (3D) HEVC or other 3D coding |
CN104539962B (en) | 2015-01-20 | 2017-12-01 | 北京工业大学 | It is a kind of merge visually-perceptible feature can scalable video coding method |
CN105578195B (en) * | 2015-12-24 | 2019-03-12 | 福州瑞芯微电子股份有限公司 | A kind of H.264 inter-frame prediction system |
CN105578197B (en) * | 2015-12-24 | 2019-04-30 | 福州瑞芯微电子股份有限公司 | A kind of realization inter-prediction master control system |
CN107623848B (en) * | 2017-09-04 | 2019-11-19 | 浙江大华技术股份有限公司 | A kind of method for video coding and device |
EP3824631A4 (en) | 2018-07-18 | 2022-07-06 | HFI Innovation Inc. | Method and apparatus of motion compensation bandwidth reduction for video coding system utilizing multi-hypothesis |
US11051010B2 (en) | 2018-07-18 | 2021-06-29 | Mediatek Inc. | Merge candidates with multiple hypothesis |
CN110166783B (en) | 2019-06-03 | 2021-03-23 | Tcl华星光电技术有限公司 | Compression method for compensation gauge, display manufacturing apparatus and device having memory function |
CN110381311B (en) * | 2019-07-01 | 2023-06-30 | 腾讯科技(深圳)有限公司 | Video frame encoding method, video frame encoding device, computer readable medium and electronic equipment |
CN110545402A (en) * | 2019-08-18 | 2019-12-06 | 宁波职业技术学院 | underground monitoring video processing method, computer equipment and storage medium |
CN111586410B (en) * | 2020-06-02 | 2022-04-19 | 浙江大华技术股份有限公司 | Video encoding method, decoding method and related devices thereof |
CN113489976A (en) * | 2021-07-29 | 2021-10-08 | 维沃移动通信有限公司 | Predictive coding method and device and electronic equipment |
CN114374847A (en) * | 2022-01-17 | 2022-04-19 | 海宁奕斯伟集成电路设计有限公司 | Image compression method, device, equipment and computer readable storage medium |
CN116962685B (en) * | 2023-09-21 | 2024-01-30 | 杭州爱芯元智科技有限公司 | Video encoding method, video encoding device, electronic equipment and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100401789C (en) * | 2004-06-11 | 2008-07-09 | 上海大学 | Quick selection of prediction modes in H.264/AVC frame |
EP1808024B1 (en) * | 2004-11-04 | 2013-04-17 | Thomson Licensing | Fast intra mode prediction for a video encoder |
CN101325707B (en) * | 2007-06-12 | 2012-04-18 | 浙江大学 | System for encoding and decoding texture self-adaption video |
US20090067495A1 (en) * | 2007-09-11 | 2009-03-12 | The Hong Kong University Of Science And Technology | Rate distortion optimization for inter mode generation for error resilient video coding |
CN101179728B (en) * | 2007-12-13 | 2011-07-20 | 北京中星微电子有限公司 | Method and apparatus for determining interframe encoding mode |
CN101321287B (en) * | 2008-07-08 | 2012-03-28 | 浙江大学 | Video encoding method based on movement object detection |
CN101640802B (en) * | 2009-08-28 | 2012-06-20 | 北京工业大学 | Video inter-frame compression coding method based on macroblock features and statistical properties |
-
2011
- 2011-04-20 CN CN 201110098369 patent/CN102186070B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN102186070A (en) | 2011-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102186070B (en) | Method for realizing rapid video coding by adopting hierarchical structure anticipation | |
CN101640802B (en) | Video inter-frame compression coding method based on macroblock features and statistical properties | |
CN100401789C (en) | Quick selection of prediction modes in H.264/AVC frame | |
CN101815218B (en) | Method for coding quick movement estimation video based on macro block characteristics | |
CN104796694B (en) | Optimization intraframe video coding method based on video texture information | |
CN101159875B (en) | Double forecast video coding/decoding method and apparatus | |
CN104539962A (en) | Layered video coding method fused with visual perception features | |
CN102065298B (en) | High-performance macroblock coding implementation method | |
CN103546749B (en) | Method for optimizing HEVC (high efficiency video coding) residual coding by using residual coefficient distribution features and bayes theorem | |
CN103188496B (en) | Based on the method for coding quick movement estimation video of motion vector distribution prediction | |
CN103634606B (en) | Video encoding method and apparatus | |
CN103248895B (en) | A kind of quick mode method of estimation for HEVC intraframe coding | |
CN102984521A (en) | High-efficiency video coding inter-frame mode judging method based on temporal relativity | |
CN101494792A (en) | H.264/AVC frame inner prediction method based on edge characteristics | |
CN103238334A (en) | Image intra prediction method and apparatus | |
CN104853191A (en) | HEVC fast coding method | |
CN107623850A (en) | A kind of quick screen contents encoding method based on temporal correlation | |
CN103596004A (en) | Intra-frame prediction method and device based on mathematical statistics and classification training in HEVC | |
CN103916675B (en) | A kind of low latency inner frame coding method divided based on band | |
CN107018412B (en) | A kind of DVC-HEVC video transcoding method based on key frame coding unit partition mode | |
CN100484249C (en) | Method of forecast inside frame based on edge direction between frames | |
CN105681797A (en) | Prediction residual based DVC-HEVC (Distributed Video Coding-High Efficiency Video Coding) video transcoding method | |
CN102510496B (en) | Quick size reduction transcoding method based on region of interest | |
CN101883275B (en) | Video coding method | |
CN1194544C (en) | Video encoding method based on prediction time and space domain conerent movement vectors |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130605 Termination date: 20200420 |
|
CF01 | Termination of patent right due to non-payment of annual fee |