CN108174204B - Decision tree-based inter-frame rapid mode selection method - Google Patents
Decision tree-based inter-frame rapid mode selection method Download PDFInfo
- Publication number
- CN108174204B CN108174204B CN201810184642.XA CN201810184642A CN108174204B CN 108174204 B CN108174204 B CN 108174204B CN 201810184642 A CN201810184642 A CN 201810184642A CN 108174204 B CN108174204 B CN 108174204B
- Authority
- CN
- China
- Prior art keywords
- mode
- current
- coding unit
- current coding
- distortion cost
- 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/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/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/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/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
-
- 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/136—Incoming video signal characteristics or properties
- H04N19/137—Motion inside a coding unit, e.g. average field, frame or block difference
-
- 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/157—Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N19/159—Prediction type, e.g. intra-frame, inter-frame or bidirectional frame 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/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
Abstract
The invention discloses a decision tree-based inter-frame rapid mode selection method, which comprises the steps of firstly carrying out predictive coding on an optimal mode obtained by decision tree prediction by obtaining CU information of a specific position with better correlation, obtaining some information after current CU coding in real time, and finely adjusting the number and the sequence of inter-coding modes by utilizing the correlation of time domain information and space domain information and combining with the correlation information of peripheral CUs. The scheme predicts the inter-frame mode in advance, adjusts the mode sequence in real time in the prediction process of the inter-frame mode, skips unnecessary mode prediction, and greatly shortens the inter-frame prediction time, thereby reducing the coding time; the method is simple and easy to implement, and is beneficial to the industrialized popularization of the new generation of video coding standard.
Description
Technical Field
The invention relates to the field of video coding and decoding, in particular to a decision tree-based inter-frame fast mode selection method.
Background
In video coding techniques, inter-frame prediction is one of the core techniques of coding. Inter-frame prediction is to predict an image to be coded by using the related information of an already coded image according to the time correlation of a video image, and then perform a series of operations such as transformation, quantization, entropy coding and the like on the predicted residual error instead of directly coding the original pixel value. After interframe coding, the time correlation among video images is greatly eliminated, the coding complexity is greatly reduced, and the coding efficiency is obviously improved.
In 2013, the joint introduction of VCEG (video coding experts group) of ITU-T and MPEG (moving Picture experts group) of ISO/IEC into the HEVC (high efficiency video coding) video compression scheme. Since 2016, VCEG and MPEG began to research a new generation of video encoders, and established an expert group, jfet (joint video research group), aimed at further increasing the compression rate of HEVC. The latest coding software JEM for a new generation of video encoder is developed on the framework of HM, following the basic framework of HEVC, but introducing many new techniques and tools inside each module. The introduction of these tools plays a role in improving the compression rate and video quality, but increases the complexity of encoding, so that the practical application performance is worse.
A new inter-frame prediction mode is added into a new generation of coding standard JEM, and the inter-frame prediction steps are as follows:
the method comprises the following steps: the affinity Merge mode is performed. And calculating the rate distortion cost of the Affini Merge mode, and setting the Affini Merge mode as the optimal mode.
Step two: it is determined whether the optimal mode is the 2Nx2N Merge mode. And calculating the rate distortion cost of the 2Nx2N Merge mode, and if the rate distortion cost is smaller than that of the current optimal mode, selecting the 2Nx2N Merge mode as the optimal mode.
Step three: and judging whether the optimal mode is the FRUC Merge mode. The FRUC target mode includes two sub-modes, namely, binary and Template. And calculating the rate distortion cost of the FRUC Merge mode, if the rate distortion cost is smaller than the rate distortion cost of the current optimal mode, selecting the FRUC Merge mode as the optimal mode, and indicating which sub-mode the optimal mode belongs to by using a flag bit.
Step four: it is determined whether the optimal mode is the 2Nx2N mode. And calculating the rate-distortion cost under the 2Nx2N mode, and if the rate-distortion cost is smaller than that of the current optimal mode, selecting the 2Nx2N mode as the optimal mode.
Step five: the intra prediction mode is determined.
The prediction of the inter mode occupies more than half of the total time of encoding, and thus improvement of the inter mode prediction is necessary. If the order of the inter-frame modes can be adjusted through the related information, the optimal possibly selected mode is predicted, the traversal of all the modes is avoided, and some modes with low selection possibility are skipped, so that the encoding time is greatly reduced, and the encoding complexity is reduced.
Disclosure of Invention
The invention provides a decision tree-based inter-frame rapid mode selection method aiming at the defects of more inter-frame modes, overlong coding time and low coding efficiency in a JEM (Japanese image projection) coder.
A decision tree-based inter-frame fast mode selection method comprises the following steps:
step 1: constructing a current Coding Unit (CU) optimal prediction mode classifier;
randomly selecting four video test sequences from international standard test sequences, and acquiring a left adjacent block CU of a current coding unit CU from 100 frames of coding information of the selected four test sequencesLeftUpper neighboring block CUAboveAnd co-located block CUColThe related information of (2);
with CULeft、CUAbove、CUColBest mode of (1), CUColMV, CUColThe average pixel of the current coding unit CU is used as input data, the optimal prediction mode of the current coding unit CU is used as output data, 10-fold cross validation is selected, the J48 decision tree in weka is trained, and the optimal prediction mode classifier of the current coding unit CU based on the decision tree is obtained;
step 2: acquiring an optimal prediction mode estimated value mode (P) of a current coding unit CU in a coding process;
extracting CU of current coding unit in coding processLeft、CUAbove、CUColBest mode of (1), CUColMV, CUColInputting the residual error, the coding QP value and the average pixel of the current coding unit CU into the current coding unit CU best mode classifier constructed in the step 1, and acquiring the best prediction mode pre-estimated value mode (P) of the current coding unit CU in the coding process;
and step 3: obtaining a left neighbor block CULeftUpper neighboring block CUAboveAnd co-located block CUColBest prediction mode ofjAnd distortion D in the corresponding best prediction modejAnd rate distortion cost RDjIf mode (P) and modejIf not, entering step 4, otherwise, sequentially predicting all inter-frame modes and entering step 9;
and 4, step 4: counting the number i of the same optimal prediction modes, wherein j represents Left, Above and Col;
and 5: acquiring an optimal prediction mode candidate value of the current coding unit CU according to the value of i;
step 6: predicting an affinity Merge mode of the current coding unit CU, and marking the affinity Merge mode as the current best mode of the current coding unit CU*And simultaneously marking the rate distortion cost in the affinity Merge mode as the current optimal rate distortion cost RD*;
And 7: predicting mode (P) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*;
And 8: based on the optimal prediction mode prediction value mode (P) of the current coding unit CU, sequentially performing mode prediction on the optimal prediction mode candidate value of the current coding unit CU, and updating the current optimal prediction mode after each mode prediction*And the current best rate-distortion cost RD*;
Under the values of various i, sequentially selecting the optimal prediction mode candidate value of the current coding unit CU to perform mode prediction based on the optimal prediction mode prediction value mode (P) of the current coding unit CU, thereby finishing the prediction of the inter-frame mode of the current coding unit CU;
and step 9: the prediction of the inter mode is ended.
Further, the obtaining process of the optimal prediction mode candidate value of the current coding unit CU is as follows:
1) if i is 0, according to the distortion DjFrom small to large left neighboring block CULeftUpper neighboring block CUAboveAnd co-located block CUColArranging and arranging the arranged left adjacent block CULeftUpper neighboring block CUAboveAnd co-located block CUColThe corresponding best prediction modes are marked as a first best prediction mode candidate value mode (X), a second best prediction mode (Y) and a third best prediction mode (Z) in sequence;
2) if i is 2, the left neighboring block CU is divided into twoLeftUpper neighboring block CUAboveAnd co-located block CUColThe same mode in (a) is labeled as a first best prediction mode (x), and a different mode is labeled as a second best prediction mode (y);
3) if i is 3, the left neighboring block CU is divided intoLeftUpper neighboring block CUAboveAnd co-located block CUColIs marked as the first best mode (x);
wherein X, Y, Z is selected from Merge, Bilateral, Template, Inter2nx2 n.
Further, the specific process of step 8 is as follows:
A) if i is equal to 0, determining whether mode (p) is the same as mode (x), if so, proceeding to step 8.2, otherwise, proceeding to step 8.1;
step 8.1: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Determining whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColDistortion D ofjAnd a rate-distortion cost RDjAre all larger than the current coding unit CU in the current best prediction mode*Distortion D at the bottom and the best rate distortion cost RD*If yes, entering step 9, and if not, entering step 8.2;
step 8.2: judging whether the mode (P) and the mode (Y) are the same, if so, entering a step 8.4, and if not, entering a step 8.3;
step 8.3: predicting mode (Y) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Determining whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColDistortion D of at least two blocksjAndrate distortion cost RDjAre all larger than the current coding unit CU in the current best prediction mode*If the distortion D and the rate distortion cost RD are met, the step 9 is carried out, and if the distortion D and the rate distortion cost RD are not met, the step 8.4 is carried out;
step 8.4: judging whether mode (P) is the same as mode (Z), if so, entering step 9, if not, predicting mode (Z) of the current coding unit CU, and updating the current optimal prediction mode*And the current best rate-distortion cost RD*Entering step 9;
B) if i is 2, determining whether mode (p) is the same as mode (x), if so, proceeding to step 8.6, otherwise, proceeding to step 8.5;
step 8.5: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Judging the current best prediction mode of the current coding unit CU*Whether mode (X) and whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColRate distortion cost RD of at least two blocksjIs larger than the current coding unit CU in the current best mode of the current coding unit CU*Lower rate-distortion cost RD*If the judgment result is true, the step 9 is entered, and if the judgment result is false, the step 8.6 is entered;
step 8.6: judging whether the mode (P) and the mode (Y) are the same, if so, entering a step 8.8, and if not, entering a step 8.7;
step 8.7: predicting mode (Y) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Entering a step 9;
step 8.8: judging the current best mode of the current coding unit CU*If the current mode is the mode (P), entering the step 9, if not, predicting the rest unexecuted modes and updating the current best prediction mode according to the rate distortion cost*And the current best rate-distortion cost RD*Entering step 9;
C) if i is 3, determining whether mode (p) is the same as mode (x), if so, proceeding to step 9, otherwise, proceeding to step 8.9;
step 8.9: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*Predicting the remaining unexecuted modes, and entering step 9;
the update of the current best prediction mode*And the current best rate-distortion cost RD*After the current coding unit is subjected to mode prediction, if the obtained rate distortion cost is less than RD*The mode of progress is taken as the current best prediction mode*Meanwhile, the obtained rate distortion cost is taken as the current optimal rate distortion cost RD*;
And step 9: the prediction of the inter mode is ended.
Advantageous effects
The invention provides a decision tree-based inter-frame rapid mode selection method, which comprises the steps of firstly carrying out predictive coding on an optimal mode obtained by decision tree prediction by obtaining CU information of a specific position with better correlation, obtaining some information after current CU coding in real time, and finely adjusting the number and the sequence of inter-coding modes by utilizing the correlation of time domain information and space domain information and combining with the correlation information of peripheral CUs. The scheme predicts the inter-frame mode in advance, adjusts the mode sequence in real time in the prediction process of the inter-frame mode, skips unnecessary mode prediction, and greatly shortens the inter-frame prediction time, thereby reducing the coding time; the method is simple and easy to implement, and is beneficial to the industrialized popularization of the new generation of video coding standard.
Drawings
FIG. 1 is a schematic diagram illustrating the position relationship between a CU and neighboring blocks, wherein (a) is a reference frame and (b) is a current frame;
FIG. 2 is an overall flow chart of the present invention.
Detailed Description
For the convenience of public understanding, the following describes the technical solution of the present invention in detail based on the reference software JEM of the new generation video coding by way of example with reference to fig. 1 and 2.
In order to reduce the coding time and improve the working efficiency, the invention specifically adopts the technical scheme that: the method comprises the steps of obtaining CU information of a specific position with better correlation, firstly carrying out prediction coding of an optimal mode obtained by decision tree prediction, obtaining some information after current CU coding in real time, and finely adjusting the number and the sequence of inter-coding modes by utilizing the correlation of time domain information and space domain information and combining with the correlation information of peripheral CUs.
A decision tree-based inter-frame fast mode selection method comprises the following steps:
step 1: constructing a current Coding Unit (CU) optimal prediction mode classifier;
randomly selecting four video test sequences from international standard test sequences, and acquiring a left adjacent block CU of a current coding unit CU from 100 frames of coding information of the selected four test sequencesLeftUpper neighboring block CUAboveAnd co-located block CUColThe related information of (2);
with CULeft、CUAbove、CUColBest mode of (1), CUColMV, CUColThe average pixel of the current coding unit CU is used as input data, the optimal prediction mode of the current coding unit CU is used as output data, 10-fold cross validation is selected, the J48 decision tree in weka is trained, and the optimal prediction mode classifier of the current coding unit CU based on the decision tree is obtained;
step 2: acquiring an optimal prediction mode estimated value mode (P) of a current coding unit CU in a coding process;
extracting CU of current coding unit in coding processLeft、CUAbove、CUColBest mode of (1), CUColMV, CUColInputting the residual error, the coding QP value and the average pixel of the current coding unit CU into the current coding unit CU best mode classifier constructed in the step 1, and acquiring the best prediction mode pre-estimated value mode (P) of the current coding unit CU in the coding process;
and step 3: obtaining a left neighbor block CULeftUpper neighboring block CUAboveAnd co-located block CUColBest prediction mode ofjAnd distortion D in the corresponding best prediction modejAnd rate distortion cost RDjIf mode (P) and modejIf not, entering step 4, otherwise, sequentially predicting all inter-frame modes and entering step 9;
and 4, step 4: counting the number i of the same optimal prediction modes, wherein j represents Left, Above and Col;
such as: if modeLeftAnd modeAbove、modeColIf all the patterns are represented by Bilaterals, i is 3.
And 5: acquiring an optimal prediction mode candidate value of the current coding unit CU according to the value of i;
1) if i is 0, according to the distortion DjFrom small to large left neighboring block CULeftUpper neighboring block CUAboveAnd co-located block CUColArranging and arranging the arranged left adjacent block CULeftUpper neighboring block CUAboveAnd co-located block CUColThe corresponding best prediction modes are marked as a first best prediction mode candidate value mode (X), a second best prediction mode (Y) and a third best prediction mode (Z) in sequence;
2) if i is 2, the left neighboring block CU is divided into twoLeftUpper neighboring block CUAboveAnd co-located block CUColThe same mode in (a) is labeled as a first best prediction mode (x), and a different mode is labeled as a second best prediction mode (y);
3) if i is 3, the left neighboring block CU is divided intoLeftUpper neighboring block CUAboveAnd co-located block CUColIs marked as the first best mode (x);
wherein X, Y, Z is selected from Merge, Bilateral, Template, Inter2nx2 n.
Step 6: predicting an affinity Merge mode of the current coding unit CU, and marking the affinity Merge mode as the current best mode of the current coding unit CU*And simultaneously marking the rate distortion cost in the affinity Merge mode as the current optimal rate distortion cost RD*;
And 7: predicting mode (P) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*;
And 8: based on the optimal prediction mode prediction value mode (P) of the current coding unit CU, sequentially performing mode prediction on the optimal prediction mode candidate value of the current coding unit CU, and updating the current optimal prediction mode after each mode prediction*And the current best rate-distortion cost RD*;
And under various values of i, sequentially selecting the optimal prediction mode candidate value of the current coding unit CU to perform mode prediction based on the optimal prediction mode prediction value mode (P) of the current coding unit CU, thereby finishing the prediction of the inter-frame mode of the current coding unit CU.
A) If i is equal to 0, determining whether mode (p) is the same as mode (x), if so, proceeding to step 8.2, otherwise, proceeding to step 8.1;
step 8.1: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Determining whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColDistortion D ofjAnd a rate-distortion cost RDjAre all larger than the current coding unit CU in the current best prediction mode*Distortion D at the bottom and the best rate distortion cost RD*If yes, entering step 9, and if not, entering step 8.2;
step 8.2: judging whether the mode (P) and the mode (Y) are the same, if so, entering a step 8.4, and if not, entering a step 8.3;
step 8.3: predicting mode (Y) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Determining whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColDistortion D of at least two blocksjAnd a rate-distortion cost RDjAre all larger than the current coding unit CU in the current best prediction mode*If the distortion D and the rate distortion cost RD are met, the step 9 is carried out, and if the distortion D and the rate distortion cost RD are not met, the step 8.4 is carried out;
step 8.4: judging whether mode (P) is the same as mode (Z), if so, entering step 9, if not, predicting mode (Z) of the current coding unit CU, and updating the current optimal prediction mode*And the current best rate-distortion cost RD*Entering step 9;
B) if i is 2, determining whether mode (p) is the same as mode (x), if so, proceeding to step 8.6, otherwise, proceeding to step 8.5;
step 8.5: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Judging the current best prediction mode of the current coding unit CU*Whether mode (X) and whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColRate distortion cost RD of at least two blocksjIs larger than the current coding unit CU in the current best mode of the current coding unit CU*Lower rate-distortion cost RD*If the judgment result is true, the step 9 is entered, and if the judgment result is false, the step 8.6 is entered;
step 8.6: judging whether the mode (P) and the mode (Y) are the same, if so, entering a step 8.8, and if not, entering a step 8.7;
step 8.7: predicting mode (Y) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Entering a step 9;
step 8.8: judging the current best mode of the current coding unit CU*If the current mode is the mode (P), entering the step 9, if not, predicting the rest unexecuted modes and updating the current best prediction mode according to the rate distortion cost*And the current best rate-distortion cost RD*Entering step 9;
C) if i is 3, determining whether mode (p) is the same as mode (x), if so, proceeding to step 9, otherwise, proceeding to step 8.9;
step 8.9: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*Predicting the remaining unexecuted modes, and entering step 9;
the update of the current best prediction mode*And the current best rate-distortion cost RD*After the current coding unit is subjected to mode prediction, if the obtained rate distortion cost is less than RD*The mode of progress is taken as the current best prediction mode*Meanwhile, the obtained rate distortion cost is taken as the current optimal rate distortion cost RD*;
And step 9: the prediction of the inter mode is ended.
In order to verify the performance of the algorithm, the example uses two indexes of BDBR (Bjotegaard Delta Bit rate) and Delta T for evaluation. The BDBR is used for evaluating the influence of the algorithm on the video quality, and the larger the BDBR is, the larger the influence of the algorithm on the video quality is, namely the performance of the algorithm is poorer. The Δ T reflects the improvement of the encoder efficiency by the method of the present invention, and the calculation formula is as follows:
wherein, TorgRepresents the time used for encoding using the original encoder without any fast algorithm, Tnew represents the time required for encoding using the method of the present invention, and Δ T represents the percentage of efficiency improvement of the encoder using the method of the present invention.
Through experimental simulation, the experimental results of the invention are shown in table 1.
TABLE 1 results of the experiment
According to the experimental simulation results, as shown in table 1: the encoding time is reduced by 15.88% while the BDBR rise is only 0.83. The experimental result shows that the method greatly improves the coding efficiency on the premise of ensuring the subjective quality of the video, and achieves the aim of the invention.
Claims (3)
1. A decision tree-based inter-frame fast mode selection method is characterized by comprising the following steps:
step 1: constructing a current Coding Unit (CU) optimal prediction mode classifier;
randomly selecting four video test sequences from international standard test sequences, and acquiring a left adjacent block CU of a current coding unit CU from 100 frames of coding information of the selected four test sequencesLeftUpper neighboring block CUAboveAnd co-located block CUColThe related information of (2);
with CULeft、CUAbove、CUColBest mode of (1), CUColMV, CUColThe average pixel of the current coding unit CU is used as input data, the optimal prediction mode of the current coding unit CU is used as output data, 10-fold cross validation is selected, the J48 decision tree in weka is trained, and the optimal prediction mode classifier of the current coding unit CU based on the decision tree is obtained;
step 2: acquiring an optimal prediction mode estimated value mode (P) of a current coding unit CU in a coding process;
extracting CU of current coding unit in coding processLeft、CUAbove、CUColBest mode of (1), CUColMV, CUColInputting the residual error, the coding QP value and the average pixel of the current coding unit CU into the current coding unit CU best mode classifier constructed in the step 1, and acquiring the best prediction mode pre-estimated value mode (P) of the current coding unit CU in the coding process;
and step 3: obtaining a left neighbor block CULeftUpper neighboring block CUAboveAnd co-located block CUColBest prediction mode ofjAnd distortion D in the corresponding best prediction modejAnd rate distortion cost RDjIf mode (P) and modejIf not, entering step 4, otherwise, sequentially predicting all inter-frame modes and entering step 9;
and 4, step 4: counting the number i of the same optimal prediction modes, wherein j represents Left, Above and Col;
and 5: acquiring an optimal prediction mode candidate value of the current coding unit CU according to the value of i;
step 6: predicting an affinity Merge mode of the current coding unit CU, and marking the affinity Merge mode as the current best mode of the current coding unit CU*And simultaneously marking the rate distortion cost in the affinity Merge mode as the current optimal rate distortion cost RD*;
And 7: predicting mode (P) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*;
And 8: based on the optimal prediction mode prediction value mode (P) of the current coding unit CU, sequentially performing mode prediction on the optimal prediction mode candidate value of the current coding unit CU, and updating the current optimal prediction mode after each mode prediction*And the current best rate-distortion cost RD*;
Under the values of various i, sequentially selecting the optimal prediction mode candidate value of the current coding unit CU to perform mode prediction based on the optimal prediction mode prediction value mode (P) of the current coding unit CU, thereby finishing the prediction of the inter-frame mode of the current coding unit CU;
and step 9: the prediction of the inter mode is ended.
2. The method according to claim 1, wherein the best prediction mode candidate for the current Coding Unit (CU) is obtained as follows:
1) if i is 0, according to the distortion DjFrom small to large left neighboring block CULeftUpper neighboring block CUAboveAndco-located block CUColArranging and arranging the arranged left adjacent block CULeftUpper neighboring block CUAboveAnd co-located block CUColThe corresponding best prediction modes are marked as a first best prediction mode candidate value mode (X), a second best prediction mode (Y) and a third best prediction mode (Z) in sequence;
2) if i is 2, the left neighboring block CU is divided into twoLeftUpper neighboring block CUAboveAnd co-located block CUColThe same mode in (a) is labeled as a first best prediction mode (x), and a different mode is labeled as a second best prediction mode (y);
3) if i is 3, the left neighboring block CU is divided intoLeftUpper neighboring block CUAboveAnd co-located block CUColIs marked as the first best mode (x);
wherein X, Y, Z is selected from Merge, Bilateral, Template, Inter2nx2 n.
3. The method according to claim 2, wherein the specific process of step 8 is as follows:
A) if i is equal to 0, determining whether mode (p) is the same as mode (x), if so, proceeding to step 8.2, otherwise, proceeding to step 8.1;
step 8.1: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Determining whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColDistortion D ofjAnd a rate-distortion cost RDjAre all larger than the current coding unit CU in the current best prediction mode*Distortion D at the bottom and the best rate distortion cost RD*If yes, entering step 9, and if not, entering step 8.2;
step 8.2: judging whether the mode (P) and the mode (Y) are the same, if so, entering a step 8.4, and if not, entering a step 8.3;
step 8.3: predicting mode (Y) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Determining whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColDistortion D of at least two blocksjAnd a rate-distortion cost RDjAre all larger than the current coding unit CU in the current best prediction mode*If the distortion D and the rate distortion cost RD are met, the step 9 is carried out, and if the distortion D and the rate distortion cost RD are not met, the step 8.4 is carried out;
step 8.4: judging whether mode (P) is the same as mode (Z), if so, entering step 9, if not, predicting mode (Z) of the current coding unit CU, and updating the current optimal prediction mode*And the current best rate-distortion cost RD*Entering step 9;
B) if i is 2, determining whether mode (p) is the same as mode (x), if so, proceeding to step 8.6, otherwise, proceeding to step 8.5;
step 8.5: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Judging the current best prediction mode of the current coding unit CU*Whether mode (X) and whether left neighbor block CU is satisfiedLeftUpper neighboring block CUAboveAnd co-located block CUColRate distortion cost RD of at least two blocksjIs larger than the current coding unit CU in the current best mode of the current coding unit CU*Lower rate-distortion cost RD*If the judgment result is true, the step 9 is entered, and if the judgment result is false, the step 8.6 is entered;
step 8.6: judging whether the mode (P) and the mode (Y) are the same, if so, entering a step 8.8, and if not, entering a step 8.7;
step 8.7: predicting mode (Y) of current coding unit CU, and updating current optimal prediction mode*And the current best rate-distortion cost RD*(ii) a Entering a step 9;
step 8.8: judging the current best mode of the current coding unit CU*If the current mode is the mode (P), entering the step 9, if not, predicting the rest unexecuted modes and updating the current best prediction mode according to the rate distortion cost*And whenFront optimal rate distortion cost RD*Entering step 9;
C) if i is 3, determining whether mode (p) is the same as mode (x), if so, proceeding to step 9, otherwise, proceeding to step 8.9;
step 8.9: predicting the current coding unit CU in mode (X), and updating the current optimal prediction mode*And the current best rate-distortion cost RD*Predicting the remaining unexecuted modes, and entering step 9;
the update of the current best prediction mode*And the current best rate-distortion cost RD*After the current coding unit is subjected to mode prediction, if the obtained rate distortion cost is less than RD*The mode of progress is taken as the current best prediction mode*Meanwhile, the obtained rate distortion cost is taken as the current optimal rate distortion cost RD*;
And step 9: the prediction of the inter mode is ended.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810184642.XA CN108174204B (en) | 2018-03-06 | 2018-03-06 | Decision tree-based inter-frame rapid mode selection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810184642.XA CN108174204B (en) | 2018-03-06 | 2018-03-06 | Decision tree-based inter-frame rapid mode selection method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108174204A CN108174204A (en) | 2018-06-15 |
CN108174204B true CN108174204B (en) | 2020-01-03 |
Family
ID=62511846
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810184642.XA Active CN108174204B (en) | 2018-03-06 | 2018-03-06 | Decision tree-based inter-frame rapid mode selection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108174204B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109040764B (en) * | 2018-09-03 | 2021-09-28 | 重庆邮电大学 | HEVC screen content intra-frame rapid coding algorithm based on decision tree |
WO2020069651A1 (en) * | 2018-10-05 | 2020-04-09 | Huawei Technologies Co., Ltd. | A candidate mv construction method for affine merge mode |
CN109361920B (en) * | 2018-10-31 | 2021-09-28 | 南京大学 | Multi-scene-oriented inter-frame rapid prediction algorithm for adaptive decision tree selection |
EP4307678A2 (en) | 2018-11-06 | 2024-01-17 | Beijing Bytedance Network Technology Co., Ltd. | Side information signaling for inter prediction with geometric partitioning |
CN109729351B (en) * | 2018-12-18 | 2020-09-29 | 中南大学 | HEVC (high efficiency video coding) rapid mode selection method under low complexity configuration |
CN113170166B (en) * | 2018-12-30 | 2023-06-09 | 北京字节跳动网络技术有限公司 | Use of inter prediction with geometric partitioning in video processing |
CN112383776B (en) * | 2020-12-08 | 2022-05-03 | 重庆邮电大学 | Method and device for quickly selecting SHVC (scalable video coding) video coding mode |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9473778B2 (en) * | 2013-09-27 | 2016-10-18 | Apple Inc. | Skip thresholding in pipelined video encoders |
CN103888770B (en) * | 2014-03-17 | 2018-03-09 | 北京邮电大学 | A kind of video code conversion system efficiently and adaptively based on data mining |
CN105430396B (en) * | 2015-12-15 | 2019-04-19 | 浙江大学 | The method for video coding of decision coded block size by the way of classification |
CN105791826B (en) * | 2016-05-11 | 2019-03-08 | 南京大学 | A kind of HEVC interframe fast schema selection method based on data mining |
CN107147911B (en) * | 2017-07-05 | 2019-07-26 | 中南大学 | Quick interframe coding mode selection method and device based on local luminance compensation LIC |
CN107222742B (en) * | 2017-07-05 | 2019-07-26 | 中南大学 | Video coding Merge mode quick selecting method and device based on time-space domain correlation |
CN107396102B (en) * | 2017-08-30 | 2019-10-08 | 中南大学 | A kind of inter-frame mode fast selecting method and device based on Merge technological movement vector |
-
2018
- 2018-03-06 CN CN201810184642.XA patent/CN108174204B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108174204A (en) | 2018-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108174204B (en) | Decision tree-based inter-frame rapid mode selection method | |
CN108347616B (en) | Depth prediction method and device based on optional time domain motion vector prediction | |
CN103975587B (en) | Method and device for encoding/decoding of compensation offsets for a set of reconstructed samples of an image | |
CN104581163B (en) | Method and apparatus for encoding and decoding image by using large transformation unit | |
CN104883578B (en) | The method decoded to intra prediction mode | |
TWI514855B (en) | Method and apparatus for performing localized multihypothesis prediction during video coding of a coding unit | |
CN101394565B (en) | Intra-frame prediction method | |
CN100461867C (en) | Inage predicting encoding method in frame | |
KR101670532B1 (en) | Method for decoding a stream representative of a sequence of pictures, method for coding a sequence of pictures and coded data structure | |
KR20070005848A (en) | Method and apparatus for intra prediction mode decision | |
JP6789256B2 (en) | Image coding device, moving image coding method, moving image decoding device and moving image decoding method | |
TWI722842B (en) | Image prediction decoding method | |
JP2005130509A (en) | Intra-prediction method and apparatus | |
CN110365982B (en) | Multi-transformation selection accelerating method for intra-frame coding in multipurpose coding | |
CN108174208B (en) | Efficient video coding method based on feature classification | |
CN113794877B (en) | Decoding method, encoding method, device, equipment and machine readable storage medium | |
CN106993187A (en) | A kind of coding method of variable frame rate and device | |
JP4994877B2 (en) | Method and system for selecting a macroblock coding mode in a video frame sequence | |
CN110225339A (en) | A kind of HEVC video sequence coding/decoding accelerated method | |
JPWO2006100946A1 (en) | Image signal re-encoding device and image signal re-encoding method | |
CN105704494A (en) | Depth correlation-based inter-frame fast encoding method for coding screen content | |
TWI403175B (en) | Intra prediction mode optimization methods and image compression methods and devices | |
CN113873257B (en) | Method, device and equipment for constructing motion information candidate list | |
JP2005184241A (en) | System for determining moving picture interframe mode | |
CN109168000B (en) | HEVC intra-frame prediction rapid algorithm based on RC prediction |
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 |