CN109660811B - Rapid HEVC inter-frame coding method - Google Patents
Rapid HEVC inter-frame coding method Download PDFInfo
- Publication number
- CN109660811B CN109660811B CN201811540856.2A CN201811540856A CN109660811B CN 109660811 B CN109660811 B CN 109660811B CN 201811540856 A CN201811540856 A CN 201811540856A CN 109660811 B CN109660811 B CN 109660811B
- Authority
- CN
- China
- Prior art keywords
- block
- mode
- pixel search
- executing
- nx2n
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/109—Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/146—Data rate or code amount at the encoder output
- H04N19/147—Data rate or code amount at the encoder output according to rate distortion criteria
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
Abstract
The invention discloses a fast HEVC inter-frame coding method. Whether motion estimation is terminated in advance is judged by obtaining the result of integer pixel search of a Pb1 block in Rect mode prediction, wherein the early termination of motion estimation refers to the following steps: and when the integer pixel search of the Pb1 block is completed, judging whether the integer pixel motion vector of the Pb1 block is consistent with the motion vector trend of Pb0, if so, judging that the current prediction mode belongs to invalid calculation, and skipping the sub-pixel search of the Pb1 block. The invention has the beneficial effects that: the sub-pixel search time of the Pb1 block is saved, so that a large amount of invalid calculation is avoided, and the overall coding speed is improved.
Description
Technical Field
The invention relates to the technical field related to video coding, in particular to a fast HEVC inter-frame coding method.
Background
The compression efficiency of the new generation video coding standard HEVC is improved by 50% compared with the compression efficiency of the previous generation video coding standard H.264, a large amount of network bandwidth can be saved under the condition of providing the same video quality, and the video coding standard HEVC is very suitable for popularization of video contents such as 4K and 3D blue light.
The basic premise of video coding compression is that correlation exists among pixels, data of a plurality of adjacent pixels in a frame of image are similar or identical, namely spatial redundancy, data of adjacent frames in the video also exist in a plurality of similarities or repetitions, namely temporal redundancy, coding compression is to remove redundant information in the data, intra-frame prediction technology can remove spatial redundancy, and inter-frame prediction technology can remove temporal redundancy.
The inter-frame prediction divides a frame of image into a plurality of coding blocks by using the correlation existing between adjacent frames, searches out the corresponding matching block of each block in the adjacent frames, calculates the relative offset of the spatial position between the two blocks, obtains the relative offset as MV (Motion Vector), and obtains the MV, which is called as Motion estimation. The motion estimation mainly comprises two steps of integer pixel search and sub-pixel search, wherein the integer pixel search searches out an optimal matching block constructed by taking pixel points as units in a reference frame, the sub-pixel search constructs virtual sub-pixel points by utilizing pixel interpolation after the integer pixel MV is determined, and then the optimal matching block is searched. Therefore, the sub-pixel search can search out more accurate matching blocks in the reference frame, but the searching times are more, the complexity is higher, and the sub-pixel search time accounts for more than 60% of the whole motion estimation.
HEVC divides each frame of image into several CUs (Coding units), and recursively processes the CUs in a quadtree form, sequentially traversing 4 levels of CUs, i.e., 64x64, 32x32, 16x16, and 8x 8. When each layer of CU is coded, the inter prediction sequentially traverses inter modes such as Skip, Merge, 2Nx2N, and Rect (2NxN and Nx2N)) and two Intra modes such as Intra2Nx2N and IntraNxN, and selects a mode with the minimum rate-distortion cost as the optimal prediction mode, where the rate-distortion cost RDcost is calculated as:
RDcost=λ·R+D
where λ is the lagrangian factor, R represents the number of coded bits, and D represents the distortion of the coded prediction value relative to the original video data value.
Among the prediction modes, 2Nx2N and the Rect prediction mode are very complicated in computation because matching blocks in a reference frame need to be found by motion estimation. The Rect prediction mode is a further division of the 2Nx2N block, for example, the Nx2N prediction mode is to divide 2Nx2N into two blocks with different MVs on the left and right, and the 2NxN prediction mode is to divide 2Nx2N into two blocks with different MVs on the top and bottom, and the left and right (or top and bottom) blocks can be referred to as Pb0 block and Pb1 block, respectively. If the MV of the Pb0 block and the MV of the Pb1 block are the same, the Rect prediction result is the same as the 2Nx2N mode, but more bits are needed to encode the MV and the partition mode, so the rate-distortion cost of the Rect prediction mode is almost certainly greater than that of the 2Nx2N, and the calculation of Rect belongs to invalid calculation, and the traditional method cannot effectively avoid the invalid calculation.
Disclosure of Invention
The invention provides a fast HEVC inter-frame coding method which avoids invalid calculation and improves coding speed in order to overcome the defects in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
a fast HEVC inter-frame coding method comprises the following specific implementation steps:
(1) when each CU starts the inter mode selection, performing integer pixel search and fractional pixel search on a prediction block of a2Nx2N mode, determining a final MV and a matching block, solving a rate distortion cost which is marked as cost _2Nx2N, and executing the step (2);
(2) carrying out integer pixel search and sub-pixel search on a Pb0 block in an Nx2N mode, obtaining a motion vector marked as mv00, and executing the step (3);
(3) carrying out integer pixel search on a Pb1 block in an Nx2N mode, obtaining an integer pixel motion vector which is marked as mv01, if | mv00-mv01| < TH1 is met, terminating motion estimation in advance, marking a rate distortion cost _ Nx2N of an Nx2N mode as infinity, and executing a step (4); otherwise, continuing to perform pixel-by-pixel search on the Pb1 block, determining a final MV and a matching block, solving a rate-distortion cost _ Nx2N, and executing the step (4);
(4) carrying out integer pixel search and fractional pixel search on a Pb0 block in a 2NxN mode, solving a motion vector which is marked as mv10, and executing the step (5);
(5) carrying out integer pixel search on a Pb1 block in a 2NxN mode, obtaining an integer pixel motion vector which is marked as mv11, if | mv10-mv11| < TH1, terminating motion estimation in advance, marking a rate distortion cost _2NxN of the 2NxN mode as infinity, and executing a step (6); otherwise, continuing to perform pixel-division searching on the Pb1 block, determining a final MV and a matching block, solving a rate-distortion cost _2NxN, and executing the step (6);
(6) the cost _ Nx2N is compared with cost _2NxN and cost _2Nx2N, and the pattern having the minimum value is selected as the optimum pattern.
The existing HEVC coding method is computationally complex, the Rect mode occupies 40% of the time, and the motion estimation occupies 90% of the time in the mode. In the conventional method, when Skip, Merge, 2Nx2N and the Rect mode are traversed, the Rect mode prediction result is the same as the 2Nx2N mode prediction result, and a large amount of invalid calculation is caused. The method judges whether to terminate motion estimation in advance by obtaining the result of integer pixel search of a Pb1 block in Rect mode prediction, wherein the motion estimation termination in advance refers to the following steps: after the whole pixel search of the Pb1 block is completed, whether the whole pixel motion vector of the Pb1 block is consistent with the motion vector trend of the Pb0 is judged, if so, the current prediction mode is judged to belong to invalid calculation, and the sub-pixel search of the Pb1 block is skipped, so that the sub-pixel search time of the Pb1 block is saved, a large amount of invalid calculation is avoided, and the overall coding speed is improved.
Preferably, in the step (3) and the step (5), TH1 is a constant and has a value range of 0-5. The accuracy of the early termination motion estimation in the step (3) and the step (5) is related to the selection of the TH1 value, specifically referring to table 1, and the optimal mode determined by using the method is the same as the optimal mode determined by using the conventional method, that is, the early termination motion estimation is considered to be accurate.
The invention has the beneficial effects that: whether motion estimation is terminated in advance is judged by obtaining the result of searching the whole pixels of the Pb1 block in the Rect mode prediction, so that the sub-pixel searching time of the Pb1 block is saved, a large amount of invalid calculation is avoided, and the whole coding speed is improved.
Drawings
FIG. 1 is a flow chart of the present invention.
Detailed Description
The invention is further described with reference to the following figures and detailed description.
In the embodiment shown in fig. 1, a fast HEVC inter-frame coding method includes the following specific steps:
(1) when each CU starts the inter mode selection, performing integer pixel search and fractional pixel search on a prediction block of a2Nx2N mode, determining a final MV and a matching block, solving a rate distortion cost which is marked as cost _2Nx2N, and executing the step (2);
(2) carrying out integer pixel search and sub-pixel search on a Pb0 block in an Nx2N mode, obtaining a motion vector marked as mv00, and executing the step (3);
(3) carrying out integer pixel search on a Pb1 block in an Nx2N mode, obtaining an integer pixel motion vector which is marked as mv01, if | mv00-mv01| < TH1 is met, terminating motion estimation in advance, marking a rate distortion cost _ Nx2N of an Nx2N mode as infinity, and executing a step (4); otherwise, continuing to perform pixel-by-pixel search on the Pb1 block, determining a final MV and a matching block, solving a rate-distortion cost _ Nx2N, wherein TH1 is a constant and the value range is 0-5, and executing the step (4);
(4) carrying out integer pixel search and fractional pixel search on a Pb0 block in a 2NxN mode, solving a motion vector which is marked as mv10, and executing the step (5);
(5) carrying out integer pixel search on a Pb1 block in a 2NxN mode, obtaining an integer pixel motion vector which is marked as mv11, if | mv10-mv11| < TH1, terminating motion estimation in advance, marking a rate distortion cost _2NxN of the 2NxN mode as infinity, and executing a step (6); otherwise, continuing to perform pixel-by-pixel search on the Pb1 block, determining a final MV and a matching block, solving a rate-distortion cost _2NxN, wherein TH1 is a constant and the value range is 0-5, and executing the step (6);
(6) the cost _ Nx2N is compared with cost _2NxN and cost _2Nx2N, and the pattern having the minimum value is selected as the optimum pattern.
Wherein: the accuracy of the early termination motion estimation in the step (3) and the step (5) is related to the selection of the TH1 value, specifically referring to table 1, and the optimal mode determined by using the method is the same as the optimal mode determined by using the conventional method, that is, the early termination motion estimation is considered to be accurate.
The existing HEVC coding method is computationally complex, the Rect mode occupies 40% of the time, and the motion estimation occupies 90% of the time in the mode. In the conventional method, when Skip, Merge, 2Nx2N and the Rect mode are traversed, the Rect mode prediction result is the same as the 2Nx2N mode prediction result, and a large amount of invalid calculation is caused. The method judges whether to terminate motion estimation in advance by obtaining the result of integer pixel search of a Pb1 block in Rect mode prediction, wherein the motion estimation termination in advance refers to the following steps: after the whole pixel search of the Pb1 block is completed, whether the whole pixel motion vector of the Pb1 block is consistent with the motion vector trend of the Pb0 is judged, if so, the current prediction mode is judged to belong to invalid calculation, and the sub-pixel search of the Pb1 block is skipped, so that the sub-pixel search time of the Pb1 block is saved, a large amount of invalid calculation is avoided, and the overall coding speed is improved. The magnitude of the increase in coding speed is related to the selection of TH1 value, and can be referred to table 1.
TABLE 1 influence of the selection of TH1 values on accuracy and coding results
TH1 | Rate of accuracy | Code rate of coding | Coding speed |
3 | 88% | +0.09% | +9% |
4 | 86% | +0.10% | +10% |
5 | 82% | +0.11% | +12% |
Claims (2)
1. A fast HEVC inter-frame coding method is characterized by comprising the following specific implementation steps:
(1) when each CU starts the inter mode selection, performing integer pixel search and fractional pixel search on a prediction block of a2Nx2N mode, determining a final MV and a matching block, solving a rate distortion cost which is marked as cost _2Nx2N, and executing the step (2); wherein, CU is a coding unit, and MV is a motion vector;
(2) carrying out integer pixel search and sub-pixel search on a Pb0 block in an Nx2N mode, obtaining a motion vector marked as mv00, and executing the step (3); the Nx2N prediction mode is to divide the 2Nx2N block into two blocks with different MVs, namely a Pb0 block and a Pb1 block;
(3) carrying out integer pixel search on a Pb1 block in an Nx2N mode, obtaining an integer pixel motion vector which is marked as mv01, if | mv00-mv01| < TH1, terminating motion estimation in advance, marking a rate distortion cost _ Nx2N of an Nx2N mode as infinity, and executing a step (4); otherwise, continuing to perform pixel-by-pixel search on the Pb1 block, determining a final MV and a matching block, solving a rate-distortion cost _ Nx2N, and executing the step (4); wherein TH1 is a constant;
(4) carrying out integer pixel search and fractional pixel search on a Pb0 block in a 2NxN mode, solving a motion vector which is marked as mv10, and executing the step (5);
(5) carrying out integer pixel search on a Pb1 block in a 2NxN mode, obtaining an integer pixel motion vector which is marked as mv11, if | mv10-mv11| < TH1, terminating motion estimation in advance, marking a rate distortion cost _2NxN of the 2NxN mode as infinity, and executing a step (6); otherwise, continuing to perform pixel-division searching on the Pb1 block, determining a final MV and a matching block, solving a rate-distortion cost _2NxN, and executing the step (6);
(6) the cost _ Nx2N is compared with cost _2NxN and cost _2Nx2N, and the pattern having the minimum value is selected as the optimum pattern.
2. The fast HEVC inter-frame coding method as recited in claim 1, wherein in step (3) and step (5), TH1 is in a range of 0-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811540856.2A CN109660811B (en) | 2018-12-17 | 2018-12-17 | Rapid HEVC inter-frame coding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811540856.2A CN109660811B (en) | 2018-12-17 | 2018-12-17 | Rapid HEVC inter-frame coding method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109660811A CN109660811A (en) | 2019-04-19 |
CN109660811B true CN109660811B (en) | 2020-09-18 |
Family
ID=66113779
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811540856.2A Active CN109660811B (en) | 2018-12-17 | 2018-12-17 | Rapid HEVC inter-frame coding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109660811B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110730344B (en) * | 2019-09-18 | 2022-04-19 | 浙江大华技术股份有限公司 | Video coding method and device and computer storage medium |
CN111479115B (en) * | 2020-04-14 | 2022-09-27 | 腾讯科技(深圳)有限公司 | Video image processing method and device and computer readable storage medium |
CN112738529B (en) * | 2020-12-23 | 2023-07-07 | 北京百度网讯科技有限公司 | Inter prediction method, device, apparatus, storage medium, and program product |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101795409B (en) * | 2010-03-03 | 2011-12-28 | 北京航空航天大学 | content adaptive fractional pixel motion estimation method |
CN103414899B (en) * | 2013-08-16 | 2016-05-25 | 武汉大学 | A kind of method for estimating of Video coding |
CN106658024B (en) * | 2016-10-20 | 2019-07-16 | 杭州当虹科技股份有限公司 | A kind of quick method for video coding |
CN106534849B (en) * | 2016-12-30 | 2019-07-16 | 杭州当虹科技股份有限公司 | A kind of quick HEVC inter-frame encoding methods |
-
2018
- 2018-12-17 CN CN201811540856.2A patent/CN109660811B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109660811A (en) | 2019-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108347616B (en) | Depth prediction method and device based on optional time domain motion vector prediction | |
CN113170181B (en) | Affine inheritance method in intra-block copy mode | |
CN110249628B (en) | Video encoder and decoder for predictive partitioning | |
EP4351139A2 (en) | Video encoding/decoding method and device, and recording medium storing bit stream | |
US20240056602A1 (en) | Image encoding/decoding method and apparatus for throughput enhancement, and recording medium storing bitstream | |
CN116962717A (en) | Image encoding/decoding method, storage medium, and transmission method | |
US20190281285A1 (en) | Encoding method and device therefor, and decoding method and device therefor | |
CN109660811B (en) | Rapid HEVC inter-frame coding method | |
CN111527752B (en) | Method and apparatus for encoding and decoding image and recording medium storing bit stream | |
TW201640894A (en) | Overlapped motion compensation for video coding | |
CN110024394A (en) | The recording medium of method and apparatus and stored bits stream to encoding/decoding image | |
CN103079070A (en) | Video encoder | |
CN107360419B (en) | A kind of movement forward sight video interprediction encoding method based on perspective model | |
CN103327327B (en) | For the inter prediction encoding unit selection method of high-performance video coding HEVC | |
CN104704832A (en) | Image processing method and apparatus for predicting motion vector and disparity vector | |
CN112055203A (en) | Inter-frame prediction method, video coding method and related devices thereof | |
CN104333755B (en) | The CU based on SKIP/Merge RD Cost of B frames shifts to an earlier date terminating method in HEVC | |
CN109547798B (en) | Rapid HEVC inter-frame mode selection method | |
CN107613305B (en) | P, B frame rapid motion estimation method in HEVC | |
WO2019085636A1 (en) | A video image processing method and device | |
CN113841399A (en) | Image encoding/decoding method and apparatus | |
CN109040756B (en) | HEVC image content complexity-based rapid motion estimation method | |
CN110139098A (en) | Fast algorithm selection method in high efficiency video encoder frame based on decision tree | |
KR101545195B1 (en) | Apparatus and method for fast Intra Prediction Algorithm | |
Guan et al. | VVC fast ME algorithm based on spatial texture features and time correlation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |