WO2019052330A1 - Encoding and decoding method and apparatus for motion information - Google Patents

Encoding and decoding method and apparatus for motion information Download PDF

Info

Publication number
WO2019052330A1
WO2019052330A1 PCT/CN2018/102632 CN2018102632W WO2019052330A1 WO 2019052330 A1 WO2019052330 A1 WO 2019052330A1 CN 2018102632 W CN2018102632 W CN 2018102632W WO 2019052330 A1 WO2019052330 A1 WO 2019052330A1
Authority
WO
WIPO (PCT)
Prior art keywords
image block
reconstructed image
motion information
adjacent reconstructed
candidate
Prior art date
Application number
PCT/CN2018/102632
Other languages
French (fr)
Chinese (zh)
Inventor
张娜
安基程
林永兵
郑建铧
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019052330A1 publication Critical patent/WO2019052330A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present application relates to the field of video image technology, and in particular, to a method and apparatus for encoding and decoding motion information.
  • Digital video capabilities can be applied to many devices, including digital TV, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), notebook or desktop computers, tablet computers, e-book readers, digital cameras, digital Recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio phones, video conferencing devices, video streaming devices, and the like.
  • Digital video devices implement video compression techniques, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4, Part 10, advanced video coding (AVC), ITU- The TH.265 high efficiency video coding (HEVC) standard defines standards and those described in the extensions of the standard to more efficiently transmit and receive digital video information.
  • Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video codec techniques.
  • Video compression techniques perform spatial (intra-image) prediction and/or temporal (inter-image) prediction to reduce or remove redundancy inherent in video sequences.
  • a video image may be partitioned into video blocks, which may also be referred to as treeblocks, coding units (CUs), decoding units, decoding nodes, and the like.
  • a video block in an intra-coded (I) slice of an image is encoded using spatial prediction of reference samples in neighboring blocks in the same image.
  • a video block in an inter-coded (P or B) strip of an image is encoded using spatial prediction of reference samples in neighboring blocks in the same image or temporal prediction of reference samples in other reference pictures.
  • An image may be referred to as a frame, and a reference image may be referred to as a reference frame.
  • the present application introduces a prediction method. Specifically, when the to-be-processed block has a plurality of candidate prediction motion information, the similarity between the reference image blocks indicated by the candidate prediction motion information of the to-be-processed block and the to-be-processed block is A priori knowledge to assist in determining the coding mode of the identification of each candidate prediction motion information, thereby achieving the purpose of saving coding bits and improving coding efficiency.
  • the similarity is similar to the reconstructed pixel set corresponding to the block to be processed and the reconstructed pixel set corresponding to the reference image block.
  • the degree is approximated, that is, the similarity between the reconstructed pixel set around the block to be processed and the reconstructed pixel set corresponding to the reference image block is used to represent the reference image indicated by the candidate predicted motion information of the block to be processed and the block to be processed.
  • the similarity between blocks is approximated, that is, the similarity between the reconstructed pixel set around the block to be processed and the reconstructed pixel set corresponding to the reference image block is used to represent the reference image indicated by the candidate predicted motion information of the block to be processed and the block to be processed.
  • the embodiment of the present application is applicable to a scenario in which a reference image block is determined from a plurality of reference image blocks of a to-be-processed block, and the identification information of the reference image block is encoded.
  • the plurality of reference image blocks are derived from an inter-frame type prediction mode, from an intra-frame type prediction mode, or from a viewpoint-to-view mode (Multi-view or 3D Video Codig). It is also independent of the prediction mode (scalable video coding, Scalabe Video Coding) from the layer, regardless of the specific reference image block acquisition method (such as using ATMVP or STMVP, or intra block copy mode), and indicating the reference image block.
  • the motion information belongs to the motion vector of the entire coding unit or the motion information belonging to a certain sub-coding unit in the coding unit, the foregoing various prediction modes conforming to the applicable scene of the embodiment of the present application and the method for acquiring the reference image block (ie, acquiring motion)
  • the method of the information can achieve the technical effect of improving the coding efficiency according to or in combination with the solution in the embodiment of the present application.
  • an encoding method for image block prediction motion information including the steps of: acquiring N candidate prediction motion information of an image block to be processed. Where N is an integer greater than one.
  • the N candidate predicted motion informations are different from each other. It should be understood that when the motion information includes the motion vector and the reference frame information, the motion information is different from each other, and also includes the case where the motion vectors are the same but the reference frame information is different.
  • the technique of pruning has been introduced in the foregoing, and it should be understood that in the process of obtaining N candidate prediction motion information of an image block to be processed, a pruning operation is performed, so that the N candidate motion information obtained finally is different from each other. No longer.
  • the acquiring the N candidate predicted motion information of the to-be-processed image block includes: acquiring N mutually different image blocks having a preset position according to a preset sequence The motion information of the image block of the relationship is used as the N candidate prediction motion information.
  • the acquiring the N candidate predicted motion information of the to-be-processed image block includes: acquiring, in a preset order, M different preset positions and the image block to be processed having a preset position
  • the motion information of the image block of the relationship is the M candidate prediction motion information, wherein the M candidate prediction motion information includes the N candidate prediction motion information, and M is an integer greater than N; determining the M candidate prediction motions a manner of grouping information; determining, according to the grouping manner, the N candidate predicted motion information from the M candidate predicted motion information.
  • different processing methods can be adopted, or the same processing method can be adopted.
  • the grouping method is programmed into a code stream.
  • the grouping mode is that the codec end is respectively solidified on the codec end and maintained consistent through a preset protocol.
  • the encoding end also needs to make the decoding end know the specific candidate prediction motion information.
  • the candidate prediction motion information is encoded into the code stream; or the second identification information indicating the image block having the preset positional relationship with the to-be-processed image block is encoded into the code stream; Or, the third identification information that has a preset correspondence relationship with the N candidate predicted motion information is encoded into the code stream.
  • the candidate prediction motion information is that the codec end is respectively solidified at the codec end and maintained consistent by a preset protocol.
  • the candidate prediction motion information is grouped, and different packets are allowed to adopt different processing manners, which makes the coding method more flexible and reduces the computational complexity.
  • the encoding method further includes the step of determining that adjacent reconstructed image blocks of the image block to be processed are available.
  • determining the adjacent of the to-be-processed image block Reconstructing the image block is operative, comprising determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
  • the identification information is required to encode the auxiliary information such as the foregoing grouping manner and/or the processing manner of each packet.
  • the adjacent reconstructed image block of the image block to be processed may also be determined first. Availability.
  • adjacent reconstructed image blocks When adjacent reconstructed image blocks are not available, they can be directly encoded in a conventional manner without further encoding the above auxiliary information, thereby saving coded bits.
  • the encoding method further includes the step of: acquiring distortion values corresponding to the N candidate prediction motion information.
  • the reference adjacent reconstructed image block is identical in shape and equal in size to the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block is opposite to the original
  • the positional relationship between the adjacent reconstructed image block and the image block to be processed is the same.
  • the image block to be processed is a rectangle, and the image block to be processed has a width W and a height H, and the original adjacent reconstructed image block is a rectangle.
  • a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and a width of the original adjacent reconstructed image block is W, and the height is
  • a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and a width of the original adjacent reconstructed image block is W+ H, the height is n;
  • a right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, and the original adjacent reconstructed image block is The width is n and the height is H.
  • the right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, and the original adjacent reconstructed image
  • the width of the block is n and the height is W+H. Where W, H, and n are positive integers.
  • n may be set to 1 or 2, so that no additional storage space is needed to store the original adjacent reconstructed image block, which simplifies the hardware. achieve.
  • This step first needs to obtain a reference adjacent reconstructed image block of the reference image block of the image block to be processed indicated by the N candidate prediction motion information.
  • the motion vector in the candidate prediction motion information points to the position of the sub-pixel in the reference frame, and at this time, the pixel of the reference frame image or the reference frame image needs to be interpolated to obtain the image.
  • the 8-tap filter of ⁇ -1, 4, -11, 40, 40, -11, 4, -1 ⁇ may be used for pixel interpolation, or Simplify the computational complexity, and you can also use bilinear interpolation filters for subpixel interpolation.
  • This step then calculates a difference characterization value of the reference neighboring reconstructed image block of the reference image block and the original adjacent reconstructed image block of the block to be processed as a distortion value.
  • the difference characterization value can be calculated in a variety of ways, such as mean absolute error (MAD), absolute error sum (SAD), sum of squared errors (SSD), sum of squared errors (MSD), absolute Hadamard transform error and (SATD) , normalized product correlation measure (NCC), or similarity measure based on sequential similarity detection (SSDA), and so on.
  • the plurality of the original adjacent reconstructed image blocks include a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, corresponding to
  • the plurality of the reference adjacent reconstructed image blocks include a third reference neighboring reconstructed image block and a fourth reference neighboring reconstructed image block
  • the distortion value is determined by the reference neighboring reconstructed image And a difference characterization value of the block and the original adjacent reconstructed image block, including: a difference between the distortion value by the third reference neighboring reconstructed image block and the third original neighbor reconstructed image block And a representation value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
  • the distortion value is obtained according to the following calculation formula:
  • Distortion represents the distortion value
  • represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block
  • p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  • Delta is an expression of various calculation methods such as MAD, SAD, and SSD.
  • the embodiment of the present invention is applied to inter-frame bidirectional prediction, and the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, corresponding to The adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference Representing a difference characterization value of the adjacent reconstructed image block and the original adjacent reconstructed image block, comprising: the difference between the distortion reference value by the average reference adjacent reconstructed image block and the original adjacent reconstructed image block Representing a value, wherein the average reference neighboring reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or The distortion value is represented by a mean of a first difference representation value and a second difference representation value, wherein the first difference representation value is from the first reference neighbor reconstructed image block
  • the image block to be processed has candidate prediction motion information at the sub-block level, and the distortion values corresponding to each sub-block adjacent to the original adjacent reconstructed image block may be respectively obtained and summed. As the distortion value of the image block to be processed.
  • the encoding method further includes the step of: determining first identification information of each of the N candidate prediction motion information according to a size relationship between the acquired N distortion values, the N candidate prediction motion information and respective One identification information corresponds one by one.
  • the step firstly compares the sizes between the N distortion values.
  • the N candidate prediction motion information may be sequentially arranged according to the distortion values from small to large or from large to small. Then, the first identification information of each of the N candidate predicted motion information is given according to the comparison result.
  • the length of the binary character string of the first identification information of the candidate prediction motion information with the smaller distortion value is less than or equal to, for example, not greater than, the first identification information of the candidate prediction motion information that encodes the distortion value is large. The length of the binary string.
  • the candidate prediction motion information with large similarity (small distortion value) is more likely to be selected as prediction information, and a binary character string of a shorter codeword is given to represent the identification value, which can save coding bits and improve coding efficiency.
  • the encoding method further includes the step of: when the target predicted motion information of the image block to be processed is one of the N candidate predicted motion information of the determined first identification information, the first of the target predicted motion information
  • the identification information is programmed into the code stream.
  • a second aspect of the embodiments of the present application provides a method for decoding image block prediction motion information, including: parsing target identification information of target prediction motion information of a to-be-processed image block from a code stream; and determining N candidate prediction motions.
  • the N candidate prediction motion information includes the target prediction motion information, where N is an integer greater than 1, and acquiring distortion values corresponding to the N candidate prediction motion information, the distortion values being by the candidate Determining the adjacent reconstructed image block of the reference image block indicated by the motion information and the adjacent reconstructed image block of the image block to be processed; determining the N according to a size relationship between the acquired N distortion values
  • the first identification information of the candidate prediction motion information, the N candidate prediction motion information and the respective first identification information are in one-to-one correspondence; the candidate prediction motion information corresponding to the first identification information that matches the target identification information It is determined that the motion information is predicted for the target.
  • the similarity between the reference image blocks indicated by the candidate prediction motion vector of the to-be-processed block and the to-be-processed block is a priori knowledge to assist in determining each candidate prediction motion vector.
  • the encoding of the identifier thereby achieving the purpose of saving coding bits and improving coding efficiency.
  • the embodiments of the second aspect of the present application are related to the coding method of the first aspect, and the beneficial technical effects are the same. Reference may be made to the description of the technical effects in the first aspect, and details are not described herein.
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent weight of the to-be-processed image block
  • the image block includes an original adjacent reconstructed image block corresponding to the reference neighboring reconstructed image block
  • the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information
  • the The adjacent reconstructed image block of the image block to be processed is determined to include: the distortion value is represented by a difference characterization value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block, the reference phase
  • the adjacent reconstructed image block has the same shape and the same size as the original adjacent reconstructed image block, and the positional relationship between the reference adjacent reconstructed image block and the reference image block and the original adjacent reconstruction The positional relationship between the image block and the image block to be processed is the same.
  • the difference characterization value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block includes: the reference adjacent reconstructed image block and the An average absolute error of the original adjacent reconstructed image block; an absolute error sum of the reference neighboring reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original a sum of squared errors of adjacent reconstructed image blocks; a squared sum of average errors of said reference neighboring reconstructed image blocks and said original adjacent reconstructed image blocks; said reference adjacent reconstructed image block and said original phase An absolute Hadamard transform error sum of the neighboring reconstructed image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring weight A similarity measure based on sequential similarity detection of the image block and the original adjacent reconstructed image block.
  • the image block to be processed is a rectangle
  • the width of the image block to be processed is W
  • the height is H
  • the original adjacent reconstructed image block is a rectangle.
  • the lower boundary of the original adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, including: the original adjacent reconstructed image block has a width W and a height n; or, the original phase
  • the adjacent reconstructed image block has a width of W+H and a height of n; wherein W, H, and n are positive integers.
  • n 1 or 2.
  • the image block to be processed is a rectangle
  • the width of the image block to be processed is W
  • the height is H
  • the original adjacent reconstructed image block is a rectangle.
  • the right boundary of the original adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width n and a height H; or the original phase
  • the adjacent reconstructed image block has a width n and a height W+H; wherein W, H, and n are positive integers.
  • n 1 or 2.
  • the reference image block indicated by the candidate predicted motion information includes a first reference image block and a second reference image block, correspondingly, the reference image indicated by the candidate predicted motion information
  • the adjacent reconstructed image block of the block includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image block and the original Representing a difference characterization value of an adjacent reconstructed image block, including: the distortion value is represented by an average reference adjacent reconstructed image block and a difference characterization value of the original adjacent reconstructed image block, wherein the average
  • the reference adjacent reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or the distortion value is represented by the first difference and Representing a mean value of the second difference characterization value, wherein the first difference characterization value is represented by the difference characterization value of the first reference neighboring reconstructed image block and the
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks
  • the plurality of The reference adjacent reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block
  • the adjacent reconstructed image block of the to-be-processed image block includes a plurality of the original An adjacent reconstructed image block, the plurality of the original adjacent reconstructed image blocks including a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block
  • the distortion value being determined by the reference phase And representing, by the difference representation value of the adjacent reconstructed image block and the original adjacent reconstructed image block, comprising: the distortion value is reconstructed by the third reference neighboring reconstructed image block and the third original neighboring block And a difference characterization value of the image block and a sum of difference characterization values of the fourth reference adjacent reconstructed image block and the fourth original adjacent reconstructed image
  • the distortion value is obtained according to the following calculation formula:
  • Distortion represents the distortion value
  • represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block
  • p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  • the determining, according to the magnitude relationship between the acquired N distortion values, the first identification information of each of the N candidate prediction motion information including: a size between the N pieces of distortion values; a first identification information of each of the N candidate prediction motion information is given according to the comparison result, wherein the first identification information of the candidate prediction motion information with the smaller distortion value is The length of the binary string is less than or equal to the length of the binary string of the first identification information of the candidate prediction motion information having the larger distortion value.
  • the comparing a size between the N distortion values includes: sequentially arranging the N according to the distortion value from small to large or from large to small Candidate prediction motion information.
  • the determining the N candidate prediction motion information includes: acquiring, in a preset order, N different preset positions with the to-be-processed image block.
  • the motion information of the image block is used as the N candidate prediction motion information.
  • the determining the N candidate prediction motion information includes: acquiring, in a preset sequence, the M different preset positions with the to-be-processed image block. Motion information of the image block as M candidate prediction motion information, wherein the M candidate prediction motion information includes the N candidate prediction motion information, M is an integer greater than N; and the M candidate prediction motion information is determined a grouping manner; determining, according to the target identification information and the grouping manner, the N candidate prediction motion information from the M candidate prediction motion information.
  • the determining a manner of grouping the M candidate prediction motion information includes: determining a preset manner of the grouping; or analyzing and obtaining the method from the code stream. The grouping method.
  • the determining the N candidate prediction motion information includes: parsing coding information of the multiple candidate prediction motion information in the code stream, to obtain the N And predicting the motion information; or parsing the second identifier information in the code stream to obtain the N candidate image blocks indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate prediction motion information; or parsing third identification information in the code stream to obtain the N candidate prediction motion information having a preset correspondence relationship with the third identification information.
  • the method before the obtaining the distortion value corresponding to each of the N candidate prediction motion information, the method further includes: determining adjacent reconstruction of the to-be-processed image block Image blocks are available.
  • the determining the image to be processed The adjacent reconstructed image blocks of the block are usable, comprising: determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
  • the method further includes: determining to perform the acquiring the distortion value corresponding to each of the N candidate prediction motion information.
  • the determining, by performing the acquiring the distortion value corresponding to each of the N candidate prediction motion information includes determining, according to the grouping manner, performing the acquiring the N Each of the candidate prediction motion information corresponding to the distortion value; or, the fourth identification information in the code stream is parsed to determine to perform the acquiring the distortion value corresponding to each of the N candidate prediction motion information.
  • a third aspect of the embodiments of the present disclosure provides an apparatus for encoding image block prediction motion information, including: an acquiring module, configured to acquire N candidate prediction motion information of an image block to be processed, where N is an integer greater than one; a calculation module, configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image block a neighboring reconstructed image block determining; a comparing module, configured to determine first identification information of each of the N candidate predicted motion information according to a size relationship between the acquired N distortion values, the N candidates The prediction motion information and the respective first identification information are in one-to-one correspondence; the encoding module is configured to: when the target predicted motion information of the to-be-processed image block is one of the N candidate predicted motion information of the determined first identifier information At the time, the first identification information of the target predicted motion information is encoded into the code stream.
  • the encoding apparatus further includes a detecting module, configured to determine that the adjacent reconstructed image block of the to-be-processed image block exists.
  • the encoding apparatus further includes a determining module, configured to determine to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
  • a fourth aspect of the embodiments of the present application provides a decoding apparatus for predicting motion information of an image block, including: a parsing module, configured to parse target identification information of target predicted motion information of an image block to be processed from a code stream; And for determining the N candidate prediction motion information, where the N candidate prediction motion information includes the target prediction motion information, where N is an integer greater than 1; and a calculation module, configured to acquire the N candidate prediction motion information Corresponding distortion values, which are determined by adjacent reconstructed image blocks of the reference image block indicated by the candidate predicted motion information and adjacent reconstructed image blocks of the image block to be processed; a comparison module, Determining, according to the magnitude relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, where the N candidate prediction motion information and the respective first identification information are in one-to-one correspondence; a selection module, configured to determine candidate predicted motion information corresponding to the first identifier information that matches the target identifier information as the target predicted motion information
  • the decoding apparatus further includes a detecting module, configured to determine that the adjacent reconstructed image block of the to-be-processed image block exists.
  • the decoding apparatus further includes a determining module, configured to determine to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
  • a fifth aspect of the embodiments of the present application provides a processing device for predicting motion information of an image block, comprising: a memory for storing a program, the program includes a code, a transceiver for communicating with other devices, and a processor, Used to execute program code in memory.
  • the processor may implement the method of the first aspect or the operations of the method of the second aspect; the transceiver is configured to execute a specific signal driven by the processor Send and receive.
  • a sixth aspect of the embodiments of the present application provides a computer storage medium for storing computer software instructions for use in the above encoding device, decoding device, or processing device, including a method for performing the above first or second aspect The program designed.
  • a seventh aspect of an embodiment 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 or the second aspect described above.
  • 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 a schematic block diagram of an inter prediction module in an embodiment of the present application.
  • FIG. 5 is an exemplary flowchart of a merge prediction mode in an embodiment of the present application.
  • FIG. 6 is an exemplary flowchart of an advanced motion vector prediction mode in an embodiment of the present application.
  • FIG. 7 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an encoding unit and an adjacent position image block associated therewith according to an embodiment of the present application.
  • FIG. 9 is an exemplary flowchart of constructing a candidate prediction motion vector 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 prediction motion vector list in an embodiment of the present application
  • FIG. 11 is an exemplary schematic diagram of adding a scaled candidate motion vector to a merge mode candidate motion vector list in the embodiment of the present application;
  • FIG. 12 is an exemplary schematic diagram of adding a zero motion vector to a merge mode candidate motion vector list in the embodiment of the present application
  • FIG. 13 is a schematic flowchart of an encoding method according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a relationship between an adjacent reconstructed image block and an original adjacent reconstructed image block in the embodiment of the present application;
  • FIG. 15 is a schematic diagram of a sub-block level motion information processing manner according to an embodiment of the present application.
  • FIG. 16 is a schematic flowchart of a decoding method according to an embodiment of the present application.
  • FIG. 17 is a schematic block diagram of an encoding apparatus according to an embodiment of the present application.
  • FIG. 18 is a schematic block diagram of a decoding apparatus according to an embodiment of the present application.
  • FIG. 19 is a schematic block diagram of an apparatus 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 variety 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 can be used for wireless communication.
  • Transport channel 16 may include any type of media or device capable of moving encoded video data from source device 12 to destination device 14.
  • transport channel 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 may be modulated according to a communication standard (e.g., a wireless communication protocol) and transmitted to destination device 14.
  • 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 can be output from the output interface to the storage device.
  • encoded data can be accessed from a storage device by an input interface.
  • the storage device can include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray Disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or Any other suitable digital storage medium for storing encoded video data.
  • the storage device 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 the storage device 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 a storage device can 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 a video source 18, a video encoder 20, and an output interface.
  • the output interface can include a modem (Modem) 22 and/or a transmitter 24.
  • 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 of the source device 12.
  • the encoded video data may also (or alternatively) be stored on a storage device for later access by the destination device 14 or other device for decoding and/or playback.
  • Destination device 14 includes an input interface, video decoder 30, and display device 32.
  • the input interface can include a receiver 26 and/or a modem 28.
  • the input interface 28 of the destination device 14 receives the encoded video data via the transmission channel 16.
  • the encoded video data communicated or provided on the storage device via the transmission channel 16 may include various syntax elements generated by the video encoder 20 for use by the video decoder of the video decoder 30 to decode the video data. These syntax elements can be included with encoded video data that is 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 device 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 syntax elements 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
  • the encoding occurs when the syntax elements are stored to the media, and the syntax elements 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.
  • the motion information includes motion vectors and reference frame information, while in other embodiments, where the reference frame information is determined, the motion vectors are the primary subject of interest in the motion information.
  • the reference frame information is determined and implicitly determined (for example, the method of the embodiment of the present application is used in intra prediction, or only one frame is used.
  • the reference frame or the like may be used or the information determined by the embodiment of the present application (such as using the same processing method as the motion vector) or other embodiments may be used, and does not mean that the reference frame information can be ignored.
  • HM can divide a video frame or image into a tree block or a sequence of largest coding units (LCUs) containing both luminance and chrominance samples, which is also referred to as a CTU.
  • 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 quaternary tree" (RQT).
  • RQT residual quaternary tree
  • 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 residual values corresponding to the PU.
  • the residual values include 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 typically operates on video blocks within individual video stripes to encode video data.
  • a video block may correspond to a decoding node within a CU.
  • Video blocks may have fixed or varying sizes and may 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%.
  • the portion of the CU corresponding to the 25% segment is indicated by an indication of "n” followed by “up (U)”, “lower (D)", “left (L)", or “right (R)".
  • "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 NxN block typically 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 (also referred to as residual) of the TU of the CU.
  • a PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may be included in transforming (eg, discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform)
  • DCT discrete cosine transform
  • the residual video data is applied to form coefficients in the transform domain.
  • the residual data may correspond to a pixel difference between the pixels of the uncoded image and the predicted value of 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 (PIPE) decoding, or other entropy decoding methods to entropy decode a one-dimensional vector.
  • Video encoder 20 may also entropy encode syntax elements associated with the encoded video data for use by video decoder 30 to decode the video data.
  • video encoder 20 may assign 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 image block of the PU.
  • the reference image block of the PU may be part of a reference image of an image block similar to a PU.
  • the reference image 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 vector (Motion Vector, MV) for each of the PUs according to the merge prediction mode or the advanced motion vector prediction mode process. List.
  • MV Motion Vector
  • Each candidate predicted motion vector in the candidate predicted motion vector list for the PU may indicate motion information.
  • the motion information indicated by some candidate predicted motion vectors in the candidate predicted motion vector list may be based on motion information of other PUs. If the candidate prediction motion vector indicates motion information specifying one of a spatial candidate prediction motion vector position or a temporal candidate prediction motion vector position, the present application may refer to the candidate prediction motion vector as a “original” candidate prediction motion vector.
  • a merge mode also referred to herein as a merge prediction mode
  • the video encoder may generate additional candidate predicted motion vectors by combining partial motion vectors from different original candidate prediction motion vectors, modifying original candidate prediction motion vectors, or simply inserting zero motion vectors as candidate prediction motion vectors.
  • These additional candidate prediction motion vectors are not considered to be original candidate prediction motion vectors and may be referred to as artificially generated candidate prediction motion vectors in this application.
  • the techniques of the present application generally relate to techniques for generating a list of candidate predictive motion vectors at a video encoder and techniques for generating a list of identical candidate motion vectors at a video decoder.
  • the video encoder and video decoder may generate the same candidate prediction motion vector list by implementing the same techniques used to construct the candidate prediction motion vector list. For example, both a video encoder and a video decoder may construct a list with the same number of candidate predicted motion vectors (eg, five candidate predicted motion vectors).
  • the video encoder and decoder may first consider spatial candidate prediction motion vectors (eg, neighboring blocks in the same image), then consider temporal candidate prediction motion vectors (eg, candidate prediction motion vectors in different images), and may ultimately consider The artificially generated candidate predicted motion vector until the desired number of candidate predicted motion vectors are added to the list.
  • a pruning operation may be utilized for certain types of candidate prediction motion vectors to remove repetitions from candidate prediction motion vector lists during candidate prediction motion vector list construction, while for other types of candidate prediction motion vectors, may not Use clipping to reduce decoder complexity.
  • a pruning operation may be performed to exclude candidate prediction motion vectors having repeated motion information from a list of candidate prediction motion vectors.
  • the artificially generated candidate predicted motion vector may be added without performing a trimming operation on the artificially generated candidate predicted motion vector.
  • the video encoder may select a candidate prediction motion vector from the candidate prediction motion vector list and output a candidate prediction motion vector index in the code stream.
  • the selected candidate predicted motion vector may be a candidate predicted motion vector having a motion vector that produces a predictor that most closely matches the target PU being decoded.
  • the candidate predicted motion vector index may indicate the location of the candidate predicted motion vector selected in the candidate predicted motion vector list.
  • the video encoder may also generate a predictive image block for the PU based on the reference image block indicated by the motion information of the PU. The motion information of the PU may be determined based on the motion information indicated by the selected candidate predicted motion vector.
  • the motion information of the PU may be the same as the motion information indicated by the selected candidate prediction motion vector.
  • the motion information of the PU may be determined based on the motion vector difference of the PU and the motion information indicated by the selected candidate predicted motion vector.
  • the video encoder may generate one or more residual image blocks for the CU based on the predictive image block of the PU of the CU and the original image block for the CU. The video encoder may then encode one or more residual image blocks and output one or more residual image blocks in the code stream.
  • the code stream may include data identifying a selected candidate predicted motion vector in the candidate motion vector vector list of the PU.
  • the video decoder may determine motion information for the PU based on motion information indicated by the selected candidate predicted motion vector in the candidate motion vector list of the PU.
  • the video decoder may identify one or more reference image blocks for the PU based on the motion information of the PU. After identifying one or more reference image blocks of the PU, the video decoder may generate a predictive image block for the PU based on one or more reference image blocks of the PU.
  • the video decoder may reconstruct an image block for the CU based on the predictive image block for the PU of the CU and one or more residual image 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 predictive image blocks and motion information for the PU of the CU.
  • the motion information for a given PU may be the same or similar to the motion information of one or more nearby PUs (ie, PUs whose image blocks are spatially or temporally near the image block of a given PU). Because nearby PUs often have similar motion information, video encoder 20 may encode motion information for a given PU with reference to motion information for nearby PUs. Encoding motion information for a given PU with reference to motion information of nearby PUs may reduce the number of coded bits in the codestream that are required to indicate motion information for a given PU.
  • Video encoder 20 may encode motion information for a given PU with reference to motion information of nearby PUs in various manners. For example, video encoder 20 may indicate that the motion information for a given PU is the same as the motion information for a nearby PU. The present application may use a merge mode to refer to motion information indicating that a given PU is the same as motion information of a nearby PU or may be derived from motion information of nearby PUs. In another possible implementation, video encoder 20 may calculate a Motion Vector Difference (MVD) for a given PU. The MVD indicates the difference between the motion vector of a given PU and the motion vector of a nearby PU.
  • MVD Motion Vector Difference
  • Video encoder 20 may include the MVD instead of the motion vector of a given PU in the motion information for a given PU.
  • the representation of the MVD in the code stream is less than the coded bits required to represent the motion vector of a given PU.
  • the present application may use advanced motion vector prediction mode to refer to signaling the motion information of a given PU by using the MVD and identifying the index value of the candidate motion vector.
  • video encoder 20 may generate a candidate predicted motion vector list for a given PU.
  • the candidate predicted motion vector list may include one or more candidate predicted motion vectors.
  • Each of the candidate predicted motion vectors in the candidate predicted motion vector list for a given PU may specify motion information.
  • the motion information indicated by each candidate prediction motion vector may include a motion vector, a reference image index, and a prediction direction indicator.
  • the candidate predicted motion vectors in the candidate predicted motion vector list may include "raw" candidate predicted motion vectors, each of which indicates motion information that is different from one of the specified candidate predicted motion vector locations within the PU of the given PU.
  • video encoder 20 may select one of the candidate prediction motion vectors from the candidate prediction motion vector list for the PU. For example, the video encoder may compare each candidate predicted motion vector to the PU being decoded and may select a candidate predicted motion vector having the desired rate-distortion penalty. Video encoder 20 may output a candidate predicted motion vector index for the PU. The candidate predicted motion vector index may identify the location of the selected candidate predicted motion vector in the candidate predicted motion vector list.
  • video encoder 20 may generate a predictive image block for the PU based on the reference image block indicated by the motion information of the PU.
  • the motion information of the PU may be determined based on motion information indicated by the selected candidate predicted motion vector in the candidate predicted motion vector list for the PU. For example, in the merge mode, the motion information of the PU may be the same as the motion information indicated by the selected candidate prediction motion vector. In the AMVP mode, motion information of the PU may be determined based on a motion vector difference for the PU and motion information indicated by the selected candidate predicted motion vector.
  • Video encoder 20 may process the predictive image blocks for the PU as previously described.
  • video decoder 30 may generate a candidate predicted motion vector list for each of the PUs of the CU.
  • the candidate predicted motion vector list generated by the video decoder 30 for the PU may be the same as the candidate predicted motion vector list generated by the video encoder 20 for the PU.
  • the syntax element parsed from the code stream may indicate the location of the candidate prediction motion vector selected in the candidate prediction motion vector list for the PU.
  • video decoder 30 may generate a predictive image block for the PU based on one or more reference image blocks indicated by the motion information of the PU.
  • Video decoder 30 may determine motion information for the PU based on motion information indicated by the selected candidate predicted motion vector in the candidate predicted motion vector list for the PU. Video decoder 30 may reconstruct an image block for the CU based on the predictive image block for the PU and the residual image block for the CU.
  • the construction of the candidate prediction motion vector list and the resolution of the selected candidate prediction motion vector in the candidate motion vector list from the code stream are independent of each other, and may be arbitrary. Conducted sequentially or in parallel.
  • the position of the selected candidate prediction motion vector in the candidate prediction motion vector list is parsed from the code stream, and the candidate prediction motion vector list is constructed according to the parsed position, where
  • the candidate prediction motion vector at the position can be determined.
  • the code stream is parsed to obtain the candidate candidate motion vector as the candidate motion vector with index 3 in the candidate motion vector list
  • only the candidate motion vector with index 0 to index 3 needs to be constructed.
  • the list can determine the candidate prediction motion vector with the index of 3, which can achieve the technical effect of reducing the complexity and improving the decoding efficiency.
  • 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 a motion estimation unit 42, a motion compensation unit 44, and an intra prediction module 46.
  • video encoder 20 also includes inverse quantization unit 58, inverse transform unit 60, and summer 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.
  • 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 residual block data and provide the resulting intra-coded or inter-coded block to summer 62 to reconstruct the The coded block is thus used as a reference image.
  • rate-distortion cost, RDcost rate-distortion cost
  • Motion estimation unit 42 and motion compensation unit 44 within prediction unit 41 perform inter-predictive decoding of the current video block relative to one or more predictive blocks in one or more reference pictures to provide temporal compression.
  • Motion estimation unit 42 may be configured 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 performed by motion estimation unit 42 is estimated to be a process of generating a motion vector of the estimated 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 predictive block within the reference image.
  • the predictive 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 an absolute difference sum, a square difference sum, 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 predictive 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 predictive blocks based on motion vectors determined by motion estimation, possibly performing interpolation to sub-pixel precision. After receiving the motion vector of the PU of the current video block, motion compensation unit 44 may locate the predictive block pointed to by the motion vector in one of the reference image lists. Video encoder 20 forms a residual video block by subtracting the pixel values of the predictive block from the pixel values of the current video block being decoded, thereby forming pixel difference values. 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 image 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 image containing the reference image block in list 0 or list 1 and a motion vector indicating a spatial displacement between the PU and the reference image 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 image block indicated by the motion information of the PU.
  • the motion estimation unit 42 may search for a reference image block for the PU in the reference image in the list 0 and may also search for the PU for the PU in the reference image in the list 1 A reference image block. Motion estimation unit 42 may then generate a reference index indicating the reference image containing the reference image block in list 0 and list 1 and a motion vector indicating the spatial displacement between the reference image 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 image 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 candidate predicted motion vectors and motion vector differences 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 predicted motion vector associated with the neighboring PU.
  • Video decoder 30 may use the indicated candidate predicted motion vector and MVD to determine the motion vector of the PU.
  • prediction module 41 may generate a list of candidate predicted motion vectors for each PU of the CU.
  • One or more of the candidate predicted motion vector lists may include one or more original candidate predicted motion vectors and one or more additional candidate predicted motion vectors derived from the original candidate predicted motion vectors.
  • 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 predictive 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, context adaptive binary arithmetic decoding, syntax based context adaptive binary arithmetic decoding, probability interval partition entropy decoding, or another entropy encoding 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.
  • 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 image block of the reference image.
  • Motion compensation unit 44 may calculate the reference image block by adding the residual block to the predictive block of one of the reference images within one of the reference image 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 image block for storage in reference image memory 64.
  • the reference image block may be used by the motion estimation unit 42 and the motion compensation unit 44 as a reference image block to inter-predict subsequent video frames or blocks in the image.
  • 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 prediction unit 81 includes a motion compensation unit 82 and an intra prediction unit 84.
  • 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 generate the current 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 video stripe.
  • motion compensation unit 82 of prediction unit 81 When the video image is decoded into an inter-decoded slice, motion compensation unit 82 of prediction unit 81 generates a predictive block of the video block of the current video image based on the motion vector and other syntax elements received from entropy encoding unit 80.
  • the predictive 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 predictive 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, inter prediction strip type, stripe Construction information of one or more of the reference picture 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 used to decode the current video Additional information for the video block in the stripe.
  • a prediction mode eg, intra prediction or inter prediction
  • Motion compensation unit 82 may also perform interpolation based on the interpolation filter. Motion compensation unit 82 may calculate the interpolated values of the sub-integer pixels of the reference image block using an interpolation filter as used by video encoder 20 during encoding of the video 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 predictive blocks.
  • motion compensation unit 82 may generate a candidate predicted motion vector list for the PU. Data identifying the location of the selected candidate predicted motion vector in the candidate motion vector list of the PU may be included in the code stream. After generating the candidate prediction motion vector list for the PU, motion compensation unit 82 may generate a predictive image block for the PU based on one or more reference image blocks indicated by the motion information of the PU. The reference image 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 motion vector list of the PU.
  • 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 predictive block generated by motion compensation unit 82. To form a decoded video block.
  • Summer 90 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 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, the video decoder comprising video encoder 20 and video decoder 30 as shown and described with respect to Figures 1-3. 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.
  • FIG. 4 is a schematic block diagram of an inter prediction module in an embodiment of the present application.
  • Inter prediction module 121 may include motion estimation unit 42 and motion compensation unit 44. In different video compression codec standards, the relationship between PU and CU is different.
  • the inter prediction module 121 may divide the current CU into PUs according to multiple partition modes. For example, the inter prediction module 121 may divide the current CU into PUs according to 2N ⁇ 2N, 2N ⁇ N, N ⁇ 2N, and N ⁇ N partition modes. In other embodiments, the current CU is the current PU, which is not limited.
  • the inter prediction module 121 may perform an Integer Motion Estimation (IME) on each of the PUs and then perform a Fraction Motion Estimation (FME).
  • IME Integer Motion Estimation
  • FME Fraction Motion Estimation
  • the inter prediction module 121 may search for a reference image block for the PU in one or more reference images. After finding the reference image block for the PU, the inter prediction module 121 can generate a motion vector that indicates the spatial displacement between the PU and the reference image block for the PU with integer precision.
  • the inter prediction module 121 may improve the motion vector generated by performing the IME on the PU.
  • a motion vector generated by performing FME on a PU may have sub-integer precision (eg, 1/2 pixel precision, 1/4 pixel precision, etc.).
  • the inter prediction module 121 can use the motion vector for the PU to generate a predictive image block for the PU.
  • the inter prediction module 121 may generate a candidate prediction motion vector list for the PU.
  • the candidate predicted motion vector list may include one or more original candidate predicted motion vectors and one or more additional candidate predicted motion vectors derived from the original candidate predicted motion vectors.
  • the inter prediction module 121 may select the candidate prediction motion vector from the candidate prediction motion vector list and generate a motion vector difference for the PU.
  • the MVD for the PU may indicate the difference between the motion vector indicated by the selected candidate prediction motion vector and the motion vector generated for the PU using the IME and FME.
  • inter prediction module 121 may output a candidate predicted motion vector index that identifies the location of the selected candidate predicted motion vector in the candidate predicted motion vector list.
  • the inter prediction module 121 can also output the MVD of the PU.
  • a possible implementation of the Advanced Motion Vector Prediction (AMVP) mode in the embodiment of the present application is described in detail below.
  • AMVP Advanced Motion Vector Prediction
  • the inter prediction module 121 may also perform a Merge operation on each of the PUs.
  • the inter prediction module 121 may generate a candidate predicted motion vector list for the PU.
  • the candidate prediction motion vector list for the PU may include one or more original candidate prediction motion vectors and one or more additional candidate prediction motion vectors derived from the original candidate prediction motion vectors.
  • the original candidate prediction motion vector in the candidate prediction motion vector list may include one or more spatial candidate prediction motion vectors and temporal candidate prediction motion vectors.
  • the spatial candidate prediction motion vector may indicate motion information of other PUs in the current image.
  • the temporal candidate prediction motion vector may be based on motion information of a corresponding PU that is different from the current image.
  • the temporal candidate prediction motion vector may also be referred to as temporal motion vector prediction (TMVP).
  • the inter prediction module 121 may select one of the candidate predicted motion vectors from the candidate predicted motion vector list. Inter prediction module 121 may then generate a predictive image block for the PU based on the reference image block indicated by the motion information of the PU. In the merge mode, the motion information of the PU may be the same as the motion information indicated by the selected candidate prediction motion vector.
  • Figure 5, described below, illustrates an exemplary flow chart of Merge.
  • the inter prediction module 121 may select a predictive image block generated by the FME operation or generate a merge operation Predictive image block. In some possible implementations, the inter prediction module 121 may select a predictive image for the PU based on a predictive image block generated by the FME operation and a rate-distortion cost analysis of the predictive image block generated by the combining operation. Piece.
  • the inter prediction module 121 can select the partition mode for the current CU. In some implementations, inter prediction module 121 can select for a current CU based on a rate-distortion cost analysis of a selected predictive image block of the PU generated by segmenting the current CU according to each of the partition modes. Split mode.
  • the inter prediction module 121 may output the predictive image blocks associated with the PUs belonging to the selected partition mode to the residual generation module 102.
  • the inter prediction module 121 may output syntax elements indicating motion information of the PUs belonging to the selected partition mode to the entropy encoding module 116.
  • the inter prediction module 121 includes IME modules 180A through 180N (collectively referred to as “IME module 180"), FME modules 182A through 182N (collectively referred to as “FME module 182”), and merge modules 184A through 184N (collectively The “Merge Module 184"), the PU Mode Decision Modules 186A through 186N (collectively referred to as “PU Mode Decision Module 186”) and the CU Mode Decision Module 188 (which may also include a mode decision process that performs a CTU to CU).
  • IME module 180 IME modules 180A through 180N
  • FME module 182 FME modules 182A through 182N
  • merge modules 184A through 184N collectively The "Merge Module 184"
  • the PU Mode Decision Modules 186A through 186N collectively referred to as "PU Mode Decision Module 186”
  • the CU Mode Decision Module 188 which may also include a mode decision process that performs a CTU to CU).
  • IME module 180, FME module 182, and merge module 184 can perform IME operations, FME operations, and merge operations on PUs of the current CU.
  • the inter prediction module 121 is illustrated in the diagram of FIG. 4 as a separate IME module 180, FME module 182, and merge module 184 for each PU for each partition mode of the CU. In other possible implementations, inter prediction module 121 does not include separate IME module 180, FME module 182, and merge module 184 for each PU of each partition mode of the CU.
  • the IME module 180A, the FME module 182A, and the merging module 184A may perform an IME operation, an FME operation, and a merge operation on a PU generated by dividing a CU according to a 2N ⁇ 2N partition mode.
  • PU mode decision module 186A may select one of the predictive image blocks generated by IME module 180A, FME module 182A, and merge module 184A.
  • the IME module 180B, the FME module 182B, and the merging module 184B may perform an IME operation, an FME operation, and a merge operation on a left PU generated by dividing a CU according to an N ⁇ 2N partition mode.
  • PU mode decision module 186B may select one of the predictive image blocks generated by IME module 180B, FME module 182B, and merge module 184B.
  • the IME module 180C, the FME module 182C, and the merging module 184C may perform an IME operation, an FME operation, and a merge operation on a right PU generated by dividing a CU according to an N ⁇ 2N partition mode.
  • the PU mode decision module 186C may select one of the predictive image blocks generated by the IME module 180C, the FME module 182C, and the merge module 184C.
  • the IME module 180N, the FME module 182N, and the merging module 184 may perform an IME operation, an FME operation, and a merge operation on the lower right PU generated by dividing the CU according to the N ⁇ N partition mode.
  • the PU mode decision module 186N may select one of the predictive image blocks generated by the IME module 180N, the FME module 182N, and the merge module 184N.
  • the PU mode decision module 186 can select a predictive image block based on a rate-distortion cost analysis of the plurality of possible predictive image blocks and select a predictive image block that provides an optimal rate-distortion penalty for a given decoding situation. Illustratively, for bandwidth limited applications, PU mode decision module 186 may prefer to select predictive image blocks that increase compression ratio, while for other applications, PU mode decision module 186 may prefer to select predictive images that increase reconstructed video quality. Piece. After the PU mode decision module 186 selects the predictive image block for the PU of the current CU, the CU mode decision module 188 selects the segmentation mode for the current CU and outputs the predictive image block and motion information for the PUs belonging to the selected segmentation mode. .
  • FIG. 5 is an exemplary flowchart of a merge mode in the embodiment of the present application.
  • a video encoder e.g., video encoder 20
  • the video encoder may perform a merge operation 200.
  • 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 predicted motion vector list for the current PU (202).
  • the video encoder can generate a list of candidate predicted motion vectors for the current PU in various ways.
  • the video encoder may generate a candidate predicted motion vector list for the current PU according to one of the example techniques described below with respect to Figures 8-12.
  • the candidate predicted motion vector list for the current PU may include a temporal candidate predicted motion vector.
  • the temporal candidate prediction motion vector 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 a position in a reference image list of the reference image.
  • 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 video encoder can use a zero reference image index.
  • 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 picture index) of PUs belonging to the current CU to generate temporal candidate prediction motion vectors for the current PU. In other words, these video encoders can generate temporal candidate prediction motion vectors using motion information of PUs belonging to the current CU. Accordingly, the video encoder may not be able to generate a candidate predicted motion vector list for the current PU and the PU that covers the reference index source location associated with the current PU in parallel.
  • motion information ie, reference picture index
  • 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 prediction motion vector 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).
  • a fixed predefined preset reference image index eg, 0
  • the video encoder may generate the temporal candidate prediction motion vector 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 prediction motion vector in the candidate prediction of the current CU Motion vector list.
  • 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 may signal the decoder for an associated reference picture index for each LCU (ie, CTU), CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the 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 the candidate predicted motion vector list 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. Each time candidate predicts a motion vector, 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 predicted motion vector in the candidate predicted motion vector list.
  • the video encoder may generate motion prediction information for the current PU by determining motion information of the current PU based on the motion information of the indicated candidate motion vector and then generate a predictive image block based on the one or more reference image blocks indicated by the motion information of the current PU.
  • Vector associated predictive image blocks The video encoder may then select one of the candidate predicted motion vectors from the candidate predicted motion vector list (206).
  • the video encoder can select candidate prediction motion vectors in a variety of ways. For example, the video encoder may select one of the candidate predicted motion vectors based on a rate-distortion cost analysis of each of the predictive image blocks associated with the candidate predicted motion vectors.
  • the video encoder may output a candidate predicted motion vector index (208).
  • the candidate predicted motion vector index may indicate the location of the candidate predicted motion vector selected in the candidate predicted motion vector list.
  • the candidate predicted motion vector index may be denoted as "merge_idx.”
  • FIG. 6 is an exemplary flowchart of an advanced motion vector prediction mode in an embodiment of the present application.
  • a video encoder e.g., video encoder 20
  • the video encoder may generate one or more motion vectors (211) for the current PU.
  • the video encoder may perform integer motion estimation and fractional motion estimation to generate motion vectors for the current PU.
  • the current image can be associated with two reference image lists (List 0 and List 1).
  • the video encoder may generate a list 0 motion vector or a list 1 motion vector for the current PU.
  • the list 0 motion vector may indicate a spatial displacement between an image block of the current PU and a reference image block in the reference image in list 0.
  • the List 1 motion vector may indicate a spatial displacement between an image block of the current PU and a reference image block in the reference image in List 1.
  • the video encoder may generate a list 0 motion vector and a list 1 motion vector for the current PU.
  • the video encoder may generate a predictive image block for the current PU (212).
  • the video encoder may generate a predictive image block for the current PU based on one or more reference image blocks indicated by one or more motion vectors for the current PU.
  • the video encoder may generate a list of candidate predicted motion vectors for the current PU (213).
  • the video decoder can generate a list of candidate predicted motion vectors for the current PU in various ways.
  • the video encoder may generate a candidate predicted motion vector list for the current PU in accordance with one or more of the possible implementations described below with respect to Figures 8-12.
  • the candidate prediction motion vector list may be limited to two candidate prediction motion vectors.
  • the candidate prediction motion vector list may include more candidate prediction motion vectors (eg, five candidate prediction motion vectors).
  • the video encoder may generate one or more motion vector differences for each candidate predicted motion vector in the candidate predicted motion vector list (214).
  • the video encoder may generate a motion vector difference for the candidate predicted motion vector by determining a difference between the motion vector indicated by the candidate predicted motion vector and the corresponding motion vector of the current PU.
  • the video encoder may generate a single MVD for each candidate predicted motion vector. If the current PU is bi-predicted, the video encoder may generate two MVDs for each candidate predicted motion vector.
  • the first MVD may indicate a difference between a motion vector of the candidate predicted motion vector and a list 0 motion vector of the current PU.
  • the second MVD may indicate a difference between a motion vector of the candidate prediction motion vector and a list 1 motion vector of the current PU.
  • the video encoder may select one or more of the candidate predicted motion vectors from the candidate predicted motion vector list (215).
  • the video encoder can select one or more candidate predicted motion vectors in various ways. For example, the video encoder may select a candidate predicted motion vector of the associated motion vector that matches the motion vector to be encoded with minimal error, which may reduce the number of bits needed to represent the motion vector difference for the candidate predicted motion vector.
  • the video encoder may output one or more reference image indices for the current PU, one or more candidate predicted motion vector indices, and for one or more selected candidates One or more motion vector differences of the motion vectors are predicted (216).
  • the video encoder may output a reference picture index ("ref_idx_10") for list 0 or for The reference image index of List 1 ("ref_idx_11").
  • the video encoder may also output a candidate predicted motion vector index (“mvp_10_flag") indicating the location of the selected candidate predicted motion vector for the list 0 motion vector of the current PU in the candidate predicted motion vector list.
  • the video encoder may output a candidate predicted motion vector index (“mvp_11_flag”) indicating the location of the selected candidate predicted motion vector for the list 1 motion vector of the current PU in the candidate predicted motion vector list.
  • the video encoder may also output an MVD for the list 0 motion vector or list 1 motion vector of the current PU.
  • the video encoder may output a reference picture index ("ref_idx_10") for list 0 and for the list Reference image index of 1 ("ref_idx_11").
  • the video encoder may also output a candidate predicted motion vector index (“mvp_10_flag") indicating the location of the selected candidate predicted motion vector for the list 0 motion vector of the current PU in the candidate predicted motion vector list.
  • the video encoder may output a candidate predicted motion vector index (“mvp_11_flag”) indicating the location of the selected candidate predicted motion vector for the list 1 motion vector of the current PU in the candidate predicted motion vector list.
  • the video encoder may also output an MVD for the list 0 motion vector of the current PU and an MVD for the list 1 motion vector of the current PU.
  • FIG. 7 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 of the selected candidate predicted motion vector for the current PU (222). For example, the video decoder may receive a candidate predicted motion vector index indicating a location of the selected candidate predicted motion vector within the candidate PU motion vector list for the current PU.
  • the video decoder may receive the first candidate predicted motion vector index and the second candidate predicted motion vector index.
  • the first candidate predicted motion vector index indicates the location of the selected candidate predicted motion vector for the list 0 motion vector of the current PU in the candidate predicted motion vector list.
  • the second candidate prediction motion vector index indicates the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list.
  • a single syntax element can be used to identify two candidate predicted motion vector indices.
  • the video decoder may generate a list of candidate predicted motion vectors for the current PU (224).
  • the video decoder can generate this candidate predicted motion vector list for the current PU in various ways.
  • the video decoder may generate a candidate predicted motion vector list for the current PU using the techniques described below with reference to Figures 8-12.
  • the video decoder may explicitly or implicitly set a reference image index identifying the reference image including the co-located PU, as previously described Figure 5 depicts.
  • the video decoder may determine the current PU based on the motion information indicated by one or more selected candidate predicted motion vectors in the candidate PU vector list for the current PU.
  • Motion information (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 motion vector. If the motion information of the current PU is encoded using the AMVP mode, the video decoder may use one or more motion vectors indicated by the or the selected candidate prediction motion vector and one or more MVDs indicated in the code stream To reconstruct one or more motion vectors of the current PU.
  • the reference image index and the prediction direction indicator of the current PU may be the same as the reference image index and the prediction direction indicator of the one or more selected candidate prediction motion vectors.
  • the video decoder may generate a predictive image block for the current PU based on the one or more reference image blocks indicated by the motion information for the current PU (226).
  • FIG. 8 is an exemplary schematic diagram of a coding unit and associated location image blocks associated therewith, illustrating a schematic diagram of CU 250 and illustrative candidate prediction motion vector locations 252A through 252E associated with CU 250.
  • the present application may collectively refer to candidate predicted motion vector locations 252A through 252E as candidate predicted motion vector locations 252.
  • the candidate predicted motion vector position 252 represents a spatial candidate predicted motion vector in the same image as the CU 250.
  • the candidate predicted motion vector location 252A is located to the left of CU250.
  • the candidate predicted motion vector location 252B is located above the CU 250.
  • the candidate predicted motion vector position 252C is located at the upper right of the CU 250.
  • the candidate predicted motion vector position 252D is located at the lower left of the CU 250.
  • the candidate predicted motion vector position 252E is located at the upper left of the CU 250. 8 is an illustrative implementation to provide a way in which the inter prediction module 121 and the motion compensation module 162 can generate a list of candidate predicted motion vectors. Embodiments will be explained below with reference to inter prediction module 121, but it should be understood that motion compensation module 162 can implement the same techniques and thus generate the same candidate prediction motion vector list.
  • FIG. 9 is an exemplary flowchart of constructing a candidate prediction motion vector list in the embodiment of the present application.
  • the technique of FIG. 9 will be described with reference to a list including five candidate predicted motion vectors, but the techniques described herein may also be used with lists of other sizes.
  • the five candidate predicted motion vectors may each have an index (eg, 0 to 4).
  • the technique of FIG. 9 will be described with reference to a general video decoder.
  • a typical video decoder may illustratively be a video encoder (e.g., video encoder 20) or a video decoder (e.g., video decoder 30).
  • the video decoder first considers four spatial candidate predicted motion vectors (902).
  • the four spatial candidate prediction motion vectors may include candidate prediction motion vector positions 252A, 252B, 252C, and 252D.
  • the four spatial candidate prediction motion vectors correspond to motion information of four PUs in the same image as the current CU (eg, CU 250).
  • the video decoder may consider four spatial candidate prediction motion vectors in the list in a particular order. For example, the candidate predicted motion vector location 252A can be considered first. If the candidate predicted motion vector location 252A is available, the candidate predicted motion vector location 252A may be assigned to index 0.
  • the video decoder may not include the candidate predicted motion vector location 252A in the candidate predicted motion vector list.
  • Candidate predicted motion vector locations may not be available for a variety of reasons. For example, if the candidate predicted motion vector location is not within the current image, the candidate predicted motion vector location may not be available. In another possible implementation, if the candidate predicted motion vector location is intra predicted, the candidate predicted motion vector location may not be available. In another possible implementation, if the candidate predicted motion vector location is in a different strip than the current CU, the candidate predicted motion vector location may not be available.
  • the video decoder may next consider the candidate predicted motion vector location 252B. If the candidate predicted motion vector location 252B is available and different than the candidate predicted motion vector location 252A, the video decoder may add the candidate predicted motion vector location 252B to the candidate predicted motion vector list.
  • the terms "identical” and “different” refer to motion information associated with candidate predicted motion vector locations. Therefore, two candidate predicted motion vector positions are considered identical if they have the same motion information, and are considered different if they have different motion information. If the candidate predicted motion vector location 252A is not available, the video decoder may assign the candidate predicted motion vector location 252B to index 0.
  • the video decoder may assign the candidate predicted motion vector location 252 to index 1. If the candidate predicted motion vector location 252B is not available or the same as the candidate predicted motion vector location 252A, the video decoder skips the candidate predicted motion vector location 252B and does not include it in the candidate predicted motion vector list.
  • the candidate predicted motion vector location 252C is similarly considered by the video decoder for inclusion in the list. If the candidate predicted motion vector location 252C is available and not the same as the candidate predicted motion vector locations 252B and 252A, the video decoder assigns the candidate predicted motion vector location 252C to the next available index. If the candidate predicted motion vector location 252C is not available or is not different than at least one of the candidate predicted motion vector locations 252A and 252B, the video decoder does not include the candidate predicted motion vector location 252C in the candidate predicted motion vector list. Next, the video decoder considers the candidate predicted motion vector location 252D.
  • the video decoder assigns the candidate predicted motion vector location 252D to the next available index. If the candidate predicted motion vector location 252D is not available or is not different than at least one of the candidate predicted motion vector locations 252A, 252B, and 252C, the video decoder does not include the candidate predicted motion vector location 252D in the candidate predicted motion vector list.
  • the above embodiments generally describe exemplarily considering candidate prediction motion vectors 252A through 252D for inclusion in a candidate prediction motion vector list, but in some implementations, all candidate prediction motion vectors 252A through 252D may first be added to candidates. The motion vector list is predicted, and the repetition is removed from the candidate prediction motion vector list later.
  • the candidate prediction motion vector list may include four spatial candidate prediction motion vectors or the list may include less than four spatial candidate prediction motion vectors. If the list includes four spatial candidate prediction motion vectors (904, YES), the video decoder considers the temporal candidate prediction motion vectors (906).
  • the temporal candidate prediction motion vector may correspond to motion information of a co-located PU that is different from the image of the current image. If the temporal candidate prediction motion vector is available and different from the first four spatial candidate prediction motion vectors, the video decoder assigns the temporal candidate prediction motion vector to index 4.
  • the video decoder does not include the temporal candidate prediction motion vector in the candidate prediction motion vector list.
  • the candidate prediction motion vector list may include five candidate prediction motion vectors (the first four spatial candidate prediction motion vectors considered at block 902 and considered at block 904)
  • the temporal candidate predictive motion vector or may include four candidate predicted motion vectors (the first four spatial candidate predicted motion vectors considered at block 902). If the candidate predicted motion vector list includes five candidate predicted motion vectors (908, YES), the video decoder completes the build list.
  • the video decoder may consider the fifth spatial candidate predicted motion vector (910).
  • the fifth spatial candidate prediction motion vector may, for example, correspond to the candidate predicted motion vector location 252E. If the candidate predicted motion vector at location 252E is available and different than the candidate predicted motion vector at locations 252A, 252B, 252C, and 252D, the video decoder may add the fifth spatial candidate predicted motion vector to the candidate predicted motion vector list, The five-space candidate prediction motion vector is assigned to index 4.
  • the video decoder may not include the candidate predicted motion vector at location 252 Candidate predictive motion vector list.
  • the list may include five candidate prediction motion vectors (the first four spatial candidate prediction motion vectors considered at block 902 and the fifth spatial candidate prediction motion considered at block 910) Vector) or may include four candidate predicted motion vectors (the first four spatial candidate predicted motion vectors considered at block 902).
  • the video decoder finishes generating the candidate predicted motion vector list. If the candidate predicted motion vector list includes four candidate predicted motion vectors (912, No), the video decoder adds the artificially generated candidate predicted motion vectors (914) until the list includes five candidate predicted motion vectors (916, YES).
  • the video decoder may consider the fifth spatial candidate prediction motion vector (918).
  • the fifth spatial candidate prediction motion vector may, for example, correspond to the candidate predicted motion vector location 252E. If the candidate prediction motion vector at location 252E is available and different than the candidate prediction motion vector already included in the candidate prediction motion vector list, the video decoder may add the fifth spatial candidate prediction motion vector to the candidate prediction motion vector list, The five spatial candidate prediction motion vectors are assigned to the next available index.
  • the video decoder may not include the candidate predicted motion vector at location 252E Candidate predictive motion vector list. The video decoder may then consider the temporal candidate prediction motion vector (920). If the temporal candidate prediction motion vector is available and different from the candidate prediction motion vector that has been included in the candidate prediction motion vector list, the video decoder may add the temporal candidate prediction motion vector to the candidate prediction motion vector list, the temporal candidate The predicted motion vector is assigned to the next available index. If the temporal candidate prediction motion vector is not available or is not different from one of the candidate prediction motion vectors that have been included in the candidate prediction motion vector list, the video decoder may not include the temporal candidate prediction motion vector in the candidate prediction motion vector List.
  • the video decoder completes generation A list of candidate predicted motion vectors. If the candidate predicted motion vector list includes less than five candidate predicted motion vectors (922, No), the video decoder adds the artificially generated candidate predicted motion vectors (914) until the list includes five candidate predicted motion vectors (916, yes) until.
  • an additional merge candidate prediction motion vector may be artificially generated after the spatial candidate prediction motion vector and the temporal candidate prediction motion vector to fix the size of the merge candidate prediction motion vector list to a specified number of merge candidate prediction motion vectors (eg, Five of the possible embodiments of Figure 9 above.
  • the additional merge candidate prediction motion vector may include an exemplary combined bi-predictive merge candidate motion vector (candidate motion vector 1), a scale bi-predictive merge candidate motion vector (candidate motion vector 2), and a zero vector Merge/AMVP candidate prediction motion vector (candidate prediction motion vector 3).
  • FIG. 10 is an exemplary schematic diagram of adding a combined candidate motion vector to a merge mode candidate prediction motion vector list in an embodiment of the present application.
  • the combined bi-predictive merging candidate prediction motion vector may be generated by combining the original merging candidate prediction motion vector.
  • two candidate predicted motion vectors (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) in the original candidate prediction motion vector may be used to generate a bidirectional predictive merge candidate prediction motion vector.
  • two candidate prediction motion vectors are included in the original merge candidate prediction motion vector list.
  • the prediction type of one candidate prediction motion vector is list 0 unidirectional prediction
  • the prediction type of another candidate prediction motion vector 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
  • a bidirectional predictive merge candidate predictive motion vector (which has mvL0_A and ref0 in list 0 and mvL1_B and ref0) in Listing 1 and check if it is different from the candidate predicted motion vector that has been included in the candidate predicted motion vector list. If they are different, the video decoder may include the bi-predictive merge candidate motion vector for inclusion in the candidate motion vector list.
  • FIG. 11 is an exemplary schematic diagram of adding a scaled candidate motion vector to a merge mode candidate prediction motion vector list in an embodiment of the present application.
  • the scaled bi-predictive merge candidate prediction motion vector may be generated by scaling the original merge candidate prediction motion vector.
  • a candidate predicted motion vector (which may have mvLX and refIdxLX) from the original candidate predicted motion vector may be used to generate a bi-predictive merge candidate predictive motion vector.
  • two candidate predicted motion vectors are included in the original merge candidate predictive motion vector list.
  • the prediction type of one candidate prediction motion vector is list 0 unidirectional prediction, and the prediction type of another candidate prediction motion vector is list 1 unidirectional prediction.
  • mvL0_A and ref0 may be picked up from list 0, and ref0 may be copied to reference index ref0' in list 1.
  • mvL0'_A can be calculated by scaling mvL0_A having ref0 and ref0'. The scaling can depend on the POC distance.
  • a bidirectional predictive merge candidate prediction motion vector (which has mvL0_A and ref0 in list 0 and mvL0'_A and ref0' in list 1) can be generated and checked for repetition. If it is not a duplicate, it can be added to the merge candidate prediction motion vector list.
  • FIG. 12 is an exemplary schematic diagram of adding a zero motion vector to a merge mode candidate motion vector list in the embodiment of the present application.
  • Zero Vector Merging Candidate Prediction Motion Vectors can be generated by combining a zero vector with a reference index that can be referenced. If the zero vector candidate prediction motion vector is not repeated, it may be added to the merge candidate prediction motion vector list. For each generated merge candidate predicted motion vector, the motion information may be compared to the motion information of the previous candidate predicted motion vector in the list.
  • the pruning operation may include comparing one or more new candidate prediction motion vectors with candidate prediction motion vectors that have been in the candidate prediction motion vector list and candidates that are not added as candidates in the candidate prediction motion vector list A new candidate prediction motion vector that predicts the repetition of the motion vector.
  • the pruning operation can include adding one or more new candidate prediction motion vectors to the candidate prediction motion vector list and later removing the duplicate candidate prediction motion vectors from the list.
  • JVET-F1001-v2 describes an improved technique for inter-frame coding in Section 2.3.
  • ATMVP alternative temporal motion vector prediction
  • space-time domain motion are introduced.
  • a method of predicting a plurality of interframes such as a spatial-temporal motion vector prediction (STMVP).
  • STMVP spatial-temporal motion vector prediction
  • the predicted motion vector obtained by the above method may be used as the Merge candidate motion vector list, AMVP candidate motion vector list or other candidate motion vector list in the above.
  • Candidate prediction motion vector in .
  • each candidate predicted motion vector corresponds to an index value, or a similar identifier.
  • Each index value corresponds to a binarized representation, or a binarized character string.
  • the binarized representation of the index value of the actual predicted motion vector is the indication information that needs to be transmitted from the encoding end to the decoding end. Using a reasonable binarization strategy to encode the index value can save coding bits and improve coding efficiency.
  • each candidate prediction motion vector has a certain probability of being selected as the actual prediction motion vector at the encoding end, and a shorter binarized string for the index value of the candidate motion vector with high probability.
  • the index value of the candidate motion vector with a small probability is a longer binarized string, which can save coding bits.
  • index 1 there are three candidate prediction motion vectors, which are index 0, index 1, and index 2.
  • the predicted motion vectors that are actually selected by a group of to-be-processed blocks are index 0 and index 1, respectively.
  • Index 1, index 1, index 1, index 0, index 2, index 1 then if the index value of the shorter binarized string is used according to the index value of the candidate motion vector for the large probability, the index 1 corresponds to "1", index 0 corresponds to "00”, index 2 corresponds to "01”, obviously the length of the binary string of "00" or "01” is 2, and the length of the binary string of "1" is 1.
  • the binarized strings required to encode the above set of predicted motion vectors are “00", “1”, “1”, “1”, “00”, “01”, “1”, total
  • the length is 11; if the index value is encoded according to the opposite strategy, index 2 corresponds to “1”, index 0 corresponds to "00", index 1 corresponds to "01”, then the binarized string required to encode the above set of predicted motion vectors is "00", "01”, “01”, “01”, “00”, “1”, 01 ", for a total length of 15. Therefore, the shorter the binarized string required to encode the index value by the strategy of using the shorter binarized string according to the index value of the candidate motion vector for the large probability, the general need to encode the binarized string The number of bits is also small.
  • the embodiment of the present application aims to: when the to-be-processed block has a plurality of candidate prediction motion vectors, the similarity between the reference image blocks indicated by the candidate prediction motion vector of the to-be-processed block and the to-be-processed block is a priori knowledge. Assist in determining the coding mode of the identifiers of the candidate prediction motion vectors, thereby saving coding bits and improving coding efficiency. In a feasible implementation manner, since the pixel value of the to-be-processed block cannot be directly obtained at the decoding end, the similarity is similar to the reconstructed pixel set corresponding to the block to be processed and the reconstructed pixel set corresponding to the reference image block.
  • the degree is similar, that is, the similarity between the reconstructed pixel set around the block to be processed and the reconstructed pixel set corresponding to the reference image block is used to represent the reference image indicated by the candidate predicted motion vector of the block to be processed and the block to be processed.
  • the similarity between blocks is similar, that is, the similarity between the reconstructed pixel set around the block to be processed and the reconstructed pixel set corresponding to the reference image block is used to represent the reference image indicated by the candidate predicted motion vector of the block to be processed and the block to be processed.
  • the embodiment of the present application is applicable to a scenario in which a reference image block is determined from a plurality of reference image blocks of a block to be processed, and the identification information of the reference image block is encoded.
  • the plurality of reference image blocks are derived from an inter-frame type prediction mode, from an intra-frame type prediction mode, or from a viewpoint-to-view mode (Multi-view or 3D Video Codig). It is also independent of the prediction mode (scalable video coding, Scalabe Video Coding) from the layer, regardless of the specific reference image block acquisition method (such as using ATMVP or STMVP, or intra block copy mode), and indicating the reference image block.
  • the motion vector is a motion vector belonging to the entire coding unit, and is not related to the motion vector of a certain coding unit in the coding unit.
  • the method of the vector can achieve the technical effect of improving the coding efficiency according to or in combination with the solution in the embodiment of the present application.
  • FIG. 13 is a schematic flowchart of an encoding method 1000 according to an embodiment of the present application.
  • the acquisition modes of each candidate reference image block of the to-be-processed block are respectively referred to as mode 1, mode 2, mode 3, etc., and the foregoing acquisition manners. It includes different prediction methods, such as ATMVP and STMVP, as well as different operations using the same prediction method, such as obtaining the motion vector of the left neighboring block in the Merge mode and obtaining the motion vector of the upper neighboring block in the Merge mode.
  • different acquisition methods and use different modes to represent. Let each mode correspond to a motion vector and correspond to an identification value.
  • the above motion vector includes both the motion vector used in the traditional inter prediction, and the displacement vector (in the same frame) used to represent the block to be processed and the reference image block when motion estimation is used in intra prediction, and Including inter-view prediction, a vector used to characterize the matching relationship between views, and a vector used to represent the matching relationship between different layers when inter-layer prediction is used, collectively referred to as a motion vector, for obtaining a reference image block of a block to be processed.
  • Each motion vector also corresponds to one reference frame information, and the reference image block indicated by the motion vector comes from the reference frame information. Different application scenarios refer to frame information in different representations.
  • reference frame information may be used to represent a reconstructed time domain reference frame, such as acquiring a left neighboring block in the Merge mode.
  • the motion vector also needs to acquire the reference frame information of the left neighboring block, and the corresponding reference image block is determined according to the motion vector in the reference frame determined by the reference frame information.
  • the reference frame is the current frame.
  • the reference frame information can be omitted.
  • the reference frame information can in turn be used to represent reconstructed frames of different views at different times or at the same time.
  • the reference frame information can in turn be used to represent reconstructed frames of different layers that have been reconstructed at different times or at the same time.
  • the reference frame information may be an index value or a 0 or 1 flag according to the application scenario.
  • the identifier value corresponding to each mode is used to distinguish various modes, and may be an index value or an identity identifier, which is not limited. Illustratively, the following correspondence may be established to facilitate the description of the subsequent scheme.
  • the plurality of candidate prediction motion information may constitute a set, may exist in the form of a list, may exist in the form of a list of complements, or may exist in the form of a subset, and is not limited.
  • an encoding method 1000 for predicting motion information of an image block to be processed includes:
  • N is an integer greater than one.
  • the N candidate predicted motion informations are different from each other. It should be understood that when the motion information includes the motion vector and the reference frame information, the motion information is different from each other, and also includes the case where the motion vectors are the same but the reference frame information is different.
  • the technique of pruning has been introduced in the foregoing, and it should be understood that in the process of obtaining N candidate prediction motion information of an image block to be processed, a pruning operation is performed, so that the N candidate motion information obtained finally is different from each other. No longer.
  • the acquiring the N candidate prediction motion information of the to-be-processed image block includes: acquiring, in a preset order, N different from the image block to be processed, and having a preset The motion information of the image block of the positional relationship is used as the N candidate predicted motion information.
  • the candidate prediction mode of the Merge mode specified in the H.265 standard described above is determined by acquiring a predetermined spatial domain position relationship with the image block to be processed in a certain order (for example, 252A, 252B, 252C, 252D). And 252E) and/or motion information of an image block of a preset time domain position relationship (for example, a co-located position), and by trimming, finally obtain N candidate prediction motion information that are different from each other.
  • the acquiring the N candidate predicted motion information of the to-be-processed image block includes: acquiring, in a preset order, M different presets and the preset image block to have a preset
  • the motion information of the image block of the positional relationship is the M candidate prediction motion information, wherein the M candidate prediction motion information includes the N candidate prediction motion information, and M is an integer greater than N; determining the M candidate predictions a grouping manner of motion information; determining, according to the grouping manner, the N candidate prediction motion information from the M candidate prediction motion information.
  • Embodiment 10011 7 kinds of candidate predicted motion information of the motion information 0 to the motion information 6 are obtained, and M is 7. According to the predicted fractional formula, the above seven candidates are grouped according to the predicted motion information. In one possible implementation 100121, all seven candidate prediction motion information may be used as one packet, that is, the same as embodiment 10012.
  • the seven candidate prediction motion information may be grouped according to a preset number interval, for example, grouped according to the first three, the middle three, and the last one, or the first two The middle 3 or the last 2 are grouped, or the first 3 and the last 4 are grouped, and the number of divided groups and the number of candidate predicted motion information included in each group are not limited.
  • the candidate prediction motion information acquired according to the spatial neighboring block may be grouped according to the acquisition of the motion information, and the candidate prediction motion obtained according to the time domain neighboring block may be classified into a group. Information is grouped together.
  • the candidate prediction motion information includes motion information of a coding unit level (CU level) and motion information of a sub-CU level.
  • CU level coding unit level
  • sub-CU level motion information of a sub-CU level.
  • JVET-F1001- Section 2.3.1 of v2 is based on motion vector prediction of sub-coding units. If not described, it can be grouped according to CU level and sub-CU level. Specifically, it may be assumed that the seven candidate predicted motion information is divided into two groups, the first group is motion information 0-2, and the second group is motion information 3-6.
  • the index value of the candidate prediction motion vector in the Merge mode specified in the H.265 standard described above may be assigned a binary value for the index 0-2 corresponding to the motion information 0-2 of the first group.
  • the character string (hereinafter referred to as the conventional mode), that is, the index 0-2 is given a binarized character string in the order of prediction, and the method described in the embodiment S1002-S1005 is the second group of motions.
  • the index 3-6 corresponding to the information 3-6 is given to the binarized character string (the manner of which is a brief description of the embodiment of the present application).
  • the binarized character string assigned is two kinds of information that simultaneously characterizes the group identifier of the corresponding motion information and the identifier of the motion information in the group, so the binarized string can be used. Any mode in a group distinguishes all of the other six modes.
  • the motion information 0-2 of the first group is processed in a conventional manner (exemplary, the index 0 corresponds to the binarized character string “0”, the index 1 corresponds to the binarized character string “10”, and the index 2 corresponds to two.
  • the value string "110" is processed, and the motion information 3-6 of the second group is processed in the manner of the embodiment of the present application, where N is 4.
  • the packet mode is programmed into the code stream.
  • various references of the group such as the implementation manners 100121-100124
  • the grouping manner of the coded stream enables the decoding end to know the grouping manner of the encoding end.
  • the grouping mode is that the codec end is respectively fixed at the codec end by a preset protocol and is consistent, so that the packet mode does not need to be coded into the code stream.
  • candidate prediction motion information is encoded into a code stream; or second identification information indicating an image block having a preset positional relationship with the image block to be processed is encoded into the code stream.
  • an image block (such as a spatial neighboring block, a time domain co-located block, and the like in the Merge mode) from which the candidate predicted motion information is taken and having a preset positional relationship is assigned a number, and the number is assigned.
  • the third identification information having a preset correspondence relationship with the N candidate prediction motion information is encoded into the code stream, and specifically, a combination of preset candidate motion information is preset The combination is assigned a number, and the number is programmed into the code stream.
  • the candidate prediction motion information is that the codec end is respectively fixed at the codec end by a preset protocol, so that the candidate prediction motion information does not need to be encoded into the code stream.
  • each packet is coded with a 0 or 1 identifier to indicate that the current packet is processed in a conventional manner or in the manner of the embodiment of the present application; or
  • the syntax element includes a representation of the processing manner of each packet; or, the codec may be separately fixed at the codec by a preset protocol, for example, the first packet is agreed to be processed in a conventional manner, and the second packet is used in the second packet.
  • the manner of the embodiment of the present application is processed, or it is agreed that the processing is performed according to the embodiment of the present application when there is only one packet, which is not limited.
  • S1002 Determine an adjacent reconstructed image block of the image block to be processed.
  • the adjacent reconstructed image blocks of the image block to be processed may include: a spatially adjacent reconstructed image block that is located in the same frame image as the image block to be processed, and the image block to be processed is located in a different frame image.
  • the time-domain adjacent reconstructed image block of the same position, and the reconstructed image block of the adjacent view point of the same position of the different frame image at the same time and the image block to be processed are the same as the different frame images of the image block to be processed at the same time
  • Reconstructed image blocks and the like of adjacent layers of the position are not limited.
  • Adjacent reconstructed image blocks are available, i.e., adjacent reconstructed image blocks can be used by current methods.
  • the left boundary of the image block to be processed is not an image boundary, the left neighboring block of the image block to be processed is available; when the upper boundary of the image block to be processed is not the image boundary, the upper adjacent block of the image block to be processed Available.
  • whether adjacent reconstructed image blocks are available is further related to the configuration of other encoding tools.
  • the left boundary of the image block to be processed is not an image boundary
  • the left boundary is a boundary of an image block group, such as a boundary of a slice, a tile, or the like, according to the image block group and the left side
  • the independence relationship between adjacent image block groups, the left adjacent block of the image block to be processed still exists unusable (corresponding to the case where the image groups are completely independent).
  • the left boundary of the image block to be processed is an image boundary, but other encoding tools are configured to interpolate the image padding outside the image boundary, the left adjacent block of the image block to be processed Available.
  • the determining the phase of the image block to be processed is usable, comprising: determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
  • the original adjacent reconstructed image block of the image block to be processed includes the upper adjacent reconstructed image block and the left adjacent reconstructed image block
  • the upper adjacent reconstructed image block and the left adjacent reconstructed image block are If any one of the reconstructed image blocks is available, it is determined that adjacent reconstructed image blocks of the image block to be processed are available.
  • the original adjacent reconstructed image block is used to refer to the adjacent reconstructed image block of the image block to be processed to distinguish the reference adjacent reconstructed image block mentioned in the following text, and is used to refer to the adjacent reconstructed image block.
  • the method of the embodiment of the present invention cannot utilize the similarity of the reconstructed pixel set corresponding to the block to be processed and the reconstructed pixel set corresponding to the reference image block.
  • a similarity between the reference image blocks indicated by the candidate prediction motion vectors of the to-be-processed block and the to-be-processed block is characterized.
  • the identification information is required to encode the auxiliary information such as the foregoing grouping manner and/or the processing manner of each packet.
  • the adjacent reconstructed image block of the image block to be processed may also be determined first. The availability, when adjacent reconstructed image blocks are not available, can be directly encoded in a conventional manner without further encoding the above auxiliary information, thereby saving coded bits.
  • the distortion value is used to calculate a similarity between the reconstructed pixel set (original adjacent reconstructed image block) around the block to be processed and the reconstructed pixel set (refer to the adjacent reconstructed image block) corresponding to the reference image block,
  • the distortion value is determined by the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information and the adjacent reconstructed image block of the image block to be processed.
  • the reference adjacent reconstructed image block is identical in shape and equal in size to the original adjacent reconstructed image block, and between the reference adjacent reconstructed image block and the reference image block.
  • the positional relationship is the same as the positional relationship between the original adjacent reconstructed image block and the image block to be processed.
  • the image block to be processed is rectangular.
  • the width of the image block to be processed is W and the height is H.
  • the reconstructed image block is a rectangle.
  • a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and the width of the original adjacent reconstructed image block is W, high.
  • a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and a width of the original adjacent reconstructed image block is W+H, high is n; in a feasible implementation 10033, a right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, the original adjacent reconstruction The image block has a width n and a height H. In a possible implementation 10034, a right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, the original phase The adjacent reconstructed image block has a width n and a height W+H. Where W, H, and n are positive integers. It should be understood that the setting of the shape and size of the original adjacent reconstructed image block is related to the accuracy of the implementation complexity and the similarity estimation, and the codec end is consistent according to the protocol, and is not limited.
  • n may be set to 1 or 2, so that no additional storage space is needed to store the original adjacent reconstructed image blocks, which simplifies the hardware implementation.
  • the reference adjacent reconstructed image block and the original adjacent reconstructed image block have the same shape, the same size, and the same positional relationship, and thus refer to the implementation of the adjacent reconstructed image block and the corresponding original adjacent reconstructed image.
  • the blocks are exactly the same.
  • the reference adjacent reconstructed image block of the reference image block of the image block to be processed may be determined according to the reference frame information and the motion vector characterized by the candidate predicted motion information according to the motion compensation method described above.
  • the motion vector in the candidate prediction motion information points to the position of the sub-pixel in the reference frame, and at this time, the image of the reference frame image or a part of the reference frame image needs to be interpolated with pixel precision.
  • the 8-tap filter of ⁇ -1, 4, -11, 40, 40, -11, 4, -1 ⁇ can be used for sub-pixel interpolation, or, in order to simplify the computational complexity, Sub-pixel interpolation is performed using a bilinear interpolation filter.
  • a difference characterization value of the reference neighboring reconstructed image block of the reference image block and the original adjacent reconstructed image block of the block to be processed is then calculated as a distortion value.
  • the difference characterization value can be calculated in a variety of ways, such as average absolute error, absolute error sum, sum of squared errors, sum of squared mean errors, absolute Hadamard transform error sum, normalized product correlation metric, or, based on sequential Similarity measures for similarity detection, and so on. Calculating the difference characterization value is to obtain the similarity (or matching degree) of the reference adjacent reconstructed image block of the reference image block and the original adjacent reconstructed image block of the corresponding to-be-processed block, and thus the calculation method for this purpose All of them are applicable to the embodiments of the present application, and are not limited.
  • the plurality of the original adjacent reconstructed image blocks include a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image.
  • the distortion value is used by the reference phase And representing, by the difference representation value of the adjacent reconstructed image block and the original adjacent reconstructed image block, comprising: the distortion value is reconstructed by the third reference neighboring reconstructed image block and the third original neighboring block And a difference characterization value of the image block and a sum of difference characterization values of the fourth reference adjacent reconstructed image block and the fourth original adjacent reconstructed image block. More generally, the distortion value is obtained according to the following calculation formula:
  • Distortion represents the distortion value
  • represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block
  • p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  • Delta is an expression of various calculation methods such as MAD, SAD, and SSD.
  • the embodiment of the present invention is applied to inter-frame bidirectional prediction.
  • the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, corresponding to And the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is Referring to the difference characterization values of the adjacent reconstructed image block and the original adjacent reconstructed image block, including: the distortion value is averaged by reference to the adjacent reconstructed image block and the original adjacent reconstructed image block Representing a difference characterization value, wherein the average reference neighboring reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or The distortion value is represented by an average of a first difference characterization value and a second difference characterization value, wherein the first difference characterization value is reconstructed by
  • the image block to be processed has candidate prediction motion information at the sub-block level, as shown in FIG. 15, respectively, corresponding to each sub-block adjacent to the original adjacent reconstructed image block.
  • the distortion value is summed as the distortion value of the image block to be processed.
  • the corresponding reference image blocks Ref Sub-CU1 and Ref Sub-CU2 are respectively found according to the motion information of Sub-CU1 and Sub-CU2 in the to-be-processed block, and then the original reconstructed image blocks T1 and T2 are respectively determined.
  • the corresponding reference reconstructed image blocks T1', T2', and finally the distortion value is obtained according to the method shown in the formula (1).
  • S1004 Determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and the respective first identification information. correspond.
  • the first identification information is a binarized representation of the identifier of each candidate prediction motion information, or Binary string.
  • the size between the N distortion values is compared.
  • the N candidate prediction motion information may be sequentially arranged according to the distortion value from small to large or from large to small. It may be arranged that the N candidate prediction motion information is arranged in the order of the distortion values from small to large, that is, the distortion value corresponding to the candidate motion information that is ranked higher is smaller.
  • the first identification information of each of the N candidate prediction motion information is given according to the comparison result, wherein the length of the binary character string of the first identification information of the candidate prediction motion information with the smaller distortion value is less than or equal to And a length of a binary character string encoding the first identification information of the candidate prediction motion information having the large distortion value.
  • the motion information 0-2 is divided into the first group, and the motion information 3-6 is divided into the second group.
  • the second group is processed in the manner of the embodiment of the present application, and the distortion value is from small to large.
  • the order is mode 6, mode 4, mode 5, mode 3, then there are the following exemplary index coding methods:
  • the latter group needs to consider the prior grouping when determining the binary representation manner of the identifier value of the candidate prediction motion information in the group, thereby avoiding the inability to Prior to grouping. It should also be understood that, in some embodiments, when the location of the packet and the number of candidate prediction motion information within the group are known by the decoding end by other means, the subsequent packet is determined in the identification value of the candidate prediction motion information within the group. In the case of binary representation, the prior grouping can be ignored.
  • the target predicted motion information of the to-be-processed image block is one of the N candidate predicted motion information of the determined first identifier information
  • the first identifier information of the target predicted motion information is encoded into a code. flow.
  • the coding is performed by using each candidate prediction motion information, and the entire coding process may be simulated, or part of the coding process may be completed (for example, only the reconstructed image block is completed without entropy coding), and the coding cost of each candidate prediction motion information is obtained.
  • the coding cost is obtained by calculating the degree of distortion of the reconstructed image block and/or the coding bits used to encode the image block. According to actual needs, selecting suitable candidate prediction motion information, for example, the candidate prediction motion information with the lowest coding cost described above, as the target motion information of the actual coding, and coding (such as an index value) according to the binary string determined in step S1004. Into the stream.
  • the above process of determining the target prediction motion information is generally referred to as obtaining the target prediction motion information by using a rate-distortion (RDO) criterion.
  • RDO rate-distortion
  • the specific steps and various feasible simplified methods can be referred to the reference software of HM, JEM, etc.
  • FIG. 16 is a schematic flowchart 1100 of a decoding method according to an embodiment of the present application. It should be understood that, in general, the decoding process is the inverse of the encoding process. In the encoding process, the syntax elements of the code stream are sequentially encoded, and the decoding end needs to be parsed in a corresponding order and position to complete the reconstruction of the video image at the decoding end. It is to be noted that the decoding method shown in FIG. 16 corresponds to the encoding method shown in FIG.
  • S1101 Determine a grouping manner of the M candidate prediction motion information.
  • step S1101 corresponds to a different embodiment as an optional step.
  • the decoding end uses the decoding end to determine the grouping mode according to a pre-protocol manner, the decoding end can learn the grouping mode through the protocol, and the step does not exist at the time of actual execution.
  • this step needs to be performed.
  • the specific grouping mode and the encoding end are consistent. For details, refer to the grouping manner for determining the M candidate prediction motion information in step S1001; and determining the N from the M candidate prediction motion information according to the grouping manner. An exemplary description of the candidate predicted motion information will not be described again.
  • the decoding end needs to know the processing manner of the packet where each packet or target prediction motion information is located.
  • the decoding end may be known according to the protocol of the codec end, or the identification information in the code stream may be parsed. Know. That is, the preset grouping manner is determined, or the grouping manner is obtained by parsing from the code stream. For details, refer to the method described in Embodiment 10017, and details are not described herein.
  • S1102 Parse target identification information of target predicted motion information of the to-be-processed image block from the code stream.
  • the code stream can be parsed, and the identifier of the candidate predicted motion information actually used for encoding, that is, the binary string can be obtained.
  • This step corresponds to step S1002 of the encoding end, and the content remains the same.
  • the various possible implementations in S1002 can be used in S1103, and no further description is provided.
  • the adjacent reconstructed image block of the image block to be processed includes at least two of the original adjacent reconstructed image blocks
  • the adjacent reconstructed image block that determines the image block to be processed is available, including Determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
  • the identification information is required to encode the auxiliary information such as the above-mentioned grouping manner and/or the processing manner of each packet.
  • the processing may be determined first.
  • the availability of adjacent reconstructed image blocks of an image block can be directly encoded in a conventional manner when adjacent reconstructed image blocks are not available, without further encoding the auxiliary information, thereby saving coding bits, corresponding to the decoding end, ie The associated auxiliary information is no longer parsed when the adjacent reconstructed image block is not available.
  • steps S1103 and S1102 have no mandatory sequence, and may be processed in parallel without limitation.
  • S1104 Determine N candidate predicted motion information.
  • the N candidate predicted motion information includes the target predicted motion information, where N is an integer greater than 1.
  • the step includes: acquiring N mutually different and the to-be-processed according to a preset sequence.
  • the image block has motion information of an image block of a preset positional relationship as the N candidate predicted motion information.
  • the candidate prediction motion information includes the N candidate prediction motion information, where M is an integer greater than N; and determining the N candidates from the M candidate prediction motion information according to the target identification information and the grouping manner Predict motion information.
  • This step corresponds to step S1001 of the encoding end, and the content remains the same.
  • Various possible implementations in S1001 can be used in S1104, and no further description is provided.
  • the decoding end needs to know the specific candidate prediction motion information. Alternatively, it may be learned according to the pre-protocol method of the decoding end, or the candidate prediction motion information or the identification information in the parsing stream may be known. . That is, parsing the encoding information of the plurality of candidate prediction motion information in the code stream to obtain the N candidate prediction motion information; or parsing the second identification information in the code stream to obtain the a second candidate image block indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate predicted motion information; or parsing the third identifier information in the code stream to obtain The N candidate predicted motion information having a preset correspondence relationship with the third identification information. For details, refer to the embodiment 10015 and the embodiment 10016, that is, no further description is provided.
  • the implementation of the decoding side may be somewhat different.
  • all candidate prediction motion information may become the target prediction motion information actually used for encoding, and therefore, all candidate prediction motion information must be determined.
  • the candidate predicted motion information capable of determining the target predicted motion information needs to be determined, and it is not necessary to determine all the candidate predicted motion information. In some application scenarios, this can reduce the complexity of the implementation of the decoder.
  • the index value of the candidate predicted motion information is assigned to the binary string. It can be determined that the binary string corresponding to the first packet includes “1” and “01”, and the binary string corresponding to the second packet includes “001” and “0001”. And “00001”, the binary string corresponding to the third group includes "000001" and "000000”.
  • the target motion vector of the target belongs to the second group, and therefore it is not necessary to determine the index value corresponding to the candidate motion information of the candidate in the first packet and the third packet.
  • a binary string but only a binary string corresponding to the index value of the candidate prediction motion information in the second packet needs to be determined.
  • This step corresponds to step S1003 of the encoding end, and the content remains the same.
  • Various possible implementation manners in S1003 can be used in S1105, and details are not described herein.
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent reconstructed image block is reconstructed.
  • the image block includes an original adjacent reconstructed image block corresponding to the reference neighboring reconstructed image block, the distortion reconstructed image of the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information
  • Processing the adjacent reconstructed image block determination of the image block comprising: the distortion value represented by a difference characterization value of the reference neighboring reconstructed image block and the original adjacent reconstructed image block, the reference neighbor Reconstructing an image block having the same shape and equal size as the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block and the original adjacent reconstructed image
  • the positional relationship between the block and the image block to be processed is the same.
  • the differential representation value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block includes: the reference adjacent reconstructed image block and the original phase An average absolute error of the adjacent reconstructed image block; an absolute error sum of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original adjacent weight a sum of squared errors of the image blocks; a squared sum of average errors of the reference neighboring reconstructed image blocks and the original neighboring reconstructed image blocks; the reference neighboring reconstructed image blocks and the original neighboring reconstructed An absolute Hadamard transform error sum of the image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring reconstructed image block And a similarity measure based on sequential similarity detection of the original adjacent reconstructed image block.
  • the image block to be processed is a rectangle
  • the width of the image block to be processed is W
  • the height is H
  • the original adjacent reconstructed image block is a rectangle.
  • the lower boundary of the adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width W and a height n; or the original adjacent reconstruction
  • the image block has a width of W+H and a height of n; where W, H, and n are positive integers.
  • the first boundary of the original adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and the width of the original adjacent reconstructed image block is n.
  • the height is H; or, the original adjacent reconstructed image block has a width n and a height W+H.
  • n 1 or 2.
  • the reference image block indicated by the candidate predicted motion information includes a first reference image block and a second reference image block, correspondingly, the phase of the reference image block indicated by the candidate predicted motion information.
  • the adjacent reconstructed image block includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image block and the original adjacent weight Representing the difference characterization value of the image block, including: the distortion value is represented by an average reference neighboring reconstructed image block and a difference characterization value of the original adjacent reconstructed image block, wherein the average reference neighbor Reconstructing an image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or the distortion value is represented by a first difference representation value and a second difference Representing a mean value of the characterization value, wherein the first difference characterization value is represented by the difference characterization value of the first reference neighboring reconstructed image block and the
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, and the plurality of the reference adjacent neighbors
  • the reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block
  • the adjacent reconstructed image block of the image block to be processed includes a plurality of the original adjacent weights Constructing an image block, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion values being reconstructed by the reference neighbor And representing, by the difference characterization value of the image block and the original adjacent reconstructed image block, the distortion value is determined by the third reference neighboring reconstructed image block and the third original adjacent reconstructed image block And a difference characterization value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
  • the distortion value is obtained according to the following calculation formula:
  • Distortion represents the distortion value
  • represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block
  • p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  • S1106 Determine, according to the magnitude relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and the respective first identification information. correspond.
  • This step corresponds to step S1004 of the encoding end, and the content remains the same.
  • the various possible implementation manners in S1004 can be used in S1106, and no further description is provided.
  • the first identifier information of the N candidate prediction motion information, the N candidates is determined according to the size relationship between the acquired N distortion values.
  • the one-to-one correspondence between the predicted motion information and the respective first identification information includes: comparing a size between the N distortion values; and assigning, according to the comparison result, first identification information of each of the N candidate prediction motion information, where And the length of the binary character string of the first identification information of the candidate prediction motion information with the smaller distortion value is less than the length of the binary character string of the first identification information of the candidate prediction motion information with the larger distortion value.
  • the comparing the sizes between the N distortion values comprises: sequentially arranging the N candidate predictions according to the distortion values from small to large or from large to small. Sports information.
  • the first identification information of the target prediction motion information and the target identification information are matched, and the candidate prediction motion information corresponding to the first identification information that matches the target identification information is determined as the target predicted motion information.
  • the first identification information of the target prediction motion information and the target identification information are matched, that is, the first identification information and the target identification information are equal.
  • the binarized character strings of the index values of the candidate prediction motion information obtained according to S1106 are: mode 2 “0001”, mode 3 “001”, mode 4 "00001", in combination with the identifier of the target predicted motion information parsed in S1102 is "001", it can be determined that the target predicted motion information is candidate predicted motion information corresponding to mode 3.
  • the group information for determining the N candidate prediction motion information from the M candidate prediction motion information is represented by additional information.
  • the encoding end transmits a group identifier to the decoding end to enable decoding.
  • the end knows the group in which the target predicts the motion information.
  • the target identification information of the target prediction motion information parsed in the S1102 may be used only to distinguish different candidate prediction motion information in the group, that is, intra-group index information, and the first identification information of the target prediction motion information and the target
  • the identification information is matched with the target identification information of the combined group identifier and the target predicted motion information to search for candidate predicted motion information represented by the corresponding first identifier information.
  • the similarity between the reference image blocks indicated by the candidate prediction motion vector of the to-be-processed block and the to-be-processed block is a priori knowledge to assist in determining each candidate prediction motion vector.
  • the motion information of the 252A position, the motion information of the 252B position, the motion information of the 252C position, the motion information of the 252D position, and the motion information obtained by using the ATMVP mode for 250 blocks are sequentially detected.
  • the detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information.
  • the motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially obtained until the number reaches five, and the five sequentially acquired motion information may be referred to as MV0, MV1, MV2, MV3, and MV4, respectively.
  • the size of the 250 block is 16x8, the adjacent reconstructed image block (referred to as the upper template) of the upper boundary of the 250 block is 16x1, and the adjacent reconstructed image block (referred to as the left template) of the left border is 1x8. It is detected whether the upper template and the left template of 250 blocks exist.
  • the process ends, and the identifier of the predicted motion information of the to-be-processed block is encoded according to the prediction method of the Merge mode in the JEM reference software.
  • S1204 Obtain 250 reference picture blocks REF0, REF1, and REF2 according to MVO, MV1, and MV2, respectively.
  • the template existing in 250 blocks it is possible to set 250 left template TL and upper template TA to exist, and determine the left template TL0 and the upper template TA0 corresponding to REF0, TL0 and TL are equal in size, position corresponding, TA0 and TA are equal in size, position correspond.
  • the SAD value of the pixel values of TL0 and TL is calculated to obtain SAD01
  • the SAD value of the pixel values of TA0 and TA is calculated to obtain SAD02
  • SAD01 and SAD02 are added to obtain SAD0 as the distortion value corresponding to MV0.
  • the distortion value SAD1 corresponding to the distortion values SAD1 and MV2 corresponding to MV1 is obtained.
  • S1206. Arrange SAD0, SAD1, and SAD2 from small to large. It may be assumed that the order from small to large is SAD2 ⁇ SAD0 ⁇ SAD1.
  • MV2 corresponds to "1"
  • MV0 corresponds to "01”
  • MV1 corresponds to "001”.
  • S1208 assigns a bin string to MV3 and MV4 respectively:
  • MV3 corresponds to "0001" and MV4 corresponds to "0000".
  • a decoding method 1300 of an embodiment of the present invention will be specifically described below. This embodiment corresponds to the encoding method 1200.
  • the size of the 250 block is 16 ⁇ 8, and the adjacent reconstructed image block (referred to as the upper template) of the upper boundary of the 250 block is 16 ⁇ 1, and the left boundary is The adjacent reconstructed image block (referred to as the left template) is 1x8. It is detected whether the upper template and the left template of 250 blocks exist.
  • the process ends, and the identifier of the predicted motion information of the to-be-processed block is decoded according to the prediction method of the Merge mode in the JEM reference software.
  • S1302 Analyze the code stream, and obtain a bin string corresponding to the predicted motion information identifier of 250 blocks, which may be set to “001”. And according to the protocol preset by the decoding end, consistent with the encoding end, the first group has three motion information, the second group has two motion information, and “001” represents the third motion information (index value is 2), so only It is necessary to determine the three sets of motion information of the first group without determining the motion information of the second group.
  • the detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information.
  • the motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially acquired until the number reaches the three determined in S1302 (inferred according to the step S1302), and is consistent with the encoding end, and is respectively called three sequentially acquired.
  • the motion information is MV0, MV1, MV2.
  • S1304 Obtain 250 reference picture blocks REF0, REF1, and REF2 according to MVO, MV1, and MV2, respectively.
  • the left template TL and the upper template TA are both present, and the left template TL0 and the upper template TA0 corresponding to REF0 are determined, and the TL0 and TL are equal in size and position corresponding, TA0 and TA.
  • the size is equal and the position corresponds.
  • the SAD value of the pixel values of TL0 and TL is calculated to obtain SAD01
  • the SAD value of the pixel values of TA0 and TA is calculated to obtain SAD02
  • SAD01 and SAD02 are added to obtain SAD0 as the distortion value corresponding to MV0.
  • the distortion value SAD1 corresponding to the distortion values SAD1 and MV2 corresponding to MV1 is obtained.
  • S1306, SAD0, SAD1, and SAD2 are arranged from small to large, and are consistent with the coding end.
  • the order from small to large is SAD2 ⁇ SAD0 ⁇ SAD1.
  • MV2 corresponds to "1"
  • MV0 corresponds to "01”
  • MV1 corresponds to "001”.
  • the motion information of the 252A position, the motion information of the 252B position, the motion information of the 252C position, the motion information of the 252D position, and the motion information obtained by using the ATMVP mode for 250 blocks are sequentially detected.
  • the detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information.
  • the motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially obtained until the number reaches six, and the six sequentially acquired motion information may be referred to as MV0, MV1, MV2, MV3, MV4, MV5, respectively.
  • the size of the 250 block is 16x16
  • the adjacent reconstructed image block (abbreviated as the upper template) of the upper boundary of the 250 block is 32x1
  • the adjacent reconstructed image block (referred to as the left template) of the left border is 1x32. It is detected whether the upper template and the left template of 250 blocks exist.
  • the process ends, and the identifier of the predicted motion information of the to-be-processed block is encoded according to the prediction method of the Merge mode in the JEM reference software.
  • S1404 Obtain 250 reference picture blocks REF0, REF1, REF2, REF3, REF4, and REF5 according to MVO, MV1, MV2, MV3, MV4, and MV5, respectively.
  • S1405 takes MV0 as an example to perform the following operations on MV0, MV1, MV2, MV3, MV4, and MV5 respectively:
  • the template existing in 250 blocks it is possible to set 250 blocks only for the upper template TA, and determine the upper template TA0 corresponding to REF0, TA0 and TA are equal in size and corresponding in position.
  • the SAD value of the pixel values of TA0 and TA is calculated to obtain SAD0 as the distortion value corresponding to MV0.
  • the distortion values SAD1 corresponding to MV1 the distortion values SAD2 corresponding to MV2, the distortion values SAD3 corresponding to MV3, the distortion values SAD4 corresponding to MV4, and the distortion value SAD5 corresponding to MV5 are obtained.
  • S1406, SAD0, SAD1, SAD2 are arranged from small to large. It may be assumed that the order from small to large is SAD2 ⁇ SAD0 ⁇ SAD1.
  • MV2 corresponds to "1"
  • MV0 corresponds to "01”
  • MV1 corresponds to "001”.
  • S1408, SAD3, SAD4, and SADD5 are arranged from small to large. It may be assumed that the order from small to large is SAD5 ⁇ SAD3 ⁇ SAD4.
  • MV5 corresponds to "0001”
  • MV3 corresponds to "00001”
  • MV4 corresponds to "00000”.
  • a decoding method 1500 of an embodiment of the present invention will be specifically described below. This embodiment corresponds to the encoding method 1400.
  • the size of the 250 block is 16 ⁇ 16
  • the adjacent reconstructed image block (referred to as the upper template) of the upper boundary of the 250 block is 32 ⁇ 1
  • the left boundary is the adjacent reconstructed image block (referred to as the left template) is 1x32. It is detected whether the upper template and the left template of 250 blocks exist.
  • the process ends, and the identifier of the predicted motion information of the to-be-processed block is decoded according to the prediction method of the Merge mode in the JEM reference software.
  • S1502 Analyze the code stream, and obtain a bin string corresponding to the predicted motion information identifier of 250 blocks, which may be set to “0001”. And according to the protocol preset by the decoding end, consistent with the encoding end, the first group has three motion information, the second group has three motion information, and “0001” represents 4, so only three motion information of the second group is needed. The corresponding steps of steps S1408 and S1409 may be performed.
  • the detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information.
  • the motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially obtained until the number reaches the six determined in S1302, and is consistent with the encoding end, and the six sequentially acquired motion information are respectively MV0, MV1, MV2, MV3, MV4, MV5.
  • S1506 Obtain 250 reference picture blocks REF3, REF4, and REF5 according to MV3, MV4, and MV5, respectively.
  • S1507 taking MV3 as an example, performs the following operations on MV3, MV4, and MV5 respectively:
  • the SAD value of the pixel values of TA3 and TA is calculated to obtain SAD3 as the distortion value corresponding to MV3.
  • the distortion value SAD4 corresponding to the distortion value SAD4 and MV5 corresponding to the MV4 is obtained.
  • S1508 from small to large, arranges SAD3, SAD4, and SADD5, and is consistent with the coding end.
  • the order from small to large is SAD5 ⁇ SAD3 ⁇ SAD4.
  • S1509 assigns a bin string to MV3, MV4, and MV5 according to the magnitude relationship of the distortion value:
  • MV5 corresponds to "0001”
  • MV3 corresponds to "00001”
  • MV4 corresponds to "00000”.
  • the method of the embodiments of the present application may be used for the establishment of a candidate predicted motion information list of H.265 or H.266 standard Merge mode, AMVP mode or other inter prediction mode under development, and for actual use. Characterization of the encoded predictive motion information identification.
  • the method of the embodiments of the present application may be used for the establishment of a candidate motion information (match block distance vector) list of intra prediction based on motion estimation, and a representation of the predicted motion information identifier for actual coding. .
  • the method in this embodiment of the present application may be used for establishing a candidate prediction motion information (matching block distance vector) list in an SCC standard intra block copy mode, and a representation of the predicted motion information identifier for actual coding.
  • the method of the embodiments of the present application may be used for establishing an inter-frame, intra-view, inter-view prediction candidate motion information list, and predictive motion information for actual coding. Characterization of the logo.
  • the method in this embodiment of the present application may be used for establishing an inter-frame, intra-frame, inter-layer prediction candidate motion information list of a scalable coding standard, and for predicting motion information identification for actual coding. Characterization.
  • adjacent reconstructed image blocks (templates in the foregoing specific embodiments) of the to-be-processed block used to characterize the similarity of the reference image blocks may be spatially adjacent reconstructed image blocks, The time domain adjacent reconstructed image block, the reconstructed image block of the adjacent view point, the reconstructed image block between the adjacent layers, and the scaled reconstructed image block and the like.
  • FIG. 17 is a schematic block diagram of an encoding apparatus 1700 according to an embodiment of the present application, including:
  • the obtaining module 1701 is configured to acquire N candidate predicted motion information of the image block to be processed, where N is an integer greater than one;
  • a calculation module 1702 configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image The adjacent reconstructed image block of the block is determined;
  • the comparing module 1703 is configured to determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and a first one of each One-to-one correspondence of identification information;
  • the encoding module 1704 is configured to: when the target predicted motion information of the to-be-processed image block is one of the N candidate predicted motion information of the determined first identifier information, the first identifier of the target predicted motion information Information is programmed into the code stream.
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent reconstructed image block of the to-be-processed image block And including an original adjacent reconstructed image block corresponding to the reference adjacent reconstructed image block, the adjacent reconstructed image block of the reference image block whose distortion value is indicated by the candidate predicted motion information, and the image to be processed
  • the adjacent reconstructed image block of the block is determined to include: the distortion value is represented by a difference characterization value of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, the reference neighboring reconstruction
  • the image block is identical in shape and equal in size to the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block is opposite to the original adjacent reconstructed image block and The positional relationship between the image blocks to be processed is the same.
  • the difference representative value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block comprises: the reference adjacent reconstructed image block and the original phase An average absolute error of the adjacent reconstructed image block; an absolute error sum of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original adjacent weight a sum of squared errors of the image blocks; a squared sum of average errors of the reference neighboring reconstructed image blocks and the original neighboring reconstructed image blocks; the reference neighboring reconstructed image blocks and the original neighboring reconstructed An absolute Hadamard transform error sum of the image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring reconstructed image block And a similarity measure based on sequential similarity detection of the original adjacent reconstructed image block.
  • the image block to be processed is a rectangle
  • the width of the image block to be processed is W
  • the height is H
  • the original adjacent reconstructed image block is a rectangle
  • the original phase The lower boundary of the adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed
  • the method includes: the original adjacent reconstructed image block has a width W and a height n; or the original phase
  • the adjacent reconstructed image block has a width of W+H and a height of n; wherein W, H, and n are positive integers.
  • the image block to be processed is a rectangle
  • the width of the image block to be processed is W
  • the height is H
  • the original adjacent reconstructed image block is a rectangle
  • the original phase The right boundary of the adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed
  • the method includes: the original adjacent reconstructed image block has a width n and a height H; or the original phase
  • the adjacent reconstructed image block has a width n and a height W+H; wherein W, H, and n are positive integers.
  • n is 1 or 2.
  • the encoding apparatus is used for inter-frame bidirectional prediction.
  • the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, corresponding to
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block
  • the distortion value is Referring to the difference characterization values of the adjacent reconstructed image block and the original adjacent reconstructed image block, including: the distortion value is averaged by reference to the adjacent reconstructed image block and the original adjacent reconstructed image block Representing a difference characterization value, wherein the average reference neighboring reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or The distortion value is represented by an average of a first difference characterization value and a second difference characterization value, wherein the first difference characterization value is reconstructed by the
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, and the plurality of the reference neighbors
  • the reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block
  • the adjacent reconstructed image block of the image block to be processed includes a plurality of the original adjacent weights Constructing an image block, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion values being reconstructed by the reference neighbor And representing, by the difference characterization value of the image block and the original adjacent reconstructed image block, the distortion value is determined by the third reference neighboring reconstructed image block and the third original adjacent reconstructed image block And a difference characterization value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
  • the distortion value is obtained according to the following calculation formula:
  • Distortion represents the distortion value
  • represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block
  • p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  • the comparison module 1703 is specifically configured to: compare a size between the N distortion values; and assign a first identifier of each of the N candidate prediction motion information according to the comparison result.
  • Information wherein a length of a binary character string of the first identification information of the candidate prediction motion information having a smaller distortion value is less than or equal to a binary character of the first identification information used to encode the candidate prediction motion information having the larger distortion value The length of the string.
  • the comparison module 1703 is specifically configured to sequentially arrange the N candidate predicted motion information according to the distortion values from small to large or from large to small.
  • the acquiring module 1701 is specifically configured to: acquire, according to a preset sequence, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed that are different from each other.
  • the N candidate prediction motion information is specifically configured to: acquire, according to a preset sequence, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed that are different from each other. The N candidate prediction motion information.
  • the acquiring module 1701 is specifically configured to: acquire, according to a preset sequence, motion information of the M different image blocks having a preset positional relationship with the image block to be processed.
  • M candidate prediction motion information where the M candidate prediction motion information includes the N candidate prediction motion information, M is an integer greater than N, and determining a grouping manner of the M candidate prediction motion information; In the grouping manner, the N candidate predicted motion information is determined from the M candidate predicted motion information.
  • the encoding module 1704 is further configured to: program the grouping manner into the code stream.
  • the encoding module 1704 is further configured to: encode the N candidate prediction motion information into the code stream; Or, the second identification information indicating the N image blocks having the preset positional relationship with the image block to be processed is encoded into the code stream; or the N candidate prediction motion information is preset The third identification information of the correspondence is programmed into the code stream.
  • the encoding apparatus 1700 further includes a detecting module 1705, before the acquiring the distortion values corresponding to the N candidate prediction motion information, the detecting module 1705 is further configured to: determine An adjacent reconstructed image block of the image block to be processed exists.
  • the detecting module 1705 is specifically configured to: determine that at least one original adjacent reconstructed image block of the at least two of the original adjacent reconstructed image blocks exists.
  • the encoding apparatus 1700 further includes a decision module 1706, before the acquiring the distortion values corresponding to the N candidate prediction motion information, the determining module 1706 is configured to: determine to perform And acquiring the distortion value corresponding to each of the N candidate predicted motion information.
  • the decision module 1706 is specifically configured to: determine, according to the grouping manner, performing a distortion value corresponding to each of acquiring the N candidate prediction motion information.
  • the encoding module 1704 is further configured to: encode the fourth identification information into the Describe a code stream, where the fourth identifier information is used to determine that performing the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
  • the obtaining module 1701 is further configured to: determine P candidate predicted motion information from the M candidate predicted motion information, where the P candidate predicted motion information and the The same candidate prediction motion information does not exist between the N candidate prediction motion information, P is a positive integer, and P is smaller than M-1.
  • FIG. 18 is a schematic block diagram of a decoding apparatus 1800 according to an embodiment of the present application, including:
  • the parsing module 1801 is configured to parse the target identification information of the target predicted motion information of the to-be-processed image block from the code stream;
  • An obtaining module 1802 configured to determine N candidate predicted motion information, where the N candidate predicted motion information includes the target predicted motion information, where N is an integer greater than one;
  • a calculation module 1803 configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image The adjacent reconstructed image block of the block is determined;
  • a comparison module 1804 configured to determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and respective first One-to-one correspondence of identification information;
  • the selecting module 1805 is configured to determine candidate predicted motion information corresponding to the first identifier information that matches the target identifier information as the target predicted motion information.
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent reconstructed image block of the to-be-processed image block And including an original adjacent reconstructed image block corresponding to the reference adjacent reconstructed image block, the adjacent reconstructed image block of the reference image block whose distortion value is indicated by the candidate predicted motion information, and the image to be processed
  • the adjacent reconstructed image block of the block is determined to include: the distortion value is represented by a difference characterization value of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, the reference neighboring reconstruction
  • the image block is identical in shape and equal in size to the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block is opposite to the original adjacent reconstructed image block and The positional relationship between the image blocks to be processed is the same.
  • the difference characterization values of the reference adjacent reconstructed image block and the original adjacent reconstructed image block comprise: the reference adjacent reconstructed image block and the original phase An average absolute error of the adjacent reconstructed image block; an absolute error sum of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original adjacent weight a sum of squared errors of the image blocks; a squared sum of average errors of the reference neighboring reconstructed image blocks and the original neighboring reconstructed image blocks; the reference neighboring reconstructed image blocks and the original neighboring reconstructed An absolute Hadamard transform error sum of the image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring reconstructed image block And a similarity measure based on sequential similarity detection of the original adjacent reconstructed image block.
  • the system block is a rectangle
  • the image block to be processed has a width W and a height H
  • the original adjacent reconstructed image block is a rectangle.
  • the lower boundary of the adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width W and a height n; or the original adjacent reconstruction
  • the image block has a width of W+H and a height of n; where W, H, and n are positive integers.
  • the image block to be processed is a rectangle
  • the width of the image block to be processed is W
  • the height is H
  • the original adjacent reconstructed image block is a rectangle
  • the original phase The right boundary of the adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width n and a height H; or the original adjacent reconstruction
  • the image block has a width n and a height W + H; where W, H, n are positive integers.
  • n 1 or 2.
  • the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, correspondingly, the phase of the reference image block indicated by the candidate prediction motion information.
  • the adjacent reconstructed image block includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image block and the original adjacent weight Representing the difference characterization value of the image block, including: the distortion value is represented by an average reference neighboring reconstructed image block and a difference characterization value of the original adjacent reconstructed image block, wherein the average reference neighbor Reconstructing an image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or the distortion value is represented by a first difference representation value and a second difference Representing a mean value of the characterization value, wherein the first difference characterization value is represented by the difference characterization value of the first reference neighboring reconstructed image block and the
  • the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, and the plurality of the reference adjacent neighbors
  • the reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block
  • the adjacent reconstructed image block of the image block to be processed includes a plurality of the original adjacent weights Constructing an image block, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion values being reconstructed by the reference neighbor And representing, by the difference characterization value of the image block and the original adjacent reconstructed image block, the distortion value is determined by the third reference neighboring reconstructed image block and the third original adjacent reconstructed image block And a difference characterization value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
  • the distortion value is obtained according to the following calculation formula:
  • Distortion represents the distortion value
  • represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block
  • p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  • the comparing module 1804 is specifically configured to: compare a size between the N distortion values; and assign a first identifier of each of the N candidate prediction motion information according to the comparison result Information, wherein a length of a binary character string of the first identification information of the candidate prediction motion information having a smaller distortion value is less than a length of a binary character string of the first identification information of the candidate prediction motion information having the larger distortion value .
  • the comparison module 1804 is specifically configured to sequentially arrange the N candidate predicted motion information according to the distortion values from small to large or from large to small.
  • the acquiring module 1802 is specifically configured to: acquire, according to a preset sequence, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed that are different from each other.
  • the N candidate prediction motion information is specifically configured to: acquire, according to a preset sequence, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed that are different from each other. The N candidate prediction motion information.
  • the acquisition module 1802 is specifically configured to: acquire motion information of M image blocks having a preset positional relationship with the image block to be processed that are different from each other according to a preset sequence.
  • M candidate prediction motion information where the M candidate prediction motion information includes the N candidate prediction motion information, M is an integer greater than N, and determining a grouping manner of the M candidate prediction motion information; Determining the target identification information and the grouping manner, and determining the N candidate predicted motion information from the M candidate predicted motion information.
  • the obtaining module 1802 is specifically configured to: determine the preset grouping manner; or obtain the grouping manner by parsing from the code stream.
  • the acquisition module 1802 is specifically configured to: parse coding information of the plurality of candidate prediction motion information in the code stream to obtain the N candidate prediction motion information; or And parsing the second identifier information in the code stream to obtain the N candidate image blocks indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate motion information. Or parsing the third identification information in the code stream to obtain the N candidate prediction motion information that has a preset correspondence relationship with the third identification information.
  • the apparatus 1800 further includes:
  • the detecting module 1806 is configured to determine that adjacent reconstructed image blocks of the image block to be processed are available.
  • the detecting module 1806 is specifically configured to: determine At least one of the at least two of the original adjacent reconstructed image blocks is available for use with the original adjacent reconstructed image block.
  • the apparatus further includes:
  • the decision module 1807 is configured to determine to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
  • the determining module 1807 is specifically configured to: determine, according to the grouping manner, performing the acquiring a distortion value corresponding to each of the N candidate prediction motion information; or parsing the code
  • the fourth identification information in the stream is determined to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
  • FIG. 19 shows a schematic block diagram of an apparatus 1900 in accordance with an embodiment of the present application.
  • the device includes:
  • a memory 1901 configured to store a program, where the program includes a code
  • a transceiver 1902 for communicating with other devices
  • the processor 1903 is configured to execute program code in the memory 1901.
  • the processor 1903 may implement various operations of the method 1000 or the method 1100, and details are not described herein.
  • the transceiver 1902 is configured to perform specific signal transceiving under the driving of the processor 1903.
  • 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 corresponding to a tangible medium such as a data storage medium, the communication medium comprising any medium that facilitates transfer of the computer program from one place to another in accordance with a communication protocol .
  • 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.
  • 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.
  • processors such as one or more digital signal processors, general purpose microprocessors, application specific integrated circuits, field programmable gate arrays, or other equivalent integrated or discrete logic circuits.
  • processors such as one or more digital signal processors, general purpose microprocessors, application specific integrated circuits, field programmable gate arrays, or other equivalent integrated or discrete logic circuits.
  • processors may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein.
  • 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.
  • 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 by interoperable hardware units (including one or more processors as described above) in conjunction with suitable software and/or firmware.
  • the collection comes to offer.

Abstract

Provided are an encoding and decoding method and apparatus for predicted motion information about an image block. The decoding method comprises: parsing a code stream to obtain target identification information about target predicted motion information about an image block to be processed; determining N pieces of candidate predicted motion information, the N pieces of candidate predicted motion information comprising the target predicted motion information, where N is an integer greater than 1; acquiring a distortion value corresponding to each of the N pieces of candidate predicted motion information, the distortion value being determined by a reconstructed image block adjacent to a reference image block indicated by the candidate predicted motion information and a reconstructed image block adjacent to the image block to be processed; according to magnitude relationships of the acquired N distortion values, determining first identification information about each of the N pieces of candidate predicted motion information, the N pieces of candidate predicted motion information corresponding to respective pieces of first identification information on a one-to-one basis; and determining candidate predicted motion information corresponding to first identification information matching the target identification information to be the target predicted motion information.

Description

一种运动信息的编解码方法和装置Method and device for encoding and decoding motion information
本申请要求于2017年9月12日提交中国专利局、申请号为201710818690.5、申请名称为“一种运动信息的编解码方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200910818690.5, filed on Sep. 12, 2017, the entire disclosure of which is incorporated herein by reference. In this application.
技术领域Technical field
本申请涉及视频图像技术领域,尤其涉及一种运动信息的编解码方法和装置。The present application relates to the field of video image technology, and in particular, to a method and apparatus for encoding and decoding motion information.
背景技术Background technique
数字视频能力可应用于很多设备中,包含数字电视、数字直播系统、无线广播系统、个人数字助理(personal digital assistant,PDA)、笔记本或台式计算机、平板计算机、电子书阅读器、数码相机、数字记录装置、数字媒体播放器、视频游戏装置、视频游戏控制台、蜂窝式或卫星无线电电话、视频会议装置、视频流装置等等。数字视频装置实施视频压缩技术,例如由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)标准定义的标准和所述标准的扩展部分中所描述的那些视频压缩技术,从而更高效地发送及接收数字视频信息。视频装置可通过实施这些视频编解码技术来更高效地发送、接收、编码、解码和/或存储数字视频信息。Digital video capabilities can be applied to many devices, including digital TV, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), notebook or desktop computers, tablet computers, e-book readers, digital cameras, digital Recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio phones, video conferencing devices, video streaming devices, and the like. Digital video devices implement video compression techniques, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264/MPEG-4, Part 10, advanced video coding (AVC), ITU- The TH.265 high efficiency video coding (HEVC) standard defines standards and those described in the extensions of the standard to more efficiently transmit and receive digital video information. Video devices may transmit, receive, encode, decode, and/or store digital video information more efficiently by implementing these video codec techniques.
视频压缩技术执行空间(图像内)预测和/或时间(图像间)预测,以减少或移除视频序列中固有的冗余。对于基于块的视频解码,可将视频图像分割成视频块,视频块还可被称作树块、编码单元(coding unit,CU)、解码单元、解码节点等等。使用同一图像中的相邻块中的参考样本的空间预测来编码图像的帧内解码(I)条带中的视频块。使用同一图像中的相邻块中的参考样本的空间预测或其它参考图像中的参考样本的时间预测来编码图像的帧间解码(P或B)条带中的视频块。图像可被称作帧,且参考图像可被称作参考帧。Video compression techniques perform spatial (intra-image) prediction and/or temporal (inter-image) prediction to reduce or remove redundancy inherent in video sequences. For block-based video decoding, a video image may be partitioned into video blocks, which may also be referred to as treeblocks, coding units (CUs), decoding units, decoding nodes, and the like. A video block in an intra-coded (I) slice of an image is encoded using spatial prediction of reference samples in neighboring blocks in the same image. A video block in an inter-coded (P or B) strip of an image is encoded using spatial prediction of reference samples in neighboring blocks in the same image or temporal prediction of reference samples in other reference pictures. An image may be referred to as a frame, and a reference image may be referred to as a reference frame.
发明内容Summary of the invention
本申请介绍了一种预测方法,具体的:当待处理块具有多个候选预测运动信息时,以待处理块和待处理块的候选预测运动信息所指示的参考图像块之间的相似度为先验知识,来协助确定各个候选预测运动信息的标识的编码方式,从而达到节省编码比特,提高编码效率的目的。在一种可行的实施方式中,由于待处理块的像素值无法在解码端直接获得,因此上述相似度被用待处理块周边的重构像素集合和参考图像块对应的重构像素集合的相似度所近似,也就是说,待处理块周边的重构像素集合和参考图像块对应的重构像素集合的相似度用来表征待处理块和待处理块的候选预测运动信息所指示的参考图像块之间的相似度。The present application introduces a prediction method. Specifically, when the to-be-processed block has a plurality of candidate prediction motion information, the similarity between the reference image blocks indicated by the candidate prediction motion information of the to-be-processed block and the to-be-processed block is A priori knowledge to assist in determining the coding mode of the identification of each candidate prediction motion information, thereby achieving the purpose of saving coding bits and improving coding efficiency. In a feasible implementation manner, since the pixel value of the to-be-processed block cannot be directly obtained at the decoding end, the similarity is similar to the reconstructed pixel set corresponding to the block to be processed and the reconstructed pixel set corresponding to the reference image block. The degree is approximated, that is, the similarity between the reconstructed pixel set around the block to be processed and the reconstructed pixel set corresponding to the reference image block is used to represent the reference image indicated by the candidate predicted motion information of the block to be processed and the block to be processed. The similarity between blocks.
应理解,以编码端为例,本申请实施例适用于从待处理块的多个参考图像块中,确定一个参考图像块,并编码该参考图像块的标识信息的场景。而与该多个参考图像 块来自于帧间类型的预测模式,来自于帧内类型的预测模式,还是来自视点间的预测模式(多视点或三维视频编码,Multi-view or 3D Video Codig),还是来自层间的预测模式(可伸缩视频编码,Scalabe Video Coding)无关,与具体的参考图像块的获得方法(比如采用ATMVP还是STMVP,或者帧内区块复制模式)无关,与指示参考图像块的运动信息是属于整个编码单元的运动矢量,还是属于编码单元中某个子编码单元的运动信息无关,上述符合本申请实施例适用场景的各种预测模式以及获取参考图像块的方法(即获取运动信息的方法)都可以依照或者结合本申请实施例中的方案,达到提高编码效率的技术效果。It should be understood that, taking the coding end as an example, the embodiment of the present application is applicable to a scenario in which a reference image block is determined from a plurality of reference image blocks of a to-be-processed block, and the identification information of the reference image block is encoded. And the plurality of reference image blocks are derived from an inter-frame type prediction mode, from an intra-frame type prediction mode, or from a viewpoint-to-view mode (Multi-view or 3D Video Codig). It is also independent of the prediction mode (scalable video coding, Scalabe Video Coding) from the layer, regardless of the specific reference image block acquisition method (such as using ATMVP or STMVP, or intra block copy mode), and indicating the reference image block. Whether the motion information belongs to the motion vector of the entire coding unit or the motion information belonging to a certain sub-coding unit in the coding unit, the foregoing various prediction modes conforming to the applicable scene of the embodiment of the present application and the method for acquiring the reference image block (ie, acquiring motion) The method of the information can achieve the technical effect of improving the coding efficiency according to or in combination with the solution in the embodiment of the present application.
在本申请实施例的第一方面,提供了一种图像块预测运动信息的编码方法包括步骤:获取待处理图像块的N个候选预测运动信息。其中,N为大于1的整数。该N个候选预测运动信息互不相同。应理解,当运动信息包括运动矢量和参考帧信息时,运动信息互不相同,也包括运动矢量相同但参考帧信息不同的情况。前文中已经介绍了修剪的技术,应理解,在获得待处理图像块的N个候选预测运动信息的过程中,进行了修剪的操作,以使最终获得的N个候选预测运动信息互不相同,不再赘述。在一种可行的实施方式中,所述获取待处理图像块的N个候选预测运动信息,包括:按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。在一种可行的实施方式中,所述获取待处理图像块的N个候选预测运动信息,包括:按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;确定所述M个候选预测运动信息的分组方式;根据所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。对于各个分组,可以采取不同的处理方式,也可以采取相同的处理方式。在一种可行的实施方式中,将所述分组方式编入码流。在一种可行的实施方式中,分组方式是编解码端通过预先设置的协议分别固化在编解码端并保持一致的。同时,编码端还需要使解码端获知具体的候选预测运动信息。在一种可行的实施方式中,将候选预测运动信息编入码流;或者,将指示与所述待处理图像块具有预设位置关系的图像块的第二标识信息编入所述码流;或者,将与所述N个候选预测运动信息具有预设对应关系的第三标识信息编入所述码流。在一种可行的实施方式中,候选预测运动信息是编解码端通过预先设置的协议分别固化在编解码端并保持一致的。In a first aspect of the embodiments of the present application, an encoding method for image block prediction motion information is provided, including the steps of: acquiring N candidate prediction motion information of an image block to be processed. Where N is an integer greater than one. The N candidate predicted motion informations are different from each other. It should be understood that when the motion information includes the motion vector and the reference frame information, the motion information is different from each other, and also includes the case where the motion vectors are the same but the reference frame information is different. The technique of pruning has been introduced in the foregoing, and it should be understood that in the process of obtaining N candidate prediction motion information of an image block to be processed, a pruning operation is performed, so that the N candidate motion information obtained finally is different from each other. No longer. In a feasible implementation manner, the acquiring the N candidate predicted motion information of the to-be-processed image block includes: acquiring N mutually different image blocks having a preset position according to a preset sequence The motion information of the image block of the relationship is used as the N candidate prediction motion information. In a feasible implementation manner, the acquiring the N candidate predicted motion information of the to-be-processed image block includes: acquiring, in a preset order, M different preset positions and the image block to be processed having a preset position The motion information of the image block of the relationship is the M candidate prediction motion information, wherein the M candidate prediction motion information includes the N candidate prediction motion information, and M is an integer greater than N; determining the M candidate prediction motions a manner of grouping information; determining, according to the grouping manner, the N candidate predicted motion information from the M candidate predicted motion information. For each grouping, different processing methods can be adopted, or the same processing method can be adopted. In a possible implementation, the grouping method is programmed into a code stream. In a feasible implementation manner, the grouping mode is that the codec end is respectively solidified on the codec end and maintained consistent through a preset protocol. At the same time, the encoding end also needs to make the decoding end know the specific candidate prediction motion information. In a feasible implementation manner, the candidate prediction motion information is encoded into the code stream; or the second identification information indicating the image block having the preset positional relationship with the to-be-processed image block is encoded into the code stream; Or, the third identification information that has a preset correspondence relationship with the N candidate predicted motion information is encoded into the code stream. In a feasible implementation manner, the candidate prediction motion information is that the codec end is respectively solidified at the codec end and maintained consistent by a preset protocol.
对候选预测运动信息进行分组,并且允许不同的分组采用不同的处理方式,使编码方式更加灵活,并且减低了计算的复杂度。The candidate prediction motion information is grouped, and different packets are allowed to adopt different processing manners, which makes the coding method more flexible and reduces the computational complexity.
该编码方法还包括步骤:确定所述待处理图像块的相邻重构图像块可用。在一种可行的实施方式中,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述确定所述待处理图像块的相邻重构图像块可用,包括:确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。在一些实施例中,需要编码标识信息来编码上述分组方式和/或每个分组的处理方式等辅助信息,在这样的实施例中,也可以先确定待处理图像块的相邻重构图像块的可用性。The encoding method further includes the step of determining that adjacent reconstructed image blocks of the image block to be processed are available. In a feasible implementation manner, when the adjacent reconstructed image block of the to-be-processed image block includes at least two of the original adjacent reconstructed image blocks, determining the adjacent of the to-be-processed image block Reconstructing the image block is operative, comprising determining that at least one of the at least two of the original adjacent reconstructed image blocks is available. In some embodiments, the identification information is required to encode the auxiliary information such as the foregoing grouping manner and/or the processing manner of each packet. In such an embodiment, the adjacent reconstructed image block of the image block to be processed may also be determined first. Availability.
当相邻重构图像块不可用时,可以直接采用传统方式进行编码,而不需要进一步 编码上述辅助信息,从而节省编码比特。When adjacent reconstructed image blocks are not available, they can be directly encoded in a conventional manner without further encoding the above auxiliary information, thereby saving coded bits.
该编码方法还包括步骤:获取所述N个候选预测运动信息各自对应的失真值。所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形。在一种可行的实施方式中,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,所述原始相邻重构图像块的宽为W,高为n;在一种可行的实施方式中,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,所述原始相邻重构图像块的宽为W+H,高为n;在一种可行的实施方式中,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,所述原始相邻重构图像块的宽为n,高为H;在一种可行的实施方式中,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,所述原始相邻重构图像块的宽为n,高为W+H。其中W,H,n为正整数。The encoding method further includes the step of: acquiring distortion values corresponding to the N candidate prediction motion information. The reference adjacent reconstructed image block is identical in shape and equal in size to the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block is opposite to the original The positional relationship between the adjacent reconstructed image block and the image block to be processed is the same. The image block to be processed is a rectangle, and the image block to be processed has a width W and a height H, and the original adjacent reconstructed image block is a rectangle. In a feasible implementation manner, a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and a width of the original adjacent reconstructed image block is W, and the height is In a feasible implementation manner, a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and a width of the original adjacent reconstructed image block is W+ H, the height is n; in a feasible implementation manner, a right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, and the original adjacent reconstructed image block is The width is n and the height is H. In a feasible implementation, the right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, and the original adjacent reconstructed image The width of the block is n and the height is W+H. Where W, H, and n are positive integers.
在一种可行的实施方式中,按照编码系统对存储空间(line buffer)的要求,可以设置上述n为1或2,从而不需要额外的存储空间存储原始相邻重构图像块,简化了硬件实现。In a feasible implementation manner, according to the requirement of the coding system for the line buffer, the above n may be set to 1 or 2, so that no additional storage space is needed to store the original adjacent reconstructed image block, which simplifies the hardware. achieve.
该步骤首先需要获得N个候选预测运动信息所指示的待处理图像块的参考图像块的参考相邻重构图像块。在一种可行的实施方式中,候选预测运动信息中的运动矢量指向的是参考帧中分像素的位置,此时需要对参考帧图像或者参考帧图像的一部分进行分像素精度的图像插值以获得参考图像块的参考相邻重构图像块,此时可以采用{-1,4,-11,40,40,-11,4,-1}的8抽头滤波器进行分像素插值,或者,为了简化计算复杂度,也可以采用双线性插值滤波器进行分像素插值。This step first needs to obtain a reference adjacent reconstructed image block of the reference image block of the image block to be processed indicated by the N candidate prediction motion information. In a feasible implementation manner, the motion vector in the candidate prediction motion information points to the position of the sub-pixel in the reference frame, and at this time, the pixel of the reference frame image or the reference frame image needs to be interpolated to obtain the image. Referring to the adjacent reconstructed image block of the reference image block, the 8-tap filter of {-1, 4, -11, 40, 40, -11, 4, -1} may be used for pixel interpolation, or Simplify the computational complexity, and you can also use bilinear interpolation filters for subpixel interpolation.
使用更简单的插值滤波器降低了算法实现的复杂度。Using a simpler interpolation filter reduces the complexity of the algorithm implementation.
该步骤然后计算参考图像块的参考相邻重构图像块和待处理块的原始相邻重构图像块的差异表征值作为失真值。该差异表征值可以有多种计算方式,比如平均绝对误差(MAD),绝对误差和(SAD),误差平方和(SSD),平均误差平方和(MSD),绝对哈达玛变换误差和(SATD),归一化积相关性度量值(NCC),或者,基于序贯相似性检测(SSDA)的相似性度量值等等。当原始相邻重构图像块具有多个时,不妨设所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,对应的,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,则所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。更一般的,所述失真值根据如下计算式获得:This step then calculates a difference characterization value of the reference neighboring reconstructed image block of the reference image block and the original adjacent reconstructed image block of the block to be processed as a distortion value. The difference characterization value can be calculated in a variety of ways, such as mean absolute error (MAD), absolute error sum (SAD), sum of squared errors (SSD), sum of squared errors (MSD), absolute Hadamard transform error and (SATD) , normalized product correlation measure (NCC), or similarity measure based on sequential similarity detection (SSDA), and so on. When there are a plurality of original adjacent reconstructed image blocks, it may be assumed that the plurality of the original adjacent reconstructed image blocks include a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, corresponding to The plurality of the reference adjacent reconstructed image blocks include a third reference neighboring reconstructed image block and a fourth reference neighboring reconstructed image block, and the distortion value is determined by the reference neighboring reconstructed image And a difference characterization value of the block and the original adjacent reconstructed image block, including: a difference between the distortion value by the third reference neighboring reconstructed image block and the third original neighbor reconstructed image block And a representation value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block. More generally, the distortion value is obtained according to the following calculation formula:
Figure PCTCN2018102632-appb-000001
Figure PCTCN2018102632-appb-000001
其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。根据实际采用的计算差异值的方法, Delta为MAD,SAD,SSD等上述各种计算方式的表达式。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value. According to the method used to calculate the difference value, Delta is an expression of various calculation methods such as MAD, SAD, and SSD.
在一种可行的实施方式中,本发明实施例应用于帧间双向预测,不妨设,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。In a possible implementation, the embodiment of the present invention is applied to inter-frame bidirectional prediction, and the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, corresponding to The adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference Representing a difference characterization value of the adjacent reconstructed image block and the original adjacent reconstructed image block, comprising: the difference between the distortion reference value by the average reference adjacent reconstructed image block and the original adjacent reconstructed image block Representing a value, wherein the average reference neighboring reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or The distortion value is represented by a mean of a first difference representation value and a second difference representation value, wherein the first difference representation value is from the first reference neighbor reconstructed image block and the original neighbor reconstructed image Block Characterizing said difference values to represent said second difference value characterizing the reconstructed image block adjacent to the second reference and the original difference value characterizing the adjacent reconstructed image block is represented.
在一种可行的实施方式中,待处理图像块具有子块级的候选预测运动信息,可以分别求得与原始相邻重构图像块相邻的每个子块对应的失真值,并求和,作为待处理图像块的失真值。In a feasible implementation manner, the image block to be processed has candidate prediction motion information at the sub-block level, and the distortion values corresponding to each sub-block adjacent to the original adjacent reconstructed image block may be respectively obtained and summed. As the distortion value of the image block to be processed.
该编码方法还包括步骤:根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应。The encoding method further includes the step of: determining first identification information of each of the N candidate prediction motion information according to a size relationship between the acquired N distortion values, the N candidate prediction motion information and respective One identification information corresponds one by one.
该步骤首先首先比较N个失真值之间的大小,具体的,可以按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。然后,按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息。其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串的长度小于等于用于,即不大于,编码所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。The step firstly compares the sizes between the N distortion values. Specifically, the N candidate prediction motion information may be sequentially arranged according to the distortion values from small to large or from large to small. Then, the first identification information of each of the N candidate predicted motion information is given according to the comparison result. The length of the binary character string of the first identification information of the candidate prediction motion information with the smaller distortion value is less than or equal to, for example, not greater than, the first identification information of the candidate prediction motion information that encodes the distortion value is large. The length of the binary string.
相似度大(失真值小)的候选预测运动信息被最终选中成为预测信息的概率更大,对其赋予更短码字的二进制字符串来表示标识值,能够节省编码比特,提高编码效率。The candidate prediction motion information with large similarity (small distortion value) is more likely to be selected as prediction information, and a binary character string of a shorter codeword is given to represent the identification value, which can save coding bits and improve coding efficiency.
该编码方法还包括步骤:当所述待处理图像块的目标预测运动信息为所述已确定第一标识信息的N个候选预测运动信息中的一个时,将所述目标预测运动信息的第一标识信息编入码流。The encoding method further includes the step of: when the target predicted motion information of the image block to be processed is one of the N candidate predicted motion information of the determined first identification information, the first of the target predicted motion information The identification information is programmed into the code stream.
在本申请实施例的第二方面提供了一种图像块预测运动信息的解码方法,包括:从码流中解析出待处理图像块的目标预测运动信息的目标标识信息;确定N个候选预测运动信息,所述N个候选预测运动信息包括所述目标预测运动信息,其中,N为大于1的整数;获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;将与所述目标标识信息匹配的第一标识信息对应的候选预测运动信息确定为所述目标预测运动信息。A second aspect of the embodiments of the present application provides a method for decoding image block prediction motion information, including: parsing target identification information of target prediction motion information of a to-be-processed image block from a code stream; and determining N candidate prediction motions. Information, the N candidate prediction motion information includes the target prediction motion information, where N is an integer greater than 1, and acquiring distortion values corresponding to the N candidate prediction motion information, the distortion values being by the candidate Determining the adjacent reconstructed image block of the reference image block indicated by the motion information and the adjacent reconstructed image block of the image block to be processed; determining the N according to a size relationship between the acquired N distortion values The first identification information of the candidate prediction motion information, the N candidate prediction motion information and the respective first identification information are in one-to-one correspondence; the candidate prediction motion information corresponding to the first identification information that matches the target identification information It is determined that the motion information is predicted for the target.
当待处理块具有多个候选预测运动矢量时,以待处理块和待处理块的候选预测运动矢量所指示的参考图像块之间的相似度为先验知识,来协助确定各个候选预测运动 矢量的标识的编码方式,从而达到节省编码比特,提高编码效率的目的。本申请实施例第二方面的各实施方式与第一方面的编码方法相对应,有益技术效果相同,可参考第一方面关于技术效果的描述,不再赘述。When the to-be-processed block has a plurality of candidate prediction motion vectors, the similarity between the reference image blocks indicated by the candidate prediction motion vector of the to-be-processed block and the to-be-processed block is a priori knowledge to assist in determining each candidate prediction motion vector. The encoding of the identifier, thereby achieving the purpose of saving coding bits and improving coding efficiency. The embodiments of the second aspect of the present application are related to the coding method of the first aspect, and the beneficial technical effects are the same. Reference may be made to the description of the technical effects in the first aspect, and details are not described herein.
在第二方面的一种可行的实施方式中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括参考相邻重构图像块,所述待处理图像块的相邻重构图像块包括与所述参考相邻重构图像块对应的原始相邻重构图像块,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定,包括:所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。In a possible implementation manner of the second aspect, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent weight of the to-be-processed image block The image block includes an original adjacent reconstructed image block corresponding to the reference neighboring reconstructed image block, the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information, and the The adjacent reconstructed image block of the image block to be processed is determined to include: the distortion value is represented by a difference characterization value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block, the reference phase The adjacent reconstructed image block has the same shape and the same size as the original adjacent reconstructed image block, and the positional relationship between the reference adjacent reconstructed image block and the reference image block and the original adjacent reconstruction The positional relationship between the image block and the image block to be processed is the same.
在第二方面的一种可行的实施方式中,所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值,包括:所述参考相邻重构图像块和所述原始相邻重构图像块的平均绝对误差;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的平均误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对哈达玛变换误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的归一化积相关性度量值;或,所述参考相邻重构图像块和所述原始相邻重构图像块的基于序贯相似性检测的相似性度量值。In a possible implementation manner of the second aspect, the difference characterization value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block includes: the reference adjacent reconstructed image block and the An average absolute error of the original adjacent reconstructed image block; an absolute error sum of the reference neighboring reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original a sum of squared errors of adjacent reconstructed image blocks; a squared sum of average errors of said reference neighboring reconstructed image blocks and said original adjacent reconstructed image blocks; said reference adjacent reconstructed image block and said original phase An absolute Hadamard transform error sum of the neighboring reconstructed image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring weight A similarity measure based on sequential similarity detection of the image block and the original adjacent reconstructed image block.
在第二方面的一种可行的实施方式中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,包括:所述原始相邻重构图像块的宽为W,高为n;或者,所述原始相邻重构图像块的宽为W+H,高为n;其中W,H,n为正整数。In a possible implementation manner of the second aspect, the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The lower boundary of the original adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, including: the original adjacent reconstructed image block has a width W and a height n; or, the original phase The adjacent reconstructed image block has a width of W+H and a height of n; wherein W, H, and n are positive integers.
在第二方面的一种可行的实施方式中,其特征在于,n为1或2。In a possible embodiment of the second aspect, characterized in that n is 1 or 2.
在第二方面的一种可行的实施方式中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,包括:所述原始相邻重构图像块的宽为n,高为H;或者,所述原始相邻重构图像块的宽为n,高为W+H;其中W,H,n为正整数。In a possible implementation manner of the second aspect, the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The right boundary of the original adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width n and a height H; or the original phase The adjacent reconstructed image block has a width n and a height W+H; wherein W, H, and n are positive integers.
在第二方面的一种可行的实施方式中,n为1或2。In a possible embodiment of the second aspect, n is 1 or 2.
在第二方面的一种可行的实施方式中,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差 异表征值来表示。In a possible implementation manner of the second aspect, the reference image block indicated by the candidate predicted motion information includes a first reference image block and a second reference image block, correspondingly, the reference image indicated by the candidate predicted motion information The adjacent reconstructed image block of the block includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image block and the original Representing a difference characterization value of an adjacent reconstructed image block, including: the distortion value is represented by an average reference adjacent reconstructed image block and a difference characterization value of the original adjacent reconstructed image block, wherein the average The reference adjacent reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or the distortion value is represented by the first difference and Representing a mean value of the second difference characterization value, wherein the first difference characterization value is represented by the difference characterization value of the first reference neighboring reconstructed image block and the original neighboring reconstructed image block, The second Characterization of different values of the original block and the reconstructed image by the second reference difference value characterizing the adjacent reconstructed image block adjacent to represent.
在第二方面的一种可行的实施方式中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括多个所述参考相邻重构图像块,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,对应的,所述待处理图像块的相邻重构图像块包括多个所述原始相邻重构图像块,所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。In a possible implementation manner of the second aspect, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, the plurality of The reference adjacent reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block, correspondingly, the adjacent reconstructed image block of the to-be-processed image block includes a plurality of the original An adjacent reconstructed image block, the plurality of the original adjacent reconstructed image blocks including a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion value being determined by the reference phase And representing, by the difference representation value of the adjacent reconstructed image block and the original adjacent reconstructed image block, comprising: the distortion value is reconstructed by the third reference neighboring reconstructed image block and the third original neighboring block And a difference characterization value of the image block and a sum of difference characterization values of the fourth reference adjacent reconstructed image block and the fourth original adjacent reconstructed image block.
在第二方面的一种可行的实施方式中,所述失真值根据如下计算式获得:In a possible implementation manner of the second aspect, the distortion value is obtained according to the following calculation formula:
Figure PCTCN2018102632-appb-000002
Figure PCTCN2018102632-appb-000002
其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
在第二方面的一种可行的实施方式中,所述根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,包括:比较所述N个失真值之间的大小;按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息,其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串的长度小于等于所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。In a possible implementation manner of the second aspect, the determining, according to the magnitude relationship between the acquired N distortion values, the first identification information of each of the N candidate prediction motion information, including: a size between the N pieces of distortion values; a first identification information of each of the N candidate prediction motion information is given according to the comparison result, wherein the first identification information of the candidate prediction motion information with the smaller distortion value is The length of the binary string is less than or equal to the length of the binary string of the first identification information of the candidate prediction motion information having the larger distortion value.
在第二方面的一种可行的实施方式中,所述比较所述N个失真值之间的大小,包括:按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。In a possible implementation manner of the second aspect, the comparing a size between the N distortion values includes: sequentially arranging the N according to the distortion value from small to large or from large to small Candidate prediction motion information.
在第二方面的一种可行的实施方式中,所述确定N个候选预测运动信息,包括:按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。In a possible implementation manner of the second aspect, the determining the N candidate prediction motion information includes: acquiring, in a preset order, N different preset positions with the to-be-processed image block. The motion information of the image block is used as the N candidate prediction motion information.
在第二方面的一种可行的实施方式中,所述确定N个候选预测运动信息,包括:按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;确定所述M个候选预测运动信息的分组方式;根据所述目标标识信息和所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。In a possible implementation manner of the second aspect, the determining the N candidate prediction motion information includes: acquiring, in a preset sequence, the M different preset positions with the to-be-processed image block. Motion information of the image block as M candidate prediction motion information, wherein the M candidate prediction motion information includes the N candidate prediction motion information, M is an integer greater than N; and the M candidate prediction motion information is determined a grouping manner; determining, according to the target identification information and the grouping manner, the N candidate prediction motion information from the M candidate prediction motion information.
在第二方面的一种可行的实施方式中,所述确定所述M个候选预测运动信息的分组方式,包括:确定预设的所述分组方式;或者,从所述码流中解析获得所述分组方式。In a possible implementation manner of the second aspect, the determining a manner of grouping the M candidate prediction motion information includes: determining a preset manner of the grouping; or analyzing and obtaining the method from the code stream. The grouping method.
在第二方面的一种可行的实施方式中,所述确定N个候选预测运动信息,包括:解析所述码流中的所述多个候选预测运动信息的编码信息,以获得所述N个候选预测 运动信息;或者,解析所述码流中的第二标识信息,以获得所述第二标识信息指示的N个候选图像块,并以所述N个候选图像块的运动信息作为所述N个候选预测运动信息;或者,解析所述码流中的第三标识信息,以获得与所述第三标识信息具有预设对应关系的所述N个候选预测运动信息。In a possible implementation manner of the second aspect, the determining the N candidate prediction motion information includes: parsing coding information of the multiple candidate prediction motion information in the code stream, to obtain the N And predicting the motion information; or parsing the second identifier information in the code stream to obtain the N candidate image blocks indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate prediction motion information; or parsing third identification information in the code stream to obtain the N candidate prediction motion information having a preset correspondence relationship with the third identification information.
在第二方面的一种可行的实施方式中,在所述获取所述N个候选预测运动信息各自对应的失真值之前,所述方法还包括:确定所述待处理图像块的相邻重构图像块可用。In a possible implementation manner of the second aspect, before the obtaining the distortion value corresponding to each of the N candidate prediction motion information, the method further includes: determining adjacent reconstruction of the to-be-processed image block Image blocks are available.
在第二方面的一种可行的实施方式中,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述确定所述待处理图像块的相邻重构图像块可用,包括:确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。In a possible implementation manner of the second aspect, when the adjacent reconstructed image block of the to-be-processed image block includes at least two of the original adjacent reconstructed image blocks, the determining the image to be processed The adjacent reconstructed image blocks of the block are usable, comprising: determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
在第二方面的一种可行的实施方式中,在所述确定N个候选预测运动信息之后,所述方法还包括:确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation manner of the second aspect, after the determining the N candidate prediction motion information, the method further includes: determining to perform the acquiring the distortion value corresponding to each of the N candidate prediction motion information.
在第二方面的一种可行的实施方式中,所述确定执行所述获取所述N个候选预测运动信息各自对应的失真值,包括:根据所述分组方式,确定执行所述获取所述N个候选预测运动信息各自对应的失真值;或者,解析所述码流中的第四标识信息以确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation manner of the second aspect, the determining, by performing the acquiring the distortion value corresponding to each of the N candidate prediction motion information, includes determining, according to the grouping manner, performing the acquiring the N Each of the candidate prediction motion information corresponding to the distortion value; or, the fourth identification information in the code stream is parsed to determine to perform the acquiring the distortion value corresponding to each of the N candidate prediction motion information.
本申请实施例的第三方面提供了一种图像块预测运动信息的编码装置,包括:获取模块,用于获取待处理图像块的N个候选预测运动信息,其中,N为大于1的整数;计算模块,用于获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;比较模块,用于根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;编码模块,用于当所述待处理图像块的目标预测运动信息为所述已确定第一标识信息的N个候选预测运动信息中的一个时,将所述目标预测运动信息的第一标识信息编入码流。A third aspect of the embodiments of the present disclosure provides an apparatus for encoding image block prediction motion information, including: an acquiring module, configured to acquire N candidate prediction motion information of an image block to be processed, where N is an integer greater than one; a calculation module, configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image block a neighboring reconstructed image block determining; a comparing module, configured to determine first identification information of each of the N candidate predicted motion information according to a size relationship between the acquired N distortion values, the N candidates The prediction motion information and the respective first identification information are in one-to-one correspondence; the encoding module is configured to: when the target predicted motion information of the to-be-processed image block is one of the N candidate predicted motion information of the determined first identifier information At the time, the first identification information of the target predicted motion information is encoded into the code stream.
在第三方面的一种可行的实施方式中,所述编码装置还包括检测模块,用于确定所述待处理图像块的相邻重构图像块存在。In a possible implementation manner of the third aspect, the encoding apparatus further includes a detecting module, configured to determine that the adjacent reconstructed image block of the to-be-processed image block exists.
在第三方面的一种可行的实施方式中,所述编码装置还包括决策模块,用于确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation manner of the third aspect, the encoding apparatus further includes a determining module, configured to determine to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
本申请实施例的第四方面提供了一种图像块预测运动信息的解码装置,包括:解析模块,用于从码流中解析出待处理图像块的目标预测运动信息的目标标识信息;获取模块,用于确定N个候选预测运动信息,所述N个候选预测运动信息包括所述目标预测运动信息,其中,N为大于1的整数;计算模块,用于获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;比较模块,用于根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;选择模块,用于将与所述目标标识信息匹配的第一标识信息对应的候选预测运动信息确定为所述目 标预测运动信息。A fourth aspect of the embodiments of the present application provides a decoding apparatus for predicting motion information of an image block, including: a parsing module, configured to parse target identification information of target predicted motion information of an image block to be processed from a code stream; And for determining the N candidate prediction motion information, where the N candidate prediction motion information includes the target prediction motion information, where N is an integer greater than 1; and a calculation module, configured to acquire the N candidate prediction motion information Corresponding distortion values, which are determined by adjacent reconstructed image blocks of the reference image block indicated by the candidate predicted motion information and adjacent reconstructed image blocks of the image block to be processed; a comparison module, Determining, according to the magnitude relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, where the N candidate prediction motion information and the respective first identification information are in one-to-one correspondence; a selection module, configured to determine candidate predicted motion information corresponding to the first identifier information that matches the target identifier information as the target predicted motion information
在第四方面的一种可行的实施方式中,所述解码装置还包括检测模块,用于确定所述待处理图像块的相邻重构图像块存在。In a possible implementation manner of the fourth aspect, the decoding apparatus further includes a detecting module, configured to determine that the adjacent reconstructed image block of the to-be-processed image block exists.
在第四方面的一种可行的实施方式中,所述解码装置还包括决策模块,用于确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation manner of the fourth aspect, the decoding apparatus further includes a determining module, configured to determine to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
本申请实施例的第五方面提供了一种图像块预测运动信息的处理装置,包括:存储器,用于存储程序,所述程序包括代码;收发器,用于和其他设备进行通信;处理器,用于执行存储器中的程序代码。可选地,当所述代码被执行时,所述处理器可以实现第一方面所述的方法或者第二方面所述的方法的各个操作;收发器用于在处理器的驱动下执行具体的信号收发。A fifth aspect of the embodiments of the present application provides a processing device for predicting motion information of an image block, comprising: a memory for storing a program, the program includes a code, a transceiver for communicating with other devices, and a processor, Used to execute program code in memory. Optionally, when the code is executed, the processor may implement the method of the first aspect or the operations of the method of the second aspect; the transceiver is configured to execute a specific signal driven by the processor Send and receive.
本申请实施例的第六方面提供了一种计算机存储介质,用于储存为上述编码装置、解码装置或处理装置所用的计算机软件指令,其包含用于执行上述第一方面或第二方面的方法所设计的程序。A sixth aspect of the embodiments of the present application provides a computer storage medium for storing computer software instructions for use in the above encoding device, decoding device, or processing device, including a method for performing the above first or second aspect The program designed.
本申请实施例的第七方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第二方面的方法。A seventh aspect of an embodiment 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 or the second aspect described above.
应理解,本申请实施例的第二至第七方面和第一方面的发明目的相同,技术实现一致,技术效果类似,可以参考第一方面对应技术特征的描述,不再赘述。It should be understood that the second to seventh aspects of the embodiments of the present application are the same as the objects of the first aspect, the technical implementation is consistent, and the technical effects are similar. Reference may be made to the description of the corresponding technical features in the first aspect, and details are not described herein.
附图说明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 a schematic block diagram of an inter prediction module in an embodiment of the present application;
图5为本申请实施例中合并预测模式的一种示例性流程图;FIG. 5 is an exemplary flowchart of a merge prediction mode in an embodiment of the present application;
图6为本申请实施例中高级运动矢量预测模式的一种示例性流程图;6 is an exemplary flowchart of an advanced motion vector prediction mode in an embodiment of the present application;
图7为本申请实施例中由视频解码器执行的运动补偿的一种示例性流程图;FIG. 7 is an exemplary flowchart of motion compensation performed by a video decoder in an embodiment of the present application; FIG.
图8为本申请实施例中编码单元及与其关联的相邻位置图像块的一种示例性示意图;FIG. 8 is a schematic diagram of an encoding unit and an adjacent position image block associated therewith according to an embodiment of the present application; FIG.
图9为本申请实施例中构建候选预测运动矢量列表的一种示例性流程图;FIG. 9 is an exemplary flowchart of constructing a candidate prediction motion vector list in the embodiment of the present application;
图10为本申请实施例中将经过组合的候选运动矢量添加到合并模式候选预测运动矢量列表的一种示例性示意图;10 is an exemplary schematic diagram of adding a combined candidate motion vector to a merge mode candidate prediction motion vector list in an embodiment of the present application;
图11为本申请实施例中将经过缩放的候选运动矢量添加到合并模式候选预测运动矢量列表的一种示例性示意图;11 is an exemplary schematic diagram of adding a scaled candidate motion vector to a merge mode candidate motion vector list in the embodiment of the present application;
图12为本申请实施例中将零运动矢量添加到合并模式候选预测运动矢量列表的一种示例性示意图;12 is an exemplary schematic diagram of adding a zero motion vector to a merge mode candidate motion vector list in the embodiment of the present application;
图13为本申请实施例的一种编码方法的示意性流程图;FIG. 13 is a schematic flowchart of an encoding method according to an embodiment of the present application;
图14为本申请实施例中参考相邻重构图像块与原始相邻重构图像块关系的一种示意图;14 is a schematic diagram of a relationship between an adjacent reconstructed image block and an original adjacent reconstructed image block in the embodiment of the present application;
图15为本申请实施例中子块级运动信息处理方式的一种示意图;15 is a schematic diagram of a sub-block level motion information processing manner according to an embodiment of the present application;
图16为本申请实施例的一种解码方法的示意性流程图;FIG. 16 is a schematic flowchart of a decoding method according to an embodiment of the present application;
图17为本申请实施例的一种编码装置的示意性框图;FIG. 17 is a schematic block diagram of an encoding apparatus according to an embodiment of the present application; FIG.
图18为本申请实施例的一种解码装置的示意性框图;FIG. 18 is a schematic block diagram of a decoding apparatus according to an embodiment of the present application; FIG.
图19为本申请实施例的一种装置的示意性框图。FIG. 19 is a schematic block diagram of an apparatus 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 variety 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 can be used 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 transmission channel 16. Transport channel 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, transport channel 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 may be modulated according to a communication standard (e.g., a wireless communication protocol) and transmitted to destination device 14. 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.
替代地,可将经编码数据从输出接口输出到存储装置。类似地,可由输入接口从存储装置存取经编码数据。存储装置可包含多种分散式或本地存取的数据存储媒体中的任一者,例如,硬盘驱动器、蓝光光盘、DVD、CD-ROM、快闪存储器、易失性或非易失性存储器或用于存储经编码视频数据的任何其它合适的数字存储媒体。在另一可行的实施方式中,存储装置可对应于文件服务器或可保持由源装置12产生的经编码视频的另一中间存储装置。目的地装置14可经由流式传输或下载从存储装置存取所存储视频数据。文件服务器可为能够存储经编码视频数据且将此经编码视频数据传输到目的地装置14的任何类型的服务器。可行的实施方式文件服务器包含网站服务器、文件传送协议服务器、网络附接存储装置或本地磁盘机。目的地装置14可经由包含因特网连接的任何标准数据连接存取经编码视频数据。此数据连接可包含适合于存取存储于文件服务器上的经编码视频数据的无线信道(例如,Wi-Fi连接)、有线连接(例如,缆线调制解调器等)或两者的组合。经编码视频数据从存储装置的传输可为流式传输、下载传输或两者的组合。Alternatively, the encoded data can be output from the output interface to the storage device. Similarly, encoded data can be accessed from a storage device by an input interface. The storage device can include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray Disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or Any other suitable digital storage medium for storing encoded video data. In another possible implementation, the storage device 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 the storage device 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 a storage device can 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及输出接口。在一些应用中,输出接口可包含调制解调器(Modem)22和/或传输器24。在源装置12中,视频源18可包含例如以下各者的源:视频捕获装置(例如,摄像机)、含有先前捕获的视频的视频存档、用以从视频内容提供者接收视频的视频馈入接口,和/或用于产生计算机图形数据作为源视频的计算机图形系统,或这些源的组合。作为一种可行的实施方式,如果视频源18为摄像机,那么源装置12及目的装置14可形成所谓的摄影机电话或视频电话。本申请中所描述的技术可示例性地适用于视频解码,且可适用于无线和/或有线应用。In the possible implementation of FIG. 1, source device 12 includes a video source 18, a video encoder 20, and an output interface. In some applications, the output interface can include a modem (Modem) 22 and/or a transmitter 24. 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的输出接口直接传输到目的地装置14。经编码视频数据也可(或替代地)存储到存储装置上以供稍后由目的地装置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 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device for later access by the destination device 14 or other device for decoding and/or playback.
目的地装置14包含输入接口、视频解码器30及显示装置32。在一些应用中,输入接口可包含接收器26和/或调制解调器28。目的地装置14的输入接口28经由传输信道16接收经编码视频数据。经由传输信道16传达或提供于存储装置上的经编码视频数据可包含由视频编码器20产生以供视频解码器30的视频解码器使用以解码视频数据的多种语法元素。这些语法元素可与在通信媒体上传输、存储于存储媒体上或存储于文件服务器上的经编码视频数据包含在一起。 Destination device 14 includes an input interface, video decoder 30, and display device 32. In some applications, the input interface can include a receiver 26 and/or a modem 28. The input interface 28 of the destination device 14 receives the encoded video data via the transmission channel 16. The encoded video data communicated or provided on the storage device via the transmission channel 16 may include various syntax elements generated by the video encoder 20 for use by the video decoder of the video decoder 30 to decode the video data. These syntax elements can be included with encoded video data that is 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 implemented partially in software, the device 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 syntax elements 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 The encoding occurs when the syntax elements are stored to the media, and the syntax elements 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标准的宏块类似的目的。条带包含按解码次序的数个连续树块。可将视频帧或图像分割成一个或多个条带。可根据四叉树将每一树块分裂成编码单元。例如,可将作为四叉树的根节点的树块分裂成四个子节点,且每一子节点可又为母节点且被分裂成另外四个子节点。作为四叉树的叶节点的最终不可分裂的子节点包括解码节点,例如,经解码视频块。与经解码码流相关联的语法数据可定义树块可分裂的最大次数,且也可定义解码节点的最小大小。It should be understood that in some embodiments, the motion information includes motion vectors and reference frame information, while in other embodiments, where the reference frame information is determined, the motion vectors are the primary subject of interest in the motion information. For the convenience of description, when the motion vector or the motion vector is only described as the description, the reference frame information is determined and implicitly determined (for example, the method of the embodiment of the present application is used in intra prediction, or only one frame is used. The reference frame or the like may be used or the information determined by the embodiment of the present application (such as using the same processing method as the motion vector) or other embodiments may be used, and does not mean that the reference frame information can be ignored. In general, the model description of HM can divide a video frame or image into a tree block or a sequence of largest coding units (LCUs) containing both luminance and chrominance samples, which is also referred to as a CTU. 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 quaternary tree" (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 residual values corresponding to the PU. The residual values include 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 typically operates on video blocks within individual video stripes to encode video data. A video block may correspond to a decoding node within a CU. Video blocks may have fixed or varying sizes and may 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”后跟着“上(U)”、“下(D)”、“左(L)”或“右(R)”的指示来指示。因此,例如,“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 (U)", "lower (D)", "left (L)", or "right (R)". 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 16x16 block will have 16 pixels (y = 16) in the vertical direction and 16 pixels (x = 16) in the horizontal direction. Likewise, an NxN block typically 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 (also referred to as residual) of the TU of the CU. A PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may be included in transforming (eg, discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) The residual video data is applied to form coefficients in the transform domain. The residual data may correspond to a pixel difference between the pixels of the uncoded image and the predicted value of 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)、概率区间分割熵(PIPE)解码或其他熵解码方法来熵解码一维向量。视频编码器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 (PIPE) decoding, or other entropy decoding methods to entropy decode a one-dimensional vector. Video encoder 20 may also entropy encode syntax elements associated with the encoded video data for use by video decoder 30 to decode the video data.
为了执行CABAC,视频编码器20可将上下文模型内的上下文指派给待传输的符号。上下文可与符号的相邻值是否为非零有关。为了执行CAVLC,视频编码器20可选择待传输的符号的可变长度码。可变长度解码(VLC)中的码字可经构建以使得相对较短码对应于可能性较大的符号,而较长码对应于可能性较小的符号。以这个方式,VLC的使用可相对于针对待传输的每一符号使用相等长度码字达成节省码率的目的。基于指派给符号的上下文可以确定CABAC中的概率。To perform CABAC, video encoder 20 may assign 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 image block of the PU. The reference image block of the PU may be part of a reference image of an image block similar to a PU. The reference image block may be located in a reference image indicated by the reference image index and the prediction direction indicator.
为了减少表示PU的运动信息所需要的编码比特的数目,视频编码器可根据合并预测模式或高级运动矢量预测模式过程产生用于PU中的每一者的候选预测运动矢量(Motion Vector,MV)列表。用于PU的候选预测运动矢量列表中的每一候选预测运动矢量可指示运动信息。由候选预测运动矢量列表中的一些候选预测运动矢量指示的运动信息可基于其它PU的运动信息。如果候选预测运动矢量指示指定空间候选预测运动矢量位置或时间候选预测运动矢量位置中的一者的运动信息,则本申请可将所述候选预测运动矢量称作“原始”候选预测运动矢量。举例来说,对于合并模式,在本文中也称为合并预测模式,可存在五个原始空间候选预测运动矢量位置和一个原始时间候选预测运动矢量位置。在一些实例中,视频编码器可通过组合来自不同原始候选预测运动矢量的部分运动矢量、修改原始候选预测运动矢量或仅插入零运动矢量作为候选预测运动矢量来产生额外候选预测运动矢量。这些额外候选预测运动矢量不被视为原始候选预测运动矢量且在本申请中可称作人工产生的候选预测运动矢量。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 vector (Motion Vector, MV) for each of the PUs according to the merge prediction mode or the advanced motion vector prediction mode process. List. Each candidate predicted motion vector in the candidate predicted motion vector list for the PU may indicate motion information. The motion information indicated by some candidate predicted motion vectors in the candidate predicted motion vector list may be based on motion information of other PUs. If the candidate prediction motion vector indicates motion information specifying one of a spatial candidate prediction motion vector position or a temporal candidate prediction motion vector position, the present application may refer to the candidate prediction motion vector as a “original” candidate prediction motion vector. For example, for a merge mode, also referred to herein as a merge prediction mode, there may be five original spatial candidate predicted motion vector locations and one original temporal candidate predicted motion vector location. In some examples, the video encoder may generate additional candidate predicted motion vectors by combining partial motion vectors from different original candidate prediction motion vectors, modifying original candidate prediction motion vectors, or simply inserting zero motion vectors as candidate prediction motion vectors. These additional candidate prediction motion vectors are not considered to be original candidate prediction motion vectors and may be referred to as artificially generated candidate prediction motion vectors in this application.
本申请的技术一般涉及用于在视频编码器处产生候选预测运动矢量列表的技术和用于在视频解码器处产生相同候选预测运动矢量列表的技术。视频编码器和视频解码器可通过实施用于构建候选预测运动矢量列表的相同技术来产生相同候选预测运动矢量列表。举例来说,视频编码器和视频解码器两者可构建具有相同数目的候选预测运动矢量(例如,五个候选预测运动矢量)的列表。视频编码器和解码器可首先考虑空间候选预测运动矢量(例如,同一图像中的相邻块),接着考虑时间候选预测运动矢量(例如,不同图像中的候选预测运动矢量),且最后可考虑人工产生的候选预测运动矢量直到将所要数目的候选预测运动矢量添加到列表为止。根据本申请的技术,可在候选预测运动矢量列表构建期间针对某些类型的候选预测运动矢量利用修剪操作以便从候选预测运动矢量列表移除重复,而对于其它类型的候选预测运动矢量,可能不使用修剪以便减小解码器复杂性。举例来说,对于空间候选预测运动矢量集合和对于时间候选预测运动矢量,可执行修剪操作以从候选预测运动矢量的列表排除具有重复运动信息的候选预测运动矢量。然而,当将人工产生的候选预测运动矢量添加到候选预测运动矢量的列表时,可在不对人工产生的候选预测运动矢量执行修剪操作的情况下添加人工产生的候选预测运动矢量。The techniques of the present application generally relate to techniques for generating a list of candidate predictive motion vectors at a video encoder and techniques for generating a list of identical candidate motion vectors at a video decoder. The video encoder and video decoder may generate the same candidate prediction motion vector list by implementing the same techniques used to construct the candidate prediction motion vector list. For example, both a video encoder and a video decoder may construct a list with the same number of candidate predicted motion vectors (eg, five candidate predicted motion vectors). The video encoder and decoder may first consider spatial candidate prediction motion vectors (eg, neighboring blocks in the same image), then consider temporal candidate prediction motion vectors (eg, candidate prediction motion vectors in different images), and may ultimately consider The artificially generated candidate predicted motion vector until the desired number of candidate predicted motion vectors are added to the list. According to the techniques of the present application, a pruning operation may be utilized for certain types of candidate prediction motion vectors to remove repetitions from candidate prediction motion vector lists during candidate prediction motion vector list construction, while for other types of candidate prediction motion vectors, may not Use clipping to reduce decoder complexity. For example, for a spatial candidate prediction motion vector set and for a temporal candidate prediction motion vector, a pruning operation may be performed to exclude candidate prediction motion vectors having repeated motion information from a list of candidate prediction motion vectors. However, when the artificially generated candidate predicted motion vector is added to the list of candidate predicted motion vectors, the artificially generated candidate predicted motion vector may be added without performing a trimming operation on the artificially generated candidate predicted motion vector.
在产生用于CU的PU的候选预测运动矢量列表之后,视频编码器可从候选预测运动矢量列表选择候选预测运动矢量且在码流中输出候选预测运动矢量索引。选定候选预测运动矢量可为具有产生最紧密地匹配正被解码的目标PU的预测子的运动矢量的候选预测运动矢量。候选预测运动矢量索引可指示在候选预测运动矢量列表中选定候选预测运动矢量的位置。视频编码器还可基于由PU的运动信息指示的参考图像块产生用于PU的预测性图像块。可基于由选定候选预测运动矢量指示的运动信息确定PU的运动信息。举例来说,在合并模式中,PU的运动信息可与由选定候选预测运动矢量指示的运动信息相同。在AMVP模式中,PU的运动信息可基于PU的运动矢量差和由选定候选预测运动矢量指示的运动信息确定。视频编码器可基于CU的PU的预测性图像块和用于CU的原始图像块产生用于CU的一或多个残余图像块。视频编码器可接着编码 一或多个残余图像块且在码流中输出一或多个残余图像块。After generating a candidate prediction motion vector list for the PU of the CU, the video encoder may select a candidate prediction motion vector from the candidate prediction motion vector list and output a candidate prediction motion vector index in the code stream. The selected candidate predicted motion vector may be a candidate predicted motion vector having a motion vector that produces a predictor that most closely matches the target PU being decoded. The candidate predicted motion vector index may indicate the location of the candidate predicted motion vector selected in the candidate predicted motion vector list. The video encoder may also generate a predictive image block for the PU based on the reference image block indicated by the motion information of the PU. The motion information of the PU may be determined based on the motion information indicated by the selected candidate predicted motion vector. For example, in the merge mode, the motion information of the PU may be the same as the motion information indicated by the selected candidate prediction motion vector. In the AMVP mode, the motion information of the PU may be determined based on the motion vector difference of the PU and the motion information indicated by the selected candidate predicted motion vector. The video encoder may generate one or more residual image blocks for the CU based on the predictive image block of the PU of the CU and the original image block for the CU. The video encoder may then encode one or more residual image blocks and output one or more residual image blocks in the code stream.
码流可包括识别PU的候选预测运动矢量列表中的选定候选预测运动矢量的数据。视频解码器可基于由PU的候选预测运动矢量列表中的选定候选预测运动矢量指示的运动信息确定PU的运动信息。视频解码器可基于PU的运动信息识别用于PU的一或多个参考图像块。在识别PU的一或多个参考图像块之后,视频解码器可基于PU的一或多个参考图像块产生用于PU的预测性图像块。视频解码器可基于用于CU的PU的预测性图像块和用于CU的一或多个残余图像块来重构用于CU的图像块。The code stream may include data identifying a selected candidate predicted motion vector in the candidate motion vector vector list of the PU. The video decoder may determine motion information for the PU based on motion information indicated by the selected candidate predicted motion vector in the candidate motion vector list of the PU. The video decoder may identify one or more reference image blocks for the PU based on the motion information of the PU. After identifying one or more reference image blocks of the PU, the video decoder may generate a predictive image block for the PU based on one or more reference image blocks of the PU. The video decoder may reconstruct an image block for the CU based on the predictive image block for the PU of the CU and one or more residual image 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 predictive image blocks and motion information for the PU of the CU. In many examples, the motion information for a given PU may be the same or similar to the motion information of one or more nearby PUs (ie, PUs whose image blocks are spatially or temporally near the image block of a given PU). Because nearby PUs often have similar motion information, video encoder 20 may encode motion information for a given PU with reference to motion information for nearby PUs. Encoding motion information for a given PU with reference to motion information of nearby PUs may reduce the number of coded bits in the codestream that are required to indicate motion information for a given 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 a given PU with reference to motion information of nearby PUs in various manners. For example, video encoder 20 may indicate that the motion information for a given PU is the same as the motion information for a nearby PU. The present application may use a merge mode to refer to motion information indicating that a given PU is the same as motion information of a nearby PU or may be derived from motion information of nearby PUs. In another possible implementation, video encoder 20 may calculate a Motion Vector Difference (MVD) for a given PU. The MVD indicates the difference between the motion vector of a given PU and the motion vector of a nearby PU. Video encoder 20 may include the MVD instead of the motion vector of a given PU in the motion information for a given PU. The representation of the MVD in the code stream is less than the coded bits required to represent the motion vector of a given PU. The present application may use advanced motion vector prediction mode to refer to signaling the motion information of a given PU by using the MVD and identifying the index value of the candidate motion vector.
为了使用合并模式或AMVP模式来用信号通知解码端给定PU的运动信息,视频编码器20可产生用于给定PU的候选预测运动矢量列表。候选预测运动矢量列表可包括一或多个候选预测运动矢量。用于给定PU的候选预测运动矢量列表中的候选预测运动矢量中的每一者可指定运动信息。由每一候选预测运动矢量指示的运动信息可包括运动矢量、参考图像索引和预测方向标识。候选预测运动矢量列表中的候选预测运动矢量可包括“原始”候选预测运动矢量,其中每一者指示不同于给定PU的PU内的指定候选预测运动矢量位置中的一者的运动信息。To signal the motion information of a given PU for a decoder using a merge mode or an AMVP mode, video encoder 20 may generate a candidate predicted motion vector list for a given PU. The candidate predicted motion vector list may include one or more candidate predicted motion vectors. Each of the candidate predicted motion vectors in the candidate predicted motion vector list for a given PU may specify motion information. The motion information indicated by each candidate prediction motion vector may include a motion vector, a reference image index, and a prediction direction indicator. The candidate predicted motion vectors in the candidate predicted motion vector list may include "raw" candidate predicted motion vectors, each of which indicates motion information that is different from one of the specified candidate predicted motion vector locations within the PU of the given PU.
在产生用于PU的候选预测运动矢量列表之后,视频编码器20可从用于PU的候选预测运动矢量列表选择候选预测运动矢量中的一者。举例来说,视频编码器可比较每一候选预测运动矢量与正被解码的PU且可选择具有所要码率-失真代价的候选预测运动矢量。视频编码器20可输出用于PU的候选预测运动矢量索引。候选预测运动矢量 索引可识别选定候选预测运动矢量在候选预测运动矢量列表中的位置。After generating the candidate prediction motion vector list for the PU, video encoder 20 may select one of the candidate prediction motion vectors from the candidate prediction motion vector list for the PU. For example, the video encoder may compare each candidate predicted motion vector to the PU being decoded and may select a candidate predicted motion vector having the desired rate-distortion penalty. Video encoder 20 may output a candidate predicted motion vector index for the PU. The candidate predicted motion vector index may identify the location of the selected candidate predicted motion vector in the candidate predicted motion vector list.
此外,视频编码器20可基于由PU的运动信息指示的参考图像块产生用于PU的预测性图像块。可基于由用于PU的候选预测运动矢量列表中的选定候选预测运动矢量指示的运动信息确定PU的运动信息。举例来说,在合并模式中,PU的运动信息可与由选定候选预测运动矢量指示的运动信息相同。在AMVP模式中,可基于用于PU的运动矢量差和由选定候选预测运动矢量指示的运动信息确定PU的运动信息。视频编码器20可如前文所描述处理用于PU的预测性图像块。Moreover, video encoder 20 may generate a predictive image block for the PU based on the reference image block indicated by the motion information of the PU. The motion information of the PU may be determined based on motion information indicated by the selected candidate predicted motion vector in the candidate predicted motion vector list for the PU. For example, in the merge mode, the motion information of the PU may be the same as the motion information indicated by the selected candidate prediction motion vector. In the AMVP mode, motion information of the PU may be determined based on a motion vector difference for the PU and motion information indicated by the selected candidate predicted motion vector. Video encoder 20 may process the predictive image blocks for the PU as previously described.
当视频解码器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 predicted motion vector list for each of the PUs of the CU. The candidate predicted motion vector list generated by the video decoder 30 for the PU may be the same as the candidate predicted motion vector list generated by the video encoder 20 for the PU. The syntax element parsed from the code stream may indicate the location of the candidate prediction motion vector selected in the candidate prediction motion vector list for the PU. After generating the candidate prediction motion vector list for the PU, video decoder 30 may generate a predictive image block for the PU based on one or more reference image blocks indicated by the motion information of the PU. Video decoder 30 may determine motion information for the PU based on motion information indicated by the selected candidate predicted motion vector in the candidate predicted motion vector list for the PU. Video decoder 30 may reconstruct an image block for the CU based on the predictive image block for the PU and the residual image block for the CU.
应理解,在一种可行的实施方式中,在解码端,候选预测运动矢量列表的构建与从码流中解析选定候选预测运动矢量在候选预测运动矢量列表中的位置是相互独立,可以任意先后或者并行进行的。It should be understood that, in a feasible implementation manner, at the decoding end, the construction of the candidate prediction motion vector list and the resolution of the selected candidate prediction motion vector in the candidate motion vector list from the code stream are independent of each other, and may be arbitrary. Conducted sequentially or in parallel.
在另一种可行的实施方式中,在解码端,首先从码流中解析选定候选预测运动矢量在候选预测运动矢量列表中的位置,根据解析出来的位置构建候选预测运动矢量列表,在该实施方式中,不需要构建全部的候选预测运动矢量列表,只需要构建到该解析出来的位置处的候选预测运动矢量列表,即能够确定该位置出的候选预测运动矢量即可。举例来说,当解析码流得出选定的候选预测运动矢量为候选预测运动矢量列表中索引为3的候选预测运动矢量时,仅需要构建从索引为0到索引为3的候选预测运动矢量列表,即可确定索引为3的候选预测运动矢量,可以达到减小复杂度,提高解码效率的技术效果。In another feasible implementation manner, at the decoding end, first, the position of the selected candidate prediction motion vector in the candidate prediction motion vector list is parsed from the code stream, and the candidate prediction motion vector list is constructed according to the parsed position, where In the embodiment, it is not necessary to construct all the candidate prediction motion vector lists, and only the candidate prediction motion vector list at the parsed position needs to be constructed, that is, the candidate prediction motion vector at the position can be determined. For example, when the code stream is parsed to obtain the candidate candidate motion vector as the candidate motion vector with index 3 in the candidate motion vector list, only the candidate motion vector with index 0 to index 3 needs to be constructed. The list can determine the candidate prediction motion vector with the index of 3, which can achieve the technical effect of reducing the complexity and improving the decoding efficiency.
需要说明的是,运动矢量列表的建立不仅用于上文所述的Merge或者AMVP技术中,还普遍存在于与运动估计(Motion Estimation,ME)相关的各种帧间、帧内预测技术中。It should be noted that the establishment of the motion vector list is not only used in the Merge or AMVP technologies described above, but also in various inter-frame and intra prediction techniques related to Motion Estimation (ME).
在图2的可行的实施方式中,视频编码器20包含分割单元35、预测单元41、参考图像存储器64、求和器50、变换处理单元52、量化单元54和熵编码单元56。预测单元41包含运动估计单元42、运动补偿单元44和帧内预测模块46。对于视频块重构建,视频编码器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 a motion estimation unit 42, a motion compensation unit 44, and an intra prediction module 46. For video block reconstruction, video encoder 20 also includes inverse quantization unit 58, inverse transform unit 60, and summer 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 residual block data and provide the resulting intra-coded or inter-coded block to summer 62 to reconstruct the The coded block is thus used as a reference image.
预测单元41内的运动估计单元42及运动补偿单元44执行相对于一个或多个参考图像中的一个或多个预测性块的当前视频块的帧间预测性解码以提供时间压缩。运动估计单元42可经配置以根据视频序列的预定模式确定视频条带的帧间预测模式。预定模式可将序列中的视频条带指定为P条带、B条带或GPB条带。运动估计单元42及运动补偿单元44可高度集成,但为概念目的而分别说明。通过运动估计单元42所执行的运动估计为产生估计视频块的运动矢量的过程。例如,运动矢量可指示当前视频帧或图像内的视频块的PU相对于参考图像内的预测性块的位移。 Motion estimation unit 42 and motion compensation unit 44 within prediction unit 41 perform inter-predictive decoding of the current video block relative to one or more predictive blocks in one or more reference pictures to provide temporal compression. Motion estimation unit 42 may be configured 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 performed by motion estimation unit 42 is estimated to be a process of generating a motion vector of the estimated 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 predictive block within the reference image.
预测性块为依据像素差而被发现为紧密匹配待解码的视频块的PU的块,像素差可通过绝对差和、平方差和或其它差度量确定。在一些可行的实施方式中,视频编码器20可计算存储于参考图像存储器64中的参考图像的子整数(sub-integer)像素位置的值。例如,视频编码器20可内插参考图像的四分之一像素位置、八分之一像素位置或其它分数像素位置的值。因此,运动估计单元42可执行相对于全像素位置及分数像素位置的运动搜索且输出具有分数像素精确度的运动矢量。The predictive 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 an absolute difference sum, a square difference sum, 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 predictive 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 predictive blocks based on motion vectors determined by motion estimation, possibly performing interpolation to sub-pixel precision. After receiving the motion vector of the PU of the current video block, motion compensation unit 44 may locate the predictive block pointed to by the motion vector in one of the reference image lists. Video encoder 20 forms a residual video block by subtracting the pixel values of the predictive block from the pixel values of the current video block being decoded, thereby forming pixel difference values. 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 image 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 image containing the reference image block in list 0 or list 1 and a motion vector indicating a spatial displacement between the PU and the reference image 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 image 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 image block for the PU in the reference image in the list 0 and may also search for the PU for the PU in the reference image in the list 1 A reference image block. Motion estimation unit 42 may then generate a reference index indicating the reference image containing the reference image block in list 0 and list 1 and a motion vector indicating the spatial displacement between the reference image 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 image 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指示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 candidate predicted motion vectors and motion vector differences 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 predicted motion vector associated with the neighboring PU. Video decoder 30 may use the indicated candidate predicted motion vector and MVD to determine the motion vector of the PU.
如前文所描述,预测模块41可产生用于CU的每一PU的候选预测运动矢量列表。候选预测运动矢量列表中的一或多者可包括一或多个原始候选预测运动矢量和从原始候选预测运动矢量导出的一或多个额外候选预测运动矢量。As described above, prediction module 41 may generate a list of candidate predicted motion vectors for each PU of the CU. One or more of the candidate predicted motion vector lists may include one or more original candidate predicted motion vectors and one or more additional candidate predicted motion vectors derived from the original candidate predicted motion vectors.
预测单元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 predictive block of the current video block via inter prediction or intra prediction, the video encoder 20 forms a residual video block by subtracting the predictive 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可执行上下文自适应性可变长度解码、上下文自适应性二进制算术解码、基于语法的上下文自适应性二进制算术解码、概率区间分割熵解码或另一熵编码方法或技术。熵编码单元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, context adaptive binary arithmetic decoding, syntax based context adaptive binary arithmetic decoding, probability interval partition entropy decoding, or another entropy encoding 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 image block of the reference image. Motion compensation unit 44 may calculate the reference image block by adding the residual block to the predictive block of one of the reference images within one of the reference image 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 image block for storage in reference image memory 64. The reference image block may be used by the motion estimation unit 42 and the motion compensation unit 44 as a reference image block to inter-predict subsequent video frames or blocks in the image.
图3为本申请实施例中视频解码器30的一种示意性框图。在图3的可行的实施方式中,视频解码器30包含熵编码单元80、预测单元81、反量化单元86、反变换单元88、求和器90和参考图像存储器92。预测单元81包含运动补偿单元82和帧内预测单元84。在一些可行的实施方式中,视频解码器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. The prediction unit 81 includes a motion compensation unit 82 and an intra prediction unit 84. 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.
在视频条带经解码为经帧内解码条带时,预测单元81的帧内预测单元84可基于用信号发送的帧内预测模式及来自当前帧或图像的先前经解码块的数据而产生当前视频条带的视频块的预测数据。When the video stripe is decoded into an intra-decoded stripe, intra-prediction unit 84 of prediction unit 81 may generate the current 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 video stripe.
在视频图像经解码为经帧间解码条带时,预测单元81的运动补偿单元82基于从熵编码单元80所接收的运动矢量及其它语法元素而产生当前视频图像的视频块的预测性块。预测性块可从参考图像列表中的一者内的参考图像中的一者产生。视频解码器30可基于存储于参考图像存储器92中的参考图像使用默认构建技术来构建参考图 像列表(列表0及列表1)。When the video image is decoded into an inter-decoded slice, motion compensation unit 82 of prediction unit 81 generates a predictive block of the video block of the current video image based on the motion vector and other syntax elements received from entropy encoding unit 80. The predictive 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使用所接收的语法元素中的一些来确定用以解码视频条带的视频块的预测模式(例如,帧内预测或帧间预测)、帧间预测条带类型、条带的参考图像列表中的一者或多者的构建信息、条带的每一经帧间编码视频块的运动矢量、条带的每一经帧间解码视频块的帧间预测状态及用以解码当前视频条带中的视频块的其它信息。 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 predictive 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, inter prediction strip type, stripe Construction information of one or more of the reference picture 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 used to decode the current video Additional information for the video block in the stripe.
运动补偿单元82也可基于内插滤波器执行内插。运动补偿单元82可使用如由视频编码器20在视频块的编码期间所使用的内插滤波器来计算参考图像块的子整数像素的内插值。在此应用中,运动补偿单元82可从所接收的语法元素确定由视频编码器20使用的内插滤波器且使用内插滤波器来产生预测性块。 Motion compensation unit 82 may also perform interpolation based on the interpolation filter. Motion compensation unit 82 may calculate the interpolated values of the sub-integer pixels of the reference image block using an interpolation filter as used by video encoder 20 during encoding of the video 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 predictive 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 predicted motion vector list for the PU. Data identifying the location of the selected candidate predicted motion vector in the candidate motion vector list of the PU may be included in the code stream. After generating the candidate prediction motion vector list for the PU, motion compensation unit 82 may generate a predictive image block for the PU based on one or more reference image blocks indicated by the motion information of the PU. The reference image 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 motion vector list of the PU.
反量化单元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 predictive 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 predictive block generated by motion compensation unit 82. To form a decoded video block. Summer 90 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, the video decoder comprising video encoder 20 and video decoder 30 as shown and described with respect to Figures 1-3. 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.
图4为本申请实施例中帧间预测模块的一种示意性框图。帧间预测模块121,示 例性的,可以包括运动估计单元42和运动补偿单元44。在不同的视频压缩编解码标准中,PU和CU的关系各有不同。帧间预测模块121可根据多个分割模式将当前CU分割为PU。举例来说,帧间预测模块121可根据2N×2N、2N×N、N×2N和N×N分割模式将当前CU分割为PU。在其他实施例中,当前CU即为当前PU,不作限定。FIG. 4 is a schematic block diagram of an inter prediction module in an embodiment of the present application. Inter prediction module 121, by way of example, may include motion estimation unit 42 and motion compensation unit 44. In different video compression codec standards, the relationship between PU and CU is different. The inter prediction module 121 may divide the current CU into PUs according to multiple partition modes. For example, the inter prediction module 121 may divide the current CU into PUs according to 2N×2N, 2N×N, N×2N, and N×N partition modes. In other embodiments, the current CU is the current PU, which is not limited.
帧间预测模块121可对PU中的每一者执行整数运动估计(Integer Motion Estimation,IME)且接着执行分数运动估计(Fraction Motion Estimation,FME)。当帧间预测模块121对PU执行IME时,帧间预测模块121可在一个或多个参考图像中搜索用于PU的参考图像块。在找到用于PU的参考图像块之后,帧间预测模块121可产生以整数精度指示PU与用于PU的参考图像块之间的空间位移的运动矢量。当帧间预测模块121对PU执行FME时,帧间预测模块121可改进通过对PU执行IME而产生的运动矢量。通过对PU执行FME而产生的运动矢量可具有子整数精度(例如,1/2像素精度、1/4像素精度等)。在产生用于PU的运动矢量之后,帧间预测模块121可使用用于PU的运动矢量以产生用于PU的预测性图像块。The inter prediction module 121 may perform an Integer Motion Estimation (IME) on each of the PUs and then perform a Fraction Motion Estimation (FME). When the inter prediction module 121 performs an IME on a PU, the inter prediction module 121 may search for a reference image block for the PU in one or more reference images. After finding the reference image block for the PU, the inter prediction module 121 can generate a motion vector that indicates the spatial displacement between the PU and the reference image block for the PU with integer precision. When the inter prediction module 121 performs FME on the PU, the inter prediction module 121 may improve the motion vector generated by performing the IME on the PU. A motion vector generated by performing FME on a PU may have sub-integer precision (eg, 1/2 pixel precision, 1/4 pixel precision, etc.). After generating the motion vector for the PU, the inter prediction module 121 can use the motion vector for the PU to generate a predictive image block for the PU.
在帧间预测模块121使用AMVP模式用信号通知解码端PU的运动信息的一些可行的实施方式中,帧间预测模块121可产生用于PU的候选预测运动矢量列表。候选预测运动矢量列表可包括一个或多个原始候选预测运动矢量和从原始候选预测运动矢量导出的一个或多个额外候选预测运动矢量。在产生用于PU的候选预测运动矢量列表之后,帧间预测模块121可从候选预测运动矢量列表选择候选预测运动矢量且产生用于PU的运动矢量差。用于PU的MVD可指示由选定候选预测运动矢量指示的运动矢量与使用IME和FME针对PU产生的运动矢量之间的差。在这些可行的实施方式中,帧间预测模块121可输出识别选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引。帧间预测模块121还可输出PU的MVD。下文详细描述图6中,本申请实施例中高级运动矢量预测(AMVP)模式的一种可行的实施方式。In some possible implementations in which the inter prediction module 121 signals the motion information of the decoder PU using the AMVP mode, the inter prediction module 121 may generate a candidate prediction motion vector list for the PU. The candidate predicted motion vector list may include one or more original candidate predicted motion vectors and one or more additional candidate predicted motion vectors derived from the original candidate predicted motion vectors. After generating the candidate prediction motion vector list for the PU, the inter prediction module 121 may select the candidate prediction motion vector from the candidate prediction motion vector list and generate a motion vector difference for the PU. The MVD for the PU may indicate the difference between the motion vector indicated by the selected candidate prediction motion vector and the motion vector generated for the PU using the IME and FME. In these possible implementations, inter prediction module 121 may output a candidate predicted motion vector index that identifies the location of the selected candidate predicted motion vector in the candidate predicted motion vector list. The inter prediction module 121 can also output the MVD of the PU. A possible implementation of the Advanced Motion Vector Prediction (AMVP) mode in the embodiment of the present application is described in detail below.
除了通过对PU执行IME和FME来产生用于PU的运动信息外,帧间预测模块121还可对PU中的每一者执行合并(Merge)操作。当帧间预测模块121对PU执行合并操作时,帧间预测模块121可产生用于PU的候选预测运动矢量列表。用于PU的候选预测运动矢量列表可包括一个或多个原始候选预测运动矢量和从原始候选预测运动矢量导出的一个或多个额外候选预测运动矢量。候选预测运动矢量列表中的原始候选预测运动矢量可包括一个或多个空间候选预测运动矢量和时间候选预测运动矢量。空间候选预测运动矢量可指示当前图像中的其它PU的运动信息。时间候选预测运动矢量可基于不同于当前图像的对应的PU的运动信息。时间候选预测运动矢量还可称作时间运动矢量预测(TMVP)。In addition to generating motion information for the PU by performing IME and FME on the PU, the inter prediction module 121 may also perform a Merge operation on each of the PUs. When the inter prediction module 121 performs a merge operation on the PU, the inter prediction module 121 may generate a candidate predicted motion vector list for the PU. The candidate prediction motion vector list for the PU may include one or more original candidate prediction motion vectors and one or more additional candidate prediction motion vectors derived from the original candidate prediction motion vectors. The original candidate prediction motion vector in the candidate prediction motion vector list may include one or more spatial candidate prediction motion vectors and temporal candidate prediction motion vectors. The spatial candidate prediction motion vector may indicate motion information of other PUs in the current image. The temporal candidate prediction motion vector may be based on motion information of a corresponding PU that is different from the current image. The temporal candidate prediction motion vector may also be referred to as temporal motion vector prediction (TMVP).
在产生候选预测运动矢量列表之后,帧间预测模块121可从候选预测运动矢量列表选择候选预测运动矢量中的一个。帧间预测模块121可接着基于由PU的运动信息指示的参考图像块产生用于PU的预测性图像块。在合并模式中,PU的运动信息可与由选定候选预测运动矢量指示的运动信息相同。下文描述的图5说明Merge示例性的流程图。After generating the candidate predicted motion vector list, the inter prediction module 121 may select one of the candidate predicted motion vectors from the candidate predicted motion vector list. Inter prediction module 121 may then generate a predictive image block for the PU based on the reference image block indicated by the motion information of the PU. In the merge mode, the motion information of the PU may be the same as the motion information indicated by the selected candidate prediction motion vector. Figure 5, described below, illustrates an exemplary flow chart of Merge.
在基于IME和FME产生用于PU的预测性图像块和基于合并操作产生用于PU的预测性图像块之后,帧间预测模块121可选择通过FME操作产生的预测性图像块或者通 过合并操作产生的预测性图像块。在一些可行的实施方式中,帧间预测模块121可基于通过FME操作产生的预测性图像块和通过合并操作产生的预测性图像块的码率-失真代价分析来选择用于PU的预测性图像块。After generating a predictive image block for the PU based on the IME and the FME and generating a predictive image block for the PU based on the merging operation, the inter prediction module 121 may select a predictive image block generated by the FME operation or generate a merge operation Predictive image block. In some possible implementations, the inter prediction module 121 may select a predictive image for the PU based on a predictive image block generated by the FME operation and a rate-distortion cost analysis of the predictive image block generated by the combining operation. Piece.
在帧间预测模块121已选择通过根据分割模式中的每一者分割当前CU而产生的PU的预测性图像块之后(在一些实施方式中,编码树单元CTU划分为CU后,不会再进一步划分为更小的PU,此时PU等同于CU),帧间预测模块121可选择用于当前CU的分割模式。在一些实施方式中,帧间预测模块121可基于通过根据分割模式中的每一者分割当前CU而产生的PU的选定预测性图像块的码率-失真代价分析来选择用于当前CU的分割模式。帧间预测模块121可将与属于选定分割模式的PU相关联的预测性图像块输出到残差产生模块102。帧间预测模块121可将指示属于选定分割模式的PU的运动信息的语法元素输出到熵编码模块116。After the inter prediction module 121 has selected the predictive image block of the PU generated by dividing the current CU according to each of the split modes (in some embodiments, after the coding tree unit CTU is divided into CUs, no further further Divided into smaller PUs, where the PU is equivalent to CU), the inter prediction module 121 can select the partition mode for the current CU. In some implementations, inter prediction module 121 can select for a current CU based on a rate-distortion cost analysis of a selected predictive image block of the PU generated by segmenting the current CU according to each of the partition modes. Split mode. The inter prediction module 121 may output the predictive image blocks associated with the PUs belonging to the selected partition mode to the residual generation module 102. The inter prediction module 121 may output syntax elements indicating motion information of the PUs belonging to the selected partition mode to the entropy encoding module 116.
在图4的示意图中,帧间预测模块121包括IME模块180A到180N(统称为“IME模块180”)、FME模块182A到182N(统称为“FME模块182”)、合并模块184A到184N(统称为“合并模块184”)、PU模式决策模块186A到186N(统称为“PU模式决策模块186”)和CU模式决策模块188(也可以包括执行从CTU到CU的模式决策过程)。In the diagram of FIG. 4, the inter prediction module 121 includes IME modules 180A through 180N (collectively referred to as "IME module 180"), FME modules 182A through 182N (collectively referred to as "FME module 182"), and merge modules 184A through 184N (collectively The "Merge Module 184"), the PU Mode Decision Modules 186A through 186N (collectively referred to as "PU Mode Decision Module 186") and the CU Mode Decision Module 188 (which may also include a mode decision process that performs a CTU to CU).
IME模块180、FME模块182和合并模块184可对当前CU的PU执行IME操作、FME操作和合并操作。图4的示意图中将帧间预测模块121说明为包括用于CU的每一分割模式的每一PU的单独IME模块180、FME模块182和合并模块184。在其它可行的实施方式中,帧间预测模块121不包括用于CU的每一分割模式的每一PU的单独IME模块180、FME模块182和合并模块184。IME module 180, FME module 182, and merge module 184 can perform IME operations, FME operations, and merge operations on PUs of the current CU. The inter prediction module 121 is illustrated in the diagram of FIG. 4 as a separate IME module 180, FME module 182, and merge module 184 for each PU for each partition mode of the CU. In other possible implementations, inter prediction module 121 does not include separate IME module 180, FME module 182, and merge module 184 for each PU of each partition mode of the CU.
如图4的示意图中所说明,IME模块180A、FME模块182A和合并模块184A可对通过根据2N×2N分割模式分割CU而产生的PU执行IME操作、FME操作和合并操作。PU模式决策模块186A可选择由IME模块180A、FME模块182A和合并模块184A产生的预测性图像块中的一者。As illustrated in the schematic diagram of FIG. 4, the IME module 180A, the FME module 182A, and the merging module 184A may perform an IME operation, an FME operation, and a merge operation on a PU generated by dividing a CU according to a 2N×2N partition mode. PU mode decision module 186A may select one of the predictive image blocks generated by IME module 180A, FME module 182A, and merge module 184A.
IME模块180B、FME模块182B和合并模块184B可对通过根据N×2N分割模式分割CU而产生的左PU执行IME操作、FME操作和合并操作。PU模式决策模块186B可选择由IME模块180B、FME模块182B和合并模块184B产生的预测性图像块中的一者。The IME module 180B, the FME module 182B, and the merging module 184B may perform an IME operation, an FME operation, and a merge operation on a left PU generated by dividing a CU according to an N×2N partition mode. PU mode decision module 186B may select one of the predictive image blocks generated by IME module 180B, FME module 182B, and merge module 184B.
IME模块180C、FME模块182C和合并模块184C可对通过根据N×2N分割模式分割CU而产生的右PU执行IME操作、FME操作和合并操作。PU模式决策模块186C可选择由IME模块180C、FME模块182C和合并模块184C产生的预测性图像块中的一者。The IME module 180C, the FME module 182C, and the merging module 184C may perform an IME operation, an FME operation, and a merge operation on a right PU generated by dividing a CU according to an N×2N partition mode. The PU mode decision module 186C may select one of the predictive image blocks generated by the IME module 180C, the FME module 182C, and the merge module 184C.
IME模块180N、FME模块182N和合并模块184可对通过根据N×N分割模式分割CU而产生的右下PU执行IME操作、FME操作和合并操作。PU模式决策模块186N可选择由IME模块180N、FME模块182N和合并模块184N产生的预测性图像块中的一者。The IME module 180N, the FME module 182N, and the merging module 184 may perform an IME operation, an FME operation, and a merge operation on the lower right PU generated by dividing the CU according to the N×N partition mode. The PU mode decision module 186N may select one of the predictive image blocks generated by the IME module 180N, the FME module 182N, and the merge module 184N.
PU模式决策模块186可基于多个可能预测性图像块的码率-失真代价分析选择预测性图像块,且选择针对给定解码情形提供最佳码率-失真代价的预测性图像块。示例性的,对于带宽受限的应用,PU模式决策模块186可偏向选择增加压缩比的预测性图像块,而对于其它应用,PU模式决策模块186可偏向选择增加经重建视频质量的预测性图像块。在PU模式决策模块186选择用于当前CU的PU的预测性图像块之后,CU模式决策模块188选择用于当前CU的分割模式且输出属于选定分割模式的PU的预测 性图像块和运动信息。The PU mode decision module 186 can select a predictive image block based on a rate-distortion cost analysis of the plurality of possible predictive image blocks and select a predictive image block that provides an optimal rate-distortion penalty for a given decoding situation. Illustratively, for bandwidth limited applications, PU mode decision module 186 may prefer to select predictive image blocks that increase compression ratio, while for other applications, PU mode decision module 186 may prefer to select predictive images that increase reconstructed video quality. Piece. After the PU mode decision module 186 selects the predictive image block for the PU of the current CU, the CU mode decision module 188 selects the segmentation mode for the current CU and outputs the predictive image block and motion information for the PUs belonging to the selected segmentation mode. .
图5为本申请实施例中合并模式的一种示例性流程图。视频编码器(例如视频编码器20)可执行合并操作200。在其它可行的实施方式中,视频编码器可执行不同于合并操作200的合并操作。举例来说,在其它可行的实施方式中,视频编码器可执行合并操作,其中视频编码器执行比合并操作200多、少的步骤或与合并操作200不同的步骤。在其它可行的实施方式中,视频编码器可以不同次序或并行地执行合并操作200的步骤。编码器还可对以跳跃(skip)模式编码的PU执行合并操作200。FIG. 5 is an exemplary flowchart of a merge mode in the embodiment of the present application. A video encoder (e.g., video encoder 20) may perform a merge operation 200. In other possible implementations, 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的候选预测运动矢量列表。举例来说,视频编码器可根据下文关于图8到图12描述的实例技术中的一者产生用于当前PU的候选预测运动矢量列表。After the video encoder begins the merge operation 200, the video encoder may generate a candidate predicted motion vector list for the current PU (202). The video encoder can generate a list of candidate predicted motion vectors for the current PU in various ways. For example, the video encoder may generate a candidate predicted motion vector list for the current PU according to one of the example techniques described below with respect to Figures 8-12.
如前文所述,用于当前PU的候选预测运动矢量列表可包括时间候选预测运动矢量。时间候选预测运动矢量可指示时域对应(co-located)的PU的运动信息。co-located的PU可在空间上与当前PU处于图像帧中的同一个位置,但在参考图像而非当前图像中。本申请可将包括时域对应的PU的参考图像称作相关参考图像。本申请可将相关参考图像的参考图像索引称作相关参考图像索引。如前文所描述,当前图像可与一个或多个参考图像列表(例如,列表0、列表1等)相关联。参考图像索引可通过指示在参考图像某一个参考图像列表中的位置来指示参考图像。在一些可行的实施方式中,当前图像可与组合参考图像列表相关联。As described above, the candidate predicted motion vector list for the current PU may include a temporal candidate predicted motion vector. The temporal candidate prediction motion vector 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 a position in a reference image list of the reference image. 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. In these video encoders, if the reference index source location is not available, the video encoder can use a zero reference image index.
然而,可存在以下例子:与当前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 picture index) of PUs belonging to the current CU to generate temporal candidate prediction motion vectors for the current PU. In other words, these video encoders can generate temporal candidate prediction motion vectors using motion information of PUs belonging to the current CU. Accordingly, the video encoder may not be able to generate a candidate predicted motion vector 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 prediction motion vector 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 the temporal candidate prediction motion vector 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 prediction motion vector in the candidate prediction of the current CU Motion vector list.
在视频编码器显式地设定相关参考图像索引的可行的实施方式中,视频编码器可显式地在语法结构(例如图像标头、条带标头、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 may signal the decoder for an associated reference picture index for each LCU (ie, CTU), CU, PU, TU, or other type of sub-block. For example, the video encoder may signal that the 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 feasible embodiments, the video encoder may generate the candidate predicted motion vector list 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. Each time candidate predicts a motion vector, even if these locations are not strictly adjacent to the current PU.
在产生用于当前PU的候选预测运动矢量列表之后,视频编码器可产生与候选预测运动矢量列表中的候选预测运动矢量相关联的预测性图像块(204)。视频编码器可通过基于所指示候选预测运动矢量的运动信息确定当前PU的运动信息和接着基于由当前PU的运动信息指示的一个或多个参考图像块产生预测性图像块来产生与候选预测运动矢量相关联的预测性图像块。视频编码器可接着从候选预测运动矢量列表选择候选预测运动矢量中的一者(206)。视频编码器可以各种方式选择候选预测运动矢量。举例来说,视频编码器可基于对与候选预测运动矢量相关联的预测性图像块的每一者的码率-失真代价分析来选择候选预测运动矢量中的一者。After generating the candidate predicted motion vector list for the current PU, the video encoder may generate a predictive image block (204) associated with the candidate predicted motion vector in the candidate predicted motion vector list. The video encoder may generate motion prediction information for the current PU by determining motion information of the current PU based on the motion information of the indicated candidate motion vector and then generate a predictive image block based on the one or more reference image blocks indicated by the motion information of the current PU. Vector associated predictive image blocks. The video encoder may then select one of the candidate predicted motion vectors from the candidate predicted motion vector list (206). The video encoder can select candidate prediction motion vectors in a variety of ways. For example, the video encoder may select one of the candidate predicted motion vectors based on a rate-distortion cost analysis of each of the predictive image blocks associated with the candidate predicted motion vectors.
在选择候选预测运动矢量之后,视频编码器可输出候选预测运动矢量索引(208)。候选预测运动矢量索引可指示在候选预测运动矢量列表中选定候选预测运动矢量的位置。在一些可行的实施方式中,候选预测运动矢量索引可表示为“merge_idx”。After selecting the candidate predicted motion vector, the video encoder may output a candidate predicted motion vector index (208). The candidate predicted motion vector index may indicate the location of the candidate predicted motion vector selected in the candidate predicted motion vector list. In some possible implementations, the candidate predicted motion vector index may be denoted as "merge_idx."
图6为本申请实施例中高级运动矢量预测模式的一种示例性流程图。视频编码器(例如视频编码器20)可执行AMVP操作210。FIG. 6 is an exemplary flowchart of an advanced motion vector prediction mode in an embodiment of the present application. A video encoder (e.g., video encoder 20) may perform AMVP operations 210.
在视频编码器开始AMVP操作210之后,视频编码器可产生用于当前PU的一个或多个运动矢量(211)。视频编码器可执行整数运动估计和分数运动估计以产生用于当前PU的运动矢量。如前文所描述,当前图像可与两个参考图像列表(列表0和列表1)相关联。如果当前PU经单向预测,则视频编码器可产生用于当前PU的列表0运动矢量或列表1运动矢量。列表0运动矢量可指示当前PU的图像块与列表0中的参考图像中的参考图像块之间的空间位移。列表1运动矢量可指示当前PU的图像块与列表1中的参考图像中的参考图像块之间的空间位移。如果当前PU经双向预测,则视频编码器可产生用于当前PU的列表0运动矢量和列表1运动矢量。After the video encoder begins AMVP operation 210, the video encoder may generate one or more motion vectors (211) for the current PU. The video encoder may perform integer motion estimation and fractional motion estimation to generate motion vectors for the current PU. As described above, the current image can be associated with two reference image lists (List 0 and List 1). If the current PU is unidirectionally predicted, the video encoder may generate a list 0 motion vector or a list 1 motion vector for the current PU. The list 0 motion vector may indicate a spatial displacement between an image block of the current PU and a reference image block in the reference image in list 0. The List 1 motion vector may indicate a spatial displacement between an image block of the current PU and a reference image block in the reference image in List 1. If the current PU is bi-predicted, the video encoder may generate a list 0 motion vector and a list 1 motion vector for the current PU.
在产生用于当前PU的一个或多个运动矢量之后,视频编码器可产生用于当前PU的预测性图像块(212)。视频编码器可基于由用于当前PU的一个或多个运动矢量指示的一个或多个参考图像块产生用于当前PU的预测性图像块。After generating one or more motion vectors for the current PU, the video encoder may generate a predictive image block for the current PU (212). The video encoder may generate a predictive image block for the current PU based on one or more reference image blocks indicated by one or more motion vectors for the current PU.
另外,视频编码器可产生用于当前PU的候选预测运动矢量列表(213)。视频解码器可以各种方式产生用于当前PU的候选预测运动矢量列表。举例来说,视频编码器可根据下文关于图8到图12描述的可行的实施方式中的一个或多个产生用于当前PU的候选预测运动矢量列表。在一些可行的实施方式中,当视频编码器在AMVP操作210 中产生候选预测运动矢量列表时,候选预测运动矢量列表可限于两个候选预测运动矢量。相比而言,当视频编码器在合并操作中产生候选预测运动矢量列表时,候选预测运动矢量列表可包括更多候选预测运动矢量(例如,五个候选预测运动矢量)。Additionally, the video encoder may generate a list of candidate predicted motion vectors for the current PU (213). The video decoder can generate a list of candidate predicted motion vectors for the current PU in various ways. For example, the video encoder may generate a candidate predicted motion vector list for the current PU in accordance with one or more of the possible implementations described below with respect to Figures 8-12. In some possible implementations, when the video encoder generates a candidate prediction motion vector list in AMVP operation 210, the candidate prediction motion vector list may be limited to two candidate prediction motion vectors. In contrast, when the video encoder generates a candidate prediction motion vector list in a merge operation, the candidate prediction motion vector list may include more candidate prediction motion vectors (eg, five candidate prediction motion vectors).
在产生用于当前PU的候选预测运动矢量列表之后,视频编码器可产生用于候选预测运动矢量列表中的每一候选预测运动矢量的一个或多个运动矢量差(214)。视频编码器可通过确定由候选预测运动矢量指示的运动矢量与当前PU的对应运动矢量之间的差来产生用于候选预测运动矢量的运动矢量差。After generating the candidate predicted motion vector list for the current PU, the video encoder may generate one or more motion vector differences for each candidate predicted motion vector in the candidate predicted motion vector list (214). The video encoder may generate a motion vector difference for the candidate predicted motion vector by determining a difference between the motion vector indicated by the candidate predicted motion vector and the corresponding motion vector of the current PU.
如果当前PU经单向预测,则视频编码器可产生用于每一候选预测运动矢量的单一MVD。如果当前PU经双向预测,则视频编码器可产生用于每一候选预测运动矢量的两个MVD。第一MVD可指示候选预测运动矢量的运动矢量与当前PU的列表0运动矢量之间的差。第二MVD可指示候选预测运动矢量的运动矢量与当前PU的列表1运动矢量之间的差。If the current PU is unidirectionally predicted, the video encoder may generate a single MVD for each candidate predicted motion vector. If the current PU is bi-predicted, the video encoder may generate two MVDs for each candidate predicted motion vector. The first MVD may indicate a difference between a motion vector of the candidate predicted motion vector and a list 0 motion vector of the current PU. The second MVD may indicate a difference between a motion vector of the candidate prediction motion vector and a list 1 motion vector of the current PU.
视频编码器可从候选预测运动矢量列表选择候选预测运动矢量中的一个或多个(215)。视频编码器可以各种方式选择一个或多个候选预测运动矢量。举例来说,视频编码器可选择具有最小误差地匹配待编码的运动矢量的相关联运动矢量的候选预测运动矢量,此可减少表示用于候选预测运动矢量的运动矢量差所需的位数目。The video encoder may select one or more of the candidate predicted motion vectors from the candidate predicted motion vector list (215). The video encoder can select one or more candidate predicted motion vectors in various ways. For example, the video encoder may select a candidate predicted motion vector of the associated motion vector that matches the motion vector to be encoded with minimal error, which may reduce the number of bits needed to represent the motion vector difference for the candidate predicted motion vector.
在选择一个或多个候选预测运动矢量之后,视频编码器可输出用于当前PU的一个或多个参考图像索引、一个或多个候选预测运动矢量索引,和用于一个或多个选定候选预测运动矢量的一个或多个运动矢量差(216)。After selecting one or more candidate predicted motion vectors, the video encoder may output one or more reference image indices for the current PU, one or more candidate predicted motion vector indices, and for one or more selected candidates One or more motion vector differences of the motion vectors are predicted (216).
在当前图像与两个参考图像列表(列表0和列表1)相关联且当前PU经单向预测的例子中,视频编码器可输出用于列表0的参考图像索引(“ref_idx_10”)或用于列表1的参考图像索引(“ref_idx_11”)。视频编码器还可输出指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_10_flag”)。或者,视频编码器可输出指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_11_flag”)。视频编码器还可输出用于当前PU的列表0运动矢量或列表1运动矢量的MVD。In an example where the current picture is associated with two reference picture lists (List 0 and List 1) and the current PU is unidirectionally predicted, the video encoder may output a reference picture index ("ref_idx_10") for list 0 or for The reference image index of List 1 ("ref_idx_11"). The video encoder may also output a candidate predicted motion vector index ("mvp_10_flag") indicating the location of the selected candidate predicted motion vector for the list 0 motion vector of the current PU in the candidate predicted motion vector list. Alternatively, the video encoder may output a candidate predicted motion vector index ("mvp_11_flag") indicating the location of the selected candidate predicted motion vector for the list 1 motion vector of the current PU in the candidate predicted motion vector list. The video encoder may also output an MVD for the list 0 motion vector or list 1 motion vector of the current PU.
在当前图像与两个参考图像列表(列表0和列表1)相关联且当前PU经双向预测的例子中,视频编码器可输出用于列表0的参考图像索引(“ref_idx_10”)和用于列表1的参考图像索引(“ref_idx_11”)。视频编码器还可输出指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_10_flag”)。另外,视频编码器可输出指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引(“mvp_11_flag”)。视频编码器还可输出用于当前PU的列表0运动矢量的MVD和用于当前PU的列表1运动矢量的MVD。In an example where the current picture is associated with two reference picture lists (List 0 and List 1) and the current PU is bi-predicted, the video encoder may output a reference picture index ("ref_idx_10") for list 0 and for the list Reference image index of 1 ("ref_idx_11"). The video encoder may also output a candidate predicted motion vector index ("mvp_10_flag") indicating the location of the selected candidate predicted motion vector for the list 0 motion vector of the current PU in the candidate predicted motion vector list. Additionally, the video encoder may output a candidate predicted motion vector index ("mvp_11_flag") indicating the location of the selected candidate predicted motion vector for the list 1 motion vector of the current PU in the candidate predicted motion vector list. The video encoder may also output an MVD for the list 0 motion vector of the current PU and an MVD for the list 1 motion vector of the current PU.
图7为本申请实施例中由视频解码器(例如视频解码器30)执行的运动补偿的一种示例性流程图。7 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 of the selected candidate predicted motion vector for the current PU (222). For example, the video decoder may receive a candidate predicted motion vector index indicating a location of the selected candidate predicted motion vector within the candidate PU motion vector list for the current PU.
如果当前PU的运动信息是使用AMVP模式进行编码且当前PU经双向预测,则视频解码器可接收第一候选预测运动矢量索引和第二候选预测运动矢量索引。第一候选预测运动矢量索引指示用于当前PU的列表0运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置。第二候选预测运动矢量索引指示用于当前PU的列表1运动矢量的选定候选预测运动矢量在候选预测运动矢量列表中的位置。在一些可行的实施方式中,单一语法元素可用以识别两个候选预测运动矢量索引。If the motion information of the current PU is encoded using the AMVP mode and the current PU is bi-predicted, the video decoder may receive the first candidate predicted motion vector index and the second candidate predicted motion vector index. The first candidate predicted motion vector index indicates the location of the selected candidate predicted motion vector for the list 0 motion vector of the current PU in the candidate predicted motion vector list. The second candidate prediction motion vector index indicates the position of the selected candidate prediction motion vector for the list 1 motion vector of the current PU in the candidate prediction motion vector list. In some possible implementations, a single syntax element can be used to identify two candidate predicted motion vector indices.
另外,视频解码器可产生用于当前PU的候选预测运动矢量列表(224)。视频解码器可以各种方式产生用于当前PU的此候选预测运动矢量列表。举例来说,视频解码器可使用下文参看图8到图12描述的技术来产生用于当前PU的候选预测运动矢量列表。当视频解码器产生用于候选预测运动矢量列表的时间候选预测运动矢量时,视频解码器可显式地或隐式地设定识别包括co-located PU的参考图像的参考图像索引,如前文关于图5所描述。Additionally, the video decoder may generate a list of candidate predicted motion vectors for the current PU (224). The video decoder can generate this candidate predicted motion vector list for the current PU in various ways. For example, the video decoder may generate a candidate predicted motion vector list for the current PU using the techniques described below with reference to Figures 8-12. When the video decoder generates a temporal candidate prediction motion vector for the candidate prediction motion vector 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 Figure 5 depicts.
在产生用于当前PU的候选预测运动矢量列表之后,视频解码器可基于由用于当前PU的候选预测运动矢量列表中的一个或多个选定候选预测运动矢量指示的运动信息确定当前PU的运动信息(225)。举例来说,如果当前PU的运动信息是使用合并模式而编码,则当前PU的运动信息可与由选定候选预测运动矢量指示的运动信息相同。如果当前PU的运动信息是使用AMVP模式而编码,则视频解码器可使用由所述或所述选定候选预测运动矢量指示的一个或多个运动矢量和码流中指示的一个或多个MVD来重建当前PU的一个或多个运动矢量。当前PU的参考图像索引和预测方向标识可与所述一个或多个选定候选预测运动矢量的参考图像索引和预测方向标识相同。在确定当前PU的运动信息之后,视频解码器可基于由当前PU的运动信息指示的一个或多个参考图像块产生用于当前PU的预测性图像块(226)。After generating the candidate predicted motion vector list for the current PU, the video decoder may determine the current PU based on the motion information indicated by one or more selected candidate predicted motion vectors in the candidate PU vector list for the current PU. Motion information (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 motion vector. If the motion information of the current PU is encoded using the AMVP mode, the video decoder may use one or more motion vectors indicated by the or the selected candidate prediction motion vector and one or more MVDs indicated in the code stream To reconstruct one or more motion vectors of the current PU. The reference image index and the prediction direction indicator of the current PU may be the same as the reference image index and the prediction direction indicator of the one or more selected candidate prediction motion vectors. After determining the motion information for the current PU, the video decoder may generate a predictive image block for the current PU based on the one or more reference image blocks indicated by the motion information for the current PU (226).
图8为本申请实施例中编码单元及与其关联的相邻位置图像块的一种示例性示意图,说明CU250和与CU250相关联的示意性的候选预测运动矢量位置252A到252E的示意图。本申请可将候选预测运动矢量位置252A到252E统称为候选预测运动矢量位置252。候选预测运动矢量位置252表示与CU250在同一图像中的空间候选预测运动矢量。候选预测运动矢量位置252A定位于CU250左方。候选预测运动矢量位置252B定位于CU250上方。候选预测运动矢量位置252C定位于CU250右上方。候选预测运动矢量位置252D定位于CU250左下方。候选预测运动矢量位置252E定位于CU250左上方。图8为用以提供帧间预测模块121和运动补偿模块162可产生候选预测运动矢量列表的方式的示意性实施方式。下文将参考帧间预测模块121解释实施方式,但应理解运动补偿模块162可实施相同技术,且因此产生相同候选预测运动矢量列表。8 is an exemplary schematic diagram of a coding unit and associated location image blocks associated therewith, illustrating a schematic diagram of CU 250 and illustrative candidate prediction motion vector locations 252A through 252E associated with CU 250. The present application may collectively refer to candidate predicted motion vector locations 252A through 252E as candidate predicted motion vector locations 252. The candidate predicted motion vector position 252 represents a spatial candidate predicted motion vector in the same image as the CU 250. The candidate predicted motion vector location 252A is located to the left of CU250. The candidate predicted motion vector location 252B is located above the CU 250. The candidate predicted motion vector position 252C is located at the upper right of the CU 250. The candidate predicted motion vector position 252D is located at the lower left of the CU 250. The candidate predicted motion vector position 252E is located at the upper left of the CU 250. 8 is an illustrative implementation to provide a way in which the inter prediction module 121 and the motion compensation module 162 can generate a list of candidate predicted motion vectors. Embodiments will be explained below with reference to inter prediction module 121, but it should be understood that motion compensation module 162 can implement the same techniques and thus generate the same candidate prediction motion vector list.
图9为本申请实施例中构建候选预测运动矢量列表的一种示例性流程图。将参考包括五个候选预测运动矢量的列表描述图9的技术,但本文中所描述的技术还可与具有其它大小的列表一起使用。五个候选预测运动矢量可各自具有索引(例如,0到4)。将参考一般视频解码器描述图9的技术。一般视频解码器示例性的可以为视频编码器(例如视频编码器20)或视频解码器(例如视频解码器30)。FIG. 9 is an exemplary flowchart of constructing a candidate prediction motion vector list in the embodiment of the present application. The technique of FIG. 9 will be described with reference to a list including five candidate predicted motion vectors, but the techniques described herein may also be used with lists of other sizes. The five candidate predicted motion vectors may each have an index (eg, 0 to 4). The technique of FIG. 9 will be described with reference to a general video decoder. A typical video decoder may illustratively be a video encoder (e.g., video encoder 20) or a video decoder (e.g., video decoder 30).
为了根据图9的实施方式重建候选预测运动矢量列表,视频解码器首先考虑四个 空间候选预测运动矢量(902)。四个空间候选预测运动矢量可以包括候选预测运动矢量位置252A、252B、252C和252D。四个空间候选预测运动矢量对应于与当前CU(例如,CU250)在同一图像中的四个PU的运动信息。视频解码器可以特定次序考虑列表中的四个空间候选预测运动矢量。举例来说,候选预测运动矢量位置252A可被第一个考虑。如果候选预测运动矢量位置252A可用,则候选预测运动矢量位置252A可指派到索引0。如果候选预测运动矢量位置252A不可用,则视频解码器可不将候选预测运动矢量位置252A包括于候选预测运动矢量列表中。候选预测运动矢量位置可出于各种理由而不可用。举例来说,如果候选预测运动矢量位置不在当前图像内,则候选预测运动矢量位置可能不可用。在另一可行的实施方式中,如果候选预测运动矢量位置经帧内预测,则候选预测运动矢量位置可能不可用。在另一可行的实施方式中,如果候选预测运动矢量位置在与当前CU不同的条带中,则候选预测运动矢量位置可能不可用。To reconstruct a candidate predicted motion vector list in accordance with the embodiment of Figure 9, the video decoder first considers four spatial candidate predicted motion vectors (902). The four spatial candidate prediction motion vectors may include candidate prediction motion vector positions 252A, 252B, 252C, and 252D. The four spatial candidate prediction motion vectors correspond to motion information of four PUs in the same image as the current CU (eg, CU 250). The video decoder may consider four spatial candidate prediction motion vectors in the list in a particular order. For example, the candidate predicted motion vector location 252A can be considered first. If the candidate predicted motion vector location 252A is available, the candidate predicted motion vector location 252A may be assigned to index 0. If the candidate predicted motion vector location 252A is not available, the video decoder may not include the candidate predicted motion vector location 252A in the candidate predicted motion vector list. Candidate predicted motion vector locations may not be available for a variety of reasons. For example, if the candidate predicted motion vector location is not within the current image, the candidate predicted motion vector location may not be available. In another possible implementation, if the candidate predicted motion vector location is intra predicted, the candidate predicted motion vector location may not be available. In another possible implementation, if the candidate predicted motion vector location is in a different strip than the current CU, the candidate predicted motion vector location may not be available.
在考虑候选预测运动矢量位置252A之后,视频解码器可接下来考虑候选预测运动矢量位置252B。如果候选预测运动矢量位置252B可用且不同于候选预测运动矢量位置252A,则视频解码器可将候选预测运动矢量位置252B添加到候选预测运动矢量列表。在此特定上下文中,术语“相同”和“不同”指代与候选预测运动矢量位置相关联的运动信息。因此,如果两个候选预测运动矢量位置具有相同运动信息则被视为相同,且如果其具有不同运动信息则被视为不同。如果候选预测运动矢量位置252A不可用,则视频解码器可将候选预测运动矢量位置252B指派到索引0。如果候选预测运动矢量位置252A可用,则视频解码器可将候选预测运动矢量位置252指派到索引1。如果候选预测运动矢量位置252B不可用或与候选预测运动矢量位置252A相同,则视频解码器跳过候选预测运动矢量位置252B且不将其包括于候选预测运动矢量列表中。After considering the candidate predicted motion vector location 252A, the video decoder may next consider the candidate predicted motion vector location 252B. If the candidate predicted motion vector location 252B is available and different than the candidate predicted motion vector location 252A, the video decoder may add the candidate predicted motion vector location 252B to the candidate predicted motion vector list. In this particular context, the terms "identical" and "different" refer to motion information associated with candidate predicted motion vector locations. Therefore, two candidate predicted motion vector positions are considered identical if they have the same motion information, and are considered different if they have different motion information. If the candidate predicted motion vector location 252A is not available, the video decoder may assign the candidate predicted motion vector location 252B to index 0. If the candidate predicted motion vector location 252A is available, the video decoder may assign the candidate predicted motion vector location 252 to index 1. If the candidate predicted motion vector location 252B is not available or the same as the candidate predicted motion vector location 252A, the video decoder skips the candidate predicted motion vector location 252B and does not include it in the candidate predicted motion vector list.
候选预测运动矢量位置252C由视频解码器类似地考虑以供包括于列表中。如果候选预测运动矢量位置252C可用且不与候选预测运动矢量位置252B和252A相同,则视频解码器将候选预测运动矢量位置252C指派到下一可用索引。如果候选预测运动矢量位置252C不可用或并非不同于候选预测运动矢量位置252A和252B中的至少一者,则视频解码器不将候选预测运动矢量位置252C包括于候选预测运动矢量列表中。接下来,视频解码器考虑候选预测运动矢量位置252D。如果候选预测运动矢量位置252D可用且不与候选预测运动矢量位置252A、252B和252C相同,则视频解码器将候选预测运动矢量位置252D指派到下一可用索引。如果候选预测运动矢量位置252D不可用或并非不同于候选预测运动矢量位置252A、252B和252C中的至少一者,则视频解码器不将候选预测运动矢量位置252D包括于候选预测运动矢量列表中。以上实施方式大体上描述示例性地考虑候选预测运动矢量252A到252D以供包括于候选预测运动矢量列表中,但在一些实施方施中,可首先将所有候选预测运动矢量252A到252D添加到候选预测运动矢量列表,稍后从候选预测运动矢量列表移除重复。The candidate predicted motion vector location 252C is similarly considered by the video decoder for inclusion in the list. If the candidate predicted motion vector location 252C is available and not the same as the candidate predicted motion vector locations 252B and 252A, the video decoder assigns the candidate predicted motion vector location 252C to the next available index. If the candidate predicted motion vector location 252C is not available or is not different than at least one of the candidate predicted motion vector locations 252A and 252B, the video decoder does not include the candidate predicted motion vector location 252C in the candidate predicted motion vector list. Next, the video decoder considers the candidate predicted motion vector location 252D. If the candidate predicted motion vector location 252D is available and not the same as the candidate predicted motion vector locations 252A, 252B, and 252C, the video decoder assigns the candidate predicted motion vector location 252D to the next available index. If the candidate predicted motion vector location 252D is not available or is not different than at least one of the candidate predicted motion vector locations 252A, 252B, and 252C, the video decoder does not include the candidate predicted motion vector location 252D in the candidate predicted motion vector list. The above embodiments generally describe exemplarily considering candidate prediction motion vectors 252A through 252D for inclusion in a candidate prediction motion vector list, but in some implementations, all candidate prediction motion vectors 252A through 252D may first be added to candidates. The motion vector list is predicted, and the repetition is removed from the candidate prediction motion vector list later.
在视频解码器考虑前四个空间候选预测运动矢量之后,候选预测运动矢量列表可能包括四个空间候选预测运动矢量或者该列表可能包括少于四个空间候选预测运动矢量。如果列表包括四个空间候选预测运动矢量(904,是),则视频解码器考虑时间候选预测运动矢量(906)。时间候选预测运动矢量可对应于不同于当前图像的图像的co-located PU的运动信息。如果时间候选预测运动矢量可用且不同于前四个空间候 选预测运动矢量,则视频解码器将时间候选预测运动矢量指派到索引4。如果时间候选预测运动矢量不可用或与前四个空间候选预测运动矢量中的一者相同,则视频解码器不将所述时间候选预测运动矢量包括于候选预测运动矢量列表中。因此,在视频解码器考虑时间候选预测运动矢量(906)之后,候选预测运动矢量列表可能包括五个候选预测运动矢量(框902处考虑的前四个空间候选预测运动矢量和框904处考虑的时间候选预测运动矢量)或可能包括四个候选预测运动矢量(框902处考虑的前四个空间候选预测运动矢量)。如果候选预测运动矢量列表包括五个候选预测运动矢量(908,是),则视频解码器完成构建列表。After the video decoder considers the first four spatial candidate prediction motion vectors, the candidate prediction motion vector list may include four spatial candidate prediction motion vectors or the list may include less than four spatial candidate prediction motion vectors. If the list includes four spatial candidate prediction motion vectors (904, YES), the video decoder considers the temporal candidate prediction motion vectors (906). The temporal candidate prediction motion vector may correspond to motion information of a co-located PU that is different from the image of the current image. If the temporal candidate prediction motion vector is available and different from the first four spatial candidate prediction motion vectors, the video decoder assigns the temporal candidate prediction motion vector to index 4. If the temporal candidate prediction motion vector is not available or identical to one of the first four spatial candidate prediction motion vectors, the video decoder does not include the temporal candidate prediction motion vector in the candidate prediction motion vector list. Thus, after the video decoder considers the temporal candidate prediction motion vector (906), the candidate prediction motion vector list may include five candidate prediction motion vectors (the first four spatial candidate prediction motion vectors considered at block 902 and considered at block 904) The temporal candidate predictive motion vector) or may include four candidate predicted motion vectors (the first four spatial candidate predicted motion vectors considered at block 902). If the candidate predicted motion vector list includes five candidate predicted motion vectors (908, YES), the video decoder completes the build list.
如果候选预测运动矢量列表包括四个候选预测运动矢量(908,否),则视频解码器可考虑第五空间候选预测运动矢量(910)。第五空间候选预测运动矢量可(例如)对应于候选预测运动矢量位置252E。如果位置252E处的候选预测运动矢量可用且不同于位置252A、252B、252C和252D处的候选预测运动矢量,则视频解码器可将第五空间候选预测运动矢量添加到候选预测运动矢量列表,第五空间候选预测运动矢量经指派到索引4。如果位置252E处的候选预测运动矢量不可用或并非不同于候选预测运动矢量位置252A、252B、252C和252D处的候选预测运动矢量,则视频解码器可不将位置252处的候选预测运动矢量包括于候选预测运动矢量列表中。因此在考虑第五空间候选预测运动矢量(910)之后,列表可能包括五个候选预测运动矢量(框902处考虑的前四个空间候选预测运动矢量和框910处考虑的第五空间候选预测运动矢量)或可能包括四个候选预测运动矢量(框902处考虑的前四个空间候选预测运动矢量)。If the candidate predicted motion vector list includes four candidate predicted motion vectors (908, NO), the video decoder may consider the fifth spatial candidate predicted motion vector (910). The fifth spatial candidate prediction motion vector may, for example, correspond to the candidate predicted motion vector location 252E. If the candidate predicted motion vector at location 252E is available and different than the candidate predicted motion vector at locations 252A, 252B, 252C, and 252D, the video decoder may add the fifth spatial candidate predicted motion vector to the candidate predicted motion vector list, The five-space candidate prediction motion vector is assigned to index 4. If the candidate predicted motion vector at location 252E is not available or is not different than the candidate predicted motion vector at candidate predicted motion vector locations 252A, 252B, 252C, and 252D, the video decoder may not include the candidate predicted motion vector at location 252 Candidate predictive motion vector list. Thus after considering the fifth spatial candidate prediction motion vector (910), the list may include five candidate prediction motion vectors (the first four spatial candidate prediction motion vectors considered at block 902 and the fifth spatial candidate prediction motion considered at block 910) Vector) or may include four candidate predicted motion vectors (the first four spatial candidate predicted motion vectors considered at block 902).
如果候选预测运动矢量列表包括五个候选预测运动矢量(912,是),则视频解码器完成产生候选预测运动矢量列表。如果候选预测运动矢量列表包括四个候选预测运动矢量(912,否),则视频解码器添加人工产生的候选预测运动矢量(914)直到列表包括五个候选预测运动矢量(916,是)为止。If the candidate predicted motion vector list includes five candidate predicted motion vectors (912, YES), the video decoder finishes generating the candidate predicted motion vector list. If the candidate predicted motion vector list includes four candidate predicted motion vectors (912, No), the video decoder adds the artificially generated candidate predicted motion vectors (914) until the list includes five candidate predicted motion vectors (916, YES).
如果在视频解码器考虑前四个空间候选预测运动矢量之后,列表包括少于四个空间候选预测运动矢量(904,否),则视频解码器可考虑第五空间候选预测运动矢量(918)。第五空间候选预测运动矢量可(例如)对应于候选预测运动矢量位置252E。如果位置252E处的候选预测运动矢量可用且不同于已包括于候选预测运动矢量列表中的候选预测运动矢量,则视频解码器可将第五空间候选预测运动矢量添加到候选预测运动矢量列表,第五空间候选预测运动矢量经指派到下一可用索引。如果位置252E处的候选预测运动矢量不可用或并非不同于已包括于候选预测运动矢量列表中的候选预测运动矢量中的一者,则视频解码器可不将位置252E处的候选预测运动矢量包括于候选预测运动矢量列表中。视频解码器可接着考虑时间候选预测运动矢量(920)。如果时间候选预测运动矢量可用且不同于已包括于候选预测运动矢量列表中的候选预测运动矢量,则视频解码器可将所述时间候选预测运动矢量添加到候选预测运动矢量列表,所述时间候选预测运动矢量经指派到下一可用索引。如果时间候选预测运动矢量不可用或并非不同于已包括于候选预测运动矢量列表中的候选预测运动矢量中的一者,则视频解码器可不将所述时间候选预测运动矢量包括于候选预测运动矢量列表中。If the list includes less than four spatial candidate prediction motion vectors after the video decoder considers the first four spatial candidate prediction motion vectors (904, NO), the video decoder may consider the fifth spatial candidate prediction motion vector (918). The fifth spatial candidate prediction motion vector may, for example, correspond to the candidate predicted motion vector location 252E. If the candidate prediction motion vector at location 252E is available and different than the candidate prediction motion vector already included in the candidate prediction motion vector list, the video decoder may add the fifth spatial candidate prediction motion vector to the candidate prediction motion vector list, The five spatial candidate prediction motion vectors are assigned to the next available index. If the candidate predicted motion vector at location 252E is not available or is not different from one of the candidate predicted motion vectors that have been included in the candidate predicted motion vector list, the video decoder may not include the candidate predicted motion vector at location 252E Candidate predictive motion vector list. The video decoder may then consider the temporal candidate prediction motion vector (920). If the temporal candidate prediction motion vector is available and different from the candidate prediction motion vector that has been included in the candidate prediction motion vector list, the video decoder may add the temporal candidate prediction motion vector to the candidate prediction motion vector list, the temporal candidate The predicted motion vector is assigned to the next available index. If the temporal candidate prediction motion vector is not available or is not different from one of the candidate prediction motion vectors that have been included in the candidate prediction motion vector list, the video decoder may not include the temporal candidate prediction motion vector in the candidate prediction motion vector List.
如果在考虑第五空间候选预测运动矢量(框918)和时间候选预测运动矢量(框920)之后,候选预测运动矢量列表包括五个候选预测运动矢量(922,是),则视频解码器完 成产生候选预测运动矢量列表。如果候选预测运动矢量列表包括少于五个候选预测运动矢量(922,否),则视频解码器添加人工产生的候选预测运动矢量(914)直到列表包括五个候选预测运动矢量(916,是)为止。If after considering the fifth spatial candidate prediction motion vector (block 918) and the temporal candidate prediction motion vector (block 920), the candidate predicted motion vector list includes five candidate predicted motion vectors (922, YES), then the video decoder completes generation A list of candidate predicted motion vectors. If the candidate predicted motion vector list includes less than five candidate predicted motion vectors (922, No), the video decoder adds the artificially generated candidate predicted motion vectors (914) until the list includes five candidate predicted motion vectors (916, yes) until.
根据本申请的技术,可在空间候选预测运动矢量和时间候选预测运动矢量之后人工产生额外合并候选预测运动矢量以使合并候选预测运动矢量列表的大小固定为合并候选预测运动矢量的指定数目(例如前文图9的可行的实施方式中的五个)。额外合并候选预测运动矢量可包括示例性的经组合双向预测性合并候选预测运动矢量(候选预测运动矢量1)、经缩放双向预测性合并候选预测运动矢量(候选预测运动矢量2),和零向量Merge/AMVP候选预测运动矢量(候选预测运动矢量3)。According to the techniques of the present application, an additional merge candidate prediction motion vector may be artificially generated after the spatial candidate prediction motion vector and the temporal candidate prediction motion vector to fix the size of the merge candidate prediction motion vector list to a specified number of merge candidate prediction motion vectors (eg, Five of the possible embodiments of Figure 9 above. The additional merge candidate prediction motion vector may include an exemplary combined bi-predictive merge candidate motion vector (candidate motion vector 1), a scale bi-predictive merge candidate motion vector (candidate motion vector 2), and a zero vector Merge/AMVP candidate prediction motion vector (candidate prediction motion vector 3).
图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 prediction motion vector list in an embodiment of the present application. The combined bi-predictive merging candidate prediction motion vector may be generated by combining the original merging candidate prediction motion vector. In particular, two candidate predicted motion vectors (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) in the original candidate prediction motion vector may be used to generate a bidirectional predictive merge candidate prediction motion vector. In FIG. 10, two candidate prediction motion vectors are included in the original merge candidate prediction motion vector list. The prediction type of one candidate prediction motion vector is list 0 unidirectional prediction, and the prediction type of another candidate prediction motion vector 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 a bidirectional predictive merge candidate predictive motion vector (which has mvL0_A and ref0 in list 0 and mvL1_B and ref0) in Listing 1 and check if it is different from the candidate predicted motion vector that has been included in the candidate predicted motion vector list. If they are different, the video decoder may include the bi-predictive merge candidate motion vector for inclusion in the candidate motion vector list.
图11为本申请实施例中将经过缩放的候选运动矢量添加到合并模式候选预测运动矢量列表的一种示例性示意图。经缩放双向预测性合并候选预测运动矢量可通过缩放原始合并候选预测运动矢量而产生。具体来说,来自原始候选预测运动矢量的一候选预测运动矢量(其可具有mvLX和refIdxLX)可用以产生双向预测性合并候选预测运动矢量。在图11的可行的实施方式中,两个候选预测运动矢量包括于原始合并候选预测运动矢量列表中。一候选预测运动矢量的预测类型为列表0单向预测,且另一候选预测运动矢量的预测类型为列表1单向预测。在此可行的实施方式中,mvL0_A和ref0可从列表0拾取,且ref0可复制到列表1中的参考索引ref0′。接着,可通过缩放具有ref0和ref0′的mvL0_A而计算mvL0′_A。缩放可取决于POC距离。接着,可产生双向预测性合并候选预测运动矢量(其具有列表0中的mvL0_A和ref0以及列表1中的mvL0′_A和ref0′)并检查其是否为重复的。如果其并非重复的,则可将其添加到合并候选预测运动矢量列表。FIG. 11 is an exemplary schematic diagram of adding a scaled candidate motion vector to a merge mode candidate prediction motion vector list in an embodiment of the present application. The scaled bi-predictive merge candidate prediction motion vector may be generated by scaling the original merge candidate prediction motion vector. In particular, a candidate predicted motion vector (which may have mvLX and refIdxLX) from the original candidate predicted motion vector may be used to generate a bi-predictive merge candidate predictive motion vector. In a possible implementation of Figure 11, two candidate predicted motion vectors are included in the original merge candidate predictive motion vector list. The prediction type of one candidate prediction motion vector is list 0 unidirectional prediction, and the prediction type of another candidate prediction motion vector is list 1 unidirectional prediction. In this possible implementation, mvL0_A and ref0 may be picked up from list 0, and ref0 may be copied to reference index ref0' in list 1. Next, mvL0'_A can be calculated by scaling mvL0_A having ref0 and ref0'. The scaling can depend on the POC distance. Next, a bidirectional predictive merge candidate prediction motion vector (which has mvL0_A and ref0 in list 0 and mvL0'_A and ref0' in list 1) can be generated and checked for repetition. If it is not a duplicate, it can be added to the merge candidate prediction motion vector list.
图12为本申请实施例中将零运动矢量添加到合并模式候选预测运动矢量列表的一种示例性示意图。零向量合并候选预测运动矢量可通过组合零向量与可经参考的参考索引而产生。如果零向量候选预测运动矢量并非重复的,则可将其添加到合并候选预测运动矢量列表。对于每一产生的合并候选预测运动矢量,运动信息可与列表中的前一候选预测运动矢量的运动信息比较。FIG. 12 is an exemplary schematic diagram of adding a zero motion vector to a merge mode candidate motion vector list in the embodiment of the present application. Zero Vector Merging Candidate Prediction Motion Vectors can be generated by combining a zero vector with a reference index that can be referenced. If the zero vector candidate prediction motion vector is not repeated, it may be added to the merge candidate prediction motion vector list. For each generated merge candidate predicted motion vector, the motion information may be compared to the motion information of the previous candidate predicted motion vector in the list.
在一种可行的实施方式中,如果新产生的候选预测运动矢量不同于已包括于候选 预测运动矢量列表中的候选预测运动矢量,则将所产生的候选预测运动矢量添加到合并候选预测运动矢量列表。确定新产生的候选预测运动矢量是否不同于已包括于候选预测运动矢量列表中的候选预测运动矢量的过程有时称作修剪(pruning)。通过修剪,每一新产生的候选预测运动矢量可与列表中的现有候选预测运动矢量比较。在一些可行的实施方式中,修剪操作可包括比较一个或多个新候选预测运动矢量与已在候选预测运动矢量列表中的候选预测运动矢量和不添加为已在候选预测运动矢量列表中的候选预测运动矢量的重复的新候选预测运动矢量。在另一些可行的实施方式中,修剪操作可包括将一个或多个新候选预测运动矢量添加到候选预测运动矢量列表且稍后从所述列表移除重复候选预测运动矢量。In a feasible implementation manner, if the newly generated candidate prediction motion vector is different from the candidate prediction motion vector that has been included in the candidate prediction motion vector list, the generated candidate prediction motion vector is added to the merge candidate prediction motion vector. List. The process of determining whether the newly generated candidate predicted motion vector is different from the candidate predicted motion vector that has been included in the candidate predicted motion vector list is sometimes referred to as pruning. By cropping, each newly generated candidate predicted motion vector can be compared to an existing candidate predicted motion vector in the list. In some possible implementations, the pruning operation may include comparing one or more new candidate prediction motion vectors with candidate prediction motion vectors that have been in the candidate prediction motion vector list and candidates that are not added as candidates in the candidate prediction motion vector list A new candidate prediction motion vector that predicts the repetition of the motion vector. In other possible implementations, the pruning operation can include adding one or more new candidate prediction motion vectors to the candidate prediction motion vector list and later removing the duplicate candidate prediction motion vectors from the list.
JVET-F1001-v2在第2.3节描述了帧间编码的改进技术,与本申请上述实施例相比,又介绍了选择性时域运动矢量预测(Alternative temporal motion vector prediction,ATMVP)、时空域运动矢量预测(Spatial-temporal motion vector prediction,STMVP)等多种帧间预测的方法。应理解,通过上述方法(ATMVP、STMVP或第2.3节描述的其它方法)获得的预测运动矢量,都可以作为上文中Merge候选预测运动矢量列表、AMVP候选预测运动矢量列表或者其它候选预测运动矢量列表中的候选预测运动矢量。当待处理块具有多个可用的候选预测运动矢量时,编码端需要一个指示信息用来告知解码端哪个候选预测运动矢量被用来作为实际的预测运动矢量用来重构待处理块。因此,每个候选预测运动矢量对应于一个索引值,或者类似的标识。每个索引值对应一个二值化表示,或者叫做二值化字符串,上述实际的预测运动矢量的索引值的二值化表示即为需要从编码端传递到解码端的指示信息。采用合理的二值化策略来编码索引值,可以节省编码比特,提高编码效率。示例性的,每一个候选预测运动矢量在编码端被选择作为实际的预测运动矢量都有一定的概率,对于大概率的候选预测运动矢量的索引值采用较短的二值化字符串(也称为码字),对于小概率的候选预测运动矢量的索引值采用较长的二值化字符串,可以节省编码比特。JVET-F1001-v2 describes an improved technique for inter-frame coding in Section 2.3. Compared with the above-mentioned embodiments of the present application, an alternative temporal motion vector prediction (ATMVP) and space-time domain motion are introduced. A method of predicting a plurality of interframes, such as a spatial-temporal motion vector prediction (STMVP). It should be understood that the predicted motion vector obtained by the above method (ATMVP, STMVP or other methods described in Section 2.3) may be used as the Merge candidate motion vector list, AMVP candidate motion vector list or other candidate motion vector list in the above. Candidate prediction motion vector in . When the block to be processed has a plurality of available candidate motion vectors available, the encoder needs an indication to inform the decoder which candidate motion vector is used as the actual motion vector to reconstruct the block to be processed. Therefore, each candidate predicted motion vector corresponds to an index value, or a similar identifier. Each index value corresponds to a binarized representation, or a binarized character string. The binarized representation of the index value of the actual predicted motion vector is the indication information that needs to be transmitted from the encoding end to the decoding end. Using a reasonable binarization strategy to encode the index value can save coding bits and improve coding efficiency. Exemplarily, each candidate prediction motion vector has a certain probability of being selected as the actual prediction motion vector at the encoding end, and a shorter binarized string for the index value of the candidate motion vector with high probability. For the codeword), the index value of the candidate motion vector with a small probability is a longer binarized string, which can save coding bits.
具体的,举例来说,可选的候选预测运动矢量一共有三种,分别为索引0,索引1,索引2,一组待处理块实际被选用的预测运动矢量分别为索引0,索引1,索引1,索引1,索引1,索引0,索引2,索引1,则如果按照对于大概率的候选预测运动矢量的索引值采用较短的二值化字符串的策略编码索引值,索引1对应“1”,索引0对应“00”,索引2对应“01”,显然“00”或“01”的二值化字符串的长度为2,“1”的二值化字符串的长度为1,则编码上述一组预测运动矢量需要的二值化字符串为“00”,“1”,“1”,“1”,“1”,“00”,“01”,“1”,总计长度为11;如果按照相反的策略编码索引值,索引2对应“1”,索引0对应“00”,索引1对应“01”,则编码上述一组预测运动矢量需要的二值化字符串为“00”,“01”,“01”,“01”,“01”,“00”,“1”,“01”,总计长度为15。所以,以按照对于大概率的候选预测运动矢量的索引值采用较短的二值化字符串的策略编码索引值需要的二值化字符串越短,一般的,编码二值化字符串所需要的比特数也越少。Specifically, for example, there are three candidate prediction motion vectors, which are index 0, index 1, and index 2. The predicted motion vectors that are actually selected by a group of to-be-processed blocks are index 0 and index 1, respectively. Index 1, index 1, index 1, index 0, index 2, index 1, then if the index value of the shorter binarized string is used according to the index value of the candidate motion vector for the large probability, the index 1 corresponds to "1", index 0 corresponds to "00", index 2 corresponds to "01", obviously the length of the binary string of "00" or "01" is 2, and the length of the binary string of "1" is 1. , the binarized strings required to encode the above set of predicted motion vectors are "00", "1", "1", "1", "1", "00", "01", "1", total The length is 11; if the index value is encoded according to the opposite strategy, index 2 corresponds to "1", index 0 corresponds to "00", index 1 corresponds to "01", then the binarized string required to encode the above set of predicted motion vectors is "00", "01", "01", "01", "01", "00", "1", 01 ", for a total length of 15. Therefore, the shorter the binarized string required to encode the index value by the strategy of using the shorter binarized string according to the index value of the candidate motion vector for the large probability, the general need to encode the binarized string The number of bits is also small.
本申请实施例旨在:当待处理块具有多个候选预测运动矢量时,以待处理块和待处理块的候选预测运动矢量所指示的参考图像块之间的相似度为先验知识,来协助确定各个候选预测运动矢量的标识的编码方式,从而达到节省编码比特,提高编码效率 的目的。在一种可行的实施方式中,由于待处理块的像素值无法在解码端直接获得,因此上述相似度被用待处理块周边的重构像素集合和参考图像块对应的重构像素集合的相似度所近似,也就是说,待处理块周边的重构像素集合和参考图像块对应的重构像素集合的相似度用来表征待处理块和待处理块的候选预测运动矢量所指示的参考图像块之间的相似度。The embodiment of the present application aims to: when the to-be-processed block has a plurality of candidate prediction motion vectors, the similarity between the reference image blocks indicated by the candidate prediction motion vector of the to-be-processed block and the to-be-processed block is a priori knowledge. Assist in determining the coding mode of the identifiers of the candidate prediction motion vectors, thereby saving coding bits and improving coding efficiency. In a feasible implementation manner, since the pixel value of the to-be-processed block cannot be directly obtained at the decoding end, the similarity is similar to the reconstructed pixel set corresponding to the block to be processed and the reconstructed pixel set corresponding to the reference image block. The degree is similar, that is, the similarity between the reconstructed pixel set around the block to be processed and the reconstructed pixel set corresponding to the reference image block is used to represent the reference image indicated by the candidate predicted motion vector of the block to be processed and the block to be processed. The similarity between blocks.
所以,应理解,以编码端为例,本申请实施例适用于从待处理块的多个参考图像块中,确定一个参考图像块,并编码该参考图像块的标识信息的场景。而与该多个参考图像块来自于帧间类型的预测模式,来自于帧内类型的预测模式,还是来自视点间的预测模式(多视点或三维视频编码,Multi-view or 3D Video Codig),还是来自层间的预测模式(可伸缩视频编码,Scalabe Video Coding)无关,与具体的参考图像块的获得方法(比如采用ATMVP还是STMVP,或者帧内区块复制模式)无关,与指示参考图像块的运动矢量是属于整个编码单元的运动矢量,还是属于编码单元中某个子编码单元的运动矢量无关,上述符合本申请实施例适用场景的各种预测模式以及获取参考图像块的方法(即获取运动矢量的方法)都可以依照或者结合本申请实施例中的方案,达到提高编码效率的技术效果。Therefore, it should be understood that, in the example of the encoding end, the embodiment of the present application is applicable to a scenario in which a reference image block is determined from a plurality of reference image blocks of a block to be processed, and the identification information of the reference image block is encoded. And the plurality of reference image blocks are derived from an inter-frame type prediction mode, from an intra-frame type prediction mode, or from a viewpoint-to-view mode (Multi-view or 3D Video Codig). It is also independent of the prediction mode (scalable video coding, Scalabe Video Coding) from the layer, regardless of the specific reference image block acquisition method (such as using ATMVP or STMVP, or intra block copy mode), and indicating the reference image block. The motion vector is a motion vector belonging to the entire coding unit, and is not related to the motion vector of a certain coding unit in the coding unit. The foregoing various prediction modes consistent with the applicable scene of the embodiment of the present application and a method for acquiring a reference image block (ie, acquiring motion) The method of the vector can achieve the technical effect of improving the coding efficiency according to or in combination with the solution in the embodiment of the present application.
图13为本申请实施例的一种编码方法1000的示意性流程图。如上所述,本申请实施例可适用于多种应用场景,为了描述简单,将待处理块的每一个候选参考图像块的获取方式分别称为模式1,模式2,模式3等,上述获取方式既包括不同的预测方法,比如ATMVP和STMVP,也包括使用同一种预测方法进行的不同操作,比如获取Merge模式中左相邻块的运动矢量和获取Merge模式中上相邻块的运动矢量,统称为不同的获取方式,并用不同的模式来表示。不妨令每一种模式对应一运动矢量,同时对应一个标识值。应理解,上述运动矢量既包括传统帧间预测中使用的运动矢量,也包括帧内预测中使用运动估计时,用来表征待处理块和参考图像块的位移矢量(在同一帧中),还包括视点间预测时,用来表征视点间匹配关系的矢量,以及层间预测时,用来表征不同层间匹配关系的矢量,统称为运动矢量,用于获取待处理块的参考图像块。每个运动矢量还对应一个参考帧信息,运动矢量所指示的参考图像块即来自于参考帧信息。不同的应用场景参考帧信息的表现形式各不相同,例如,在帧间预测模式中,参考帧信息可以用来表示已重构的时域参考帧,比如在Merge模式中获取左相邻块的运动矢量,同时也需要获取左相邻块的参考帧信息,在参考帧信息确定的参考帧中按照运动矢量才确定对应的参考图像块。在帧内预测模式中,一般的,参考帧即为当前帧,在此场景下,参考帧信息便可以省略。在多视点编码中,参考帧信息又可以用来表示已重构的不同时刻或同一时刻不同视点的重构帧。在可伸缩编码中,参考帧信息又可以用来表示已重构的不同时刻或同一时刻不同层的重构帧。参考帧信息依照应用场景不同,可以为一个索引值,也可以为一个0或1的标识位。上述每种模式对应的标识值,用来区分各种模式,可以为索引值,或者身份标识,不做限定。示例性地,不妨建立如下对应关系,以利于后续方案的描述。FIG. 13 is a schematic flowchart of an encoding method 1000 according to an embodiment of the present application. As described above, the embodiments of the present application are applicable to various application scenarios. For the sake of simplicity of description, the acquisition modes of each candidate reference image block of the to-be-processed block are respectively referred to as mode 1, mode 2, mode 3, etc., and the foregoing acquisition manners. It includes different prediction methods, such as ATMVP and STMVP, as well as different operations using the same prediction method, such as obtaining the motion vector of the left neighboring block in the Merge mode and obtaining the motion vector of the upper neighboring block in the Merge mode. For different acquisition methods, and use different modes to represent. Let each mode correspond to a motion vector and correspond to an identification value. It should be understood that the above motion vector includes both the motion vector used in the traditional inter prediction, and the displacement vector (in the same frame) used to represent the block to be processed and the reference image block when motion estimation is used in intra prediction, and Including inter-view prediction, a vector used to characterize the matching relationship between views, and a vector used to represent the matching relationship between different layers when inter-layer prediction is used, collectively referred to as a motion vector, for obtaining a reference image block of a block to be processed. Each motion vector also corresponds to one reference frame information, and the reference image block indicated by the motion vector comes from the reference frame information. Different application scenarios refer to frame information in different representations. For example, in the inter prediction mode, reference frame information may be used to represent a reconstructed time domain reference frame, such as acquiring a left neighboring block in the Merge mode. The motion vector also needs to acquire the reference frame information of the left neighboring block, and the corresponding reference image block is determined according to the motion vector in the reference frame determined by the reference frame information. In the intra prediction mode, in general, the reference frame is the current frame. In this scenario, the reference frame information can be omitted. In multi-view coding, the reference frame information can in turn be used to represent reconstructed frames of different views at different times or at the same time. In scalable coding, the reference frame information can in turn be used to represent reconstructed frames of different layers that have been reconstructed at different times or at the same time. The reference frame information may be an index value or a 0 or 1 flag according to the application scenario. The identifier value corresponding to each mode is used to distinguish various modes, and may be an index value or an identity identifier, which is not limited. Illustratively, the following correspondence may be established to facilitate the description of the subsequent scheme.
Figure PCTCN2018102632-appb-000003
Figure PCTCN2018102632-appb-000003
Figure PCTCN2018102632-appb-000004
Figure PCTCN2018102632-appb-000004
表1Table 1
还应理解,上述多个候选预测运动信息构成了一个集合,可以以列表的形式存在,也可以以一个列表的补集的形式存在,也可以以一个子集的形式存在,不做限定。It should also be understood that the plurality of candidate prediction motion information may constitute a set, may exist in the form of a list, may exist in the form of a list of complements, or may exist in the form of a subset, and is not limited.
如图13所示,本申请实施例的一种待处理图像块预测运动信息的编码方法1000,包括:As shown in FIG. 13 , an encoding method 1000 for predicting motion information of an image block to be processed according to an embodiment of the present application includes:
S1001、获取待处理图像块的N个候选预测运动信息。S1001. Acquire N candidate predicted motion information of the image block to be processed.
其中,N为大于1的整数。该N个候选预测运动信息互不相同。应理解,当运动信息包括运动矢量和参考帧信息时,运动信息互不相同,也包括运动矢量相同但参考帧信息不同的情况。前文中已经介绍了修剪的技术,应理解,在获得待处理图像块的N个候选预测运动信息的过程中,进行了修剪的操作,以使最终获得的N个候选预测运动信息互不相同,不再赘述。Where N is an integer greater than one. The N candidate predicted motion informations are different from each other. It should be understood that when the motion information includes the motion vector and the reference frame information, the motion information is different from each other, and also includes the case where the motion vectors are the same but the reference frame information is different. The technique of pruning has been introduced in the foregoing, and it should be understood that in the process of obtaining N candidate prediction motion information of an image block to be processed, a pruning operation is performed, so that the N candidate motion information obtained finally is different from each other. No longer.
在一种可行的实施方式10011中,所述获取待处理图像块的N个候选预测运动信息,包括:按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。In a feasible implementation manner 10011, the acquiring the N candidate prediction motion information of the to-be-processed image block includes: acquiring, in a preset order, N different from the image block to be processed, and having a preset The motion information of the image block of the positional relationship is used as the N candidate predicted motion information.
例如,前文所述的H.265标准中所规定的Merge模式的候选预测模式的确定方式,即按照一定的顺序获取与待处理图像块具有预设空域位置关系(例如252A、252B、252C、252D和252E)和/或预设时域位置关系(例如co-located位置)的图像块的运动信息,并通过修剪,最终得到N个互不相同的候选预测运动信息。For example, the candidate prediction mode of the Merge mode specified in the H.265 standard described above is determined by acquiring a predetermined spatial domain position relationship with the image block to be processed in a certain order (for example, 252A, 252B, 252C, 252D). And 252E) and/or motion information of an image block of a preset time domain position relationship (for example, a co-located position), and by trimming, finally obtain N candidate prediction motion information that are different from each other.
在一种可行的实施方式10012中,所述获取待处理图像块的N个候选预测运动信息,包括:按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;确定所述M个候选预测运动信息的分组方式;根据所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。In a feasible implementation manner 10012, the acquiring the N candidate predicted motion information of the to-be-processed image block includes: acquiring, in a preset order, M different presets and the preset image block to have a preset The motion information of the image block of the positional relationship is the M candidate prediction motion information, wherein the M candidate prediction motion information includes the N candidate prediction motion information, and M is an integer greater than N; determining the M candidate predictions a grouping manner of motion information; determining, according to the grouping manner, the N candidate prediction motion information from the M candidate prediction motion information.
示例性的,如表一所示,按照实施方式10011的方法获得运动信息0到运动信息6共7种互不相同的候选预测运动信息,此时M为7。按照预测的分组分式,对上述7种候选按预测运动信息进行分组。在一种可行的实施方式100121中,可以将全部7种候选预测运动信息作为一个分组,即此时和实施方式10012相同。在一种可行的实施方式100122中,可以将7种候选预测运动信息,按照预设的数量间隔分组,比如:按照前3个、中间3个、后1个的方式分组,或者,前2个、中间3个、后2个的方式分组,或者,前3个、后4个的方式分组,分成的组数和每组包含的候选预测运动信息的数量均不做限定。在一种可行的实施方式100123中,可以按照运动信息的获取 分式分组,比如将根据空域相邻块获取的候选预测运动信息分为一组,将根据时域相邻块获取的候选预测运动信息分为一组。在一种可行的实施方式100124中,候选预测运动信息包含编码单元级(CU level)的运动信息和子编码单元级(sub-CU level)的运动信息,具体的获取分式可以参考JVET-F1001-v2第2.3.1节基于子编码单元的运动矢量预测,不做赘述,可以按照CU level和sub-CU level进行分组。具体的,不妨设,将7个候选预测运动信息分为两组,第一组为运动信息0-2,第二组为运动信息3-6。Exemplarily, as shown in Table 1, according to the method of Embodiment 10011, 7 kinds of candidate predicted motion information of the motion information 0 to the motion information 6 are obtained, and M is 7. According to the predicted fractional formula, the above seven candidates are grouped according to the predicted motion information. In one possible implementation 100121, all seven candidate prediction motion information may be used as one packet, that is, the same as embodiment 10012. In a feasible implementation manner 100122, the seven candidate prediction motion information may be grouped according to a preset number interval, for example, grouped according to the first three, the middle three, and the last one, or the first two The middle 3 or the last 2 are grouped, or the first 3 and the last 4 are grouped, and the number of divided groups and the number of candidate predicted motion information included in each group are not limited. In a feasible implementation manner 100123, the candidate prediction motion information acquired according to the spatial neighboring block may be grouped according to the acquisition of the motion information, and the candidate prediction motion obtained according to the time domain neighboring block may be classified into a group. Information is grouped together. In a possible implementation manner, the candidate prediction motion information includes motion information of a coding unit level (CU level) and motion information of a sub-CU level. For a specific acquisition fraction, refer to JVET-F1001- Section 2.3.1 of v2 is based on motion vector prediction of sub-coding units. If not described, it can be grouped according to CU level and sub-CU level. Specifically, it may be assumed that the seven candidate predicted motion information is divided into two groups, the first group is motion information 0-2, and the second group is motion information 3-6.
对于各个分组,可以采取不同的处理方式,也可以采取相同的处理方式,不做限定。示例性的,可以按照前文所述的H.265标准中所规定的Merge模式中候选预测运动矢量的索引值的表示方式为第一组的运动信息0-2对应的索引0-2赋予二值化字符串(后文简述为传统方式),即按照预测的顺序对索引0-2赋予二值化字符串,同时,按照本申请实施例S1002-S1005所述的方法为第二组的运动信息3-6对应的索引3-6赋予二值化字符串(后文简述为本申请实施例的方式)。也可以对第一组和第二组分别按照本申请实施例S1002-S1005所述的方法赋予二值化字符串。但是,应理解,被赋予的二值化字符串表示同时表征了对应的运动信息所在的分组标识和该运动信息在该分组中的标识这两种信息,因此该二值化字符串可以使任一分组中的任一模式区分其他的全部6种模式。For each grouping, different processing methods may be adopted, and the same processing manner may be adopted, which is not limited. For example, the index value of the candidate prediction motion vector in the Merge mode specified in the H.265 standard described above may be assigned a binary value for the index 0-2 corresponding to the motion information 0-2 of the first group. The character string (hereinafter referred to as the conventional mode), that is, the index 0-2 is given a binarized character string in the order of prediction, and the method described in the embodiment S1002-S1005 is the second group of motions. The index 3-6 corresponding to the information 3-6 is given to the binarized character string (the manner of which is a brief description of the embodiment of the present application). It is also possible to assign a binarized character string to the first group and the second group in accordance with the method described in the embodiment S1002-S1005 of the present application. However, it should be understood that the binarized character string assigned is two kinds of information that simultaneously characterizes the group identifier of the corresponding motion information and the identifier of the motion information in the group, so the binarized string can be used. Any mode in a group distinguishes all of the other six modes.
不妨设,将第一组的运动信息0-2按照传统方式处理(示例性的,索引0对应二值化字符串“0”,索引1对应二值化字符串“10”,索引2对应二值化字符串“110”),将第二组的运动信息3-6按照本申请实施例的方式处理,此时N为4。It may be noted that the motion information 0-2 of the first group is processed in a conventional manner (exemplary, the index 0 corresponds to the binarized character string “0”, the index 1 corresponds to the binarized character string “10”, and the index 2 corresponds to two. The value string "110" is processed, and the motion information 3-6 of the second group is processed in the manner of the embodiment of the present application, where N is 4.
当M大于N时,即采用上述各种分组的实施方式时,在一种可行的实施方式10013中,将所述分组方式编入码流。比如,可以对分组的各种依据(比如实施方式100121-100124)赋予编号,将该编号编入码流,也可以将分组的数量,每组中包含的候选预测运动信息的数量等编入码流,不做限定。该编入码流的分组方式能够使解码端获知编码端的分组方式。在另一种可行的实施方式10014中,分组方式是编解码端通过预先设置的协议分别固化在编解码端并保持一致的,因此不需要将分组方式编入码流。When M is greater than N, that is, when the various packet embodiments described above are employed, in one possible implementation 10013, the packet mode is programmed into the code stream. For example, various references of the group (such as the implementation manners 100121-100124) may be assigned a number, the number may be encoded into the code stream, or the number of groups, the number of candidate prediction motion information included in each group, etc. may be coded. Flow, no limit. The grouping manner of the coded stream enables the decoding end to know the grouping manner of the encoding end. In another possible implementation manner 10014, the grouping mode is that the codec end is respectively fixed at the codec end by a preset protocol and is consistent, so that the packet mode does not need to be coded into the code stream.
同时,编码端还需要使解码端获知具体的候选预测运动信息。在一种可行的实施方式10015中,将候选预测运动信息编入码流;或者,将指示与所述待处理图像块具有预设位置关系的图像块的第二标识信息编入所述码流,具体的,将候选预测运动信息所取自的与待处理块具有预设位置关系的图像块(比如Merge模式中的空域相邻块、时域co-located块等)赋予编号,将该编号编入码流;或者,将与所述N个候选预测运动信息具有预设对应关系的第三标识信息编入所述码流,具体的,预设几种候选预测运动信息的组合,将各组合赋予编号,将该编号编入码流。在另一种可行的实施方式10016中,候选预测运动信息是编解码端通过预先设置的协议分别固化在编解码端的,因此不需要将候选预测运动信息编入码流。At the same time, the encoding end also needs to make the decoding end know the specific candidate prediction motion information. In a feasible implementation manner 10015, candidate prediction motion information is encoded into a code stream; or second identification information indicating an image block having a preset positional relationship with the image block to be processed is encoded into the code stream. Specifically, an image block (such as a spatial neighboring block, a time domain co-located block, and the like in the Merge mode) from which the candidate predicted motion information is taken and having a preset positional relationship is assigned a number, and the number is assigned. Encoding the code stream; or, the third identification information having a preset correspondence relationship with the N candidate prediction motion information is encoded into the code stream, and specifically, a combination of preset candidate motion information is preset The combination is assigned a number, and the number is programmed into the code stream. In another possible implementation manner 10016, the candidate prediction motion information is that the codec end is respectively fixed at the codec end by a preset protocol, so that the candidate prediction motion information does not need to be encoded into the code stream.
在一种可行的实施方式10017中,在确定了分组方式之后,编码端还需要使解码端获知每个分组的处理方式。示例性的,可以在执行后续步骤前,为每个分组编码一个0或1的标识来表示当前分组使用传统方式或者本申请实施例的方式进行后续处理; 或者,也可以在用于表示分组方式的语法元素中,包含各分组的处理方式的表示;或者,也可以编解码端通过预先设置的协议分别固化在编解码端,比如:约定第一个分组使用传统方式处理,第二个分组采用本申请实施例的方式进行处理,或者,约定当仅有一个分组时按照本申请实施例的方式进行处理,不做限定。In a possible implementation 10017, after determining the grouping mode, the encoding end also needs to make the decoding end know the processing manner of each packet. For example, before the subsequent steps are performed, each packet is coded with a 0 or 1 identifier to indicate that the current packet is processed in a conventional manner or in the manner of the embodiment of the present application; or The syntax element includes a representation of the processing manner of each packet; or, the codec may be separately fixed at the codec by a preset protocol, for example, the first packet is agreed to be processed in a conventional manner, and the second packet is used in the second packet. The manner of the embodiment of the present application is processed, or it is agreed that the processing is performed according to the embodiment of the present application when there is only one packet, which is not limited.
S1002、确定所述待处理图像块的相邻重构图像块可用。S1002: Determine an adjacent reconstructed image block of the image block to be processed.
应理解,根据不同的应用场景待处理图像块的相邻重构图像块,可以包括:和待处理图像块位于同一帧图像的空域相邻重构图像块,和待处理图像块位于不同帧图像的相同位置的时域相邻重构图像块,和待处理图像块位于同一时刻不同帧图像的相同位置的相邻视点的重构图像块,和待处理图像块位于同一时刻不同帧图像的相同位置的相邻层的重构图像块等,不做限定。It should be understood that the adjacent reconstructed image blocks of the image block to be processed according to different application scenarios may include: a spatially adjacent reconstructed image block that is located in the same frame image as the image block to be processed, and the image block to be processed is located in a different frame image. The time-domain adjacent reconstructed image block of the same position, and the reconstructed image block of the adjacent view point of the same position of the different frame image at the same time and the image block to be processed are the same as the different frame images of the image block to be processed at the same time Reconstructed image blocks and the like of adjacent layers of the position are not limited.
相邻重构图像块可用,即相邻重构图像块可以被当前的方法所使用。示例性的,当待处理图像块的左边界并非图像边界时,待处理图像块的左相邻块可用;当待处理图像块的上边界并非图像边界时,待处理图像块的上相邻块可用。在一些情况下,相邻重构图像块是否可用还进一步地和其他编码工具的配置相关。示例性的,即使待处理图像块的左边界并非图像边界,但是如果该左边界为图像块组的边界,比如条带(slice)、片(tile)等的边界,根据该图像块组与左边相邻图像块组之间的独立性关系,待处理图像块的左相邻块依然存在不可用的情况(对应图像组间完全独立的情况)。而另一个相反的例子,即使待处理图像块的左边界是图像边界,但是其他编码工具被配置为可以插值出图像边界外的图像块(padding)时,则待处理图像块的左相邻块可用。Adjacent reconstructed image blocks are available, i.e., adjacent reconstructed image blocks can be used by current methods. Illustratively, when the left boundary of the image block to be processed is not an image boundary, the left neighboring block of the image block to be processed is available; when the upper boundary of the image block to be processed is not the image boundary, the upper adjacent block of the image block to be processed Available. In some cases, whether adjacent reconstructed image blocks are available is further related to the configuration of other encoding tools. Exemplarily, even if the left boundary of the image block to be processed is not an image boundary, if the left boundary is a boundary of an image block group, such as a boundary of a slice, a tile, or the like, according to the image block group and the left side The independence relationship between adjacent image block groups, the left adjacent block of the image block to be processed still exists unusable (corresponding to the case where the image groups are completely independent). In another opposite example, even if the left boundary of the image block to be processed is an image boundary, but other encoding tools are configured to interpolate the image padding outside the image boundary, the left adjacent block of the image block to be processed Available.
在一种可行的实施方式10021中,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述确定所述待处理图像块的相邻重构图像块可用,包括:确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。示例性的,待处理图像块的原始相邻重构图像块包括上相邻重构图像块和左相邻重构图像块时,上相邻重构图像块和左相邻重构图像块中任意一个重构图像块可用,则确定该待处理图像块的相邻重构图像块可用。其中,原始相邻重构图像块即用来指代待处理图像块的相邻重构图像块,以区分后文中提到的参考相邻重构图像块,参考相邻重构图像块用来指代待处理图像块根据候选预测运动信息指示的参考图像块的相邻重构图像块。In a possible implementation 10021, when the adjacent reconstructed image block of the image block to be processed includes at least two of the original adjacent reconstructed image blocks, the determining the phase of the image block to be processed The neighbor reconstructed image block is usable, comprising: determining that at least one of the at least two of the original adjacent reconstructed image blocks is available. Illustratively, when the original adjacent reconstructed image block of the image block to be processed includes the upper adjacent reconstructed image block and the left adjacent reconstructed image block, the upper adjacent reconstructed image block and the left adjacent reconstructed image block are If any one of the reconstructed image blocks is available, it is determined that adjacent reconstructed image blocks of the image block to be processed are available. The original adjacent reconstructed image block is used to refer to the adjacent reconstructed image block of the image block to be processed to distinguish the reference adjacent reconstructed image block mentioned in the following text, and is used to refer to the adjacent reconstructed image block. An adjacent reconstructed image block of a reference image block indicated by the candidate predicted motion information to be processed by the image block to be processed.
应理解,当待处理图像块的相邻重构图像块不可用时,本发明实施例的方法无法利用待处理块周边的重构像素集合和参考图像块对应的重构像素集合的相似度用来表征待处理块和待处理块的候选预测运动矢量所指示的参考图像块之间的相似度。在一些实施例中,需要编码标识信息来编码上述分组方式和/或每个分组的处理方式等辅助信息,在这样的实施例中,也可以先确定待处理图像块的相邻重构图像块的可用性,当相邻重构图像块不可用时,可以直接采用传统方式进行编码,而不需要进一步编码上述辅助信息,从而节省编码比特。It should be understood that when the adjacent reconstructed image block of the image block to be processed is not available, the method of the embodiment of the present invention cannot utilize the similarity of the reconstructed pixel set corresponding to the block to be processed and the reconstructed pixel set corresponding to the reference image block. A similarity between the reference image blocks indicated by the candidate prediction motion vectors of the to-be-processed block and the to-be-processed block is characterized. In some embodiments, the identification information is required to encode the auxiliary information such as the foregoing grouping manner and/or the processing manner of each packet. In such an embodiment, the adjacent reconstructed image block of the image block to be processed may also be determined first. The availability, when adjacent reconstructed image blocks are not available, can be directly encoded in a conventional manner without further encoding the above auxiliary information, thereby saving coded bits.
S1003、获取所述N个候选预测运动信息各自对应的失真值。S1003. Acquire a distortion value corresponding to each of the N candidate prediction motion information.
所述失真值用来计算待处理块周边的重构像素集合(原始相邻重构图像块)和参考图像块对应的重构像素集合(参考相邻重构图像块)的相似度,所述失真值由所述 候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定。如图14所示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。The distortion value is used to calculate a similarity between the reconstructed pixel set (original adjacent reconstructed image block) around the block to be processed and the reconstructed pixel set (refer to the adjacent reconstructed image block) corresponding to the reference image block, The distortion value is determined by the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information and the adjacent reconstructed image block of the image block to be processed. As shown in FIG. 14, the reference adjacent reconstructed image block is identical in shape and equal in size to the original adjacent reconstructed image block, and between the reference adjacent reconstructed image block and the reference image block. The positional relationship is the same as the positional relationship between the original adjacent reconstructed image block and the image block to be processed.
下面示例性的介绍几种原始相邻重构图像块的形状和大小,不妨设所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形。在一种可行的实施方式10031中,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,所述原始相邻重构图像块的宽为W,高为n;在一种可行的实施方式10032中,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,所述原始相邻重构图像块的宽为W+H,高为n;在一种可行的实施方式10033中,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,所述原始相邻重构图像块的宽为n,高为H;在一种可行的实施方式10034中,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,所述原始相邻重构图像块的宽为n,高为W+H。其中W,H,n为正整数。应理解,原始相邻重构图像块的形状和大小的设定,与实现复杂度和相似度估计的准度相关,编解码端根据协议一致即可,不做限定。The following describes the shape and size of several original adjacent reconstructed image blocks. The image block to be processed is rectangular. The width of the image block to be processed is W and the height is H. The reconstructed image block is a rectangle. In a possible implementation 10031, a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and the width of the original adjacent reconstructed image block is W, high. In a feasible implementation 10032, a lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and a width of the original adjacent reconstructed image block is W+H, high is n; in a feasible implementation 10033, a right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, the original adjacent reconstruction The image block has a width n and a height H. In a possible implementation 10034, a right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, the original phase The adjacent reconstructed image block has a width n and a height W+H. Where W, H, and n are positive integers. It should be understood that the setting of the shape and size of the original adjacent reconstructed image block is related to the accuracy of the implementation complexity and the similarity estimation, and the codec end is consistent according to the protocol, and is not limited.
在一种可行的实施方式10035中,按照编码系统对存储空间的要求,可以设置上述n为1或2,从而不需要额外的存储空间存储原始相邻重构图像块,简化了硬件实现。In a possible implementation 10035, according to the storage system requirements of the encoding system, the above n may be set to 1 or 2, so that no additional storage space is needed to store the original adjacent reconstructed image blocks, which simplifies the hardware implementation.
应理解,参考相邻重构图像块和原始相邻重构图像块的形状相同、大小相等,位置关系相同,因此参考相邻重构图像块的实现方式和所对应的原始相邻重构图像块完全一致。It should be understood that the reference adjacent reconstructed image block and the original adjacent reconstructed image block have the same shape, the same size, and the same positional relationship, and thus refer to the implementation of the adjacent reconstructed image block and the corresponding original adjacent reconstructed image. The blocks are exactly the same.
在S1003中,首先需要获得N个候选预测运动信息所指示的待处理图像块的参考图像块的参考相邻重构图像块。可以按照前文所述的运动补偿的方法,根据候选预测运动信息所表征的参考帧信息和运动矢量确定待处理图像块的参考图像块的参考相邻重构图像块。In S1003, it is first necessary to obtain reference adjacent reconstructed image blocks of reference image blocks of the image block to be processed indicated by the N candidate prediction motion information. The reference adjacent reconstructed image block of the reference image block of the image block to be processed may be determined according to the reference frame information and the motion vector characterized by the candidate predicted motion information according to the motion compensation method described above.
在一种可行的实施方式10036中,候选预测运动信息中的运动矢量指向的是参考帧中分像素的位置,此时需要对参考帧图像或者参考帧图像的一部分进行分像素精度的图像插值以获得参考图像块,此时可以采用{-1,4,-11,40,40,-11,4,-1}的8抽头滤波器进行分像素插值,或者,为了简化计算复杂度,也可以采用双线性插值滤波器进行分像素插值。In a feasible implementation 10036, the motion vector in the candidate prediction motion information points to the position of the sub-pixel in the reference frame, and at this time, the image of the reference frame image or a part of the reference frame image needs to be interpolated with pixel precision. Obtain a reference image block. In this case, the 8-tap filter of {-1, 4, -11, 40, 40, -11, 4, -1} can be used for sub-pixel interpolation, or, in order to simplify the computational complexity, Sub-pixel interpolation is performed using a bilinear interpolation filter.
然后计算参考图像块的参考相邻重构图像块和待处理块的原始相邻重构图像块的差异表征值作为失真值。A difference characterization value of the reference neighboring reconstructed image block of the reference image block and the original adjacent reconstructed image block of the block to be processed is then calculated as a distortion value.
该差异表征值可以有多种计算方式,比如平均绝对误差,绝对误差和,误差平方和,平均误差平方和,绝对哈达玛变换误差和,归一化积相关性度量值,或者,基于序贯相似性检测的相似性度量值等等。计算差异表征值是为了获取参考图像块的参考相邻重构图像块和对应的待处理块的原始相邻重构图像块的相似度(或者说匹配度),因此以此为目的的计算方式均适用于本申请实施例,不做限定。The difference characterization value can be calculated in a variety of ways, such as average absolute error, absolute error sum, sum of squared errors, sum of squared mean errors, absolute Hadamard transform error sum, normalized product correlation metric, or, based on sequential Similarity measures for similarity detection, and so on. Calculating the difference characterization value is to obtain the similarity (or matching degree) of the reference adjacent reconstructed image block of the reference image block and the original adjacent reconstructed image block of the corresponding to-be-processed block, and thus the calculation method for this purpose All of them are applicable to the embodiments of the present application, and are not limited.
当原始相邻重构图像块具有多个时,示例性的,不妨设所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,对应的,所述多 个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,则所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。更一般的,所述失真值根据如下计算式获得:When there are a plurality of original adjacent reconstructed image blocks, for example, it may be assumed that the plurality of the original adjacent reconstructed image blocks include a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image. And corresponding to the plurality of the reference adjacent reconstructed image blocks, including the third reference adjacent reconstructed image block and the fourth reference adjacent reconstructed image block, wherein the distortion value is used by the reference phase And representing, by the difference representation value of the adjacent reconstructed image block and the original adjacent reconstructed image block, comprising: the distortion value is reconstructed by the third reference neighboring reconstructed image block and the third original neighboring block And a difference characterization value of the image block and a sum of difference characterization values of the fourth reference adjacent reconstructed image block and the fourth original adjacent reconstructed image block. More generally, the distortion value is obtained according to the following calculation formula:
Figure PCTCN2018102632-appb-000005
Figure PCTCN2018102632-appb-000005
(1)(1)
其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。根据实际采用的计算差异值的方法,Delta为MAD,SAD,SSD等上述各种计算方式的表达式。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value. According to the method used to calculate the difference value, Delta is an expression of various calculation methods such as MAD, SAD, and SSD.
在一种可行的实施方式10037中,本发明实施例应用于帧间双向预测,不妨设,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。In a possible implementation 10037, the embodiment of the present invention is applied to inter-frame bidirectional prediction. It may be provided that the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, corresponding to And the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is Referring to the difference characterization values of the adjacent reconstructed image block and the original adjacent reconstructed image block, including: the distortion value is averaged by reference to the adjacent reconstructed image block and the original adjacent reconstructed image block Representing a difference characterization value, wherein the average reference neighboring reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or The distortion value is represented by an average of a first difference characterization value and a second difference characterization value, wherein the first difference characterization value is reconstructed by the first reference neighboring reconstructed image block and the original neighboring image image Characterizing said difference values to represent said second difference values of the adjacent reconstructed image characterizing the original block and the reconstructed neighboring characterizing the difference value of the image block is represented by the second reference.
在一种可行的实施方式10038中,待处理图像块具有子块级的候选预测运动信息,如图15所示,可以分别求得与原始相邻重构图像块相邻的每个子块对应的失真值,并求和,作为待处理图像块的失真值。具体的,示例性的,分别按照待处理块中Sub-CU1和Sub-CU2的运动信息找到对应的参考图像块Ref Sub-CU1和Ref Sub-CU2,进而分别确定原始重构图像块T1,T2以及对应的参考重构图像块T1’,T2’,最后按照公式(1)所示的方法求得失真值。In a possible implementation 10038, the image block to be processed has candidate prediction motion information at the sub-block level, as shown in FIG. 15, respectively, corresponding to each sub-block adjacent to the original adjacent reconstructed image block. The distortion value is summed as the distortion value of the image block to be processed. Specifically, for example, the corresponding reference image blocks Ref Sub-CU1 and Ref Sub-CU2 are respectively found according to the motion information of Sub-CU1 and Sub-CU2 in the to-be-processed block, and then the original reconstructed image blocks T1 and T2 are respectively determined. And the corresponding reference reconstructed image blocks T1', T2', and finally the distortion value is obtained according to the method shown in the formula (1).
S1004、根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应。S1004: Determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and the respective first identification information. correspond.
当全部N个候选预测运动信息都按照S1003中的方法获得了对应的失真值,即获取了N个失真值,第一标识信息即为每个候选预测运动信息的标识的二值化表示,或二值化字符串。When all the N candidate prediction motion informations obtain the corresponding distortion values according to the method in S1003, that is, N distortion values are acquired, the first identification information is a binarized representation of the identifier of each candidate prediction motion information, or Binary string.
在S1004中,首先比较N个失真值之间的大小,具体的,可以按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。不妨设,按照失真值从小到大的顺序排列N个候选预测运动信息,即排位越靠前的候选预测运动信息所对应的失真值越小。In S1004, first, the size between the N distortion values is compared. Specifically, the N candidate prediction motion information may be sequentially arranged according to the distortion value from small to large or from large to small. It may be arranged that the N candidate prediction motion information is arranged in the order of the distortion values from small to large, that is, the distortion value corresponding to the candidate motion information that is ranked higher is smaller.
然后,按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息, 其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串的长度小于等于用于编码所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。Then, the first identification information of each of the N candidate prediction motion information is given according to the comparison result, wherein the length of the binary character string of the first identification information of the candidate prediction motion information with the smaller distortion value is less than or equal to And a length of a binary character string encoding the first identification information of the candidate prediction motion information having the large distortion value.
示例性的,不妨以表1为例,运动信息0-2被分为第一组,运动信息3-6被分为第二组。Exemplarily, taking Table 1 as an example, the motion information 0-2 is divided into the first group, and the motion information 3-6 is divided into the second group.
当第一组采用传统方式处理,第二组采用本申请实施例的方式处理,且失真值从小到大的顺序为模式6、模式4、模式5、模式3,则有如下示例性的索引编码方式,应理解该二进制字符串的赋值方式仅为示例性,还可以使用其它的变长编码方式,不做限定:When the first group is processed in the conventional manner, and the second group is processed in the manner of the embodiment of the present application, and the order of the distortion values from small to large is mode 6, mode 4, mode 5, and mode 3, the following exemplary index coding is performed. In this way, you should understand that the assignment of the binary string is only exemplary. You can also use other variable length encoding methods, which are not limited:
Figure PCTCN2018102632-appb-000006
Figure PCTCN2018102632-appb-000006
表2Table 2
当第一组采用本申请实施例的方式处理,且失真值从小到大的顺序为模式0、模式2、模式1,第二组采用传统的方式处理,则有如下示例性的索引编码方式:When the first group is processed in the manner of the embodiment of the present application, and the order of distortion values from small to large is mode 0, mode 2, mode 1, and the second group is processed in a conventional manner, the following exemplary index coding modes are as follows:
Figure PCTCN2018102632-appb-000007
Figure PCTCN2018102632-appb-000007
表3table 3
当第一组采用本申请实施例的方式处理,且失真值从小到大的顺序为模式0、模式2、模式1,第二组采用本申请实施例的方式处理,且失真值从小到大的顺序为模式6、模式4、模式5、模式3,则有如下示例性的索引编码方式:When the first group is processed in the manner of the embodiment of the present application, and the order of the distortion values from the small to the largest is the mode 0, the mode 2, and the mode 1, the second group is processed in the manner of the embodiment of the present application, and the distortion value is from small to large. The order is mode 6, mode 4, mode 5, mode 3, then there are the following exemplary index coding methods:
Figure PCTCN2018102632-appb-000008
Figure PCTCN2018102632-appb-000008
Figure PCTCN2018102632-appb-000009
Figure PCTCN2018102632-appb-000009
表4Table 4
可见应理解,在N个候选预测运动信息所分成的多个分组中,排在后面的分组在确定组内候选预测运动信息的标识值的二进制表示方式时,需要考虑在先分组,避免无法和在先分组区分。也应理解,在一些实施例中,当分组的位置和组内候选预测运动信息的数量通过其他方式可以被解码端获知时,排在后面的分组在确定组内候选预测运动信息的标识值的二进制表示方式时,可以不考虑在先分组。It should be understood that, among the plurality of packets into which the N candidate prediction motion information is divided, the latter group needs to consider the prior grouping when determining the binary representation manner of the identifier value of the candidate prediction motion information in the group, thereby avoiding the inability to Prior to grouping. It should also be understood that, in some embodiments, when the location of the packet and the number of candidate prediction motion information within the group are known by the decoding end by other means, the subsequent packet is determined in the identification value of the candidate prediction motion information within the group. In the case of binary representation, the prior grouping can be ignored.
S1005、当所述待处理图像块的目标预测运动信息为所述已确定第一标识信息的N个候选预测运动信息中的一个时,将所述目标预测运动信息的第一标识信息编入码流。S1005. When the target predicted motion information of the to-be-processed image block is one of the N candidate predicted motion information of the determined first identifier information, the first identifier information of the target predicted motion information is encoded into a code. flow.
分别以各候选预测运动信息进行拟编码,可以模拟完成全部的编码过程,或者完成部分的编码过程(比如仅完成重构图像块,而不进行熵编码),获得各候选预测运动信息的编码代价,编码代价用重构图像块的失真程度和/或编码该图像块所模拟花费的编码比特计算获得。按照实际需要,选择合适的候选预测运动信息,例如上述编码代价最小的候选预测运动信息,作为实际编码的目标预测运动信息,并将其标识(比如索引值)按照步骤S1004确定的二进制字符串编入码流。The coding is performed by using each candidate prediction motion information, and the entire coding process may be simulated, or part of the coding process may be completed (for example, only the reconstructed image block is completed without entropy coding), and the coding cost of each candidate prediction motion information is obtained. The coding cost is obtained by calculating the degree of distortion of the reconstructed image block and/or the coding bits used to encode the image block. According to actual needs, selecting suitable candidate prediction motion information, for example, the candidate prediction motion information with the lowest coding cost described above, as the target motion information of the actual coding, and coding (such as an index value) according to the binary string determined in step S1004. Into the stream.
上述确定目标预测运动信息的过程一般被称为通过码率-失真(率失真,RDO)准则,获得目标预测运动信息,具体的步骤以及各种可行的简化方式可以参见HM,JEM等参考软件的编码端实现,不做赘述。The above process of determining the target prediction motion information is generally referred to as obtaining the target prediction motion information by using a rate-distortion (RDO) criterion. The specific steps and various feasible simplified methods can be referred to the reference software of HM, JEM, etc. The implementation of the encoding side, do not go into details.
图16为本申请实施例的一种解码方法的示意性流程图1100。应理解,一般的,解码过程是编码过程的逆过程。编码过程中依次编入码流的语法元素,在解码端需要以对应的次序和位置进行解析,以完成视频图像在解码端的重构。不妨设图16所示的解码方法与图13所示的编码方法相对应。FIG. 16 is a schematic flowchart 1100 of a decoding method according to an embodiment of the present application. It should be understood that, in general, the decoding process is the inverse of the encoding process. In the encoding process, the syntax elements of the code stream are sequentially encoded, and the decoding end needs to be parsed in a corresponding order and position to complete the reconstruction of the video image at the decoding end. It is to be noted that the decoding method shown in FIG. 16 corresponds to the encoding method shown in FIG.
S1101、确定所述M个候选预测运动信息的分组方式。S1101: Determine a grouping manner of the M candidate prediction motion information.
应理解,步骤S1101对应于不同的实施方式为一个可选的步骤。比如,当编码端采用和解码端按照预先协议的方式确定分组方式时,解码端通过所述协议就可以获知分组方式,此时该步骤在实际执行时不存在。而当编码端采用通过传输标识信息使解码端获知分组方式时,该步骤便需要执行。具体的分组方式和编码端保持一致,具体可参见步骤S1001中关于确定所述M个候选预测运动信息的分组方式;根据所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息的示例性描述,不再赘述。It should be understood that step S1101 corresponds to a different embodiment as an optional step. For example, when the encoding end uses the decoding end to determine the grouping mode according to a pre-protocol manner, the decoding end can learn the grouping mode through the protocol, and the step does not exist at the time of actual execution. When the encoding end uses the transmission identification information to make the decoding end know the grouping mode, this step needs to be performed. The specific grouping mode and the encoding end are consistent. For details, refer to the grouping manner for determining the M candidate prediction motion information in step S1001; and determining the N from the M candidate prediction motion information according to the grouping manner. An exemplary description of the candidate predicted motion information will not be described again.
进一步的,和编码端对应的,解码端还需要获知每个分组或者目标预测运动信息所在的分组的处理方式,可选的,可以根据编解码端的协议预先获知,或者解析码流中的标识信息获知。即,确定预设的所述分组方式,或者,从所述码流中解析获得所述分组方式。具体可参见实施方式10017所述的方法,不再赘述。Further, corresponding to the encoding end, the decoding end needs to know the processing manner of the packet where each packet or target prediction motion information is located. Optionally, the decoding end may be known according to the protocol of the codec end, or the identification information in the code stream may be parsed. Know. That is, the preset grouping manner is determined, or the grouping manner is obtained by parsing from the code stream. For details, refer to the method described in Embodiment 10017, and details are not described herein.
S1102、从码流中解析出待处理图像块的目标预测运动信息的目标标识信息。S1102: Parse target identification information of target predicted motion information of the to-be-processed image block from the code stream.
同理,和编码端步骤S1005对应的,解析码流,可以获得实际用于编码的候选预测运动信息的标识,即二进制字符串。Similarly, corresponding to the encoding end step S1005, the code stream can be parsed, and the identifier of the candidate predicted motion information actually used for encoding, that is, the binary string can be obtained.
S1103、确定所述待处理图像块的相邻重构图像块可用。S1103. Determine a neighboring reconstructed image block of the image block to be processed.
该步骤对应编码端的步骤S1002,内容保持一致,S1002中的各种可行的实施方式均可用于S1103中,不做赘述。This step corresponds to step S1002 of the encoding end, and the content remains the same. The various possible implementations in S1002 can be used in S1103, and no further description is provided.
其中,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述确定所述待处理图像块的相邻重构图像块可用,包括:确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。Wherein, when the adjacent reconstructed image block of the image block to be processed includes at least two of the original adjacent reconstructed image blocks, the adjacent reconstructed image block that determines the image block to be processed is available, including Determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
应理解,和编码端对应的,在一些实施例中,需要编码标识信息来编码上述分组方式和/或每个分组的处理方式等辅助信息,在这样的实施例中,也可以先确定待处理图像块的相邻重构图像块的可用性,当相邻重构图像块不可用时,可以直接采用传统方式进行编码,而不需要进一步编码上述辅助信息,从而节省编码比特,对应到解码端,即当相邻重构图像块不可用时不再解析相关辅助信息。It should be understood that, corresponding to the encoding end, in some embodiments, the identification information is required to encode the auxiliary information such as the above-mentioned grouping manner and/or the processing manner of each packet. In such an embodiment, the processing may be determined first. The availability of adjacent reconstructed image blocks of an image block can be directly encoded in a conventional manner when adjacent reconstructed image blocks are not available, without further encoding the auxiliary information, thereby saving coding bits, corresponding to the decoding end, ie The associated auxiliary information is no longer parsed when the adjacent reconstructed image block is not available.
应理解,步骤S1103和S1102没有强制的先后顺序,也可以并行处理,不做限定。It should be understood that steps S1103 and S1102 have no mandatory sequence, and may be processed in parallel without limitation.
S1104、确定N个候选预测运动信息。S1104: Determine N candidate predicted motion information.
所述N个候选预测运动信息包括所述目标预测运动信息,其中,N为大于1的整数,具体的,该步骤包括:按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。或者,该步骤包括:按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;根据所述目标标识信息和所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。The N candidate predicted motion information includes the target predicted motion information, where N is an integer greater than 1. Specifically, the step includes: acquiring N mutually different and the to-be-processed according to a preset sequence. The image block has motion information of an image block of a preset positional relationship as the N candidate predicted motion information. Or the step of: acquiring, according to a preset sequence, motion information of the M different image blocks having a preset positional relationship with the image block to be processed as the M candidate prediction motion information, where the M The candidate prediction motion information includes the N candidate prediction motion information, where M is an integer greater than N; and determining the N candidates from the M candidate prediction motion information according to the target identification information and the grouping manner Predict motion information.
该步骤对应编码端的步骤S1001,内容保持一致,S1001中的各种可行的实施方式均可用于S1104中,不做赘述。This step corresponds to step S1001 of the encoding end, and the content remains the same. Various possible implementations in S1001 can be used in S1104, and no further description is provided.
同理,和编码端对应的,解码端还需要获知具体的候选预测运动信息,可选的,可以根据便解码端的预先协议的方法获知,或者解析码流中的候选预测运动信息或者标识信息获知。即,解析所述码流中的所述多个候选预测运动信息的编码信息,以获得所述N个候选预测运动信息;或者,解析所述码流中的第二标识信息,以获得所述第二标识信息指示的N个候选图像块,并以所述N个候选图像块的运动信息作为所述N个候选预测运动信息;或者,解析所述码流中的第三标识信息,以获得与所述第三标识信息具有预设对应关系的所述N个候选预测运动信息。具体可参见实施方式10015以及实施方式10016,即,不再赘述。Similarly, corresponding to the encoding end, the decoding end needs to know the specific candidate prediction motion information. Alternatively, it may be learned according to the pre-protocol method of the decoding end, or the candidate prediction motion information or the identification information in the parsing stream may be known. . That is, parsing the encoding information of the plurality of candidate prediction motion information in the code stream to obtain the N candidate prediction motion information; or parsing the second identification information in the code stream to obtain the a second candidate image block indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate predicted motion information; or parsing the third identifier information in the code stream to obtain The N candidate predicted motion information having a preset correspondence relationship with the third identification information. For details, refer to the embodiment 10015 and the embodiment 10016, that is, no further description is provided.
但是,需要注意的是相对于编码端,在一些实施例中,解码端的实现可以有一些不同。一般的,在编码端,全部候选预测运动信息都可能成为实际用于编码的目标预 测运动信息,因此,必须确定全部候选预测运动信息。而在解码端,只需要确定能够确定目标预测运动信息的候选预测运动信息即可,而不需要确定全部的候选预测运动信息。在一些应用场景中,这样可以减少解码端实现的复杂度。However, it should be noted that with respect to the encoding side, in some embodiments, the implementation of the decoding side may be somewhat different. In general, at the encoding end, all candidate prediction motion information may become the target prediction motion information actually used for encoding, and therefore, all candidate prediction motion information must be determined. At the decoding end, only the candidate predicted motion information capable of determining the target predicted motion information needs to be determined, and it is not necessary to determine all the candidate predicted motion information. In some application scenarios, this can reduce the complexity of the implementation of the decoder.
示例性的,对于表1对应的实施例,如果模式0-1位于第一分组,模式2-4位于第二分组,模式5-6位于第三分组,则无论组内如何对不同模式对应的候选预测运动信息的索引值赋予二进制字符串,可以确定的是,对应第一分组的二进制字符串包括“1”和“01”,对应第二分组的二进制字符串包括“001”,“0001”和“00001”,对应第三分组的二进制字符串包括“000001”和“000000”。当解析码流获得目标预测运动信息的标识为“001”时,可知,目标预测运动矢量属于第二分组,因此不需要确定第一分组和第三分组中的候选预测运动信息的索引值对应的二进制字符串,而只需要确定第二分组中的候选预测运动信息的索引值对应的二进制字符串。Exemplarily, for the embodiment corresponding to Table 1, if mode 0-1 is located in the first packet, mode 2-4 is located in the second packet, and mode 5-6 is located in the third packet, regardless of how the different modes are in the group The index value of the candidate predicted motion information is assigned to the binary string. It can be determined that the binary string corresponding to the first packet includes “1” and “01”, and the binary string corresponding to the second packet includes “001” and “0001”. And "00001", the binary string corresponding to the third group includes "000001" and "000000". When the identifier of the target coded motion information obtained by the parsing code stream is “001”, it can be known that the target motion vector of the target belongs to the second group, and therefore it is not necessary to determine the index value corresponding to the candidate motion information of the candidate in the first packet and the third packet. A binary string, but only a binary string corresponding to the index value of the candidate prediction motion information in the second packet needs to be determined.
S1105、获取所述N个候选预测运动信息各自对应的失真值。S1105. Acquire a distortion value corresponding to each of the N candidate prediction motion information.
该步骤对应编码端的步骤S1003,内容保持一致,S1003中的各种可行的实施方式均可用于S1105中,不做赘述。This step corresponds to step S1003 of the encoding end, and the content remains the same. Various possible implementation manners in S1003 can be used in S1105, and details are not described herein.
即,在一种可行的实施方式11051中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括参考相邻重构图像块,所述待处理图像块的相邻重构图像块包括与所述参考相邻重构图像块对应的原始相邻重构图像块,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定,包括:所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。That is, in a feasible implementation manner 11051, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent reconstructed image block is reconstructed. The image block includes an original adjacent reconstructed image block corresponding to the reference neighboring reconstructed image block, the distortion reconstructed image of the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information Processing the adjacent reconstructed image block determination of the image block, comprising: the distortion value represented by a difference characterization value of the reference neighboring reconstructed image block and the original adjacent reconstructed image block, the reference neighbor Reconstructing an image block having the same shape and equal size as the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block and the original adjacent reconstructed image The positional relationship between the block and the image block to be processed is the same.
在一种可行的实施方式11052中,所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值,包括:所述参考相邻重构图像块和所述原始相邻重构图像块的平均绝对误差;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的平均误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对哈达玛变换误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的归一化积相关性度量值;或,所述参考相邻重构图像块和所述原始相邻重构图像块的基于序贯相似性检测的相似性度量值。In a possible implementation manner, the differential representation value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block includes: the reference adjacent reconstructed image block and the original phase An average absolute error of the adjacent reconstructed image block; an absolute error sum of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original adjacent weight a sum of squared errors of the image blocks; a squared sum of average errors of the reference neighboring reconstructed image blocks and the original neighboring reconstructed image blocks; the reference neighboring reconstructed image blocks and the original neighboring reconstructed An absolute Hadamard transform error sum of the image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring reconstructed image block And a similarity measure based on sequential similarity detection of the original adjacent reconstructed image block.
在一种可行的实施方式11053中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,包括:所述原始相邻重构图像块的宽为W,高为n;或者,所述原始相邻重构图像块的宽为W+H,高为n;其中W,H,n为正整数。In a possible implementation manner, the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The lower boundary of the adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width W and a height n; or the original adjacent reconstruction The image block has a width of W+H and a height of n; where W, H, and n are positive integers.
在一种可行的实施方式11054中,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,包括:所述原始相邻重构图像块的宽为n,高为H;或者,所述原始相邻重构图像块的宽为n,高为W+H。In a possible implementation, the first boundary of the original adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and the width of the original adjacent reconstructed image block is n. The height is H; or, the original adjacent reconstructed image block has a width n and a height W+H.
在一种可行的实施方式11055中,n为1或2。In one possible implementation 11055, n is 1 or 2.
在一种可行的实施方式11056中,所述候选预测运动信息指示的参考图像块包括 第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。In a possible implementation manner, the reference image block indicated by the candidate predicted motion information includes a first reference image block and a second reference image block, correspondingly, the phase of the reference image block indicated by the candidate predicted motion information. The adjacent reconstructed image block includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image block and the original adjacent weight Representing the difference characterization value of the image block, including: the distortion value is represented by an average reference neighboring reconstructed image block and a difference characterization value of the original adjacent reconstructed image block, wherein the average reference neighbor Reconstructing an image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or the distortion value is represented by a first difference representation value and a second difference Representing a mean value of the characterization value, wherein the first difference characterization value is represented by the difference characterization value of the first reference neighboring reconstructed image block and the original neighboring reconstructed image block, Two difference table Values of the original block and the reconstructed image by the difference characterizing the adjacent second reference value adjacent to a reconstructed image block represented.
在一种可行的实施方式11057中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括多个所述参考相邻重构图像块,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,对应的,所述待处理图像块的相邻重构图像块包括多个所述原始相邻重构图像块,所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。In a possible implementation 11057, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, and the plurality of the reference adjacent neighbors The reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block, correspondingly, the adjacent reconstructed image block of the image block to be processed includes a plurality of the original adjacent weights Constructing an image block, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion values being reconstructed by the reference neighbor And representing, by the difference characterization value of the image block and the original adjacent reconstructed image block, the distortion value is determined by the third reference neighboring reconstructed image block and the third original adjacent reconstructed image block And a difference characterization value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
在一种可行的实施方式11058中,所述失真值根据如下计算式获得:In one possible implementation 11058, the distortion value is obtained according to the following calculation formula:
Figure PCTCN2018102632-appb-000010
Figure PCTCN2018102632-appb-000010
其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
S1106、根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应。S1106: Determine, according to the magnitude relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and the respective first identification information. correspond.
该步骤对应编码端的步骤S1004,内容保持一致,S1004中的各种可行的实施方式均可用于S1106中,不做赘述。This step corresponds to step S1004 of the encoding end, and the content remains the same. The various possible implementation manners in S1004 can be used in S1106, and no further description is provided.
即,在一种可行的实施方式11061中,所述根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应,包括:比较所述N个失真值之间的大小;按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息,其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串的长度小于等于所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。That is, in a possible implementation manner, the first identifier information of the N candidate prediction motion information, the N candidates, is determined according to the size relationship between the acquired N distortion values. The one-to-one correspondence between the predicted motion information and the respective first identification information includes: comparing a size between the N distortion values; and assigning, according to the comparison result, first identification information of each of the N candidate prediction motion information, where And the length of the binary character string of the first identification information of the candidate prediction motion information with the smaller distortion value is less than the length of the binary character string of the first identification information of the candidate prediction motion information with the larger distortion value.
在一种可行的实施方式11062中,所述比较所述N个失真值之间的大小,包括:按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。In a possible implementation 11062, the comparing the sizes between the N distortion values comprises: sequentially arranging the N candidate predictions according to the distortion values from small to large or from large to small. Sports information.
S1107、从所述N个候选预测运动信息中确定所述目标预测运动信息。S1107. Determine the target predicted motion information from the N candidate predicted motion information.
其中,所述目标预测运动信息的第一标识信息和所述目标标识信息匹配,即将与所述目标标识信息匹配的第一标识信息对应的候选预测运动信息确定为所述目标预测运动信息。The first identification information of the target prediction motion information and the target identification information are matched, and the candidate prediction motion information corresponding to the first identification information that matches the target identification information is determined as the target predicted motion information.
一般的,所述目标预测运动信息的第一标识信息和所述目标标识信息匹配,即第一标识信息和目标标识信息相等。Generally, the first identification information of the target prediction motion information and the target identification information are matched, that is, the first identification information and the target identification information are equal.
示例性的,按照S1104中描述的示例性的实施方式,不妨设根据S1106获得候选预测运动信息的索引值的二值化字符串分别为:模式2“0001”,模式3“001”,模式4“00001”,结合S1102中解析出的目标预测运动信息的标识为“001”,则可以确定目标预测运动信息为模式3对应的候选预测运动信息。Exemplarily, according to the exemplary implementation manner described in S1104, it may be assumed that the binarized character strings of the index values of the candidate prediction motion information obtained according to S1106 are: mode 2 “0001”, mode 3 “001”, mode 4 "00001", in combination with the identifier of the target predicted motion information parsed in S1102 is "001", it can be determined that the target predicted motion information is candidate predicted motion information corresponding to mode 3.
在一些实施例中,从M个候选预测运动信息中确定N个候选预测运动信息的分组信息被用额外的信息来表示,示例性的,编码端传输一个组别标识至解码端,以使解码端获知目标预测运动信息所在的组。S1102中解析出的目标预测运动信息的目标标识信息可以仅用于区分该组内的不同候选预测运动信息,即组内索引信息,则所述目标预测运动信息的第一标识信息和所述目标标识信息匹配为结合组别标识和目标预测运动信息的目标标识信息,来查找对应的第一标识信息所代表的候选预测运动信息。In some embodiments, the group information for determining the N candidate prediction motion information from the M candidate prediction motion information is represented by additional information. Illustratively, the encoding end transmits a group identifier to the decoding end to enable decoding. The end knows the group in which the target predicts the motion information. The target identification information of the target prediction motion information parsed in the S1102 may be used only to distinguish different candidate prediction motion information in the group, that is, intra-group index information, and the first identification information of the target prediction motion information and the target The identification information is matched with the target identification information of the combined group identifier and the target predicted motion information to search for candidate predicted motion information represented by the corresponding first identifier information.
当待处理块具有多个候选预测运动矢量时,以待处理块和待处理块的候选预测运动矢量所指示的参考图像块之间的相似度为先验知识,来协助确定各个候选预测运动矢量的标识的编码方式,从而达到节省编码比特,提高编码效率的目的。When the to-be-processed block has a plurality of candidate prediction motion vectors, the similarity between the reference image blocks indicated by the candidate prediction motion vector of the to-be-processed block and the to-be-processed block is a priori knowledge to assist in determining each candidate prediction motion vector. The encoding of the identifier, thereby achieving the purpose of saving coding bits and improving coding efficiency.
下面将具体的描述一个本发明实施例的编码方法1200。An encoding method 1200 of an embodiment of the present invention will be specifically described below.
S1201、结合图8所示,对于待处理块250,依次检测252A位置的运动信息、252B位置的运动信息、252C位置的运动信息、252D位置的运动信息、对250块采用ATMVP模式获得的运动信息、对250块采用STMVP模式获得的运动信息、252E块的运动信息、对250块采用TMVP模式获得的运动信息。检测内容包括:(1)该运动信息是否可获得(此处的可获得为广义的可获得,不仅包括该运动信息对应的图像块是否存在,还包括根据其它编码工具的性质,比如预测模式,分块模式等,该运动信息是否可以为本申请实施例所使用等);(2)该运动信息是否与在先已检测的运动信息重复。依次获取运动信息可获得且不与在先已检测的运动信息重复的运动信息,直到数量达到5个,不妨分别称五个依次获取的运动信息为MV0,MV1,MV2,MV3,MV4。S1201, as shown in FIG. 8, for the to-be-processed block 250, the motion information of the 252A position, the motion information of the 252B position, the motion information of the 252C position, the motion information of the 252D position, and the motion information obtained by using the ATMVP mode for 250 blocks are sequentially detected. The motion information obtained by using the STMVP mode for 250 blocks, the motion information of the 252E block, and the motion information obtained by using the TMVP mode for 250 blocks. The detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information. The motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially obtained until the number reaches five, and the five sequentially acquired motion information may be referred to as MV0, MV1, MV2, MV3, and MV4, respectively.
S1202、设250块的大小为16x8,该250块的上边界的相邻重构图像块(简称上模板)为16x1,左边界的相邻重构图像块(简称左模板)为1x8。检测250块的上模板和左模板是否存在。S1202, the size of the 250 block is 16x8, the adjacent reconstructed image block (referred to as the upper template) of the upper boundary of the 250 block is 16x1, and the adjacent reconstructed image block (referred to as the left template) of the left border is 1x8. It is detected whether the upper template and the left template of 250 blocks exist.
当上模板和左模板均不存在时,结束本流程,按照JEM参考软件中Merge模式的预测方法,编码待处理块的预测运动信息的标识。When neither the upper template nor the left template exists, the process ends, and the identifier of the predicted motion information of the to-be-processed block is encoded according to the prediction method of the Merge mode in the JEM reference software.
否则,当至少一个模板存在时,继续本流程。Otherwise, continue with this process when at least one template exists.
S1203、设按照编解码端预先设置的协议,将MV0,MV1,MV2分为第一组,MV3,MV4分为第二组。S1203, according to the protocol set in advance by the codec, divides MV0, MV1, and MV2 into the first group, and MV3 and MV4 are divided into the second group.
S1204、分别根据MVO,MV1,MV2获取250块的参考图像块REF0,REF1,REF2。S1204: Obtain 250 reference picture blocks REF0, REF1, and REF2 according to MVO, MV1, and MV2, respectively.
S1205、以MV0为例分别对第一组中的MV0,MV1,MV2进行如下操作:S1205, taking MV0 as an example, respectively performing the following operations on MV0, MV1, and MV2 in the first group:
根据250块存在的模板,不妨设250块的左模板TL和上模板TA均存在,确定REF0 对应的左模板TL0和上模板TA0,TL0和TL大小相等、位置对应,TA0和TA大小相等、位置对应。According to the template existing in 250 blocks, it is possible to set 250 left template TL and upper template TA to exist, and determine the left template TL0 and the upper template TA0 corresponding to REF0, TL0 and TL are equal in size, position corresponding, TA0 and TA are equal in size, position correspond.
计算TL0和TL的像素值的SAD值,得到SAD01,计算TA0和TA的像素值的SAD值,得到SAD02,将SAD01和SAD02相加获得SAD0,作为MV0对应的失真值。The SAD value of the pixel values of TL0 and TL is calculated to obtain SAD01, and the SAD value of the pixel values of TA0 and TA is calculated to obtain SAD02, and SAD01 and SAD02 are added to obtain SAD0 as the distortion value corresponding to MV0.
同理,获得MV1对应的失真值SAD1,MV2对应的失真值SAD2。Similarly, the distortion value SAD1 corresponding to the distortion values SAD1 and MV2 corresponding to MV1 is obtained.
S1206、从小到大排列SAD0,SAD1,SAD2,不妨设,从小到大顺序为SAD2<SAD0<SAD1。S1206. Arrange SAD0, SAD1, and SAD2 from small to large. It may be assumed that the order from small to large is SAD2<SAD0<SAD1.
S1207、按照失真值的大小关系,对MV0,MV1,MV2分别赋予bin string为:S1207: According to the magnitude relationship of the distortion value, assign a bin string to MV0, MV1, and MV2 respectively:
MV2对应“1”,MV0对应“01”,MV1对应“001”。MV2 corresponds to "1", MV0 corresponds to "01", and MV1 corresponds to "001".
S1208、对MV3,MV4分别赋予bin string为:S1208 assigns a bin string to MV3 and MV4 respectively:
MV3对应“0001”,MV4对应“0000”。MV3 corresponds to "0001" and MV4 corresponds to "0000".
S1209、按照上述步骤中对各运动信息所赋予的bin string,进行率失真计算,选择率失真代价最小(同等重构图像失真下编码比特少,或同等编码比特下重构图像失真小)的运动信息作为250块最终选定的预测运动信息。S1209: performing rate distortion calculation according to the bin string given to each motion information in the foregoing step, and selecting the rate distortion cost is minimum (the number of coded bits under the same reconstructed image distortion is small, or the reconstructed image distortion is smaller under the same coded bit) The information is used as the final motion prediction information selected for 250 blocks.
S1210、当该帧间预测模式最终被选为250块的实际编码模式时,将S1209中最终选定的预测运动信息所对应的bin string通过熵编码写入码流。S1210: When the inter prediction mode is finally selected as the actual coding mode of 250 blocks, the bin string corresponding to the finally selected prediction motion information in S1209 is written into the code stream by entropy coding.
下面将具体的描述一个本发明实施例的解码方法1300。该实施例与编码方法1200相对应。A decoding method 1300 of an embodiment of the present invention will be specifically described below. This embodiment corresponds to the encoding method 1200.
S1301、和编码端一致,结合图8所示,对于待处理块250,设250块的大小为16x8,该250块的上边界的相邻重构图像块(简称上模板)为16x1,左边界的相邻重构图像块(简称左模板)为1x8。检测250块的上模板和左模板是否存在。S1301, and the encoding end are consistent. As shown in FIG. 8 , for the to-be-processed block 250, the size of the 250 block is 16×8, and the adjacent reconstructed image block (referred to as the upper template) of the upper boundary of the 250 block is 16×1, and the left boundary is The adjacent reconstructed image block (referred to as the left template) is 1x8. It is detected whether the upper template and the left template of 250 blocks exist.
当上模板和左模板均不存在时,结束本流程,按照JEM参考软件中Merge模式的预测方法,解码待处理块的预测运动信息的标识。When neither the upper template nor the left template exists, the process ends, and the identifier of the predicted motion information of the to-be-processed block is decoded according to the prediction method of the Merge mode in the JEM reference software.
否则,当至少一个模板存在时,继续本流程。Otherwise, continue with this process when at least one template exists.
S1302、解析码流,获得250块的预测运动信息标识对应的bin string,不妨设为“001”。且按照解码端预先设置的协议,和编码端一致,第一组具有三个运动信息,第二组具有两个运动信息,“001”代表第三个运动信息(索引值为2),因此只需要确定第一组的三个运动信息,而不需要确定第二组的运动信息。S1302: Analyze the code stream, and obtain a bin string corresponding to the predicted motion information identifier of 250 blocks, which may be set to “001”. And according to the protocol preset by the decoding end, consistent with the encoding end, the first group has three motion information, the second group has two motion information, and “001” represents the third motion information (index value is 2), so only It is necessary to determine the three sets of motion information of the first group without determining the motion information of the second group.
S1303、依次检测252A位置的运动信息、252B位置的运动信息、252C位置的运动信息、252D位置的运动信息、对250块采用ATMVP模式获得的运动信息、对250块采用STMVP模式获得的运动信息、252E块的运动信息、对250块采用TMVP模式获得的运动信息。检测内容包括:(1)该运动信息是否可获得(此处的可获得为广义的可获得,不仅包括该运动信息对应的图像块是否存在,还包括根据其它编码工具的性质,比如预测模式,分块模式等,该运动信息是否可以为本申请实施例所使用等);(2)该运动信息是否与在先已检测的运动信息重复。依次获取运动信息可获得且不与在先已检测的运动信息重复的运动信息,直到数量达到S1302中确定的3个(根据步骤S1302推理获知),和编码端一致,分别称三个依次获取的运动信息为MV0,MV1,MV2。S1303, sequentially detecting motion information of the 252A position, motion information of the 252B position, motion information of the 252C position, motion information of the 252D position, motion information obtained by using the ATMVP mode for 250 blocks, motion information obtained by using the STMVP mode for 250 blocks, The motion information of the 252E block and the motion information obtained by using the TMVP mode for 250 blocks. The detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information. The motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially acquired until the number reaches the three determined in S1302 (inferred according to the step S1302), and is consistent with the encoding end, and is respectively called three sequentially acquired. The motion information is MV0, MV1, MV2.
S1304、分别根据MVO,MV1,MV2获取250块的参考图像块REF0,REF1,REF2。S1304: Obtain 250 reference picture blocks REF0, REF1, and REF2 according to MVO, MV1, and MV2, respectively.
S1305、以MV0为例分别对MV0,MV1,MV2进行如下操作:S1305, taking MV0 as an example, respectively performing the following operations on MV0, MV1, and MV2:
根据250块存在的模板,和编码端一致,设250块的左模板TL和上模板TA均存在,确定REF0对应的左模板TL0和上模板TA0,TL0和TL大小相等、位置对应,TA0和TA大小相等、位置对应。According to the existing template of 250 blocks, the left template TL and the upper template TA are both present, and the left template TL0 and the upper template TA0 corresponding to REF0 are determined, and the TL0 and TL are equal in size and position corresponding, TA0 and TA. The size is equal and the position corresponds.
计算TL0和TL的像素值的SAD值,得到SAD01,计算TA0和TA的像素值的SAD值,得到SAD02,将SAD01和SAD02相加获得SAD0,作为MV0对应的失真值。The SAD value of the pixel values of TL0 and TL is calculated to obtain SAD01, and the SAD value of the pixel values of TA0 and TA is calculated to obtain SAD02, and SAD01 and SAD02 are added to obtain SAD0 as the distortion value corresponding to MV0.
同理,获得MV1对应的失真值SAD1,MV2对应的失真值SAD2。Similarly, the distortion value SAD1 corresponding to the distortion values SAD1 and MV2 corresponding to MV1 is obtained.
S1306、从小到大排列SAD0,SAD1,SAD2,和编码端一致,从小到大顺序为SAD2<SAD0<SAD1。S1306, SAD0, SAD1, and SAD2 are arranged from small to large, and are consistent with the coding end. The order from small to large is SAD2<SAD0<SAD1.
S1307、按照失真值的大小关系,对MV0,MV1,MV2分别赋予bin string为:S1307: According to the magnitude relationship of the distortion value, assign a bin string to MV0, MV1, and MV2 respectively:
MV2对应“1”,MV0对应“01”,MV1对应“001”。MV2 corresponds to "1", MV0 corresponds to "01", and MV1 corresponds to "001".
S1308、比较上述步骤中对各运动信息所赋予的bin string和从码流中解析的250块的预测运动信息标识对应的bin string“001”,可见MV1的bin string也为“001”,确定MV1为250块的预测运动信息。S1308, comparing the bin string assigned to each motion information in the above step and the bin string "001" corresponding to the 250 motion prediction information identifiers parsed from the code stream, it can be seen that the bin string of the MV1 is also "001", and the MV1 is determined. It is predicted motion information for 250 blocks.
下面将具体的描述一个本发明实施例的编码方法1400。An encoding method 1400 of an embodiment of the present invention will be specifically described below.
S1401、结合图8所示,对于待处理块250,依次检测252A位置的运动信息、252B位置的运动信息、252C位置的运动信息、252D位置的运动信息、对250块采用ATMVP模式获得的运动信息、对250块采用STMVP模式获得的运动信息、252E块的运动信息、对250块采用TMVP模式获得的运动信息。检测内容包括:(1)该运动信息是否可获得(此处的可获得为广义的可获得,不仅包括该运动信息对应的图像块是否存在,还包括根据其它编码工具的性质,比如预测模式,分块模式等,该运动信息是否可以为本申请实施例所使用等);(2)该运动信息是否与在先已检测的运动信息重复。依次获取运动信息可获得且不与在先已检测的运动信息重复的运动信息,直到数量达到6个,不妨分别称六个依次获取的运动信息为MV0,MV1,MV2,MV3,MV4,MV5。S1401, as shown in FIG. 8, for the to-be-processed block 250, the motion information of the 252A position, the motion information of the 252B position, the motion information of the 252C position, the motion information of the 252D position, and the motion information obtained by using the ATMVP mode for 250 blocks are sequentially detected. The motion information obtained by using the STMVP mode for 250 blocks, the motion information of the 252E block, and the motion information obtained by using the TMVP mode for 250 blocks. The detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information. The motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially obtained until the number reaches six, and the six sequentially acquired motion information may be referred to as MV0, MV1, MV2, MV3, MV4, MV5, respectively.
S1402、设250块的大小为16x16,该250块的上边界的相邻重构图像块(简称上模板)为32x1,左边界的相邻重构图像块(简称左模板)为1x32。检测250块的上模板和左模板是否存在。S1402, the size of the 250 block is 16x16, the adjacent reconstructed image block (abbreviated as the upper template) of the upper boundary of the 250 block is 32x1, and the adjacent reconstructed image block (referred to as the left template) of the left border is 1x32. It is detected whether the upper template and the left template of 250 blocks exist.
当上模板和左模板均不存在时,结束本流程,按照JEM参考软件中Merge模式的预测方法,编码待处理块的预测运动信息的标识。When neither the upper template nor the left template exists, the process ends, and the identifier of the predicted motion information of the to-be-processed block is encoded according to the prediction method of the Merge mode in the JEM reference software.
否则,当至少一个模板存在时,继续本流程。Otherwise, continue with this process when at least one template exists.
S1403、设按照编解码端预先设置的协议,将MV0,MV1,MV2分为第一组,MV3,MV4,MV5分为第二组。S1403, according to the protocol set in advance by the codec, divides MV0, MV1, and MV2 into the first group, and MV3, MV4, and MV5 are divided into the second group.
S1404、分别根据MVO,MV1,MV2,MV3,MV4,MV5获取250块的参考图像块REF0,REF1,REF2,REF3,REF4,REF5。S1404: Obtain 250 reference picture blocks REF0, REF1, REF2, REF3, REF4, and REF5 according to MVO, MV1, MV2, MV3, MV4, and MV5, respectively.
S1405、以MV0为例分别对MV0,MV1,MV2,MV3,MV4,MV5进行如下操作:S1405 takes MV0 as an example to perform the following operations on MV0, MV1, MV2, MV3, MV4, and MV5 respectively:
根据250块存在的模板,不妨设250块仅有上模板TA均存在,确定REF0对应的上模板TA0,TA0和TA大小相等、位置对应。According to the template existing in 250 blocks, it is possible to set 250 blocks only for the upper template TA, and determine the upper template TA0 corresponding to REF0, TA0 and TA are equal in size and corresponding in position.
计算TA0和TA的像素值的SAD值,得到SAD0,作为MV0对应的失真值。The SAD value of the pixel values of TA0 and TA is calculated to obtain SAD0 as the distortion value corresponding to MV0.
同理,获得MV1对应的失真值SAD1,MV2对应的失真值SAD2,MV3对应的失真值SAD3,MV4对应的失真值SAD4,MV5对应的失真值SAD5。Similarly, the distortion values SAD1 corresponding to MV1, the distortion values SAD2 corresponding to MV2, the distortion values SAD3 corresponding to MV3, the distortion values SAD4 corresponding to MV4, and the distortion value SAD5 corresponding to MV5 are obtained.
S1406、从小到大排列SAD0,SAD1,SAD2,不妨设,从小到大顺序为SAD2<SAD0<SAD1。S1406, SAD0, SAD1, SAD2 are arranged from small to large. It may be assumed that the order from small to large is SAD2<SAD0<SAD1.
S1407、按照失真值的大小关系,对MV0,MV1,MV2分别赋予bin string为:S1407: According to the magnitude relationship of the distortion value, assign a bin string to MV0, MV1, and MV2 respectively:
MV2对应“1”,MV0对应“01”,MV1对应“001”。MV2 corresponds to "1", MV0 corresponds to "01", and MV1 corresponds to "001".
S1408、从小到大排列SAD3,SAD4,SADD5,不妨设,从小到大顺序为SAD5<SAD3<SAD4。S1408, SAD3, SAD4, and SADD5 are arranged from small to large. It may be assumed that the order from small to large is SAD5<SAD3<SAD4.
S1409、按照失真值的大小关系,对MV3,MV4,MV5分别赋予bin string为:S1409, according to the magnitude relationship of the distortion value, assign a bin string to MV3, MV4, and MV5 respectively:
MV5对应“0001”,MV3对应“00001”,MV4对应“00000”。MV5 corresponds to "0001", MV3 corresponds to "00001", and MV4 corresponds to "00000".
S1410、按照上述步骤中对各运动信息所赋予的bin string,进行率失真计算,选择率失真代价最小(同等重构图像失真下编码比特少,或同等编码比特下重构图像失真小)的运动信息作为250块最终选定的预测运动信息。S1410: performing rate distortion calculation according to the bin string assigned to each motion information in the foregoing step, and selecting the rate distortion cost is minimum (the number of coded bits under the same reconstructed image distortion is small, or the reconstructed image distortion is smaller under the same coded bit) The information is used as the final motion prediction information selected for 250 blocks.
S1411、当该帧间预测模式最终被选为250块的实际编码模式时,将S1209中最终选定的预测运动信息所对应的bin string通过熵编码写入码流。S1411: When the inter prediction mode is finally selected as the actual coding mode of 250 blocks, the bin string corresponding to the finally selected prediction motion information in S1209 is written into the code stream by entropy coding.
下面将具体的描述一个本发明实施例的解码方法1500。该实施例与编码方法1400相对应。A decoding method 1500 of an embodiment of the present invention will be specifically described below. This embodiment corresponds to the encoding method 1400.
S1501、和编码端一致,结合图8所示,对于待处理块250,设250块的大小为16x16,该250块的上边界的相邻重构图像块(简称上模板)为32x1,左边界的相邻重构图像块(简称左模板)为1x32。检测250块的上模板和左模板是否存在。S1501, and the encoding end are consistent. As shown in FIG. 8 , for the to-be-processed block 250, the size of the 250 block is 16×16, and the adjacent reconstructed image block (referred to as the upper template) of the upper boundary of the 250 block is 32×1, and the left boundary is The adjacent reconstructed image block (referred to as the left template) is 1x32. It is detected whether the upper template and the left template of 250 blocks exist.
当上模板和左模板均不存在时,结束本流程,按照JEM参考软件中Merge模式的预测方法,解码待处理块的预测运动信息的标识。When neither the upper template nor the left template exists, the process ends, and the identifier of the predicted motion information of the to-be-processed block is decoded according to the prediction method of the Merge mode in the JEM reference software.
否则,当至少一个模板存在时,继续本流程。Otherwise, continue with this process when at least one template exists.
S1502、解析码流,获得250块的预测运动信息标识对应的bin string,不妨设为“0001”。且按照解码端预先设置的协议,和编码端一致,第一组具有三个运动信息,第二组具有三个运动信息,“0001”代表4,因此只需要对第二组的三个运动信息进行步骤S1408、S1409的对应步骤即可。S1502: Analyze the code stream, and obtain a bin string corresponding to the predicted motion information identifier of 250 blocks, which may be set to “0001”. And according to the protocol preset by the decoding end, consistent with the encoding end, the first group has three motion information, the second group has three motion information, and “0001” represents 4, so only three motion information of the second group is needed. The corresponding steps of steps S1408 and S1409 may be performed.
S1503、依次检测252A位置的运动信息、252B位置的运动信息、252C位置的运动信息、252D位置的运动信息、对250块采用ATMVP模式获得的运动信息、对250块采用STMVP模式获得的运动信息、252E块的运动信息、对250块采用TMVP模式获得的运动信息。检测内容包括:(1)该运动信息是否可获得(此处的可获得为广义的可获得,不仅包括该运动信息对应的图像块是否存在,还包括根据其它编码工具的性质,比如预测模式,分块模式等,该运动信息是否可以为本申请实施例所使用等);(2)该运动信息是否与在先已检测的运动信息重复。依次获取运动信息可获得且不与在先已检测的运动信息重复的运动信息,直到数量达到S1302中确定的6个,和编码端一致,分别称六个依次获取的运动信息为MV0,MV1,MV2,MV3,MV4,MV5。S1503, sequentially detecting motion information of the 252A position, motion information of the 252B position, motion information of the 252C position, motion information of the 252D position, motion information obtained by using the ATMVP mode for 250 blocks, motion information obtained by using the STMVP mode for 250 blocks, The motion information of the 252E block and the motion information obtained by using the TMVP mode for 250 blocks. The detection content includes: (1) whether the motion information is available (available here is broadly available, including not only whether the image block corresponding to the motion information exists, but also according to properties of other coding tools, such as prediction mode, Whether the motion information can be used in the embodiment of the present application, etc.); (2) whether the motion information is overlapped with the previously detected motion information. The motion information obtained by the motion information and not repeated with the previously detected motion information is sequentially obtained until the number reaches the six determined in S1302, and is consistent with the encoding end, and the six sequentially acquired motion information are respectively MV0, MV1, MV2, MV3, MV4, MV5.
S1506、分别根据MV3,MV4,MV5获取250块的参考图像块REF3,REF4,REF5。S1506: Obtain 250 reference picture blocks REF3, REF4, and REF5 according to MV3, MV4, and MV5, respectively.
S1507、以MV3为例分别对MV3,MV4,MV5进行如下操作:S1507, taking MV3 as an example, performs the following operations on MV3, MV4, and MV5 respectively:
根据250块存在的模板,和编码端一致,设250块仅有上模板TA均存在,确定REF3对应的上模板TA3,TA3和TA大小相等、位置对应。According to the template existing in 250 blocks, it is consistent with the encoding end. It is assumed that only the upper template TA exists in 250 blocks, and the upper template TA3 corresponding to REF3 is determined, and the TA3 and TA are equal in size and corresponding in position.
计算TA3和TA的像素值的SAD值,得到SAD3,作为MV3对应的失真值。The SAD value of the pixel values of TA3 and TA is calculated to obtain SAD3 as the distortion value corresponding to MV3.
同理,获得MV4对应的失真值SAD4,MV5对应的失真值SAD5。Similarly, the distortion value SAD4 corresponding to the distortion value SAD4 and MV5 corresponding to the MV4 is obtained.
S1508、从小到大排列SAD3,SAD4,SADD5,和编码端一致,从小到大顺序为SAD5<SAD3<SAD4。S1508, from small to large, arranges SAD3, SAD4, and SADD5, and is consistent with the coding end. The order from small to large is SAD5<SAD3<SAD4.
S1509、按照失真值的大小关系,对MV3,MV4,MV5分别赋予bin string为:S1509 assigns a bin string to MV3, MV4, and MV5 according to the magnitude relationship of the distortion value:
MV5对应“0001”,MV3对应“00001”,MV4对应“00000”。MV5 corresponds to "0001", MV3 corresponds to "00001", and MV4 corresponds to "00000".
S1510、比较上述步骤中对各运动信息所赋予的bin string和从码流中解析的250块的预测运动信息标识对应的bin string“0001”,可见MV5的bin string也为“0001”,确定MV5为250块的预测运动信息。S1510: Comparing the bin string assigned to each motion information in the above step and the bin string “0001” corresponding to the 250 motion prediction information identifiers parsed from the code stream, it can be seen that the bin string of the MV5 is also “0001”, and the MV5 is determined. It is predicted motion information for 250 blocks.
在一些实施例中,本申请实施例的方法可以用于H.265或正在研发的H.266标准Merge模式、AMVP模式或者其他帧间预测模式的候选预测运动信息列表的建立,以及用于实际编码的预测运动信息标识的表征。In some embodiments, the method of the embodiments of the present application may be used for the establishment of a candidate predicted motion information list of H.265 or H.266 standard Merge mode, AMVP mode or other inter prediction mode under development, and for actual use. Characterization of the encoded predictive motion information identification.
在一些实施例中,本申请实施例的方法,可以用于基于运动估计的帧内预测的候选预测运动信息(匹配块距离矢量)列表的建立,以及用于实际编码的预测运动信息标识的表征。In some embodiments, the method of the embodiments of the present application may be used for the establishment of a candidate motion information (match block distance vector) list of intra prediction based on motion estimation, and a representation of the predicted motion information identifier for actual coding. .
在一些实施例中,本申请实施例的方法,可以用于SCC标准intra block copy模式中候选预测运动信息(匹配块距离矢量)列表的建立,以及用于实际编码的预测运动信息标识的表征。In some embodiments, the method in this embodiment of the present application may be used for establishing a candidate prediction motion information (matching block distance vector) list in an SCC standard intra block copy mode, and a representation of the predicted motion information identifier for actual coding.
在一些实施例中,本申请实施例的方法,可以用于3D或多视点编码标准的帧间、帧内、视点间预测的候选预测运动信息列表的建立,以及用于实际编码的预测运动信息标识的表征。In some embodiments, the method of the embodiments of the present application may be used for establishing an inter-frame, intra-view, inter-view prediction candidate motion information list, and predictive motion information for actual coding. Characterization of the logo.
在一些实施例中,本申请实施例的方法,可以用于可伸缩编码标准的帧间、帧内、层间预测的候选预测运动信息列表的建立,以及用于实际编码的预测运动信息标识的表征。In some embodiments, the method in this embodiment of the present application may be used for establishing an inter-frame, intra-frame, inter-layer prediction candidate motion information list of a scalable coding standard, and for predicting motion information identification for actual coding. Characterization.
在上述各实施例中,相应的,用于表征参考图像块的相似性的待处理块的相邻重构图像块(上述具体实施例中的模板),可以为空间相邻重构图像块、时域相邻重构图像块,相邻视点的重构图像块,相邻层间重构图像块,以及经过缩放的上述各重构图像块等。In the foregoing embodiments, correspondingly, adjacent reconstructed image blocks (templates in the foregoing specific embodiments) of the to-be-processed block used to characterize the similarity of the reference image blocks may be spatially adjacent reconstructed image blocks, The time domain adjacent reconstructed image block, the reconstructed image block of the adjacent view point, the reconstructed image block between the adjacent layers, and the scaled reconstructed image block and the like.
图17为本申请实施例的一种编码装置1700的示意性框图,包括:FIG. 17 is a schematic block diagram of an encoding apparatus 1700 according to an embodiment of the present application, including:
获取模块1701,用于获取待处理图像块的N个候选预测运动信息,其中,N为大于1的整数;The obtaining module 1701 is configured to acquire N candidate predicted motion information of the image block to be processed, where N is an integer greater than one;
计算模块1702,用于获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;a calculation module 1702, configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image The adjacent reconstructed image block of the block is determined;
比较模块1703,用于根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;The comparing module 1703 is configured to determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and a first one of each One-to-one correspondence of identification information;
编码模块1704,用于当所述待处理图像块的目标预测运动信息为所述已确定第一标识信息的N个候选预测运动信息中的一个时,将所述目标预测运动信息的第一标识信息编入码流。The encoding module 1704 is configured to: when the target predicted motion information of the to-be-processed image block is one of the N candidate predicted motion information of the determined first identifier information, the first identifier of the target predicted motion information Information is programmed into the code stream.
在一种可行的实施方式17001中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括参考相邻重构图像块,所述待处理图像块的相邻重构图像块包括与所述参考相邻重构图像块对应的原始相邻重构图像块,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定,包括:所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。In a possible implementation manner 17001, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent reconstructed image block of the to-be-processed image block And including an original adjacent reconstructed image block corresponding to the reference adjacent reconstructed image block, the adjacent reconstructed image block of the reference image block whose distortion value is indicated by the candidate predicted motion information, and the image to be processed The adjacent reconstructed image block of the block is determined to include: the distortion value is represented by a difference characterization value of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, the reference neighboring reconstruction The image block is identical in shape and equal in size to the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block is opposite to the original adjacent reconstructed image block and The positional relationship between the image blocks to be processed is the same.
在一种可行的实施方式17002中,所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值,包括:所述参考相邻重构图像块和所述原始相邻重构图像块的平均绝对误差;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的平均误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对哈达玛变换误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的归一化积相关性度量值;或,所述参考相邻重构图像块和所述原始相邻重构图像块的基于序贯相似性检测的相似性度量值。In a possible implementation manner 17002, the difference representative value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block comprises: the reference adjacent reconstructed image block and the original phase An average absolute error of the adjacent reconstructed image block; an absolute error sum of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original adjacent weight a sum of squared errors of the image blocks; a squared sum of average errors of the reference neighboring reconstructed image blocks and the original neighboring reconstructed image blocks; the reference neighboring reconstructed image blocks and the original neighboring reconstructed An absolute Hadamard transform error sum of the image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring reconstructed image block And a similarity measure based on sequential similarity detection of the original adjacent reconstructed image block.
在一种可行的实施方式17003中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,所述方法包括:所述原始相邻重构图像块的宽为W,高为n;或者,所述原始相邻重构图像块的宽为W+H,高为n;其中W,H,n为正整数。In a possible implementation manner 17003, the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle, the original phase The lower boundary of the adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, and the method includes: the original adjacent reconstructed image block has a width W and a height n; or the original phase The adjacent reconstructed image block has a width of W+H and a height of n; wherein W, H, and n are positive integers.
在一种可行的实施方式17004中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,所述方法包括:所述原始相邻重构图像块的宽为n,高为H;或者,所述原始相邻重构图像块的宽为n,高为W+H;其中W,H,n为正整数。In a possible implementation manner 17004, the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle, the original phase The right boundary of the adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and the method includes: the original adjacent reconstructed image block has a width n and a height H; or the original phase The adjacent reconstructed image block has a width n and a height W+H; wherein W, H, and n are positive integers.
在一种可行的实施方式17005中,n为1或2。In one possible implementation 17005, n is 1 or 2.
在一种可行的实施方式17006中,所述编码装置用于帧间双向预测,对应的,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。In a possible implementation 17006, the encoding apparatus is used for inter-frame bidirectional prediction. Correspondingly, the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, corresponding to And the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is Referring to the difference characterization values of the adjacent reconstructed image block and the original adjacent reconstructed image block, including: the distortion value is averaged by reference to the adjacent reconstructed image block and the original adjacent reconstructed image block Representing a difference characterization value, wherein the average reference neighboring reconstructed image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or The distortion value is represented by an average of a first difference characterization value and a second difference characterization value, wherein the first difference characterization value is reconstructed by the first reference neighboring reconstructed image block and the original neighboring image Image block Characterization of the difference value is represented, characterized by said second difference values of the adjacent reconstructed image of the original block and the reconstructed difference value characterizing the adjacent image block represented by the second reference.
在一种可行的实施方式17007中,所述候选预测运动信息指示的参考图像块的相 邻重构图像块包括多个所述参考相邻重构图像块,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,对应的,所述待处理图像块的相邻重构图像块包括多个所述原始相邻重构图像块,所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。In a possible implementation 17007, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, and the plurality of the reference neighbors The reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block, correspondingly, the adjacent reconstructed image block of the image block to be processed includes a plurality of the original adjacent weights Constructing an image block, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion values being reconstructed by the reference neighbor And representing, by the difference characterization value of the image block and the original adjacent reconstructed image block, the distortion value is determined by the third reference neighboring reconstructed image block and the third original adjacent reconstructed image block And a difference characterization value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
在一种可行的实施方式17008中,所述失真值根据如下计算式获得:In one possible implementation 17008, the distortion value is obtained according to the following calculation formula:
Figure PCTCN2018102632-appb-000011
Figure PCTCN2018102632-appb-000011
其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
在一种可行的实施方式17009中,所述比较模块1703具体用于:比较所述N个失真值之间的大小;按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息,其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串的长度小于等于用于编码所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。In a possible implementation 17009, the comparison module 1703 is specifically configured to: compare a size between the N distortion values; and assign a first identifier of each of the N candidate prediction motion information according to the comparison result. Information, wherein a length of a binary character string of the first identification information of the candidate prediction motion information having a smaller distortion value is less than or equal to a binary character of the first identification information used to encode the candidate prediction motion information having the larger distortion value The length of the string.
在一种可行的实施方式17010中,所述比较模块1703具体用于:按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。In a possible implementation 17010, the comparison module 1703 is specifically configured to sequentially arrange the N candidate predicted motion information according to the distortion values from small to large or from large to small.
在一种可行的实施方式17011中,所述获取模块1701具体用于:按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。In a possible implementation 17011, the acquiring module 1701 is specifically configured to: acquire, according to a preset sequence, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed that are different from each other. The N candidate prediction motion information.
在一种可行的实施方式17012中,所述获取模块1701具体用于:按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;确定所述M个候选预测运动信息的分组方式;根据所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。In a possible implementation 17012, the acquiring module 1701 is specifically configured to: acquire, according to a preset sequence, motion information of the M different image blocks having a preset positional relationship with the image block to be processed. As the M candidate prediction motion information, where the M candidate prediction motion information includes the N candidate prediction motion information, M is an integer greater than N, and determining a grouping manner of the M candidate prediction motion information; In the grouping manner, the N candidate predicted motion information is determined from the M candidate predicted motion information.
在一种可行的实施方式17013中,在所述确定所述M个候选预测运动信息的分组方式之后,所述编码模块1704还用于:将所述分组方式编入所述码流。In a possible implementation 17013, after the determining the grouping manner of the M candidate prediction motion information, the encoding module 1704 is further configured to: program the grouping manner into the code stream.
在一种可行的实施方式17014中,在所述获取待处理图像块的N个候选预测运动信息之后,所述编码模块1704还用于:将所述N个候选预测运动信息编入码流;或者,将指示所述N个与所述待处理图像块具有预设位置关系的图像块的第二标识信息编入所述码流;或者,将与所述N个候选预测运动信息具有预设对应关系的第三标识信息编入所述码流。In a possible implementation 17014, after the obtaining the N candidate prediction motion information of the image block to be processed, the encoding module 1704 is further configured to: encode the N candidate prediction motion information into the code stream; Or, the second identification information indicating the N image blocks having the preset positional relationship with the image block to be processed is encoded into the code stream; or the N candidate prediction motion information is preset The third identification information of the correspondence is programmed into the code stream.
在一种可行的实施方式17015中,所述编码装置1700还包括检测模块1705,在所述获取所述N个候选预测运动信息各自对应的失真值之前,所述检测模块1705还用于:确定所述待处理图像块的相邻重构图像块存在。In a possible implementation 17015, the encoding apparatus 1700 further includes a detecting module 1705, before the acquiring the distortion values corresponding to the N candidate prediction motion information, the detecting module 1705 is further configured to: determine An adjacent reconstructed image block of the image block to be processed exists.
在一种可行的实施方式17016中,所述检测模块1705具体用于:确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块存在。In a possible implementation 17016, the detecting module 1705 is specifically configured to: determine that at least one original adjacent reconstructed image block of the at least two of the original adjacent reconstructed image blocks exists.
在一种可行的实施方式17017中,所述编码装置1700还包括决策模块1706,在所述获取所述N个候选预测运动信息各自对应的失真值之前,所述决策模块1706用于:确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation 17017, the encoding apparatus 1700 further includes a decision module 1706, before the acquiring the distortion values corresponding to the N candidate prediction motion information, the determining module 1706 is configured to: determine to perform And acquiring the distortion value corresponding to each of the N candidate predicted motion information.
在一种可行的实施方式17018中,所述决策模块1706具体用于:根据所述分组方式,确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation 17018, the decision module 1706 is specifically configured to: determine, according to the grouping manner, performing a distortion value corresponding to each of acquiring the N candidate prediction motion information.
在一种可行的实施方式17019中,在所述确定执行所述获取所述N个候选预测运动信息各自对应的失真值之后,所述编码模块1704还用于:将第四标识信息编入所述码流,所述第四标识信息用于确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation 17019, after the determining to perform the acquiring the respective distortion values corresponding to the N candidate prediction motion information, the encoding module 1704 is further configured to: encode the fourth identification information into the Describe a code stream, where the fourth identifier information is used to determine that performing the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
在一种可行的实施方式17020中,所述获取模块1701还用于:从所述M个候选预测运动信息中确定P个候选预测运动信息,其中,所述P个候选预测运动信息和所述N个候选预测运动信息间不存在相同的候选预测运动信息,P为正整数,P小于M-1。In a possible implementation 17020, the obtaining module 1701 is further configured to: determine P candidate predicted motion information from the M candidate predicted motion information, where the P candidate predicted motion information and the The same candidate prediction motion information does not exist between the N candidate prediction motion information, P is a positive integer, and P is smaller than M-1.
各模块的具体执行方法以及有益技术效果可以参考本申请实施例中编码方法For the specific implementation method and beneficial technical effects of each module, reference may be made to the coding method in the embodiment of the present application.
1000的对应步骤的详细描述,不再赘述。A detailed description of the corresponding steps of 1000 will not be repeated.
图18为本申请实施例的一种解码装置1800的示意性框图,包括:FIG. 18 is a schematic block diagram of a decoding apparatus 1800 according to an embodiment of the present application, including:
解析模块1801,用于从码流中解析出待处理图像块的目标预测运动信息的目标标识信息;The parsing module 1801 is configured to parse the target identification information of the target predicted motion information of the to-be-processed image block from the code stream;
获取模块1802,用于确定N个候选预测运动信息,所述N个候选预测运动信息包括所述目标预测运动信息,其中,N为大于1的整数;An obtaining module 1802, configured to determine N candidate predicted motion information, where the N candidate predicted motion information includes the target predicted motion information, where N is an integer greater than one;
计算模块1803,用于获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;a calculation module 1803, configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image The adjacent reconstructed image block of the block is determined;
比较模块1804,用于根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;a comparison module 1804, configured to determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and respective first One-to-one correspondence of identification information;
选择模块1805,用于将与所述目标标识信息匹配的第一标识信息对应的候选预测运动信息确定为所述目标预测运动信息。The selecting module 1805 is configured to determine candidate predicted motion information corresponding to the first identifier information that matches the target identifier information as the target predicted motion information.
在一种可行的实施方式18001中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括参考相邻重构图像块,所述待处理图像块的相邻重构图像块包括与所述参考相邻重构图像块对应的原始相邻重构图像块,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定,包括:所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。In a feasible implementation manner 1801, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a reference adjacent reconstructed image block, and the adjacent reconstructed image block of the to-be-processed image block And including an original adjacent reconstructed image block corresponding to the reference adjacent reconstructed image block, the adjacent reconstructed image block of the reference image block whose distortion value is indicated by the candidate predicted motion information, and the image to be processed The adjacent reconstructed image block of the block is determined to include: the distortion value is represented by a difference characterization value of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, the reference neighboring reconstruction The image block is identical in shape and equal in size to the original adjacent reconstructed image block, and a positional relationship between the reference adjacent reconstructed image block and the reference image block is opposite to the original adjacent reconstructed image block and The positional relationship between the image blocks to be processed is the same.
在一种可行的实施方式18002中,所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值,包括:所述参考相邻重构图像块和所述原始相邻重构图像块的 平均绝对误差;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的平均误差平方和;所述参考相邻重构图像块和所述原始相邻重构图像块的绝对哈达玛变换误差和;所述参考相邻重构图像块和所述原始相邻重构图像块的归一化积相关性度量值;或,所述参考相邻重构图像块和所述原始相邻重构图像块的基于序贯相似性检测的相似性度量值。In a possible implementation manner 18002, the difference characterization values of the reference adjacent reconstructed image block and the original adjacent reconstructed image block comprise: the reference adjacent reconstructed image block and the original phase An average absolute error of the adjacent reconstructed image block; an absolute error sum of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; the reference adjacent reconstructed image block and the original adjacent weight a sum of squared errors of the image blocks; a squared sum of average errors of the reference neighboring reconstructed image blocks and the original neighboring reconstructed image blocks; the reference neighboring reconstructed image blocks and the original neighboring reconstructed An absolute Hadamard transform error sum of the image block; a normalized product correlation metric of the reference neighboring reconstructed image block and the original neighboring reconstructed image block; or the reference neighboring reconstructed image block And a similarity measure based on sequential similarity detection of the original adjacent reconstructed image block.
在一种可行的实施方式18003中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,包括:所述原始相邻重构图像块的宽为W,高为n;或者,所述原始相邻重构图像块的宽为W+H,高为n;其中W,H,n为正整数。In a possible implementation manner, the system block is a rectangle, the image block to be processed has a width W and a height H, and the original adjacent reconstructed image block is a rectangle. The lower boundary of the adjacent reconstructed image block is adjacent to the upper boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width W and a height n; or the original adjacent reconstruction The image block has a width of W+H and a height of n; where W, H, and n are positive integers.
在一种可行的实施方式18004中,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,包括:所述原始相邻重构图像块的宽为n,高为H;或者,所述原始相邻重构图像块的宽为n,高为W+H;其中W,H,n为正整数。In a possible implementation manners 18004, the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle, and the original phase The right boundary of the adjacent reconstructed image block is adjacent to the left boundary of the image block to be processed, and includes: the original adjacent reconstructed image block has a width n and a height H; or the original adjacent reconstruction The image block has a width n and a height W + H; where W, H, n are positive integers.
在一种可行的实施方式18005中,n为1或2。In one possible implementation, 18005, n is 1 or 2.
在一种可行的实施方式18006中,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。In a possible implementation 18006, the reference image block indicated by the candidate prediction motion information includes a first reference image block and a second reference image block, correspondingly, the phase of the reference image block indicated by the candidate prediction motion information. The adjacent reconstructed image block includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image block and the original adjacent weight Representing the difference characterization value of the image block, including: the distortion value is represented by an average reference neighboring reconstructed image block and a difference characterization value of the original adjacent reconstructed image block, wherein the average reference neighbor Reconstructing an image block is obtained by calculating a pixel mean of the first reference neighboring reconstructed image block and the second reference neighboring reconstructed image block; or the distortion value is represented by a first difference representation value and a second difference Representing a mean value of the characterization value, wherein the first difference characterization value is represented by the difference characterization value of the first reference neighboring reconstructed image block and the original neighboring reconstructed image block, Two difference table Values of the original block and the reconstructed image by the difference characterizing the adjacent second reference value adjacent to a reconstructed image block represented.
在一种可行的实施方式18007中,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括多个所述参考相邻重构图像块,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,对应的,所述待处理图像块的相邻重构图像块包括多个所述原始相邻重构图像块,所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。In a possible implementation 18007, the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information includes a plurality of the reference adjacent reconstructed image blocks, and the plurality of the reference adjacent neighbors The reconstructed image block includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block, correspondingly, the adjacent reconstructed image block of the image block to be processed includes a plurality of the original adjacent weights Constructing an image block, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion values being reconstructed by the reference neighbor And representing, by the difference characterization value of the image block and the original adjacent reconstructed image block, the distortion value is determined by the third reference neighboring reconstructed image block and the third original adjacent reconstructed image block And a difference characterization value and a sum of difference characterization values of the fourth reference neighboring reconstructed image block and the fourth original neighboring reconstructed image block.
在一种可行的实施方式18008中,所述失真值根据如下计算式获得:In one possible implementation 18008, the distortion value is obtained according to the following calculation formula:
Figure PCTCN2018102632-appb-000012
Figure PCTCN2018102632-appb-000012
其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原 始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
在一种可行的实施方式18009中,所述比较模块1804具体用于:比较所述N个失真值之间的大小;按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息,其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串的长度小于等于所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。In a possible implementation 18009, the comparing module 1804 is specifically configured to: compare a size between the N distortion values; and assign a first identifier of each of the N candidate prediction motion information according to the comparison result Information, wherein a length of a binary character string of the first identification information of the candidate prediction motion information having a smaller distortion value is less than a length of a binary character string of the first identification information of the candidate prediction motion information having the larger distortion value .
在一种可行的实施方式18010中,所述比较模块1804具体用于:按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。In a possible implementation 18010, the comparison module 1804 is specifically configured to sequentially arrange the N candidate predicted motion information according to the distortion values from small to large or from large to small.
在一种可行的实施方式18011中,所述获取模块1802具体用于:按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。In a possible implementation 18011, the acquiring module 1802 is specifically configured to: acquire, according to a preset sequence, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed that are different from each other. The N candidate prediction motion information.
在一种可行的实施方式18012中,所述获取模块1802具体用于:按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;确定所述M个候选预测运动信息的分组方式;根据所述目标标识信息和所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。In a possible implementation manner, the acquisition module 1802 is specifically configured to: acquire motion information of M image blocks having a preset positional relationship with the image block to be processed that are different from each other according to a preset sequence. As the M candidate prediction motion information, where the M candidate prediction motion information includes the N candidate prediction motion information, M is an integer greater than N, and determining a grouping manner of the M candidate prediction motion information; Determining the target identification information and the grouping manner, and determining the N candidate predicted motion information from the M candidate predicted motion information.
在一种可行的实施方式18013中,所述获取模块1802具体用于:确定预设的所述分组方式;或者,从所述码流中解析获得所述分组方式。In a possible implementation manner, the obtaining module 1802 is specifically configured to: determine the preset grouping manner; or obtain the grouping manner by parsing from the code stream.
在一种可行的实施方式18014中,所述获取模块1802具体用于:解析所述码流中的所述多个候选预测运动信息的编码信息,以获得所述N个候选预测运动信息;或者,解析所述码流中的第二标识信息,以获得所述第二标识信息指示的N个候选图像块,并以所述N个候选图像块的运动信息作为所述N个候选预测运动信息;或者,解析所述码流中的第三标识信息,以获得与所述第三标识信息具有预设对应关系的所述N个候选预测运动信息。In a possible implementation manner, the acquisition module 1802 is specifically configured to: parse coding information of the plurality of candidate prediction motion information in the code stream to obtain the N candidate prediction motion information; or And parsing the second identifier information in the code stream to obtain the N candidate image blocks indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate motion information. Or parsing the third identification information in the code stream to obtain the N candidate prediction motion information that has a preset correspondence relationship with the third identification information.
在一种可行的实施方式18015中,所述装置1800还包括:In a possible implementation 18015, the apparatus 1800 further includes:
检测模块1806,用于确定所述待处理图像块的相邻重构图像块可用。The detecting module 1806 is configured to determine that adjacent reconstructed image blocks of the image block to be processed are available.
在一种可行的实施方式18016中,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述检测模块1806具体用于:确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。In a possible implementation 18016, when the adjacent reconstructed image block of the image block to be processed includes at least two of the original adjacent reconstructed image blocks, the detecting module 1806 is specifically configured to: determine At least one of the at least two of the original adjacent reconstructed image blocks is available for use with the original adjacent reconstructed image block.
在一种可行的实施方式18017中,所述装置还包括:In a possible implementation 18017, the apparatus further includes:
决策模块1807,用于确定执行所述获取所述N个候选预测运动信息各自对应的失真值。The decision module 1807 is configured to determine to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
在一种可行的实施方式18018中,所述决策模块1807具体用于:根据所述分组方式,确定执行所述获取所述N个候选预测运动信息各自对应的失真值;或者,解析所述码流中的第四标识信息以确定执行所述获取所述N个候选预测运动信息各自对应的失真值。In a possible implementation 18018, the determining module 1807 is specifically configured to: determine, according to the grouping manner, performing the acquiring a distortion value corresponding to each of the N candidate prediction motion information; or parsing the code The fourth identification information in the stream is determined to perform the acquiring the distortion value corresponding to each of the N candidate predicted motion information.
各模块的具体执行方法以及有益技术效果可以参考本申请实施例中解码方法 1100的对应步骤的详细描述,不再赘述。For a detailed description of the corresponding steps of the decoding method 1100 in the embodiment of the present application, a detailed description of the corresponding steps of the decoding method 1100 in the embodiment of the present application is omitted.
图19示出了是根据本申请实施例的装置1900的示意性框图。该装置包括:FIG. 19 shows a schematic block diagram of an apparatus 1900 in accordance with an embodiment of the present application. The device includes:
存储器1901,用于存储程序,所述程序包括代码;a memory 1901, configured to store a program, where the program includes a code;
收发器1902,用于和其他设备进行通信;a transceiver 1902 for communicating with other devices;
处理器1903,用于执行存储器1901中的程序代码。The processor 1903 is configured to execute program code in the memory 1901.
可选地,当所述代码被执行时,所述处理器1903可以实现方法1000或者方法1100的各个操作,不再赘述。收发器1902用于在处理器1903的驱动下执行具体的信号收发。Optionally, when the code is executed, the processor 1903 may implement various operations of the method 1000 or the method 1100, and details are not described herein. The transceiver 1902 is configured to perform specific signal transceiving under the driving of the processor 1903.
虽然已基于视频编码器20及视频解码器30描述本申请的特定方面,但应理解,本发明的技术可通过许多其它视频编码和/或解码单元、处理器、处理单元、例如编码器/解码器的基于硬件的解码单元及类似者来应用。此外,应理解,仅作为可行的实施方式而提供本申请中各示意性流程图所展示及描述的步骤。即,本申请中各示意性流程图的可行的实施方式中所展示的步骤不需要一定按本申请中各示意性流程图中所展示的次序执行,且可执行更少、额外或替代步骤。Although specific aspects of the present application have been described based on video encoder 20 and video decoder 30, it should be understood that the techniques of this disclosure may be through many other video encoding and/or decoding units, processors, processing units, such as encoder/decode The hardware-based decoding unit of the device and the like are applied. In addition, it should be understood that the steps shown and described in the various illustrative flowcharts of the present application are provided only as a possible implementation. That is, the steps shown in the possible embodiments of the schematic flowcharts of the present application are not necessarily performed in the order shown in the schematic flowcharts of the present application, 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 certain possible implementations, the acts or events can be performed concurrently, rather than sequentially, via 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 is 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 corresponding to a tangible medium such as a data storage medium, the communication medium comprising any medium that facilitates transfer of the computer program from one place to another in accordance with a communication protocol .
以这个方式,计算机可读媒体示例性地可对应于(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. 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.
可通过例如一个或多个数字信号处理器、通用微处理器、专用集成电路、现场可编程门阵列或其它等效集成或离散逻辑电路的一个或多个处理器来执行指令。因此,如本文中所使用,术语“处理器”可指前述结构或适于实施本文中所描述的技术的任何其它结构中的任一者。另外,在一些方面中,可将本文所描述的功能性提供于经配置以用于编码及解码的专用硬件和/或软件模块内,或并入于组合式编码解码器中。同样,技术可完全实施于一个或多个电路或逻辑元件中。The instructions may be executed by one or more processors, such as one or more digital signal processors, general purpose microprocessors, application specific integrated circuits, field programmable gate arrays, or other equivalent integrated or discrete logic circuits. 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 by interoperable hardware units (including one or more processors as described above) in conjunction with suitable software and/or firmware. 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 (41)

  1. 一种图像块预测运动信息的解码方法,其特征在于,包括:A method for decoding image block prediction motion information, comprising:
    从码流中解析出待处理图像块的目标预测运动信息的目标标识信息;Parsing target identification information of target predicted motion information of the image block to be processed from the code stream;
    确定N个候选预测运动信息,所述N个候选预测运动信息包括所述目标预测运动信息,其中,N为大于1的整数;Determining N candidate predicted motion information, the N candidate predicted motion information including the target predicted motion information, where N is an integer greater than 1;
    获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;Obtaining a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information and adjacent reconstruction of the to-be-processed image block Image block determination;
    根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;Determining, according to the magnitude relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, where the N candidate prediction motion information and the respective first identification information are in one-to-one correspondence;
    将与所述目标标识信息匹配的第一标识信息对应的候选预测运动信息确定为所述目标预测运动信息。The candidate predicted motion information corresponding to the first identification information that matches the target identification information is determined as the target predicted motion information.
  2. 根据权利要求1所述的方法,其特征在于,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括参考相邻重构图像块,所述待处理图像块的相邻重构图像块包括与所述参考相邻重构图像块对应的原始相邻重构图像块,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定,包括:The method according to claim 1, wherein the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information comprises a reference adjacent reconstructed image block, and the adjacent weight of the image block to be processed The image block includes an original adjacent reconstructed image block corresponding to the reference neighboring reconstructed image block, the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information, and the The adjacent reconstructed image block of the image block to be processed is determined, including:
    所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。The distortion value is represented by a difference characterization value of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, the reference neighboring reconstructed image block and the original adjacent reconstructed image block The shapes are the same, the sizes are equal, and the positional relationship between the reference adjacent reconstructed image block and the reference image block is the same as the positional relationship between the original adjacent reconstructed image block and the image block to be processed .
  3. 根据权利要求2所述的方法,其特征在于,所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值,包括:The method according to claim 2, wherein the referencing the difference representation values of the adjacent reconstructed image block and the original adjacent reconstructed image block comprises:
    所述参考相邻重构图像块和所述原始相邻重构图像块的平均绝对误差(MAD);And referring to an average absolute error (MAD) of the adjacent reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的绝对误差和(SAD);And referring to an absolute error sum (SAD) of the adjacent reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的误差平方和(SSD);Calculating a sum of squared errors (SSD) of the adjacent reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的平均误差平方和(MSD);a mean squared sum of squares (MSD) of the reference neighboring reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的绝对哈达玛变换误差和(SATD);An absolute Hadamard transform error sum (SATD) of the reference neighboring reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的归一化积相关性度量值(NCC);或,a normalized product correlation measure (NCC) of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; or
    所述参考相邻重构图像块和所述原始相邻重构图像块的基于序贯相似性检测Sequential similarity detection of the reference adjacent reconstructed image block and the original adjacent reconstructed image block
    (SSDA)的相似性度量值。(SSDA) similarity measure.
  4. 根据权利要求2或3所述的方法,其特征在于,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,包括:The method according to claim 2 or 3, wherein the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and includes:
    所述原始相邻重构图像块的宽为W,高为n;或者,The original adjacent reconstructed image block has a width W and a height n; or
    所述原始相邻重构图像块的宽为W+H,高为n;其中W,H,n为正整数。The original adjacent reconstructed image block has a width of W+H and a height of n; wherein W, H, and n are positive integers.
  5. 根据权利要求4所述的方法,其特征在于,n为1或2。The method of claim 4 wherein n is 1 or 2.
  6. 根据权利要求2或3所述的方法,其特征在于,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,包括:The method according to claim 2 or 3, wherein the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, and includes:
    所述原始相邻重构图像块的宽为n,高为H;或者,The original adjacent reconstructed image block has a width n and a height H; or
    所述原始相邻重构图像块的宽为n,高为W+H;其中W,H,n为正整数。The original adjacent reconstructed image block has a width n and a height W+H; wherein W, H, n are positive integers.
  7. 根据权利要求6所述的方法,其特征在于,n为1或2。The method of claim 6 wherein n is 1 or 2.
  8. 根据权利要求2至7任一项所述的方法,其特征在于,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:The method according to any one of claims 2 to 7, wherein the reference image block indicated by the candidate prediction motion information comprises a first reference image block and a second reference image block, correspondingly, the candidate prediction motion The adjacent reconstructed image block of the reference image block indicated by the information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image And a difference characterization value of the block and the original adjacent reconstructed image block, including:
    所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,The distortion value is represented by an average reference neighboring reconstructed image block and a difference representative value of the original adjacent reconstructed image block, wherein the average reference neighboring reconstructed image block is calculated by calculating the first reference phase And obtaining a pixel mean of the adjacent reconstructed image block and the second reference adjacent reconstructed image block; or
    所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。The distortion value is represented by an average of a first difference characterization value and a second difference characterization value, wherein the first difference characterization value is reconstructed by the first reference neighboring reconstructed image block and the original neighboring image The difference characterization value of the image block is represented by the difference characterization value of the second reference neighboring reconstructed image block and the original neighboring reconstructed image block.
  9. 根据权利要求2至8任一项所述的方法,其特征在于,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括多个所述参考相邻重构图像块,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,对应的,所述待处理图像块的相邻重构图像块包括多个所述原始相邻重构图像块,所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。The method according to any one of claims 2 to 8, wherein the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information comprises a plurality of the reference adjacent reconstructed image blocks, The plurality of the reference adjacent reconstructed image blocks includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block, and correspondingly, the adjacent reconstructed image block of the to-be-processed image block includes a plurality of the original adjacent reconstructed image blocks, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion value Represented by the difference characterization values of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, including: the distortion value by the third reference neighboring reconstructed image block and the third And a difference characterization value of the original adjacent reconstructed image block and a sum of difference characterization values of the fourth reference adjacent reconstructed image block and the fourth original adjacent reconstructed image block.
  10. 根据权利要求9所述的方法,其特征在于,所述失真值根据如下计算式获得:The method according to claim 9, wherein the distortion value is obtained according to the following calculation formula:
    Figure PCTCN2018102632-appb-100001
    Figure PCTCN2018102632-appb-100001
    其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  11. 根据权利要求1至10任一项所述的方法,其特征在于,所述根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,包括:The method according to any one of claims 1 to 10, wherein the determining the first identification information of each of the N candidate predicted motion information according to the magnitude relationship between the acquired N distortion values ,include:
    比较所述N个失真值之间的大小;Comparing the size between the N distortion values;
    按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息,其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串(bin string) 的长度小于等于所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。The first identification information of each of the N candidate prediction motion information is given according to the comparison result, wherein a length of a binary string of the first identification information of the candidate prediction motion information with a smaller distortion value is smaller than A length of a binary character string of the first identification information equal to the candidate prediction motion information having the larger distortion value.
  12. 根据权利要求11所述的方法,其特征在于,所述比较所述N个失真值之间的大小,包括:The method according to claim 11, wherein said comparing a size between said N distortion values comprises:
    按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。The N candidate predicted motion information are sequentially arranged in order of the distortion values from small to large or from large to small.
  13. 根据权利要求1至12任一项所述的方法,其特征在于,所述确定N个候选预测运动信息,包括:The method according to any one of claims 1 to 12, wherein the determining the N candidate predicted motion information comprises:
    按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。Acquiring, in a preset order, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed as the N candidate predicted motion information.
  14. 根据权利要求1至12任一项所述的方法,其特征在于,所述确定N个候选预测运动信息,包括:The method according to any one of claims 1 to 12, wherein the determining the N candidate predicted motion information comprises:
    按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;Acquiring, in a preset order, M pieces of motion information of image blocks having a preset positional relationship with the image block to be processed as M candidate predicted motion information, wherein the M candidate predicted motion information includes The N candidate predicted motion information, where M is an integer greater than N;
    确定所述M个候选预测运动信息的分组方式;Determining a grouping manner of the M candidate prediction motion information;
    根据所述目标标识信息和所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。Determining the N candidate predicted motion information from the M candidate predicted motion information according to the target identification information and the grouping manner.
  15. 根据权利要求14所述的方法,其特征在于,所述确定所述M个候选预测运动信息的分组方式,包括:The method according to claim 14, wherein the determining a grouping manner of the M candidate prediction motion information comprises:
    确定预设的所述分组方式;或者,Determining the preset grouping manner; or,
    从所述码流中解析获得所述分组方式。The packet mode is obtained by parsing from the code stream.
  16. 根据权利要求1至12任一项所述的方法,其特征在于,所述确定N个候选预测运动信息,包括:The method according to any one of claims 1 to 12, wherein the determining the N candidate predicted motion information comprises:
    解析所述码流中的所述多个候选预测运动信息的编码信息,以获得所述N个候选预测运动信息;或者,Parsing coding information of the plurality of candidate prediction motion information in the code stream to obtain the N candidate prediction motion information; or
    解析所述码流中的第二标识信息,以获得所述第二标识信息指示的N个候选图像块,并以所述N个候选图像块的运动信息作为所述N个候选预测运动信息;或者,And parsing the second identifier information in the code stream to obtain the N candidate image blocks indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate prediction motion information; or,
    解析所述码流中的第三标识信息,以获得与所述第三标识信息具有预设对应关系的所述N个候选预测运动信息。And parsing the third identifier information in the code stream to obtain the N candidate predicted motion information that has a preset correspondence relationship with the third identifier information.
  17. 根据权利要求1至16任一项所述的方法,其特征在于,在所述获取所述N个候选预测运动信息各自对应的失真值之前,所述方法还包括:The method according to any one of claims 1 to 16, wherein before the obtaining the distortion value corresponding to each of the N candidate prediction motion information, the method further comprises:
    确定所述待处理图像块的相邻重构图像块可用。It is determined that adjacent reconstructed image blocks of the image block to be processed are available.
  18. 根据权利要求17所述的方法,其特征在于,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述确定所述待处理图像块的相邻重构图像块可用,包括:The method according to claim 17, wherein said determining said image to be processed when said adjacent reconstructed image block of said image block comprises at least two of said original adjacent reconstructed image blocks The adjacent reconstructed image blocks of the block are available, including:
    确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。Determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
  19. 根据权利要求1至18任一项所述的方法,其特征在于,在所述确定N个候选 预测运动信息之后,所述方法还包括:The method according to any one of claims 1 to 18, wherein after the determining the N candidate predicted motion information, the method further comprises:
    确定执行所述获取所述N个候选预测运动信息各自对应的失真值。Determining to perform the obtaining the distortion value corresponding to each of the N candidate predicted motion information.
  20. 根据权利要求19所述的方法,其特征在于,所述确定执行所述获取所述N个候选预测运动信息各自对应的失真值,包括:The method according to claim 19, wherein the determining to perform the acquiring the distortion value corresponding to each of the N candidate prediction motion information comprises:
    根据所述分组方式,确定执行所述获取所述N个候选预测运动信息各自对应的失真值;或者,解析所述码流中的第四标识信息以确定执行所述获取所述N个候选预测运动信息各自对应的失真值。Determining, according to the grouping manner, performing the acquiring a distortion value corresponding to each of the N candidate prediction motion information; or parsing the fourth identifier information in the code stream to determine to perform the acquiring the N candidate predictions The distortion value corresponding to each of the motion information.
  21. 一种图像块预测运动信息的解码装置,其特征在于,包括:A decoding device for predicting motion information of an image block, comprising:
    解析模块,用于从码流中解析出待处理图像块的目标预测运动信息的目标标识信息;a parsing module, configured to parse target identification information of the target predicted motion information of the to-be-processed image block from the code stream;
    获取模块,用于确定N个候选预测运动信息,所述N个候选预测运动信息包括所述目标预测运动信息,其中,N为大于1的整数;And an obtaining module, configured to determine N candidate predicted motion information, where the N candidate predicted motion information includes the target predicted motion information, where N is an integer greater than one;
    计算模块,用于获取所述N个候选预测运动信息各自对应的失真值,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定;a calculation module, configured to acquire a distortion value corresponding to each of the N candidate prediction motion information, where the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate prediction motion information, and the to-be-processed image block Adjacent reconstructed image block determination;
    比较模块,用于根据所述获取的N个失真值之间的大小关系,确定所述N个候选预测运动信息各自的第一标识信息,所述N个候选预测运动信息和各自的第一标识信息一一对应;a comparison module, configured to determine, according to the size relationship between the acquired N distortion values, first identification information of each of the N candidate prediction motion information, the N candidate prediction motion information and respective first identifiers Information one-to-one correspondence;
    选择模块,用于将与所述目标标识信息匹配的第一标识信息对应的候选预测运动信息确定为所述目标预测运动信息。And a selection module, configured to determine candidate predicted motion information corresponding to the first identifier information that matches the target identifier information as the target predicted motion information.
  22. 根据权利要求21所述的装置,其特征在于,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括参考相邻重构图像块,所述待处理图像块的相邻重构图像块包括与所述参考相邻重构图像块对应的原始相邻重构图像块,所述失真值由所述候选预测运动信息指示的参考图像块的相邻重构图像块和所述待处理图像块的相邻重构图像块确定,包括:The apparatus according to claim 21, wherein the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information comprises a reference adjacent reconstructed image block, and the adjacent weight of the image block to be processed The image block includes an original adjacent reconstructed image block corresponding to the reference neighboring reconstructed image block, the distortion value is an adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information, and the The adjacent reconstructed image block of the image block to be processed is determined, including:
    所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,所述参考相邻重构图像块与所述原始相邻重构图像块形状相同、大小相等,且所述参考相邻重构图像块和所述参考图像块之间的位置关系与所述原始相邻重构图像块和所述待处理图像块之间的位置关系相同。The distortion value is represented by a difference characterization value of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, the reference neighboring reconstructed image block and the original adjacent reconstructed image block The shapes are the same, the sizes are equal, and the positional relationship between the reference adjacent reconstructed image block and the reference image block is the same as the positional relationship between the original adjacent reconstructed image block and the image block to be processed .
  23. 根据权利要求22所述的装置,其特征在于,所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值,包括:The apparatus according to claim 22, wherein the difference representative value of the reference adjacent reconstructed image block and the original adjacent reconstructed image block comprises:
    所述参考相邻重构图像块和所述原始相邻重构图像块的平均绝对误差(MAD);And referring to an average absolute error (MAD) of the adjacent reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的绝对误差和(SAD);And referring to an absolute error sum (SAD) of the adjacent reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的误差平方和(SSD);Calculating a sum of squared errors (SSD) of the adjacent reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的平均误差平方和(MSD);a mean squared sum of squares (MSD) of the reference neighboring reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的绝对哈达玛变换误差和(SATD);An absolute Hadamard transform error sum (SATD) of the reference neighboring reconstructed image block and the original adjacent reconstructed image block;
    所述参考相邻重构图像块和所述原始相邻重构图像块的归一化积相关性度量值(NCC);或,a normalized product correlation measure (NCC) of the reference adjacent reconstructed image block and the original adjacent reconstructed image block; or
    所述参考相邻重构图像块和所述原始相邻重构图像块的基于序贯相似性检测Sequential similarity detection of the reference adjacent reconstructed image block and the original adjacent reconstructed image block
    (SSDA)的相似性度量值。(SSDA) similarity measure.
  24. 根据权利要求22或23所述的装置,其特征在于,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的下边界与所述待处理图像块的上边界相邻,包括:The device according to claim 22 or 23, wherein the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The lower boundary of the original adjacent reconstructed image block is adjacent to an upper boundary of the image block to be processed, and includes:
    所述原始相邻重构图像块的宽为W,高为n;或者,The original adjacent reconstructed image block has a width W and a height n; or
    所述原始相邻重构图像块的宽为W+H,高为n;其中W,H,n为正整数。The original adjacent reconstructed image block has a width of W+H and a height of n; wherein W, H, and n are positive integers.
  25. 根据权利要求24所述的装置,其特征在于,n为1或2。The device according to claim 24, wherein n is 1 or 2.
  26. 根据权利要求22或23所述的装置,其特征在于,所述待处理图像块为矩形,所述待处理图像块的宽为W,高为H,所述原始相邻重构图像块为矩形,所述原始相邻重构图像块的右边界与所述待处理图像块的左边界相邻,包括:The device according to claim 22 or 23, wherein the image block to be processed is a rectangle, the width of the image block to be processed is W, the height is H, and the original adjacent reconstructed image block is a rectangle. The right boundary of the original adjacent reconstructed image block is adjacent to a left boundary of the image block to be processed, and includes:
    所述原始相邻重构图像块的宽为n,高为H;或者,The original adjacent reconstructed image block has a width n and a height H; or
    所述原始相邻重构图像块的宽为n,高为W+H;其中W,H,n为正整数。The original adjacent reconstructed image block has a width n and a height W+H; wherein W, H, n are positive integers.
  27. 根据权利要求26所述的装置,其特征在于,n为1或2。The device according to claim 26, wherein n is 1 or 2.
  28. 根据权利要求22至27任一项所述的装置,其特征在于,所述候选预测运动信息指示的参考图像块包括第一参考图像块和第二参考图像块,对应的,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括第一参考相邻重构图像块和第二参考相邻重构图像块,对应的,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:The apparatus according to any one of claims 22 to 27, wherein the reference image block indicated by the candidate predicted motion information comprises a first reference image block and a second reference image block, correspondingly, the candidate predicted motion The adjacent reconstructed image block of the reference image block indicated by the information includes a first reference adjacent reconstructed image block and a second reference adjacent reconstructed image block, correspondingly, the distortion value is determined by the reference adjacent reconstructed image And a difference characterization value of the block and the original adjacent reconstructed image block, including:
    所述失真值由平均参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,其中,所述平均参考相邻重构图像块由计算所述第一参考相邻重构图像块和所述第二参考相邻重构图像块的像素均值获得;或者,The distortion value is represented by an average reference neighboring reconstructed image block and a difference representative value of the original adjacent reconstructed image block, wherein the average reference neighboring reconstructed image block is calculated by calculating the first reference phase And obtaining a pixel mean of the adjacent reconstructed image block and the second reference adjacent reconstructed image block; or
    所述失真值由第一差异表征值和第二差异表征值的均值来表示,其中,所述第一差异表征值由所述第一参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示,所述第二差异表征值由所述第二参考相邻重构图像块和所述原始相邻重构图像块的所述差异表征值来表示。The distortion value is represented by an average of a first difference characterization value and a second difference characterization value, wherein the first difference characterization value is reconstructed by the first reference neighboring reconstructed image block and the original neighboring image The difference characterization value of the image block is represented by the difference characterization value of the second reference neighboring reconstructed image block and the original neighboring reconstructed image block.
  29. 根据权利要求22至28任一项所述的装置,其特征在于,所述候选预测运动信息指示的参考图像块的相邻重构图像块包括多个所述参考相邻重构图像块,所述多个所述参考相邻重构图像块包括第三参考相邻重构图像块和第四参考相邻重构图像块,对应的,所述待处理图像块的相邻重构图像块包括多个所述原始相邻重构图像块,所述多个所述原始相邻重构图像块包括第三原始相邻重构图像块和第四原始相邻重构图像块,所述失真值由所述参考相邻重构图像块和所述原始相邻重构图像块的差异表征值来表示,包括:所述失真值由所述第三参考相邻重构图像块和所述第三原始相邻重构图像块的差异表征值以及所述第四参考相邻重构图像块和所述第四原始相邻重构图像块的差异表征值之和来表示。The apparatus according to any one of claims 22 to 28, wherein the adjacent reconstructed image block of the reference image block indicated by the candidate predicted motion information comprises a plurality of the reference adjacent reconstructed image blocks, The plurality of the reference adjacent reconstructed image blocks includes a third reference adjacent reconstructed image block and a fourth reference adjacent reconstructed image block, and correspondingly, the adjacent reconstructed image block of the to-be-processed image block includes a plurality of the original adjacent reconstructed image blocks, the plurality of the original adjacent reconstructed image blocks comprising a third original adjacent reconstructed image block and a fourth original adjacent reconstructed image block, the distortion value Represented by the difference characterization values of the reference neighboring reconstructed image block and the original neighboring reconstructed image block, including: the distortion value by the third reference neighboring reconstructed image block and the third And a difference characterization value of the original adjacent reconstructed image block and a sum of difference characterization values of the fourth reference adjacent reconstructed image block and the fourth original adjacent reconstructed image block.
  30. 根据权利要求29所述的装置,其特征在于,所述失真值根据如下计算式获得:The apparatus according to claim 29, wherein said distortion value is obtained according to the following calculation formula:
    Figure PCTCN2018102632-appb-100002
    Figure PCTCN2018102632-appb-100002
    其中,Distortion表示所述失真值,|Delta(Original i,Reference i)|表示第i个原 始相邻重构图像块和第i个参考相邻重构图像块的所述差异表征值,p表示用于计算所述失真值的所述原始相邻重构图像块的个数。 Wherein, Distortion represents the distortion value, |Delta(Original i , Reference i )| represents the difference characterization value of the i-th original adjacent reconstructed image block and the ith reference adjacent reconstructed image block, and p represents The number of the original adjacent reconstructed image blocks used to calculate the distortion value.
  31. 根据权利要求21至30任一项所述的装置,其特征在于,所述比较模块具体用于:The device according to any one of claims 21 to 30, wherein the comparison module is specifically configured to:
    比较所述N个失真值之间的大小;Comparing the size between the N distortion values;
    按照所述比较结果赋予所述N个候选预测运动信息各自的第一标识信息,其中,所述失真值较小的候选预测运动信息的第一标识信息的二进制字符串(bin string)的长度小于等于所述失真值较大的候选预测运动信息的第一标识信息的二进制字符串的长度。The first identification information of each of the N candidate prediction motion information is given according to the comparison result, wherein a length of a binary string of the first identification information of the candidate prediction motion information with a small distortion value is smaller than A length of a binary character string of the first identification information equal to the candidate prediction motion information having the larger distortion value.
  32. 根据权利要求31所述的装置,其特征在于,所述比较模块具体用于:The device according to claim 31, wherein the comparison module is specifically configured to:
    按照所述失真值从小到大或者从大到小的顺序,顺序排列所述N个候选预测运动信息。The N candidate predicted motion information are sequentially arranged in order of the distortion values from small to large or from large to small.
  33. 根据权利要求21至32任一项所述的装置,其特征在于,所述获取模块具体用于:The device according to any one of claims 21 to 32, wherein the obtaining module is specifically configured to:
    按照预设的顺序,获取N个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为所述N个候选预测运动信息。Acquiring, in a preset order, N pieces of motion information of image blocks having a preset positional relationship with the image block to be processed as the N candidate predicted motion information.
  34. 根据权利要求21至32任一项所述的装置,其特征在于,所述获取模块具体用于:The device according to any one of claims 21 to 32, wherein the obtaining module is specifically configured to:
    按照预设的顺序,获取M个互不相同的与所述待处理图像块具有预设位置关系的图像块的运动信息作为M个候选预测运动信息,其中,所述M个候选预测运动信息包括所述N个候选预测运动信息,M为大于N的整数;Acquiring, in a preset order, M pieces of motion information of image blocks having a preset positional relationship with the image block to be processed as M candidate predicted motion information, wherein the M candidate predicted motion information includes The N candidate predicted motion information, where M is an integer greater than N;
    确定所述M个候选预测运动信息的分组方式;Determining a grouping manner of the M candidate prediction motion information;
    根据所述目标标识信息和所述分组方式,从所述M个候选预测运动信息中确定所述N个候选预测运动信息。Determining the N candidate predicted motion information from the M candidate predicted motion information according to the target identification information and the grouping manner.
  35. 根据权利要求34所述的装置,其特征在于,所述获取模块具体用于:The device according to claim 34, wherein the obtaining module is specifically configured to:
    确定预设的所述分组方式;或者,Determining the preset grouping manner; or,
    从所述码流中解析获得所述分组方式。The packet mode is obtained by parsing from the code stream.
  36. 根据权利要求21至32任一项所述的装置,其特征在于,所述获取模块具体用于:The device according to any one of claims 21 to 32, wherein the obtaining module is specifically configured to:
    解析所述码流中的所述多个候选预测运动信息的编码信息,以获得所述N个候选预测运动信息;或者,Parsing coding information of the plurality of candidate prediction motion information in the code stream to obtain the N candidate prediction motion information; or
    解析所述码流中的第二标识信息,以获得所述第二标识信息指示的N个候选图像块,并以所述N个候选图像块的运动信息作为所述N个候选预测运动信息;或者,And parsing the second identifier information in the code stream to obtain the N candidate image blocks indicated by the second identifier information, and using the motion information of the N candidate image blocks as the N candidate prediction motion information; or,
    解析所述码流中的第三标识信息,以获得与所述第三标识信息具有预设对应关系的所述N个候选预测运动信息。And parsing the third identifier information in the code stream to obtain the N candidate predicted motion information that has a preset correspondence relationship with the third identifier information.
  37. 根据权利要求21至36任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 21 to 36, wherein the device further comprises:
    检测模块,用于确定所述待处理图像块的相邻重构图像块可用。And a detecting module, configured to determine that adjacent reconstructed image blocks of the image block to be processed are available.
  38. 根据权利要求37所述的装置,其特征在于,当所述待处理图像块的相邻重构图像块包括至少两个所述原始相邻重构图像块时,所述检测模块具体用于:The apparatus according to claim 37, wherein when the adjacent reconstructed image block of the image block to be processed includes at least two of the original adjacent reconstructed image blocks, the detecting module is specifically configured to:
    确定所述至少两个所述原始相邻重构图像块中的至少一个原始相邻重构图像块可用。Determining that at least one of the at least two of the original adjacent reconstructed image blocks is available.
  39. 根据权利要求34至38任一项所述的装置,其特征在于,所述装置还包括:The device according to any one of claims 34 to 38, wherein the device further comprises:
    决策模块,用于确定执行所述获取所述N个候选预测运动信息各自对应的失真值。And a decision module, configured to determine, by performing the acquiring, the distortion value corresponding to each of the N candidate predicted motion information.
  40. 根据权利要求39所述的装置,其特征在于,所述决策模块具体用于:The device according to claim 39, wherein the decision module is specifically configured to:
    根据所述分组方式,确定执行所述获取所述N个候选预测运动信息各自对应的失真值;或者,解析所述码流中的第四标识信息以确定执行所述获取所述N个候选预测运动信息各自对应的失真值。Determining, according to the grouping manner, performing the acquiring a distortion value corresponding to each of the N candidate prediction motion information; or parsing the fourth identifier information in the code stream to determine to perform the acquiring the N candidate predictions The distortion value corresponding to each of the motion information.
  41. 一种图像块预测运动信息的解码装置,其特征在于,包括:A decoding device for predicting motion information of an image block, comprising:
    存储器和耦合于所述存储器的处理器;a memory and a processor coupled to the memory;
    所述处理器被配置为执行指令以执行权利要求1至20任一项所述的方法,所述指令存储于所述存储器中。The processor is configured to execute instructions to perform the method of any one of claims 1 to 20, the instructions being stored in the memory.
PCT/CN2018/102632 2017-09-12 2018-08-28 Encoding and decoding method and apparatus for motion information WO2019052330A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710818690.5 2017-09-12
CN201710818690.5A CN109495738B (en) 2017-09-12 2017-09-12 Coding and decoding method and device for motion information

Publications (1)

Publication Number Publication Date
WO2019052330A1 true WO2019052330A1 (en) 2019-03-21

Family

ID=65687803

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102632 WO2019052330A1 (en) 2017-09-12 2018-08-28 Encoding and decoding method and apparatus for motion information

Country Status (2)

Country Link
CN (1) CN109495738B (en)
WO (1) WO2019052330A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095322A (en) * 2023-04-10 2023-05-09 深圳传音控股股份有限公司 Image processing method, processing apparatus, and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113382262B (en) * 2019-06-21 2022-03-08 杭州海康威视数字技术股份有限公司 Method and device for decoding and encoding prediction mode
CN111050166B (en) * 2019-12-02 2023-08-15 咪咕视讯科技有限公司 Prediction mode determination method, apparatus, and computer-readable storage medium
CN111885389B (en) * 2020-07-24 2021-08-24 腾讯科技(深圳)有限公司 Multimedia data coding method, device and storage medium
CN113852823B (en) * 2021-11-30 2022-03-01 深圳市通恒伟创科技有限公司 Image data uploading method, system and device based on Internet of things

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7627037B2 (en) * 2004-02-27 2009-12-01 Microsoft Corporation Barbell lifting for multi-layer wavelet coding
CN101945276A (en) * 2009-07-03 2011-01-12 英特尔公司 Decoder side motion estimation (me) using plural reference frames
CN103314586A (en) * 2011-01-12 2013-09-18 佳能株式会社 Video encoding and decoding with improved error resilience
CN106851306A (en) * 2011-01-12 2017-06-13 太阳专利托管公司 Dynamic image decoding method and dynamic image decoding device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100166073A1 (en) * 2008-12-31 2010-07-01 Advanced Micro Devices, Inc. Multiple-Candidate Motion Estimation With Advanced Spatial Filtering of Differential Motion Vectors
FR2948522B1 (en) * 2009-07-21 2011-07-29 Canon Kk METHOD AND DEVICE FOR ESTIMATING A MOTION VECTOR
JP5298060B2 (en) * 2010-04-02 2013-09-25 日本放送協会 Prediction vector generator, encoding device, decoding device, and program
KR101827939B1 (en) * 2011-12-13 2018-02-12 주식회사 스카이미디어테크 Method of adaptive intra prediction mode encoding and apparatus for the same, and method of decoding and apparatus for the same
CN104427345B (en) * 2013-09-11 2019-01-08 华为技术有限公司 Acquisition methods, acquisition device, Video Codec and its method of motion vector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7627037B2 (en) * 2004-02-27 2009-12-01 Microsoft Corporation Barbell lifting for multi-layer wavelet coding
CN101945276A (en) * 2009-07-03 2011-01-12 英特尔公司 Decoder side motion estimation (me) using plural reference frames
CN103314586A (en) * 2011-01-12 2013-09-18 佳能株式会社 Video encoding and decoding with improved error resilience
CN106851306A (en) * 2011-01-12 2017-06-13 太阳专利托管公司 Dynamic image decoding method and dynamic image decoding device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116095322A (en) * 2023-04-10 2023-05-09 深圳传音控股股份有限公司 Image processing method, processing apparatus, and storage medium

Also Published As

Publication number Publication date
CN109495738B (en) 2023-02-07
CN109495738A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
KR102621943B1 (en) Adaptive motion vector precision for video coding
KR102404598B1 (en) Merge candidates for motion vector prediction for video coding
RU2719296C2 (en) Determining the motion information output mode during video coding
CN112655218B (en) Inter-frame prediction method and device
WO2019120305A1 (en) Method for predicting motion information of image block , device and codec
CA2932811C (en) Adaptive motion vector resolution signaling for video coding
US20200228796A1 (en) Local illumination compensation in video coding
WO2019147826A1 (en) Advanced motion vector prediction speedups for video coding
KR20200058445A (en) Low complexity design for FRUC
TW201924343A (en) Affine prediction in video coding
KR20190054082A (en) Motion vector coding for video coding
TW201811055A (en) Intra video coding using a decoupled tree structure
TW201818720A (en) Intra video coding using a decoupled tree structure
CN109495738B (en) Coding and decoding method and device for motion information
KR101747058B1 (en) Sub-pu-level advanced residual prediction
JP7407741B2 (en) Video encoding method and device
KR102643315B1 (en) Motion vector acquisition methods, devices, computer equipment, and storage media
CN112437299B (en) Inter-frame prediction method, device and storage medium
WO2019191867A1 (en) Method and apparatus for video encoding and decoding
WO2019000443A1 (en) Inter-frame prediction method and device
RU2785725C2 (en) Device and method for external prediction
WO2020024275A1 (en) Inter-frame prediction method and device
WO2021102315A1 (en) Early termination of motion vector refinement process in video coding

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

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

Country of ref document: EP

Kind code of ref document: A1