WO2020047807A1 - Inter prediction method and apparatus, and codec - Google Patents

Inter prediction method and apparatus, and codec Download PDF

Info

Publication number
WO2020047807A1
WO2020047807A1 PCT/CN2018/104430 CN2018104430W WO2020047807A1 WO 2020047807 A1 WO2020047807 A1 WO 2020047807A1 CN 2018104430 W CN2018104430 W CN 2018104430W WO 2020047807 A1 WO2020047807 A1 WO 2020047807A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion information
candidate motion
inter prediction
prediction mode
image block
Prior art date
Application number
PCT/CN2018/104430
Other languages
French (fr)
Chinese (zh)
Inventor
徐巍炜
赵寅
杨海涛
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2020047807A1 publication Critical patent/WO2020047807A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability

Definitions

  • the present application relates to the field of video image coding and decoding, and particularly to an inter prediction method, an inter prediction device, and a corresponding encoder and decoder.
  • Video compression technology such as MPEG-1 video, MPEG-2 video, ITU-T H.262 / MPEG-2, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (Advanced Video Coding, AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC) standards in progress
  • AVC Advanced Video Coding
  • HEVC High Efficiency Video Coding
  • VVC Versatile Video Coding
  • devices can efficiently transmit and receive digital video information.
  • images of a video sequence are divided into image blocks for encoding or decoding.
  • the inter prediction mode may include but is not limited to: skip / merge mode (skip / merge mode) and non-skip / merge mode (such as advanced motion vector prediction mode (AMVP mode)), etc., and both use multi-motion
  • the information contention method performs inter prediction.
  • a candidate motion information list (referred to as a candidate list) including multiple sets of motion information (also referred to as multiple candidate motion information) is introduced.
  • the encoder can select a suitable set from the candidate list
  • Candidate motion information to predict the motion information (such as a motion vector) of the current coded image block, and then obtain the best reference image block (that is, the prediction block) of the current coded image block.
  • a candidate list including multiple sets of motion information (also called block vectors) is sometimes introduced.
  • the embodiments of the present application provide an inter prediction method, an inter prediction device, and a corresponding video encoder and video decoder, so as to improve the inter prediction efficiency and thus the encoding and decoding performance.
  • an embodiment of the present application provides an inter prediction method, where the method includes:
  • the use of the historical candidate list to construct or update the candidate motion information list of the current image block includes: ordering from the tail to the head of the historical candidate list, checking the target historical candidate motion information and the candidate motion information list. Whether the existing candidate motion information is the same; if different, add the target historical candidate motion information to the candidate motion information list (for example, add the target historical candidate motion information to the tail of the candidate motion information list );
  • the target historical candidate motion information is: historical candidate motion information other than Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list (for example, skipping from the historical candidate list Q historical candidate motion information arranged in order from tail to head), where Q is a positive integer.
  • the Q1 historical candidate motion information arranged in order from the tail to the head in the historical candidate list may not be skipped, but the skipped order from the tail to the head is ranked in the aforementioned Q1
  • the current image block (referred to as the current block) can be understood as the current encoding image block (coding block); during the decoding process, the current image block (referred to as the current block) can be It is understood as the current decoding image block.
  • the candidate motion information in the candidate motion information list does not reach a preset number
  • the order from the tail to the head of the historical candidate list is checked for the target historical candidate motion information and the existing candidate in the candidate motion information list. Whether the movement information is the same;
  • the historical candidate list includes L historical candidate motion information (also referred to as historical candidates), and the historical candidate motion information is a previously coded or previously decoded image block (for example, a previously decoded CU).
  • Motion information L is a positive integer greater than 0,
  • Q is a positive integer (for example, 1,2,3,4,5) and 0 ⁇ Q ⁇ L. It should be understood that if the historical candidate list in the historical candidate list has reached the maximum allowable number, L can be understood as the length of the historical candidate list; otherwise, L can be understood as the number of historical candidates currently included in the historical candidate list. .
  • the historical candidate list may be slice-level, or the historical candidate list may be image-level, or the historical candidate list may be at the level of several CTUs (CTU lines)
  • the historical candidate list may be CTU-level; the historical candidate list may be accessed or updated in a first-in-first-out manner.
  • the historical candidate motion information is motion information of a previously decoded image block in a slice to which the current image block belongs; for another example, the historical candidate motion information is a previously decoded image in an image to which the current image block belongs.
  • the historical candidate list is generated and updated during the encoding or decoding process of the slice to which the current image block belongs; and for example, the historical candidate list is the encoding or decoding process for the image to which the current image block belongs. Generated and updated; and for example, the historical candidate list is generated and updated during the encoding or decoding process of a CTU group (eg, one or more CTUs) to which the current image block belongs;
  • a CTU group eg, one or more CTUs
  • the candidate motion information list is different from the historical candidate list; the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list (also known as Is the historical candidate list) is the current slice (slice) or current image or the current CTU level of one or more coding tree units. For example, during encoding or decoding of multiple image blocks in the same slice, this can be used. Constantly updated historical candidate list.
  • the candidate motion information list includes motion information of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or one or Motion information of multiple time-domain reference blocks (also referred to as time-domain candidates);
  • the candidate motion information list includes motion vectors of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or motion vectors of one or more time domain reference blocks of the current image block. (Also known as time domain candidate).
  • the spatial domain reference block herein may include one or more spatial domain neighboring blocks (also referred to as spatial domain neighboring positions) adjacent to the current image block in the image where the current image block is located.
  • a fourth spatial domain neighboring block A0 located on the lower left side of the current image block
  • a first spatial domain neighboring block A1 located on the left side of the current image block
  • a third spatial domain neighboring block B0 located on the upper right side of the current image block
  • the second spatial domain neighboring block B1 located on the upper side of the current image block, or the fifth spatial domain neighboring block B2 located on the upper left side of the current image block it should be understood that the spatial domain neighboring block here may be 4 * 4 pixels .
  • the time-domain reference block herein may include one or more spatial-domain reference blocks adjacent to a co-located block (co-located block) in the reference image, and / or, one or more of the co-located blocks or A plurality of sub-blocks, wherein the collocated block is an image block having the same size, shape, and coordinates in the reference image as the current image block, or the collocated block is a reference image having the same size and shape as the current image block Image blocks of the same size and shape with a specified position offset.
  • the reference image here refers to a reconstructed image. Specifically, the reference image here refers to a reference image in one or more reference image lists.
  • the time-domain reference block includes: a lower-right spatial-domain neighboring block H of a co-located block of the current image block, a co-located block, an upper-left middle block C0, and the parallel The lower right middle block C3 of the collocated block, the upper left block TL of the collocated block, or the lower right block BR of the collocated block.
  • the execution subject of the method in the embodiment of the present application may be an inter prediction device, for example, it may be a video encoder or a video decoder or an electronic device with a video codec function.
  • the An inter prediction unit, or an inter prediction unit (such as a motion compensation unit) in a video decoder may be an inter prediction device, for example, it may be a video encoder or a video decoder or an electronic device with a video codec function.
  • the An inter prediction unit, or an inter prediction unit (such as a motion compensation unit) in a video decoder may be a video encoder or a video decoder or an electronic device with a video codec function.
  • the historical candidate list is used to construct or During the process of updating the candidate motion information list of the current image block, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently decoded image block is skip / merge mode, the historical candidate list is used to construct the fusion.
  • the Q historical candidates arranged in order from the tail to the head are skipped; if the inter prediction mode of the currently decoded image block is the inter MVP mode, when the historical candidate list is used to construct the motion vector prediction candidate list, Skip the Q historical candidates in order from the tail to the head; compared to the use of the historical candidate list (assuming length L) in the prior art to construct a fusion motion information candidate list (assuming length K) and motion vector prediction candidate list (Assume length is J), you need L times K and L times J duplicate search, respectively.
  • the number of duplicate check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thus encoding and decoding. performance.
  • the target history candidate motion information is the history X-th historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the candidate list (for example, skipping the Q historical candidates arranged in order from the tail to the head in the historical candidate list Motion information), wherein the reference frame index corresponding to the Xth historical candidate motion information is the same as the target reference frame index.
  • inter MVP inter motion vector prediction
  • the method is used to decode a current image block, and the target reference frame index is a reference frame index of the current image block parsed from the code stream.
  • the reference frame index corresponding to some historical candidate MVs is different from the target reference frame index.
  • the reference frame index corresponding to some historical candidate MVs is the same as the target reference frame index. Only the same historical candidate MV involves the repetitive check with the candidate motion information in the candidate motion information list.
  • the embodiment of the present application can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number of.
  • whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
  • the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode
  • the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information. It should be understood that after the duplicate item check on the target historical candidate motion information and the current candidate motion information is completed, if the result of the duplicate item check indicates that the target historical candidate motion information is different from the current candidate motion information, then further checking the Whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode.
  • the first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode.
  • the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
  • inter MVP inter motion vector prediction
  • the candidate motion information list for example, fusion Motion information candidate list or motion vector prediction candidate list
  • the number of duplicate check operations reduces codec time, which helps to improve inter prediction efficiency and thus codec performance.
  • whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
  • the target historical candidate motion information is added to the candidate motion information list; it should be understood that That is, skip the duplicate check operation between the target historical candidate motion information and each of the existing candidate motion information in the candidate motion information list (for example, the motion information at the A1 position and the motion information at the B0 position), and directly describe the Target historical candidate motion information is added to the candidate motion information list;
  • the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode, check whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  • the first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode.
  • the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
  • inter MVP inter motion vector prediction
  • a candidate motion information list such as a fusion motion information candidate list or a motion vector prediction candidate list
  • Selectively skip the duplicate check process of some historical candidates which can further reduce the number of duplicate check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list, reducing the encoding and decoding time, thereby helping To improve the efficiency of inter-frame prediction, thereby improving the performance of encoding and decoding.
  • whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
  • the target historical candidate motion information is added to the candidate motion information list; it should be understood that That is, skip the duplicate check operation between the target historical candidate motion information and each of the existing candidate motion information in the candidate motion information list (for example, the motion information at the A1 position and the motion information at the B0 position), and directly describe the Target historical candidate motion information is added to the candidate motion information list;
  • the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first frame
  • inter prediction mode check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; it should be understood that the target historical candidate is skipped
  • the duplicate item checking operation between the motion information and the current candidate motion information directly proceeds to check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
  • the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first frame
  • the inter prediction mode it is checked whether the target historical candidate motion information is the same as the current candidate motion information. It should be understood that after the duplicate item check between the target historical candidate motion information and the current candidate motion information is completed, if the result of the duplicate item check indicates that the target historical candidate motion information is different from the current candidate motion information, a further check is performed. Whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode.
  • the first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode.
  • the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
  • inter MVP inter motion vector prediction
  • the historical candidate list is used to construct or update the candidate motion information list (Such as a fusion motion information candidate list or a motion vector prediction candidate list), selectively skip part of the historical candidate's duplicate entry checking process, which can further reduce the historical candidate list to join the fusion motion information candidate list or motion vector prediction candidate.
  • the number of duplicate entry checking operations in the list reduces codec time, which helps to improve inter prediction efficiency and thus codec performance.
  • whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
  • the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode
  • the target historical candidate motion information and the current candidate motion are skipped
  • the operation of checking duplicate items between information directly goes to check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode
  • At least one of the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  • the first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode.
  • the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
  • inter MVP inter motion vector prediction
  • the historical candidate list is used to construct or update the candidate motion information list (for example, In the process of merging motion information candidate list or motion vector prediction candidate list), the skip check process of some historical candidates can be selectively skipped, so that the historical candidate list can be further reduced to be added to the fused motion information candidate list or motion vector prediction candidate list.
  • the number of duplicate check operations is reduced, which reduces the encoding and decoding time, which helps to improve the efficiency of inter-frame prediction and improve the encoding and decoding performance.
  • the method is used to encode the current image block, and the performing inter prediction on the current image block based on the candidate motion information list includes:
  • Target candidate motion information from the candidate motion information list according to a rate distortion cost criterion.
  • the target candidate motion information encodes the current image block with the lowest rate distortion cost
  • the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information.
  • the motion information of the block is: determining that the target candidate motion information (for example, the best candidate motion information) is the motion information of the currently encoded image block;
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion
  • the information is a motion vector prediction value MVP of the current image block, and the predicting motion information of the current image block based on the target candidate motion information includes: based on the MVP and a motion vector of a current encoded image block obtained through motion estimation, Determining a motion vector difference MVD of the current image block.
  • the method is used to decode the current image block, and the performing inter prediction on the current image block based on the candidate motion information list includes:
  • Determine the target candidate motion information from the candidate motion information list for example, determine the target candidate motion information from the candidate motion information list according to an index identifier parsed from a code stream, where the index identifier is used to indicate the The target candidate motion information in the candidate motion information list; it should be understood that if the length of the candidate motion information list is one, the index identifier does not need to be parsed, and the only candidate motion information is determined as the target candidate motion information;
  • the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information.
  • the motion information of the block is that the target candidate motion information is used as the motion information of the current image block.
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion
  • the information is a motion vector prediction value MVP
  • the predicting the motion information of the current image block according to the target candidate motion information includes: based on the motion vector prediction value MVP and the current parsed from the code stream.
  • the motion vector residual value MVD of the image block determines the motion information of the current image block. For example, the sum of the motion vector prediction value and the motion vector prediction residual value is used as the motion vector of the current image block.
  • the method further includes:
  • a reconstructed image of the current image block is obtained. It should be understood that if the predicted image of the current image block is the same as the original image of the current image block, there is no residual image (that is, a residual value) of the current image block, which is obtained based on the inter prediction process. A predicted image (that is, a predicted pixel value) of the current image block to obtain a reconstructed image of the current image block.
  • the method further includes: updating the historical candidate list using motion information of a current image block.
  • the historical candidate list is continuously updated during the image encoding or decoding process, which helps to improve the inter prediction efficiency and thus the encoding and decoding performance.
  • the embodiments of the present application continuously update the historical candidate list during the image encoding or decoding process, by adding historical candidate motion information to the candidate motion information list of the current image block (such as the fused motion information candidate list or the motion vector prediction candidate list) ( history (candidate) method, increasing the number of candidate motion information (such as merged / skip fusion motion information candidates or inter-mode motion vector prediction candidates), improving prediction efficiency.
  • the candidate motion information list of the current image block such as the fused motion information candidate list or the motion vector prediction candidate list
  • history (candidate) method increasing the number of candidate motion information (such as merged / skip fusion motion information candidates or inter-mode motion vector prediction candidates), improving prediction efficiency.
  • the candidate motion information list is a merged motion information candidate list merge candidate list
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list).
  • inter MVP inter motion vector prediction
  • AMVP candidate list motion vector prediction candidate list
  • the embodiments of the present application are not only applicable to the merge / skip mode and / or advanced motion vector prediction mode (AMVP), but also applicable to the use of spatial reference blocks and / Or other modes of predicting the motion information of the current image block by the motion information of the time-domain reference block, thereby improving codec performance.
  • AMVP advanced motion vector prediction mode
  • an embodiment of the present application provides an inter prediction method, where the method includes:
  • using the historical candidate list to construct or update the candidate motion information list of the current image block includes:
  • M is an integer greater than or equal to 0.
  • the current image block (referred to as the current block) can be understood as the current encoding image block (coding block); during the decoding process, the current image block (referred to as the current block) can be It is understood as the current decoding image block.
  • the historical candidate list may be slice-level, or the historical candidate list may be image-level, or the historical candidate list may be at the level of several CTUs (CTU lines)
  • the historical candidate list may be CTU-level; the historical candidate list may be accessed or updated in a first-in-first-out manner.
  • the historical candidate motion information is motion information of a previously decoded image block in a slice to which the current image block belongs; for another example, the historical candidate motion information is a previously decoded image in an image to which the current image block belongs.
  • the historical candidate list is generated and updated during the encoding or decoding process of the slice to which the current image block belongs; and for example, the historical candidate list is the encoding or decoding process for the image to which the current image block belongs. Generated and updated; and for example, the historical candidate list is generated and updated during the encoding or decoding process of a CTU group (eg, one or more CTUs) to which the current image block belongs;
  • a CTU group eg, one or more CTUs
  • the candidate motion information list is different from the historical candidate list; the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list (also known as Is the historical candidate list) is the current slice (slice) or current image or the current CTU level of one or more coding tree units. For example, during encoding or decoding of multiple image blocks in the same slice, this can be used. Constantly updated historical candidate list.
  • the candidate motion information list includes motion information of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or one or Motion information of multiple time-domain reference blocks (also referred to as time-domain candidates);
  • the candidate motion information list includes motion vectors of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or motion vectors of one or more time domain reference blocks of the current image block. (Also known as time domain candidate).
  • the spatial domain reference block herein may include one or more adjacent spatial domain blocks in the image where the current image block is located, which are adjacent to the current image block.
  • the second spatial domain neighboring block B1 located on the upper side of the current image block, or the fifth spatial domain neighboring block B2 located on the upper left side of the current image block it should be understood that the spatial domain neighboring block here may be 4 * 4 pixels .
  • the time-domain reference block herein may include one or more spatial-domain reference blocks adjacent to a co-located block (co-located block) in the reference image, and / or, one or more of the co-located blocks or A plurality of sub-blocks, wherein the collocated block is an image block having the same size, shape, and coordinates in the reference image as the current image block, or the collocated block is a reference image having the same size and shape as the current image block Image blocks of the same size and shape with a specified position offset.
  • the reference image here refers to a reconstructed image. Specifically, the reference image here refers to a reference image in one or more reference image lists.
  • the time-domain reference block includes: a lower-right spatial-domain neighboring block H of a co-located block of the current image block, a co-located block, an upper-left middle block C0, and the parallel The lower right middle block C3 of the collocated block, the upper left block TL of the collocated block, or the lower right block BR of the collocated block.
  • the execution subject of the method in the embodiment of the present application may be an inter prediction device, for example, it may be a video encoder or a video decoder or an electronic device with a video codec function.
  • the An inter prediction unit, or an inter prediction unit (such as a motion compensation unit) in a video decoder may be an inter prediction device, for example, it may be a video encoder or a video decoder or an electronic device with a video codec function.
  • the An inter prediction unit, or an inter prediction unit (such as a motion compensation unit) in a video decoder may be a video encoder or a video decoder or an electronic device with a video codec function.
  • the historical candidate list is used to construct or update the fused motion information candidate list according to the inter prediction mode of the image block where the historical candidate, the fused motion information candidate and the motion information prediction candidate are located.
  • the duplicate item check process of some historical candidates can be selectively skipped, which can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number, reducing codec time, which helps to improve the efficiency of inter-frame prediction, thereby improving codec performance.
  • the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
  • the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode
  • the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  • the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
  • the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
  • the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of the inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; it should be understood that if the candidate motion The number of existing candidate motion information in the information list is M1, then M ⁇ M1, because at least the repeatability check of the current historical candidate motion information HMVP and the current candidate motion information in the candidate motion information list is skipped;
  • the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the current candidate motion information.
  • the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
  • the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode
  • the number of motion information is M1, then M ⁇ M1, because at least the repeatability check of the current historical candidate motion information HMVP and the current candidate motion information in the candidate motion information list is skipped;
  • At least one of the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  • the method is used to encode the current image block, and performing inter prediction on the current image block based on the candidate motion information list includes:
  • Target candidate motion information from the candidate motion information list according to a rate distortion cost criterion.
  • the target candidate motion information encodes the current image block with the lowest rate distortion cost
  • the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information.
  • the motion information of the block is: determining that the target candidate motion information (for example, the best candidate motion information) is the motion information of the currently encoded image block;
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion
  • the information is the motion vector prediction value MVP of the current image block, and the prediction of the motion information of the current image block based on the target candidate motion information includes: based on the MVP and the current encoded image block obtained through motion estimation (Motion Estimation) And determine the motion vector difference MVD of the current image block.
  • the method is used to decode the current image block, and the performing inter prediction on the current image block based on the candidate motion information list includes:
  • Determine the target candidate motion information from the candidate motion information list for example, determine the target candidate motion information from the candidate motion information list according to an index identifier parsed from a code stream, where the index identifier is used to indicate the The target candidate motion information in the candidate motion information list; it should be understood that if the length of the candidate motion information list is one, the index identifier does not need to be parsed, and the only candidate motion information is determined as the target candidate motion information;
  • the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information.
  • the motion information of the block is that the target candidate motion information is used as the motion information of the current image block.
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion
  • the information is a motion vector prediction value MVP
  • the predicting the motion information of the current image block according to the target candidate motion information includes: based on the motion vector prediction value MVP and the current parsed from the code stream.
  • the motion vector residual value MVD of the image block determines the motion information of the current image block. For example, the sum of the motion vector prediction value and the motion vector prediction residual value is used as the motion vector of the current image block.
  • the method further includes:
  • a reconstructed image of the current image block is obtained. It should be understood that if the predicted image of the current image block is the same as the original image of the current image block, there is no residual image (that is, a residual value) of the current image block, which is obtained based on the inter prediction process. A predicted image (that is, a predicted pixel value) of the current image block to obtain a reconstructed image of the current image block.
  • the method is used to encode a current image block, and an inter prediction mode of the current image block is a merge merge mode or a skip skip mode, and the method further includes:
  • the inter prediction mode of the current image block is an inter MVP mode, and the method further includes:
  • An index number, a reference frame index, and the motion vector difference MVD corresponding to the target candidate motion information (that is, the target candidate motion vector prediction value MVP) are coded into a code stream.
  • the method further includes: updating the historical candidate list using motion information of a current image block.
  • the historical candidate list is continuously updated during the image encoding or decoding process, which helps to improve the inter prediction efficiency and thus the encoding and decoding performance.
  • the embodiments of the present application continuously update the historical candidate list during the image encoding or decoding process, by adding historical candidate motion information to the candidate motion information list of the current image block (such as the fused motion information candidate list or the motion vector prediction candidate list) ( history (candidate) method, increasing the number of candidate motion information (such as merged / skip fusion motion information candidates or inter-mode motion vector prediction candidates), improving prediction efficiency.
  • the candidate motion information list of the current image block such as the fused motion information candidate list or the motion vector prediction candidate list
  • history (candidate) method increasing the number of candidate motion information (such as merged / skip fusion motion information candidates or inter-mode motion vector prediction candidates), improving prediction efficiency.
  • the candidate motion information list is a merged motion information candidate list
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list).
  • inter MVP inter motion vector prediction
  • AMVP candidate list motion vector prediction candidate list
  • the embodiments of the present application are not only applicable to the merge / skip mode and / or advanced motion vector prediction mode (AMVP), but also applicable to the use of spatial reference blocks and / Or other modes of predicting the motion information of the current image block by the motion information of the time-domain reference block, thereby improving codec performance.
  • AMVP advanced motion vector prediction mode
  • an embodiment of the present application provides an inter prediction apparatus, including several functional units for implementing any one of the methods in the first aspect.
  • the inter prediction device may include:
  • the candidate motion information list determination unit is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes:
  • the order from the tail to the head of the historical candidate list is to check whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, add the target historical candidate motion information to the candidate In the motion information list;
  • the target historical candidate motion information is: historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, where Q is a positive integer;
  • An inter prediction processing unit is configured to perform inter prediction on the current image block based on the candidate motion information list.
  • an embodiment of the present application provides an inter prediction apparatus, including several functional units for implementing any one of the methods in the second aspect.
  • the inter prediction device may include:
  • the candidate motion information list determining unit is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or the inter prediction mode of the image block where the existing candidate motion information candidate in the candidate motion information list is located determines whether to perform repetition And check whether the current historical candidate motion information HMVP is added to the candidate motion information list according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list. , Where M is an integer greater than or equal to 0;
  • An inter prediction processing unit is configured to perform inter prediction on the current image block based on the candidate motion information list.
  • an embodiment of the present application provides a video encoder for encoding an image block, including: the inter prediction device according to the third aspect or the fourth aspect, wherein the inter prediction device For predicting motion information of a current encoded image block based on target candidate motion information, and determining a predicted pixel value of the current encoded image block based on the motion information of the current encoded image block;
  • An entropy encoding module configured to encode an index identifier of the target candidate motion information into a code stream, where the index identifier indicates the target candidate motion information for the currently encoded image block;
  • a reconstruction module configured to reconstruct the image block based on the predicted pixel value.
  • an embodiment of the present application provides a video decoder, which is used to decode an image block from a code stream, and includes:
  • An entropy decoding module configured to decode an index identifier from a code stream, where the index identifier is used to indicate target candidate motion information of a currently decoded image block;
  • the inter prediction device is configured to predict motion information of a currently decoded image block based on the target candidate motion information indicated by the index identifier, and based on the current decoded image The motion information of the block determines a predicted pixel value of the current decoded image block;
  • a reconstruction module configured to reconstruct the image block based on the predicted pixel value.
  • an embodiment of the present application provides a video decoding device, where the device includes:
  • a memory configured to store video data in the form of a bitstream, where the video data includes one or more image blocks;
  • a video decoder for constructing or updating a candidate motion information list of a current image block using a historical candidate list; performing inter prediction on the current image block based on the candidate motion information list; wherein the constructing using the historical candidate list Or updating the candidate motion information list of the current image block, including: from the tail to the head of the historical candidate list, checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list; if If different, the target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: Q historical candidate motions arranged in order from tail to head in the historical candidate list Historical candidate motion information other than information, Q is a positive integer.
  • an embodiment of the present application provides a video decoding device, where the device includes:
  • a memory configured to store video data in the form of a bitstream, where the video data includes one or more image blocks;
  • the inter prediction mode of the image block where the motion information candidate is located determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add current historical candidate motion information HMVP to the candidate motion information list, where M is an integer greater than or equal to 0.
  • a ninth aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, causes the computer to execute the foregoing or the second aspect. method.
  • a tenth aspect of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method described in the first aspect or the second aspect above.
  • An eleventh aspect of the present application provides an electronic device, including the video encoder according to the fifth aspect, or the video decoder according to the sixth aspect, or the interframe according to the third or fourth aspect. Forecasting device.
  • a twelfth aspect of the present application provides an encoding device including: a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to execute the first aspect or the second aspect Aspects of any or all of the steps of a method.
  • a thirteenth aspect of the present application provides a decoding device, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to execute the first aspect or the second aspect Aspects of any or all of the steps of a method.
  • FIG. 1 is a schematic block diagram of a video encoding and decoding system according to an embodiment of the present application
  • FIG. 2 is a schematic block diagram of a video encoder according to an embodiment of the present application.
  • FIG. 3 is a schematic block diagram of a video decoder according to an embodiment of the present application.
  • 4A is an exemplary flowchart of an encoding method performed by a video encoder in a merge mode according to an embodiment of the present application
  • 4B is an exemplary flowchart of an encoding method performed by a video encoder in an advanced motion vector prediction mode according to an embodiment of the present application
  • FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application
  • FIG. 6 is an exemplary schematic diagram of a current image block and a spatial domain reference block and a time domain reference block associated therewith in an embodiment of the present application;
  • FIG. 7 is a flowchart of an image encoding method according to an embodiment of the present application.
  • FIG. 8 is a flowchart of an image decoding method according to an embodiment of the present application.
  • FIG. 9 is an exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application.
  • FIG. 10 is another exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application.
  • 11A is an exemplary schematic diagram of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application
  • FIG. 11B is an exemplary schematic diagram of three historical candidates arranged in order from the tail to the head in the skip history candidate list in the embodiment of the present application;
  • FIG. 11B is an exemplary schematic diagram of three historical candidates arranged in order from the tail to the head in the skip history candidate list in the embodiment of the present application;
  • FIG. 11C is a schematic flowchart of another exemplary process of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of an inter prediction apparatus according to an embodiment of the present application.
  • FIG. 13 is a schematic block diagram of another inter prediction apparatus according to an embodiment of the present application.
  • FIG. 14 is a schematic block diagram of another encoding device or decoding device according to an embodiment of the present application.
  • Intra-prediction coding A coding method that uses surrounding pixel values to predict the current pixel value and then encodes the prediction error.
  • Coded picture A coded representation of a picture that contains all the coding tree units of the picture.
  • Motion vector A two-dimensional vector used for inter prediction, which provides an offset from coordinates in a decoded picture to coordinates in a reference picture.
  • Prediction block A rectangular M ⁇ N sample block on which the same prediction is applied.
  • Prediction process Use the predicted value to provide an estimate of the data element (eg, sample value or motion vector) that is currently being decoded.
  • data element eg, sample value or motion vector
  • Predicted value A specified value or a combination of previously decoded data elements (for example, sample values or motion vectors) used during subsequent data element decoding.
  • Reference frame A picture or frame used as a short-term reference picture or a long-term reference picture.
  • the reference frame contains samples that can be used in the decoding order for inter prediction in the decoding process of subsequent pictures.
  • Inter prediction According to the pixels in the reference frame of the current block, the position of the pixels used for prediction in the reference frame is indicated by the motion vector to generate a predicted image of the current block.
  • Bidirectional prediction (B) slice A slice that can be decoded using intra prediction or inter prediction to predict the sample value of each block with up to two motion vectors and reference indexes.
  • CTU coding tree unit (coding tree unit).
  • An image is composed of multiple CTUs.
  • a CTU usually corresponds to a square image area, which contains the luma pixels and chroma pixels in this image area (or it can only include luma pixels). (Or may also include only chroma pixels); the CTU also contains syntax elements, which indicate how to divide the CTU into at least one coding unit (coding unit, CU), and a method of decoding each coding unit to obtain a reconstructed image.
  • a coding unit corresponding to an A ⁇ B rectangular area in the image, including A ⁇ B brightness pixels or / and its corresponding chroma pixels, A is the width of the rectangle, B is the height of the rectangle, and A and B can be the same It can also be different.
  • the values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, and 4.
  • a coding unit includes a predicted image and a residual image, and the predicted image and the residual image are added to obtain a reconstructed image of the coding unit.
  • the predicted image is generated by intra prediction or inter prediction, and the residual image is generated by inverse quantization and inverse transform processing of the transform coefficients.
  • VTM New codec reference software developed by the JVET organization.
  • the transmitted motion information includes: inter prediction direction (forward, backward, or bidirectional), reference frame index, motion vector prediction value index, and motion vector residual value.
  • inter prediction direction forward, backward, or bidirectional
  • reference frame index reference frame index
  • motion vector prediction value index motion vector residual value.
  • MVP motion vector prediction value index
  • motion vector residual value motion vector residual value between the MVP and the actual motion vector (motion vector). difference, MVD) to the decoder.
  • the motion vector prediction may include multiple prediction values.
  • the motion vector prediction candidate list (mvp candidate list) is constructed at the encoding end and the decoding end, and the motion vector prediction index (MVP index) is passed. To the decoder.
  • the merged motion information candidate list is constructed in the same way at the encoder and decoder, and the merge index is passed to the decoder.
  • the decoder can select the corresponding fusion candidate from the merge candidate list according to the merge index, and use the motion information of the fusion candidate as the motion information of the current block, or scale the motion information of the fusion candidate as the motion information of the fusion candidate.
  • Motion information of the current block is usually obtained from its spatial-domain neighboring blocks or the time-domain blocks in the reference frame.
  • the candidate motion information obtained from the motion information of the image blocks adjacent to the current block is called Is a spatial candidate, and the motion information of the corresponding position image block obtained from the current image in the reference image is called a temporal candidate.
  • FIG. 1 is a schematic block diagram of a video encoding and decoding system 10 according to an embodiment of the present application.
  • the system 10 includes a source device 12 that generates encoded video data to be decoded by the destination device 14 at a later time.
  • Source device 12 and destination device 14 may include any of a wide range of devices, including desktop computers, notebook computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” "Touchpads, TVs, cameras, displays, digital media players, video game consoles, video streaming devices, or the like.
  • the source device 12 and the destination device 14 may be equipped for wireless communication.
  • the destination device 14 may receive the encoded video data to be decoded via the link 16.
  • the link 16 may include any type of media or device capable of moving the encoded video data from the source device 12 to the destination device 14.
  • the link 16 may include a communication medium that enables the source device 12 to directly transmit the encoded video data to the destination device 14 in real time.
  • the encoded video data may be modulated according to a communication standard (eg, a wireless communication protocol) and transmitted to the destination device 14.
  • Communication media may include any wireless or wired communication media, such as the radio frequency spectrum or one or more physical transmission lines. Communication media may form part of a packet-based network, such as a global network of a local area network, a wide area network, or the Internet.
  • the communication medium may include a router, a switch, a base station, or any other equipment that may be used to facilitate communication from the source device 12 to the destination device 14.
  • the encoded data may be output from the output interface 22 to the storage device 24.
  • the encoded data can be accessed from the storage device 24 by an input interface.
  • the storage device 24 may include any of a variety of distributed or locally-accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory Or any other suitable digital storage medium for storing encoded video data.
  • the storage device 24 may correspond to a file server or another intermediate storage device that may hold the encoded video produced by the source device 12.
  • the destination device 14 may access the stored video data from the storage device 24 via streaming or download.
  • the file server may be any type of server capable of storing encoded video data and transmitting this encoded video data to the destination device 14.
  • the file server includes a web server, a file transfer protocol server, a network attached storage device, or a local disk drive.
  • the destination device 14 may access the encoded video data via any standard data connection including an Internet connection.
  • This data connection may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server.
  • the transmission of the encoded video data from the storage device 24 may be a streaming transmission, a download transmission, or a combination of the two.
  • the techniques of this application are not necessarily limited to wireless applications or settings.
  • the technology can be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding digital video for use in Digital video or other applications stored on a data storage medium and decoded on the data storage medium.
  • the system 10 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
  • the source device 12 includes a video source 18, a video encoder 20, and an output interface 22.
  • the output interface 22 may include a modulator / demodulator (modem) and / or a transmitter.
  • the video source 18 may include a source such as a video capture device (e.g., a video camera), a video archive containing previously captured video, a video feed interface to receive video from a video content provider , And / or a computer graphics system for generating computer graphics data as a source video, or a combination of these sources.
  • a video capture device e.g., a video camera
  • the source device 12 and the destination device 14 may form a so-called camera phone or video phone.
  • the techniques described in this application may be exemplarily applicable to video decoding, and may be applicable to wireless and / or wired applications.
  • Captured, pre-captured, or computer-generated video may be encoded by video encoder 20.
  • the encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12.
  • the encoded video data may also be (or alternatively) stored on the storage device 24 for later access by the destination device 14 or other device for decoding and / or playback.
  • the destination device 14 includes an input interface 28, a video decoder 30, and a display device 32.
  • the input interface 28 may include a receiver and / or a modem.
  • the input interface 28 of the destination device 14 receives the encoded video data via the link 16.
  • the encoded video data communicated or provided on the storage device 24 via the link 16 may include various syntax elements generated by the video encoder 20 for use by the video decoder 30 of the video decoder 30 to decode the video data. These syntax elements may be included with the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.
  • the display device 32 may be integrated with or external to the destination device 14.
  • the destination device 14 may include an integrated display device and also be configured to interface with an external display device.
  • the destination device 14 may be a display device.
  • the display device 32 displays the decoded video data to a user, and may include any of a variety of display devices, such as a liquid crystal display, a plasma display, an organic light emitting diode display, or another type of display device.
  • Video encoder 20 and video decoder 30 may operate according to, for example, the next-generation video codec compression standard (H.266) currently under development and may conform to the H.266 test model (JEM).
  • the video encoder 20 and the video decoder 30 may be based on, for example, the ITU-TH.265 standard, also referred to as a high-efficiency video decoding standard, or other proprietary or industrial standards of the ITU-TH.264 standard or extensions of these standards
  • the ITU-TH.264 standard is alternatively referred to as MPEG-4 Part 10, also known as advanced video coding (AVC).
  • AVC advanced video coding
  • the techniques of this application are not limited to any particular decoding standard.
  • Other possible implementations of the video compression standard include MPEG-2 and ITU-TH.263.
  • video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder, and may include an appropriate multiplexer-demultiplexer (MUX-DEMUX) unit or other hardware and software to handle encoding of both audio and video in a common or separate data stream.
  • MUX-DEMUX multiplexer-demultiplexer
  • the MUX-DEMUX unit may conform to the ITUH.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
  • UDP User Datagram Protocol
  • Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, software, hardware, firmware, or any combination thereof.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGA Field Programmable Gate Array
  • the device may store the software's instructions in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this application.
  • Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and any of them may be integrated as a combined encoder / decoder (CODEC) in a corresponding device. part.
  • CDEC combined encoder / decoder
  • the present application may, by way of example, relate to video encoder 20 "signaling" certain information to another device, such as video decoder 30. It should be understood, however, that video encoder 20 may signal information by associating specific syntax elements with various encoded portions of video data. That is, video encoder 20 may "signal" the data by storing specific syntax elements to the header information of various encoded portions of the video data. In some applications, these syntax elements may be encoded and stored (eg, stored to storage system 34 or file server 36) before being received and decoded by video decoder 30.
  • the term “signaling” may exemplarily refer to the transmission of syntax or other data used to decode compressed video data, regardless of whether this transmission occurs in real-time or near real-time or within a time span, such as may be encoded Occurs when the syntax element is stored to the media, which can then be retrieved by the decoding device at any time after being stored on this media.
  • H.265 HEVC
  • HM HEVC test model
  • the latest standard document of H.265 can be obtained from http://www.itu.int/rec/T-REC-H.265.
  • the latest version of the standard document is H.265 (12/16).
  • the standard document is in full text.
  • the citation is incorporated herein.
  • HM assumes that video decoding devices have several additional capabilities over existing algorithms of ITU-TH.264 / AVC. For example, H.264 provides 9 intra-prediction encoding modes, while HM provides up to 35 intra-prediction encoding modes.
  • H.266 test model The evolution model of the video decoding device.
  • the algorithm description of H.266 can be obtained from http://phenix.int-evry.fr/jvet. The latest algorithm description is included in JVET-F1001-v2.
  • the algorithm description document is incorporated herein by reference in its entirety.
  • the reference software for the JEM test model can be obtained from https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/, which is also incorporated herein by reference in its entirety.
  • HM can divide a video frame or image into a sequence of tree blocks or maximum coding units (LCUs) containing both luminance and chrominance samples.
  • LCUs are also known as CTUs.
  • the tree block has a similar purpose as the macro block of the H.264 standard.
  • a slice contains several consecutive tree blocks in decoding order.
  • a video frame or image can be split into one or more slices.
  • Each tree block can be split into coding units according to a quadtree. For example, a tree block that is a root node of a quad tree may be split into four child nodes, and each child node may be a parent node and split into another four child nodes.
  • the final indivisible child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded video blocks.
  • decoding nodes such as decoded video blocks.
  • the syntax data associated with the decoded codestream can define the maximum number of times a tree block can be split, and can also define the minimum size of a decoding node.
  • the coding unit includes a decoding node and a prediction unit (PU) and a transformation unit (TU) associated with the decoding node.
  • the size of the CU corresponds to the size of the decoding node and the shape must be square.
  • the size of the CU can range from 8 ⁇ 8 pixels to a maximum 64 ⁇ 64 pixels or larger tree block size.
  • Each CU may contain one or more PUs and one or more TUs.
  • the syntax data associated with a CU may describe a case where a CU is partitioned into one or more PUs.
  • the division mode may be different between cases where the CU is skipped or coded by direct mode, intra prediction mode, or inter prediction mode.
  • the PU can be divided into non-square shapes.
  • the syntax data associated with a CU may also describe a case where a CU is partitioned into one or more TUs according to a quadtree.
  • the shape of the TU can be square or non-square.
  • the HEVC standard allows transformation based on the TU, which can be different for different CUs.
  • the TU is usually sized based on the size of the PUs within a given CU defined for the partitioned LCU, but this may not always be the case.
  • the size of the TU is usually the same as or smaller than the PU.
  • a quad-tree structure called “residual quad tree” (RQT) can be used to subdivide the residual samples corresponding to the CU into smaller units.
  • the leaf node of RQT may be called TU.
  • the pixel difference values associated with the TU may be transformed to produce a transformation coefficient, which may be quantized.
  • the PU contains data related to the prediction process.
  • the PU may include data describing the intra-prediction mode of the PU.
  • the PU may include data defining a motion vector of the PU.
  • the data defining the motion vector of the PU may describe the horizontal component of the motion vector, the vertical component of the motion vector, the resolution of the motion vector (e.g., quarter-pixel accuracy or eighth-pixel accuracy), motion vector The reference image pointed to, and / or the reference image list of the motion vector (eg, list 0, list 1 or list C).
  • TU uses transform and quantization processes.
  • a given CU with one or more PUs may also contain one or more TUs.
  • video encoder 20 may calculate a residual value corresponding to the PU. Residual values include pixel differences, which can be transformed into transform coefficients, quantized, and scanned using TU to generate serialized transform coefficients for entropy decoding.
  • This application generally uses the term "video block" to refer to the decoding node of a CU.
  • the term “video block” may also be used in this application to refer to a tree block including a decoding node and a PU and a TU, such as an LCU or a CU.
  • a video sequence usually contains a series of video frames or images.
  • a group of pictures exemplarily includes a series, one or more video pictures.
  • the GOP may include syntax data in the header information of the GOP, the header information of one or more of the pictures, or elsewhere, and the syntax data describes the number of pictures included in the GOP.
  • Each slice of the image may contain slice syntax data describing the coding mode of the corresponding image.
  • Video encoder 20 typically operates on video blocks within individual video slices to encode video data.
  • a video block may correspond to a decoding node within a CU.
  • Video blocks may have fixed or varying sizes, and may differ in size according to a specified decoding standard.
  • HM supports prediction of various PU sizes. Assuming that the size of a specific CU is 2N ⁇ 2N, HM supports intra prediction of PU sizes of 2N ⁇ 2N or N ⁇ N, and symmetric PU sizes of 2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N, or N ⁇ N between frames. prediction. HM also supports asymmetric partitioning of PU-sized inter predictions of 2N ⁇ nU, 2N ⁇ nD, nL ⁇ 2N, and nR ⁇ 2N. In asymmetric partitioning, one direction of the CU is not partitioned, and the other direction is partitioned into 25% and 75%.
  • 2N ⁇ nU refers to a horizontally-divided 2N ⁇ 2NCU, where 2N ⁇ 0.5NPU is at the top and 2N ⁇ 1.5NPU is at the bottom.
  • N ⁇ N and “N times N” are used interchangeably to refer to the pixel size of a video block according to vertical and horizontal dimensions, for example, 16 ⁇ 16 pixels or 16 ⁇ 16 pixels.
  • an N ⁇ N block has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value.
  • Pixels in a block can be arranged in rows and columns.
  • the block does not necessarily need to have the same number of pixels in the horizontal direction as in the vertical direction.
  • a block may include N ⁇ M pixels, where M is not necessarily equal to N.
  • the video encoder 20 may calculate the residual data of the TU of the CU.
  • a PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may include transforming (e.g., discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after being applied to the residual video data.
  • the residual data may correspond to a pixel difference between a pixel of an uncoded image and a prediction value corresponding to a PU.
  • Video encoder 20 may form a TU containing residual data of the CU, and then transform the TU to generate transform coefficients for the CU.
  • video encoder 20 may perform quantization of the transform coefficients.
  • Quantization exemplarily refers to the process of quantizing coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression.
  • the quantization process may reduce the bit depth associated with some or all of the coefficients. For example, an n-bit value may be rounded down to an m-bit value during quantization, where n is greater than m.
  • the JEM model further improves the coding structure of video images.
  • a block coding structure called "Quad Tree Combined with Binary Tree” (QTBT) is introduced.
  • QTBT Quality Tree Combined with Binary Tree
  • a CU can be square or rectangular.
  • a CTU first performs a quadtree partition, and the leaf nodes of the quadtree further perform a binary tree partition.
  • there are two partitioning modes in binary tree partitioning symmetrical horizontal partitioning and symmetrical vertical partitioning.
  • the leaf nodes of a binary tree are called CUs.
  • JEM's CUs cannot be further divided during the prediction and transformation process, which means that JEM's CU, PU, and TU have the same block size.
  • the maximum size of the CTU is 256 ⁇ 256 luminance pixels.
  • video encoder 20 may utilize a predefined scan order to scan the quantized transform coefficients to generate a serialized vector that can be entropy encoded.
  • video encoder 20 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 20 may perform context-adaptive variable length decoding (CAVLC), context-adaptive binary arithmetic decoding (CABAC), syntax-based context-adaptive binary Arithmetic decoding (SBAC), probability interval partition entropy (PIPE) decoding, or other entropy decoding methods to entropy decode a one-dimensional vector.
  • Video encoder 20 may also entropy encode syntax elements associated with the encoded video data for use by video decoder 30 to decode the video data.
  • video encoder 20 may assign a context within a context model to a symbol to be transmitted. Context can be related to whether adjacent values of a symbol are non-zero.
  • video encoder 20 may select a variable length code of a symbol to be transmitted. Codewords in Variable Length Decoding (VLC) may be constructed such that relatively short codes correspond to more likely symbols and longer codes correspond to less likely symbols. In this way, the use of VLC can achieve the goal of saving code rates relative to using equal length codewords for each symbol to be transmitted.
  • the probability in CABAC can be determined based on the context assigned to the symbol.
  • the video encoder may perform inter prediction to reduce temporal redundancy between images.
  • a CU may have one or more prediction units PU according to the provisions of different video compression codec standards.
  • multiple PUs may belong to a CU, or PUs and CUs are the same size.
  • the CU's partitioning mode is not divided, or it is divided into one PU, and the PU is uniformly used for expression.
  • the video encoder may signal the video decoder motion information for the PU.
  • the motion information of the PU may include: a reference image index, a motion vector, and a prediction direction identifier.
  • a motion vector may indicate a displacement between an image block (also called a video block, a pixel block, a pixel set, etc.) of a PU and a reference block of the PU.
  • the reference block of the PU may be a part of the reference picture similar to the image block of the PU.
  • the reference block may be located in a reference image indicated by a reference image index and a prediction direction identifier.
  • the video encoder may generate a candidate motion information list (hereinafter referred to as a candidate for short) for each of the PUs according to the merge prediction mode or advanced motion vector prediction mode process.
  • a candidate for short a candidate motion information list for each of the PUs according to the merge prediction mode or advanced motion vector prediction mode process.
  • the motion information may include motion vector MV and reference image indication information.
  • the motion information may also include only one or both of them.
  • the motion information may only include a motion vector.
  • the motion information represented by some candidates in the candidate list may be based on the motion information of other PUs.
  • the candidate represents motion information specifying one of spatial candidate positions (temporal candidate positions) or temporal candidate positions (temporal candidate positions)
  • this application may refer to the candidate as "original" candidate motion information .
  • original candidate motion information For example, for a merge mode, also referred to herein as a merge prediction mode, there may be five original spatial candidate locations and one original time domain candidate location.
  • the video encoder may also generate additional or additional candidate motion information by some means, such as inserting zero motion vectors as candidate motion information to generate additional candidate motion information. These additional candidate motion information are not considered as original candidate motion information and may be referred to as post- or artificially generated candidate motion information in this application.
  • the techniques of this application generally relate to a technique for generating a candidate list at a video encoder and a technique for generating the same candidate list at a video decoder.
  • Video encoders and video decoders can produce the same candidate list by implementing the same techniques used to build the candidate list. For example, both a video encoder and a video decoder may build a list with the same number of candidates (e.g., five candidates).
  • Video encoders and decoders may first consider spatial candidates (e.g., neighboring blocks in the same image), then consider temporal candidates (e.g., candidates in different images), and finally consider artificially generated candidates Until the desired number of candidates are added to the list.
  • a pruning operation may be utilized during candidate list construction for certain types of candidate motion information to remove duplicates from the candidate list, while for other types of candidates, pruning may not be used in order to reduce decoder complexity .
  • a pruning operation may be performed to exclude candidates with duplicate motion information from the list of candidates.
  • the video encoder may select candidate motion information from the candidate list and output an index identifier representing the selected candidate motion information in a code stream.
  • the selected candidate motion information may be motion information having a prediction block that produces the closest match to the PU being decoded.
  • the aforementioned index identifier may indicate a position of the candidate motion information selected in the candidate list.
  • the video encoder may also generate a prediction block for the PU based on a reference block indicated by the motion information of the PU.
  • the motion information of the PU may be determined based on the selected candidate motion information. For example, in the merge mode, it is determined that the selected candidate motion information is the motion information of the PU.
  • motion information of a PU may be determined based on a motion vector difference of the PU and selected candidate motion information.
  • the video encoder may generate one or more residual image blocks (referred to as residual blocks) for the CU based on the predictive image blocks (referred to as prediction blocks) of the PU of the CU and the original image blocks for the CU.
  • the video encoder may then encode one or more residual blocks and output a code stream.
  • the code stream may include data for identifying selected candidate motion information in a candidate list of the PU.
  • the video decoder may determine the motion information of the PU based on the selected candidate motion information in the candidate list of the PU.
  • the video decoder may identify one or more reference blocks for the PU based on the motion information of the PU. After identifying one or more reference blocks of the PU, the video decoder may generate a prediction block for the PU based on the one or more reference blocks of the PU.
  • the video decoder may reconstruct an image block for a CU based on a prediction block of the PU for the CU and one or more residual blocks for the CU.
  • the present application may describe a position or an image block as having various spatial relationships with a CU or a PU. This description can be interpreted to mean that the position or image block and the image block associated with the CU or PU have various spatial relationships.
  • a PU currently being decoded by a video decoder may be referred to as a current PU, and may also be referred to as a current image block to be processed.
  • This application may refer to the CU that the video decoder is currently decoding as the current CU.
  • This application may refer to the image currently being decoded by the video decoder as the current image. It should be understood that this application is applicable to a case where the PU and the CU have the same size, or the PU is the CU, and the PU is used to represent the same.
  • video encoder 20 may use inter prediction to generate prediction blocks and motion information for a PU of a CU.
  • the motion information of a PU may be the same or similar to the motion information of one or more neighboring PUs (ie, PUs whose image blocks are spatially or temporally near the PU's image blocks). Because neighboring PUs often have similar motion information, video encoder 20 may refer to the motion information of neighboring PUs to encode the motion information of the PU. Encoding the motion information of the PU with reference to the motion information of the neighboring PU can reduce the number of encoding bits required in the code stream to indicate the motion information of the PU.
  • Video encoder 20 may refer to the motion information of a neighboring PU in various ways to encode the motion information of that PU. For example, video encoder 20 may indicate that the motion information of the PU is the same as the motion information of nearby PUs. This application may use a merge mode to refer to indicating that the motion information of the PU is the same as that of the neighboring PU or may be derived from the motion information of the neighboring PU. In another feasible implementation manner, the video encoder 20 may calculate a Motion Vector Difference (MVD) for the PU. MVD indicates the difference between the motion vector of this PU and the motion vector of neighboring PUs. Video encoder 20 may include MVD instead of the motion vector of the PU in the motion information of the PU.
  • MVD Motion Vector Difference
  • This application may use an advanced motion vector prediction mode to refer to using the MVD and an index value identifying a candidate (ie, candidate motion information) to notify the decoding end of the PU's motion information.
  • the video encoder 20 may generate a candidate list for the PU.
  • the candidate list may include one or more candidates (ie, one or more sets of candidate motion information).
  • Each candidate in the candidate list for this PU represents a set of motion information.
  • a set of motion information may include a motion vector, a reference image list, and a reference image index corresponding to the reference image list.
  • the video encoder 20 may select one of a plurality of candidates from the candidate list for the PU. For example, a video encoder may compare each candidate with a PU that is being decoded and may select a candidate with the required code rate-distortion cost. Video encoder 20 may output a candidate index for a PU. The candidate index identifies the position of the selected candidate in the candidate list.
  • the video encoder 20 may generate a prediction block for a PU based on a reference block indicated by the motion information of the PU.
  • the motion information of the PU may be determined based on the selected candidate motion information from the candidate list for the PU.
  • video decoder 30 may generate a candidate list for each of the PUs of the CU.
  • the candidate list generated by video decoder 30 for a PU may be the same as the candidate list generated by video encoder 20 for a PU.
  • the syntax element parsed from the code stream may indicate the position of the candidate motion information selected in the candidate list of the PU.
  • video decoder 30 may generate a prediction block for the PU based on one or more reference blocks indicated by the motion information of the PU.
  • Video decoder 30 may determine motion information of a PU based on candidate motion information selected in a candidate list for the PU.
  • Video decoder 30 may reconstruct an image block for a CU based on a prediction block for a PU and a residual block for a CU.
  • the construction of the candidate list and the positions of the candidates selected from the code stream parsing in the candidate list are independent of each other and may be performed in any order or in parallel.
  • the position of the selected candidate in the candidate list is first parsed from the code stream, and the candidate list is constructed according to the parsed position.
  • no construction is required.
  • the candidate list at the parsed position needs to be constructed, that is, the candidate at the position can be determined.
  • the candidate with the index identifier of 3 in the candidate list needs to be constructed only from the candidate list with the index of 0 to 3, and the index identifier can be determined to be 3.
  • the candidate can achieve the technical effect of reducing complexity and improving decoding efficiency.
  • FIG. 2 is a schematic block diagram of a video encoder 20 according to an embodiment of the present application.
  • Video encoder 20 may perform intra-frame decoding and inter-frame decoding of video blocks within a video slice.
  • Intra decoding relies on spatial prediction to reduce or remove the spatial redundancy of a video within a given video frame or image.
  • Inter-frame decoding relies on temporal prediction to reduce or remove temporal redundancy of video within adjacent frames of a video sequence or video.
  • the intra mode (I mode) may refer to any of several space-based compression modes.
  • Inter-modes such as unidirectional prediction (P mode) or bidirectional prediction (B mode) may refer to any of several time-based compression modes.
  • the video encoder 20 includes a segmentation unit 35, a prediction unit 41, a reference image memory 64, a summer 50, a transformation processing unit 52, a quantization unit 54, and an entropy encoding unit 56.
  • the prediction unit 41 includes an inter prediction unit 43 and an intra prediction unit 46.
  • the inter prediction unit 43 may include a motion estimation unit 42 and a motion compensation unit 44.
  • the video encoder 20 may also include an inverse quantization unit 58, an inverse transform unit 60, and a summer (also referred to as a reconstructor) 62.
  • a deblocking filter (not shown in Figure 2) may also be included to filter block boundaries to remove block effect artifacts from the reconstructed video. When needed, the deblocking filter will typically filter the output of the summer 62. In addition to the deblocking filter, additional loop filters (in-loop or post-loop) can be used.
  • the video encoder 20 receives video data, and the segmentation unit 35 divides the data into video blocks.
  • This segmentation may also include segmentation into slices, image blocks, or other larger units, and video block segmentation, for example, based on the quad-tree structure of the LCU and CU.
  • Video encoder 20 exemplarily illustrates the components of a video block encoded within a video slice to be encoded. In general, a slice can be divided into multiple video blocks (and possibly into a collection of video blocks called image blocks).
  • the prediction unit 41 may select one of a plurality of possible decoding modes of the current video block, such as one or more of a plurality of intra decoding modes, based on the encoding quality and the cost calculation result (for example, code rate-distortion cost, RDcost) One of the inter-frame decoding modes.
  • the prediction unit 41 may provide the obtained intra decoded or inter decoded block to the summer 50 to generate residual block data and provide the obtained intra decoded or inter decoded block to the summer 62 to reconstruct The encoded block is thus used as a reference image.
  • the inter prediction unit 43 (such as the motion estimation unit 42 and the motion compensation unit 44) within the prediction unit 41 performs inter-predictive decoding of the current video block with respect to one or more prediction blocks in one or more reference images to Provides time compression.
  • the motion estimation unit 42 is configured to determine an inter prediction mode of a video slice according to a predetermined mode of a video sequence.
  • the predetermined mode can specify the video slices in the sequence as P slices, B slices, or GPB slices.
  • the motion estimation unit 42 and the motion compensation unit 44 can be highly integrated, and are described separately here for the convenience of understanding the concept.
  • a process of estimating a motion vector of a video block also referred to as an image block
  • a motion vector may indicate a displacement of a PU of a video block within a current video frame or image relative to a predicted block within a reference image.
  • the prediction block is a block that is found to closely match the PU of the video block to be decoded according to the pixel difference, and the pixel difference may be determined by a sum of absolute differences (SAD), a sum of squared differences (SSD), or other differences.
  • the video encoder 20 may calculate a value of a sub-integer pixel position of a reference image stored in the reference image memory 64. For example, video encoder 20 may interpolate values of quarter pixel positions, eighth pixel positions, or other fractional pixel positions of the reference image. Therefore, the motion estimation unit 42 may perform a motion search with respect to the full pixel position and the fractional pixel position and output a motion vector having a fractional pixel accuracy.
  • the motion estimation unit 42 calculates a motion vector of the PU of the video block in the inter-decoded slice by comparing the position of the PU with the position of the prediction block of the reference image.
  • Reference images can be selected from the first reference image list (List 0) or the second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 64.
  • the motion estimation unit 42 sends the calculated motion vector to the entropy encoding unit 56 and the motion compensation unit 44.
  • Motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on a motion vector determined by motion estimation. After receiving the motion vector of the PU of the current video block, the motion compensation unit 44 can locate the prediction block pointed to by the motion vector in one of the reference image lists.
  • Video encoder 20 forms a residual video block by subtracting the pixel value of the prediction block from the pixel value of the current video block being decoded, thereby forming a pixel difference value.
  • the pixel difference values form the residual data of the block, and may include both luminance and chrominance difference components.
  • the summer 50 represents one or more components that perform this subtraction operation.
  • Motion compensation unit 44 may also generate syntax elements associated with video blocks and video slices for use by video decoder 30 for decoding video blocks of video slices.
  • the picture containing the PU may be associated with two reference picture lists called "List 0" and "List 1".
  • an image containing B bands may be associated with a list combination that is a combination of list 0 and list 1.
  • the motion estimation unit 42 may perform unidirectional prediction or bidirectional prediction for the PU, wherein in some feasible implementations, the bidirectional prediction is a reference image list based on the list 0 and the list 1, respectively In other feasible implementations, the bi-directional prediction is a prediction based on a reconstructed future frame and a reconstructed past frame in the display order of the current frame, respectively.
  • the motion estimation unit 42 may search a reference image of List 0 or List 1 for a reference block for the PU.
  • the motion estimation unit 42 may then generate a reference frame index indicating a reference image containing a reference block in List 0 or List 1 and a motion vector indicating a spatial displacement between the PU and the reference block.
  • the motion estimation unit 42 may output a reference frame index, a prediction direction identifier, and a motion vector as motion information of the PU.
  • the prediction direction identifier may indicate a reference picture in the reference frame index indication list 0 or list 1. For example, the prediction direction identifier 1 indicates the list list0, the prediction direction identifier 2 indicates the list list1, and the prediction direction identifier 3 indicates the bidirectional prediction, that is, list0 and list1.
  • the motion compensation unit 44 may generate a predictive image block of the PU based on a reference block indicated by the motion information of the PU.
  • the motion estimation unit 42 may search for a reference block for the PU in the reference image in list 0 and may also search for another for the PU in the reference image in list 1 Reference block.
  • the motion estimation unit 42 may then generate a reference index indicating the reference image containing the reference block in List 0 and List 1 and a motion vector indicating the spatial displacement between the reference block and the PU.
  • the motion estimation unit 42 may output a reference index and a motion vector of the PU as motion information of the PU.
  • the motion compensation unit 44 may generate a predictive image block of the PU based on a reference block indicated by the motion information of the PU.
  • the motion estimation unit 42 does not output the complete set of motion information for the PU to the entropy encoding unit 56. Instead, the motion estimation unit 42 may refer to the motion information of another PU to signal the motion information of the PU. For example, the motion estimation unit 42 may determine that the motion information of a PU is sufficiently similar to the motion information of a neighboring PU. In this embodiment, the motion estimation unit 42 may indicate an indication value in the syntax structure associated with the PU, and the indication value indicates to the video decoder 30 that the PU has the same motion information as the neighboring PU or has a Neighbor PU derived motion information.
  • the motion estimation unit 42 may identify candidates and motion vector differences (MVD) associated with neighboring PUs in a syntax structure associated with the PU.
  • MVD indicates the difference between the motion vector of the PU and the indicated candidate associated with the neighboring PU.
  • Video decoder 30 may use the indicated candidate and MVD to determine the motion vector of the PU.
  • the prediction unit 41 may generate a candidate list for each PU of the CU.
  • a history candidate is added to a candidate list (for example, a fusion motion information candidate list and / or a motion vector prediction candidate list).
  • a candidate list for example, a fusion motion information candidate list and / or a motion vector prediction candidate list.
  • the intra prediction unit 46 within the prediction unit 41 may perform intra predictive decoding of the current video block relative to one or more neighboring blocks in the same image or slice as the current block to be decoded to provide spatial compression . Therefore, instead of the inter prediction (as described above) performed by the motion estimation unit 42 and the motion compensation unit 44, the intra prediction unit 46 may predict the current block intra. Specifically, the intra prediction unit 46 may determine an intra prediction mode used to encode the current block. In some feasible implementations, the intra prediction unit 46 may, for example, encode the current block using various intra prediction modes during separate encoding traversals, and the intra prediction unit 46 (or in some feasible implementations, The mode selection unit 40) may select an appropriate intra prediction mode to use from the tested modes.
  • the video encoder 20 forms a residual video block by subtracting the prediction block from the current video block.
  • the residual video data in the residual block may be included in one or more TUs and applied to the transform processing unit 52.
  • the transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform (eg, a discrete sine transform DST).
  • the transform processing unit 52 may transform the residual video data from a pixel domain to a transform domain (for example, a frequency domain).
  • the transformation processing unit 52 may send the obtained transformation coefficient to the quantization unit 54.
  • the quantization unit 54 quantizes the transform coefficients to further reduce the code rate.
  • the quantization process may reduce the bit depth associated with some or all of the coefficients.
  • the degree of quantization can be modified by adjusting the quantization parameters.
  • the quantization unit 54 may then perform a scan of a matrix containing the quantized transform coefficients.
  • the entropy encoding unit 56 may perform scanning.
  • the entropy encoding unit 56 may entropy encode the quantized transform coefficients.
  • the entropy encoding unit 56 may perform context adaptive variable length decoding (CAVLC), context adaptive binary arithmetic decoding (CABAC), syntax-based context adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy (PIPE) decoding or another entropy coding method or technique.
  • CAVLC context adaptive variable length decoding
  • CABAC context adaptive binary arithmetic decoding
  • SBAC syntax-based context adaptive binary arithmetic decoding
  • PIPE probability interval partitioning entropy
  • the entropy encoding unit 56 may also entropy encode the motion vector and other syntax elements of the current video slice being decoded.
  • the encoded code stream may be transmitted to the video decoder 30 or archived for later transmission or retrieved by the video decoder 30.
  • the entropy encoding unit 56 may encode information indicating a selected intra prediction mode according to the techniques of the present application.
  • Video encoder 20 may include encoding of various blocks in transmitted stream configuration data that may include multiple intra prediction mode index tables and multiple modified intra prediction mode index tables (also known as codeword mapping tables). Definition of the context and an indication of the MPM, the intra prediction mode index table, and the modified intra prediction mode index table for each of the contexts.
  • the inverse quantization unit 58 and the inverse transform unit 60 respectively apply inverse quantization and inverse transform to reconstruct a residual block in the pixel domain for later use as a reference block of a reference image.
  • the motion compensation unit 44 may calculate a reconstructed block by adding a residual block to a prediction block of one of the reference images within one of the reference image lists.
  • the motion compensation unit 44 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for motion estimation.
  • the summer 62 adds the reconstructed residual block and the motion-compensated prediction block generated by the motion compensation unit 44 to generate a reconstruction block, which is used as a reference block for storage in the reference image memory 64.
  • the reference block can be used as a reference block by the motion estimation unit 42 and the motion compensation unit 44 to inter-predict a block in a subsequent video frame or image.
  • the video encoder 20 may directly quantize the residual signal without processing by the transform unit 52 and correspondingly does not need to be processed by the inverse transform unit 60; or, for some image blocks, Or image frames, the video encoder 20 does not generate residual data, and accordingly does not need to be processed by the transform unit 52, the quantization unit 54, the inverse quantization unit 58, and the inverse transform unit 60; or, the video encoder 20 may convert the reconstructed image
  • the blocks are directly stored as reference blocks without being processed by a filter unit; alternatively, the quantization unit 54 and the inverse quantization unit 58 in the video encoder 20 may be merged together.
  • the loop filtering unit is optional, and in the case of lossless compression coding, the transform unit 52, the quantization unit 54, the inverse quantization unit 58, and the inverse transform unit 60 are optional. It should be understood that, according to different application scenarios, the inter prediction unit and the intra prediction unit may be selectively enabled, and in this case, the inter prediction unit is enabled.
  • FIG. 3 is a schematic block diagram of a video decoder 30 in an embodiment of the present application.
  • the video decoder 30 includes an entropy encoding unit 80, a prediction unit 81, an inverse quantization unit 86, an inverse transform unit 88, a summer 90 (ie, a reconstructor), and a reference image memory 92.
  • the reference image memory 92 may also be provided outside the video decoder 30.
  • the prediction unit 81 includes an inter prediction unit 82 and an intra prediction unit 84.
  • the inter prediction unit 82 may be, for example, a motion compensation unit 82.
  • video decoder 30 may perform an exemplary reciprocal decoding process with the encoding process described with respect to video encoder 20 from FIG. 4A or 4B.
  • video decoder 30 receives from video encoder 20 an encoded video code stream representing video blocks of the encoded video slice and associated syntax elements.
  • the entropy encoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors, and other syntax elements.
  • the entropy encoding unit 80 forwards the motion vector and other syntax elements to the prediction unit 81.
  • Video decoder 30 may receive syntax elements at a video slice level and / or a video block level.
  • the intra-prediction unit 84 of the prediction unit 81 may be based on a signaled intra-prediction mode and data from a previously decoded block of the current frame or image The prediction data of the video block of the current video slice is generated.
  • the motion compensation unit 82 of the prediction unit 81 When the video image is decoded into inter-decoded (eg, B, P, or GPB) slices, the motion compensation unit 82 of the prediction unit 81 generates the current video based on the motion vector and other syntax elements received from the entropy encoding unit 80 A prediction block of a video block of an image.
  • the prediction block may be generated from one of the reference pictures within one of the reference picture lists.
  • the video decoder 30 may construct a reference image list (List 0 and List 1) using a default construction technique based on the reference image stored in the reference image memory 92.
  • the motion compensation unit 82 determines the prediction information of the video block of the current video slice by analyzing the motion vector and other syntax elements, and uses the prediction information to generate the prediction block of the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) of a video block to decode a video slice, an inter prediction slice type (e.g., B slice, P slice or GPB slice), construction information of one or more of the slice's reference image list, motion vector of each inter-coded video block of the slice, each warped frame of the slice Inter-prediction status of inter-decoded video blocks and other information used to decode video blocks in the current video slice.
  • a prediction mode e.g., intra prediction or inter prediction
  • an inter prediction slice type e.g., B slice, P slice or GPB slice
  • construction information of one or more of the slice's reference image list e.g., motion vector of each inter-coded video block
  • the motion compensation unit 82 may also perform interpolation based on an interpolation filter.
  • the motion compensation unit 82 may use an interpolation filter as used by the video encoder 20 during encoding of the video block to calculate the interpolation value of the sub-integer pixels of the reference block.
  • the motion compensation unit 82 may determine an interpolation filter used by the video encoder 20 from the received syntax elements and use the interpolation filter to generate a prediction block.
  • the motion compensation unit 82 may generate a candidate list for the PU.
  • the codestream may include data identifying the position of the selected candidate in the candidate list of the PU.
  • the motion compensation unit 82 may generate a predictive image block for the PU based on one or more reference blocks indicated by the motion information of the PU.
  • a reference block of a PU may be in a temporal image different from the PU.
  • the motion compensation unit 82 may determine the motion information of the PU based on the selected motion information in the candidate list of the PU.
  • the embodiment of the present application adds a history candidate to a candidate list (such as a fusion motion information candidate list and / or a motion vector prediction candidate list).
  • a candidate list such as a fusion motion information candidate list and / or a motion vector prediction candidate list.
  • the inverse quantization unit 86 performs inverse quantization (for example, dequantization) on the quantized transform coefficient provided in the code stream and decoded by the entropy encoding unit 80.
  • the inverse quantization process may include determining the degree of quantization using the quantization parameters calculated by video encoder 20 for each video block in the video slice, and similarly determining the degree of inverse quantization that should be applied.
  • the inverse transform unit 88 applies an inverse transform (e.g., inverse DCT, inverse integer transform, or conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the pixel domain.
  • the video decoder 30 After the motion compensation unit 82 generates a prediction block of the current video block based on the motion vector and other syntax elements, the video decoder 30 sums the residual block from the inverse transform unit 88 and the corresponding prediction block generated by the motion compensation unit 82 to Form decoded video blocks.
  • the summer 90 ie, the reconstructor
  • a deblocking filter may also be applied to filter the decoded blocks in order to remove block effect artifacts.
  • Other loop filters (in the decoding loop or after the decoding loop) can also be used to smooth pixel transitions or otherwise improve video quality.
  • the decoded video block in a given frame or image is then stored in a reference image memory 92, which stores a reference image for subsequent motion compensation.
  • the reference image memory 92 also stores decoded video for later presentation on a display device such as the display device 32 of FIG. 1.
  • the techniques of this application exemplarily involve inter-frame decoding. It should be understood that the techniques of this application may be performed by any of the video decoders described in this application.
  • the video decoder includes, for example, video encoder 20 and video decoding as shown and described with respect to FIGS. 1-3. ⁇ 30 ⁇ 30. That is, in a feasible implementation manner, the prediction unit 41 described with respect to FIG. 2 may perform a specific technique described below when performing inter prediction during encoding of a block of video data. In another possible implementation, the prediction unit 81 described with respect to FIG. 3 may perform specific techniques described below when performing inter prediction during decoding of a block of video data.
  • a reference to a generic "video encoder" or "video decoder” may include video encoder 20, video decoder 30, or another video encoding or coding unit.
  • video decoder 30 may be used to decode the encoded video bitstream.
  • the video decoder 30 may generate an output video stream without being processed by a filtering unit; or, for certain image blocks or image frames, the entropy decoding unit 80 of the video decoder 30 does not decode the quantized coefficients, and accordingly does not need to Processed by inverse quantization unit 86 and inverse transform unit 88.
  • the loop filtering unit is optional; and in the case of lossless compression, the inverse quantization unit 86 and the inverse transform unit 88 are optional.
  • the inter prediction unit and the intra prediction unit may be selectively enabled, and in this case, the inter prediction unit is enabled.
  • FIG. 4A is an exemplary flowchart of a merge mode in an embodiment of the present application.
  • a video encoder eg, video encoder 20
  • the video encoder may perform a merge operation different from the merge operation 200.
  • the video encoder may perform a merge operation, where the video encoder performs more or fewer steps than the merge operation 200 or steps different from the merge operation 200.
  • the video encoder may perform the steps of the merge operation 200 in a different order or in parallel.
  • the encoder may also perform a merge operation 200 on a PU encoded in a skip mode.
  • the video encoder may generate a candidate list for the current PU (202).
  • the video encoder may generate a candidate list for the current PU in various ways. For example, the video encoder may generate a candidate list for the current PU according to one of the example techniques described below with respect to FIGS. 7-11C.
  • the candidate list for the current PU may include temporal candidate motion information (referred to as a time domain candidate).
  • the temporal candidate motion information may indicate motion information of a co-located PU in the time domain.
  • a co-located PU may be spatially in the same position in the image frame as the current PU, but in a reference picture instead of the current picture.
  • a reference picture including a PU corresponding to the time domain may be referred to as a related reference picture.
  • a reference image index of a related reference image may be referred to as a related reference image index in this application.
  • the current image may be associated with one or more reference image lists (eg, list 0, list 1, etc.).
  • the reference image index may indicate the reference image by indicating the position of the reference image in a certain reference image list.
  • the current image may be associated with a combined reference image list.
  • the related reference picture index is the reference picture index of the PU covering the reference index source position associated with the current PU.
  • the reference index source location associated with the current PU is adjacent to the left of the current PU or above the current PU. In this application, if an image block associated with a PU includes a specific location, the PU may "cover" the specific location.
  • the reference index source location associated with the current PU is within the current CU.
  • the PU may need to access motion information of another PU of the current CU in order to determine a reference picture containing a co-located PU. Therefore, these video encoders may use motion information (ie, a reference picture index) of a PU belonging to the current CU to generate a time domain candidate for the current PU. In other words, these video encoders can use the motion information of the PUs that belong to the current CU to generate time-domain candidates. Therefore, the video encoder cannot generate a candidate list for a current PU and a PU covering a reference index source position associated with the current PU in parallel.
  • the video encoder may explicitly set the relevant reference picture index without referring to the reference picture index of any other PU. This may enable the video encoder to generate candidate lists for the current PU and other PUs of the current CU in parallel. Because the video encoder explicitly sets the relevant reference picture index, the relevant reference picture index is not based on the motion information of any other PU of the current CU. In some feasible implementations where the video encoder explicitly sets the relevant reference picture index, the video encoder may always set the relevant reference picture index to a fixed, predefined preset reference picture index (eg, 0). In this way, the video encoder may generate time-domain candidates based on the motion information of the co-located PU in the reference frame indicated by the preset reference picture index, and may include the time-domain candidates in the candidate list of the current CU .
  • a fixed, predefined preset reference picture index eg, 0
  • the video encoder may be explicitly used in a syntax structure (e.g., image header, slice header, APS, or another syntax structure)
  • the related reference picture index is signaled.
  • the video encoder may signal the decoder to the relevant reference picture index for each LCU (ie, CTU), CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the relevant reference picture index for each PU of the CU is equal to "1".
  • the relevant reference image index may be set implicitly rather than explicitly.
  • the video encoder may use the motion information of the PU in the reference picture indicated by the reference picture index of the PU covering the location outside the current CU to generate each candidate list for the PU of the current CU. A temporal candidate, even if these locations are not strictly adjacent to the current PU.
  • the video encoder may generate predictive image blocks associated with the candidates in the candidate list (204).
  • the video encoder may generate a prediction associated with the candidate by determining motion information of the current PU based on the motion information of the indicated candidate and then generating a predictive image block based on one or more reference blocks indicated by the motion information of the current PU.
  • Sexual image blocks The video encoder may select one of the candidates from the candidate list (206).
  • Video encoders can select candidates in various ways. For example, a video encoder may select one of the candidates based on a code rate-distortion cost analysis of each of the predictive image blocks associated with the candidate.
  • the video encoder may output the candidate's index (208).
  • the index may indicate the position of the selected candidate in the candidate list. In some feasible implementations, this index may be represented as "merge_idx".
  • FIG. 4B is an exemplary flowchart of an advanced motion vector prediction (AMVP) mode in an embodiment of the present application.
  • a video encoder eg, video encoder 20
  • the video encoder may generate one or more motion vectors for the current PU (211).
  • the video encoder may perform integer motion estimation and fractional motion estimation to generate motion vectors for the current PU.
  • the current image may be associated with two reference image lists (List 0 and List 1).
  • the video encoder may generate a list 0 motion vector or a list 1 motion vector for the current PU.
  • the list 0 motion vector may indicate a spatial displacement between an image block of the current PU and a reference block in a reference image in list 0.
  • the list 1 motion vector may indicate a spatial displacement between an image block of the current PU and a reference block in a reference image in list 1.
  • the video encoder may generate a list 0 motion vector and a list 1 motion vector for the current PU.
  • the video encoder may generate predictive image blocks (referred to simply as prediction blocks) for the current PU (212).
  • the video encoder may generate predictive image blocks for the current PU based on one or more reference blocks indicated by one or more motion vectors for the current PU.
  • the video encoder may generate a candidate list for the current PU (213).
  • the video decoder can generate a list of candidate prediction motion vectors for the current PU in various ways.
  • the video encoder may generate a candidate list for the current PU according to one or more of the possible implementations described below with respect to FIGS. 6 to 11C.
  • the candidate prediction motion vector list may include two or three candidate prediction motion vectors.
  • the list of candidate prediction motion vectors may include more candidate prediction motion vectors (eg, five or seven candidate prediction motion vectors).
  • the video encoder may generate one or more motion vector prediction residual values (also known as motion vector difference MVD) for each candidate prediction motion vector in the candidate list (214 ).
  • the video encoder may generate a motion vector difference for the candidate prediction motion vector by determining a difference between the motion vector indicated by the candidate prediction motion vector and a corresponding motion vector of the current PU.
  • the video encoder may generate a single MVD for each candidate prediction motion vector. If the current PU is bi-predicted, the video encoder may generate two MVDs for each candidate prediction motion vector.
  • the first MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the list 0 motion vector of the current PU.
  • the second MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the list 1 motion vector of the current PU.
  • the video encoder may select one or more of the candidate prediction motion vectors from the candidate prediction motion vector list (215).
  • the video encoder may select one or more candidate prediction motion vectors in various ways. For example, a video encoder may select a candidate prediction motion vector with an associated motion vector that matches the motion vector to be encoded with minimal error, which may reduce the number of bits required to represent the motion vector difference for the candidate prediction motion vector.
  • the video encoder may output one or more reference image indexes for the current PU, one or more candidate prediction motion vector indexes, and one or more selected candidate motion vectors.
  • One or more motion vector differences of the predicted motion vector (216).
  • the video encoder may output a reference picture index ("ref_idx_10") for List 0 or for Reference image index of list 1 ("ref_idx_11").
  • the video encoder may also output a candidate prediction motion vector index (“mvp_10_flag") indicating the position of the selected candidate prediction motion vector for the list 0 motion vector of the current PU in the candidate prediction motion vector list.
  • the video encoder may output a candidate prediction motion vector index (“mvp_11_flag”) indicating the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list.
  • the video encoder may also output a list 0 motion vector or a list 1 motion vector MVD for the current PU.
  • the video encoder may output the reference picture index ("ref_idx_10") for List 0 and the list Reference image index of 1 ("ref_idx_11").
  • the video encoder may also output a candidate prediction motion vector index (“mvp_10_flag") indicating the position of the selected candidate prediction motion vector for the list 0 motion vector of the current PU in the candidate prediction motion vector list.
  • the video encoder may output a candidate prediction motion vector index (“mvp_11_flag”) indicating the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list.
  • the video encoder may also output the MVD of the list 0 motion vector for the current PU and the MVD of the list 1 motion vector for the current PU.
  • FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder (such as video decoder 30) in an embodiment of the present application.
  • the video decoder may receive an indication of a selected candidate for the current PU (222). For example, the video decoder may receive a candidate index indicating the position of the selected candidate within the candidate list of the current PU.
  • the video decoder may receive the first candidate index and the second candidate index.
  • the first candidate index indicates the position of the selected candidate for the list 0 motion vector of the current PU in the candidate list.
  • the second candidate index indicates the position of the selected candidate for the list 1 motion vector of the current PU in the candidate list.
  • a single syntax element may be used to identify two candidate indexes.
  • the video decoder may generate a candidate list for the current PU (224).
  • the video decoder can generate this candidate list for the current PU in various ways. For example, the video decoder may use the techniques described below with reference to FIGS. 6 to 11 to generate a candidate list for the current PU.
  • the video decoder may explicitly or implicitly set a reference picture index identifying a reference picture including a co-located PU, as described above with reference to FIG. 4A or Described in Figure 4B.
  • the video decoder may determine motion information of the current PU based on the motion information indicated by one or more selected candidates in the candidate list for the current PU (225). For example, if the motion information of the current PU is encoded using a merge mode, the motion information of the current PU may be the same as the motion information indicated by the selected candidate. If the motion information of the current PU is encoded using AMVP mode, the video decoder may reconstruct using one or more MVDs indicated in the one or more motion vectors and code streams indicated by the or the selected candidate. One or more motion vectors of the current PU.
  • the reference image index and prediction direction identifier of the current PU may be the same as the reference image index and prediction direction identifier of the one or more selected candidates.
  • the video decoder may generate a predictive image block for the current PU based on one or more reference blocks indicated by the motion information of the current PU (226).
  • FIG. 6 is an exemplary schematic diagram of a current image block (such as a coding unit CU), a spatial neighboring image block, and a temporal neighboring image block associated with the current image block (such as the coding unit CU) in the embodiment of the present application, illustrating CU600 and schematic candidates associated with CU600 Schematic diagram of user positions 1 to 10.
  • Candidate positions 1 to 5 represent airspace candidates in the same image as CU600.
  • Candidate position 1 is positioned to the left of CU600.
  • Candidate position 2 is positioned above CU600.
  • Candidate position 3 is located at the upper right of CU600.
  • Candidate position 4 is positioned at the bottom left of CU600.
  • Candidate position 5 is located at the upper left of CU600.
  • Candidate positions 6 to 7 represent time-domain candidates associated with the co-located block 602 of the CU600, where the co-located block is the same size, shape, and coordinates as the CU600 in the reference image (i.e., adjacent coded image) Image blocks.
  • the candidate position 6 is located in the lower right corner of the co-located block 602.
  • the candidate position 7 is positioned at the lower right middle position of the co-located block 602, or at the upper left middle position of the co-located block 602.
  • FIG. 6 is a schematic embodiment of a candidate position for providing a candidate list that an inter prediction unit (for example, the motion estimation unit 42 or the motion compensation unit 82) can generate.
  • the candidate positions 1 to 5 of FIG. 6 are exemplary embodiments for providing candidate positions that an intra prediction unit can generate a candidate list.
  • the positions of the candidate in the spatial domain and the positions of the candidate in the time domain in FIG. 6 are merely schematic, and the candidate positions include, but are not limited to, this.
  • the locations of the spatial domain candidates may further include, for example, positions within a preset distance from the image block to be processed, but not adjacent to the image block to be processed.
  • the embodiment of the present application is not only applicable to merge prediction mode (Merge) and / or advanced motion vector prediction mode (advanced motion vector prediction) (AMVP), but also applicable to other motion information using spatial reference blocks and / or time domain reference blocks.
  • FIG. 7 is an exemplary flowchart of an image coding method according to an embodiment of the present application.
  • the method may be performed by a video encoder (eg, video encoder 20) or an electronic device (eg, devices 1200, 1300) with video encoding functions.
  • the method may include the following steps:
  • an inter prediction mode with the lowest rate-distortion cost is selected from the set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
  • the candidate motion information list corresponding to the inter prediction mode of the current coded image block is a merged motion information candidate list merge candidate list; if the frame of the current coded image block
  • the inter prediction mode is an inter MVP mode (for example, AMVP mode), and the candidate motion information list corresponding to the inter prediction mode of the current coded image block is a motion vector prediction candidate list MVP candidate list; the historical candidate list is different from the candidate List of exercise information.
  • the historical candidate list is used to construct or update the current encoded image.
  • the block candidate motion information list includes: the order from the tail to the head of the historical candidate list, checking whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, then The target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: a history other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list
  • Q is a positive integer.
  • the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Based on the inter prediction mode of the image block where the current historical candidate motion information HMVP in the historical candidate list is located and / or the inter prediction mode of the image block where the candidate motion information candidate in the candidate motion information list is located Determine whether to perform a repetitive check, and determine whether to add the current historical candidate motion information HMVP to the candidate according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list In the motion information list, M is an integer greater than or equal to 0.
  • the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is the first inter prediction mode; the inter prediction mode of the image block where the current candidate motion information is located is the first In the case of an inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; When the inter prediction mode of the image block is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  • the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode; the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction In the case of a mode, adding the current historical candidate motion information to the candidate motion information list; in a case where an inter prediction mode of an image block where the current historical candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list.
  • the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode; the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction In the case of a mode, the current historical candidate motion information is added to the candidate motion information list; the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and When the inter prediction mode of the image block where the current candidate motion information is in the candidate motion information list is the first inter prediction mode, check the image block where the next candidate motion information in the candidate motion information list is located.
  • the inter prediction mode is the first inter prediction mode; If the inter prediction mode of the image block where the motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, check the current historical candidate motion Whether the information is the same as the current candidate motion information.
  • the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is Is the first inter prediction mode; the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of an inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; where the current historical candidate motion information is located Inter prediction mode of the image block and the current in the candidate motion information list Inter prediction mode information of the motion image block is selected from where at least one is not the first case where the inter prediction mode, the motion information
  • the historical candidate list is updated by using the motion information of the currently encoded image block
  • S707 Program a syntax element used to indicate an inter prediction mode of the currently-encoded image block into a code stream.
  • the inter prediction mode of the current image block is a merge merge mode or a skip mode, and a merge index number corresponding to the target candidate motion information is also coded into a code stream;
  • the inter prediction mode of the current image block is an inter MVP mode, and an index number, a reference frame index, and the motion vector difference corresponding to the target candidate motion information (that is, the target candidate motion vector prediction value MVP) are also provided.
  • the value MVD is coded into the code stream.
  • the embodiment of the present invention may further include:
  • performing inter prediction on the current image block based on the candidate motion information list in step S703 may include:
  • target motion information is determined from a list of candidate motion information corresponding to the inter prediction mode of the currently coded image block.
  • the target candidate motion information encodes the current coded image block with the lowest rate-distortion cost.
  • the target candidate motion information is the motion information of the current encoded image block (for example, in a merge mode); or based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation)
  • Motion Estimation To determine a motion vector difference MVD of the currently encoded image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block (for example, in the AMVP mode);
  • Inter prediction is performed on the current coded image block according to the motion information of the current coded image block to obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
  • step S707 may be performed after step S705, or may be performed before step S705; the above step S702 may be performed after step S701, or may be performed before step S701; the remaining steps are not illustrated here one by one.
  • the candidate motion information list (for example, merge candidate list) includes motion information of a spatial domain reference block of the current coded image block (spatial domain reference block includes motion information of an adjacent block adjacent to the spatial domain of the current coded image block) and / Or motion information of a time-domain reference block of a current coded image block (the time-domain reference block includes: motion information of a neighboring block in a lower right corner of a co-located block at a same position as the current coded image block in a reference frame, or , The motion information of the center position of the co-located block);
  • the candidate motion information list (for example, MVP candidate list) includes a motion vector of a spatial reference block of the current coded image block and / or a motion vector of a time domain reference block of the current coded image block;
  • the syntax element included in the code stream also includes an index number indicating the target candidate motion information of the currently coded image block, in other words That is, an index number corresponding to the target candidate motion information may also be coded into a code stream;
  • the syntax element included in the code stream further includes an index number used to indicate target candidate motion information of the currently coded image block
  • the motion vector difference value MVD in other words, an index number corresponding to the target candidate motion information and the motion vector difference value MVD may also be coded into a code stream, and the target candidate motion information is the current coded image block Motion vector predictor MVP.
  • the historical candidate motion information (indicated by HMVP) in the historical candidate list is accessed or updated in a first-in-first-out manner (as shown in FIG. 9 or 10).
  • the encoding method in the embodiment of the present application may further include:
  • the Reconstructed image Based on the residual image (that is, the residual value) of the current encoded image block and the predicted image (that is, the predicted pixel value) of the current encoded image block obtained by the inter prediction process, the Reconstructed image.
  • the historical candidate list is used to construct or During the process of updating the candidate motion information list of the current image block, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently encoded image block is skip / merge mode, the historical candidate list is used to construct the fusion.
  • the Q historical candidates arranged in order from the tail to the head are skipped; if the inter prediction mode of the currently encoded image block is the inter MVP mode, when the historical candidate list is used to construct the motion vector prediction candidate list, Skip the Q historical candidates in order from the tail to the head; compared to the use of the historical candidate list (assuming length L) in the prior art to construct a fusion motion information candidate list (assuming length K) and motion vector prediction candidate list (Assume length is J), you need L times K and L times J duplicate search, respectively.
  • the number of duplicate entry checking operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thus the encoding. Decoding performance.
  • FIG. 8 is an exemplary flowchart of an image decoding method according to the first embodiment of the present application.
  • the method may be performed by a video decoder (for example, video decoder 30) or an electronic device (for example, devices 1200, 1300) with video decoding functions.
  • the method may include the following steps:
  • the syntax elements such as skip_flag, merge_flag, and pred_mode are parsed from the bitstream.
  • one or more of skip_flag, merge_flag, and pred_mode are used to indicate the inter prediction of the currently decoded image block. mode.
  • the value of cu_skip_flag is 0, which indicates that the inter-prediction mode of the current image block is not a skip mode
  • the value of cu_skip_flag is 1, which indicates that the inter-prediction mode of the current image block is a skip mode
  • the prediction mode of the image block is inter inter prediction mode.
  • a value of pred_mode_flag is 1 indicates that the prediction mode of the current image block is intra intra prediction mode.
  • a value of merge_flag is 0, which indicates that the inter prediction mode of the current image block is not In merge mode
  • the value of merge_flag is 1, indicating that the inter prediction mode of the current image block is the merge mode.
  • the candidate motion information list corresponding to the inter prediction mode of the currently decoded image block is the merged motion information candidate list merge candidate list; if the frame of the currently decoded image block
  • the inter prediction mode is an inter MVP mode (for example, AMVP mode), and the candidate motion information list corresponding to the inter prediction mode of the currently decoded image block is a motion vector prediction candidate list MVP candidate list; the historical candidate list is different from the candidate List of exercise information.
  • the method of using the historical candidate list to construct or update the candidate motion information list of the currently decoded image block includes: ordering from the tail to the head of the historical candidate list, checking the target historical candidate motion information and the existing candidate motion information in the candidate motion information list. Whether the candidate motion information is the same; if different, the target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: an order from the tail to the head in the historical candidate list.
  • the historical candidate motion information other than the arranged Q historical candidate motion information, where Q is a positive integer.
  • the historical candidate list in the process of constructing the candidate motion information list, is introduced and the repetitive check of some historical candidates is selectively skipped; or the candidate motion information may be generated After the list (for example, the candidate motion information list is generated in a conventional manner), the historical candidate list is used to update the candidate motion information list of the current image block. The latter will be explained in detail below.
  • generating a candidate list of fused motion information may include:
  • Spatial and temporal candidates with the current block are added to the candidate list of fused motion information for the current block.
  • the spatial fusion candidates include A0, A1, B0, B1, and B2, and the time domain fusion candidates include T0 and T1.
  • the candidates for time-domain fusion also include candidates provided by the adaptive time-domain motion vector prediction (ATMVP) technology.
  • ATMVP adaptive time-domain motion vector prediction
  • the embodiment of the present application does not limit the process related to generating a candidate list of fused motion information. This process may be performed by using a method in HEVC or VTM, or other methods of generating a candidate list of fused motion information.
  • the motion vector prediction candidate list may be generated by using a method in HEVC or VTM, or other methods of generating a motion vector prediction candidate list may be adopted, which is not limited in this embodiment of the present application.
  • Updating the candidate motion information list (fused motion information candidate list or motion vector prediction candidate list) of the current image block using the historical candidate list may include one of the following methods:
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than 0.
  • the preset number Q is a positive integer greater than 0.
  • the fusion motion information candidates in the fusion motion information candidate list obtained in S8031 are the same, if they are different, they are added to the fusion motion information candidate list, and if they are the same, the next historical candidate in the historical candidate list is checked.
  • the preset number P is a positive integer greater than 0.
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than 0.
  • the preset number Q is a positive integer greater than 0.
  • the historical candidates in the historical candidate list are not added to the motion vector prediction candidate list.
  • the historical candidates in the historical candidate list are not added to the fusion motion information candidate list.
  • the preset number P is a positive integer greater than 0.
  • the historical candidates in the historical candidate list are added to the fusion motion information candidate list and the motion vector prediction candidate list, and can be placed after the time domain motion information candidate (time domain motion vector candidate), or For other positions, the present application does not limit the positions in the two lists. It should be understood that, in the process of constructing the candidate motion information list, the historical candidates in the historical candidate list may be placed after the time domain motion information candidate (time domain motion vector candidate); or it may be in the candidate motion information list. After the construction is completed, the historical candidates in the historical candidate list are placed after the existing spatial and temporal motion information candidates; this application does not limit this.
  • fusion motion information candidate list after the historical candidate is added to the fusion motion information candidate list, other types of fusion candidates may be added, such as bi-predictive merge candidate and zero motion vector fusion candidate. (zero motion vector merge candidate).
  • zero motion vector merge candidate The embodiment of the present application does not involve a process of joining other types of fusion candidates, and the process may be performed by a method in HEVC or VTM, or other methods.
  • S8033 Determine target candidate motion information from the candidate motion information list, predict motion information of the currently decoded image block (referred to as the current block) based on the target candidate motion information, and perform motion compensation based on the motion information of the currently decoded image block.
  • the predicted pixel value of the current image block also known as performing inter prediction on the current decoded image block according to the motion information of the current decoded image block to obtain the predicted image (that is, the predicted pixel value) of the current decoded image block ).
  • the target candidate motion information is determined from the candidate motion information list according to an index identifier (such as a fusion index or a motion vector prediction value index) parsed from the bitstream, and the index identifier is used to indicate the candidate motion information
  • an index identifier such as a fusion index or a motion vector prediction value index
  • the target candidate motion information indicated by the fusion index carried in the code stream is the motion information of the current decoded image block; or, if the current block is in the Inter MVP mode, the The target candidate motion information indicated by the motion vector prediction value index carried in the code stream is a motion vector prediction value, based on the motion vector prediction value and the motion vector residual value of the current image block parsed from the code stream MVD (and inter prediction direction, reference frame index, etc.) to determine motion information of the currently decoded image block.
  • the residual information and the predicted image are added to obtain a reconstructed image of the current block; if the current block has no residual, the predicted image is a reconstructed image of the current block.
  • the embodiment of the present invention may further include:
  • the obtained The reconstructed image of the currently decoded image block is described. For example, the predicted image and the residual image are added to obtain a reconstructed image of the current block.
  • the embodiment of the present invention may further include:
  • S802 During the decoding process of the currently decoded image block, load a historical candidate list, so as to use the historical candidate list to construct or update the candidate motion information list of the current image block;
  • L is a positive integer greater than 0.
  • the historical candidate list For the initialization process of the historical candidate list, refer to the prior art. For example, at the beginning of a slice (SLICE), the historical candidate list may be emptied. Other methods for initializing the historical candidate list may also be adopted, which is not limited in this application.
  • step S802 may be performed after step S801, or may be performed before step S801; the remaining steps are not illustrated here one by one.
  • updating the historical candidate list using the motion information of the currently decoded image block as described in step S805 includes:
  • the motion information of the current decoded image block (referred to as the current block) is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and Adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
  • the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information
  • the historical candidate list is described.
  • a method for judging or comparing whether the motion information of the current block is the same as a certain historical candidate motion information in the historical candidate list is not limited. It can be that the two pieces of motion information are completely the same, or that the two pieces of motion information are the same after some processing, for example, the results of two motion vectors shifted to the right by 2 bits are the same.
  • updating the historical candidate list using the motion information of the currently decoded image block as described in step S805 includes:
  • the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last candidate) to join the historical candidate list.
  • the motion information of the current block is compared with the historical candidates in the historical candidate list; if a historical candidate is the same as the current block motion information, the historical candidate is compared. Remove from historical candidate list. Check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the historical candidate list.
  • the historical candidate list size is checked. If the historical candidate list size does not exceed a preset list size (also called a list length or table size), the motion information of the current block is taken as the latest historical candidate. Motion information is added to the tail of the historical candidate list; if the historical candidate list size reaches a preset list size (also known as the list length or table size), the historical candidate running information at the head of the historical candidate list is removed And add the motion information of the current block as the latest historical candidate motion information to the tail of the historical candidate list.
  • a preset list size also called a list length or table size
  • the historical candidate list is used to construct or update.
  • the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently decoded image block is skip / merge mode, the fusion motion is constructed using the historical candidate list.
  • the information candidate list is used, skip the Q historical candidates in the order from the tail to the head.
  • the inter prediction mode of the currently decoded image block is the inter MVP mode
  • the historical candidate list when using the historical candidate list to construct the motion vector prediction candidate list, skip Q historical candidates arranged in order from the tail to the head; compared with the historical candidate list (assuming length L) is used in the prior art to construct a fusion motion information candidate list (assuming length K) and a motion vector prediction candidate list ( When the length is assumed to be J), L times K and L times J times the duplicate search are required.
  • the number of duplicate check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thus encoding and decoding. performance.
  • the main difference between the second embodiment of the present application and the previous embodiment is that the coding mode of the coding block where the candidate is located in the candidate motion information candidate list and the motion vector prediction candidate list is used to skip the corresponding candidate.
  • the coding mode of the coding block (CU) where each fused motion information candidate is located is recorded.
  • the coding mode of the coding block where the fused motion information candidate is located is called the fusion motion information candidate.
  • the encoding mode of the fused motion information candidate in this embodiment refers to an inter prediction mode of the fused motion information candidate.
  • the coding mode of the coding block (CU) where each motion vector prediction candidate is located is recorded.
  • the coding mode of the coding block where the motion vector prediction candidate is located is recorded.
  • This coding mode is called the motion vector prediction candidate.
  • the coding mode of the motion vector prediction candidate in this embodiment refers to an inter prediction mode of the motion vector prediction candidate.
  • Updating the candidate motion information list (fused motion information candidate list or motion vector prediction candidate list) of the current image block using the historical candidate list may include one of the following methods:
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. Then, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
  • step S8031 Before checking whether it is the same as a certain fused motion information candidate in the fused motion information candidate list obtained in step S8031 (that is, to perform a duplicate check), first check whether the coding mode of the fused motion information candidate is an inter MVP mode. If the coding mode of the fused motion information candidate is inter MVP mode, it is not checked whether the fused motion information candidate is the same as the historical candidate, or the fused motion information candidate is considered different from the historical candidate; if the coding mode of the fused motion information candidate is not inter MVP mode, it is checked whether the fusion motion information candidate and the historical candidate are the same.
  • the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. Then, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
  • the coding mode of the historical candidate is inter MVP mode. If the coding mode of the historical candidate is inter MVP mode, directly add the historical candidate to the fusion motion information candidate list (that is, there is no need to check the historical candidate and the fusion motion. Whether the information candidates are the same, or if the historical candidate is considered to be different from the fused motion information candidate); if the coding mode of the historical candidate is not an inter-MVP mode, continue to the next step, that is, check a certain candidate in the fused motion information candidate list obtained from step S8031 Before the fusion motion information candidates are the same (that is, to check for duplicates), first check whether the coding mode of the fusion motion information candidate is the inter MVP mode.
  • the coding mode of the historical candidate is not the inter MVP mode and the coding mode of the fused motion information candidate is the inter MVP mode, there is no need to check whether the fused motion information candidate is the same as the current historical candidate.
  • the candidates are different.
  • the coding mode of the historical candidate is not an inter MVP mode and the coding mode of the fused motion information candidate is not an inter MVP mode, it is checked whether the fused motion information candidate is the same as the historical candidate. For example, after the motion information of the current image block is predicted, it will also be used as a historical candidate.
  • the decoder will parse the encoding mode of the current image block from the code stream.
  • the motion information of the current block and the encoding mode information of the current block are stored as information of historical candidates.
  • the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
  • the inter prediction mode of the image block where the current historical candidate is located and the inter prediction mode of the image block where the current candidate in the candidate motion information list is the inter MVP mode the larger the probability The two (that is, the current candidate in the current historical candidate and the candidate motion information list) are different from each other, and the repetitive check of the two is skipped.
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. Then, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
  • Step S8031 Check whether the coding mode of the historical candidate is inter MVP mode. If the coding mode of the historical candidate is inter MVP mode, directly add the historical candidate to the fusion motion information candidate list (the historical candidate is different from the fusion motion information candidate by default). ; If the coding mode of the historical candidate is not the inter MVP mode, continue to the next step, that is, check whether it is the same as a fusion motion information candidate in the fusion motion information candidate list obtained in step S8031 (that is, to perform a duplicate check).
  • the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
  • the probability of the next two (That is, the current candidate in the current history and the candidate in the candidate motion information list) are different from each other, and skip the repetitive check of the two.
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero.
  • the preset number B is a positive integer greater than 0:
  • step S8031 Before checking whether the historical candidate is the same as a fusion motion information candidate in the fusion motion information candidate list obtained in step S8031 (that is, to perform a duplicate check), first check whether the coding modes of the fusion motion information candidate and the historical candidate are both inter MVP mode. If both coding modes are inter MVP mode, it is not necessary to check whether the fusion motion information candidate and the historical candidate are the same, or it is considered that the two are different in the repeatability check. Conversely, if at least one of the two encoding modes is not an inter-MVP mode, it is checked whether the fusion motion information candidate is the same as the historical candidate.
  • the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
  • the inter-prediction mode of the image block where the current historical candidate is located and the inter-prediction mode of the image block where the current candidate in the candidate motion information list is the inter MVP mode both (ie The current historical candidates and the current candidates in the candidate motion information list are different from each other, and the repetitive check of the two is skipped.
  • the coding mode of the fused motion information candidate is the inter prediction mode of the image block where the fused motion information candidate is located;
  • the coding mode of the historical candidate is the inter prediction mode of the image block where the historical candidate is located.
  • the historical candidate list to update the motion vector prediction candidate list of the current image block, in addition to performing a similar process to the historical candidate whose reference frame index is consistent with the target reference frame index, it may also include one of the following methods:
  • the order from the tail to the head of the history candidate list is checked and added to a preset number P of history candidates, and the preset number P is a positive integer greater than 0.
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero.
  • the preset number P is a positive integer greater than 0.
  • the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero.
  • the history candidates in the history candidate list are not added to the motion vector prediction candidate list.
  • the historical candidates in the historical candidate list are added to the fusion motion information candidate list and the motion vector prediction candidate list, and can be placed after the time domain motion information candidate (time domain motion vector candidate), or
  • the embodiments of the present application do not limit the positions in the two lists.
  • fusion motion information candidate list after the historical candidate is added to the fusion motion information candidate list, other types of fusion candidates may be added, such as bi-predictive merge candidate and zero motion vector fusion candidate. (zero motion vector merge candidate).
  • the present invention does not involve a process of adding other types of fusion candidates, and the process may be performed by a method in HEVC or VTM, or other methods.
  • the motion information of the current block is compared with the historical candidates in the historical candidate list; if a historical candidate is the same as the current block motion information, the Historical candidates are removed from the historical candidate list. And, check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. The motion information of the current block is added to the historical candidate list.
  • the inter prediction mode of the image block where the new historical candidate is located needs to be recorded. In other words, each historical candidate added to the historical candidate list is not only the MV, but also the inter prediction mode of the image block where the historical candidate is located.
  • the method for determining whether the current block motion information is the same as a certain historical candidate in the historical candidate list is not limited. It can be that the two pieces of motion information are completely the same, or that the two pieces of motion information are the same after some processing, for example, the results of two motion vectors shifted to the right by 2 bits are the same.
  • the historical candidate list is used to construct or update the fused motion information candidate list according to the inter prediction mode of the image block where the historical candidate, the fused motion information candidate and the motion information prediction candidate are located.
  • the duplicate item check process of some historical candidates can be selectively skipped, which can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number, reducing codec time, which helps to improve the efficiency of inter-frame prediction, thereby improving codec performance.
  • FIG. 11A and FIG. 11B illustrate a method of adding history candidates to the fusion motion information candidate list to increase the number of merged / skip fusion motion information candidates and improve prediction efficiency.
  • the construction method of the fusion motion information candidate list added to the historical candidate is as follows:
  • Steps 1111 and 1113 Add the spatial domain candidate and the time domain candidate adjacent to the spatial domain of the current block to the fusion motion information candidate list of the current block.
  • a fusion motion information candidate list is generated. If the current CU or current decoded image block is in inter mode, a motion vector prediction candidate list is generated. The historical candidates in the historical candidate list are added to the fused motion information candidate list or the motion vector prediction candidate list.
  • generating a candidate list of fused motion information specifically includes:
  • the spatial and temporal candidates of the current block are added to the fusion motion information candidate list of the current block, and the method is the same as that in HEVC.
  • the spatial fusion candidates include A0, A1, B0, B1, and B2, and the time domain fusion candidates include T0 and T1.
  • the time-domain fusion candidates also include candidate motion information provided by the adaptive time-domain motion vector prediction (ATMVP) technology.
  • ATMVP adaptive time-domain motion vector prediction
  • the process of generating the candidate list of fused motion information may be performed by a method in HEVC or VTM, or other methods of generating the candidate list of fused motion information, which are not limited in this application.
  • the motion vector prediction candidate list may be generated by using the method in HEVC (High Efficiency Video Coding) or VTM, or other methods of generating a motion vector prediction candidate list.
  • HEVC High Efficiency Video Coding
  • VTM Video Coding
  • Step 1131 When the historical candidate list is added to the fused motion information candidate list or the motion vector prediction candidate list, the historical candidates with a preset number Q at the tail of the historical candidate list are skipped, or the historical candidate, the fused motion information candidate, and the motion information are predicted.
  • the candidate inter prediction mode skips the duplicate item check process, thereby reducing the number of duplicate item check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list.
  • Step 1135 Add other types of fused motion information candidates, such as bi-predictive candidates and zero motion vector candidates.
  • the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list is the current slice or current image or the current one or more image coding units At the CTU level, in other words, during the encoding or decoding of multiple image blocks under the same slice, this continuously updated historical candidate list can be used.
  • FIG. 12 is a schematic block diagram of an inter prediction apparatus 1200 according to an embodiment of the present application. It should be noted that the inter prediction device 1200 is applicable to both the inter prediction of decoded video images and the inter prediction of encoded video images. It should be understood that the inter prediction device 1200 here may correspond to FIG. 2
  • the inter prediction unit 43 may correspond to the inter prediction unit 82 in FIG. 3, and the inter prediction device 1200 may include:
  • the candidate motion information list determining unit 1201 is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The order of the historical candidate list from the tail to the head is checked to check whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, the target historical candidate motion information is added to the In the candidate motion information list; the target historical candidate motion information is: historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, where Q is a positive integer;
  • the inter prediction processing unit 1202 is configured to perform inter prediction on the current image block based on the candidate motion information list.
  • the inter prediction processing unit 1202 here may correspond to the motion estimation unit 42 and the motion compensation unit 44 in FIG. 2, or may correspond to the motion compensation unit 82 in FIG. 3.
  • the target historical candidate motion information is X-th historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, and the X-th historical candidate motion information
  • the corresponding reference frame index is the same as the target reference frame index.
  • the device is configured to decode a current image block, and the target reference frame index is a reference frame index of the current image block parsed from a code stream.
  • the candidate motion information list determination unit 1201 is specifically configured to: :
  • the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode
  • the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  • the candidate motion information list determination unit 1201 is specifically configured to: :
  • the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
  • the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode, check whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  • the candidate motion information list determination unit 1201 is specifically configured to: :
  • the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
  • the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first frame In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
  • the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first frame In the case of the inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  • the candidate motion information list determination unit 1201 is specifically configured to: :
  • the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode
  • the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode
  • At least one of the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  • the apparatus is configured to encode the current image block
  • the inter prediction processing unit 1202 is specifically configured to:
  • the apparatus is configured to decode the current image block
  • the inter prediction processing unit 1202 is specifically configured to:
  • the device further includes:
  • An update unit (not shown) is used to update the historical candidate list by using the motion information of the current image block.
  • the candidate motion information list is a merged motion information candidate list merge candidate list
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, for example, AMVP candidate list).
  • MVP candidate list for example, AMVP candidate list
  • the historical candidate list is used to construct or update the current In the process of candidate motion information list of image blocks, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently decoded image block is skip / merge mode, the fusion motion information is constructed using the historical candidate list.
  • the candidate list skip the Q historical candidates arranged in order from the tail to the head; if the inter prediction mode of the currently decoded image block is the inter MVP mode, when using the historical candidate list to construct the motion vector prediction candidate list, skip Q historical candidates arranged in order from the tail to the head; compared with the historical candidate list (assuming length L) is used in the prior art to construct a fusion motion information candidate list (assuming length K) and a motion vector prediction candidate list (assuming When the length is J), it needs L times K and L times J times to search for duplicates.
  • the number of duplicate entry checking operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thereby improve Codec performance.
  • FIG. 13 is a schematic block diagram of an inter prediction apparatus 1300 in an embodiment of the present application. It should be noted that the inter prediction device 1300 is applicable to both the inter prediction of decoded video images and the inter prediction of encoded video images. It should be understood that the inter prediction device 1300 here may correspond to FIG. 2
  • the inter prediction unit 43 may correspond to the inter prediction unit 82 in FIG. 3, and the inter prediction device 1300 may include:
  • the candidate motion information list determining unit 1301 is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block; wherein, using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The inter prediction mode of the image block where the current historical candidate motion information HMVP in the historical candidate list is located and / or the inter prediction mode of the image block where the existing candidate motion information candidate in the candidate motion information list is determined whether to execute Repeatability check, and determine whether to add the current historical candidate motion information HMVP to the candidate motion information list according to the repeatability check result of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list Wherein M is an integer greater than or equal to 0;
  • the inter prediction processing unit 1302 is configured to perform inter prediction on the current image block based on the candidate motion information list.
  • the inter prediction processing unit 1202 here may correspond to the motion estimation unit 42 and the motion compensation unit 44 in FIG. 2, or may correspond to the motion compensation unit 82 in FIG. 3.
  • the candidate motion information list determination unit 1301 is specifically configured to:
  • the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode
  • the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  • the candidate motion information list determination unit 1301 is specifically configured to:
  • the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
  • the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode, check whether the current historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  • the candidate motion information list determination unit 1301 is specifically configured to:
  • the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
  • the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
  • the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the current candidate motion information.
  • the candidate motion information list determination unit 1301 is specifically configured to:
  • the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode
  • the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode
  • At least one of the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  • the apparatus is configured to encode the current image block
  • the inter prediction processing unit 1302 is specifically configured to:
  • the apparatus is configured to decode the current image block
  • the inter prediction processing unit 1302 is specifically configured to:
  • the device further includes:
  • An update unit (not shown) is used to update the historical candidate list by using the motion information of the current image block.
  • the candidate motion information list is a merged motion information candidate list merge candidate list
  • the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, for example, AMVP candidate list).
  • MVP candidate list for example, AMVP candidate list
  • a fusion motion information candidate list (assuming length K) and a motion vector prediction candidate list (assuming length J) are constructed.
  • L times K and L times J repeated item searches are required.
  • the inter prediction mode of the image block where the candidate is located is predicted based on historical candidates, fusion motion information candidates, and / or motion information (for example, for inter MVP mode, the surrounding block motion vector is used as the predicted value, and the MVD is added as the motion vector based on the predicted value.
  • the historical candidate list is used to construct or update the fusion motion information candidate list.
  • the duplicate item check process of some historical candidates can be selectively skipped, which can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number, reducing codec time, which helps to improve inter prediction efficiency Code performance.
  • FIG. 14 is a schematic block diagram of an implementation manner of an encoding device or a decoding device (referred to as a decoding device 1400) according to an embodiment of the present application.
  • the decoding device 1400 may include a processor 1410, a memory 1430, and a bus system 1450.
  • the processor and the memory are connected through a bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory.
  • the memory of the encoding device stores program code, and the processor can call the program code stored in the memory to perform various video encoding or decoding methods described in this application, especially video encoding in various inter prediction modes or intra prediction modes. Or decoding methods, and methods for predicting motion information in various inter or intra prediction modes. To avoid repetition, it will not be described in detail here.
  • the processor 1410 may be a Central Processing Unit (“CPU”), and the processor 1410 may also be another general-purpose processor, digital signal processor (DSP), or special-purpose integration. Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 1430 may include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may also be used as the memory 1430.
  • the memory 1430 may include code and data 1431 accessed by the processor 1410 using the bus 1450.
  • the memory 1430 may further include an operating system 1433 and an application program 1435.
  • the application program 1435 includes at least one program that allows the processor 1410 to perform the video encoding or decoding method described in this application (especially the inter prediction method described in this application).
  • the application programs 1435 may include applications 1 to N, which further include a video encoding or decoding application (referred to as a video decoding application) that executes the video encoding or decoding method described in this application.
  • the bus system 1450 may include a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are marked as the bus system 1450 in the figure.
  • the decoding device 1400 may further include one or more output devices, such as a display 1470.
  • the display 1470 may be a touch-sensitive display or a touch display, which incorporates the display with a touch-sensitive unit that is operable to sense a touch input.
  • the display 1470 may be connected to the processor 1410 via a bus 1450.
  • Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol) .
  • computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) a communication medium such as a signal or carrier wave.
  • a data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures used to implement the techniques described in this application.
  • the computer program product may include a computer-readable medium.
  • such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or may be used to store instructions or data structures Any form of desired program code and any other medium accessible by a computer.
  • any connection is properly termed a computer-readable medium.
  • a coaxial cable is used to transmit instructions from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave. Wire, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of media.
  • the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other temporary media, but are instead directed to non-transitory tangible storage media.
  • magnetic disks and compact discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, and optical discs use lasers to reproduce optically data. Combinations of the above should also be included within the scope of computer-readable media.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable logic arrays
  • the term "processor” as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein.
  • the functions described by the various illustrative logical blocks, units, and steps described herein may be provided within dedicated hardware and / or software units configured for encoding and decoding, or Into the combined codec.
  • the techniques can be fully implemented in one or more circuits or logic elements.
  • various illustrative logical boxes, units, and units in the video encoder 20 and the video decoder 30 can be understood as corresponding circuit devices or logic elements.
  • the techniques of this application may be implemented in a wide variety of devices or devices, including a wireless handset, an integrated circuit (IC), or a group of ICs (eg, a chipset).
  • IC integrated circuit
  • a group of ICs eg, a chipset
  • Various components, units, or units are described in this application to emphasize functional aspects of the apparatus for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units.
  • the various units may be combined in a codec hardware unit in combination with suitable software and / or firmware, or through interoperable hardware units (including one or more processors as described above) provide.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An inter prediction method and related products. The method comprises: using a historical candidate list to construct or update a candidate motion information list of the current image block; performing inter prediction on the current image block on the basis of the candidate motion information list; checking, in a sequence from the end to the head of the historical candidate list, whether target historical candidate motion information is identical to existing candidate motion information in the candidate motion information list; if not, adding the target historical candidate motion information into the candidate motion information list; the target historical candidate motion information being: historical candidate motion information other than the Q pieces of historical candidate motion information of the historical candidate list ordered from the end to the head, and Q being a positive integer. The present method enables reduction of the number of repeated item check operations when adding the historical candidate list into a merged motion information candidate list or a motion vector prediction candidate list.

Description

帧间预测方法、装置以及编解码器Inter prediction method, device and codec 技术领域Technical field
本申请涉及视频图像编解码领域,尤其涉及帧间预测方法、帧间预测装置以及相应的编码器和解码器。The present application relates to the field of video image coding and decoding, and particularly to an inter prediction method, an inter prediction device, and a corresponding encoder and decoder.
背景技术Background technique
通过视频压缩技术,例如MPEG-1视频、MPEG-2视频、ITU-T H.262/MPEG-2、ITU-T H.263、ITU-T H.264/MPEG-4第10部分高级视频编码(Advanced Video Coding,AVC)、ITU-T H.265/高效视频编码(High Efficiency Video Coding,HEVC)、正在进行中的ITU-T H.266/多用途视频编码(Versatile Video Coding,VVC)标准和所述标准的扩展部分中所描述的那些视频压缩技术,设备之间可以实现高效地发射及接收数字视频信息。通常情况下,视频序列的图像被划分成图像块进行编码或解码。Through video compression technology, such as MPEG-1 video, MPEG-2 video, ITU-T H.262 / MPEG-2, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (Advanced Video Coding, AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC) standards in progress And those video compression technologies described in the extension of the standard, devices can efficiently transmit and receive digital video information. Generally, images of a video sequence are divided into image blocks for encoding or decoding.
视频压缩技术中,为了减少或去除视频序列中的冗余信息,引入了基于图像块的空间预测(帧内预测,intra prediction)和/或时间预测(帧间预测,inter prediction)。其中,帧间预测模式可以包括但不限于:跳过/融合模式(skip/merge mode)与非跳过/融合模式(例如高级运动矢量预测模式(AMVP mode))等,且均是利用多运动信息竞争的方法进行帧间预测的。In video compression technology, in order to reduce or remove redundant information in a video sequence, spatial prediction (intra prediction) and / or temporal prediction (inter prediction) based on image blocks are introduced. Among them, the inter prediction mode may include but is not limited to: skip / merge mode (skip / merge mode) and non-skip / merge mode (such as advanced motion vector prediction mode (AMVP mode)), etc., and both use multi-motion The information contention method performs inter prediction.
帧间预测过程中,引入了包括多组运动信息(亦称为多个候选运动信息)的候选运动信息列表(简称候选列表),例如,编码器可以利用从该候选列表中选出一组合适的候选运动信息来预测当前编码图像块的运动信息(例如运动矢量),进而得到当前编码图像块的最佳参考图像块(即预测块)。帧内预测过程中,有时候也引入了包括多组运动信息(亦称为block vector)的候选列表。In the inter prediction process, a candidate motion information list (referred to as a candidate list) including multiple sets of motion information (also referred to as multiple candidate motion information) is introduced. For example, the encoder can select a suitable set from the candidate list Candidate motion information to predict the motion information (such as a motion vector) of the current coded image block, and then obtain the best reference image block (that is, the prediction block) of the current coded image block. In the intra prediction process, a candidate list including multiple sets of motion information (also called block vectors) is sometimes introduced.
然而,无论跳过/融合模式还是非跳过/融合模式,如何提高帧间预测效率,从而提高编解码性能是持续需要解决的问题。However, no matter the skip / fusion mode or non-skip / fusion mode, how to improve the inter prediction efficiency and thus improve the performance of codecs is a problem that needs to be solved continuously.
发明内容Summary of the Invention
本申请实施例提供帧间预测方法、帧间预测装置及相应的视频编码器和视频解码器,以提高帧间预测效率,从而提高编解码性能。The embodiments of the present application provide an inter prediction method, an inter prediction device, and a corresponding video encoder and video decoder, so as to improve the inter prediction efficiency and thus the encoding and decoding performance.
第一方面,本申请实施例提供一种帧间预测方法,所述方法包括:In a first aspect, an embodiment of the present application provides an inter prediction method, where the method includes:
使用历史候选列表构建或更新当前图像块的候选运动信息列表;Use the historical candidate list to construct or update the candidate motion information list of the current image block;
基于所述候选运动信息列表,对所述当前图像块进行帧间预测;Performing inter prediction on the current image block based on the candidate motion information list;
其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中(例如,将所述目标历史候选运动信息加入到所述候选运动信息列表的尾部);所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息(例如,跳过所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息),Q为正整数。Wherein, the use of the historical candidate list to construct or update the candidate motion information list of the current image block includes: ordering from the tail to the head of the historical candidate list, checking the target historical candidate motion information and the candidate motion information list. Whether the existing candidate motion information is the same; if different, add the target historical candidate motion information to the candidate motion information list (for example, add the target historical candidate motion information to the tail of the candidate motion information list ); The target historical candidate motion information is: historical candidate motion information other than Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list (for example, skipping from the historical candidate list Q historical candidate motion information arranged in order from tail to head), where Q is a positive integer.
在另一种实现方式下,可以是不跳过所述历史候选列表中从尾部到头部的顺序排列的Q1个历史候选运动信息,但跳过从尾部到头部的顺序排在前述Q1个历史候选运动信息之后的Q2个历史候选运动信息,例如Q1=0,1,2,3,4,5,Q2=1,2,3,4,5,即Q1为整数,Q2为正整数。In another implementation manner, the Q1 historical candidate motion information arranged in order from the tail to the head in the historical candidate list may not be skipped, but the skipped order from the tail to the head is ranked in the aforementioned Q1 The Q2 historical candidate motion information after the historical candidate motion information, for example, Q1 = 0,1,2,3,4,5, Q2 = 1, 2,3,4,5, that is, Q1 is an integer and Q2 is a positive integer.
应当理解的是,在编码过程中,这里的当前图像块(简称为当前块)可以理解为当前编码图像块(coding block);在解码过程中,这里的当前图像块(简称为当前块)可以理解为当前解码图像块(decoding block)。It should be understood that during the encoding process, the current image block (referred to as the current block) can be understood as the current encoding image block (coding block); during the decoding process, the current image block (referred to as the current block) can be It is understood as the current decoding image block.
例如,若所述候选运动信息列表中已有候选运动信息未达到预设数目,则从历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中已有候选运动信息是否相同;For example, if the candidate motion information in the candidate motion information list does not reach a preset number, the order from the tail to the head of the historical candidate list is checked for the target historical candidate motion information and the existing candidate in the candidate motion information list. Whether the movement information is the same;
例如,所述历史候选列表包括L个历史候选运动信息(亦称为历史候选项),所述历史候选运动信息为在先已编码或在先已解码图像块(例如在先已解码CU)的运动信息;L为大于0的正整数,Q为正整数(例如1,2,3,4,5)且0<Q<L。应当理解的是,如果历史候选列表中的历史候选项已达到最大允许数量时,L可理解为历史候选列表的长度;反之,L可理解为历史候选列表中当前包括的历史候选项的个数。For example, the historical candidate list includes L historical candidate motion information (also referred to as historical candidates), and the historical candidate motion information is a previously coded or previously decoded image block (for example, a previously decoded CU). Motion information; L is a positive integer greater than 0, Q is a positive integer (for example, 1,2,3,4,5) and 0 <Q <L. It should be understood that if the historical candidate list in the historical candidate list has reached the maximum allowable number, L can be understood as the length of the historical candidate list; otherwise, L can be understood as the number of historical candidates currently included in the historical candidate list. .
在不同示例方式下,所述历史候选列表可以是条带slice级别的,或者,所述历史候选列表可以是图像级别的,或者,所述历史候选列表可以是若干个CTU(CTU行)的级别的;或者,所述历史候选列表可以是CTU的级别的;可以采取先进先出的方式访问或更新所述历史候选列表。In different example manners, the historical candidate list may be slice-level, or the historical candidate list may be image-level, or the historical candidate list may be at the level of several CTUs (CTU lines) Alternatively, the historical candidate list may be CTU-level; the historical candidate list may be accessed or updated in a first-in-first-out manner.
例如,所述历史候选运动信息为当前图像块所属的条带slice中在先已解码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的图像中在先已解码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的CTU组(例如一个或多个CTU)中在先已解码图像块的运动信息;For example, the historical candidate motion information is motion information of a previously decoded image block in a slice to which the current image block belongs; for another example, the historical candidate motion information is a previously decoded image in an image to which the current image block belongs. Block motion information; for another example, the historical candidate motion information is motion information of a previously decoded image block in a CTU group (eg, one or more CTUs) to which the current image block belongs;
换言之,例如,所述历史候选列表是在当前图像块所属的条带的编码或解码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的图像的编码或解码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的CTU组(例如一个或多个CTU)的编码或解码过程中生成且更新的;In other words, for example, the historical candidate list is generated and updated during the encoding or decoding process of the slice to which the current image block belongs; and for example, the historical candidate list is the encoding or decoding process for the image to which the current image block belongs. Generated and updated; and for example, the historical candidate list is generated and updated during the encoding or decoding process of a CTU group (eg, one or more CTUs) to which the current image block belongs;
需要说明的是,候选运动信息列表不同于所述历史候选列表;候选运动信息列表是图像块级别的(不同的图像块具有与之分别对应的候选运动信息列表),而历史候选列表(亦称为历史候选表)是当前slice(条带)或当前图像或者当前一个或多个编码树单元CTU级别的,例如,同一个slice下的多个图像块的编码或解码过程中,都可以使用这个不断更新的历史候选列表。It should be noted that the candidate motion information list is different from the historical candidate list; the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list (also known as Is the historical candidate list) is the current slice (slice) or current image or the current CTU level of one or more coding tree units. For example, during encoding or decoding of multiple image blocks in the same slice, this can be used. Constantly updated historical candidate list.
在第一方面的某些实现方式中,所述候选运动信息列表包括所述当前图像块的一个或多个空域参考块的运动信息(亦称为空域候选)和/或当前图像块的一个或多个时域参考块的运动信息(亦称为时域候选);In some implementations of the first aspect, the candidate motion information list includes motion information of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or one or Motion information of multiple time-domain reference blocks (also referred to as time-domain candidates);
或者,所述候选运动信息列表包括所述当前图像块的一个或多个空域参考块的运动矢量(亦称为空域候选)和/或当前图像块的一个或多个时域参考块的运动矢量(亦称为时域候选)。Alternatively, the candidate motion information list includes motion vectors of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or motion vectors of one or more time domain reference blocks of the current image block. (Also known as time domain candidate).
需要说明的是,这里的空域参考块可以包括当前图像块所在图像中的、与当前图像块邻近的一个或多个空域邻近块(亦称为空域邻近位置)。例如:位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2,应理解的是,这里的空域邻近块可以为4*4的像素。It should be noted that the spatial domain reference block herein may include one or more spatial domain neighboring blocks (also referred to as spatial domain neighboring positions) adjacent to the current image block in the image where the current image block is located. For example: a fourth spatial domain neighboring block A0 located on the lower left side of the current image block, a first spatial domain neighboring block A1 located on the left side of the current image block, and a third spatial domain neighboring block B0 located on the upper right side of the current image block, The second spatial domain neighboring block B1 located on the upper side of the current image block, or the fifth spatial domain neighboring block B2 located on the upper left side of the current image block, it should be understood that the spatial domain neighboring block here may be 4 * 4 pixels .
需要说明的是,这里的时域参考块可以包括参考图像中、与并置块(co-located块)邻近的一个或多个空域参考块,和/或,所述并置块中的一个或多个子块,其中,所述并置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块,或者所述并置块为参考图像中与所述当前图像块具有指定位置偏移量的具有相同的大小、形状的图像块。这里的参考图像指的是已重建的图像,具体的,这里的参考图像指的是一个或多个参考图像列表中的参考图像,例如可以是指定参考图像列表中的指定参考图像索引对应的参考图像,也可以是默认的参考图像列表中的处于首位置的参考图像,本申请对此不作限定。一种示例下,所述时域参考块包括:所述当前图像块的并置块(co-located块)的右下空域邻近块H,所述并置块的左上中间块C0,所述并置块的右下中间块C3、所述并置块的左上块TL,或所述并置块的右下块BR。It should be noted that the time-domain reference block herein may include one or more spatial-domain reference blocks adjacent to a co-located block (co-located block) in the reference image, and / or, one or more of the co-located blocks or A plurality of sub-blocks, wherein the collocated block is an image block having the same size, shape, and coordinates in the reference image as the current image block, or the collocated block is a reference image having the same size and shape as the current image block Image blocks of the same size and shape with a specified position offset. The reference image here refers to a reconstructed image. Specifically, the reference image here refers to a reference image in one or more reference image lists. For example, it can be a reference corresponding to a specified reference image index in a specified reference image list. The image may also be the first reference image in the default reference image list, which is not limited in this application. In an example, the time-domain reference block includes: a lower-right spatial-domain neighboring block H of a co-located block of the current image block, a co-located block, an upper-left middle block C0, and the parallel The lower right middle block C3 of the collocated block, the upper left block TL of the collocated block, or the lower right block BR of the collocated block.
应当理解的是,本申请实施例的方法的执行主体可以是帧间预测装置,例如可以是视频编码器或视频解码器或具有视频编解码功能的电子设备,具体例如可以是视频编码器中的帧间预测单元,或者视频解码器中的帧间预测单元(例如运动补偿单元)。It should be understood that the execution subject of the method in the embodiment of the present application may be an inter prediction device, for example, it may be a video encoder or a video decoder or an electronic device with a video codec function. Specifically, for example, the An inter prediction unit, or an inter prediction unit (such as a motion compensation unit) in a video decoder.
可见,本申请实施例中,考虑到历史候选列表中最新的Q个历史候选较大概率可能与候选运动信息列表中已有候选运动信息重复(如图11B所示),使用历史候选列表构建或更新当前图像块的候选运动信息列表的过程中,跳过最新加入的Q个历史候选运动信息,比如,如果当前解码图像块的帧间预测模式为skip/merge模式,在使用历史候选列表构造融合运动信息候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;如果当前解码图像块的帧间预测模式为inter MVP模式,在使用历史候选列表构造运动矢量预测候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K和L乘以J次重复项查找,本申请能在具有相当的编码效率的前提下,减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, in the embodiment of the present application, considering that the latest Q historical candidates in the historical candidate list have a higher probability that may overlap with existing candidate motion information in the candidate motion information list (as shown in FIG. 11B), the historical candidate list is used to construct or During the process of updating the candidate motion information list of the current image block, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently decoded image block is skip / merge mode, the historical candidate list is used to construct the fusion. In the motion information candidate list, the Q historical candidates arranged in order from the tail to the head are skipped; if the inter prediction mode of the currently decoded image block is the inter MVP mode, when the historical candidate list is used to construct the motion vector prediction candidate list, Skip the Q historical candidates in order from the tail to the head; compared to the use of the historical candidate list (assuming length L) in the prior art to construct a fusion motion information candidate list (assuming length K) and motion vector prediction candidate list (Assume length is J), you need L times K and L times J duplicate search, respectively. Under the premise of encoding efficiency, the number of duplicate check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thus encoding and decoding. performance.
在第一方面的某些实现方式中,如果当前图像块的帧间预测模式为帧间运动矢量预测(inter MVP)模式,例如高级运动矢量预测模式,所述目标历史候选运动信息为所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的第X历史候选运动信息(例如,跳过所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息),其中,所述第X历史候选运动信息对应的参考帧索引与目标参考帧索引相同。In some implementations of the first aspect, if the inter prediction mode of the current image block is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector prediction mode, the target history candidate motion information is the history X-th historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the candidate list (for example, skipping the Q historical candidates arranged in order from the tail to the head in the historical candidate list Motion information), wherein the reference frame index corresponding to the Xth historical candidate motion information is the same as the target reference frame index.
其中,所述方法用于解码当前图像块,所述目标参考帧索引是从码流中解析出的当前图像块的参考帧索引。The method is used to decode a current image block, and the target reference frame index is a reference frame index of the current image block parsed from the code stream.
可见,历史候选列表中,有的历史候选MV对应的参考帧索引与目标参考帧索引不同,有的历史候选MV对应的参考帧索引与目标参考帧索引相同,只有参考帧索引与目标参考 帧索引相同的历史候选MV才涉及跟候选运动信息列表中的候选运动信息的重复性检查,本申请实施例能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目。It can be seen that in the historical candidate list, the reference frame index corresponding to some historical candidate MVs is different from the target reference frame index. The reference frame index corresponding to some historical candidate MVs is the same as the target reference frame index. Only the same historical candidate MV involves the repetitive check with the candidate motion information in the candidate motion information list. The embodiment of the present application can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number of.
在第一方面的某些实现方式中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:In some implementations of the first aspect, whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;应理解的是,即跳过目标历史候选运动信息与当前候选运动信息之间的重复项检查操作,直接转至检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode; it should be understood that the operation of checking duplicate items between the target historical candidate motion information and the current candidate motion information is skipped, and the process goes directly to checking the next candidate in the candidate motion information list. Whether the inter prediction mode of the image block where the motion information is located is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。应理解的是,对目标历史候选运动信息与所述当前候选运动信息的重复项检查完成之后,如果重复项检查结果指示目标历史候选运动信息与所述当前候选运动信息不同,则进一步检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information. It should be understood that after the duplicate item check on the target historical candidate motion information and the current candidate motion information is completed, if the result of the duplicate item check indicates that the target historical candidate motion information is different from the current candidate motion information, then further checking the Whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode.
其中,所述第一帧间预测模式为非融合模式非跳过模式的帧间预测模式,例如,所述第一帧间预测模式为帧间运动矢量预测(inter MVP)模式,例如高级运动矢量预测模式。The first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode. For example, the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
可见,本申请实施例中,根据候选运动信息(例如融合运动信息候选或运动信息预测候选)所在图像块的帧间预测模式,在使用历史候选列表构建或更新所述候选运动信息列表(例如融合运动信息候选列表或运动矢量预测候选列表)的过程中,能选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that in the embodiments of the present application, according to the inter prediction mode of the image block where the candidate motion information (for example, the fused motion information candidate or the motion information prediction candidate) is located, the candidate motion information list (for example, fusion Motion information candidate list or motion vector prediction candidate list), it is possible to selectively skip the duplicate check process of some historical candidates, which can further reduce the time when the historical candidate list is added to the fusion motion information candidate list or motion vector prediction candidate list The number of duplicate check operations reduces codec time, which helps to improve inter prediction efficiency and thus codec performance.
在第一方面的某些实现方式中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:In some implementations of the first aspect, whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;应理解的是,即跳过目标历史候选运动信息与所述候选运动信息列表中每项已有候选运动信息(例如A1位置的运动信息和B0位置的运动信息)之间的重复项检查操作,直接将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode, the target historical candidate motion information is added to the candidate motion information list; it should be understood that That is, skip the duplicate check operation between the target historical candidate motion information and each of the existing candidate motion information in the candidate motion information list (for example, the motion information at the A1 position and the motion information at the B0 position), and directly describe the Target historical candidate motion information is added to the candidate motion information list;
在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是 否相同。When the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode, check whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
其中,所述第一帧间预测模式为非融合模式非跳过模式的帧间预测模式,例如,所述第一帧间预测模式为帧间运动矢量预测(inter MVP)模式,例如高级运动矢量预测模式。The first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode. For example, the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
可见,本申请实施例中,根据历史候选所在图像块的帧间预测模式,在使用历史候选列表构建或更新候选运动信息列表(例如融合运动信息候选列表或运动矢量预测候选列表)的过程中,有选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, in the embodiment of the present application, according to the inter prediction mode of the image block where the historical candidate is located, in the process of constructing or updating a candidate motion information list (such as a fusion motion information candidate list or a motion vector prediction candidate list) using the historical candidate list, Selectively skip the duplicate check process of some historical candidates, which can further reduce the number of duplicate check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list, reducing the encoding and decoding time, thereby helping To improve the efficiency of inter-frame prediction, thereby improving the performance of encoding and decoding.
在第一方面的某些实现方式中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:In some implementations of the first aspect, whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;应理解的是,即跳过目标历史候选运动信息与所述候选运动信息列表中每项已有候选运动信息(例如A1位置的运动信息和B0位置的运动信息)之间的重复项检查操作,直接将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode, the target historical candidate motion information is added to the candidate motion information list; it should be understood that That is, skip the duplicate check operation between the target historical candidate motion information and each of the existing candidate motion information in the candidate motion information list (for example, the motion information at the A1 position and the motion information at the B0 position), and directly describe the Target historical candidate motion information is added to the candidate motion information list;
在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;应理解的是,即跳过目标历史候选运动信息与当前候选运动信息之间的重复项检查操作,直接转至检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first frame In the case of inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; it should be understood that the target historical candidate is skipped The duplicate item checking operation between the motion information and the current candidate motion information directly proceeds to check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。应理解的是,对目标历史候选运动信息与所述当前候选运动信息之间的重复项检查完成之后,如果重复项检查结果指示目标历史候选运动信息与所述当前候选运动信息不同,则进一步检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式。The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first frame In the case of the inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information. It should be understood that after the duplicate item check between the target historical candidate motion information and the current candidate motion information is completed, if the result of the duplicate item check indicates that the target historical candidate motion information is different from the current candidate motion information, a further check is performed. Whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode.
其中,所述第一帧间预测模式为非融合模式非跳过模式的帧间预测模式,例如,所述第一帧间预测模式为帧间运动矢量预测(inter MVP)模式,例如高级运动矢量预测模式。The first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode. For example, the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
可见,本申请实施例中,根据历史候选和/或候选运动信息(例如融合运动信息候选或运动信息预测候选)所在图像块的帧间预测模式,在使用历史候选列表构建或更新候选运动信息列表(例如融合运动信息候选列表或运动矢量预测候选列表)的过程中,有选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that in the embodiments of the present application, according to the inter prediction mode of the image block where the historical candidate and / or candidate motion information (such as the fused motion information candidate or the motion information prediction candidate) is located, the historical candidate list is used to construct or update the candidate motion information list (Such as a fusion motion information candidate list or a motion vector prediction candidate list), selectively skip part of the historical candidate's duplicate entry checking process, which can further reduce the historical candidate list to join the fusion motion information candidate list or motion vector prediction candidate. The number of duplicate entry checking operations in the list reduces codec time, which helps to improve inter prediction efficiency and thus codec performance.
在第一方面的某些实现方式中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:In some implementations of the first aspect, whether the checking target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list includes:
检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is in the candidate motion information list is The first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;应理解的是,即跳过目标历史候选运动信息与当前候选运动信息之间的重复项检查操作,直接转至检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; it should be understood that the target historical candidate motion information and the current candidate motion are skipped The operation of checking duplicate items between information directly goes to check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
其中,所述第一帧间预测模式为非融合模式非跳过模式的帧间预测模式,例如,所述第一帧间预测模式为帧间运动矢量预测(inter MVP)模式,例如高级运动矢量预测模式。The first inter prediction mode is an inter prediction mode that is not a fusion mode or a skip mode. For example, the first inter prediction mode is an inter motion vector prediction (inter MVP) mode, such as an advanced motion vector. Forecasting mode.
可见,本申请实施例中,根据历史候选和候选运动信息(例如融合运动信息候选或运动信息预测候选)所在图像块的帧间预测模式,在使用历史候选列表构建或更新候选运动信息列表(例如融合运动信息候选列表或运动矢量预测候选列表)的过程中,有选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, in the embodiment of the present application, according to the inter prediction mode of the image block where the historical candidate and candidate motion information (such as the fused motion information candidate or the motion information prediction candidate) are located, the historical candidate list is used to construct or update the candidate motion information list (for example, In the process of merging motion information candidate list or motion vector prediction candidate list), the skip check process of some historical candidates can be selectively skipped, so that the historical candidate list can be further reduced to be added to the fused motion information candidate list or motion vector prediction candidate list. The number of duplicate check operations is reduced, which reduces the encoding and decoding time, which helps to improve the efficiency of inter-frame prediction and improve the encoding and decoding performance.
在第一方面的某些实现方式中,所述方法用于编码所述当前图像块,所述基于所述候选运动信息列表,对当前图像块执行帧间预测,包括:In some implementations of the first aspect, the method is used to encode the current image block, and the performing inter prediction on the current image block based on the candidate motion information list includes:
根据率失真代价准则从所述候选运动信息列表中确定目标候选运动信息,例如,所述目标候选运动信息编码所述当前图像块的率失真代价最小;Determining target candidate motion information from the candidate motion information list according to a rate distortion cost criterion. For example, the target candidate motion information encodes the current image block with the lowest rate distortion cost;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,所述候选运动信息列表为融合运动信息候选列表merge candidate list,相应地,所述基于所述目标候选运动信息预测当前图像块的运动信息为:确定所述目标候选运动信息(例如最佳候选运动信息)为所述当前编码图像块的运动信息;If the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information. The motion information of the block is: determining that the target candidate motion information (for example, the best candidate motion information) is the motion information of the currently encoded image block;
如果当前图像块的帧间预测模式为inter MVP模式(例如AMVP模式),所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list),相应地,所述目标候选运动信息为所述当前图像块的运动矢量预测值MVP,所述基于所述目标候选运动信息预测当前图像块的运动信息包括:基于所述MVP和通过运动估计得到的当前编码图像块的运动矢量,确定所述当前图像块的运动矢量差值MVD。If the inter prediction mode of the current image block is an inter MVP mode (for example, AMVP mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion The information is a motion vector prediction value MVP of the current image block, and the predicting motion information of the current image block based on the target candidate motion information includes: based on the MVP and a motion vector of a current encoded image block obtained through motion estimation, Determining a motion vector difference MVD of the current image block.
在第一方面的某些实现方式中,所述方法用于解码所述当前图像块,所述基于所述候 选运动信息列表,对当前图像块执行帧间预测,包括:In some implementations of the first aspect, the method is used to decode the current image block, and the performing inter prediction on the current image block based on the candidate motion information list includes:
从所述候选运动信息列表中确定目标候选运动信息,例如,根据从码流中解析得到的索引标识,从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;应理解的是,如果所述候选运动信息列表的长度为一,则无需解析索引标识,确定唯一的候选运动信息为目标候选运动信息;Determine the target candidate motion information from the candidate motion information list, for example, determine the target candidate motion information from the candidate motion information list according to an index identifier parsed from a code stream, where the index identifier is used to indicate the The target candidate motion information in the candidate motion information list; it should be understood that if the length of the candidate motion information list is one, the index identifier does not need to be parsed, and the only candidate motion information is determined as the target candidate motion information;
基于所述目标候选运动信息预测当前图像块的运动信息或者基于所述目标候选运动信息预测当前图像块的子块的运动信息;Predicting motion information of a current image block based on the target candidate motion information or predicting motion information of a sub-block of the current image block based on the target candidate motion information;
基于当前图像块的运动信息或者当前图像块的子块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block or the motion information of a sub-block of the current image block to obtain a predicted pixel value of the current image block.
如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,所述候选运动信息列表为融合运动信息候选列表merge candidate list,相应地,所述基于所述目标候选运动信息预测当前图像块的运动信息为,将所述目标候选运动信息作为所述当前图像块的运动信息。If the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information. The motion information of the block is that the target candidate motion information is used as the motion information of the current image block.
如果当前图像块的帧间预测模式为inter MVP模式(例如AMVP模式),所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list),相应地,所述目标候选运动信息为运动矢量预测值MVP,所述根据所述目标候选运动信息预测所述当前图像块的运动信息,包括:基于所述运动矢量预测值MVP和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD,确定所述当前图像块的运动信息,例如将所述运动矢量预测值和所述运动矢量预测残差值之和,作为所述当前图像块的运动矢量。If the inter prediction mode of the current image block is an inter MVP mode (for example, AMVP mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion The information is a motion vector prediction value MVP, and the predicting the motion information of the current image block according to the target candidate motion information includes: based on the motion vector prediction value MVP and the current parsed from the code stream. The motion vector residual value MVD of the image block determines the motion information of the current image block. For example, the sum of the motion vector prediction value and the motion vector prediction residual value is used as the motion vector of the current image block.
在第一方面的某些实现方式中,所述方法还包括:In some implementations of the first aspect, the method further includes:
基于所述当前图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前图像块的预测图像(亦即预测像素值),得到所述当前图像块的重建图像。应当理解的是,如果当前图像块的预测图像与当前图像块的原始图像相同,则没有所述当前图像块的残差图像(亦即残差值),则基于所述帧间预测过程得到的当前图像块的预测图像(亦即预测像素值),得到所述当前图像块的重建图像。Based on the residual image (ie, residual value) of the current image block and the predicted image (ie, predicted pixel value) of the current image block obtained by the inter prediction process, a reconstructed image of the current image block is obtained. It should be understood that if the predicted image of the current image block is the same as the original image of the current image block, there is no residual image (that is, a residual value) of the current image block, which is obtained based on the inter prediction process. A predicted image (that is, a predicted pixel value) of the current image block to obtain a reconstructed image of the current image block.
在第一方面的某些实现方式中,所述方法还包括:使用当前图像块的运动信息对所述历史候选列表进行更新。In some implementations of the first aspect, the method further includes: updating the historical candidate list using motion information of a current image block.
可见,所述历史候选列表在图像编码或解码过程中不断更新,有助于提高帧间预测效率,从而提高编解码性能。It can be seen that the historical candidate list is continuously updated during the image encoding or decoding process, which helps to improve the inter prediction efficiency and thus the encoding and decoding performance.
此外,本申请实施例在图像编码或解码过程中不断更新历史候选列表,通过在当前图像块的候选运动信息列表(比如融合运动信息候选列表或运动矢量预测候选列表)中加入历史候选运动信息(history candidate)的方法,增加了候选运动信息(例如merge/skip的融合运动信息候选或inter模式的运动矢量预测候选)的数量,提高了预测效率。In addition, the embodiments of the present application continuously update the historical candidate list during the image encoding or decoding process, by adding historical candidate motion information to the candidate motion information list of the current image block (such as the fused motion information candidate list or the motion vector prediction candidate list) ( history (candidate) method, increasing the number of candidate motion information (such as merged / skip fusion motion information candidates or inter-mode motion vector prediction candidates), improving prediction efficiency.
在第一方面的某些实现方式中,如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,则所述候选运动信息列表为融合运动信息候选列表merge candidate list;In some implementation manners of the first aspect, if the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a merged motion information candidate list merge candidate list;
如果当前图像块的帧间预测模式为帧间运动矢量预测(inter MVP)模式(例如高级运动矢量预测AMVP模式),则所述候选运动信息列表为运动矢量预测候选列表(MVP  candidate list,例如AMVP candidate list)。If the inter prediction mode of the current image block is an inter motion vector prediction (inter MVP) mode (for example, advanced motion vector prediction AMVP mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list).
应理解的是,本申请实施例不仅适用于融合/跳过模式(Merge/skip)和/或高级运动矢量预测模式(advanced motion vector prediction,AMVP),而且也能适用于使用空域参考块和/或时域参考块的运动信息对当前图像块的运动信息进行预测的其它模式,从而提高编解码性能。It should be understood that the embodiments of the present application are not only applicable to the merge / skip mode and / or advanced motion vector prediction mode (AMVP), but also applicable to the use of spatial reference blocks and / Or other modes of predicting the motion information of the current image block by the motion information of the time-domain reference block, thereby improving codec performance.
第二方面,本申请实施例提供一种帧间预测方法,所述方法包括:In a second aspect, an embodiment of the present application provides an inter prediction method, where the method includes:
使用历史候选列表构建或更新当前图像块的候选运动信息列表;Use the historical candidate list to construct or update the candidate motion information list of the current image block;
基于所述候选运动信息列表,对所述当前图像块进行帧间预测;Performing inter prediction on the current image block based on the candidate motion information list;
其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:Wherein, using the historical candidate list to construct or update the candidate motion information list of the current image block includes:
根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数。Determined according to the inter prediction mode of the image block where the current historical candidate motion information HMVP in the historical candidate list is located and / or the inter prediction mode of the image block where the candidate motion information candidate in the candidate motion information list is located Whether to perform a repetitive check, and determine whether to add the current historical candidate motion information HMVP to the candidate motion according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list In the information list, M is an integer greater than or equal to 0.
应当理解的是,在编码过程中,这里的当前图像块(简称为当前块)可以理解为当前编码图像块(coding block);在解码过程中,这里的当前图像块(简称为当前块)可以理解为当前解码图像块(decoding block)。It should be understood that during the encoding process, the current image block (referred to as the current block) can be understood as the current encoding image block (coding block); during the decoding process, the current image block (referred to as the current block) can be It is understood as the current decoding image block.
在不同示例方式下,所述历史候选列表可以是条带slice级别的,或者,所述历史候选列表可以是图像级别的,或者,所述历史候选列表可以是若干个CTU(CTU行)的级别的;或者,所述历史候选列表可以是CTU的级别的;可以采取先进先出的方式访问或更新所述历史候选列表。In different example manners, the historical candidate list may be slice-level, or the historical candidate list may be image-level, or the historical candidate list may be at the level of several CTUs (CTU lines) Alternatively, the historical candidate list may be CTU-level; the historical candidate list may be accessed or updated in a first-in-first-out manner.
例如,所述历史候选运动信息为当前图像块所属的条带slice中在先已解码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的图像中在先已解码图像块的运动信息;又例如,所述历史候选运动信息为当前图像块所属的CTU组(例如一个或多个CTU)中在先已解码图像块的运动信息;For example, the historical candidate motion information is motion information of a previously decoded image block in a slice to which the current image block belongs; for another example, the historical candidate motion information is a previously decoded image in an image to which the current image block belongs. Block motion information; for another example, the historical candidate motion information is motion information of a previously decoded image block in a CTU group (eg, one or more CTUs) to which the current image block belongs;
换言之,例如,所述历史候选列表是在当前图像块所属的条带的编码或解码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的图像的编码或解码过程中生成且更新的;又例如,所述历史候选列表是在当前图像块所属的CTU组(例如一个或多个CTU)的编码或解码过程中生成且更新的;In other words, for example, the historical candidate list is generated and updated during the encoding or decoding process of the slice to which the current image block belongs; and for example, the historical candidate list is the encoding or decoding process for the image to which the current image block belongs. Generated and updated; and for example, the historical candidate list is generated and updated during the encoding or decoding process of a CTU group (eg, one or more CTUs) to which the current image block belongs;
需要说明的是,候选运动信息列表不同于所述历史候选列表;候选运动信息列表是图像块级别的(不同的图像块具有与之分别对应的候选运动信息列表),而历史候选列表(亦称为历史候选表)是当前slice(条带)或当前图像或者当前一个或多个编码树单元CTU级别的,例如,同一个slice下的多个图像块的编码或解码过程中,都可以使用这个不断更新的历史候选列表。It should be noted that the candidate motion information list is different from the historical candidate list; the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list (also known as Is the historical candidate list) is the current slice (slice) or current image or the current CTU level of one or more coding tree units. For example, during encoding or decoding of multiple image blocks in the same slice, this can be used. Constantly updated historical candidate list.
在第一方面的某些实现方式中,所述候选运动信息列表包括所述当前图像块的一个或多个空域参考块的运动信息(亦称为空域候选)和/或当前图像块的一个或多个时域参考块的运动信息(亦称为时域候选);In some implementations of the first aspect, the candidate motion information list includes motion information of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or one or Motion information of multiple time-domain reference blocks (also referred to as time-domain candidates);
或者,所述候选运动信息列表包括所述当前图像块的一个或多个空域参考块的运动矢 量(亦称为空域候选)和/或当前图像块的一个或多个时域参考块的运动矢量(亦称为时域候选)。Alternatively, the candidate motion information list includes motion vectors of one or more spatial domain reference blocks of the current image block (also referred to as spatial domain candidates) and / or motion vectors of one or more time domain reference blocks of the current image block. (Also known as time domain candidate).
需要说明的是,这里的空域参考块可以包括当前图像块所在图像中的、与当前图像块邻近的一个或多个空域邻近块。例如:位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2,应理解的是,这里的空域邻近块可以为4*4的像素。It should be noted that the spatial domain reference block herein may include one or more adjacent spatial domain blocks in the image where the current image block is located, which are adjacent to the current image block. For example: a fourth spatial domain neighboring block A0 located on the lower left side of the current image block, a first spatial domain neighboring block A1 located on the left side of the current image block, and a third spatial domain neighboring block B0 located on the upper right side of the current image block, The second spatial domain neighboring block B1 located on the upper side of the current image block, or the fifth spatial domain neighboring block B2 located on the upper left side of the current image block, it should be understood that the spatial domain neighboring block here may be 4 * 4 pixels .
需要说明的是,这里的时域参考块可以包括参考图像中、与并置块(co-located块)邻近的一个或多个空域参考块,和/或,所述并置块中的一个或多个子块,其中,所述并置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块,或者所述并置块为参考图像中与所述当前图像块具有指定位置偏移量的具有相同的大小、形状的图像块。这里的参考图像指的是已重建的图像,具体的,这里的参考图像指的是一个或多个参考图像列表中的参考图像,例如可以是指定参考图像列表中的指定参考图像索引对应的参考图像,也可以是默认的参考图像列表中的处于首位置的参考图像,本申请对此不作限定。一种示例下,所述时域参考块包括:所述当前图像块的并置块(co-located块)的右下空域邻近块H,所述并置块的左上中间块C0,所述并置块的右下中间块C3、所述并置块的左上块TL,或所述并置块的右下块BR。It should be noted that the time-domain reference block herein may include one or more spatial-domain reference blocks adjacent to a co-located block (co-located block) in the reference image, and / or, one or more of the co-located blocks or A plurality of sub-blocks, wherein the collocated block is an image block having the same size, shape, and coordinates in the reference image as the current image block, or the collocated block is a reference image having the same size and shape as the current image block Image blocks of the same size and shape with a specified position offset. The reference image here refers to a reconstructed image. Specifically, the reference image here refers to a reference image in one or more reference image lists. For example, it can be a reference corresponding to a specified reference image index in a specified reference image list. The image may also be the first reference image in the default reference image list, which is not limited in this application. In an example, the time-domain reference block includes: a lower-right spatial-domain neighboring block H of a co-located block of the current image block, a co-located block, an upper-left middle block C0, and the parallel The lower right middle block C3 of the collocated block, the upper left block TL of the collocated block, or the lower right block BR of the collocated block.
应当理解的是,本申请实施例的方法的执行主体可以是帧间预测装置,例如可以是视频编码器或视频解码器或具有视频编解码功能的电子设备,具体例如可以是视频编码器中的帧间预测单元,或者视频解码器中的帧间预测单元(例如运动补偿单元)。It should be understood that the execution subject of the method in the embodiment of the present application may be an inter prediction device, for example, it may be a video encoder or a video decoder or an electronic device with a video codec function. Specifically, for example, the An inter prediction unit, or an inter prediction unit (such as a motion compensation unit) in a video decoder.
可见,相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K和L乘以J次重复项查找,本申请实施例中根据历史候选、融合运动信息候选和运动信息预测候选所在图像块的帧间预测模式,在使用历史候选列表构建或更新融合运动信息候选列表或运动矢量预测候选列表的过程中,有选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, compared with the historical candidate list (assuming length L) used in the prior art to construct the fused motion information candidate list (assuming length K) and the motion vector prediction candidate list (assuming length J), it is necessary to multiply L by K Multiply L and J times for repeated item search. In the embodiment of the present application, the historical candidate list is used to construct or update the fused motion information candidate list according to the inter prediction mode of the image block where the historical candidate, the fused motion information candidate and the motion information prediction candidate are located. In the process of motion or motion vector prediction candidate list, the duplicate item check process of some historical candidates can be selectively skipped, which can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number, reducing codec time, which helps to improve the efficiency of inter-frame prediction, thereby improving codec performance.
在第二方面的某些实现方式中,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:In some implementation manners of the second aspect, the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list The inter prediction mode of the image block where the motion information candidate is located determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;应理解的是,如果所述候选运动信息列表中的已有候选运动信息的个数为M1,则M<M1,因为至少跳过了当前历史候选运动信息HMVP和所述候选运动信息 列表中的当前候选运动信息之间的重复性检查;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode; it should be understood that if the number of existing candidate motion information in the candidate motion information list is M1, then M <M1, because at least the current historical candidate motion information HMVP is skipped Check for repetition with the current candidate motion information in the candidate motion information list;
在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
在第二方面的某些实现方式中,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:In some implementation manners of the second aspect, the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list The inter prediction mode of the image block where the motion information candidate is located determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;应理解的是,即跳过当前历史候选运动信息HMVP和所述候选运动信息列表中的已有候选运动信息的重复性检查,即M=0;When the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list; it should be understood that That is, skip the repetitive check of the current historical candidate motion information HMVP and the existing candidate motion information in the candidate motion information list, that is, M = 0;
在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;应理解的是,如果所述候选运动信息列表中的已有候选运动信息的个数为M1,则M=M1。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode, check whether the current historical candidate motion information is the same as existing candidate motion information in the candidate motion information list It should be understood that if the number of existing candidate motion information in the candidate motion information list is M1, then M = M1.
在第二方面的某些实现方式中,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:In some implementation manners of the second aspect, the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list The inter prediction mode of the image block where the motion information candidate is located determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;应理解的是,即跳过当前历史候选运动信息HMVP和所述候选运动信息列表中的已有候选运动信息的重复性检查,即M=0;When the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list; it should be understood that That is, skip the repetitive check of the current historical candidate motion information HMVP and the existing candidate motion information in the candidate motion information list, that is, M = 0;
在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且在所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;应理解的是,如果所述候选运动信息列表中的已有候选运动信息的个数为M1,则M<M1,因为至少跳过了当前历史候选运动信息HMVP和所述候选运动信息列表中的当前候选运动信息的重复性检查;The inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of the inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; it should be understood that if the candidate motion The number of existing candidate motion information in the information list is M1, then M <M1, because at least the repeatability check of the current historical candidate motion information HMVP and the current candidate motion information in the candidate motion information list is skipped;
在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the current candidate motion information.
在第二方面的某些实现方式中,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:In some implementation manners of the second aspect, the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list The inter prediction mode of the image block where the motion information candidate is located determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is The first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;应理解的是,如果所述候选运动信息列表中的已有候选运动信息的个数为M1,则M<M1,因为至少跳过了当前历史候选运动信息HMVP和所述候选运动信息列表中的当前候选运动信息的重复性检查;In a case where the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; it should be understood that if there are existing candidates in the candidate motion information list, The number of motion information is M1, then M <M1, because at least the repeatability check of the current historical candidate motion information HMVP and the current candidate motion information in the candidate motion information list is skipped;
在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
在第二方面的某些实现方式中,所述方法用于编码所述当前图像块,所述基于所述候选运动信息列表,对当前图像块执行帧间预测,包括:In some implementations of the second aspect, the method is used to encode the current image block, and performing inter prediction on the current image block based on the candidate motion information list includes:
根据率失真代价准则从所述候选运动信息列表中确定目标候选运动信息,例如,所述目标候选运动信息编码所述当前图像块的率失真代价最小;Determining target candidate motion information from the candidate motion information list according to a rate distortion cost criterion. For example, the target candidate motion information encodes the current image block with the lowest rate distortion cost;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,所述候选运动信息列表为融合运动信息候选列表merge candidate list,相应地,所述基于所述目标候选运动信息预测当前图像块的运动信息为,确定所述目标候选运动信息(例如最佳候选运动信息)为所述当前编码图像块的运动信息;If the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information. The motion information of the block is: determining that the target candidate motion information (for example, the best candidate motion information) is the motion information of the currently encoded image block;
如果当前图像块的帧间预测模式为inter MVP模式(例如AMVP模式),所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list),相应地,所述目标候选运动信息为所述当前图像块的运动矢量预测值MVP,所述基于所述目标候选运动信息预测当前图像块的运动信息包括:基于所述MVP和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前图像块的运动矢量差值MVD。If the inter prediction mode of the current image block is an inter MVP mode (for example, AMVP mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion The information is the motion vector prediction value MVP of the current image block, and the prediction of the motion information of the current image block based on the target candidate motion information includes: based on the MVP and the current encoded image block obtained through motion estimation (Motion Estimation) And determine the motion vector difference MVD of the current image block.
在第二方面的某些实现方式中,所述方法用于解码所述当前图像块,所述基于所述候选运动信息列表,对当前图像块执行帧间预测,包括:In some implementations of the second aspect, the method is used to decode the current image block, and the performing inter prediction on the current image block based on the candidate motion information list includes:
从所述候选运动信息列表中确定目标候选运动信息;例如,根据从码流中解析得到的索引标识,从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;应理解的是,如果所述候选运动信息列表的 长度为一,则无需解析索引标识,确定唯一的候选运动信息为目标候选运动信息;Determine the target candidate motion information from the candidate motion information list; for example, determine the target candidate motion information from the candidate motion information list according to an index identifier parsed from a code stream, where the index identifier is used to indicate the The target candidate motion information in the candidate motion information list; it should be understood that if the length of the candidate motion information list is one, the index identifier does not need to be parsed, and the only candidate motion information is determined as the target candidate motion information;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,所述候选运动信息列表为融合运动信息候选列表merge candidate list,相应地,所述基于所述目标候选运动信息预测当前图像块的运动信息为,将所述目标候选运动信息作为所述当前图像块的运动信息。If the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a merge motion information candidate list merge candidate list, and accordingly, the current image is predicted based on the target candidate motion information. The motion information of the block is that the target candidate motion information is used as the motion information of the current image block.
如果当前图像块的帧间预测模式为inter MVP模式(例如AMVP模式),所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list),相应地,所述目标候选运动信息为运动矢量预测值MVP,所述根据所述目标候选运动信息预测所述当前图像块的运动信息,包括:基于所述运动矢量预测值MVP和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD,确定所述当前图像块的运动信息,例如将所述运动矢量预测值和所述运动矢量预测残差值之和,作为所述当前图像块的运动矢量。If the inter prediction mode of the current image block is an inter MVP mode (for example, AMVP mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list), and accordingly, the target candidate motion The information is a motion vector prediction value MVP, and the predicting the motion information of the current image block according to the target candidate motion information includes: based on the motion vector prediction value MVP and the current parsed from the code stream. The motion vector residual value MVD of the image block determines the motion information of the current image block. For example, the sum of the motion vector prediction value and the motion vector prediction residual value is used as the motion vector of the current image block.
在第二方面的某些实现方式中,所述方法还包括:In some implementations of the second aspect, the method further includes:
基于所述当前图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前图像块的预测图像(亦即预测像素值),得到所述当前图像块的重建图像。应当理解的是,如果当前图像块的预测图像与当前图像块的原始图像相同,则没有所述当前图像块的残差图像(亦即残差值),则基于所述帧间预测过程得到的当前图像块的预测图像(亦即预测像素值),得到所述当前图像块的重建图像。Based on the residual image (ie, residual value) of the current image block and the predicted image (ie, predicted pixel value) of the current image block obtained by the inter prediction process, a reconstructed image of the current image block is obtained. It should be understood that if the predicted image of the current image block is the same as the original image of the current image block, there is no residual image (that is, a residual value) of the current image block, which is obtained based on the inter prediction process. A predicted image (that is, a predicted pixel value) of the current image block to obtain a reconstructed image of the current image block.
在第二方面的某些具体实现方式中,所述方法用于编码当前图像块,所述当前图像块的帧间预测模式为融合merge模式或跳过skip模式,所述方法还包括:In some specific implementations of the second aspect, the method is used to encode a current image block, and an inter prediction mode of the current image block is a merge merge mode or a skip skip mode, and the method further includes:
将与所述目标候选运动信息对应的merge索引号编入码流;Coding a merge index number corresponding to the target candidate motion information into a code stream;
或者,or,
所述当前图像块的帧间预测模式为inter MVP模式,所述方法还包括:The inter prediction mode of the current image block is an inter MVP mode, and the method further includes:
将与所述目标候选运动信息(即目标候选运动矢量预测值MVP)对应的索引号、参考帧索引和所述运动矢量差值MVD编入码流。An index number, a reference frame index, and the motion vector difference MVD corresponding to the target candidate motion information (that is, the target candidate motion vector prediction value MVP) are coded into a code stream.
在第二方面的某些实现方式中,所述方法还包括:使用当前图像块的运动信息对所述历史候选列表进行更新。In some implementations of the second aspect, the method further includes: updating the historical candidate list using motion information of a current image block.
可见,所述历史候选列表在图像编码或解码过程中不断更新,有助于提高帧间预测效率,从而提高编解码性能。It can be seen that the historical candidate list is continuously updated during the image encoding or decoding process, which helps to improve the inter prediction efficiency and thus the encoding and decoding performance.
此外,本申请实施例在图像编码或解码过程中不断更新历史候选列表,通过在当前图像块的候选运动信息列表(比如融合运动信息候选列表或运动矢量预测候选列表)中加入历史候选运动信息(history candidate)的方法,增加了候选运动信息(例如merge/skip的融合运动信息候选或inter模式的运动矢量预测候选)的数量,提高了预测效率。In addition, the embodiments of the present application continuously update the historical candidate list during the image encoding or decoding process, by adding historical candidate motion information to the candidate motion information list of the current image block (such as the fused motion information candidate list or the motion vector prediction candidate list) ( history (candidate) method, increasing the number of candidate motion information (such as merged / skip fusion motion information candidates or inter-mode motion vector prediction candidates), improving prediction efficiency.
在第二方面的某些实现方式中,如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,则所述候选运动信息列表为融合运动信息候选列表(merge candidate  list);In some implementation manners of the second aspect, if the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a merged motion information candidate list;
如果当前图像块的帧间预测模式为帧间运动矢量预测(inter MVP)模式(例如高级运动矢量预测模式),则所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list)。If the inter prediction mode of the current image block is an inter motion vector prediction (inter MVP) mode (such as an advanced motion vector prediction mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, such as AMVP candidate list).
应理解的是,本申请实施例不仅适用于融合/跳过模式(Merge/skip)和/或高级运动矢量预测模式(advanced motion vector prediction,AMVP),而且也能适用于使用空域参考块和/或时域参考块的运动信息对当前图像块的运动信息进行预测的其它模式,从而提高编解码性能。It should be understood that the embodiments of the present application are not only applicable to the merge / skip mode and / or advanced motion vector prediction mode (AMVP), but also applicable to the use of spatial reference blocks and / Or other modes of predicting the motion information of the current image block by the motion information of the time-domain reference block, thereby improving codec performance.
第三方面,本申请实施例提供一种帧间预测装置,包括用于实施第一方面的任意一种方法的若干个功能单元。举例来说,帧间预测装置可以包括:In a third aspect, an embodiment of the present application provides an inter prediction apparatus, including several functional units for implementing any one of the methods in the first aspect. For example, the inter prediction device may include:
候选运动信息列表确定单元,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表,其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数;The candidate motion information list determination unit is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The order from the tail to the head of the historical candidate list is to check whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, add the target historical candidate motion information to the candidate In the motion information list; the target historical candidate motion information is: historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, where Q is a positive integer;
帧间预测处理单元,用于基于所述候选运动信息列表,对所述当前图像块进行帧间预测。An inter prediction processing unit is configured to perform inter prediction on the current image block based on the candidate motion information list.
第四方面,本申请实施例提供一种帧间预测装置,包括用于实施第二方面的任意一种方法的若干个功能单元。举例来说,帧间预测装置可以包括:In a fourth aspect, an embodiment of the present application provides an inter prediction apparatus, including several functional units for implementing any one of the methods in the second aspect. For example, the inter prediction device may include:
候选运动信息列表确定单元,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表;其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数;The candidate motion information list determining unit is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or the inter prediction mode of the image block where the existing candidate motion information candidate in the candidate motion information list is located determines whether to perform repetition And check whether the current historical candidate motion information HMVP is added to the candidate motion information list according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list. , Where M is an integer greater than or equal to 0;
帧间预测处理单元,用于基于所述候选运动信息列表,对所述当前图像块进行帧间预测。An inter prediction processing unit is configured to perform inter prediction on the current image block based on the candidate motion information list.
第五方面,本申请实施例提供一种视频编码器,所述视频编码器用于编码图像块,包括:如第三方面或第四方面所述的帧间预测装置,其中所述帧间预测装置用于基于目标候选运动信息预测当前编码图像块的运动信息,基于所述当前编码图像块的运动信息确定所述当前编码图像块的预测像素值;In a fifth aspect, an embodiment of the present application provides a video encoder for encoding an image block, including: the inter prediction device according to the third aspect or the fourth aspect, wherein the inter prediction device For predicting motion information of a current encoded image block based on target candidate motion information, and determining a predicted pixel value of the current encoded image block based on the motion information of the current encoded image block;
熵编码模块,用于将所述目标候选运动信息的索引标识编入码流,所述索引标识指示用于所述当前编码图像块的所述目标候选运动信息;An entropy encoding module, configured to encode an index identifier of the target candidate motion information into a code stream, where the index identifier indicates the target candidate motion information for the currently encoded image block;
重建模块,用于基于所述预测像素值重建所述图像块。A reconstruction module, configured to reconstruct the image block based on the predicted pixel value.
第六方面,本申请实施例提供一种视频解码器,所述视频解码器用于从码流中解码出图像块,包括:According to a sixth aspect, an embodiment of the present application provides a video decoder, which is used to decode an image block from a code stream, and includes:
熵解码模块,用于从码流中解码出索引标识,所述索引标识用于指示当前解码图像块的目标候选运动信息;An entropy decoding module, configured to decode an index identifier from a code stream, where the index identifier is used to indicate target candidate motion information of a currently decoded image block;
如第三方面或第四方面所述的帧间预测装置,所述帧间预测装置用于基于所述索引标识指示的目标候选运动信息预测当前解码图像块的运动信息,基于所述当前解码图像块的运动信息确定所述当前解码图像块的预测像素值;The inter prediction device according to the third aspect or the fourth aspect, the inter prediction device is configured to predict motion information of a currently decoded image block based on the target candidate motion information indicated by the index identifier, and based on the current decoded image The motion information of the block determines a predicted pixel value of the current decoded image block;
重建模块,用于基于所述预测像素值重建所述图像块。A reconstruction module, configured to reconstruct the image block based on the predicted pixel value.
第七方面,本申请实施例提供一种视频解码设备,所述设备包括:In a seventh aspect, an embodiment of the present application provides a video decoding device, where the device includes:
存储器,用于存储码流形式的视频数据,所述视频数据包括一个或多个图像块;A memory, configured to store video data in the form of a bitstream, where the video data includes one or more image blocks;
视频解码器,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表;基于所述候选运动信息列表,对所述当前图像块进行帧间预测;其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数。A video decoder for constructing or updating a candidate motion information list of a current image block using a historical candidate list; performing inter prediction on the current image block based on the candidate motion information list; wherein the constructing using the historical candidate list Or updating the candidate motion information list of the current image block, including: from the tail to the head of the historical candidate list, checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list; if If different, the target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: Q historical candidate motions arranged in order from tail to head in the historical candidate list Historical candidate motion information other than information, Q is a positive integer.
第八方面,本申请实施例提供一种视频解码设备,所述设备包括:In an eighth aspect, an embodiment of the present application provides a video decoding device, where the device includes:
存储器,用于存储码流形式的视频数据,所述视频数据包括一个或多个图像块;A memory, configured to store video data in the form of a bitstream, where the video data includes one or more image blocks;
视频解码器,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表;基于所述候选运动信息列表,对所述当前图像块进行帧间预测;其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数。A video decoder for constructing or updating a candidate motion information list of a current image block using a historical candidate list; performing inter prediction on the current image block based on the candidate motion information list; wherein the constructing using the historical candidate list Or updating the candidate motion information list of the current image block includes: according to the inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or existing candidates in the candidate motion information list The inter prediction mode of the image block where the motion information candidate is located determines whether to perform a repetitive check, and determines based on the repetitive check results of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list. Whether to add current historical candidate motion information HMVP to the candidate motion information list, where M is an integer greater than or equal to 0.
本申请的第九方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。A ninth aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, causes the computer to execute the foregoing or the second aspect. method.
本申请的第十方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。A tenth aspect of the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method described in the first aspect or the second aspect above.
本申请的第十一方面提供了一种电子设备,包括上述第五方面所述的视频编码器,或上述第六方面所述的视频解码器,或上述第三或四方面所述的帧间预测装置。An eleventh aspect of the present application provides an electronic device, including the video encoder according to the fifth aspect, or the video decoder according to the sixth aspect, or the interframe according to the third or fourth aspect. Forecasting device.
本申请的第十二方面提供了一种编码设备,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行第一方面或第二方面的任意一种方法的部分或全部步骤。A twelfth aspect of the present application provides an encoding device including: a non-volatile memory and a processor coupled to each other, the processor calling program code stored in the memory to execute the first aspect or the second aspect Aspects of any or all of the steps of a method.
本申请的第十三方面提供了一种解码设备,包括:相互耦合的非易失性存储器和处理器,所述处理器调用存储在所述存储器中的程序代码以执行第一方面或第二方面的任意一种方法的部分或全部步骤。A thirteenth aspect of the present application provides a decoding device, including: a non-volatile memory and a processor coupled to each other, the processor invoking program code stored in the memory to execute the first aspect or the second aspect Aspects of any or all of the steps of a method.
应理解,本申请的第二至十三方面与本申请的第一方面的技术方案一致,各方面及对应的可实施的设计方式所取得的有益效果相似,不再赘述。It should be understood that the second to thirteenth aspects of the present application are consistent with the technical solution of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding implementable design manner are similar, and will not be described again.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。In order to more clearly explain the technical solutions in the embodiments of the present application or the background art, the drawings that are needed in the embodiments of the present application or the background art will be described below.
图1为本申请实施例中一种视频编码及解码系统的示意性框图;FIG. 1 is a schematic block diagram of a video encoding and decoding system according to an embodiment of the present application; FIG.
图2为本申请实施例中一种视频编码器的示意性框图;2 is a schematic block diagram of a video encoder according to an embodiment of the present application;
图3为本申请实施例中一种视频解码器的示意性框图;3 is a schematic block diagram of a video decoder according to an embodiment of the present application;
图4A为本申请实施例中合并模式下由视频编码器执行的编码方法的一种示例性流程图;4A is an exemplary flowchart of an encoding method performed by a video encoder in a merge mode according to an embodiment of the present application;
图4B为本申请实施例中高级运动矢量预测模式下由视频编码器执行的编码方法的一种示例性流程图;4B is an exemplary flowchart of an encoding method performed by a video encoder in an advanced motion vector prediction mode according to an embodiment of the present application;
图5为本申请实施例中由视频解码器执行的运动补偿的一种示例性流程图;5 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application;
图6为本申请实施例中当前图像块及与其关联的空域参考块、时域参考块的一种示例性示意图;FIG. 6 is an exemplary schematic diagram of a current image block and a spatial domain reference block and a time domain reference block associated therewith in an embodiment of the present application; FIG.
图7为本申请实施例中一种图像编码方法的流程图;7 is a flowchart of an image encoding method according to an embodiment of the present application;
图8为本申请实施例中一种图像解码方法的流程图;8 is a flowchart of an image decoding method according to an embodiment of the present application;
图9为本申请实施例中更新前后的历史候选列表的一种示例性示意图;FIG. 9 is an exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application; FIG.
图10为本申请实施例中更新前后的历史候选列表的另一种示例性示意图;FIG. 10 is another exemplary schematic diagram of a historical candidate list before and after an update in an embodiment of the present application; FIG.
图11A为本申请实施例中历史候选运动信息加入融合运动信息候选列表的一种示例性示意图;11A is an exemplary schematic diagram of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application;
图11B为本申请实施例中跳过历史候选列表中从尾部到头部的顺序排列的3个历史候选的一种示例性示意图;FIG. 11B is an exemplary schematic diagram of three historical candidates arranged in order from the tail to the head in the skip history candidate list in the embodiment of the present application; FIG.
图11C为本申请实施例中历史候选运动信息加入融合运动信息候选列表的另一种示例性流程示意图;FIG. 11C is a schematic flowchart of another exemplary process of adding historical candidate motion information to a candidate list of fused motion information according to an embodiment of the present application; FIG.
图12为本申请实施例中一种帧间预测装置的示意性框图;12 is a schematic block diagram of an inter prediction apparatus according to an embodiment of the present application;
图13为本申请实施例中另一种帧间预测装置的示意性框图;13 is a schematic block diagram of another inter prediction apparatus according to an embodiment of the present application;
图14为本申请实施例中另一种编码设备或解码设备的示意性框图。FIG. 14 is a schematic block diagram of another encoding device or decoding device according to an embodiment of the present application.
具体实施方式detailed description
帧内预测编码:用周围邻近的像素值来预测当前的像素值,然后对预测误差进行编码的编码方式。Intra-prediction coding: A coding method that uses surrounding pixel values to predict the current pixel value and then encodes the prediction error.
编码图片:含有图片的所有编码树单元的图片的编码表示。Coded picture: A coded representation of a picture that contains all the coding tree units of the picture.
运动矢量(motion vector,MV):用于帧间预测的二维矢量,其提供从解码图片中的坐标到参考图片中的坐标的偏移量。Motion vector (MV): A two-dimensional vector used for inter prediction, which provides an offset from coordinates in a decoded picture to coordinates in a reference picture.
预测块:在其上应用相同预测的矩形M×N样本块。Prediction block: A rectangular M × N sample block on which the same prediction is applied.
预测过程:使用预测值提供当前被解码的数据元素(例如,样本值或运动矢量)的估计值。Prediction process: Use the predicted value to provide an estimate of the data element (eg, sample value or motion vector) that is currently being decoded.
预测值:指定值或后续数据元素解码过程中使用的先前解码数据元素(例如,样本值 或运动矢量)的组合。Predicted value: A specified value or a combination of previously decoded data elements (for example, sample values or motion vectors) used during subsequent data element decoding.
参考帧:作为短期参考图片或长期参考图片的图片或帧。参考帧含有可以按解码顺序用于后续图片的解码过程中的帧间预测的样本。Reference frame: A picture or frame used as a short-term reference picture or a long-term reference picture. The reference frame contains samples that can be used in the decoding order for inter prediction in the decoding process of subsequent pictures.
帧间预测:根据当前块的参考帧中的像素,通过运动矢量指示参考帧中用于预测的像素的位置,产生当前块的预测图像。Inter prediction: According to the pixels in the reference frame of the current block, the position of the pixels used for prediction in the reference frame is indicated by the motion vector to generate a predicted image of the current block.
双向预测(B)片:可以使用帧内预测或帧间预测用最多两个运动矢量和参考索引预测每个块的样本值而解码的片。Bidirectional prediction (B) slice: A slice that can be decoded using intra prediction or inter prediction to predict the sample value of each block with up to two motion vectors and reference indexes.
CTU:编码树单元(coding tree unit),一幅图像由多个CTU构成,一个CTU通常对应于一个方形图像区域,包含这个图像区域中的亮度像素和色度像素(或者也可以只包含亮度像素,或者也可以只包含色度像素);CTU中还包含语法元素,这些语法元素指示如何将CTU划分成至少一个编码单元(coding unit,CU),以及解码每个编码单元得到重建图像的方法。CTU: coding tree unit (coding tree unit). An image is composed of multiple CTUs. A CTU usually corresponds to a square image area, which contains the luma pixels and chroma pixels in this image area (or it can only include luma pixels). (Or may also include only chroma pixels); the CTU also contains syntax elements, which indicate how to divide the CTU into at least one coding unit (coding unit, CU), and a method of decoding each coding unit to obtain a reconstructed image.
CU:编码单元,对应于图像中一个A×B的矩形区域,包含A×B亮度像素或/和它对应的色度像素,A为矩形的宽,B为矩形的高,A和B可以相同也可以不同,A和B的取值通常为2的整数次幂,例如128、64、32、16、8、4。一个编码单元包含预测图像和残差图像,预测图像与残差图像相加得到编码单元的重建图像。预测图像通过帧内预测或帧间预测生成,残差图像通过对变换系数进行反量化和反变换处理生成。CU: coding unit, corresponding to an A × B rectangular area in the image, including A × B brightness pixels or / and its corresponding chroma pixels, A is the width of the rectangle, B is the height of the rectangle, and A and B can be the same It can also be different. The values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, and 4. A coding unit includes a predicted image and a residual image, and the predicted image and the residual image are added to obtain a reconstructed image of the coding unit. The predicted image is generated by intra prediction or inter prediction, and the residual image is generated by inverse quantization and inverse transform processing of the transform coefficients.
VTM:JVET组织开发的新式编解码器参考软件。VTM: New codec reference software developed by the JVET organization.
Inter mvp模式:传送的运动信息包含:帧间预测方向(前向、后向或双向)、参考帧索引、运动矢量预测值索引、运动矢量残差值。对运动信息中的运动矢量通常采用传送实际运动矢量与运动矢量预测值(motion vector predictor,MVP)的差值的方式,编码端将MVP与实际运动矢量之间的运动矢量残差值(motion vector difference,MVD)传递到解码端。其中运动矢量预测可能包含多个预测值,一般在编码端和解码端使用相同的方式构建运动矢量预测候选列表(mvp candidate list),将运动矢量预测值索引(motion vector predictor index,MVP index)传递到解码端。Intermvp mode: The transmitted motion information includes: inter prediction direction (forward, backward, or bidirectional), reference frame index, motion vector prediction value index, and motion vector residual value. For the motion vector in the motion information, the method of transmitting the difference between the actual motion vector and the motion vector predictor (MVP) is usually used. The encoding end uses the motion vector residual value between the MVP and the actual motion vector (motion vector). difference, MVD) to the decoder. The motion vector prediction may include multiple prediction values. Generally, the motion vector prediction candidate list (mvp candidate list) is constructed at the encoding end and the decoding end, and the motion vector prediction index (MVP index) is passed. To the decoder.
Merge模式:在编码端和解码端使用相同的方式构建融合运动信息候选列表(merge candidate list),将融合索引(merge index)传递到解码端。解码端可根据融合索引(merge index)从融合候选列表(merge candidate list)中选择对应的融合候选,将融合候选的运动信息作为当前块的运动信息,或者对融合候选的运动信息经过缩放后作为当前块的运动信息。运动信息候选列表(merge candidate list)中的候选运动信息通常从其空域相邻块或参考帧中的时域块中获得,其中由当前块相邻的图像块的运动信息得到的候选运动信息称为空间候选(spatial candidate),由当前块在参考图像中得到的对应位置图像块的运动信息称为时间候选(temporal candidate)。Merge mode: The merged motion information candidate list is constructed in the same way at the encoder and decoder, and the merge index is passed to the decoder. The decoder can select the corresponding fusion candidate from the merge candidate list according to the merge index, and use the motion information of the fusion candidate as the motion information of the current block, or scale the motion information of the fusion candidate as the motion information of the fusion candidate. Motion information of the current block. The candidate motion information in the motion information candidate list is usually obtained from its spatial-domain neighboring blocks or the time-domain blocks in the reference frame. The candidate motion information obtained from the motion information of the image blocks adjacent to the current block is called Is a spatial candidate, and the motion information of the corresponding position image block obtained from the current image in the reference image is called a temporal candidate.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
图1为本申请实施例中视频编码及解码系统10的一种示意性框图。如图1中所展示,系统10包含源装置12,源装置12产生将在稍后时间由目的地装置14解码的经编码视频数据。源装置12及目的地装置14可包括广泛范围的装置中的任一者,包含桌上型计算机、笔记型计算机、平板计算机、机顶盒、例如所谓的“智能”电话的电话手机、所谓的“智能”触控板、电视、摄影机、显示装置、数字媒体播放器、视频游戏控制台、视频流式传输装置或类似者。在一些应用中,源装置12及目的地装置14可经装备以用于无线通信。FIG. 1 is a schematic block diagram of a video encoding and decoding system 10 according to an embodiment of the present application. As shown in FIG. 1, the system 10 includes a source device 12 that generates encoded video data to be decoded by the destination device 14 at a later time. Source device 12 and destination device 14 may include any of a wide range of devices, including desktop computers, notebook computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, so-called "smart" "Touchpads, TVs, cameras, displays, digital media players, video game consoles, video streaming devices, or the like. In some applications, the source device 12 and the destination device 14 may be equipped for wireless communication.
目的地装置14可经由链路16接收待解码的经编码视频数据。链路16可包括能够将经编码视频数据从源装置12移动到目的地装置14的任何类型的媒体或装置。在一个可行的实施方式中,链路16可包括使源装置12能够实时将经编码视频数据直接传输到目的地装置14的通信媒体。可根据通信标准(例如,无线通信协议)调制经编码视频数据且将其传输到目的地装置14。通信媒体可包括任何无线或有线通信媒体,例如射频频谱或一个或多个物理传 输线。通信媒体可形成基于包的网络(例如,局域网、广域网或因特网的全球网络)的部分。通信媒体可包含路由器、交换器、基站或可有用于促进从源装置12到目的地装置14的通信的任何其它装备。The destination device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of media or device capable of moving the encoded video data from the source device 12 to the destination device 14. In one possible implementation, the link 16 may include a communication medium that enables the source device 12 to directly transmit the encoded video data to the destination device 14 in real time. The encoded video data may be modulated according to a communication standard (eg, a wireless communication protocol) and transmitted to the destination device 14. Communication media may include any wireless or wired communication media, such as the radio frequency spectrum or one or more physical transmission lines. Communication media may form part of a packet-based network, such as a global network of a local area network, a wide area network, or the Internet. The communication medium may include a router, a switch, a base station, or any other equipment that may be used to facilitate communication from the source device 12 to the destination device 14.
替代地,可将经编码数据从输出接口22输出到存储装置24。类似地,可由输入接口从存储装置24存取经编码数据。存储装置24可包含多种分散式或本地存取的数据存储媒体中的任一者,例如,硬盘驱动器、蓝光光盘、DVD、CD-ROM、快闪存储器、易失性或非易失性存储器或用于存储经编码视频数据的任何其它合适的数字存储媒体。在另一可行的实施方式中,存储装置24可对应于文件服务器或可保持由源装置12产生的经编码视频的另一中间存储装置。目的地装置14可经由流式传输或下载从存储装置24存取所存储视频数据。文件服务器可为能够存储经编码视频数据且将此经编码视频数据传输到目的地装置14的任何类型的服务器。可行的实施方式文件服务器包含网站服务器、文件传送协议服务器、网络附接存储装置或本地磁盘机。目的地装置14可经由包含因特网连接的任何标准数据连接存取经编码视频数据。此数据连接可包含适合于存取存储于文件服务器上的经编码视频数据的无线信道(例如,Wi-Fi连接)、有线连接(例如,缆线调制解调器等)或两者的组合。经编码视频数据从存储装置24的传输可为流式传输、下载传输或两者的组合。Alternatively, the encoded data may be output from the output interface 22 to the storage device 24. Similarly, the encoded data can be accessed from the storage device 24 by an input interface. The storage device 24 may include any of a variety of distributed or locally-accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory Or any other suitable digital storage medium for storing encoded video data. In another possible implementation, the storage device 24 may correspond to a file server or another intermediate storage device that may hold the encoded video produced by the source device 12. The destination device 14 may access the stored video data from the storage device 24 via streaming or download. The file server may be any type of server capable of storing encoded video data and transmitting this encoded video data to the destination device 14. Possible implementations The file server includes a web server, a file transfer protocol server, a network attached storage device, or a local disk drive. The destination device 14 may access the encoded video data via any standard data connection including an Internet connection. This data connection may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a cable modem, etc.), or a combination of both, suitable for accessing the encoded video data stored on the file server. The transmission of the encoded video data from the storage device 24 may be a streaming transmission, a download transmission, or a combination of the two.
本申请的技术不必限于无线应用或设定。技术可应用于视频解码以支持多种多媒体应用中的任一者,例如,空中电视广播、有线电视传输、卫星电视传输、流式传输视频传输(例如,经由因特网)、编码数字视频以用于存储于数据存储媒体上、解码存储于数据存储媒体上的数字视频或其它应用。在一些可行的实施方式中,系统10可经配置以支持单向或双向视频传输以支持例如视频流式传输、视频播放、视频广播和/或视频电话的应用。The techniques of this application are not necessarily limited to wireless applications or settings. The technology can be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding digital video for use in Digital video or other applications stored on a data storage medium and decoded on the data storage medium. In some feasible implementations, the system 10 may be configured to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
在图1的可行的实施方式中,源装置12包含视频源18、视频编码器20及输出接口22。在一些应用中,输出接口22可包含调制器/解调制器(调制解调器)和/或传输器。在源装置12中,视频源18可包含例如以下各者的源:视频捕获装置(例如,摄像机)、含有先前捕获的视频的视频存档、用以从视频内容提供者接收视频的视频馈入接口,和/或用于产生计算机图形数据作为源视频的计算机图形系统,或这些源的组合。作为一种可行的实施方式,如果视频源18为摄像机,那么源装置12及目的装置14可形成所谓的摄影机电话或视频电话。本申请中所描述的技术可示例性地适用于视频解码,且可适用于无线和/或有线应用。In the feasible embodiment of FIG. 1, the source device 12 includes a video source 18, a video encoder 20, and an output interface 22. In some applications, the output interface 22 may include a modulator / demodulator (modem) and / or a transmitter. In the source device 12, the video source 18 may include a source such as a video capture device (e.g., a video camera), a video archive containing previously captured video, a video feed interface to receive video from a video content provider , And / or a computer graphics system for generating computer graphics data as a source video, or a combination of these sources. As a feasible implementation manner, if the video source 18 is a video camera, the source device 12 and the destination device 14 may form a so-called camera phone or video phone. The techniques described in this application may be exemplarily applicable to video decoding, and may be applicable to wireless and / or wired applications.
可由视频编码器20来编码所捕获、预捕获或计算机产生的视频。经编码视频数据可经由源装置12的输出接口22直接传输到目的地装置14。经编码视频数据也可(或替代地)存储到存储装置24上以供稍后由目的地装置14或其它装置存取以用于解码和/或播放。Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be transmitted directly to the destination device 14 via the output interface 22 of the source device 12. The encoded video data may also be (or alternatively) stored on the storage device 24 for later access by the destination device 14 or other device for decoding and / or playback.
目的地装置14包含输入接口28、视频解码器30及显示装置32。在一些应用中,输入接口28可包含接收器和/或调制解调器。目的地装置14的输入接口28经由链路16接收经编码视频数据。经由链路16传达或提供于存储装置24上的经编码视频数据可包含由视频编码器20产生以供视频解码器30的视频解码器使用以解码视频数据的多种语法元素。这些语法元素可与在通信媒体上传输、存储于存储媒体上或存储于文件服务器上的经编码视频数据包含在一起。The destination device 14 includes an input interface 28, a video decoder 30, and a display device 32. In some applications, the input interface 28 may include a receiver and / or a modem. The input interface 28 of the destination device 14 receives the encoded video data via the link 16. The encoded video data communicated or provided on the storage device 24 via the link 16 may include various syntax elements generated by the video encoder 20 for use by the video decoder 30 of the video decoder 30 to decode the video data. These syntax elements may be included with the encoded video data transmitted on a communication medium, stored on a storage medium, or stored on a file server.
显示装置32可与目的地装置14集成或在目的地装置14外部。在一些可行的实施方式中,目的地装置14可包含集成显示装置且也经配置以与外部显示装置接口连接。在其它可行的实施方式中,目的地装置14可为显示装置。一般来说,显示装置32向用户显示经解码视频数据,且可包括多种显示装置中的任一者,例如液晶显示器、等离子显示器、有机发光二极管显示器或另一类型的显示装置。The display device 32 may be integrated with or external to the destination device 14. In some possible implementations, the destination device 14 may include an integrated display device and also be configured to interface with an external display device. In other feasible implementations, the destination device 14 may be a display device. Generally, the display device 32 displays the decoded video data to a user, and may include any of a variety of display devices, such as a liquid crystal display, a plasma display, an organic light emitting diode display, or another type of display device.
视频编码器20及视频解码器30可根据例如目前在开发中的下一代视频编解码压缩标准(H.266)操作且可遵照H.266测试模型(JEM)。替代地,视频编码器20及视频解码器30可根据例如ITU-TH.265标准,也称为高效率视频解码标准,或者,ITU-TH.264标准的其它专属或工业标准或这些标准的扩展而操作,ITU-TH.264标准替代地被称为MPEG-4第10部 分,也称高级视频编码(advanced video coding,AVC)。然而,本申请的技术不限于任何特定解码标准。视频压缩标准的其它可行的实施方式包含MPEG-2和ITU-TH.263。 Video encoder 20 and video decoder 30 may operate according to, for example, the next-generation video codec compression standard (H.266) currently under development and may conform to the H.266 test model (JEM). Alternatively, the video encoder 20 and the video decoder 30 may be based on, for example, the ITU-TH.265 standard, also referred to as a high-efficiency video decoding standard, or other proprietary or industrial standards of the ITU-TH.264 standard or extensions of these standards In operation, the ITU-TH.264 standard is alternatively referred to as MPEG-4 Part 10, also known as advanced video coding (AVC). However, the techniques of this application are not limited to any particular decoding standard. Other possible implementations of the video compression standard include MPEG-2 and ITU-TH.263.
尽管未在图1中展示,但在一些方面中,视频编码器20及视频解码器30可各自与音频编码器及解码器集成,且可包含适当多路复用器-多路分用器(MUX-DEMUX)单元或其它硬件及软件以处置共同数据流或单独数据流中的音频及视频两者的编码。如果适用,那么在一些可行的实施方式中,MUX-DEMUX单元可遵照ITUH.223多路复用器协议或例如用户数据报协议(UDP)的其它协议。Although not shown in FIG. 1, in some aspects video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder, and may include an appropriate multiplexer-demultiplexer ( MUX-DEMUX) unit or other hardware and software to handle encoding of both audio and video in a common or separate data stream. If applicable, in some feasible implementations, the MUX-DEMUX unit may conform to the ITUH.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
视频编码器20及视频解码器30各自可实施为多种合适编码器电路中的任一者,例如,一个或多个微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、离散逻辑、软件、硬件、固件或其任何组合。在技术部分地以软件实施时,装置可将软件的指令存储于合适的非暂时性计算机可读媒体中且使用一个或多个处理器以硬件执行指令,以执行本申请的技术。视频编码器20及视频解码器30中的每一者可包含于一个或多个编码器或解码器中,其中的任一者可在相应装置中集成为组合式编码器/解码器(CODEC)的部分。 Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the device may store the software's instructions in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this application. Each of the video encoder 20 and the video decoder 30 may be included in one or more encoders or decoders, and any of them may be integrated as a combined encoder / decoder (CODEC) in a corresponding device. part.
本申请示例性地可涉及视频编码器20将特定信息“用信号发送”到例如视频解码器30的另一装置。然而,应理解,视频编码器20可通过将特定语法元素与视频数据的各种经编码部分相关联来用信号发送信息。即,视频编码器20可通过将特定语法元素存储到视频数据的各种经编码部分的头信息来“用信号发送”数据。在一些应用中,这些语法元素可在通过视频解码器30接收及解码之前经编码及存储(例如,存储到存储系统34或文件服务器36)。因此,术语“用信号发送”示例性地可指语法或用于解码经压缩视频数据的其它数据的传达,而不管此传达是实时或近实时地发生或在时间跨度内发生,例如可在编码时将语法元素存储到媒体时发生,语法元素接着可在存储到此媒体之后的任何时间通过解码装置检索。The present application may, by way of example, relate to video encoder 20 "signaling" certain information to another device, such as video decoder 30. It should be understood, however, that video encoder 20 may signal information by associating specific syntax elements with various encoded portions of video data. That is, video encoder 20 may "signal" the data by storing specific syntax elements to the header information of various encoded portions of the video data. In some applications, these syntax elements may be encoded and stored (eg, stored to storage system 34 or file server 36) before being received and decoded by video decoder 30. Thus, the term "signaling" may exemplarily refer to the transmission of syntax or other data used to decode compressed video data, regardless of whether this transmission occurs in real-time or near real-time or within a time span, such as may be encoded Occurs when the syntax element is stored to the media, which can then be retrieved by the decoding device at any time after being stored on this media.
JCT-VC开发了H.265(HEVC)标准。HEVC标准化基于称作HEVC测试模型(HM)的视频解码装置的演进模型。H.265的最新标准文档可从http://www.itu.int/rec/T-REC-H.265获得,最新版本的标准文档为H.265(12/16),该标准文档以全文引用的方式并入本文中。HM假设视频解码装置相对于ITU-TH.264/AVC的现有算法具有若干额外能力。例如,H.264提供9种帧内预测编码模式,而HM可提供多达35种帧内预测编码模式。JCT-VC has developed the H.265 (HEVC) standard. The HEVC standardization is based on an evolution model of a video decoding device called a HEVC test model (HM). The latest standard document of H.265 can be obtained from http://www.itu.int/rec/T-REC-H.265. The latest version of the standard document is H.265 (12/16). The standard document is in full text. The citation is incorporated herein. HM assumes that video decoding devices have several additional capabilities over existing algorithms of ITU-TH.264 / AVC. For example, H.264 provides 9 intra-prediction encoding modes, while HM provides up to 35 intra-prediction encoding modes.
JVET致力于开发H.266标准。H.266标准化的过程基于称作H.266测试模型的视频解码装置的演进模型。H.266的算法描述可从http://phenix.int-evry.fr/jvet获得,其中最新的算法描述包含于JVET-F1001-v2中,该算法描述文档以全文引用的方式并入本文中。同时,可从https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/获得JEM测试模型的参考软件,同样以全文引用的方式并入本文中。JVET is committed to developing the H.266 standard. The process of H.266 standardization is based on the evolution model of the video decoding device called the H.266 test model. The algorithm description of H.266 can be obtained from http://phenix.int-evry.fr/jvet. The latest algorithm description is included in JVET-F1001-v2. The algorithm description document is incorporated herein by reference in its entirety. . At the same time, the reference software for the JEM test model can be obtained from https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/, which is also incorporated herein by reference in its entirety.
一般来说,HM的工作模型描述可将视频帧或图像划分成包含亮度及色度样本两者的树块或最大编码单元(largest coding unit,LCU)的序列,LCU也被称为CTU。树块具有与H.264标准的宏块类似的目的。条带包含按解码次序的数个连续树块。可将视频帧或图像分割成一个或多个条带。可根据四叉树将每一树块分裂成编码单元。例如,可将作为四叉树的根节点的树块分裂成四个子节点,且每一子节点可又为母节点且被分裂成另外四个子节点。作为四叉树的叶节点的最终不可分裂的子节点包括解码节点,例如,经解码视频块。与经解码码流相关联的语法数据可定义树块可分裂的最大次数,且也可定义解码节点的最小大小。Generally speaking, the working model description of HM can divide a video frame or image into a sequence of tree blocks or maximum coding units (LCUs) containing both luminance and chrominance samples. LCUs are also known as CTUs. The tree block has a similar purpose as the macro block of the H.264 standard. A slice contains several consecutive tree blocks in decoding order. A video frame or image can be split into one or more slices. Each tree block can be split into coding units according to a quadtree. For example, a tree block that is a root node of a quad tree may be split into four child nodes, and each child node may be a parent node and split into another four child nodes. The final indivisible child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded video blocks. The syntax data associated with the decoded codestream can define the maximum number of times a tree block can be split, and can also define the minimum size of a decoding node.
编码单元包含解码节点及预测单元(prediction unit,PU)以及与解码节点相关联的变换单元(transform unit,TU)。CU的大小对应于解码节点的大小且形状必须为正方形。CU的大小的范围可为8×8像素直到最大64×64像素或更大的树块的大小。每一CU可含有一个或多个PU及一个或多个TU。例如,与CU相关联的语法数据可描述将CU分割成一个或多个PU的情形。分割模式在CU是被跳过或经直接模式编码、帧内预测模式编码或帧间预测模式编 码的情形之间可为不同的。PU可经分割成形状为非正方形。例如,与CU相关联的语法数据也可描述根据四叉树将CU分割成一个或多个TU的情形。TU的形状可为正方形或非正方形。The coding unit includes a decoding node and a prediction unit (PU) and a transformation unit (TU) associated with the decoding node. The size of the CU corresponds to the size of the decoding node and the shape must be square. The size of the CU can range from 8 × 8 pixels to a maximum 64 × 64 pixels or larger tree block size. Each CU may contain one or more PUs and one or more TUs. For example, the syntax data associated with a CU may describe a case where a CU is partitioned into one or more PUs. The division mode may be different between cases where the CU is skipped or coded by direct mode, intra prediction mode, or inter prediction mode. The PU can be divided into non-square shapes. For example, the syntax data associated with a CU may also describe a case where a CU is partitioned into one or more TUs according to a quadtree. The shape of the TU can be square or non-square.
HEVC标准允许根据TU进行变换,TU对于不同CU来说可为不同的。TU通常基于针对经分割LCU定义的给定CU内的PU的大小而设定大小,但情况可能并非总是如此。TU的大小通常与PU相同或小于PU。在一些可行的实施方式中,可使用称作“残差四叉树”(residual qualtree,RQT)的四叉树结构将对应于CU的残差样本再分成较小单元。RQT的叶节点可被称作TU。可变换与TU相关联的像素差值以产生变换系数,变换系数可被量化。The HEVC standard allows transformation based on the TU, which can be different for different CUs. The TU is usually sized based on the size of the PUs within a given CU defined for the partitioned LCU, but this may not always be the case. The size of the TU is usually the same as or smaller than the PU. In some feasible implementations, a quad-tree structure called “residual quad tree” (RQT) can be used to subdivide the residual samples corresponding to the CU into smaller units. The leaf node of RQT may be called TU. The pixel difference values associated with the TU may be transformed to produce a transformation coefficient, which may be quantized.
一般来说,PU包含与预测过程有关的数据。例如,在PU经帧内模式编码时,PU可包含描述PU的帧内预测模式的数据。作为另一可行的实施方式,在PU经帧间模式编码时,PU可包含界定PU的运动矢量的数据。例如,界定PU的运动矢量的数据可描述运动矢量的水平分量、运动矢量的垂直分量、运动矢量的分辨率(例如,四分之一像素精确度或八分之一像素精确度)、运动矢量所指向的参考图像,和/或运动矢量的参考图像列表(例如,列表0、列表1或列表C)。Generally speaking, the PU contains data related to the prediction process. For example, when a PU is intra-mode encoded, the PU may include data describing the intra-prediction mode of the PU. As another feasible implementation manner, when the PU is inter-mode encoded, the PU may include data defining a motion vector of the PU. For example, the data defining the motion vector of the PU may describe the horizontal component of the motion vector, the vertical component of the motion vector, the resolution of the motion vector (e.g., quarter-pixel accuracy or eighth-pixel accuracy), motion vector The reference image pointed to, and / or the reference image list of the motion vector (eg, list 0, list 1 or list C).
一般来说,TU使用变换及量化过程。具有一个或多个PU的给定CU也可包含一个或多个TU。在预测之后,视频编码器20可计算对应于PU的残差值。残差值包括像素差值,像素差值可变换成变换系数、经量化且使用TU扫描以产生串行化变换系数以用于熵解码。本申请通常使用术语“视频块”来指CU的解码节点。在一些特定应用中,本申请也可使用术语“视频块”来指包含解码节点以及PU及TU的树块,例如,LCU或CU。Generally, TU uses transform and quantization processes. A given CU with one or more PUs may also contain one or more TUs. After prediction, video encoder 20 may calculate a residual value corresponding to the PU. Residual values include pixel differences, which can be transformed into transform coefficients, quantized, and scanned using TU to generate serialized transform coefficients for entropy decoding. This application generally uses the term "video block" to refer to the decoding node of a CU. In some specific applications, the term “video block” may also be used in this application to refer to a tree block including a decoding node and a PU and a TU, such as an LCU or a CU.
视频序列通常包含一系列视频帧或图像。图像群组(group of picture,GOP)示例性地包括一系列、一个或多个视频图像。GOP可在GOP的头信息中、图像中的一者或多者的头信息中或在别处包含语法数据,语法数据描述包含于GOP中的图像的数目。图像的每一条带可包含描述相应图像的编码模式的条带语法数据。视频编码器20通常对个别视频条带内的视频块进行操作以便编码视频数据。视频块可对应于CU内的解码节点。视频块可具有固定或变化的大小,且可根据指定解码标准而在大小上不同。A video sequence usually contains a series of video frames or images. A group of pictures (GOP) exemplarily includes a series, one or more video pictures. The GOP may include syntax data in the header information of the GOP, the header information of one or more of the pictures, or elsewhere, and the syntax data describes the number of pictures included in the GOP. Each slice of the image may contain slice syntax data describing the coding mode of the corresponding image. Video encoder 20 typically operates on video blocks within individual video slices to encode video data. A video block may correspond to a decoding node within a CU. Video blocks may have fixed or varying sizes, and may differ in size according to a specified decoding standard.
作为一种可行的实施方式,HM支持各种PU大小的预测。假定特定CU的大小为2N×2N,HM支持2N×2N或N×N的PU大小的帧内预测,及2N×2N、2N×N、N×2N或N×N的对称PU大小的帧间预测。HM也支持2N×nU、2N×nD、nL×2N及nR×2N的PU大小的帧间预测的不对称分割。在不对称分割中,CU的一方向未分割,而另一方向分割成25%及75%。对应于25%区段的CU的部分由“n”后跟着“上(Up)”、“下(Down)”、“左(Left)”或“右(Right)”的指示来指示。因此,例如,“2N×nU”指水平分割的2N×2NCU,其中2N×0.5NPU在上部且2N×1.5NPU在底部。As a feasible implementation, HM supports prediction of various PU sizes. Assuming that the size of a specific CU is 2N × 2N, HM supports intra prediction of PU sizes of 2N × 2N or N × N, and symmetric PU sizes of 2N × 2N, 2N × N, N × 2N, or N × N between frames. prediction. HM also supports asymmetric partitioning of PU-sized inter predictions of 2N × nU, 2N × nD, nL × 2N, and nR × 2N. In asymmetric partitioning, one direction of the CU is not partitioned, and the other direction is partitioned into 25% and 75%. The portion of the CU corresponding to the 25% section is indicated by an indication of "n" followed by "Up", "Down", "Left", or "Right". Therefore, for example, “2N × nU” refers to a horizontally-divided 2N × 2NCU, where 2N × 0.5NPU is at the top and 2N × 1.5NPU is at the bottom.
在本申请中,“N×N”与“N乘N”可互换使用以指依照垂直维度及水平维度的视频块的像素尺寸,例如,16×16像素或16乘16像素。一般来说,16×16块将在垂直方向上具有16个像素(y=16),且在水平方向上具有16个像素(x=16)。同样地,N×N块一股在垂直方向上具有N个像素,且在水平方向上具有N个像素,其中N表示非负整数值。可将块中的像素排列成行及列。此外,块未必需要在水平方向上与在垂直方向上具有相同数目个像素。例如,块可包括N×M个像素,其中M未必等于N。In this application, “N × N” and “N times N” are used interchangeably to refer to the pixel size of a video block according to vertical and horizontal dimensions, for example, 16 × 16 pixels or 16 × 16 pixels. In general, a 16 × 16 block will have 16 pixels (y = 16) in the vertical direction and 16 pixels (x = 16) in the horizontal direction. Similarly, an N × N block has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value. Pixels in a block can be arranged in rows and columns. In addition, the block does not necessarily need to have the same number of pixels in the horizontal direction as in the vertical direction. For example, a block may include N × M pixels, where M is not necessarily equal to N.
在使用CU的PU的帧内预测性或帧间预测性解码之后,视频编码器20可计算CU的TU的残差数据。PU可包括空间域(也称作像素域)中的像素数据,且TU可包括在将变换(例如,离散余弦变换(discrete cosine transform,DCT)、整数变换、小波变换或概念上类似的变换)应用于残差视频数据之后变换域中的系数。残差数据可对应于未经编码图像的像素与对应于PU的预测值之间的像素差。视频编码器20可形成包含CU的残差数据的TU,且接着变换TU以产生CU的变换系数。After the intra-predictive or inter-predictive decoding of the PU using the CU, the video encoder 20 may calculate the residual data of the TU of the CU. A PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may include transforming (e.g., discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after being applied to the residual video data. The residual data may correspond to a pixel difference between a pixel of an uncoded image and a prediction value corresponding to a PU. Video encoder 20 may form a TU containing residual data of the CU, and then transform the TU to generate transform coefficients for the CU.
在任何变换以产生变换系数之后,视频编码器20可执行变换系数的量化。量化示例性地指对系数进行量化以可能减少用以表示系数的数据的量从而提供进一步压缩的过程。量化过程可减少与系数中的一些或全部相关联的位深度。例如,可在量化期间将n位值降值 舍位到m位值,其中n大于m。After any transform to generate transform coefficients, video encoder 20 may perform quantization of the transform coefficients. Quantization exemplarily refers to the process of quantizing coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression. The quantization process may reduce the bit depth associated with some or all of the coefficients. For example, an n-bit value may be rounded down to an m-bit value during quantization, where n is greater than m.
JEM模型对视频图像的编码结构进行了进一步的改进,具体的,被称为“四叉树结合二叉树”(QTBT)的块编码结构被引入进来。QTBT结构摒弃了HEVC中的CU,PU,TU等概念,支持更灵活的CU划分形状,一个CU可以正方形,也可以是长方形。一个CTU首先进行四叉树划分,该四叉树的叶节点进一步进行二叉树划分。同时,在二叉树划分中存在两种划分模式,对称水平分割和对称竖直分割。二叉树的叶节点被称为CU,JEM的CU在预测和变换的过程中都不可以被进一步划分,也就是说JEM的CU,PU,TU具有相同的块大小。在现阶段的JEM中,CTU的最大尺寸为256×256亮度像素。本领域普通技术人员理解本发明实施例中的图像块包括但不限于CU、PU或TU。The JEM model further improves the coding structure of video images. Specifically, a block coding structure called "Quad Tree Combined with Binary Tree" (QTBT) is introduced. The QTBT structure abandons the concepts of CU, PU, and TU in HEVC, and supports more flexible CU division shapes. A CU can be square or rectangular. A CTU first performs a quadtree partition, and the leaf nodes of the quadtree further perform a binary tree partition. At the same time, there are two partitioning modes in binary tree partitioning, symmetrical horizontal partitioning and symmetrical vertical partitioning. The leaf nodes of a binary tree are called CUs. JEM's CUs cannot be further divided during the prediction and transformation process, which means that JEM's CU, PU, and TU have the same block size. In the current JEM, the maximum size of the CTU is 256 × 256 luminance pixels. Those of ordinary skill in the art understand that the image blocks in the embodiments of the present invention include but are not limited to CU, PU or TU.
在一些可行的实施方式中,视频编码器20可利用预定义扫描次序来扫描经量化变换系数以产生可经熵编码的串行化向量。在其它可行的实施方式中,视频编码器20可执行自适应性扫描。在扫描经量化变换系数以形成一维向量之后,视频编码器20可根据上下文自适应性可变长度解码(CAVLC)、上下文自适应性二进制算术解码(CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或其他熵解码方法来熵解码一维向量。视频编码器20也可熵编码与经编码视频数据相关联的语法元素以供视频解码器30用于解码视频数据。In some feasible implementations, video encoder 20 may utilize a predefined scan order to scan the quantized transform coefficients to generate a serialized vector that can be entropy encoded. In other possible implementations, video encoder 20 may perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 20 may perform context-adaptive variable length decoding (CAVLC), context-adaptive binary arithmetic decoding (CABAC), syntax-based context-adaptive binary Arithmetic decoding (SBAC), probability interval partition entropy (PIPE) decoding, or other entropy decoding methods to entropy decode a one-dimensional vector. Video encoder 20 may also entropy encode syntax elements associated with the encoded video data for use by video decoder 30 to decode the video data.
为了执行CABAC,视频编码器20可将上下文模型内的上下文指派给待传输的符号。上下文可与符号的相邻值是否为非零有关。为了执行CAVLC,视频编码器20可选择待传输的符号的可变长度码。可变长度解码(VLC)中的码字可经构建以使得相对较短码对应于可能性较大的符号,而较长码对应于可能性较小的符号。以这个方式,VLC的使用可相对于针对待传输的每一符号使用相等长度码字达成节省码率的目的。基于指派给符号的上下文可以确定CABAC中的概率。To perform CABAC, video encoder 20 may assign a context within a context model to a symbol to be transmitted. Context can be related to whether adjacent values of a symbol are non-zero. To perform CAVLC, video encoder 20 may select a variable length code of a symbol to be transmitted. Codewords in Variable Length Decoding (VLC) may be constructed such that relatively short codes correspond to more likely symbols and longer codes correspond to less likely symbols. In this way, the use of VLC can achieve the goal of saving code rates relative to using equal length codewords for each symbol to be transmitted. The probability in CABAC can be determined based on the context assigned to the symbol.
在本申请实施例中,视频编码器可执行帧间预测以减少图像之间的时间冗余。如前文所描述,根据不同视频压缩编解码标准的规定,CU可具有一个或多个预测单元PU。换句话说,多个PU可属于CU,或者PU和CU的尺寸相同。在本文中当CU和PU尺寸相同时,CU的分割模式为不分割,或者即为分割为一个PU,且统一使用PU进行表述。当视频编码器执行帧间预测时,视频编码器可用信号通知视频解码器用于PU的运动信息。示例性的,PU的运动信息可以包括:参考图像索引、运动矢量和预测方向标识。运动矢量可指示PU的图像块(也称视频块、像素块、像素集合等)与PU的参考块之间的位移。PU的参考块可为类似于PU的图像块的参考图像的一部分。参考块可定位于由参考图像索引和预测方向标识指示的参考图像中。In the embodiment of the present application, the video encoder may perform inter prediction to reduce temporal redundancy between images. As described above, a CU may have one or more prediction units PU according to the provisions of different video compression codec standards. In other words, multiple PUs may belong to a CU, or PUs and CUs are the same size. In this article, when the size of the CU and the PU are the same, the CU's partitioning mode is not divided, or it is divided into one PU, and the PU is uniformly used for expression. When the video encoder performs inter prediction, the video encoder may signal the video decoder motion information for the PU. Exemplarily, the motion information of the PU may include: a reference image index, a motion vector, and a prediction direction identifier. A motion vector may indicate a displacement between an image block (also called a video block, a pixel block, a pixel set, etc.) of a PU and a reference block of the PU. The reference block of the PU may be a part of the reference picture similar to the image block of the PU. The reference block may be located in a reference image indicated by a reference image index and a prediction direction identifier.
为了减少表示PU的运动信息所需要的编码比特的数目,视频编码器可根据合并预测模式或高级运动矢量预测模式过程产生用于PU中的每一者的候选运动信息列表(后文简称为候选者列表)。用于PU的候选者列表中的每一候选者可表示一组运动信息。运动信息可包括运动矢量MV和参考图像指示信息。当然,运动信息也可以只包含两者之一或者全部包含,例如在编解码端共同约定参考图像的情况下,运动信息可以仅包含运动矢量。由候选列表中的一些候选者表示的运动信息可基于其它PU的运动信息。如果候选者表示指定空域候选者位置(spatial candidate positions)或时域候选者位置(temporal candidate positions)中的一者的运动信息,则本申请可将所述候选者称作“原始”候选运动信息。举例来说,对于合并模式,在本文中也称为合并预测模式,可存在五个原始空域候选者位置和一个原始时域候选者位置。在一些实例中,视频编码器还可以通过一些手段来产生附加或额外候选运动信息,例如插入零运动矢量作为候选运动信息来产生额外候选运动信息。这些额外候选运动信息不被视为原始候选运动信息且在本申请中可称作后期或人工产生的候选运动信息。In order to reduce the number of coding bits required to represent the motion information of the PU, the video encoder may generate a candidate motion information list (hereinafter referred to as a candidate for short) for each of the PUs according to the merge prediction mode or advanced motion vector prediction mode process. List). Each candidate in the candidate list for a PU may represent a set of motion information. The motion information may include motion vector MV and reference image indication information. Of course, the motion information may also include only one or both of them. For example, in a case where a reference image is jointly agreed upon by a codec, the motion information may only include a motion vector. The motion information represented by some candidates in the candidate list may be based on the motion information of other PUs. If the candidate represents motion information specifying one of spatial candidate positions (temporal candidate positions) or temporal candidate positions (temporal candidate positions), this application may refer to the candidate as "original" candidate motion information . For example, for a merge mode, also referred to herein as a merge prediction mode, there may be five original spatial candidate locations and one original time domain candidate location. In some examples, the video encoder may also generate additional or additional candidate motion information by some means, such as inserting zero motion vectors as candidate motion information to generate additional candidate motion information. These additional candidate motion information are not considered as original candidate motion information and may be referred to as post- or artificially generated candidate motion information in this application.
本申请的技术一般涉及用于在视频编码器处产生候选者列表的技术和用于在视频解码器处产生相同候选者列表的技术。视频编码器和视频解码器可通过实施用于构建候选者 列表的相同技术来产生相同候选者列表。举例来说,视频编码器和视频解码器两者可构建具有相同数目的候选者(例如,五个候选者)的列表。视频编码器和解码器可首先考虑空域候选者(例如,同一图像中的相邻块),接着考虑时域候选者(例如,不同图像中的候选者),且最后可考虑人工产生的候选者直到将所要数目的候选者添加到列表为止。根据本申请的技术,可在候选列表构建期间针对某些类型的候选运动信息利用修剪操作以便从候选列表移除重复,而对于其它类型的候选者,可能不使用修剪以便减小解码器复杂性。举例来说,对于空域候选者集合和对于时域候选者,可执行修剪操作以从候选者的列表排除具有重复运动信息的候选者。The techniques of this application generally relate to a technique for generating a candidate list at a video encoder and a technique for generating the same candidate list at a video decoder. Video encoders and video decoders can produce the same candidate list by implementing the same techniques used to build the candidate list. For example, both a video encoder and a video decoder may build a list with the same number of candidates (e.g., five candidates). Video encoders and decoders may first consider spatial candidates (e.g., neighboring blocks in the same image), then consider temporal candidates (e.g., candidates in different images), and finally consider artificially generated candidates Until the desired number of candidates are added to the list. According to the techniques of this application, a pruning operation may be utilized during candidate list construction for certain types of candidate motion information to remove duplicates from the candidate list, while for other types of candidates, pruning may not be used in order to reduce decoder complexity . For example, for a set of spatial domain candidates and for a time domain candidate, a pruning operation may be performed to exclude candidates with duplicate motion information from the list of candidates.
在产生用于CU的PU的候选列表之后,视频编码器可从候选列表选择候选运动信息且在码流中输出表示所选择的候选运动信息的索引标识。选择的候选运动信息可为具有产生最紧密地匹配正被解码的PU的预测块的运动信息。前述索引标识可指示在候选列表中所选择的候选运动信息的位置。视频编码器还可基于由PU的运动信息指示的参考块产生用于PU的预测块。可基于由选择的候选运动信息确定PU的运动信息。举例来说,在合并模式中,确定选择的候选运动信息即为PU的运动信息。在AMVP模式中,PU的运动信息可基于PU的运动矢量差和选择的候选运动信息确定。视频编码器可基于CU的PU的预测性图像块(简称为预测块)和用于CU的原始图像块产生用于CU的一个或多个残差图像块(简称为残差块)。视频编码器可接着编码一个或多个残差块且输出码流。After generating a candidate list for the PU of the CU, the video encoder may select candidate motion information from the candidate list and output an index identifier representing the selected candidate motion information in a code stream. The selected candidate motion information may be motion information having a prediction block that produces the closest match to the PU being decoded. The aforementioned index identifier may indicate a position of the candidate motion information selected in the candidate list. The video encoder may also generate a prediction block for the PU based on a reference block indicated by the motion information of the PU. The motion information of the PU may be determined based on the selected candidate motion information. For example, in the merge mode, it is determined that the selected candidate motion information is the motion information of the PU. In the AMVP mode, motion information of a PU may be determined based on a motion vector difference of the PU and selected candidate motion information. The video encoder may generate one or more residual image blocks (referred to as residual blocks) for the CU based on the predictive image blocks (referred to as prediction blocks) of the PU of the CU and the original image blocks for the CU. The video encoder may then encode one or more residual blocks and output a code stream.
码流可包括用于识别PU的候选列表中的选定候选运动信息的数据。视频解码器可基于由PU的候选列表中的选定候选运动信息确定PU的运动信息。视频解码器可基于PU的运动信息识别用于PU的一或多个参考块。在识别PU的一或多个参考块之后,视频解码器可基于PU的一或多个参考块产生用于PU的预测块。视频解码器可基于用于CU的PU的预测块和用于CU的一个或多个残差块来重构用于CU的图像块。The code stream may include data for identifying selected candidate motion information in a candidate list of the PU. The video decoder may determine the motion information of the PU based on the selected candidate motion information in the candidate list of the PU. The video decoder may identify one or more reference blocks for the PU based on the motion information of the PU. After identifying one or more reference blocks of the PU, the video decoder may generate a prediction block for the PU based on the one or more reference blocks of the PU. The video decoder may reconstruct an image block for a CU based on a prediction block of the PU for the CU and one or more residual blocks for the CU.
为了易于解释,本申请可将位置或图像块描述为与CU或PU具有各种空间关系。此描述可解释为是指位置或图像块和与CU或PU相关联的图像块具有各种空间关系。此外,本申请可将视频解码器当前在解码的PU称作当前PU,也称为当前待处理图像块。本申请可将视频解码器当前在解码的CU称作当前CU。本申请可将视频解码器当前在解码的图像称作当前图像。应理解,本申请同时适用于PU和CU具有相同尺寸,或者PU即为CU的情况,统一使用PU来表示。For ease of explanation, the present application may describe a position or an image block as having various spatial relationships with a CU or a PU. This description can be interpreted to mean that the position or image block and the image block associated with the CU or PU have various spatial relationships. In addition, in this application, a PU currently being decoded by a video decoder may be referred to as a current PU, and may also be referred to as a current image block to be processed. This application may refer to the CU that the video decoder is currently decoding as the current CU. This application may refer to the image currently being decoded by the video decoder as the current image. It should be understood that this application is applicable to a case where the PU and the CU have the same size, or the PU is the CU, and the PU is used to represent the same.
如前文简短地描述,视频编码器20可使用帧间预测以产生用于CU的PU的预测块和运动信息。在一些例子中,PU的运动信息可能与一个或多个邻近PU(即,其图像块在空间上或时间上在该PU的图像块附近的PU)的运动信息相同或类似。因为邻近PU经常具有类似运动信息,所以视频编码器20可参考邻近PU的运动信息来编码该PU的运动信息。参考邻近PU的运动信息来编码该PU的运动信息可减少码流中指示该PU的运动信息所需要的编码比特的数目。As briefly described previously, video encoder 20 may use inter prediction to generate prediction blocks and motion information for a PU of a CU. In some examples, the motion information of a PU may be the same or similar to the motion information of one or more neighboring PUs (ie, PUs whose image blocks are spatially or temporally near the PU's image blocks). Because neighboring PUs often have similar motion information, video encoder 20 may refer to the motion information of neighboring PUs to encode the motion information of the PU. Encoding the motion information of the PU with reference to the motion information of the neighboring PU can reduce the number of encoding bits required in the code stream to indicate the motion information of the PU.
视频编码器20可以各种方式参考邻近PU的运动信息来编码该PU的运动信息。举例来说,视频编码器20可指示该PU的运动信息与附近PU的运动信息相同。本申请可使用合并模式来指代指示该PU的运动信息与邻近PU的运动信息相同或可从邻近PU的运动信息导出。在另一可行的实施方式中,视频编码器20可计算用于该PU的运动矢量差(Motion Vector Difference,MVD)。MVD指示该PU的运动矢量与邻近PU的运动矢量之间的差。视频编码器20可将MVD而非该PU的运动矢量包括于该PU的运动信息中。在码流中表示MVD比表示该PU的运动矢量所需要的编码比特少。本申请可使用高级运动矢量预测模式指代通过使用MVD和识别候选者(即候选运动信息)的索引值来通知解码端该PU的运动信息。 Video encoder 20 may refer to the motion information of a neighboring PU in various ways to encode the motion information of that PU. For example, video encoder 20 may indicate that the motion information of the PU is the same as the motion information of nearby PUs. This application may use a merge mode to refer to indicating that the motion information of the PU is the same as that of the neighboring PU or may be derived from the motion information of the neighboring PU. In another feasible implementation manner, the video encoder 20 may calculate a Motion Vector Difference (MVD) for the PU. MVD indicates the difference between the motion vector of this PU and the motion vector of neighboring PUs. Video encoder 20 may include MVD instead of the motion vector of the PU in the motion information of the PU. Representing MVD in the code stream requires fewer coding bits than representing the motion vector of the PU. This application may use an advanced motion vector prediction mode to refer to using the MVD and an index value identifying a candidate (ie, candidate motion information) to notify the decoding end of the PU's motion information.
为了使用合并模式(亦称为融合模式)或AMVP模式以信号通知解码端该PU的运动信息,视频编码器20可产生用于该PU的候选列表。候选列表可包括一或多个候选者(即一组或多组候选运动信息)。用于该PU的候选列表中的每一个候选者表示一组运动信息。一组运动信息可包括运动矢量、参考图像列表和与参考图像列表对应的参考图像索引。In order to use the merge mode (also referred to as fusion mode) or AMVP mode to signal the decoder's motion information of the PU, the video encoder 20 may generate a candidate list for the PU. The candidate list may include one or more candidates (ie, one or more sets of candidate motion information). Each candidate in the candidate list for this PU represents a set of motion information. A set of motion information may include a motion vector, a reference image list, and a reference image index corresponding to the reference image list.
在产生用于PU的候选列表之后,视频编码器20可从用于PU的候选列表中选择多个候选者中的一者。举例来说,视频编码器可比较每一候选者与正被解码的PU且可选择具有所要求的码率-失真代价的候选者。视频编码器20可输出用于PU的候选者索引。候选者索引可识别选定的候选者在候选列表中的位置。After generating the candidate list for the PU, the video encoder 20 may select one of a plurality of candidates from the candidate list for the PU. For example, a video encoder may compare each candidate with a PU that is being decoded and may select a candidate with the required code rate-distortion cost. Video encoder 20 may output a candidate index for a PU. The candidate index identifies the position of the selected candidate in the candidate list.
此外,视频编码器20可基于由PU的运动信息指示的参考块产生用于PU的预测块。可基于由用于PU的候选列表中的选定的候选运动信息确定PU的运动信息。In addition, the video encoder 20 may generate a prediction block for a PU based on a reference block indicated by the motion information of the PU. The motion information of the PU may be determined based on the selected candidate motion information from the candidate list for the PU.
当视频解码器30接收到码流时,视频解码器30可产生用于CU的PU中的每一者的候选列表。由视频解码器30针对PU产生的候选列表可与由视频编码器20针对PU产生的候选列表相同。从码流中解析得到的语法元素可指示在PU的候选列表中选择的候选运动信息的位置。在产生用于PU的候选列表之后,视频解码器30可基于由PU的运动信息指示的一或多个参考块产生用于PU的预测块。视频解码器30可基于在用于PU的候选列表中选择的候选运动信息确定PU的运动信息。视频解码器30可基于用于PU的预测块和用于CU的残差块重构用于CU的图像块。When video decoder 30 receives a code stream, video decoder 30 may generate a candidate list for each of the PUs of the CU. The candidate list generated by video decoder 30 for a PU may be the same as the candidate list generated by video encoder 20 for a PU. The syntax element parsed from the code stream may indicate the position of the candidate motion information selected in the candidate list of the PU. After generating a candidate list for the PU, video decoder 30 may generate a prediction block for the PU based on one or more reference blocks indicated by the motion information of the PU. Video decoder 30 may determine motion information of a PU based on candidate motion information selected in a candidate list for the PU. Video decoder 30 may reconstruct an image block for a CU based on a prediction block for a PU and a residual block for a CU.
应当理解,在一种可行的实施方式中,在解码端,候选列表的构建与从码流中解析选择的候选者在候选列表中的位置是相互独立,可以任意先后或者并行进行的。It should be understood that, in a feasible implementation manner, at the decoding end, the construction of the candidate list and the positions of the candidates selected from the code stream parsing in the candidate list are independent of each other and may be performed in any order or in parallel.
在另一种可行的实施方式中,在解码端,首先从码流中解析选定的候选者在候选列表中的位置,根据解析出来的位置构建候选列表,在该实施方式中,不需要构建全部的候选列表,只需要构建到该解析出来的位置处的候选列表,即能够确定该位置处的候选者即可。举例来说,当解析码流得出选定的候选者为候选列表中索引标识为3的候选者时,仅需要构建从索引为0到索引为3的候选列表,即可确定索引标识为3的候选者,可以达到减小复杂度,提高解码效率的技术效果。In another feasible implementation manner, at the decoding end, the position of the selected candidate in the candidate list is first parsed from the code stream, and the candidate list is constructed according to the parsed position. In this implementation manner, no construction is required. For all candidate lists, only the candidate list at the parsed position needs to be constructed, that is, the candidate at the position can be determined. For example, when the selected stream is obtained by parsing the code stream, the candidate with the index identifier of 3 in the candidate list needs to be constructed only from the candidate list with the index of 0 to 3, and the index identifier can be determined to be 3. The candidate can achieve the technical effect of reducing complexity and improving decoding efficiency.
图2为本申请实施例中视频编码器20的一种示意性框图。视频编码器20可执行视频条带内的视频块的帧内解码和帧间解码。帧内解码依赖于空间预测来减少或去除给定视频帧或图像内的视频的空间冗余。帧间解码依赖于时间预测来减少或去除视频序列的邻近帧或图像内的视频的时间冗余。帧内模式(I模式)可指若干基于空间的压缩模式中的任一者。例如单向预测(P模式)或双向预测(B模式)等帧间模式可指若干基于时间的压缩模式中的任一者。FIG. 2 is a schematic block diagram of a video encoder 20 according to an embodiment of the present application. Video encoder 20 may perform intra-frame decoding and inter-frame decoding of video blocks within a video slice. Intra decoding relies on spatial prediction to reduce or remove the spatial redundancy of a video within a given video frame or image. Inter-frame decoding relies on temporal prediction to reduce or remove temporal redundancy of video within adjacent frames of a video sequence or video. The intra mode (I mode) may refer to any of several space-based compression modes. Inter-modes such as unidirectional prediction (P mode) or bidirectional prediction (B mode) may refer to any of several time-based compression modes.
在图2的可行的实施方式中,视频编码器20包含分割单元35、预测单元41、参考图像存储器64、求和器50、变换处理单元52、量化单元54和熵编码单元56。预测单元41包含帧间预测单元43和帧内预测单元46。帧间预测单元43可以包括运动估计单元42和运动补偿单元44。对于视频块重构建,视频编码器20也可包含反量化单元58、反变换单元60和求和器(亦称为重建器)62。也可包含解块滤波器(图2中未展示)以对块边界进行滤波从而从经重构建视频中去除块效应伪影。在需要时,解块滤波器将通常对求和器62的输出进行滤波。除了解块滤波器之外,也可使用额外环路滤波器(环路内或环路后)。In the feasible embodiment of FIG. 2, the video encoder 20 includes a segmentation unit 35, a prediction unit 41, a reference image memory 64, a summer 50, a transformation processing unit 52, a quantization unit 54, and an entropy encoding unit 56. The prediction unit 41 includes an inter prediction unit 43 and an intra prediction unit 46. The inter prediction unit 43 may include a motion estimation unit 42 and a motion compensation unit 44. For video block reconstruction, the video encoder 20 may also include an inverse quantization unit 58, an inverse transform unit 60, and a summer (also referred to as a reconstructor) 62. A deblocking filter (not shown in Figure 2) may also be included to filter block boundaries to remove block effect artifacts from the reconstructed video. When needed, the deblocking filter will typically filter the output of the summer 62. In addition to the deblocking filter, additional loop filters (in-loop or post-loop) can be used.
如图2中所展示,视频编码器20接收视频数据,且分割单元35将数据分割成视频块。此分割也可包含分割成条带、图像块或其它较大单元,以及(例如)根据LCU及CU的四叉树结构进行视频块分割。视频编码器20示例性地说明编码在待编码的视频条带内的视频块的组件。一般来说,条带可划分成多个视频块(且可能划分成称作图像块的视频块的集合)。As shown in FIG. 2, the video encoder 20 receives video data, and the segmentation unit 35 divides the data into video blocks. This segmentation may also include segmentation into slices, image blocks, or other larger units, and video block segmentation, for example, based on the quad-tree structure of the LCU and CU. Video encoder 20 exemplarily illustrates the components of a video block encoded within a video slice to be encoded. In general, a slice can be divided into multiple video blocks (and possibly into a collection of video blocks called image blocks).
预测单元41可基于编码质量与代价计算结果(例如,码率-失真代价,RDcost)选择当前视频块的多个可能解码模式中的一者,例如多个帧内解码模式中的一者或多个帧间解码模式中的一者。预测单元41可将所得经帧内解码或经帧间解码块提供到求和器50以产生残差块数据且将所得经帧内解码或经帧间解码块提供到求和器62以重构建经编码块从而用作参考图像。The prediction unit 41 may select one of a plurality of possible decoding modes of the current video block, such as one or more of a plurality of intra decoding modes, based on the encoding quality and the cost calculation result (for example, code rate-distortion cost, RDcost) One of the inter-frame decoding modes. The prediction unit 41 may provide the obtained intra decoded or inter decoded block to the summer 50 to generate residual block data and provide the obtained intra decoded or inter decoded block to the summer 62 to reconstruct The encoded block is thus used as a reference image.
预测单元41内的帧间预测单元43(例如运动估计单元42及运动补偿单元44)执行相对于一个或多个参考图像中的一个或多个预测块的当前视频块的帧间预测性解码以提供时 间压缩。运动估计单元42用于根据视频序列的预定模式确定视频条带的帧间预测模式。预定模式可将序列中的视频条带指定为P条带、B条带或GPB条带。运动估计单元42及运动补偿单元44可高度集成,这里为方便理解概念而分别说明。通过运动估计单元42所执行的运动估计以产生估计视频块(亦称为图像块)的运动矢量的过程。例如,运动矢量可指示当前视频帧或图像内的视频块的PU相对于参考图像内的预测块的位移。The inter prediction unit 43 (such as the motion estimation unit 42 and the motion compensation unit 44) within the prediction unit 41 performs inter-predictive decoding of the current video block with respect to one or more prediction blocks in one or more reference images to Provides time compression. The motion estimation unit 42 is configured to determine an inter prediction mode of a video slice according to a predetermined mode of a video sequence. The predetermined mode can specify the video slices in the sequence as P slices, B slices, or GPB slices. The motion estimation unit 42 and the motion compensation unit 44 can be highly integrated, and are described separately here for the convenience of understanding the concept. A process of estimating a motion vector of a video block (also referred to as an image block) through the motion estimation performed by the motion estimation unit 42. For example, a motion vector may indicate a displacement of a PU of a video block within a current video frame or image relative to a predicted block within a reference image.
预测块为依据像素差而被发现为紧密匹配待解码的视频块的PU的块,像素差可通过绝对差和(SAD)、平方差和(SSD)或其它差度量确定。在一些可行的实施方式中,视频编码器20可计算存储于参考图像存储器64中的参考图像的子整数(sub-integer)像素位置的值。例如,视频编码器20可内插参考图像的四分之一像素位置、八分之一像素位置或其它分数像素位置的值。因此,运动估计单元42可执行相对于全像素位置及分数像素位置的运动搜索且输出具有分数像素精确度的运动矢量。The prediction block is a block that is found to closely match the PU of the video block to be decoded according to the pixel difference, and the pixel difference may be determined by a sum of absolute differences (SAD), a sum of squared differences (SSD), or other differences. In some feasible implementations, the video encoder 20 may calculate a value of a sub-integer pixel position of a reference image stored in the reference image memory 64. For example, video encoder 20 may interpolate values of quarter pixel positions, eighth pixel positions, or other fractional pixel positions of the reference image. Therefore, the motion estimation unit 42 may perform a motion search with respect to the full pixel position and the fractional pixel position and output a motion vector having a fractional pixel accuracy.
运动估计单元42通过比较PU的位置与参考图像的预测块的位置而计算经帧间解码条带中的视频块的PU的运动矢量。可从第一参考图像列表(列表0)或第二参考图像列表(列表1)选择参考图像,列表中的每一者识别存储于参考图像存储器64中的一个或多个参考图像。运动估计单元42将经计算运动矢量发送到熵编码单元56及运动补偿单元44。The motion estimation unit 42 calculates a motion vector of the PU of the video block in the inter-decoded slice by comparing the position of the PU with the position of the prediction block of the reference image. Reference images can be selected from the first reference image list (List 0) or the second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 64. The motion estimation unit 42 sends the calculated motion vector to the entropy encoding unit 56 and the motion compensation unit 44.
由运动补偿单元44执行的运动补偿可涉及基于由运动估计所确定的运动矢量提取或产生预测块。在接收当前视频块的PU的运动矢量后,运动补偿单元44即可在参考图像列表中的一者中定位运动矢量所指向的预测块。视频编码器20通过从正解码的当前视频块的像素值减去预测块的像素值来形成残差视频块,从而形成像素差值。像素差值形成块的残差数据,且可包含亮度及色度差分量两者。求和器50表示执行此减法运算的一个或多个组件。运动补偿单元44也可产生与视频块及视频条带相关联的语法元素以供视频解码器30用于解码视频条带的视频块。Motion compensation performed by the motion compensation unit 44 may involve extracting or generating a prediction block based on a motion vector determined by motion estimation. After receiving the motion vector of the PU of the current video block, the motion compensation unit 44 can locate the prediction block pointed to by the motion vector in one of the reference image lists. Video encoder 20 forms a residual video block by subtracting the pixel value of the prediction block from the pixel value of the current video block being decoded, thereby forming a pixel difference value. The pixel difference values form the residual data of the block, and may include both luminance and chrominance difference components. The summer 50 represents one or more components that perform this subtraction operation. Motion compensation unit 44 may also generate syntax elements associated with video blocks and video slices for use by video decoder 30 for decoding video blocks of video slices.
如果PU位于B条带中,则含有PU的图像可与称作“列表0”和“列表1”的两个参考图像列表相关联。在一些可行的实施方式中,含有B条带的图像可与为列表0和列表1的组合的列表组合相关联。If the PU is located in the B slice, the picture containing the PU may be associated with two reference picture lists called "List 0" and "List 1". In some possible implementations, an image containing B bands may be associated with a list combination that is a combination of list 0 and list 1.
此外,如果PU位于B条带中,则运动估计单元42可针对PU执行单向预测或双向预测,其中,在一些可行的实施方式中,双向预测为分别基于列表0和列表1的参考图像列表的图像进行的预测,在另一些可行的实施方式中,双向预测为分别基于当前帧在显示顺序上的已重建的未来帧和已重建的过去帧进行的预测。当运动估计单元42针对PU执行单向预测时,运动估计单元42可在列表0或列表1的参考图像中搜索用于PU的参考块。运动估计单元42可接着产生指示列表0或列表1中的含有参考块的参考图像的参考帧索引和指示PU与参考块之间的空间位移的运动矢量。运动估计单元42可输出参考帧索引、预测方向标识和运动矢量作为PU的运动信息。预测方向标识可指示参考帧索引指示列表0或列表1中的参考图像。例如预测方向标识1指示列表list0,预测方向标识2指示列表list1,预测方向标识3指示双向预测,即list0和list1。运动补偿单元44可基于由PU的运动信息指示的参考块产生PU的预测性图像块。In addition, if the PU is located in the B slice, the motion estimation unit 42 may perform unidirectional prediction or bidirectional prediction for the PU, wherein in some feasible implementations, the bidirectional prediction is a reference image list based on the list 0 and the list 1, respectively In other feasible implementations, the bi-directional prediction is a prediction based on a reconstructed future frame and a reconstructed past frame in the display order of the current frame, respectively. When the motion estimation unit 42 performs one-way prediction for a PU, the motion estimation unit 42 may search a reference image of List 0 or List 1 for a reference block for the PU. The motion estimation unit 42 may then generate a reference frame index indicating a reference image containing a reference block in List 0 or List 1 and a motion vector indicating a spatial displacement between the PU and the reference block. The motion estimation unit 42 may output a reference frame index, a prediction direction identifier, and a motion vector as motion information of the PU. The prediction direction identifier may indicate a reference picture in the reference frame index indication list 0 or list 1. For example, the prediction direction identifier 1 indicates the list list0, the prediction direction identifier 2 indicates the list list1, and the prediction direction identifier 3 indicates the bidirectional prediction, that is, list0 and list1. The motion compensation unit 44 may generate a predictive image block of the PU based on a reference block indicated by the motion information of the PU.
当运动估计单元42针对PU执行双向预测时,运动估计单元42可在列表0中的参考图像中搜索用于PU的参考块且还可在列表1中的参考图像中搜索用于PU的另一参考块。运动估计单元42可接着产生指示列表0和列表1中的含有参考块的参考图像的参考索引和指示参考块与PU之间的空间位移的运动矢量。运动估计单元42可输出PU的参考索引和运动矢量作为PU的运动信息。运动补偿单元44可基于由PU的运动信息指示的参考块产生PU的预测性图像块。When the motion estimation unit 42 performs bidirectional prediction for a PU, the motion estimation unit 42 may search for a reference block for the PU in the reference image in list 0 and may also search for another for the PU in the reference image in list 1 Reference block. The motion estimation unit 42 may then generate a reference index indicating the reference image containing the reference block in List 0 and List 1 and a motion vector indicating the spatial displacement between the reference block and the PU. The motion estimation unit 42 may output a reference index and a motion vector of the PU as motion information of the PU. The motion compensation unit 44 may generate a predictive image block of the PU based on a reference block indicated by the motion information of the PU.
在一些可行的实施方式中,运动估计单元42不向熵编码单元56输出用于PU的运动信息的完整集合。而是,运动估计单元42可参考另一PU的运动信息来用信号通知PU的运动信息。举例来说,运动估计单元42可确定PU的运动信息充分类似于相邻PU的运动信息。在此实施方式中,运动估计单元42可在与PU相关联的语法结构中指示一个指示值, 所述指示值向视频解码器30指示PU具有与相邻PU相同的运动信息或具有可从相邻PU导出的运动信息。在另一实施方式中,运动估计单元42可在与PU相关联的语法结构中识别与相邻PU相关联的候选者和运动矢量差(MVD)。MVD指示PU的运动矢量和与相邻PU相关联的所指示候选者之间的差。视频解码器30可使用所指示候选者和MVD来确定PU的运动矢量。In some feasible implementations, the motion estimation unit 42 does not output the complete set of motion information for the PU to the entropy encoding unit 56. Instead, the motion estimation unit 42 may refer to the motion information of another PU to signal the motion information of the PU. For example, the motion estimation unit 42 may determine that the motion information of a PU is sufficiently similar to the motion information of a neighboring PU. In this embodiment, the motion estimation unit 42 may indicate an indication value in the syntax structure associated with the PU, and the indication value indicates to the video decoder 30 that the PU has the same motion information as the neighboring PU or has a Neighbor PU derived motion information. In another embodiment, the motion estimation unit 42 may identify candidates and motion vector differences (MVD) associated with neighboring PUs in a syntax structure associated with the PU. MVD indicates the difference between the motion vector of the PU and the indicated candidate associated with the neighboring PU. Video decoder 30 may use the indicated candidate and MVD to determine the motion vector of the PU.
如前文所描述,预测单元41可产生用于CU的每一PU的候选者列表。为了提高帧间预测效率,本申请实施例在候选者列表(例如融合运动信息候选列表和/或运动矢量预测候选列表)中加入历史候选(history candidate),后文将对帧间预测单元43的改进作详细阐述。As described above, the prediction unit 41 may generate a candidate list for each PU of the CU. In order to improve the efficiency of inter prediction, in the embodiment of the present application, a history candidate is added to a candidate list (for example, a fusion motion information candidate list and / or a motion vector prediction candidate list). Improve for elaboration.
预测单元41内的帧内预测单元46可执行相对于在与待解码的当前块相同的图像或条带中的一个或多个相邻块的当前视频块的帧内预测性解码以提供空间压缩。因此,作为通过运动估计单元42及运动补偿单元44执行的帧间预测(如前文所描述)的替代,帧内预测单元46可帧内预测当前块。具体地说,帧内预测单元46可确定用以编码当前块的帧内预测模式。在一些可行的实施方式中,帧内预测单元46可(例如)在单独编码遍历期间使用各种帧内预测模式来编码当前块,且帧内预测单元46(或在一些可行的实施方式中,模式选择单元40)可从经测试模式选择使用的适当帧内预测模式。The intra prediction unit 46 within the prediction unit 41 may perform intra predictive decoding of the current video block relative to one or more neighboring blocks in the same image or slice as the current block to be decoded to provide spatial compression . Therefore, instead of the inter prediction (as described above) performed by the motion estimation unit 42 and the motion compensation unit 44, the intra prediction unit 46 may predict the current block intra. Specifically, the intra prediction unit 46 may determine an intra prediction mode used to encode the current block. In some feasible implementations, the intra prediction unit 46 may, for example, encode the current block using various intra prediction modes during separate encoding traversals, and the intra prediction unit 46 (or in some feasible implementations, The mode selection unit 40) may select an appropriate intra prediction mode to use from the tested modes.
在预测单元41经由帧间预测或帧内预测产生当前视频块的预测块之后,视频编码器20通过从当前视频块减去预测块而形成残差视频块。残差块中的残差视频数据可包含于一个或多个TU中且应用于变换处理单元52。变换处理单元52使用例如离散余弦变换(DCT)或概念上类似的变换的变换(例如,离散正弦变换DST)将残差视频数据变换成残差变换系数。变换处理单元52可将残差视频数据从像素域转换到变换域(例如,频域)。After the prediction unit 41 generates a prediction block of the current video block via inter prediction or intra prediction, the video encoder 20 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and applied to the transform processing unit 52. The transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform (eg, a discrete sine transform DST). The transform processing unit 52 may transform the residual video data from a pixel domain to a transform domain (for example, a frequency domain).
变换处理单元52可将所得变换系数发送到量化单元54。量化单元54对变换系数进行量化以进一步减小码率。量化过程可减少与系数中的一些或全部相关联的比特深度。可通过调整量化参数来修改量化的程度。在一些可行的实施方式中,量化单元54可接着执行包含经量化变换系数的矩阵的扫描。替代地,熵编码单元56可执行扫描。The transformation processing unit 52 may send the obtained transformation coefficient to the quantization unit 54. The quantization unit 54 quantizes the transform coefficients to further reduce the code rate. The quantization process may reduce the bit depth associated with some or all of the coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some feasible implementations, the quantization unit 54 may then perform a scan of a matrix containing the quantized transform coefficients. Alternatively, the entropy encoding unit 56 may perform scanning.
在量化之后,熵编码单元56可熵编码经量化变换系数。例如,熵编码单元56可执行上下文自适应性可变长度解码(CAVLC)、上下文自适应性二进制算术解码(CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或另一熵编码方法或技术。熵编码单元56也可熵编码正经解码的当前视频条带的运动矢量及其它语法元素。在通过熵编码单元56进行熵编码之后,可将经编码码流传输到视频解码器30或存档以供稍后传输或由视频解码器30检索。After quantization, the entropy encoding unit 56 may entropy encode the quantized transform coefficients. For example, the entropy encoding unit 56 may perform context adaptive variable length decoding (CAVLC), context adaptive binary arithmetic decoding (CABAC), syntax-based context adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy ( PIPE) decoding or another entropy coding method or technique. The entropy encoding unit 56 may also entropy encode the motion vector and other syntax elements of the current video slice being decoded. After entropy encoding by the entropy encoding unit 56, the encoded code stream may be transmitted to the video decoder 30 or archived for later transmission or retrieved by the video decoder 30.
熵编码单元56可编码根据本申请的技术指示选定帧内预测模式的信息。视频编码器20可在可包含多个帧内预测模式索引表和多个经修改帧内预测模式索引表(也称作码字映射表)的所传输码流配置数据中包含各种块的编码上下文的定义及用于上下文中的每一者的MPM、帧内预测模式索引表和经修改帧内预测模式索引表的指示。The entropy encoding unit 56 may encode information indicating a selected intra prediction mode according to the techniques of the present application. Video encoder 20 may include encoding of various blocks in transmitted stream configuration data that may include multiple intra prediction mode index tables and multiple modified intra prediction mode index tables (also known as codeword mapping tables). Definition of the context and an indication of the MPM, the intra prediction mode index table, and the modified intra prediction mode index table for each of the contexts.
反量化单元58及反变换单元60分别应用反量化及反变换,以在像素域中重构建残差块以供稍后用作参考图像的参考块。运动补偿单元44可通过将残差块与参考图像列表中的一者内的参考图像中的一者的预测块相加来计算重建块。运动补偿单元44也可将一个或多个内插滤波器应用于经重构建残差块以计算子整数像素值以用于运动估计。求和器62将经重构建残差块与通过运动补偿单元44所产生的经运动补偿的预测块相加以产生重建块,所述重建块作为参考块以供存储于参考图像存储器64中。参考块可由运动估计单元42及运动补偿单元44用作参考块以帧间预测后续视频帧或图像中的块。The inverse quantization unit 58 and the inverse transform unit 60 respectively apply inverse quantization and inverse transform to reconstruct a residual block in the pixel domain for later use as a reference block of a reference image. The motion compensation unit 44 may calculate a reconstructed block by adding a residual block to a prediction block of one of the reference images within one of the reference image lists. The motion compensation unit 44 may also apply one or more interpolation filters to the reconstructed residual block to calculate sub-integer pixel values for motion estimation. The summer 62 adds the reconstructed residual block and the motion-compensated prediction block generated by the motion compensation unit 44 to generate a reconstruction block, which is used as a reference block for storage in the reference image memory 64. The reference block can be used as a reference block by the motion estimation unit 42 and the motion compensation unit 44 to inter-predict a block in a subsequent video frame or image.
应当理解的是,视频编码器20的其它的结构变化可用于编码视频流。例如,对于某些图像块或者图像帧,视频编码器20可以直接地量化残差信号而不需要经变换单元52处理,相应地也不需要经反变换单元60处理;或者,对于某些图像块或者图像帧,视频编码器20没有产生残差数据,相应地不需要经变换单元52、量化单元54、反量化单元58和反变换单 元60处理;或者,视频编码器20可以将经重构图像块作为参考块直接地进行存储而不需要经滤波器单元处理;或者,视频编码器20中量化单元54和反量化单元58可以合并在一起。环路滤波单元是可选的,以及针对无损压缩编码的情况下,变换单元52、量化单元54、反量化单元58和反变换单元60是可选的。应当理解的是,根据不同的应用场景,帧间预测单元和帧内预测单元可以是被选择性的启用,而在本案中,帧间预测单元被启用。It should be understood that other structural changes of the video encoder 20 may be used to encode the video stream. For example, for certain image blocks or image frames, the video encoder 20 may directly quantize the residual signal without processing by the transform unit 52 and correspondingly does not need to be processed by the inverse transform unit 60; or, for some image blocks, Or image frames, the video encoder 20 does not generate residual data, and accordingly does not need to be processed by the transform unit 52, the quantization unit 54, the inverse quantization unit 58, and the inverse transform unit 60; or, the video encoder 20 may convert the reconstructed image The blocks are directly stored as reference blocks without being processed by a filter unit; alternatively, the quantization unit 54 and the inverse quantization unit 58 in the video encoder 20 may be merged together. The loop filtering unit is optional, and in the case of lossless compression coding, the transform unit 52, the quantization unit 54, the inverse quantization unit 58, and the inverse transform unit 60 are optional. It should be understood that, according to different application scenarios, the inter prediction unit and the intra prediction unit may be selectively enabled, and in this case, the inter prediction unit is enabled.
图3为本申请实施例中视频解码器30的一种示意性框图。在图3的可行的实施方式中,视频解码器30包含熵编码单元80、预测单元81、反量化单元86、反变换单元88、求和器90(即重建器)和参考图像存储器92。一种变型下,参考图像存储器92亦可以设置在视频解码器30之外。预测单元81包括帧间预测单元82和帧内预测单元84。帧间预测单元82,例如可以是运动补偿单元82。在一些可行的实施方式中,视频解码器30可执行与关于来自图4A或图4B的视频编码器20描述的编码流程的示例性地互逆的解码流程。FIG. 3 is a schematic block diagram of a video decoder 30 in an embodiment of the present application. In the feasible embodiment of FIG. 3, the video decoder 30 includes an entropy encoding unit 80, a prediction unit 81, an inverse quantization unit 86, an inverse transform unit 88, a summer 90 (ie, a reconstructor), and a reference image memory 92. In a variant, the reference image memory 92 may also be provided outside the video decoder 30. The prediction unit 81 includes an inter prediction unit 82 and an intra prediction unit 84. The inter prediction unit 82 may be, for example, a motion compensation unit 82. In some feasible implementations, video decoder 30 may perform an exemplary reciprocal decoding process with the encoding process described with respect to video encoder 20 from FIG. 4A or 4B.
在解码过程期间,视频解码器30从视频编码器20接收表示经编码视频条带的视频块及相关联的语法元素的经编码视频码流。视频解码器30的熵编码单元80熵解码码流以产生经量化系数、运动矢量及其它语法元素。熵编码单元80将运动矢量及其它语法元素转递到预测单元81。视频解码器30可在视频条带层级和/或视频块层级处接收语法元素。During the decoding process, video decoder 30 receives from video encoder 20 an encoded video code stream representing video blocks of the encoded video slice and associated syntax elements. The entropy encoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors, and other syntax elements. The entropy encoding unit 80 forwards the motion vector and other syntax elements to the prediction unit 81. Video decoder 30 may receive syntax elements at a video slice level and / or a video block level.
在视频条带经解码为经帧内解码(I)条带时,预测单元81的帧内预测单元84可基于用信号发送的帧内预测模式及来自当前帧或图像的先前经解码块的数据而产生当前视频条带的视频块的预测数据。When a video slice is decoded into an intra-decoded (I) slice, the intra-prediction unit 84 of the prediction unit 81 may be based on a signaled intra-prediction mode and data from a previously decoded block of the current frame or image The prediction data of the video block of the current video slice is generated.
在视频图像经解码为经帧间解码(例如,B、P或GPB)条带时,预测单元81的运动补偿单元82基于从熵编码单元80所接收的运动矢量及其它语法元素而产生当前视频图像的视频块的预测块。预测块可从参考图像列表中的一者内的参考图像中的一者产生。视频解码器30可基于存储于参考图像存储器92中的参考图像使用默认构建技术来构建参考图像列表(列表0及列表1)。When the video image is decoded into inter-decoded (eg, B, P, or GPB) slices, the motion compensation unit 82 of the prediction unit 81 generates the current video based on the motion vector and other syntax elements received from the entropy encoding unit 80 A prediction block of a video block of an image. The prediction block may be generated from one of the reference pictures within one of the reference picture lists. The video decoder 30 may construct a reference image list (List 0 and List 1) using a default construction technique based on the reference image stored in the reference image memory 92.
运动补偿单元82通过解析运动矢量及其它语法元素来确定当前视频条带的视频块的预测信息,且使用预测信息来产生正经解码的当前视频块的预测块。例如,运动补偿单元82使用所接收的语法元素中的一些来确定用以解码视频条带的视频块的预测模式(例如,帧内预测或帧间预测)、帧间预测条带类型(例如,B条带、P条带或GPB条带)、条带的参考图像列表中的一者或多者的构建信息、条带的每一经帧间编码视频块的运动矢量、条带的每一经帧间解码视频块的帧间预测状态及用以解码当前视频条带中的视频块的其它信息。The motion compensation unit 82 determines the prediction information of the video block of the current video slice by analyzing the motion vector and other syntax elements, and uses the prediction information to generate the prediction block of the current video block being decoded. For example, the motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) of a video block to decode a video slice, an inter prediction slice type (e.g., B slice, P slice or GPB slice), construction information of one or more of the slice's reference image list, motion vector of each inter-coded video block of the slice, each warped frame of the slice Inter-prediction status of inter-decoded video blocks and other information used to decode video blocks in the current video slice.
运动补偿单元82也可基于内插滤波器执行内插。运动补偿单元82可使用如由视频编码器20在视频块的编码期间所使用的内插滤波器来计算参考块的子整数像素的内插值。在此应用中,运动补偿单元82可从所接收的语法元素确定由视频编码器20使用的内插滤波器且使用内插滤波器来产生预测块。The motion compensation unit 82 may also perform interpolation based on an interpolation filter. The motion compensation unit 82 may use an interpolation filter as used by the video encoder 20 during encoding of the video block to calculate the interpolation value of the sub-integer pixels of the reference block. In this application, the motion compensation unit 82 may determine an interpolation filter used by the video encoder 20 from the received syntax elements and use the interpolation filter to generate a prediction block.
如果PU是使用帧间预测而编码,则运动补偿单元82可产生用于PU的候选者列表。码流中可包括识别选定候选者在PU的候选者列表中的位置的数据。在产生用于PU的候选者列表之后,运动补偿单元82可基于由PU的运动信息指示的一或多个参考块产生用于PU的预测性图像块。PU的参考块可在与所述PU不同的时间图像中。运动补偿单元82可基于由PU的候选者列表中的选定的运动信息确定PU的运动信息。应当理解的是,为了提高帧间预测效率,本申请实施例在候选者列表(例如融合运动信息候选列表和/或运动矢量预测候选列表)中加入历史候选(history candidate),后文将对帧间预测单元82(或运动补偿单元82)的改进作详细阐述。If the PU is encoded using inter prediction, the motion compensation unit 82 may generate a candidate list for the PU. The codestream may include data identifying the position of the selected candidate in the candidate list of the PU. After generating the candidate list for the PU, the motion compensation unit 82 may generate a predictive image block for the PU based on one or more reference blocks indicated by the motion information of the PU. A reference block of a PU may be in a temporal image different from the PU. The motion compensation unit 82 may determine the motion information of the PU based on the selected motion information in the candidate list of the PU. It should be understood that, in order to improve the efficiency of inter prediction, the embodiment of the present application adds a history candidate to a candidate list (such as a fusion motion information candidate list and / or a motion vector prediction candidate list). The improvement of the inter prediction unit 82 (or the motion compensation unit 82) is explained in detail.
反量化单元86对码流中所提供且通过熵编码单元80所解码的经量化变换系数进行反量化(例如,解量化)。反量化过程可包含使用通过视频编码器20针对视频条带中的每一视频块所计算的量化参数确定量化的程度,且同样地确定应应用的反量化的程度。反变换单元88将反变换(例如,反DCT、反整数变换或概念上类似的反变换过程)应用于变换系数以 便在像素域中产生残差块。The inverse quantization unit 86 performs inverse quantization (for example, dequantization) on the quantized transform coefficient provided in the code stream and decoded by the entropy encoding unit 80. The inverse quantization process may include determining the degree of quantization using the quantization parameters calculated by video encoder 20 for each video block in the video slice, and similarly determining the degree of inverse quantization that should be applied. The inverse transform unit 88 applies an inverse transform (e.g., inverse DCT, inverse integer transform, or conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the pixel domain.
在运动补偿单元82基于运动矢量及其它语法元素产生当前视频块的预测块之后,视频解码器30通过将来自反变换单元88的残差块与通过运动补偿单元82产生的对应预测块求和来形成经解码视频块。求和器90(即重建器)表示执行此求和运算的一个或多个组件。在需要时,也可应用解块滤波器来对经解码块进行滤波以便去除块效应伪影。其它环路滤波器(在解码环路中或在解码环路之后)也可用以使像素转变平滑,或以其它方式改进视频质量。给定帧或图像中的经解码视频块接着存储于参考图像存储器92中,参考图像存储器92存储供后续运动补偿所使用的参考图像。参考图像存储器92也存储供稍后呈现于例如图1的显示装置32的显示装置上的经解码视频。After the motion compensation unit 82 generates a prediction block of the current video block based on the motion vector and other syntax elements, the video decoder 30 sums the residual block from the inverse transform unit 88 and the corresponding prediction block generated by the motion compensation unit 82 to Form decoded video blocks. The summer 90 (ie, the reconstructor) represents one or more components that perform this summing operation. When needed, a deblocking filter may also be applied to filter the decoded blocks in order to remove block effect artifacts. Other loop filters (in the decoding loop or after the decoding loop) can also be used to smooth pixel transitions or otherwise improve video quality. The decoded video block in a given frame or image is then stored in a reference image memory 92, which stores a reference image for subsequent motion compensation. The reference image memory 92 also stores decoded video for later presentation on a display device such as the display device 32 of FIG. 1.
如前文所注明,本申请的技术示例性地涉及帧间解码。应理解,本申请的技术可通过本申请中所描述的视频解码器中的任一者进行,视频解码器包含(例如)如关于图1到3所展示及描述的视频编码器20及视频解码器30。即,在一种可行的实施方式中,关于图2所描述的预测单元41可在视频数据的块的编码期间在执行帧间预测时执行下文中所描述的特定技术。在另一可行的实施方式中,关于图3所描述的预测单元81可在视频数据的块的解码期间在执行帧间预测时执行下文中所描述的特定技术。因此,对一般性“视频编码器”或“视频解码器”的引用可包含视频编码器20、视频解码器30或另一视频编码或编码单元。As noted previously, the techniques of this application exemplarily involve inter-frame decoding. It should be understood that the techniques of this application may be performed by any of the video decoders described in this application. The video decoder includes, for example, video encoder 20 and video decoding as shown and described with respect to FIGS. 1-3.器 30。 30. That is, in a feasible implementation manner, the prediction unit 41 described with respect to FIG. 2 may perform a specific technique described below when performing inter prediction during encoding of a block of video data. In another possible implementation, the prediction unit 81 described with respect to FIG. 3 may perform specific techniques described below when performing inter prediction during decoding of a block of video data. Thus, a reference to a generic "video encoder" or "video decoder" may include video encoder 20, video decoder 30, or another video encoding or coding unit.
应当理解的是,视频解码器30的其它结构变化可用于解码经编码视频位流。例如,视频解码器30可以不经滤波单元处理而生成输出视频流;或者,对于某些图像块或者图像帧,视频解码器30的熵解码单元80没有解码出经量化的系数,相应地不需要经反量化单元86和反变换单元88处理。环路滤波单元是可选的;以及针对无损压缩的情况下,反量化单元86和反变换单元88是可选的。应当理解的是,根据不同的应用场景,帧间预测单元和帧内预测单元可以是被选择性的启用,而在本案中,帧间预测单元被启用。It should be understood that other structural variations of video decoder 30 may be used to decode the encoded video bitstream. For example, the video decoder 30 may generate an output video stream without being processed by a filtering unit; or, for certain image blocks or image frames, the entropy decoding unit 80 of the video decoder 30 does not decode the quantized coefficients, and accordingly does not need to Processed by inverse quantization unit 86 and inverse transform unit 88. The loop filtering unit is optional; and in the case of lossless compression, the inverse quantization unit 86 and the inverse transform unit 88 are optional. It should be understood that, according to different application scenarios, the inter prediction unit and the intra prediction unit may be selectively enabled, and in this case, the inter prediction unit is enabled.
图4A为本申请实施例中融合(Merge)模式的一种示例性流程图。视频编码器(例如视频编码器20)可执行合并操作200。在其它可行的实施方式中,视频编码器可执行不同于合并操作200的合并操作。举例来说,在其它可行的实施方式中,视频编码器可执行合并操作,其中视频编码器执行比合并操作200多、少的步骤或与合并操作200不同的步骤。在其它可行的实施方式中,视频编码器可以不同次序或并行地执行合并操作200的步骤。编码器还可对以跳跃(skip)模式编码的PU执行合并操作200。FIG. 4A is an exemplary flowchart of a merge mode in an embodiment of the present application. A video encoder (eg, video encoder 20) may perform a merge operation 200. In other feasible implementations, the video encoder may perform a merge operation different from the merge operation 200. For example, in other feasible implementations, the video encoder may perform a merge operation, where the video encoder performs more or fewer steps than the merge operation 200 or steps different from the merge operation 200. In other possible implementations, the video encoder may perform the steps of the merge operation 200 in a different order or in parallel. The encoder may also perform a merge operation 200 on a PU encoded in a skip mode.
在视频编码器开始合并操作200之后,视频编码器可产生用于当前PU的候选者列表(202)。视频编码器可以各种方式产生用于当前PU的候选者列表。举例来说,视频编码器可根据下文关于图7到图11C描述的实例技术中的一者产生用于当前PU的候选者列表。After the video encoder starts the merge operation 200, the video encoder may generate a candidate list for the current PU (202). The video encoder may generate a candidate list for the current PU in various ways. For example, the video encoder may generate a candidate list for the current PU according to one of the example techniques described below with respect to FIGS. 7-11C.
如前文所述,用于当前PU的候选者列表可包括时间候选运动信息(简称时域候选者)。时间候选运动信息可指示时域对应(co-located)的PU的运动信息。co-located的PU可在空间上与当前PU处于图像帧中的同一个位置,但在参考图像而非当前图像中。本申请可将包括时域对应的PU的参考图像称作相关参考图像。本申请可将相关参考图像的参考图像索引称作相关参考图像索引。如前文所描述,当前图像可与一个或多个参考图像列表(例如,列表0、列表1等)相关联。参考图像索引可通过指示参考图像在某一个参考图像列表中的位置来指示参考图像。在一些可行的实施方式中,当前图像可与组合参考图像列表相关联。As mentioned above, the candidate list for the current PU may include temporal candidate motion information (referred to as a time domain candidate). The temporal candidate motion information may indicate motion information of a co-located PU in the time domain. A co-located PU may be spatially in the same position in the image frame as the current PU, but in a reference picture instead of the current picture. In this application, a reference picture including a PU corresponding to the time domain may be referred to as a related reference picture. A reference image index of a related reference image may be referred to as a related reference image index in this application. As described previously, the current image may be associated with one or more reference image lists (eg, list 0, list 1, etc.). The reference image index may indicate the reference image by indicating the position of the reference image in a certain reference image list. In some feasible implementations, the current image may be associated with a combined reference image list.
在一些视频编码器中,相关参考图像索引为涵盖与当前PU相关联的参考索引源位置的PU的参考图像索引。在这些视频编码器中,与当前PU相关联的参考索引源位置邻接于当前PU左方或邻接于当前PU上方。在本申请中,如果与PU相关联的图像块包括特定位置,则PU可“涵盖”所述特定位置。In some video encoders, the related reference picture index is the reference picture index of the PU covering the reference index source position associated with the current PU. In these video encoders, the reference index source location associated with the current PU is adjacent to the left of the current PU or above the current PU. In this application, if an image block associated with a PU includes a specific location, the PU may "cover" the specific location.
然而,可存在以下例子:与当前PU相关联的参考索引源位置在当前CU内。在这些例 子中,如果PU在当前CU上方或左方,则涵盖与当前PU相关联的参考索引源位置的PU可被视为可用。然而,视频编码器可需要存取当前CU的另一PU的运动信息以便确定含有co-located PU的参考图像。因此,这些视频编码器可使用属于当前CU的PU的运动信息(即,参考图像索引)以产生用于当前PU的时域候选者。换句话说,这些视频编码器可使用属于当前CU的PU的运动信息产生时域候选者。因此,视频编码器不能并行地产生用于当前PU和涵盖与当前PU相关联的参考索引源位置的PU的候选者列表。However, there may be examples where the reference index source location associated with the current PU is within the current CU. In these examples, if the PU is above or to the left of the current CU, the PU covering the reference index source location associated with the current PU may be considered available. However, the video encoder may need to access motion information of another PU of the current CU in order to determine a reference picture containing a co-located PU. Therefore, these video encoders may use motion information (ie, a reference picture index) of a PU belonging to the current CU to generate a time domain candidate for the current PU. In other words, these video encoders can use the motion information of the PUs that belong to the current CU to generate time-domain candidates. Therefore, the video encoder cannot generate a candidate list for a current PU and a PU covering a reference index source position associated with the current PU in parallel.
根据本申请的技术,视频编码器可在不参考任何其它PU的参考图像索引的情况下显式地设定相关参考图像索引。此可使得视频编码器能够并行地产生用于当前PU和当前CU的其它PU的候选者列表。因为视频编码器显式地设定相关参考图像索引,所以相关参考图像索引不基于当前CU的任何其它PU的运动信息。在视频编码器显式地设定相关参考图像索引的一些可行的实施方式中,视频编码器可始终将相关参考图像索引设定为固定的预定义预设参考图像索引(例如0)。以此方式,视频编码器可基于由预设参考图像索引指示的参考帧中的co-located PU的运动信息产生时域候选者,且可将时域候选者包括于当前CU的候选者列表中。According to the technology of the present application, the video encoder may explicitly set the relevant reference picture index without referring to the reference picture index of any other PU. This may enable the video encoder to generate candidate lists for the current PU and other PUs of the current CU in parallel. Because the video encoder explicitly sets the relevant reference picture index, the relevant reference picture index is not based on the motion information of any other PU of the current CU. In some feasible implementations where the video encoder explicitly sets the relevant reference picture index, the video encoder may always set the relevant reference picture index to a fixed, predefined preset reference picture index (eg, 0). In this way, the video encoder may generate time-domain candidates based on the motion information of the co-located PU in the reference frame indicated by the preset reference picture index, and may include the time-domain candidates in the candidate list of the current CU .
在视频编码器显式地设定相关参考图像索引的可行的实施方式中,视频编码器可显式地在语法结构(例如图像标头、条带标头、APS或另一语法结构)中用信号通知相关参考图像索引。在此可行的实施方式中,视频编码器可用信号通知解码端用于每一LCU(即CTU)、CU、PU、TU或其它类型的子块的相关参考图像索引。举例来说,视频编码器可用信号通知:用于CU的每一PU的相关参考图像索引等于“1”。In a feasible implementation where the video encoder explicitly sets the relevant reference picture index, the video encoder may be explicitly used in a syntax structure (e.g., image header, slice header, APS, or another syntax structure) The related reference picture index is signaled. In this feasible implementation manner, the video encoder may signal the decoder to the relevant reference picture index for each LCU (ie, CTU), CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the relevant reference picture index for each PU of the CU is equal to "1".
在一些可行的实施方式中,相关参考图像索引可经隐式地而非显式地设定。在这些可行的实施方式中,视频编码器可使用由涵盖当前CU外部的位置的PU的参考图像索引指示的参考图像中的PU的运动信息产生用于当前CU的PU的候选者列表中的每一时域候选者,即使这些位置并不严格地邻近当前PU。In some feasible implementations, the relevant reference image index may be set implicitly rather than explicitly. In these feasible implementations, the video encoder may use the motion information of the PU in the reference picture indicated by the reference picture index of the PU covering the location outside the current CU to generate each candidate list for the PU of the current CU. A temporal candidate, even if these locations are not strictly adjacent to the current PU.
在产生用于当前PU的候选者列表之后,视频编码器可产生与候选者列表中的候选者相关联的预测性图像块(204)。视频编码器可通过基于所指示候选者的运动信息确定当前PU的运动信息和接着基于由当前PU的运动信息指示的一个或多个参考块产生预测性图像块来产生与候选者相关联的预测性图像块。视频编码器可从候选者列表选择候选者中的一者(206)。视频编码器可以各种方式选择候选者。举例来说,视频编码器可基于对与候选者相关联的预测性图像块的每一者的码率-失真代价分析来选择候选者中的一者。After generating the candidate list for the current PU, the video encoder may generate predictive image blocks associated with the candidates in the candidate list (204). The video encoder may generate a prediction associated with the candidate by determining motion information of the current PU based on the motion information of the indicated candidate and then generating a predictive image block based on one or more reference blocks indicated by the motion information of the current PU. Sexual image blocks. The video encoder may select one of the candidates from the candidate list (206). Video encoders can select candidates in various ways. For example, a video encoder may select one of the candidates based on a code rate-distortion cost analysis of each of the predictive image blocks associated with the candidate.
在选择候选者之后,视频编码器可输出候选者的索引(208)。该索引可指示选定候选者在候选者列表中的位置。在一些可行的实施方式中,该索引可表示为“merge_idx”。After selecting the candidate, the video encoder may output the candidate's index (208). The index may indicate the position of the selected candidate in the candidate list. In some feasible implementations, this index may be represented as "merge_idx".
图4B为本申请实施例中高级运动矢量预测(AMVP)模式的一种示例性流程图。视频编码器(例如视频编码器20)可执行AMVP操作210。FIG. 4B is an exemplary flowchart of an advanced motion vector prediction (AMVP) mode in an embodiment of the present application. A video encoder (eg, video encoder 20) may perform AMVP operations 210.
在视频编码器开始AMVP操作210之后,视频编码器可产生用于当前PU的一个或多个运动矢量(211)。视频编码器可执行整数运动估计和分数运动估计以产生用于当前PU的运动矢量。如前文所描述,当前图像可与两个参考图像列表(列表0和列表1)相关联。如果当前PU经单向预测,则视频编码器可产生用于当前PU的列表0运动矢量或列表1运动矢量。列表0运动矢量可指示当前PU的图像块与列表0中的参考图像中的参考块之间的空间位移。列表1运动矢量可指示当前PU的图像块与列表1中的参考图像中的参考块之间的空间位移。如果当前PU经双向预测,则视频编码器可产生用于当前PU的列表0运动矢量和列表1运动矢量。After the video encoder starts AMVP operation 210, the video encoder may generate one or more motion vectors for the current PU (211). The video encoder may perform integer motion estimation and fractional motion estimation to generate motion vectors for the current PU. As described earlier, the current image may be associated with two reference image lists (List 0 and List 1). If the current PU is unidirectionally predicted, the video encoder may generate a list 0 motion vector or a list 1 motion vector for the current PU. The list 0 motion vector may indicate a spatial displacement between an image block of the current PU and a reference block in a reference image in list 0. The list 1 motion vector may indicate a spatial displacement between an image block of the current PU and a reference block in a reference image in list 1. If the current PU is bi-predicted, the video encoder may generate a list 0 motion vector and a list 1 motion vector for the current PU.
在产生用于当前PU的一个或多个运动矢量之后,视频编码器可产生用于当前PU的预测性图像块(简称为预测块)(212)。视频编码器可基于由用于当前PU的一个或多个运动矢量指示的一个或多个参考块产生用于当前PU的预测性图像块。After generating one or more motion vectors for the current PU, the video encoder may generate predictive image blocks (referred to simply as prediction blocks) for the current PU (212). The video encoder may generate predictive image blocks for the current PU based on one or more reference blocks indicated by one or more motion vectors for the current PU.
另外,视频编码器可产生用于当前PU的候选列表(213)。视频解码器可以各种方式产 生用于当前PU的候选预测运动矢量列表。举例来说,视频编码器可根据下文关于图6到图11C描述的可行的实施方式中的一个或多个产生用于当前PU的候选列表。在一些可行的实施方式中,当视频编码器在AMVP操作210中产生候选列表时,候选预测运动矢量列表可包括两个或三个候选预测运动矢量。相比而言,当视频编码器在合并操作中产生候选预测运动矢量列表时,候选预测运动矢量列表可包括更多候选预测运动矢量(例如,五个或七个候选预测运动矢量)。In addition, the video encoder may generate a candidate list for the current PU (213). The video decoder can generate a list of candidate prediction motion vectors for the current PU in various ways. For example, the video encoder may generate a candidate list for the current PU according to one or more of the possible implementations described below with respect to FIGS. 6 to 11C. In some feasible implementations, when the video encoder generates a candidate list in the AMVP operation 210, the candidate prediction motion vector list may include two or three candidate prediction motion vectors. In contrast, when a video encoder generates a list of candidate prediction motion vectors in a merge operation, the list of candidate prediction motion vectors may include more candidate prediction motion vectors (eg, five or seven candidate prediction motion vectors).
在产生用于当前PU的候选列表之后,视频编码器可产生用于候选列表中的每一候选预测运动矢量的一个或多个运动矢量预测残差值(亦称为运动矢量差MVD)(214)。视频编码器可通过确定由候选预测运动矢量指示的运动矢量与当前PU的对应运动矢量之间的差来产生用于候选预测运动矢量的运动矢量差。After generating a candidate list for the current PU, the video encoder may generate one or more motion vector prediction residual values (also known as motion vector difference MVD) for each candidate prediction motion vector in the candidate list (214 ). The video encoder may generate a motion vector difference for the candidate prediction motion vector by determining a difference between the motion vector indicated by the candidate prediction motion vector and a corresponding motion vector of the current PU.
如果当前PU经单向预测,则视频编码器可产生用于每一候选预测运动矢量的单一MVD。如果当前PU经双向预测,则视频编码器可产生用于每一候选预测运动矢量的两个MVD。第一MVD可指示候选预测运动矢量的运动矢量与当前PU的列表0运动矢量之间的差。第二MVD可指示候选预测运动矢量的运动矢量与当前PU的列表1运动矢量之间的差。If the current PU is unidirectionally predicted, the video encoder may generate a single MVD for each candidate prediction motion vector. If the current PU is bi-predicted, the video encoder may generate two MVDs for each candidate prediction motion vector. The first MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the list 0 motion vector of the current PU. The second MVD may indicate a difference between the motion vector of the candidate prediction motion vector and the list 1 motion vector of the current PU.
视频编码器可从候选预测运动矢量列表选择候选预测运动矢量中的一个或多个(215)。视频编码器可以各种方式选择一个或多个候选预测运动矢量。举例来说,视频编码器可选择具有最小误差地匹配待编码的运动矢量的相关联运动矢量的候选预测运动矢量,此可减少表示用于候选预测运动矢量的运动矢量差所需的位数目。The video encoder may select one or more of the candidate prediction motion vectors from the candidate prediction motion vector list (215). The video encoder may select one or more candidate prediction motion vectors in various ways. For example, a video encoder may select a candidate prediction motion vector with an associated motion vector that matches the motion vector to be encoded with minimal error, which may reduce the number of bits required to represent the motion vector difference for the candidate prediction motion vector.
在选择一个或多个候选预测运动矢量之后,视频编码器可输出用于当前PU的一个或多个参考图像索引、一个或多个候选预测运动矢量索引,和用于一个或多个选定候选预测运动矢量的一个或多个运动矢量差(216)。After selecting one or more candidate prediction motion vectors, the video encoder may output one or more reference image indexes for the current PU, one or more candidate prediction motion vector indexes, and one or more selected candidate motion vectors. One or more motion vector differences of the predicted motion vector (216).
在当前图像与两个参考图像列表(列表0和列表1)相关联且当前PU经单向预测的例子中,视频编码器可输出用于列表0的参考图像索引(“ref_idx_10”)或用于列表1的参考图像索引(“ref_idx_11”)。视频编码器还可输出指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_10_flag”)。或者,视频编码器可输出指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_11_flag”)。视频编码器还可输出用于当前PU的列表0运动矢量或列表1运动矢量的MVD。In examples where the current picture is associated with two reference picture lists (List 0 and List 1) and the current PU is unidirectionally predicted, the video encoder may output a reference picture index ("ref_idx_10") for List 0 or for Reference image index of list 1 ("ref_idx_11"). The video encoder may also output a candidate prediction motion vector index ("mvp_10_flag") indicating the position of the selected candidate prediction motion vector for the list 0 motion vector of the current PU in the candidate prediction motion vector list. Alternatively, the video encoder may output a candidate prediction motion vector index ("mvp_11_flag") indicating the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list. The video encoder may also output a list 0 motion vector or a list 1 motion vector MVD for the current PU.
在当前图像与两个参考图像列表(列表0和列表1)相关联且当前PU经双向预测的例子中,视频编码器可输出用于列表0的参考图像索引(“ref_idx_10”)和用于列表1的参考图像索引(“ref_idx_11”)。视频编码器还可输出指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_10_flag”)。另外,视频编码器可输出指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_11_flag”)。视频编码器还可输出用于当前PU的列表0运动矢量的MVD和用于当前PU的列表1运动矢量的MVD。In the example where the current picture is associated with two reference picture lists (List 0 and List 1) and the current PU is bi-predicted, the video encoder may output the reference picture index ("ref_idx_10") for List 0 and the list Reference image index of 1 ("ref_idx_11"). The video encoder may also output a candidate prediction motion vector index ("mvp_10_flag") indicating the position of the selected candidate prediction motion vector for the list 0 motion vector of the current PU in the candidate prediction motion vector list. In addition, the video encoder may output a candidate prediction motion vector index ("mvp_11_flag") indicating the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list. The video encoder may also output the MVD of the list 0 motion vector for the current PU and the MVD of the list 1 motion vector for the current PU.
图5为本申请实施例中由视频解码器(例如视频解码器30)执行的运动补偿的一种示例性流程图。FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder (such as video decoder 30) in an embodiment of the present application.
当视频解码器执行运动补偿操作220时,视频解码器可接收用于当前PU的选定候选者的指示(222)。举例来说,视频解码器可接收指示选定候选者在当前PU的候选者列表内的位置的候选者索引。When the video decoder performs motion compensation operation 220, the video decoder may receive an indication of a selected candidate for the current PU (222). For example, the video decoder may receive a candidate index indicating the position of the selected candidate within the candidate list of the current PU.
如果当前PU的运动信息是使用融合merge模式进行编码且当前PU经双向预测,则视频解码器可接收第一候选者索引和第二候选者索引。第一候选者索引指示用于当前PU的列表0运动矢量的选定候选者在候选者列表中的位置。第二候选者索引指示用于当前PU 的列表1运动矢量的选定候选者在候选者列表中的位置。在一些可行的实施方式中,单一语法元素可用以识别两个候选者索引。If the motion information of the current PU is encoded using a merge merge mode and the current PU is bidirectionally predicted, the video decoder may receive the first candidate index and the second candidate index. The first candidate index indicates the position of the selected candidate for the list 0 motion vector of the current PU in the candidate list. The second candidate index indicates the position of the selected candidate for the list 1 motion vector of the current PU in the candidate list. In some feasible implementations, a single syntax element may be used to identify two candidate indexes.
另外,视频解码器可产生用于当前PU的候选者列表(224)。视频解码器可以各种方式产生用于当前PU的此候选者列表。举例来说,视频解码器可使用下文参看图6到图11描述的技术来产生用于当前PU的候选者列表。当视频解码器产生用于候选者列表的时域候选者时,视频解码器可显式地或隐式地设定识别包括co-located PU的参考图像的参考图像索引,如前文关于图4A或图4B所描述。In addition, the video decoder may generate a candidate list for the current PU (224). The video decoder can generate this candidate list for the current PU in various ways. For example, the video decoder may use the techniques described below with reference to FIGS. 6 to 11 to generate a candidate list for the current PU. When the video decoder generates a time-domain candidate for the candidate list, the video decoder may explicitly or implicitly set a reference picture index identifying a reference picture including a co-located PU, as described above with reference to FIG. 4A or Described in Figure 4B.
在产生用于当前PU的候选者列表之后,视频解码器可基于由用于当前PU的候选者列表中的一个或多个选定候选者指示的运动信息确定当前PU的运动信息(225)。举例来说,如果当前PU的运动信息是使用合并模式而编码,则当前PU的运动信息可与由选定候选者指示的运动信息相同。如果当前PU的运动信息是使用AMVP模式而编码,则视频解码器可使用由所述或所述选定候选者指示的一个或多个运动矢量和码流中指示的一个或多个MVD来重建当前PU的一个或多个运动矢量。当前PU的参考图像索引和预测方向标识可与所述一个或多个选定候选者的参考图像索引和预测方向标识相同。在确定当前PU的运动信息之后,视频解码器可基于由当前PU的运动信息指示的一个或多个参考块产生用于当前PU的预测性图像块(226)。After generating a candidate list for the current PU, the video decoder may determine motion information of the current PU based on the motion information indicated by one or more selected candidates in the candidate list for the current PU (225). For example, if the motion information of the current PU is encoded using a merge mode, the motion information of the current PU may be the same as the motion information indicated by the selected candidate. If the motion information of the current PU is encoded using AMVP mode, the video decoder may reconstruct using one or more MVDs indicated in the one or more motion vectors and code streams indicated by the or the selected candidate. One or more motion vectors of the current PU. The reference image index and prediction direction identifier of the current PU may be the same as the reference image index and prediction direction identifier of the one or more selected candidates. After determining the motion information of the current PU, the video decoder may generate a predictive image block for the current PU based on one or more reference blocks indicated by the motion information of the current PU (226).
图6为本申请实施例中当前图像块(例如编码单元CU)、与其关联的空域邻近图像块以及时域邻近图像块的一种示例性示意图,说明CU600和与CU600相关联的示意性的候选者位置1到10的示意图。候选者位置1到5表示与CU600在同一图像中的空域候选者。候选者位置1定位于CU600左方。候选者位置2定位于CU600上方。候选者位置3定位于CU600右上方。候选者位置4定位于CU600左下方。候选者位置5定位于CU600左上方。候选者位置6到7表示与CU600的co-located块602相关联的时域候选者,其中co-located块为在参考图像(即临近已编码图像)中与CU600具有相同的大小、形状和坐标的图像块。候选者位置6位于co-located块602的右下角。候选者位置7定位于co-located块602右下中间位置,或者或者co-located块602左上中间位置。图6为用以提供帧间预测单元(例如具体是运动估计单元42或运动补偿单元82)可产生候选者列表的候选者位置的示意性实施方式。图6的候选者位置1至5为用以提供帧内预测单元可产生候选者列表的候选者位置的示意性实施方式。FIG. 6 is an exemplary schematic diagram of a current image block (such as a coding unit CU), a spatial neighboring image block, and a temporal neighboring image block associated with the current image block (such as the coding unit CU) in the embodiment of the present application, illustrating CU600 and schematic candidates associated with CU600 Schematic diagram of user positions 1 to 10. Candidate positions 1 to 5 represent airspace candidates in the same image as CU600. Candidate position 1 is positioned to the left of CU600. Candidate position 2 is positioned above CU600. Candidate position 3 is located at the upper right of CU600. Candidate position 4 is positioned at the bottom left of CU600. Candidate position 5 is located at the upper left of CU600. Candidate positions 6 to 7 represent time-domain candidates associated with the co-located block 602 of the CU600, where the co-located block is the same size, shape, and coordinates as the CU600 in the reference image (i.e., adjacent coded image) Image blocks. The candidate position 6 is located in the lower right corner of the co-located block 602. The candidate position 7 is positioned at the lower right middle position of the co-located block 602, or at the upper left middle position of the co-located block 602. FIG. 6 is a schematic embodiment of a candidate position for providing a candidate list that an inter prediction unit (for example, the motion estimation unit 42 or the motion compensation unit 82) can generate. The candidate positions 1 to 5 of FIG. 6 are exemplary embodiments for providing candidate positions that an intra prediction unit can generate a candidate list.
需要说明的是,图6中空域候选者位置和时域候选者位置仅仅是示意,候选者位置包括但不限于此。在一些可行的实施方式中,空域候选者位置示例性的还可以包括与待处理图像块相距预设距离以内,但不与待处理图像块邻接的位置。It should be noted that the positions of the candidate in the spatial domain and the positions of the candidate in the time domain in FIG. 6 are merely schematic, and the candidate positions include, but are not limited to, this. In some feasible implementation manners, the locations of the spatial domain candidates may further include, for example, positions within a preset distance from the image block to be processed, but not adjacent to the image block to be processed.
本申请实施例不仅适用于合并预测模式(Merge)和/或高级运动矢量预测模式(advanced motion vector prediction,AMVP),而且也能适用于其它使用空域参考块和/或时域参考块的运动信息对当前图像块的运动信息进行预测的模式,从而提高编解码性能。The embodiment of the present application is not only applicable to merge prediction mode (Merge) and / or advanced motion vector prediction mode (advanced motion vector prediction) (AMVP), but also applicable to other motion information using spatial reference blocks and / or time domain reference blocks. A mode for predicting motion information of a current image block, thereby improving codec performance.
图7为本申请实施例的图像编码方法的一种示例性流程图。该方法的执行主体可以是视频编码器(例如视频编码器20)或具有视频编码功能的电子设备(例如设备1200、1300),该方法可以包括以下步骤:FIG. 7 is an exemplary flowchart of an image coding method according to an embodiment of the present application. The method may be performed by a video encoder (eg, video encoder 20) or an electronic device (eg, devices 1200, 1300) with video encoding functions. The method may include the following steps:
S701、根据率失真代价准则,确定当前编码图像块的帧间预测模式;S701. Determine an inter prediction mode of a current coded image block according to a rate distortion cost criterion;
例如,从候选帧间预测模式的集合中选择率失真代价最小的帧间预测模式作为当前编码图像块的帧间预测模式;For example, an inter prediction mode with the lowest rate-distortion cost is selected from the set of candidate inter prediction modes as the inter prediction mode of the currently encoded image block;
S703、使用历史候选列表构建或更新与当前编码图像块的帧间预测模式对应的候选运 动信息列表;基于所述候选运动信息列表,对所述当前编码图像块进行帧间预测;S703. Use the historical candidate list to construct or update a candidate motion information list corresponding to the inter prediction mode of the current encoded image block; perform inter prediction on the current encoded image block based on the candidate motion information list;
例如,如果当前编码图像块的帧间预测模式为merge模式,则与当前编码图像块的帧间预测模式对应的候选运动信息列表为融合运动信息候选列表merge candidate list;如果当前编码图像块的帧间预测模式为inter MVP模式(例如AMVP模式),则与当前编码图像块的帧间预测模式对应的候选运动信息列表为运动矢量预测候选列表MVP candidate list;所述历史候选列表不同于所述候选运动信息列表。For example, if the inter prediction mode of the currently coded image block is a merge mode, the candidate motion information list corresponding to the inter prediction mode of the current coded image block is a merged motion information candidate list merge candidate list; if the frame of the current coded image block The inter prediction mode is an inter MVP mode (for example, AMVP mode), and the candidate motion information list corresponding to the inter prediction mode of the current coded image block is a motion vector prediction candidate list MVP candidate list; the historical candidate list is different from the candidate List of exercise information.
尤其需要说明的是,本申请实施例中,为了减少历史候选加入候选运动信息列表(亦称为候选者列表)中时重复项检查操作的数目,所述使用历史候选列表构建或更新当前编码图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数。In particular, in the embodiment of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates are added to the candidate motion information list (also referred to as candidate list), the historical candidate list is used to construct or update the current encoded image. The block candidate motion information list includes: the order from the tail to the head of the historical candidate list, checking whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, then The target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: a history other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list Candidate motion information, Q is a positive integer.
或者,or,
尤其需要说明的是,本申请实施例中,为了减少历史候选加入候选运动信息列表中时重复项检查操作的数目,所述使用历史候选列表构建或更新当前编码图像块的候选运动信息列表,包括:根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数。In particular, in the embodiments of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates are added to the candidate motion information list, the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Based on the inter prediction mode of the image block where the current historical candidate motion information HMVP in the historical candidate list is located and / or the inter prediction mode of the image block where the candidate motion information candidate in the candidate motion information list is located Determine whether to perform a repetitive check, and determine whether to add the current historical candidate motion information HMVP to the candidate according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list In the motion information list, M is an integer greater than or equal to 0.
或者,or,
尤其需要说明的是,本申请实施例中,为了减少历史候选加入候选运动信息列表中时重复项检查操作的数目,所述使用历史候选列表构建或更新当前编码图像块的候选运动信息列表,包括:检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。In particular, in the embodiments of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates are added to the candidate motion information list, the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is the first inter prediction mode; the inter prediction mode of the image block where the current candidate motion information is located is the first In the case of an inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; When the inter prediction mode of the image block is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
或者,or,
尤其需要说明的是,本申请实施例中,为了减少历史候选加入候选运动信息列表中时重复项检查操作的数目,所述使用历史候选列表构建或更新当前编码图像块的候选运动信息列表,包括:检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。In particular, in the embodiments of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates are added to the candidate motion information list, the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode; the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction In the case of a mode, adding the current historical candidate motion information to the candidate motion information list; in a case where an inter prediction mode of an image block where the current historical candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list.
或者,or,
尤其需要说明的是,本申请实施例中,为了减少历史候选加入候选运动信息列表中时 重复项检查操作的数目,所述使用历史候选列表构建或更新当前编码图像块的候选运动信息列表,包括:检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且在所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。In particular, in the embodiments of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates are added to the candidate motion information list, the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode; the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction In the case of a mode, the current historical candidate motion information is added to the candidate motion information list; the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and When the inter prediction mode of the image block where the current candidate motion information is in the candidate motion information list is the first inter prediction mode, check the image block where the next candidate motion information in the candidate motion information list is located. Whether the inter prediction mode is the first inter prediction mode; If the inter prediction mode of the image block where the motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, check the current historical candidate motion Whether the information is the same as the current candidate motion information.
或者,or,
尤其需要说明的是,本申请实施例中,为了减少历史候选加入候选运动信息列表中时重复项检查操作的数目,所述使用历史候选列表构建或更新当前编码图像块的候选运动信息列表,包括:检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。In particular, in the embodiments of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates are added to the candidate motion information list, the use of the historical candidate list to construct or update the candidate motion information list of the currently encoded image block includes: : Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is Is the first inter prediction mode; the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of an inter prediction mode, check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode; where the current historical candidate motion information is located Inter prediction mode of the image block and the current in the candidate motion information list Inter prediction mode information of the motion image block is selected from where at least one is not the first case where the inter prediction mode, the motion information candidate check the current history of the current candidate motion information are the same.
详细细节参见图8所示的实施例,这里不再赘述。For details, refer to the embodiment shown in FIG. 8, and details are not described herein again.
较优地,S705、使用当前编码图像块的运动信息对所述历史候选列表进行更新;Preferably, in S705, the historical candidate list is updated by using the motion information of the currently encoded image block;
S707、将用于指示所述当前编码图像块的帧间预测模式的语法元素编入码流。S707. Program a syntax element used to indicate an inter prediction mode of the currently-encoded image block into a code stream.
应当理解的是,所述当前图像块的帧间预测模式为融合merge模式或跳过skip模式,还将与所述目标候选运动信息对应的merge索引号编入码流;It should be understood that the inter prediction mode of the current image block is a merge merge mode or a skip mode, and a merge index number corresponding to the target candidate motion information is also coded into a code stream;
或者,所述当前图像块的帧间预测模式为inter MVP模式,还将与所述目标候选运动信息(即目标候选运动矢量预测值MVP)对应的索引号、参考帧索引和所述运动矢量差值MVD编入码流。Alternatively, the inter prediction mode of the current image block is an inter MVP mode, and an index number, a reference frame index, and the motion vector difference corresponding to the target candidate motion information (that is, the target candidate motion vector prediction value MVP) are also provided. The value MVD is coded into the code stream.
如图7所示,本发明实施例还可以包括:As shown in FIG. 7, the embodiment of the present invention may further include:
S702、在当前编码图像块的编码过程中,载入历史候选列表;S702. Load a historical candidate list during the encoding process of the currently encoded image block.
相应地,在本申请实施例的具体实现方式下,步骤S703中的基于所述候选运动信息列表,对所述当前图像块进行帧间预测,可以包括:Accordingly, in a specific implementation manner of the embodiment of the present application, performing inter prediction on the current image block based on the candidate motion information list in step S703 may include:
根据率失真代价准则,从与当前编码图像块的帧间预测模式对应的候选运动信息列表中确定目标候选运动信息,例如,所述目标候选运动信息编码所述当前编码图像块的率失真代价最小;According to the rate-distortion cost criterion, target motion information is determined from a list of candidate motion information corresponding to the inter prediction mode of the currently coded image block. For example, the target candidate motion information encodes the current coded image block with the lowest rate-distortion cost. ;
确定所述目标候选运动信息为所述当前编码图像块的运动信息(例如merge模式下); 或者,基于所述目标候选运动信息和通过运动估计(Motion Estimation)得到的当前编码图像块的运动矢量,确定所述当前编码图像块的运动矢量差值MVD,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值(例如AMVP模式下);Determining that the target candidate motion information is the motion information of the current encoded image block (for example, in a merge mode); or based on the target candidate motion information and a motion vector of the current encoded image block obtained through motion estimation (Motion Estimation) To determine a motion vector difference MVD of the currently encoded image block, and the target candidate motion information is a motion vector prediction value of the currently encoded image block (for example, in the AMVP mode);
根据所述当前编码图像块的运动信息对当前编码图像块进行帧间预测,得到所述当前编码图像块的预测图像(亦即预测像素值)。Inter prediction is performed on the current coded image block according to the motion information of the current coded image block to obtain a predicted image (that is, a predicted pixel value) of the current coded image block.
应当理解的是,以上方法流程的步骤中,步骤的描述顺序并不代表步骤的执行顺序,按照以上的描述顺序来执行是可行的,不按照以上的描述顺序来执行也是可行的。例如上述步骤S707可以在步骤S705之后执行,也可以在步骤S705之前执行;上述步骤S702可以在步骤S701之后执行,也可以在步骤S701之前执行;其余步骤此处不再一一举例。It should be understood that, in the steps of the above method flow, the order of description of the steps does not represent the order of execution of the steps. It is feasible to perform according to the order of description described above, and it is also feasible to perform it according to the order of description described above. For example, the above step S707 may be performed after step S705, or may be performed before step S705; the above step S702 may be performed after step S701, or may be performed before step S701; the remaining steps are not illustrated here one by one.
其中,所述候选运动信息列表(例如merge candidate list)包括所述当前编码图像块的空域参考块的运动信息(空域参考块包括与当前编码图像块空域邻接的相邻块的运动信息)和/或当前编码图像块的时域参考块的运动信息(所述时域参考块包括:在参考帧中与所述当前编码图像块相同位置处的同位块的右下角相邻块的运动信息,或者,所述同位块的中心位置的运动信息);Wherein, the candidate motion information list (for example, merge candidate list) includes motion information of a spatial domain reference block of the current coded image block (spatial domain reference block includes motion information of an adjacent block adjacent to the spatial domain of the current coded image block) and / Or motion information of a time-domain reference block of a current coded image block (the time-domain reference block includes: motion information of a neighboring block in a lower right corner of a co-located block at a same position as the current coded image block in a reference frame, or , The motion information of the center position of the co-located block);
或者,所述候选运动信息列表(例如MVP candidate list)包括所述当前编码图像块的空域参考块的运动矢量和/或当前编码图像块的时域参考块的运动矢量;Alternatively, the candidate motion information list (for example, MVP candidate list) includes a motion vector of a spatial reference block of the current coded image block and / or a motion vector of a time domain reference block of the current coded image block;
例如,如果所述当前编码块的帧间预测模式为融合merge模式或跳过skip模式,编入码流中的语法元素还包括用于指示当前编码图像块的目标候选运动信息的索引号,换言之,即还可以将与所述目标候选运动信息对应的索引号编入码流;For example, if the inter prediction mode of the current coded block is a merge merge mode or a skip mode, the syntax element included in the code stream also includes an index number indicating the target candidate motion information of the currently coded image block, in other words That is, an index number corresponding to the target candidate motion information may also be coded into a code stream;
例如,如果所述当前编码块的帧间预测模式为非融合merge模式或非跳过skip模式,编入码流中的语法元素还包括用于指示当前编码图像块的目标候选运动信息的索引号和运动矢量差值MVD,换言之,即还可以将与所述目标候选运动信息对应的索引号和所述运动矢量差值MVD编入码流,所述目标候选运动信息为所述当前编码图像块的运动矢量预测值MVP。For example, if the inter prediction mode of the current coded block is a non-fused merge mode or a non-skip skip mode, the syntax element included in the code stream further includes an index number used to indicate target candidate motion information of the currently coded image block And the motion vector difference value MVD, in other words, an index number corresponding to the target candidate motion information and the motion vector difference value MVD may also be coded into a code stream, and the target candidate motion information is the current coded image block Motion vector predictor MVP.
在一种较优的实现方式下,所述历史候选列表中的历史候选运动信息(以HMVP示意)采用先进先出的方式(如图9或10所示)进行访问或更新。In a preferred implementation manner, the historical candidate motion information (indicated by HMVP) in the historical candidate list is accessed or updated in a first-in-first-out manner (as shown in FIG. 9 or 10).
进一步的,本申请实施例的编码方法还可以包括:Further, the encoding method in the embodiment of the present application may further include:
基于所述当前编码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前编码图像块的预测图像(亦即预测像素值),得到所述当前编码图像块的重建图像。Based on the residual image (that is, the residual value) of the current encoded image block and the predicted image (that is, the predicted pixel value) of the current encoded image block obtained by the inter prediction process, the Reconstructed image.
可见,本申请实施例中,考虑到历史候选列表中最新的Q个历史候选较大概率可能与候选运动信息列表中已有候选运动信息重复(如图11B所示),使用历史候选列表构建或更新当前图像块的候选运动信息列表的过程中,跳过最新加入的Q个历史候选运动信息,比如,如果当前编码图像块的帧间预测模式为skip/merge模式,在使用历史候选列表构造融合运动信息候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;如果当前编码图像块的帧间预测模式为inter MVP模式,在使用历史候选列表构造运动矢量预测候选 列表时,跳过从尾部到头部的顺序排列的Q个历史候选;相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K和L乘以J次重复项查找,本申请能在具有相当的编码效率的前提下,减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, in the embodiment of the present application, considering that the latest Q historical candidates in the historical candidate list have a higher probability that may overlap with existing candidate motion information in the candidate motion information list (as shown in FIG. 11B), the historical candidate list is used to construct or During the process of updating the candidate motion information list of the current image block, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently encoded image block is skip / merge mode, the historical candidate list is used to construct the fusion. In the motion information candidate list, the Q historical candidates arranged in order from the tail to the head are skipped; if the inter prediction mode of the currently encoded image block is the inter MVP mode, when the historical candidate list is used to construct the motion vector prediction candidate list, Skip the Q historical candidates in order from the tail to the head; compared to the use of the historical candidate list (assuming length L) in the prior art to construct a fusion motion information candidate list (assuming length K) and motion vector prediction candidate list (Assume length is J), you need L times K and L times J duplicate search, respectively. Under the premise of high encoding efficiency, the number of duplicate entry checking operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thus the encoding. Decoding performance.
图8为本申请实施例一的图像解码方法的一种示例性流程图。该方法的执行主体可以是视频解码器(例如视频解码器30)或具有视频解码功能的电子设备(例如设备1200、1300),该方法可以包括以下步骤:FIG. 8 is an exemplary flowchart of an image decoding method according to the first embodiment of the present application. The method may be performed by a video decoder (for example, video decoder 30) or an electronic device (for example, devices 1200, 1300) with video decoding functions. The method may include the following steps:
S801、解析码流中的语法元素,以确定当前解码图像块(简称为当前块)的帧间预测模式;S801. Parse syntax elements in the bitstream to determine an inter prediction mode of a currently decoded image block (referred to as a current block);
例如,从码流中解析出skip_flag,merge_flag,pred_mode等语法元素;在一种示例下,如下表所示,skip_flag,merge_flag,pred_mode中的一个或多个用于指示当前解码图像块的帧间预测模式。例如,cu_skip_flag取值为0,表示当前图像块的帧间预测模式不是skip模式,cu_skip_flag取值为1,表示当前图像块的帧间预测模式是skip模式;例如,pred_mode_flag取值为0,表示当前图像块的预测模式是inter帧间预测模式,pred_mode_flag取值为1,表示当前图像块的预测模式是intra帧内预测模式;例如,merge_flag取值为0,表示当前图像块的帧间预测模式不是merge模式,merge_flag取值为1,表示当前图像块的帧间预测模式是merge模式。For example, the syntax elements such as skip_flag, merge_flag, and pred_mode are parsed from the bitstream. In one example, as shown in the following table, one or more of skip_flag, merge_flag, and pred_mode are used to indicate the inter prediction of the currently decoded image block. mode. For example, the value of cu_skip_flag is 0, which indicates that the inter-prediction mode of the current image block is not a skip mode, and the value of cu_skip_flag is 1, which indicates that the inter-prediction mode of the current image block is a skip mode; The prediction mode of the image block is inter inter prediction mode. A value of pred_mode_flag is 1 indicates that the prediction mode of the current image block is intra intra prediction mode. For example, a value of merge_flag is 0, which indicates that the inter prediction mode of the current image block is not In merge mode, the value of merge_flag is 1, indicating that the inter prediction mode of the current image block is the merge mode.
Figure PCTCN2018104430-appb-000001
Figure PCTCN2018104430-appb-000001
Figure PCTCN2018104430-appb-000002
Figure PCTCN2018104430-appb-000002
Figure PCTCN2018104430-appb-000003
Figure PCTCN2018104430-appb-000003
S803、使用历史候选列表构建或更新与当前解码图像块的帧间预测模式对应的候选运动信息列表;基于所述候选运动信息列表,对所述当前解码图像块进行帧间预测;S803. Use the historical candidate list to construct or update a candidate motion information list corresponding to the inter prediction mode of the currently decoded image block; perform inter prediction on the current decoded image block based on the candidate motion information list;
例如,如果当前解码图像块的帧间预测模式为merge模式,则与当前解码图像块的帧间预测模式对应的候选运动信息列表为融合运动信息候选列表merge candidate list;如果当前解码图像块的帧间预测模式为inter MVP模式(例如AMVP模式),则与当前解码图像块的帧间预测模式对应的候选运动信息列表为运动矢量预测候选列表MVP candidate list;所述历史候选列表不同于所述候选运动信息列表。For example, if the inter prediction mode of the currently decoded image block is the merge mode, the candidate motion information list corresponding to the inter prediction mode of the currently decoded image block is the merged motion information candidate list merge candidate list; if the frame of the currently decoded image block The inter prediction mode is an inter MVP mode (for example, AMVP mode), and the candidate motion information list corresponding to the inter prediction mode of the currently decoded image block is a motion vector prediction candidate list MVP candidate list; the historical candidate list is different from the candidate List of exercise information.
尤其需要说明的是,本申请实施例中,为了减少历史候选列表中的历史候选加入候选运动信息列表(例如融合运动信息候选列表或运动矢量预测候选列表)中时重复项检查操作的数目,所述使用历史候选列表构建或更新当前解码图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到 所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数。In particular, in this embodiment of the present application, in order to reduce the number of duplicate entry checking operations when historical candidates in the historical candidate list are added to the candidate motion information list (such as the fused motion information candidate list or the motion vector prediction candidate list), The method of using the historical candidate list to construct or update the candidate motion information list of the currently decoded image block includes: ordering from the tail to the head of the historical candidate list, checking the target historical candidate motion information and the existing candidate motion information in the candidate motion information list. Whether the candidate motion information is the same; if different, the target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: an order from the tail to the head in the historical candidate list The historical candidate motion information other than the arranged Q historical candidate motion information, where Q is a positive integer.
应当理解的是,本申请实施例中,可以是在构建候选运动信息列表的过程中,引入历史候选列表并且有选择性的跳过部分历史候选的重复性检查;也可以是在生成候选运动信息列表(例如以常规方式生成候选运动信息列表)之后,使用历史候选列表对当前图像块的候选运动信息列表进行更新。下文将对后者进行详细阐述。It should be understood that, in the embodiment of the present application, in the process of constructing the candidate motion information list, the historical candidate list is introduced and the repetitive check of some historical candidates is selectively skipped; or the candidate motion information may be generated After the list (for example, the candidate motion information list is generated in a conventional manner), the historical candidate list is used to update the candidate motion information list of the current image block. The latter will be explained in detail below.
S8031、若当前块为merge/skip模式,生成融合运动信息候选列表,可以包括:S8031. If the current block is in merge / skip mode, generating a candidate list of fused motion information may include:
将与当前块的空域候选者和时域候选者加入当前块的融合运动信息候选列表中,具体方法可以参见高效率视频编解码(high efficiency video coding,HEVC)标准。如图6所示,空间融合候选包含A0、A1、B0、B1、B2,时域融合候选包括T0和T1。在多用途视频编码测试模型(Versatile video coding Test Model,VTM)中,时域融合候选也包括自适应时域运动矢量预测(ATMVP)技术提供的候选。本申请实施例不限定生成融合运动信息候选列表相关的过程,该过程可采用HEVC或者VTM中的方法进行,也可采用其他生成融合运动信息候选列表的方法。Spatial and temporal candidates with the current block are added to the candidate list of fused motion information for the current block. For specific methods, refer to the High Efficiency Video Coding (HEVC) standard. As shown in FIG. 6, the spatial fusion candidates include A0, A1, B0, B1, and B2, and the time domain fusion candidates include T0 and T1. In the Versatile Video Coding Test Model (VTM), the candidates for time-domain fusion also include candidates provided by the adaptive time-domain motion vector prediction (ATMVP) technology. The embodiment of the present application does not limit the process related to generating a candidate list of fused motion information. This process may be performed by using a method in HEVC or VTM, or other methods of generating a candidate list of fused motion information.
若当前块为Inter MVP模式,则生成运动矢量预测候选列表,可采用HEVC或者VTM中的方法进行,也可采用其他生成运动矢量预测候选列表的方法,本申请实施例对此不作限定。If the current block is in the Inter-MVP mode, the motion vector prediction candidate list may be generated by using a method in HEVC or VTM, or other methods of generating a motion vector prediction candidate list may be adopted, which is not limited in this embodiment of the present application.
S8032、使用历史候选列表对当前图像块的候选运动信息列表(融合运动信息候选列表或运动矢量预测候选列表)进行更新,可以包括以下方法之一:S8032. Updating the candidate motion information list (fused motion information candidate list or motion vector prediction candidate list) of the current image block using the historical candidate list may include one of the following methods:
方法一:method one:
从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于0的正整数。如图11A所示,即不是从历史候选列表尾部的历史候选运动信息MV5开始,而是从MV4(预设数目Q为1)或者MV3(预设数目Q为2)等开始,检查其与步骤S8031得到的融合运动信息候选列表中融合运动信息候选是否相同,如果均不同则加入到融合运动信息候选列表中,如果相同则检查历史候选列表中下一个历史候选。When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than 0. As shown in FIG. 11A, instead of starting from the historical candidate motion information MV5 at the end of the historical candidate list, it starts from MV4 (the preset number Q is 1) or MV3 (the preset number Q is 2) and so on. If the fusion motion information candidates in the fusion motion information candidate list obtained in S8031 are the same, if they are different, they are added to the fusion motion information candidate list, and if they are the same, the next historical candidate in the historical candidate list is checked.
或者,or,
从历史候选列表尾部到头部的顺序检查并添加预设数目P的历史候选,只有与inter MVP模式的目标参考帧索引使用相同参考帧索引的历史候选才会被加入到运动矢量预测候选列表中,预设数目P为大于0的正整数。从历史候选列表尾部到头部的顺序检查并添加预设数目P的历史候选时,跳过预设数目Q的历史候选。如图11A所示,即不是从历史候选列表尾部的历史候选运动信息MV5开始,而是从MV4(预设数目Q为1)或者MV3(预设数目Q为2)等开始,检查其与步骤S8031得到的运动矢量预测候选列表中运动矢量预测候选是否相同;如果其与步骤S8031得到的运动矢量预测候选列表中运动矢量预测候选均不同且当前历史候选MV对应的参考帧索引与目标参考帧索引相同则加入到运动矢量预测候选列表中; 如果其与步骤S8031得到的运动矢量预测候选列表中某个运动矢量预测候选相同则检查历史候选列表中下一个历史候选,直至预设数目P个历史候选添加完成。Check and add a preset number of historical candidates from the end of the historical candidate list to the head. Only historical candidates that use the same reference frame index as the target reference frame index of the inter MVP mode will be added to the motion vector prediction candidate list. The preset number P is a positive integer greater than 0. When checking and adding a preset number of history candidates in order from the tail to the head of the history candidate list, skip the preset number of history candidates Q. As shown in FIG. 11A, instead of starting from the historical candidate motion information MV5 at the end of the historical candidate list, but starting from MV4 (the preset number Q is 1) or MV3 (the preset number Q is 2), etc., check its and steps Whether the motion vector prediction candidate in the motion vector prediction candidate list obtained in S8031 is the same; if it is different from the motion vector prediction candidate in the motion vector prediction candidate list obtained in step S8031 and the reference frame index and target reference frame index corresponding to the current historical candidate MV If they are the same, they are added to the motion vector prediction candidate list; if they are the same as a motion vector prediction candidate in the motion vector prediction candidate list obtained in step S8031, the next historical candidate in the historical candidate list is checked until a preset number of P historical candidates Add is complete.
方法二:Method Two:
从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于0的正整数。如图11A所示,即不是从历史候选列表尾部的历史候选运动信息MV5开始,而是从MV4(预设数目Q为1)或者MV3(预设数目Q为2)等开始,检查其与步骤S8031得到的融合运动信息候选列表中融合运动信息候选是否相同,如果不同则加入到融合运动信息候选列表中,如果相同则检查历史候选列表中下一个历史候选。When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than 0. As shown in FIG. 11A, instead of starting from the historical candidate motion information MV5 at the end of the historical candidate list, but starting from MV4 (the preset number Q is 1) or MV3 (the preset number Q is 2), etc., check its and steps If the fusion motion information candidates in the fusion motion information candidate list obtained in S8031 are the same, if they are different, they are added to the fusion motion information candidate list. If they are the same, the next historical candidate in the historical candidate list is checked.
或者,不将历史候选列表中的历史候选加入到运动矢量预测候选列表中。Alternatively, the historical candidates in the historical candidate list are not added to the motion vector prediction candidate list.
方法三:Method three:
不将历史候选列表中的历史候选加入到融合运动信息候选列表中。The historical candidates in the historical candidate list are not added to the fusion motion information candidate list.
或者,从历史候选列表尾部到头部的顺序检查并添加预设数目P的历史候选,只有与inter MVP模式的目标参考帧索引使用相同参考帧索引的历史候选才会被加入到运动矢量预测候选列表中,预设数目P为大于0的正整数。从历史候选列表尾部到头部的顺序检查并添加预设数目的历史候选时,跳过预设数目Q的历史候选。如图11A所示,即不是从历史候选列表尾部的历史候选运动信息MV5开始,而是从MV4(预设数目Q为1)或者MV3(预设数目Q为2)等开始,检查其与步骤S8031得到的运动矢量预测候选列表中运动矢量预测候选是否相同;如果其与步骤S8031得到的运动矢量预测候选列表中运动矢量预测候选均不同且当前历史候选MV对应的参考帧索引与目标参考帧索引相同则加入到运动矢量预测候选列表中;如果其与步骤S8031得到的运动矢量预测候选列表中某个运动矢量预测候选相同则检查历史候选列表中下一个历史候选,直至预设数目P个历史候选添加完成。Alternatively, check and add a preset number of historical candidates in order from the tail to the head of the history candidate list. Only historical candidates that use the same reference frame index as the target reference frame index of the inter MVP mode will be added to the motion vector prediction candidate. In the list, the preset number P is a positive integer greater than 0. When checking and adding a preset number of history candidates in order from the tail to the head of the history candidate list, the preset number Q of history candidates is skipped. As shown in FIG. 11A, instead of starting from the historical candidate motion information MV5 at the end of the historical candidate list, but starting from MV4 (the preset number Q is 1) or MV3 (the preset number Q is 2), etc., check its and steps Whether the motion vector prediction candidate in the motion vector prediction candidate list obtained in S8031 is the same; if it is different from the motion vector prediction candidate in the motion vector prediction candidate list obtained in step S8031 and the reference frame index and target reference frame index corresponding to the current historical candidate MV If they are the same, they are added to the motion vector prediction candidate list; if they are the same as a motion vector prediction candidate in the motion vector prediction candidate list obtained in step S8031, the next historical candidate in the historical candidate list is checked until a preset number of P historical candidates Add is complete.
需要说明的是,上述将历史候选列表中的历史候选加入到融合运动信息候选列表和运动矢量预测候选列表中,可以放置在时域运动信息候选(时域运动矢量候选)之后,也可以放置在其他位置,本申请不限定具体放置在这两个列表中的位置。应理解的是,可以是在候选运动信息列表的构建过程中,将历史候选列表中的历史候选放置在时域运动信息候选(时域运动矢量候选)之后;也可以是在候选运动信息列表的构建完成之后,将历史候选列表中的历史候选放置在已有的空域和时域运动信息候选之后;本申请对此不做限定。It should be noted that the historical candidates in the historical candidate list are added to the fusion motion information candidate list and the motion vector prediction candidate list, and can be placed after the time domain motion information candidate (time domain motion vector candidate), or For other positions, the present application does not limit the positions in the two lists. It should be understood that, in the process of constructing the candidate motion information list, the historical candidates in the historical candidate list may be placed after the time domain motion information candidate (time domain motion vector candidate); or it may be in the candidate motion information list. After the construction is completed, the historical candidates in the historical candidate list are placed after the existing spatial and temporal motion information candidates; this application does not limit this.
需要说明的是,如图11C所示,在历史候选加入到融合运动信息候选列表之后,还可以加入其它类型的融合候选,如双向预测融合候选(bi-predictive merge candidate)和零运动矢量融合候选(zero motion vector merge candidate)。本申请实施例不涉及其它类型的融合候选的加入的过程,该过程可采用HEVC或者VTM中的方法进行,也可采用其 他方法。It should be noted that, as shown in FIG. 11C, after the historical candidate is added to the fusion motion information candidate list, other types of fusion candidates may be added, such as bi-predictive merge candidate and zero motion vector fusion candidate. (zero motion vector merge candidate). The embodiment of the present application does not involve a process of joining other types of fusion candidates, and the process may be performed by a method in HEVC or VTM, or other methods.
S8033、从所述候选运动信息列表中确定目标候选运动信息,基于所述目标候选运动信息预测所述当前解码图像块(简称当前块)的运动信息;基于当前解码图像块的运动信息执行运动补偿,得到当前图像块的预测像素值;亦称为,根据所述当前解码图像块的运动信息对当前解码图像块进行帧间预测,得到所述当前解码图像块的预测图像(亦即预测像素值)。S8033. Determine target candidate motion information from the candidate motion information list, predict motion information of the currently decoded image block (referred to as the current block) based on the target candidate motion information, and perform motion compensation based on the motion information of the currently decoded image block. To obtain the predicted pixel value of the current image block; also known as performing inter prediction on the current decoded image block according to the motion information of the current decoded image block to obtain the predicted image (that is, the predicted pixel value) of the current decoded image block ).
例如:根据从码流中解析得到的索引标识(例如融合索引或运动矢量预测值索引),从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;应理解的是,如果所述候选运动信息列表的长度为一,则无需解析索引标识,确定唯一的候选运动信息为目标候选运动信息;For example, the target candidate motion information is determined from the candidate motion information list according to an index identifier (such as a fusion index or a motion vector prediction value index) parsed from the bitstream, and the index identifier is used to indicate the candidate motion information The target candidate motion information in the list; it should be understood that if the length of the candidate motion information list is one, there is no need to parse the index identifier to determine that the only candidate motion information is the target candidate motion information;
例如,若当前块为merge/skip模式,确定所述码流中携带的融合索引指示的目标候选运动信息为所述当前解码图像块的运动信息;或者,若当前块为Inter MVP模式,所述码流中携带的运动矢量预测值索引指示的目标候选运动信息为运动矢量预测值,基于所述运动矢量预测值和从所述码流中解析出的所述当前图像块的运动矢量残差值MVD(和帧间预测方向、参考帧索引等),确定所述当前解码图像块的运动信息。For example, if the current block is in merge / skip mode, it is determined that the target candidate motion information indicated by the fusion index carried in the code stream is the motion information of the current decoded image block; or, if the current block is in the Inter MVP mode, the The target candidate motion information indicated by the motion vector prediction value index carried in the code stream is a motion vector prediction value, based on the motion vector prediction value and the motion vector residual value of the current image block parsed from the code stream MVD (and inter prediction direction, reference frame index, etc.) to determine motion information of the currently decoded image block.
如果当前块存在残差,则将残差信息和预测图像相加,获得当前块的重建图像;如果当前块没有残差,则预测图像为当前块的重建图像。If a residual exists in the current block, the residual information and the predicted image are added to obtain a reconstructed image of the current block; if the current block has no residual, the predicted image is a reconstructed image of the current block.
上述过程参见现有技术,例如可采用与HEVC或者VTM相同的方法,也可采用其他运动补偿、图像重建方法,本申请对此不做限定。For the foregoing process, refer to the prior art. For example, the same method as HEVC or VTM may be adopted, and other motion compensation and image reconstruction methods may also be adopted, which is not limited in this application.
可选的,本发明实施例还可以包括:Optionally, the embodiment of the present invention may further include:
S806(未示意),基于所述当前解码图像块的残差图像(亦即残差值)和所述帧间预测过程得到的当前解码图像块的预测图像(亦即预测像素值),得到所述当前解码图像块的重建图像。例如,将预测图像与残差图像相加,得到当前块的重建图像。S806 (not shown), based on the residual image (that is, the residual value) of the current decoded image block and the predicted image (that is, the predicted pixel value) of the current decoded image block obtained by the inter prediction process, the obtained The reconstructed image of the currently decoded image block is described. For example, the predicted image and the residual image are added to obtain a reconstructed image of the current block.
如图8所示,本发明实施例还可以包括:As shown in FIG. 8, the embodiment of the present invention may further include:
S802、在当前解码图像块的解码过程中,载入历史候选列表,以便于使用历史候选列表构建或更新当前图像块的候选运动信息列表;S802: During the decoding process of the currently decoded image block, load a historical candidate list, so as to use the historical candidate list to construct or update the candidate motion information list of the current image block;
如图9和10所示,历史候选列表的长度L为预设值(亦称为预设列表大小),即构造完成后历史候选列表中包含的历史候选运动信息候选个数为L,例如L=5、6、7,8,9或10等。L为大于0的正整数。As shown in FIGS. 9 and 10, the length L of the historical candidate list is a preset value (also referred to as a preset list size), that is, the number of historical candidate motion information candidates included in the historical candidate list after construction is L, such as L = 5, 6, 7, 8, 9, or 10, etc. L is a positive integer greater than 0.
历史候选列表的初始化过程参见现有技术,例如在条带(SLICE)开始的时候,将历史候选列表清空,也可采用其他历史候选列表的初始化方法,本申请不作限定。For the initialization process of the historical candidate list, refer to the prior art. For example, at the beginning of a slice (SLICE), the historical candidate list may be emptied. Other methods for initializing the historical candidate list may also be adopted, which is not limited in this application.
S805、使用当前解码图像块的运动信息对所述历史候选列表进行更新。S805. Update the historical candidate list by using the motion information of the currently decoded image block.
应当理解的是,以上方法流程的步骤中,步骤的描述顺序并不代表步骤的执行顺序,按照以上的描述顺序来执行是可行的,不按照以上的描述顺序来执行也是可行的。例如上述步骤S802可以在步骤S801之后执行,也可以在步骤S801之前执行;其余步骤此处不再一一举例。It should be understood that, in the steps of the above method flow, the order of description of the steps does not represent the order of execution of the steps. It is feasible to perform according to the order of description described above, and it is also feasible to perform it according to the order of description described above. For example, the above step S802 may be performed after step S801, or may be performed before step S801; the remaining steps are not illustrated here one by one.
在一种实现方式下,如图10所示,步骤S805中所述使用当前解码图像块的运动信息 更新所述历史候选列表,包括:In an implementation manner, as shown in FIG. 10, updating the historical candidate list using the motion information of the currently decoded image block as described in step S805 includes:
当所述当前解码图像块(简称为当前块)的运动信息与所述历史候选列表中的第X历史候选运动信息相同时,从所述历史候选列表去除所述第X历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表;When the motion information of the current decoded image block (referred to as the current block) is the same as the Xth historical candidate motion information in the historical candidate list, removing the Xth historical candidate motion information from the historical candidate list, and Adding the motion information of the currently decoded image block as the latest historical candidate motion information to the historical candidate list;
当所述当前解码图像块的运动信息与所述历史候选列表中的一个或多个历史候选运动信息均不相同时,将所述当前解码图像块的运动信息作为最新的历史候选运动信息加入所述历史候选列表。在本申请中,并不限定判断或比较当前块的运动信息与历史候选列表中某个历史候选运动信息是否相同的方法。可以是两个运动信息完全相同,也可以是两个运动信息在某种处理后相同,例如两个运动矢量右移2位后的结果相同。When the motion information of the current decoded image block is different from one or more historical candidate motion information in the historical candidate list, adding the motion information of the current decoded image block as the latest historical candidate motion information The historical candidate list is described. In this application, a method for judging or comparing whether the motion information of the current block is the same as a certain historical candidate motion information in the historical candidate list is not limited. It can be that the two pieces of motion information are completely the same, or that the two pieces of motion information are the same after some processing, for example, the results of two motion vectors shifted to the right by 2 bits are the same.
或者,如图9所示,步骤S805中所述使用当前解码图像块的运动信息更新所述历史候选列表,包括:Alternatively, as shown in FIG. 9, updating the historical candidate list using the motion information of the currently decoded image block as described in step S805 includes:
如果当前的所述历史候选列表的大小未达到预设列表大小,则将所述当前解码图像块的运动信息作为最新的历史候选运动信息(直接)加入所述历史候选列表中;If the current size of the historical candidate list does not reach the preset list size, adding the motion information of the currently decoded image block as the latest historical candidate motion information (directly) to the historical candidate list;
如果当前的所述历史候选列表的大小已达到预设列表大小,从所述历史候选列表去除最早加入的历史候选运动信息,并将所述当前解码图像块的运动信息作为最新的历史候选运动信息(the last candidate)加入所述历史候选列表。If the current size of the historical candidate list has reached a preset list size, remove the earliest added historical candidate motion information from the historical candidate list, and use the motion information of the current decoded image block as the latest historical candidate motion information (the last candidate) to join the historical candidate list.
例如,如图10所示,从历史候选列表头部开始,将当前块的运动信息与历史候选列表中的历史候选进行比较;如有某个历史候选与当前块运动信息相同,将该历史候选从历史候选列表中移除。检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选移除。最后,将当前块的运动信息加入到历史候选列表中。For example, as shown in FIG. 10, starting from the head of the historical candidate list, the motion information of the current block is compared with the historical candidates in the historical candidate list; if a historical candidate is the same as the current block motion information, the historical candidate is compared. Remove from historical candidate list. Check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. Finally, the motion information of the current block is added to the historical candidate list.
例如,如图9所示,检查历史候选列表大小,如果历史候选列表大小未超过预设的列表大小(亦称为列表长度或table size),则将当前块的运动信息作为最新的一个历史候选运动信息加入到历史候选列表的尾部中;如果历史候选列表大小达到预设的列表大小(亦称为列表长度或table size),则将该历史候选列表中位于头部的历史候选运行信息移除,并将当前块的运动信息作为最新的一个历史候选运动信息加入到历史候选列表尾部中。For example, as shown in FIG. 9, the historical candidate list size is checked. If the historical candidate list size does not exceed a preset list size (also called a list length or table size), the motion information of the current block is taken as the latest historical candidate. Motion information is added to the tail of the historical candidate list; if the historical candidate list size reaches a preset list size (also known as the list length or table size), the historical candidate running information at the head of the historical candidate list is removed And add the motion information of the current block as the latest historical candidate motion information to the tail of the historical candidate list.
可见,本申请实施例中,考虑到历史候选列表中最新的Q个历史候选较大概率可能与候选运动信息列表中已有候选运动信息重复(如图11B示意),使用历史候选列表构建或更新当前图像块的候选运动信息列表的过程中,跳过最新加入的Q个历史候选运动信息,比如,如果当前解码图像块的帧间预测模式为skip/merge模式,在使用历史候选列表构造融合运动信息候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;如果当前解码图像块的帧间预测模式为inter MVP模式,在使用历史候选列表构造运动矢量预测候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K和L乘以J次重复项查找,本申请能在具有相当的编码效率的前提下,减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that in the embodiment of the present application, considering that the latest Q historical candidates in the historical candidate list have a higher probability and may already overlap with the candidate motion information in the candidate motion information list (as shown in FIG. 11B), the historical candidate list is used to construct or update. In the process of the candidate motion information list of the current image block, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently decoded image block is skip / merge mode, the fusion motion is constructed using the historical candidate list. When the information candidate list is used, skip the Q historical candidates in the order from the tail to the head. If the inter prediction mode of the currently decoded image block is the inter MVP mode, when using the historical candidate list to construct the motion vector prediction candidate list, skip Q historical candidates arranged in order from the tail to the head; compared with the historical candidate list (assuming length L) is used in the prior art to construct a fusion motion information candidate list (assuming length K) and a motion vector prediction candidate list ( When the length is assumed to be J), L times K and L times J times the duplicate search are required. Under the premise of encoding efficiency, the number of duplicate check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thus encoding and decoding. performance.
一并参阅图8,本申请实施例二与前述实施例一相比,主要的区别在于:使用融合运动信息候选列表和运动矢量预测候选列表中候选所在编码块的编码模式来跳过相应候选的重复性查找过程Referring to FIG. 8 together, compared with the first embodiment, the main difference between the second embodiment of the present application and the previous embodiment is that the coding mode of the coding block where the candidate is located in the candidate motion information candidate list and the motion vector prediction candidate list is used to skip the corresponding candidate. Repetitive search process
在本申请实施例二中,需在生成融合运动信息候选列表的过程中,记录每个融合运动信息候选所在编码块(CU)的编码模式,下文中将融合运动信息候选所在编码块的编码模式称为该融合运动信息候选的编码模式。本实施例中的该融合运动信息候选的编码模式指该融合运动信息候选的帧间预测模式。In the second embodiment of the present application, in the process of generating a candidate list of fused motion information, it is necessary to record the coding mode of the coding block (CU) where each fused motion information candidate is located. Hereinafter, the coding mode of the coding block where the fused motion information candidate is located. This coding mode is called the fusion motion information candidate. The encoding mode of the fused motion information candidate in this embodiment refers to an inter prediction mode of the fused motion information candidate.
在本申请实施例二中,需在生成运动矢量预测候选列表的过程中,记录每个运动矢量预测候选所在编码块(CU)的编码模式,下文中将运动矢量预测候选所在编码块的编码模式称为该运动矢量预测候选的编码模式。本实施例中的该运动矢量预测候选的编码模式指该运动矢量预测候选的帧间预测模式。In the second embodiment of the present application, in the process of generating the motion vector prediction candidate list, the coding mode of the coding block (CU) where each motion vector prediction candidate is located is recorded. Hereinafter, the coding mode of the coding block where the motion vector prediction candidate is located is recorded. This coding mode is called the motion vector prediction candidate. The coding mode of the motion vector prediction candidate in this embodiment refers to an inter prediction mode of the motion vector prediction candidate.
S8032’、使用历史候选列表对当前图像块的候选运动信息列表(融合运动信息候选列表或运动矢量预测候选列表)进行更新,可以包括以下方法之一:S8032 '. Updating the candidate motion information list (fused motion information candidate list or motion vector prediction candidate list) of the current image block using the historical candidate list may include one of the following methods:
方法一:method one:
从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于等于0的正整数。然后对于预定数目B的历史候选中的每个历史候选进行以下操作,预设数目B为大于0的正整数:When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. Then, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
在检查其与步骤S8031得到的融合运动信息候选列表中某个融合运动信息候选是否相同(即做重复项检查)前,首先检查该融合运动信息候选的编码模式是否为inter MVP模式。如果该融合运动信息候选的编码模式是inter MVP模式,则不检查该融合运动信息候选与历史候选是否相同,或认为该融合运动信息候选与历史候选不同;如果该融合运动信息候选的编码模式不是inter MVP模式,则检查该融合运动信息候选与历史候选是否相同。Before checking whether it is the same as a certain fused motion information candidate in the fused motion information candidate list obtained in step S8031 (that is, to perform a duplicate check), first check whether the coding mode of the fused motion information candidate is an inter MVP mode. If the coding mode of the fused motion information candidate is inter MVP mode, it is not checked whether the fused motion information candidate is the same as the historical candidate, or the fused motion information candidate is considered different from the historical candidate; if the coding mode of the fused motion information candidate is not inter MVP mode, it is checked whether the fusion motion information candidate and the historical candidate are the same.
如果该历史候选与融合运动信息候选列表的所有重复性检查结果为该历史候选与某个融合运动信息候选相同,则不做任何操作;反之,将该历史候选加入到融合运动信息候选列表中,例如,将该历史候选加入到融合运动信息候选列表的尾部。If all the repetitive check results of the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
方法二:Method Two:
从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于等于0的正整数。然后对于预定数目B的历史候选中的每个历史候选进行以下操作,预设数目B为大于0的正整数:When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. Then, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
检查该历史候选的编码模式是否为inter MVP模式,如果该历史候选的编码模式是 inter MVP模式,则直接将该历史候选加入到融合运动信息候选列表中(即不需要检查该历史候选与融合运动信息候选是否相同,或认为该历史候选与融合运动信息候选不同);如果该历史候选的编码模式不是inter MVP模式,继续后续步骤,即在检查其与步骤S8031得到的融合运动信息候选列表中某个融合运动信息候选是否相同(即做重复项检查)前,首先检查该融合运动信息候选的编码模式是否为inter MVP模式。如果该历史候选的编码模式不是inter MVP模式而该融合运动信息候选的编码模式是inter MVP模式,则不需要检查该融合运动信息候选与当前历史候选是否相同(默认该融合运动信息候选与当前历史候选不同);反之,如果该历史候选的编码模式不是inter MVP模式,而该融合运动信息候选的编码模式也不是inter MVP模式,则检查该融合运动信息候选与该历史候选是否相同。比如当前图像块的运动信息被预测出来之后,也会作为一个历史候选,而在预测当前图像块的运动信息时,解码端会从码流中解析出当前图像块的编码模式,这时候就将当前块的运动信息和当前块的编码模式信息作为历史候选的信息进行保存。Check if the coding mode of the historical candidate is inter MVP mode. If the coding mode of the historical candidate is inter MVP mode, directly add the historical candidate to the fusion motion information candidate list (that is, there is no need to check the historical candidate and the fusion motion. Whether the information candidates are the same, or if the historical candidate is considered to be different from the fused motion information candidate); if the coding mode of the historical candidate is not an inter-MVP mode, continue to the next step, that is, check a certain candidate in the fused motion information candidate list obtained from step S8031 Before the fusion motion information candidates are the same (that is, to check for duplicates), first check whether the coding mode of the fusion motion information candidate is the inter MVP mode. If the coding mode of the historical candidate is not the inter MVP mode and the coding mode of the fused motion information candidate is the inter MVP mode, there is no need to check whether the fused motion information candidate is the same as the current historical candidate. The candidates are different.) Conversely, if the coding mode of the historical candidate is not an inter MVP mode and the coding mode of the fused motion information candidate is not an inter MVP mode, it is checked whether the fused motion information candidate is the same as the historical candidate. For example, after the motion information of the current image block is predicted, it will also be used as a historical candidate. When predicting the motion information of the current image block, the decoder will parse the encoding mode of the current image block from the code stream. The motion information of the current block and the encoding mode information of the current block are stored as information of historical candidates.
如果该历史候选与融合运动信息候选列表的所有重复性检查结果为该历史候选与某个融合运动信息候选相同,则不做任何操作;反之,将该历史候选加入到融合运动信息候选列表中,例如,将该历史候选加入到融合运动信息候选列表的尾部。If all the repetitive check results of the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
应当理解的是,如果当前历史候选所在的图像块的帧间预测模式与候选运动信息列表中的当前候选项所在的图像块的帧间预测模式中的至少一个是inter MVP模式,较大概率下两者(即当前历史候选和候选运动信息列表中的当前候选项)彼此不同,跳过对两者的重复性检查。It should be understood that if at least one of the inter prediction mode of the image block where the current historical candidate is located and the inter prediction mode of the image block where the current candidate in the candidate motion information list is the inter MVP mode, the larger the probability The two (that is, the current candidate in the current historical candidate and the candidate motion information list) are different from each other, and the repetitive check of the two is skipped.
方法三:Method three:
从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于等于0的正整数。然后对于预定数目B的历史候选中的每个历史候选进行以下操作,预设数目B为大于0的正整数:When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. Then, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
检查该历史候选的编码模式是否为inter MVP模式,如果该历史候选的编码模式是inter MVP模式,直接将该历史候选加入到融合运动信息候选列表中(默认该历史候选与融合运动信息候选不同);如果该历史候选的编码模式不是inter MVP模式,继续后续步骤,即检查其与步骤S8031得到的融合运动信息候选列表中某个融合运动信息候选是否相同(即做重复项检查)。Check whether the coding mode of the historical candidate is inter MVP mode. If the coding mode of the historical candidate is inter MVP mode, directly add the historical candidate to the fusion motion information candidate list (the historical candidate is different from the fusion motion information candidate by default). ; If the coding mode of the historical candidate is not the inter MVP mode, continue to the next step, that is, check whether it is the same as a fusion motion information candidate in the fusion motion information candidate list obtained in step S8031 (that is, to perform a duplicate check).
如果该历史候选与融合运动信息候选列表的所有重复性检查结果为该历史候选与某个融合运动信息候选相同,则不做任何操作;反之,将该历史候选加入到融合运动信息候选 列表中,例如,将该历史候选加入到融合运动信息候选列表的尾部。If all the repetitive check results of the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
应当理解的是,如果当前历史候选所在的图像块的帧间预测模式与候选运动信息列表中的当前候选项所在的图像块的帧间预测模式中其一是inter MVP模式,较大概率下两者(即当前历史候选和候选运动信息列表中的当前候选项)彼此不同,跳过对两者的重复性检查。It should be understood that if one of the inter prediction mode of the image block where the current historical candidate is located and the inter prediction mode of the image block where the current candidate in the candidate motion information list is the inter MVP mode, the probability of the next two (That is, the current candidate in the current history and the candidate in the candidate motion information list) are different from each other, and skip the repetitive check of the two.
方法四:Method four:
从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于等于0的正整数。以及,对于预定数目B的历史候选中的每个历史候选进行以下操作,预设数目B为大于0的正整数:When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. And, for each historical candidate of the predetermined number B of historical candidates, the following operations are performed, and the preset number B is a positive integer greater than 0:
在检查该历史候选与步骤S8031得到的融合运动信息候选列表中某个融合运动信息候选是否相同(即做重复项检查)前,首先检查该融合运动信息候选和历史候选的编码模式是否均为inter MVP模式。如果两者编码模式均是inter MVP模式,则不需要检查该融合运动信息候选与历史候选是否相同,或在重复性检查中认为这两者不同。反之,两者编码模式中至少一个编码模式不是inter MVP模式,则检查该融合运动信息候选与该历史候选是否相同。Before checking whether the historical candidate is the same as a fusion motion information candidate in the fusion motion information candidate list obtained in step S8031 (that is, to perform a duplicate check), first check whether the coding modes of the fusion motion information candidate and the historical candidate are both inter MVP mode. If both coding modes are inter MVP mode, it is not necessary to check whether the fusion motion information candidate and the historical candidate are the same, or it is considered that the two are different in the repeatability check. Conversely, if at least one of the two encoding modes is not an inter-MVP mode, it is checked whether the fusion motion information candidate is the same as the historical candidate.
如果该历史候选与融合运动信息候选列表的所有重复性检查结果为该历史候选与某个融合运动信息候选相同,则不做任何操作;反之,将该历史候选加入到融合运动信息候选列表中,例如,将该历史候选加入到融合运动信息候选列表的尾部。If all the repetitive check results of the historical candidate and the fused motion information candidate list indicate that the historical candidate is the same as a fused motion information candidate, then no operation is performed; otherwise, the historical candidate is added to the fused motion information candidate list. For example, the history candidate is added to the tail of the fusion motion information candidate list.
应当理解的是,如果当前历史候选所在的图像块的帧间预测模式与候选运动信息列表中的当前候选项所在的图像块的帧间预测模式均是inter MVP模式,大概率下两者(即当前历史候选和候选运动信息列表中的当前候选项)彼此不同,跳过对两者的重复性检查。It should be understood that if the inter-prediction mode of the image block where the current historical candidate is located and the inter-prediction mode of the image block where the current candidate in the candidate motion information list is the inter MVP mode, both (ie The current historical candidates and the current candidates in the candidate motion information list are different from each other, and the repetitive check of the two is skipped.
需要说明的是,该融合运动信息候选的编码模式即该融合运动信息候选所在图像块的帧间预测模式;该历史候选的编码模式即该历史候选所在图像块的帧间预测模式。It should be noted that the coding mode of the fused motion information candidate is the inter prediction mode of the image block where the fused motion information candidate is located; the coding mode of the historical candidate is the inter prediction mode of the image block where the historical candidate is located.
使用历史候选列表对当前图像块的运动矢量预测候选列表进行更新,除了可以对于参考帧索引与目标参考帧索引一致的历史候选执行类似上述过程以外,还可以包括以下方法之一:Using the historical candidate list to update the motion vector prediction candidate list of the current image block, in addition to performing a similar process to the historical candidate whose reference frame index is consistent with the target reference frame index, it may also include one of the following methods:
方法一:method one:
从历史候选列表尾部到头部的顺序检查并添加预设数目P的历史候选,预设数目P为大于0的正整数。从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于等于0的正整数。首先检查历史候选的参考帧索引,只有与 inter MVP模式目标参考帧索引使用相同参考帧索引的历史候选才会进行后续操作,否则不加入。然后检查该历史候选与运动矢量预测候选列表中已有的运动矢量预测候选是否相同,如果该历史候选与运动矢量预测候选列表中已有的运动矢量预测候选不同才会被加入到运动矢量预测候选列表中,否则不加入。The order from the tail to the head of the history candidate list is checked and added to a preset number P of history candidates, and the preset number P is a positive integer greater than 0. When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero. First check the reference frame index of the historical candidate. Only the historical candidate that uses the same reference frame index as the target reference frame index of the inter-MVP mode will perform subsequent operations, otherwise it will not be added. Then check whether the historical candidate is the same as the existing motion vector prediction candidate in the motion vector prediction candidate list. If the historical candidate is different from the existing motion vector prediction candidate in the motion vector prediction candidate list, it will be added to the motion vector prediction candidate. List, otherwise do not join.
方法二:Method Two:
从历史候选列表尾部到头部的顺序检查并添加预设数目P的历史候选,只有与inter MVP模式目标参考帧索引使用相同参考帧索引的历史候选才会被加入到运动矢量预测候选列表中,预设数目P为大于0的正整数。从历史候选列表尾部到头部的顺序检查并添加历史候选时,跳过预设数目Q的历史候选,预设数目Q为大于等于0的正整数。Check and add a preset number of historical candidates in order from the tail to the head of the history candidate list. Only historical candidates that use the same reference frame index as the inter MVP mode target reference frame index will be added to the motion vector prediction candidate list. The preset number P is a positive integer greater than 0. When checking and adding history candidates in order from the tail to the head of the history candidate list, the history candidate with a preset number Q is skipped, and the preset number Q is a positive integer greater than or equal to zero.
方法三:Method three:
不将历史候选列表中的历史候选加入到运动矢量预测候选列表中。The history candidates in the history candidate list are not added to the motion vector prediction candidate list.
需要说明的是,上述将历史候选列表中的历史候选加入到融合运动信息候选列表和运动矢量预测候选列表中,可以放置在时域运动信息候选(时域运动矢量候选)之后,也可以放置在其他位置,本申请实施例不限定具体放置在这两个列表中的位置。It should be noted that the historical candidates in the historical candidate list are added to the fusion motion information candidate list and the motion vector prediction candidate list, and can be placed after the time domain motion information candidate (time domain motion vector candidate), or For other positions, the embodiments of the present application do not limit the positions in the two lists.
需要说明的是,如图11C所示,在历史候选加入到融合运动信息候选列表之后,还可以加入其它类型的融合候选,如双向预测融合候选(bi-predictive merge candidate)和零运动矢量融合候选(zero motion vector merge candidate)。本发明不涉及其它类型的融合候选的加入的过程,该过程可采用HEVC或者VTM中的方法进行,也可采用其他方法。It should be noted that, as shown in FIG. 11C, after the historical candidate is added to the fusion motion information candidate list, other types of fusion candidates may be added, such as bi-predictive merge candidate and zero motion vector fusion candidate. (zero motion vector merge candidate). The present invention does not involve a process of adding other types of fusion candidates, and the process may be performed by a method in HEVC or VTM, or other methods.
S805’、使用当前解码图像块的运动信息对所述历史候选列表进行更新。S805 ': Update the historical candidate list by using the motion information of the currently decoded image block.
例如,如图9和10所示,从历史候选列表头部开始,将当前块的运动信息与历史候选列表中的历史候选进行比较;如有某个历史候选与当前块运动信息相同,将该历史候选从历史候选列表中移除。以及,检查历史候选列表大小,如该列表大小超过预设的大小,则将该列表中位于头部的历史候选移除。并将当前块的运动信息加入到历史候选列表中。但是在本申请实施例二中,需在更新历史候选列表的过程中,记录新加入历史候选所在的图像块的帧间预测模式。换言之,即每个加入到历史候选列表的历史候选项不仅仅只是MV,还包括历史候选项所在的图像块的帧间预测模式。For example, as shown in FIGS. 9 and 10, starting from the head of the historical candidate list, the motion information of the current block is compared with the historical candidates in the historical candidate list; if a historical candidate is the same as the current block motion information, the Historical candidates are removed from the historical candidate list. And, check the size of the historical candidate list. If the list size exceeds a preset size, remove the historical candidate at the head of the list. The motion information of the current block is added to the historical candidate list. However, in the second embodiment of the present application, during the process of updating the historical candidate list, the inter prediction mode of the image block where the new historical candidate is located needs to be recorded. In other words, each historical candidate added to the historical candidate list is not only the MV, but also the inter prediction mode of the image block where the historical candidate is located.
在本申请实施例中,并不限定判断当前块运动信息与历史候选列表中某个历史候选是否相同的方法。可以是两个运动信息完全相同,也可以是两个运动信息在某种处理后相同,例如两个运动矢量右移2位后的结果相同。In the embodiment of the present application, the method for determining whether the current block motion information is the same as a certain historical candidate in the historical candidate list is not limited. It can be that the two pieces of motion information are completely the same, or that the two pieces of motion information are the same after some processing, for example, the results of two motion vectors shifted to the right by 2 bits are the same.
可见,相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K 和L乘以J次重复项查找,本申请实施例中根据历史候选、融合运动信息候选和运动信息预测候选所在图像块的帧间预测模式,在使用历史候选列表构建或更新融合运动信息候选列表或运动矢量预测候选列表的过程中,有选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, compared with the historical candidate list (assuming length L) used in the prior art to construct the fused motion information candidate list (assuming length K) and the motion vector prediction candidate list (assuming length J), it is necessary to multiply L by K Multiply L and J times for repeated item search. In the embodiment of the present application, the historical candidate list is used to construct or update the fused motion information candidate list according to the inter prediction mode of the image block where the historical candidate, the fused motion information candidate and the motion information prediction candidate are located. In the process of motion or motion vector prediction candidate list, the duplicate item check process of some historical candidates can be selectively skipped, which can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number, reducing codec time, which helps to improve the efficiency of inter-frame prediction, thereby improving codec performance.
图11A和图11B示意了在融合运动信息候选列表中加入历史候选(history candidate)的方法,以增加merge/skip的融合运动信息候选的数量,提高了预测效率。加入历史候选的融合运动信息候选列表的构建方式如下:FIG. 11A and FIG. 11B illustrate a method of adding history candidates to the fusion motion information candidate list to increase the number of merged / skip fusion motion information candidates and improve prediction efficiency. The construction method of the fusion motion information candidate list added to the historical candidate is as follows:
步骤1111、1113:将与当前块空域相邻的空域候选者和时域候选者加入当前块的融合运动信息候选列表。Steps 1111 and 1113: Add the spatial domain candidate and the time domain candidate adjacent to the spatial domain of the current block to the fusion motion information candidate list of the current block.
例如,若当前解码图像块(下文简称为当前块)为merge/skip模式,则生成融合运动信息候选列表。若当前CU或当前解码图像块为inter模式,则生成运动矢量预测候选列表。将历史候选列表中的历史候选加入到融合运动信息候选列表或运动矢量预测候选列表中。For example, if the currently decoded image block (hereinafter simply referred to as the current block) is in a merge / skip mode, a fusion motion information candidate list is generated. If the current CU or current decoded image block is in inter mode, a motion vector prediction candidate list is generated. The historical candidates in the historical candidate list are added to the fused motion information candidate list or the motion vector prediction candidate list.
上述若当前块为merge/skip模式,生成融合运动信息候选列表,具体包括:If the current block is in a merge / skip mode, generating a candidate list of fused motion information specifically includes:
将与当前块的空域候选者和时域候选者加入当前块的融合运动信息候选列表中,其方法与HEVC中的方法相同。如图6所示,空间融合候选包含A0、A1、B0、B1和B2,时域融合候选包括T0和T1。在VTM(Versatile video coding Test Model,多用途视频编码测试模型)中,时域融合候选也包括自适应时域运动矢量预测(ATMVP)技术提供的候选运动信息。生成融合运动信息候选列表相关的过程,可采用HEVC或者VTM中的方法进行,也可采用其他生成融合运动信息候选列表的方法,本申请对此不作限定。The spatial and temporal candidates of the current block are added to the fusion motion information candidate list of the current block, and the method is the same as that in HEVC. As shown in FIG. 6, the spatial fusion candidates include A0, A1, B0, B1, and B2, and the time domain fusion candidates include T0 and T1. In VTM (Versatile Video Coding Test Model), the time-domain fusion candidates also include candidate motion information provided by the adaptive time-domain motion vector prediction (ATMVP) technology. The process of generating the candidate list of fused motion information may be performed by a method in HEVC or VTM, or other methods of generating the candidate list of fused motion information, which are not limited in this application.
上述若当前块为inter模式,则生成运动矢量预测候选列表,可采用HEVC(High Efficiency Video Coding,高效视频编码)或者VTM中的方法进行,也可采用其他生成运动矢量预测候选列表的方法,本申请对此不作限定。If the current block is in the inter mode, the motion vector prediction candidate list may be generated by using the method in HEVC (High Efficiency Video Coding) or VTM, or other methods of generating a motion vector prediction candidate list. The application does not limit this.
步骤1131:将历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时,跳过历史候选列表中尾部预设数目Q的历史候选,或根据历史候选、融合运动信息候选和运动信息预测候选的帧间预测模式跳过重复项检查过程,从而减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,细节参见前面实施例的描述,这里不再赘述。Step 1131: When the historical candidate list is added to the fused motion information candidate list or the motion vector prediction candidate list, the historical candidates with a preset number Q at the tail of the historical candidate list are skipped, or the historical candidate, the fused motion information candidate, and the motion information are predicted. The candidate inter prediction mode skips the duplicate item check process, thereby reducing the number of duplicate item check operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. For details, refer to the descriptions of the previous embodiments. To repeat.
步骤1135:加入其它类型的融合运动信息候选,如双向预测候选(bi-predictive candidate)和零运动矢量候选(zero motion vector candidate)。Step 1135: Add other types of fused motion information candidates, such as bi-predictive candidates and zero motion vector candidates.
需要说明的是,候选运动信息列表是图像块级别的(不同的图像块具有与之分别对应的候选运动信息列表),而历史候选表是当前slice或当前图像或者当前一个或多个图像编码单元CTU级别的,换言之,同一个slice下的多个图像块的编码或解码过程中,都可以使用这个不断更新的历史候选列表。It should be noted that the candidate motion information list is at the image block level (different image blocks have corresponding candidate motion information lists respectively), and the historical candidate list is the current slice or current image or the current one or more image coding units At the CTU level, in other words, during the encoding or decoding of multiple image blocks under the same slice, this continuously updated historical candidate list can be used.
图12为本申请实施例中的帧间预测装置1200的一种示意性框图。需要说明的是,帧间预测装置1200既适用于解码视频图像的帧间预测,也适用于编码视频图像的帧间预测,应当理解的是,这里的帧间预测装置1200可以对应于图2中的帧间预测单元43,或者可 以对应于图3中的帧间预测单元82,该帧间预测装置1200可以包括:FIG. 12 is a schematic block diagram of an inter prediction apparatus 1200 according to an embodiment of the present application. It should be noted that the inter prediction device 1200 is applicable to both the inter prediction of decoded video images and the inter prediction of encoded video images. It should be understood that the inter prediction device 1200 here may correspond to FIG. 2 The inter prediction unit 43 may correspond to the inter prediction unit 82 in FIG. 3, and the inter prediction device 1200 may include:
候选运动信息列表确定单元1201,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表,其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数;The candidate motion information list determining unit 1201 is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The order of the historical candidate list from the tail to the head is checked to check whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, the target historical candidate motion information is added to the In the candidate motion information list; the target historical candidate motion information is: historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, where Q is a positive integer;
帧间预测处理单元1202,用于基于所述候选运动信息列表,对所述当前图像块进行帧间预测。例如,这里的帧间预测处理单元1202可以对应于图2中的运动估计单元42和运动补偿单元44,或者可以对应于图3中的运动补偿单元82。The inter prediction processing unit 1202 is configured to perform inter prediction on the current image block based on the candidate motion information list. For example, the inter prediction processing unit 1202 here may correspond to the motion estimation unit 42 and the motion compensation unit 44 in FIG. 2, or may correspond to the motion compensation unit 82 in FIG. 3.
其中,所述目标历史候选运动信息为所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的第X历史候选运动信息,其中,所述第X历史候选运动信息对应的参考帧索引与目标参考帧索引相同。The target historical candidate motion information is X-th historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, and the X-th historical candidate motion information The corresponding reference frame index is the same as the target reference frame index.
其中,所述装置用于解码当前图像块,所述目标参考帧索引是从码流中解析出的当前图像块的参考帧索引。The device is configured to decode a current image block, and the target reference frame index is a reference frame index of the current image block parsed from a code stream.
本申请实施例的帧间预测装置中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元具体1201用于:In the inter prediction apparatus according to the embodiment of the present application, in the aspect of checking whether the target historical candidate motion information and the existing candidate motion information in the candidate motion information list are the same, the candidate motion information list determination unit 1201 is specifically configured to: :
检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
本申请实施例的帧间预测装置中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元1201具体用于:In the inter prediction apparatus according to the embodiment of the present application, in the aspect of checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, the candidate motion information list determination unit 1201 is specifically configured to: :
检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。When the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode, check whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
本申请实施例的帧间预测装置中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元1201具体用于:In the inter prediction apparatus according to the embodiment of the present application, in the aspect of checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, the candidate motion information list determination unit 1201 is specifically configured to: :
检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first frame In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first frame In the case of the inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
本申请实施例的帧间预测装置中,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元1201具体用于:In the inter prediction apparatus according to the embodiment of the present application, in the aspect of checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, the candidate motion information list determination unit 1201 is specifically configured to: :
检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is in the candidate motion information list is The first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
本申请实施例的帧间预测装置中,所述装置用于编码所述当前图像块,所述帧间预测处理单元1202具体用于:In the inter prediction apparatus according to the embodiment of the present application, the apparatus is configured to encode the current image block, and the inter prediction processing unit 1202 is specifically configured to:
根据率失真代价准则从所述候选运动信息列表中确定目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to a rate distortion cost criterion;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
本申请实施例的帧间预测装置中,所述装置用于解码所述当前图像块,所述帧间预测处理单元1202具体用于:In the inter prediction apparatus according to the embodiment of the present application, the apparatus is configured to decode the current image block, and the inter prediction processing unit 1202 is specifically configured to:
根据从码流中解析得到的索引标识,从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to an index identifier parsed from the bitstream, where the index identifier is used to indicate the target candidate motion information in the candidate motion information list;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
可选的,所述装置还包括:Optionally, the device further includes:
更新单元(未示意),用于使用当前图像块的运动信息对所述历史候选列表进行更新。An update unit (not shown) is used to update the historical candidate list by using the motion information of the current image block.
应理解的是,如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,则所述候选运动信息列表为融合运动信息候选列表merge candidate list;It should be understood that if the inter prediction mode of the current image block is a merged merge mode or a skip mode, the candidate motion information list is a merged motion information candidate list merge candidate list;
如果当前图像块的帧间预测模式为运动矢量预测inter MVP模式(高级运动矢量预测模式),则所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list)。If the inter prediction mode of the current image block is a motion vector prediction inter MVP mode (advanced motion vector prediction mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, for example, AMVP candidate list).
本申请实施例的帧间预测装置的细节可参考前述方法实施例,这里不再赘述。For details of the inter prediction apparatus in the embodiment of the present application, refer to the foregoing method embodiments, and details are not described herein again.
可见,本申请实施例的帧间预测装置中,考虑到历史候选列表中最新的Q个历史候选较大概率可能与候选运动信息列表中已有候选运动信息重复,使用历史候选列表构建或更新当前图像块的候选运动信息列表的过程中,跳过最新加入的Q个历史候选运动信息,比如,如果当前解码图像块的帧间预测模式为skip/merge模式,在使用历史候选列表构造融合运动信息候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;如果当前解码图像块的帧间预测模式为inter MVP模式,在使用历史候选列表构造运动矢量预测候选列表时,跳过从尾部到头部的顺序排列的Q个历史候选;相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K和L乘以J次重复项查找,本申请能在具有相当的编码效率的前提下,减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, in the inter prediction apparatus according to the embodiment of the present application, considering that the latest Q historical candidates in the historical candidate list may have a higher probability than existing candidate motion information in the candidate motion information list, the historical candidate list is used to construct or update the current In the process of candidate motion information list of image blocks, the latest Q historical candidate motion information is skipped. For example, if the inter prediction mode of the currently decoded image block is skip / merge mode, the fusion motion information is constructed using the historical candidate list. In the candidate list, skip the Q historical candidates arranged in order from the tail to the head; if the inter prediction mode of the currently decoded image block is the inter MVP mode, when using the historical candidate list to construct the motion vector prediction candidate list, skip Q historical candidates arranged in order from the tail to the head; compared with the historical candidate list (assuming length L) is used in the prior art to construct a fusion motion information candidate list (assuming length K) and a motion vector prediction candidate list (assuming When the length is J), it needs L times K and L times J times to search for duplicates. Under the premise of encoding efficiency, the number of duplicate entry checking operations when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list is reduced, and the encoding and decoding time is reduced, thereby helping to improve the efficiency of inter prediction and thereby improve Codec performance.
图13为本申请实施例中的帧间预测装置1300的一种示意性框图。需要说明的是,帧间预测装置1300既适用于解码视频图像的帧间预测,也适用于编码视频图像的帧间预测,应当理解的是,这里的帧间预测装置1300可以对应于图2中的帧间预测单元43,或者可以对应于图3中的帧间预测单元82,该帧间预测装置1300可以包括:FIG. 13 is a schematic block diagram of an inter prediction apparatus 1300 in an embodiment of the present application. It should be noted that the inter prediction device 1300 is applicable to both the inter prediction of decoded video images and the inter prediction of encoded video images. It should be understood that the inter prediction device 1300 here may correspond to FIG. 2 The inter prediction unit 43 may correspond to the inter prediction unit 82 in FIG. 3, and the inter prediction device 1300 may include:
候选运动信息列表确定单元1301,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表;其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数;The candidate motion information list determining unit 1301 is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block; wherein, using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The inter prediction mode of the image block where the current historical candidate motion information HMVP in the historical candidate list is located and / or the inter prediction mode of the image block where the existing candidate motion information candidate in the candidate motion information list is determined whether to execute Repeatability check, and determine whether to add the current historical candidate motion information HMVP to the candidate motion information list according to the repeatability check result of the current historical candidate motion information HMVP and M existing candidate motion information in the candidate motion information list Wherein M is an integer greater than or equal to 0;
帧间预测处理单元1302,用于基于所述候选运动信息列表,对所述当前图像块进行帧间预测。例如,这里的帧间预测处理单元1202可以对应于图2中的运动估计单元42和运动补偿单元44,或者可以对应于图3中的运动补偿单元82。The inter prediction processing unit 1302 is configured to perform inter prediction on the current image block based on the candidate motion information list. For example, the inter prediction processing unit 1202 here may correspond to the motion estimation unit 42 and the motion compensation unit 44 in FIG. 2, or may correspond to the motion compensation unit 82 in FIG. 3.
本申请实施例的帧间预测装置中,所述候选运动信息列表确定单元1301具体用于:In the inter prediction apparatus according to the embodiment of the present application, the candidate motion information list determination unit 1301 is specifically configured to:
检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode;
在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
本申请实施例的帧间预测装置中,所述候选运动信息列表确定单元1301具体用于:In the inter prediction apparatus according to the embodiment of the present application, the candidate motion information list determination unit 1301 is specifically configured to:
检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode, check whether the current historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
本申请实施例的帧间预测装置中,所述候选运动信息列表确定单元1301具体用于:In the inter prediction apparatus according to the embodiment of the present application, the candidate motion information list determination unit 1301 is specifically configured to:
检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且在所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the current candidate motion information.
本申请实施例的帧间预测装置中,所述候选运动信息列表确定单元1301具体用于:In the inter prediction apparatus according to the embodiment of the present application, the candidate motion information list determination unit 1301 is specifically configured to:
检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is The first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模 式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
本申请实施例的帧间预测装置中,所述装置用于编码所述当前图像块,所述帧间预测处理单元1302具体用于:In the inter prediction apparatus according to the embodiment of the present application, the apparatus is configured to encode the current image block, and the inter prediction processing unit 1302 is specifically configured to:
根据率失真代价准则从所述候选运动信息列表中确定目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to a rate distortion cost criterion;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
本申请实施例的帧间预测装置中,所述装置用于解码所述当前图像块,所述帧间预测处理单元1302具体用于:In the inter prediction apparatus according to the embodiment of the present application, the apparatus is configured to decode the current image block, and the inter prediction processing unit 1302 is specifically configured to:
根据从码流中解析得到的索引标识,从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to an index identifier parsed from the bitstream, where the index identifier is used to indicate the target candidate motion information in the candidate motion information list;
基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
可选的,所述装置还包括:Optionally, the device further includes:
更新单元(未示意),用于使用当前图像块的运动信息对所述历史候选列表进行更新。An update unit (not shown) is used to update the historical candidate list by using the motion information of the current image block.
应理解的是,如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,则所述候选运动信息列表为融合运动信息候选列表merge candidate list;It should be understood that if the inter prediction mode of the current image block is a merged merge mode or a skip mode, the candidate motion information list is a merged motion information candidate list merge candidate list;
如果当前图像块的帧间预测模式为运动矢量预测inter MVP模式(高级运动矢量预测模式),则所述候选运动信息列表为运动矢量预测候选列表(MVP candidate list,例如AMVP candidate list)。If the inter prediction mode of the current image block is a motion vector prediction inter MVP mode (advanced motion vector prediction mode), the candidate motion information list is a motion vector prediction candidate list (MVP candidate list, for example, AMVP candidate list).
本申请实施例的帧间预测装置的细节可参考前述方法实施例,这里不再赘述。For details of the inter prediction apparatus in the embodiment of the present application, refer to the foregoing method embodiments, and details are not described herein again.
可见,本申请实施例的装置中,相对于现有技术中使用历史候选列表(假设长度为L)构造融合运动信息候选列表(假设长度为K)和运动矢量预测候选列表(假设长度为J)时,分别需要L乘以K和L乘以J次重复项查找,本申请实施例中根据历史候选、融合运动信息候选和/或运动信息预测候选所在图像块的帧间预测模式(例如,针对inter MVP模式,周围块运动矢量作为预测值且在预测值的基础上加上MVD作为运动矢量,这样的话,运动矢量会和预测值不同),在使用历史候选列表构建或更新融合运动信息候选列表或运动矢量预测候选列表的过程中,有选择性跳过部分历史候选的重复项检查过程,从而能进一步减少历史候选列表加入融合运动信息候选列表或运动矢量预测候选列表中时重复项检查操作的数目,降低编解码时间,从而有助于提高帧间预测效率,从而提高编解码性能。It can be seen that, in the device of the embodiment of the present application, compared with the historical candidate list (assuming length L) in the prior art, a fusion motion information candidate list (assuming length K) and a motion vector prediction candidate list (assuming length J) are constructed. In this embodiment, L times K and L times J repeated item searches are required. In the embodiment of the present application, the inter prediction mode of the image block where the candidate is located is predicted based on historical candidates, fusion motion information candidates, and / or motion information (for example, for inter MVP mode, the surrounding block motion vector is used as the predicted value, and the MVD is added as the motion vector based on the predicted value. In this case, the motion vector will be different from the predicted value.) The historical candidate list is used to construct or update the fusion motion information candidate list. In the process of motion or motion vector prediction candidate list, the duplicate item check process of some historical candidates can be selectively skipped, which can further reduce the duplicate item check operation when the historical candidate list is added to the fusion motion information candidate list or the motion vector prediction candidate list. Number, reducing codec time, which helps to improve inter prediction efficiency Code performance.
图14为本申请实施例的编码设备或解码设备(简称为译码设备1400)的一种实现方式的示意性框图。其中,译码设备1400可以包括处理器1410、存储器1430和总线系统1450。其中,处理器和存储器通过总线系统相连,该存储器用于存储指令,该处理器用于执行该存储器存储的指令。编码设备的存储器存储程序代码,且处理器可以调用存储器中存储的程序代码执行本申请描述的各种视频编码或解码方法,尤其是在各种帧间预测模式或帧内预测模式下的视频编码或解码方法,以及在各种帧间或帧内预测模式下预测运动信息的方法。为避免重复,这里不再详细描述。FIG. 14 is a schematic block diagram of an implementation manner of an encoding device or a decoding device (referred to as a decoding device 1400) according to an embodiment of the present application. The decoding device 1400 may include a processor 1410, a memory 1430, and a bus system 1450. The processor and the memory are connected through a bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. The memory of the encoding device stores program code, and the processor can call the program code stored in the memory to perform various video encoding or decoding methods described in this application, especially video encoding in various inter prediction modes or intra prediction modes. Or decoding methods, and methods for predicting motion information in various inter or intra prediction modes. To avoid repetition, it will not be described in detail here.
在本申请实施例中,该处理器1410可以是中央处理单元(Central Processing Unit,简称为“CPU”),该处理器1410还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In the embodiment of the present application, the processor 1410 may be a Central Processing Unit (“CPU”), and the processor 1410 may also be another general-purpose processor, digital signal processor (DSP), or special-purpose integration. Circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
该存储器1430可以包括只读存储器(ROM)设备或者随机存取存储器(RAM)设备。任何其他适宜类型的存储设备也可以用作存储器1430。存储器1430可以包括由处理器1410使用总线1450访问的代码和数据1431。存储器1430可以进一步包括操作系统1433和应用程序1435,该应用程序1435包括允许处理器1410执行本申请描述的视频编码或解码方法(尤其是本申请描述的帧间预测方法)的至少一个程序。例如,应用程序1435可以包括应用1至N,其进一步包括执行在本申请描述的视频编码或解码方法的视频编码或解码应用(简称视频译码应用)。The memory 1430 may include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may also be used as the memory 1430. The memory 1430 may include code and data 1431 accessed by the processor 1410 using the bus 1450. The memory 1430 may further include an operating system 1433 and an application program 1435. The application program 1435 includes at least one program that allows the processor 1410 to perform the video encoding or decoding method described in this application (especially the inter prediction method described in this application). For example, the application programs 1435 may include applications 1 to N, which further include a video encoding or decoding application (referred to as a video decoding application) that executes the video encoding or decoding method described in this application.
该总线系统1450除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统1450。The bus system 1450 may include a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are marked as the bus system 1450 in the figure.
可选的,译码设备1400还可以包括一个或多个输出设备,诸如显示器1470。在一个示例中,显示器1470可以是触感显示器或触摸显示屏,其将显示器与可操作地感测触摸输入的触感单元合并。显示器1470可以经由总线1450连接到处理器1410。Optionally, the decoding device 1400 may further include one or more output devices, such as a display 1470. In one example, the display 1470 may be a touch-sensitive display or a touch display, which incorporates the display with a touch-sensitive unit that is operable to sense a touch input. The display 1470 may be connected to the processor 1410 via a bus 1450.
本领域技术人员能够领会,结合本文公开描述的各种说明性逻辑框、单元和算法步骤所描述的功能可以硬件、软件、固件或其任何组合来实施。如果以软件来实施,那么各种说明性逻辑框、单元、和步骤描述的功能可作为一或多个指令或代码在计算机可读媒体上存储或传输,且由基于硬件的处理单元执行。计算机可读媒体可包含计算机可读存储媒体,其对应于有形媒体,例如数据存储媒体,或包括任何促进将计算机程序从一处传送到另一处的媒体(例如,根据通信协议)的通信媒体。以此方式,计算机可读媒体大体上可对应于(1)非暂时性的有形计算机可读存储媒体,或(2)通信媒体,例如信号或载波。数据存储媒体可为可由一或多个计算机或一或多个处理器存取以检索用于实施本申请中描述的技术的指令、代码和/或数据结构的任何可用媒体。计算机程序产品可包含计算机可读媒体。Those skilled in the art can appreciate that the functions described in connection with the various illustrative logical blocks, units and algorithm steps disclosed in the present disclosure may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described by the various illustrative logical boxes, units, and steps may be stored or transmitted as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another (e.g., according to a communication protocol) . In this manner, computer-readable media may generally correspond to (1) tangible computer-readable storage media that is non-transitory, or (2) a communication medium such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures used to implement the techniques described in this application. The computer program product may include a computer-readable medium.
作为实例而非限制,此类计算机可读存储媒体可包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储装置、磁盘存储装置或其它磁性存储装置、快闪存储器或可用来存储指令或数据结构的形式的所要程序代码并且可由计算机存取的任何其它媒体。并且,任何连接被恰当地称作计算机可读媒体。举例来说,如果使用同轴缆线、光纤缆线、双绞线、数字订户线(DSL)或例如红外线、无线电和微波等无线技术从网站、服务器或其它远程源传输指令,那么同轴缆线、光纤缆线、双绞线、DSL或例如红外线、无线电和微波等无线技术包含在媒体的定义中。但是,应理解,所述计算机可读存储媒体和数据存储媒体并不包括连接、载波、信号或其它暂时媒体,而是实际上针对于非暂时性有形存储媒体。如本文中所使用,磁盘和光盘包含压缩光盘(CD)、激光光盘、光学光盘、数字多功能光盘(DVD)和蓝光光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光以光学方式再现数据。以上各项的组合也应包含在计算机可读媒体的范围内。By way of example, and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or may be used to store instructions or data structures Any form of desired program code and any other medium accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, a coaxial cable is used to transmit instructions from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave. Wire, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of media. It should be understood, however, that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other temporary media, but are instead directed to non-transitory tangible storage media. As used herein, magnetic disks and compact discs include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, and optical discs use lasers to reproduce optically data. Combinations of the above should also be included within the scope of computer-readable media.
可通过例如一或多个数字信号处理器(DSP)、通用微处理器、专用集成电路(ASIC)、现场可编程逻辑阵列(FPGA)或其它等效集成或离散逻辑电路等一或多个处理器来执行相应的功能。因此,如本文中所使用的术语“处理器”可指前述结构或适合于实施本文中所描述的技术的任一其它结构中的任一者。另外,在一些方面中,本文中所描述的各种说明性逻辑框、单元、和步骤所描述的功能可以提供于经配置以用于编码和解码的专用硬件和/或软件单元内,或者并入在组合编解码器中。而且,所述技术可完全实施于一或多个电 路或逻辑元件中。在一种示例下,视频编码器20及视频解码器30中的各种说明性逻辑框、单元、单元可以理解为对应的电路器件或逻辑元件。Can be processed by one or more, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits To perform the corresponding function. Accordingly, the term "processor" as used herein may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logical blocks, units, and steps described herein may be provided within dedicated hardware and / or software units configured for encoding and decoding, or Into the combined codec. Moreover, the techniques can be fully implemented in one or more circuits or logic elements. In one example, various illustrative logical boxes, units, and units in the video encoder 20 and the video decoder 30 can be understood as corresponding circuit devices or logic elements.
本申请的技术可在各种各样的装置或设备中实施,包含无线手持机、集成电路(IC)或一组IC(例如,芯片组)。本申请中描述各种组件、单元或单元是为了强调用于执行所揭示的技术的装置的功能方面,但未必需要由不同硬件单元实现。实际上,如上文所描述,各种单元可结合合适的软件和/或固件组合在编码解码器硬件单元中,或者通过互操作硬件单元(包含如上文所描述的一或多个处理器)来提供。The techniques of this application may be implemented in a wide variety of devices or devices, including a wireless handset, an integrated circuit (IC), or a group of ICs (eg, a chipset). Various components, units, or units are described in this application to emphasize functional aspects of the apparatus for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in a codec hardware unit in combination with suitable software and / or firmware, or through interoperable hardware units (including one or more processors as described above) provide.
以上所述,仅为本申请示例性的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。The above description is only an exemplary specific implementation of the present application, but the scope of protection of the present application is not limited to this. Any person skilled in the art can easily think of changes or changes within the technical scope disclosed in this application. Replacement shall be covered by the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (34)

  1. 一种帧间预测方法,其特征在于,所述方法包括:An inter prediction method, characterized in that the method includes:
    使用历史候选列表构建或更新当前图像块的候选运动信息列表;Use the historical candidate list to construct or update the candidate motion information list of the current image block;
    基于所述候选运动信息列表,对所述当前图像块进行帧间预测;Performing inter prediction on the current image block based on the candidate motion information list;
    其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数。Wherein, the use of the historical candidate list to construct or update the candidate motion information list of the current image block includes: ordering from the tail to the head of the historical candidate list, checking the target historical candidate motion information and the candidate motion information list. Whether the existing candidate motion information is the same; if different, the target historical candidate motion information is added to the candidate motion information list; the target historical candidate motion information is: from the tail to the head in the historical candidate list The historical candidate motion information other than the Q historical candidate motion information arranged in the order of Q is a positive integer.
  2. 根据权利要求1所述的方法,其特征在于,所述目标历史候选运动信息为所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的第X历史候选运动信息,其中,所述第X历史候选运动信息对应的参考帧索引与目标参考帧索引相同。The method according to claim 1, wherein the target historical candidate motion information is X-th historical candidate motion information other than Q historical candidate motion information arranged in order from tail to head in the historical candidate list. , Wherein the reference frame index corresponding to the X-th historical candidate motion information is the same as the target reference frame index.
  3. 根据权利要求2所述的方法,其特征在于,所述方法用于解码当前图像块,所述目标参考帧索引是从码流中解析出的当前图像块的参考帧索引。The method according to claim 2, wherein the method is used to decode a current image block, and the target reference frame index is a reference frame index of the current image block parsed from a code stream.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:The method according to any one of claims 1 to 3, wherein the checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, includes:
    检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  5. 根据权利要求1至3任一项所述的方法,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:The method according to any one of claims 1 to 3, wherein the checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, includes:
    检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。When the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode, check whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  6. 根据权利要求1至3任一项所述的方法,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:The method according to any one of claims 1 to 3, wherein the checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, includes:
    检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测 模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first frame In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first frame In the case of the inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  7. 根据权利要求1至3任一项所述的方法,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同,包括:The method according to any one of claims 1 to 3, wherein the checking whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list, includes:
    检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is in the candidate motion information list is The first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法用于编码所述当前图像块,所述基于所述候选运动信息列表,对当前图像块执行帧间预测,包括:The method according to any one of claims 1 to 7, wherein the method is used to encode the current image block, and performing inter prediction on the current image block based on the candidate motion information list includes: :
    根据率失真代价准则从所述候选运动信息列表中确定目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to a rate distortion cost criterion;
    基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
    基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
  9. 根据权利要求1至7任一项所述的方法,其特征在于,所述方法用于解码所述当前图像块,所述基于所述候选运动信息列表,对当前图像块执行帧间预测,包括:The method according to any one of claims 1 to 7, wherein the method is used to decode the current image block, and performing inter prediction on the current image block based on the candidate motion information list includes: :
    根据从码流中解析得到的索引标识,从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to an index identifier parsed from the bitstream, where the index identifier is used to indicate the target candidate motion information in the candidate motion information list;
    基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
    基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
  10. 根据权利要求8或9所述的方法,其特征在于,所述方法还包括:使用当前图像块的运动信息对所述历史候选列表进行更新。The method according to claim 8 or 9, further comprising: updating the historical candidate list using motion information of a current image block.
  11. 根据权利要求1至10任一项所述的方法,其特征在于,如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,则所述候选运动信息列表为融合运动信息候选列表merge candidate list;The method according to any one of claims 1 to 10, wherein if the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a fusion motion information candidate list merge candidate list
    如果当前图像块的帧间预测模式为帧间运动矢量预测inter MVP模式,则所述候选运动信息列表为运动矢量预测候选列表MVP candidate list。If the inter prediction mode of the current image block is an inter motion vector prediction inter MVP mode, the candidate motion information list is a motion vector prediction candidate list MVP candidate list.
  12. 一种帧间预测方法,其特征在于,所述方法包括:An inter prediction method, characterized in that the method includes:
    使用历史候选列表构建或更新当前图像块的候选运动信息列表;Use the historical candidate list to construct or update the candidate motion information list of the current image block;
    基于所述候选运动信息列表,对所述当前图像块进行帧间预测;Performing inter prediction on the current image block based on the candidate motion information list;
    其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:Wherein, using the historical candidate list to construct or update the candidate motion information list of the current image block includes:
    根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数。Determined according to the inter prediction mode of the image block where the current historical candidate motion information HMVP in the historical candidate list is located and / or the inter prediction mode of the image block where the candidate motion information candidate in the candidate motion information list is located Whether to perform a repetitive check, and determine whether to add the current historical candidate motion information HMVP to the candidate motion according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list In the information list, M is an integer greater than or equal to 0.
  13. 根据权利要求12所述的方法,其特征在于,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:The method according to claim 12, wherein the inter-prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or the existing prediction motion information in the candidate motion information list The inter prediction mode of the image block where candidate motion information candidate is located determines whether to perform a repetitive check, and based on the current historical candidate motion information HMVP and the repetitive check results of M existing candidate motion information in the candidate motion information list To determine whether to add the current historical candidate motion information HMVP to the candidate motion information list, including:
    检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  14. 根据权利要求12所述的方法,其特征在于,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:The method according to claim 12, wherein the inter-prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or the existing prediction motion information in the candidate motion information list The inter prediction mode of the image block where candidate motion information candidate is located determines whether to perform a repetitive check, and based on the current historical candidate motion information HMVP and the repetitive check results of M existing candidate motion information in the candidate motion information list To determine whether to add the current historical candidate motion information HMVP to the candidate motion information list, including:
    检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode, check whether the current historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  15. 根据权利要求12所述的方法,其特征在于,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:The method according to claim 12, wherein the inter-prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or the existing prediction motion information in the candidate motion information list The inter prediction mode of the image block where candidate motion information candidate is located determines whether to perform a repetitive check, and based on the current historical candidate motion information HMVP and the repeatability check results of M existing candidate motion information in the candidate motion information list To determine whether to add the current historical candidate motion information HMVP to the candidate motion information list, including:
    检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且在所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the current candidate motion information.
  16. 根据权利要求12所述的方法,其特征在于,其特征在于,所述根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,包括:The method according to claim 12, wherein the inter prediction mode and / or the candidate motion information of the image block where the current historical candidate motion information HMVP in the historical candidate list is located The inter prediction mode of the image block where the existing candidate motion information candidate is in the list determines whether to perform a repetitive check, and according to the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list, The result of the repetitive check to determine whether to add the current historical candidate motion information HMVP to the candidate motion information list includes:
    检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is The first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  17. 一种帧间预测装置,其特征在于,所述装置包括:An inter prediction device, characterized in that the device includes:
    候选运动信息列表确定单元,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表,其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:从所述历史候选列表尾部到头部的顺序,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同;如果不同,则将所述目标历史候选运动信息加入到所述候选运动信息列表中;所述目标历史候选运动信息为:所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的历史候选运动信息,Q为正整数;The candidate motion information list determination unit is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The order from the tail to the head of the historical candidate list is to check whether the target historical candidate motion information is the same as the existing candidate motion information in the candidate motion information list; if they are different, add the target historical candidate motion information to the candidate In the motion information list; the target historical candidate motion information is: historical candidate motion information other than the Q historical candidate motion information arranged in order from the tail to the head in the historical candidate list, where Q is a positive integer;
    帧间预测处理单元,用于基于所述候选运动信息列表,对所述当前图像块进行帧间预测。An inter prediction processing unit is configured to perform inter prediction on the current image block based on the candidate motion information list.
  18. 根据权利要求17所述的装置,其特征在于,所述目标历史候选运动信息为所述历史候选列表中从尾部到头部的顺序排列的Q个历史候选运动信息以外的第X历史候选运动信息,其中,所述第X历史候选运动信息对应的参考帧索引与目标参考帧索引相同。The device according to claim 17, wherein the target historical candidate motion information is X-th historical candidate motion information other than Q historical candidate motion information arranged in order from tail to head in the historical candidate list. , Wherein the reference frame index corresponding to the X-th historical candidate motion information is the same as the target reference frame index.
  19. 根据权利要求18所述的装置,其特征在于,所述装置用于解码当前图像块,The apparatus according to claim 18, wherein the apparatus is configured to decode a current image block,
    所述目标参考帧索引是从码流中解析出的当前图像块的参考帧索引。The target reference frame index is a reference frame index of the current image block parsed from the code stream.
  20. 根据权利要求17至19任一项所述的装置,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元具体用于:The apparatus according to any one of claims 17 to 19, wherein the aspect of checking whether the target historical candidate motion information and the existing candidate motion information in the candidate motion information list are the same, the candidate motion information The list determination unit is specifically used for:
    检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  21. 根据权利要求17至19任一项所述的装置,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元具体用于:The apparatus according to any one of claims 17 to 19, wherein the aspect of checking whether the target historical candidate motion information and the existing candidate motion information in the candidate motion information list are the same, the candidate motion information The list determination unit is specifically used for:
    检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。When the inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode, check whether the target historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  22. 根据权利要求17至19任一项所述的装置,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动 信息列表确定单元具体用于:The apparatus according to any one of claims 17 to 19, wherein the aspect of checking whether the target historical candidate motion information and the existing candidate motion information in the candidate motion information list are the same, the candidate motion information The list determination unit is specifically used for:
    检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述目标历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the target historical candidate motion information is located is a first inter prediction mode, adding the target historical candidate motion information to the candidate motion information list;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first frame In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。The inter prediction mode of the image block where the target historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first frame In the case of the inter prediction mode, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  23. 根据权利要求17至19任一项所述的装置,其特征在于,其特征在于,所述检查目标历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同的方面,所述候选运动信息列表确定单元具体用于:The apparatus according to any one of claims 17 to 19, wherein the aspect of checking whether the historical candidate motion information of the target is the same as the existing candidate motion information in the candidate motion information list, so The candidate motion information list determination unit is specifically configured to:
    检查所述目标历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the target historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is in the candidate motion information list is The first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述目标历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查目标历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the target historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the target historical candidate motion information is the same as the current candidate motion information.
  24. 根据权利要求17至23任一项所述的装置,其特征在于,所述装置用于编码所述当前图像块,所述帧间预测处理单元具体用于:The apparatus according to any one of claims 17 to 23, wherein the apparatus is configured to encode the current image block, and the inter prediction processing unit is specifically configured to:
    根据率失真代价准则从所述候选运动信息列表中确定目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to a rate distortion cost criterion;
    基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
    基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
  25. 根据权利要求17至23任一项所述的装置,其特征在于,所述装置用于解码所述当前图像块,所述帧间预测处理单元具体用于:The apparatus according to any one of claims 17 to 23, wherein the apparatus is configured to decode the current image block, and the inter prediction processing unit is specifically configured to:
    根据从码流中解析得到的索引标识,从所述候选运动信息列表中确定目标候选运动信息,所述索引标识用于指示所述候选运动信息列表中的目标候选运动信息;Determining target candidate motion information from the candidate motion information list according to an index identifier parsed from the bitstream, where the index identifier is used to indicate the target candidate motion information in the candidate motion information list;
    基于所述目标候选运动信息预测当前图像块的运动信息;Predicting motion information of a current image block based on the target candidate motion information;
    基于当前图像块的运动信息执行运动补偿,得到当前图像块的预测像素值。Perform motion compensation based on the motion information of the current image block to obtain a predicted pixel value of the current image block.
  26. 根据权利要求24或25所述的装置,其特征在于,所述装置还包括:The device according to claim 24 or 25, wherein the device further comprises:
    更新单元,用于使用当前图像块的运动信息对所述历史候选列表进行更新。An update unit is configured to update the historical candidate list by using the motion information of the current image block.
  27. 根据权利要求17至26任一项所述的装置,其特征在于,如果当前图像块的帧间预测模式为融合merge模式或跳过skip模式,则所述候选运动信息列表为融合运动信息候选列表merge candidate list;The apparatus according to any one of claims 17 to 26, wherein if the inter prediction mode of the current image block is a merge merge mode or a skip skip mode, the candidate motion information list is a fusion motion information candidate list merge candidate list
    如果当前图像块的帧间预测模式为帧间运动矢量预测inter MVP模式,则所述候选运动信息列表为运动矢量预测候选列表MVP candidate list。If the inter prediction mode of the current image block is an inter motion vector prediction inter MVP mode, the candidate motion information list is a motion vector prediction candidate list MVP candidate list.
  28. 一种帧间预测装置,其特征在于,所述装置包括:An inter prediction device, characterized in that the device includes:
    候选运动信息列表确定单元,用于使用历史候选列表构建或更新当前图像块的候选运动信息列表;其中,所述使用历史候选列表构建或更新当前图像块的候选运动信息列表,包括:根据所述历史候选列表中的当前历史候选运动信息HMVP所在的图像块的帧间预测模式和/或所述候选运动信息列表中的已有候选运动信息candidate所在的图像块的帧间预测模式确定是否执行重复性检查,并根据当前历史候选运动信息HMVP和所述候选运动信息列表中的M个已有候选运动信息的重复性检查结果,确定是否将当前历史候选运动信息HMVP加入所述候选运动信息列表中,所述M为大于或等于0的整数;The candidate motion information list determining unit is configured to use the historical candidate list to construct or update the candidate motion information list of the current image block, wherein the using the historical candidate list to construct or update the candidate motion information list of the current image block includes: The inter prediction mode of the image block where the current historical candidate motion information HMVP is located in the historical candidate list and / or the inter prediction mode of the image block where the existing candidate motion information candidate in the candidate motion information list is located determines whether to perform repetition And check whether the current historical candidate motion information HMVP is added to the candidate motion information list according to the repetitive check result of the current historical candidate motion information HMVP and the M existing candidate motion information in the candidate motion information list. , Where M is an integer greater than or equal to 0;
    帧间预测处理单元,用于基于所述候选运动信息列表,对所述当前图像块进行帧间预测。An inter prediction processing unit is configured to perform inter prediction on the current image block based on the candidate motion information list.
  29. 根据权利要求28所述的装置,其特征在于,所述候选运动信息列表确定单元具体用于:The apparatus according to claim 28, wherein the candidate motion information list determining unit is specifically configured to:
    检查所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;When the inter prediction mode of the image block where the current candidate motion information is located is the first inter prediction mode, check the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is located Whether it is the first inter prediction mode;
    在所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  30. 根据权利要求28所述的装置,其特征在于,所述候选运动信息列表确定单元具体用于:The apparatus according to claim 28, wherein the candidate motion information list determining unit is specifically configured to:
    检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述候选运动信息列表中的已有候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode, check whether the current historical candidate motion information is the same as existing candidate motion information in the candidate motion information list .
  31. 根据权利要求28所述的装置,其特征在于,所述候选运动信息列表确定单元具体用于:The apparatus according to claim 28, wherein the candidate motion information list determining unit is specifically configured to:
    检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Checking whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,将所述当前历史候选运动信息加入到所述候选运动信息列表中;If the inter prediction mode of the image block where the current historical candidate motion information is located is a first inter prediction mode, adding the current historical candidate motion information to the candidate motion information list;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且在所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;The inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first In the case of an inter prediction mode, checking whether the inter prediction mode of an image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式且所述当前候选运动信息所在的图像块的帧间预测模式不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。When the inter prediction mode of the image block where the current historical candidate motion information is located is not the first inter prediction mode and the inter prediction mode of the image block where the current candidate motion information is located is not the first inter prediction mode To check whether the current historical candidate motion information is the same as the current candidate motion information.
  32. 根据权利要求28所述的装置,其特征在于,其特征在于,所述候选运动信息列表确定单元具体用于:The apparatus according to claim 28, wherein the candidate motion information list determining unit is specifically configured to:
    检查所述当前历史候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式,以及所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;Check whether the inter prediction mode of the image block where the current historical candidate motion information is located is the first inter prediction mode, and whether the inter prediction mode of the image block where the current candidate motion information is located in the candidate motion information list is The first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式均为第一帧间预测模式的情况下,检查所述候选运动信息列表中的下一个候选运动信息所在的图像块的帧间预测模式是否为第一帧间预测模式;In a case where the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is the first inter prediction mode To check whether the inter prediction mode of the image block where the next candidate motion information in the candidate motion information list is the first inter prediction mode;
    在所述当前历史候选运动信息所在的图像块的帧间预测模式和所述候选运动信息列表中的当前候选运动信息所在的图像块的帧间预测模式中至少一个不是第一帧间预测模式的情况下,检查当前历史候选运动信息与所述当前候选运动信息是否相同。At least one of the inter prediction mode of the image block where the current historical candidate motion information is located and the inter prediction mode of the image block where the current candidate motion information in the candidate motion information list is not the first inter prediction mode In the case, it is checked whether the current historical candidate motion information is the same as the current candidate motion information.
  33. 一种视频编码器,其特征在于,所述视频编码器用于编码图像块,包括:A video encoder, characterized in that the video encoder is used to encode an image block and includes:
    如权利要求17至32任一项所述的帧间预测装置,其中所述帧间预测装置用于基于目标候选运动信息预测当前编码图像块的运动信息,基于所述当前编码图像块的运动信息确定所述当前编码图像块的预测像素值;The inter prediction device according to any one of claims 17 to 32, wherein the inter prediction device is configured to predict motion information of a currently-encoded image block based on target candidate motion information, and based on the motion information of the currently-encoded image block Determining a predicted pixel value of the currently encoded image block;
    熵编码模块,用于将所述目标候选运动信息的索引标识编入码流,所述索引标识指示用于所述当前编码图像块的所述目标候选运动信息;An entropy encoding module, configured to encode an index identifier of the target candidate motion information into a code stream, where the index identifier indicates the target candidate motion information for the currently encoded image block;
    重建模块,用于基于所述预测像素值重建所述当前编码图像块。A reconstruction module, configured to reconstruct the current encoded image block based on the predicted pixel value.
  34. 一种视频解码器,其特征在于,所述视频解码器用于从码流中解码出图像块,包括:A video decoder, characterized in that the video decoder is used to decode an image block from a code stream, including:
    熵解码模块,用于从码流中解码出索引标识,所述索引标识用于指示当前解码图像块的目标候选运动信息;An entropy decoding module, configured to decode an index identifier from a code stream, where the index identifier is used to indicate target candidate motion information of a currently decoded image block;
    如权利要求17至32任一项所述的帧间预测装置,所述帧间预测装置用于基于所述索 引标识指示的目标候选运动信息预测当前解码图像块的运动信息,基于所述当前解码图像块的运动信息确定所述当前解码图像块的预测像素值;The inter prediction device according to any one of claims 17 to 32, wherein the inter prediction device is configured to predict motion information of a currently decoded image block based on target candidate motion information indicated by the index identifier, and based on the current decoding Motion information of an image block determines a predicted pixel value of the currently decoded image block;
    重建模块,用于基于所述预测像素值重建所述当前解码图像块。A reconstruction module, configured to reconstruct the current decoded image block based on the predicted pixel value.
PCT/CN2018/104430 2018-09-05 2018-09-06 Inter prediction method and apparatus, and codec WO2020047807A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811034294.4 2018-09-05
CN201811034294 2018-09-05

Publications (1)

Publication Number Publication Date
WO2020047807A1 true WO2020047807A1 (en) 2020-03-12

Family

ID=69722114

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/104430 WO2020047807A1 (en) 2018-09-05 2018-09-06 Inter prediction method and apparatus, and codec

Country Status (1)

Country Link
WO (1) WO2020047807A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11070796B2 (en) 2018-09-28 2021-07-20 Qualcomm Incorporated Ultimate motion vector expression based pruning for video coding
US11140412B2 (en) * 2019-02-17 2021-10-05 Beijing Bytedance Network Technology Co., Ltd. Motion candidate list construction for intra block copy (IBC) mode and non-IBC inter mode
US11368706B2 (en) * 2018-12-06 2022-06-21 Lg Electronics Inc. Method and device for processing video signal on basis of inter prediction

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605255A (en) * 2008-06-12 2009-12-16 华为技术有限公司 A kind of method of coding and decoding video and device
CN104079944A (en) * 2014-06-30 2014-10-01 华为技术有限公司 Video coding motion vector list establishing method and system
WO2017176092A1 (en) * 2016-04-08 2017-10-12 한국전자통신연구원 Method and device for inducing motion prediction information
CN107615765A (en) * 2015-06-03 2018-01-19 联发科技股份有限公司 The method and apparatus of resource-sharing in video coding and decoding system between intra block replication mode and inter-frame forecast mode
CN107743239A (en) * 2014-09-23 2018-02-27 清华大学 A kind of video data encoding, the method and device of decoding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605255A (en) * 2008-06-12 2009-12-16 华为技术有限公司 A kind of method of coding and decoding video and device
CN104079944A (en) * 2014-06-30 2014-10-01 华为技术有限公司 Video coding motion vector list establishing method and system
CN107743239A (en) * 2014-09-23 2018-02-27 清华大学 A kind of video data encoding, the method and device of decoding
CN107615765A (en) * 2015-06-03 2018-01-19 联发科技股份有限公司 The method and apparatus of resource-sharing in video coding and decoding system between intra block replication mode and inter-frame forecast mode
WO2017176092A1 (en) * 2016-04-08 2017-10-12 한국전자통신연구원 Method and device for inducing motion prediction information

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11070796B2 (en) 2018-09-28 2021-07-20 Qualcomm Incorporated Ultimate motion vector expression based pruning for video coding
US11368706B2 (en) * 2018-12-06 2022-06-21 Lg Electronics Inc. Method and device for processing video signal on basis of inter prediction
US11695948B2 (en) * 2018-12-06 2023-07-04 Lg Electronics Inc. Method and device for processing video signal on basis of inter prediction
US11140412B2 (en) * 2019-02-17 2021-10-05 Beijing Bytedance Network Technology Co., Ltd. Motion candidate list construction for intra block copy (IBC) mode and non-IBC inter mode

Similar Documents

Publication Publication Date Title
TWI791723B (en) Method and apparatus for image prediction, video encoder and video decoder
WO2019120305A1 (en) Method for predicting motion information of image block , device and codec
JP5869122B2 (en) Predictive data buffering in video coding
US9854234B2 (en) Reference picture status for video coding
US20130272409A1 (en) Bandwidth reduction in video coding through applying the same reference index
JP6151446B2 (en) Precise explicit weighted prediction for video coding
JP6239609B2 (en) Signaling long-term reference pictures for video coding
US20130070855A1 (en) Hybrid motion vector coding modes for video coding
JP2018530246A (en) Improved video intra prediction using position-dependent prediction combinations for video coding
KR20130126688A (en) Motion vector prediction
US11563949B2 (en) Motion vector obtaining method and apparatus, computer device, and storage medium
US20210067796A1 (en) Video coding method and apparatus
WO2020103593A1 (en) Inter-frame prediction method and apparatus
WO2020047807A1 (en) Inter prediction method and apparatus, and codec
JP6224851B2 (en) System and method for low complexity coding and background detection
US11394996B2 (en) Video coding method and apparatus
WO2020043111A1 (en) Historic candidate list-based image coding and decoding methods, and codec
TW201921938A (en) Adaptive GOP structure with future reference frame in random access configuration for video coding
US11197018B2 (en) Inter-frame prediction method and apparatus
CN110896485B (en) Decoding method and device for predicting motion information
WO2020042758A1 (en) Interframe prediction method and device
WO2019084776A1 (en) Method and device for obtaining candidate motion information of image block, and codec
WO2020038232A1 (en) Method and apparatus for predicting movement information of image block
WO2020052653A1 (en) Decoding method and device for predicted motion information
WO2020024275A1 (en) Inter-frame prediction method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18932959

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18932959

Country of ref document: EP

Kind code of ref document: A1