HEVC inter-Frame predictive decoding (1)

Source: Internet
Author: User
HEVC inter-frame predictive decoding (1)
HEVC inter-frame predictive decoding (2) HEVC inter-frame predictive decoding (3) HEVC inter-frame predictive decoding (4) HEVC inter-frame predictive decoding (5)

1. Overview

The complexity of HEVC's inter-frame prediction process is outrageous.

I analyze from the decoding point of view in detail, because the details are very many, there are inevitably errors or omissions.


So, please read this series in conjunction with the standard, otherwise it is difficult to understand


The Inter-frame prediction (inter prediction) process provides the inter-frame predictive value (Predsamples[x][y]) for decoding, corresponding to the content in the standard 8.5.2.
In short, inter-frame prediction is the process of calculating the motion vector (mv,motion vector) of a PU based on the Prediction Block (pu,prediction unit) and obtaining the predicted value from the corresponding reference frame according to the MV.

Personally feel that the focus and difficulty of this process is two points: 1. Reference queue buffer (DPB) Maintenance 2.MV calculation.

The 1th one in the article HEVC reference queue decoding has been introduced in detail.

This paper mainly introduces the 2nd, MV calculation.2.PU RelatedThe PU (Prediction Unit) Prediction Unit is the basic unit for inter-frame prediction and motion compensation. The partitioning method has been introduced in the image Segmentation (2) of the article HEVC standard.     As the figure, the large box represents CU, a total of 8 in the block way. Figure 1 Pu Sub-block
The PU (Prediction Unit) Prediction Unit is the basic unit for inter-frame prediction and motion compensation. The parameters contained in each PU are:Merge_flag: 1 indicates that the current PU MVP calculation using the merge mode, 0 means that the merge mode is not used, the default is 0, when the CU containing Pu is skip mode, Merge_flag is 1.Merge_idx: Gives the index used by MVP from the merging MVP candidate List (merging candidate list, in this article, MCL) when in merge mode.INTER_PRED_IDC: The reference direction of Pu is given. 0 means pred_l0, forward prediction, 1 means pred_l1, back prediction, 2 means pred_bi, bidirectional prediction (except 4x8 and 8x4 Pu, which is explained later).ref_idx_l0: Indicates the reference frame in the current Pu in reflist0 (refer to queue 0, see HEVC Reference queue decoding).REF_IDX_L1: Indicates the reference frame in the current Pu in Reflist1 (refer to queue 1, see HEVC Reference queue decoding).Mvp_l0_flag: Indicates that the index used by the MVP is selected from the MVP candidate list (motion vector Predictor Candidate List 0) in non-merge mode.Mvp_l1_flag: Indicates that the index used by the MVP is selected from the MVP candidate list (motion vector predictor Candidate List 1) in non-merge mode.
In addition to the above parameters, our known conditions are: the current upper-left coordinate of the Cu (XCb, YCB), the current Pu's upper-left coordinate (xPb, yPb), the size of the CU ncbs,pu size (npbw X npbh), Pu partidx. The following sections are divided into merge mode and non-merge mode for MV calculation.
MV calculation in 3.Merge mode
3.1 Merge mode overall process
When the Pu merge_flag equals 1 o'clock, the MV is calculated using the merge mode. Pre-processing, when log2parmrglevel >2 and NCBs = = 8:

      (XPb, yPb) = (xCb, YCB)
      NPBW = npbh= NCbS
      partidx = 0



That is, PU where the size of the CTU is 8x8 and Log2parmrglevel >2, PU coordinates and dimensions are replaced with CU.
The parameter log2parmrglevel is located in pps, meaning that in the merge mode, the size of the inside of the block Pu can be parallel (parallel) to do the MV operation. For example Log2parmrglevel = 6, then the MV of the 64x64 pu in the merge mode can be calculated simultaneously. The specific why can be done in parallel, we will explain later. The MV calculation in merge mode is summed up in a nutshell: A list of MV candidate values is formed, and the MV is selected from the list according to Merge_idx.
Each of the candidate values in the list contains the following elements: AVAILABLEFLAG,REFIDXLX,PREDFLAGLX,MVLX (where x equals 0, 1, respectively, forward and backward) For example, time domain candidate values (commonly known as collocated) are included (Availableflagcol,refidxlxcol,predflaglxcol,mvlxcol)
The specific process for merge mode is as follows:
M1. Calculating spatial candidate values (spatial merging candidates)
M2. Set the time domain candidate value (temporal merging candidates) to Refidx, which is Refidxlxcol (x equals 0, or 1) to 0.
M3. Other elements that compute the time-domain candidate values of the forward reference.
M4. If the current slice is B, then the time domain candidate values for the back reference are computed once.
M5. Form MCL (merging candidate list)
M6. Set the variables Numcurrmergecand and Numorigmergecand to the number of candidates in the MCL.
M7. If the current slice is B, the combined bi-directional predictive reference value (combined bi-predictive merging candidates) is computed.
M8. Calculates the 0 motion vector reference value (zero motion vector merging candidates).
M9. Use Merge_idx to select Mcl[merge_idx from MCL]. MVLX,REFIDXLX, PREDFLAGLX equals the corresponding element of the reference value.
M10. If predFlagL0 equals 1,PREDFLAGL1 equals 1, and the size of the PU is 4x8 and 8x4, then refIdxL1 =−1,predflagl1 = 0. What do you mean? Only forward reference, the back reference was discarded. So 4x8 and 8x4 Pu is not possible bidirectional reference.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.