WO2019084776A1 - Method and device for obtaining candidate motion information of image block, and codec - Google Patents

Method and device for obtaining candidate motion information of image block, and codec Download PDF

Info

Publication number
WO2019084776A1
WO2019084776A1 PCT/CN2017/108611 CN2017108611W WO2019084776A1 WO 2019084776 A1 WO2019084776 A1 WO 2019084776A1 CN 2017108611 W CN2017108611 W CN 2017108611W WO 2019084776 A1 WO2019084776 A1 WO 2019084776A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
motion information
image
candidate
list
Prior art date
Application number
PCT/CN2017/108611
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 华为技术有限公司
Priority to PCT/CN2017/108611 priority Critical patent/WO2019084776A1/en
Publication of WO2019084776A1 publication Critical patent/WO2019084776A1/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the present application relates to the field of video image coding and decoding technologies, and in particular, to a method, an apparatus, an encoder, and a decoder for acquiring candidate motion information of an image block.
  • ITU-TH.265 high Efficiently transmitting and receiving digital video information between devices can be achieved between the high efficiency video coding (HEVC) standard and the video compression techniques described in the extended section of the standard.
  • HEVC high efficiency video coding
  • an image of a video sequence is divided into image blocks for encoding or decoding.
  • inter prediction mode may include, but is not limited to, a merge mode (Merge Mode) and a non-merge mode (for example, an advanced motion vector prediction mode (AMVP mode), etc., and both are inter-predictions by using a method of multi-motion information competition. of.
  • merge Mode merge mode
  • AMVP mode advanced motion vector prediction mode
  • a candidate list including multiple sets of motion information (also referred to as candidate motion information) is introduced.
  • the encoder may select a suitable candidate motion information from the candidate list to predict the current to be encoded.
  • the motion information e.g., motion vector
  • the motion information of the image block thereby obtaining the best reference image block (i.e., prediction block) of the current image block to be encoded.
  • the maximum number of candidates of candidate motion information in the candidate list is defined.
  • a default value eg, a zero vector
  • an index identification is assigned to each set of candidate motion information. It can be seen that this approach leads to a lower reference meaning of some candidate motion information in the candidate list, which in turn leads to a lower accuracy of motion vector prediction, thereby affecting the codec performance.
  • the embodiment of the present application provides a method and an apparatus for acquiring candidate motion information of an image block, and a corresponding encoder and decoder, which improve the accuracy of motion vector prediction, thereby improving codec performance.
  • an embodiment of the present application provides a method for acquiring candidate motion information of an image block, where the candidate motion information is used to construct a candidate list for inter prediction, where the method includes: the candidate motion information acquiring device follows a first preset sequence, detecting one or more spatial reference blocks of the current image block, obtaining M sets of original candidate motion information in the candidate list of the image block to be processed, where M is an integer greater than or equal to 0; The motion information acquiring apparatus detects one or more time domain reference blocks of the current image block according to a second preset sequence, and obtains L sets of original candidate motion information in the candidate list of the image block to be processed, where L is An integer greater than or equal to 0; when the number of candidate motion information in the candidate list of the image block to be processed is less than the target number, the candidate motion information acquiring means further performs at least one set of bidirectional prediction types included in the candidate list Raw candidate motion information (also known as bidirectional pre- Performing decomposition processing on the original candidate motion information of the encoding/
  • the decomposition here can be understood as the inverse process of the combination, that is, splitting the motion information using the bidirectional predictive encoding/decoding mode into a motion information using a backward predictive encoding/decoding mode and a motion using a forward predictive encoding/decoding mode. information.
  • the spatial reference block herein refers to a reference block related to the current image block spatial domain, and may include one or more spatial reference blocks adjacent to the current image block in the image of the current image block, and Or, one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the current image block.
  • the time domain reference block herein refers to a reference block related to the current image block time domain, and may include one or more airspace references in the reference image adjacent to the co-located block (co-located block). Block, and/or one or more sub-blocks of the co-located block, wherein the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the reference image herein refers to a reconstructed image. Specifically, the reference image herein refers to a reference image in one or more reference image lists, for example, may be a reference corresponding to a specified reference image index in the specified reference image list.
  • the image may also be the reference image in the first position in the default reference image list, which is not limited in this application. It should be noted that no matter which reference block is used, it refers to a motion vector image block (also referred to as an encoded image block or a decoded image block).
  • each reference block may include a motion vector MV and reference image indication information.
  • the motion information may also include only one or all of the two.
  • the motion information may only include the motion vector MV.
  • the reference picture indication information is used to indicate which one or which reconstructed images are used as the reference image in the current block (the current block refers to the currently available reference block in the current segment), and the motion vector indicates that the reference block position is relative to the current in the used reference image.
  • the positional offset of the block position generally includes a horizontal component offset and a vertical component offset.
  • the reference image indication information may include a reference image list and a reference image index corresponding to the reference image list.
  • the reference image index is used to identify the reference image pointed to by the motion vector in the specified reference image list (RefPicList0 or RefPicList1).
  • a set of motion information for the reference block may include motion information for the forward and backward prediction directions.
  • the forward and backward prediction directions are two prediction directions of the bidirectional prediction mode, and it can be understood that "forward" and “backward” respectively correspond to the reference image list 0 (RefPicList0) and the reference image of the current image.
  • the "forward" prediction direction (RefPicList0) means that the reference image is temporally before the current image.
  • the “backward” prediction direction (RefPicList1) means that the reference image is temporally after the current image.
  • the candidate motion information acquiring device may be a video encoder or a video decoder, for example, may be a motion estimator in a video encoder, or a motion compensator in a video decoder.
  • the candidate motion information in the candidate list of the to-be-processed image block may include the foregoing M sets of original candidate motion information and L sets of original candidate motion information, and may of course include candidate motion information acquired in other manners.
  • the application is not limited to this.
  • the set of bi-predictive types of original candidate motion information includes: Motion information of a forward prediction direction and motion information for a backward prediction direction, wherein the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list And a motion vector of the first reference image corresponding to the first reference image index; the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list And a motion vector directed to the second reference image corresponding to the second reference image index;
  • the Q-group newly constructed unidirectional prediction type candidate motion information includes: a unidirectional prediction type (also referred to as a unidirectional prediction encoding/decoding mode) is a forward prediction direction (also referred to as a forward prediction coding).
  • a unidirectional prediction type also referred to as a unidirectional prediction encoding/decoding mode
  • a forward prediction direction also referred to as a forward prediction coding
  • the information includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; a set of motions of the backward prediction direction
  • the information includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index.
  • the method may further include : when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of the two sets of unidirectional prediction types included in the candidate list (also referred to as one-way Performing a combination process on the original candidate motion information of the prediction encoding/decoding mode to obtain P-group newly constructed bidirectional prediction type candidate motion information in the candidate list of the to-be-processed image block (also referred to as bidirectional prediction encoding/decoding mode) Candidate motion information), P is an integer greater than or equal to zero.
  • the combination here refers to combining a set of unidirectional prediction types with original prediction motion information of the forward prediction direction and another set of unidirectional prediction types with original candidate motion information of the backward prediction direction to obtain a set of newly constructed bidirectional predictions.
  • Types of candidate motion information in other words, combining a set of original candidate motion information using a forward predictive encoding/decoding mode with another set of original candidate motion information using a backward predictive encoding/decoding mode to obtain a set of newly constructed Candidate motion information in a bidirectional predictive encoding/decoding mode is employed.
  • the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
  • the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
  • a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block.
  • the one or more spatial reference blocks of the current image block are detected according to the first preset sequence, to obtain a candidate list of the to-be-processed image block.
  • the M group of original candidate motion information in the medium may include:
  • the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
  • the one or more time domain reference blocks include: a lower right spatial domain neighboring block H of a co-located block (co-located block) of the current image block
  • the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the detecting, by the second preset sequence, one or more time domain reference blocks of the current image block, to obtain the to-be-processed image block includes:
  • L1 is equal to or greater than L
  • L2 is equal to or greater than L
  • L3 is equal to or greater than L
  • L1, L2, and L3 are all integers greater than or equal to zero.
  • the target quantity is a preset maximum number of candidate motion information in a candidate list of the current image block; or the target quantity is a utilization code stream The number of candidate motion information determined by the index identification obtained in the parsing.
  • a second aspect of the present application provides an apparatus for acquiring candidate motion information of an image block, where the candidate motion information is used to construct a candidate list for inter prediction, and the apparatus includes: an airspace candidate motion information acquiring module, Detecting one or more spatial reference blocks of the current image block according to the first preset sequence, and obtaining M sets of original candidate motion information in the candidate list of the image block to be processed, where M is an integer greater than or equal to 0.
  • a time domain candidate motion information acquiring module configured to detect one or more time domain reference blocks of the current image block according to a second preset sequence, to obtain an L group in the candidate list of the image block to be processed
  • the original candidate motion information, L is an integer greater than or equal to 0
  • the additional candidate motion information acquiring module is configured to: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, Decomposing original candidate motion information of at least one set of bidirectional prediction types (motion information of bidirectional predictive encoding/decoding mode) included in the method
  • a list of candidate types of the unidirectional prediction image block to be processed in the new set Q of candidate motion information structure (unidirectional predictive coding / decoding mode to the motion information), Q is an integer greater than or equal to 0.
  • the set of bidirectional prediction types of original candidate motion information comprises: motion for a forward prediction direction Information and motion information for a backward prediction direction, wherein the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and points to the first a motion vector of the first reference image corresponding to the reference image index; the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and pointing to the second a motion vector of the second reference image corresponding to the reference image index;
  • the Q-group newly constructed unidirectional prediction type candidate motion information includes: a unidirectional prediction type (unidirectional prediction codec mode) is a forward prediction encoding/decoding mode.
  • a set of motion information and/or a unidirectional prediction type is a set of motion information of a backward predictive encoding/decoding mode, wherein the set of motion information of the forward predictive encoding/decoding mode includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; a set of the backward prediction encoding/decoding mode
  • the motion information includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index.
  • the candidate motion information of a newly constructed unidirectional prediction type is overlapped with the candidate motion information existing in the candidate list, the candidate motion information of the newly constructed unidirectional prediction type of the group is not put into the candidate list.
  • the candidate motion information of the newly constructed unidirectional prediction type may be placed in the candidate list before the deduplication operation is performed.
  • the additional candidate motion information acquiring module is further configured to: Combining original candidate motion information of two sets of unidirectional prediction types (unidirectional prediction encoding/decoding modes) included in the candidate list to obtain a bidirectional new configuration bidirectional in the candidate list of the to-be-processed image block Prediction type candidate motion information (candidate motion information of bidirectional prediction encoding/decoding mode), P is an integer greater than or equal to zero.
  • the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
  • the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
  • a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block.
  • the spatial domain candidate motion information acquiring module is configured to sequentially detect the first airspace neighboring block A1, the second airspace neighboring block B1, and the third airspace neighboring block. Whether the B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 are available, to obtain the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0,
  • the fifth spatial domain is adjacent to the motion information of the M1 determined motion vector image blocks in the block B2, and M1 is an integer greater than or equal to 0; the M group motion information in the motion information of the detected M1 determined motion vector image blocks is used as The candidate motion information is added to the candidate list, and M1 is equal to or greater than M; wherein: the detection condition of the fifth airspace neighboring block B2 includes: when the first airspace neighboring block A1, the second airspace neighboring block B1, and the third airspace When any one
  • the one or more time domain reference blocks include: a lower right spatial domain adjacent block H of a co-located block (co-located block) of the current image block
  • the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the time domain candidate motion information acquiring module is configured to:
  • L1 is equal to or greater than L
  • L2 is equal to or greater than L
  • L3 is equal to or greater than L
  • L1, L2, and L3 are all integers greater than or equal to zero.
  • the apparatus is configured to encode or decode a video image, the target number being a preset maximum number of candidate motion information in a candidate list of the current image block;
  • the apparatus is for decoding a video image, the target number being the number of candidate motion information determined using an index identification parsed from the code stream.
  • a third aspect of the present application provides an apparatus for acquiring candidate motion information of an image block, the candidate motion information being used to construct a candidate list for inter prediction, including: a processor and a memory coupled to the processor
  • the processor is configured to: in the first preset order, detect one or more spatial reference blocks of the current image block, and obtain M sets of original candidate motion information in the candidate list of the to-be-processed image block, where M is An integer greater than or equal to 0; detecting one or more time domain reference blocks of the current image block according to a second preset sequence, to obtain L sets of original candidate motion information in the candidate list of the image block to be processed L is an integer greater than or equal to 0; when the number of candidate motion information in the candidate list of the image block to be processed is less than the target number, the original candidate motion of at least one set of bidirectional prediction types included in the candidate list
  • the information original candidate motion information of the bidirectional predictive encoding/decoding mode
  • decomposition processing to obtain a newly constructed Q group in the candidate list of
  • the set of bi-predictive types of original candidate motion information includes: Motion information of a forward prediction direction and motion information for a backward prediction direction, wherein the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list And a motion vector of the first reference image corresponding to the first reference image index; the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list And a motion vector directed to the second reference image corresponding to the second reference image index;
  • the Q-group newly constructed unidirectional prediction type candidate motion information includes: a unidirectional prediction type (also referred to as a unidirectional prediction encoding/decoding mode) is a forward prediction direction (also referred to as a forward prediction coding).
  • a unidirectional prediction type also referred to as a unidirectional prediction encoding/decoding mode
  • a forward prediction direction also referred to as a forward prediction coding
  • the information includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; a set of motions of the backward prediction direction
  • the information includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index.
  • the processor Further for: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of the two sets of unidirectional prediction types included in the candidate list (also referred to as And performing, by combining processing, the original candidate motion information of the unidirectional prediction encoding/decoding mode, to obtain candidate motion information of the P group newly constructed bidirectional prediction type in the candidate list of the to-be-processed image block (also referred to as bidirectional prediction coding/ Candidate motion information of the decoding mode), P is an integer greater than or equal to zero.
  • the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
  • the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
  • a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block.
  • the one or more spatial reference blocks of the current image block are detected in the first preset order, to obtain a candidate for the image block to be processed.
  • the processor is configured to: sequentially detect the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring Whether the block A0 and the fifth spatial neighboring block B2 are available to obtain the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2.
  • the motion information of the M1 determined motion vector image blocks, M1 is an integer greater than or equal to 0; and the M sets of motion information in the motion information of the detected M1 determined motion vector image blocks are added as candidate motion information to the In the candidate list, M1 is equal to or greater than M; wherein: the detection condition of the fifth spatial neighboring block B2 includes: when the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace When any one of the neighboring blocks A0 is not available, the fifth airspace neighboring block B2 is detected.
  • the processor only sets one of the two or more sets of motion information identical to each other. Group motion information is added to the candidate list.
  • the one or more time domain reference blocks include: a lower right spatial domain neighboring block H of a co-located block (co-located block) of the current image block
  • the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the one or more time domain reference blocks of the current image block are detected in the second preset order to obtain the to-be-processed image.
  • An aspect of the L sets of original candidate motion information in the candidate list of the block the processor configured to: sequentially detect the right lower airspace neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available Obtaining motion information of the L1 determined motion vector image blocks; or sequentially detecting whether the lower right spatial neighboring block H of the co-located block and the upper left intermediate block C0 of the co-located block are available to obtain L2 Determining motion information of the motion vector image block; or sequentially detecting the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, and the upper left block TL of the co-located block Whether the lower right block BR of the same location block, the upper left intermediate block C0 of the same location
  • the target quantity is a preset maximum number of candidate motion information in the candidate list of the current image block; or the target quantity is a utilization code stream The number of candidate motion information determined by the index identification obtained in the parsing.
  • a fourth aspect of the present application provides an apparatus for acquiring candidate motion information of an image block, configured to acquire candidate motion information to construct a candidate list for inter prediction, including: a processor and a memory coupled to the processor ;
  • the processor 1201 is configured to: according to the first preset sequence, detect one or more spatial reference blocks of the current image block, to obtain M sets of original candidate motion information for constructing a candidate list of the current image block, M is an integer greater than or equal to 0; detecting one or more time domain reference blocks of the current image block according to a second preset order, to obtain an L group for constructing a candidate list of the image block to be processed Raw candidate motion information, L is an integer greater than or equal to 0; when the number of candidate motion information for constructing the candidate list of the image block to be processed is smaller than the target number, candidates for constructing the image block to be processed
  • the original candidate motion information of at least one set of bidirectional prediction types included in the candidate motion information of the list is subjected to decomposition processing to obtain candidate motion information of the unidirectional prediction type of the Q group newly constructed for constructing the candidate list of the to-be-processed image block.
  • Q is an integer greater than or equal to 0.
  • the original candidate motion information of the set of bidirectional prediction types includes: motion information for a forward prediction direction and motion information for a backward prediction direction,
  • the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index
  • the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index ;
  • the candidate motion information of the unidirectional prediction type of the Q group newly constructed includes: a group of motion information whose unidirectional prediction type is a forward prediction direction and/or a group whose unidirectional prediction type is a backward prediction direction.
  • Motion information wherein the set of motion information of the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a first reference image corresponding to the first reference image index a motion vector; the set of motion information of the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a second reference image corresponding to the second reference image index Sport vector.
  • the processor in order to further mine more reference candidate motion information as much as possible to further improve the accuracy of motion vector prediction, the processor Further used for:
  • the original candidate motion information of the two sets of unidirectional prediction types included in the candidate motion information for constructing the candidate list is constructed Performing a combination process to obtain candidate motion information of a P group newly constructed bidirectional prediction type for constructing a candidate list of the image block to be processed, P being an integer greater than or equal to 0.
  • the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
  • the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
  • a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block.
  • the one or more time domain reference blocks include: a lower right spatial domain neighboring block H of a co-located block (co-located block) of the current image block
  • the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the target quantity is a preset maximum number of candidate motion information in the candidate list of the current image block; or the target quantity is a utilization code stream The number of candidate motion information determined by the index identification obtained in the parsing.
  • a fifth aspect of the present application provides a video encoder, the video encoder for encoding an image block, comprising: an inter predictor, wherein the inter predictor comprises the second aspect or the third aspect or the fourth aspect
  • the apparatus for acquiring candidate motion information of an image block wherein the inter predictor is configured to determine a prediction block of a current image block to be encoded based on the candidate motion information selected in the candidate list;
  • the video encoder further includes: an entropy encoder For indexing an index identifier for indicating the selected candidate motion information for the current image block to be encoded, and a reconstructor for reconstructing the image block based on the prediction block .
  • the inter predictor herein may include a motion estimation module and a motion compensation module, where the motion estimation module is configured to acquire candidate motion information of a current image block to be encoded to construct a candidate list; and the motion compensation module is configured to: A prediction block of the current image block to be encoded is determined based on the candidate motion information selected in the candidate list.
  • the inter predictor is further configured to select candidate motion information for the current image block to be encoded from the plurality of candidate motion information included in the candidate list. And wherein the selected candidate motion information encodes the current code to be encoded image block with the lowest rate penalty cost.
  • a sixth aspect of the present application provides a video decoder, where the video decoder is configured to decode an image block from a code stream, including: an entropy decoder, configured to decode an index identifier from a code stream, where the index identifier is used And an apparatus for acquiring candidate motion information for an image block according to the second aspect or the third aspect or the fourth aspect, wherein the selected candidate motion information is used for the image block to be decoded;
  • the inter predictor is configured to determine a prediction block of an image block to be decoded currently based on candidate motion information indicated by the index identifier; and a reconstructor to reconstruct the image block based on the prediction block.
  • a seventh aspect of the present application provides a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform the method of the first aspect described above.
  • An eighth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
  • a ninth aspect of the present application provides an electronic device, comprising the video encoder according to the above fifth aspect, or the video decoder according to the sixth aspect, or the image described in the second, third or fourth aspect A device for acquiring candidate motion information of a block.
  • FIG. 1 is a schematic block diagram of a video encoding and decoding system in an embodiment of the present application
  • FIG. 2 is a schematic block diagram of a video encoder in an embodiment of the present application.
  • FIG. 3 is a schematic block diagram of a video decoder in an embodiment of the present application.
  • FIG. 4 is an exemplary flowchart of an encoding method performed by a video encoder in a merge mode in 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
  • 6A and 6B are schematic diagrams showing an encoding unit and an adjacent position image block and a non-adjacent position image block associated therewith in the embodiment of the present application;
  • FIG. 7 is an exemplary flowchart of a method for acquiring candidate motion information of an image block according to an embodiment of the present application
  • FIG. 8 is another exemplary flowchart of a method for acquiring candidate motion information of an image block according to an embodiment of the present application.
  • FIG. 9 is an exemplary schematic diagram of adding a decomposed candidate motion vector to a merge mode candidate list in the embodiment of the present application.
  • FIG. 10 is an exemplary schematic diagram of adding a combined candidate motion vector to a merge mode candidate list in an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of an apparatus for acquiring candidate motion information of an image block in an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of an encoding device or a decoding device according to an embodiment of the present application.
  • FIG. 1 is a schematic block diagram of a video encoding and decoding system 10 in an embodiment of the present application.
  • system 10 includes source device 12 that produces encoded video data that will be decoded by destination device 14 at a later time.
  • Source device 12 and destination device 14 may comprise 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, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices or the like.
  • source device 12 and destination device 14 may be equipped for wireless communication.
  • Link 16 may include any type of media or device capable of moving encoded video data from source device 12 to destination device 14.
  • link 16 may include communication media that enables source device 12 to transmit encoded video data directly to destination device 14 in real time.
  • the encoded video data can be modulated and transmitted to destination device 14 in accordance with a communication standard (e.g., a wireless communication protocol).
  • Communication media can include any wireless or wired communication medium, such as a radio frequency spectrum or one or more physical transmission lines.
  • the communication medium can form part of a packet-based network (eg, a global network of local area networks, wide area networks, or the Internet).
  • Communication media can include routers, switches, base stations, or any other equipment that can be used to facilitate communication from source device 12 to destination device 14.
  • the encoded data may be output from output interface 22 to storage device 24.
  • encoded data can be accessed from storage device 24 by an input interface.
  • Storage device 24 may comprise 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.
  • storage device 24 may correspond to a file server or another intermediate storage device that may maintain encoded video produced by source device 12. Destination device 14 may access the stored video data from storage device 24 via streaming or download.
  • the file server can be any type of server capable of storing encoded video data and transmitting this encoded video data to destination device 14.
  • a file server includes a web server, a file transfer protocol server, a network attached storage device, or a local disk unit.
  • Destination device 14 can access the encoded video data via any standard data connection that includes an Internet connection.
  • This data connection may include a wireless channel (eg, a Wi-Fi connection), a wired connection (eg, a cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on a file server.
  • the transmission of encoded video data from storage device 24 may be streaming, downloading, or a combination of both.
  • system 10 can 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.
  • source device 12 includes video source 18, video encoder 20, and output interface 22.
  • output interface 22 can include a modulator/demodulator (modem) and/or a transmitter.
  • video source 18 may include sources such as video capture devices (eg, cameras), video archives containing previously captured video, video feed interfaces to receive video from video content providers And/or a computer graphics system for generating computer graphics data as source video, or a combination of these sources.
  • 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 are illustratively applicable to video decoding and are 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 can be transmitted directly to the destination device 14 via the output interface 22 of the source device 12.
  • the encoded video data may also (or alternatively) be stored on storage device 24 for later access by 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.
  • input interface 28 can include a receiver and/or a modem.
  • Input interface 28 of destination device 14 receives encoded video data via link 16.
  • the encoded video data communicated or provided on storage device 24 via link 16 may include various syntax elements generated by video encoder 20 for use by video decoders of video decoder 30 to decode the video data. These grammar elements
  • the prime may be included with encoded video data transmitted over a communication medium, stored on a storage medium, or stored on a file server.
  • Display device 32 may be integrated with destination device 14 or external to destination device 14.
  • destination device 14 can include an integrated display device and is also configured to interface with an external display device.
  • the destination device 14 can be a display device.
  • display device 32 displays 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 in accordance with, for example, the next generation video codec compression standard (H.266) currently under development and may conform to the H.266 Test Model (JEM).
  • video encoder 20 and video decoder 30 may be according to, for example, the ITU-TH.265 standard, also referred to as a high efficiency video decoding standard, or other proprietary or industry standard of the ITU-TH.264 standard or an extension 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 a suitable multiplexer-demultiplexer (MUX-DEMUX) unit or other hardware and software to handle the encoding of both audio and video in a common data stream or in a separate data stream.
  • MUX-DEMUX multiplexer-demultiplexer
  • the MUX-DEMUX unit may conform to the ITU H.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 apparatus may store the instructions of the software in a suitable non-transitory computer readable medium and execute the instructions in hardware using one or more processors to perform the techniques of the present application.
  • Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, any of which may be integrated into a combined encoder/decoder (CODEC) in a respective device. part.
  • CDEC combined encoder/decoder
  • the present application may illustratively involve video encoder 20 "signaling" particular information to another device, such as video decoder 30.
  • video encoder 20 may signal information by associating particular syntax elements with various encoded portions of the video data. That is, video encoder 20 may "signal" the data by storing the particular syntax elements to the header information of the various encoded portions of the video data.
  • these syntax elements may be encoded and stored (eg, stored to storage system 34 or file server 36) prior to being received and decoded by video decoder 30.
  • the term “signaling” may illustratively refer to the communication of grammar or other data used to decode compressed video data, whether this communication occurs in real time or near real time or occurs over a time span, such as may be encoded Occurs when a syntax element is stored to the media, and the syntax element can then be retrieved by the decoding device at any time after storage to the media.
  • H.265 JCT-VC developed the H.265 (HEVC) standard.
  • HEVC standardization is based on an evolution model of a video decoding device called the HEVC Test Model (HM).
  • HM HEVC Test Model
  • the latest standard documentation for H.265 is available at http://www.itu.int/rec/T-REC-H.265.
  • the latest version of the standard document is H.265 (12/16), which is the full text of the standard document.
  • the manner of reference is incorporated herein.
  • the HM assumes that the video decoding device has several additional capabilities with respect to existing algorithms of ITU-TH.264/AVC. For example, H.264 provides nine intra-prediction coding modes, while HM provides up to 35 intra-prediction coding modes.
  • JVET is committed to the development of the H.266 standard.
  • the H.266 standardization process is based on an evolution model of a video decoding device called the H.266 test model.
  • the algorithm description of H.266 is available from http://phenix.int-evry.fr/jvet, and the latest algorithm description is included in JVET-F1001-v2, which is incorporated herein by reference in its entirety.
  • the reference software for the JEM test model is available 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 treeblocks or largest coding units (LCUs) containing both luminance and chrominance samples, also referred to as CTUs.
  • Treeblocks have similar purposes to macroblocks of the H.264 standard.
  • a stripe contains several consecutive treeblocks in decoding order.
  • a video frame or image can be segmented into one or more stripes.
  • Each tree block can be split into coding units according to a quadtree. For example, a tree block that is the root node of a quadtree can be split into four child nodes, and each child node can be a parent node again and split into four other child nodes.
  • the final non-splitable child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded video blocks.
  • the syntax data associated with the decoded code stream may define the maximum number of times the tree block can be split, and may also define the minimum size of the decoded node.
  • the coding unit includes a decoding node and a prediction unit (PU) and a transform 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 may range from 8 x 8 pixels up to a maximum of 64 x 64 pixels or larger.
  • Each CU may contain one or more PUs and one or more TUs.
  • syntax data associated with a CU may describe a situation in which a CU is partitioned into one or more PUs.
  • the split mode may be different between situations where the CU is skipped or encoded by direct mode coding, intra prediction mode coding, or inter prediction mode.
  • the PU can be divided into a shape that is non-square.
  • syntax data associated with a CU may also describe a situation in which a CU is partitioned into one or more TUs according to a quadtree.
  • the shape of the TU can be square or non
  • the HEVC standard allows for transforms based on TUs, which can be different for different CUs.
  • the TU is typically sized based on the size of the PU within a given CU defined for the partitioned LCU, although this may not always be the case.
  • the size of the TU is usually the same as or smaller than the PU.
  • the residual samples corresponding to the CU may be subdivided into smaller units using a quadtree structure called a "residual qualtree" (RQT).
  • RQT residual qualtree
  • the leaf node of the RQT can be referred to as a TU.
  • the pixel difference values associated with the TU may be transformed to produce transform coefficients, which may be quantized.
  • a PU contains data related to the prediction process.
  • the PU when the PU is intra-mode encoded, the PU may include data describing the intra prediction mode of the PU.
  • the PU when the PU is inter-mode encoded, 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 (eg, quarter-pixel precision or eighth-pixel precision), motion vector A reference image pointed to, and/or a reference image list of motion vectors (eg, list 0, list 1, or list C).
  • TUs use 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.
  • the residual value includes pixel difference values, which can be transformed into transform coefficients, quantized, and scanned using TU to produce serialized transform coefficients for entropy decoding.
  • the present application generally refers to the term "video block” to refer to a decoding node of a CU.
  • the term "video block” may also be used herein to refer to a tree block containing a decoding node as well as a PU and a TU, eg, an LCU or CU.
  • a video sequence usually contains a series of video frames or images.
  • a group of picture illustratively includes a series of one or more video images.
  • the GOP may include syntax data in the header information of the GOP, in the header information of one or more of the images, or elsewhere, the syntax data describing the number of images included in the GOP.
  • Each strip of the image may contain stripe syntax data describing the encoding mode of the corresponding image.
  • Video encoder 20 is typically within an individual video stripe
  • the video block operates to encode the video data.
  • a video block may correspond to a decoding node within a CU.
  • Video blocks may have fixed or varying sizes and may vary in size depending on the specified decoding criteria.
  • HM supports prediction of various PU sizes. Assuming that the size of a specific CU is 2N ⁇ 2N, HM supports intra prediction of PU size of 2N ⁇ 2N or N ⁇ N, and inter-frame prediction of 2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N or N ⁇ N symmetric PU size prediction. The HM also supports asymmetric partitioning of inter-prediction of PU sizes of 2N x nU, 2N x nD, nL x 2N, and nR x 2N. In the asymmetric segmentation, one direction of the CU is not divided, and the other direction is divided into 25% and 75%.
  • 2N x nU refers to a horizontally partitioned 2N x 2 NCU, where 2N x 0.5 NPU is at the top and 2N x 1.5 NPU is at the bottom.
  • N x N and N by N are used interchangeably to refer to the pixel size of a video block in accordance with the vertical dimension and the horizontal dimension, for example, 16 x 16 pixels or 16 by 16 pixels.
  • an N x N block has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value.
  • the pixels in the block can be arranged in rows and columns. Further, 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 x M pixels, where M is not necessarily equal to N.
  • video encoder 20 may calculate residual data for 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 be included in transforming (eg, discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after application to the residual video data.
  • the residual data may correspond to a pixel difference between a pixel of the uncoded image and a predicted value corresponding to the PU.
  • Video encoder 20 may form a TU that includes residual data for 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 illustratively refers to the process of quantizing the coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression.
  • the quantization process can reduce the bit depth associated with some or all of the coefficients. For example, the n-bit value can 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 Binary Tree" (QTBT) is introduced.
  • QTBT Quality Tree Combined Binary Tree
  • the QTBT structure rejects the concepts of CU, PU, TU, etc. in HEVC, and supports more flexible CU partitioning shapes.
  • One CU can be square or rectangular.
  • a CTU first performs quadtree partitioning, and the leaf nodes of the quadtree further perform binary tree partitioning.
  • there are two division modes in the binary tree division symmetric horizontal division and symmetric vertical division.
  • the leaf nodes of the binary tree are called CUs, and the CUs of the JEM cannot be further divided during the prediction and transformation process, that is, the CUs, PUs, and TUs of the JEM have the same block size.
  • the maximum size of the CTU is 256 ⁇ 256 luma pixels.
  • video encoder 20 may utilize a predefined scan order to scan the quantized transform coefficients to produce an entropy encoded serialized vector.
  • video encoder 20 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 20 may be based on context adaptive variable length decoding (CAVLC), context adaptive binary arithmetic decoding (CABAC), grammar based context adaptive binary. Arithmetic decoding (SBAC), probability interval partitioning entropy (PI PE) decoding, or other entropy decoding methods are used to entropy decode one-dimensional vectors.
  • 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 contexts within the context model to the symbols to be transmitted.
  • the context can be related to whether the adjacent value of the symbol is non-zero.
  • video encoder 20 may select a variable length code of the symbol to be transmitted. Codewords in variable length decoding (VLC) may be constructed such that relatively shorter codes correspond to more likely symbols, while longer codes correspond to less likely symbols. In this way, the use of VLC can achieve the goal of saving code rate with respect 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.
  • a video encoder may perform inter prediction to reduce temporal redundancy between images.
  • a CU may have one or more prediction units PU as specified by different video compression codec standards.
  • multiple PUs may belong to the CU, or the PUs and CUs may be the same size.
  • the partition mode of the CU is not divided, or is divided into one PU, and the PU is used for expression.
  • the video encoder can signal the video decoder for 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.
  • the motion vector may indicate a displacement between an image block (also referred to as a video block, a block of pixels, a set of pixels, etc.) of the PU and a reference block of the PU.
  • the reference block of the PU may be part of a reference image of an image block similar to a PU.
  • the reference block may be located in a reference image indicated by the reference image index and the prediction direction indicator.
  • the video encoder may generate a candidate motion information list for each of the PUs according to the merge prediction mode or the advanced motion vector prediction mode process (hereinafter referred to as a candidate) List).
  • Each candidate in the candidate list for the PU may represent a set of motion information.
  • the motion information may include a motion vector MV and reference image indication information.
  • the motion information may also include only one or all of the two. For example, if the codec side agrees on the reference image, the motion information may only include the motion vector.
  • the motion information represented by some of the candidates in the candidate list may be based on motion information of other PUs.
  • the present application may refer to the candidates 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 temporal candidate location.
  • the video encoder may also generate additional or additional candidate motion information by some means, such as inserting a zero motion vector as candidate motion information to generate additional candidate motion information. These additional candidate motion information are not considered raw candidate motion information and may be referred to as late or artificially generated candidate motion information in this application.
  • the techniques of the present application generally relate to techniques for generating a candidate list at a video encoder and techniques for generating the same candidate list at a video decoder.
  • the video encoder and video decoder may generate the same candidate list by implementing the same techniques used to construct the candidate list. For example, both a video encoder and a video decoder can construct a list with the same number of candidates (eg, five candidates).
  • the video encoder and decoder may first consider spatial candidates (eg, neighboring blocks in the same image), then consider temporal candidates (eg, candidates in different images), and finally may consider artificially generated candidates until Add the required number of candidates to the list.
  • a pruning operation may be utilized for certain types of candidate motion information to remove duplicates from the candidate list during candidate list construction, while for other types of candidates, pruning may not be used to reduce decoder complexity .
  • a pruning operation may be performed to exclude candidates with repeated motion information from the list of candidates.
  • the artificially generated candidate may be added without performing a pruning operation on the artificially generated candidate.
  • the video encoder may select candidate motion information from the candidate list and output an index identifier indicating the selected candidate motion information in the 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 identification may indicate the location of the candidate motion information selected in the candidate list.
  • the video encoder may also generate a prediction block for the PU based on the 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.
  • the motion information of the PU may be determined based on the motion vector difference of the PU and the selected candidate motion information.
  • the video encoder may generate one or more residual image blocks (abbreviated as residual blocks) for the CU based on the predictive image blocks of the PU of the CU (referred to as prediction blocks for short) 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 the candidate list of PUs.
  • the video decoder may determine motion information for the PU based on the selected candidate motion information in the candidate list of PUs.
  • 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 one or more reference blocks of the PU.
  • the video decoder may reconstruct an image block for the CU based on the prediction block for the PU of the CU and one or more residual blocks for the CU.
  • the present application may describe a location or image block as having various spatial relationships with a CU or PU. This description may be interpreted to mean that the location or image block and the image block associated with the CU or PU have various spatial relationships.
  • the present application may refer to a PU that is currently being decoded by a video decoder as a current PU, also referred to as a current image block to be processed.
  • the present application may refer to a CU currently being decoded by a video decoder as a current CU.
  • the present application may refer to the image currently being decoded by the video decoder as the current image. It should be understood that the present application is applicable to the case where the PU and the CU have the same size, or the PU is the CU, and the PU is used uniformly.
  • video encoder 20 may use inter prediction to generate prediction blocks and motion information for PUs of the CU.
  • the motion information of the 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 image block of the PU). Because neighboring PUs often have similar motion information, video encoder 20 may encode motion information for the PU with reference to motion information of neighboring PUs. Encoding the motion information of the PU with reference to the motion information of the neighboring PU may reduce the number of coded bits required in the code stream indicating the motion information of the PU.
  • Video encoder 20 may encode motion information for the PU with reference to motion information of neighboring PUs in various manners. For example, video encoder 20 may indicate that the motion information for the PU is the same as the motion information for nearby PUs. The present application may use a merge mode to indicate that the motion information indicating the PU is the same as the motion information of the neighboring PU or may be derived from the motion information of the neighboring PU. In another possible implementation, video encoder 20 may calculate a Motion Vector Difference (MVD) for the PU. The MVD indicates the difference between the motion vector of the PU and the motion vector of the neighboring PU. Video encoder 20 may include the MVD instead of the motion vector of the PU in the motion information of the PU.
  • MVD Motion Vector Difference
  • the representation of the MVD in the code stream is less than the coded bits required to represent the motion vector of the PU.
  • the present application can use the advanced motion vector prediction mode to refer to the motion information of the PU at the decoding end by using the index value of the MVD and the recognition candidate (ie, candidate motion information).
  • 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 the PU represents a set of motion information.
  • the set of motion information may include a motion vector, a reference image list, and a reference image index corresponding to the reference image list.
  • video encoder 20 may select one of a plurality of candidates from the candidate list for the PU. For example, a video encoder can compare each candidate with the PU being decoded and can select A candidate for the required rate-distortion cost. Video encoder 20 may output a candidate index for the PU. The candidate index can identify the location of the selected candidate in the candidate list.
  • video encoder 20 may generate a prediction block for the PU based on the 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 in 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 the PU may be the same as the candidate list generated by video encoder 20 for the PU.
  • the syntax elements parsed from the code stream may indicate the location of the candidate motion information selected in the candidate list of PUs.
  • 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 for the PU based on candidate motion information selected in the candidate list for the PU.
  • Video decoder 30 may reconstruct an image block for the CU based on the prediction block for the PU and the residual block for the CU.
  • the construction of the candidate list is independent of the position of the candidate selected in the candidate list from the code stream, and may be performed in any order or in parallel.
  • the location 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 location.
  • no construction is needed.
  • only the candidate list at the parsed location needs to be constructed, that is, the candidate at the location can be determined.
  • the code stream is parsed to find that the selected candidate is a candidate whose index identifier is 3 in the candidate list
  • FIG. 2 is a schematic block diagram of a video encoder 20 in the embodiment of the present application.
  • Video encoder 20 may perform intra-frame decoding and inter-frame decoding of video blocks within a video stripe.
  • Intra decoding relies on spatial prediction to reduce or remove spatial redundancy of 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 or images of a video sequence.
  • the intra mode (I mode) may refer to any of a number of space based compression modes.
  • An inter mode such as unidirectional prediction (P mode) or bidirectional prediction (B mode) may refer to any of several time-based compression modes.
  • video encoder 20 includes a partitioning unit 35, a prediction unit 41, a reference image memory 64, a summer 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56.
  • the prediction unit 41 includes an inter prediction unit (not shown) and an intra prediction unit 46.
  • the inter prediction unit may include a motion estimation unit 42 and a motion compensation unit 44.
  • video encoder 20 may also include inverse quantization unit 58, inverse transform unit 60, and a summer (also referred to as reconstructor) 62.
  • a deblocking filter (not shown in Figure 2) may also be included to filter the block boundaries to remove blockiness artifacts from the reconstructed video. The deblocking filter will typically filter the output of summer 62 as needed.
  • an additional loop filter in-loop or post-loop can also be used.
  • video encoder 20 receives video data, and segmentation unit 35 segments the data into video blocks.
  • This partitioning may also include partitioning into strips, image blocks, or other larger units, and, for example, video block partitioning based on the quadtree structure of the LCU and CU.
  • Video encoder 20 exemplarily illustrates the components of a video block encoded within a video strip to be encoded. In general, a stripe may be partitioned into multiple video blocks (and possibly into a collection of video blocks called image blocks).
  • Prediction unit 41 may select one of a plurality of possible decoding modes of the current video block based on the encoding quality and the cost calculation result (eg, rate-distortion cost, RDcost), such as one or more of a plurality of intra-coding modes One of the inter-frame decoding modes. Prediction unit 41 may provide the resulting intra-coded or inter-coded block to summer 50 to generate a residual The block data is differenceed and the resulting intra-coded or inter-coded block is provided to summer 62 to reconstruct the coded block for use as a reference picture.
  • rate-distortion cost e.g., rate-distortion cost, RDcost
  • Inter-prediction units within prediction unit 41 perform inter-predictive decoding of current video blocks relative to one or more of the one or more reference pictures to provide Time compression.
  • Motion estimation unit 42 is operative to determine an inter prediction mode for the video stripe based on a predetermined pattern of the video sequence. The predetermined mode specifies the video strips in the sequence as P strips, B strips, or GPB strips.
  • Motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are separately illustrated for conceptual purposes.
  • the motion estimation performed by motion estimation unit 42 produces a process of estimating the motion vector of the video block.
  • the motion vector may indicate the displacement of the PU of the video block within the current video frame or image relative to the predicted block within the reference image.
  • the prediction block is a block of PUs that are found to closely match the video block to be decoded according to the pixel difference, and the pixel difference may be determined by absolute difference sum (SAD), squared difference sum (SSD) or other difference metric.
  • video encoder 20 may calculate a value of a sub-integer pixel location of a reference image stored in reference image memory 64. For example, video encoder 20 may interpolate values of a quarter pixel position, an eighth pixel position, or other fractional pixel position of a reference image. Accordingly, 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 fractional pixel precision.
  • Motion estimation unit 42 calculates the motion vector of the PU of the video block in the inter-coded slice by comparing the location of the PU with the location of the prediction block of the reference picture.
  • the reference images may be selected from a first reference image list (List 0) or a second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 64.
  • Motion estimation unit 42 transmits the computed motion vector to entropy encoding unit 56 and motion compensation unit 44.
  • Motion compensation performed by motion compensation unit 44 may involve extracting or generating a prediction block based on motion vectors determined by motion estimation. After receiving the motion vector of the PU of the current video block, motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference picture lists.
  • the 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 residual data for the block and may include both luminance and chrominance difference components.
  • Summer 50 represents one or more components that perform this subtraction.
  • Motion compensation unit 44 may also generate syntax elements associated with video blocks and video slices for video decoder 30 to use to decode video blocks of video slices.
  • the PU-containing image may be associated with two reference image lists called "List 0" and "List 1".
  • an image containing B strips may be associated with a list combination that is a combination of List 0 and List 1.
  • motion estimation unit 42 may perform uni-directional prediction or bi-directional prediction for the PU, wherein, in some possible implementations, bi-directional prediction is based on List 0 and List 1 reference image lists, respectively.
  • the prediction performed by the image in other possible embodiments, the bidirectional prediction is prediction based on the reconstructed future frame and the reconstructed past frame in the display order of the current frame, respectively.
  • the motion estimation unit 42 may search for a reference block for the PU in the reference image of list 0 or list 1.
  • Motion estimation unit 42 may then generate a reference index indicating a reference picture containing the 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 index, a prediction direction identifier, and a motion vector as motion information of the PU.
  • the prediction direction indicator may indicate that the reference index indicates the reference image in list 0 or list 1.
  • Motion compensation unit 44 may generate a predictive image block of the PU based on the 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 the list 0 and may also search for another one for the PU in the reference image in the list 1 Reference block. Motion estimation unit 42 may then generate a reference index indicating the reference picture 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 of the PU and a motion vector as motion information of the PU. Motion compensation unit 44 may generate a predictive image block of the PU based on the reference block indicated by the motion information of the PU.
  • motion estimation unit 42 does not output a complete set of motion information for the PU to entropy encoding module 56. Rather, motion estimation unit 42 may signal the motion information of the PU with reference to motion information of another PU. For example, motion estimation unit 42 may determine that the motion information of the PU is sufficiently similar to the motion information of the neighboring PU. In this embodiment, motion estimation unit 42 may indicate an indication value in a syntax structure associated with the PU that indicates to video decoder 30 that the PU has the same motion information as the neighboring PU or has a slave phase The motion information derived by the neighboring PU.
  • motion estimation unit 42 may identify candidates and motion vector differences (MVDs) associated with neighboring PUs in a syntax structure associated with the PU.
  • the 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.
  • prediction unit 41 may generate a candidate list for each PU of the CU.
  • One or more of the candidate lists may include one or more sets of original candidate motion information and one or more sets of additional candidate motion information derived from the original candidate motion information.
  • Intra prediction unit 46 within 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 .
  • intra-prediction unit 46 may intra-predict the current block.
  • intra prediction unit 46 may determine an intra prediction mode to encode the current block.
  • intra-prediction unit 46 may encode the current block using various intra-prediction modes, for example, during separate encoding traversal, and intra-prediction unit 46 (or in some possible implementations, The mode selection unit 40) may select the appropriate intra prediction mode to use from the tested mode.
  • 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 transform processing unit 52.
  • Transform processing unit 52 transforms the residual video data into residual transform coefficients using, for example, a discrete cosine transform (DCT) or a conceptually similar transformed transform (eg, a discrete sinusoidal transform DST).
  • Transform processing unit 52 may convert the residual video data from the pixel domain to a transform domain (eg, a frequency domain).
  • Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54.
  • Quantization unit 54 quantizes the transform coefficients to further reduce the code rate. The quantization process can 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 possible implementations, quantization unit 54 may then perform a scan of the matrix containing the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform a scan.
  • entropy encoding unit 56 may entropy encode the quantized transform coefficients. For example, 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 partition entropy (PIPE) decoding or another entropy coding method or technique. Entropy encoding unit 56 may also entropy encode the motion vectors and other syntax elements of the current video strip being decoded. After entropy encoding by entropy encoding unit 56, the encoded code stream may be transmitted to video decoder 30 or archive for later transmission or retrieved by video decoder 30.
  • CAVLC context adaptive variable length decoding
  • CABAC context adaptive binary arithmetic decoding
  • SBAC syntax based context adaptive binary arithmetic decoding
  • PIPE probability interval partition entropy
  • Entropy encoding unit 56 may also entropy
  • Entropy encoding unit 56 may encode information indicative of a selected intra prediction mode in accordance with the techniques of the present application.
  • Video encoder 20 may include encoding of various blocks in transmitted code stream configuration data that may include multiple intra prediction mode index tables and a plurality of modified intra prediction mode index tables (also referred to as codeword mapping tables) A 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.
  • Inverse quantization unit 58 and inverse transform unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for later use as a reference block for the reference image.
  • Motion compensation unit 44 may calculate the reference block by adding the residual block to a prediction block of one of the reference pictures within one of the reference picture lists. 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.
  • Summer 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to produce a reference block for storage in reference image memory 64.
  • the reference block may be used by motion estimation unit 42 and motion compensation unit 44 as reference blocks to inter-predict subsequent video frames or blocks in the image.
  • video encoder 20 may directly quantize the residual signal without the need for processing by transform unit 52, and accordingly need not be processed by inverse transform unit 60; or, for some image blocks Or the image frame, 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 quantization unit 54 and the inverse of the video encoder 20 Quantization units 58 can be combined together.
  • FIG. 3 is a schematic block diagram of a video decoder 30 in the embodiment of the present application.
  • 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, and a reference image memory 92.
  • the reference image memory 92 can also be placed outside of the video decoder 30.
  • the prediction unit 81 includes an inter prediction unit (not shown) and an intra prediction unit 84.
  • the inter prediction unit may be, for example, a motion compensation unit 82.
  • video decoder 30 may perform an exemplary reciprocal decoding process with respect to the encoding flow described by video encoder 20 from FIG.
  • video decoder 30 receives from video encoder 20 an encoded video bitstream representing the video blocks of the encoded video slice and associated syntax elements.
  • Entropy encoding unit 80 of video decoder 30 entropy decodes the code stream to produce quantized coefficients, motion vectors, and other syntax elements.
  • the entropy encoding unit 80 forwards the motion vectors and other syntax elements to the prediction unit 81.
  • Video decoder 30 may receive syntax elements at the video stripe level and/or video block level.
  • intra-prediction unit 84 of prediction unit 81 may be based on the signaled intra prediction mode and data from the previously decoded block of the current frame or image. The predicted data of the video block of the current video stripe is generated.
  • motion compensation unit 82 of prediction unit 81 When the video image is decoded into an inter-frame decoded (eg, B, P, or GPB) stripe, motion compensation unit 82 of prediction unit 81 generates a current video based on the motion vectors and other syntax elements received from entropy encoding unit 80.
  • the prediction block may be generated from one of the reference images within one of the reference image lists.
  • Video decoder 30 may construct a reference image list (List 0 and List 1) using default construction techniques based on reference images stored in reference image memory 92.
  • Motion compensation unit 82 determines the prediction information for the video block of the current video slice by parsing the motion vector and other syntax elements, and uses the prediction information to generate a prediction block of the current video block that is being decoded. For example, motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (eg, intra prediction or inter prediction) of the video block used to decode the video slice, an inter prediction strip type (eg, B strip, P strip or GPB strip), strip reference Construction information of one or more of the image lists, motion vectors of each inter-coded video block of the stripe, inter-prediction status of each inter-coded video block of the stripe, and decoding of the current video stripe Additional information for the video block in .
  • a prediction mode eg, intra prediction or inter prediction
  • an inter prediction strip type eg, B strip, P strip or GPB strip
  • strip reference Construction information of one or more of the image lists
  • motion vectors of each inter-coded video block of the stripe inter-prediction status of each
  • Motion compensation unit 82 may also perform interpolation based on the interpolation filter. Motion compensation unit 82 may use the interpolation filters as used by video encoder 20 during encoding of the video block to calculate interpolated values for sub-integer pixels of the reference block. In this application, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use an interpolation filter to generate the prediction blocks.
  • motion compensation unit 82 may generate a candidate list for the PU. Data identifying the location of the selected candidate in the candidate list of the PU may be included in the code stream. After generating the candidate list for the PU, 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. The reference block of the PU may be in a different time image than the PU. Motion compensation unit 82 may determine motion information for the PU based on the selected motion information from the candidate list of PUs.
  • Inverse quantization unit 86 inverse quantizes (eg, dequantizes) the quantized transform coefficients provided in the codestream and decoded by 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 of the video slices, and likewise determining the degree of inverse quantization that should be applied.
  • Inverse transform unit 88 applies an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce a residual block in the pixel domain.
  • video decoder 30 sums the residual block from inverse transform unit 88 with the corresponding prediction block generated by motion compensation unit 82.
  • a decoded video block is formed.
  • Summer 90 ie, the reconstructor
  • a deblocking filter can also be applied to filter the decoded blocks to remove blockiness artifacts as needed.
  • Other loop filters 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 display device 32 of FIG.
  • the techniques of the present application illustratively relate to inter-frame decoding. It should be understood that the techniques of the present application can be performed by any of the video decoders described in this application, including, for example, video encoder 20 and video decoding as shown and described with respect to Figures 1 through 3 30. That is, in one possible implementation, the prediction unit 41 described with respect to FIG. 2 may perform the specific techniques described below when performing inter prediction during encoding of blocks of video data. In another possible implementation, the prediction unit 81 described with respect to FIG. 3 may perform the specific techniques described below when performing inter prediction during decoding of blocks of video data. Thus, references to a generic "video encoder" or "video decoder” may include video encoder 20, video decoder 30, or another video encoding or encoding unit.
  • video decoder 30 may be used to decode the encoded video bitstream. For example, for certain image blocks or image frames, entropy decoding unit 80 of video decoder 30 does not decode the quantized coefficients, and accordingly does not need to be processed by inverse quantization unit 86 and inverse transform unit 88.
  • FIG. 4 is an exemplary flowchart of encoding motion information of a current image block (eg, a current PU or a current CU) by a video encoder (eg, video encoder 20) performing a merge operation 200 in an embodiment of the present application.
  • the video encoder may perform a merge operation other than the merge operation 200.
  • the video encoder may perform a merge operation in which the video encoder performs more than 200 steps, or steps different from the merge operation 200, than the merge operation.
  • 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 the PU encoded in a skip mode.
  • the video encoder may generate a candidate list for the current PU (202).
  • the video encoder can 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. 6A, 6B-10.
  • the candidate list for the current PU may include temporal candidate motion information (referred to as a temporal candidate).
  • the temporal candidate motion information may indicate motion information of a time-domain co-located PU.
  • the co-located PU may be spatially co-located with the current PU at the same location in the image frame, but in the reference image rather than the current image.
  • the present application may refer to a reference image including a PU corresponding to a time domain as a related reference image.
  • the present application may refer to a reference image index of an associated reference image as a related reference image index.
  • 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 can be associated with a combined reference image list.
  • the associated reference image index is a reference image index of the PU that encompasses the reference index source location associated with the current PU.
  • the reference index source location associated with the current PU is adjacent to or adjacent to the current PU.
  • a PU may "cover" the particular location if the image block associated with the PU includes a particular location.
  • the reference index source location associated with the current PU is within the current CU.
  • the PU if the PU is above or to the left of the current CU, the PU that covers the reference index source location associated with the current PU may be considered available.
  • the video encoder may need to access motion information of another PU of the current CU in order to determine a reference image containing the co-located PU. Accordingly, these video encoders may use motion information (ie, reference image index) of PUs belonging to the current CU to generate temporal candidates for the current PU. In other words, these video encoders can generate temporal candidates using motion information for PUs belonging to the current CU. Accordingly, the video encoder cannot generate a candidate list for the current PU and the PU that covers the reference index source location associated with the current PU in parallel.
  • a video encoder can explicitly set an associated reference image index without reference to a reference image index of any other PU. This may enable the video encoder to generate candidate lists for other PUs of the current PU and the current CU in parallel. Because the video encoder explicitly sets the relevant reference picture index, the associated reference picture index is not based on motion information of any other PU of the current CU. In some possible implementations in which the video encoder explicitly sets the relevant reference image index, the video encoder may always set the relevant reference image index to a fixed predefined preset reference image index (eg, 0). In this way, the video encoder may generate a temporal candidate based on the motion information of the co-located PU in the reference frame indicated by the preset reference image index, and may include the temporal candidate in the candidate list of the current CU.
  • a fixed predefined preset reference image index eg, 0
  • the video encoder can be explicitly used in a syntax structure (eg, an image header, a stripe header, an APS, or another syntax structure) Signals the relevant reference image index.
  • the video encoder can signal the decoder for each LCU (ie CTU), An associated reference image index of a CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the associated reference picture index for each PU of the CU is equal to "1.”
  • the associated reference image index can be set implicitly rather than explicitly.
  • the video encoder may generate motion information for the PU of the current CU using the motion information of the PU in the reference image indicated by the reference image index of the PU covering the location outside the current CU. A time candidate, even if these locations are not strictly adjacent to the current PU.
  • the video encoder may generate a predictive image block (204) associated with the candidate in the candidate list.
  • 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 the one or more reference blocks indicated by the motion information of the current PU.
  • Sexual image block The video encoder may select one of the candidates from the candidate list (206).
  • the video encoder can select candidates in a variety of ways. For example, the video encoder may select one of the candidates based on a rate-distortion cost analysis for each of the predictive image blocks associated with the candidate.
  • the video encoder may output an index of the candidate (208).
  • the index may indicate the location of the selected candidate in the candidate list.
  • the index can be expressed as "merge_idx".
  • FIG 5 is an exemplary flow diagram of motion compensation performed by a video decoder (e.g., video decoder 30) in an embodiment of the present application.
  • a video decoder e.g., video decoder 30
  • the video decoder may receive an indication for the selected candidate for the current PU (222). For example, the video decoder may receive a candidate index indicating the location of the selected candidate within the current PU's candidate list.
  • the video decoder may receive the first candidate index and the second candidate index.
  • the first candidate index indicates the location of the selected candidate for the list 0 motion vector of the current PU in the candidate list.
  • the second candidate index indicates the location of the selected candidate for the list 1 motion vector for the current PU in the candidate list.
  • a single syntax element can be used to identify two candidate indices.
  • the video decoder can generate a candidate list for the current PU (224).
  • the video decoder can generate this candidate list for the current PU in various ways.
  • the video decoder may use the techniques described below with reference to Figures 6A, 6B-10 to generate a candidate list for the current PU.
  • the video decoder may explicitly or implicitly set a reference image index identifying the reference image including the co-located PU, as previously described with respect to FIG. .
  • the video decoder may determine motion information for the current PU based on the motion information indicated by the 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 the 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 the AMVP mode, the video decoder may reconstruct using one or more motion vectors indicated by the or the selected candidate and one or more MVDs indicated in the code stream One or more motion vectors of the current PU.
  • the reference image index and the prediction direction identifier of the current PU may be the same as the reference image index and the 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).
  • the video decoder generates a candidate list (224) for the current PU, and once the number of available candidates collected is determined by the received candidate index. When the number of candidates is the same, the process of collecting candidates can be ended.
  • FIG. 6A is an exemplary schematic diagram of a coding unit (CU), a spatial neighboring image block associated therewith, and a time domain neighboring image block in the embodiment of the present application, illustrating that the CU 600 and the exemplary candidate location associated with the CU 600 are 1 Schematic diagram of 10.
  • Candidate positions 1 through 5 represent spatial candidates in the same image as CU 600.
  • Candidate position 1 is located to the left of CU600.
  • Candidate position 2 is located above CU600.
  • the candidate position 3 is positioned at the upper right of the CU600.
  • the candidate position 4 is located at the lower left of the CU600.
  • the candidate position 5 is positioned at the upper left of the CU600.
  • Candidate locations 6 through 10 represent temporal candidates associated with co-located block 602 of CU 600, where the co-located block is of the same size, shape, and coordinates as CU 600 in the reference image (ie, adjacent to the encoded image) Image block.
  • the candidate location 6 is located in the lower right corner of the co-located block 602.
  • the candidate location 7 is located at the lower right middle of the co-located block 602.
  • the candidate location 8 is located at the upper left corner of the co-located block 602.
  • the candidate location 9 is located at the lower right corner of the co-located block 602.
  • the candidate location 10 is located at the upper left middle position of the co-located block 602.
  • FIG. 6A is an illustrative implementation to provide a candidate location for an inter prediction module (eg, motion estimation unit 42 or motion compensation unit 82 in particular) to generate a candidate list.
  • an inter prediction module eg, motion estimation unit 42 or motion compensation unit 82 in particular
  • the spatial candidate location and the temporal candidate location in FIG. 6A are merely illustrative, and the candidate location includes but is not limited thereto.
  • the spatial candidate location may also optionally include a location within a preset distance from the image block to be processed, but not adjacent to the image block to be processed.
  • this type of location can be as shown by 6 to 27 in Figure 6B.
  • FIG. 6B is an exemplary schematic diagram of a coding unit and a spatial neighboring image block associated therewith in the embodiment of the present application.
  • the position of the image block not adjacent to the image block to be processed that has been reconstructed when the image block to be processed is in the same image frame as the image block to be processed also belongs to the range of the spatial candidate position.
  • This type of location is referred to herein as a spatial non-contiguous image block, it being understood that the spatial candidate may be taken from one or more locations as shown in Figure 6B.
  • FIG. 7 is a schematic flowchart showing an acquisition process 700 of candidate motion information of an image block according to an embodiment of the present application.
  • Process 700 may be performed by video encoder 20 or video decoder 30, and in particular, may be performed by an inter prediction unit of video encoder 20 or an inter prediction unit of video decoder 30.
  • the inter prediction unit is illustrative and may include motion estimation unit 42 and motion compensation unit 44.
  • the inter prediction unit is illustrative and may include motion compensation unit 82.
  • the inter prediction unit may generate a candidate motion information list for the PU.
  • the candidate motion information list may include one or more original candidate motion information and one or more additional candidate motion information derived from the original candidate motion information.
  • process 700 can include acquisition process 710 of original candidate motion information and acquisition process 730 of additional/additional candidate motion information, which is described as a series of steps or operations, it being understood that process 700 can be in various orders Execution and/or simultaneous occurrence are not limited to the execution sequence shown in FIG. Assuming that a video data stream having multiple video frames is using a video encoder or video decoder, a process 700 comprising the steps of predicting candidate motion information for a current image block of a current video frame is performed;
  • Step 711 Detect one or more spatial reference blocks of the current image block according to the first preset sequence, and obtain M sets of original candidate motion information in the candidate list of the to-be-processed image block (or obtain for constructing The M sets of original candidate motion information of the candidate list of the image block to be processed, M is an integer greater than or equal to 0;
  • the detection herein may include an "available” inspection process as referred to elsewhere herein, or the detection herein may include “available” inspections as described elsewhere herein, as well as trimming (eg, de-redundancy) processes. ,No longer.
  • one or more spatial reference blocks of the current image block include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block, and/or the current image One or more spatial reference blocks in the image in which the block is located that are not adjacent to the image block to be processed. As shown in FIG.
  • the one or more spatial reference blocks adjacent to the current image block in the image of the current image block may include: a fourth airspace adjacent block A0 located at the lower left side of the current image block, located at a first airspace neighboring block A1 on the left side of the current image block, a third airspace neighboring block B0 located on the upper right side of the current image block, a second airspace adjacent block B1 on the upper side of the current image block, or located in the The fifth airspace on the upper left side of the current image block is adjacent to the block B2. As shown in FIG.
  • the one or more spatial reference blocks that are not adjacent to the image block to be processed in the image of the current image block may include: a first spatial non-contiguous image block and a second spatial non-contiguous image block. And a third airspace non-contiguous image block or the like.
  • step 711 the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block are sequentially detected.
  • B2 is available to obtain M1 determined motion vector images in the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2
  • the motion information of the block, M1 is an integer greater than or equal to 0,
  • the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
  • step 711 the first spatial non-contiguous image block, the second spatial non-contiguous image block, and the third spatial non-contiguous image block may be used.
  • the physical meaning of "available” may refer to the foregoing. The description will not be repeated.
  • the motion vector of the first spatial neighboring block A1, the motion vector of the second spatial neighboring block B1, the motion vector of the third spatial neighboring block B0, the motion vector of the fourth spatial neighboring block A0, the motion vector obtained by the ATMVP technique is respectively MVL, MVU, MVUR, MVDL, MVA, MVUL, MVS, and the first spatial non-contiguous image block, the second spatial non-contiguous image block, and
  • the motion vectors of the third spatial non-contiguous image block are respectively MV0, MV1, MV2, and then may be checked in the following order to obtain M candidates (ie, M candidate motion vectors) used in the construction candidate list:
  • Example 1 MVL, MVU, MVUR, MVDL, MV0, MV1, MV2, MVA, MVUL, MVS;
  • Example 2 MVL, MVU, MVUR, MVDL, MVA, MV0, MV1, MV2, MVUL, MVS;
  • Example 3 MVL, MVU, MVUR, MVDL, MVA, MVUL, MV0, MV1, MV2, MVS;
  • Example 4 MVL, MVU, MVUR, MVDL, MVA, MVUL, MVS, MV0, MV1, MV2;
  • Example 5 MVL, MVU, MVUR, MVDL, MVA, MV0, MVUL, MV1, MVS, MV2;
  • Example 6 MVL, MVU, MVUR, MVDL, MVA, MV0, MVUL, MV1, MV2, MVS;
  • Example 7 MVL, MVU, MVUR, MVDL, MVA, MVUL, MV0, MV1, MV2, MVS;
  • Examples 1 through 7 exemplarily show several possible M original candidate motion vectors for constructing a candidate list. Based on the motion vector of the spatial non-contiguous image block, there may be other ways of composing the candidate list and the arrangement of the candidates in the list, which are not limited.
  • motion vectors for example, MV0, MV1, and MV2
  • MV0, MV1, and MV2 may also have different arrangements, which is not limited in this embodiment of the present application.
  • the motion vector of the spatial non-contiguous image block is simultaneously used as the spatial candidate in the candidate list of the to-be-processed block, and more spatial a priori coding information is utilized to improve The coding performance.
  • Step 713 Detect one or more time domain reference blocks of the current image block according to a second preset sequence, and obtain L sets of original candidate motion information in the candidate list of the to-be-processed image block (or obtain L sets of original candidate motion information for constructing a candidate list of the image block to be processed, L is an integer greater than or equal to 0;
  • one or more time domain reference blocks of a current image block may be understood as an image block in a co-located block of a current image block or a spatial neighboring block of a co-located block of a current image block, and may include, for example:
  • the lower right spatial domain of the co-located block of the current image block is adjacent to the block H, the upper left intermediate block C0 of the co-located block, the lower right intermediate block C3 of the co-located block, the same position An upper left block TL of the block, or a lower right block BR of the same location block, wherein the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • step 713 the right lower airspace neighboring block H of the co-located block and the lower right intermediate block C3 of the co-located block are sequentially detected to obtain L1 determined motion vector images. Motion information of the block; or
  • L1 is equal to or greater than L
  • L2 is equal to or greater than L
  • L3 is equal to or greater than L
  • L1, L2, and L3 are all integers greater than or equal to zero.
  • motion information of the different time domain reference blocks may also have different arrangement manners, which is not limited by the embodiment of the present application.
  • the detecting condition of the other time domain reference block that is not adjacent to the block H of the lower right spatial domain of the co-located block may include: the right lower airspace neighboring block H of the co-located block is not available. Or, the number of candidate motion information in the candidate list is less than the target number.
  • Step 731 When the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information (also referred to as bidirectional prediction) of at least one set of bidirectional prediction types included in the candidate list. Performing decomposition processing on the original candidate motion information of the encoding/decoding mode to obtain Q in the candidate list of the image block to be processed A newly constructed unidirectional prediction type candidate motion information (also referred to as candidate motion information of a unidirectional prediction encoding/decoding mode), and Q is an integer greater than or equal to zero.
  • the original candidate motion information of a set of bidirectional prediction types may include: motion information for a forward prediction direction and motion information for a backward prediction direction, where the motion information for the forward prediction direction includes the first a reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; the motion information for the backward prediction direction includes the second a reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index;
  • the Q-group newly constructed unidirectional prediction type candidate motion information may include: a unidirectional prediction type is a set of motion information in a forward prediction direction and/or a unidirectional prediction type is a backward prediction direction.
  • Group motion information wherein the set of motion information of the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a first reference corresponding to the first reference image index a motion vector of the image; the set of motion information of the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a second reference corresponding to the second reference image index The motion vector of the image. It should be understood that if the newly constructed candidate motion information is repeated with existing candidates in the candidate list, the newly constructed candidate motion information does not need to be added to the candidate list.
  • the method further includes:
  • Step 733 when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original of the two sets of unidirectional prediction types (unidirectional prediction encoding/decoding mode) included in the candidate list
  • the candidate motion information is combined to obtain candidate motion information (candidate motion information of the bidirectional prediction encoding/decoding mode) of the P group newly constructed in the candidate list of the to-be-processed image block, where P is greater than or equal to 0.
  • the integer is
  • the combination refers to motion information using a forward prediction encoding/decoding mode (ie, a set of unidirectional prediction type original candidate motion information) and motion information using a backward prediction encoding/decoding mode (ie, another set of unidirectional predictions)
  • the original candidate motion information of the type is combined to obtain motion information using a bidirectional predictive encoding/decoding mode (ie, a set of newly constructed bidirectional prediction type candidate motion information).
  • a motion information using a forward predictive encoding/decoding mode includes a reference image set of list0, a reference index of 1 reference image, and a motion vector of (-3, -5).
  • a motion information using a backward predictive encoding/decoding mode includes a reference image set of list1, a reference index of reference index 0, and a motion vector of (3, 5).
  • the motion information of the combined bidirectional prediction encoding/decoding mode includes: the forward prediction motion information is a reference image set as list0, the reference index is 1 reference image, and the motion vector is (-3, -5); The predicted motion information is a reference image set as list1, a reference index is 0, and the motion vector is (3, 5).
  • the decomposition is a combined inverse process, which refers to splitting motion information using a bidirectional predictive coding/code mode (ie, a set of bidirectional prediction type original candidate motion information) into motion information using a backward predictive encoding/decoding mode ( That is, a set of newly constructed unidirectional prediction type candidate motion information) and a motion information using a forward prediction encoding/decoding mode (ie, another set of newly constructed unidirectional prediction type candidate motion information).
  • a bidirectional predictive coding/code mode ie, a set of bidirectional prediction type original candidate motion information
  • a backward predictive encoding/decoding mode That is, a set of newly constructed unidirectional prediction type candidate motion information
  • a forward prediction encoding/decoding mode ie, another set of newly constructed unidirectional prediction type candidate motion information
  • the motion information in the bidirectional predictive encoding/decoding mode includes: the forward predicted motion information is a reference image set as list0, the reference index is 1 reference image, the motion vector is (-3, -5), and the backward predictive motion is The information is reference image set as list1, reference index is 0 reference image, motion vector For (3,5).
  • motion information using a forward prediction encoding/decoding mode can be respectively obtained, wherein the motion information is a reference image set list0, a reference index is 1 reference image, a motion vector is (-3, -5);
  • the motion information of the backward prediction encoding/decoding mode is adopted, wherein the motion information is a reference image set as list1, a reference index is 0, and the motion vector is (3, 5).
  • the embodiment of the present invention may further include:
  • Step 735 when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, for example, if the additional candidate generated by the foregoing manner is still insufficient, the video encoder or the video decoder may also insert zero.
  • Motion vectors are used as candidate motion information to generate additional or additional candidates. These additional or additional candidate motion information are not considered raw candidate motion information and may be referred to as late or artificially generated candidate motion information in this application.
  • Candidate motion information (eg, candidate motion information of a unidirectional prediction type generated by decomposition, candidate motion information of a bidirectional prediction type combined) to obtain more available candidate motion information for constructing a candidate list, thereby
  • the number of candidates in the candidate list can satisfy the target number (for example, the preset maximum number of candidate motion information in the candidate list, or can be obtained by parsing from the code stream)
  • the index identifies the number of candidate motion information determined.
  • the method for acquiring the candidate motion information in this embodiment can be applied to the inter-frame codec process of the video image codec, thereby improving the coding performance.
  • FIG. 8 is another exemplary flowchart of a method for acquiring candidate motion information of an image block in an embodiment of the present application.
  • Process 800 may be performed by a video encoding end (e.g., video encoder 20) or a video decoding end (e.g., video decoder 30).
  • the schematic process of the video encoding end acquiring candidate motion information to construct a candidate list is as follows:
  • Steps 801 to 805 in the case of the merge mode, in the process of collecting candidate motion information input, performing motion information detection on neighboring neighboring blocks in the current coded block airspace, and if available, as candidate motion information;
  • Step 807 When the number of available candidate motion information does not reach the maximum value of the candidate motion information, whether the motion information on the time domain reference block is detected may be used as candidate motion information.
  • Step 809 when it can be used as candidate motion information, determine whether the number of available candidate motion information has reached the maximum value of the preset candidate motion information
  • Step 811 When the number of available candidate motion information does not reach the maximum value of the candidate motion information, the existing candidate motion information is used to construct the bidirectional prediction motion information, and whether the newly constructed bidirectional motion information can be used as the candidate motion information;
  • Steps 813 to 817 when the number of available candidate motion information does not reach the maximum value of the candidate motion information, constructing the unidirectional prediction motion information by using the candidate motion information that has been bidirectionally predicted, and determining whether the newly constructed unidirectional prediction motion information is Can be used as candidate motion information;
  • Step 825 when the number of available candidate motion information reaches the maximum value of the candidate motion information, the process of collecting the candidate motion information is ended.
  • Step 823 when the number of available candidate motion information does not reach the maximum value of the candidate motion information, the process of collecting the candidate motion information is continued.
  • the schematic process of the video decoder acquiring candidate motion information to construct a candidate list is as follows:
  • Steps 801 to 805 in the case of the merge mode, in the process of collecting candidate motion information input, detecting motion information of neighboring neighboring blocks in the current coded block airspace;
  • If available, as candidate motion information compare the number of available candidate motion information with the target number determined by the index value received by the video decoder;
  • the motion information of the neighboring block in the current decoded block spatial domain is used as the best candidate motion information (ie, for the current image block to be decoded)
  • the selected candidate motion information also referred to as target candidate motion information
  • step 807 If the number of available candidate motion information is different from the target number determined by the video decoder, the step 807 is performed;
  • Steps 807 to 809 detecting whether motion information on the time domain reference block can be used as candidate motion information; if available, as candidate motion information, determining the number of available candidate motion information and the index value received by the video decoder The number of targets is compared;
  • the motion information is motion information of the image block to be decoded or motion information of the image block to be decoded by using motion information on the current time domain reference block, and the process of collecting the candidate motion information is ended;
  • step 811 If the number of available candidate motion information is different from the target number determined by the video decoder, continue to step 811;
  • Steps 811 to 815 combining the existing candidate motion information to construct bidirectional prediction motion information, and determining whether the newly constructed bidirectional prediction motion information is available as candidate motion information;
  • If available, as candidate motion information compare the number of available candidate motion information with the target number determined by the index value received by the video decoder;
  • determining that the currently constructed bidirectional prediction motion information is the best candidate motion information that is, determining the currently constructed bidirectional prediction motion information is to be determined. Decoding the motion information of the image block or determining the motion information of the image block to be decoded by using the currently constructed bidirectional prediction motion information, and ending the process of collecting the candidate motion information;
  • step 817 If the number of available candidate motion information and the index value are different from the target value determined by the video decoder, continue to step 817;
  • Steps 817 to 821 constructing unidirectional prediction motion information by using the existing bidirectionally predicted candidate motion information, and determining whether the newly constructed unidirectional prediction motion information is available as candidate motion information;
  • the newly constructed unidirectional prediction motion information can be used as candidate motion information, it is determined whether the number of available candidate motion information is consistent with the target number determined by the index value received by the video decoder;
  • determining the newly constructed unidirectional prediction motion information as the best candidate motion information that is, determining the newly constructed unidirectional prediction motion information Determining motion information of the image block to be decoded for motion information of the image block to be decoded or using newly constructed unidirectional prediction motion information, the process ends;
  • step 823 is performed.
  • Step 823 continuing to perform the process of collecting candidate motion information
  • Step 825 ending the process of collecting candidate motion information.
  • the candidate index received by the decoding end is "1"
  • it indicates that the selected candidate motion information for the current image block to be decoded is a candidate on the index position 0 in the composite candidate list
  • the index value obtained by decoding at the decoding end is 4, and in the process of acquiring candidate motion information in the synthesized Merge mode, the right lower airspace of the co-located block of the currently decoded block is adjacent to the block H of the right-hand domain.
  • the motion information may be used as the candidate motion information.
  • the number of available candidate motion information is 3, and the number of targets derived from the index value is different, and the motion information of the intermediate block C0 or C3 of the same location block may not be determined as available.
  • the number of candidate motion information available at this time is 3, which is different from the number of targets derived from the index value.
  • the number of available candidate motion information at this time is 4, which is the same as the number of targets derived from the index value. .
  • the motion information of the constructed unidirectional prediction type is selected as the best candidate motion information (ie, the selected candidate motion information for the current image block to be decoded), and the process of acquiring the candidate motion information is ended.
  • the number of candidate motion information in the candidate list to be constructed is obtained according to the index value.
  • the number of candidate motion information acquired is sufficient to determine the target candidate motion information by using the index value, that is, the target candidate motion information in the candidate list.
  • the other candidate motion information in the candidate list is stopped.
  • the decoder to construct the candidate list, one is to detect one side matching as described above, and the other is that after the candidate list is all constructed, it is matched with the index value to determine which candidate to select.
  • the motion information that is, the candidate motion vector at the position indicated by the index is found from the established candidate list.
  • the foregoing candidate list may be used in the Merge mode described above, or in other prediction modes for acquiring a predicted motion vector of a to-be-processed image block, and may be used in the encoding end, or may be consistent with the corresponding encoding end.
  • the number of candidates in the candidate list is also the preset maximum number, and is consistent at the codec end, and the specific number is not limited. In this case, the operation of the decoding end refers to the decoding end, here No longer.
  • FIG. 9 is an exemplary schematic diagram of adding a decomposed candidate motion vector to a merge mode candidate list in the embodiment of the present application.
  • a merging prediction type of merging candidate is generated by decomposing the original merging candidate of the bidirectional prediction type.
  • one of the original candidates of the bi-prediction type (which has mvL0 and refIdxL0, and mvL1 and refIdxL1) can be used to generate two unidirectional predictive merge candidates.
  • a raw merge candidate of one bidirectional prediction type (having mvL0_A and ref0 in list 0 and mvL1_B and ref0 in list 1) is included in the original merge candidate list at index position 0.
  • a newly constructed unidirectional prediction type candidate ie, the prediction type is list 0 unidirectional prediction, and mvL0_A and ref0 are picked up from list 0.
  • Another newly constructed unidirectional prediction type candidate the prediction type is list 1 unidirectional prediction, and mvL1_B and ref0 are picked up from list 1. It is checked whether the newly constructed merge candidate is different from the candidate already included in the merge candidate list. If they are different, the video decoder or video encoder includes the newly constructed unidirectional prediction type of merge candidate in the merge candidate list.
  • FIG. 10 is an exemplary schematic diagram of adding a combined candidate motion vector to a merge mode candidate list in the embodiment of the present application.
  • the combined bi-predictive merge candidate can be generated by combining the original merge candidates.
  • two of the original candidates (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) may be used to generate bi-predictive merge candidates.
  • two candidates are included in the original merge candidate list.
  • the prediction type of one candidate is list 0 unidirectional prediction
  • the prediction type of another candidate is list 1 unidirectional prediction.
  • mvL0_A and ref0 are picked up from list 0
  • mvL1_B and ref0 are picked up from list 1
  • bidirectional predictive merge candidates which have mvL0_A and ref0 in list 0 and list 1
  • mvL1_B and ref0 the video decoder may include bi-predictive merge candidates in the candidate list.
  • the generated candidate is added to the merge candidate list.
  • the process of determining whether a candidate is different from a candidate already included in the candidate list is sometimes referred to as pruning.
  • each newly generated candidate can be compared to an existing candidate in the list.
  • the pruning operation may include comparing one or more new candidates to candidates that are already in the candidate list and new candidates that are not added as duplicates of candidates already in the candidate list.
  • the pruning operation can include adding one or more new candidates to the candidate list and later removing the duplicate candidates from the list.
  • FIG. 11 is a schematic block diagram of an apparatus 1100 for acquiring candidate motion information of an image block in an embodiment of the present application.
  • the candidate motion information is used to construct a candidate list for inter prediction, and the apparatus 1100 for acquiring candidate motion information of the image block includes:
  • the airspace candidate motion information acquiring module 1101 is configured to detect one or more spatial reference blocks of the current image block according to the first preset sequence, and obtain M sets of original candidate motion information in the candidate list of the to-be-processed image block.
  • M is an integer greater than or equal to 0;
  • the time domain candidate motion information acquiring module 1102 is configured to detect one or more time domain reference blocks of the current image block according to a second preset sequence, to obtain an L group in the candidate list of the to-be-processed image block.
  • Raw candidate motion information, L is an integer greater than or equal to 0;
  • An additional candidate motion information acquiring module 1103, configured to: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than a target number, the original candidate motion of at least one set of bidirectional prediction types included in the candidate list The information is subjected to decomposition processing to obtain candidate motion information of the unidirectional prediction type newly constructed by the Q group in the candidate list of the image block to be processed, and Q is an integer greater than or equal to 0.
  • the original candidate motion information of the set of bidirectional prediction types includes: motion information for a forward prediction direction and motion information for a backward prediction direction, where the The motion information of the prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index;
  • the motion information of the prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index;
  • the candidate motion information of the unidirectional prediction type newly constructed by the Q group includes: a group of motion information of a unidirectional prediction type being a forward prediction encoding/decoding mode and/or
  • the unidirectional prediction type is a set of motion information of a backward prediction encoding/decoding mode, wherein the set of motion information of the forward prediction encoding/decoding mode includes a first reference image list and a first corresponding to the first reference image list a reference image index and a motion vector of the first reference image corresponding to the first reference image index; the set of motion information of the backward predictive encoding/decoding mode includes a second reference image list and corresponding to the second reference image list And a second reference image index and a motion vector of the second reference image corresponding to the second reference image index.
  • the additional candidate motion information acquiring module is further configured to: include in the candidate list
  • the original candidate motion information of the two sets of unidirectional prediction types is combined to obtain candidate motion information of the P-group newly constructed bidirectional prediction type in the candidate list of the image block to be processed, and P is an integer greater than or equal to 0.
  • the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block, and/or the current image One or more spatial reference blocks in the image in which the block is located that are not adjacent to the image block to be processed.
  • the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
  • a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block.
  • the airspace candidate motion information acquiring module is configured to:
  • the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
  • the one or more time domain reference blocks include: a lower right spatial domain adjacent block H of a co-located block of the current image block, where the same location block An upper left intermediate block C0, a lower right intermediate block C3 of the same location block, an upper left block TL of the same location block, or a lower right block BR of the same location block, wherein the same location block is in a reference image An image block having the same size, shape, and coordinates as the current image block.
  • the time domain candidate motion information acquiring module is configured to:
  • L1 is equal to or greater than L
  • L2 is equal to or greater than L
  • L3 is equal to or greater than L
  • L1, L2, and L3 are all integers greater than or equal to zero.
  • the apparatus 1100 is configured to encode or decode a video image, where the target number is a preset maximum number of candidate motion information in a candidate list of the current image block; or, the device 1100 For decoding a video image, the target number is the number of candidate motion information determined using an index identifier parsed from the code stream.
  • candidate motion information eg, candidate motion information of a unidirectional prediction type generated by decomposition, candidate motion information of a bidirectional prediction type combined
  • target number for example, the preset maximum number of candidate motion information in the candidate list, or the number of candidate motion information determined using the index identification parsed from the code stream
  • the motion vector image block is determined to be an image block whose motion vector has been determined when predicting an image block to be processed, and may be an image block that has been reconstructed or an image block that has not been reconstructed. , no restrictions.
  • FIG. 12 is a schematic block diagram of an implementation manner of an encoding device or a decoding device (referred to as decoding device 1200 for short) in an embodiment of the present application.
  • the decoding device 1200 can include a processor 1210, a memory 1230, and a bus system 1250. Wherein the processor and the memory are connected by a bus system, the memory is used for storing instructions, and the processor is used for Execute the instructions stored in this memory.
  • the memory of the encoding device stores the program code, and the processor can invoke the program code stored in the memory to perform various video encoding or decoding methods described herein, particularly video encoding or decoding methods in various new inter prediction modes. And methods of predicting motion information in various new inter prediction modes. To avoid repetition, it will not be described in detail here.
  • the processor 1210 may be a central processing unit (“CPU"), and the processor 1210 may also be other general-purpose processors, digital signal processors (DSPs), and dedicated integration. Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 1230 can include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device can also be used as the memory 1230.
  • Memory 1230 can include code and data 1231 that are accessed by processor 1210 using bus 1250.
  • the memory 1230 can further include an operating system 1233 and an application 1235 that includes a video encoding or decoding method (especially an acquisition method of candidate motion information for an image block described herein) that allows the processor 1210 to perform the methods described herein.
  • application 1235 can include applications 1 through N, which further include a video encoding or decoding application (referred to as a video coding application) that performs the video encoding or decoding methods described herein.
  • the bus system 1250 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 1250 in the figure.
  • decoding device 1200 may also include one or more output devices, such as display 1270.
  • display 1270 can be a tactile display that combines the display with a tactile unit that operatively senses a touch input.
  • Display 1270 can be coupled to processor 1210 via bus 1250.
  • the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code via a computer readable medium and executed by a hardware-based processing unit.
  • the computer readable medium can comprise a computer readable storage medium or communication medium, the computer readable storage medium corresponding to a tangible medium such as a data storage medium, the communication medium comprising facilitating transmission of the computer program, for example, from one location to another in accordance with a communication protocol Any media.
  • computer readable media may illustratively correspond to (1) a non-transitory tangible computer readable storage medium, or (2) a communication medium such as a signal or carrier wave.
  • Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the techniques described in this application.
  • the computer program product can comprise a computer readable medium.
  • the computer readable storage medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage device, magnetic disk storage device or other magnetic storage device, flash memory or may be used to store instructions. Or any other medium in the form of a data structure and accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if you use coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave to transmit commands from a website, server, or other remote source, then coaxial Cables, fiber optic cables, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the media.
  • coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the media.
  • computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead are directed to non-transitory tangible storage media.
  • magnetic disks and optical disks include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), flexible disks, and Blu-ray discs, in which disks typically reproduce data magnetically, while discs pass through thunder. The projection optically reproduces the data. Combinations of the above should also be included in the scope of computer readable media.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable gate arrays
  • processors may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein.
  • functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques can be fully implemented in one or more circuits or logic elements.
  • the techniques of the present application can be implemented in a wide variety of devices or devices, including wireless handsets, integrated circuits (ICs), or a collection of ICs (eg, a chipset).
  • ICs integrated circuits
  • a collection of ICs eg, a chipset.
  • Various components, modules or units are described herein to emphasize functional aspects of the apparatus configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Rather, as described above, various units may be combined in a codec hardware unit or combined with suitable software and/or firmware by interoperable hardware units (including one or more processors as described above). The collection comes to offer.

Abstract

A method for obtaining candidate motion information of an image block. The candidate motion information is used for constructing an inter-frame prediction candidate list. The method comprises: detecting one or more spatial reference blocks of a current image block according to a first preset sequence to obtain M sets of original candidate motion information in a candidate list of the current image block; detecting one or more temporal reference blocks of the current image block according to a second preset sequence to obtain L sets of original candidate motion information in a candidate list of an image block to be processed; and if the quantity of candidate motion information in the candidate list of the image to be processed is less than a target quantity, decomposing at least one set of original candidate motion information of the bidirectional prediction type comprised in the candidate list to obtain Q sets of newly constructed candidate motion information of the unidirectional prediction type in the candidate list of the image block to be processed. The technical solution of the present application improves the predictive accuracy of motion vectors of the image block and increases the coding and decoding performance.

Description

图像块的候选运动信息的获取方法、装置及编解码器Method, device and codec for acquiring candidate motion information of image block 技术领域Technical field
本申请涉及视频图像编解码技术领域,尤其涉及图像块的候选运动信息的获取方法、装置、编码器以及解码器。The present application relates to the field of video image coding and decoding technologies, and in particular, to a method, an apparatus, an encoder, and a decoder for acquiring candidate motion information of an image block.
背景技术Background technique
通过视频压缩技术,例如MPEG-2、MPEG-4、ITU-TH.263、ITU-TH.264/MPEG-4第10部分高级视频编解码(advanced video coding,AVC)、ITU-TH.265高效率视频编解码(high efficiency video coding,HEVC)标准和所述标准的扩展部分中所描述的那些视频压缩技术,设备之间可以实现高效地发射及接收数字视频信息。通常情况下,视频序列的图像被划分成图像块进行编码或解码。Through video compression technology, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4 Part 10 advanced video coding (AVC), ITU-TH.265 high Efficiently transmitting and receiving digital video information between devices can be achieved between the high efficiency video coding (HEVC) standard and the video compression techniques described in the extended section of the standard. Typically, an image of a video sequence is divided into image blocks for encoding or decoding.
视频压缩技术中,为了减少或去除视频序列中的冗余信息,引入了基于图像块的空间预测(帧内预测,intra prediction)和/或时间预测(帧间预测,inter prediction)。其中,帧间预测模式可以包括但不限于:合并模式(Merge Mode)与非合并模式(例如高级运动矢量预测模式(AMVP mode))等,且均是利用多运动信息竞争的方法进行帧间预测的。In video compression technology, in order to reduce or remove redundant information in a video sequence, image block based spatial prediction (intra prediction) and/or temporal prediction (inter prediction) are introduced. The inter prediction mode may include, but is not limited to, a merge mode (Merge Mode) and a non-merge mode (for example, an advanced motion vector prediction mode (AMVP mode), etc., and both are inter-predictions by using a method of multi-motion information competition. of.
帧间预测过程中,引入了包括多组运动信息(亦称为候选运动信息)的候选列表,例如,编码器可以利用从该候选列表中选出一组合适的候选运动信息来预测当前待编码图像块的运动信息(例如运动矢量),进而得到当前待编码图像块的最佳参考图像块(即预测块)。In the inter prediction process, a candidate list including multiple sets of motion information (also referred to as candidate motion information) is introduced. For example, the encoder may select a suitable candidate motion information from the candidate list to predict the current to be encoded. The motion information (e.g., motion vector) of the image block, thereby obtaining the best reference image block (i.e., prediction block) of the current image block to be encoded.
然而,无论合并模式还是非合并模式,都对候选列表中的候选运动信息的最大候选数量作了限定。一旦可用候选运动信息不足,则将缺省值(例如零向量)作为候选运动信息添加到候选列表,以满足最大候选数量的要求,且给每组候选运动信息分配索引标识。可见,这种做法会导致候选列表中的某些候选运动信息的参考意义较低,进而一定程度上导致运动矢量预测准确性较低,从而影响编解码性能。However, regardless of the merge mode or the non-merge mode, the maximum number of candidates of candidate motion information in the candidate list is defined. Once the available candidate motion information is insufficient, a default value (eg, a zero vector) is added as candidate motion information to the candidate list to satisfy the maximum candidate number requirement, and an index identification is assigned to each set of candidate motion information. It can be seen that this approach leads to a lower reference meaning of some candidate motion information in the candidate list, which in turn leads to a lower accuracy of motion vector prediction, thereby affecting the codec performance.
发明内容Summary of the invention
本申请实施例提供一种图像块的候选运动信息的获取方法、装置及相应的编码器和解码器,提高运动矢量预测的准确性,从而提高编解码性能。The embodiment of the present application provides a method and an apparatus for acquiring candidate motion information of an image block, and a corresponding encoder and decoder, which improve the accuracy of motion vector prediction, thereby improving codec performance.
第一方面,本申请实施例提供了一种图像块的候选运动信息的获取方法,所述候选运动信息用于构建用于帧间预测的候选列表,所述方法包括:候选运动信息获取装置按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息,M为大于或等于0的整数;候选运动信息获取装置按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,L为大于或等于0的整数;当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,候选运动信息获取装置进一步对所述候选列表中包括的至少一组双向预测类型的原始候选运动信息(亦称为采用双向预 测编/解码模式的原始候选运动信息)进行分解处理,得到所述待处理图像块的候选列表中的Q组新构造的单向预测类型的候选运动信息(亦称为采用单向预测编/解码模式的候选运动信息),Q为大于或等于0的整数。In a first aspect, an embodiment of the present application provides a method for acquiring candidate motion information of an image block, where the candidate motion information is used to construct a candidate list for inter prediction, where the method includes: the candidate motion information acquiring device follows a first preset sequence, detecting one or more spatial reference blocks of the current image block, obtaining M sets of original candidate motion information in the candidate list of the image block to be processed, where M is an integer greater than or equal to 0; The motion information acquiring apparatus detects one or more time domain reference blocks of the current image block according to a second preset sequence, and obtains L sets of original candidate motion information in the candidate list of the image block to be processed, where L is An integer greater than or equal to 0; when the number of candidate motion information in the candidate list of the image block to be processed is less than the target number, the candidate motion information acquiring means further performs at least one set of bidirectional prediction types included in the candidate list Raw candidate motion information (also known as bidirectional pre- Performing decomposition processing on the original candidate motion information of the encoding/decoding mode to obtain candidate motion information of the unidirectional prediction type of the Q group newly constructed in the candidate list of the image block to be processed (also referred to as using one-way prediction coding/ The candidate motion information of the decoding mode), Q is an integer greater than or equal to 0.
这里的分解可以理解为组合的逆过程,即将一采用双向预测编/解码模式的运动信息拆分为一采用后向预测编/解码模式的运动信息和一采用前向预测编/解码模式的运动信息。The decomposition here can be understood as the inverse process of the combination, that is, splitting the motion information using the bidirectional predictive encoding/decoding mode into a motion information using a backward predictive encoding/decoding mode and a motion using a forward predictive encoding/decoding mode. information.
需要说明的是,这里的空域参考块指的是与当前图像块空域相关的参考块,可以包括当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述当前图像块不邻接的一个或多个空域参考块。It should be noted that the spatial reference block herein refers to a reference block related to the current image block spatial domain, and may include one or more spatial reference blocks adjacent to the current image block in the image of the current image block, and Or, one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the current image block.
需要说明的是,这里的时域参考块,指的是与当前图像块时域相关的参考块,可以包括参考图像中、与同位置块(co-located块)邻近的一个或多个空域参考块,和/或,所述同位置块中的一个或多个子块,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。这里的参考图像指的是已重建的图像,具体的,这里的参考图像指的是一个或多个参考图像列表中的参考图像,例如可以是指定参考图像列表中的指定参考图像索引对应的参考图像,也可以是默认的参考图像列表中的处于首位置的参考图像,本申请对此不作限定。需要说明的是,无论是哪一种参考块,都是指已确定运动矢量图像块(亦指已编码图像块或已解码图像块)。It should be noted that the time domain reference block herein refers to a reference block related to the current image block time domain, and may include one or more airspace references in the reference image adjacent to the co-located block (co-located block). Block, and/or one or more sub-blocks of the co-located block, wherein the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block. The reference image herein refers to a reconstructed image. Specifically, the reference image herein refers to a reference image in one or more reference image lists, for example, may be a reference corresponding to a specified reference image index in the specified reference image list. The image may also be the reference image in the first position in the default reference image list, which is not limited in this application. It should be noted that no matter which reference block is used, it refers to a motion vector image block (also referred to as an encoded image block or a decoded image block).
需要说明的是,每个参考块的运动信息(即每组运动信息)可包括运动矢量MV和参考图像指示信息。当然,运动信息也可以只包含两者之一或者全部包含,例如在编解码端共同约定参考图像的情况下,运动信息可以仅包含运动矢量MV。其中参考图像指示信息用于指示当前块(本段中以当前块指代当前可用参考块)使用到了哪一个或哪些重建图像作为参考图像,运动矢量表示在所用参考图像中参考块位置相对于当前块位置的位置偏移,一般包含水平分量偏移和竖直分量偏移。例如使用(x,y)表示MV,x表示水平方向的位置偏移,y表示竖直方向的位置偏移。使用当前块的位置加上MV偏移,便可以得到它的参考块在参考图像中的位置。其中参考图像指示信息可以包括参考图像列表和与参考图像列表对应的参考图像索引。参考图像索引用于识别指定参考图像列表(RefPicList0或RefPicList1)中的运动矢量所指向的参考图像。It should be noted that the motion information of each reference block (ie, each set of motion information) may include a motion vector MV and reference image indication information. Of course, the motion information may also include only one or all of the two. For example, if the codec side agrees on the reference image, the motion information may only include the motion vector MV. Wherein the reference picture indication information is used to indicate which one or which reconstructed images are used as the reference image in the current block (the current block refers to the currently available reference block in the current segment), and the motion vector indicates that the reference block position is relative to the current in the used reference image. The positional offset of the block position generally includes a horizontal component offset and a vertical component offset. For example, (x, y) is used to represent the MV, x is the positional shift in the horizontal direction, and y is the positional shift in the vertical direction. Using the position of the current block plus the MV offset, the position of its reference block in the reference image can be obtained. The reference image indication information may include a reference image list and a reference image index corresponding to the reference image list. The reference image index is used to identify the reference image pointed to by the motion vector in the specified reference image list (RefPicList0 or RefPicList1).
对于以帧间预测编解码的参考块,该参考块的一组运动信息可以包括用于正向和后向预测方向的运动信息。此处,正向和后向预测方向是双向预测模式的两个预测方向,可以理解的是,“正向”和“后向”分别对应于当前图像的参考图像列表0(RefPicList0)和参考图像列表1(RefPicList1)。“正向”预测方向(RefPicList0)即表示参考图像在时间上是在当前图像之前。“后向”预测方向(RefPicList1)即表示参考图像在时间上是在当前图像之后。当仅一个参考图像列表可用于图像或条带(slice)时,仅RefPicList0可用,并且该条带(slice)的每一图像块的运动信息始终是正向的。For a reference block coded with inter prediction, a set of motion information for the reference block may include motion information for the forward and backward prediction directions. Here, the forward and backward prediction directions are two prediction directions of the bidirectional prediction mode, and it can be understood that "forward" and "backward" respectively correspond to the reference image list 0 (RefPicList0) and the reference image of the current image. List 1 (RefPicList1). The "forward" prediction direction (RefPicList0) means that the reference image is temporally before the current image. The "backward" prediction direction (RefPicList1) means that the reference image is temporally after the current image. When only one reference picture list is available for an image or a slice, only RefPicList0 is available, and the motion information for each image block of the slice is always positive.
应当理解的是,在不同的应用场景下,候选运动信息获取装置可以是视频编码器或视频解码器,例如可以是视频编码器中的运动估计器,或者视频解码器中的运动补偿器。It should be understood that, in different application scenarios, the candidate motion information acquiring device may be a video encoder or a video decoder, for example, may be a motion estimator in a video encoder, or a motion compensator in a video decoder.
需要说明的是,这里的待处理图像块的候选列表中的候选运动信息可包括前述M组原始候选运动信息和L组原始候选运动信息,当然也可以包括以其它方式获取的候选运动信息,本申请不限于此。 It should be noted that the candidate motion information in the candidate list of the to-be-processed image block may include the foregoing M sets of original candidate motion information and L sets of original candidate motion information, and may of course include candidate motion information acquired in other manners. The application is not limited to this.
可见,通过分解处理至少一组双向预测类型的原始候选运动信息以得到Q组新构造的单向预测类型的候选运动信息,能尽可能的挖掘更多的有参考意义的候选运动信息,一定程度上减少或避免使用零向量去填充候选列表,比如:针对同一个编解码应用场景,没有引入本申请的技术方案之前,可能会填充多个零向量;而引入本申请的技术方案之后,可能不用填充零向量或者减少填充零向量,一定程度上提高了运动矢量预测的准确性,从而提高了编解码性能。It can be seen that by processing the original candidate motion information of at least one set of bidirectional prediction types by decomposition to obtain the candidate motion information of the unidirectional prediction type newly constructed by the Q group, more candidate motion information with reference significance can be mined as much as possible, to a certain extent. To reduce or avoid the use of the zero vector to fill the candidate list, for example, for the same codec application scenario, multiple zero vectors may be filled before the technical solution of the present application is introduced; and after the technical solution of the present application is introduced, it may not be used. Filling the zero vector or reducing the padding zero vector improves the accuracy of motion vector prediction to a certain extent, thereby improving the codec performance.
结合第一方面,在第一方面的某些实现方式中,所述一组双向预测类型的原始候选运动信息(亦称为一组双向预测编/解码模式的原始候选运动信息)包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;In conjunction with the first aspect, in some implementations of the first aspect, the set of bi-predictive types of original candidate motion information (also referred to as a set of bi-predictive encoding/decoding mode original candidate motion information) includes: Motion information of a forward prediction direction and motion information for a backward prediction direction, wherein the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list And a motion vector of the first reference image corresponding to the first reference image index; the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list And a motion vector directed to the second reference image corresponding to the second reference image index;
经分解处理,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型(亦称为单向预测编/解码模式)为前向预测方向(亦称为前向预测编/解码模式)的一组运动信息和/或单向预测类型为后向预测方向(亦称为后向预测编/解码模式)的一组运动信息,其中所述前向预测方向的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测方向的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the decomposition processing, the Q-group newly constructed unidirectional prediction type candidate motion information includes: a unidirectional prediction type (also referred to as a unidirectional prediction encoding/decoding mode) is a forward prediction direction (also referred to as a forward prediction coding). a set of motion information and/or a unidirectional prediction type of a backward prediction direction (also referred to as a backward prediction encoding/decoding mode), wherein the set of motions of the forward prediction direction The information includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; a set of motions of the backward prediction direction The information includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index.
结合第一方面,在第一方面的某些实现方式中,为了能尽可能的挖掘更多的有参考意义的候选运动信息,以进一步的提高运动矢量预测的准确性,所述方法还可以包括:当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的两组单向预测类型的原始候选运动信息(亦可称为,单向预测编/解码模式的原始候选运动信息)进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息(亦称为双向预测编/解码模式的候选运动信息),P为大于或等于0的整数。With reference to the first aspect, in some implementations of the first aspect, in order to further extract more reference motion information of the reference meaning to further improve the accuracy of motion vector prediction, the method may further include : when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of the two sets of unidirectional prediction types included in the candidate list (also referred to as one-way Performing a combination process on the original candidate motion information of the prediction encoding/decoding mode to obtain P-group newly constructed bidirectional prediction type candidate motion information in the candidate list of the to-be-processed image block (also referred to as bidirectional prediction encoding/decoding mode) Candidate motion information), P is an integer greater than or equal to zero.
这里的组合指将一组单向预测类型为前向预测方向的原始候选运动信息和另一组单向预测类型为后向预测方向的原始候选运动信息进行组合,得到一组新构造的双向预测类型的候选运动信息;换言之,即将一组采用前向预测编/解码模式的原始候选运动信息和另一组采用后向预测编/解码模式的原始候选运动信息进行组合,得到一组新构造的采用双向预测编/解码模式的候选运动信息。The combination here refers to combining a set of unidirectional prediction types with original prediction motion information of the forward prediction direction and another set of unidirectional prediction types with original candidate motion information of the backward prediction direction to obtain a set of newly constructed bidirectional predictions. Types of candidate motion information; in other words, combining a set of original candidate motion information using a forward predictive encoding/decoding mode with another set of original candidate motion information using a backward predictive encoding/decoding mode to obtain a set of newly constructed Candidate motion information in a bidirectional predictive encoding/decoding mode is employed.
应当理解的是,组合的步骤可以发生在分解步骤之前或之后,也可以是同时发生,本申请不限于此。It should be understood that the combined steps may occur before or after the decomposition step, or may occur simultaneously, and the application is not limited thereto.
结合第一方面,在第一方面的某些实现方式中,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。 In conjunction with the first aspect, in some implementations of the first aspect, the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
结合第一方面,在第一方面的某些实现方式中,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括:In conjunction with the first aspect, in some implementations of the first aspect, the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
结合第一方面,在第一方面的某些实现方式中,所述按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息可以包括:With reference to the first aspect, in some implementations of the first aspect, the one or more spatial reference blocks of the current image block are detected according to the first preset sequence, to obtain a candidate list of the to-be-processed image block. The M group of original candidate motion information in the medium may include:
依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数,Detecting whether the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 are available to obtain the first airspace neighboring The motion information of the M1 determined motion vector image blocks in the block A1, the second spatial neighboring block B1, the third spatial neighboring block B0, the fourth spatial neighboring block A0, and the fifth spatial neighboring block B2, where M1 is greater than or equal to 0. Integer,
将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;Adding M sets of motion information in the motion information of the detected M1 determined motion vector image blocks as candidate motion information to the candidate list, where M1 is equal to or greater than M;
其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。Wherein: the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
应当理解的是,如果M1个已确定运动矢量图像块的运动信息中存在两组或多组彼此相同的运动信息,则仅将这两组或多组彼此相同的运动信息中的一组运动信息加入到候选列表中。It should be understood that if two or more sets of motion information identical to each other exist in the motion information of the M1 determined motion vector image blocks, only one of the two or more sets of motion information identical to each other is selected. Join the candidate list.
结合第一方面,在第一方面的某些实现方式中,所述一个或多个时域参考块包括:所述当前图像块的同位置块(co-located块)的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。In conjunction with the first aspect, in some implementations of the first aspect, the one or more time domain reference blocks include: a lower right spatial domain neighboring block H of a co-located block (co-located block) of the current image block The upper left intermediate block C0 of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, or the lower right block BR of the co-located block, wherein The co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
结合第一方面,在第一方面的某些实现方式中,所述按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,包括:With reference to the first aspect, in some implementations of the first aspect, the detecting, by the second preset sequence, one or more time domain reference blocks of the current image block, to obtain the to-be-processed image block The L group of original candidate motion information in the candidate list includes:
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the right lower spatial neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available, to obtain motion information of the L1 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, and whether the upper left intermediate block C0 of the co-located block is available to obtain motion information of the L2 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息; Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, and the lower right block BR of the co-located block. Whether the upper left intermediate block C0 of the same position block is available to obtain motion information of the L3 determined motion vector image blocks;
将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。The L group motion information in the motion information of the detected L1 or L2 or L3 determined motion vector image blocks is added as candidate motion information to the candidate list, L1 is equal to or greater than L, or L2 is equal to or greater than L, Or L3 is equal to or greater than L, and L1, L2, and L3 are all integers greater than or equal to zero.
结合第一方面,在第一方面的某些实现方式中,所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量;或者,所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。With reference to the first aspect, in some implementations of the first aspect, the target quantity is a preset maximum number of candidate motion information in a candidate list of the current image block; or the target quantity is a utilization code stream The number of candidate motion information determined by the index identification obtained in the parsing.
本申请的第二方面提供了一种图像块的候选运动信息的获取装置,所述候选运动信息用于构建用于帧间预测的候选列表,所述装置包括:空域候选运动信息获取模块,用于按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息,M为大于或等于0的整数;时域候选运动信息获取模块,用于按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,L为大于或等于0的整数;附加候选运动信息获取模块,用于当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的至少一组双向预测类型(双向预测编/解码模式的运动信息)的原始候选运动信息进行分解处理,得到所述待处理图像块的候选列表中的Q组新构造的单向预测类型的候选运动信息(单向预测编/解码模式的运动信息),Q为大于或等于0的整数。A second aspect of the present application provides an apparatus for acquiring candidate motion information of an image block, where the candidate motion information is used to construct a candidate list for inter prediction, and the apparatus includes: an airspace candidate motion information acquiring module, Detecting one or more spatial reference blocks of the current image block according to the first preset sequence, and obtaining M sets of original candidate motion information in the candidate list of the image block to be processed, where M is an integer greater than or equal to 0. a time domain candidate motion information acquiring module, configured to detect one or more time domain reference blocks of the current image block according to a second preset sequence, to obtain an L group in the candidate list of the image block to be processed The original candidate motion information, L is an integer greater than or equal to 0; the additional candidate motion information acquiring module is configured to: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, Decomposing original candidate motion information of at least one set of bidirectional prediction types (motion information of bidirectional predictive encoding/decoding mode) included in the method A list of candidate types of the unidirectional prediction image block to be processed in the new set Q of candidate motion information structure (unidirectional predictive coding / decoding mode to the motion information), Q is an integer greater than or equal to 0.
结合第二方面,在第二方面的某些实现方式中,所述一组双向预测类型的原始候选运动信息(一组双向预测编解码模式的运动信息)包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;With reference to the second aspect, in some implementations of the second aspect, the set of bidirectional prediction types of original candidate motion information (motion information of a set of bidirectional predictive codec modes) comprises: motion for a forward prediction direction Information and motion information for a backward prediction direction, wherein the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and points to the first a motion vector of the first reference image corresponding to the reference image index; the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and pointing to the second a motion vector of the second reference image corresponding to the reference image index;
经所述附加候选运动信息获取模块分解处理后,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型(单向预测编解码模式)为前向预测编/解码模式的一组运动信息和/或单向预测类型(单向预测编解码模式)为后向预测编/解码模式的一组运动信息,其中所述前向预测编/解码模式的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测编/解码模式的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the additional candidate motion information acquiring module is decomposed, the Q-group newly constructed unidirectional prediction type candidate motion information includes: a unidirectional prediction type (unidirectional prediction codec mode) is a forward prediction encoding/decoding mode. a set of motion information and/or a unidirectional prediction type (unidirectional predictive codec mode) is a set of motion information of a backward predictive encoding/decoding mode, wherein the set of motion information of the forward predictive encoding/decoding mode includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; a set of the backward prediction encoding/decoding mode The motion information includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index.
应当理解的是,如果一组新构造的单向预测类型的候选运动信息与候选列表中已有的候选运动信息重复,则该组新构造的单向预测类型的候选运动信息不放入候选列表中。可替换地,也可以将该组新构造的单向预测类型的候选运动信息放入候选列表之后,再进行去重复项的操作。 It should be understood that if the candidate motion information of a newly constructed unidirectional prediction type is overlapped with the candidate motion information existing in the candidate list, the candidate motion information of the newly constructed unidirectional prediction type of the group is not put into the candidate list. in. Alternatively, the candidate motion information of the newly constructed unidirectional prediction type may be placed in the candidate list before the deduplication operation is performed.
结合第二方面,在第二方面的某些实现方式中,当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,所述附加候选运动信息获取模块进一步用于:对所述候选列表中包括的两组单向预测类型(单向预测编/解码模式)的原始候选运动信息进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息(双向预测编/解码模式的候选运动信息),P为大于或等于0的整数。With reference to the second aspect, in some implementations of the second aspect, when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the additional candidate motion information acquiring module is further configured to: Combining original candidate motion information of two sets of unidirectional prediction types (unidirectional prediction encoding/decoding modes) included in the candidate list to obtain a bidirectional new configuration bidirectional in the candidate list of the to-be-processed image block Prediction type candidate motion information (candidate motion information of bidirectional prediction encoding/decoding mode), P is an integer greater than or equal to zero.
结合第二方面,在第二方面的某些实现方式中,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。In conjunction with the second aspect, in some implementations of the second aspect, the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
结合第二方面,在第二方面的一种实现方式中,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括:In conjunction with the second aspect, in an implementation of the second aspect, the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
结合第二方面,在第二方面的某些实现方式中,所述空域候选运动信息获取模块用于依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数;将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。With reference to the second aspect, in some implementations of the second aspect, the spatial domain candidate motion information acquiring module is configured to sequentially detect the first airspace neighboring block A1, the second airspace neighboring block B1, and the third airspace neighboring block. Whether the B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 are available, to obtain the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0, The fifth spatial domain is adjacent to the motion information of the M1 determined motion vector image blocks in the block B2, and M1 is an integer greater than or equal to 0; the M group motion information in the motion information of the detected M1 determined motion vector image blocks is used as The candidate motion information is added to the candidate list, and M1 is equal to or greater than M; wherein: the detection condition of the fifth airspace neighboring block B2 includes: when the first airspace neighboring block A1, the second airspace neighboring block B1, and the third airspace When any one of the neighboring block B0 and the fourth airspace neighboring block A0 is unavailable, the fifth airspace neighboring block B2 is detected.
结合第二方面,在第二方面的某些实现方式中,所述一个或多个时域参考块包括:所述当前图像块的同位置块(co-located块)的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。With reference to the second aspect, in some implementations of the second aspect, the one or more time domain reference blocks include: a lower right spatial domain adjacent block H of a co-located block (co-located block) of the current image block The upper left intermediate block C0 of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, or the lower right block BR of the co-located block, wherein The co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
结合第二方面,在第二方面的一种实现方式中,所述时域候选运动信息获取模块用于:With reference to the second aspect, in an implementation manner of the second aspect, the time domain candidate motion information acquiring module is configured to:
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the right lower spatial neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available, to obtain motion information of the L1 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, and whether the upper left intermediate block C0 of the co-located block is available to obtain motion information of the L2 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息;Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, and the lower right block BR of the co-located block. Whether the upper left intermediate block C0 of the same position block is available to obtain motion information of the L3 determined motion vector image blocks;
将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。 The L group motion information in the motion information of the detected L1 or L2 or L3 determined motion vector image blocks is added as candidate motion information to the candidate list, L1 is equal to or greater than L, or L2 is equal to or greater than L, Or L3 is equal to or greater than L, and L1, L2, and L3 are all integers greater than or equal to zero.
结合第二方面,在第二方面的某些实现方式中,所述装置用于编码或解码视频图像,所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量;或者,所述装置用于解码视频图像,所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。In conjunction with the second aspect, in some implementations of the second aspect, the apparatus is configured to encode or decode a video image, the target number being a preset maximum number of candidate motion information in a candidate list of the current image block; Alternatively, the apparatus is for decoding a video image, the target number being the number of candidate motion information determined using an index identification parsed from the code stream.
本申请的第三方面提供了一种图像块的候选运动信息的获取装置,所述候选运动信息用于构建用于帧间预测的候选列表,包括:处理器和耦合于所述处理器的存储器;所述处理器用于:按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息,M为大于或等于0的整数;按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,L为大于或等于0的整数;当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的至少一组双向预测类型的原始候选运动信息(双向预测编/解码模式的原始候选运动信息)进行分解处理,得到所述待处理图像块的候选列表中的Q组新构造的单向预测类型的候选运动信息,Q为大于或等于0的整数。A third aspect of the present application provides an apparatus for acquiring candidate motion information of an image block, the candidate motion information being used to construct a candidate list for inter prediction, including: a processor and a memory coupled to the processor The processor is configured to: in the first preset order, detect one or more spatial reference blocks of the current image block, and obtain M sets of original candidate motion information in the candidate list of the to-be-processed image block, where M is An integer greater than or equal to 0; detecting one or more time domain reference blocks of the current image block according to a second preset sequence, to obtain L sets of original candidate motion information in the candidate list of the image block to be processed L is an integer greater than or equal to 0; when the number of candidate motion information in the candidate list of the image block to be processed is less than the target number, the original candidate motion of at least one set of bidirectional prediction types included in the candidate list The information (original candidate motion information of the bidirectional predictive encoding/decoding mode) is subjected to decomposition processing to obtain a newly constructed Q group in the candidate list of the image block to be processed. To the candidate motion information of the prediction type, Q is an integer greater than or equal to zero.
结合第三方面,在第三方面的某些实现方式中,所述一组双向预测类型的原始候选运动信息(亦称为一组双向预测编/解码模式的原始候选运动信息)包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;In conjunction with the third aspect, in some implementations of the third aspect, the set of bi-predictive types of original candidate motion information (also referred to as a set of bi-predictive encoding/decoding mode original candidate motion information) includes: Motion information of a forward prediction direction and motion information for a backward prediction direction, wherein the motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list And a motion vector of the first reference image corresponding to the first reference image index; the motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list And a motion vector directed to the second reference image corresponding to the second reference image index;
经分解处理,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型(亦称为单向预测编/解码模式)为前向预测方向(亦称为前向预测编/解码模式)的一组运动信息和/或单向预测类型为后向预测方向(亦称为后向预测编/解码模式)的一组运动信息,其中所述前向预测方向的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测方向的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the decomposition processing, the Q-group newly constructed unidirectional prediction type candidate motion information includes: a unidirectional prediction type (also referred to as a unidirectional prediction encoding/decoding mode) is a forward prediction direction (also referred to as a forward prediction coding). a set of motion information and/or a unidirectional prediction type of a backward prediction direction (also referred to as a backward prediction encoding/decoding mode), wherein the set of motions of the forward prediction direction The information includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; a set of motions of the backward prediction direction The information includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index.
结合第三方面,在第三方面的某些实现方式中,为了能尽可能的挖掘更多的有参考意义的候选运动信息,以进一步的提高运动矢量预测的准确性,所述所述处理器进一步用于:当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的两组单向预测类型的原始候选运动信息(亦可称为,单向预测编/解码模式的原始候选运动信息)进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息(亦称为双向预测编/解码模式的候选运动信息),P为大于或等于0的整数。 With reference to the third aspect, in some implementations of the third aspect, in order to further mine more reference candidate motion information as much as possible to further improve the accuracy of motion vector prediction, the processor Further for: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of the two sets of unidirectional prediction types included in the candidate list (also referred to as And performing, by combining processing, the original candidate motion information of the unidirectional prediction encoding/decoding mode, to obtain candidate motion information of the P group newly constructed bidirectional prediction type in the candidate list of the to-be-processed image block (also referred to as bidirectional prediction coding/ Candidate motion information of the decoding mode), P is an integer greater than or equal to zero.
结合第三方面,在第三方面的某些实现方式中,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。In conjunction with the third aspect, in some implementations of the third aspect, the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
结合第三方面,在第三方面的某些实现方式中,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括:In conjunction with the third aspect, in some implementations of the third aspect, the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
结合第三方面,在第三方面的某些实现方式中,在所述按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息的方面,所述所述处理器用于:依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数;将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。With reference to the third aspect, in some implementations of the third aspect, the one or more spatial reference blocks of the current image block are detected in the first preset order, to obtain a candidate for the image block to be processed. An aspect of the M sets of original candidate motion information in the list, the processor is configured to: sequentially detect the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring Whether the block A0 and the fifth spatial neighboring block B2 are available to obtain the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2. The motion information of the M1 determined motion vector image blocks, M1 is an integer greater than or equal to 0; and the M sets of motion information in the motion information of the detected M1 determined motion vector image blocks are added as candidate motion information to the In the candidate list, M1 is equal to or greater than M; wherein: the detection condition of the fifth spatial neighboring block B2 includes: when the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace When any one of the neighboring blocks A0 is not available, the fifth airspace neighboring block B2 is detected.
应当理解的是,如果M1个已确定运动矢量图像块的运动信息中存在两组或多组彼此相同的运动信息,所述处理器仅将这两组或多组彼此相同的运动信息中的一组运动信息加入到候选列表中。It should be understood that if two or more sets of motion information identical to each other exist in the motion information of the M1 determined motion vector image blocks, the processor only sets one of the two or more sets of motion information identical to each other. Group motion information is added to the candidate list.
结合第三方面,在第三方面的某些实现方式中,所述一个或多个时域参考块包括:所述当前图像块的同位置块(co-located块)的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。In conjunction with the third aspect, in some implementations of the third aspect, the one or more time domain reference blocks include: a lower right spatial domain neighboring block H of a co-located block (co-located block) of the current image block The upper left intermediate block C0 of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, or the lower right block BR of the co-located block, wherein The co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
结合第三方面,在第三方面的某些实现方式中,在所述按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息的方面,所述处理器用于:依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或者,依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或者,依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息;以及,将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运 动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。With reference to the third aspect, in some implementations of the third aspect, the one or more time domain reference blocks of the current image block are detected in the second preset order to obtain the to-be-processed image. An aspect of the L sets of original candidate motion information in the candidate list of the block, the processor configured to: sequentially detect the right lower airspace neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available Obtaining motion information of the L1 determined motion vector image blocks; or sequentially detecting whether the lower right spatial neighboring block H of the co-located block and the upper left intermediate block C0 of the co-located block are available to obtain L2 Determining motion information of the motion vector image block; or sequentially detecting the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, and the upper left block TL of the co-located block Whether the lower right block BR of the same location block, the upper left intermediate block C0 of the same location block is available, to obtain motion information of the L3 determined motion vector image blocks; and the detected L1 or L2 or L3 have been Determining motion vector image Group L in the motion information of the block The motion information is added to the candidate list as candidate motion information, L1 is equal to or greater than L, or L2 is equal to or greater than L, or L3 is equal to or greater than L, and L1, L2, and L3 are integers greater than or equal to zero.
结合第三方面,在第三方面的某些实现方式中,所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量;或者,所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。With reference to the third aspect, in some implementations of the third aspect, the target quantity is a preset maximum number of candidate motion information in the candidate list of the current image block; or the target quantity is a utilization code stream The number of candidate motion information determined by the index identification obtained in the parsing.
本申请的第四方面提供了一种图像块的候选运动信息的获取装置,用于获取候选运动信息以构建用于帧间预测的候选列表,包括:处理器和耦合于所述处理器的存储器;A fourth aspect of the present application provides an apparatus for acquiring candidate motion information of an image block, configured to acquire candidate motion information to construct a candidate list for inter prediction, including: a processor and a memory coupled to the processor ;
所述处理器1201用于:按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到用于构建所述当前图像块的候选列表的M组原始候选运动信息,M为大于或等于0的整数;按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到用于构建所述待处理图像块的候选列表的L组原始候选运动信息,L为大于或等于0的整数;当用于构建所述待处理图像块的候选列表的候选运动信息的数量小于目标数量时,对用于构建所述待处理图像块的候选列表的候选运动信息中包括的至少一组双向预测类型的原始候选运动信息进行分解处理,得到用于构建所述待处理图像块的候选列表的Q组新构造的单向预测类型的候选运动信息,Q为大于或等于0的整数。The processor 1201 is configured to: according to the first preset sequence, detect one or more spatial reference blocks of the current image block, to obtain M sets of original candidate motion information for constructing a candidate list of the current image block, M is an integer greater than or equal to 0; detecting one or more time domain reference blocks of the current image block according to a second preset order, to obtain an L group for constructing a candidate list of the image block to be processed Raw candidate motion information, L is an integer greater than or equal to 0; when the number of candidate motion information for constructing the candidate list of the image block to be processed is smaller than the target number, candidates for constructing the image block to be processed The original candidate motion information of at least one set of bidirectional prediction types included in the candidate motion information of the list is subjected to decomposition processing to obtain candidate motion information of the unidirectional prediction type of the Q group newly constructed for constructing the candidate list of the to-be-processed image block. , Q is an integer greater than or equal to 0.
结合第四方面,在第四方面的某些实现方式中,所述一组双向预测类型的原始候选运动信息包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;With reference to the fourth aspect, in some implementations of the fourth aspect, the original candidate motion information of the set of bidirectional prediction types includes: motion information for a forward prediction direction and motion information for a backward prediction direction, The motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index The motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index ;
经分解处理,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型为前向预测方向的一组运动信息和/或单向预测类型为后向预测方向的一组运动信息,其中所述前向预测方向的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测方向的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the decomposition processing, the candidate motion information of the unidirectional prediction type of the Q group newly constructed includes: a group of motion information whose unidirectional prediction type is a forward prediction direction and/or a group whose unidirectional prediction type is a backward prediction direction. Motion information, wherein the set of motion information of the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a first reference image corresponding to the first reference image index a motion vector; the set of motion information of the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a second reference image corresponding to the second reference image index Sport vector.
结合第四方面,在第四方面的某些实现方式中,为了能尽可能的挖掘更多的有参考意义的候选运动信息,以进一步的提高运动矢量预测的准确性,所述所述处理器进一步用于:With reference to the fourth aspect, in some implementations of the fourth aspect, in order to further mine more reference candidate motion information as much as possible to further improve the accuracy of motion vector prediction, the processor Further used for:
当用于构建所述待处理图像块的候选列表的候选运动信息的数量小于目标数量时,对用于构建所述候选列表的候选运动信息中包括的两组单向预测类型的原始候选运动信息进行组合处理,得到用于构建所述待处理图像块的候选列表的P组新构造的双向预测类型的候选运动信息,P为大于或等于0的整数。 When the number of candidate motion information for constructing the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of the two sets of unidirectional prediction types included in the candidate motion information for constructing the candidate list is constructed Performing a combination process to obtain candidate motion information of a P group newly constructed bidirectional prediction type for constructing a candidate list of the image block to be processed, P being an integer greater than or equal to 0.
结合第四方面,在第四方面的某些实现方式中,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。In conjunction with the fourth aspect, in some implementations of the fourth aspect, the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block And/or one or more spatial reference blocks in the image in which the current image block is located that are not adjacent to the image block to be processed.
结合第四方面,在第四方面的某些实现方式中,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括:In conjunction with the fourth aspect, in some implementations of the fourth aspect, the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
结合第四方面,在第四方面的某些实现方式中,所述一个或多个时域参考块包括:所述当前图像块的同位置块(co-located块)的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。In conjunction with the fourth aspect, in some implementations of the fourth aspect, the one or more time domain reference blocks include: a lower right spatial domain neighboring block H of a co-located block (co-located block) of the current image block The upper left intermediate block C0 of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, or the lower right block BR of the co-located block, wherein The co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
结合第四方面,在第四方面的某些实现方式中,所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量;或者,所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。With reference to the fourth aspect, in some implementations of the fourth aspect, the target quantity is a preset maximum number of candidate motion information in the candidate list of the current image block; or the target quantity is a utilization code stream The number of candidate motion information determined by the index identification obtained in the parsing.
本申请的第五方面提供一种视频编码器,所述视频编码器用于编码图像块,包括:帧间预测器,其中所述帧间预测器包括第二方面或第三方面或第四方面所述的图像块的候选运动信息的获取装置,所述帧间预测器用于基于候选列表中所选择的候选运动信息确定当前待编码图像块的预测块;所述视频编码器还包括:熵编码器,用于将索引标识编入码流,所述索引标识用于指示用于所述当前待编码图像块的所选择的候选运动信息;重建器,用于基于所述预测块重建所述图像块。A fifth aspect of the present application provides a video encoder, the video encoder for encoding an image block, comprising: an inter predictor, wherein the inter predictor comprises the second aspect or the third aspect or the fourth aspect The apparatus for acquiring candidate motion information of an image block, wherein the inter predictor is configured to determine a prediction block of a current image block to be encoded based on the candidate motion information selected in the candidate list; the video encoder further includes: an entropy encoder For indexing an index identifier for indicating the selected candidate motion information for the current image block to be encoded, and a reconstructor for reconstructing the image block based on the prediction block .
在一种示例实现方式下,这里的帧间预测器可以包括运动估计模块和运动补偿模块,其中运动估计模块用于获取当前待编码图像块的候选运动信息以构建候选列表;运动补偿模块用于基于候选列表中所选择的候选运动信息确定当前待编码图像块的预测块。In an example implementation, the inter predictor herein may include a motion estimation module and a motion compensation module, where the motion estimation module is configured to acquire candidate motion information of a current image block to be encoded to construct a candidate list; and the motion compensation module is configured to: A prediction block of the current image block to be encoded is determined based on the candidate motion information selected in the candidate list.
结合第五方面,在第五方面的某些实现方式中,所述帧间预测器进一步用于从所述候选列表包括的多个候选运动信息中选择用于当前待编码图像块的候选运动信息,其中,所述选择的候选运动信息编码所述当前待编码图像块的码率失真代价最小。With reference to the fifth aspect, in some implementations of the fifth aspect, the inter predictor is further configured to select candidate motion information for the current image block to be encoded from the plurality of candidate motion information included in the candidate list. And wherein the selected candidate motion information encodes the current code to be encoded image block with the lowest rate penalty cost.
本申请的第六方面提供一种视频解码器,所述视频解码器用于从码流中解码出图像块,包括:熵解码器,用于从码流中解码出索引标识,所述索引标识用于指示用于当前待解码图像块的被所选择的候选运动信息;帧间预测器,包括如第二方面或第三方面或第四方面所述的图像块的候选运动信息的获取装置,其中所述帧间预测器用于基于所述索引标识指示的候选运动信息确定当前待解码图像块的预测块;以及,重建器,用于基于所述预测块重建所述图像块。 A sixth aspect of the present application provides a video decoder, where the video decoder is configured to decode an image block from a code stream, including: an entropy decoder, configured to decode an index identifier from a code stream, where the index identifier is used And an apparatus for acquiring candidate motion information for an image block according to the second aspect or the third aspect or the fourth aspect, wherein the selected candidate motion information is used for the image block to be decoded; The inter predictor is configured to determine a prediction block of an image block to be decoded currently based on candidate motion information indicated by the index identifier; and a reconstructor to reconstruct the image block based on the prediction block.
本申请的第七方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。A seventh aspect of the present application provides a computer readable storage medium having stored therein instructions that, when run on a computer, cause the computer to perform the method of the first aspect described above.
本申请的第八方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。An eighth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
本申请的第九方面提供了一种电子设备,包括上述第五方面所述的视频编码器,或上述第六方面所述的视频解码器,或上述第二、三或四方面所述的图像块的候选运动信息的获取装置。A ninth aspect of the present application provides an electronic device, comprising the video encoder according to the above fifth aspect, or the video decoder according to the sixth aspect, or the image described in the second, third or fourth aspect A device for acquiring candidate motion information of a block.
应理解,本申请的第二至九方面与本申请的第一方面的技术方案一致,各方面及对应的可实施的设计方式所取得的有益效果相似,不再赘述。It should be understood that the second to ninth aspects of the present application are consistent with the technical solutions of the first aspect of the present application, and the beneficial effects obtained by the aspects and the corresponding implementable design manners are similar, and are not described again.
附图说明DRAWINGS
图1为本申请实施例中视频编码及解码系统的一种示意性框图;1 is a schematic block diagram of a video encoding and decoding system in an embodiment of the present application;
图2为本申请实施例中视频编码器的一种示意性框图;2 is a schematic block diagram of a video encoder in an embodiment of the present application;
图3为本申请实施例中视频解码器的一种示意性框图;3 is a schematic block diagram of a video decoder in an embodiment of the present application;
图4为本申请实施例中合并模式下由视频编码器执行的编码方法的一种示例性流程图;4 is an exemplary flowchart of an encoding method performed by a video encoder in a merge mode in an embodiment of the present application;
图5为本申请实施例中由视频解码器执行的运动补偿的一种示例性流程图;FIG. 5 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application; FIG.
图6A和6B为本申请实施例中编码单元及与其关联的相邻位置图像块、非相邻位置图像块的一种示例性示意图;6A and 6B are schematic diagrams showing an encoding unit and an adjacent position image block and a non-adjacent position image block associated therewith in the embodiment of the present application;
图7为本申请实施例中图像块的候选运动信息的获取方法的一种示例性流程图;FIG. 7 is an exemplary flowchart of a method for acquiring candidate motion information of an image block according to an embodiment of the present application;
图8为本申请实施例中图像块的候选运动信息的获取方法的另一种示例性流程图;FIG. 8 is another exemplary flowchart of a method for acquiring candidate motion information of an image block according to an embodiment of the present application;
图9为本申请实施例中将经过分解的候选运动矢量添加到合并模式候选者列表的一种示例性示意图;FIG. 9 is an exemplary schematic diagram of adding a decomposed candidate motion vector to a merge mode candidate list in the embodiment of the present application;
图10为本申请实施例中将经过组合的候选运动矢量添加到合并模式候选者列表的一种示例性示意图;FIG. 10 is an exemplary schematic diagram of adding a combined candidate motion vector to a merge mode candidate list in an embodiment of the present application; FIG.
图11为本申请实施例中的图像块的候选运动信息的获取装置的一种示意性框图;FIG. 11 is a schematic block diagram of an apparatus for acquiring candidate motion information of an image block in an embodiment of the present application;
图12为本申请实施例中一种编码设备或解码设备的示意性框图。FIG. 12 is a schematic block diagram of an encoding device or a decoding device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments.
图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 in an embodiment of the present application. As shown in FIG. 1, system 10 includes source device 12 that produces encoded video data that will be decoded by destination device 14 at a later time. Source device 12 and destination device 14 may comprise 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, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices or the like. In some applications, source device 12 and destination device 14 may be equipped for wireless communication.
目的地装置14可经由链路16接收待解码的经编码视频数据。链路16可包括能够将经编码视频数据从源装置12移动到目的地装置14的任何类型的媒体或装置。在一个可行的实施方式中,链路16可包括使源装置12能够实时将经编码视频数据直接传输到目的地装置14的通信媒体。可根据通信标准(例如,无线通信协议)调制经编码视频数据且将其传输到目的地装置14。通信媒体可包括任何无线或有线通信媒体,例如射频频谱或一个或多个物理传输线。通信媒体可形成基于包的网络(例如,局域网、广域网或因特网的全球网络)的部分。通信媒体可包含路由器、交换器、基站或可有用于促进从源装置12到目的地装置14的通信的任何其它装备。 Destination device 14 may receive encoded video data to be decoded via link 16. Link 16 may include any type of media or device capable of moving encoded video data from source device 12 to destination device 14. In one possible implementation, link 16 may include communication media that enables source device 12 to transmit encoded video data directly to destination device 14 in real time. The encoded video data can be modulated and transmitted to destination device 14 in accordance with a communication standard (e.g., a wireless communication protocol). Communication media can include any wireless or wired communication medium, such as a radio frequency spectrum or one or more physical transmission lines. The communication medium can form part of a packet-based network (eg, a global network of local area networks, wide area networks, or the Internet). Communication media can include routers, switches, base stations, or any other equipment that can be used to facilitate communication from source device 12 to 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 output interface 22 to storage device 24. Similarly, encoded data can be accessed from storage device 24 by an input interface. Storage device 24 may comprise 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, storage device 24 may correspond to a file server or another intermediate storage device that may maintain encoded video produced by source device 12. Destination device 14 may access the stored video data from storage device 24 via streaming or download. The file server can be any type of server capable of storing encoded video data and transmitting this encoded video data to destination device 14. Possible Implementations A file server includes a web server, a file transfer protocol server, a network attached storage device, or a local disk unit. Destination device 14 can access the encoded video data via any standard data connection that includes an Internet connection. This data connection may include a wireless channel (eg, a Wi-Fi connection), a wired connection (eg, a cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on a file server. The transmission of encoded video data from storage device 24 may be streaming, downloading, or a combination of both.
本申请的技术不必限于无线应用或设定。技术可应用于视频解码以支持多种多媒体应用中的任一者,例如,空中电视广播、有线电视传输、卫星电视传输、流式传输视频传输(例如,经由因特网)、编码数字视频以用于存储于数据存储媒体上、解码存储于数据存储媒体上的数字视频或其它应用。在一些可行的实施方式中,系统10可经配置以支持单向或双向视频传输以支持例如视频流式传输、视频播放、视频广播和/或视频电话的应用。The techniques of this application are not necessarily limited to wireless applications or settings. Techniques may be applied to video decoding to support any of a variety of multimedia applications, such as over-the-air broadcast, cable television transmission, satellite television transmission, streaming video transmission (eg, via the Internet), encoding digital video for use in It is stored on a data storage medium and decodes digital video or other applications stored on the data storage medium. In some possible implementations, system 10 can 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 possible implementation of FIG. 1, source device 12 includes video source 18, video encoder 20, and output interface 22. In some applications, output interface 22 can include a modulator/demodulator (modem) and/or a transmitter. In source device 12, video source 18 may include sources such as video capture devices (eg, cameras), video archives containing previously captured video, video feed interfaces to receive video from video content providers And/or a computer graphics system for generating computer graphics data as source video, or a combination of these sources. As a possible implementation, 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 are illustratively applicable to video decoding and are 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 can be transmitted directly to the destination device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on storage device 24 for later access by 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, input interface 28 can include a receiver and/or a modem. Input interface 28 of destination device 14 receives encoded video data via link 16. The encoded video data communicated or provided on storage device 24 via link 16 may include various syntax elements generated by video encoder 20 for use by video decoders of video decoder 30 to decode the video data. These grammar elements The prime may be included with encoded video data transmitted over a communication medium, stored on a storage medium, or stored on a file server.
显示装置32可与目的地装置14集成或在目的地装置14外部。在一些可行的实施方式中,目的地装置14可包含集成显示装置且也经配置以与外部显示装置接口连接。在其它可行的实施方式中,目的地装置14可为显示装置。一般来说,显示装置32向用户显示经解码视频数据,且可包括多种显示装置中的任一者,例如液晶显示器、等离子显示器、有机发光二极管显示器或另一类型的显示装置。 Display device 32 may be integrated with destination device 14 or external to destination device 14. In some possible implementations, destination device 14 can include an integrated display device and is also configured to interface with an external display device. In other possible implementations, the destination device 14 can be a display device. In general, display device 32 displays 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 in accordance with, 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, video encoder 20 and video decoder 30 may be according to, for example, the ITU-TH.265 standard, also referred to as a high efficiency video decoding standard, or other proprietary or industry standard of the ITU-TH.264 standard or an extension 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 a suitable multiplexer-demultiplexer ( MUX-DEMUX) unit or other hardware and software to handle the encoding of both audio and video in a common data stream or in a separate data stream. If applicable, in some possible implementations, the MUX-DEMUX unit may conform to the ITU H.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 apparatus may store the instructions of the software in a suitable non-transitory computer readable medium and execute the instructions in hardware using one or more processors to perform the techniques of the present application. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, any of which may be integrated into a combined encoder/decoder (CODEC) in a respective device. part.
本申请示例性地可涉及视频编码器20将特定信息“用信号发送”到例如视频解码器30的另一装置。然而,应理解,视频编码器20可通过将特定语法元素与视频数据的各种经编码部分相关联来用信号发送信息。即,视频编码器20可通过将特定语法元素存储到视频数据的各种经编码部分的头信息来“用信号发送”数据。在一些应用中,这些语法元素可在通过视频解码器30接收及解码之前经编码及存储(例如,存储到存储系统34或文件服务器36)。因此,术语“用信号发送”示例性地可指语法或用于解码经压缩视频数据的其它数据的传达,而不管此传达是实时或近实时地发生或在时间跨度内发生,例如可在编码时将语法元素存储到媒体时发生,语法元素接着可在存储到此媒体之后的任何时间通过解码装置检索。The present application may illustratively involve video encoder 20 "signaling" particular information to another device, such as video decoder 30. However, it should be understood that video encoder 20 may signal information by associating particular syntax elements with various encoded portions of the video data. That is, video encoder 20 may "signal" the data by storing the particular syntax elements to the header information of the 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) prior to being received and decoded by video decoder 30. Thus, the term "signaling" may illustratively refer to the communication of grammar or other data used to decode compressed video data, whether this communication occurs in real time or near real time or occurs over a time span, such as may be encoded Occurs when a syntax element is stored to the media, and the syntax element can then be retrieved by the decoding device at any time after storage to the 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 developed the H.265 (HEVC) standard. HEVC standardization is based on an evolution model of a video decoding device called the HEVC Test Model (HM). The latest standard documentation for H.265 is available at http://www.itu.int/rec/T-REC-H.265. The latest version of the standard document is H.265 (12/16), which is the full text of the standard document. The manner of reference is incorporated herein. The HM assumes that the video decoding device has several additional capabilities with respect to existing algorithms of ITU-TH.264/AVC. For example, H.264 provides nine intra-prediction coding modes, while HM provides up to 35 intra-prediction coding 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 the development of the H.266 standard. The H.266 standardization process is based on an evolution model of a video decoding device called the H.266 test model. The algorithm description of H.266 is available from http://phenix.int-evry.fr/jvet, and the latest algorithm description is included in JVET-F1001-v2, which is incorporated herein by reference in its entirety. . At the same time, the reference software for the JEM test model is available 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标准的宏块类似的目的。条带包含按解码次序的数个连续树块。可将视频帧或图像分割成一个或多个条带。可根据四叉树将每一树块分裂成编码单元。例如,可将作为四叉树的根节点的树块分裂成四个子节点,且每一子节点可又为母节点且被分裂成另外四个子节点。作为四叉树的叶节点的最终不可分裂的子节点包括解码节点,例如,经解码视频块。与经解码码流相关联的语法数据可定义树块可分裂的最大次数,且也可定义解码节点的最小大小。In general, the working model description of HM can divide a video frame or image into a sequence of treeblocks or largest coding units (LCUs) containing both luminance and chrominance samples, also referred to as CTUs. Treeblocks have similar purposes to macroblocks of the H.264 standard. A stripe contains several consecutive treeblocks in decoding order. A video frame or image can be segmented into one or more stripes. Each tree block can be split into coding units according to a quadtree. For example, a tree block that is the root node of a quadtree can be split into four child nodes, and each child node can be a parent node again and split into four other child nodes. The final non-splitable child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded video blocks. The syntax data associated with the decoded code stream may define the maximum number of times the tree block can be split, and may also define the minimum size of the decoded 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 transform 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 may range from 8 x 8 pixels up to a maximum of 64 x 64 pixels or larger. Each CU may contain one or more PUs and one or more TUs. For example, syntax data associated with a CU may describe a situation in which a CU is partitioned into one or more PUs. The split mode may be different between situations where the CU is skipped or encoded by direct mode coding, intra prediction mode coding, or inter prediction mode. The PU can be divided into a shape that is non-square. For example, syntax data associated with a CU may also describe a situation in which 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 for transforms based on TUs, which can be different for different CUs. The TU is typically sized based on the size of the PU within a given CU defined for the partitioned LCU, although this may not always be the case. The size of the TU is usually the same as or smaller than the PU. In some possible implementations, the residual samples corresponding to the CU may be subdivided into smaller units using a quadtree structure called a "residual qualtree" (RQT). The leaf node of the RQT can be referred to as a TU. The pixel difference values associated with the TU may be transformed to produce transform coefficients, which may be quantized.
一般来说,PU包含与预测过程有关的数据。例如,在PU经帧内模式编码时,PU可包含描述PU的帧内预测模式的数据。作为另一可行的实施方式,在PU经帧间模式编码时,PU可包含界定PU的运动矢量的数据。例如,界定PU的运动矢量的数据可描述运动矢量的水平分量、运动矢量的垂直分量、运动矢量的分辨率(例如,四分之一像素精确度或八分之一像素精确度)、运动矢量所指向的参考图像,和/或运动矢量的参考图像列表(例如,列表0、列表1或列表C)。In general, a PU contains data related to the prediction process. For example, when the PU is intra-mode encoded, the PU may include data describing the intra prediction mode of the PU. As another possible 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 (eg, quarter-pixel precision or eighth-pixel precision), motion vector A reference image pointed to, and/or a reference image list of motion vectors (eg, list 0, list 1, or list C).
一般来说,TU使用变换及量化过程。具有一个或多个PU的给定CU也可包含一个或多个TU。在预测之后,视频编码器20可计算对应于PU的残差值。残差值包括像素差值,像素差值可变换成变换系数、经量化且使用TU扫描以产生串行化变换系数以用于熵解码。本申请通常使用术语“视频块”来指CU的解码节点。在一些特定应用中,本申请也可使用术语“视频块”来指包含解码节点以及PU及TU的树块,例如,LCU或CU。In general, TUs use 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. The residual value includes pixel difference values, which can be transformed into transform coefficients, quantized, and scanned using TU to produce serialized transform coefficients for entropy decoding. The present application generally refers to the term "video block" to refer to a decoding node of a CU. In some specific applications, the term "video block" may also be used herein to refer to a tree block containing a decoding node as well as a PU and a TU, eg, an LCU or 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 picture (GOP) illustratively includes a series of one or more video images. The GOP may include syntax data in the header information of the GOP, in the header information of one or more of the images, or elsewhere, the syntax data describing the number of images included in the GOP. Each strip of the image may contain stripe syntax data describing the encoding mode of the corresponding image. Video encoder 20 is typically within an individual video stripe The video block operates to encode the video data. A video block may correspond to a decoding node within a CU. Video blocks may have fixed or varying sizes and may vary in size depending on the specified decoding criteria.
作为一种可行的实施方式,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 possible 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 size of 2N×2N or N×N, and inter-frame prediction of 2N×2N, 2N×N, N×2N or N×N symmetric PU size prediction. The HM also supports asymmetric partitioning of inter-prediction of PU sizes of 2N x nU, 2N x nD, nL x 2N, and nR x 2N. In the asymmetric segmentation, one direction of the CU is not divided, and the other direction is divided into 25% and 75%. The portion of the CU corresponding to the 25% segment is indicated by an indication of "n" followed by "Up", "Down", "Left", or "Right". Thus, for example, "2N x nU" refers to a horizontally partitioned 2N x 2 NCU, where 2N x 0.5 NPU is at the top and 2N x 1.5 NPU 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 the present application, "N x N" and "N by N" are used interchangeably to refer to the pixel size of a video block in accordance with the vertical dimension and the horizontal dimension, for example, 16 x 16 pixels or 16 by 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. Likewise, an N x N block has N pixels in the vertical direction and N pixels in the horizontal direction, where N represents a non-negative integer value. The pixels in the block can be arranged in rows and columns. Further, 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 x 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 intra-predictive or inter-predictive decoding of a PU using a CU, video encoder 20 may calculate residual data for 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 be included in transforming (eg, discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after application to the residual video data. The residual data may correspond to a pixel difference between a pixel of the uncoded image and a predicted value corresponding to the PU. Video encoder 20 may form a TU that includes residual data for 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 illustratively refers to the process of quantizing the coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression. The quantization process can reduce the bit depth associated with some or all of the coefficients. For example, the n-bit value can 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亮度像素。The JEM model further improves the coding structure of video images. Specifically, a block coding structure called "Quad Tree Combined Binary Tree" (QTBT) is introduced. The QTBT structure rejects the concepts of CU, PU, TU, etc. in HEVC, and supports more flexible CU partitioning shapes. One CU can be square or rectangular. A CTU first performs quadtree partitioning, and the leaf nodes of the quadtree further perform binary tree partitioning. At the same time, there are two division modes in the binary tree division, symmetric horizontal division and symmetric vertical division. The leaf nodes of the binary tree are called CUs, and the CUs of the JEM cannot be further divided during the prediction and transformation process, that is, the CUs, PUs, and TUs of the JEM have the same block size. In the current JEM, the maximum size of the CTU is 256 × 256 luma pixels.
在一些可行的实施方式中,视频编码器20可利用预定义扫描次序来扫描经量化变换系数以产生可经熵编码的串行化向量。在其它可行的实施方式中,视频编码器20可执行自适应性扫描。在扫描经量化变换系数以形成一维向量之后,视频编码器20可根据上下文自适应性可变长度解码(CAVLC)、上下文自适应性二进制算术解码(CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PI PE)解码或其他熵解码方法来熵解码一维向量。视频编码器20也可熵编码与经编码视频数据相关联的语法元素以供视频解码器30用于解码视频数据。 In some possible implementations, video encoder 20 may utilize a predefined scan order to scan the quantized transform coefficients to produce an entropy encoded serialized vector. In other possible implementations, video encoder 20 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 20 may be based on context adaptive variable length decoding (CAVLC), context adaptive binary arithmetic decoding (CABAC), grammar based context adaptive binary. Arithmetic decoding (SBAC), probability interval partitioning entropy (PI PE) decoding, or other entropy decoding methods are used to entropy decode one-dimensional vectors. 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 contexts within the context model to the symbols to be transmitted. The context can be related to whether the adjacent value of the symbol is non-zero. In order to perform CAVLC, video encoder 20 may select a variable length code of the symbol to be transmitted. Codewords in variable length decoding (VLC) may be constructed such that relatively shorter codes correspond to more likely symbols, while longer codes correspond to less likely symbols. In this way, the use of VLC can achieve the goal of saving code rate with respect 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 an embodiment of the present application, a 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 as specified by different video compression codec standards. In other words, multiple PUs may belong to the CU, or the PUs and CUs may be the same size. When the CU and the PU are the same size, the partition mode of the CU is not divided, or is divided into one PU, and the PU is used for expression. When the video encoder performs inter prediction, the video encoder can signal the video decoder for 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. The motion vector may indicate a displacement between an image block (also referred to as a video block, a block of pixels, a set of pixels, etc.) of the PU and a reference block of the PU. The reference block of the PU may be part of a reference image of an image block similar to a PU. The reference block may be located in a reference image indicated by the reference image index and the prediction direction indicator.
为了减少表示PU的运动信息所需要的编码比特的数目,视频编码器可根据合并预测模式或高级运动矢量预测模式过程产生用于PU中的每一者的候选运动信息列表(后文简称为候选者列表)。用于PU的候选者列表中的每一候选者可表示一组运动信息。运动信息可包括运动矢量MV和参考图像指示信息。当然,运动信息也可以只包含两者之一或者全部包含,例如在编解码端共同约定参考图像的情况下,运动信息可以仅包含运动矢量。由候选列表中的一些候选者表示的运动信息可基于其它PU的运动信息。如果候选者表示指定空间候选者位置(spatial candidate positions)或时间候选者位置(temporal candidate positions)中的一者的运动信息,则本申请可将所述候选者称作“原始”候选运动信息。举例来说,对于合并模式,在本文中也称为合并预测模式,可存在五个原始空间候选者位置和一个原始时间候选者位置。在一些实例中,视频编码器还可以通过一些手段来产生附加或额外候选运动信息,例如插入零运动矢量作为候选运动信息来产生额外候选运动信息。这些额外候选运动信息不被视为原始候选运动信息且在本申请中可称作后期或人工产生的候选运动信息。In order to reduce the number of coded bits required to represent the motion information of the PU, the video encoder may generate a candidate motion information list for each of the PUs according to the merge prediction mode or the advanced motion vector prediction mode process (hereinafter referred to as a candidate) List). Each candidate in the candidate list for the PU may represent a set of motion information. The motion information may include a motion vector MV and reference image indication information. Of course, the motion information may also include only one or all of the two. For example, if the codec side agrees on the reference image, the motion information may only include the motion vector. The motion information represented by some of the candidates in the candidate list may be based on motion information of other PUs. If the candidate indicates motion information specifying one of a spatial candidate positions or a temporal candidate positions, the present application may refer to the candidates 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 temporal candidate location. In some examples, the video encoder may also generate additional or additional candidate motion information by some means, such as inserting a zero motion vector as candidate motion information to generate additional candidate motion information. These additional candidate motion information are not considered raw candidate motion information and may be referred to as late or artificially generated candidate motion information in this application.
本申请的技术一般涉及用于在视频编码器处产生候选者列表的技术和用于在视频解码器处产生相同候选者列表的技术。视频编码器和视频解码器可通过实施用于构建候选者列表的相同技术来产生相同候选者列表。举例来说,视频编码器和视频解码器两者可构建具有相同数目的候选者(例如,五个候选者)的列表。视频编码器和解码器可首先考虑空间候选者(例如,同一图像中的相邻块),接着考虑时间候选者(例如,不同图像中的候选者),且最后可考虑人工产生的候选者直到将所要数目的候选者添加到列表为止。根据本申请的技术,可在候选列表构建期间针对某些类型的候选运动信息利用修剪操作以便从候选列表移除重复,而对于其它类型的候选者,可能不使用修剪以便减小解码器复杂性。举例来说,对于空间候选者集合和对于时间候选者,可执行修剪操作以从候选者的列表排除具有重复运动信息的候选者。然而,当将人工产生的候选者添加到候选者的列表时,可在不对人工产生的候选者执行修剪操作的情况下添加人工产生的候选者。 The techniques of the present application generally relate to techniques for generating a candidate list at a video encoder and techniques for generating the same candidate list at a video decoder. The video encoder and video decoder may generate the same candidate list by implementing the same techniques used to construct the candidate list. For example, both a video encoder and a video decoder can construct a list with the same number of candidates (eg, five candidates). The video encoder and decoder may first consider spatial candidates (eg, neighboring blocks in the same image), then consider temporal candidates (eg, candidates in different images), and finally may consider artificially generated candidates until Add the required number of candidates to the list. In accordance with the techniques of the present application, a pruning operation may be utilized for certain types of candidate motion information to remove duplicates from the candidate list during candidate list construction, while for other types of candidates, pruning may not be used to reduce decoder complexity . For example, for a set of spatial candidates and for temporal candidates, a pruning operation may be performed to exclude candidates with repeated motion information from the list of candidates. However, when an artificially generated candidate is added to the candidate's list, the artificially generated candidate may be added without performing a pruning operation on the artificially generated candidate.
在产生用于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 indicating the selected candidate motion information in the 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 identification may indicate the location of the candidate motion information selected in the candidate list. The video encoder may also generate a prediction block for the PU based on the 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, the motion information of the PU may be determined based on the motion vector difference of the PU and the selected candidate motion information. The video encoder may generate one or more residual image blocks (abbreviated as residual blocks) for the CU based on the predictive image blocks of the PU of the CU (referred to as prediction blocks for short) 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 the candidate list of PUs. The video decoder may determine motion information for the PU based on the selected candidate motion information in the candidate list of PUs. 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 one or more reference blocks of the PU. The video decoder may reconstruct an image block for the CU based on the prediction block for the PU of 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 location or image block as having various spatial relationships with a CU or PU. This description may be interpreted to mean that the location or image block and the image block associated with the CU or PU have various spatial relationships. In addition, the present application may refer to a PU that is currently being decoded by a video decoder as a current PU, also referred to as a current image block to be processed. The present application may refer to a CU currently being decoded by a video decoder as a current CU. The present application may refer to the image currently being decoded by the video decoder as the current image. It should be understood that the present application is applicable to the case where the PU and the CU have the same size, or the PU is the CU, and the PU is used uniformly.
如前文简短地描述,视频编码器20可使用帧间预测以产生用于CU的PU的预测块和运动信息。在一些例子中,PU的运动信息可能与一个或多个邻近PU(即,其图像块在空间上或时间上在该PU的图像块附近的PU)的运动信息相同或类似。因为邻近PU经常具有类似运动信息,所以视频编码器20可参考邻近PU的运动信息来编码该PU的运动信息。参考邻近PU的运动信息来编码该PU的运动信息可减少码流中指示该PU的运动信息所需要的编码比特的数目。As briefly described above, video encoder 20 may use inter prediction to generate prediction blocks and motion information for PUs of the CU. In some examples, the motion information of the 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 image block of the PU). Because neighboring PUs often have similar motion information, video encoder 20 may encode motion information for the PU with reference to motion information of neighboring PUs. Encoding the motion information of the PU with reference to the motion information of the neighboring PU may reduce the number of coded bits required in the code stream indicating 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 encode motion information for the PU with reference to motion information of neighboring PUs in various manners. For example, video encoder 20 may indicate that the motion information for the PU is the same as the motion information for nearby PUs. The present application may use a merge mode to indicate that the motion information indicating the PU is the same as the motion information of the neighboring PU or may be derived from the motion information of the neighboring PU. In another possible implementation, video encoder 20 may calculate a Motion Vector Difference (MVD) for the PU. The MVD indicates the difference between the motion vector of the PU and the motion vector of the neighboring PU. Video encoder 20 may include the MVD instead of the motion vector of the PU in the motion information of the PU. The representation of the MVD in the code stream is less than the coded bits required to represent the motion vector of the PU. The present application can use the advanced motion vector prediction mode to refer to the motion information of the PU at the decoding end by using the index value of the MVD and the recognition candidate (ie, candidate motion information).
为了使用合并模式或AMVP模式以信号通知解码端该PU的运动信息,视频编码器20可产生用于该PU的候选列表。候选列表可包括一或多个候选者(即一组或多组候选运动信息)。用于该PU的候选列表中的每一个候选者表示一组运动信息。一组运动信息可包括运动矢量、参考图像列表和与参考图像列表对应的参考图像索引。In order to use the merge mode or AMVP mode to signal the motion information of the PU at the decoder, 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 the PU represents a set of motion information. The 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, video encoder 20 may select one of a plurality of candidates from the candidate list for the PU. For example, a video encoder can compare each candidate with the PU being decoded and can select A candidate for the required rate-distortion cost. Video encoder 20 may output a candidate index for the PU. The candidate index can identify the location of the selected candidate in the candidate list.
此外,视频编码器20可基于由PU的运动信息指示的参考块产生用于PU的预测块。可基于由用于PU的候选列表中的选定的候选运动信息确定PU的运动信息。Moreover, video encoder 20 may generate a prediction block for the PU based on the 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 in 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 the codestream, 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 the PU may be the same as the candidate list generated by video encoder 20 for the PU. The syntax elements parsed from the code stream may indicate the location of the candidate motion information selected in the candidate list of PUs. After generating the 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 for the PU based on candidate motion information selected in the candidate list for the PU. Video decoder 30 may reconstruct an image block for the CU based on the prediction block for the PU and the residual block for the CU.
应当理解,在一种可行的实施方式中,在解码端,候选列表的构建与从码流中解析选择的候选者在候选列表中的位置是相互独立,可以任意先后或者并行进行的。It should be understood that, in a feasible implementation manner, at the decoding end, the construction of the candidate list is independent of the position of the candidate selected in the candidate list from the code stream, and may be performed in any order or in parallel.
在另一种可行的实施方式中,在解码端,首先从码流中解析选定的候选者在候选列表中的位置,根据解析出来的位置构建候选列表,在该实施方式中,不需要构建全部的候选列表,只需要构建到该解析出来的位置处的候选列表,即能够确定该位置处的候选者即可。举例来说,当解析码流得出选定的候选者为候选列表中索引标识为3的候选者时,仅需要构建从索引为0到索引为3的候选列表,即可确定索引标识为3的候选者,可以达到减小复杂度,提高解码效率的技术效果。In another feasible implementation manner, at the decoding end, the location 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 location. In this embodiment, no construction is needed. For all candidate lists, only the candidate list at the parsed location needs to be constructed, that is, the candidate at the location can be determined. For example, when the code stream is parsed to find that the selected candidate is a candidate whose index identifier is 3 in the candidate list, only the candidate list from index 0 to index 3 needs to be constructed, and the index identifier is determined to be 3 Candidates 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 in the embodiment of the present application. Video encoder 20 may perform intra-frame decoding and inter-frame decoding of video blocks within a video stripe. Intra decoding relies on spatial prediction to reduce or remove spatial redundancy of 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 or images of a video sequence. The intra mode (I mode) may refer to any of a number of space based compression modes. An inter mode 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包含帧间预测单元(未示意)和帧内预测单元46。帧间预测单元可以包括运动估计单元42和运动补偿单元44。对于视频块重构建,视频编码器20也可包含反量化单元58、反变换单元60和求和器(亦称为重建器)62。也可包含解块滤波器(图2中未展示)以对块边界进行滤波从而从经重构建视频中去除块效应伪影。在需要时,解块滤波器将通常对求和器62的输出进行滤波。除了解块滤波器之外,也可使用额外环路滤波器(环路内或环路后)。In the possible embodiment of FIG. 2, video encoder 20 includes a partitioning unit 35, a prediction unit 41, a reference image memory 64, a summer 50, a transform processing unit 52, a quantization unit 54, and an entropy encoding unit 56. The prediction unit 41 includes an inter prediction unit (not shown) and an intra prediction unit 46. The inter prediction unit may include a motion estimation unit 42 and a motion compensation unit 44. For video block reconstruction, video encoder 20 may also include inverse quantization unit 58, inverse transform unit 60, and a summer (also referred to as reconstructor) 62. A deblocking filter (not shown in Figure 2) may also be included to filter the block boundaries to remove blockiness artifacts from the reconstructed video. The deblocking filter will typically filter the output of summer 62 as needed. In addition to the deblocking filter, an additional loop filter (in-loop or post-loop) can also be used.
如图2中所展示,视频编码器20接收视频数据,且分割单元35将数据分割成视频块。此分割也可包含分割成条带、图像块或其它较大单元,以及(例如)根据LCU及CU的四叉树结构进行视频块分割。视频编码器20示例性地说明编码在待编码的视频条带内的视频块的组件。一般来说,条带可划分成多个视频块(且可能划分成称作图像块的视频块的集合)。As shown in FIG. 2, video encoder 20 receives video data, and segmentation unit 35 segments the data into video blocks. This partitioning may also include partitioning into strips, image blocks, or other larger units, and, for example, video block partitioning based on the quadtree structure of the LCU and CU. Video encoder 20 exemplarily illustrates the components of a video block encoded within a video strip to be encoded. In general, a stripe may be partitioned into multiple video blocks (and possibly into a collection of video blocks called image blocks).
预测单元41可基于编码质量与代价计算结果(例如,码率-失真代价,RDcost)选择当前视频块的多个可能解码模式中的一者,例如多个帧内解码模式中的一者或多个帧间解码模式中的一者。预测单元41可将所得经帧内解码或经帧间解码块提供到求和器50以产生残 差块数据且将所得经帧内解码或经帧间解码块提供到求和器62以重构建经编码块从而用作参考图像。 Prediction unit 41 may select one of a plurality of possible decoding modes of the current video block based on the encoding quality and the cost calculation result (eg, rate-distortion cost, RDcost), such as one or more of a plurality of intra-coding modes One of the inter-frame decoding modes. Prediction unit 41 may provide the resulting intra-coded or inter-coded block to summer 50 to generate a residual The block data is differenceed and the resulting intra-coded or inter-coded block is provided to summer 62 to reconstruct the coded block for use as a reference picture.
预测单元41内的帧间预测单元(例如运动估计单元42及运动补偿单元44)执行相对于一个或多个参考图像中的一个或多个预测块的当前视频块的帧间预测性解码以提供时间压缩。运动估计单元42用于根据视频序列的预定模式确定视频条带的帧间预测模式。预定模式可将序列中的视频条带指定为P条带、B条带或GPB条带。运动估计单元42及运动补偿单元44可高度集成,但为概念目的而分别说明。通过运动估计单元42所执行的运动估计以产生估计视频块的运动矢量的过程。例如,运动矢量可指示当前视频帧或图像内的视频块的PU相对于参考图像内的预测块的位移。Inter-prediction units (e.g., motion estimation unit 42 and motion compensation unit 44) within prediction unit 41 perform inter-predictive decoding of current video blocks relative to one or more of the one or more reference pictures to provide Time compression. Motion estimation unit 42 is operative to determine an inter prediction mode for the video stripe based on a predetermined pattern of the video sequence. The predetermined mode specifies the video strips in the sequence as P strips, B strips, or GPB strips. Motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are separately illustrated for conceptual purposes. The motion estimation performed by motion estimation unit 42 produces a process of estimating the motion vector of the video block. For example, the motion vector may indicate the displacement of the PU of the video block within the current video frame or image relative to the predicted block within the reference image.
预测块为依据像素差而被发现为紧密匹配待解码的视频块的PU的块,像素差可通过绝对差和(SAD)、平方差和(SSD)或其它差度量确定。在一些可行的实施方式中,视频编码器20可计算存储于参考图像存储器64中的参考图像的子整数(sub-integer)像素位置的值。例如,视频编码器20可内插参考图像的四分之一像素位置、八分之一像素位置或其它分数像素位置的值。因此,运动估计单元42可执行相对于全像素位置及分数像素位置的运动搜索且输出具有分数像素精确度的运动矢量。The prediction block is a block of PUs that are found to closely match the video block to be decoded according to the pixel difference, and the pixel difference may be determined by absolute difference sum (SAD), squared difference sum (SSD) or other difference metric. In some possible implementations, video encoder 20 may calculate a value of a sub-integer pixel location of a reference image stored in reference image memory 64. For example, video encoder 20 may interpolate values of a quarter pixel position, an eighth pixel position, or other fractional pixel position of a reference image. Accordingly, 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 fractional pixel precision.
运动估计单元42通过比较PU的位置与参考图像的预测块的位置而计算经帧间解码条带中的视频块的PU的运动矢量。可从第一参考图像列表(列表0)或第二参考图像列表(列表1)选择参考图像,列表中的每一者识别存储于参考图像存储器64中的一个或多个参考图像。运动估计单元42将经计算运动矢量发送到熵编码单元56及运动补偿单元44。 Motion estimation unit 42 calculates the motion vector of the PU of the video block in the inter-coded slice by comparing the location of the PU with the location of the prediction block of the reference picture. The reference images may be selected from a first reference image list (List 0) or a second reference image list (List 1), each of the lists identifying one or more reference images stored in the reference image memory 64. Motion estimation unit 42 transmits the computed motion vector to entropy encoding unit 56 and motion compensation unit 44.
由运动补偿单元44执行的运动补偿可涉及基于由运动估计所确定的运动矢量提取或产生预测块。在接收当前视频块的PU的运动矢量后,运动补偿单元44即可在参考图像列表中的一者中定位运动矢量所指向的预测块。视频编码器20通过从正解码的当前视频块的像素值减去预测块的像素值来形成残残差视频块,从而形成像素差值。像素差值形成块的残差数据,且可包含亮度及色度差分量两者。求和器50表示执行此减法运算的一个或多个组件。运动补偿单元44也可产生与视频块及视频条带相关联的语法元素以供视频解码器30用于解码视频条带的视频块。Motion compensation performed by motion compensation unit 44 may involve extracting or generating a prediction block based on motion vectors determined by motion estimation. After receiving the motion vector of the PU of the current video block, motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference picture lists. The 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 residual data for the block and may include both luminance and chrominance difference components. Summer 50 represents one or more components that perform this subtraction. Motion compensation unit 44 may also generate syntax elements associated with video blocks and video slices for video decoder 30 to use to decode video blocks of video slices.
如果PU位于B条带中,则含有PU的图像可与称作“列表0”和“列表1”的两个参考图像列表相关联。在一些可行的实施方式中,含有B条带的图像可与为列表0和列表1的组合的列表组合相关联。If the PU is located in a B-strip, the PU-containing image may be associated with two reference image lists called "List 0" and "List 1". In some possible implementations, an image containing B strips 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中的参考图像。运动补偿单元44可基于由PU的运动信息指示的参考块产生PU的预测性图像块。 Furthermore, if the PU is located in a B-strip, motion estimation unit 42 may perform uni-directional prediction or bi-directional prediction for the PU, wherein, in some possible implementations, bi-directional prediction is based on List 0 and List 1 reference image lists, respectively. The prediction performed by the image, in other possible embodiments, the bidirectional prediction is prediction based on the reconstructed future frame and the reconstructed past frame in the display order of the current frame, respectively. When the motion estimation unit 42 performs unidirectional prediction for the PU, the motion estimation unit 42 may search for a reference block for the PU in the reference image of list 0 or list 1. Motion estimation unit 42 may then generate a reference index indicating a reference picture containing the 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 index, a prediction direction identifier, and a motion vector as motion information of the PU. The prediction direction indicator may indicate that the reference index indicates the reference image in list 0 or list 1. Motion compensation unit 44 may generate a predictive image block of the PU based on the 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 the PU, the motion estimation unit 42 may search for a reference block for the PU in the reference image in the list 0 and may also search for another one for the PU in the reference image in the list 1 Reference block. Motion estimation unit 42 may then generate a reference index indicating the reference picture 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 of the PU and a motion vector as motion information of the PU. Motion compensation unit 44 may generate a predictive image block of the PU based on the 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 possible implementations, motion estimation unit 42 does not output a complete set of motion information for the PU to entropy encoding module 56. Rather, motion estimation unit 42 may signal the motion information of the PU with reference to motion information of another PU. For example, motion estimation unit 42 may determine that the motion information of the PU is sufficiently similar to the motion information of the neighboring PU. In this embodiment, motion estimation unit 42 may indicate an indication value in a syntax structure associated with the PU that indicates to video decoder 30 that the PU has the same motion information as the neighboring PU or has a slave phase The motion information derived by the neighboring PU. In another embodiment, motion estimation unit 42 may identify candidates and motion vector differences (MVDs) associated with neighboring PUs in a syntax structure associated with the PU. The 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的候选者列表。候选者列表中的一或多者可包括一组或多组原始候选运动信息和从原始候选运动信息导出的一组或多组额外候选运动信息。As described above, prediction unit 41 may generate a candidate list for each PU of the CU. One or more of the candidate lists may include one or more sets of original candidate motion information and one or more sets of additional candidate motion information derived from the original candidate motion information.
预测单元41内的帧内预测单元46可执行相对于在与待解码的当前块相同的图像或条带中的一个或多个相邻块的当前视频块的帧内预测性解码以提供空间压缩。因此,作为通过运动估计单元42及运动补偿单元44执行的帧间预测(如前文所描述)的替代,帧内预测单元46可帧内预测当前块。明确地说,帧内预测单元46可确定用以编码当前块的帧内预测模式。在一些可行的实施方式中,帧内预测单元46可(例如)在单独编码遍历期间使用各种帧内预测模式来编码当前块,且帧内预测单元46(或在一些可行的实施方式中,模式选择单元40)可从经测试模式选择使用的适当帧内预测模式。 Intra prediction unit 46 within 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 . Thus, instead of inter-prediction (as described above) performed by motion estimation unit 42 and motion compensation unit 44, intra-prediction unit 46 may intra-predict the current block. In particular, intra prediction unit 46 may determine an intra prediction mode to encode the current block. In some possible implementations, intra-prediction unit 46 may encode the current block using various intra-prediction modes, for example, during separate encoding traversal, and intra-prediction unit 46 (or in some possible implementations, The mode selection unit 40) may select the appropriate intra prediction mode to use from the tested mode.
在预测单元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 transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using, for example, a discrete cosine transform (DCT) or a conceptually similar transformed transform (eg, a discrete sinusoidal transform DST). Transform processing unit 52 may convert the residual video data from the pixel domain to a transform domain (eg, a frequency domain).
变换处理单元52可将所得变换系数发送到量化单元54。量化单元54对变换系数进行量化以进一步减小码率。量化过程可减少与系数中的一些或全部相关联的比特深度。可通过调整量化参数来修改量化的程度。在一些可行的实施方式中,量化单元54可接着执行包含经量化变换系数的矩阵的扫描。替代地,熵编码单元56可执行扫描。Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the code rate. The quantization process can 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 possible implementations, quantization unit 54 may then perform a scan of the matrix containing the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform a scan.
在量化之后,熵编码单元56可熵编码经量化变换系数。例如,熵编码单元56可执行上下文自适应性可变长度解码(CAVLC)、上下文自适应性二进制算术解码(CABAC)、基于语法的上下文自适应性二进制算术解码(SBAC)、概率区间分割熵(PIPE)解码或另一熵编码方法或技术。熵编码单元56也可熵编码正经解码的当前视频条带的运动矢量及其它语法元素。在通过熵编码单元56进行熵编码之后,可将经编码码流传输到视频解码器30或存档以供稍后传输或由视频解码器30检索。 After quantization, entropy encoding unit 56 may entropy encode the quantized transform coefficients. For example, 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 partition entropy ( PIPE) decoding or another entropy coding method or technique. Entropy encoding unit 56 may also entropy encode the motion vectors and other syntax elements of the current video strip being decoded. After entropy encoding by entropy encoding unit 56, the encoded code stream may be transmitted to video decoder 30 or archive for later transmission or retrieved by video decoder 30.
熵编码单元56可编码根据本申请的技术指示选定帧内预测模式的信息。视频编码器20可在可包含多个帧内预测模式索引表和多个经修改帧内预测模式索引表(也称作码字映射表)的所传输码流配置数据中包含各种块的编码上下文的定义及用于上下文中的每一者的MPM、帧内预测模式索引表和经修改帧内预测模式索引表的指示。 Entropy encoding unit 56 may encode information indicative of a selected intra prediction mode in accordance with the techniques of the present application. Video encoder 20 may include encoding of various blocks in transmitted code stream configuration data that may include multiple intra prediction mode index tables and a plurality of modified intra prediction mode index tables (also referred to as codeword mapping tables) A 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用作参考块以帧间预测后续视频帧或图像中的块。 Inverse quantization unit 58 and inverse transform unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for later use as a reference block for the reference image. Motion compensation unit 44 may calculate the reference block by adding the residual block to a prediction block of one of the reference pictures within one of the reference picture lists. 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. Summer 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to produce a reference block for storage in reference image memory 64. The reference block may be used by motion estimation unit 42 and motion compensation unit 44 as reference blocks to inter-predict subsequent video frames or blocks in the image.
应当理解的是,视频编码器20的其它的结构变化可用于编码视频流。例如,对于某些图像块或者图像帧,视频编码器20可以直接地量化残差信号而不需要经变换单元52处理,相应地也不需要经反变换单元60处理;或者,对于某些图像块或者图像帧,视频编码器20没有产生残差数据,相应地不需要经变换单元52、量化单元54、反量化单元58和反变换单元60处理;或者,视频编码器20中量化单元54和反量化单元58可以合并在一起。It should be understood that other structural changes to video encoder 20 may be used to encode the video stream. For example, for certain image blocks or image frames, video encoder 20 may directly quantize the residual signal without the need for processing by transform unit 52, and accordingly need not be processed by inverse transform unit 60; or, for some image blocks Or the image frame, 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 quantization unit 54 and the inverse of the video encoder 20 Quantization units 58 can be combined together.
图3为本申请实施例中视频解码器30的一种示意性框图。在图3的可行的实施方式中,视频解码器30包含熵编码单元80、预测单元81、反量化单元86、反变换单元88、求和器90和参考图像存储器92。一种变型下,参考图像存储器92亦可以设置在视频解码器30之外。预测单元81包括帧间预测单元(未示意)和帧内预测单元84。帧间预测单元例如可以是运动补偿单元82。在一些可行的实施方式中,视频解码器30可执行与关于来自图4的视频编码器20描述的编码流程的示例性地互逆的解码流程。FIG. 3 is a schematic block diagram of a video decoder 30 in the embodiment of the present application. In the possible implementation of FIG. 3, 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, and a reference image memory 92. In a variant, the reference image memory 92 can also be placed outside of the video decoder 30. The prediction unit 81 includes an inter prediction unit (not shown) and an intra prediction unit 84. The inter prediction unit may be, for example, a motion compensation unit 82. In some possible implementations, video decoder 30 may perform an exemplary reciprocal decoding process with respect to the encoding flow described by video encoder 20 from FIG.
在解码过程期间,视频解码器30从视频编码器20接收表示经编码视频条带的视频块及相关联的语法元素的经编码视频码流。视频解码器30的熵编码单元80熵解码码流以产生经量化系数、运动矢量及其它语法元素。熵编码单元80将运动矢量及其它语法元素转递到预测单元81。视频解码器30可在视频条带层级和/或视频块层级处接收语法元素。During the decoding process, video decoder 30 receives from video encoder 20 an encoded video bitstream representing the video blocks of the encoded video slice and associated syntax elements. Entropy encoding unit 80 of video decoder 30 entropy decodes the code stream to produce quantized coefficients, motion vectors, and other syntax elements. The entropy encoding unit 80 forwards the motion vectors and other syntax elements to the prediction unit 81. Video decoder 30 may receive syntax elements at the video stripe level and/or video block level.
在视频条带经解码为经帧内解码(I)条带时,预测单元81的帧内预测单元84可基于用信号发送的帧内预测模式及来自当前帧或图像的先前经解码块的数据而产生当前视频条带的视频块的预测数据。When the video slice is decoded into an intra-coded (I) slice, intra-prediction unit 84 of prediction unit 81 may be based on the signaled intra prediction mode and data from the previously decoded block of the current frame or image. The predicted data of the video block of the current video stripe is generated.
在视频图像经解码为经帧间解码(例如,B、P或GPB)条带时,预测单元81的运动补偿单元82基于从熵编码单元80所接收的运动矢量及其它语法元素而产生当前视频图像的视频块的预测块。预测块可从参考图像列表中的一者内的参考图像中的一者产生。视频解码器30可基于存储于参考图像存储器92中的参考图像使用默认构建技术来构建参考图像列表(列表0及列表1)。When the video image is decoded into an inter-frame decoded (eg, B, P, or GPB) stripe, motion compensation unit 82 of prediction unit 81 generates a current video based on the motion vectors and other syntax elements received from entropy encoding unit 80. The predicted block of the video block of the image. The prediction block may be generated from one of the reference images within one of the reference image lists. Video decoder 30 may construct a reference image list (List 0 and List 1) using default construction techniques based on reference images stored in reference image memory 92.
运动补偿单元82通过解析运动矢量及其它语法元素来确定当前视频条带的视频块的预测信息,且使用预测信息来产生正经解码的当前视频块的预测块。例如,运动补偿单元82使用所接收的语法元素中的一些来确定用以解码视频条带的视频块的预测模式(例如,帧内预测或帧间预测)、帧间预测条带类型(例如,B条带、P条带或GPB条带)、条带的参考 图像列表中的一者或多者的构建信息、条带的每一经帧间编码视频块的运动矢量、条带的每一经帧间解码视频块的帧间预测状态及用以解码当前视频条带中的视频块的其它信息。 Motion compensation unit 82 determines the prediction information for the video block of the current video slice by parsing the motion vector and other syntax elements, and uses the prediction information to generate a prediction block of the current video block that is being decoded. For example, motion compensation unit 82 uses some of the received syntax elements to determine a prediction mode (eg, intra prediction or inter prediction) of the video block used to decode the video slice, an inter prediction strip type (eg, B strip, P strip or GPB strip), strip reference Construction information of one or more of the image lists, motion vectors of each inter-coded video block of the stripe, inter-prediction status of each inter-coded video block of the stripe, and decoding of the current video stripe Additional information for the video block in .
运动补偿单元82也可基于内插滤波器执行内插。运动补偿单元82可使用如由视频编码器20在视频块的编码期间所使用的内插滤波器来计算参考块的子整数像素的内插值。在此应用中,运动补偿单元82可从所接收的语法元素确定由视频编码器20使用的内插滤波器且使用内插滤波器来产生预测块。 Motion compensation unit 82 may also perform interpolation based on the interpolation filter. Motion compensation unit 82 may use the interpolation filters as used by video encoder 20 during encoding of the video block to calculate interpolated values for sub-integer pixels of the reference block. In this application, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use an interpolation filter to generate the prediction blocks.
如果PU是使用帧间预测而编码,则运动补偿单元82可产生用于PU的候选者列表。码流中可包括识别选定候选者在PU的候选者列表中的位置的数据。在产生用于PU的候选者列表之后,运动补偿单元82可基于由PU的运动信息指示的一或多个参考块产生用于PU的预测性图像块。PU的参考块可在与所述PU不同的时间图像中。运动补偿单元82可基于由PU的候选者列表中的选定的运动信息确定PU的运动信息。If the PU is encoded using inter prediction, motion compensation unit 82 may generate a candidate list for the PU. Data identifying the location of the selected candidate in the candidate list of the PU may be included in the code stream. After generating the candidate list for the PU, 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. The reference block of the PU may be in a different time image than the PU. Motion compensation unit 82 may determine motion information for the PU based on the selected motion information from the candidate list of PUs.
反量化单元86对码流中所提供且通过熵编码单元80所解码的经量化变换系数进行反量化(例如,解量化)。反量化过程可包含使用通过视频编码器20针对视频条带中的每一视频块所计算的量化参数确定量化的程度,且同样地确定应应用的反量化的程度。反变换单元88将反变换(例如,反DCT、反整数变换或概念上类似的反变换过程)应用于变换系数以便在像素域中产生残差块。 Inverse quantization unit 86 inverse quantizes (eg, dequantizes) the quantized transform coefficients provided in the codestream and decoded by 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 of the video slices, and likewise determining the degree of inverse quantization that should be applied. Inverse transform unit 88 applies an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to produce a residual block in the pixel domain.
在运动补偿单元82基于运动矢量及其它语法元素产生当前视频块的预测块之后,视频解码器30通过将来自反变换单元88的残差块与通过运动补偿单元82产生的对应预测块求和来形成经解码视频块。求和器90(即重建器)表示执行此求和运算的一个或多个组件。在需要时,也可应用解块滤波器来对经解码块进行滤波以便去除块效应伪影。其它环路滤波器(在解码环路中或在解码环路之后)也可用以使像素转变平滑,或以其它方式改进视频质量。给定帧或图像中的经解码视频块接着存储于参考图像存储器92中,参考图像存储器92存储供后续运动补偿所使用的参考图像。参考图像存储器92也存储供稍后呈现于例如图1的显示装置32的显示装置上的经解码视频。After motion compensation unit 82 generates a prediction block for the current video block based on the motion vector and other syntax elements, video decoder 30 sums the residual block from inverse transform unit 88 with the corresponding prediction block generated by motion compensation unit 82. A decoded video block is formed. Summer 90 (ie, the reconstructor) represents one or more components that perform this summation operation. A deblocking filter can also be applied to filter the decoded blocks to remove blockiness artifacts as needed. Other loop filters (either 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 display device 32 of FIG.
如前文所注明,本申请的技术示例性地涉及帧间解码。应理解,本申请的技术可通过本申请中所描述的视频解码器中的任一者进行,视频解码器包含(例如)如关于图1到3所展示及描述的视频编码器20及视频解码器30。即,在一种可行的实施方式中,关于图2所描述的预测单元41可在视频数据的块的编码期间在执行帧间预测时执行下文中所描述的特定技术。在另一可行的实施方式中,关于图3所描述的预测单元81可在视频数据的块的解码期间在执行帧间预测时执行下文中所描述的特定技术。因此,对一般性“视频编码器”或“视频解码器”的引用可包含视频编码器20、视频解码器30或另一视频编码或编码单元。As noted above, the techniques of the present application illustratively relate to inter-frame decoding. It should be understood that the techniques of the present application can be performed by any of the video decoders described in this application, including, for example, video encoder 20 and video decoding as shown and described with respect to Figures 1 through 3 30. That is, in one possible implementation, the prediction unit 41 described with respect to FIG. 2 may perform the specific techniques described below when performing inter prediction during encoding of blocks of video data. In another possible implementation, the prediction unit 81 described with respect to FIG. 3 may perform the specific techniques described below when performing inter prediction during decoding of blocks of video data. Thus, references to a generic "video encoder" or "video decoder" may include video encoder 20, video decoder 30, or another video encoding or encoding unit.
应当理解的是,视频解码器30的其它结构变化可用于解码经编码视频位流。例如,对于某些图像块或者图像帧,视频解码器30的熵解码单元80没有解码出经量化的系数,相应地不需要经反量化单元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, for certain image blocks or image frames, entropy decoding unit 80 of video decoder 30 does not decode the quantized coefficients, and accordingly does not need to be processed by inverse quantization unit 86 and inverse transform unit 88.
图4为本申请实施例中由视频编码器(例如视频编码器20)执行合并操作200对当前图像块(例如当前PU或当前CU)的运动信息进行编码的一种示例性流程图。在其它可行的 实施方式中,视频编码器可执行不同于合并操作200的合并操作。举例来说,在其它可行的实施方式中,视频编码器可执行合并操作,其中视频编码器执行比合并操作200多、少的步骤或与合并操作200不同的步骤。在其它可行的实施方式中,视频编码器可以不同次序或并行地执行合并操作200的步骤。编码器还可对以跳跃(skip)模式编码的PU执行合并操作200。4 is an exemplary flowchart of encoding motion information of a current image block (eg, a current PU or a current CU) by a video encoder (eg, video encoder 20) performing a merge operation 200 in an embodiment of the present application. In other feasible In an embodiment, the video encoder may perform a merge operation other than the merge operation 200. For example, in other possible implementations, the video encoder may perform a merge operation in which the video encoder performs more than 200 steps, or steps different from the merge operation 200, than the merge operation. 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 the PU encoded in a skip mode.
在视频编码器开始合并操作200之后,视频编码器可产生用于当前PU的候选者列表(202)。视频编码器可以各种方式产生用于当前PU的候选者列表。举例来说,视频编码器可根据下文关于图6A、图6B到图10描述的实例技术中的一者产生用于当前PU的候选者列表。After the video encoder begins the merge operation 200, the video encoder may generate a candidate list for the current PU (202). The video encoder can 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. 6A, 6B-10.
如前文所述,用于当前PU的候选者列表可包括时间候选运动信息(简称时间候选者)。时间候选运动信息可指示时域对应(co-located)的PU的运动信息。co-located的PU可在空间上与当前PU处于图像帧中的同一个位置,但在参考图像而非当前图像中。本申请可将包括时域对应的PU的参考图像称作相关参考图像。本申请可将相关参考图像的参考图像索引称作相关参考图像索引。如前文所描述,当前图像可与一个或多个参考图像列表(例如,列表0、列表1等)相关联。参考图像索引可通过指示参考图像在某一个参考图像列表中的位置来指示参考图像。在一些可行的实施方式中,当前图像可与组合参考图像列表相关联。As described above, the candidate list for the current PU may include temporal candidate motion information (referred to as a temporal candidate). The temporal candidate motion information may indicate motion information of a time-domain co-located PU. The co-located PU may be spatially co-located with the current PU at the same location in the image frame, but in the reference image rather than the current image. The present application may refer to a reference image including a PU corresponding to a time domain as a related reference image. The present application may refer to a reference image index of an associated reference image as a related reference image index. As described above, 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 possible implementations, the current image can be associated with a combined reference image list.
在一些视频编码器中,相关参考图像索引为涵盖与当前PU相关联的参考索引源位置的PU的参考图像索引。在这些视频编码器中,与当前PU相关联的参考索引源位置邻接于当前PU左方或邻接于当前PU上方。在本申请中,如果与PU相关联的图像块包括特定位置,则PU可“涵盖”所述特定位置。In some video encoders, the associated reference image index is a reference image index of the PU that encompasses the reference index source location associated with the current PU. In these video encoders, the reference index source location associated with the current PU is adjacent to or adjacent to the current PU. In the present application, a PU may "cover" the particular location if the image block associated with the PU includes a particular location.
然而,可存在以下例子:与当前PU相关联的参考索引源位置在当前CU内。在这些例子中,如果PU在当前CU上方或左方,则涵盖与当前PU相关联的参考索引源位置的PU可被视为可用。然而,视频编码器可需要存取当前CU的另一PU的运动信息以便确定含有co-located PU的参考图像。因此,这些视频编码器可使用属于当前CU的PU的运动信息(即,参考图像索引)以产生用于当前PU的时间候选者。换句话说,这些视频编码器可使用属于当前CU的PU的运动信息产生时间候选者。因此,视频编码器不能并行地产生用于当前PU和涵盖与当前PU相关联的参考索引源位置的PU的候选者列表。However, there may be an example 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 that covers 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 image containing the co-located PU. Accordingly, these video encoders may use motion information (ie, reference image index) of PUs belonging to the current CU to generate temporal candidates for the current PU. In other words, these video encoders can generate temporal candidates using motion information for PUs belonging to the current CU. Accordingly, the video encoder cannot generate a candidate list for the current PU and the PU that covers the reference index source location associated with the current PU in parallel.
根据本申请的技术,视频编码器可在不参考任何其它PU的参考图像索引的情况下显式地设定相关参考图像索引。此可使得视频编码器能够并行地产生用于当前PU和当前CU的其它PU的候选者列表。因为视频编码器显式地设定相关参考图像索引,所以相关参考图像索引不基于当前CU的任何其它PU的运动信息。在视频编码器显式地设定相关参考图像索引的一些可行的实施方式中,视频编码器可始终将相关参考图像索引设定为固定的预定义预设参考图像索引(例如0)。以此方式,视频编码器可基于由预设参考图像索引指示的参考帧中的co-located PU的运动信息产生时间候选者,且可将时间候选者包括于当前CU的候选者列表中。In accordance with the techniques of the present application, a video encoder can explicitly set an associated reference image index without reference to a reference image index of any other PU. This may enable the video encoder to generate candidate lists for other PUs of the current PU and the current CU in parallel. Because the video encoder explicitly sets the relevant reference picture index, the associated reference picture index is not based on motion information of any other PU of the current CU. In some possible implementations in which the video encoder explicitly sets the relevant reference image index, the video encoder may always set the relevant reference image index to a fixed predefined preset reference image index (eg, 0). In this way, the video encoder may generate a temporal candidate based on the motion information of the co-located PU in the reference frame indicated by the preset reference image index, and may include the temporal candidate in the candidate list of the current CU.
在视频编码器显式地设定相关参考图像索引的可行的实施方式中,视频编码器可显式地在语法结构(例如图像标头、条带标头、APS或另一语法结构)中用信号通知相关参考图像索引。在此可行的实施方式中,视频编码器可用信号通知解码端用于每一LCU(即CTU)、 CU、PU、TU或其它类型的子块的相关参考图像索引。举例来说,视频编码器可用信号通知:用于CU的每一PU的相关参考图像索引等于“1”。In a possible implementation where the video encoder explicitly sets the relevant reference picture index, the video encoder can be explicitly used in a syntax structure (eg, an image header, a stripe header, an APS, or another syntax structure) Signals the relevant reference image index. In this possible implementation, the video encoder can signal the decoder for each LCU (ie CTU), An associated reference image index of a CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the associated reference picture index for each PU of the CU is equal to "1."
在一些可行的实施方式中,相关参考图像索引可经隐式地而非显式地设定。在这些可行的实施方式中,视频编码器可使用由涵盖当前CU外部的位置的PU的参考图像索引指示的参考图像中的PU的运动信息产生用于当前CU的PU的候选者列表中的每一时间候选者,即使这些位置并不严格地邻近当前PU。In some possible implementations, the associated reference image index can be set implicitly rather than explicitly. In these possible embodiments, the video encoder may generate motion information for the PU of the current CU using the motion information of the PU in the reference image indicated by the reference image index of the PU covering the location outside the current CU. A time 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 a predictive image block (204) associated with the candidate in the candidate list. 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 the one or more reference blocks indicated by the motion information of the current PU. Sexual image block. The video encoder may select one of the candidates from the candidate list (206). The video encoder can select candidates in a variety of ways. For example, the video encoder may select one of the candidates based on a rate-distortion cost analysis for each of the predictive image blocks associated with the candidate.
在选择候选者之后,视频编码器可输出候选者的索引(208)。该索引可指示选定候选者在候选者列表中的位置。在一些可行的实施方式中,该索引可表示为“merge_idx”。After selecting the candidate, the video encoder may output an index of the candidate (208). The index may indicate the location of the selected candidate in the candidate list. In some possible implementations, the index can be expressed as "merge_idx".
图5为本申请实施例中由视频解码器(例如视频解码器30)执行的运动补偿的一种示例性流程图。5 is an exemplary flow diagram of motion compensation performed by a video decoder (e.g., 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 for the selected candidate for the current PU (222). For example, the video decoder may receive a candidate index indicating the location of the selected candidate within the current PU's candidate list.
如果当前PU的运动信息是使用合成merge模式进行编码且当前PU经双向预测,则视频解码器可接收第一候选者索引和第二候选者索引。第一候选者索引指示用于当前PU的列表0运动矢量的选定候选者在候选者列表中的位置。第二候选者索引指示用于当前PU的列表1运动矢量的选定候选者在候选者列表中的位置。在一些可行的实施方式中,单一语法元素可用以识别两个候选者索引。If the motion information of the current PU is encoded using the synthetic merge mode and the current PU is bi-predicted, the video decoder may receive the first candidate index and the second candidate index. The first candidate index indicates the location of the selected candidate for the list 0 motion vector of the current PU in the candidate list. The second candidate index indicates the location of the selected candidate for the list 1 motion vector for the current PU in the candidate list. In some possible implementations, a single syntax element can be used to identify two candidate indices.
另外,视频解码器可产生用于当前PU的候选者列表(224)。视频解码器可以各种方式产生用于当前PU的此候选者列表。举例来说,视频解码器可使用下文参看图6A、图6B到图10描述的技术来产生用于当前PU的候选者列表。当视频解码器产生用于候选者列表的时间候选者时,视频解码器可显式地或隐式地设定识别包括co-located PU的参考图像的参考图像索引,如前文关于图4所描述。Additionally, the video decoder can 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 Figures 6A, 6B-10 to generate a candidate list for the current PU. When the video decoder generates a temporal candidate for the candidate list, the video decoder may explicitly or implicitly set a reference image index identifying the reference image including the co-located PU, as previously described with respect to FIG. .
在产生用于当前PU的候选者列表之后,视频解码器可基于由用于当前PU的候选者列表中的一个或多个选定候选者指示的运动信息确定当前PU的运动信息(225)。举例来说,如果当前PU的运动信息是使用合并模式而编码,则当前PU的运动信息可与由选定候选者指示的运动信息相同。如果当前PU的运动信息是使用AMVP模式而编码,则视频解码器可使用由所述或所述选定候选者指示的一个或多个运动矢量和码流中指示的一个或多个MVD来重建当前PU的一个或多个运动矢量。当前PU的参考图像索引和预测方向标识可与所述一个或多个选定候选者的参考图像索引和预测方向标识相同。在确定当前PU的运动信息之后,视频解码器可基于由当前PU的运动信息指示的一个或多个参考块产生用于当前PU的预测性图像块(226)。 After generating the candidate list for the current PU, the video decoder may determine motion information for the current PU based on the motion information indicated by the 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 the 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 the AMVP mode, the video decoder may reconstruct using one or more motion vectors indicated by the or the selected candidate and one or more MVDs indicated in the code stream One or more motion vectors of the current PU. The reference image index and the prediction direction identifier of the current PU may be the same as the reference image index and the prediction direction identifier of the one or more selected candidates. After determining the motion information for 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).
需要说明的是,在一种实现方式下,视频解码器产生用于当前PU的候选者列表(224)的过程中,一旦收集到的可用候选者个数与由接收到的候选者索引确定的候选者的数量一致时,可以结束收集候选者过程。It should be noted that, in an implementation manner, the video decoder generates a candidate list (224) for the current PU, and once the number of available candidates collected is determined by the received candidate index. When the number of candidates is the same, the process of collecting candidates can be ended.
图6A为本申请实施例中编码单元(CU)、与其关联的空域邻近图像块以及时域邻近图像块的一种示例性示意图,说明CU600和与CU600相关联的示意性的候选者位置1到10的示意图。候选者位置1到5表示与CU600在同一图像中的空间候选者。候选者位置1定位于CU600左方。候选者位置2定位于CU600上方。候选者位置3定位于CU600右上方。候选者位置4定位于CU600左下方。候选者位置5定位于CU600左上方。候选者位置6到10表示与CU600的co-located块602相关联的时间候选者,其中co-located块为在参考图像(即临近已编码图像)中与CU600具有相同的大小、形状和坐标的图像块。候选者位置6位于co-located块602的右下角。候选者位置7定位于co-located块602右下中间位置。候选者位置8定位于co-located块602左上角位置。候选者位置9定位于co-located块602右下角位置。候选者位置10定位于co-located块602左上中间位置。图6A为用以提供帧间预测模块(例如具体是运动估计单元42或运动补偿单元82)可产生候选者列表的候选者位置的示意性实施方式。6A is an exemplary schematic diagram of a coding unit (CU), a spatial neighboring image block associated therewith, and a time domain neighboring image block in the embodiment of the present application, illustrating that the CU 600 and the exemplary candidate location associated with the CU 600 are 1 Schematic diagram of 10. Candidate positions 1 through 5 represent spatial candidates in the same image as CU 600. Candidate position 1 is located to the left of CU600. Candidate position 2 is located above CU600. The candidate position 3 is positioned at the upper right of the CU600. The candidate position 4 is located at the lower left of the CU600. The candidate position 5 is positioned at the upper left of the CU600. Candidate locations 6 through 10 represent temporal candidates associated with co-located block 602 of CU 600, where the co-located block is of the same size, shape, and coordinates as CU 600 in the reference image (ie, adjacent to the encoded image) Image block. The candidate location 6 is located in the lower right corner of the co-located block 602. The candidate location 7 is located at the lower right middle of the co-located block 602. The candidate location 8 is located at the upper left corner of the co-located block 602. The candidate location 9 is located at the lower right corner of the co-located block 602. The candidate location 10 is located at the upper left middle position of the co-located block 602. FIG. 6A is an illustrative implementation to provide a candidate location for an inter prediction module (eg, motion estimation unit 42 or motion compensation unit 82 in particular) to generate a candidate list.
需要说明的是,图6A中空间候选者位置和时间候选者位置仅仅是示意,候选者位置包括但不限于此。在一些可行的实施方式中,空间候选者位置示例性的还可以包括与待处理图像块相距预设距离以内,但不与待处理图像块邻接的位置。示例性的,该类位置可以如图6B中的6至27所示。应理解,图6B为本申请实施例中编码单元及与其关联的空域邻近图像块的一种示例性示意图。与所待处理图像块处于同一图像帧且处理所述待处理图像块时已完成重建的不与所述待处理图像块相邻的图像块的位置也属于空间候选者位置的范围内。这里将该类位置称为空域非邻接图像块,应理解的是,所述空间候选者可以取自图6B所示的一个或多个位置。It should be noted that the spatial candidate location and the temporal candidate location in FIG. 6A are merely illustrative, and the candidate location includes but is not limited thereto. In some feasible implementations, the spatial candidate location may also optionally include a location within a preset distance from the image block to be processed, but not adjacent to the image block to be processed. Illustratively, this type of location can be as shown by 6 to 27 in Figure 6B. It should be understood that FIG. 6B is an exemplary schematic diagram of a coding unit and a spatial neighboring image block associated therewith in the embodiment of the present application. The position of the image block not adjacent to the image block to be processed that has been reconstructed when the image block to be processed is in the same image frame as the image block to be processed also belongs to the range of the spatial candidate position. This type of location is referred to herein as a spatial non-contiguous image block, it being understood that the spatial candidate may be taken from one or more locations as shown in Figure 6B.
图7是示出根据本申请实施例的一种图像块的候选运动信息的获取流程700的示意性流程图。过程700可由视频编码器20或视频解码器30执行,具体的,可以由视频编码器20的帧间预测单元或视频解码器30的帧间预测单元来执行。在视频编码器20中,帧间预测单元示例性的,可以包括运动估计单元42和运动补偿单元44。在视频解码器30中,帧间预测单元示例性的,可以包括运动补偿单元82。帧间预测单元可产生用于PU的候选运动信息列表。候选运动信息列表可包括一个或多个原始候选运动信息和从原始候选运动信息导出的一个或多个额外候选运动信息。换言之,即过程700可以包括原始候选运动信息的获取过程710和附加/额外候选运动信息的获取过程730,过程700描述为一系列的步骤或操作,应当理解的是,过程700可以以各种顺序执行和/或同时发生,不限于图7所示的执行顺序。假设具有多个视频帧的视频数据流正在使用视频编码器或者视频解码器,执行包括如下步骤的过程700来预测当前视频帧的当前图像块的候选运动信息; FIG. 7 is a schematic flowchart showing an acquisition process 700 of candidate motion information of an image block according to an embodiment of the present application. Process 700 may be performed by video encoder 20 or video decoder 30, and in particular, may be performed by an inter prediction unit of video encoder 20 or an inter prediction unit of video decoder 30. In video encoder 20, the inter prediction unit is illustrative and may include motion estimation unit 42 and motion compensation unit 44. In video decoder 30, the inter prediction unit is illustrative and may include motion compensation unit 82. The inter prediction unit may generate a candidate motion information list for the PU. The candidate motion information list may include one or more original candidate motion information and one or more additional candidate motion information derived from the original candidate motion information. In other words, process 700 can include acquisition process 710 of original candidate motion information and acquisition process 730 of additional/additional candidate motion information, which is described as a series of steps or operations, it being understood that process 700 can be in various orders Execution and/or simultaneous occurrence are not limited to the execution sequence shown in FIG. Assuming that a video data stream having multiple video frames is using a video encoder or video decoder, a process 700 comprising the steps of predicting candidate motion information for a current image block of a current video frame is performed;
步骤711,按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息(或者,得到用于构建所述待处理图像块的候选列表的M组原始候选运动信息),M为大于或等于0的整数;Step 711: Detect one or more spatial reference blocks of the current image block according to the first preset sequence, and obtain M sets of original candidate motion information in the candidate list of the to-be-processed image block (or obtain for constructing The M sets of original candidate motion information of the candidate list of the image block to be processed, M is an integer greater than or equal to 0;
应理解,这里的检测可以包括如本文其它地方提到的“可用”的检查过程,或者这里的检测可以包括如本文其它地方提到的“可用”的检查以及修剪(例如去冗余)的过程,不再赘述。It should be understood that the detection herein may include an "available" inspection process as referred to elsewhere herein, or the detection herein may include "available" inspections as described elsewhere herein, as well as trimming (eg, de-redundancy) processes. ,No longer.
请参阅图6A和6B,当前图像块的一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。其中,如图6A所示,当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块可以包括:位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。其中,如图6B所示,当前图像块所在图像中的与所述待处理图像块不邻接的一个或多个空域参考块可以包括:第一空域非邻接图像块、第二空域非邻接图像块和第三空域非邻接图像块等。Referring to FIGS. 6A and 6B, one or more spatial reference blocks of the current image block include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block, and/or the current image One or more spatial reference blocks in the image in which the block is located that are not adjacent to the image block to be processed. As shown in FIG. 6A, the one or more spatial reference blocks adjacent to the current image block in the image of the current image block may include: a fourth airspace adjacent block A0 located at the lower left side of the current image block, located at a first airspace neighboring block A1 on the left side of the current image block, a third airspace neighboring block B0 located on the upper right side of the current image block, a second airspace adjacent block B1 on the upper side of the current image block, or located in the The fifth airspace on the upper left side of the current image block is adjacent to the block B2. As shown in FIG. 6B, the one or more spatial reference blocks that are not adjacent to the image block to be processed in the image of the current image block may include: a first spatial non-contiguous image block and a second spatial non-contiguous image block. And a third airspace non-contiguous image block or the like.
在一种实现方式下,在步骤711中,依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数,In an implementation manner, in step 711, the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block are sequentially detected. Whether B2 is available to obtain M1 determined motion vector images in the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 The motion information of the block, M1 is an integer greater than or equal to 0,
将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;Adding M sets of motion information in the motion information of the detected M1 determined motion vector image blocks as candidate motion information to the candidate list, where M1 is equal to or greater than M;
其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。Wherein: the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
在另一种实现方式下,在步骤711中,不妨设第一空域非邻接图像块、第二空域非邻接图像块和第三空域非邻接图像块可用,其中“可用”的物理意义可以参考前文所述,不再赘述。不妨设第一空域邻近块A1的运动矢量、第二空域邻近块B1的运动矢量、第三空域邻近块B0的运动矢量、第四空域邻近块A0的运动矢量、由ATMVP技术获得的运动矢量、第五空域邻近块B2的运动矢量、由STMVP技术获得的运动矢量分别为MVL、MVU、MVUR、MVDL、MVA、MVUL、MVS,设第一空域非邻接图像块、第二空域非邻接图像块和第三空域非邻接图像块的运动矢量分别为MV0、MV1、MV2,则可以按照如下顺序检查以获取用于构建候选者列表中的M个候选者(即M个候选运动矢量):In another implementation manner, in step 711, the first spatial non-contiguous image block, the second spatial non-contiguous image block, and the third spatial non-contiguous image block may be used. The physical meaning of "available" may refer to the foregoing. The description will not be repeated. It is possible to set the motion vector of the first spatial neighboring block A1, the motion vector of the second spatial neighboring block B1, the motion vector of the third spatial neighboring block B0, the motion vector of the fourth spatial neighboring block A0, the motion vector obtained by the ATMVP technique, The motion vector of the fifth spatial neighboring block B2 and the motion vector obtained by the STMVP technique are respectively MVL, MVU, MVUR, MVDL, MVA, MVUL, MVS, and the first spatial non-contiguous image block, the second spatial non-contiguous image block, and The motion vectors of the third spatial non-contiguous image block are respectively MV0, MV1, MV2, and then may be checked in the following order to obtain M candidates (ie, M candidate motion vectors) used in the construction candidate list:
示例1:MVL、MVU、MVUR、MVDL、MV0、MV1、MV2、MVA、MVUL、MVS;Example 1: MVL, MVU, MVUR, MVDL, MV0, MV1, MV2, MVA, MVUL, MVS;
示例2:MVL、MVU、MVUR、MVDL、MVA、MV0、MV1、MV2、MVUL、MVS;Example 2: MVL, MVU, MVUR, MVDL, MVA, MV0, MV1, MV2, MVUL, MVS;
示例3:MVL、MVU、MVUR、MVDL、MVA、MVUL、MV0、MV1、MV2、MVS;Example 3: MVL, MVU, MVUR, MVDL, MVA, MVUL, MV0, MV1, MV2, MVS;
示例4:MVL、MVU、MVUR、MVDL、MVA、MVUL、MVS、MV0、MV1、MV2;Example 4: MVL, MVU, MVUR, MVDL, MVA, MVUL, MVS, MV0, MV1, MV2;
示例5:MVL、MVU、MVUR、MVDL、MVA、MV0、MVUL、MV1、MVS、MV2;Example 5: MVL, MVU, MVUR, MVDL, MVA, MV0, MVUL, MV1, MVS, MV2;
示例6:MVL、MVU、MVUR、MVDL、MVA、MV0、MVUL、MV1、MV2、MVS;Example 6: MVL, MVU, MVUR, MVDL, MVA, MV0, MVUL, MV1, MV2, MVS;
示例7:MVL、MVU、MVUR、MVDL、MVA、MVUL、MV0、MV1、MV2、MVS; Example 7: MVL, MVU, MVUR, MVDL, MVA, MVUL, MV0, MV1, MV2, MVS;
应理解,示例1至示例7示例性地给出了几种可行的用于构建候选者列表的M个原始候选运动矢量。基于空域非邻接图像块的运动矢量,还可以有其他的候选者列表的组成方式以及列表中候选者的排列方式,不作限定。It should be understood that Examples 1 through 7 exemplarily show several possible M original candidate motion vectors for constructing a candidate list. Based on the motion vector of the spatial non-contiguous image block, there may be other ways of composing the candidate list and the arrangement of the candidates in the list, which are not limited.
应理解,不同的空域非邻接图像块的运动矢量(比如,MV0、MV1、MV2)间同样可以具有不同的排列方式,本申请实施例对此不做限定。It should be understood that the motion vectors (for example, MV0, MV1, and MV2) of different spatial non-contiguous image blocks may also have different arrangements, which is not limited in this embodiment of the present application.
相对于仅采用图6A所述的空间候选者位置,同时采用空域非邻接图像块的运动矢量作为待处理块的候选者列表中的空间候选者,利用了更多的空域先验编码信息,提高了编码性能。Compared with the spatial candidate location described using only FIG. 6A, the motion vector of the spatial non-contiguous image block is simultaneously used as the spatial candidate in the candidate list of the to-be-processed block, and more spatial a priori coding information is utilized to improve The coding performance.
步骤713,按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息(或者,得到用于构建所述待处理图像块的候选列表的L组原始候选运动信息),L为大于或等于0的整数;Step 713: Detect one or more time domain reference blocks of the current image block according to a second preset sequence, and obtain L sets of original candidate motion information in the candidate list of the to-be-processed image block (or obtain L sets of original candidate motion information for constructing a candidate list of the image block to be processed, L is an integer greater than or equal to 0;
请参阅图6A,当前图像块的一个或多个时域参考块可以理解为当前图像块的co-located块中的图像块或者当前图像块的co-located块的空域邻近块,例如可以包括:所述当前图像块的同位置块(co-located块)的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。Referring to FIG. 6A, one or more time domain reference blocks of a current image block may be understood as an image block in a co-located block of a current image block or a spatial neighboring block of a co-located block of a current image block, and may include, for example: The lower right spatial domain of the co-located block of the current image block is adjacent to the block H, the upper left intermediate block C0 of the co-located block, the lower right intermediate block C3 of the co-located block, the same position An upper left block TL of the block, or a lower right block BR of the same location block, wherein the co-located block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
在一种实现方式下,在步骤713中,依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或In an implementation manner, in step 713, the right lower airspace neighboring block H of the co-located block and the lower right intermediate block C3 of the co-located block are sequentially detected to obtain L1 determined motion vector images. Motion information of the block; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, and whether the upper left intermediate block C0 of the co-located block is available to obtain motion information of the L2 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息;Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, and the lower right block BR of the co-located block. Whether the upper left intermediate block C0 of the same position block is available to obtain motion information of the L3 determined motion vector image blocks;
将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。The L group motion information in the motion information of the detected L1 or L2 or L3 determined motion vector image blocks is added as candidate motion information to the candidate list, L1 is equal to or greater than L, or L2 is equal to or greater than L, Or L3 is equal to or greater than L, and L1, L2, and L3 are all integers greater than or equal to zero.
应理解,这里仅仅示例性地给出了几种可行的用于构建候选者列表的L组原始候选运动信息。还可以有其他的候选者列表的组成方式以及列表中候选者的排列方式,不作限定。It should be understood that only a few possible sets of L original candidate motion information for constructing a candidate list are given exemplarily herein. There may be other ways of composing the candidate list and the arrangement of the candidates in the list, which are not limited.
应理解,不同的时域参考块的运动信息之间同样可以具有不同的排列方式,本申请实施例对此不做限定。It should be understood that the motion information of the different time domain reference blocks may also have different arrangement manners, which is not limited by the embodiment of the present application.
进一步的,在一种具体的实现方式下,非所述同位置块的右下空域邻近块H的其它时域参考块的检测条件可以包括:所述同位置块的右下空域邻近块H不可用,或者所述候选列表中的候选运动信息的数量少于目标数量。Further, in a specific implementation manner, the detecting condition of the other time domain reference block that is not adjacent to the block H of the lower right spatial domain of the co-located block may include: the right lower airspace neighboring block H of the co-located block is not available. Or, the number of candidate motion information in the candidate list is less than the target number.
步骤731,当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的至少一组双向预测类型的原始候选运动信息(亦称为双向预测编/解码模式的原始候选运动信息)进行分解处理,得到所述待处理图像块的候选列表中的Q 组新构造的单向预测类型的候选运动信息(亦称为单向预测编/解码模式的候选运动信息),Q为大于或等于0的整数。Step 731: When the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information (also referred to as bidirectional prediction) of at least one set of bidirectional prediction types included in the candidate list. Performing decomposition processing on the original candidate motion information of the encoding/decoding mode to obtain Q in the candidate list of the image block to be processed A newly constructed unidirectional prediction type candidate motion information (also referred to as candidate motion information of a unidirectional prediction encoding/decoding mode), and Q is an integer greater than or equal to zero.
其中,一组双向预测类型的原始候选运动信息可以包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;The original candidate motion information of a set of bidirectional prediction types may include: motion information for a forward prediction direction and motion information for a backward prediction direction, where the motion information for the forward prediction direction includes the first a reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; the motion information for the backward prediction direction includes the second a reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index;
经分解处理,所述Q组新构造的单向预测类型的候选运动信息可以包括:单向预测类型为前向预测方向的一组运动信息和/或单向预测类型为后向预测方向的一组运动信息,其中所述前向预测方向的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测方向的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。应理解的是,如果新构造的候选运动信息与候选者列表中已有的候选者重复,则该新构造的候选运动信息不需要加入候选者列表中。After the decomposition processing, the Q-group newly constructed unidirectional prediction type candidate motion information may include: a unidirectional prediction type is a set of motion information in a forward prediction direction and/or a unidirectional prediction type is a backward prediction direction. Group motion information, wherein the set of motion information of the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a first reference corresponding to the first reference image index a motion vector of the image; the set of motion information of the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a second reference corresponding to the second reference image index The motion vector of the image. It should be understood that if the newly constructed candidate motion information is repeated with existing candidates in the candidate list, the newly constructed candidate motion information does not need to be added to the candidate list.
本发明实施例中,还可以进一步包括:In the embodiment of the present invention, the method further includes:
步骤733,当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的两组单向预测类型(单向预测编/解码模式)的原始候选运动信息进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息(双向预测编/解码模式的候选运动信息),P为大于或等于0的整数。Step 733, when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original of the two sets of unidirectional prediction types (unidirectional prediction encoding/decoding mode) included in the candidate list The candidate motion information is combined to obtain candidate motion information (candidate motion information of the bidirectional prediction encoding/decoding mode) of the P group newly constructed in the candidate list of the to-be-processed image block, where P is greater than or equal to 0. The integer.
组合指将一采用前向预测编/解码模式的运动信息(即一组单向预测类型的原始候选运动信息)与一采用后向预测编/解码模式的运动信息(即另一组单向预测类型的原始候选运动信息)进行结合,得到一采用双向预测编/解码模式的运动信息(即一组新构造的双向预测类型的候选运动信息)。如:一采用前向预测编/解码模式的运动信息包括参考图像集为list0,参考索引为1的参考图像,运动矢量为(-3,-5)。一采用后向预测编/解码模式的运动信息包括参考图像集为list1,参考索引为0的参考图像,运动矢量为(3,5)。相应地,组合而成的双向预测编/解码模式的运动信息包括:前向预测运动信息为参考图像集为list0,参考索引为1的参考图像,运动矢量为(-3,-5);后向预测运动信息为参考图像集为list1,参考索引为0的参考图像,运动矢量为(3,5)。The combination refers to motion information using a forward prediction encoding/decoding mode (ie, a set of unidirectional prediction type original candidate motion information) and motion information using a backward prediction encoding/decoding mode (ie, another set of unidirectional predictions) The original candidate motion information of the type is combined to obtain motion information using a bidirectional predictive encoding/decoding mode (ie, a set of newly constructed bidirectional prediction type candidate motion information). For example, a motion information using a forward predictive encoding/decoding mode includes a reference image set of list0, a reference index of 1 reference image, and a motion vector of (-3, -5). A motion information using a backward predictive encoding/decoding mode includes a reference image set of list1, a reference index of reference index 0, and a motion vector of (3, 5). Correspondingly, the motion information of the combined bidirectional prediction encoding/decoding mode includes: the forward prediction motion information is a reference image set as list0, the reference index is 1 reference image, and the motion vector is (-3, -5); The predicted motion information is a reference image set as list1, a reference index is 0, and the motion vector is (3, 5).
分解则为组合逆过程,指将一采用双向预测编解/码模式的运动信息(即一组双向预测类型的原始候选运动信息)拆分为一采用后向预测编/解码模式的运动信息(即一组新构造的单向预测类型的候选运动信息)和一采用前向预测编/解码模式的运动信息(即另一组新构造的单向预测类型的候选运动信息)。如:一采用双向预测编/解码模式的运动信息包括:前向预测运动信息为参考图像集为list0,参考索引为1的参考图像,运动矢量为(-3,-5);后向预测运动信息为参考图像集为list1,参考索引为0的参考图像,运动矢量 为(3,5)。经分解,可分别得到一采用前向预测编/解码模式的运动信息,其中运动信息为参考图像集为list0,参考索引为1的参考图像,运动矢量为(-3,-5);以及一采用后向预测编/解码模式的运动信息,其中运动信息为参考图像集为list1,参考索引为0的参考图像,运动矢量为(3,5)。The decomposition is a combined inverse process, which refers to splitting motion information using a bidirectional predictive coding/code mode (ie, a set of bidirectional prediction type original candidate motion information) into motion information using a backward predictive encoding/decoding mode ( That is, a set of newly constructed unidirectional prediction type candidate motion information) and a motion information using a forward prediction encoding/decoding mode (ie, another set of newly constructed unidirectional prediction type candidate motion information). For example, the motion information in the bidirectional predictive encoding/decoding mode includes: the forward predicted motion information is a reference image set as list0, the reference index is 1 reference image, the motion vector is (-3, -5), and the backward predictive motion is The information is reference image set as list1, reference index is 0 reference image, motion vector For (3,5). After decomposing, motion information using a forward prediction encoding/decoding mode can be respectively obtained, wherein the motion information is a reference image set list0, a reference index is 1 reference image, a motion vector is (-3, -5); The motion information of the backward prediction encoding/decoding mode is adopted, wherein the motion information is a reference image set as list1, a reference index is 0, and the motion vector is (3, 5).
在一些可能的实现方式下,本发明实施例中,还可以进一步包括:In some possible implementation manners, the embodiment of the present invention may further include:
步骤735,当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,例如如果通过前述方式所产生的附加候选者仍然不足,视频编码器或视频解码器还可以插入零运动矢量作为候选运动信息来产生附加或额外候选者。这些附加或额外候选运动信息不被视为原始候选运动信息且在本申请中可称作后期或人工产生的候选运动信息。Step 735, when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, for example, if the additional candidate generated by the foregoing manner is still insufficient, the video encoder or the video decoder may also insert zero. Motion vectors are used as candidate motion information to generate additional or additional candidates. These additional or additional candidate motion information are not considered raw candidate motion information and may be referred to as late or artificially generated candidate motion information in this application.
可见,本实施例中不仅可以扩展更多的原始候选运动信息(例如采用空域非邻接图像块的运动矢量作为待处理块的候选者列表中的候选运动信息),而且还可以扩展更多的额外候选运动信息(例如分解生成的单向预测类型的候选运动信息,经组合而成的双向预测类型的候选运动信息),以获取更多的用于构建候选者列表的可用候选运动信息,从而在最大程度的避免或减少人工添加的零向量的基础上,候选者列表中的候选者的数量能满足目标数量(例如候选列表中候选运动信息的预设最大数量,或者利用从码流中解析得到的索引标识确定的候选运动信息的数量),本实施例的候选运动信息的获取方法可应用在视频图像编解码的帧间编解码过程,从而提高了编码性能。It can be seen that in this embodiment, not only more original candidate motion information can be extended (for example, a motion vector using a spatial non-contiguous image block is used as candidate motion information in a candidate list of a to-be-processed block), but also more extras can be extended. Candidate motion information (eg, candidate motion information of a unidirectional prediction type generated by decomposition, candidate motion information of a bidirectional prediction type combined) to obtain more available candidate motion information for constructing a candidate list, thereby On the basis of maximally avoiding or reducing the artificially added zero vector, the number of candidates in the candidate list can satisfy the target number (for example, the preset maximum number of candidate motion information in the candidate list, or can be obtained by parsing from the code stream) The index identifies the number of candidate motion information determined. The method for acquiring the candidate motion information in this embodiment can be applied to the inter-frame codec process of the video image codec, thereby improving the coding performance.
图8为本申请实施例中图像块的候选运动信息的获取方法的另一种示例性流程图。过程800可由视频编码端(例如视频编码器20)或视频解码端(例如视频解码器30)执行。FIG. 8 is another exemplary flowchart of a method for acquiring candidate motion information of an image block in an embodiment of the present application. Process 800 may be performed by a video encoding end (e.g., video encoder 20) or a video decoding end (e.g., video decoder 30).
视频编码端获取候选运动信息以构建候选者列表的示意性过程如下:The schematic process of the video encoding end acquiring candidate motion information to construct a candidate list is as follows:
步骤801至805,合并模式情况下,在收集候选运动信息输入过程中,完成对当前编码块空域上周边相邻块的运动信息进行检测,若可用则作为候选运动信息;Steps 801 to 805, in the case of the merge mode, in the process of collecting candidate motion information input, performing motion information detection on neighboring neighboring blocks in the current coded block airspace, and if available, as candidate motion information;
步骤807,当可用候选运动信息个数未达到候选运动信息最大个数值时,完成对时域参考块上的运动信息进行检测是否可作为候选运动信息;Step 807: When the number of available candidate motion information does not reach the maximum value of the candidate motion information, whether the motion information on the time domain reference block is detected may be used as candidate motion information.
步骤809,当可作为候选运动信息时,判断可用候选运动信息个数是否已达到所预设候选运动信息最大个数值;Step 809, when it can be used as candidate motion information, determine whether the number of available candidate motion information has reached the maximum value of the preset candidate motion information;
步骤811,当可用候选运动信息个数未达到候选运动信息最大个数值时,利用已有候选运动信息进行组合构造双向预测运动信息,并判断新构造的双向预测运动信息是否可作为候选运动信息;Step 811: When the number of available candidate motion information does not reach the maximum value of the candidate motion information, the existing candidate motion information is used to construct the bidirectional prediction motion information, and whether the newly constructed bidirectional motion information can be used as the candidate motion information;
步骤813至817,当可用候选运动信息个数未达到候选运动信息最大个数值时,利用已有为双向预测的候选运动信息构造单向预测运动信息,并判断新构造的单向预测运动信息是否可作为候选运动信息;Steps 813 to 817, when the number of available candidate motion information does not reach the maximum value of the candidate motion information, constructing the unidirectional prediction motion information by using the candidate motion information that has been bidirectionally predicted, and determining whether the newly constructed unidirectional prediction motion information is Can be used as candidate motion information;
步骤825,当可用候选运动信息个数达到候选运动信息最大个数值时,结束收集候选运动信息输入过程。Step 825, when the number of available candidate motion information reaches the maximum value of the candidate motion information, the process of collecting the candidate motion information is ended.
步骤823,当可用候选运动信息个数未达到候选运动信息最大个数值时,继续执行收集候选运动信息过程。Step 823, when the number of available candidate motion information does not reach the maximum value of the candidate motion information, the process of collecting the candidate motion information is continued.
视频解码端获取候选运动信息以构建候选者列表的示意性过程如下: The schematic process of the video decoder acquiring candidate motion information to construct a candidate list is as follows:
步骤801至805,合并模式情况下,在收集候选运动信息输入过程中,对当前编码块空域上周边相邻块的运动信息检测;Steps 801 to 805, in the case of the merge mode, in the process of collecting candidate motion information input, detecting motion information of neighboring neighboring blocks in the current coded block airspace;
若可用则作为候选运动信息,对可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量进行比较;If available, as candidate motion information, compare the number of available candidate motion information with the target number determined by the index value received by the video decoder;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量一致,当前解码块空域上相邻块的运动信息作为最佳候选运动信息(即用于当前待解码图像块的被选择的候选运动信息,亦称为目标候选运动信息),执行步骤825;If the number of available candidate motion information is consistent with the target number determined by the index value received by the video decoder, the motion information of the neighboring block in the current decoded block spatial domain is used as the best candidate motion information (ie, for the current image block to be decoded) The selected candidate motion information, also referred to as target candidate motion information), performing step 825;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量不一致,执行步骤807;If the number of available candidate motion information is different from the target number determined by the video decoder, the step 807 is performed;
步骤807至809:对时域参考块上的运动信息进行检测是否可作为候选运动信息;若可用则作为候选运动信息,对可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量进行比较;Steps 807 to 809: detecting whether motion information on the time domain reference block can be used as candidate motion information; if available, as candidate motion information, determining the number of available candidate motion information and the index value received by the video decoder The number of targets is compared;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量一致,确定当前时域参考块上的运动信息为最佳候选运动信息,即确定当前时域参考块上的运动信息为待解码图像块的运动信息或利用当前时域参考块上的运动信息确定待解码图像块的运动信息,结束收集候选运动信息过程;If the number of available candidate motion information is consistent with the target number determined by the index value received by the video decoder, determining that the motion information on the current time domain reference block is the best candidate motion information, that is, determining the current time domain reference block. The motion information is motion information of the image block to be decoded or motion information of the image block to be decoded by using motion information on the current time domain reference block, and the process of collecting the candidate motion information is ended;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量不一致,继续执行步骤811;If the number of available candidate motion information is different from the target number determined by the video decoder, continue to step 811;
步骤811至815,利用已有候选运动信息进行组合构造双向预测运动信息,并判断新构造的双向预测运动信息是否可作为候选运动信息; Steps 811 to 815, combining the existing candidate motion information to construct bidirectional prediction motion information, and determining whether the newly constructed bidirectional prediction motion information is available as candidate motion information;
若可用则作为候选运动信息,对可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量进行比较;If available, as candidate motion information, compare the number of available candidate motion information with the target number determined by the index value received by the video decoder;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量一致,确定当前构造的双向预测运动信息为最佳候选运动信息,即确定当前构造的双向预测运动信息为待解码图像块的运动信息或利用当前构造的双向预测运动信息确定待解码图像块的运动信息,结束收集候选运动信息过程;If the number of available candidate motion information is consistent with the target number determined by the index value received by the video decoder, determining that the currently constructed bidirectional prediction motion information is the best candidate motion information, that is, determining the currently constructed bidirectional prediction motion information is to be determined. Decoding the motion information of the image block or determining the motion information of the image block to be decoded by using the currently constructed bidirectional prediction motion information, and ending the process of collecting the candidate motion information;
若可用候选运动信息个数与索引值与由视频解码器收到的索引值而确定的目标数量不一致,继续执行步骤817;If the number of available candidate motion information and the index value are different from the target value determined by the video decoder, continue to step 817;
步骤817至821,利用已有的双向预测的候选运动信息构造单向预测运动信息,并判断新构造的单向预测运动信息是否可作为候选运动信息;Steps 817 to 821, constructing unidirectional prediction motion information by using the existing bidirectionally predicted candidate motion information, and determining whether the newly constructed unidirectional prediction motion information is available as candidate motion information;
若新构造的单向预测运动信息可作为候选运动信息,判断可用候选运动信息个数是否与由视频解码器收到的索引值而确定的目标数量一致;If the newly constructed unidirectional prediction motion information can be used as candidate motion information, it is determined whether the number of available candidate motion information is consistent with the target number determined by the index value received by the video decoder;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量一致,确定新构造的单向预测运动信息为最佳候选运动信息,即确定新构造的单向预测运动信息为待解码图像块的运动信息或利用新构造的单向预测运动信息确定待解码图像块的运动信息,流程结束;If the number of available candidate motion information is consistent with the target number determined by the index value received by the video decoder, determining the newly constructed unidirectional prediction motion information as the best candidate motion information, that is, determining the newly constructed unidirectional prediction motion information Determining motion information of the image block to be decoded for motion information of the image block to be decoded or using newly constructed unidirectional prediction motion information, the process ends;
若可用候选运动信息个数与由视频解码器收到的索引值而确定的目标数量不一致,执行步骤823;If the number of available candidate motion information is different from the target number determined by the video decoder, the step 823 is performed;
步骤823,继续执行收集候选运动信息过程;Step 823, continuing to perform the process of collecting candidate motion information;
步骤825、结束收集候选运动信息过程。 Step 825, ending the process of collecting candidate motion information.
下面给出索引的编码方式的示例,以及索引值与编码方式的对应关系的示例表,合成候选列表中的候选者对应的索引采用非定长编码方式,示例如下:An example of the encoding mode of the index and an example table of the correspondence between the index value and the encoding mode are given below, and the index corresponding to the candidate in the composite candidate list adopts a non-fixed length encoding method, and the examples are as follows:
候选者列表中的索引位置Index position in the candidate list merge_idx索引编码Merge_idx index encoding
00 11
11 0101
22 001001
33 00010001
44 0000100001
55 000001000001
例如,如果解码端接收到的候选者索引是“1”,则表示用于当前待解码图像块的所选择的候选运动信息是合成候选列表中索引位置0上的候选者,相应的,候选运动信息的目标数量=1;如果解码端接收到的候选者索引是“000001”,则表示用于当前待解码图像块的所选择的候选运动信息是合成候选列表中索引位置5上的候选者,相应的,候选运动信息的目标数量=5。For example, if the candidate index received by the decoding end is "1", it indicates that the selected candidate motion information for the current image block to be decoded is a candidate on the index position 0 in the composite candidate list, and correspondingly, the candidate motion The target number of information is =1; if the candidate index received by the decoding end is "000001", it indicates that the selected candidate motion information for the current image block to be decoded is a candidate on the index position 5 in the composite candidate list, Correspondingly, the target number of candidate motion information = 5.
一种示例下,假设解码端解码得到的索引值为4,在合成Merge模式下获取候选运动信息过程中,当前解码块的同位置块的(co-located块)的右下空域邻近块H的运动信息可作为候选运动信息,此时可用候选运动信息个数为3,与由索引值推导的目标数量不同,继续对所述同位置块的中间块C0或C3的运动信息进行判断不可作为可用候选运动信息,则此时可用候选运动信息个数为3,与由索引值推导的目标数量不同。如果由已有的双向预测类型的原始候选运动信息构造的单向预测类型的运动信息可作为可用候选运动信息,则此时可用候选运动信息个数为4,与由索引值推导的目标数量相同。选取构造的单向预测类型的运动信息为最佳候选运动信息(即用于当前待解码图像块的所选择的候选运动信息),并结束获取候选运动信息过程。As an example, it is assumed that the index value obtained by decoding at the decoding end is 4, and in the process of acquiring candidate motion information in the synthesized Merge mode, the right lower airspace of the co-located block of the currently decoded block is adjacent to the block H of the right-hand domain. The motion information may be used as the candidate motion information. In this case, the number of available candidate motion information is 3, and the number of targets derived from the index value is different, and the motion information of the intermediate block C0 or C3 of the same location block may not be determined as available. For candidate motion information, the number of candidate motion information available at this time is 3, which is different from the number of targets derived from the index value. If the motion information of the unidirectional prediction type constructed by the original candidate motion information of the existing bidirectional prediction type can be used as the available candidate motion information, the number of available candidate motion information at this time is 4, which is the same as the number of targets derived from the index value. . The motion information of the constructed unidirectional prediction type is selected as the best candidate motion information (ie, the selected candidate motion information for the current image block to be decoded), and the process of acquiring the candidate motion information is ended.
由上可见,根据索引值获取所要构建的候选列表中候选运动信息的个数,当获取的候选运动信息的个数足以通过索引值确定目标候选运动信息时,即在候选列表中目标候选运动信息以及在候选列表中排在目标候选运动信息之前的候选运动信息均已构建完成后,停止构建候选列表中其他的候选运动信息。It can be seen that the number of candidate motion information in the candidate list to be constructed is obtained according to the index value. When the number of candidate motion information acquired is sufficient to determine the target candidate motion information by using the index value, that is, the target candidate motion information in the candidate list. And after the candidate motion information ranked before the target candidate motion information in the candidate list has been constructed, the other candidate motion information in the candidate list is stopped.
应当理解的是,解码端构建候选者列表有2种方式,一种是如上所述的一边检测一边匹配;另一种是候选列表全部构建好之后,再与索引值进行匹配确定选取哪一个候选运动信息,即是从建立好的候选列表中找到索引所指示的位置上的候选运动矢量。It should be understood that there are two ways for the decoder to construct the candidate list, one is to detect one side matching as described above, and the other is that after the candidate list is all constructed, it is matched with the index value to determine which candidate to select. The motion information, that is, the candidate motion vector at the position indicated by the index is found from the established candidate list.
应理解,上述候选者列表可以用于上文所述的Merge模式,或者其它获取待处理图像块的预测运动矢量的预测模式中,可以用于编码端,也可以和对应的编码端保持一致地用于解码端,例如,候选者列表中候选者的数量也是预设的最大数量,并且在编解码端保持一致,具体的数量不做限定,这种情况下的解码端的操作参考解码端,这里不再赘述。 It should be understood that the foregoing candidate list may be used in the Merge mode described above, or in other prediction modes for acquiring a predicted motion vector of a to-be-processed image block, and may be used in the encoding end, or may be consistent with the corresponding encoding end. For the decoding end, for example, the number of candidates in the candidate list is also the preset maximum number, and is consistent at the codec end, and the specific number is not limited. In this case, the operation of the decoding end refers to the decoding end, here No longer.
图9为本申请实施例中将经过分解的候选运动矢量添加到合并模式候选者列表的一种示例性示意图。通过分解双向预测类型的原始合并候选者而产生单向预测类型的合并候选者。具体来说,原始候选者中的一个双向预测类型的候选者(其具有mvL0和refIdxL0,以及mvL1和refIdxL1)可用以产生两个单向预测性合并候选者。在图9中,一个双向预测类型的原始合并候选者(其具有列表0中的mvL0_A和ref0以及列表1中的mvL1_B和ref0)包括于原始合并候选者列表中,处于索引位置0。经分解后,一个新构造的单向预测类型的候选者即预测类型为列表0单向预测,mvL0_A和ref0是从列表0拾取。另一个新构造的单向预测类型的候选者即预测类型为列表1单向预测,mvL1_B和ref0是从列表1拾取。检查新构造的合并候选者是否不同于已包括在合并候选者列表中的候选者。如果其不同,则视频解码器或视频编码器将新构造的单向预测类型的合并候选者包括于合并候选者列表中。FIG. 9 is an exemplary schematic diagram of adding a decomposed candidate motion vector to a merge mode candidate list in the embodiment of the present application. A merging prediction type of merging candidate is generated by decomposing the original merging candidate of the bidirectional prediction type. In particular, one of the original candidates of the bi-prediction type (which has mvL0 and refIdxL0, and mvL1 and refIdxL1) can be used to generate two unidirectional predictive merge candidates. In FIG. 9, a raw merge candidate of one bidirectional prediction type (having mvL0_A and ref0 in list 0 and mvL1_B and ref0 in list 1) is included in the original merge candidate list at index position 0. After decomposition, a newly constructed unidirectional prediction type candidate, ie, the prediction type is list 0 unidirectional prediction, and mvL0_A and ref0 are picked up from list 0. Another newly constructed unidirectional prediction type candidate, the prediction type is list 1 unidirectional prediction, and mvL1_B and ref0 are picked up from list 1. It is checked whether the newly constructed merge candidate is different from the candidate already included in the merge candidate list. If they are different, the video decoder or video encoder includes the newly constructed unidirectional prediction type of merge candidate in the merge candidate list.
图10为本申请实施例中将经过组合的候选运动矢量添加到合并模式候选者列表的一种示例性示意图。可通过组合原始合并候选者而产生经组合双向预测性合并候选者。具体来说,原始候选者中的两个候选者(其具有mvL0和refIdxL0或mvL1和refIdxL1)可用以产生双向预测性合并候选者。在图10中,两个候选者包括于原始合并候选者列表中。一候选者的预测类型为列表0单向预测,且另一候选者的预测类型为列表1单向预测。在此可行的实施方式中,mvL0_A和ref0是从列表0拾取,且mvL1_B和ref0是从列表1拾取,且接着可产生双向预测性合并候选者(其具有列表0中的mvL0_A和ref0以及列表1中的mvL1_B和ref0)并检查其是否不同于已包括于候选者列表中的候选者。如果其不同,则视频解码器可将双向预测性合并候选者包括于候选者列表中。FIG. 10 is an exemplary schematic diagram of adding a combined candidate motion vector to a merge mode candidate list in the embodiment of the present application. The combined bi-predictive merge candidate can be generated by combining the original merge candidates. In particular, two of the original candidates (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) may be used to generate bi-predictive merge candidates. In Figure 10, two candidates are included in the original merge candidate list. The prediction type of one candidate is list 0 unidirectional prediction, and the prediction type of another candidate is list 1 unidirectional prediction. In this possible implementation, mvL0_A and ref0 are picked up from list 0, and mvL1_B and ref0 are picked up from list 1, and then bidirectional predictive merge candidates (which have mvL0_A and ref0 in list 0 and list 1) mvL1_B and ref0) and check if it is different from the candidates already included in the candidate list. If they are different, the video decoder may include bi-predictive merge candidates in the candidate list.
在一种可行的实施方式中,如果新产生的候选者不同于已包括于候选者列表中的候选者,则将所产生的候选者添加到合并候选者列表。确定候选者是否不同于已包括于候选者列表中的候选者的过程有时称作修剪(pruning)。通过修剪,每一新产生的候选者可与列表中的现有候选者比较。在一些可行的实施方式中,修剪操作可包括比较一个或多个新候选者与已在候选者列表中的候选者和不添加为已在候选者列表中的候选者的重复的新候选者。在另一些可行的实施方式中,修剪操作可包括将一个或多个新候选者添加到候选者列表且稍后从所述列表移除重复候选者。In one possible implementation, if the newly generated candidate is different from the candidate already included in the candidate list, the generated candidate is added to the merge candidate list. The process of determining whether a candidate is different from a candidate already included in the candidate list is sometimes referred to as pruning. By cropping, each newly generated candidate can be compared to an existing candidate in the list. In some possible implementations, the pruning operation may include comparing one or more new candidates to candidates that are already in the candidate list and new candidates that are not added as duplicates of candidates already in the candidate list. In other possible implementations, the pruning operation can include adding one or more new candidates to the candidate list and later removing the duplicate candidates from the list.
图11为本申请实施例中的图像块的候选运动信息的获取装置1100的一种示意性框图。其中,所述候选运动信息用于构建用于帧间预测的候选列表,图像块的候选运动信息的获取装置1100包括:FIG. 11 is a schematic block diagram of an apparatus 1100 for acquiring candidate motion information of an image block in an embodiment of the present application. The candidate motion information is used to construct a candidate list for inter prediction, and the apparatus 1100 for acquiring candidate motion information of the image block includes:
空域候选运动信息获取模块1101,用于按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息,M为大于或等于0的整数;The airspace candidate motion information acquiring module 1101 is configured to detect one or more spatial reference blocks of the current image block according to the first preset sequence, and obtain M sets of original candidate motion information in the candidate list of the to-be-processed image block. , M is an integer greater than or equal to 0;
时域候选运动信息获取模块1102,用于按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,L为大于或等于0的整数; The time domain candidate motion information acquiring module 1102 is configured to detect one or more time domain reference blocks of the current image block according to a second preset sequence, to obtain an L group in the candidate list of the to-be-processed image block. Raw candidate motion information, L is an integer greater than or equal to 0;
附加候选运动信息获取模块1103,用于当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的至少一组双向预测类型的原始候选运动信息进行分解处理,得到所述待处理图像块的候选列表中的Q组新构造的单向预测类型的候选运动信息,Q为大于或等于0的整数。An additional candidate motion information acquiring module 1103, configured to: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than a target number, the original candidate motion of at least one set of bidirectional prediction types included in the candidate list The information is subjected to decomposition processing to obtain candidate motion information of the unidirectional prediction type newly constructed by the Q group in the candidate list of the image block to be processed, and Q is an integer greater than or equal to 0.
在一种可行的实施方式中,所述一组双向预测类型的原始候选运动信息包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;In a feasible implementation manner, the original candidate motion information of the set of bidirectional prediction types includes: motion information for a forward prediction direction and motion information for a backward prediction direction, where the The motion information of the prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; The motion information of the prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index;
经所述附加候选运动信息获取模块分解处理后,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型为前向预测编/解码模式的一组运动信息和/或单向预测类型为后向预测编/解码模式的一组运动信息,其中所述前向预测编/解码模式的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测编/解码模式的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the additional candidate motion information acquisition module is decomposed, the candidate motion information of the unidirectional prediction type newly constructed by the Q group includes: a group of motion information of a unidirectional prediction type being a forward prediction encoding/decoding mode and/or The unidirectional prediction type is a set of motion information of a backward prediction encoding/decoding mode, wherein the set of motion information of the forward prediction encoding/decoding mode includes a first reference image list and a first corresponding to the first reference image list a reference image index and a motion vector of the first reference image corresponding to the first reference image index; the set of motion information of the backward predictive encoding/decoding mode includes a second reference image list and corresponding to the second reference image list And a second reference image index and a motion vector of the second reference image corresponding to the second reference image index.
在一种可行的实施方式中,当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,所述附加候选运动信息获取模块进一步用于:对所述候选列表中包括的两组单向预测类型的原始候选运动信息进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息,P为大于或等于0的整数。In a possible implementation manner, when the number of candidate motion information in the candidate list of the to-be-processed image block is smaller than the target number, the additional candidate motion information acquiring module is further configured to: include in the candidate list The original candidate motion information of the two sets of unidirectional prediction types is combined to obtain candidate motion information of the P-group newly constructed bidirectional prediction type in the candidate list of the image block to be processed, and P is an integer greater than or equal to 0.
在一种可行的实施方式中,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。In a possible implementation, the one or more spatial reference blocks include: one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block, and/or the current image One or more spatial reference blocks in the image in which the block is located that are not adjacent to the image block to be processed.
在一种可行的实施方式中,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括:In a possible implementation, the one or more spatial reference blocks in the image in which the current image block is located adjacent to the current image block include:
位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
在一种可行的实施方式中,所述空域候选运动信息获取模块用于:In a possible implementation manner, the airspace candidate motion information acquiring module is configured to:
依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数, Detecting whether the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 are available to obtain the first airspace neighboring The motion information of the M1 determined motion vector image blocks in the block A1, the second spatial neighboring block B1, the third spatial neighboring block B0, the fourth spatial neighboring block A0, and the fifth spatial neighboring block B2, where M1 is greater than or equal to 0. Integer,
将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;Adding M sets of motion information in the motion information of the detected M1 determined motion vector image blocks as candidate motion information to the candidate list, where M1 is equal to or greater than M;
其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。Wherein: the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
在一种可行的实施方式中,所述一个或多个时域参考块包括:所述当前图像块的同位置块(co-located块)的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。In a possible implementation manner, the one or more time domain reference blocks include: a lower right spatial domain adjacent block H of a co-located block of the current image block, where the same location block An upper left intermediate block C0, a lower right intermediate block C3 of the same location block, an upper left block TL of the same location block, or a lower right block BR of the same location block, wherein the same location block is in a reference image An image block having the same size, shape, and coordinates as the current image block.
在一种可行的实施方式中,所述时域候选运动信息获取模块用于:In a possible implementation manner, the time domain candidate motion information acquiring module is configured to:
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the right lower spatial neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available, to obtain motion information of the L1 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, and whether the upper left intermediate block C0 of the co-located block is available to obtain motion information of the L2 determined motion vector image blocks; or
依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息;Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, and the lower right block BR of the co-located block. Whether the upper left intermediate block C0 of the same position block is available to obtain motion information of the L3 determined motion vector image blocks;
将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。The L group motion information in the motion information of the detected L1 or L2 or L3 determined motion vector image blocks is added as candidate motion information to the candidate list, L1 is equal to or greater than L, or L2 is equal to or greater than L, Or L3 is equal to or greater than L, and L1, L2, and L3 are all integers greater than or equal to zero.
在一种可行的实施方式中,所述装置1100用于编码或解码视频图像,所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量;或者,所述装置1100用于解码视频图像,所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。In a possible implementation, the apparatus 1100 is configured to encode or decode a video image, where the target number is a preset maximum number of candidate motion information in a candidate list of the current image block; or, the device 1100 For decoding a video image, the target number is the number of candidate motion information determined using an index identifier parsed from the code stream.
可见,本实施例中不仅可以扩展更多的原始候选运动信息(例如采用空域非邻接图像块的运动矢量作为待处理块的候选者列表中的候选运动信息),而且还可以扩展更多的额外候选运动信息(例如分解生成的单向预测类型的候选运动信息,经组合而成的双向预测类型的候选运动信息),以使得候选者列表包含更多的候选运动信息,从而候选者列表中的候选者的数量满足目标数量(例如候选列表中候选运动信息的预设最大数量,或者利用从码流中解析得到的索引标识确定的候选运动信息的数量),提高了编码性能。It can be seen that in this embodiment, not only more original candidate motion information can be extended (for example, a motion vector using a spatial non-contiguous image block is used as candidate motion information in a candidate list of a to-be-processed block), but also more extras can be extended. Candidate motion information (eg, candidate motion information of a unidirectional prediction type generated by decomposition, candidate motion information of a bidirectional prediction type combined) such that the candidate list includes more candidate motion information, thereby making a candidate list The number of candidates satisfies the target number (for example, the preset maximum number of candidate motion information in the candidate list, or the number of candidate motion information determined using the index identification parsed from the code stream), which improves encoding performance.
应理解,在本发明实施例中,已确定运动矢量图像块为在预测待处理图像块时,运动矢量已经确定的图像块,可以是已经完成了重建的图像块或者还未完成重建的图像块,不作限定。It should be understood that, in the embodiment of the present invention, the motion vector image block is determined to be an image block whose motion vector has been determined when predicting an image block to be processed, and may be an image block that has been reconstructed or an image block that has not been reconstructed. , no restrictions.
图12为本申请实施例的编码设备或解码设备(简称为译码设备1200)的一种实现方式的示意性框图。其中,译码设备1200可以包括处理器1210、存储器1230和总线系统1250。其中,处理器和存储器通过总线系统相连,该存储器用于存储指令,该处理器用于 执行该存储器存储的指令。编码设备的存储器存储程序代码,且处理器可以调用存储器中存储的程序代码执行本申请描述的各种视频编码或解码方法,尤其是在各种新的帧间预测模式下的视频编码或解码方法,以及在各种新的帧间预测模式下预测运动信息的方法。为避免重复,这里不再详细描述。FIG. 12 is a schematic block diagram of an implementation manner of an encoding device or a decoding device (referred to as decoding device 1200 for short) in an embodiment of the present application. The decoding device 1200 can include a processor 1210, a memory 1230, and a bus system 1250. Wherein the processor and the memory are connected by a bus system, the memory is used for storing instructions, and the processor is used for Execute the instructions stored in this memory. The memory of the encoding device stores the program code, and the processor can invoke the program code stored in the memory to perform various video encoding or decoding methods described herein, particularly video encoding or decoding methods in various new inter prediction modes. And methods of predicting motion information in various new inter prediction modes. To avoid repetition, it will not be described in detail here.
在本申请实施例中,该处理器1210可以是中央处理单元(Central Processing Unit,简称为“CPU”),该处理器1210还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In the embodiment of the present application, the processor 1210 may be a central processing unit ("CPU"), and the processor 1210 may also be other general-purpose processors, digital signal processors (DSPs), and dedicated integration. Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
该存储器1230可以包括只读存储器(ROM)设备或者随机存取存储器(RAM)设备。任何其他适宜类型的存储设备也可以用作存储器1230。存储器1230可以包括由处理器1210使用总线1250访问的代码和数据1231。存储器1230可以进一步包括操作系统1233和应用程序1235,该应用程序1235包括允许处理器1210执行本申请描述的视频编码或解码方法(尤其是本申请描述的图像块的候选运动信息的获取方法)的至少一个程序。例如,应用程序1235可以包括应用1至N,其进一步包括执行在本申请描述的视频编码或解码方法的视频编码或解码应用(简称视频译码应用)。The memory 1230 can include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device can also be used as the memory 1230. Memory 1230 can include code and data 1231 that are accessed by processor 1210 using bus 1250. The memory 1230 can further include an operating system 1233 and an application 1235 that includes a video encoding or decoding method (especially an acquisition method of candidate motion information for an image block described herein) that allows the processor 1210 to perform the methods described herein. At least one program. For example, application 1235 can include applications 1 through N, which further include a video encoding or decoding application (referred to as a video coding application) that performs the video encoding or decoding methods described herein.
该总线系统1250除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统1250。The bus system 1250 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 1250 in the figure.
可选的,译码设备1200还可以包括一个或多个输出设备,诸如显示器1270。在一个示例中,显示器1270可以是触感显示器,其将显示器与可操作地感测触摸输入的触感单元合并。显示器1270可以经由总线1250连接到处理器1210。Alternatively, decoding device 1200 may also include one or more output devices, such as display 1270. In one example, display 1270 can be a tactile display that combines the display with a tactile unit that operatively senses a touch input. Display 1270 can be coupled to processor 1210 via bus 1250.
虽然已关于视频编码器20及视频解码器30描述本申请的特定方面,但应理解,本申请的技术可通过许多其它视频编码和/或编码单元、处理器、处理单元、例如编码器/解码器(CODEC)的基于硬件的编码单元及类似者来应用。此外,应理解,仅作为可行的实施方式而提供关于图5所展示及描述的步骤。即,图5的可行的实施方式中所展示的步骤无需必定按图5中所展示的次序执行,且可执行更少、额外或替代步骤。Although specific aspects of the present application have been described in relation to video encoder 20 and video decoder 30, it should be understood that the techniques of the present application may be through many other video encoding and/or encoding units, processors, processing units, such as encoder/decode The hardware-based coding unit of the (CODEC) and the like are applied. Moreover, it should be understood that the steps shown and described with respect to FIG. 5 are provided only as a possible implementation. That is, the steps shown in the possible embodiments of FIG. 5 need not necessarily be performed in the order shown in FIG. 5, and fewer, additional, or alternative steps may be performed.
此外,应理解,取决于可行的实施方式,本文中所描述的方法中的任一者的特定动作或事件可按不同序列执行,可经添加、合并或一起省去(例如,并非所有所描述的动作或事件为实践方法所必要的)。此外,在特定可行的实施方式中,动作或事件可(例如)经由多线程处理、中断处理或多个处理器来同时而非顺序地执行。另外,虽然出于清楚的目的将本申请的特定方面描述为通过单一模块或单元执行,但应理解,本申请的技术可通过与视频解码器相关联的单元或模块的组合执行。In addition, it is to be understood that the specific actions or events of any of the methods described herein may be performed in different sequences depending on the possible embodiments, and may be added, combined, or omitted together (eg, not all described) The action or event is necessary for the practice method). Moreover, in a particular possible implementation, an action or event can be performed concurrently, rather than sequentially, via, for example, multi-threaded processing, interrupt processing, or multiple processors. In addition, while the specific aspects of the present application are described as being performed by a single module or unit for purposes of clarity, it should be understood that the techniques of the present application can be implemented by a combination of units or modules associated with a video decoder.
在一个或多个可行的实施方式中,所描述的功能可以硬件、软件、固件或其任何组合来实施。如果以软件来实施,那么功能可作为一个或多个指令或代码而存储于计算机可读媒体上或经由计算机可读媒体来传输,且通过基于硬件的处理单元来执行。计算机可读媒体可包含计算机可读存储媒体或通信媒体,计算机可读存储媒体对应于例如数据存储媒体的有形媒体,通信媒体包含促进计算机程序(例如)根据通信协议从一处传送到另一处的任何媒体。 In one or more possible implementations, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted as one or more instructions or code via a computer readable medium and executed by a hardware-based processing unit. The computer readable medium can comprise a computer readable storage medium or communication medium, the computer readable storage medium corresponding to a tangible medium such as a data storage medium, the communication medium comprising facilitating transmission of the computer program, for example, from one location to another in accordance with a communication protocol Any media.
以这个方式,计算机可读媒体示例性地可对应于(1)非暂时性的有形计算机可读存储媒体,或(2)例如信号或载波的通信媒体。数据存储媒体可为可由一个或多个计算机或一个或多个处理器存取以检索用于实施本申请中所描述的技术的指令、代码和/或数据结构的任何可用媒体。计算机程序产品可包含计算机可读媒体。In this manner, computer readable media may illustratively correspond to (1) a non-transitory tangible computer readable storage medium, or (2) a communication medium such as a signal or carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and/or data structures for implementing the techniques described in this application. The computer program product can comprise a computer readable medium.
作为可行的实施方式而非限制,此计算机可读存储媒体可包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储装置、磁盘存储装置或其它磁性存储装置、快闪存储器或可用于存储呈指令或数据结构的形式的所要代码且可由计算机存取的任何其它媒体。同样,任何连接可适当地称作计算机可读媒体。例如,如果使用同轴缆线、光纤缆线、双绞线、数字订户线(DSL),或例如红外线、无线电及微波的无线技术而从网站、服务器或其它远端源传输指令,那么同轴缆线、光纤缆线、双绞线、DSL,或例如红外线、无线电及微波的无线技术包含于媒体的定义中。As a possible implementation and not limitation, the computer readable storage medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage device, magnetic disk storage device or other magnetic storage device, flash memory or may be used to store instructions. Or any other medium in the form of a data structure and accessible by a computer. Also, any connection is properly termed a computer-readable medium. For example, if you use coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave to transmit commands from a website, server, or other remote source, then coaxial Cables, fiber optic cables, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the media.
然而,应理解,计算机可读存储媒体及数据存储媒体不包含连接、载波、信号或其它暂时性媒体,而替代地针对非暂时性有形存储媒体。如本文中所使用,磁盘及光盘包含紧密光盘(CD)、雷射光盘、光盘、数字多功能光盘(DVD)、软性磁盘及蓝光光盘,其中磁盘通常以磁性方式再现数据,而光盘通过雷射以光学方式再现数据。以上各物的组合也应包含于计算机可读媒体的范围内。However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead are directed to non-transitory tangible storage media. As used herein, magnetic disks and optical disks include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), flexible disks, and Blu-ray discs, in which disks typically reproduce data magnetically, while discs pass through thunder. The projection optically reproduces the data. Combinations of the above should also be included in the scope of computer readable media.
可通过例如一个或多个数字信号处理器(DSP)、通用微处理器、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它等效集成或离散逻辑电路的一个或多个处理器来执行指令。因此,如本文中所使用,术语“处理器”可指前述结构或适于实施本文中所描述的技术的任何其它结构中的任一者。另外,在一些方面中,可将本文所描述的功能性提供于经配置以用于编码及解码的专用硬件和/或软件模块内,或并入于组合式编码解码器中。同样,技术可完全实施于一个或多个电路或逻辑元件中。One or more processes may be performed by, for example, one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits To execute instructions. Accordingly, the term "processor," as used herein, may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques can be fully implemented in one or more circuits or logic elements.
本申请的技术可实施于广泛多种装置或设备中,包含无线手机、集成电路(IC)或IC的集合(例如,芯片组)。本申请中描述各种组件、模块或单元以强调经配置以执行所揭示的技术的装置的功能方面,但未必需要通过不同硬件单元实现。更确切来说,如前文所描述,各种单元可组合于编码解码器硬件单元中或由互操作的硬件单元(包含如前文所描述的一个或多个处理器)结合合适软件和/或固件的集合来提供。The techniques of the present application can be implemented in a wide variety of devices or devices, including wireless handsets, integrated circuits (ICs), or a collection of ICs (eg, a chipset). Various components, modules or units are described herein to emphasize functional aspects of the apparatus configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Rather, as described above, various units may be combined in a codec hardware unit or combined with suitable software and/or firmware by interoperable hardware units (including one or more processors as described above). The collection comes to offer.
以上所述,仅为本申请示例性的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。 The foregoing is only an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present application. Replacement should be covered by the scope of this application. Therefore, the scope of protection of the present application should be determined by the scope of protection of the claims.

Claims (20)

  1. 一种图像块的候选运动信息的获取方法,其特征在于,所述候选运动信息用于构建用于帧间预测的候选列表,所述方法包括:A method for acquiring candidate motion information of an image block, wherein the candidate motion information is used to construct a candidate list for inter prediction, the method comprising:
    按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述当前图像块的候选列表中的M组原始候选运动信息,M为大于或等于0的整数;Detecting one or more spatial reference blocks of the current image block according to the first preset sequence, to obtain M sets of original candidate motion information in the candidate list of the current image block, where M is an integer greater than or equal to 0;
    按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,L为大于或等于0的整数;Detecting one or more time domain reference blocks of the current image block according to a second preset sequence, and obtaining L sets of original candidate motion information in the candidate list of the image block to be processed, where L is greater than or equal to 0. Integer
    当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的至少一组双向预测类型的原始候选运动信息进行分解处理,得到所述待处理图像块的候选列表中的Q组新构造的单向预测类型的候选运动信息,Q为大于或等于0的整数。When the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of at least one set of bidirectional prediction types included in the candidate list is decomposed to obtain the to-be-processed Q group of newly constructed unidirectional prediction type candidate motion information in the candidate list of image blocks, Q is an integer greater than or equal to 0.
  2. 根据权利要求1所述的方法,其特征在于,所述一组双向预测类型的原始候选运动信息包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;The method according to claim 1, wherein the set of bidirectional prediction type original candidate motion information comprises: motion information for a forward prediction direction and motion information for a backward prediction direction, wherein The motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; The motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index;
    经分解处理,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型为前向预测方向的一组运动信息和/或单向预测类型为后向预测方向的一组运动信息,其中所述前向预测方向的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测方向的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the decomposition processing, the candidate motion information of the unidirectional prediction type of the Q group newly constructed includes: a group of motion information whose unidirectional prediction type is a forward prediction direction and/or a group whose unidirectional prediction type is a backward prediction direction. Motion information, wherein the set of motion information of the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a first reference image corresponding to the first reference image index a motion vector; the set of motion information of the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a second reference image corresponding to the second reference image index Sport vector.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法进一步包括:The method according to claim 1 or 2, wherein the method further comprises:
    当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的两组单向预测类型的原始候选运动信息进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息,P为大于或等于0的整数。When the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the original candidate motion information of the two sets of unidirectional prediction types included in the candidate list is combined to obtain the to-be-processed P-group newly constructed bidirectional prediction type candidate motion information in the candidate list of image blocks, P being an integer greater than or equal to zero.
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。The method according to any one of claims 1 to 3, wherein the one or more spatial reference blocks comprise: one or more airspaces adjacent to the current image block in an image of a current image block a reference block, and/or one or more spatial reference blocks in the image in which the current image block is located that are not contiguous with the image block to be processed.
  5. 根据权利要求4所述的方法,其特征在于,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括: The method according to claim 4, wherein the one or more spatial reference blocks adjacent to the current image block in the image of the current image block comprise:
    位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
  6. 根据权利要求5所述的方法,其特征在于,所述按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息包括:The method according to claim 5, wherein the detecting one or more spatial reference blocks of the current image block according to the first preset order, obtaining the M in the candidate list of the image block to be processed The group original candidate motion information includes:
    依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数,Detecting whether the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 are available to obtain the first airspace neighboring The motion information of the M1 determined motion vector image blocks in the block A1, the second spatial neighboring block B1, the third spatial neighboring block B0, the fourth spatial neighboring block A0, and the fifth spatial neighboring block B2, where M1 is greater than or equal to 0. Integer,
    将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;Adding M sets of motion information in the motion information of the detected M1 determined motion vector image blocks as candidate motion information to the candidate list, where M1 is equal to or greater than M;
    其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。Wherein: the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
  7. 根据权利要求1至3任一项所述的方法,其特征在于,所述一个或多个时域参考块包括:所述当前图像块的同位置块的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。The method according to any one of claims 1 to 3, wherein the one or more time domain reference blocks comprise: a lower right spatial domain adjacent block H of a co-located block of the current image block, the same An upper left intermediate block C0 of the location block, a lower right intermediate block C3 of the same location block, an upper left block TL of the same location block, or a lower right block BR of the same location block, wherein the same location block is An image block of the reference image having the same size, shape, and coordinates as the current image block.
  8. 根据权利要求7所述的方法,其特征在于,所述按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,包括:The method according to claim 7, wherein the detecting one or more time domain reference blocks of the current image block according to a second preset order, obtaining a candidate list of the image block to be processed The original candidate motion information of the L group in the group includes:
    依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the right lower spatial neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available, to obtain motion information of the L1 determined motion vector image blocks; or
    依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, and whether the upper left intermediate block C0 of the co-located block is available to obtain motion information of the L2 determined motion vector image blocks; or
    依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息;Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, and the lower right block BR of the co-located block. Whether the upper left intermediate block C0 of the same position block is available to obtain motion information of the L3 determined motion vector image blocks;
    将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。The L group motion information in the motion information of the detected L1 or L2 or L3 determined motion vector image blocks is added as candidate motion information to the candidate list, L1 is equal to or greater than L, or L2 is equal to or greater than L, Or L3 is equal to or greater than L, and L1, L2, and L3 are all integers greater than or equal to zero.
  9. 根据权利要求1至8任一项所述的方法,其特征在于,A method according to any one of claims 1 to 8, wherein
    所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量;The target number is a preset maximum number of candidate motion information in the candidate list of the current image block;
    或者, Or,
    所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。The target number is the number of candidate motion information determined using an index identifier parsed from the code stream.
  10. 一种图像块的候选运动信息的获取装置,其特征在于,所述候选运动信息用于构建用于帧间预测的候选列表,所述装置包括:An apparatus for acquiring candidate motion information of an image block, wherein the candidate motion information is used to construct a candidate list for inter prediction, and the apparatus includes:
    空域候选运动信息获取模块,用于按照第一预设顺序,对当前图像块的一个或多个空域参考块进行检测,得到所述待处理图像块的候选列表中的M组原始候选运动信息,M为大于或等于0的整数;The airspace candidate motion information acquiring module is configured to detect one or more spatial reference blocks of the current image block according to the first preset sequence, and obtain M group original candidate motion information in the candidate list of the image block to be processed, M is an integer greater than or equal to 0;
    时域候选运动信息获取模块,用于按照第二预设顺序,对所述当前图像块的一个或多个时域参考块进行检测,得到所述待处理图像块的候选列表中的L组原始候选运动信息,L为大于或等于0的整数;a time domain candidate motion information acquiring module, configured to detect one or more time domain reference blocks of the current image block according to a second preset order, to obtain L group originals in the candidate list of the image block to be processed Candidate motion information, L is an integer greater than or equal to 0;
    附加候选运动信息获取模块,用于当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,对所述候选列表中包括的至少一组双向预测类型的原始候选运动信息进行分解处理,得到所述待处理图像块的候选列表中的Q组新构造的单向预测类型的候选运动信息,Q为大于或等于0的整数。An additional candidate motion information acquiring module, configured to: when the number of candidate motion information in the candidate list of the image block to be processed is smaller than a target number, the original candidate motion information of at least one set of bidirectional prediction types included in the candidate list Performing a decomposition process to obtain candidate motion information of a unidirectional prediction type newly constructed by the Q group in the candidate list of the image block to be processed, and Q is an integer greater than or equal to 0.
  11. 根据权利要求10所述的装置,其特征在于,所述一组双向预测类型的原始候选运动信息包括:用于前向预测方向的运动信息和用于后向预测方向的运动信息,其中所述用于前向预测方向的运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述用于后向预测方向的运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量;The apparatus according to claim 10, wherein said set of bidirectional prediction type original candidate motion information comprises: motion information for a forward prediction direction and motion information for a backward prediction direction, wherein said The motion information for the forward prediction direction includes a first reference image list and a first reference image index corresponding to the first reference image list and a motion vector of the first reference image corresponding to the first reference image index; The motion information for the backward prediction direction includes a second reference image list and a second reference image index corresponding to the second reference image list and a motion vector of the second reference image corresponding to the second reference image index;
    经所述附加候选运动信息获取模块分解处理后,所述Q组新构造的单向预测类型的候选运动信息包括:单向预测类型为前向预测编/解码模式的一组运动信息和/或单向预测类型为后向预测编/解码模式的一组运动信息,其中所述前向预测编/解码模式的一组运动信息包括第一参考图像列表和与第一参考图像列表对应的第一参考图像索引以及指向所述第一参考图像索引对应的第一参考图像的运动矢量;所述后向预测编/解码模式的一组运动信息包括第二参考图像列表和与第二参考图像列表对应的第二参考图像索引以及指向所述第二参考图像索引对应的第二参考图像的运动矢量。After the additional candidate motion information acquisition module is decomposed, the candidate motion information of the unidirectional prediction type newly constructed by the Q group includes: a group of motion information of a unidirectional prediction type being a forward prediction encoding/decoding mode and/or The unidirectional prediction type is a set of motion information of a backward prediction encoding/decoding mode, wherein the set of motion information of the forward prediction encoding/decoding mode includes a first reference image list and a first corresponding to the first reference image list a reference image index and a motion vector of the first reference image corresponding to the first reference image index; the set of motion information of the backward predictive encoding/decoding mode includes a second reference image list and corresponding to the second reference image list And a second reference image index and a motion vector of the second reference image corresponding to the second reference image index.
  12. 根据权利要求10或11所述的装置,其特征在于,当所述待处理图像块的候选列表中的候选运动信息的数量小于目标数量时,所述附加候选运动信息获取模块进一步用于:对所述候选列表中包括的两组单向预测类型的原始候选运动信息进行组合处理,得到所述待处理图像块的候选列表中的P组新构造的双向预测类型的候选运动信息,P为大于或等于0的整数。The apparatus according to claim 10 or 11, wherein when the number of candidate motion information in the candidate list of the image block to be processed is smaller than the target number, the additional candidate motion information acquiring module is further configured to: The original candidate motion information of the two sets of unidirectional prediction types included in the candidate list is combined to obtain candidate motion information of the P-group newly constructed bidirectional prediction type in the candidate list of the to-be-processed image block, where P is greater than Or an integer equal to 0.
  13. 根据权利要求10至12任一项所述的装置,其特征在于,所述一个或多个空域参考块包括:当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域参考块,和/或,当前图像块所在图像中的、与所述待处理图像块不邻接的一个或多个空域参考块。 The apparatus according to any one of claims 10 to 12, wherein the one or more spatial reference blocks comprise: one or more airspaces adjacent to the current image block in an image of a current image block a reference block, and/or one or more spatial reference blocks in the image in which the current image block is located that are not contiguous with the image block to be processed.
  14. 根据权利要求13所述的装置,其特征在于,所述当前图像块所在图像中的与所述当前图像块邻近的一个或多个空域参考块包括:The apparatus according to claim 13, wherein one or more spatial reference blocks adjacent to the current image block in the image of the current image block include:
    位于所述当前图像块左下侧的第四空域邻近块A0,位于所述当前图像块左侧的第一空域邻近块A1,位于所述当前图像块右上侧的第三空域邻近块B0,位于所述当前图像块上侧的第二空域邻近块B1,或位于所述当前图像块左上侧的第五空域邻近块B2。a fourth airspace neighboring block A0 located at a lower left side of the current image block, a first airspace neighboring block A1 located at a left side of the current image block, and a third airspace neighboring block B0 located at an upper right side of the current image block. The second spatial domain adjacent block B1 on the upper side of the current image block, or the fifth airspace adjacent block B2 located on the upper left side of the current image block.
  15. 根据权利要求14所述的装置,其特征在于,所述空域候选运动信息获取模块用于:The apparatus according to claim 14, wherein the airspace candidate motion information acquisition module is configured to:
    依序检测所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2是否可用,以得到所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0、第四空域邻近块A0、第五空域邻近块B2中M1个已确定运动矢量图像块的运动信息,M1为大于或等于0的整数,Detecting whether the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, the fourth airspace neighboring block A0, and the fifth airspace neighboring block B2 are available to obtain the first airspace neighboring The motion information of the M1 determined motion vector image blocks in the block A1, the second spatial neighboring block B1, the third spatial neighboring block B0, the fourth spatial neighboring block A0, and the fifth spatial neighboring block B2, where M1 is greater than or equal to 0. Integer,
    将检测得到的M1个已确定运动矢量图像块的运动信息中的M组运动信息作为候选运动信息加入到所述候选列表中,M1等于或大于M;Adding M sets of motion information in the motion information of the detected M1 determined motion vector image blocks as candidate motion information to the candidate list, where M1 is equal to or greater than M;
    其中:第五空域邻近块B2的检测条件包括:当所述第一空域邻近块A1、第二空域邻近块B1、第三空域邻近块B0和第四空域邻近块A0中的任一个不可用时,检测第五空域邻近块B2。Wherein: the detection condition of the fifth airspace neighboring block B2 includes: when any one of the first airspace neighboring block A1, the second airspace neighboring block B1, the third airspace neighboring block B0, and the fourth airspace neighboring block A0 is unavailable, The fifth airspace neighboring block B2 is detected.
  16. 根据权利要求10至12任一项所述的装置,其特征在于,所述一个或多个时域参考块包括:所述当前图像块的同位置块的右下空域邻近块H,所述同位置块的左上中间块C0,所述同位置块的右下中间块C3、所述同位置块的左上块TL,或所述同位置块的右下块BR,其中,所述同位置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。The apparatus according to any one of claims 10 to 12, wherein the one or more time domain reference blocks comprise: a lower right spatial neighboring block H of a co-located block of the current image block, the same An upper left intermediate block C0 of the location block, a lower right intermediate block C3 of the same location block, an upper left block TL of the same location block, or a lower right block BR of the same location block, wherein the same location block is An image block of the reference image having the same size, shape, and coordinates as the current image block.
  17. 根据权利要求16所述的装置,其特征在于,所述时域候选运动信息获取模块用于:The apparatus according to claim 16, wherein the time domain candidate motion information acquiring module is configured to:
    依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3是否可用,得到L1个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the right lower spatial neighboring block H of the co-located block, and whether the lower right intermediate block C3 of the co-located block is available, to obtain motion information of the L1 determined motion vector image blocks; or
    依序检测所述同位置块的右下空域邻近块H、所述同位置块的左上中间块C0是否可用,以得到L2个已确定运动矢量图像块的运动信息;或Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, and whether the upper left intermediate block C0 of the co-located block is available to obtain motion information of the L2 determined motion vector image blocks; or
    依序检测所述同位置块的右下空域邻近块H、所述同位置块的右下中间块C3、所述同位置块的左上块TL、所述同位置块的右下块BR、所述同位置块的左上中间块C0是否可用,以得到L3个已确定运动矢量图像块的运动信息;Detecting, in sequence, the lower right spatial neighboring block H of the co-located block, the lower right intermediate block C3 of the co-located block, the upper left block TL of the co-located block, and the lower right block BR of the co-located block. Whether the upper left intermediate block C0 of the same position block is available to obtain motion information of the L3 determined motion vector image blocks;
    将检测得到的L1或L2或L3个已确定运动矢量图像块的运动信息中的L组运动信息作为候选运动信息加入到所述候选列表中,L1等于或大于L,或L2等于或大于L,或L3等于或大于L,且L1,L2和L3均为大于或等于0的整数。The L group motion information in the motion information of the detected L1 or L2 or L3 determined motion vector image blocks is added as candidate motion information to the candidate list, L1 is equal to or greater than L, or L2 is equal to or greater than L, Or L3 is equal to or greater than L, and L1, L2, and L3 are all integers greater than or equal to zero.
  18. 根据权利要求10至17任一项所述的装置,其特征在于,Apparatus according to any one of claims 10 to 17, wherein
    所述装置用于编码或解码视频图像,所述目标数量为所述当前图像块的候选列表中候选运动信息的预设最大数量; The device is configured to encode or decode a video image, where the target number is a preset maximum number of candidate motion information in a candidate list of the current image block;
    或者,or,
    所述装置用于解码视频图像,所述目标数量为利用从码流中解析得到的索引标识确定的候选运动信息的数量。The apparatus is for decoding a video image, the target number being a number of candidate motion information determined using an index identification parsed from the code stream.
  19. 一种视频编码器,其特征在于,所述视频编码器用于编码图像块,包括:A video encoder, wherein the video encoder is used to encode an image block, including:
    帧间预测器,包括如权利要求10至18任一项所述的图像块的候选运动信息的获取装置,其中所述帧间预测器用于基于候选列表中所选择的候选运动信息确定当前待编码图像块的预测块;An interframe predictor, comprising: the apparatus for acquiring candidate motion information of an image block according to any one of claims 10 to 18, wherein the inter predictor is configured to determine a current to be encoded based on the selected candidate motion information in the candidate list. a prediction block of an image block;
    熵编码器,用于将索引标识编入码流,所述索引标识用于指示用于所述当前待编码图像块的所述选择的候选运动信息;An entropy encoder, configured to encode an index identifier into the code stream, where the index identifier is used to indicate the candidate motion information for the selection of the current image block to be encoded;
    重建器,用于基于所述预测块重建所述图像块。a reconstructor for reconstructing the image block based on the prediction block.
  20. 一种视频解码器,其特征在于,所述视频解码器用于从码流中解码出图像块,包括:A video decoder, wherein the video decoder is configured to decode an image block from a code stream, including:
    熵解码器,用于从码流中解码出索引标识,所述索引标识用于指示用于当前待解码图像块的所选择的候选运动信息;An entropy decoder, configured to decode an index identifier from the code stream, where the index identifier is used to indicate the selected candidate motion information for the current image block to be decoded;
    帧间预测器,包括如权利要求10至18任一项所述的图像块的候选运动信息的获取装置,其中所述帧间预测器用于基于所述索引标识指示的候选运动信息确定当前待解码图像块的预测块;An interframe predictor, comprising: the apparatus for acquiring candidate motion information of an image block according to any one of claims 10 to 18, wherein the inter predictor is configured to determine a current to be decoded based on candidate motion information indicated by the index identifier a prediction block of an image block;
    重建器,用于基于所述预测块重建所述图像块。 a reconstructor for reconstructing the image block based on the prediction block.
PCT/CN2017/108611 2017-10-31 2017-10-31 Method and device for obtaining candidate motion information of image block, and codec WO2019084776A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/108611 WO2019084776A1 (en) 2017-10-31 2017-10-31 Method and device for obtaining candidate motion information of image block, and codec

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/108611 WO2019084776A1 (en) 2017-10-31 2017-10-31 Method and device for obtaining candidate motion information of image block, and codec

Publications (1)

Publication Number Publication Date
WO2019084776A1 true WO2019084776A1 (en) 2019-05-09

Family

ID=66331259

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108611 WO2019084776A1 (en) 2017-10-31 2017-10-31 Method and device for obtaining candidate motion information of image block, and codec

Country Status (1)

Country Link
WO (1) WO2019084776A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210409686A1 (en) * 2019-03-11 2021-12-30 Hangzhou Hikvision Digital Technology Co., Ltd. Method for constructing motion information candidate list, method and apparatus for triangle prediction decoding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070047649A1 (en) * 2005-08-30 2007-03-01 Sanyo Electric Co., Ltd. Method for coding with motion compensated prediction
CN103096082A (en) * 2013-01-22 2013-05-08 清华大学 Bi-direction motion estimate method based on evolution of time domains
CN103338372A (en) * 2013-06-15 2013-10-02 浙江大学 Method and device for processing video
CN103765896A (en) * 2011-06-27 2014-04-30 三星电子株式会社 Method and apparatus for encoding motion information, and method and apparatus for decoding same
CN107113446A (en) * 2014-12-09 2017-08-29 联发科技股份有限公司 The derivation method of motion-vector prediction or merging candidate in Video coding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070047649A1 (en) * 2005-08-30 2007-03-01 Sanyo Electric Co., Ltd. Method for coding with motion compensated prediction
CN103765896A (en) * 2011-06-27 2014-04-30 三星电子株式会社 Method and apparatus for encoding motion information, and method and apparatus for decoding same
CN103096082A (en) * 2013-01-22 2013-05-08 清华大学 Bi-direction motion estimate method based on evolution of time domains
CN103338372A (en) * 2013-06-15 2013-10-02 浙江大学 Method and device for processing video
CN107113446A (en) * 2014-12-09 2017-08-29 联发科技股份有限公司 The derivation method of motion-vector prediction or merging candidate in Video coding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210409686A1 (en) * 2019-03-11 2021-12-30 Hangzhou Hikvision Digital Technology Co., Ltd. Method for constructing motion information candidate list, method and apparatus for triangle prediction decoding
US11863714B2 (en) * 2019-03-11 2024-01-02 Hangzhou Hikvision Digital Technology Co., Ltd. Method for constructing motion information candidate list, method and apparatus for triangle prediction decoding

Similar Documents

Publication Publication Date Title
WO2019120305A1 (en) Method for predicting motion information of image block , device and codec
JP7342115B2 (en) Improved history-based motion vector predictor
US10652571B2 (en) Advanced motion vector prediction speedups for video coding
CN109792531B (en) Method, device and storage medium for encoding and decoding video data
KR102520296B1 (en) Motion vector derivation in video coding
CN107710764B (en) System and method for determining illumination compensation states for video coding
CN107690810B (en) System and method for determining illumination compensation states for video coding
US9736489B2 (en) Motion vector determination for video coding
US9854234B2 (en) Reference picture status for video coding
CN109996081B (en) Image prediction method, device and coder-decoder
KR20190055109A (en) Adaptive motion vector precision for video coding
JP2019530316A (en) Tree type coding for video coding
US20130114717A1 (en) Generating additional merge candidates
JP2018530246A (en) Improved video intra prediction using position-dependent prediction combinations for video coding
JP6239609B2 (en) Signaling long-term reference pictures for video coding
JP2015529065A (en) Multiple hypothesis motion compensation for scalable video coding and 3D video coding
KR20130126688A (en) Motion vector prediction
JP6271734B2 (en) Sub-PU level altitude residual prediction
US11563949B2 (en) Motion vector obtaining method and apparatus, computer device, and storage medium
WO2019218286A1 (en) Video encoding and decoding method and apparatus
WO2019154424A1 (en) Video decoding method, video decoder, and electronic device
WO2020047807A1 (en) Inter prediction method and apparatus, and codec
US11394996B2 (en) Video coding method and apparatus
US11197018B2 (en) Inter-frame prediction method and apparatus
WO2020043111A1 (en) Historic candidate list-based image coding and decoding methods, and codec

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: 17930245

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: 17930245

Country of ref document: EP

Kind code of ref document: A1