Nothing Special   »   [go: up one dir, main page]

WO2019154424A1 - Video decoding method, video decoder, and electronic device - Google Patents

Video decoding method, video decoder, and electronic device Download PDF

Info

Publication number
WO2019154424A1
WO2019154424A1 PCT/CN2019/074822 CN2019074822W WO2019154424A1 WO 2019154424 A1 WO2019154424 A1 WO 2019154424A1 CN 2019074822 W CN2019074822 W CN 2019074822W WO 2019154424 A1 WO2019154424 A1 WO 2019154424A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion vector
image block
precision
accuracy
block
Prior art date
Application number
PCT/CN2019/074822
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 WO2019154424A1 publication Critical patent/WO2019154424A1/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/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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • 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
    • H04N19/513Processing of motion vectors
    • 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/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present application relates to the field of video codec technology, and in particular, to a video decoding method, a video decoder, and an electronic device.
  • video compression technology such as MPEG (Moving Pictures Experts Group)-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4 Part 10 advanced video codec ( Advanced video coding, AVC), ITU-T H.265 high efficiency video coding (HEVC) and the standards defined by the H.266 standard and those described in the extensions of the above standards
  • AVC Advanced video coding
  • HEVC high efficiency video coding
  • devices Efficient transmission and reception of digital video information can be achieved.
  • an image of a video sequence is divided into image blocks for encoding or decoding.
  • image block based spatial prediction in order to reduce or remove redundant information in a video sequence, image block based spatial prediction (intra prediction) and/or temporal prediction (inter prediction) are introduced.
  • the inter-frame prediction technique can be used as a reference frame of the current frame as a reference frame of the current frame, and a matching reference block is found for the current image block in the current image, and the pixel value of the pixel in the reference block is used as the current image block.
  • a predicted value of a pixel value of a sample pixel, and acquiring motion information of the current image block the motion information may include, for example, indication information of the image in which the reference block is located (ie, reference image information) and a current image block to the reference block Position offset information (ie motion vector MV).
  • An image may be referred to as a frame, and a reference image may be referred to as a reference frame.
  • motion information of neighboring locations may be used to predict motion information for the current location.
  • the motion vector in the motion information is differentially encoded and divided into two parts: Motion Vector Prediction (MVP) and Motion Vector Difference (MVD).
  • MVP Motion Vector Prediction
  • MVD Motion Vector Difference
  • the motion vector predictor may be derived from the motion vector of the temporal and/or spatial neighboring locations, and the motion vector predictor is not encoded or encoded directly into the codestream, and the transmitted MVD information may be encoded in the codestream.
  • the decoding end extracts the MVD information in the code stream, and derives the motion vector prediction value, and calculates the sum of the motion vector prediction value and the MVD to obtain the final MV. The closer the derived motion vector predictor is to the final MV, the smaller the MVD information that needs to be transmitted.
  • the embodiments of the present application provide a video decoding method, a video decoder, and corresponding electronic devices to improve motion vector prediction accuracy, thereby improving codec performance.
  • an embodiment of the present application provides a video decoding method, where the method includes: receiving a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block; and parsing out from the code stream.
  • the motion vector difference MVD information acquiring a motion vector predictor MVP of the current decoded image block; when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy (eg, When the motion vector predictor is included in the target motion vector set, determining, according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, the target motion vector accuracy corresponding to the target motion vector set is the motion vector predictor Having a motion vector accuracy), based on the motion vector predictor, the motion vector difference information, and the target motion vector accuracy, obtaining a motion vector of the current decoded image block, wherein the current decoded image block
  • the motion vector has the target motion vector precision, and the target motion vector set is a plurality of motion vector sets
  • One of the target motion vector precisions is one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion a vector set
  • the current image block (abbreviated as the current block) herein can be understood as the image block currently being processed.
  • the current image block or the current encoded image block refers to an encoding block currently being encoded; in the decoding process, the current image block or the currently decoded image block refers to a decoding block currently being decoded (decoding block). .
  • the block that provides the prediction for the current image block is referred to as a prediction block.
  • the pixel value or sampled value or sampled signal within the prediction block is called a prediction signal.
  • execution body of the method of the embodiment of the present application may be a video decoder or an electronic device having a video decoding function.
  • the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained.
  • the adaptive motion vector accuracy for the currently decoded image block can be adaptively determined. If the number of motion vector sets is N, the video decoder can support M kinds of motion vector precision, where M is less than or equal to N, M and N are A positive integer improves the motion vector prediction accuracy.
  • the embodiment of the present invention can adaptively select motion vector precision, one or more image blocks corresponding to some video content are used with higher pixel precision (for example, 1 /8 pixel precision) motion vectors improve video codec quality relative to motion vectors using lower pixel precision, and the benefits are better than interpolation overhead, such as based on high pixel precision (eg 1/8 pixel)
  • the motion vector obtained by the motion vector is closer to the original block of the currently decoded image block, even if the fractional pixel bit is interpolated
  • the placement results in some interpolation overhead; for one or more image blocks corresponding to certain video content, using lower pixel precision motion vectors (eg integer pixel precision) versus motion vectors using higher pixel precision, neither The video coding and decoding quality is reduced, and the interpolation overhead cost is also avoided. Therefore, the video decoding method of the embodiment of the present application improves the codec performance as a whole.
  • the motion vector predictor when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy, based on the motion vector predictor, The motion vector difference (MVD) information and the target motion vector accuracy are obtained, and the motion vector of the current image block to be decoded is obtained, including:
  • Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has the motion vector accuracy;
  • the value MVD has the same motion vector precision (that is, both have the target motion vector precision); or,
  • the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets.
  • a plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
  • the motion vector predictor value of the current decoded image block is determined according to multiple Corresponding relationship between the motion vector set and various motion vector precisions, adaptively deriving the target motion vector precision, and scaling (for example, amplifying) the parsed MVD information according to the adaptively derived target motion vector precision, And recovering the parsed motion vector difference information into video encoding end scaling (eg, reducing) motion vector difference information before processing, thereby ensuring accuracy of motion vector difference scaling, and scaling the processed MVD information relative to the original
  • the MVD information occupies less bit overhead or the same bit overhead, thereby improving codec performance.
  • the first neighboring block corresponding to the motion vector predictor in the first motion vector set has a first distance from the current image block different from the second a second distance between the second neighboring block and the current image block corresponding to the motion vector predictor in the motion vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and/ Or in a time domain adjacent to the block.
  • the first neighboring block herein refers to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the first motion vector set. As shown in Table-7A, the first neighboring block may refer to the airspace.
  • the neighboring blocks A1 and B1; and the second neighboring block herein generally refer to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the second motion vector set, as shown in Table-7A, the second neighboring block It can refer to the airspace adjacent blocks A0 and B0.
  • the first distance herein is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image block.
  • the distance of the center point pixel position; the second distance is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the center point pixel position of the second neighboring block relative to the current.
  • the spatial neighboring block herein may include one or more spatial neighboring blocks adjacent to the current image block in the image of the current image block.
  • time domain neighboring block herein may include one or more airspace neighboring blocks in the reference image adjacent to the co-located block, and/or one of the collocated blocks or a plurality of sub-blocks, wherein the collocated block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the second motion vector set and the current decoded image block, and the first motion vector precision corresponding to the first motion vector set (eg, 1/8 pixel precision) Higher than the second motion vector accuracy corresponding to the second motion vector set (eg, 1/4 pixel precision); or,
  • the first motion vector precision corresponding to the first motion vector set (eg, 1/4 pixel precision) is lower than the second motion vector accuracy corresponding to the second motion vector set (eg 1/8 pixel accuracy).
  • the distance between the neighboring block corresponding to a certain motion vector predictor and the current image block is equal to the neighboring block and the current image block corresponding to the predicted value of the other motion vector. In the case of the distance, it is common to group the two motion vector predictors into the same motion vector set.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current image block and the magnitude of the motion vector precision.
  • the motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current decoded image block, the higher the motion vector accuracy; the neighboring block corresponding to the motion vector predictor and the currently decoded image block The farther the distance is, the lower the motion vector accuracy.
  • the neighboring blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the currently decoded image block.
  • the code stream further carries a motion vector accuracy parameter, the motion vector accuracy parameter being used to indicate a value of the plurality of motion vector precisions, the motion
  • the vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS, a stripe slice header, or some other hierarchical position of the currently decoded image block.
  • the various motion vector precisions herein may be greater than or equal to the three motion vector precisions.
  • the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a CTU And one or more of the CUs.
  • the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number
  • the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a CTU And one or more of the
  • the video decoder is configured to set the multiple motion vector set and the multiple motion vectors according to the motion vector precision parameter and the motion vector precision assignment rule parsed from the code stream.
  • the correspondence of precision thereby facilitating the video decoder to adaptively determine the target motion vector accuracy for decoding the image block (eg, integer pixel precision or 1/2 pixel precision or 1/4 pixel precision or 1/8 pixel precision or 4 Pixel accuracy, etc.).
  • the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; for example, The first identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block; or
  • the code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector accuracy, and the second identifier is used to indicate a third motion vector set; for example, the first identifier and the first identifier
  • the second identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block;
  • the third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
  • the decoding method of the embodiment of the present invention can adaptively determine the motion vector accuracy for the currently decoded image block, and by targeting the important motion vector.
  • the set delivery flag indicates the specific motion vector accuracy and also improves the encoding and decoding efficiency.
  • the code stream further carries a third identifier (eg, a candidate predicted motion vector index), the third identifier is used to indicate a candidate for the currently decoded image block a motion vector predictor MVP (eg, the candidate predicted motion vector index may indicate a location of the candidate motion vector predictor selected in the candidate motion vector prediction list); accordingly, the acquiring the motion of the current image block to be decoded
  • the vector predictor value MVP includes: determining, according to the third identifier, a candidate motion vector predictor MVP of the current image block to be decoded from a motion vector prediction candidate list; or
  • the acquiring the motion vector predictor MVP of the current image block to be decoded includes: acquiring a motion vector predictor MVP of the current image block to be decoded by using a bidirectional matching method or a template matching method.
  • the video decoding method in the embodiment of the present application is applicable not only to the candidate motion vector predictor list in the advanced motion vector prediction mode (AMVP), but also to the spatial neighboring block in other modes. And/or a list of candidate motion vector predictors constructed by motion vectors of temporally neighboring blocks, thereby improving codec performance.
  • the video decoding method of the embodiment of the present invention can support multiple methods for acquiring motion vector predictors, thereby improving the flexibility of the video decoding method.
  • a second aspect of the present application provides a video decoder, including: an entropy decoding module, configured to receive a code stream, where the code stream carries motion vector difference (MVD) information of an image block to be currently decoded, and from the The motion vector difference information of the current image block to be decoded is parsed in the code stream; the inter prediction module is configured to acquire a motion vector predictor (MVP) of the current image block to be decoded; when the motion vector predictor When the target motion vector set corresponding to the target motion vector accuracy is included, the motion vector of the current decoded image block is obtained based on the motion vector predictor, the motion vector difference information, and the target motion vector precision, The motion vector of the currently decoded image block has the target motion vector precision, and the target motion vector set is one of a plurality of motion vector sets, and the target motion vector precision includes a first motion vector accuracy and a first One of a plurality of motion vector precisions of motion vector accuracy, the plurality of motion vector sets including a first motion vector
  • the inter prediction module when the motion vector predictor is included in a target motion vector set corresponding to the target motion vector accuracy, based on the motion vector predictor, And the motion vector difference information and the target motion vector precision, to obtain an aspect of the motion vector of the current decoded image block, where the inter prediction module is specifically configured to:
  • Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has the motion vector accuracy;
  • the difference MVD has the same motion vector precision (that is, both have the target motion vector precision); or,
  • the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets.
  • a plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
  • the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is different from the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block And / or time domain neighboring blocks.
  • the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, and the first motion vector corresponding to the first motion vector set is higher in precision than the second motion vector Set the corresponding second motion vector precision;
  • the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set
  • the second motion distance of the first motion vector set is lower than the second motion vector precision corresponding to the second motion vector set.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is configured to represent a relationship between a distance between a neighboring block corresponding to a motion vector predictor included in the motion vector set and a current image block and a magnitude of a motion vector precision, that is, the motion The farther the distance between the neighboring block corresponding to the motion vector predictor included in the vector set and the current decoded image block is, the lower the motion vector accuracy is; the neighboring block corresponding to the motion vector predictor included in the motion vector set is The closer the distance between the currently decoded image blocks, the higher the motion vector accuracy.
  • the code stream further carries a motion vector accuracy parameter, the motion vector accuracy parameter being used to indicate a value of the plurality of motion vector precisions, the motion
  • the vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS or a slice header of the decoded image block;
  • the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
  • the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a decoding.
  • the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a decoding.
  • the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
  • the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set;
  • the code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
  • the third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy;
  • the entropy decoding module is further configured to parse the first identifier from the code stream, or decode the first identifier and the second identifier.
  • the code stream further carries a third identifier for indicating a candidate motion vector predictor of the currently decoded image block, the entropy decoding module further for the slave code Parsing the third identifier in the stream;
  • the inter prediction module is specifically configured to:
  • the embodiment of the present application further provides a video encoding method, a video encoder, and a corresponding electronic device to improve motion vector prediction accuracy, thereby improving encoding performance.
  • a third aspect of the present application provides a video encoding method, the method comprising: performing a motion estimation process on a current coded image block to obtain a motion vector of a current coded image block; and acquiring a motion vector predictor value of the current coded image block.
  • the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy (eg, when the motion vector predictor is included in the target motion vector set, according to the plurality of motion vector sets and Corresponding relationship of motion vector accuracy, determining that the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a corresponding motion vector, based on the motion vector of the current image block to be encoded, Obtaining, by the motion vector predictor and the target motion vector, a motion vector difference (MVD) information of the current coded image block; wherein the motion vector difference (MVD) of the current coded image block has a target motion Vector accuracy, the target motion vector set is one of a plurality of motion vector sets,
  • the target motion vector accuracy is one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion vector set, At least one of the first motion vector set and the
  • the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs may be Adaptively determining the appropriate motion vector accuracy for the current coded image block. If the number of motion vector sets is N, the video coding method can support M motion vector MV precision, where M is less than or equal to N, M and N are A positive integer, such as M, N is greater than or equal to 3, improves motion vector prediction accuracy.
  • the embodiment of the present invention can adaptively select motion vector accuracy, for one or more image blocks corresponding to certain video content, Using motion vectors with higher pixel precision (eg 1/8 pixel precision) versus motion vectors using lower pixel precision improves video codec quality and benefits are better than interpolation overhead, eg based on A prediction block obtained with a motion vector having high pixel precision (for example, 1/8 pixel precision) is closer to the original of the currently coded image block.
  • the video coding method of the embodiment of the present invention improves the codec performance as a whole, and the video coding method of the embodiment of the present application improves the coding and decoding performance as a whole.
  • the motion vector predictor when the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy, based on the current image block to be encoded
  • the motion vector, the motion vector predictor, and the target motion vector precision obtain motion vector difference (MVD) information of the current image block to be encoded, including:
  • target Motion vector precision e.g., an index of the target motion vector accuracy
  • the video encoder can adaptively select the target motion vector precision to encode the MVD.
  • the information for example, the reduced motion vector difference value occupies a smaller number of bits or the same number of bits with respect to the original motion vector difference, and the bit transmission overhead can be reduced for the former, thereby improving the codec performance as a whole.
  • the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second a second distance between the first two neighboring blocks and the current image block corresponding to the motion vector predictor in the motion vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and / or time domain adjacent blocks.
  • the first neighboring block herein refers to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the first motion vector set, as shown in Table-3, the first neighboring block may refer to the airspace.
  • the neighboring blocks A1 and B1; and the second neighboring block herein generally refer to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the second motion vector set, as shown in Table-7A, the second neighboring block It can refer to the airspace adjacent blocks A0 and B0.
  • the first motion vector corresponding to the first motion vector set is higher than the second motion vector set Second motion vector accuracy;
  • first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current coded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set
  • a second motion distance of the first motion vector set is lower than a second motion vector precision corresponding to the second motion vector set.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector precision assignment rule; wherein the motion vector accuracy
  • the assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current image block and the magnitude of the motion vector precision.
  • the motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current coded image block, the higher the motion vector accuracy; the neighboring block corresponding to the motion vector predictor and the current coded image block The farther the distance is, the lower the motion vector accuracy.
  • the neighboring blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the currently coded image block.
  • the method further comprises:
  • the motion vector precision parameter is used to indicate a value of the plurality of motion vector precisions, and the motion vector precision parameter carries a sequence parameter set and an image parameter of the coded image block Set any of PPS or strip head.
  • the method further comprises:
  • the motion vector precision parameter is used to indicate a motion vector accuracy number (eg, pps_amvr_number) for the current encoding processing unit and at least two corresponding to the motion vector precision number a motion vector precision value (for example, pps_amvr_set[pps_amvr_number]), wherein the current encoding processing unit includes a video sequence, an image, a slice slice, a region partition, a Coding Tree Unit (CTU), and a coding unit (CU) One or more of them.
  • a motion vector accuracy number eg, pps_amvr_number
  • a motion vector precision value for example, pps_amvr_set[pps_amvr_number]
  • the method further comprises:
  • the first identifier is used to indicate a third motion vector precision
  • the second identifier is used to indicate a third motion vector set
  • the third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
  • the video coding method in the embodiment of the present application only signals the motion vector precision of the important motion vector set, which can further save bit overhead and improve the codec performance of the video image.
  • the acquiring the motion vector predictor of the current image block to be encoded includes: determining, according to the rate distortion cost criterion, from a candidate motion vector prediction list (candidate MVP list) a candidate motion vector predictor MVP for the current image block to be encoded, for example, the candidate motion vector predictor MVP encoding the current coded image block has a minimum rate distortion cost;
  • the entropy encoding the motion vector difference MVD of the current image block to be encoded into the code stream includes:
  • the candidate predicted motion vector index may indicate the location of the candidate motion vector predictor selected in the candidate motion vector prediction list).
  • the video coding method in the embodiment of the present application is applicable not only to the candidate motion vector predictor list in the advanced motion vector prediction (AMVP) but also to the spatial neighboring block in other modes. And/or a list of candidate motion vector predictors constructed by motion vectors of temporally neighboring blocks, thereby improving codec performance.
  • AMVP advanced motion vector prediction
  • a fourth aspect of the present application provides a video encoder, including: an inter prediction module, configured to perform a motion estimation process on a current coded image block to obtain a motion vector of a current coded image block; and acquire the current coded image block a motion vector predictor; the inter prediction module is further configured to: when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy (eg, when the motion vector predictor is included in Determining, according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a target motion vector set Obtaining motion vector difference (MVD) information of the current coded image block based on the motion vector of the current coded image block, the motion vector predictor, and the target motion vector accuracy; wherein the current code A motion vector difference (MVD) of an image block has a target motion vector precision, the target motion vector set And being one of a plurality
  • the current coded image block is obtained based on the motion vector of the current coded image block, the motion vector predictor, and the target motion vector accuracy
  • An aspect of motion vector difference (MVD) information is specifically configured to:
  • the value has a corresponding/corresponding motion vector accuracy; calculating a difference MVD between the motion vector of the current coded image block and the motion vector predictor, the motion vector of the current coded image block, the motion vector predictor, and the MVD has target motion vector accuracy; or,
  • the target Motion vector accuracy e.g., an index value based on the target motion vector accuracy
  • the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second a second distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the motion vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and/or Or in a time domain adjacent to the block.
  • the first motion vector corresponding to the first motion vector set is higher than the second motion vector set Second motion vector accuracy
  • first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current coded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set
  • a second motion distance of the first motion vector set is lower than a second motion vector precision corresponding to the second motion vector set.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule; wherein the motion vector accuracy
  • the assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current image block and the magnitude of the motion vector precision.
  • the motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current coded image block, the higher the motion vector accuracy; the neighboring block corresponding to the motion vector predictor and the current coded image block The farther the distance is, the lower the motion vector accuracy.
  • the neighboring blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the currently coded image block.
  • the entropy encoding module is further configured to: entropy encode a motion vector precision parameter into a code stream, where the motion vector precision parameter is used to indicate the multiple motions A value of vector precision, the motion vector accuracy parameter being carried in any one of a sequence parameter set, an image parameter set PPS, or a slice header of the coded image block.
  • the entropy encoding module is further configured to: entropy encode a motion vector precision parameter into a code stream, where the motion vector precision parameter is used to indicate that the current encoding process is used a number of motion vector precisions of the unit (eg, pps_amvr_number) and at least two motion vector precision values (eg, pps_amvr_set[pps_amvr_number]) corresponding to the number of motion vector precisions, wherein the current encoding processing unit includes a video sequence, an image, One or more of a stripe, a region partition, a Coding Tree Unit (CTU), and a coding unit (CU).
  • the motion vector precision parameter is used to indicate that the current encoding process is used a number of motion vector precisions of the unit (eg, pps_amvr_number) and at least two motion vector precision values (eg, pps_amvr_set[pps_amvr_number]) corresponding to the
  • the entropy encoding module is further configured to:
  • the first identifier is used to indicate a third motion vector precision
  • the second identifier is used to indicate a third motion vector set
  • the third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
  • the inter prediction module is specifically configured to: select a candidate motion vector according to a rate distortion cost criterion. Determining a candidate motion vector predictor MVP for the current image block to be encoded in a candidate MVP list, for example, the candidate motion vector predictor MVP encoding the current coded image block has a minimum rate distortion cost;
  • the entropy encoding module is further configured to encode a third identity entropy (eg, a candidate prediction motion vector index) into the code stream, where the third identifier is used to indicate a candidate motion vector predictor (MVP) of the currently coded image block (eg,
  • MVP candidate motion vector predictor
  • the candidate predicted motion vector index may indicate the location of the candidate motion vector predictor selected in the candidate motion vector prediction list.
  • a fifth aspect of the present application provides a video decoding method, including: receiving a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block and a candidate motion vector predictor for indicating a currently decoded image block.
  • the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector accuracy (for example, when the motion vector predictor is included in the target motion vector set, according to the plurality of motion vector sets and Corresponding relationship of motion vector accuracy, determining that the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a corresponding motion vector accuracy, based on the candidate motion vector predictor value MVP, Motion vector difference MVD information and the target motion vector precision, to obtain a motion vector of the currently decoded image block
  • the motion vector of the currently decoded image block has the target motion vector precision, and the target motion vector set is one of a plurality of motion vector sets, and the target motion vector precision includes a first motion vector accuracy and a first One of a plurality
  • the target motion vector set is, for example, a subset of a plurality of motion vector predictors used to construct a candidate motion vector predictor list.
  • the plurality of motion vector sets are a plurality of subsets of the plurality of motion vector predictors used to construct the candidate motion vector predictor list, and the motion vector predictors included in the different motion vector sets are different from each other.
  • execution body of the method of the embodiment of the present application may be a video decoder or an electronic device having a video decoding function.
  • the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained.
  • the adaptive motion vector accuracy for the currently decoded image block can be adaptively determined. If the number of motion vector sets is N, the video decoder can support M motion vector MV precision, where M is less than or equal to N, M, and N. All of them are positive integers, which improves the motion vector prediction accuracy.
  • the embodiment of the present invention can adaptively select motion vector precision, one or more image blocks corresponding to some video content are used with higher pixel precision ( Motion vectors such as 1/8 pixel precision, relative to motion vectors using lower pixel precision, improve video codec quality, and the benefits are better than interpolation overhead, for example, based on high pixel precision (eg 1 /8 pixel precision)
  • the motion vector obtained by the motion vector is closer to the original block of the currently decoded image block, even if the interpolation is The number of pixel locations results in some interpolation overhead; for one or more image blocks corresponding to certain video content, motion vectors with lower pixel precision (eg integer pixel precision) versus motion vectors using higher pixel precision,
  • the video decoding method of the embodiment of the present application improves the codec performance as a whole.
  • the candidate motion vector predictor MVP when the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector accuracy, based on the candidate motion vector predictor value MVP And the motion vector difference (MVD) information and the target motion vector precision, and the motion vector of the current image block to be decoded is obtained, including:
  • the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets.
  • a plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
  • the video decoder determines the current corresponding index in the candidate motion vector predictor list. After decoding the candidate motion vector predictor MVP of the image block, adaptively deriving the target motion vector precision of the MVD information according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, according to the adaptive derivation
  • the target motion vector precision scales (eg, amplifies) the parsed MVD information to restore the parsed scaled motion vector difference information to a motion vector before the video encoding end is scaled (eg, reduced)
  • the difference information ensures the accuracy of the motion vector difference scaling, and the scaled MVD information occupies less bit overhead or the same bit overhead relative to the original MVD information, thereby improving the codec performance.
  • the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is different from the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block And / or time domain neighboring blocks.
  • the first distance herein is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image block.
  • the distance of the center point pixel position; the second distance is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the center point pixel position of the second neighboring block relative to the current.
  • the spatial neighboring block herein may include one or more spatial neighboring blocks adjacent to the current image block in the image of the currently decoded image block.
  • time domain neighboring block herein may include one or more airspace neighboring blocks in the reference image adjacent to the co-located block, and/or one of the collocated blocks or a plurality of sub-blocks, wherein the collocated block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the second motion vector set and the current decoded image block, and the first motion vector precision corresponding to the first motion vector set (eg, 1/8 pixel precision) Higher than the second motion vector accuracy corresponding to the second motion vector set (eg, 1/4 pixel precision); or,
  • the first motion vector precision corresponding to the first motion vector set (eg, 1/4 pixel precision) is lower than the second motion vector accuracy corresponding to the second motion vector set (eg 1/8 pixel accuracy).
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the currently decoded image block and the magnitude of the motion vector precision.
  • the motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current image block, the higher the motion vector accuracy; the distance between the neighboring block corresponding to the motion vector predictor and the current image block The farther away, the lower the motion vector accuracy.
  • adjacent blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the current image block.
  • the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, the motion
  • the vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS, a stripe slice header, or some other hierarchical position of the decoded image block.
  • the various motion vector precisions herein may be greater than or equal to the three motion vector precisions.
  • the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and an encoding.
  • a Coding Tree Unit CTU
  • CU coding unit
  • the video decoder is configured to set the multiple motion vector set and the multiple motion vectors according to the motion vector precision parameter and the motion vector precision assignment rule parsed from the code stream.
  • the correspondence of precision thereby facilitating the video decoder to adaptively determine the target motion vector accuracy for decoding the image block (eg, integer pixel precision or 1/2 pixel precision or 1/4 pixel precision or 1/8 pixel precision or 4 Pixel accuracy, etc.).
  • the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector accuracy corresponding to the third motion vector set; for example, The first identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block; or
  • the code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector accuracy, and the second identifier is used to indicate a third motion vector set; for example, the first identifier and the first identifier
  • the second identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block;
  • the third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
  • the decoding method of the embodiment of the present invention can adaptively determine the motion vector accuracy for the currently decoded image block, and by targeting the important motion vector.
  • the set delivery flag indicates the specific motion vector accuracy and also improves the encoding and decoding efficiency.
  • a sixth aspect of the present application provides a video decoder, including: an entropy decoding module, configured to receive a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block and is used to indicate a current decoded image block.
  • An index of the candidate motion vector predictor MVP, the MVD information and the index are parsed from the code stream; an inter prediction module, configured to determine from the candidate motion vector predictor list based on the index a candidate motion vector predictor MVP (also referred to as a best candidate motion vector predictor MVP) of the currently decoded image block; when the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector precision (for example, when the candidate motion vector predictor is included in the target motion vector set, determining the target motion vector accuracy corresponding to the target motion vector set according to the correspondence between the multiple motion vector sets and the plurality of motion vector precisions Determining a corresponding motion vector predictor having a corresponding motion vector accuracy, based on the candidate motion vector predictor MVP, the motion And a motion vector of the current decoded image block, where the motion vector of the current decoded image block has the target motion vector precision, and the target motion vector set is One of a plurality of sets of motion vectors, the target motion vector accuracy being one of
  • the candidate motion vector is based on the candidate motion vector when the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector accuracy Observing the value MVP, the motion vector difference information, and the target motion vector accuracy, to obtain an aspect of the motion vector of the current decoded image block, where the inter prediction module is specifically configured to:
  • the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets.
  • a plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
  • the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is different from the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block And / or time domain neighboring blocks.
  • the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, and the first motion vector corresponding to the first motion vector set is higher in precision than the second motion vector Set the corresponding second motion vector precision;
  • the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set
  • the second motion distance of the first motion vector set is lower than the second motion vector precision corresponding to the second motion vector set.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  • the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the currently decoded image block and the magnitude of the motion vector precision.
  • the motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current image block, the higher the motion vector accuracy; the distance between the neighboring block corresponding to the motion vector predictor and the current image block The farther away, the lower the motion vector accuracy.
  • adjacent blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the current image block.
  • the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, the motion
  • the vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS or a slice header of the decoded image block;
  • the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
  • the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a decoding.
  • a Coding Tree Unit CTU
  • CU coding unit
  • the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
  • the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set;
  • the code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
  • the third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy;
  • the entropy decoding module is further configured to parse the first identifier from the code stream, or decode the first identifier and the second identifier.
  • a seventh aspect of the present application provides a video decoding apparatus, the apparatus comprising: a processor and a memory coupled to the processor; the processor for performing the first, fifth aspects or various implementations thereof The method in .
  • An eighth aspect of the present application provides a video encoding apparatus, the apparatus comprising: a processor and a memory coupled to the processor; the processor for performing the third aspect or various implementations thereof method.
  • a ninth aspect of the present application provides a video decoding apparatus including a nonvolatile storage medium, and a processor, the nonvolatile storage medium storing an executable program, the processor and the nonvolatile The storage mediums are coupled to one another and execute the executable program to implement the methods of the first, fifth, or various implementations thereof.
  • a tenth aspect of the present application provides a video encoding apparatus including a nonvolatile storage medium, and a processor, the nonvolatile storage medium storing an executable program, the processor and the nonvolatile The storage mediums are coupled to each other and the executable program is executed to implement the methods of the third aspect or various implementations thereof.
  • An eleventh aspect of the present application provides a computer readable storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the first or third or fifth aspects described above or Methods in various implementations.
  • a twelfth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first or third or fifth aspects or the various implementations thereof.
  • a thirteenth aspect of the present application provides an electronic device comprising the video decoder described in the second aspect, the sixth aspect, or the various implementations thereof, or the video coding described in the fourth aspect or various implementation manners thereof Device.
  • 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.
  • 4A is a schematic diagram of an integer pixel position and a fractional pixel position in an embodiment of the present application
  • 4B is a schematic diagram of another integer pixel position and a fractional pixel position in the embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a video encoding method according to an embodiment of the present application.
  • FIG. 6A is a schematic diagram of constructing an AMVP candidate MVP list according to an embodiment of the present application.
  • FIG. 6B is another schematic diagram of constructing an AMVP candidate MVP list according to an embodiment of the present application.
  • 6C is a schematic diagram showing a syntax structure of an image parameter set PPS output by a video encoder according to an embodiment of the present application
  • 6D is a schematic diagram of another syntax structure of an image parameter set PPS output by a video encoder according to an embodiment of the present application.
  • 6E is a schematic diagram of still another syntax structure of an image parameter set PPS output by a video encoder according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a video decoding method according to an embodiment of the present application.
  • DMVD decoding end motion vector derivation
  • DMVD decoding end motion vector derivation
  • FIG. 10 is a schematic flowchart of step 705 in a video decoding method according to an embodiment of the present application.
  • FIG. 11 is a schematic block diagram of another encoding device or decoding device according to an embodiment of the present application.
  • FIG. 12 is a schematic block diagram of an electronic device according to an embodiment of the present application.
  • An encoded video stream, or a portion thereof, such as a video frame or image block may use temporal and spatial similarities in the video stream to improve encoding performance.
  • the current image block of the video stream can predict the motion information for the current image block based on the previously encoded block in the video stream and identify the difference between the prediction block and the current image block (ie, the original block) (also known as the original block). Is the residual), thereby encoding the current image block based on the previously encoded block.
  • the residuals and some parameters used to generate the current image block are included in the digital video output bitstream, rather than including the entirety of the current image block in the digital video output bitstream. This technique can be called inter prediction.
  • a motion vector is an important parameter in the inter prediction process that represents the spatial displacement of a previously coded block relative to the current coded block.
  • Motion estimation methods such as motion search, can be used to obtain motion vectors.
  • bits i.e., bits
  • bits representing motion vectors are included in the encoded code stream to allow the decoder to reproduce the prediction block, thereby obtaining a reconstructed block.
  • a motion vector predictor also referred to as a reference motion vector
  • the motion vector predictor may be selected from previously used motion vectors, and selecting the previously used motion vector to encode the current motion vector may further reduce the bit overhead included in the encoded video bitstream.
  • the embodiment of the present application describes adaptively selecting the motion vector precision for encoding the image block and using A technical solution for determining a motion vector accuracy selected by the video encoder for the image block by a video decoder.
  • the video decoder may derive the motion vector accuracy selected by the video encoder for the current image block without receiving a syntax element indicating motion vector accuracy.
  • a video encoder may signal, in a code stream, motion vector accuracy selected by a video encoder for a certain set of motion vectors (e.g., an important set of motion vectors).
  • a certain set of motion vectors e.g., an important set of motion vectors.
  • an adaptive selection between integer pixel precision and different levels of fractional pixel precision may be employed.
  • the integer pixel precision, the four-pixel precision, the half-pixel precision, the quarter-pixel precision, or the eighth-pixel precision of the motion vector used for encoding the image block may be Adapt to the choice.
  • an eighth pixel in the embodiment of the present application refers to an accuracy of one eighth (1/8) of a pixel, for example, one of the following: an integer pixel position (0/8), a pixel One-eighth (1/8), two-eighths of a pixel (2/8, also known as a quarter of a pixel), three-eighths of a pixel (3/8), and an eighth of a pixel Four (4/8, also known as one-half of a pixel and two-quarters of a pixel), five-fifths of a pixel (5/8), and six-eighths of a pixel (6/8, also known as Three-quarters of the pixels, or seven-eighths of the pixels (7/8).
  • FIG. 1 is a schematic block diagram of a video encoding and decoding system 10 in an embodiment of the present application.
  • Video encoder 20 in system 10 is operative to adaptively select target motion vector precision for encoding image blocks in accordance with various method examples of video encoding processes proposed herein (eg, integer pixel precision or 1/2 pixel precision or 1/ 4 pixel precision or 1/8 pixel precision or 4 pixel precision, etc.).
  • the video decoder 30 in the system 10 is configured to determine motion vector precision for encoding image blocks selected by the video encoder for the image block according to various method examples of the video decoding process proposed by the present application, thereby improving motion vector prediction accuracy, and further Improve codec performance.
  • system 10 includes source device 12 and destination device 14, which produces encoded video data that will be decoded by destination device 14 at a later time.
  • Source device 12 and destination device 14 may comprise any of a wide range of devices, including desktop computers, notebook computers, tablet computers, set top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” "Touchpads, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices or the like.
  • Communication link 16 may include any type of media or device capable of moving encoded video data from source device 12 to destination device 14.
  • communication link 16 may include communication media that enables source device 12 to transmit encoded video data directly to destination device 14 in real time.
  • the encoded video data can be modulated and transmitted to destination device 14 in accordance with a communication standard (e.g., a wireless communication protocol).
  • Communication media can include any wireless or wired communication medium, such as a radio frequency spectrum or one or more physical transmission lines.
  • the communication medium can form part of a packet-based network (eg, a global network of local area networks, wide area networks, or the Internet).
  • Communication media can include routers, switches, base stations, or any other equipment that can be used to facilitate communication from source device 12 to destination device 14.
  • the encoded data may be output from the output interface 22 to a storage device (not shown).
  • 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 (e.g., a Wi-Fi connection), a wired connection (e.g., 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 is used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
  • source device 12 includes video source 18, video encoder 20, and output interface 22.
  • video encoder 20 of source device 12 is operative to support adaptive selection of techniques for encoding motion vector resolution (also referred to as motion vector accuracy or pixel precision) of an image block.
  • output interface 22 may include a modulator/demodulator (modem) and/or a transmitter.
  • video source 18 may include sources such as video capture devices (eg, cameras), video archives containing previously captured video, video feed interfaces to receive video from video content providers. And/or a computer graphics system for generating computer graphics data as source video, or a combination of these sources.
  • the source device 12 and the destination device 14 may form a so-called camera phone or video phone.
  • the techniques described in this application are illustratively applicable to video decoding and are applicable to wireless and/or wired applications.
  • Captured, pre-captured, or computer generated video may be encoded by video encoder 20.
  • the encoded video data can be transmitted directly to the destination device 14 via the output interface 22 of the source device 12.
  • the encoded video data may also (or alternatively) be stored on a storage device (not shown) for later access by the destination device 14 or other device for decoding and/or playback.
  • Destination device 14 includes an input interface 28, a video decoder 30, and a display device 32.
  • input interface 28 can include a receiver and/or a modem.
  • the input interface 28 of the destination device 14 receives the encoded video data via the communication link 16.
  • the encoded video data communicated or provided on the storage device via communication link 16 may include various syntax elements generated by video encoder 20 for use by video decoder 30 to decode the video data (see Figures 6C-6E, below) Detailed introduction). 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-T H.263.
  • video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder and may include a suitable multiplexer-demultiplexer (MUX-DEMUX) unit or other hardware and software to handle the encoding of both audio and video in a common data stream or in a separate data stream.
  • MUX-DEMUX multiplexer-demultiplexer
  • the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
  • UDP User Datagram Protocol
  • Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, software, hardware, firmware, or any combination thereof.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGA Field Programmable Gate Array
  • the apparatus may store the instructions of the software in a suitable non-transitory computer readable medium and execute the instructions in hardware using one or more processors to perform the techniques of the present application.
  • Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, any of which may be integrated into a combined encoder/decoder (CODEC) in a respective device. part.
  • CDEC combined encoder/decoder
  • the present application may illustratively involve video encoder 20 "signaling" particular information to another device, such as video decoder 30.
  • video encoder 20 may signal information by associating particular syntax elements with various encoded portions of the video data. That is, video encoder 20 may "signal" the data by storing the particular syntax elements to the header information of the various encoded portions of the video data.
  • these syntax elements may be encoded and stored (eg, stored to a storage system or file server) prior to being received and decoded by video decoder 30.
  • the term “signaling” may illustratively refer to the communication of grammar or other data used to decode compressed video data, whether this communication occurs in real time or near real time or occurs over a time span, such as may be encoded Occurs when a syntax element is stored to the media, and the syntax element can then be retrieved by the decoding device at any time after storage to the media.
  • H.265 JCT-VC developed the H.265 (HEVC) standard.
  • HEVC standardization is based on an evolution model of a video decoding device called the HEVC Test Model (HM).
  • HM HEVC Test Model
  • the latest standard documentation for H.265 is available at http://www.itu.int/rec/T-REC-H.265.
  • the latest version of the standard document is H.265 (12/16), which is the full text of the standard document.
  • the manner of reference is incorporated herein.
  • the HM assumes that the video decoding device has several additional capabilities with respect to existing algorithms of ITU-TH.264/AVC. For example, H.264 provides nine intra-prediction coding modes, while HM provides up to 35 intra-prediction coding modes.
  • HM can divide a video frame or image into a sequence of treeblocks or largest coding units (LCUs) containing both luminance and chrominance samples, also referred to as CTUs.
  • Treeblocks have similar purposes to macroblocks of the H.264 standard.
  • a stripe contains several consecutive treeblocks in decoding order.
  • a video frame or image can be segmented into one or more stripes.
  • Each tree block can be split into coding units according to a quadtree. For example, a tree block that is the root node of a quadtree can be split into four child nodes, and each child node can be a parent node again and split into four other child nodes.
  • the final non-splitable child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded image 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.
  • a 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-square.
  • the HEVC standard allows for transforms based on TUs, which can be different for different CUs.
  • the TU is typically sized based on the size of the PU within a given CU defined for the partitioned LCU, although this may not always be the case.
  • the size of the TU is usually the same as or smaller than the PU.
  • the residual samples corresponding to the CU may be subdivided into smaller units using a quadtree structure called a "residual qualtree" (RQT).
  • RQT residual qualtree
  • the leaf node of the RQT can be referred to as a TU.
  • the pixel difference values associated with the TU may be transformed to produce transform coefficients, which may be quantized.
  • the PU when the PU is intra-mode encoded, data related to the intra prediction mode of the PU is involved.
  • data for determining a motion vector of the PU is involved.
  • the data used to determine the motion vector of the PU may describe the horizontal component of the motion vector, the vertical component of the motion vector, and the resolution of the motion vector (eg, integer pixel precision, half pixel precision, quarter pixel precision) Or an eighth-pixel precision, etc.), a reference image pointed to by the motion vector, and/or a reference image list of motion vectors (eg, list 0 or list 1).
  • video encoder 20 may adaptively select motion vectors having integer pixel precision or fractional (eg, quarter or eighth) pixel precision motion vectors. According to some embodiments of the present application, video encoder 20 may not need to generate an indication of the pixel precision of the motion vector of the image block to be included in the code stream of the encoded video data. Rather, video decoder 30 may derive the motion vector accuracy using the same or similar methods used by video encoder 20. In accordance with further embodiments of the present application, video encoder 20 may include in the codestream one or more syntax elements used by video decoder 30 to determine the accuracy of the selected motion vector.
  • video encoder 20 may include a variety of interpolation filters.
  • an interpolation filter is used to interpolate the predicted block of the current image block indicated by the motion vector.
  • bilinear interpolation can be used to calculate the value of a fractional pixel position.
  • Video encoder 20 is operative to perform a motion search to obtain a motion vector.
  • TUs use transform and quantization processes.
  • a given CU with one or more PUs may also include one or more transform units (TUs).
  • video encoder 20 may calculate a residual value corresponding to the PU.
  • the residual value includes pixel difference values, which can be transformed into transform coefficients, quantized, and scanned using TU to produce serialized transform coefficients for entropy decoding.
  • video encoder 20 may calculate residual data for the TU of the CU.
  • a PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may be included in transforming (eg, discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after application to the residual video data.
  • the residual data may correspond to a pixel difference between a pixel of the uncoded image and a predicted value corresponding to the PU.
  • Video encoder 20 may form a TU that includes residual data for the CU, and then transform the TU to generate transform coefficients for the CU.
  • video encoder 20 may perform quantization of the transform coefficients.
  • Quantization illustratively refers to the process of quantizing the coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression.
  • the quantization process can reduce the bit depth associated with some or all of the coefficients. For example, the n-bit value can be rounded down to an m-bit value during quantization, where n is greater than m.
  • 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.
  • the video decoder 30 of the destination device 14 is configured to perform a technical solution similar or corresponding to any or all of the technical solutions of the video encoder 20 of the embodiment of the present application. For example, using the same derivation technique, video decoder 30 may determine what motion vector precision to use to decode the video data without receiving a syntax element indicating motion vector accuracy.
  • 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 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.
  • the present application may refer to a PU that the video decoder is currently decoding as a current decoded PU, also referred to as a current decoded image block (also referred to as a current decoding unit).
  • the present application may refer to a CU that the video decoder is currently decoding as a current decoding CU, also referred to as a current decoded image block (also referred to as a current decoding unit).
  • the present application may refer to a PU that the video encoder is currently encoding as a current encoded PU, also referred to as a current encoded image block (also referred to as a current coding unit).
  • the present application may refer to a CU currently being encoded by a video decoder as a current encoded CU, also referred to as a current encoded image block (also referred to as a current coding unit).
  • 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 image block is uniformly used for representation.
  • the term "image 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.
  • FIG. 2 is a schematic block diagram of a video encoder 20 in the embodiment of the present application.
  • video encoder 20 may perform adaptive determination of a process for encoding motion vector resolution (also referred to as motion vector accuracy or pixel precision) of a current image block, particularly a prediction module in video encoder 20. 40.
  • inter prediction module 41 may perform a process of adaptively determining a motion vector resolution for encoding a current image block.
  • video encoder 20 may perform intra and inter prediction of the image block (eg, LCU, CU, or PU).
  • the intra prediction process relies on spatial prediction to reduce or remove spatial redundancy of video data within a video frame or image.
  • the inter prediction process relies on temporal prediction to reduce or remove temporal redundancy of video data within adjacent frames or adjacent images of a video sequence.
  • An intra mode may refer to any of a number of spatially based compressed modes; an inter mode, such as unidirectional prediction (P mode) or bidirectional prediction (B mode) may refer to several time based compression modes Either.
  • video encoder 20 receives a current image block within a video frame to be encoded.
  • video encoder 20 may include prediction module 40, reference image memory 64, summer 50, transform module 52, quantization module 54, and entropy encoding module 56.
  • the prediction module 40 can include an inter prediction module 41 and an intra prediction module 46.
  • Inter prediction module 41 may perform an inter prediction process, while intra prediction module 46 may perform an intra prediction process.
  • inter prediction module 41 may include motion estimation module 42 and motion compensation module 44.
  • video encoder 20 may also include an inverse quantization module 58, an inverse transform module 60, and a summer 62 (also referred to as reconstruction module 62).
  • video encoder 20 may also include a deblocking filter (not shown in FIG. 2) to filter block boundaries to remove blockiness artifacts from the reconstructed image.
  • the deblocking filter typically filters the output of summer 62 as needed.
  • an additional loop filter in-loop or post-loop
  • video encoder 20 may also include a video data store (not shown in FIG. 2), where the video data store may store video data to be encoded by video encoder 20. Video data stored in the video data store can be obtained, for example, from video source 18.
  • Reference image memory 64 (also referred to as decoded image buffer 64) is used to store reference image data for video encoder 20 encoding video data, such as for storage by video encoder 20 in an intra or inter coding mode. Reference image data to be used.
  • the video data memory and reference image memory 64 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM). Or other types of memory devices.
  • the video data memory and reference image memory 64 may be provided by the same memory device or a separate memory device.
  • the video data store can be deployed on the chip as other modules of video encoder 20, or the video data store can be disposed external to the chip relative to other modules of video encoder 20.
  • video encoder 20 receives a video frame or slice to be encoded.
  • the frame or slice may be divided into a plurality of image blocks (for example, an LCU, a CU, or a PU), for example, the division of the image block may be performed according to a quadtree structure of the LCU and the CU.
  • Prediction module 40 may select one of a plurality of encoding modes of the current image block, such as one or more of a plurality of intra encoding modes, based on encoding quality and cost calculation results (eg, rate-distortion cost, RDcost). One of the inter coding modes. Prediction module 40 may provide the resulting intra-coded block or inter-coded block to summer 50 to generate residual block data and provide the resulting intra-coded block or inter-coded block to summer 62. The encoded image block is reconstructed for use as a reference image.
  • encoding quality and cost calculation results eg, rate-distortion cost, RDcost
  • Motion estimation module 42 and motion compensation module 44 within inter prediction module 41 may perform inter prediction encoding of the received current image block relative to one or more of the one or more reference images to provide temporal compression.
  • Motion estimation unit 42 is operative to determine an inter prediction mode for the video stripe based on a predetermined pattern of the video sequence.
  • the predetermined mode may designate a video stripe in a video sequence as a P strip, a B strip, or a GPB strip.
  • Intra prediction module 46 may perform intra prediction encoding of the received image block relative to one or more neighboring blocks in the same frame or strip as the image block to be encoded to provide spatial compression.
  • Motion estimation module 42 and motion compensation module 44 may be integrated together, but may be separately illustrated for conceptual purposes.
  • Motion estimation unit 42 is operative to perform a motion estimation process to obtain a motion vector.
  • the motion vector is used to indicate the displacement of the current video frame or the currently being coded image block (referred to as the current coding block) within the current image relative to the prediction block within the reference image.
  • the prediction block is a block that is found to closely match the current coding block, for example, a block that is closely matched with the current coding block according to the difference value between the block and the block, wherein the difference value between the two blocks may be It is regarded as the accumulation of pixel difference values at each corresponding position in the two blocks.
  • 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.
  • the motion estimation module 42 can be configured to perform motion search with respect to integer pixel locations and fractional pixel locations and output motion vectors with integer pixel precision or motion vectors with fractional pixel precision.
  • the inter prediction module 41 eg, the motion estimation module 42
  • Fractional Motion Estimation (FME) is performed.
  • inter prediction module 41 eg, motion estimation module 42
  • inter prediction module 41 may search for references to the current image block in one or more reference images. Piece.
  • inter prediction module 41 may generate a motion vector indicating the displacement between the reference block relative to the current image block, and the motion vector has Integer pixel precision.
  • inter prediction module 41 e.g., motion estimation module 42
  • inter prediction module 41 may improve the motion vectors generated by performing IME on the current image block.
  • a motion vector generated by performing FME on a current image block may have fractional pixel precision (eg, 1/2 pixel precision, 1/4 pixel precision, etc.).
  • inter prediction module 41 e.g., motion compensation module 44
  • the motion estimation module 42 is configured to calculate a motion vector of the current coded image block in the inter-coded frame by comparing the current coded image block with the image block of the reference image in the reference image memory 64.
  • the motion vector computed by motion estimation module 42 may be directed to the fractional pixel location of the reference image. If the value without the fractional pixel position is stored in the reference image memory 64, the motion estimation module 42 or motion compensation module 44 is also used to calculate the value of the fractional pixel position of the reference image stored in the reference image memory 64, such as an interpolation reference. Fractional pixels of an image (such as an I frame or a P frame).
  • a reference image may be selected from a first reference image list (List 0) or a second reference image list (List 1), each of the lists (eg, a reference image index) for identifying stored in the reference image memory 64
  • Motion estimation module 42 is operative to transmit or provide motion vectors to motion compensation module 44.
  • the inter prediction module 41 (for example, the motion estimation module 42) is further configured to send the motion vector difference (MVD) information of the current coded image block to the entropy coding module 56, where the motion vector difference information is used.
  • VMD motion vector difference
  • inter prediction module 41 may output a candidate predicted motion vector index for indicating the location of the candidate predicted motion vector in the candidate predicted motion vector list to entropy encoding module 56.
  • An inter prediction module 41 (eg, motion compensation module 44) is operative to perform a motion compensation process, wherein the motion compensation process includes fetching or generating a prediction block based on motion vectors determined by motion estimation, possibly including performing fractional pixel precision Interpolation.
  • motion compensation module 44 may locate the predicted block to which the motion vector is directed in one of the reference image lists.
  • the video encoder 20 forms a residual pixel block by subtracting the pixel value of the prediction block from the pixel value of the currently encoded image block, thereby forming a pixel difference value.
  • the pixel difference values form residual data for the block and may include both luminance and chrominance difference components.
  • Summer 50 represents one or more components that perform this subtraction.
  • the inter prediction module 41 may generate some coding processing units at different levels (eg, sequence level, image level, strip level, regional partition level, CTU level, or CU level).
  • a syntax element such as a syntax element associated with the current image block and the current image, for use by video decoder 30 to decode the current image block of the current image, such as syntax elements associated with the current image block and video stripe.
  • the video decoder 30 is used by the video decoder 30 to decode the current image block of the video strip.
  • motion estimation module 42 of video encoder 20 may be operable to provide or transmit motion vector accuracy parameters to entropy encoding module 56, such that entropy encoding unit 56 entropy encodes motion vector precision parameters into a code stream
  • the motion vector precision parameter is used to indicate a value of a plurality of motion vector precision parameters, and the motion vector precision parameter may be carried in any one of a sequence parameter set of the current image block, an image parameter set PPS, or a slice header.
  • the motion vector accuracy parameter may include a value of a motion vector precision for a current encoding processing unit and a value of at least two motion vector precisions corresponding to the motion vector precision number, such as motion vector precision.
  • motion estimation module 42 of video encoder 20 is also operative to provide or transmit to the entropy encoding module 56 indication information indicating the motion vector accuracy of a certain set of important motion vectors.
  • the video encoder 20 forms a residual image block by subtracting the prediction block from the original image block currently being encoded.
  • Summer 50 represents one or more components that perform this subtraction.
  • Transform module 52 applies the transform to transform the residual data in the residual image block into residual transform coefficients, such as discrete cosine transform (DCT) or conceptually similar transform (eg, discrete sinusoidal transform DST).
  • Transform module 52 may convert the residual data from the pixel domain to a transform domain (eg, a frequency domain).
  • Transform module 52 may provide or send the resulting residual transform coefficients to quantization module 54.
  • Quantization module 54 is operative to quantize the residual transform coefficients to further reduce the code rate. The quantization process may reduce the bit depth associated with some or all of the residual transform coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some possible implementations, quantization module 54 may then perform a scan of the matrix containing the quantized transform coefficients. Alternatively, entropy encoding module 56 may perform a scan.
  • entropy encoding module 56 can be used to entropy encode the quantized residual transform coefficients.
  • entropy encoding module 56 may perform context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax based context adaptive binary arithmetic coding (SBAC), probability interval segmentation entropy (PIPE) coding or other entropy coding techniques.
  • Entropy encoding module 56 may also be used to entropy encode the current video strip being encoded or some syntax elements of the current image block.
  • the encoded code stream may be transmitted to video decoder 30 or archive for later transmission or retrieved by video decoder 30.
  • the entropy encoding module 56 is configured to entropy encode the motion vector difference information into the code stream of the current coded image block; optionally, the entropy coding module 56 is further configured to use the motion vector accuracy of an important motion vector set.
  • the indication information is encoded into the code stream to indicate a specific pixel precision of the motion vector predictor of the important motion vector set, such as having integer pixel precision or fractional pixel precision, such as quarter-pixel precision or eighth-pixel precision or Other fractional pixel precision.
  • the video encoder 20 signals the motion vector predictor by, for example, implementing an Advanced Motion Vector Prediction (AMVP) mode or a merge mode.
  • AMVP Advanced Motion Vector Prediction
  • video encoder 20 e.g., inter prediction module 41
  • AMVP mode video encoder 20 establishes a list of candidate motion vector predictors based on motion vectors determined from previously encoded image blocks. This will be described in detail below with reference to FIG. 6A and FIG. 6B, and details are not described herein again.
  • Video encoder 20 signals an index identification in the candidate motion vector predictor list to identify a corresponding candidate motion vector predictor (MVP) and signal motion vector difference (MVD) information.
  • MVP candidate motion vector predictor
  • MVD signal motion vector difference
  • the entropy encoding module 56 is configured to entropy encode an index (ie, a third identifier) indicating a motion vector predictor MVP of the current coded image block and a motion vector difference information of the current coded image block into the code stream.
  • index ie, a third identifier
  • video decoder 30 e.g., inter prediction module 82 establishes a list of candidate motion vector predictors based on motion vectors determined from previously decoded image blocks.
  • video decoder 30 performs inter prediction using the motion vector to obtain a predicted block of the decoded image block, wherein The motion vector is obtained based on candidate motion vector predictor (MVP), motion vector difference (MVD) information, and adaptively determined motion vector accuracy corresponding to the index.
  • MVP candidate motion vector predictor
  • MVD motion vector difference
  • video encoder 20 (e.g., inter prediction module 41) builds a candidate list based on the previously encoded image block; video decoder 30 builds a candidate list based on the previously decoded image block. Video encoder 20 signals the index of one of the candidates in the candidate list.
  • video decoder 30 performs inter prediction using the candidate motion vector corresponding to the index and the reference image index of the candidate motion vector to obtain a prediction block that is currently decoding the image block.
  • video encoder 20 and video decoder 30 utilize the same list building technique, such that the list used by video encoder 20 in determining how to encode the block and video decoder 30 are determining how to decode. The list used when the block is matched.
  • Inverse quantization module 58 and inverse transform module 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for later use as a reference block for the reference image.
  • Summer 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to produce a reconstructed image block that is used as a reference block for storage in a reference.
  • the reconstructed image block may be used by motion estimation unit 42 and motion compensation unit 44 as a reference block to inter-predict subsequent video frames or blocks in the image.
  • video encoder 20 may directly quantize the residual signal without the need for processing by transform module 52, and accordingly need not be processed by inverse transform module 58; or, for some image blocks Or the image frame, the video encoder 20 does not generate residual data, and accordingly does not need to be processed by the transform module 52, the quantization module 54, the inverse quantization module 58 and the inverse transform module 60; alternatively, the video encoder 20 can reconstruct the reconstructed image
  • the block is stored directly as a reference block without being processed by the filter unit; alternatively, the quantization module 54 and the inverse quantization module 58 in the video encoder 20 may be merged together; or, the transform module 52 and the inverse transform in the video encoder 20 Modules 60 may be merged together; alternatively, summer 50 and summer 62 may be merged together; alternatively, reference image memory 64 may be disposed outside of video encoder 20; or video encoder 20 may be
  • FIG. 3 is a schematic block diagram of a video decoder 30 in the embodiment of the present application.
  • video decoder 30 may perform adaptive determination of the process for decoding the motion vector resolution (also referred to as motion vector accuracy or pixel precision) of the current image block, particularly inter-frame in video decoder 30.
  • Prediction module 82 may perform a process of adaptively determining a motion vector resolution for decoding a current image block.
  • video decoder 30 may include an entropy decoding module 80, a prediction module 81, an inverse quantization module 86, an inverse transform module 88, and a reconstruction module 90 (e.g., summer 90).
  • the prediction module 81 may include an inter prediction module 82 and an intra prediction module 84, which are not limited in this embodiment of the present application.
  • video decoder 30 may also include reference image memory 92. It should be understood that the reference image memory 92 can also be disposed outside of the video decoder 30. 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.
  • video decoder 30 receives from video encoder 20 an encoded video code stream (referred to as a code stream) that represents an image block of the encoded video slice and associated syntax elements.
  • Video decoder 30 may receive syntax elements at a video sequence level, a video stripe level, an image level, and/or an image block level.
  • Entropy decoding module 80 of video decoder 30 entropy decodes the code stream.
  • Entropy decoding module 80 provides or transmits partial data (eg, some syntax elements) that are entropy decoded to prediction module 81.
  • the entropy decoded data may include motion vector difference (MVD) information of a currently decoded image block.
  • MVD motion vector difference
  • the MVD information may be the current decoded image block.
  • the motion vector difference value or may also be a scaled motion vector difference value, for example, may be obtained by scaling the MVD based on a certain motion vector precision (for example, an index value of a certain motion vector precision), which will be described below. 7 Detailed description, no more details here.
  • the data decoded by the entropy herein may further include a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of multiple motion vector precisions, where the motion vector precision parameter may be carried in the image block. Any one of a sequence parameter set, an image parameter set PPS, or a slice header.
  • the motion vector accuracy parameter may include a value of a motion vector precision for a current decoding processing unit and a value of at least two motion vector precisions corresponding to the motion vector precision number, such as integer pixel precision. , one-half pixel precision, quarter-pixel precision, and/or one-eighth pixel accuracy.
  • the data decoded by the entropy herein may further include indication information of motion vector accuracy of a certain set of important motion vectors.
  • the entropy decoded data herein may further include an index (ie, a third identifier) for indicating a candidate motion vector predictor (MVP) of the currently decoded image block.
  • the inter prediction module 82 in the prediction module 81 may determine motion information of the currently decoded image block based on the entropy decoded data, the motion information including a motion vector (MV), motion vector accuracy, and optionally, the motion
  • the information may further include reference image indication information, for example, in the case where the codec side jointly agrees on the reference image, the motion information may not include the reference image indication information.
  • the reference image indication information is used to indicate which one or which reconstructed images are used as the reference image, and the motion vector represents the positional offset of the reference block position relative to the current block position in the used reference image, generally including the horizontal component offset And vertical component offset.
  • the reference image indication information may include a reference image list number and a reference image index corresponding to the reference image list.
  • the reference image index is used to identify the reference image pointed to by the motion vector in the specified reference image list (RefPicList0 or RefPicList1).
  • the inter prediction module 82 is configured to acquire a motion vector predictor (MVP) of a currently decoded image block; when the motion vector predictor is included in a motion vector accuracy (referred to as a target in this document)
  • MVP motion vector predictor
  • the motion vector accuracy corresponds to a certain motion vector set (referred to herein as a target motion vector set)
  • a target motion vector set a certain motion vector set (referred to herein as a target motion vector set)
  • the motion vector predictor when the motion vector predictor is included in the target motion vector set, determining, according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, the target motion vector accuracy corresponding to the target motion vector set is the
  • the motion vector predictor has a motion vector precision, and based on the motion vector predictor, the entropy decoded motion vector difference information, and the target motion vector precision, a motion vector of the current decoded image block is obtained.
  • the prediction module 81 is configured to generate a prediction block of the currently decoded image block; specifically, when the video slice is decoded into an intra-frame decoding (I) slice, the intra prediction module 84 of the prediction module 81 may A prediction block of an image block of the current video stripe is generated based on the signaled intra prediction mode and data from a previously decoded image block of the current frame or image.
  • the inter prediction module 82 of the prediction module 81 generates a current video image based on the entropy decoded data received from the entropy decoding module 80 when the video image is decoded into an inter-frame decoded (eg, B, P, or GPB) stripe.
  • the prediction block of the image block for example, the inter prediction module 82 uses the determined motion vector to identify the prediction block in the reference image in the reference image memory 92 (also referred to as the decoded image buffer 92).
  • the video decoder 30 in the AMVP mode, establishes a candidate motion vector predictor list based on the motion vector determined from the previously decoded image block; A candidate motion vector predictor is determined in the candidate motion vector predictor list.
  • Video decoder 30 e.g., inter prediction module 82
  • Vector predictive value (MVP) entropy decoded motion vector difference (MVD) information, and adaptively determined motion vector accuracy are obtained.
  • MVP Vector predictive value
  • MVP entropy decoded motion vector difference
  • the inverse quantization module 86 inverse quantizes the quantized transform coefficients decoded by the entropy decoding module 80, ie, dequantizes.
  • the inverse quantization process may include using the quantization parameters calculated by video encoder 20 for each of the video slices to determine the degree of quantization that should be applied and likewise determine the degree of inverse quantization that should be applied.
  • Inverse transform module 88 applies the inverse transform to transform coefficients, such as inverse DCT, inverse integer transform, or a conceptually similar inverse transform process, to generate residual blocks in the pixel domain.
  • Inter prediction module 82 (also referred to as motion compensation module 82) generates a motion compensated block and may also involve performing interpolation based on the interpolation filter. Alternatively, an identifier of an interpolation filter for motion estimation with fractional pixel precision may be included in the syntax element. Inter prediction module 82 may use the interpolation filters used by video encoder 20 during encoding of the image block to calculate interpolated values for the fractional pixels of the reference block. Inter prediction module 82 may determine an interpolation filter used by video encoder 20 based on the received syntax information and use the interpolation filter to generate a prediction block. For example, inter prediction module 82 may use bilinear interpolation to interpolate the value of the one-teenth pixel position of the reference block.
  • the video decoder 30 obtains the reconstructed by summing the residual block from the inverse transform module 88 with the corresponding prediction block generated by the inter prediction module 82.
  • a block ie a decoded image block.
  • Summer 90 represents the component that performs this summation operation.
  • a loop filter (either in the decoding loop or after the decoding loop) can also be used to smooth pixel transitions or otherwise improve video quality, if desired.
  • a filter unit may represent one or more loop filters, such as a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) filter.
  • decoded image blocks in a given frame or image may be stored in decoded image buffer 92, which stores reference images for subsequent motion compensation.
  • the reference image memory 92 can be part of a memory that can also store decoded video for later presentation on a display device (eg, display device 32 of FIG. 1), or can be separate from such memory.
  • video decoder 30 may be used to decode the encoded video code stream.
  • video decoder 30 may generate an output video stream without processing by a filter unit; or, for some image blocks or image frames, entropy decoding module 80 of video decoder 30 does not decode the quantized coefficients, correspondingly Processing by inverse quantization module 86 and inverse transform module 88 is required.
  • the inverse quantization module 86 and the inverse transform module 88 in the video decoder 30 may be merged together; alternatively, the reference image memory 92 may be disposed outside of the video decoder 30; or, in some scenarios, only the inter-coding mode is triggered
  • the corresponding inter prediction module 82 operates.
  • FIG. 4A is a schematic diagram of an integer pixel position and a fractional pixel position in an embodiment of the present application. Integer pixel positions, half-pixel positions, and quarter-pixel positions are illustrated in Figure 4A, it being understood that other precision pixel locations are also possible.
  • FIG. 4B is a schematic diagram of another integer pixel position and a fractional pixel position in the embodiment of the present application. As shown in FIG. 4B, FIG. 4B illustrates the fractional pixel position of an integer pixel (pel) 100.
  • the integer pixel 100 corresponds to a half pixel position 102A to 102C (half pel 102), a quarter pixel position 104A to 104L (quarter pel 104), and an eighth pixel position 106A to 106AV (one eighth pel 106).
  • the motion vector can point to an integer pixel location 100, a half pixel location 102, a quarter pixel location 104, or an eighth pixel location 106. Any of them. However, if the motion vector has a quarter-pixel precision, the motion vector may point to any of the integer pixel position 100, the half-pixel position 102, or the quarter-pixel position 104, but will not point to eight One pixel location 106. It should be understood that in other examples, other precisions may be used, such as one-sixteenth pixel precision, thirty-one-one pixel precision, or the like.
  • the value of the pixel at integer pixel location 100 can be included in the corresponding reference image. That is, the value of the pixel at integer pixel location 100 generally corresponds to the actual value of the pixel in the reference image.
  • the motion estimation or motion compensation process if the motion vector accuracy of the current motion vector is fractional pixel precision (for example, one-half pixel precision, or quarter-pixel precision), then the entire pixel position of the reference image is required.
  • the pixel value is interpolated using an interpolation filter to obtain a pixel value of the fractional pixel position as the value of the prediction block of the current block.
  • the specific interpolation operation process is related to the interpolation filter used.
  • an adaptive interpolation filter or a fixed interpolation filter can be used to interpolate the half-pixel position 102, the quarter-pixel position 104, and the eighth.
  • the value of a pixel location 106 (collectively referred to as a fractional pixel location).
  • the value of the fractional pixel location may be interpolated from one or more neighboring pixels, where adjacent pixels may be values of adjacent integer pixel locations or previously determined fractional pixel locations.
  • video codecs eg, video encoder 20, video decoder 30
  • video codecs adaptively have, for example, integer pixel precision or fractional pixel precision (eg, one-eighth pixel precision and quarters).
  • the accuracy of the motion vector is chosen between one pixel precision).
  • Video encoder 20 may make this selection for each motion vector, each CU, each LCU, every slice, every frame, every GOP, or other decoding unit.
  • video encoder 20 selects a quarter pixel precision of the motion vector, the motion vector may refer to any of integer pixel location 100, half pixel location 102, or quarter pixel location 104.
  • the motion vector may refer to an integer pixel location 100, a half-pixel location 102, a quarter-pixel location 104, or an eighth pixel. Any of the locations 106.
  • FIG. 5 is a schematic flowchart of a video encoding method according to an embodiment of the present application.
  • the process 500 shown in Figure 5 can be performed by a video encoding device, a video encoder (e.g., video encoder 20), and other devices having video encoding capabilities.
  • Process 500 is described as a series of steps or operations, it being understood that process 500 can be performed in various sequences and/or concurrently, and is not limited to the order of execution shown in FIG. Assuming that a video data stream having multiple video frames is using a video encoder, a process 500 comprising the steps of encoding the current image block of the current video frame is performed;
  • the method shown in FIG. 5 may include steps 501 to 511, and step 501 to step 511 are described in detail below.
  • Step 501 Perform a motion estimation process on an image block currently being encoded (referred to as a current coded image block or a current image block for short) to obtain a motion vector of a current coded image block, where the motion vector is used to indicate that the currently coded image block is relatively The displacement of the predicted block within the reference image;
  • step 501 can be performed by inter prediction module 41 of video encoder 20, such as motion estimation module 42; wherein motion estimation module 42 compares the encoded image using quarter-pixel precision motion vectors The difference between the block and the block using the eighth-pixel precision motion vector coding image.
  • motion estimation module 42 uses one or more quarter-pixel precision motion vector encoded image blocks in a first coding pass and one or more eighth-pixel precision motion vector encoded images in a second coding round.
  • Motion estimation module 42 may further use various combinations of one or more quarter-pixel precision motion vectors of the block and one or more eighth-pixel precision motion vectors in the third coding round.
  • Motion estimation module 42 may calculate rate-distortion values for each coding pass of the image block and calculate a difference between the rate-distortion values. For example, for different combinations of search starting points (such as the search starting point of the available motion vectors pointed by the spatial neighboring block of the currently decoded image block and/or the temporally adjacent block) and the pixel precision, the motion estimation module 42 performs the reference image in the reference image. Corresponding score or integer pixel step motion search, get the corresponding prediction block. A matching error between each of the predicted blocks and the current coded image block is calculated, and a prediction block with the smallest matching error and its corresponding motion vector are selected as the optimal prediction block and the corresponding optimal motion vector. Among them, the matching error can be calculated by using the SAD criterion.
  • Step 503 Acquire a motion vector predictor of the current coded image block.
  • step 503 may be performed by inter prediction module 41 of video encoder 20, such as motion estimation module 42; it should be understood that in some implementations, steps 501 and 503 are not According to the sequence, when the motion vector of the current coded image block is obtained, correspondingly, the motion vector predictor of the current coded image block can be obtained.
  • step 503 if the inter prediction mode of the current coded image block is the AMVP mode, the AMVP candidate motion vector predictor list (ie, the AMVP candidate MVP list) of the current coded image block is constructed; and the candidate is obtained according to the rate distortion cost criterion.
  • a candidate motion vector predictor also referred to as a best candidate MVP
  • the candidate motion vector predictor MVP encodes a rate distortion penalty of the current encoded image block The smallest.
  • the candidate MV prediction value list of the current image block may include two motion vector predictors in the spatial domain and the time domain, and A0-A1 and B0-B2 are spatial neighboring block positions of the current image block. (also referred to as spatial domain candidate reference block location), T TL , T C , and T BR are optional time domain neighboring block locations (also referred to as time domain candidate reference block locations) of the current image block, and the application is not limited thereto.
  • the MVs of the spatial domain and the temporal neighboring blocks are sequentially acquired from the spatial neighboring block position and the temporal neighboring block position as a plurality of candidate motion vector predictors to form a candidate MV predicted value list.
  • the AMVP candidate MV predictor list generation process is as follows:
  • a candidate MV prediction value is generated on the left side and the upper side of the current image block, and the candidate MV prediction value on the left side is obtained from A0, A1, the scaled A0, and the scaled A1, and the upper candidate MV prediction value is from B0, B1, B2. , zoomed B0, scaled B1, and scaled B2 are obtained;
  • the time domain candidate motion information is acquired.
  • An example table of AMVP candidate motion vector predictor lists is as follows:
  • MV Idx MV prediction value (represented by position) 0 MV A1 1 MV B1
  • the candidate MV prediction value list of the current image block may include two motion vector predictors in the spatial domain and the time domain, and A, L, AL, AR, and BL are spatial neighbors of the current image block.
  • the block position also referred to as the spatial domain candidate reference block position
  • T is an optional time domain neighboring block position (also referred to as a time domain candidate reference block position) of the current image block, and the application is not limited thereto.
  • the MVs of the spatial domain and the temporal neighboring blocks are sequentially acquired from the spatial neighboring block position and the temporal neighboring block position as a plurality of candidate motion vector predictors to form a candidate MV predicted value list.
  • Another example table of AMVP candidate motion vector predictor lists is as follows:
  • MV Idx MV prediction value (represented by position) 0 MV BL 1 MV T
  • Step 505 When the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy (for example, when the motion vector predictor is included in the target motion vector set, according to the multiple motion vector set Corresponding to the plurality of motion vector precisions, determining that the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a corresponding motion vector, based on the motion vector of the current encoded image block And the motion vector predictor and the target motion vector precision, to obtain motion vector difference (MVD) information of the current coded image block; wherein the motion vector difference (MVD) of the current coded image block has a target Motion vector accuracy, the target motion vector set being one of a plurality of motion vector sets, the target motion vector accuracy being one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector precision,
  • the plurality of motion vector sets includes a first motion vector set and a second motion vector set, the first At least one of the motion vector set and the
  • step 505 can be performed by inter prediction module 41 of video encoder 20, such as motion estimation module 42;
  • step 505 can include:
  • MVD motion vector difference
  • calculating a difference MVD between a motion vector of the current coded image block and the motion vector predictor where the motion vector of the current coded image block and the motion vector predictor have the same motion vector Accuracy (ie, each having a target motion vector accuracy); and scaling (eg, reducing) the calculated MVD based on the target motion vector precision (eg, an index of the target motion vector accuracy) to obtain a scaled (eg, zoom out) the processed motion vector difference MVD.
  • the target motion vector precision eg, an index of the target motion vector accuracy
  • the number of occupied MVD occupied bits is smaller than the original MVD occupied bits.
  • the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second motion in the plurality of motion vector sets.
  • a second distance between the second neighboring block and the current image block corresponding to the motion vector predictor in the vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and/or The time domain is adjacent to the block.
  • the first distance here is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image.
  • the distance of the center point pixel position of the block; the second distance here is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the second neighboring block is relative The distance from the center point pixel position of the current image block, but the application is not limited thereto.
  • the first neighboring block corresponding to the motion vector predictor in the first motion vector set corresponds to a first distance of the current image block that is smaller than a motion vector predictor in the second motion vector set.
  • the first motion vector precision corresponding to the first motion vector set is smaller than the second motion vector precision corresponding to the second motion vector set;
  • the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is greater than the second neighboring block corresponding to the motion vector predictor in the second motion vector set
  • the first motion vector accuracy corresponding to the first motion vector set is greater than the second motion vector precision corresponding to the second motion vector set.
  • the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset or locally determined by the video encoder.
  • the Corresponding relationship between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to the motion vector precision assignment rule; wherein the motion vector precision assignment rules are used to represent the motion vector predictor values included in the motion vector set
  • the relationship between the distance between the corresponding neighboring block and the current image block and the magnitude of the motion vector precision may be a correspondence relationship set according to a set of preset fixed value motion vector precision and motion vector precision assignment rule "the closer the distance is, the higher the motion vector accuracy is, the farther the distance is, the lower the motion vector accuracy is.”
  • Table-3 or Table-4 illustrates a one-to-one correspondence between multiple motion vector sets and various motion vector precisions. It should be understood that multiple motion vector sets and multiple motion vector precisions may also be M:N correspondences. Relationship, M is not equal to N. For example, multiple motion vector sets and multiple motion vector precisions may also be one-to-many or many-to-one correspondence, which will be described in detail below.
  • the distance between the predicted motion vector predictor value (ie, the neighboring block where the candidate motion vector predictor is located) and the current image block may be used to construct the candidate.
  • the plurality of candidate motion vector predictors of the motion vector prediction list are divided into a plurality of motion vector sets, each motion vector set including one or more candidate motion vector predictors for constructing the candidate motion vector prediction list, and at least one motion vector set
  • a plurality of candidate motion vector predictors are included; the encoding end and the decoding end pre-arrange a set of motion vector precisions, for example, ⁇ 1/4, 1/2, 1, 2, 4, 8, etc., and the encoding end selects, for example, according to a probability statistical result.
  • the optimal motion vector accuracy of each motion vector set; or the motion vector accuracy corresponding to each motion vector set (each position MV prediction value) is pre-agreed by the encoding end and the decoding end.
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A1 , MV B1 1/4 1 MV A0 , MV B0 1/2 2 MV B2 1 3 MV T 2 4 MVP obtained in other ways 4
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A , MV L 1/4 1 MV AL 1/2 2 MV AR , MV BL 1 3 MV T 2 4 MVP obtained in other ways 4
  • Step 507 Encode entropy of motion vector difference (MVD) information of the current coded image block into a code stream.
  • MVD motion vector difference
  • step 507 may be performed by entropy encoding module 56 of video encoder 20;
  • the MVD information and the third identifier entropy of the current coded image block may be encoded into a code stream, where the third identifier is used to indicate a motion vector predictor value MVP of the current coded image block, for example, the third identifier is a candidate MVP.
  • the index number of the candidate MVP (for example, the optimal candidate MVP) selected in the list.
  • the MVD information of the current coded image block herein may be the MVD of the current coded image block, or may be a scaled MVD (for example, the reduced MVD).
  • the process 500 may further include entropy encoding a motion vector precision parameter into a code stream, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision,
  • the motion vector accuracy parameter is carried in any one of a sequence parameter set SPS, an image parameter set PPS, a slice header, or other positions of the image block.
  • the motion vector accuracy parameter may include a motion vector accuracy number for a current encoding processing unit and at least two motion vector precision values corresponding to the motion vector precision number, wherein the current
  • the encoding processing unit includes one or more of a video sequence, an image, a slice, a Partition, a CTU, and a CU.
  • the encoding end (eg, video encoder 20) employs a rate-distortion optimization algorithm (ie, RDO) at different encoding processing units (eg, sequence level, image level, strip level, region level, CTU level, or CU level).
  • RDO rate-distortion optimization algorithm
  • the optimal set of motion vector precision values is selected and written to the decoder (e.g., video decoder 30).
  • the decoder e.g., video decoder 30.
  • the encoding end obtains the optimal motion vector set accuracy of the current image according to RDO as ⁇ 1/4, 1/2, 1, 2 ⁇
  • the set of motion vector precision is written into the PPS header.
  • the specific syntax structure Picture parameter set RBSP syntax is shown in FIG.
  • pps_amvr_number represents the number of motion vector precisions available in the current image, and the value range is a positive integer greater than or equal to 1; the value of pps_amvr_number can be The number and location determination of the candidate motion vector predictors used to construct the candidate motion vector predictor list are determined.
  • Pps_amvr_set[pps_amvr_number] represents the value of the motion vector precision available in the current image.
  • the encoding end may also not need to encode the motion vector accuracy parameters into the code stream.
  • the decoding end e.g., video decoder 30
  • the decoding end may employ a pre-agreed set with the encoding end.
  • the motion vector accuracy can even adopt the motion vector precision corresponding to each motion vector set (the position MV prediction value) that is pre-agreed by the encoding end.
  • the process 500 may further include:
  • the third motion vector precision corresponding to the transmission may be pre-agreed between the codecs Which motion vector set (or which position motion vector predictor);
  • the third motion vector set herein represents a set of important motion vector predictor values, that is, a motion vector set formed by one or more motion vector predictors whose probability of being the best motion vector predictor is the largest or larger.
  • the third motion vector accuracy is the motion vector precision used by the third motion vector set.
  • the third motion vector set may be a default set of motion vectors, such as a first motion vector set in the multiple motion vector sets (such as motion vector set 0 in Table-5); of course,
  • the three motion vector precision set may also be a second motion vector set, or may be other motion vector sets different from the first or second motion vector set; in addition, the third motion vector precision may be the multiple motions
  • the first motion vector accuracy in the vector precision, or the second motion vector accuracy, or other motion vector precision, is not limited in this application.
  • Motion vector precision index Motion vector accuracy Binary code 0 1/8 00 1 1/4 01 2 1/2 10 3 1 11
  • This identification information (eg, the first identification) can be used for different codec processing units such as sequence level, image level, strip level, area level, image block level (eg, CTU level, CU level).
  • the identification information may be carried in a sequence parameter set SPS, an image parameter set PPS or a slice header of the image block, such as SPS header information and PPS header information.
  • the motion vector accuracy is an image level
  • its identification information for example, the first identifier, specifically the motion vector precision index as shown in Table 6
  • the image parameter set PPS header information is written into the image parameter set PPS header information, and the specific syntax structure "Picture parameter set" RBSP syntax" see FIG. 6D, where pps_amvr_accuracy is 0, indicating that the motion vector accuracy of a certain motion vector set (for example, motion vector set 0) is 1/8 in the encoding and decoding process of any image block in the current image.
  • pps_amvr_accuracy When pps_amvr_accuracy is 1, it indicates that the motion vector accuracy of a certain motion vector set (for example, motion vector set 0) is 1/4 in the encoding and decoding process of any image block in the current image, and the current image is represented by pps_amvr_accuracy 2. Regardless of which image block is encoded or decoded, the default motion vector set (for example, motion vector set 0) has a motion vector precision of 1/2, and pps_amvr_accuracy of 3 indicates which image block is in the current image. During the encoding and decoding process, the default motion vector set of a certain motion vector set (for example, motion vector set 0) is 1.
  • the process 500 may further include:
  • the first identifier is used to indicate a third motion vector precision
  • the second identifier is used to indicate a third motion vector set; in other words, may be transmitted in the code stream Which of the motion vector sets corresponds to the third motion vector accuracy
  • the identification information (for example, the first identifier and the second identifier) can be used for different codec units such as sequence level, image level, strip level, area level, CTU level, and CU level.
  • the identification information can be carried in a sequence parameter set, an image parameter set or a slice header of the image block.
  • the identification information (for example, the first identifier (specifically, the motion vector precision index) and the second identifier (specifically, the index of the motion vector set) are written into the image parameter set PPS header information.
  • the specific syntax structure "Picture parameter set RBSP syntax" see FIG. 6E, where pps_amvr set_idx represents an index of the motion vector set, and its value range is a positive integer, that is, there is at least one motion vector set; pps_amvr set_accuracy[pps_amvr set_idx] indicates motion
  • the vector collection pps_amvr set_idx corresponds to the value of the motion vector precision.
  • pps_amvr set_accuracy[pps_amvr set_idx] is 0, indicating that the motion vector of the motion vector set specified by pps_amvr set_idx is 1/8 in the encoding and decoding process of the image block in the current image;
  • pps_amvr set_accuracy[pps_amvr set_idx] is 1 indicates that the motion vector of the motion vector set specified by pps_amvr set_idx has a precision of 1/4 in the encoding and decoding process of the image block in the current image, and pps_amvr set_accuracy[pps_amvr set_idx] is 2 indicates the current image.
  • the motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1/2, and pps_amvr set_accuracy[pps_amvr set_idx] of 3 indicates which image block is in the current image.
  • the motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1.
  • the process 500 of the embodiment of the present invention may further include:
  • Step 509 Obtain, according to a motion vector of the current coded image block, a prediction block of a current coded image block, where the motion vector has a target motion vector accuracy;
  • step 509 may be performed by inter prediction module 41 of video encoder 20, such as motion compensation module 44;
  • Motion compensation performed by motion compensation module 44 may involve extracting or generating a prediction block based on a motion vector, for example, motion compensation module 44 may locate a prediction block to which the motion vector is directed in one of the reference image lists. Motion compensation module 44 may also involve performing interpolation of fractional pixel precision.
  • the value of the pixel at integer pixel location 100 generally corresponds to the actual value of the pixel in the reference image. If the target motion vector accuracy is fractional pixel precision (eg, one-half pixel precision, or quarter-pixel precision, or one-eighth pixel precision), then the pixel value of the integer pixel position of the reference image is required.
  • the interpolation filter performs interpolation to obtain a pixel value of the fractional pixel position, thereby obtaining the value of the prediction block of the current block.
  • Step 511 Perform reconstruction on the current coded image block based on the prediction block.
  • step 511 may be performed by a reconstruction module 62 of video encoder 20, such as summer 62.
  • video encoder 20 does not generate residual data, and accordingly, reconstructs the current coded image block based on the prediction block; for certain image blocks or image frames Video encoder 20 generates residual data (also referred to as a residual block), and accordingly reconstructs the current encoded image block based on the predicted block and the residual block.
  • residual data also referred to as a residual block
  • the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained.
  • the adaptive motion vector accuracy for the current coded image block can be adaptively determined. If the number of motion vector sets is N, the video encoder can support M motion vector MV precision, where M is less than or equal to N, M, and N. All of them are positive integers, for example, M, N is greater than or equal to 3, which improves the motion vector prediction accuracy. Specifically, since the embodiment of the present invention can adaptively select motion vector accuracy, one or more images corresponding to some video content.
  • Blocks using motion vectors with higher pixel precision (eg 1/8 pixel precision) versus motion vectors using lower pixel precision, improve video codec quality, and the benefits are better than interpolation overhead costs, such as a prediction block obtained based on a motion vector having high pixel precision (for example, 1/8 pixel precision) is closer to the original of the currently coded image block Block, even if interpolating the fractional pixel position results in some interpolation overhead; for one or more image blocks corresponding to some video content, using lower pixel precision motion vectors (eg integer pixel precision) versus using higher pixels
  • the precision motion vector has neither reduced the video coding and decoding quality nor the interpolation overhead cost. Therefore, the video coding method in the embodiment of the present application improves the coding and decoding performance as a whole.
  • the video encoder can adaptively select the target motion vector precision to encode the MVD information, for example, the scaled (eg, reduced) processed MVD occupies fewer bits or occupies the same number of bits relative to the original MVD, The former can also reduce the bit transmission overhead, thereby further improving the codec performance;
  • the video encoder of the embodiment of the invention does not signal any information related to the motion vector accuracy or only signals the motion vector precision of the important motion vector set, and can further save the bit while improving the coding efficiency. Overhead, which further improves the codec performance.
  • FIG. 7 is a schematic flowchart of a video decoding method according to an embodiment of the present application.
  • the process 700 shown in Figure 7 can be performed by a video decoding device, a video decoder (e.g., video decoder 30), and other devices having video decoding capabilities.
  • Process 700 is described as a series of steps or operations, it being understood that process 700 can be performed in various sequences and/or concurrently, and is not limited to the order of execution shown in FIG. Assuming that a video data stream having multiple video frames is using a video decoder, a process 700 comprising the steps of decoding the current image block of the current video frame is performed;
  • the method shown in FIG. 7 includes steps 701 to 709, and steps 701 to 709 are described in detail below.
  • Step 701 Receive a code stream, where the code stream carries motion vector difference (MVD) information of an image block currently being decoded (referred to as a current decoded image block or a current image block), and from the code Parsing the MVD information in the stream;
  • MVD motion vector difference
  • step 701 can be performed by entropy decoding module 80 of video decoder 30;
  • step 701 can include: receiving a code stream, where the code stream includes motion vector difference (MVD) information of a currently decoded image block and a candidate motion vector predictor (MVP) for indicating a currently decoded image block.
  • MVD motion vector difference
  • MVP candidate motion vector predictor
  • the MVD information of the current decoded image block may be the MVD of the currently decoded image block, or may be the scaled processed MVD of the currently decoded image block.
  • Step 703 Acquire a motion vector predictor MVP of the current decoded image block.
  • step 703 can be performed by prediction module 81 of video decoder 30, such as inter prediction module 82 (also referred to as motion compensation module 82) in prediction module 81;
  • inter prediction module 82 also referred to as motion compensation module 82
  • step 703 may include determining a candidate motion vector predictor of the currently decoded image block from the candidate motion vector prediction list based on the third identifier (eg, an index number); as an example, in In the case where the inter prediction mode of the currently decoded image block is the AMVP mode, an AMVP candidate MVP list of the current decoded image block is constructed; and the AMVP candidate is based on the third identifier (eg, an index number)
  • a candidate motion vector predictor also referred to as a best candidate MVP of the current decoded image block is determined in the motion vector predictor list; and referring to FIG. 6A or FIG.
  • the video decoder 30 may employ a video encoder 20 similar to the video encoder 20
  • a Decoder-side motion vector derivation (DMVD) technique in particular, a template matching (TM) method, may be used to obtain the current decoding.
  • the TM method refers to determining a part of the area adjacent to the current image block space as a template TMc (for example, a part of the adjacent left part and/or a part of the adjacent upper side), for which the template searches for the best matching template in the reference image ( It has the same size and shape as the template, called TMr.
  • the predicted value of the motion vector of the current image block is determined according to the positions of the two templates.
  • the interval between the two templates may be an integer pixel value or a non-integer pixel value, for example, but not limited to, one-half pixel, one-quarter pixel or one-eighth pixel.
  • integer pixel value for example, but not limited to, one-half pixel, one-quarter pixel or one-eighth pixel.
  • a Decoder-side motion vector derivation (DMVD) technique in particular, a Bilateral matching method, is used to obtain the current decoded image block.
  • MVP Motion vector predictor
  • the principle of the two-way matching method is to assume that the object is moving in a straight line, and the most matching block can be found among two different reference frames along the motion track of the current block. For example, given a forward MV0, first determine its corresponding backward MV1, MV0 and MV1 are mirrored. Specifically, from the magnitude of the MV, MV0 and MV1 are proportional to the time domain interval (TD0, TD1) between the current image and the two reference images.
  • TD0, TD1 time domain interval
  • MV0 and MV1 point in opposite directions.
  • Two matching blocks are respectively determined among the two reference frames according to MV0 and MV1, and the relative positions of the two matching blocks with respect to the current block are the predicted values of the MV of the current block.
  • the MV pair with the smallest SAD can be selected as the motion vector predictor that is closest to the motion vector of the current block.
  • Step 705 When the motion vector predictor is included in the target motion vector set corresponding to the target motion vector precision (for example, when the motion vector predictor is included in the target motion vector set, according to the multiple motion vector set Corresponding to the plurality of motion vector precisions, determining that the target motion vector accuracy corresponding to the target motion vector set is the motion vector accuracy of the motion vector predictor), based on the motion vector predictor, the motion vector difference The value information and the target motion vector precision, the motion vector of the current decoded image block is obtained, wherein the motion vector of the current decoded image block has the target motion vector precision, and the target motion vector set is a plurality of motions One of the vector sets, the target motion vector precision being one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including the first motion vector set and a second motion vector set, the first motion vector set and the second motion vector set At least one motion vector set includes two or more motion vector predictors, and the first motion vector
  • step 705 can be performed by prediction module 81 of video decoder 30, such as inter prediction module 82 in prediction module 81;
  • step 705 may include: step 7051 and step 7052, and step 7051 and step 7052 will be described in detail below.
  • Step 7051 determining that the motion vector predictor is included in the target motion vector set, and determining, according to a correspondence between the multiple motion vector sets and the plurality of motion vector precisions, a target motion vector accuracy corresponding to the target vector set.
  • the motion vector predictor has a corresponding/corresponding motion vector accuracy;
  • the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets.
  • a plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
  • the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current image block is different from the motion vector in the second motion vector set.
  • a second distance between the second neighboring block and the current image block corresponding to the predicted value, the first neighboring block and the second neighboring block being included in the spatial neighboring block and/or the time domain neighboring block of the current image block.
  • the first distance herein is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image block.
  • the distance of the center point pixel position; the second distance here is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the center point pixel position of the second neighboring block relative to the current.
  • the distance from the center point pixel position of the image block but the application is not limited thereto. It should be understood that the first and second statements herein are merely for convenience of description.
  • the spatial neighboring block herein may include one or more spatial neighboring blocks adjacent to the current image block in the image of the current image block.
  • the spatial neighboring block of the current image block includes: a spatial neighboring block A0 located at a lower left side of the current image block, and a spatial neighboring block A1 located at a left side of the current image block, located in the current image.
  • the spatially adjacent block B0 on the upper right side of the block is located in the spatial neighboring block B1 on the upper side of the current image block, and/or in the spatial adjacent block B2 on the upper left side of the current image block.
  • the time domain neighboring block herein may include one or more airspace neighboring blocks in the reference image adjacent to the co-located block, and/or one of the collocated blocks or a plurality of sub-blocks, wherein the collocated block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
  • the reference image herein refers to a reconstructed image.
  • the reference image herein refers to a reference image in one or more reference image lists, for example, may be a reference corresponding to a specified reference image index in the specified reference image list.
  • the image may also be the reference image in the first position in the default reference image list, which is not limited in this application.
  • the current image block adjacent time-domain blocks may include: a lower right airspace collocated block of the current image block (co-located blocks) neighboring blocks T BR, facing the intermediate block and Block T c , and/or the upper left block T TL block of the collocated block.
  • the first neighboring block corresponding to the motion vector predictor in the first motion vector set corresponds to a first distance of the current image block that is smaller than a motion vector predictor in the second motion vector set.
  • the first motion vector accuracy corresponding to the first motion vector set is higher than the second motion vector precision corresponding to the second motion vector set;
  • the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is greater than the second neighboring block corresponding to the motion vector predictor in the second motion vector set
  • the first motion vector accuracy corresponding to the first motion vector set is lower than the second motion vector accuracy corresponding to the second motion vector set.
  • the correspondence between multiple motion vector sets in step 7051 and multiple motion vector precisions is obtained in at least four ways:
  • the first mode the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset by the decoding end (for example, the video decoder 30), for example, according to a preset rule or a preset manner, for example, It may be a correspondence relationship set according to a set of preset fixed value motion vector precision and a preset motion vector precision assignment rule "the closer the distance is, the higher the motion vector accuracy is, the farther the distance is, the lower the motion vector accuracy is.”
  • the distance between the location of the candidate motion vector predictor (ie, the neighboring block where the candidate motion vector predictor is located) and the current image block may be Determining a plurality of motion vector sets, for example, dividing the plurality of candidate motion vector predictors used to construct the candidate motion vector prediction list into a plurality of motion vector sets, each motion vector set including one or one for constructing a candidate motion vector prediction list a plurality of candidate motion vector predictors, and the at least one motion vector set includes a plurality of candidate motion vector predictors; the encoding end and the decoding end pre-agreed a set of motion vector precisions, for example, ⁇ 1/4, 1/2, 1, 2, 4,8, etc., the decoding end according to the preset motion vector accuracy assignment rule "the closer the distance, the higher the motion vector accuracy, the farther the distance is, the lower the motion vector accuracy" sets the motion vector precision of each
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A1 , MV B1 1/4 1 MV A0 , MV B0 1/2 2 MV B2 1 3 MV T 2
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A , MV L 1/4 1 MV AL 1/2 2 MV AR , MV BL 1 3 MV T 2
  • the second mode the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset by the decoding end (for example, the video decoder 30).
  • the decoding end and the decoding end pre-agreed each motion vector set (pre- Set the position motion vector prediction values belonging to each motion vector set and the preset motion vector precision; as shown in Table-7B and Table-8B, for the other way to obtain the MVP, the corresponding motion vector precision may also be preset.
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A1 , MV B1 1/4 1 MV A0 , MV B0 1/2 2 MV B2 1 3 MV T 2 4 MVP obtained in other ways 4
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A , MV L 1/4 1 MV AL 1/2 2 MV AR , MV BL 1 3 MV T 2 4 MVP obtained in other ways 4
  • the third mode the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset by the decoding end (for example, the video decoder 30), for example, according to a preset rule or a preset manner, and the encoding is performed.
  • the terminal and the decoding end pre-arrange a set of motion vector precisions, for example, ⁇ 1/4, 1/2, 1, 2, 4, 8, etc., which differs from the first mode in that the decoding end determines each of the results according to, for example, probability statistics.
  • the motion vector accuracy of the motion vector set, wherein the aforementioned probability statistics result is used to calculate which of the motion vectors is used with the highest probability;
  • the fourth mode the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be locally determined by the decoding end (for example, the video decoder 30).
  • the multiple motion vector sets are combined.
  • the correspondence between the motion vector precisions is determined according to the motion vector precision assignment rule; specifically, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is based on the motion vector precision assignment rules and the parsing from the code stream Determined by the motion vector precision parameter, the motion vector precision assignment rule is used to represent the distance between the adjacent block corresponding to the motion vector predictor included in the motion vector set and the current image block and the motion vector accuracy.
  • the relationship between the values in other words, "the closer the distance, the higher the motion vector accuracy, and the farther the distance is, the lower the motion vector accuracy is.”
  • the code stream received in step 701 further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, and the motion vector precision parameter is carried in the image block.
  • the motion vector accuracy parameter may include a motion vector accuracy number for a current decoding processing unit and at least two motion vector precision values corresponding to the motion vector precision number, wherein the current The decoding processing unit includes one or more of a video sequence, an image, a slice, a region partition, a CTU, and a CU.
  • the plurality of motion vector precisions herein are greater than or equal to three motion vector precisions.
  • pps_amvr_number represents the number of motion vector precisions available in the current image, and the value range is A positive integer greater than or equal to 1; the value of pps_amvr_number may be determined according to the number and location of candidate motion vector predictors used to construct the candidate motion vector predictor list.
  • Pps_amvr_set[pps_amvr_number] represents the value of the motion vector precision available in the current image.
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A , MV L 1/4 1 MV AL , MV AR , MV BL 1 2 MV T 4
  • the fifth mode is different from the foregoing first to fourth modes in that the coding end indicates the motion vector accuracy of a certain motion vector predictor set by signal; on the basis of any of the foregoing modes, the decoder further parses the code.
  • the stream obtains the motion vector precision of a certain motion vector predictor set, thereby obtaining a correspondence between multiple motion vector sets and various motion vector precisions.
  • the third motion vector set herein represents a set of important motion vector predictor values, that is, a motion vector set formed by one or more motion vector predictors whose probability of being the best motion vector predictor is the largest or larger.
  • the third motion vector accuracy is the motion vector precision used by the third motion vector set.
  • the third motion vector set may be a default set of motion vectors, such as a first motion vector set of the plurality of motion vector sets (the motion vector set 0 in the above table); of course, the third motion
  • the vector precision set may also be a second motion vector set, or may be other motion vector sets different from the first or second motion vector set; further, the third motion vector precision may be the multiple motion vector precision
  • the first motion vector accuracy, or the second motion vector accuracy, or other motion vector accuracy, is not limited in this application.
  • the code stream received in step 701 further carries a first identifier for indicating the accuracy of the third motion vector corresponding to the third motion vector set.
  • the codec terminals may be pre-agreed in advance.
  • the third motion vector accuracy of the transmission corresponds to which motion vector set (or which position motion vector predictor), so that only the indication of the motion vector accuracy needs to be transmitted in the code stream;
  • This identification information (eg, the first identification) can be used for different decoding processing units such as sequence level, image level, strip level, area level, CTU level, CU level, and the like. Accordingly, the identification information can be carried in a sequence parameter set, an image parameter set, a strip header or other location.
  • the identification information (for example, the first identifier, specifically the motion vector accuracy index in Table-6) is used for the image hierarchy. Accordingly, the identification information is carried in the image parameter set PPS header information, in the syntax.
  • pps_amvr_accuracy is 0, indicating that the motion vector accuracy of a certain motion vector set (for example, the third motion vector set) is 1/1 in the decoding process of which image block in the current image. 8.
  • the default motion vector set (for example, the third motion vector set) has a motion vector precision of 1/4, and pps_amvr_accuracy is 2 when In the decoding process of which image block in the current image, the motion vector accuracy of a certain motion vector set (for example, the third motion vector set) is 1/2, and pps_amvr_accuracy is 3, which indicates which one of the current images is.
  • the default motion vector accuracy of a certain motion vector set (for example, the third motion vector set) is 1.
  • the code stream received in step 701 further carries a first identifier for indicating the accuracy of the third motion vector and a second identifier for indicating the third motion vector set.
  • the codec end is not It is pre-agreed which of the motion vector sets (or which position motion vector predictors) the transmitted third motion vector precision corresponds to, and which third motion vector precision corresponds to which motion vector set is also transmitted in the code stream. ;
  • the identification information (eg, the first identifier and the second identifier) can be used for different decoding processing units such as sequence level, image level, strip level, area level, CTU level, CU level, and the like. Accordingly, the identification information can be carried in a sequence parameter set, an image parameter set, a strip header or other location.
  • the identification information (for example, the first identifier (specifically, the motion vector precision index in Table-6) and the second identifier (specifically, the index of the motion vector set) are used for the image hierarchy, and accordingly, this
  • the identifier information is carried in the PPS header information of the image parameter set.
  • pps_amvr set_idx represents an index of the motion vector set, and the value range is a positive integer, that is, there is at least one motion vector set
  • Pps_amvr set_accuracy[pps_amvr set_idx] represents the value of the motion vector precision corresponding to the motion vector set pps_amvr set_idx.
  • pps_amvr set_accuracy[pps_amvr set_idx] is 0, indicating that the motion vector of the motion vector set specified by pps_amvr set_idx is 1/8 in the decoding process of the image block in the current image;
  • pps_amvr set_accuracy[pps_amvr set_idx] is 1 Indicates that the motion vector of the motion vector set specified by pps_amvr set_idx has a precision of 1/4 in the decoding process of the image block in the current image, and pps_amvr set_accuracy[pps_amvr set_idx] is 2, indicating that the current image is In the decoding process of which image block, the motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1/2, and pps_amvr set_accuracy[pps_amvr set_idx] is 3, indicating which image block is de
  • Table-9A and Table-9B the motion vector precision corresponding to each motion vector set is as follows:
  • Motion vector predictor (represented by position) Motion vector accuracy 0 MV A1 , MV B1 1/8 1 MV A0 , MV B0 1/2 2 MV B2 1 3 MV T 2
  • Step 7052 Obtain a motion vector of a currently decoded image block based on the motion vector predictor, the motion vector difference information, and a target motion vector precision; wherein, as an example implementation, calculate the motion vector predictor and a sum of motion vector difference MVD information to obtain a motion vector of the current decoded image block, the motion vector of the current decoded image block, the motion vector predictor value, and the motion vector difference value MVD having the same motion vector accuracy (ie, Both have target motion vector accuracy).
  • the motion vector difference information is scaled (eg, amplified) based on the target motion vector precision to obtain a scaled (eg, amplified) motion vector difference MVD; And a sum of the motion vector predictor and the amplified motion vector difference MVD to obtain a motion vector of the current decoded image block, a motion vector of the currently decoded image block, the motion vector predictor, and a motion vector
  • the difference MVD has the same motion vector accuracy (ie, both have target motion vector accuracy).
  • MV MVP+(MVD ⁇ mvrIdx), where MV represents a motion vector of the currently decoded image block, MVP represents a motion vector predictor of the currently decoded image block, and MVD represents the code.
  • the motion vector difference MVD information in the stream mvrIdx represents the index value of the target motion vector precision, and ⁇ represents the left shift, that is, the amplification processing.
  • the index performs an amplification process on the calculated MVD (for example, shifting left by 2 bits) to obtain an enlarged motion vector difference value MVD.
  • Step 707 Obtain a prediction block of a currently decoded image block based on a motion vector of the current decoded image block having a target motion vector precision.
  • step 707 can be performed by inter prediction module 82 (e.g., motion compensation module 82) of video decoder 30;
  • Motion compensation performed by inter prediction module 82 may involve extracting or generating a prediction block based on a motion vector, for example, inter prediction module 82 may locate a prediction block to which the motion vector is directed in one of the reference image lists. Inter prediction module 82 may also be involved in performing interpolation of fractional pixel precision. Referring to Figure 4B, the value of the pixel at integer pixel location 100 generally corresponds to the actual value of the pixel in the reference image. If the target motion vector accuracy is fractional pixel precision (for example, one-half pixel precision, or quarter-pixel precision, or one-eighth pixel precision), then the pixel value of the entire pixel position of the reference image needs to be adopted. The interpolation filter performs interpolation to obtain a pixel value of the fractional pixel position, thereby obtaining the value of the prediction block of the current block.
  • Step 709 Perform reconstruction on the current decoded image block based on the prediction block, thereby completing a decoding process of the currently decoded image block.
  • step 709 can be performed by reconstruction module 90 of video decoder 30, such as summer 90.
  • the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained.
  • the method can adaptively determine the appropriate motion vector precision for the currently decoded image block. If the number of motion vector sets is N, the video decoder can support M motion vector MV precision, where M is less than or equal to N, Both M and N are positive integers, for example, M, N is greater than or equal to 3, which improves motion vector prediction accuracy.
  • the embodiment of the present invention can adaptively select motion vector accuracy, one or some corresponding to certain video content
  • Multiple image blocks using motion vectors with higher pixel precision (such as 1/8 pixel precision) versus motion vectors using lower pixel precision, improve video codec quality, and the benefits are better than interpolation overhead
  • the cost such as a prediction block based on a motion vector with high pixel precision (eg 1/8 pixel precision), is closer to the current decoding.
  • a motion vector with lower pixel precision (such as integer pixel precision) is used relative to The video decoding method of the embodiment of the present application improves the codec performance as a whole, and the video decoding method of the embodiment of the present application improves the codec performance.
  • the video decoder can adaptively select the target motion vector precision to decode the MVD information in the code stream, and the MVD information in the code stream occupies less bits or occupies the same number of bits relative to the original MVD.
  • the MVD information is amplified or restored to the original MVD according to the target motion vector precision, which saves bit transmission overhead to a certain extent, thereby improving the codec performance;
  • the decoding method of the embodiment of the present invention can be adaptively determined for use in the case where the video encoder does not signal any information related to motion vector accuracy or only signals the motion vector accuracy of the important motion vector set.
  • the motion vector accuracy of the currently decoded image block can further improve the coding efficiency and further save the bit overhead, thereby further improving the encoding and decoding performance.
  • video encoding or decoding method of embodiments of the present application can be implemented in any electronic device or device that requires encoding and/or decoding of a video image.
  • FIG. 11 is a schematic block diagram of an implementation manner of a video encoding device or a video decoding device (referred to as a decoding device 1100) according to an embodiment of the present disclosure.
  • the decoding device 1100 may include a processor 1110, a memory 1130, and a bus system 1150.
  • the processor and the memory are connected by a bus system for storing instructions for executing instructions stored in the memory.
  • the memory of the decoding device stores program code, and the processor can invoke program code stored in the memory to perform various method instances of the video encoding or decoding process described herein to adaptively select a target motion vector for encoding or decoding the image block.
  • Accuracy (such as integer pixel precision or 1/2 pixel precision or 1/4 pixel precision or 1/8 pixel precision or 4 pixel precision, etc.). To avoid repetition, it will not be described in detail here.
  • the processor 1110 may be a central processing unit (CPU), and the processor 1110 may also be other general-purpose processors, digital signal processors (DSPs), and dedicated integration. Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 1130 can include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device can also be used as the memory 1130.
  • Memory 1130 can include code and data 1131 accessed by processor 1110 using bus 1150.
  • Memory 1130 can further include an operating system 1133 and an application 1135 that includes at least one program that allows processor 1110 to perform the video encoding or decoding methods described herein.
  • the application 1135 can include applications 1 through N, which further include a video encoding or decoding application (referred to as a video coding application) that performs the video encoding or decoding methods described herein.
  • the bus system 1150 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 1150 in the figure.
  • the decoding device 1100 may also include one or more output devices, such as a display 1170.
  • display 1170 can be a tactile display or a touch display that combines the display with a tactile unit that operatively senses a touch input.
  • Display 1170 can be coupled to processor 1110 via bus 1150.
  • FIG. 12 is a schematic block diagram of an electronic device 1200 having a video codec function, which may incorporate a video encoder or video decoder in accordance with an embodiment of the present invention, in accordance with an embodiment of the present application.
  • the electronic device 1200 can be, for example, a mobile terminal or user equipment of a wireless communication system. It should be understood that embodiments of the present application can be implemented in any electronic device or device that requires encoding and decoding, or encoding, or decoding of a video image.
  • Device 1200 can include a housing for incorporating and protecting the device.
  • Device 1200 can also include display 1232 in the form of a liquid crystal display.
  • the display may be any suitable display technology suitable for displaying images or video.
  • Device 1200 can also include a user input/output interface 1234.
  • any suitable data or user interface mechanism may be utilized.
  • the user interface can be implemented as a virtual keyboard or data entry system as part of a touch sensitive display, such as a touch screen.
  • the device may include a microphone 1236 or any suitable audio input, which may be a digital or analog signal input.
  • Apparatus 1200 can also include an audio output device, which in an embodiment of the invention can be any of the following: earphone 1238, speaker or analog audio or digital audio output connection.
  • Device 1200 can also include a battery, and in other embodiments of the invention, the device can be powered by any suitable mobile energy device, such as a solar cell, fuel cell, or clock mechanism generator.
  • the device may also include an infrared port 1242 for short range line of sight communication with other devices.
  • device 1200 may also include any suitable short range communication solution, such as a Bluetooth wireless connection or a USB wired connection.
  • Device 1200 can include a controller 56 or processor for controlling device 1200.
  • Controller 56 may be coupled to memory 1258, which may store data in the form of data and audio in an embodiment of the invention, and/or may also store instructions for execution on controller 1256.
  • Controller 1256 can also be coupled to codec circuitry 54 suitable for implementing encoding and decoding of audio and/or video data or assisted encoding and decoding by controller 1256.
  • Apparatus 1200 can also include card reader 1248 and smart card 1246 for providing user information and for providing authentication information for authenticating and authorizing users on the network.
  • Apparatus 1200 can also include a radio interface circuit 1252 that is coupled to the controller and that is adapted to generate wireless communication signals, for example, for communicating with a cellular communication network, a wireless communication system, or a wireless local area network.
  • Apparatus 1200 can also include an antenna 1244 that is coupled to radio interface circuitry 1252 for transmitting radio frequency signals generated at radio interface circuitry 1252 to other apparatus(s) and for receiving radio frequency signals from other apparatus(s).
  • apparatus 1200 includes a camera capable of recording or detecting a single frame, and codec 1254 or controller receives the individual frames and processes them.
  • the device may receive video image data to be processed from another device prior to transmission and/or storage.
  • device 1200 may receive images for encoding/decoding via a wireless or wired connection.
  • the computer readable medium can comprise a computer readable storage medium corresponding to a tangible medium, such as a data storage medium, or any communication medium that facilitates transfer of the computer program from one location to another (eg, according to a communication protocol) .
  • a computer readable medium may generally 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.
  • such computer readable storage medium may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, flash memory or may be used to store instructions or data structures
  • the desired program code in the form of any other medium that can be accessed by a computer.
  • any connection is properly termed a computer-readable medium.
  • a coaxial cable, fiber optic cable, twisted pair cable, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave
  • the coaxial cable Wire, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the media.
  • the computer readable storage medium and data storage medium do not include connections, carrier waves, signals, or other temporary media, but rather are directed to non-transitory tangible storage media.
  • magnetic disks and optical disks include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and blu-ray disc, where the disc typically reproduces data magnetically, while the disc is optically reproduced using a laser data. Combinations of the above should also be included in the scope of computer readable media.
  • DSPs digital signal processors
  • ASICs application specific integrated circuits
  • FPGAs field programmable logic arrays
  • 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.
  • the functions described in the various illustrative logical blocks, modules, and steps described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or Into the combined codec.
  • the techniques may be fully implemented in one or more circuits or logic elements.
  • various illustrative logical blocks, units, modules in video encoder 20 and video decoder 30 may be understood as corresponding circuit devices or logic elements.
  • the techniques of the present application can be implemented in a wide variety of devices or devices, including a wireless handset, an integrated circuit (IC), or a group of ICs (eg, a chipset).
  • IC integrated circuit
  • a group of ICs eg, a chipset
  • Various components, modules or units are described herein to emphasize functional aspects of the apparatus for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Indeed, as described above, various units may be combined in a codec hardware unit in conjunction with suitable software and/or firmware, or by interoperating hardware units (including one or more processors as described above) provide.

Landscapes

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

Abstract

The present application provides a video decoding method and a video decoder. The method comprises: analyzing motion vector difference (MVD) information of a current image block from a code stream; obtaining a motion vector prediction (MVP) value of the current image block; if the MVP is comprised in a target motion vector set corresponding to a target motion vector resolution (MVR), obtaining a motion vector of the current image block on the basis of the MVP, the MVD information, and the MVR, wherein the target motion vector set is one of multiple motion vector sets, the multiple motion vector sets comprise a first motion vector set and a second motion vector set, and a first MVR corresponding to the first motion vector set is different from a second MVR corresponding to the second motion vector set; on the basis of the motion vector having the MVR of the current image block, obtaining a prediction block of the current image block; and reconstructing the current image block on the basis of the prediction block. Embodiments of the present application are favorable for improving the MVP resolution.

Description

视频解码方法、视频解码器以及电子设备Video decoding method, video decoder, and electronic device 技术领域Technical field
本申请涉及视频编解码技术领域,尤其涉及视频解码方法、视频解码器以及电子设备。The present application relates to the field of video codec technology, and in particular, to a video decoding method, a video decoder, and an electronic device.
背景技术Background technique
通过视频压缩技术,例如MPEG(Moving Pictures Experts Group,动态图像专家组)-2、MPEG-4、ITU-T H.263、ITU-T H.264/MPEG-4第10部分高级视频编解码(advanced video coding,AVC)、ITU-T H.265高效率视频编解码(high efficiency video coding,HEVC)以及H.266标准定义的标准和上述标准的扩展部分中所描述的那些视频压缩技术,设备之间可以实现高效地发射及接收数字视频信息。通常情况下,视频序列的图像被划分成图像块进行编码或解码。Through video compression technology, such as MPEG (Moving Pictures Experts Group)-2, MPEG-4, ITU-T H.263, ITU-T H.264/MPEG-4 Part 10 advanced video codec ( Advanced video coding, AVC), ITU-T H.265 high efficiency video coding (HEVC) and the standards defined by the H.266 standard and those described in the extensions of the above standards, devices Efficient transmission and reception of digital video information can be achieved. Typically, an image of a video sequence is divided into image blocks for encoding or decoding.
视频压缩技术中,为了减少或去除视频序列中的冗余信息,引入了基于图像块的空间预测(帧内预测,intra prediction)和/或时间预测(帧间预测,inter prediction)。采用帧间预测技术可以将已编码的图像作为当前帧的参考图像(Reference Frame),为当前图像中的当前图像块寻找匹配的参考块,将参考块中的像素点的像素值作为当前图像块中像素点(sample pixel)的像素值的预测值,并获取当前图像块的运动信息,该运动信息例如可以包括参考块所在图像的指示信息(即参考图像信息)和当前图像块到参考块的位置偏移信息(即运动矢量MV)。图像可被称作帧,且参考图像可被称作参考帧。In video compression technology, in order to reduce or remove redundant information in a video sequence, image block based spatial prediction (intra prediction) and/or temporal prediction (inter prediction) are introduced. The inter-frame prediction technique can be used as a reference frame of the current frame as a reference frame of the current frame, and a matching reference block is found for the current image block in the current image, and the pixel value of the pixel in the reference block is used as the current image block. a predicted value of a pixel value of a sample pixel, and acquiring motion information of the current image block, the motion information may include, for example, indication information of the image in which the reference block is located (ie, reference image information) and a current image block to the reference block Position offset information (ie motion vector MV). An image may be referred to as a frame, and a reference image may be referred to as a reference frame.
为了减少传输运动信息所需的比特开销,可以使用邻近位置的运动信息来预测当前位置的运动信息。将运动信息中的运动矢量进行差分编码,分为运动矢量预测值(Motion Vector Prediction,MVP)和运动矢量差(Motion Vector Difference,MVD)两部分。运动矢量预测值可以由时域和/或空域邻近位置的运动矢量推导得出,且运动矢量预测值不编码、或者不直接编码入码流,而在码流中可以编码传输MVD信息。在解码过程中,解码端提取码流中的MVD信息,并推导出运动矢量预测值,计算运动矢量预测值和MVD之和以得到最终MV。推导出的运动矢量预测值越接近最终MV,需要传递的MVD信息越小。In order to reduce the bit overhead required to transmit motion information, motion information of neighboring locations may be used to predict motion information for the current location. The motion vector in the motion information is differentially encoded and divided into two parts: Motion Vector Prediction (MVP) and Motion Vector Difference (MVD). The motion vector predictor may be derived from the motion vector of the temporal and/or spatial neighboring locations, and the motion vector predictor is not encoded or encoded directly into the codestream, and the transmitted MVD information may be encoded in the codestream. In the decoding process, the decoding end extracts the MVD information in the code stream, and derives the motion vector prediction value, and calculates the sum of the motion vector prediction value and the MVD to obtain the final MV. The closer the derived motion vector predictor is to the final MV, the smaller the MVD information that needs to be transmitted.
目前常规的H.264及H.265视频编码器与视频解码器之间仅支持传输具有四分之一像素精度的运动矢量差信息,且四分之一像素精度是固定设置的。然而,实际场景中物体运动的距离可能分布在不同像素精度位置,因此目前做法会导致运动矢量预测不准确的情况,从而导致运动矢量预测精度的偏差。Currently, conventional H.264 and H.265 video encoders and video decoders only support transmission of motion vector difference information with quarter-pixel precision, and quarter-pixel precision is fixed. However, the distance of object motion in the actual scene may be distributed at different pixel precision positions, so the current practice may result in inaccurate motion vector prediction, resulting in deviation of motion vector prediction accuracy.
发明内容Summary of the invention
本申请实施例提供视频解码方法、视频解码器以及相应的电子设备,以提高运动矢量预测精度,从而提高编解码性能。The embodiments of the present application provide a video decoding method, a video decoder, and corresponding electronic devices to improve motion vector prediction accuracy, thereby improving codec performance.
第一方面,本申请实施例提供了一种视频解码方法,该方法包括:接收码流,所述码流携带有当前解码图像块的运动矢量差值MVD信息;从所述码流中解析出所述运动矢量差 值MVD信息;获取所述当前解码图像块的运动矢量预测值MVP;当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的运动矢量精度),基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;基于所述当前解码图像块的运动矢量,得到当前解码图像块的预测块(亦可理解为当前解码图像块的像素值的预测值);基于所述预测块对所述当前解码图像块进行重建。In a first aspect, an embodiment of the present application provides a video decoding method, where the method includes: receiving a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block; and parsing out from the code stream. The motion vector difference MVD information; acquiring a motion vector predictor MVP of the current decoded image block; when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy (eg, When the motion vector predictor is included in the target motion vector set, determining, according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, the target motion vector accuracy corresponding to the target motion vector set is the motion vector predictor Having a motion vector accuracy), based on the motion vector predictor, the motion vector difference information, and the target motion vector accuracy, obtaining a motion vector of the current decoded image block, wherein the current decoded image block The motion vector has the target motion vector precision, and the target motion vector set is a plurality of motion vector sets One of the target motion vector precisions is one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion a vector set, the at least one of the first motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion vector precision corresponding to the first motion vector set Different from the second motion vector precision corresponding to the second motion vector set; based on the motion vector of the current decoded image block, obtaining a prediction block of the current decoded image block (which may also be understood as a pixel value of the currently decoded image block) Predicting value); reconstructing the current decoded image block based on the prediction block.
此外,应当理解的是,这里的当前图像块(简称为当前块)可以理解为当前正在处理的图像块。例如在编码过程中,当前图像块或当前编码图像块指当前正在编码的图像块(encoding block);在解码过程中,当前图像块或当前解码图像块指当前正在解码的图像块(decoding block)。Furthermore, it should be understood that the current image block (abbreviated as the current block) herein can be understood as the image block currently being processed. For example, in the encoding process, the current image block or the current encoded image block refers to an encoding block currently being encoded; in the decoding process, the current image block or the currently decoded image block refers to a decoding block currently being decoded (decoding block). .
此外,应当理解的是,为当前图像块提供预测的块称为预测块。预测块内的像素值或者采样值或者采样信号,称为预测信号。Furthermore, it should be understood that the block that provides the prediction for the current image block is referred to as a prediction block. The pixel value or sampled value or sampled signal within the prediction block is called a prediction signal.
应当理解的是,本申请实施例的方法的执行主体可以是视频解码器或具有视频解码功能的电子设备。It should be understood that the execution body of the method of the embodiment of the present application may be a video decoder or an electronic device having a video decoding function.
可见,本申请实施例的视频解码方法中,在视频解码器获取当前解码图像块的运动矢量预测值之后,通过该运动矢量预测值所属的目标运动矢量集合所对应的目标运动矢量精度的方式,能自适应确定用于当前解码图像块的适当的运动矢量精度,如果运动矢量集合的数目为N,则视频解码器可支持M种运动矢量精度,其中M小于或等于N,M和N均为正整数,提高了运动矢量预测精度,具体地,由于本发明实施例能自适应地选择运动矢量精度,针对某些视频内容对应的一个或多个图像块,使用具有较高像素精度(例如1/8像素精度)的运动矢量相对于使用较低像素精度的运动矢量,提高了视频编解码质量,而且带来的益处优于内插开销代价,比如基于具有高像素精度(例如1/8像素精度)的运动矢量得到的预测块更接近于当前解码图像块的原始块,即使内插分数像素位置导致了一些内插开销;而针对某些视频内容对应的一个或多个图像块,使用较低像素精度的运动矢量(例如整数像素精度)相对于使用较高像素精度的运动矢量,既没有降低视频编解码质量,还避免了内插开销代价,因此,本申请实施例的视频解码方法整体上提高了编解码性能。It can be seen that, in the video decoding method of the embodiment of the present application, after the video decoder obtains the motion vector predictor of the currently decoded image block, the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained. The adaptive motion vector accuracy for the currently decoded image block can be adaptively determined. If the number of motion vector sets is N, the video decoder can support M kinds of motion vector precision, where M is less than or equal to N, M and N are A positive integer improves the motion vector prediction accuracy. Specifically, since the embodiment of the present invention can adaptively select motion vector precision, one or more image blocks corresponding to some video content are used with higher pixel precision (for example, 1 /8 pixel precision) motion vectors improve video codec quality relative to motion vectors using lower pixel precision, and the benefits are better than interpolation overhead, such as based on high pixel precision (eg 1/8 pixel) The motion vector obtained by the motion vector is closer to the original block of the currently decoded image block, even if the fractional pixel bit is interpolated The placement results in some interpolation overhead; for one or more image blocks corresponding to certain video content, using lower pixel precision motion vectors (eg integer pixel precision) versus motion vectors using higher pixel precision, neither The video coding and decoding quality is reduced, and the interpolation overhead cost is also avoided. Therefore, the video decoding method of the embodiment of the present application improves the codec performance as a whole.
结合第一方面,在第一方面的某些实现方式中,所述当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值(MVD)信息以及目标运动矢量精度,得到所述当前待解码图像块的运动矢量,包括:With reference to the first aspect, in some implementations of the first aspect, when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy, based on the motion vector predictor, The motion vector difference (MVD) information and the target motion vector accuracy are obtained, and the motion vector of the current image block to be decoded is obtained, including:
确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运 动矢量预测值具有的运动矢量精度;Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has the motion vector accuracy;
计算所述运动矢量预测值和所述运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述运动矢量预测值和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度);或者,Calculating a sum of the motion vector predictor and the motion vector difference MVD to obtain a motion vector of the current decoded image block, a motion vector of the current decoded image block, the motion vector predictor, and a motion vector difference The value MVD has the same motion vector precision (that is, both have the target motion vector precision); or,
基于所述目标运动矢量精度(例如基于目标运动矢量精度的索引值)对所述运动矢量差值信息进行缩放(例如放大)处理,以得到经缩放(例如经放大)的运动矢量差值MVD;计算所述运动矢量预测值和所述经放大的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述运动矢量预测值和经放大的运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度)。And scaling (eg, amplifying) the motion vector difference information based on the target motion vector precision (eg, an index value based on target motion vector accuracy) to obtain a scaled (eg, amplified) motion vector difference MVD; Calculating a sum of the motion vector predictor and the amplified motion vector difference MVD to obtain a motion vector of the current decoded image block, a motion vector of the current decoded image block, the motion vector predictor, and The amplified motion vector difference MVD has the same motion vector accuracy (ie, both have target motion vector accuracy).
需要说明的是,这里的多个运动矢量集合与多种运动矢量精度的对应关系可以是一一对应关系,也可以是M:N的对应关系,M不等于N,例如,多个运动矢量集合与多种运动矢量精度也可以是一对多或多对一的对应关系,本申请实施例对此不作限定。It should be noted that the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets. A plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
可见,本申请实施例中,针对从所述码流中解析出的当前解码图像块的运动矢量差值MVD信息,在视频解码器推导出当前解码图像块的运动矢量预测值之后,根据多个运动矢量集合与多种运动矢量精度的对应关系,自适应的推导出目标运动矢量精度,根据自适应推导得来的目标运动矢量精度对所述解析出的MVD信息进行缩放(例如放大)处理,以将所述解析出的运动矢量差信息恢复成视频编码端缩放(例如缩小)处理前的运动矢量差信息,从而保证了运动矢量差缩放的准确性,而且经缩放处理的MVD信息相对于原始MVD信息占用较少的比特开销或相同的比特开销,从而提高了编解码性能。It can be seen that, in the embodiment of the present application, after the motion vector difference value MVD information of the current decoded image block parsed from the code stream is deduced by the video decoder, the motion vector predictor value of the current decoded image block is determined according to multiple Corresponding relationship between the motion vector set and various motion vector precisions, adaptively deriving the target motion vector precision, and scaling (for example, amplifying) the parsed MVD information according to the adaptively derived target motion vector precision, And recovering the parsed motion vector difference information into video encoding end scaling (eg, reducing) motion vector difference information before processing, thereby ensuring accuracy of motion vector difference scaling, and scaling the processed MVD information relative to the original The MVD information occupies less bit overhead or the same bit overhead, thereby improving codec performance.
结合第一方面,在第一方面的某些实现方式中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。需要说明的是,这里的第一邻近块泛指:分组到第一运动矢量集合中的MVPs所对应的空域和/或时域邻近块,如表-7A所示,第一邻近块可指空域邻近块A1和B1;以及,这里的第二邻近块泛指:分组到第二运动矢量集合中的MVPs所对应的空域和/或时域邻近块,如表-7A所示,第二邻近块可指空域邻近块A0和B0。With reference to the first aspect, in some implementations of the first aspect, the first neighboring block corresponding to the motion vector predictor in the first motion vector set has a first distance from the current image block different from the second a second distance between the second neighboring block and the current image block corresponding to the motion vector predictor in the motion vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and/ Or in a time domain adjacent to the block. It should be noted that the first neighboring block herein refers to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the first motion vector set. As shown in Table-7A, the first neighboring block may refer to the airspace. The neighboring blocks A1 and B1; and the second neighboring block herein generally refer to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the second motion vector set, as shown in Table-7A, the second neighboring block It can refer to the airspace adjacent blocks A0 and B0.
需要说明的是,这里的第一距离,例如是第一邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第一邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离;这里的第二距离例如是第二邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第二邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离,但本申请并不限于此。It should be noted that the first distance herein is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image block. The distance of the center point pixel position; the second distance here is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the center point pixel position of the second neighboring block relative to the current The distance from the center point pixel position of the image block, but the application is not limited thereto.
需要说明的是,这里的空域邻近块可以包括当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域邻近块。It should be noted that the spatial neighboring block herein may include one or more spatial neighboring blocks adjacent to the current image block in the image of the current image block.
需要说明的是,这里的时域邻近块可以包括参考图像中、与并置块(co-located块)邻近的一个或多个空域邻近块,和/或,所述并置块中的一个或多个子块,其中,所述并置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。It should be noted that the time domain neighboring block herein may include one or more airspace neighboring blocks in the reference image adjacent to the co-located block, and/or one of the collocated blocks or a plurality of sub-blocks, wherein the collocated block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
结合第一方面,在第一方面的某些实现方式中,如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离小于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运 动矢量集合对应的第一运动矢量精度(例如1/8像素精度)高于所述第二运动矢量集合对应的第二运动矢量精度(例如1/4像素精度);或者,With reference to the first aspect, in some implementations of the first aspect, if the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the second motion vector set and the current decoded image block, and the first motion vector precision corresponding to the first motion vector set (eg, 1/8 pixel precision) Higher than the second motion vector accuracy corresponding to the second motion vector set (eg, 1/4 pixel precision); or,
如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度(例如1/4像素精度)低于所述第二运动矢量集合对应的第二运动矢量精度(例如1/8像素精度)。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set a second distance between the block and the currently decoded image block, the first motion vector precision corresponding to the first motion vector set (eg, 1/4 pixel precision) is lower than the second motion vector accuracy corresponding to the second motion vector set (eg 1/8 pixel accuracy).
需要说明的是,这里是针对不同运动矢量集合的说明,而针对某个运动矢量预测值所对应的邻近块与当前图像块的距离等于另一个运动矢量预测值所对应的邻近块与当前图像块的距离的情况,一般是将这两个运动矢量预测值分组到同一运动矢量集合中。It should be noted that, here is a description for different sets of motion vectors, and the distance between the neighboring block corresponding to a certain motion vector predictor and the current image block is equal to the neighboring block and the current image block corresponding to the predicted value of the other motion vector. In the case of the distance, it is common to group the two motion vector predictors into the same motion vector set.
结合第一方面,在第一方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是预先设置的。In conjunction with the first aspect, in some implementations of the first aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
结合第一方面,在第一方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的,其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前图像块之间的距离与运动矢量精度的取值大小之间的关系。所述运动矢量精度赋值规则可以理解为:运动矢量预测值所对应的邻近块与当前解码图像块的距离越近,运动矢量精度越高;运动矢量预测值所对应的邻近块与当前解码图像块的距离越远,运动矢量精度越低。此外,这里的邻近块可以包括但不限于:所述当前解码图像块的空域邻近块和/或时域邻近块。With reference to the first aspect, in some implementations of the first aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current image block and the magnitude of the motion vector precision. The motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current decoded image block, the higher the motion vector accuracy; the neighboring block corresponding to the motion vector predictor and the currently decoded image block The farther the distance is, the lower the motion vector accuracy. Furthermore, the neighboring blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the currently decoded image block.
结合第一方面,在第一方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述当前解码图像块的序列参数集、图像参数集PPS、条带slice头或者某个其它层级位置处中的任意一种。较优的,这里的多种运动矢量精度可以大于或等于三种运动矢量精度。In conjunction with the first aspect, in some implementations of the first aspect, the code stream further carries a motion vector accuracy parameter, the motion vector accuracy parameter being used to indicate a value of the plurality of motion vector precisions, the motion The vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS, a stripe slice header, or some other hierarchical position of the currently decoded image block. Preferably, the various motion vector precisions herein may be greater than or equal to the three motion vector precisions.
结合第一方面,在第一方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示用于当前解码处理单元的运动矢量精度个数(例如pps_amvr_number)和与所述运动矢量精度个数对应的至少两种运动矢量精度值(例如pps_amvr_set[pps_amvr_number]),其中所述当前解码处理单元包括视频序列、图像、条带slice、区域partition、CTU和CU中的一种或多种。With reference to the first aspect, in some implementations of the first aspect, the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a CTU And one or more of the CUs.
可见,本申请实施例的解码方法中,有利于视频解码器根据从码流中解析出的运动矢量精度参数和运动矢量精度赋值规则而设置所述多个运动矢量集合与所述多种运动矢量精度的对应关系,从而有利于视频解码器自适应地确定用于解码图像块的目标运动矢量精度(例如整像素精度或1/2像素精度或1/4像素精度或1/8像素精度或4像素精度等)。It can be seen that, in the decoding method of the embodiment of the present application, the video decoder is configured to set the multiple motion vector set and the multiple motion vectors according to the motion vector precision parameter and the motion vector precision assignment rule parsed from the code stream. The correspondence of precision, thereby facilitating the video decoder to adaptively determine the target motion vector accuracy for decoding the image block (eg, integer pixel precision or 1/2 pixel precision or 1/4 pixel precision or 1/8 pixel precision or 4 Pixel accuracy, etc.).
结合第一方面,在第一方面的某些实现方式中,所述码流进一步携带有第一标识,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;例如,第一标识可以携带在所述解码图像块的序列参数集、图像参数集或者条带头中的任意一种中;或者,With reference to the first aspect, in some implementations of the first aspect, the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; for example, The first identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block; or
所述码流进一步携带有第一标识和第二标识,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;例如,第一标识和第二标识可以携带在所述解码图像块的序列参数集、图像参数集或者条带头中的任意一种中;The code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector accuracy, and the second identifier is used to indicate a third motion vector set; for example, the first identifier and the first identifier The second identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block;
其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者 第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度。The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
可见,在视频编码器仅发信号通知重要运动矢量集合的运动矢量精度的情况下,本发明实施例的解码方法能自适应确定用于当前解码图像块的运动矢量精度,而且通过针对重要运动矢量集合传递flag表示具体对应的运动矢量精度,也提高了编解码效率。It can be seen that in the case that the video encoder only signals the motion vector accuracy of the important motion vector set, the decoding method of the embodiment of the present invention can adaptively determine the motion vector accuracy for the currently decoded image block, and by targeting the important motion vector. The set delivery flag indicates the specific motion vector accuracy and also improves the encoding and decoding efficiency.
结合第一方面,在第一方面的某些实现方式中,所述码流还携带有第三标识(例如,候选预测运动矢量索引),所述第三标识用于指示当前解码图像块的候选运动矢量预测值MVP(例如,候选预测运动矢量索引可指示在候选运动矢量预测列表中被选定的候选运动矢量预测值的位置);相应地,所述获取所述当前待解码图像块的运动矢量预测值MVP,包括:基于所述第三标识从候选运动矢量预测值列表(motion vector prediction candidate list)中确定所述当前待解码图像块的候选运动矢量预测值MVP;或者,In conjunction with the first aspect, in some implementations of the first aspect, the code stream further carries a third identifier (eg, a candidate predicted motion vector index), the third identifier is used to indicate a candidate for the currently decoded image block a motion vector predictor MVP (eg, the candidate predicted motion vector index may indicate a location of the candidate motion vector predictor selected in the candidate motion vector prediction list); accordingly, the acquiring the motion of the current image block to be decoded The vector predictor value MVP includes: determining, according to the third identifier, a candidate motion vector predictor MVP of the current image block to be decoded from a motion vector prediction candidate list; or
所述获取所述当前待解码图像块的运动矢量预测值MVP,包括:采用双向匹配方法或者模板匹配方法,获取所述当前待解码图像块的运动矢量预测值MVP。The acquiring the motion vector predictor MVP of the current image block to be decoded includes: acquiring a motion vector predictor MVP of the current image block to be decoded by using a bidirectional matching method or a template matching method.
可见,一方面,本申请实施例的视频解码方法,不仅适用于高级运动矢量预测模式(advanced motion vector prediction,AMVP)下的候选运动矢量预测值列表,而且也适用于其它模式下使用空域邻近块和/或时域邻近块的运动矢量构建的候选运动矢量预测值列表,从而提高编解码性能。另一方面,本发明实施例的视频解码方法可以支持多种获取运动矢量预测值的方法,从而提高了视频解码方法的灵活性。It can be seen that, on the one hand, the video decoding method in the embodiment of the present application is applicable not only to the candidate motion vector predictor list in the advanced motion vector prediction mode (AMVP), but also to the spatial neighboring block in other modes. And/or a list of candidate motion vector predictors constructed by motion vectors of temporally neighboring blocks, thereby improving codec performance. On the other hand, the video decoding method of the embodiment of the present invention can support multiple methods for acquiring motion vector predictors, thereby improving the flexibility of the video decoding method.
本申请的第二方面提供一种视频解码器,包括:熵解码模块,用于接收码流,所述码流携带有当前待解码图像块的运动矢量差值(MVD)信息,并从所述码流中解析出所述当前待解码图像块的运动矢量差值信息;帧间预测模块,用于获取所述当前待解码图像块的运动矢量预测值(MVP);当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;以及,基于所述当前解码图像块的具有所述目标运动矢量精度的运动矢量进行运动补偿,以得到所述当前待解码图像块的预测块(亦可理解为当前解码图像块的像素值的预测值);以及,重建模块,用于基于所述当前解码图像块的预测块(亦可理解为当前解码图像块的像素值的预测值)对所述当前解码图像块进行重建。其中,这里的“当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量”,例如可以是,“当所述运动矢量预测值被包括于所述目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的运动矢量精度;基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量)。A second aspect of the present application provides a video decoder, including: an entropy decoding module, configured to receive a code stream, where the code stream carries motion vector difference (MVD) information of an image block to be currently decoded, and from the The motion vector difference information of the current image block to be decoded is parsed in the code stream; the inter prediction module is configured to acquire a motion vector predictor (MVP) of the current image block to be decoded; when the motion vector predictor When the target motion vector set corresponding to the target motion vector accuracy is included, the motion vector of the current decoded image block is obtained based on the motion vector predictor, the motion vector difference information, and the target motion vector precision, The motion vector of the currently decoded image block has the target motion vector precision, and the target motion vector set is one of a plurality of motion vector sets, and the target motion vector precision includes a first motion vector accuracy and a first One of a plurality of motion vector precisions of motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion a vector set, the at least one of the first motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion vector precision corresponding to the first motion vector set Differentiating the second motion vector precision corresponding to the second motion vector set; and performing motion compensation based on the motion vector of the current decoded image block having the target motion vector accuracy to obtain the current image to be decoded a prediction block of a block (which may also be understood as a predicted value of a pixel value of a currently decoded image block); and a reconstruction module for predicting a block based on the currently decoded image block (also as a pixel value of the currently decoded image block) The predicted value of the reconstructed image block is reconstructed. Wherein, "when the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy, based on the motion vector predictor, the motion vector difference information, and the target motion vector accuracy Obtaining a motion vector of the current decoded image block, for example, "when the motion vector predictor is included in the target motion vector set, according to a plurality of motion vector sets and corresponding to a plurality of motion vector precisions Determining, by the relationship, a target motion vector accuracy corresponding to the target motion vector set as a motion vector accuracy of the motion vector predictor; based on the motion vector predictor, the motion vector difference information, and the target motion vector accuracy And obtaining a motion vector of the current decoded image block).
结合第二方面,在第二方面的某些实现方式中,在所述当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值信息以及目标运动矢量精度,得到所述当前解码图像块的运动矢量的方面,所述帧间预测模块具体用于:With reference to the second aspect, in some implementations of the second aspect, when the motion vector predictor is included in a target motion vector set corresponding to the target motion vector accuracy, based on the motion vector predictor, And the motion vector difference information and the target motion vector precision, to obtain an aspect of the motion vector of the current decoded image block, where the inter prediction module is specifically configured to:
确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的运动矢量精度;Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has the motion vector accuracy;
计算所述运动矢量预测值和所述运动矢量差值MVD信息之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述运动矢量预测值和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度);或者,Calculating a sum of the motion vector predictor and the motion vector difference MVD information to obtain a motion vector of the current decoded image block, a motion vector of the currently decoded image block, the motion vector predictor, and a motion vector The difference MVD has the same motion vector precision (that is, both have the target motion vector precision); or,
基于所述目标运动矢量精度对所述运动矢量差值信息进行缩放(例如放大)处理,以得到经缩放(例如经放大的)的运动矢量差值MVD;计算所述运动矢量预测值和所述经放大的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述运动矢量预测值和经放大的运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度)。And scaling (eg, amplifying) the motion vector difference information based on the target motion vector accuracy to obtain a scaled (eg, amplified) motion vector difference MVD; calculating the motion vector predictor and the a sum of the amplified motion vector difference values MVD to obtain a motion vector of the current decoded image block, the motion vector of the current decoded image block, the motion vector predictor value, and the amplified motion vector difference value MVD having the same Motion vector accuracy (that is, both have target motion vector accuracy).
需要说明的是,这里的多个运动矢量集合与多种运动矢量精度的对应关系可以是一一对应关系,也可以是M:N的对应关系,M不等于N,例如,多个运动矢量集合与多种运动矢量精度也可以是一对多或多对一的对应关系,本申请实施例对此不作限定。It should be noted that the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets. A plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
结合第二方面,在第二方面的某些实现方式中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。With reference to the second aspect, in some implementations of the second aspect, the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is different from the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block And / or time domain neighboring blocks.
结合第二方面,在第二方面的某些实现方式中,如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离小于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,With reference to the second aspect, in some implementations of the second aspect, if the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, and the first motion vector corresponding to the first motion vector set is higher in precision than the second motion vector Set the corresponding second motion vector precision; or,
如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set And the second motion distance of the first motion vector set is lower than the second motion vector precision corresponding to the second motion vector set.
结合第二方面,在第二方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是预先设置的。In conjunction with the second aspect, in some implementations of the second aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
结合第二方面,在第二方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的,其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前图像块之间的距离与运动矢量精度的取值大小之间的关系,即:所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离越远,运动矢量精度越低;所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离越近,运动矢量精度越高。With reference to the second aspect, in some implementations of the second aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is configured to represent a relationship between a distance between a neighboring block corresponding to a motion vector predictor included in the motion vector set and a current image block and a magnitude of a motion vector precision, that is, the motion The farther the distance between the neighboring block corresponding to the motion vector predictor included in the vector set and the current decoded image block is, the lower the motion vector accuracy is; the neighboring block corresponding to the motion vector predictor included in the motion vector set is The closer the distance between the currently decoded image blocks, the higher the motion vector accuracy.
结合第二方面,在第二方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述解码图像块的序列参数集、图像参数集PPS或者条带头中的任意一种;In conjunction with the second aspect, in some implementations of the second aspect, the code stream further carries a motion vector accuracy parameter, the motion vector accuracy parameter being used to indicate a value of the plurality of motion vector precisions, the motion The vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS or a slice header of the decoded image block;
相应地,所述熵解码模块还用于从所述码流中解析出所述运动矢量精度参数。Correspondingly, the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
结合第二方面,在第二方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示用于当前解码处理单元的运动矢量精度个数(例如pps_amvr_number)和与所述运动矢量精度个数对应的至少两种运动矢量精度值(例如pps_amvr_set[pps_amvr_number]),其中所述当前解码处理单元包括视频序列、图像、条带slice、区域partition、解码树单元CTU和解码单元CU中的一种或多种;With reference to the second aspect, in some implementations of the second aspect, the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a decoding. One or more of a tree unit CTU and a decoding unit CU;
相应地,所述熵解码模块还用于从所述码流中解析出所述运动矢量精度参数。Correspondingly, the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
结合第二方面,在第二方面的某些实现方式中,所述码流进一步携带有第一标识,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;或者,With reference to the second aspect, in some implementations of the second aspect, the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; or
所述码流进一步携带有第一标识和第二标识,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;The code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度;The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy;
相应地,所述熵解码模块还用于从所述码流中解析出所述第一标识,或者解码出所述第一标识和第二标识。Correspondingly, the entropy decoding module is further configured to parse the first identifier from the code stream, or decode the first identifier and the second identifier.
结合第二方面,在第二方面的某些实现方式中,所述码流还携带有用于指示当前解码图像块的候选运动矢量预测值的第三标识,所述熵解码模块还用于从码流中解析出所述第三标识;In conjunction with the second aspect, in some implementations of the second aspect, the code stream further carries a third identifier for indicating a candidate motion vector predictor of the currently decoded image block, the entropy decoding module further for the slave code Parsing the third identifier in the stream;
在获取所述当前解码图像块的运动矢量预测值的方面,所述帧间预测模块具体用于:In terms of acquiring a motion vector predictor of the current decoded image block, the inter prediction module is specifically configured to:
基于所述第三标识从候选运动矢量预测列表中确定所述当前解码图像块的候选运动矢量预测值;或者,Determining a candidate motion vector predictor of the currently decoded image block from the candidate motion vector prediction list based on the third identifier; or
采用双向匹配方法或者模板匹配方法,获取所述当前解码图像块的运动矢量预测值。Obtaining a motion vector predictor of the currently decoded image block by using a bidirectional matching method or a template matching method.
本申请实施例还提供视频编码方法、视频编码器以及相应的电子设备,以提高运动矢量预测精度,从而提高编码性能。The embodiment of the present application further provides a video encoding method, a video encoder, and a corresponding electronic device to improve motion vector prediction accuracy, thereby improving encoding performance.
本申请的第三方面提供一种视频编码方法,所述方法包括:对当前编码图像块执行运动估计过程,以得到当前编码图像块的运动矢量;获取所述当前编码图像块的运动矢量预测值;当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度),基于所述当前待编码图像块的运动矢量、所述运动矢量预测值以及所述目标运动矢量精度,得到所述当前编码图像块的运动矢量差值(MVD)信息;其中,所述当前编码图像块的运动矢量差值(MVD)具有目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运 动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;以及,将所述当前编码图像块的运动矢量差值信息熵编码入码流。A third aspect of the present application provides a video encoding method, the method comprising: performing a motion estimation process on a current coded image block to obtain a motion vector of a current coded image block; and acquiring a motion vector predictor value of the current coded image block. And when the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy (eg, when the motion vector predictor is included in the target motion vector set, according to the plurality of motion vector sets and Corresponding relationship of motion vector accuracy, determining that the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a corresponding motion vector, based on the motion vector of the current image block to be encoded, Obtaining, by the motion vector predictor and the target motion vector, a motion vector difference (MVD) information of the current coded image block; wherein the motion vector difference (MVD) of the current coded image block has a target motion Vector accuracy, the target motion vector set is one of a plurality of motion vector sets, The target motion vector accuracy is one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion vector set, At least one of the first motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion vector set corresponding to the first motion vector set is different from the first a second motion vector accuracy corresponding to the second motion vector set; and entropy encoding the motion vector difference information of the current coded image block into the code stream.
可见,本申请实施例的视频编码方法中,在视频编码器获取当前编码图像块的运动矢量预测值之后,通过运动矢量预测值所属的目标运动矢量集合所对应的目标运动矢量精度的方式,能自适应确定用于当前编码图像块的适当的运动矢量精度,如果运动矢量集合的数目为N,则视频编码方法可支持M种运动矢量MV精度,其中M小于或等于N,M和N均为正整数,例如M、N大于或等于3,提高了运动矢量预测精度,具体地,由于本发明实施例能自适应地选择运动矢量精度,针对某些视频内容对应的一个或多个图像块,使用具有较高像素精度(例如1/8像素精度)的运动矢量相对于使用较低像素精度的运动矢量,提高了视频编解码质量,而且带来的益处优于内插开销代价,比如,基于具有高像素精度(例如1/8像素精度)的运动矢量得到的预测块更接近于当前编码图像块的原始块,即使内插分数像素位置导致了一些内插开销;而针对某些视频内容对应的一个或多个图像块,使用较低像素精度的运动矢量(例如整数像素精度)相对于使用较高像素精度的运动矢量,既没有降低视频编解码质量,还避免了内插开销代价,因此,本申请实施例的视频编码方法整体上提高了编解码性能。It can be seen that, in the video coding method of the embodiment of the present application, after the video encoder obtains the motion vector predictor of the current coded image block, the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs may be Adaptively determining the appropriate motion vector accuracy for the current coded image block. If the number of motion vector sets is N, the video coding method can support M motion vector MV precision, where M is less than or equal to N, M and N are A positive integer, such as M, N is greater than or equal to 3, improves motion vector prediction accuracy. Specifically, since the embodiment of the present invention can adaptively select motion vector accuracy, for one or more image blocks corresponding to certain video content, Using motion vectors with higher pixel precision (eg 1/8 pixel precision) versus motion vectors using lower pixel precision improves video codec quality and benefits are better than interpolation overhead, eg based on A prediction block obtained with a motion vector having high pixel precision (for example, 1/8 pixel precision) is closer to the original of the currently coded image block. Block, even if interpolating the fractional pixel position results in some interpolation overhead; for one or more image blocks corresponding to some video content, using lower pixel precision motion vectors (eg integer pixel precision) versus using higher pixels The video coding method of the embodiment of the present invention improves the codec performance as a whole, and the video coding method of the embodiment of the present application improves the coding and decoding performance as a whole.
结合第三方面,在第三方面的某些实现方式中,所述当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述当前待编码图像块的运动矢量、所述运动矢量预测值以及所述目标运动矢量精度,得到当前待编码图像块的运动矢量差值(MVD)信息,包括:With reference to the third aspect, in some implementations of the third aspect, when the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy, based on the current image block to be encoded The motion vector, the motion vector predictor, and the target motion vector precision, obtain motion vector difference (MVD) information of the current image block to be encoded, including:
确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度;Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has / corresponding to the motion vector accuracy;
计算所述当前编码图像块的运动矢量与所述运动矢量预测值之差值MVD,所述当前编码图像块的运动矢量、所述运动矢量预测值和所述MVD具有目标运动矢量精度;或者,Calculating a difference MVD between the motion vector of the current coded image block and the motion vector predictor, the motion vector of the current coded image block, the motion vector predictor, and the MVD having a target motion vector accuracy; or
计算所述当前编码图像块的运动矢量与所述运动矢量预测值之差值MVD,所述当前编码图像块的运动矢量和所述运动矢量预测值具有目标运动矢量精度;以及,基于所述目标运动矢量精度(例如所述目标运动矢量精度的索引)对所述计算得到的运动矢量差值进行缩放(例如缩小)处理,以得到经缩放处理(例如经缩小处理)的运动矢量差值。Calculating a difference MVD between the motion vector of the current coded image block and the motion vector predictor, the motion vector of the current coded image block and the motion vector predictor having a target motion vector accuracy; and, based on the target Motion vector precision (e.g., an index of the target motion vector accuracy) scales (e.g., scales down) the calculated motion vector difference values to obtain motion vector difference values that are scaled (e.g., reduced).
可见,本申请实施例的视频编码方法中,通过自适应选择像素精度能在编码效率和比特开销之间达成较好的平衡,而且视频编码器能自适应选择目标运动矢量精度来编码所述MVD信息,比如,经缩小处理的运动矢量差值相对于原始运动矢量差占用较少的比特数或者占用一样的比特数,针对前者还能降低了比特传输开销,从而整体上提高了编解码性能。It can be seen that, in the video coding method of the embodiment of the present application, a better balance between coding efficiency and bit overhead can be achieved by adaptively selecting pixel precision, and the video encoder can adaptively select the target motion vector precision to encode the MVD. The information, for example, the reduced motion vector difference value occupies a smaller number of bits or the same number of bits with respect to the original motion vector difference, and the bit transmission overhead can be reduced for the former, thereby improving the codec performance as a whole.
结合第三方面,在第三方面的某些实现方式中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第一二邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。需要说明的是,这里的第一邻近块泛指:分组到第一运动矢量集合中的MVPs所对应的空域和/或时域邻近块,如表-3所示,第一邻近块可指空域邻近块A1和B1;以及,这里的第二邻近块泛指:分组到第二运动矢量集合中的MVPs所对应的空域和/或时域邻近块,如表-7A所示,第二 邻近块可指空域邻近块A0和B0。With reference to the third aspect, in some implementations of the third aspect, the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second a second distance between the first two neighboring blocks and the current image block corresponding to the motion vector predictor in the motion vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and / or time domain adjacent blocks. It should be noted that the first neighboring block herein refers to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the first motion vector set, as shown in Table-3, the first neighboring block may refer to the airspace. The neighboring blocks A1 and B1; and the second neighboring block herein generally refer to: an airspace and/or a time domain neighboring block corresponding to the MVPs in the second motion vector set, as shown in Table-7A, the second neighboring block It can refer to the airspace adjacent blocks A0 and B0.
结合第三方面,在第三方面的某些实现方式中,如果第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前编码图像块的第一距离小于第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前编码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,With reference to the third aspect, in some implementations of the third aspect, if the first distance between the first neighboring block and the current coded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the second motion vector set a second distance between the second neighboring block corresponding to the motion vector predictor and the current coded image block, the first motion vector corresponding to the first motion vector set is higher than the second motion vector set Second motion vector accuracy; or,
如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前编码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前编码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current coded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set And a second motion distance of the first motion vector set is lower than a second motion vector precision corresponding to the second motion vector set.
结合第三方面,在第三方面的某些实现方式中,所述多个运动矢量集合与多种运动矢量精度的对应关系是预先设置的。In conjunction with the third aspect, in some implementations of the third aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
结合第三方面,在第三方面的某些实现方式中,所述多个运动矢量集合与多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的;其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前图像块之间的距离与运动矢量精度的取值大小之间的关系。所述运动矢量精度赋值规则可以理解为:运动矢量预测值所对应的邻近块与当前编码图像块的距离越近,运动矢量精度越高;运动矢量预测值所对应的邻近块与当前编码图像块的距离越远,运动矢量精度越低。此外,这里的邻近块可以包括但不限于:所述当前编码图像块的空域邻近块和/或时域邻近块。With reference to the third aspect, in some implementations of the third aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector precision assignment rule; wherein the motion vector accuracy The assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current image block and the magnitude of the motion vector precision. The motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current coded image block, the higher the motion vector accuracy; the neighboring block corresponding to the motion vector predictor and the current coded image block The farther the distance is, the lower the motion vector accuracy. Furthermore, the neighboring blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the currently coded image block.
结合第三方面,在第三方面的某些实现方式中,所述方法还包括:In conjunction with the third aspect, in some implementations of the third aspect, the method further comprises:
将运动矢量精度参数熵编码入码流,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述编码图像块的序列参数集、图像参数集PPS或者条带头中的任意一种。Encoding the motion vector precision parameter into a code stream, the motion vector precision parameter is used to indicate a value of the plurality of motion vector precisions, and the motion vector precision parameter carries a sequence parameter set and an image parameter of the coded image block Set any of PPS or strip head.
结合第三方面,在第三方面的某些实现方式中,所述方法还包括:In conjunction with the third aspect, in some implementations of the third aspect, the method further comprises:
将运动矢量精度参数熵编码入码流,所述运动矢量精度参数用于指示用于当前编码处理单元的运动矢量精度个数(例如pps_amvr_number)和与所述运动矢量精度个数对应的至少两种运动矢量精度值(例如pps_amvr_set[pps_amvr_number]),其中所述当前编码处理单元包括视频序列、图像、条带slice、区域partition、编码树单元(Coding Tree Unit,CTU)和编码单元(coding unit,CU)中的一种或多种。Encoding the motion vector precision parameter into a code stream, the motion vector precision parameter is used to indicate a motion vector accuracy number (eg, pps_amvr_number) for the current encoding processing unit and at least two corresponding to the motion vector precision number a motion vector precision value (for example, pps_amvr_set[pps_amvr_number]), wherein the current encoding processing unit includes a video sequence, an image, a slice slice, a region partition, a Coding Tree Unit (CTU), and a coding unit (CU) One or more of them.
结合第三方面,在第三方面的某些实现方式中,所述方法还包括:In conjunction with the third aspect, in some implementations of the third aspect, the method further comprises:
将第一标识熵编码入码流,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;或者,Encoding the first identifier entropy into the code stream, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; or
将第一标识和第二标识熵编码入码流,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;Encoding the first identifier and the second identifier into a code stream, the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度。The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
可见,相对于现有的视频编码方法,本申请实施例的视频编码方法仅发信号通知重要 运动矢量集合的运动矢量精度,能进一步节省比特开销,提高了视频图像的编解码性能It can be seen that, compared with the existing video coding method, the video coding method in the embodiment of the present application only signals the motion vector precision of the important motion vector set, which can further save bit overhead and improve the codec performance of the video image.
结合第三方面,在第三方面的某些实现方式中,所述获取当前待编码图像块的运动矢量预测值,包括:根据率失真代价准则从候选运动矢量预测列表(candidate MVP list)中确定用于当前待编码图像块的候选运动矢量预测值MVP,例如,所述候选运动矢量预测值MVP编码所述当前编码图像块的码率失真代价最小;With reference to the third aspect, in some implementations of the third aspect, the acquiring the motion vector predictor of the current image block to be encoded includes: determining, according to the rate distortion cost criterion, from a candidate motion vector prediction list (candidate MVP list) a candidate motion vector predictor MVP for the current image block to be encoded, for example, the candidate motion vector predictor MVP encoding the current coded image block has a minimum rate distortion cost;
所述将当前待编码图像块的运动矢量差值MVD熵编码入码流,包括:The entropy encoding the motion vector difference MVD of the current image block to be encoded into the code stream includes:
将当前待编码图像块的运动矢量差值MVD和第三标识(例如,候选预测运动矢量索引)熵编码入码流,所述第三标识用于指示当前编码图像块的候选运动矢量预测值MVP(例如,候选预测运动矢量索引可指示在候选运动矢量预测列表中被选定的候选运动矢量预测值的位置)。And entropy encoding a motion vector difference value MVD and a third identifier (eg, a candidate prediction motion vector index) of the current image block to be encoded into a code stream, where the third identifier is used to indicate a candidate motion vector predictor value MVP of the current coded image block. (For example, the candidate predicted motion vector index may indicate the location of the candidate motion vector predictor selected in the candidate motion vector prediction list).
需要说明的是,本申请实施例的视频编码方法,不仅适用于高级运动矢量预测模式(advanced motion vector prediction,AMVP)下的候选运动矢量预测值列表,而且也适用于其它模式下使用空域邻近块和/或时域邻近块的运动矢量构建的候选运动矢量预测值列表,从而提高编解码性能。It should be noted that the video coding method in the embodiment of the present application is applicable not only to the candidate motion vector predictor list in the advanced motion vector prediction (AMVP) but also to the spatial neighboring block in other modes. And/or a list of candidate motion vector predictors constructed by motion vectors of temporally neighboring blocks, thereby improving codec performance.
本申请的第四方面提供一种视频编码器,包括:帧间预测模块,用于对当前编码图像块执行运动估计过程,以得到当前编码图像块的运动矢量;以及获取所述当前编码图像块的运动矢量预测值;所述帧间预测模块还用于当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度),基于所述当前编码图像块的运动矢量、所述运动矢量预测值以及所述目标运动矢量精度,得到所述当前编码图像块的运动矢量差值(MVD)信息;其中,所述当前编码图像块的运动矢量差值(MVD)具有目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;以及,熵编码模块,用于将所述当前待编码图像块的运动矢量差值(MVD)信息熵编码入码流。A fourth aspect of the present application provides a video encoder, including: an inter prediction module, configured to perform a motion estimation process on a current coded image block to obtain a motion vector of a current coded image block; and acquire the current coded image block a motion vector predictor; the inter prediction module is further configured to: when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy (eg, when the motion vector predictor is included in Determining, according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a target motion vector set Obtaining motion vector difference (MVD) information of the current coded image block based on the motion vector of the current coded image block, the motion vector predictor, and the target motion vector accuracy; wherein the current code A motion vector difference (MVD) of an image block has a target motion vector precision, the target motion vector set And being one of a plurality of motion vector sets, the target motion vector precision being one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector precision, the multiple motion vector sets including the first a motion vector set and a second motion vector set, the at least one of the first motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion vector set Corresponding first motion vector precision is different from second motion vector precision corresponding to the second motion vector set; and an entropy encoding module, configured to: perform motion vector difference (MVD) information of the current image block to be encoded Entropy is encoded into the code stream.
结合第四方面,在第四方面的某些实现方式中,在所述基于所述当前编码图像块的运动矢量、所述运动矢量预测值以及所述目标运动矢量精度,得到当前编码图像块的运动矢量差值(MVD)信息的方面,所述帧间预测模块具体用于:With reference to the fourth aspect, in some implementations of the fourth aspect, the current coded image block is obtained based on the motion vector of the current coded image block, the motion vector predictor, and the target motion vector accuracy An aspect of motion vector difference (MVD) information, the inter prediction module is specifically configured to:
确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度;计算所述当前编码图像块的运动矢量与所述运动矢量预测值之差值MVD,所述当前编码图像块的运动矢量、所述运动矢量预测值和所述MVD具有目标运动矢量精度;或者,Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has a corresponding/corresponding motion vector accuracy; calculating a difference MVD between the motion vector of the current coded image block and the motion vector predictor, the motion vector of the current coded image block, the motion vector predictor, and the MVD has target motion vector accuracy; or,
计算所述当前编码图像块的运动矢量与所述运动矢量预测值之差值MVD,所述当前编码图像块的运动矢量和所述运动矢量预测值具有目标运动矢量精度;以及,基于所述目标 运动矢量精度(例如基于所述目标运动矢量精度的索引值)对所述计算得到的运动矢量差值进行缩放(例如缩小)处理,以得到经缩放(例如经缩小)的运动矢量差值。Calculating a difference MVD between the motion vector of the current coded image block and the motion vector predictor, the motion vector of the current coded image block and the motion vector predictor having a target motion vector accuracy; and, based on the target Motion vector accuracy (e.g., an index value based on the target motion vector accuracy) scales (e.g., scales down) the calculated motion vector difference values to obtain a scaled (e.g., reduced) motion vector difference value.
结合第四方面,在第四方面的某些实现方式中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。With reference to the fourth aspect, in some implementations of the fourth aspect, the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second a second distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the motion vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and/or Or in a time domain adjacent to the block.
结合第四方面,在第四方面的某些实现方式中,如果第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前编码图像块的第一距离小于第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前编码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,With reference to the fourth aspect, in some implementations of the fourth aspect, if the first distance between the first neighboring block and the current coded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the second motion vector set a second distance between the second neighboring block corresponding to the motion vector predictor and the current coded image block, the first motion vector corresponding to the first motion vector set is higher than the second motion vector set Second motion vector accuracy; or,
如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前编码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前编码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current coded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set And a second motion distance of the first motion vector set is lower than a second motion vector precision corresponding to the second motion vector set.
结合第四方面,在第四方面的某些实现方式中,所述多个运动矢量集合与多种运动矢量精度的对应关系是预先设置的。In conjunction with the fourth aspect, in some implementations of the fourth aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
结合第四方面,在第四方面的某些实现方式中,所述多个运动矢量集合与多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的;其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前图像块之间的距离与运动矢量精度的取值大小之间的关系。所述运动矢量精度赋值规则可以理解为:运动矢量预测值所对应的邻近块与当前编码图像块的距离越近,运动矢量精度越高;运动矢量预测值所对应的邻近块与当前编码图像块的距离越远,运动矢量精度越低。此外,这里的邻近块可以包括但不限于:所述当前编码图像块的空域邻近块和/或时域邻近块。With reference to the fourth aspect, in some implementations of the fourth aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule; wherein the motion vector accuracy The assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current image block and the magnitude of the motion vector precision. The motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current coded image block, the higher the motion vector accuracy; the neighboring block corresponding to the motion vector predictor and the current coded image block The farther the distance is, the lower the motion vector accuracy. Furthermore, the neighboring blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the currently coded image block.
结合第四方面,在第四方面的某些实现方式中,所述熵编码模块还用于:将运动矢量精度参数熵编码入码流,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述编码图像块的序列参数集、图像参数集PPS或者条带头中的任意一种。In conjunction with the fourth aspect, in some implementations of the fourth aspect, the entropy encoding module is further configured to: entropy encode a motion vector precision parameter into a code stream, where the motion vector precision parameter is used to indicate the multiple motions A value of vector precision, the motion vector accuracy parameter being carried in any one of a sequence parameter set, an image parameter set PPS, or a slice header of the coded image block.
结合第四方面,在第四方面的某些实现方式中,所述熵编码模块还用于:将运动矢量精度参数熵编码入码流,所述运动矢量精度参数用于指示用于当前编码处理单元的运动矢量精度个数(例如pps_amvr_number)和与所述运动矢量精度个数对应的至少两种运动矢量精度值(例如pps_amvr_set[pps_amvr_number]),其中所述当前编码处理单元包括视频序列、图像、条带、区域partition、编码树单元(Coding Tree Unit,CTU)和编码单元(coding unit,CU)中的一种或多种。In conjunction with the fourth aspect, in some implementations of the fourth aspect, the entropy encoding module is further configured to: entropy encode a motion vector precision parameter into a code stream, where the motion vector precision parameter is used to indicate that the current encoding process is used a number of motion vector precisions of the unit (eg, pps_amvr_number) and at least two motion vector precision values (eg, pps_amvr_set[pps_amvr_number]) corresponding to the number of motion vector precisions, wherein the current encoding processing unit includes a video sequence, an image, One or more of a stripe, a region partition, a Coding Tree Unit (CTU), and a coding unit (CU).
结合第四方面,在第四方面的某些实现方式中,所述熵编码模块还用于:In conjunction with the fourth aspect, in some implementations of the fourth aspect, the entropy encoding module is further configured to:
将第一标识熵编码入码流,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;或者,Encoding the first identifier entropy into the code stream, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; or
将第一标识和第二标识熵编码入码流,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;Encoding the first identifier and the second identifier into a code stream, the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度。The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
结合第四方面,在第四方面的某些实现方式中,在获取当前待编码图像块的运动矢量预测值的方面,所述帧间预测模块具体用于:根据率失真代价准则从候选运动矢量预测列表(candidate MVP list)中确定用于当前待编码图像块的候选运动矢量预测值MVP例如,所述候选运动矢量预测值MVP编码所述当前编码图像块的码率失真代价最小;With reference to the fourth aspect, in some implementation manners of the fourth aspect, in the aspect of acquiring a motion vector predictor of a current image block to be encoded, the inter prediction module is specifically configured to: select a candidate motion vector according to a rate distortion cost criterion. Determining a candidate motion vector predictor MVP for the current image block to be encoded in a candidate MVP list, for example, the candidate motion vector predictor MVP encoding the current coded image block has a minimum rate distortion cost;
所述熵编码模块还用于将第三标识熵(例如,候选预测运动矢量索引)编码入码流,所述第三标识用于指示当前编码图像块的候选运动矢量预测值(MVP)(例如,候选预测运动矢量索引可指示在候选运动矢量预测列表中被选定的候选运动矢量预测值的位置)。The entropy encoding module is further configured to encode a third identity entropy (eg, a candidate prediction motion vector index) into the code stream, where the third identifier is used to indicate a candidate motion vector predictor (MVP) of the currently coded image block (eg, The candidate predicted motion vector index may indicate the location of the candidate motion vector predictor selected in the candidate motion vector prediction list.
本申请的第五方面提供一种视频解码方法,包括:接收码流,所述码流携带有当前解码图像块的运动矢量差值MVD信息和用于指示当前解码图像块的候选运动矢量预测值MVP的索引,从所述码流中解析出所述MVD信息和所述索引;基于所述索引,从候选运动矢量预测值列表中确定用于当前解码图像块的候选运动矢量预测值MVP;当所述候选运动矢量预测值MVP被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度),基于所述候选运动矢量预测值MVP、所述运动矢量差值MVD信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;基于所述当前解码图像块的具有所述目标运动矢量精度的运动矢量进行运动补偿,得到当前解码图像块的预测块(亦可理解为当前解码图像块的像素值的预测值);基于所述预测块对所述当前解码图像块进行重建。A fifth aspect of the present application provides a video decoding method, including: receiving a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block and a candidate motion vector predictor for indicating a currently decoded image block. An index of the MVP, parsing the MVD information and the index from the code stream; determining a candidate motion vector predictor MVP for the currently decoded image block from the candidate motion vector predictor list based on the index; The candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector accuracy (for example, when the motion vector predictor is included in the target motion vector set, according to the plurality of motion vector sets and Corresponding relationship of motion vector accuracy, determining that the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a corresponding motion vector accuracy, based on the candidate motion vector predictor value MVP, Motion vector difference MVD information and the target motion vector precision, to obtain a motion vector of the currently decoded image block The motion vector of the currently decoded image block has the target motion vector precision, and the target motion vector set is one of a plurality of motion vector sets, and the target motion vector precision includes a first motion vector accuracy and a first One of a plurality of motion vector precisions of motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion vector set, the first motion vector set and the second motion vector set The at least one motion vector set includes two or more motion vector predictors, and the first motion vector accuracy corresponding to the first motion vector set is different from the second motion vector precision corresponding to the second motion vector set; Performing motion compensation based on the motion vector of the current decoded image block having the target motion vector precision, obtaining a prediction block of the currently decoded image block (which may also be understood as a predicted value of a pixel value of the currently decoded image block); The prediction block reconstructs the current decoded image block.
需要说明的是,目标运动矢量集合,例如为用于构建候选运动矢量预测值列表的多个运动矢量预测值的子集。例如,多个运动矢量集合为用于构建候选运动矢量预测值列表的多个运动矢量预测值的多个子集,不同运动矢量集合中包括的运动矢量预测值彼此之间是不同的。It should be noted that the target motion vector set is, for example, a subset of a plurality of motion vector predictors used to construct a candidate motion vector predictor list. For example, the plurality of motion vector sets are a plurality of subsets of the plurality of motion vector predictors used to construct the candidate motion vector predictor list, and the motion vector predictors included in the different motion vector sets are different from each other.
应当理解的是,本申请实施例的方法的执行主体可以是视频解码器或具有视频解码功能的电子设备。It should be understood that the execution body of the method of the embodiment of the present application may be a video decoder or an electronic device having a video decoding function.
可见,本申请实施例的视频解码方法中,在视频解码器获取当前解码图像块的候选运 动矢量预测值之后,通过该运动矢量预测值所属的目标运动矢量集合所对应的目标运动矢量精度的方式,能自适应确定用于当前解码图像块的适当的运动矢量精度,如果运动矢量集合的数目为N,则视频解码器可支持M种运动矢量MV精度,其中M小于或等于N,M和N均为正整数,提高了运动矢量预测精度,具体地,由于本发明实施例能自适应地选择运动矢量精度,针对某些视频内容对应的一个或多个图像块,使用具有较高像素精度(例如1/8像素精度)的运动矢量相对于使用较低像素精度的运动矢量,提高了视频编解码质量,而且带来的益处优于内插开销代价,比如,基于具有高像素精度(例如1/8像素精度)的运动矢量得到的预测块更接近于当前解码图像块的原始块,即使内插分数像素位置导致了一些内插开销;而针对某些视频内容对应的一个或多个图像块,使用较低像素精度的运动矢量(例如整数像素精度)相对于使用较高像素精度的运动矢量,既没有降低视频编解码质量,还避免了内插开销代价,因此,本申请实施例的视频解码方法整体上提高了编解码性能。It can be seen that, in the video decoding method of the embodiment of the present application, after the video decoder obtains the candidate motion vector predictor of the current decoded image block, the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained. The adaptive motion vector accuracy for the currently decoded image block can be adaptively determined. If the number of motion vector sets is N, the video decoder can support M motion vector MV precision, where M is less than or equal to N, M, and N. All of them are positive integers, which improves the motion vector prediction accuracy. Specifically, since the embodiment of the present invention can adaptively select motion vector precision, one or more image blocks corresponding to some video content are used with higher pixel precision ( Motion vectors such as 1/8 pixel precision, relative to motion vectors using lower pixel precision, improve video codec quality, and the benefits are better than interpolation overhead, for example, based on high pixel precision (eg 1 /8 pixel precision) The motion vector obtained by the motion vector is closer to the original block of the currently decoded image block, even if the interpolation is The number of pixel locations results in some interpolation overhead; for one or more image blocks corresponding to certain video content, motion vectors with lower pixel precision (eg integer pixel precision) versus motion vectors using higher pixel precision, The video decoding method of the embodiment of the present application improves the codec performance as a whole.
结合第五方面,在第五方面的某些实现方式中,所述当候选运动矢量预测值MVP被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述候选运动矢量预测值MVP、所述运动矢量差值(MVD)信息以及目标运动矢量精度,得到所述当前待解码图像块的运动矢量,包括:With reference to the fifth aspect, in some implementations of the fifth aspect, when the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector accuracy, based on the candidate motion vector predictor value MVP And the motion vector difference (MVD) information and the target motion vector precision, and the motion vector of the current image block to be decoded is obtained, including:
确定所述候选运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述候选运动矢量预测值具有的/对应的运动矢量精度;Determining that the candidate motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the candidate motion according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions Vector predictive value has / corresponding motion vector accuracy;
计算所述候选运动矢量预测值MVP和所述运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述候选运动矢量预测值MVP和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度);或者,Calculating a sum of the candidate motion vector predictor value MVP and the motion vector difference value MVD to obtain a motion vector of the current decoded image block, a motion vector of the current decoded image block, and the candidate motion vector predictor value MVP And the motion vector difference MVD has the same motion vector precision (that is, both have the target motion vector precision); or,
基于所述目标运动矢量精度对所述运动矢量差值信息进行缩放(例如放大)处理,以得到经缩放(例如经放大的)的运动矢量差值MVD;计算所述候选运动矢量预测值MVP和所述经缩放的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述候选运动矢量预测值MVP和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度)。And scaling (eg, amplifying) the motion vector difference information based on the target motion vector precision to obtain a scaled (eg, amplified) motion vector difference MVD; calculating the candidate motion vector predictor MVP and a sum of the scaled motion vector difference values MVD to obtain a motion vector of the current decoded image block, the motion vector of the current decoded image block, the candidate motion vector predictor value MVP, and the motion vector difference value MVD having The same motion vector accuracy (that is, both have the target motion vector accuracy).
需要说明的是,这里的多个运动矢量集合与多种运动矢量精度的对应关系可以是一一对应关系,也可以是M:N的对应关系,M不等于N,例如,多个运动矢量集合与多种运动矢量精度也可以是一对多或多对一的对应关系,本申请实施例对此不作限定。It should be noted that the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets. A plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
可见,本申请实施例中,针对从所述码流中解析出的当前解码图像块的经缩放过的运动矢量差值MVD信息,在视频解码器确定候选运动矢量预测值列表中索引对应的当前解码图像块的候选运动矢量预测值MVP之后,根据多个运动矢量集合与多种运动矢量精度的对应关系,自适应的推导出所述MVD信息的目标运动矢量精度,根据自适应推导得来的目标运动矢量精度对所述解析出的MVD信息进行缩放(例如放大)处理,以将所述解析出的经缩放过的运动矢量差信息恢复成视频编码端缩放(例如缩小)处理前的运动矢量差信息,从而保证了运动矢量差缩放的准确性,而且经缩放处理的MVD信息相对于原始MVD信息占用较少的比特开销或相同的比特开销,从而提高了编解码性能。It can be seen that, in this embodiment of the present application, for the scaled motion vector difference MVD information of the current decoded image block parsed from the code stream, the video decoder determines the current corresponding index in the candidate motion vector predictor list. After decoding the candidate motion vector predictor MVP of the image block, adaptively deriving the target motion vector precision of the MVD information according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, according to the adaptive derivation The target motion vector precision scales (eg, amplifies) the parsed MVD information to restore the parsed scaled motion vector difference information to a motion vector before the video encoding end is scaled (eg, reduced) The difference information ensures the accuracy of the motion vector difference scaling, and the scaled MVD information occupies less bit overhead or the same bit overhead relative to the original MVD information, thereby improving the codec performance.
结合第五方面,在第五方面的某些实现方式中,所述第一运动矢量集合中的运动矢量 预测值所对应的第一邻近块与当前解码图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。With reference to the fifth aspect, in some implementations of the fifth aspect, the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is different from the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block And / or time domain neighboring blocks.
需要说明的是,这里的第一距离,例如是第一邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第一邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离;这里的第二距离例如是第二邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第二邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离,但本申请并不限于此。It should be noted that the first distance herein is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image block. The distance of the center point pixel position; the second distance here is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the center point pixel position of the second neighboring block relative to the current The distance from the center point pixel position of the image block, but the application is not limited thereto.
需要说明的是,这里的空域邻近块可以包括当前解码图像块所在图像中的、与所述当前图像块邻近的一个或多个空域邻近块。It should be noted that the spatial neighboring block herein may include one or more spatial neighboring blocks adjacent to the current image block in the image of the currently decoded image block.
需要说明的是,这里的时域邻近块可以包括参考图像中、与并置块(co-located块)邻近的一个或多个空域邻近块,和/或,所述并置块中的一个或多个子块,其中,所述并置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。It should be noted that the time domain neighboring block herein may include one or more airspace neighboring blocks in the reference image adjacent to the co-located block, and/or one of the collocated blocks or a plurality of sub-blocks, wherein the collocated block is an image block of the reference image having the same size, shape, and coordinates as the current image block.
结合第五方面,在第五方面的某些实现方式中,如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离小于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度(例如1/8像素精度)高于所述第二运动矢量集合对应的第二运动矢量精度(例如1/4像素精度);或者,With reference to the fifth aspect, in some implementations of the fifth aspect, if the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the second motion vector set and the current decoded image block, and the first motion vector precision corresponding to the first motion vector set (eg, 1/8 pixel precision) Higher than the second motion vector accuracy corresponding to the second motion vector set (eg, 1/4 pixel precision); or,
如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度(例如1/4像素精度)低于所述第二运动矢量集合对应的第二运动矢量精度(例如1/8像素精度)。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set a second distance between the block and the currently decoded image block, the first motion vector precision corresponding to the first motion vector set (eg, 1/4 pixel precision) is lower than the second motion vector accuracy corresponding to the second motion vector set (eg 1/8 pixel accuracy).
结合第五方面,在第五方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是预先设置的。In conjunction with the fifth aspect, in some implementations of the fifth aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
结合第五方面,在第五方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的,其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离与运动矢量精度的取值大小之间的关系。所述运动矢量精度赋值规则可以理解为:运动矢量预测值所对应的邻近块与当前图像块的距离越近,运动矢量精度越高;运动矢量预测值所对应的邻近块与当前图像块的距离越远,运动矢量精度越低。此外,这里的邻近块可以包括但不限于:所述当前图像块的空域邻近块和/或时域邻近块。With reference to the fifth aspect, in some implementations of the fifth aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the currently decoded image block and the magnitude of the motion vector precision. The motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current image block, the higher the motion vector accuracy; the distance between the neighboring block corresponding to the motion vector predictor and the current image block The farther away, the lower the motion vector accuracy. Furthermore, adjacent blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the current image block.
结合第五方面,在第五方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述解码图像块的序列参数集、图像参数集PPS、条带slice头或者某个其它层级位置处中的任意一种。较优的,这里的多种运动矢量精度可以大于或等于三种运动矢量精度。With reference to the fifth aspect, in some implementations of the fifth aspect, the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, the motion The vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS, a stripe slice header, or some other hierarchical position of the decoded image block. Preferably, the various motion vector precisions herein may be greater than or equal to the three motion vector precisions.
结合第五方面,在第五方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示用于当前解码处理单元的运动矢量精度个数(例如pps_amvr_number)和与所述运动矢量精度个数对应的至少两种运动矢量精度值(例如pps_amvr_set[pps_amvr_number]),其中所述当前解码处理单元包括视频序列、图像、 条带slice、区域partition、编码树单元(Coding Tree Unit,CTU)和编码单元(coding unit,CU)中的一种或多种。In conjunction with the fifth aspect, in some implementations of the fifth aspect, the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and an encoding. One or more of a Coding Tree Unit (CTU) and a coding unit (CU).
可见,本申请实施例的解码方法中,有利于视频解码器根据从码流中解析出的运动矢量精度参数和运动矢量精度赋值规则而设置所述多个运动矢量集合与所述多种运动矢量精度的对应关系,从而有利于视频解码器自适应地确定用于解码图像块的目标运动矢量精度(例如整像素精度或1/2像素精度或1/4像素精度或1/8像素精度或4像素精度等)。It can be seen that, in the decoding method of the embodiment of the present application, the video decoder is configured to set the multiple motion vector set and the multiple motion vectors according to the motion vector precision parameter and the motion vector precision assignment rule parsed from the code stream. The correspondence of precision, thereby facilitating the video decoder to adaptively determine the target motion vector accuracy for decoding the image block (eg, integer pixel precision or 1/2 pixel precision or 1/4 pixel precision or 1/8 pixel precision or 4 Pixel accuracy, etc.).
结合第五方面,在第五方面的某些实现方式中,所述码流进一步携带有第一标识,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;例如,第一标识可以携带在所述解码图像块的序列参数集、图像参数集或者条带头中的任意一种中;或者,With reference to the fifth aspect, in some implementations of the fifth aspect, the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector accuracy corresponding to the third motion vector set; for example, The first identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block; or
所述码流进一步携带有第一标识和第二标识,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;例如,第一标识和第二标识可以携带在所述解码图像块的序列参数集、图像参数集或者条带头中的任意一种中;The code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector accuracy, and the second identifier is used to indicate a third motion vector set; for example, the first identifier and the first identifier The second identifier may be carried in any one of a sequence parameter set, an image parameter set or a slice header of the decoded image block;
其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度。The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
可见,在视频编码器仅发信号通知重要运动矢量集合的运动矢量精度的情况下,本发明实施例的解码方法能自适应确定用于当前解码图像块的运动矢量精度,而且通过针对重要运动矢量集合传递flag表示具体对应的运动矢量精度,也提高了编解码效率。It can be seen that in the case that the video encoder only signals the motion vector accuracy of the important motion vector set, the decoding method of the embodiment of the present invention can adaptively determine the motion vector accuracy for the currently decoded image block, and by targeting the important motion vector. The set delivery flag indicates the specific motion vector accuracy and also improves the encoding and decoding efficiency.
本申请的第六方面提供一种视频解码器,包括:熵解码模块,用于接收码流,所述码流携带有当前解码图像块的运动矢量差值MVD信息和用于指示当前解码图像块的候选运动矢量预测值MVP的索引,从所述码流中解析出所述MVD信息和所述索引;帧间预测模块,用于基于所述索引,从候选运动矢量预测值列表中确定用于当前解码图像块的候选运动矢量预测值MVP(亦称为最佳候选运动矢量预测值MVP);当所述候选运动矢量预测值MVP被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述候选运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述候选运动矢量预测值具有的/对应的运动矢量精度),基于所述候选运动矢量预测值MVP、所述运动矢量差值MVD信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;基于所述当前解码图像块的具有所述目标运动矢量精度的运动矢量进行运动补偿,得到当前解码图像块的预测块(亦可理解为当前解码图像块的像素值的预测值);以及,重建模块,用于基于所述预测块对所述当前解码图像块进行重建。A sixth aspect of the present application provides a video decoder, including: an entropy decoding module, configured to receive a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block and is used to indicate a current decoded image block. An index of the candidate motion vector predictor MVP, the MVD information and the index are parsed from the code stream; an inter prediction module, configured to determine from the candidate motion vector predictor list based on the index a candidate motion vector predictor MVP (also referred to as a best candidate motion vector predictor MVP) of the currently decoded image block; when the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector precision ( For example, when the candidate motion vector predictor is included in the target motion vector set, determining the target motion vector accuracy corresponding to the target motion vector set according to the correspondence between the multiple motion vector sets and the plurality of motion vector precisions Determining a corresponding motion vector predictor having a corresponding motion vector accuracy, based on the candidate motion vector predictor MVP, the motion And a motion vector of the current decoded image block, where the motion vector of the current decoded image block has the target motion vector precision, and the target motion vector set is One of a plurality of sets of motion vectors, the target motion vector accuracy being one of a plurality of motion vector accuracies including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including the first motion a vector set and a second motion vector set, the at least one of the first motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion vector set corresponds to The first motion vector precision is different from the second motion vector precision corresponding to the second motion vector set; and the motion vector with the target motion vector precision of the current decoded image block is motion compensated to obtain a current decoded image. a prediction block of a block (also understood as a predicted value of a pixel value of a currently decoded image block); Reconstruction module, based on the prediction block to reconstruct the decoded image of the current block.
结合第六方面,在第六方面的某些实现方式中,在所述当所述候选运动矢量预测值MVP被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述候选运动矢量预测值MVP、所述运动矢量差值信息以及目标运动矢量精度,得到所述当前解码图像块的运 动矢量的方面,所述帧间预测模块具体用于:With reference to the sixth aspect, in some implementations of the sixth aspect, the candidate motion vector is based on the candidate motion vector when the candidate motion vector predictor MVP is included in the target motion vector set corresponding to the target motion vector accuracy Observing the value MVP, the motion vector difference information, and the target motion vector accuracy, to obtain an aspect of the motion vector of the current decoded image block, where the inter prediction module is specifically configured to:
确定所述候选运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述候选运动矢量预测值具有的/对应的运动矢量精度;Determining that the candidate motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the candidate motion according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions Vector predictive value has / corresponding motion vector accuracy;
计算所述候选运动矢量预测值MVP和所述运动矢量差值MVD信息之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述候选运动矢量预测值MVP和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度);或者,Calculating a sum of the candidate motion vector predictor value MVP and the motion vector difference value MVD information to obtain a motion vector of the current decoded image block, a motion vector of the current decoded image block, and the candidate motion vector predictor value MVP and motion vector difference MVD have the same motion vector accuracy (that is, both have target motion vector accuracy); or,
基于所述目标运动矢量精度对所述运动矢量差值信息进行缩放(例如放大)处理,以得到经缩放(例如经放大的)的运动矢量差值MVD;计算所述候选运动矢量预测值MVP和所述经缩放的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述候选运动矢量预测值MVP和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度)。And scaling (eg, amplifying) the motion vector difference information based on the target motion vector precision to obtain a scaled (eg, amplified) motion vector difference MVD; calculating the candidate motion vector predictor MVP and a sum of the scaled motion vector difference values MVD to obtain a motion vector of the current decoded image block, the motion vector of the current decoded image block, the candidate motion vector predictor value MVP, and the motion vector difference value MVD having The same motion vector accuracy (that is, both have the target motion vector accuracy).
需要说明的是,这里的多个运动矢量集合与多种运动矢量精度的对应关系可以是一一对应关系,也可以是M:N的对应关系,M不等于N,例如,多个运动矢量集合与多种运动矢量精度也可以是一对多或多对一的对应关系,本申请实施例对此不作限定。It should be noted that the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets. A plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
结合第六方面,在第六方面的某些实现方式中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。In conjunction with the sixth aspect, in some implementations of the sixth aspect, the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is different from the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block And / or time domain neighboring blocks.
结合第六方面,在第六方面的某些实现方式中,如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离小于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,With reference to the sixth aspect, in some implementations of the sixth aspect, if the first distance between the first neighboring block and the current decoded image block corresponding to the motion vector predictor in the first motion vector set is smaller than the first a second distance between the second neighboring block corresponding to the motion vector predictor in the motion vector predictor and the current decoded image block, and the first motion vector corresponding to the first motion vector set is higher in precision than the second motion vector Set the corresponding second motion vector precision; or,
如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set And the second motion distance of the first motion vector set is lower than the second motion vector precision corresponding to the second motion vector set.
结合第六方面,在第六方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是预先设置的。In conjunction with the sixth aspect, in some implementations of the sixth aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
结合第六方面,在第六方面的某些实现方式中,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的,其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离与运动矢量精度的取值大小之间的关系。所述运动矢量精度赋值规则可以理解为:运动矢量预测值所对应的邻近块与当前图像块的距离越近,运动矢量精度越高;运动矢量预测值所对应的邻近块与当前图像块的距离越远,运动矢量精度越低。此外,这里的邻近块可以包括但不限于:所述当前图像块的空域邻近块和/或时域邻近块。With reference to the sixth aspect, in some implementations of the sixth aspect, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein the motion The vector precision assignment rule is used to characterize the relationship between the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the currently decoded image block and the magnitude of the motion vector precision. The motion vector precision assignment rule can be understood as: the closer the distance between the neighboring block corresponding to the motion vector predictor and the current image block, the higher the motion vector accuracy; the distance between the neighboring block corresponding to the motion vector predictor and the current image block The farther away, the lower the motion vector accuracy. Furthermore, adjacent blocks herein may include, but are not limited to, a spatial neighboring block and/or a time domain neighboring block of the current image block.
结合第六方面,在第六方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述解码图像块的序列参数集、图像参数集PPS或者条带头中的任意一种;With reference to the sixth aspect, in some implementations of the sixth aspect, the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, the motion The vector precision parameter is carried in any one of a sequence parameter set, an image parameter set PPS or a slice header of the decoded image block;
相应地,所述熵解码模块还用于从所述码流中解析出所述运动矢量精度参数。Correspondingly, the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
结合第六方面,在第六方面的某些实现方式中,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示用于当前解码处理单元的运动矢量精度个数(例如pps_amvr_number)和与所述运动矢量精度个数对应的至少两种运动矢量精度值(例如pps_amvr_set[pps_amvr_number]),其中所述当前解码处理单元包括视频序列、图像、条带slice、区域partition、解码树单元(Coding Tree Unit,CTU)和解码单元(coding unit,CU)中的一种或多种;In conjunction with the sixth aspect, in some implementations of the sixth aspect, the code stream further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a motion vector accuracy number for the current decoding processing unit ( For example, pps_amvr_number) and at least two motion vector precision values (for example, pps_amvr_set[pps_amvr_number]) corresponding to the motion vector precision number, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, and a decoding. One or more of a Coding Tree Unit (CTU) and a coding unit (CU);
相应地,所述熵解码模块还用于从所述码流中解析出所述运动矢量精度参数。Correspondingly, the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
结合第六方面,在第六方面的某些实现方式中,所述码流进一步携带有第一标识,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;或者,With reference to the sixth aspect, in some implementations of the sixth aspect, the code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; or
所述码流进一步携带有第一标识和第二标识,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;The code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度;The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy;
相应地,所述熵解码模块还用于从所述码流中解析出所述第一标识,或者解码出所述第一标识和第二标识。Correspondingly, the entropy decoding module is further configured to parse the first identifier from the code stream, or decode the first identifier and the second identifier.
本申请的第七方面提供了一种视频解码装置,所述装置包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行所述第一、五方面或其各种实现方式中的方法。A seventh aspect of the present application provides a video decoding apparatus, the apparatus comprising: a processor and a memory coupled to the processor; the processor for performing the first, fifth aspects or various implementations thereof The method in .
本申请的第八方面提供了一种视频编码装置,所述装置包括:处理器和耦合于所述处理器的存储器;所述处理器用于执行所述第三方面或其各种实现方式中的方法。An eighth aspect of the present application provides a video encoding apparatus, the apparatus comprising: a processor and a memory coupled to the processor; the processor for performing the third aspect or various implementations thereof method.
本申请的第九方面提供一种视频解码设备,包括非易失性存储介质,以及处理器,所述非易失性存储介质存储有可执行程序,所述处理器与所述非易失性存储介质相互耦合,并执行所述可执行程序以实现所述第一、五方面或其各种实现方式中的方法。A ninth aspect of the present application provides a video decoding apparatus including a nonvolatile storage medium, and a processor, the nonvolatile storage medium storing an executable program, the processor and the nonvolatile The storage mediums are coupled to one another and execute the executable program to implement the methods of the first, fifth, or various implementations thereof.
本申请的第十方面提供一种视频编码设备,包括非易失性存储介质,以及处理器,所述非易失性存储介质存储有可执行程序,所述处理器与所述非易失性存储介质相互耦合,并执行所述可执行程序以实现所述第三方面或其各种实现方式中的方法。A tenth aspect of the present application provides a video encoding apparatus including a nonvolatile storage medium, and a processor, the nonvolatile storage medium storing an executable program, the processor and the nonvolatile The storage mediums are coupled to each other and the executable program is executed to implement the methods of the third aspect or various implementations thereof.
本申请的第十一方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一或三或五方面或其各种实现方式中的方法。An eleventh aspect of the present application provides a computer readable storage medium having stored therein instructions that, when executed on a computer, cause the computer to perform the first or third or fifth aspects described above or Methods in various implementations.
本申请的第十二方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一或三或五方面或其各种实现方式中的方法。A twelfth aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first or third or fifth aspects or the various implementations thereof.
本申请的第十三方面提供了一种电子设备,包括上述第二、六方面或其各种实现方式所述的视频解码器,或上述第四方面或其各种实现方式所述的视频编码器。A thirteenth aspect of the present application provides an electronic device comprising the video decoder described in the second aspect, the sixth aspect, or the various implementations thereof, or the video coding described in the fourth aspect or various implementation manners thereof Device.
应理解,各方面及对应的可实施的设计方式所取得的有益效果相似,不再赘述。It should be understood that the beneficial effects obtained by the various aspects and the corresponding implementable design manners are similar and will not be described again.
附图说明DRAWINGS
图1为本申请实施例中一种视频编码及解码系统的示意性框图;1 is a schematic block diagram of a video encoding and decoding system in an embodiment of the present application;
图2为本申请实施例中一种视频编码器的示意性框图;2 is a schematic block diagram of a video encoder in an embodiment of the present application;
图3为本申请实施例中一种视频解码器的示意性框图;3 is a schematic block diagram of a video decoder in an embodiment of the present application;
图4A是本申请实施例的一种整数像素位置和分数像素位置的示意图;4A is a schematic diagram of an integer pixel position and a fractional pixel position in an embodiment of the present application;
图4B是本申请实施例的另一种整数像素位置和分数像素位置的示意图;4B is a schematic diagram of another integer pixel position and a fractional pixel position in the embodiment of the present application;
图5是本申请实施例的一种视频编码方法的示意性流程图;FIG. 5 is a schematic flowchart of a video encoding method according to an embodiment of the present application;
图6A是本申请实施例的一种构建AMVP候选MVP列表的示意图;FIG. 6A is a schematic diagram of constructing an AMVP candidate MVP list according to an embodiment of the present application; FIG.
图6B是本申请实施例的另一种构建AMVP候选MVP列表的示意图;FIG. 6B is another schematic diagram of constructing an AMVP candidate MVP list according to an embodiment of the present application; FIG.
图6C是本申请实施例的视频编码器输出的图像参数集PPS的一种语法结构的示意图;6C is a schematic diagram showing a syntax structure of an image parameter set PPS output by a video encoder according to an embodiment of the present application;
图6D是本申请实施例的视频编码器输出的图像参数集PPS的另一种语法结构的示意图;6D is a schematic diagram of another syntax structure of an image parameter set PPS output by a video encoder according to an embodiment of the present application;
图6E是本申请实施例的视频编码器输出的图像参数集PPS的再一种语法结构的示意图;6E is a schematic diagram of still another syntax structure of an image parameter set PPS output by a video encoder according to an embodiment of the present application;
图7是本申请实施例的一种视频解码方法的示意性流程图;FIG. 7 is a schematic flowchart of a video decoding method according to an embodiment of the present application;
图8是一种用于解码端运动矢量导出(DMVD)中的模板匹配方法的示意图;8 is a schematic diagram of a template matching method for decoding end motion vector derivation (DMVD);
图9是一种用于解码端运动矢量导出(DMVD)中的双向匹配方法的示意图;9 is a schematic diagram of a bidirectional matching method for decoding end motion vector derivation (DMVD);
图10是本申请实施例的一种视频解码方法中的步骤705的示意性流程图;FIG. 10 is a schematic flowchart of step 705 in a video decoding method according to an embodiment of the present application;
图11是本申请实施例的另一种编码设备或解码设备的示意性框图;11 is a schematic block diagram of another encoding device or decoding device according to an embodiment of the present application;
图12是本申请实施例的一种电子设备的示意性框图。FIG. 12 is a schematic block diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present application will be clearly and completely described in the following with reference to the accompanying drawings in the embodiments.
编码视频流,或者其一部分,诸如视频帧或者图像块可以使用视频流中的时间和空间相似性以改善编码性能。例如,视频流的当前图像块可以通过基于视频流中的先前已编码块预测用于当前图像块的运动信息,并识别预测块和当前图像块(即原始块)之间的差值(亦称为残差),从而基于先前已编码块对当前图像块进行编码。以这种方法,仅仅将用于产生当前图像块的残差和一些参数包括于数字视频输出位流中,而不是将当前图像块的整体包括于数字视频输出位流。这种技术可以称为帧间预测。An encoded video stream, or a portion thereof, such as a video frame or image block, may use temporal and spatial similarities in the video stream to improve encoding performance. For example, the current image block of the video stream can predict the motion information for the current image block based on the previously encoded block in the video stream and identify the difference between the prediction block and the current image block (ie, the original block) (also known as the original block). Is the residual), thereby encoding the current image block based on the previously encoded block. In this way, only the residuals and some parameters used to generate the current image block are included in the digital video output bitstream, rather than including the entirety of the current image block in the digital video output bitstream. This technique can be called inter prediction.
运动矢量是帧间预测过程中的一个重要参数,其表示先前已编码块相对于该当前编码块的空间位移。可以使用运动估算的方法,诸如运动搜索来获取运动矢量。初期的帧间预测技术,将表示运动矢量的位(即比特)包括在编码的码流中,以允许解码器再现预测块,进而得到重建块。为了进一步的改善编码效率,后来又提出使用运动矢量预测值(亦可称为参考运动矢量)差分地编码运动矢量,即取代编码运动矢量整体,而仅仅编码运动矢量和运动矢量预测值之间的差值。在有些情况下,运动矢量预测值可以是从先前使用的运动矢量中选择出来的,选择先前使用的运动矢量编码当前的运动矢量可以进一步减少包括于经编码视频码流中的比特开销。A motion vector is an important parameter in the inter prediction process that represents the spatial displacement of a previously coded block relative to the current coded block. Motion estimation methods, such as motion search, can be used to obtain motion vectors. In the initial interframe prediction technique, bits (i.e., bits) representing motion vectors are included in the encoded code stream to allow the decoder to reproduce the prediction block, thereby obtaining a reconstructed block. In order to further improve the coding efficiency, it is later proposed to use a motion vector predictor (also referred to as a reference motion vector) to differentially encode the motion vector, that is, instead of coding the motion vector as a whole, and only between the motion vector and the motion vector predictor. Difference. In some cases, the motion vector predictor may be selected from previously used motion vectors, and selecting the previously used motion vector to encode the current motion vector may further reduce the bit overhead included in the encoded video bitstream.
在经编码视频码流(简称为码流或位流)中包含图像块级的运动矢量差MVD信息的前提下,本申请实施例描述自适应地选择用于编码图像块的运动矢量精度及用于通过视频解码器确定视频编码器为所述图像块选择的运动矢量精度的技术方案。根据本申请的一些实施例,视频解码器可在不接收用于指示运动矢量精度的语法元素的情况下推导出由视频编码器为当前图像块所选择的运动矢量精度。根据本申请的一些实施例,视频编码器可在 码流中发信号通知由视频编码器针对某个运动矢量集合(例如重要运动矢量集合)选定的运动矢量精度。根据本申请实施例,可在整数像素精度与不同水平的分数像素精度之间自适应地选择。例如,本申请实施例中,可在用于编码图像块的运动矢量的整数像素精度、四像素精度、二分之一像素精度、四分之一像素精度或八分之一像素精度之间自适应地选择。本申请实施例中的术语“八分之一像素”是指像素的八分之一(1/8)的精度,例如,以下各者中的一者:整数像素位置(0/8)、像素的八分之一(1/8)、像素的八分之二(2/8,也称为像素的四分之一)、像素的八分之三(3/8)、像素的八分之四(4/8,也称为像素的二分之一及像素的四分之二)、像素的八分之五(5/8)、像素的八分之六(6/8,也称为像素的四分之三),或像素的八分之七(7/8)。Under the premise that the encoded video code stream (referred to as the code stream or the bit stream) includes the motion vector difference MVD information at the image block level, the embodiment of the present application describes adaptively selecting the motion vector precision for encoding the image block and using A technical solution for determining a motion vector accuracy selected by the video encoder for the image block by a video decoder. According to some embodiments of the present application, the video decoder may derive the motion vector accuracy selected by the video encoder for the current image block without receiving a syntax element indicating motion vector accuracy. In accordance with some embodiments of the present application, a video encoder may signal, in a code stream, motion vector accuracy selected by a video encoder for a certain set of motion vectors (e.g., an important set of motion vectors). According to embodiments of the present application, an adaptive selection between integer pixel precision and different levels of fractional pixel precision may be employed. For example, in the embodiment of the present application, the integer pixel precision, the four-pixel precision, the half-pixel precision, the quarter-pixel precision, or the eighth-pixel precision of the motion vector used for encoding the image block may be Adapt to the choice. The term "an eighth pixel" in the embodiment of the present application refers to an accuracy of one eighth (1/8) of a pixel, for example, one of the following: an integer pixel position (0/8), a pixel One-eighth (1/8), two-eighths of a pixel (2/8, also known as a quarter of a pixel), three-eighths of a pixel (3/8), and an eighth of a pixel Four (4/8, also known as one-half of a pixel and two-quarters of a pixel), five-fifths of a pixel (5/8), and six-eighths of a pixel (6/8, also known as Three-quarters of the pixels, or seven-eighths of the pixels (7/8).
图1为本申请实施例中视频编码及解码系统10的一种示意性框图。系统10中视频编码器20用于根据本申请提出的视频编码过程的各种方法实例来自适应地选择用于编码图像块的目标运动矢量精度(例如整像素精度或1/2像素精度或1/4像素精度或1/8像素精度或4像素精度等)。系统10中视频解码器30用于根据本申请提出的视频解码过程的各种方法实例来确定视频编码器为图像块选择的用于编码图像块的运动矢量精度,从而提高运动矢量预测精度,进而改善编解码性能。FIG. 1 is a schematic block diagram of a video encoding and decoding system 10 in an embodiment of the present application. Video encoder 20 in system 10 is operative to adaptively select target motion vector precision for encoding image blocks in accordance with various method examples of video encoding processes proposed herein (eg, integer pixel precision or 1/2 pixel precision or 1/ 4 pixel precision or 1/8 pixel precision or 4 pixel precision, etc.). The video decoder 30 in the system 10 is configured to determine motion vector precision for encoding image blocks selected by the video encoder for the image block according to various method examples of the video decoding process proposed by the present application, thereby improving motion vector prediction accuracy, and further Improve codec performance.
如图1所示,系统10包含源装置12和目的地装置14,源装置12产生将在稍后时间由目的地装置14解码的经编码视频数据。源装置12及目的地装置14可包括广泛范围的装置中的任一者,包含桌上型计算机、笔记型计算机、平板计算机、机顶盒、例如所谓的“智能”电话的电话手机、所谓的“智能”触控板、电视、摄影机、显示装置、数字媒体播放器、视频游戏控制台、视频流式传输装置或类似者。As shown in FIG. 1, system 10 includes source device 12 and destination device 14, which produces encoded video data that will be decoded by destination device 14 at a later time. Source device 12 and destination device 14 may comprise any of a wide range of devices, including desktop computers, notebook computers, tablet computers, set top boxes, telephone handsets such as so-called "smart" phones, so-called "smart" "Touchpads, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices or the like.
目的地装置14可经由通信链路16接收待解码的经编码视频数据。通信链路16可包括能够将经编码视频数据从源装置12移动到目的地装置14的任何类型的媒体或装置。在一个可行的实施方式中,通信链路16可包括使源装置12能够实时将经编码视频数据直接传输到目的地装置14的通信媒体。可根据通信标准(例如,无线通信协议)调制经编码视频数据且将其传输到目的地装置14。通信媒体可包括任何无线或有线通信媒体,例如射频频谱或一个或多个物理传输线。通信媒体可形成基于包的网络(例如,局域网、广域网或因特网的全球网络)的部分。通信媒体可包含路由器、交换器、基站或可有用于促进从源装置12到目的地装置14的通信的任何其它装备。Destination device 14 may receive encoded video data to be decoded via communication link 16. Communication link 16 may include any type of media or device capable of moving encoded video data from source device 12 to destination device 14. In one possible implementation, communication link 16 may include communication media that enables source device 12 to transmit encoded video data directly to destination device 14 in real time. The encoded video data can be modulated and transmitted to destination device 14 in accordance with a communication standard (e.g., a wireless communication protocol). Communication media can include any wireless or wired communication medium, such as a radio frequency spectrum or one or more physical transmission lines. The communication medium can form part of a packet-based network (eg, a global network of local area networks, wide area networks, or the Internet). Communication media can include routers, switches, base stations, or any other equipment that can be used to facilitate communication from source device 12 to destination device 14.
替代地,可将经编码数据从输出接口22输出到存储装置(未示意)。类似地,可由输入接口从存储装置存取经编码数据。存储装置可包含多种分散式或本地存取的数据存储媒体中的任一者,例如,硬盘驱动器、蓝光光盘、DVD、CD-ROM、快闪存储器、易失性或非易失性存储器或用于存储经编码视频数据的任何其它合适的数字存储媒体。在另一可行的实施方式中,存储装置可对应于文件服务器或可保持由源装置12产生的经编码视频的另一中间存储装置。目的地装置14可经由流式传输或下载从存储装置存取所存储视频数据。文件服务器可为能够存储经编码视频数据且将此经编码视频数据传输到目的地装置14的任何类型的服务器。可行的实施方式文件服务器包含网站服务器、文件传送协议服务器、网络附接存储装置或本地磁盘机。目的地装置14可经由包含因特网连接的任何标准数据连接存取经编码视频数据。此数据连接可包含适合于存取存储于文件服务器上的经编码视频数据的无线信道(例如,Wi-Fi连接)、有线连接(例如,缆线调制解调器等)或两者 的组合。经编码视频数据从存储装置的传输可为流式传输、下载传输或两者的组合。Alternatively, the encoded data may be output from the output interface 22 to a storage device (not shown). 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 (e.g., a Wi-Fi connection), a wired connection (e.g., 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 is used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and/or video telephony.
在图1的可行的实施方式中,源装置12包括视频源18、视频编码器20及输出接口22。根据本申请实施例,源装置12的视频编码器20用于支持自适应选择用于编码图像块的运动矢量分辨率(亦称为运动矢量精度或像素精度)的技术。在一些应用中,输出接口22可包括调制器/解调制器(调制解调器)和/或传输器。在源装置12中,视频源18可包括例如以下各者的源:视频捕获装置(例如,摄像机)、含有先前捕获的视频的视频存档、用以从视频内容提供者接收视频的视频馈入接口,和/或用于产生计算机图形数据作为源视频的计算机图形系统,或这些源的组合。作为一种可行的实施方式,如果视频源18为摄像机,那么源装置12及目的装置14可形成所谓的摄影机电话或视频电话。本申请中所描述的技术可示例性地适用于视频解码,且可适用于无线和/或有线应用。In the possible implementation of FIG. 1, source device 12 includes video source 18, video encoder 20, and output interface 22. In accordance with an embodiment of the present application, video encoder 20 of source device 12 is operative to support adaptive selection of techniques for encoding motion vector resolution (also referred to as motion vector accuracy or pixel precision) of an image block. In some applications, output interface 22 may include a modulator/demodulator (modem) and/or a transmitter. In source device 12, video source 18 may include sources such as video capture devices (eg, cameras), video archives containing previously captured video, video feed interfaces to receive video from video content providers. And/or a computer graphics system for generating computer graphics data as source video, or a combination of these sources. As a possible implementation, if the video source 18 is a video camera, the source device 12 and the destination device 14 may form a so-called camera phone or video phone. The techniques described in this application are illustratively applicable to video decoding and are applicable to wireless and/or wired applications.
可由视频编码器20来编码所捕获、预捕获或计算机产生的视频。经编码视频数据可经由源装置12的输出接口22直接传输到目的地装置14。经编码视频数据也可(或替代地)存储到存储装置(未示意)上以供稍后由目的地装置14或其它装置存取以用于解码和/或播放。Captured, pre-captured, or computer generated video may be encoded by video encoder 20. The encoded video data can be transmitted directly to the destination device 14 via the output interface 22 of the source device 12. The encoded video data may also (or alternatively) be stored on a storage device (not shown) for later access by the destination device 14 or other device for decoding and/or playback.
目的地装置14包括输入接口28、视频解码器30及显示装置32。在一些应用中,输入接口28可包括接收器和/或调制解调器。目的地装置14的输入接口28经由通信链路16接收经编码视频数据。经由通信链路16传达或提供于存储装置上的经编码视频数据可包含由视频编码器20产生以供视频解码器30使用以解码视频数据的多种语法元素(参见图6C至6E,下文将详细介绍)。这些语法元素可与在通信媒体上传输、存储于存储媒体上或存储于文件服务器上的经编码视频数据包含在一起。Destination device 14 includes an input interface 28, a video decoder 30, and a display device 32. In some applications, input interface 28 can include a receiver and/or a modem. The input interface 28 of the destination device 14 receives the encoded video data via the communication link 16. The encoded video data communicated or provided on the storage device via communication link 16 may include various syntax elements generated by video encoder 20 for use by video decoder 30 to decode the video data (see Figures 6C-6E, below) Detailed introduction). 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-T H.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-T H.263.
尽管未在图1中展示,但在一些方面中,视频编码器20及视频解码器30可各自与音频编码器及解码器集成,且可包含适当多路复用器-多路分用器(MUX-DEMUX)单元或其它硬件及软件以处置共同数据流或单独数据流中的音频及视频两者的编码。如果适用,那 么在一些可行的实施方式中,MUX-DEMUX单元可遵照ITUH.223多路复用器协议或例如用户数据报协议(UDP)的其它协议。Although not shown in FIG. 1, in some aspects video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder and may include a suitable multiplexer-demultiplexer ( MUX-DEMUX) unit or other hardware and software to handle the encoding of both audio and video in a common data stream or in a separate data stream. If applicable, in some possible implementations, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).
视频编码器20及视频解码器30各自可实施为多种合适编码器电路中的任一者,例如,一个或多个微处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)、离散逻辑、软件、硬件、固件或其任何组合。在技术部分地以软件实施时,装置可将软件的指令存储于合适的非暂时性计算机可读媒体中且使用一个或多个处理器以硬件执行指令,以执行本申请的技术。视频编码器20及视频解码器30中的每一者可包含于一个或多个编码器或解码器中,其中的任一者可在相应装置中集成为组合式编码器/解码器(CODEC)的部分。 Video encoder 20 and video decoder 30 may each be implemented as any of a variety of suitable encoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Field Programmable Gate Array (FPGA), discrete logic, software, hardware, firmware, or any combination thereof. When the technology is partially implemented in software, the apparatus may store the instructions of the software in a suitable non-transitory computer readable medium and execute the instructions in hardware using one or more processors to perform the techniques of the present application. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, any of which may be integrated into a combined encoder/decoder (CODEC) in a respective device. part.
本申请示例性地可涉及视频编码器20将特定信息“用信号发送”到例如视频解码器30的另一装置。然而,应理解,视频编码器20可通过将特定语法元素与视频数据的各种经编码部分相关联来用信号发送信息。即,视频编码器20可通过将特定语法元素存储到视频数据的各种经编码部分的头信息来“用信号发送”数据。在一些应用中,这些语法元素可在通过视频解码器30接收及解码之前经编码及存储(例如,存储到存储系统或文件服务器)。因此,术语“用信号发送”示例性地可指语法或用于解码经压缩视频数据的其它数据的传达,而不管此传达是实时或近实时地发生或在时间跨度内发生,例如可在编码时将语法元素存储到媒体时发生,语法元素接着可在存储到此媒体之后的任何时间通过解码装置检索。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 a storage system or file server) prior to being received and decoded by video decoder 30. Thus, the term "signaling" may illustratively refer to the communication of grammar or other data used to decode compressed video data, whether this communication occurs in real time or near real time or occurs over a time span, such as may be encoded Occurs when a syntax element is stored to the media, and the syntax element can then be retrieved by the decoding device at any time after storage to the media.
JCT-VC开发了H.265(HEVC)标准。HEVC标准化基于称作HEVC测试模型(HM)的视频解码装置的演进模型。H.265的最新标准文档可从http://www.itu.int/rec/T-REC-H.265获得,最新版本的标准文档为H.265(12/16),该标准文档以全文引用的方式并入本文中。HM假设视频解码装置相对于ITU-TH.264/AVC的现有算法具有若干额外能力。例如,H.264提供9种帧内预测编码模式,而HM可提供多达35种帧内预测编码模式。JCT-VC developed the H.265 (HEVC) standard. HEVC standardization is based on an evolution model of a video decoding device called the HEVC Test Model (HM). The latest standard documentation for H.265 is available at http://www.itu.int/rec/T-REC-H.265. The latest version of the standard document is H.265 (12/16), which is the full text of the standard document. The manner of reference is incorporated herein. The HM assumes that the video decoding device has several additional capabilities with respect to existing algorithms of ITU-TH.264/AVC. For example, H.264 provides nine intra-prediction coding modes, while HM provides up to 35 intra-prediction coding modes.
一般来说,HM的工作模型描述可将视频帧或图像划分成包含亮度及色度样本两者的树块或最大编码单元(largest coding unit,LCU)的序列,LCU也被称为CTU。树块具有与H.264标准的宏块类似的目的。条带包含按解码次序的数个连续树块。可将视频帧或图像分割成一个或多个条带。可根据四叉树将每一树块分裂成编码单元。例如,可将作为四叉树的根节点的树块分裂成四个子节点,且每一子节点可又为母节点且被分裂成另外四个子节点。作为四叉树的叶节点的最终不可分裂的子节点包括解码节点,例如,经解码图像块。与经解码码流相关联的语法数据可定义树块可分裂的最大次数,且也可定义解码节点的最小大小。In general, the working model description of HM can divide a video frame or image into a sequence of treeblocks or largest coding units (LCUs) containing both luminance and chrominance samples, also referred to as CTUs. Treeblocks have similar purposes to macroblocks of the H.264 standard. A stripe contains several consecutive treeblocks in decoding order. A video frame or image can be segmented into one or more stripes. Each tree block can be split into coding units according to a quadtree. For example, a tree block that is the root node of a quadtree can be split into four child nodes, and each child node can be a parent node again and split into four other child nodes. The final non-splitable child nodes that are leaf nodes of the quadtree include decoding nodes, such as decoded image 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.
编码单元(coding unit,CU)包含解码节点及预测单元(prediction unit,PU)以及与解码节点相关联的变换单元(transform unit,TU)。CU的大小对应于解码节点的大小且形状必须为正方形。CU的大小的范围可为8×8像素直到最大64×64像素或更大的树块的大小。每一CU可含有一个或多个PU及一个或多个TU。例如,与CU相关联的语法数据可描述将CU分割成一个或多个PU的情形。分割模式在CU是被跳过或经直接模式编码、帧内预测模式编码或帧间预测模式编码的情形之间可为不同的。PU可经分割成形状为非正方形。例如,与CU相关联的语法数据也可描述根据四叉树将CU分割成一个或多个TU的情形。TU的形状可为正方形或非正方形。A coding unit (CU) includes a decoding node and a prediction unit (PU) and a transform unit (TU) associated with the decoding node. The size of the CU corresponds to the size of the decoding node and the shape must be square. The size of the CU may range from 8 x 8 pixels up to a maximum of 64 x 64 pixels or larger. Each CU may contain one or more PUs and one or more TUs. For example, syntax data associated with a CU may describe a situation in which a CU is partitioned into one or more PUs. The split mode may be different between situations where the CU is skipped or encoded by direct mode coding, intra prediction mode coding, or inter prediction mode. The PU can be divided into a shape that is non-square. For example, syntax data associated with a CU may also describe a situation in which a CU is partitioned into one or more TUs according to a quadtree. The shape of the TU can be square or non-square.
HEVC标准允许根据TU进行变换,TU对于不同CU来说可为不同的。TU通常基于针对经分割LCU定义的给定CU内的PU的大小而设定大小,但情况可能并非总是如此。TU的大小通常与PU相同或小于PU。在一些可行的实施方式中,可使用称作“残差四叉树”(residual qualtree,RQT)的四叉树结构将对应于CU的残差样本再分成较小单元。RQT的叶节点可被称作TU。可变换与TU相关联的像素差值以产生变换系数,变换系数可被量化。The HEVC standard allows for transforms based on TUs, which can be different for different CUs. The TU is typically sized based on the size of the PU within a given CU defined for the partitioned LCU, although this may not always be the case. The size of the TU is usually the same as or smaller than the PU. In some possible implementations, the residual samples corresponding to the CU may be subdivided into smaller units using a quadtree structure called a "residual qualtree" (RQT). The leaf node of the RQT can be referred to as a TU. The pixel difference values associated with the TU may be transformed to produce transform coefficients, which may be quantized.
例如,在PU经帧内模式编码时,涉及描述PU的帧内预测模式的数据。例如,在PU经帧间模式编码时,涉及用于确定PU的运动矢量的数据。例如,用于确定PU的运动矢量的数据可描述运动矢量的水平分量、运动矢量的垂直分量、运动矢量的分辨率(例如,整数像素精度、二分之一像素精度、四分之一像素精度或八分之一像素精度等)、运动矢量所指向的参考图像,和/或运动矢量的参考图像列表(例如,列表0或列表1)。For example, when the PU is intra-mode encoded, data related to the intra prediction mode of the PU is involved. For example, when the PU is inter-mode encoded, data for determining a motion vector of the PU is involved. For example, the data used to determine the motion vector of the PU may describe the horizontal component of the motion vector, the vertical component of the motion vector, and the resolution of the motion vector (eg, integer pixel precision, half pixel precision, quarter pixel precision) Or an eighth-pixel precision, etc.), a reference image pointed to by the motion vector, and/or a reference image list of motion vectors (eg, list 0 or list 1).
根据本申请实施例,视频编码器20可自适应地选择具有整数像素精度的运动矢量或者分数(例如四分之一或八分之一)像素精度的运动矢量。根据本申请的一些实施例,视频编码器20可不需要产生图像块的运动矢量的像素精度的指示以包含在经编码视频数据的码流中。而是,视频解码器30可使用由视频编码器20使用的相同或相似的方法推导出所述运动矢量精度。根据本申请的另一些实施例,视频编码器20可在码流中包含被视频解码器30用来确定所选定的运动矢量精度的一或多个语法元素。应当理解的是,为了计算分数像素位置的值,视频编码器20可包含多种内插滤波器。对于具有分数像素精度的运动矢量,使用内插滤波器内插得到该运动矢量指示的当前图像块的预测块。例如,双线性内插可用于计算分数像素位置的值。视频编码器20用于执行运动搜索以得到运动矢量。In accordance with embodiments of the present application, video encoder 20 may adaptively select motion vectors having integer pixel precision or fractional (eg, quarter or eighth) pixel precision motion vectors. According to some embodiments of the present application, video encoder 20 may not need to generate an indication of the pixel precision of the motion vector of the image block to be included in the code stream of the encoded video data. Rather, video decoder 30 may derive the motion vector accuracy using the same or similar methods used by video encoder 20. In accordance with further embodiments of the present application, video encoder 20 may include in the codestream one or more syntax elements used by video decoder 30 to determine the accuracy of the selected motion vector. It should be understood that to calculate the value of the fractional pixel position, video encoder 20 may include a variety of interpolation filters. For a motion vector with fractional pixel precision, an interpolation filter is used to interpolate the predicted block of the current image block indicated by the motion vector. For example, bilinear interpolation can be used to calculate the value of a fractional pixel position. Video encoder 20 is operative to perform a motion search to obtain a motion vector.
一般来说,TU使用变换及量化过程。具有一个或多个PU的给定CU也可包含一个或多个变换单元(TU)。在预测之后,视频编码器20可计算对应于PU的残差值。残差值包括像素差值,像素差值可变换成变换系数、经量化且使用TU扫描以产生串行化变换系数以用于熵解码。In general, TUs use transform and quantization processes. A given CU with one or more PUs may also include one or more transform units (TUs). After prediction, video encoder 20 may calculate a residual value corresponding to the PU. The residual value includes pixel difference values, which can be transformed into transform coefficients, quantized, and scanned using TU to produce serialized transform coefficients for entropy decoding.
在使用CU的PU的帧内预测性或帧间预测性解码之后,视频编码器20可计算CU的TU的残差数据。PU可包括空间域(也称作像素域)中的像素数据,且TU可包括在将变换(例如,离散余弦变换(discrete cosine transform,DCT)、整数变换、小波变换或概念上类似的变换)应用于残差视频数据之后变换域中的系数。残差数据可对应于未经编码图像的像素与对应于PU的预测值之间的像素差。视频编码器20可形成包含CU的残差数据的TU,且接着变换TU以产生CU的变换系数。After intra-predictive or inter-predictive decoding of a PU using a CU, video encoder 20 may calculate residual data for the TU of the CU. A PU may include pixel data in a spatial domain (also referred to as a pixel domain), and a TU may be included in transforming (eg, discrete cosine transform (DCT), integer transform, wavelet transform, or conceptually similar transform) Coefficients in the transform domain after application to the residual video data. The residual data may correspond to a pixel difference between a pixel of the uncoded image and a predicted value corresponding to the PU. Video encoder 20 may form a TU that includes residual data for the CU, and then transform the TU to generate transform coefficients for the CU.
在任何变换以产生变换系数之后,视频编码器20可执行变换系数的量化。量化示例性地指对系数进行量化以可能减少用以表示系数的数据的量从而提供进一步压缩的过程。量化过程可减少与系数中的一些或全部相关联的位深度。例如,可在量化期间将n位值降值舍位到m位值,其中n大于m。After any transform to generate transform coefficients, video encoder 20 may perform quantization of the transform coefficients. Quantization illustratively refers to the process of quantizing the coefficients to possibly reduce the amount of data used to represent the coefficients to provide further compression. The quantization process can reduce the bit depth associated with some or all of the coefficients. For example, the n-bit value can be rounded down to an m-bit value during quantization, where n is greater than m.
在一些可行的实施方式中,视频编码器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.
目的地装置14的视频解码器30用于执行与本申请实施例的视频编码器20的技术方案中的任一者或全部类似或对应的技术方案。例如,使用同一推导技术,视频解码器30可在不接收指示运动矢量精度的语法元素的情况下确定使用什么运动矢量精度解码所述视频数据。The video decoder 30 of the destination device 14 is configured to perform a technical solution similar or corresponding to any or all of the technical solutions of the video encoder 20 of the embodiment of the present application. For example, using the same derivation technique, video decoder 30 may determine what motion vector precision to use to decode the video data without receiving a syntax element indicating motion vector accuracy.
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.
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.
本申请可将视频解码器当前正在解码的PU称作当前解码PU,也称为当前解码图像块(亦称为当前解码单元)。本申请可将视频解码器当前正在解码的CU称作当前解码CU,也称为当前解码图像块(亦称为当前解码单元)。本申请可将视频编码器当前正在编码的PU称作当前编码PU,也称为当前编码图像块(亦称为当前编码单元)。本申请可将视频解码器当前正在编码的CU称作当前编码CU,也称为当前编码图像块(亦称为当前编码单元)。本申请可将视频解码器当前在解码的图像称作当前图像。应理解,本申请同时适用于PU和CU具有相同尺寸,或者PU即为CU的情况,统一使用图像块来表示。在一些特定应用中,本申请也可使用术语“图像块”来指包含解码节点以及PU及TU的树块,例如,LCU或CU。The present application may refer to a PU that the video decoder is currently decoding as a current decoded PU, also referred to as a current decoded image block (also referred to as a current decoding unit). The present application may refer to a CU that the video decoder is currently decoding as a current decoding CU, also referred to as a current decoded image block (also referred to as a current decoding unit). The present application may refer to a PU that the video encoder is currently encoding as a current encoded PU, also referred to as a current encoded image block (also referred to as a current coding unit). The present application may refer to a CU currently being encoded by a video decoder as a current encoded CU, also referred to as a current encoded image block (also referred to as a current coding unit). 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 image block is uniformly used for representation. In some specific applications, the term "image 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.
本申请实施例的下文将详细介绍视频编码过程或视频解码过程的各种方法实例来自适应地选择用于编码图像块的运动矢量精度及通过视频解码器确定视频编码器为所述图像块选择的运动矢量精度,以提高图像块的运动矢量预测精度,进而改善编解码性能。Various method examples of a video encoding process or a video decoding process will be described in detail below in the embodiments of the present application to adaptively select motion vector precision for encoding an image block and determine by the video decoder that the video encoder selects for the image block. Motion vector accuracy to improve the motion vector prediction accuracy of the image block, thereby improving the codec performance.
图2为本申请实施例中视频编码器20的一种示意性框图。一并参阅图5,视频编码器20可执行自适应确定用于编码当前图像块的运动矢量分辨率(亦称为运动矢量精度或像素精度)的过程,尤其是视频编码器20中的预测模块40,例如帧间预测模块41可执行自适应确定用于编码当前图像块的运动矢量分辨率的过程。FIG. 2 is a schematic block diagram of a video encoder 20 in the embodiment of the present application. Referring to FIG. 5 together, video encoder 20 may perform adaptive determination of a process for encoding motion vector resolution (also referred to as motion vector accuracy or pixel precision) of a current image block, particularly a prediction module in video encoder 20. 40. For example, inter prediction module 41 may perform a process of adaptively determining a motion vector resolution for encoding a current image block.
针对视频帧中的图像块,视频编码器20可执行所述图像块(例如LCU、CU或PU)的帧内及帧间预测。帧内预测过程依赖于空间预测以减少或去除视频帧或图像内的视频数据的空间冗余。帧间预测过程依赖于时间预测以减少或去除视频序列的邻近帧或邻近图像内的视频数据的时间冗余。帧内模式(I模式)可指若干基于空间的压缩模式中的任一者;帧间模式,例如单向预测(P模式)或双向预测(B模式)可指若干基于时间的压缩模式中的 任一者。For an image block in a video frame, video encoder 20 may perform intra and inter prediction of the image block (eg, LCU, CU, or PU). The intra prediction process relies on spatial prediction to reduce or remove spatial redundancy of video data within a video frame or image. The inter prediction process relies on temporal prediction to reduce or remove temporal redundancy of video data within adjacent frames or adjacent images of a video sequence. An intra mode (I mode) may refer to any of a number of spatially based compressed modes; an inter mode, such as unidirectional prediction (P mode) or bidirectional prediction (B mode) may refer to several time based compression modes Either.
如图2所示,视频编码器20接收待编码视频帧内的当前图像块。在图2的实例中,视频编码器20可以包括:预测模块40、参考图像存储器64、求和器50、变换模块52、量化模块54和熵编码模块56。预测模块40可以包括帧间预测模块41和帧内预测模块46。帧间预测模块41可执行帧间预测过程,而帧内预测模块46可执行帧内预测过程。作为一种示例方式,帧间预测模块41可以包括运动估计模块42和运动补偿模块44。为了重构建图像块,视频编码器20还可以包括:反量化模块58、反变换模块60及求和器62(亦称为重建模块62)。在一种实现方式下,视频编码器20还可以包括解块滤波器(图2中未图示)以便对块边界进行滤波,从而从经重构建图像中去除块效应伪影。在需要时,解块滤波器通常对求和器62的输出进行滤波。除了解块滤波器之外,也可使用额外环路滤波器(环路内或环路后)。在另一种实现方式下,视频编码器20还可包括视频数据存储器(图2中未图示),其中视频数据存储器可存储待由视频编码器20编码的视频数据。存储在视频数据存储器中的视频数据可例如从视频源18获得。参考图像存储器64(亦称为经解码图像缓冲器64)用于存储供视频编码器20编码视频数据的参考图像数据,例如用于存储供视频编码器20在帧内或帧间译码模式中需使用到的参考图像数据。视频数据存储器及参考图像存储器64可通过多种存储器装置中的任一者形成,例如,动态随机存储器(DRAM),包含同步DRAM(SDRAM)、磁阻式RAM(MRAM)、电阻性RAM(RRAM)或其它类型的存储器装置。可由相同的存储器装置或单独的存储器装置提供视频数据存储器及参考图像存储器64。在不同实现方式下,视频数据存储器可以与视频编码器20的其它模块一样部署在芯片上,或者,相对于视频编码器20的其它模块,视频数据存储器可以设置在芯片之外。As shown in FIG. 2, video encoder 20 receives a current image block within a video frame to be encoded. In the example of FIG. 2, video encoder 20 may include prediction module 40, reference image memory 64, summer 50, transform module 52, quantization module 54, and entropy encoding module 56. The prediction module 40 can include an inter prediction module 41 and an intra prediction module 46. Inter prediction module 41 may perform an inter prediction process, while intra prediction module 46 may perform an intra prediction process. As an example manner, inter prediction module 41 may include motion estimation module 42 and motion compensation module 44. To reconstruct the image block, video encoder 20 may also include an inverse quantization module 58, an inverse transform module 60, and a summer 62 (also referred to as reconstruction module 62). In one implementation, video encoder 20 may also include a deblocking filter (not shown in FIG. 2) to filter block boundaries to remove blockiness artifacts from the reconstructed image. The deblocking filter typically filters 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. In another implementation, video encoder 20 may also include a video data store (not shown in FIG. 2), where the video data store may store video data to be encoded by video encoder 20. Video data stored in the video data store can be obtained, for example, from video source 18. Reference image memory 64 (also referred to as decoded image buffer 64) is used to store reference image data for video encoder 20 encoding video data, such as for storage by video encoder 20 in an intra or inter coding mode. Reference image data to be used. The video data memory and reference image memory 64 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM). Or other types of memory devices. The video data memory and reference image memory 64 may be provided by the same memory device or a separate memory device. In various implementations, the video data store can be deployed on the chip as other modules of video encoder 20, or the video data store can be disposed external to the chip relative to other modules of video encoder 20.
如图2所示,在编码过程中,视频编码器20接收待编码的视频帧或条带(slice)。可将帧或条带划分成多个图像块(例如LCU、CU或PU),例如,可以根据LCU及CU的四叉树结构进行图像块的划分。As shown in FIG. 2, during encoding, video encoder 20 receives a video frame or slice to be encoded. The frame or slice may be divided into a plurality of image blocks (for example, an LCU, a CU, or a PU), for example, the division of the image block may be performed according to a quadtree structure of the LCU and the CU.
预测模块40可基于编码质量与代价计算结果(例如,码率-失真代价,RDcost)选择当前图像块的多个编码模式中的一者,例如多个帧内编码模式中的一者或多个帧间编码模式中的一者。预测模块40可将所得经帧内编码块或经帧间编码块提供给求和器50以产生残差块数据且将所得经帧内编码块或经帧间编码块提供给求和器62以重构建经编码图像块,从而用作参考图像。 Prediction module 40 may select one of a plurality of encoding modes of the current image block, such as one or more of a plurality of intra encoding modes, based on encoding quality and cost calculation results (eg, rate-distortion cost, RDcost). One of the inter coding modes. Prediction module 40 may provide the resulting intra-coded block or inter-coded block to summer 50 to generate residual block data and provide the resulting intra-coded block or inter-coded block to summer 62. The encoded image block is reconstructed for use as a reference image.
帧间预测模块41内的运动估计模块42及运动补偿模块44可相对于一或多个参考图像中的一或多个图像块执行所接收的当前图像块的帧间预测编码以提供时间压缩。运动估计单元42用于根据视频序列的预定模式确定视频条带的帧间预测模式。预定模式可将视频序列中的视频条带指定为P条带、B条带或GPB条带。帧内预测模块46可相对于与待编码的图像块相同的帧或条带中的一或多个相邻块执行对所接收图像块的帧内预测编码,以提供空间压缩。Motion estimation module 42 and motion compensation module 44 within inter prediction module 41 may perform inter prediction encoding of the received current image block relative to one or more of the one or more reference images to provide temporal compression. Motion estimation unit 42 is operative to determine an inter prediction mode for the video stripe based on a predetermined pattern of the video sequence. The predetermined mode may designate a video stripe in a video sequence as a P strip, a B strip, or a GPB strip. Intra prediction module 46 may perform intra prediction encoding of the received image block relative to one or more neighboring blocks in the same frame or strip as the image block to be encoded to provide spatial compression.
运动估计模块42和运动补偿模块44可集成在一起,但出于概念的目的也可以分别加以说明。运动估计单元42用于执行运动估计过程,以得到运动矢量。举例来说,运动矢量用于指示当前视频帧或当前图像内的当前正在编码的图像块(简称为当前编码块)相对于参考图像内的预测块的位移。其中,预测块是找到的与当前编码块紧密匹配的块,例如是根据块与块之间的差异值找到的与当前编码块紧密匹配的块,其中,两个块之间的差异 值,可以看做是两个块内各个对应位置像素点差异值的累加。差异的计算方法一般基于SAD(sum of absolute difference,绝对差总和)准则。或者其他准则,例如SATD(Sum of Absolute Transform Difference),MR-SAD(mean-removed sum of absolute difference),SSD(sum of squared differences,平方差总和)等进行计算。在一些可行的实施方式中,视频编码器20可计算存储于参考图像存储器64中的参考图像的分数(sub-integer)像素位置的值。例如,视频编码器20可内插参考图像的四分之一像素位置、八分之一像素位置或其它分数像素位置的值。其中,运动估计模块42可用于执行相对于整数像素位置及分数像素位置的运动搜索且输出具有整数像素精度的运动矢量或者具有分数像素精度的运动矢量。换言之,即帧间预测模块41(例如运动估计模块42)可对当前图像块(例如当前CU或当前PU,某些情况下当前CU即为当前PU)执行整数运动估计(Integer Motion Estimation,IME)且接着执行分数运动估计(Fraction Motion Estimation,FME)。当帧间预测模块41(例如运动估计模块42)对当前图像块执行IME时,帧间预测模块41(例如运动估计模块42)可在一个或多个参考图像中搜索用于当前图像块的参考块。在找到用于当前图像块的参考块之后,帧间预测模块41(例如运动估计模块42)可产生用于指示参考块相对于当前图像块之间的位移的运动矢量,且所述运动矢量具有整数像素精度。当帧间预测模块41(例如运动估计模块42)对当前图像块执行FME时,帧间预测模块41(例如运动估计模块42)可改进通过对当前图像块执行IME而产生的运动矢量。通过对当前图像块执行FME而产生的运动矢量可具有分数像素精度(例如,1/2像素精度、1/4像素精度等)。在产生当前图像块的运动矢量之后,帧间预测模块41(例如运动补偿模块44)可使用当前图像块的运动矢量以产生当前图像块的预测块。Motion estimation module 42 and motion compensation module 44 may be integrated together, but may be separately illustrated for conceptual purposes. Motion estimation unit 42 is operative to perform a motion estimation process to obtain a motion vector. For example, the motion vector is used to indicate the displacement of the current video frame or the currently being coded image block (referred to as the current coding block) within the current image relative to the prediction block within the reference image. Wherein, the prediction block is a block that is found to closely match the current coding block, for example, a block that is closely matched with the current coding block according to the difference value between the block and the block, wherein the difference value between the two blocks may be It is regarded as the accumulation of pixel difference values at each corresponding position in the two blocks. The calculation method of difference is generally based on the SAD (sum of absolute difference) criterion. Or other criteria, such as SATD (Sum of Absolute Transform Difference), MR-SAD (mean-removed sum of absolute difference), SSD (sum of squared differences), and the like. 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. The motion estimation module 42 can be configured to perform motion search with respect to integer pixel locations and fractional pixel locations and output motion vectors with integer pixel precision or motion vectors with fractional pixel precision. In other words, the inter prediction module 41 (eg, the motion estimation module 42) may perform an Integer Motion Estimation (IME) on the current image block (eg, the current CU or the current PU, in some cases the current CU is the current PU). And then Fractional Motion Estimation (FME) is performed. When inter prediction module 41 (eg, motion estimation module 42) performs an IME on the current image block, inter prediction module 41 (eg, motion estimation module 42) may search for references to the current image block in one or more reference images. Piece. After finding the reference block for the current image block, inter prediction module 41 (eg, motion estimation module 42) may generate a motion vector indicating the displacement between the reference block relative to the current image block, and the motion vector has Integer pixel precision. When inter prediction module 41 (e.g., motion estimation module 42) performs FME on the current image block, inter prediction module 41 (e.g., motion estimation module 42) may improve the motion vectors generated by performing IME on the current image block. A motion vector generated by performing FME on a current image block may have fractional pixel precision (eg, 1/2 pixel precision, 1/4 pixel precision, etc.). After generating the motion vector of the current image block, inter prediction module 41 (e.g., motion compensation module 44) may use the motion vector of the current image block to generate a prediction block for the current image block.
运动估计模块42用于通过比较当前编码图像块与参考图像存储器64中的参考图像的图像块而计算经帧间编码帧中的当前编码图像块的运动矢量。在参考图像存储器64中的参考图像包含分数像素位置的值时,由运动估计模块42计算的运动矢量可指向参考图像的分数像素位置。如果没有分数像素位置的值存储在参考图像存储器64中,那么运动估计模块42或运动补偿模块44还用于计算存储在参考图像存储器64中的参考图像的分数像素位置的值,例如内插参考图像(例如I帧或P帧)的分数像素。作为一实例,可从第一参考图像列表(列表0)或第二参考图像列表(列表1)选择参考图像,列表中的每一者(例如参考图像索引)用于识别存储于参考图像存储器64中的一个或多个参考图像。运动估计模块42用于发送或提供运动矢量给运动补偿模块44。本发明实施例中,帧间预测模块41(例如运动估计模块42)还用于将当前编码图像块的运动矢量差值(MVD)信息发送给熵编码模块56,这里的运动矢量差值信息用于表示使用IME和/或FME针对当前图像块产生的运动矢量与运动矢量预测值(例如从候选运动矢量预测值列表中选择的候选运动矢量预测值,例如称为最佳候选预测运动矢量)之间的差。在一些可行实施方式中,帧间预测模块41(例如运动估计模块42)可输出用于指示候选预测运动矢量在候选预测运动矢量列表中的位置的候选预测运动矢量索引给熵编码模块56。下文将结合图5详细介绍,这里不再赘述。The motion estimation module 42 is configured to calculate a motion vector of the current coded image block in the inter-coded frame by comparing the current coded image block with the image block of the reference image in the reference image memory 64. When the reference image in reference image memory 64 contains a value for the fractional pixel location, the motion vector computed by motion estimation module 42 may be directed to the fractional pixel location of the reference image. If the value without the fractional pixel position is stored in the reference image memory 64, the motion estimation module 42 or motion compensation module 44 is also used to calculate the value of the fractional pixel position of the reference image stored in the reference image memory 64, such as an interpolation reference. Fractional pixels of an image (such as an I frame or a P frame). As an example, a reference image may be selected from a first reference image list (List 0) or a second reference image list (List 1), each of the lists (eg, a reference image index) for identifying stored in the reference image memory 64 One or more reference images in . Motion estimation module 42 is operative to transmit or provide motion vectors to motion compensation module 44. In the embodiment of the present invention, the inter prediction module 41 (for example, the motion estimation module 42) is further configured to send the motion vector difference (MVD) information of the current coded image block to the entropy coding module 56, where the motion vector difference information is used. Representing motion vectors and motion vector predictors (eg, candidate motion vector predictors selected from candidate motion vector predictor lists, eg, best candidate predictive motion vectors) generated for the current image block using the IME and/or FME The difference between the two. In some possible implementations, inter prediction module 41 (e.g., motion estimation module 42) may output a candidate predicted motion vector index for indicating the location of the candidate predicted motion vector in the candidate predicted motion vector list to entropy encoding module 56. The following will be described in detail in conjunction with FIG. 5, and details are not described herein again.
帧间预测模块41(例如运动补偿模块44)用于执行运动补偿过程,其中运动补偿过程包括基于通过运动估计而确定的运动矢量来提取(fetch)或生成预测块,可能也包括执行分数像素精度的内插。在接收当前编码图像块的运动矢量后,运动补偿模块44可在参考图像列表中的一者中定位运动矢量所指向的预测块。视频编码器20通过从当前编码图 像块的像素值减去预测块的像素值以得到残差图像块,从而形成像素差值。像素差值形成块的残差数据,且可包含亮度及色度差分量两者。求和器50表示执行此减法运算的一个或多个组件。帧间预测模块41(例如运动估计模块42和/或运动补偿模块44)可产生一些在不同层级的编码处理单元(例如序列级,图像级,条带级,区域partition级,CTU级或CU级)下的语法元素,例如与当前图像块及当前图像相关联的语法元素以供视频解码器30用于解码当前图像的当前图像块,又例如与当前图像块及视频条带相关联的语法元素以供视频解码器30用于解码视频条带的当前图像块。作为一种示例,视频编码器20的运动估计模块42可用于向熵编码模块56提供或发送运动矢量精度参数,以便于所述熵编码单元56将运动矢量精度参数熵编码入码流,所述运动矢量精度参数用于指示多种运动矢量精度的值,所述运动矢量精度参数可以携带在当前图像块的序列参数集、图像参数集PPS或者条带头中的任意一种。一种具体示例下,所述运动矢量精度参数可以包括用于当前编码处理单元的运动矢量精度个数和与所述运动矢量精度个数对应的至少两种运动矢量精度的值,例如运动矢量精度个数为4,对应的4种运动矢量精度的值分别是整数像素精度、二分之一像素精度、四分之一像素精度和八分之一像素精度。作为另一种示例,视频编码器20的运动估计模块42还用于向熵编码模块56提供或发送用于指示某个重要运动矢量集合的运动矢量精度的指示信息。下文将结合图5对本申请实施例的视频编码过程进行详细的介绍,这里不再赘述。An inter prediction module 41 (eg, motion compensation module 44) is operative to perform a motion compensation process, wherein the motion compensation process includes fetching or generating a prediction block based on motion vectors determined by motion estimation, possibly including performing fractional pixel precision Interpolation. After receiving the motion vector of the current encoded image block, motion compensation module 44 may locate the predicted block to which the motion vector is directed in one of the reference image lists. The video encoder 20 forms a residual pixel block by subtracting the pixel value of the prediction block from the pixel value of the currently encoded image block, thereby forming a pixel difference value. The pixel difference values form residual data for the block and may include both luminance and chrominance difference components. Summer 50 represents one or more components that perform this subtraction. The inter prediction module 41 (eg, motion estimation module 42 and/or motion compensation module 44) may generate some coding processing units at different levels (eg, sequence level, image level, strip level, regional partition level, CTU level, or CU level). A syntax element, such as a syntax element associated with the current image block and the current image, for use by video decoder 30 to decode the current image block of the current image, such as syntax elements associated with the current image block and video stripe. The video decoder 30 is used by the video decoder 30 to decode the current image block of the video strip. As an example, motion estimation module 42 of video encoder 20 may be operable to provide or transmit motion vector accuracy parameters to entropy encoding module 56, such that entropy encoding unit 56 entropy encodes motion vector precision parameters into a code stream, The motion vector precision parameter is used to indicate a value of a plurality of motion vector precision parameters, and the motion vector precision parameter may be carried in any one of a sequence parameter set of the current image block, an image parameter set PPS, or a slice header. In a specific example, the motion vector accuracy parameter may include a value of a motion vector precision for a current encoding processing unit and a value of at least two motion vector precisions corresponding to the motion vector precision number, such as motion vector precision. The number is 4, and the corresponding four motion vector precision values are integer pixel precision, half pixel precision, quarter pixel precision, and eighth pixel precision. As another example, motion estimation module 42 of video encoder 20 is also operative to provide or transmit to the entropy encoding module 56 indication information indicating the motion vector accuracy of a certain set of important motion vectors. The video encoding process of the embodiment of the present application will be described in detail below with reference to FIG. 5, and details are not described herein again.
在预测模块40经由帧间预测或帧内预测产生当前正在编码的原始图像块的预测块之后,视频编码器20通过从当前正在编码的原始图像块减去预测块而形成残差图像块。求和器50表示执行此减法运算的一或多个组件。变换模块52应用变换将残差图像块中的残差数据变换成残差变换系数,例如离散余弦变换(DCT)或概念上类似的变换(例如,离散正弦变换DST)。变换模块52可将残差数据从像素域转换到变换域(例如,频域)。After the prediction module 40 generates a prediction block of the original image block currently being encoded via inter prediction or intra prediction, the video encoder 20 forms a residual image block by subtracting the prediction block from the original image block currently being encoded. Summer 50 represents one or more components that perform this subtraction. Transform module 52 applies the transform to transform the residual data in the residual image block into residual transform coefficients, such as discrete cosine transform (DCT) or conceptually similar transform (eg, discrete sinusoidal transform DST). Transform module 52 may convert the residual data from the pixel domain to a transform domain (eg, a frequency domain).
变换模块52可将所得残差变换系数提供或发送给量化模块54。量化模块54用于对残差变换系数进行量化以进一步减小码率。量化过程可减少与残差变换系数中的一些或全部相关联的比特深度。可通过调整量化参数来修改量化的程度。在一些可行的实施方式中,量化模块54可接着执行包含经量化变换系数的矩阵的扫描。替代地,熵编码模块56可执行扫描。Transform module 52 may provide or send the resulting residual transform coefficients to quantization module 54. Quantization module 54 is operative to quantize the residual transform coefficients to further reduce the code rate. The quantization process may reduce the bit depth associated with some or all of the residual transform coefficients. The degree of quantization can be modified by adjusting the quantization parameters. In some possible implementations, quantization module 54 may then perform a scan of the matrix containing the quantized transform coefficients. Alternatively, entropy encoding module 56 may perform a scan.
在量化之后,熵编码模块56可用于熵编码经量化的残差变换系数。例如,熵编码模块56可执行上下文自适应性可变长度编码(CAVLC)、上下文自适应性二进制算术编码(CABAC)、基于语法的上下文自适应性二进制算术编码(SBAC)、概率区间分割熵(PIPE)编码或其它熵编码技术。熵编码模块56也可用于熵编码正经编码的当前视频条带或当前图像块的一些语法元素。在通过熵编码模块56进行熵编码之后,可将经编码码流传输到视频解码器30或存档以供稍后传输或由视频解码器30检索。After quantization, entropy encoding module 56 can be used to entropy encode the quantized residual transform coefficients. For example, entropy encoding module 56 may perform context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax based context adaptive binary arithmetic coding (SBAC), probability interval segmentation entropy ( PIPE) coding or other entropy coding techniques. Entropy encoding module 56 may also be used to entropy encode the current video strip being encoded or some syntax elements of the current image block. After entropy encoding by entropy encoding module 56, the encoded code stream may be transmitted to video decoder 30 or archive for later transmission or retrieved by video decoder 30.
本申请实施例中,熵编码模块56用于熵编码当前编码图像块的运动矢量差值信息入码流;可选的,熵编码模块56还用于将某个重要运动矢量集合的运动矢量精度的指示信息编码入码流,以指示重要运动矢量集合的运动矢量预测值的具体像素精度,比如是具有整数像素精度还是分数像素精度,例如四分之一像素精度或八分之一像素精度或其它分数像素精度。In the embodiment of the present application, the entropy encoding module 56 is configured to entropy encode the motion vector difference information into the code stream of the current coded image block; optionally, the entropy coding module 56 is further configured to use the motion vector accuracy of an important motion vector set. The indication information is encoded into the code stream to indicate a specific pixel precision of the motion vector predictor of the important motion vector set, such as having integer pixel precision or fractional pixel precision, such as quarter-pixel precision or eighth-pixel precision or Other fractional pixel precision.
本申请实施例中,视频编码器20,例如通过实施高级运动矢量预测(AMVP)模式或合并(merge)模式发信号通知运动矢量预测值。在AMVP模式中,视频编码器20(例如 帧间预测模块41)基于从在先已编码图像块确定的运动矢量建立候选运动矢量预测值列表。下文将结合图6A和图6B详细介绍,这里不再赘述。视频编码器20发信号通知候选运动矢量预测值列表中的一个索引标识以识别对应的候选运动矢量预测值(MVP)且发信号通知运动矢量差(MVD)信息。在一种示例实现方式下,熵编码模块56用于将指示当前编码图像块的运动矢量预测值MVP的索引(即第三标识)和当前编码图像块的运动矢量差值信息熵编码入码流。相应地,在AMVP模式中,视频解码器30(例如帧间预测模块82)基于从在先已解码图像块确定的运动矢量建立候选运动矢量预测值列表。基于所述索引(即第三标识)从候选运动矢量预测值列表中确定候选运动矢量预测值;视频解码器30使用运动矢量执行帧间预测,以得到正在解码图像块的预测块,其中所述运动矢量是基于所述索引对应的候选运动矢量预测值(MVP)、运动矢量差值(MVD)信息和自适应确定的运动矢量精度得到的。In the embodiment of the present application, the video encoder 20 signals the motion vector predictor by, for example, implementing an Advanced Motion Vector Prediction (AMVP) mode or a merge mode. In AMVP mode, video encoder 20 (e.g., inter prediction module 41) establishes a list of candidate motion vector predictors based on motion vectors determined from previously encoded image blocks. This will be described in detail below with reference to FIG. 6A and FIG. 6B, and details are not described herein again. Video encoder 20 signals an index identification in the candidate motion vector predictor list to identify a corresponding candidate motion vector predictor (MVP) and signal motion vector difference (MVD) information. In an example implementation, the entropy encoding module 56 is configured to entropy encode an index (ie, a third identifier) indicating a motion vector predictor MVP of the current coded image block and a motion vector difference information of the current coded image block into the code stream. . Accordingly, in AMVP mode, video decoder 30 (e.g., inter prediction module 82) establishes a list of candidate motion vector predictors based on motion vectors determined from previously decoded image blocks. Determining a candidate motion vector predictor from the candidate motion vector predictor list based on the index (ie, the third identifier); video decoder 30 performs inter prediction using the motion vector to obtain a predicted block of the decoded image block, wherein The motion vector is obtained based on candidate motion vector predictor (MVP), motion vector difference (MVD) information, and adaptively determined motion vector accuracy corresponding to the index.
在合并模式中,视频编码器20(例如帧间预测模块41)基于在先已编码图像块建立候选者列表(merge candidates list);视频解码器30基于在先已解码图像块建立候选者列表。视频编码器20发信号通知候选者列表中的候选者中的一者的索引。在合并模式中,视频解码器30使用该索引对应的候选运动矢量和该候选运动矢量的参考图像索引执行帧间预测,以得到当前正在解码图像块的预测块。在AMVP模式及合并模式两者中,视频编码器20和视频解码器30利用同一列表建立技术,这样的话,视频编码器20在确定如何编码块时使用的列表与视频解码器30在确定如何解码所述块时使用的列表匹配。In the merge mode, video encoder 20 (e.g., inter prediction module 41) builds a candidate list based on the previously encoded image block; video decoder 30 builds a candidate list based on the previously decoded image block. Video encoder 20 signals the index of one of the candidates in the candidate list. In the merge mode, video decoder 30 performs inter prediction using the candidate motion vector corresponding to the index and the reference image index of the candidate motion vector to obtain a prediction block that is currently decoding the image block. In both the AMVP mode and the merge mode, video encoder 20 and video decoder 30 utilize the same list building technique, such that the list used by video encoder 20 in determining how to encode the block and video decoder 30 are determining how to decode. The list used when the block is matched.
反量化模块58及反变换模块60分别应用反量化及反变换,以在像素域中重构建残差块以供稍后用作参考图像的参考块。求和器62将经重构建残差块与通过运动补偿单元44所产生的经运动补偿的预测块相加以产生经重构图像块,所述经重构图像块作为参考块以供存储于参考图像存储器64中。所述经重构图像块可由运动估计单元42及运动补偿单元44用作参考块以帧间预测后续视频帧或图像中的块。Inverse quantization module 58 and inverse transform module 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual block in the pixel domain for later use as a reference block for the reference image. Summer 62 adds the reconstructed residual block to the motion compensated prediction block generated by motion compensation unit 44 to produce a reconstructed image block that is used as a reference block for storage in a reference. In the image memory 64. The reconstructed image block may be used by motion estimation unit 42 and motion compensation unit 44 as a reference block to inter-predict subsequent video frames or blocks in the image.
应当理解的是,视频编码器20的其它的结构变化可用于编码视频流。例如,对于某些图像块或者图像帧,视频编码器20可以直接地量化残差信号而不需要经变换模块52处理,相应地也不需要经反变换模块58处理;或者,对于某些图像块或者图像帧,视频编码器20没有产生残差数据,相应地不需要经变换模块52、量化模块54、反量化模块58和反变换模块60处理;或者,视频编码器20可以将经重构图像块作为参考块直接地进行存储而不需要经滤波器单元处理;或者,视频编码器20中量化模块54和反量化模块58可以合并在一起;或者,视频编码器20中变换模块52和反变换模块60可以合并在一起;或者,求和器50和求和器62可以合并在一起;或者,参考图像存储器64可以设置在视频编码器20之外;或者视频编码器20非混合编码器结构,无需重建图像块,相应地可以不包括反量化模块58和反变换模块60;或者,某些场景下,仅触发帧间编码模式对应的帧间预测模块41工作。应当理解的是,在上述实施例中没有详述的部分,可以参见其他实施例(例如图5所示的实施例)的相关描述。It should be understood that other structural changes to video encoder 20 may be used to encode the video stream. For example, for certain image blocks or image frames, video encoder 20 may directly quantize the residual signal without the need for processing by transform module 52, and accordingly need not be processed by inverse transform module 58; or, for some image blocks Or the image frame, the video encoder 20 does not generate residual data, and accordingly does not need to be processed by the transform module 52, the quantization module 54, the inverse quantization module 58 and the inverse transform module 60; alternatively, the video encoder 20 can reconstruct the reconstructed image The block is stored directly as a reference block without being processed by the filter unit; alternatively, the quantization module 54 and the inverse quantization module 58 in the video encoder 20 may be merged together; or, the transform module 52 and the inverse transform in the video encoder 20 Modules 60 may be merged together; alternatively, summer 50 and summer 62 may be merged together; alternatively, reference image memory 64 may be disposed outside of video encoder 20; or video encoder 20 may be a non-hybrid encoder structure, There is no need to reconstruct the image block, and accordingly the inverse quantization module 58 and the inverse transform module 60 may not be included; or, in some scenarios, only the interframe coding is triggered. Formula corresponding inter prediction module 41 is operated. It should be understood that, in the portions not detailed in the above embodiments, reference may be made to the related description of other embodiments (for example, the embodiment shown in FIG. 5).
图3为本申请实施例中视频解码器30的一种示意性框图。一并参阅图7,视频解码器30可执行自适应确定用于解码当前图像块的运动矢量分辨率(亦称为运动矢量精度或像素精度)的过程,尤其是视频解码器30中的帧间预测模块82可执行自适应确定用于解码当前图像块的运动矢量分辨率的过程。FIG. 3 is a schematic block diagram of a video decoder 30 in the embodiment of the present application. Referring to Figure 7, video decoder 30 may perform adaptive determination of the process for decoding the motion vector resolution (also referred to as motion vector accuracy or pixel precision) of the current image block, particularly inter-frame in video decoder 30. Prediction module 82 may perform a process of adaptively determining a motion vector resolution for decoding a current image block.
如图3所示,视频解码器30可以包括熵解码模块80、预测模块81、反量化模块86、反变换模块88和重建模块90(例如求和器90)。在一种示例下,预测模块81可以包括帧间预测模块82和帧内预测模块84,本申请实施例对此不作限定。As shown in FIG. 3, video decoder 30 may include an entropy decoding module 80, a prediction module 81, an inverse quantization module 86, an inverse transform module 88, and a reconstruction module 90 (e.g., summer 90). In an example, the prediction module 81 may include an inter prediction module 82 and an intra prediction module 84, which are not limited in this embodiment of the present application.
在一种可行的实施方式中,视频解码器30还可以包括参考图像存储器92。应当理解的是,参考图像存储器92也可以设置在视频解码器30之外。在一些可行的实施方式中,视频解码器30可执行与关于来自图2的视频编码器20描述的编码流程的示例性地互逆的解码流程。In one possible implementation, video decoder 30 may also include reference image memory 92. It should be understood that the reference image memory 92 can also be disposed outside of the video decoder 30. 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可在视频序列层级、视频条带层级、图像层级和/或图像块层级处接收语法元素。视频解码器30的熵解码模块80对码流进行熵解码。熵解码模块80将熵解码出的部分数据(例如一些语法元素)提供或发送给预测模块81。本申请实施例中,在一种示例下,这里的熵解码出的数据可以包括当前解码图像块的运动矢量差值(MVD)信息,需要说明的是,该MVD信息可以是当前解码图像块的运动矢量差值,或者也可以是经缩放的运动矢量差值,例如可以是基于某种运动矢量精度(例如某种运动矢量精度的索引值)对所述MVD进行缩放得到的,下文将结合图7详细说明,这里不再赘述。可选的,这里的熵解码出的数据还可以包括运动矢量精度参数,所述运动矢量精度参数用于指示多种运动矢量精度的值,所述运动矢量精度参数可以携带在所述图像块的序列参数集、图像参数集PPS或者条带头中的任意一种。一种具体示例下,所述运动矢量精度参数可以包括用于当前解码处理单元的运动矢量精度个数和与所述运动矢量精度个数对应的至少两种运动矢量精度的值,例如整数像素精度、二分之一像素精度、四分之一像素精度和/或八分之一像素精度。可选的,这里的熵解码出的数据还可以包括某个重要运动矢量集合的运动矢量精度的指示信息。可选的,这里的熵解码出的数据还可以包括用于指示当前解码图像块的候选运动矢量预测值(MVP)的索引(即第三标识)。During the decoding process, video decoder 30 receives from video encoder 20 an encoded video code stream (referred to as a code stream) that represents an image block of the encoded video slice and associated syntax elements. Video decoder 30 may receive syntax elements at a video sequence level, a video stripe level, an image level, and/or an image block level. Entropy decoding module 80 of video decoder 30 entropy decodes the code stream. Entropy decoding module 80 provides or transmits partial data (eg, some syntax elements) that are entropy decoded to prediction module 81. In an embodiment of the present application, in an example, the entropy decoded data may include motion vector difference (MVD) information of a currently decoded image block. It should be noted that the MVD information may be the current decoded image block. The motion vector difference value, or may also be a scaled motion vector difference value, for example, may be obtained by scaling the MVD based on a certain motion vector precision (for example, an index value of a certain motion vector precision), which will be described below. 7 Detailed description, no more details here. Optionally, the data decoded by the entropy herein may further include a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of multiple motion vector precisions, where the motion vector precision parameter may be carried in the image block. Any one of a sequence parameter set, an image parameter set PPS, or a slice header. In a specific example, the motion vector accuracy parameter may include a value of a motion vector precision for a current decoding processing unit and a value of at least two motion vector precisions corresponding to the motion vector precision number, such as integer pixel precision. , one-half pixel precision, quarter-pixel precision, and/or one-eighth pixel accuracy. Optionally, the data decoded by the entropy herein may further include indication information of motion vector accuracy of a certain set of important motion vectors. Optionally, the entropy decoded data herein may further include an index (ie, a third identifier) for indicating a candidate motion vector predictor (MVP) of the currently decoded image block.
预测模块81中的帧间预测模块82可以基于所述熵解码出的数据确定当前解码图像块的运动信息,所述运动信息包括运动矢量(MV)、运动矢量精度,可选的,所述运动信息还可以包括参考图像指示信息,例如在编解码端共同约定参考图像的情况下,运动信息可以不包括参考图像指示信息。其中参考图像指示信息用于指示当前图像块使用到了哪一个或哪些重建图像作为参考图像,运动矢量表示在所用参考图像中参考块位置相对于当前块位置的位置偏移,一般包含水平分量偏移和竖直分量偏移。例如使用(x,y)表示MV,x表示水平方向的位置偏移,y表示竖直方向的位置偏移。使用当前块的位置加上MV偏移,便可以得到它的参考块在参考图像中的位置。其中参考图像指示信息可以包括参考图像列表号和与参考图像列表对应的参考图像索引。参考图像索引用于识别指定参考图像列表(RefPicList0或RefPicList1)中的运动矢量所指向的参考图像。本申请实施例中,帧间预测模块82用于获取当前解码图像块的运动矢量预测值(MVP);当所述运动矢量预测值被包括于与某一种运动矢量精度(本文中称为目标运动矢量精度)对应的某一个运动矢量集合(本文中称为目标运动矢量集合)时,基于所述运动矢量预测值、熵解码出的运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量。例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢 量预测值具有的运动矢量精度,基于所述运动矢量预测值、熵解码出的运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量。下文将结合图7详细说明,这里不再赘述。The inter prediction module 82 in the prediction module 81 may determine motion information of the currently decoded image block based on the entropy decoded data, the motion information including a motion vector (MV), motion vector accuracy, and optionally, the motion The information may further include reference image indication information, for example, in the case where the codec side jointly agrees on the reference image, the motion information may not include the reference image indication information. Wherein the reference image indication information is used to indicate which one or which reconstructed images are used as the reference image, and the motion vector represents the positional offset of the reference block position relative to the current block position in the used reference image, generally including the horizontal component offset And vertical component offset. For example, (x, y) is used to represent the MV, x is the positional shift in the horizontal direction, and y is the positional shift in the vertical direction. Using the position of the current block plus the MV offset, the position of its reference block in the reference image can be obtained. The reference image indication information may include a reference image list number and a reference image index corresponding to the reference image list. The reference image index is used to identify the reference image pointed to by the motion vector in the specified reference image list (RefPicList0 or RefPicList1). In the embodiment of the present application, the inter prediction module 82 is configured to acquire a motion vector predictor (MVP) of a currently decoded image block; when the motion vector predictor is included in a motion vector accuracy (referred to as a target in this document) When the motion vector accuracy corresponds to a certain motion vector set (referred to herein as a target motion vector set), based on the motion vector predictor, the entropy decoded motion vector difference information, and the target motion vector accuracy, The motion vector of the currently decoded image block. For example, when the motion vector predictor is included in the target motion vector set, determining, according to the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions, the target motion vector accuracy corresponding to the target motion vector set is the The motion vector predictor has a motion vector precision, and based on the motion vector predictor, the entropy decoded motion vector difference information, and the target motion vector precision, a motion vector of the current decoded image block is obtained. The details will be described below in conjunction with FIG. 7, and will not be described again here.
本实施例中,预测模块81用于生成当前解码图像块的预测块;具体的,在视频条带经解码为经帧内解码(I)条带时,预测模块81的帧内预测模块84可基于用信号发送的帧内预测模式及来自当前帧或图像的先前经解码图像块的数据而产生当前视频条带的图像块的预测块。在视频图像经解码为经帧间解码(例如,B、P或GPB)条带时,预测模块81的帧间预测模块82基于从熵解码模块80所接收的熵解码数据而产生当前视频图像的图像块的预测块,例如,帧间预测模块82使用确定的运动矢量来识别参考图像存储器92(亦称为经解码图像缓冲器92)中的参考图像中的预测块。In this embodiment, the prediction module 81 is configured to generate a prediction block of the currently decoded image block; specifically, when the video slice is decoded into an intra-frame decoding (I) slice, the intra prediction module 84 of the prediction module 81 may A prediction block of an image block of the current video stripe is generated based on the signaled intra prediction mode and data from a previously decoded image block of the current frame or image. The inter prediction module 82 of the prediction module 81 generates a current video image based on the entropy decoded data received from the entropy decoding module 80 when the video image is decoded into an inter-frame decoded (eg, B, P, or GPB) stripe. The prediction block of the image block, for example, the inter prediction module 82 uses the determined motion vector to identify the prediction block in the reference image in the reference image memory 92 (also referred to as the decoded image buffer 92).
本申请实施例中,在AMVP模式中,视频解码器30(例如帧间预测模块82)基于从在先已解码图像块确定的运动矢量建立候选运动矢量预测值列表;根据熵解码出的索引从候选运动矢量预测值列表中确定候选运动矢量预测值。视频解码器30(例如帧间预测模块82)使用运动矢量执行帧间预测,以得到正在解码图像块的预测块,其中所述运动矢量为基于所述索引(即第三标识)对应的候选运动矢量预测值(MVP)、熵解码出的运动矢量差值(MVD)信息以及自适应确定的运动矢量精度而得到。应当理解的是,本申请实施例中,还有其他获取运动矢量预测值的方法,下文将结合图7、图8或图9进行介绍。In the embodiment of the present application, in the AMVP mode, the video decoder 30 (for example, the inter prediction module 82) establishes a candidate motion vector predictor list based on the motion vector determined from the previously decoded image block; A candidate motion vector predictor is determined in the candidate motion vector predictor list. Video decoder 30 (e.g., inter prediction module 82) performs inter prediction using motion vectors to obtain a prediction block of the image block being decoded, wherein the motion vector is a candidate motion corresponding to the index based (ie, the third identification) Vector predictive value (MVP), entropy decoded motion vector difference (MVD) information, and adaptively determined motion vector accuracy are obtained. It should be understood that, in the embodiment of the present application, there are other methods for obtaining motion vector predictors, which will be described below in conjunction with FIG. 7, FIG. 8, or FIG.
反量化模块86对熵解码模块80解码出的经量化变换系数逆量化,即去量化。逆量化过程可包括:使用由视频编码器20针对视频条带中的每个图像块计算的量化参数来确定应施加的量化程度以及同样地确定应施加的逆量化程度。反变换模块88将逆变换应用于变换系数,例如逆DCT、逆整数变换或概念上类似的逆变换过程,以便产生像素域中的残差块。The inverse quantization module 86 inverse quantizes the quantized transform coefficients decoded by the entropy decoding module 80, ie, dequantizes. The inverse quantization process may include using the quantization parameters calculated by video encoder 20 for each of the video slices to determine the degree of quantization that should be applied and likewise determine the degree of inverse quantization that should be applied. Inverse transform module 88 applies the inverse transform to transform coefficients, such as inverse DCT, inverse integer transform, or a conceptually similar inverse transform process, to generate residual blocks in the pixel domain.
帧间预测模块82(亦可称为运动补偿模块82)产生经运动补偿块,还可能涉及基于内插滤波器执行内插(interpolation)。可选的,用于以分数像素精度进行运动估计的内插滤波器的识别符可包含在语法元素中。帧间预测模块82可使用由视频编码器20在图像块的编码期间使用的内插滤波器来计算参考块的分数像素的内插值。帧间预测模块82可根据所接收的语法信息确定视频编码器20所使用的内插滤波器且使用所述内插滤波器来产生预测块。例如,帧间预测模块82可使用双线性内插来内插参考块的十六分之一像素位置的值。Inter prediction module 82 (also referred to as motion compensation module 82) generates a motion compensated block and may also involve performing interpolation based on the interpolation filter. Alternatively, an identifier of an interpolation filter for motion estimation with fractional pixel precision may be included in the syntax element. Inter prediction module 82 may use the interpolation filters used by video encoder 20 during encoding of the image block to calculate interpolated values for the fractional pixels of the reference block. Inter prediction module 82 may determine an interpolation filter used by video encoder 20 based on the received syntax information and use the interpolation filter to generate a prediction block. For example, inter prediction module 82 may use bilinear interpolation to interpolate the value of the one-teenth pixel position of the reference block.
在帧间预测模块82产生用于当前图像块的预测块之后,视频解码器30通过将来自反变换模块88的残差块与由帧间预测模块82产生的对应预测块求和以得到重建的块,即经解码图像块。求和器90表示执行此求和操作的组件。在需要时,还可使用环路滤波器(在解码环路中或在解码环路之后)来使像素转变平滑或者以其它方式改进视频质量。滤波器单元(未示意)可以表示一或多个环路滤波器,例如去块滤波器、自适应环路滤波器(ALF)以及样本自适应偏移(SAO)滤波器。并且,还可以将给定帧或图像中的经解码图像块存储在经解码图像缓冲器92中,经解码图像缓冲器92存储用于后续运动补偿的参考图像。参考图像存储器92可为存储器的一部分,其还可以存储经解码视频,以供稍后在显示装置(例如图1的显示装置32)上呈现,或可与此类存储器分开。After the inter prediction module 82 generates the prediction block for the current image block, the video decoder 30 obtains the reconstructed by summing the residual block from the inverse transform module 88 with the corresponding prediction block generated by the inter prediction module 82. A block, ie a decoded image block. Summer 90 represents the component that performs this summation operation. A loop filter (either in the decoding loop or after the decoding loop) can also be used to smooth pixel transitions or otherwise improve video quality, if desired. A filter unit (not shown) may represent one or more loop filters, such as a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) filter. Also, decoded image blocks in a given frame or image may be stored in decoded image buffer 92, which stores reference images for subsequent motion compensation. The reference image memory 92 can be part of a memory that can also store decoded video for later presentation on a display device (eg, display device 32 of FIG. 1), or can be separate from such memory.
应当理解的是,视频解码器30的其它结构变化可用于解码经编码视频码流。例如,视频解码器30可以不经滤波器单元处理而生成输出视频流;或者,对于某些图像块或者 图像帧,视频解码器30的熵解码模块80没有解码出经量化的系数,相应地不需要经反量化模块86和反变换模块88处理。例如,视频解码器30中反量化模块86和反变换模块88可以合并在一起;或者,参考图像存储器92可以设置在视频解码器30之外;或者,某些场景下,仅触发帧间编码模式对应的帧间预测模块82工作。It should be understood that other structural variations of video decoder 30 may be used to decode the encoded video code stream. For example, video decoder 30 may generate an output video stream without processing by a filter unit; or, for some image blocks or image frames, entropy decoding module 80 of video decoder 30 does not decode the quantized coefficients, correspondingly Processing by inverse quantization module 86 and inverse transform module 88 is required. For example, the inverse quantization module 86 and the inverse transform module 88 in the video decoder 30 may be merged together; alternatively, the reference image memory 92 may be disposed outside of the video decoder 30; or, in some scenarios, only the inter-coding mode is triggered The corresponding inter prediction module 82 operates.
应当理解的是,在上述实施例中没有详述的部分,可以参见其他实施例的相关描述。It should be understood that, in the parts that are not detailed in the above embodiments, reference may be made to the related description of other embodiments.
图4A是本申请实施例的一种整像素位置和分数像素位置的示意图。图4A中示意了整数像素位置、二分之一像素位置和四分之一像素位置,应当理解的是,还可以有其它精度的像素位置。4A is a schematic diagram of an integer pixel position and a fractional pixel position in an embodiment of the present application. Integer pixel positions, half-pixel positions, and quarter-pixel positions are illustrated in Figure 4A, it being understood that other precision pixel locations are also possible.
图4B是本申请实施例的另一种整像素位置和分数像素位置的示意图。如图4B所示,图4B说明整数像素(pel)100的分数像素位置。整数像素100对应于二分之一像素位置102A到102C(二分之一pel 102)、四分之一像素位置104A到104L(四分之一pel 104),及八分之一像素位置106A到106AV(八分之一pel 106)。FIG. 4B is a schematic diagram of another integer pixel position and a fractional pixel position in the embodiment of the present application. As shown in FIG. 4B, FIG. 4B illustrates the fractional pixel position of an integer pixel (pel) 100. The integer pixel 100 corresponds to a half pixel position 102A to 102C (half pel 102), a quarter pixel position 104A to 104L (quarter pel 104), and an eighth pixel position 106A to 106AV (one eighth pel 106).
如图4B所示,如果运动矢量具有八分之一像素精度,那么运动矢量可指向整数像素位置100、二分之一像素位置102、四分之一像素位置104或八分之一像素位置106中的任一者。然而,如果运动矢量具有四分之一像素精度,那么运动矢量可指向整数像素位置100、二分之一像素位置102、或四分之一像素位置104中的任一者,但将不指向八分之一像素位置106。应当理解的是,在其它实例中,还可使用其它精度,例如,十六分之一像素精度、三十二分之一像素精度或类似者。As shown in FIG. 4B, if the motion vector has an eighth pixel precision, the motion vector can point to an integer pixel location 100, a half pixel location 102, a quarter pixel location 104, or an eighth pixel location 106. Any of them. However, if the motion vector has a quarter-pixel precision, the motion vector may point to any of the integer pixel position 100, the half-pixel position 102, or the quarter-pixel position 104, but will not point to eight One pixel location 106. It should be understood that in other examples, other precisions may be used, such as one-sixteenth pixel precision, thirty-one-one pixel precision, or the like.
整数像素位置100处的像素的值可包含在对应的参考图像中。也就是说,整数像素位置100处的像素的值一般对应于参考图像中的像素的实际值。在运动估计或者运动补偿过程中,如果当前运动矢量的运动矢量精度为分数像素精度(例如,二分之一像素精度,或者四分之一像素精度),则需要通过参考图像的整像素位置的像素值,采用插值滤波器进行插值,得到分数像素位置的像素值,作为当前块的预测块的值。具体插值操作过程与使用的插值滤波器有关,例如,可使用自适应内插滤波器或固定内插滤波器来内插二分之一像素位置102、四分之一像素位置104及八分之一像素位置106(统称为分数像素位置)的值。一般来说,可从一或多个相邻像素内插分数像素位置的值,这里的相邻像素可以是相邻整数像素位置或先前确定的分数像素位置的值。The value of the pixel at integer pixel location 100 can be included in the corresponding reference image. That is, the value of the pixel at integer pixel location 100 generally corresponds to the actual value of the pixel in the reference image. In the motion estimation or motion compensation process, if the motion vector accuracy of the current motion vector is fractional pixel precision (for example, one-half pixel precision, or quarter-pixel precision), then the entire pixel position of the reference image is required. The pixel value is interpolated using an interpolation filter to obtain a pixel value of the fractional pixel position as the value of the prediction block of the current block. The specific interpolation operation process is related to the interpolation filter used. For example, an adaptive interpolation filter or a fixed interpolation filter can be used to interpolate the half-pixel position 102, the quarter-pixel position 104, and the eighth. The value of a pixel location 106 (collectively referred to as a fractional pixel location). In general, the value of the fractional pixel location may be interpolated from one or more neighboring pixels, where adjacent pixels may be values of adjacent integer pixel locations or previously determined fractional pixel locations.
本申请实施例的下文将详细介绍视频编解码器(例如视频编码器20、视频解码器30)如何自适应地在例如整数像素精度或分数像素精度(例如八分之一像素精度及四分之一像素精度)之间选择运动矢量的精度。视频编码器20可针对每一运动矢量、每一CU、每一LCU、每一切片、每一帧、每一GOP或其它解码单元做出此选择。在视频编码器20选择运动矢量的四分之一像素精度时,所述运动矢量可指整数像素位置100、二分之一像素位置102或四分之一像素位置104中的任一者。在视频编码器20选择运动矢量的八分之一像素精度时,所述运动矢量可指整数像素位置100、二分之一像素位置102、四分之一像素位置104、或八分之一像素位置106中的任一者。The following describes in detail how video codecs (eg, video encoder 20, video decoder 30) adaptively have, for example, integer pixel precision or fractional pixel precision (eg, one-eighth pixel precision and quarters). The accuracy of the motion vector is chosen between one pixel precision). Video encoder 20 may make this selection for each motion vector, each CU, each LCU, every slice, every frame, every GOP, or other decoding unit. When video encoder 20 selects a quarter pixel precision of the motion vector, the motion vector may refer to any of integer pixel location 100, half pixel location 102, or quarter pixel location 104. When the video encoder 20 selects the eighth-pixel precision of the motion vector, the motion vector may refer to an integer pixel location 100, a half-pixel location 102, a quarter-pixel location 104, or an eighth pixel. Any of the locations 106.
图5是本申请实施例的一种视频编码方法的示意性流程图。图5所示的过程500可以由视频编码装置、视频编码器(例如视频编码器20)以及其它具有视频编码功能的设备 来执行。过程500描述为一系列的步骤或操作,应当理解的是,过程500可以以各种顺序执行和/或同时发生,不限于图5所示的执行顺序。假设具有多个视频帧的视频数据流正在使用视频编码器,执行包括如下步骤的过程500来编码当前视频帧的当前图像块;FIG. 5 is a schematic flowchart of a video encoding method according to an embodiment of the present application. The process 500 shown in Figure 5 can be performed by a video encoding device, a video encoder (e.g., video encoder 20), and other devices having video encoding capabilities. Process 500 is described as a series of steps or operations, it being understood that process 500 can be performed in various sequences and/or concurrently, and is not limited to the order of execution shown in FIG. Assuming that a video data stream having multiple video frames is using a video encoder, a process 500 comprising the steps of encoding the current image block of the current video frame is performed;
图5所示的方法可以包括步骤501至步骤511,下面对步骤501至步骤511进行详细的介绍。The method shown in FIG. 5 may include steps 501 to 511, and step 501 to step 511 are described in detail below.
步骤501、对当前正在编码的图像块(简称为当前编码图像块或当前图像块)执行运动估计过程,以得到当前编码图像块的运动矢量,其中所述运动矢量用于指示当前编码图像块相对于参考图像内的预测块的位移;Step 501: Perform a motion estimation process on an image block currently being encoded (referred to as a current coded image block or a current image block for short) to obtain a motion vector of a current coded image block, where the motion vector is used to indicate that the currently coded image block is relatively The displacement of the predicted block within the reference image;
在一种示例的实现方式下,步骤501可以由视频编码器20的帧间预测模块41,例如运动估计模块42来执行;其中,运动估计模块42比较使用四分之一像素精度运动矢量编码图像块及使用八分之一像素精度运动矢量编码图像块之间的误差差异。例如,运动估计模块42在第一编码回合中使用一或多个四分之一像素精度运动矢量编码图像块且在第二编码回合中使用一或多个八分之一像素精度运动矢量编码图像块。运动估计模块42可进一步在第三编码回合中使用块的一或多个四分之一像素精度运动矢量与一或多个八分之一像素精度运动矢量的多种组合。运动估计模块42可针对图像块的每一编码回合计算速率-失真值且计算速率-失真值之间的差异。例如,针对搜索起始点(比如当前解码图像块的空域邻近块和/或时域邻近块的可用运动矢量指向的搜索起始点)和像素精度的不同组合,运动估计模块42在参考图像中,进行对应的分数或整数像素步长的运动搜索,得到对应的预测块。计算所述每个预测块与当前编码图像块之间的匹配误差,选择匹配误差最小的预测块和其对应的运动矢量,作为最优的预测块和对应的最优运动矢量。其中,匹配误差可以选用SAD准则进行计算。In an example implementation, step 501 can be performed by inter prediction module 41 of video encoder 20, such as motion estimation module 42; wherein motion estimation module 42 compares the encoded image using quarter-pixel precision motion vectors The difference between the block and the block using the eighth-pixel precision motion vector coding image. For example, motion estimation module 42 uses one or more quarter-pixel precision motion vector encoded image blocks in a first coding pass and one or more eighth-pixel precision motion vector encoded images in a second coding round. Piece. Motion estimation module 42 may further use various combinations of one or more quarter-pixel precision motion vectors of the block and one or more eighth-pixel precision motion vectors in the third coding round. Motion estimation module 42 may calculate rate-distortion values for each coding pass of the image block and calculate a difference between the rate-distortion values. For example, for different combinations of search starting points (such as the search starting point of the available motion vectors pointed by the spatial neighboring block of the currently decoded image block and/or the temporally adjacent block) and the pixel precision, the motion estimation module 42 performs the reference image in the reference image. Corresponding score or integer pixel step motion search, get the corresponding prediction block. A matching error between each of the predicted blocks and the current coded image block is calculated, and a prediction block with the smallest matching error and its corresponding motion vector are selected as the optimal prediction block and the corresponding optimal motion vector. Among them, the matching error can be calculated by using the SAD criterion.
步骤503、获取所述当前编码图像块的运动矢量预测值;Step 503: Acquire a motion vector predictor of the current coded image block.
在一种示例的实现方式下,步骤503可以由视频编码器20的帧间预测模块41,例如运动估计模块42来执行;应当理解的是,在某些实现方式下,步骤501与步骤503没有先后顺序之分,在得到当前编码图像块的运动矢量的时候,相应地,就能得到所述当前编码图像块的运动矢量预测值。In an exemplary implementation, step 503 may be performed by inter prediction module 41 of video encoder 20, such as motion estimation module 42; it should be understood that in some implementations, steps 501 and 503 are not According to the sequence, when the motion vector of the current coded image block is obtained, correspondingly, the motion vector predictor of the current coded image block can be obtained.
步骤503中,在当前编码图像块的帧间预测模式是AMVP模式的情况下,构建当前编码图像块的AMVP候选运动矢量预测值列表(即AMVP candidate MVP list);根据率失真代价准则从该候选运动矢量预测列表中选择用于当前编码图像块的候选运动矢量预测值(亦称为最佳候选MVP);例如,所述候选运动矢量预测值MVP编码所述当前编码图像块的码率失真代价最小。In step 503, if the inter prediction mode of the current coded image block is the AMVP mode, the AMVP candidate motion vector predictor list (ie, the AMVP candidate MVP list) of the current coded image block is constructed; and the candidate is obtained according to the rate distortion cost criterion. A candidate motion vector predictor (also referred to as a best candidate MVP) for the currently encoded image block is selected in the motion vector prediction list; for example, the candidate motion vector predictor MVP encodes a rate distortion penalty of the current encoded image block The smallest.
一并参阅图6A,以AMVP模式为例,当前图像块的候选MV预测值列表可以包括空域和时域两种运动矢量预测值,A0-A1和B0-B2为当前图像块的空域邻近块位置(亦称为空域候选参考块位置),T TL、T C和T BR为当前图像块的可选的时域邻近块位置(亦称为时域候选参考块位置),本申请不限于此。一般从空域邻近块位置和时域邻近块位置中分别按照顺序获取这些空域、时域邻近块的MV作为若干候选运动矢量预测值构成候选MV预测值列表。 Referring to FIG. 6A together, taking the AMVP mode as an example, the candidate MV prediction value list of the current image block may include two motion vector predictors in the spatial domain and the time domain, and A0-A1 and B0-B2 are spatial neighboring block positions of the current image block. (also referred to as spatial domain candidate reference block location), T TL , T C , and T BR are optional time domain neighboring block locations (also referred to as time domain candidate reference block locations) of the current image block, and the application is not limited thereto. Generally, the MVs of the spatial domain and the temporal neighboring blocks are sequentially acquired from the spatial neighboring block position and the temporal neighboring block position as a plurality of candidate motion vector predictors to form a candidate MV predicted value list.
作为一种示例实现方式,参阅图6A,AMVP的候选MV预测值列表生成过程,如下:As an example implementation, referring to FIG. 6A, the AMVP candidate MV predictor list generation process is as follows:
a)首先获取空域候选运动信息。当前图像块的左侧和上方分别产生一个候选MV预测值,左侧的候选MV预测值从A0、A1、缩放的A0和缩放的A1中得到,上方的候选 MV预测值从B0、B1、B2、缩放的B0、缩放的B1和缩放的B2中得到;a) First obtain the airspace candidate motion information. A candidate MV prediction value is generated on the left side and the upper side of the current image block, and the candidate MV prediction value on the left side is obtained from A0, A1, the scaled A0, and the scaled A1, and the upper candidate MV prediction value is from B0, B1, B2. , zoomed B0, scaled B1, and scaled B2 are obtained;
b)接着获取时域候选运动信息。获取当前图像块在邻近已编码图像(亦称为参考图像)中对应位置并置块(即co-located block)的右下角空域邻近块T BR的运动信息或co-located block的中间块T C的运动信息; b) Next, the time domain candidate motion information is acquired. Obtaining motion information of a right-side spatial adjacent block T BR of a right-side concatenated block (ie, a co-located block) of a current image block in a neighboring coded picture (also referred to as a reference picture) or an intermediate block T C of a co-located block Movement information;
c)合并空域候选运动信息和时域候选运动信息,保留前两个候选运动信息,不足两个候选运动信息补上零运动信息(0,0),形成最终的候选MV预测值列表。c) combining the spatial candidate motion information and the time domain candidate motion information, retaining the first two candidate motion information, and less than two candidate motion information complementing the zero motion information (0, 0) to form a final candidate MV predictor list.
AMVP候选运动矢量预测值列表的一种示例表,如下:An example table of AMVP candidate motion vector predictor lists is as follows:
MV IdxMV Idx MV预测值(用位置表示)MV prediction value (represented by position)
00 MV A1 MV A1
11 MV B1 MV B1
表-1Table 1
或者,参阅图6B,以AMVP模式为例,当前图像块的候选MV预测值列表可以包括空域和时域两种运动矢量预测值,A,L,AL,AR和BL为当前图像块的空域邻近块位置(亦称为空域候选参考块位置),T为当前图像块的可选的时域邻近块位置(亦称为时域候选参考块位置),本申请不限于此。一般从空域邻近块位置和时域邻近块位置中分别按照顺序获取这些空域、时域邻近块的MV作为若干候选运动矢量预测值构成候选MV预测值列表。AMVP候选运动矢量预测值列表的另一种示例表,如下:Or, referring to FIG. 6B, taking the AMVP mode as an example, the candidate MV prediction value list of the current image block may include two motion vector predictors in the spatial domain and the time domain, and A, L, AL, AR, and BL are spatial neighbors of the current image block. The block position (also referred to as the spatial domain candidate reference block position), T is an optional time domain neighboring block position (also referred to as a time domain candidate reference block position) of the current image block, and the application is not limited thereto. Generally, the MVs of the spatial domain and the temporal neighboring blocks are sequentially acquired from the spatial neighboring block position and the temporal neighboring block position as a plurality of candidate motion vector predictors to form a candidate MV predicted value list. Another example table of AMVP candidate motion vector predictor lists is as follows:
MV IdxMV Idx MV预测值(用位置表示)MV prediction value (represented by position)
00 MV BL MV BL
11 MV T MV T
表-2Table 2
其它建立候选运动矢量预测值列表的方法或其它获取运动矢量预测值的方法参见现有技术,这里不再赘述。Other methods for establishing a candidate motion vector predictor list or other methods for obtaining a motion vector predictor are described in the prior art and will not be described herein.
步骤505、当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度),基于所述当前编码图像块的运动矢量、所述运动矢量预测值以及所述目标运动矢量精度,得到所述当前编码图像块的运动矢量差值(MVD)信息;其中,所述当前编码图像块的运动矢量差值(MVD)具有目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;较优地,所述当前编码图像块的运动矢量和所述运动矢量预测值具有相同的运动矢量精度,即目标运动矢量精度;Step 505: When the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy (for example, when the motion vector predictor is included in the target motion vector set, according to the multiple motion vector set Corresponding to the plurality of motion vector precisions, determining that the target motion vector accuracy corresponding to the target motion vector set is a motion vector accuracy of the motion vector predictor having a corresponding motion vector, based on the motion vector of the current encoded image block And the motion vector predictor and the target motion vector precision, to obtain motion vector difference (MVD) information of the current coded image block; wherein the motion vector difference (MVD) of the current coded image block has a target Motion vector accuracy, the target motion vector set being one of a plurality of motion vector sets, the target motion vector accuracy being one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector precision, The plurality of motion vector sets includes a first motion vector set and a second motion vector set, the first At least one of the motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion vector set corresponding to the first motion vector set is different from the second motion The second motion vector accuracy corresponding to the vector set; preferably, the motion vector of the current coded image block and the motion vector predictor have the same motion vector accuracy, that is, the target motion vector accuracy;
在一种示例的实现方式下,步骤505可以由视频编码器20的帧间预测模块41,例如 运动估计模块42来执行;In an example implementation, step 505 can be performed by inter prediction module 41 of video encoder 20, such as motion estimation module 42;
在一些可行的实施方式中,步骤505可以包括:In some possible implementations, step 505 can include:
确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度;Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has / corresponding to the motion vector accuracy;
基于所述当前编码图像块的运动矢量、所述运动矢量预测值以及目标运动矢量精度,得到当前编码图像块的运动矢量差值(MVD)信息;其中,作为一种示例实现方式,计算所述当前编码图像块的运动矢量与所述运动矢量预测值之差值MVD,所述当前编码图像块的运动矢量、所述运动矢量预测值和所述MVD具有同一运动矢量精度(即均具有目标运动矢量精度)。作为另一种示例实现方式,计算所述当前编码图像块的运动矢量与所述运动矢量预测值之差值MVD,所述当前编码图像块的运动矢量和所述运动矢量预测值具有同一运动矢量精度(即均具有目标运动矢量精度);以及,基于所述目标运动矢量精度(例如所述目标运动矢量精度的索引)对所述计算得到的MVD进行缩放(例如缩小)处理,以得到经缩放(例如缩小)处理的运动矢量差值MVD。例如,Scaled MVD=MVD>>mvrIdx,其中>>表示右移,Scaled MVD表示经缩放处理的运动矢量差值MVD,mvrIdx表示目标运动矢量精度的索引值,举例说明,假设MVD=16,目标运动矢量精度的索引值=2,Scaled MVD=16>>2=4。应当理解的是,如果mvrIdx=0(例如右移0位),经缩小处理的MVD就是原始MVD。作为一种替代的实现方式,如果mvrIdx=0(例如右移0位),则可无需对所述计算得到的MVD进行缩小(即scale)处理;如果mvrIdx不等于0(例如mvrIdx=2),则基于所述目标运动矢量精度的索引对所述计算得到的MVD进行缩放(例如缩小)处理(例如右移2位),以得到经缩放(例如缩小)处理的运动矢量差值MVD,经缩小处理的MVD占用比特数小于原始MVD占用比特数。Obtaining motion vector difference (MVD) information of the current coded image block based on the motion vector of the current coded image block, the motion vector predictor, and the target motion vector accuracy; wherein, as an example implementation, the calculating a difference MVD between a motion vector of the current coded image block and the motion vector predictor, the motion vector of the current coded image block, the motion vector predictor, and the MVD having the same motion vector accuracy (ie, each having a target motion Vector accuracy). As another example implementation manner, calculating a difference MVD between a motion vector of the current coded image block and the motion vector predictor, where the motion vector of the current coded image block and the motion vector predictor have the same motion vector Accuracy (ie, each having a target motion vector accuracy); and scaling (eg, reducing) the calculated MVD based on the target motion vector precision (eg, an index of the target motion vector accuracy) to obtain a scaled (eg, zoom out) the processed motion vector difference MVD. For example, Scaled MVD=MVD>>mvrIdx, where >> denotes a right shift, Scaled MVD denotes a scaled motion vector difference MVD, and mvrIdx denotes an index value of the target motion vector precision, for example, assuming MVD=16, target motion The vector precision index value = 2, Scaled MVD = 16 >> 2 = 4. It should be understood that if mvrIdx = 0 (e.g., shifting 0 bits to the right), the reduced MVD is the original MVD. As an alternative implementation, if mvrIdx=0 (eg, shifting 0 bits to the right), then the calculated MVD may not need to be reduced (ie, scale); if mvrIdx is not equal to 0 (eg, mvrIdx=2), Then, the calculated MVD is scaled (eg, reduced) based on the index of the target motion vector precision (eg, shifted right by 2 bits) to obtain a scaled (eg, reduced) processed motion vector difference MVD, which is reduced. The number of occupied MVD occupied bits is smaller than the original MVD occupied bits.
本申请实施例中,所述多个运动矢量集合中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。需要说明的是,这里的第一距离,例如是,第一邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第一邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离;这里的第二距离例如是,第二邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第二邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离,但本申请并不限于此。In the embodiment of the present application, the first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second motion in the plurality of motion vector sets. a second distance between the second neighboring block and the current image block corresponding to the motion vector predictor in the vector set, the first neighboring block and the second neighboring block being included in the airspace neighboring block of the current image block and/or The time domain is adjacent to the block. It should be noted that the first distance here is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image. The distance of the center point pixel position of the block; the second distance here is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the second neighboring block is relative The distance from the center point pixel position of the current image block, but the application is not limited thereto.
在一些可行的实施方式中,在第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离小于第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离的情况下,所述第一运动矢量集合对应的第一运动矢量精度小于所述第二运动矢量集合对应的第二运动矢量精度;或者,In some possible implementations, the first neighboring block corresponding to the motion vector predictor in the first motion vector set corresponds to a first distance of the current image block that is smaller than a motion vector predictor in the second motion vector set. In the case of the second distance between the second neighboring block and the current image block, the first motion vector precision corresponding to the first motion vector set is smaller than the second motion vector precision corresponding to the second motion vector set; or
在所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离的情况下,所述第一运动矢量集合对应的第一运动矢量精度大于所述第二运动矢量集合对应的第二运动矢量精度。The first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is greater than the second neighboring block corresponding to the motion vector predictor in the second motion vector set In the case of the second distance from the current image block, the first motion vector accuracy corresponding to the first motion vector set is greater than the second motion vector precision corresponding to the second motion vector set.
应当理解的是,这里的多个运动矢量集合与多种运动矢量精度的对应关系,可以是预 先设置的,也可以是视频编码器本地确定的,针对后者,在一种示例下,所述多个运动矢量集合与多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的;其中,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前图像块之间的距离与运动矢量精度的取值大小之间的关系。例如,可以是按照一组预设固定值的运动矢量精度和运动矢量精度赋值规则“距离越近运动矢量精度越高,距离越远运动矢量精度越低”而设置的对应关系。It should be understood that the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset or locally determined by the video encoder. For the latter, in one example, the Corresponding relationship between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to the motion vector precision assignment rule; wherein the motion vector precision assignment rules are used to represent the motion vector predictor values included in the motion vector set The relationship between the distance between the corresponding neighboring block and the current image block and the magnitude of the motion vector precision. For example, it may be a correspondence relationship set according to a set of preset fixed value motion vector precision and motion vector precision assignment rule "the closer the distance is, the higher the motion vector accuracy is, the farther the distance is, the lower the motion vector accuracy is."
表-3或表-4示意了多个运动矢量集合与多种运动矢量精度的一一对应关系,应当理解的是,多个运动矢量集合与多种运动矢量精度也可以是M:N的对应关系,M不等于N,例如,多个运动矢量集合与多种运动矢量精度也可以是一对多或多对一的对应关系,下文将详细介绍。Table-3 or Table-4 illustrates a one-to-one correspondence between multiple motion vector sets and various motion vector precisions. It should be understood that multiple motion vector sets and multiple motion vector precisions may also be M:N correspondences. Relationship, M is not equal to N. For example, multiple motion vector sets and multiple motion vector precisions may also be one-to-many or many-to-one correspondence, which will be described in detail below.
如表-3或表-4所示,本申请实施例中,可以根据候选运动矢量预测值所在位置(即候选运动矢量预测值所在的邻近块)与当前图像块的距离,将用于构建候选运动矢量预测列表的多个候选运动矢量预测值分成多个运动矢量集合,每个运动矢量集合包括用于构建候选运动矢量预测列表的一个或多个候选运动矢量预测值,且至少一个运动矢量集合包括多个候选运动矢量预测值;编码端与解码端预先约定一组运动矢量精度,例如{1/4,1/2,1,2,4,8等},编码端例如根据概率统计结果选择各运动矢量集合的最优运动矢量精度;也可以是编码端与解码端预先约定各运动矢量集合(各位置MV预测值)对应的运动矢量精度。As shown in Table-3 or Table-4, in the embodiment of the present application, the distance between the predicted motion vector predictor value (ie, the neighboring block where the candidate motion vector predictor is located) and the current image block may be used to construct the candidate. The plurality of candidate motion vector predictors of the motion vector prediction list are divided into a plurality of motion vector sets, each motion vector set including one or more candidate motion vector predictors for constructing the candidate motion vector prediction list, and at least one motion vector set A plurality of candidate motion vector predictors are included; the encoding end and the decoding end pre-arrange a set of motion vector precisions, for example, {1/4, 1/2, 1, 2, 4, 8, etc., and the encoding end selects, for example, according to a probability statistical result. The optimal motion vector accuracy of each motion vector set; or the motion vector accuracy corresponding to each motion vector set (each position MV prediction value) is pre-agreed by the encoding end and the decoding end.
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A1,MV B1 MV A1 , MV B1 1/41/4
11 MV A0,MV B0 MV A0 , MV B0 1/21/2
22 MV B2 MV B2 11
33 MV T MV T 22
44 以其它方式获取的MVPMVP obtained in other ways 44
表-3table 3
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A,MV L MV A , MV L 1/41/4
11 MV AL MV AL 1/21/2
22 MV AR,MV BL MV AR , MV BL 11
33 MV T MV T 22
44 以其它方式获取的MVPMVP obtained in other ways 44
表-4Table 4
步骤507、将所述当前编码图像块的运动矢量差值(MVD)信息熵编码入码流。Step 507: Encode entropy of motion vector difference (MVD) information of the current coded image block into a code stream.
在一种示例的实现方式下,步骤507可以由视频编码器20的熵编码模块56来执行;In an example implementation, step 507 may be performed by entropy encoding module 56 of video encoder 20;
步骤507中,可以是将当前编码图像块的MVD信息和第三标识熵编码入码流,所述第三标识用于指示当前编码图像块的运动矢量预测值MVP,例如第三标识为候选MVP列表中选择的候选MVP(例如最优候选MVP)的索引号。需要说明的是,这里的当前编码 图像块的MVD信息可以是当前编码图像块的MVD,也可以是经缩放过的MVD(例如经缩小过的MVD)。In step 507, the MVD information and the third identifier entropy of the current coded image block may be encoded into a code stream, where the third identifier is used to indicate a motion vector predictor value MVP of the current coded image block, for example, the third identifier is a candidate MVP. The index number of the candidate MVP (for example, the optimal candidate MVP) selected in the list. It should be noted that the MVD information of the current coded image block herein may be the MVD of the current coded image block, or may be a scaled MVD (for example, the reduced MVD).
可选的,在一些可行的实施方式中,所述过程500还可以包括:将运动矢量精度参数熵编码入码流,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述图像块的序列参数集SPS、图像参数集PPS、条带头或者其它位置中的任意一种。作为一种具体的示例,所述运动矢量精度参数可以包括用于当前编码处理单元的运动矢量精度个数和与所述运动矢量精度个数对应的至少两种运动矢量精度值,其中所述当前编码处理单元包括视频序列、图像、条带、区域(Partition)、CTU和CU中的一种或多种。Optionally, in some feasible implementations, the process 500 may further include entropy encoding a motion vector precision parameter into a code stream, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, The motion vector accuracy parameter is carried in any one of a sequence parameter set SPS, an image parameter set PPS, a slice header, or other positions of the image block. As a specific example, the motion vector accuracy parameter may include a motion vector accuracy number for a current encoding processing unit and at least two motion vector precision values corresponding to the motion vector precision number, wherein the current The encoding processing unit includes one or more of a video sequence, an image, a slice, a Partition, a CTU, and a CU.
参阅图6C,编码端(例如视频编码器20)采用率失真优化算法(即RDO)在不同的编码处理单元(例如,序列级,图像级,条带级,区域级,CTU级或CU级)下选择最优的一组运动矢量精度值,并写入码流传递到解码端(例如视频解码器30)。以在图像级为例,如果编码端根据RDO计算得到当前图像最优的一组运动矢量精度为{1/4,1/2,1,2},则将该组运动矢量精度写入PPS头信息中,具体语法结构Picture parameter set RBSP syntax如图6C所示,其中pps_amvr_number表示在当前图像中可用的运动矢量精度的个数,其取值范围为大于或等于1的正整数;pps_amvr_number的值可根据用于构建候选运动矢量预测值列表的候选运动矢量预测值的个数和位置确定。pps_amvr_set[pps_amvr_number]表示在当前图像中可用的运动矢量精度的值。Referring to FIG. 6C, the encoding end (eg, video encoder 20) employs a rate-distortion optimization algorithm (ie, RDO) at different encoding processing units (eg, sequence level, image level, strip level, region level, CTU level, or CU level). The optimal set of motion vector precision values is selected and written to the decoder (e.g., video decoder 30). Taking the image level as an example, if the encoding end obtains the optimal motion vector set accuracy of the current image according to RDO as {1/4, 1/2, 1, 2}, the set of motion vector precision is written into the PPS header. In the information, the specific syntax structure Picture parameter set RBSP syntax is shown in FIG. 6C, wherein pps_amvr_number represents the number of motion vector precisions available in the current image, and the value range is a positive integer greater than or equal to 1; the value of pps_amvr_number can be The number and location determination of the candidate motion vector predictors used to construct the candidate motion vector predictor list are determined. Pps_amvr_set[pps_amvr_number] represents the value of the motion vector precision available in the current image.
应当理解的是,编码端(例如视频编码器20)也可以不需要将运动矢量精度参数编码入码流,相应地,解码端(例如视频解码器30)可采用与编码端预先约定的一组运动矢量精度,甚至可采用与编码端预先约定的各运动矢量集合(各位置MV预测值)对应的运动矢量精度。It should be understood that the encoding end (e.g., video encoder 20) may also not need to encode the motion vector accuracy parameters into the code stream. Accordingly, the decoding end (e.g., video decoder 30) may employ a pre-agreed set with the encoding end. The motion vector accuracy can even adopt the motion vector precision corresponding to each motion vector set (the position MV prediction value) that is pre-agreed by the encoding end.
可选的,在一些可行的实施方式中,所述过程500还可以包括:Optionally, in some possible implementations, the process 500 may further include:
将第一标识熵编码入码流,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;换言之,编解码端之间可以预先约定好传输的第三运动矢量精度对应的是哪一个运动矢量集合(或者哪些位置的运动矢量预测值);Encoding the first identifier into the code stream, where the first identifier is used to indicate the third motion vector precision corresponding to the third motion vector set; in other words, the third motion vector precision corresponding to the transmission may be pre-agreed between the codecs Which motion vector set (or which position motion vector predictor);
需要说明的是,这里的第三运动矢量集合表示重要运动矢量预测值集合,即成为最佳运动矢量预测值的概率最大或较大的一个或多个运动矢量预测值所构成的运动矢量集合。第三运动矢量精度为第三运动矢量集合使用的运动矢量精度。其中,所述第三运动矢量集合可以为默认的某个运动矢量集合,比如所述多个运动矢量集合中的第一运动矢量集合(如表-5中的运动矢量集合0);当然,第三运动矢量精度集合也可以是第二运动矢量集合,或者也可以是不同于第一或第二运动矢量集合的其它运动矢量集合;此外,所述第三运动矢量精度可以为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度,本申请对此不作限定。It should be noted that the third motion vector set herein represents a set of important motion vector predictor values, that is, a motion vector set formed by one or more motion vector predictors whose probability of being the best motion vector predictor is the largest or larger. The third motion vector accuracy is the motion vector precision used by the third motion vector set. The third motion vector set may be a default set of motion vectors, such as a first motion vector set in the multiple motion vector sets (such as motion vector set 0 in Table-5); of course, The three motion vector precision set may also be a second motion vector set, or may be other motion vector sets different from the first or second motion vector set; in addition, the third motion vector precision may be the multiple motions The first motion vector accuracy in the vector precision, or the second motion vector accuracy, or other motion vector precision, is not limited in this application.
Figure PCTCN2019074822-appb-000001
Figure PCTCN2019074822-appb-000001
Figure PCTCN2019074822-appb-000002
Figure PCTCN2019074822-appb-000002
表-5table 5
运动矢量精度索引Motion vector precision index 运动矢量精度Motion vector accuracy 二进制码Binary code
00 1/81/8 0000
11 1/41/4 0101
22 1/21/2 1010
33 11 1111
表-6Table-6
此标识信息(例如第一标识)可用于序列级,图像级,条带级,区域级,图像块级(例如CTU级,CU级)等不同编解码处理单元。相应地,该标识信息可携带在所述图像块的序列参数集SPS、图像参数集PPS或者条带头中,例如SPS头信息、PPS头信息中。This identification information (eg, the first identification) can be used for different codec processing units such as sequence level, image level, strip level, area level, image block level (eg, CTU level, CU level). Correspondingly, the identification information may be carried in a sequence parameter set SPS, an image parameter set PPS or a slice header of the image block, such as SPS header information and PPS header information.
当该运动矢量精度为图像级时,将其标识信息(例如第一标识,具体是如表6所示的运动矢量精度索引)写入图像参数集PPS头信息中,具体语法结构“Picture parameter set RBSP syntax”参见图6D,其中pps_amvr_accuracy为0表示当前图像中无论是哪一个图像块的编解码过程中,默认的某个运动矢量集合(例如运动矢量集合0)的运动矢量精度为1/8,pps_amvr_accuracy为1时表示当前图像中无论是哪一个图像块的编解码过程中,默认的某个运动矢量集合(例如运动矢量集合0)的运动矢量精度为1/4,pps_amvr_accuracy为2时表示当前图像中无论是哪一个图像块的编解码过程中,默认的某个运动矢量集合(例如运动矢量集合0)的运动矢量精度为1/2,pps_amvr_accuracy为3时表示当前图像中无论是哪一个图像块的编解码过程中,默认的某个运动矢量集合(例如运动矢量集合0)的运动矢量精度为1。When the motion vector accuracy is an image level, its identification information (for example, the first identifier, specifically the motion vector precision index as shown in Table 6) is written into the image parameter set PPS header information, and the specific syntax structure "Picture parameter set" RBSP syntax" see FIG. 6D, where pps_amvr_accuracy is 0, indicating that the motion vector accuracy of a certain motion vector set (for example, motion vector set 0) is 1/8 in the encoding and decoding process of any image block in the current image. When pps_amvr_accuracy is 1, it indicates that the motion vector accuracy of a certain motion vector set (for example, motion vector set 0) is 1/4 in the encoding and decoding process of any image block in the current image, and the current image is represented by pps_amvr_accuracy 2. Regardless of which image block is encoded or decoded, the default motion vector set (for example, motion vector set 0) has a motion vector precision of 1/2, and pps_amvr_accuracy of 3 indicates which image block is in the current image. During the encoding and decoding process, the default motion vector set of a certain motion vector set (for example, motion vector set 0) is 1.
可选的,作为一种替代实现方式,所述过程500还可以包括:Optionally, as an alternative implementation, the process 500 may further include:
将第一标识和第二标识熵编码入码流,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;换言之,可以在码流中传输第三运动矢量精度对应的是哪一个运动矢量集合;Encoding the first identifier and the second identifier into a code stream, the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set; in other words, may be transmitted in the code stream Which of the motion vector sets corresponds to the third motion vector accuracy;
此标识信息(例如第一标识和第二标识)可用于序列级,图像级,条带级,区域级,CTU级,CU级等不同编解码单元。相应地,该标识信息可携带在所述图像块的序列参数集、图像参数集或者条带头中。The identification information (for example, the first identifier and the second identifier) can be used for different codec units such as sequence level, image level, strip level, area level, CTU level, and CU level. Correspondingly, the identification information can be carried in a sequence parameter set, an image parameter set or a slice header of the image block.
当该运动矢量精度为图像级时,将其标识信息(例如第一标识(具体是运动矢量精度索引)和第二标识(具体是运动矢量集合的索引))写入图像参数集PPS头信息中,具体语法结构“Picture parameter set RBSP syntax”参见图6E,其中pps_amvr set_idx表示运动矢量集合的索引,其取值范围为正整数,即表示存在至少一个运动矢量集合;pps_amvr set_accuracy[pps_amvr set_idx]表示运动矢量集合pps_amvr set_idx对应的运动矢量精度的值。其中,pps_amvr set_accuracy[pps_amvr set_idx]为0表示当前图像中无论是哪一个图像块的编解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1/8;pps_amvr set_accuracy[pps_amvr set_idx]为1时表示当前图像中的无论是哪一个图像块的 编解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1/4,pps_amvr set_accuracy[pps_amvr set_idx]为2时表示当前图像中的无论是哪一个图像块的编解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1/2,pps_amvr set_accuracy[pps_amvr set_idx]为3时表示当前图像中的无论是哪一个图像块的解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1。When the motion vector precision is an image level, the identification information (for example, the first identifier (specifically, the motion vector precision index) and the second identifier (specifically, the index of the motion vector set) are written into the image parameter set PPS header information. For the specific syntax structure "Picture parameter set RBSP syntax", see FIG. 6E, where pps_amvr set_idx represents an index of the motion vector set, and its value range is a positive integer, that is, there is at least one motion vector set; pps_amvr set_accuracy[pps_amvr set_idx] indicates motion The vector collection pps_amvr set_idx corresponds to the value of the motion vector precision. Where pps_amvr set_accuracy[pps_amvr set_idx] is 0, indicating that the motion vector of the motion vector set specified by pps_amvr set_idx is 1/8 in the encoding and decoding process of the image block in the current image; pps_amvr set_accuracy[pps_amvr set_idx] is 1 indicates that the motion vector of the motion vector set specified by pps_amvr set_idx has a precision of 1/4 in the encoding and decoding process of the image block in the current image, and pps_amvr set_accuracy[pps_amvr set_idx] is 2 indicates the current image. Regardless of which image block is encoded or decoded, the motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1/2, and pps_amvr set_accuracy[pps_amvr set_idx] of 3 indicates which image block is in the current image. During the decoding process, the motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1.
进一步的,为了重构建图像块,本发明实施例的过程500还可以包括:Further, in order to rebuild the image block, the process 500 of the embodiment of the present invention may further include:
步骤509、基于所述当前编码图像块的运动矢量,得到当前编码图像块的预测块,所述运动矢量具有目标运动矢量精度;Step 509: Obtain, according to a motion vector of the current coded image block, a prediction block of a current coded image block, where the motion vector has a target motion vector accuracy;
在一种示例的实现方式下,步骤509可以由视频编码器20的帧间预测模块41,例如运动补偿模块44来执行;In an example implementation, step 509 may be performed by inter prediction module 41 of video encoder 20, such as motion compensation module 44;
由运动补偿模块44执行的运动补偿可涉及基于运动矢量提取或产生预测块,例如,运动补偿模块44可在参考图像列表中的一者中定位运动矢量所指向的预测块。运动补偿模块44还可能涉及执行分数像素精度的内插。一并参阅图4B,整数像素位置100处的像素的值一般对应于参考图像中的像素的实际值。如果目标运动矢量精度为分数像素精度(例如,二分之一像素精度,或者四分之一像素精度,或者八分之一像素精度),则需要对参考图像的整像素位置的像素值,采用插值滤波器进行插值,得到分数像素位置的像素值,从而得到当前块的预测块的值。Motion compensation performed by motion compensation module 44 may involve extracting or generating a prediction block based on a motion vector, for example, motion compensation module 44 may locate a prediction block to which the motion vector is directed in one of the reference image lists. Motion compensation module 44 may also involve performing interpolation of fractional pixel precision. Referring to Figure 4B, the value of the pixel at integer pixel location 100 generally corresponds to the actual value of the pixel in the reference image. If the target motion vector accuracy is fractional pixel precision (eg, one-half pixel precision, or quarter-pixel precision, or one-eighth pixel precision), then the pixel value of the integer pixel position of the reference image is required. The interpolation filter performs interpolation to obtain a pixel value of the fractional pixel position, thereby obtaining the value of the prediction block of the current block.
步骤511、基于所述预测块对所述当前编码图像块进行重建。Step 511: Perform reconstruction on the current coded image block based on the prediction block.
在一种示例的实现方式下,步骤511可以由视频编码器20的重建模块62,例如求和器62来执行。In an example implementation, step 511 may be performed by a reconstruction module 62 of video encoder 20, such as summer 62.
应当理解的是,对于某些图像块或者图像帧,视频编码器20没有产生残差数据,相应地,基于所述预测块对所述当前编码图像块进行重建;对于某些图像块或者图像帧,视频编码器20产生残差数据(亦称为残差块),相应地,基于所述预测块和所述残差块对所述当前编码图像块进行重建。It should be understood that for certain image blocks or image frames, video encoder 20 does not generate residual data, and accordingly, reconstructs the current coded image block based on the prediction block; for certain image blocks or image frames Video encoder 20 generates residual data (also referred to as a residual block), and accordingly reconstructs the current encoded image block based on the predicted block and the residual block.
可见,本申请实施例的方法中,一方面,在视频编码器获取当前编码图像块的运动矢量预测值之后,通过该运动矢量预测值所属的目标运动矢量集合所对应的目标运动矢量精度的方式,能自适应确定用于当前编码图像块的适当的运动矢量精度,如果运动矢量集合的数目为N,则视频编码器可支持M种运动矢量MV精度,其中M小于或等于N,M和N均为正整数,例如M、N大于或等于3,提高了运动矢量预测精度,具体地,由于本发明实施例能自适应地选择运动矢量精度,针对某些视频内容对应的一个或多个图像块,使用具有较高像素精度(例如1/8像素精度)的运动矢量相对于使用较低像素精度的运动矢量,提高了视频编解码质量,而且带来的益处优于内插开销代价,比如,基于具有高像素精度(例如1/8像素精度)的运动矢量得到的预测块更接近于当前编码图像块的原始块,即使内插分数像素位置导致了一些内插开销;而针对某些视频内容对应的一个或多个图像块,使用较低像素精度的运动矢量(例如整数像素精度)相对于使用较高像素精度的运动矢量,既没有降低视频编解码质量,还避免了内插开销代价,因此,本申请实施例的视频编码方法整体上提高了编解码性能;It can be seen that, in the method of the embodiment of the present application, on the one hand, after the video encoder obtains the motion vector predictor of the current coded image block, the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained. The adaptive motion vector accuracy for the current coded image block can be adaptively determined. If the number of motion vector sets is N, the video encoder can support M motion vector MV precision, where M is less than or equal to N, M, and N. All of them are positive integers, for example, M, N is greater than or equal to 3, which improves the motion vector prediction accuracy. Specifically, since the embodiment of the present invention can adaptively select motion vector accuracy, one or more images corresponding to some video content. Blocks, using motion vectors with higher pixel precision (eg 1/8 pixel precision) versus motion vectors using lower pixel precision, improve video codec quality, and the benefits are better than interpolation overhead costs, such as a prediction block obtained based on a motion vector having high pixel precision (for example, 1/8 pixel precision) is closer to the original of the currently coded image block Block, even if interpolating the fractional pixel position results in some interpolation overhead; for one or more image blocks corresponding to some video content, using lower pixel precision motion vectors (eg integer pixel precision) versus using higher pixels The precision motion vector has neither reduced the video coding and decoding quality nor the interpolation overhead cost. Therefore, the video coding method in the embodiment of the present application improves the coding and decoding performance as a whole.
另一方面,视频编码器能自适应选择目标运动矢量精度来编码所述MVD信息,比如, 经缩放(例如缩小)处理的MVD相对于原始MVD占用较少的比特数或者占用一样的比特数,针对前者还能降低了比特传输开销,从而进一步提高了编解码性能;On the other hand, the video encoder can adaptively select the target motion vector precision to encode the MVD information, for example, the scaled (eg, reduced) processed MVD occupies fewer bits or occupies the same number of bits relative to the original MVD, The former can also reduce the bit transmission overhead, thereby further improving the codec performance;
再一方面,本发明实施例的视频编码器或者不发信号通知任何与运动矢量精度相关的信息或者仅发信号通知重要运动矢量集合的运动矢量精度,在提高编码效率的同时也能进一步节省比特开销,进而进一步提高编解码性能。In a further aspect, the video encoder of the embodiment of the invention does not signal any information related to the motion vector accuracy or only signals the motion vector precision of the important motion vector set, and can further save the bit while improving the coding efficiency. Overhead, which further improves the codec performance.
图7是本申请实施例的一种视频解码方法的示意性流程图。图7所示的过程700可以由视频解码装置、视频解码器(例如视频解码器30)以及其它具有视频解码功能的设备来执行。过程700描述为一系列的步骤或操作,应当理解的是,过程700可以以各种顺序执行和/或同时发生,不限于图7所示的执行顺序。假设具有多个视频帧的视频数据流正在使用视频解码器,执行包括如下步骤的过程700来解码当前视频帧的当前图像块;FIG. 7 is a schematic flowchart of a video decoding method according to an embodiment of the present application. The process 700 shown in Figure 7 can be performed by a video decoding device, a video decoder (e.g., video decoder 30), and other devices having video decoding capabilities. Process 700 is described as a series of steps or operations, it being understood that process 700 can be performed in various sequences and/or concurrently, and is not limited to the order of execution shown in FIG. Assuming that a video data stream having multiple video frames is using a video decoder, a process 700 comprising the steps of decoding the current image block of the current video frame is performed;
图7所示的方法包括步骤701至步骤709,下面对步骤701至步骤709进行详细的介绍。The method shown in FIG. 7 includes steps 701 to 709, and steps 701 to 709 are described in detail below.
步骤701、接收码流,所述码流携带有当前正在解码的图像块(简称为当前解码图像块或当前图像块)的运动矢量差值(Motion Vector Difference,MVD)信息,并从所述码流中解析出所述MVD信息;Step 701: Receive a code stream, where the code stream carries motion vector difference (MVD) information of an image block currently being decoded (referred to as a current decoded image block or a current image block), and from the code Parsing the MVD information in the stream;
例如,步骤701可由视频解码器30的熵解码模块80来执行;For example, step 701 can be performed by entropy decoding module 80 of video decoder 30;
在一种实现方式下,步骤701可包括:接收码流,所述码流包含当前解码图像块的运动矢量差值(MVD)信息和用于指示当前解码图像块的候选运动矢量预测值(MVP)的第三标识(例如索引号),从所述码流中解析出所述MVD信息和所述第三标识;In an implementation manner, step 701 can include: receiving a code stream, where the code stream includes motion vector difference (MVD) information of a currently decoded image block and a candidate motion vector predictor (MVP) for indicating a currently decoded image block. a third identifier (eg, an index number) from which the MVD information and the third identifier are parsed;
其中,所述当前解码图像块的MVD信息可以是当前解码图像块的MVD,或者,可以是当前解码图像块的经缩放处理的MVD。The MVD information of the current decoded image block may be the MVD of the currently decoded image block, or may be the scaled processed MVD of the currently decoded image block.
步骤703、获取所述当前解码图像块的运动矢量预测值MVP;Step 703: Acquire a motion vector predictor MVP of the current decoded image block.
例如,步骤703可以由视频解码器30的预测模块81,例如预测模块81中的帧间预测模块82(亦可称为运动补偿模块82)来执行;For example, step 703 can be performed by prediction module 81 of video decoder 30, such as inter prediction module 82 (also referred to as motion compensation module 82) in prediction module 81;
在一种实现方式下,步骤703可包括:基于所述第三标识(例如索引号)从候选运动矢量预测列表中确定所述当前解码图像块的候选运动矢量预测值;作为一种示例,在当前解码图像块的帧间预测模式是AMVP模式的情况下,构建当前解码图像块的AMVP候选运动矢量预测值列表(AMVP candidate MVP list);基于所述第三标识(例如索引号)从AMVP候选运动矢量预测值列表中确定所述当前解码图像块的候选运动矢量预测值(亦称为最佳候选MVP);一并参阅图6A或图6B,视频解码器30可以采用类似于视频编码器20的做法构建当前解码图像块的AMVP候选运动矢量预测值列表,如表-1所示,例如:当索引号idx=1时,表示最佳候选MVP为MV B1In an implementation manner, step 703 may include determining a candidate motion vector predictor of the currently decoded image block from the candidate motion vector prediction list based on the third identifier (eg, an index number); as an example, in In the case where the inter prediction mode of the currently decoded image block is the AMVP mode, an AMVP candidate MVP list of the current decoded image block is constructed; and the AMVP candidate is based on the third identifier (eg, an index number) A candidate motion vector predictor (also referred to as a best candidate MVP) of the current decoded image block is determined in the motion vector predictor list; and referring to FIG. 6A or FIG. 6B, the video decoder 30 may employ a video encoder 20 similar to the video encoder 20 The method of constructing the AMVP candidate motion vector predictor list of the currently decoded image block is as shown in Table-1. For example, when the index number idx=1, it indicates that the best candidate MVP is MV B1 .
在另一种实现方式下,一并参阅图8,可采用解码端运动矢量导出(Decoder-side motion vector derivation,DMVD)技术,尤其是模板匹配(Template matching,TM)方法,获取所述当前解码图像块的运动矢量预测值(MVP)。其中,TM方法是指,确定当前图像块空间相邻的一部分区域作为模板TMc(例如相邻左边一部分区域和/或相邻上边一部分区域),为此模板在参考图像中寻找最匹配的模板(与模板具有同样的尺寸和形状),称为TMr。根据两个模板的位置确定当前图像块的运动矢量的预测值。其中,两个模板之间的 间隔可以是整像素值,也可以是非整像素值,例如包括但不限于二分之一像素、四分之一像素或八分之一像素。详细细节,参见现有技术,在此不再赘述。In another implementation manner, referring to FIG. 8, a Decoder-side motion vector derivation (DMVD) technique, in particular, a template matching (TM) method, may be used to obtain the current decoding. The motion vector predictor (MVP) of the image block. The TM method refers to determining a part of the area adjacent to the current image block space as a template TMc (for example, a part of the adjacent left part and/or a part of the adjacent upper side), for which the template searches for the best matching template in the reference image ( It has the same size and shape as the template, called TMr. The predicted value of the motion vector of the current image block is determined according to the positions of the two templates. The interval between the two templates may be an integer pixel value or a non-integer pixel value, for example, but not limited to, one-half pixel, one-quarter pixel or one-eighth pixel. For details, refer to the prior art, and details are not described herein again.
在再一种实现方式下,一并参阅图9,采用解码端运动矢量导出(Decoder-side motion vector derivation,DMVD)技术,尤其是双向匹配(Bilateral matching)方法,获取所述当前解码图像块的运动矢量预测值(MVP)。其中,双向匹配的方法的原理是假设物体是直线匀速运动,则可以沿着当前块的运动轨迹,在两个不同的参考帧当中寻找最匹配的块。例如,给定一个前向MV0,首先确定其对应的后向MV1,MV0与MV1为镜像关系。具体的,从MV的幅度上,MV0以及MV1与当前图像和两个参考图像之间的时域间隔(TD0,TD1)成正比。从MV的方向上,MV0以及MV1的指向相反。根据MV0以及MV1在两个参考帧当中分别确定了两个匹配块,这两个匹配块相对于当前块的相对位置,便为当前块的MV的预测值。具有最小SAD的MV对可被选择为最接近当前块的运动矢量的运动矢量预测值。详细细节,参见现有技术,在此不再赘述。In another implementation manner, referring to FIG. 9, a Decoder-side motion vector derivation (DMVD) technique, in particular, a Bilateral matching method, is used to obtain the current decoded image block. Motion vector predictor (MVP). Among them, the principle of the two-way matching method is to assume that the object is moving in a straight line, and the most matching block can be found among two different reference frames along the motion track of the current block. For example, given a forward MV0, first determine its corresponding backward MV1, MV0 and MV1 are mirrored. Specifically, from the magnitude of the MV, MV0 and MV1 are proportional to the time domain interval (TD0, TD1) between the current image and the two reference images. From the direction of the MV, MV0 and MV1 point in opposite directions. Two matching blocks are respectively determined among the two reference frames according to MV0 and MV1, and the relative positions of the two matching blocks with respect to the current block are the predicted values of the MV of the current block. The MV pair with the smallest SAD can be selected as the motion vector predictor that is closest to the motion vector of the current block. For details, refer to the prior art, and details are not described herein again.
其它建立候选运动矢量预测值列表的方法或其它获取运动矢量预测值的方法参见现有技术,这里不再赘述。Other methods for establishing a candidate motion vector predictor list or other methods for obtaining a motion vector predictor are described in the prior art and will not be described herein.
步骤705、当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时(例如,当所述运动矢量预测值被包括于目标运动矢量集合时,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标运动矢量集合所对应的目标运动矢量精度为所述运动矢量预测值具有的运动矢量精度),基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;Step 705: When the motion vector predictor is included in the target motion vector set corresponding to the target motion vector precision (for example, when the motion vector predictor is included in the target motion vector set, according to the multiple motion vector set Corresponding to the plurality of motion vector precisions, determining that the target motion vector accuracy corresponding to the target motion vector set is the motion vector accuracy of the motion vector predictor), based on the motion vector predictor, the motion vector difference The value information and the target motion vector precision, the motion vector of the current decoded image block is obtained, wherein the motion vector of the current decoded image block has the target motion vector precision, and the target motion vector set is a plurality of motions One of the vector sets, the target motion vector precision being one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector accuracy, the plurality of motion vector sets including the first motion vector set and a second motion vector set, the first motion vector set and the second motion vector set At least one motion vector set includes two or more motion vector predictors, and the first motion vector accuracy corresponding to the first motion vector set is different from the second motion vector corresponding to the second motion vector set Accuracy
例如,步骤705可以由视频解码器30的预测模块81,例如预测模块81中的帧间预测模块82来执行;For example, step 705 can be performed by prediction module 81 of video decoder 30, such as inter prediction module 82 in prediction module 81;
在一些可行的实施方式中,参阅图10,步骤705可以包括:步骤7051和步骤7052,下面将对步骤7051和步骤7052进行详细的介绍。In some possible implementations, referring to FIG. 10, step 705 may include: step 7051 and step 7052, and step 7051 and step 7052 will be described in detail below.
步骤7051、确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定与所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的/对应的运动矢量精度;Step 7051: determining that the motion vector predictor is included in the target motion vector set, and determining, according to a correspondence between the multiple motion vector sets and the plurality of motion vector precisions, a target motion vector accuracy corresponding to the target vector set. The motion vector predictor has a corresponding/corresponding motion vector accuracy;
需要说明的是,这里的多个运动矢量集合与多种运动矢量精度的对应关系可以是一一对应关系,也可以是M:N的对应关系,M不等于N,例如,多个运动矢量集合与多种运动矢量精度也可以是一对多或多对一的对应关系,本申请实施例对此不作限定。It should be noted that the correspondence between multiple motion vector sets and multiple motion vector precisions may be a one-to-one correspondence, or may be a M:N correspondence, and M is not equal to N, for example, multiple motion vector sets. A plurality of motion vector precisions may be one-to-many or many-to-one correspondences, which is not limited in this embodiment of the present application.
所述多个运动矢量集合中,所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。The first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current image block is different from the motion vector in the second motion vector set. And a second distance between the second neighboring block and the current image block corresponding to the predicted value, the first neighboring block and the second neighboring block being included in the spatial neighboring block and/or the time domain neighboring block of the current image block.
需要说明的是,这里的第一距离,例如是第一邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第一邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离;这里的第二距离例如是第二邻近块的左上角像素位置相对于当前图像块的左上角像素位置的距离,或者第二邻近块的中心点像素位置相对于当前图像块的中心点像素位置的距离,但本申请并不限于此。应当理解的是,这里的第一、第二的说法仅为区分便于描述而已。It should be noted that the first distance herein is, for example, the distance of the pixel position of the upper left corner of the first neighboring block relative to the pixel position of the upper left corner of the current image block, or the pixel position of the center point of the first neighboring block relative to the current image block. The distance of the center point pixel position; the second distance here is, for example, the distance of the pixel position of the upper left corner of the second neighboring block relative to the pixel position of the upper left corner of the current image block, or the center point pixel position of the second neighboring block relative to the current The distance from the center point pixel position of the image block, but the application is not limited thereto. It should be understood that the first and second statements herein are merely for convenience of description.
需要说明的是,这里的空域邻近块可以包括当前图像块所在图像中的、与所述当前图像块邻近的一个或多个空域邻近块。如图6A所示,所述当前图像块的空域邻近块包括:位于所述当前图像块左下侧的空域邻近块A0,位于所述当前图像块左侧的空域邻近块A1,位于所述当前图像块右上侧的空域邻近块B0,位于所述当前图像块上侧的空域邻近块B1,和/或位于所述当前图像块左上侧的空域邻近块B2。It should be noted that the spatial neighboring block herein may include one or more spatial neighboring blocks adjacent to the current image block in the image of the current image block. As shown in FIG. 6A, the spatial neighboring block of the current image block includes: a spatial neighboring block A0 located at a lower left side of the current image block, and a spatial neighboring block A1 located at a left side of the current image block, located in the current image. The spatially adjacent block B0 on the upper right side of the block is located in the spatial neighboring block B1 on the upper side of the current image block, and/or in the spatial adjacent block B2 on the upper left side of the current image block.
需要说明的是,这里的时域邻近块可以包括参考图像中、与并置块(co-located块)邻近的一个或多个空域邻近块,和/或,所述并置块中的一个或多个子块,其中,所述并置块为参考图像中与所述当前图像块具有相同的大小、形状和坐标的图像块。这里的参考图像指的是已重建的图像,具体的,这里的参考图像指的是一个或多个参考图像列表中的参考图像,例如可以是指定参考图像列表中的指定参考图像索引对应的参考图像,也可以是默认的参考图像列表中的处于首位置的参考图像,本申请对此不作限定。需要说明的是,无论是哪一种邻近块,都是指已确定运动矢量图像块(亦指已编码图像块或已解码图像块)。如图6A所示,所述当前图像块的时域邻近块可包括:所述当前图像块的并置块(co-located块)的右下空域邻近块T BR,所述并置块的中间块T c,和/或所述并置块的左上块T TL块。 It should be noted that the time domain neighboring block herein may include one or more airspace neighboring blocks in the reference image adjacent to the co-located block, and/or one of the collocated blocks or a plurality of sub-blocks, wherein the collocated block is an image block of the reference image having the same size, shape, and coordinates as the current image block. The reference image herein refers to a reconstructed image. Specifically, the reference image herein refers to a reference image in one or more reference image lists, for example, may be a reference corresponding to a specified reference image index in the specified reference image list. The image may also be the reference image in the first position in the default reference image list, which is not limited in this application. It should be noted that no matter which kind of neighboring block, it refers to a motion vector image block (also referred to as an encoded image block or a decoded image block). 6A, the current image block adjacent time-domain blocks may include: a lower right airspace collocated block of the current image block (co-located blocks) neighboring blocks T BR, facing the intermediate block and Block T c , and/or the upper left block T TL block of the collocated block.
在一些可行的实施方式中,在第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离小于第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离的情况下,所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,In some possible implementations, the first neighboring block corresponding to the motion vector predictor in the first motion vector set corresponds to a first distance of the current image block that is smaller than a motion vector predictor in the second motion vector set. In the case of the second distance between the second neighboring block and the current image block, the first motion vector accuracy corresponding to the first motion vector set is higher than the second motion vector precision corresponding to the second motion vector set; or
在所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离的情况下,所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。The first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is greater than the second neighboring block corresponding to the motion vector predictor in the second motion vector set In the case of the second distance from the current image block, the first motion vector accuracy corresponding to the first motion vector set is lower than the second motion vector accuracy corresponding to the second motion vector set.
本申请实施例中,步骤7051中的多个运动矢量集合与多种运动矢量精度的对应关系至少有四种方式来得到:In this embodiment of the present application, the correspondence between multiple motion vector sets in step 7051 and multiple motion vector precisions is obtained in at least four ways:
第一种方式:多个运动矢量集合与多种运动矢量精度的对应关系,可以是解码端(例如视频解码器30)预先设置的,例如按照预设的规则或预设的方式设置的,例如,可以是按照一组预设固定值的运动矢量精度和预设的运动矢量精度赋值规则“距离越近运动矢量精度越高,距离越远运动矢量精度越低”而设置的对应关系。The first mode: the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset by the decoding end (for example, the video decoder 30), for example, according to a preset rule or a preset manner, for example, It may be a correspondence relationship set according to a set of preset fixed value motion vector precision and a preset motion vector precision assignment rule "the closer the distance is, the higher the motion vector accuracy is, the farther the distance is, the lower the motion vector accuracy is."
参阅图6A和表-7A,或者参阅图6B和表-8A,本申请实施例中,可以根据候选运动矢量预测值所在位置(即候选运动矢量预测值所在的邻近块)与当前图像块的距离,确定多个运动矢量集合,例如将用于构建候选运动矢量预测列表的多个候选运动矢量预测值分成多个运动矢量集合,每个运动矢量集合包括用于构建候选运动矢量预测列表的一个或多个候选运动矢量预测值,且至少一个运动矢量集合包括多个候选运动矢量预测值;编码端 与解码端预先约定一组运动矢量精度,例如{1/4,1/2,1,2,4,8等},解码端按照预设的运动矢量精度赋值规则“距离越近运动矢量精度越高,距离越远运动矢量精度越低”设置各运动矢量集合的运动矢量精度。Referring to FIG. 6A and Table-7A, or referring to FIG. 6B and Table-8A, in the embodiment of the present application, the distance between the location of the candidate motion vector predictor (ie, the neighboring block where the candidate motion vector predictor is located) and the current image block may be Determining a plurality of motion vector sets, for example, dividing the plurality of candidate motion vector predictors used to construct the candidate motion vector prediction list into a plurality of motion vector sets, each motion vector set including one or one for constructing a candidate motion vector prediction list a plurality of candidate motion vector predictors, and the at least one motion vector set includes a plurality of candidate motion vector predictors; the encoding end and the decoding end pre-agreed a set of motion vector precisions, for example, {1/4, 1/2, 1, 2, 4,8, etc., the decoding end according to the preset motion vector accuracy assignment rule "the closer the distance, the higher the motion vector accuracy, the farther the distance is, the lower the motion vector accuracy" sets the motion vector precision of each motion vector set.
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A1,MV B1 MV A1 , MV B1 1/41/4
11 MV A0,MV B0 MV A0 , MV B0 1/21/2
22 MV B2 MV B2 11
33 MV T MV T 22
表-7ATable-7A
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A,MV L MV A , MV L 1/41/4
11 MV AL MV AL 1/21/2
22 MV AR,MV BL MV AR , MV BL 11
33 MV T MV T 22
表-8ATable-8A
第二种方式:多个运动矢量集合与多种运动矢量精度的对应关系,可以是解码端(例如视频解码器30)预先设置的,例如,编码端与解码端预先约定各运动矢量集合(预先设置属于各个运动矢量集合的各位置运动矢量预测值)和预设的运动矢量精度;如表-7B和表-8B,针对其它方式获取MVP的情况,也可以预设对应的运动矢量精度。The second mode: the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset by the decoding end (for example, the video decoder 30). For example, the encoding end and the decoding end pre-agreed each motion vector set (pre- Set the position motion vector prediction values belonging to each motion vector set and the preset motion vector precision; as shown in Table-7B and Table-8B, for the other way to obtain the MVP, the corresponding motion vector precision may also be preset.
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A1,MV B1 MV A1 , MV B1 1/41/4
11 MV A0,MV B0 MV A0 , MV B0 1/21/2
22 MV B2 MV B2 11
33 MV T MV T 22
44 以其它方式获取的MVPMVP obtained in other ways 44
表-7BTable-7B
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A,MV L MV A , MV L 1/41/4
11 MV AL MV AL 1/21/2
22 MV AR,MV BL MV AR , MV BL 11
33 MV T MV T 22
44 以其它方式获取的MVPMVP obtained in other ways 44
表-8BTable-8B
第三种方式:多个运动矢量集合与多种运动矢量精度的对应关系,可以是解码端(例如视频解码器30)预先设置的,例如按照预设的规则或预设的方式设置的,编码端与解码端预先约定一组运动矢量精度,例如{1/4,1/2,1,2,4,8等},与第一种方式的区别在于:解码端例如根据概率统计结果确定各运动矢量集合的运动矢量精度,其中前述概率统计结果用于统计每个运动矢量集合使用哪种精度的概率最高;The third mode: the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be preset by the decoding end (for example, the video decoder 30), for example, according to a preset rule or a preset manner, and the encoding is performed. The terminal and the decoding end pre-arrange a set of motion vector precisions, for example, {1/4, 1/2, 1, 2, 4, 8, etc., which differs from the first mode in that the decoding end determines each of the results according to, for example, probability statistics. The motion vector accuracy of the motion vector set, wherein the aforementioned probability statistics result is used to calculate which of the motion vectors is used with the highest probability;
第四种方式:多个运动矢量集合与多种运动矢量精度的对应关系,可以是解码端(例如视频解码器30)本地确定的,在一种示例下,所述多个运动矢量集合与多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的;具体地,所述多个运动矢量集合与多种运动矢量精度的对应关系是根据运动矢量精度赋值规则和从码流中解析出的运动矢量精度参数而确定的,所述运动矢量精度赋值规则用于表征所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前图像块之间的距离与运动矢量精度的取值大小之间的关系,换言之,“距离越近运动矢量精度越高,距离越远运动矢量精度越低”。The fourth mode: the correspondence between the multiple motion vector sets and the multiple motion vector precisions may be locally determined by the decoding end (for example, the video decoder 30). In one example, the multiple motion vector sets are combined. The correspondence between the motion vector precisions is determined according to the motion vector precision assignment rule; specifically, the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is based on the motion vector precision assignment rules and the parsing from the code stream Determined by the motion vector precision parameter, the motion vector precision assignment rule is used to represent the distance between the adjacent block corresponding to the motion vector predictor included in the motion vector set and the current image block and the motion vector accuracy. The relationship between the values, in other words, "the closer the distance, the higher the motion vector accuracy, and the farther the distance is, the lower the motion vector accuracy is."
相应地,步骤701中接收的码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述图像块的序列参数集SPS、图像参数集PPS、条带头或者其它位置中的任意一种。作为一种具体的示例,所述运动矢量精度参数可以包括用于当前解码处理单元的运动矢量精度个数和与所述运动矢量精度个数对应的至少两种运动矢量精度值,其中所述当前解码处理单元包括视频序列、图像、条带、区域partition、CTU和CU中的一种或多种。较优地,这里的多种运动矢量精度为大于或等于三种的运动矢量精度。Correspondingly, the code stream received in step 701 further carries a motion vector precision parameter, where the motion vector precision parameter is used to indicate a value of the multiple motion vector precision, and the motion vector precision parameter is carried in the image block. Any of sequence parameter set SPS, image parameter set PPS, strip header or other location. As a specific example, the motion vector accuracy parameter may include a motion vector accuracy number for a current decoding processing unit and at least two motion vector precision values corresponding to the motion vector precision number, wherein the current The decoding processing unit includes one or more of a video sequence, an image, a slice, a region partition, a CTU, and a CU. Preferably, the plurality of motion vector precisions herein are greater than or equal to three motion vector precisions.
参阅图6C,一组运动矢量精度参数携带在图像参数集PPS头信息中,具体语法结构Picture parameter set RBSP syntax中,pps_amvr_number表示在当前图像中可用的运动矢量精度的个数,其取值范围为大于或等于1的正整数;pps_amvr_number的值可根据用于构建候选运动矢量预测值列表的候选运动矢量预测值的个数和位置确定。pps_amvr_set[pps_amvr_number]表示在当前图像中可用的运动矢量精度的值。Referring to FIG. 6C, a set of motion vector precision parameters are carried in the image parameter set PPS header information. In the specific syntax structure Picture parameter set RBSP syntax, pps_amvr_number represents the number of motion vector precisions available in the current image, and the value range is A positive integer greater than or equal to 1; the value of pps_amvr_number may be determined according to the number and location of candidate motion vector predictors used to construct the candidate motion vector predictor list. Pps_amvr_set[pps_amvr_number] represents the value of the motion vector precision available in the current image.
以pps_amvr_number=4,pps_amvr_set[0]=1/4,pps_amvr_set[1]=1/2,pps_amvr_set[2]=1,pps_amvr_set[3]=2为例,考虑候选运动矢量预测值的个数的基础上,根据候选运动矢量预测值所在邻近块位置与当前块的距离,距离越近运动矢量精度越高,距离越远运动矢量精度越低,因此各运动矢量集合的运动矢量精度可以设置如上表-8A所示。Taking pps_amvr_number=4, pps_amvr_set[0]=1/4, pps_amvr_set[1]=1/2, pps_amvr_set[2]=1, pps_amvr_set[3]=2 as an example, consider the basis of the number of candidate motion vector predictors Upper, according to the distance between the neighboring block position of the candidate motion vector predictor and the current block, the closer the distance is, the higher the motion vector accuracy is, and the farther the distance is, the lower the motion vector accuracy is. Therefore, the motion vector precision of each motion vector set can be set as above - 8A is shown.
以pps_amvr_number=3,pps_amvr_set[0]=1/4,pps_amvr_set[1]=1,pps_amvr_set[2]=4为例,考虑候选运动矢量预测值的个数的基础上,根据候选运动矢量预测值所在邻近块位置与当前块的距离,距离越近运动矢量精度越高,距离越远运动矢量精度越低,因此各运动矢量集合的运动矢量精度可以设置如下表-8C所示。Taking pps_amvr_number=3, pps_amvr_set[0]=1/4, pps_amvr_set[1]=1, pps_amvr_set[2]=4 as an example, considering the number of candidate motion vector predictors, based on the predicted motion vector predictor The distance between the adjacent block position and the current block. The closer the distance is, the higher the motion vector accuracy is. The farther the distance is, the lower the motion vector accuracy is. Therefore, the motion vector accuracy of each motion vector set can be set as shown in Table -8C.
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A,MV L MV A , MV L 1/41/4
11 MV AL,MV AR,MV BL MV AL , MV AR , MV BL 11
22 MV T MV T 44
表-8CTable-8C
第五种方式:与前述第一至四种方式的区别在于:编码端通过信号指示某个重要运动矢量预测值集合的运动矢量精度;在前述任一种方式的基础上,解码端进一步解析码流得到某个重要运动矢量预测值集合的运动矢量精度,从而得到多个运动矢量集合与多种运动矢量精度的对应关系。The fifth mode is different from the foregoing first to fourth modes in that the coding end indicates the motion vector accuracy of a certain motion vector predictor set by signal; on the basis of any of the foregoing modes, the decoder further parses the code. The stream obtains the motion vector precision of a certain motion vector predictor set, thereby obtaining a correspondence between multiple motion vector sets and various motion vector precisions.
需要说明的是,这里的第三运动矢量集合表示重要运动矢量预测值集合,即成为最佳运动矢量预测值的概率最大或较大的一个或多个运动矢量预测值所构成的运动矢量集合。第三运动矢量精度为第三运动矢量集合使用的运动矢量精度。其中,所述第三运动矢量集合可以为默认的某个运动矢量集合,比如所述多个运动矢量集合中的第一运动矢量集合(如上表中的运动矢量集合0);当然,第三运动矢量精度集合也可以是第二运动矢量集合,或者也可以是不同于第一或第二运动矢量集合的其它运动矢量集合;此外,所述第三运动矢量精度可以为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度,本申请对此不作限定。It should be noted that the third motion vector set herein represents a set of important motion vector predictor values, that is, a motion vector set formed by one or more motion vector predictors whose probability of being the best motion vector predictor is the largest or larger. The third motion vector accuracy is the motion vector precision used by the third motion vector set. The third motion vector set may be a default set of motion vectors, such as a first motion vector set of the plurality of motion vector sets (the motion vector set 0 in the above table); of course, the third motion The vector precision set may also be a second motion vector set, or may be other motion vector sets different from the first or second motion vector set; further, the third motion vector precision may be the multiple motion vector precision The first motion vector accuracy, or the second motion vector accuracy, or other motion vector accuracy, is not limited in this application.
相应地,在一种实现方式下,步骤701中接收的码流进一步携带有用于指示第三运动矢量集合对应的第三运动矢量精度的第一标识,换言之,编解码端之间可以预先约定好传输的第三运动矢量精度对应的是哪一个运动矢量集合(或者哪些位置的运动矢量预测值),从而仅需在码流中传输运动矢量精度的指示;Correspondingly, in an implementation manner, the code stream received in step 701 further carries a first identifier for indicating the accuracy of the third motion vector corresponding to the third motion vector set. In other words, the codec terminals may be pre-agreed in advance. The third motion vector accuracy of the transmission corresponds to which motion vector set (or which position motion vector predictor), so that only the indication of the motion vector accuracy needs to be transmitted in the code stream;
此标识信息(例如第一标识)可用于序列级,图像级,条带级,区域级,CTU级,CU级等不同解码处理单元。相应地,该标识信息可携带在序列参数集、图像参数集、条带头或其它位置中。This identification information (eg, the first identification) can be used for different decoding processing units such as sequence level, image level, strip level, area level, CTU level, CU level, and the like. Accordingly, the identification information can be carried in a sequence parameter set, an image parameter set, a strip header or other location.
如图6D所示,此标识信息(例如第一标识,具体是表-6中的运动矢量精度索引)用于图像层级,相应地,此标识信息携带于图像参数集PPS头信息中,在语法结构“Picture parameter set RBSP syntax”中,pps_amvr_accuracy为0表示当前图像中无论是哪一个图像块的解码过程中,默认的某个运动矢量集合(例如第三运动矢量集合)的运动矢量精度为1/8,pps_amvr_accuracy为1时表示当前图像中无论是哪一个图像块的解码过程中,默认的某个运动矢量集合(例如第三运动矢量集合)的运动矢量精度为1/4,pps_amvr_accuracy为2时表示当前图像中无论是哪一个图像块的解码过程中,默认的某个运动矢量集合(例如第三运动矢量集合)的运动矢量精度为1/2,pps_amvr_accuracy为3时表示当前图像中无论是哪一个图像块的解码过程中,默认的某个运动矢量集合(例如第三运动矢量集合)的运动矢量精度为1。As shown in FIG. 6D, the identification information (for example, the first identifier, specifically the motion vector accuracy index in Table-6) is used for the image hierarchy. Accordingly, the identification information is carried in the image parameter set PPS header information, in the syntax. In the structure "Picture parameter set RBSP syntax", pps_amvr_accuracy is 0, indicating that the motion vector accuracy of a certain motion vector set (for example, the third motion vector set) is 1/1 in the decoding process of which image block in the current image. 8. When pps_amvr_accuracy is 1, it indicates that no matter which image block is decoded in the current image, the default motion vector set (for example, the third motion vector set) has a motion vector precision of 1/4, and pps_amvr_accuracy is 2 when In the decoding process of which image block in the current image, the motion vector accuracy of a certain motion vector set (for example, the third motion vector set) is 1/2, and pps_amvr_accuracy is 3, which indicates which one of the current images is. In the decoding process of the image block, the default motion vector accuracy of a certain motion vector set (for example, the third motion vector set) is 1.
作为一种替代实现方式,步骤701中接收的码流进一步携带有用于指示第三运动矢量精度的第一标识和用于指示第三运动矢量集合的第二标识,换言之,编解码端之间未预先约定好传输的第三运动矢量精度对应的是哪一个运动矢量集合(或者哪些位置的运动矢量预测值),从而还需在码流中传输第三运动矢量精度对应的是哪一个运动矢量集合;As an alternative implementation, the code stream received in step 701 further carries a first identifier for indicating the accuracy of the third motion vector and a second identifier for indicating the third motion vector set. In other words, the codec end is not It is pre-agreed which of the motion vector sets (or which position motion vector predictors) the transmitted third motion vector precision corresponds to, and which third motion vector precision corresponds to which motion vector set is also transmitted in the code stream. ;
此标识信息(例如第一标识和第二标识)可用于序列级,图像级,条带级,区域级,CTU级,CU级等不同解码处理单元。相应地,该标识信息可携带在序列参数集、图像参数集、条带头或其它位置中。The identification information (eg, the first identifier and the second identifier) can be used for different decoding processing units such as sequence level, image level, strip level, area level, CTU level, CU level, and the like. Accordingly, the identification information can be carried in a sequence parameter set, an image parameter set, a strip header or other location.
如图6E所示,此标识信息(例如第一标识(具体是表-6中的运动矢量精度索引)和第二标识(具体是运动矢量集合的索引))用于图像层级,相应地,此标识信息携带于图 像参数集PPS头信息中,在语法结构“Picture parameter set RBSP syntax”中,pps_amvr set_idx表示运动矢量集合的索引,其取值范围为正整数,即表示存在至少一个运动矢量集合;pps_amvr set_accuracy[pps_amvr set_idx]表示运动矢量集合pps_amvr set_idx对应的运动矢量精度的值。其中,pps_amvr set_accuracy[pps_amvr set_idx]为0表示当前图像中无论是哪一个图像块的解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1/8;pps_amvr set_accuracy[pps_amvr set_idx]为1时表示当前图像中的无论是哪一个图像块的解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1/4,pps_amvr set_accuracy[pps_amvr set_idx]为2时表示当前图像中的无论是哪一个图像块的解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1/2,pps_amvr set_accuracy[pps_amvr set_idx]为3时表示当前图像中的无论是哪一个图像块的解码过程中,pps_amvr set_idx所指定的运动矢量集合的运动矢量精度为1。As shown in FIG. 6E, the identification information (for example, the first identifier (specifically, the motion vector precision index in Table-6) and the second identifier (specifically, the index of the motion vector set) are used for the image hierarchy, and accordingly, this The identifier information is carried in the PPS header information of the image parameter set. In the syntax structure "Picture parameter set RBSP syntax", pps_amvr set_idx represents an index of the motion vector set, and the value range is a positive integer, that is, there is at least one motion vector set; Pps_amvr set_accuracy[pps_amvr set_idx] represents the value of the motion vector precision corresponding to the motion vector set pps_amvr set_idx. Where pps_amvr set_accuracy[pps_amvr set_idx] is 0, indicating that the motion vector of the motion vector set specified by pps_amvr set_idx is 1/8 in the decoding process of the image block in the current image; pps_amvr set_accuracy[pps_amvr set_idx] is 1 Indicates that the motion vector of the motion vector set specified by pps_amvr set_idx has a precision of 1/4 in the decoding process of the image block in the current image, and pps_amvr set_accuracy[pps_amvr set_idx] is 2, indicating that the current image is In the decoding process of which image block, the motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1/2, and pps_amvr set_accuracy[pps_amvr set_idx] is 3, indicating which image block is decoded during the current image. The motion vector set of the motion vector set specified by pps_amvr set_idx has a precision of 1.
一种示例下,解析码流后得到pps_amvr set_idx=0;pps_amvr set_accuracy[pps_amvr set_idx]=1/8,如表-9A和表-9B所示,则各运动矢量集合对应的运动矢量精度如下:For example, after parsing the code stream, pps_amvr set_idx=0; pps_amvr set_accuracy[pps_amvr set_idx]=1/8 is obtained. As shown in Table-9A and Table-9B, the motion vector precision corresponding to each motion vector set is as follows:
Figure PCTCN2019074822-appb-000003
Figure PCTCN2019074822-appb-000003
表-9ATable-9A
运动矢量集合Sport vector collection 运动矢量预测值(用位置表示)Motion vector predictor (represented by position) 运动矢量精度Motion vector accuracy
00 MV A1,MV B1 MV A1 , MV B1 1/81/8
11 MV A0,MV B0 MV A0 , MV B0 1/21/2
22 MV B2 MV B2 11
33 MV T MV T 22
表-9BTable-9B
步骤7052、基于所述运动矢量预测值、所述运动矢量差值信息以及目标运动矢量精度,得到当前解码图像块的运动矢量;其中,作为一种示例实现方式,计算所述运动矢量预测值和运动矢量差值MVD信息之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述运动矢量预测值和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度)。作为另一种示例实现方式,基于所述目标运动矢量精度对所述运动矢量差值信息进行缩放(例如放大)处理,以得到经缩放(例如经放大的)的运动矢量差值MVD;计算所述运动矢量预测值和所述经放大的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,所述当前解码图像块的运动矢量、所述运动矢量预测值和运动矢量差值MVD具有同一运动矢量精度(即均具有目标运动矢量精度))。 其中一种计算方式示意为:MV=MVP+(MVD<<mvrIdx),其中MV表示所述当前解码图像块的运动矢量,MVP表示所述当前解码图像块的运动矢量预测值,MVD表示所述码流中的运动矢量差值MVD信息,mvrIdx表示目标运动矢量精度的索引值,<<表示左移,即表示放大处理。应当理解的是,如果mvrIdx=0,经放大处理的MVD(例如左移0位)与放大前的MVD相同;如果mvrIdx不等于0(例如mvrIdx=2),则基于所述目标运动矢量精度的索引对所述计算得到的MVD进行放大处理(例如左移2位),以得到经放大处理的运动矢量差值MVD。Step 7052: Obtain a motion vector of a currently decoded image block based on the motion vector predictor, the motion vector difference information, and a target motion vector precision; wherein, as an example implementation, calculate the motion vector predictor and a sum of motion vector difference MVD information to obtain a motion vector of the current decoded image block, the motion vector of the current decoded image block, the motion vector predictor value, and the motion vector difference value MVD having the same motion vector accuracy (ie, Both have target motion vector accuracy). As another example implementation, the motion vector difference information is scaled (eg, amplified) based on the target motion vector precision to obtain a scaled (eg, amplified) motion vector difference MVD; And a sum of the motion vector predictor and the amplified motion vector difference MVD to obtain a motion vector of the current decoded image block, a motion vector of the currently decoded image block, the motion vector predictor, and a motion vector The difference MVD has the same motion vector accuracy (ie, both have target motion vector accuracy). One of the calculation modes is: MV=MVP+(MVD<<mvrIdx), where MV represents a motion vector of the currently decoded image block, MVP represents a motion vector predictor of the currently decoded image block, and MVD represents the code. The motion vector difference MVD information in the stream, mvrIdx represents the index value of the target motion vector precision, and << represents the left shift, that is, the amplification processing. It should be understood that if mvrIdx=0, the amplified MVD (eg, shifted left by 0 bits) is the same as the MVD before amplification; if mvrIdx is not equal to 0 (eg, mvrIdx=2), based on the accuracy of the target motion vector The index performs an amplification process on the calculated MVD (for example, shifting left by 2 bits) to obtain an enlarged motion vector difference value MVD.
步骤707、基于所述当前解码图像块的具有目标运动矢量精度的运动矢量,得到当前解码图像块的预测块;Step 707: Obtain a prediction block of a currently decoded image block based on a motion vector of the current decoded image block having a target motion vector precision.
例如,步骤707可以由视频解码器30的帧间预测模块82(例如运动补偿模块82)来执行;For example, step 707 can be performed by inter prediction module 82 (e.g., motion compensation module 82) of video decoder 30;
帧间预测模块82执行的运动补偿可涉及基于运动矢量提取或产生预测块,例如,帧间预测模块82可在参考图像列表中的一者中定位运动矢量所指向的预测块。帧间预测模块82还可能涉及执行分数像素精度的内插。一并参阅图4B,整数像素位置100处的像素的值一般对应于参考图像中的像素的实际值。如果目标运动矢量精度为分数像素精度(例如,二分之一像素精度,或者四分之一像素精度,或者八分之一像素精度),则需要通过参考图像的整像素位置的像素值,采用插值滤波器进行插值,得到分数像素位置的像素值,从而得到当前块的预测块的值。Motion compensation performed by inter prediction module 82 may involve extracting or generating a prediction block based on a motion vector, for example, inter prediction module 82 may locate a prediction block to which the motion vector is directed in one of the reference image lists. Inter prediction module 82 may also be involved in performing interpolation of fractional pixel precision. Referring to Figure 4B, the value of the pixel at integer pixel location 100 generally corresponds to the actual value of the pixel in the reference image. If the target motion vector accuracy is fractional pixel precision (for example, one-half pixel precision, or quarter-pixel precision, or one-eighth pixel precision), then the pixel value of the entire pixel position of the reference image needs to be adopted. The interpolation filter performs interpolation to obtain a pixel value of the fractional pixel position, thereby obtaining the value of the prediction block of the current block.
步骤709、基于所述预测块对所述当前解码图像块进行重建,从而完成当前解码图像块的解码过程Step 709: Perform reconstruction on the current decoded image block based on the prediction block, thereby completing a decoding process of the currently decoded image block.
例如,步骤709可以由视频解码器30的重建模块90,例如求和器90来执行。For example, step 709 can be performed by reconstruction module 90 of video decoder 30, such as summer 90.
可见,本申请实施例的视频解码方法中,一方面,在视频解码器获取当前解码图像块的运动矢量预测值之后,通过该运动矢量预测值所属的目标运动矢量集合所对应的目标运动矢量精度的方式,能实现自适应确定用于当前解码图像块的适当的运动矢量精度,如果运动矢量集合的数目为N,则视频解码器可支持M种运动矢量MV精度,其中M小于或等于N,M和N均为正整数,例如M、N大于或等于3,提高了运动矢量预测精度,具体地,由于本发明实施例能自适应地选择运动矢量精度,针对某些视频内容对应的一个或多个图像块,使用具有较高像素精度(例如1/8像素精度)的运动矢量相对于使用较低像素精度的运动矢量,提高了视频编解码质量,而且带来的益处优于内插开销代价,比如基于具有高像素精度(例如1/8像素精度)的运动矢量得到的预测块更接近于当前解码图像块的原始块,即使内插分数像素位置导致了一些内插开销;而针对某些视频内容对应的一个或多个图像块,使用较低像素精度的运动矢量(例如整数像素精度)相对于使用较高像素精度的运动矢量,既没有降低视频编解码质量,还避免了内插开销代价,因此,本申请实施例的视频解码方法整体上提高了编解码性能。It can be seen that, in the video decoding method of the embodiment of the present application, on the one hand, after the video decoder obtains the motion vector predictor of the currently decoded image block, the target motion vector accuracy corresponding to the target motion vector set to which the motion vector predictor belongs is obtained. The method can adaptively determine the appropriate motion vector precision for the currently decoded image block. If the number of motion vector sets is N, the video decoder can support M motion vector MV precision, where M is less than or equal to N, Both M and N are positive integers, for example, M, N is greater than or equal to 3, which improves motion vector prediction accuracy. Specifically, since the embodiment of the present invention can adaptively select motion vector accuracy, one or some corresponding to certain video content Multiple image blocks, using motion vectors with higher pixel precision (such as 1/8 pixel precision) versus motion vectors using lower pixel precision, improve video codec quality, and the benefits are better than interpolation overhead The cost, such as a prediction block based on a motion vector with high pixel precision (eg 1/8 pixel precision), is closer to the current decoding. Like the original block of a block, even if the interpolated fractional pixel position results in some interpolation overhead; for one or more image blocks corresponding to some video content, a motion vector with lower pixel precision (such as integer pixel precision) is used relative to The video decoding method of the embodiment of the present application improves the codec performance as a whole, and the video decoding method of the embodiment of the present application improves the codec performance.
另一方面,视频解码器能自适应选择目标运动矢量精度来解码所述码流中的MVD信息,所述码流中的MVD信息相对于原始MVD占用较少的比特数或者占用一样的比特数,比如,根据目标运动矢量精度将所述MVD信息放大或恢复成原本的MVD,一定程度上节省比特传输开销,从而提高了编解码性能;On the other hand, the video decoder can adaptively select the target motion vector precision to decode the MVD information in the code stream, and the MVD information in the code stream occupies less bits or occupies the same number of bits relative to the original MVD. For example, the MVD information is amplified or restored to the original MVD according to the target motion vector precision, which saves bit transmission overhead to a certain extent, thereby improving the codec performance;
再一方面,在视频编码器或者不发信号通知任何与运动矢量精度相关的信息或者仅发 信号通知重要运动矢量集合的运动矢量精度的情况下,本发明实施例解码方法能自适应确定用于当前解码图像块的运动矢量精度,在提高编码效率的同时能进一步节省比特开销,进而进一步提高编解码性能。In still another aspect, the decoding method of the embodiment of the present invention can be adaptively determined for use in the case where the video encoder does not signal any information related to motion vector accuracy or only signals the motion vector accuracy of the important motion vector set. The motion vector accuracy of the currently decoded image block can further improve the coding efficiency and further save the bit overhead, thereby further improving the encoding and decoding performance.
另外,本申请实施例的视频编码或解码方法可以在需要对视频图像进行编码和/或解码的任何电子设备或者装置内实施。Additionally, the video encoding or decoding method of embodiments of the present application can be implemented in any electronic device or device that requires encoding and/or decoding of a video image.
图11为本申请实施例的视频编码设备或视频解码设备(简称为译码设备1100)的一种实现方式的示意性框图。其中,译码设备1100可以包括处理器1110、存储器1130和总线系统1150。其中,处理器和存储器通过总线系统相连,该存储器用于存储指令,该处理器用于执行该存储器存储的指令。译码设备的存储器存储程序代码,且处理器可以调用存储器中存储的程序代码执行本申请描述的视频编码或解码过程的各种方法实例来自适应地选择用于编码或解码图像块的目标运动矢量精度(例如整像素精度或1/2像素精度或1/4像素精度或1/8像素精度或4像素精度等)。为避免重复,这里不再详细描述。FIG. 11 is a schematic block diagram of an implementation manner of a video encoding device or a video decoding device (referred to as a decoding device 1100) according to an embodiment of the present disclosure. The decoding device 1100 may include a processor 1110, a memory 1130, and a bus system 1150. The processor and the memory are connected by a bus system for storing instructions for executing instructions stored in the memory. The memory of the decoding device stores program code, and the processor can invoke program code stored in the memory to perform various method instances of the video encoding or decoding process described herein to adaptively select a target motion vector for encoding or decoding the image block. Accuracy (such as integer pixel precision or 1/2 pixel precision or 1/4 pixel precision or 1/8 pixel precision or 4 pixel precision, etc.). To avoid repetition, it will not be described in detail here.
在本申请实施例中,该处理器1110可以是中央处理单元(Central Processing Unit,简称为“CPU”),该处理器1110还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In the embodiment of the present application, the processor 1110 may be a central processing unit (CPU), and the processor 1110 may also be other general-purpose processors, digital signal processors (DSPs), and dedicated integration. Circuit (ASIC), off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
该存储器1130可以包括只读存储器(ROM)设备或者随机存取存储器(RAM)设备。任何其他适宜类型的存储设备也可以用作存储器1130。存储器1130可以包括由处理器1110使用总线1150访问的代码和数据1131。存储器1130可以进一步包括操作系统1133和应用程序1135,该应用程序1135包括允许处理器1110执行本申请描述的视频编码或解码方法的至少一个程序。例如,应用程序1135可以包括应用1至N,其进一步包括执行本申请描述的视频编码或解码方法的视频编码或解码应用(简称视频译码应用)。The memory 1130 can include a read only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device can also be used as the memory 1130. Memory 1130 can include code and data 1131 accessed by processor 1110 using bus 1150. Memory 1130 can further include an operating system 1133 and an application 1135 that includes at least one program that allows processor 1110 to perform the video encoding or decoding methods described herein. For example, the application 1135 can include applications 1 through N, which further include a video encoding or decoding application (referred to as a video coding application) that performs the video encoding or decoding methods described herein.
该总线系统1150除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统1150。The bus system 1150 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 1150 in the figure.
可选的,译码设备1100还可以包括一个或多个输出设备,诸如显示器1170。在一个示例中,显示器1170可以是触感显示器或触摸显示屏,其将显示器与可操作地感测触摸输入的触感单元合并。显示器1170可以经由总线1150连接到处理器1110。Alternatively, the decoding device 1100 may also include one or more output devices, such as a display 1170. In one example, display 1170 can be a tactile display or a touch display that combines the display with a tactile unit that operatively senses a touch input. Display 1170 can be coupled to processor 1110 via bus 1150.
图12是本申请实施例的具有视频编解码功能的电子设备1200的示意性框图,该装置或者电子设备可以并入根据本发明的实施例的视频编码器或视频解码器。电子设备1200可以例如是无线通信系统的移动终端或者用户设备。应理解,可以在需要对视频图像进行编码和解码,或者编码,或者解码的任何电子设备或者装置内实施本申请的实施例。12 is a schematic block diagram of an electronic device 1200 having a video codec function, which may incorporate a video encoder or video decoder in accordance with an embodiment of the present invention, in accordance with an embodiment of the present application. The electronic device 1200 can be, for example, a mobile terminal or user equipment of a wireless communication system. It should be understood that embodiments of the present application can be implemented in any electronic device or device that requires encoding and decoding, or encoding, or decoding of a video image.
装置1200可以包括用于并入和保护设备的壳。装置1200还可以包括形式为液晶显示器的显示器1232。在本发明的其它实施例中,显示器可以是适合于显示图像或者视频的任何适当的显示器技术。装置1200还可以包括用户输入/输出接口1234。在本发明的其它实施例中,可以运用任何适当的数据或者用户接口机制。例如,可以实施用户接口为虚拟键盘或者数据录入系统作为触敏显示器(例如触摸屏)的一部分。装置可以包括麦克风1236或者任何适当的音频输入,该音频输入可以是数字或者模拟信号输入。装置1200还 可以包括如下音频输出设备,该音频输出设备在本发明的实施例中可以是以下各项中的任何一项:耳机1238、扬声器或者模拟音频或者数字音频输出连接。装置1200也可以包括电池,在本发明的其它实施例中,设备可以由任何适当的移动能量设备,比如太阳能电池、燃料电池或者时钟机构生成器供电。装置还可以包括用于与其它设备的近程视线通信的红外线端口1242。在其它实施例中,装置1200还可以包括任何适当的近程通信解决方案,比如蓝牙无线连接或者USB有线连接。Device 1200 can include a housing for incorporating and protecting the device. Device 1200 can also include display 1232 in the form of a liquid crystal display. In other embodiments of the invention, the display may be any suitable display technology suitable for displaying images or video. Device 1200 can also include a user input/output interface 1234. In other embodiments of the invention, any suitable data or user interface mechanism may be utilized. For example, the user interface can be implemented as a virtual keyboard or data entry system as part of a touch sensitive display, such as a touch screen. The device may include a microphone 1236 or any suitable audio input, which may be a digital or analog signal input. Apparatus 1200 can also include an audio output device, which in an embodiment of the invention can be any of the following: earphone 1238, speaker or analog audio or digital audio output connection. Device 1200 can also include a battery, and in other embodiments of the invention, the device can be powered by any suitable mobile energy device, such as a solar cell, fuel cell, or clock mechanism generator. The device may also include an infrared port 1242 for short range line of sight communication with other devices. In other embodiments, device 1200 may also include any suitable short range communication solution, such as a Bluetooth wireless connection or a USB wired connection.
装置1200可以包括用于控制装置1200的控制器56或者处理器。控制器56可以连接到存储器1258,该存储器在本发明的实施例中可以存储形式为图像的数据和音频的数据,和/或也可以存储用于在控制器1256上实施的指令。控制器1256还可以连接到适合于实现音频和/或视频数据的编码和解码或者由控制器1256实现的辅助编码和解码的编码解码器电路54。Device 1200 can include a controller 56 or processor for controlling device 1200. Controller 56 may be coupled to memory 1258, which may store data in the form of data and audio in an embodiment of the invention, and/or may also store instructions for execution on controller 1256. Controller 1256 can also be coupled to codec circuitry 54 suitable for implementing encoding and decoding of audio and/or video data or assisted encoding and decoding by controller 1256.
装置1200还可以包括用于提供用户信息并且适合于提供用于在网络认证和授权用户的认证信息的读卡器1248和智能卡1246。Apparatus 1200 can also include card reader 1248 and smart card 1246 for providing user information and for providing authentication information for authenticating and authorizing users on the network.
装置1200还可以包括无线电接口电路1252,该无线电接口电路连接到控制器并且适合于生成例如用于与蜂窝通信网络、无线通信系统或者无线局域网通信的无线通信信号。装置1200还可以包括天线1244,该天线连接到无线电接口电路1252用于向其它(多个)装置发送在无线电接口电路1252生成的射频信号并且用于从其它(多个)装置接收射频信号。Apparatus 1200 can also include a radio interface circuit 1252 that is coupled to the controller and that is adapted to generate wireless communication signals, for example, for communicating with a cellular communication network, a wireless communication system, or a wireless local area network. Apparatus 1200 can also include an antenna 1244 that is coupled to radio interface circuitry 1252 for transmitting radio frequency signals generated at radio interface circuitry 1252 to other apparatus(s) and for receiving radio frequency signals from other apparatus(s).
在本发明的一些实施例中,装置1200包括能够记录或者检测单帧的相机,编码解码器1254或者控制器接收到这些单帧并对它们进行处理。在本发明的一些实施例中,装置可以在传输和/或存储之前从另一设备接收待处理的视频图像数据。在本发明的一些实施例中,装置1200可以通过无线或者有线连接接收图像用于编码/解码。In some embodiments of the invention, apparatus 1200 includes a camera capable of recording or detecting a single frame, and codec 1254 or controller receives the individual frames and processes them. In some embodiments of the invention, the device may receive video image data to be processed from another device prior to transmission and/or storage. In some embodiments of the invention, device 1200 may receive images for encoding/decoding via a wireless or wired connection.
本申请中出现的“第一”、“第二”和“第三”并无限定顺序的意思,仅是为了在某些描述上下文中区分两个主体,以方便理解,但是其所指示的主体并非在所有实施例中都必须是不同的主体。本申请中出现的“A和/或B”包括A、B以及A和B三种情况。The terms "first", "second" and "third" appearing in this application do not have a meaning of order, only to distinguish two subjects in some description contexts for convenience of understanding, but the subject indicated It is not necessary to be a different subject in all embodiments. "A and/or B" appearing in the present application includes three cases of A, B, and A and B.
需要说明的是,对相同步骤或者相同术语的解释和限定同样适用于不同实施例间,为了简洁,本文适当省略重复的描述。It should be noted that the same steps or the same terms are to be construed as being the same as the different embodiments. For the sake of brevity, the repeated description is omitted as appropriate.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are different, and the details that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
本领域技术人员能够领会,结合本文公开描述的各种说明性逻辑框、模块和算法步骤所描述的功能可以硬件、软件、固件或其任何组合来实施。如果以软件来实施,那么各种说明性逻辑框、模块、和步骤描述的功能可作为一或多个指令或代码在计算机可读媒体上存储或传输,且由基于硬件的处理单元执行。计算机可读媒体可包含计算机可读存储媒体,其对应于有形媒体,例如数据存储媒体,或包括任何促进将计算机程序从一处传送到另一处的媒体(例如,根据通信协议)的通信媒体。以此方式,计算机可读媒体大体上可对应于(1)非暂时性的有形计算机可读存储媒体,或(2)通信媒体,例如信号或载波。数据存储媒体可为可由一或多个计算机或一或多个处理器存取以检索用于实施本申请中描述的技术的指令、代码和/或数据结构的任何可用媒体。计算机程序产品可包含计算机可读媒体。Those skilled in the art will appreciate that the functions described in connection with the various illustrative logical blocks, modules, and algorithm steps described herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the various illustrative logical blocks, modules, and functions described in the steps can be stored or transmitted as one or more instructions or code on a computer readable medium and executed by a hardware-based processing unit. The computer readable medium can comprise a computer readable storage medium corresponding to a tangible medium, such as a data storage medium, or any communication medium that facilitates transfer of the computer program from one location to another (eg, according to a communication protocol) . In this manner, a computer readable medium may generally 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或例如红外线、无线电和微波等无线技术包含在媒体的定义中。但是,应理解,所述计算机可读存储媒体和数据存储媒体并不包括连接、载波、信号或其它暂时媒体,而是实际上针对于非暂时性有形存储媒体。如本文中所使用,磁盘和光盘包含压缩光盘(CD)、激光光盘、光学光盘、数字多功能光盘(DVD)和蓝光光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光以光学方式再现数据。以上各项的组合也应包含在计算机可读媒体的范围内。By way of example and not limitation, such computer readable storage medium may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, flash memory or may be used to store instructions or data structures The desired program code in the form of any other medium that can be accessed by a computer. Also, any connection is properly termed a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair cable, digital subscriber line (DSL), or wireless technology such as infrared, radio, and microwave is used to transmit commands from a website, server, or other remote source, then the coaxial cable Wire, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the media. However, it should be understood that the computer readable storage medium and data storage medium do not include connections, carrier waves, signals, or other temporary media, but rather are directed to non-transitory tangible storage media. As used herein, magnetic disks and optical disks include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), and blu-ray disc, where the disc typically reproduces data magnetically, while the disc is optically reproduced using a laser data. Combinations of the above should also be included in the scope of computer readable media.
可通过例如一或多个数字信号处理器(DSP)、通用微处理器、专用集成电路(ASIC)、现场可编程逻辑阵列(FPGA)或其它等效集成或离散逻辑电路等一或多个处理器来执行相应的功能。因此,如本文中所使用的术语“处理器”可指前述结构或适合于实施本文中所描述的技术的任一其它结构中的任一者。另外,在一些方面中,本文中所描述的各种说明性逻辑框、模块、和步骤所描述的功能可以提供于经配置以用于编码和解码的专用硬件和/或软件模块内,或者并入在组合编解码器中。而且,所述技术可完全实施于一或多个电路或逻辑元件中。在一种示例下,视频编码器20及视频解码器30中的各种说明性逻辑框、单元、模块可以理解为对应的电路器件或逻辑元件。One or more processes, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits To perform the corresponding functions. 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 functions described in the various illustrative logical blocks, modules, and steps described herein may be provided within dedicated hardware and/or software modules configured for encoding and decoding, or Into the combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements. In one example, various illustrative logical blocks, units, modules in video encoder 20 and video decoder 30 may be understood as corresponding circuit devices or logic elements.
本申请的技术可在各种各样的装置或设备中实施,包含无线手持机、集成电路(IC)或一组IC(例如,芯片组)。本申请中描述各种组件、模块或单元是为了强调用于执行所揭示的技术的装置的功能方面,但未必需要由不同硬件单元实现。实际上,如上文所描述,各种单元可结合合适的软件和/或固件组合在编码解码器硬件单元中,或者通过互操作硬件单元(包含如上文所描述的一或多个处理器)来提供。The techniques of the present application can be implemented in a wide variety of devices or devices, including a wireless handset, an integrated circuit (IC), or a group of ICs (eg, a chipset). Various components, modules or units are described herein to emphasize functional aspects of the apparatus for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Indeed, as described above, various units may be combined in a codec hardware unit in conjunction with suitable software and/or firmware, or by interoperating hardware units (including one or more processors as described above) provide.
以上所述,仅为本申请示例性的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应该以权利要求的保护范围为准。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 (21)

  1. 一种视频解码方法,其特征在于,包括:A video decoding method, comprising:
    接收码流,所述码流携带有当前解码图像块的运动矢量差值MVD信息;Receiving a code stream carrying motion vector difference MVD information of a currently decoded image block;
    从所述码流中解析出所述运动矢量差值信息;Parsing the motion vector difference information from the code stream;
    获取所述当前解码图像块的运动矢量预测值MVP;Obtaining a motion vector predictor MVP of the current decoded image block;
    当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;When the motion vector predictor is included in the target motion vector set corresponding to the target motion vector accuracy, the current is obtained based on the motion vector predictor, the motion vector difference information, and the target motion vector accuracy Decoding a motion vector of the image block, wherein the motion vector of the current decoded image block has the target motion vector precision, the target motion vector set being one of a plurality of motion vector sets, the target motion vector accuracy being included One of a plurality of motion vector precisions of a first motion vector accuracy and a second motion vector accuracy, the plurality of motion vector sets including a first motion vector set and a second motion vector set, the first motion vector set and At least one of the second motion vector sets includes two or more motion vector predictors, and the first motion vector set corresponding to the first motion vector set is different from the second motion vector set Second motion vector accuracy;
    基于所述当前解码图像块的运动矢量,得到当前解码图像块的预测块;Obtaining a prediction block of the currently decoded image block based on the motion vector of the currently decoded image block;
    基于所述预测块对所述当前解码图像块进行重建。The current decoded image block is reconstructed based on the prediction block.
  2. 如权利要求1所述的方法,其特征在于,所述当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值信息以及目标运动矢量精度,得到所述当前解码图像块的运动矢量,包括:The method according to claim 1, wherein said motion vector predictor and said motion vector are based on said motion vector predictor when said motion vector predictor is included in a target motion vector set corresponding to target motion vector accuracy The difference information and the target motion vector precision are obtained, and the motion vector of the current decoded image block is obtained, including:
    确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的运动矢量精度;Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions The value has the motion vector accuracy;
    计算所述运动矢量预测值和所述运动矢量差值信息之和,以得到所述当前解码图像块的运动矢量,其中所述当前解码图像块的运动矢量、所述运动矢量预测值MVP和所述运动矢量差值MVD具有所述目标运动矢量精度;或者,Calculating a sum of the motion vector predictor and the motion vector difference information to obtain a motion vector of the current decoded image block, where the motion vector of the currently decoded image block, the motion vector predictor MVP, and the The motion vector difference MVD has the target motion vector accuracy; or
    基于所述目标运动矢量精度对所述运动矢量差值信息进行放大处理,以得到经放大的运动矢量差值MVD;计算所述运动矢量预测值和所述经放大的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,其中所述当前解码图像块的运动矢量、所述运动矢量预测值和经放大的运动矢量差值MVD具有所述目标运动矢量精度。And enlarging the motion vector difference information based on the target motion vector precision to obtain an amplified motion vector difference MVD; calculating a sum of the motion vector predictor and the amplified motion vector difference MVD And obtaining a motion vector of the current decoded image block, wherein the motion vector of the current decoded image block, the motion vector predictor, and the amplified motion vector difference MVD have the target motion vector precision.
  3. 如权利要求1或2所述的方法,其特征在于,A method according to claim 1 or 2, wherein
    所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和/或时域邻近块中。The first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second neighboring block corresponding to the motion vector predictor in the second motion vector set The second neighboring block and the second neighboring block are included in a spatial neighboring block and/or a time domain neighboring block of the current image block, with a second distance from the current image block.
  4. 如权利要求1至3任一项所述的方法,其特征在于,A method according to any one of claims 1 to 3, characterized in that
    如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离小于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is smaller than the second neighbor corresponding to the motion vector predictor in the second motion vector set a second motion distance of the first motion vector set is higher than a second motion vector accuracy corresponding to the second motion vector set; or
    如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set And the second motion distance of the first motion vector set is lower than the second motion vector precision corresponding to the second motion vector set.
  5. 如权利要求2所述的方法,其特征在于,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是预先设置的。The method according to claim 2, wherein the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  6. 如权利要求2或5所述的方法,其特征在于,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的,其中,所述运动矢量精度赋值规则用于表征:所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离越远,运动矢量精度越低;所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离越近,运动矢量精度越高。The method according to claim 2 or 5, wherein the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector precision assignment rule, wherein the motion vectors The precision assignment rule is used to: the farther the distance between the neighboring block corresponding to the motion vector predictor included in the motion vector set and the current decoded image block is, the lower the motion vector accuracy is; the motion vector set is included in the motion vector set. The closer the distance between the neighboring block corresponding to the motion vector predictor and the currently decoded image block, the higher the motion vector accuracy.
  7. 如权利要求1至6任一项所述的方法,其特征在于,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述当前解码图像块的序列参数集SPS、图像参数集PPS或者条带头中的任一种。The method according to any one of claims 1 to 6, wherein the code stream further carries a motion vector precision parameter, and the motion vector precision parameter is used to indicate a value of the plurality of motion vector precisions. The motion vector accuracy parameter is carried in any one of a sequence parameter set SPS, an image parameter set PPS, or a slice header of the currently decoded image block.
  8. 如权利要求1至6任一项所述的方法,其特征在于,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示用于当前解码处理单元的运动矢量精度个数和与所述运动矢量精度个数对应的至少两种运动矢量精度值,其中所述当前解码处理单元包括视频序列、图像、条带slice、区域partition、解码树单元CTU和解码单元CU中的一种或多种。The method according to any one of claims 1 to 6, wherein the code stream further carries a motion vector precision parameter, and the motion vector precision parameter is used to indicate a motion vector accuracy for the current decoding processing unit. And a number of at least two motion vector precision values corresponding to the number of motion vector precisions, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, a decoding tree unit CTU, and a decoding unit CU One or more.
  9. 如权利要求1至8任一项所述的方法,其特征在于,A method according to any one of claims 1 to 8, wherein
    所述码流进一步携带有第一标识,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;或者,The code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; or
    所述码流进一步携带有第一标识和第二标识,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;The code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
    其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合,所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度。The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set, and the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
  10. 如权利要求1至9任一项所述的方法,其特征在于,所述码流还携带有第三标识, 所述第三标识用于指示当前解码图像块的候选运动矢量预测值MVP;所述获取所述当前解码图像块的运动矢量预测值MVP,包括:基于所述第三标识从候选运动矢量预测值列表中确定所述当前解码图像块的候选运动矢量预测值MVP;The method according to any one of claims 1 to 9, wherein the code stream further carries a third identifier, where the third identifier is used to indicate a candidate motion vector predictor value MVP of the currently decoded image block; Obtaining the motion vector predictor MVP of the current decoded image block, including: determining a candidate motion vector predictor MVP of the current decoded image block from the candidate motion vector predictor list based on the third identifier;
    或者,or,
    所述获取所述当前解码图像块的运动矢量预测值MVP,包括:采用双向匹配方法或者模板匹配方法,获取所述当前解码图像块的运动矢量预测值MVP。The acquiring the motion vector predictor MVP of the current decoded image block includes: acquiring a motion vector predictor MVP of the current decoded image block by using a bidirectional matching method or a template matching method.
  11. 一种视频解码器,其特征在于,包括:A video decoder, comprising:
    熵解码模块,用于接收码流,所述码流携带有当前解码图像块的运动矢量差值MVD信息,并从所述码流中解析出所述当前解码图像块的运动矢量差值信息;An entropy decoding module, configured to receive a code stream, where the code stream carries motion vector difference MVD information of a currently decoded image block, and parses motion vector difference information of the current decoded image block from the code stream;
    帧间预测模块,用于获取所述当前解码图像块的运动矢量预测值MVP;当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述运动矢量差值信息以及所述目标运动矢量精度,得到所述当前解码图像块的运动矢量,其中,所述当前解码图像块的运动矢量具有所述目标运动矢量精度,所述目标运动矢量集合为多个运动矢量集合中的一个,所述目标运动矢量精度为包括第一运动矢量精度和第二运动矢量精度的多种运动矢量精度中的一种,所述多个运动矢量集合包括第一运动矢量集合和第二运动矢量集合,所述第一运动矢量集合和第二运动矢量集合中的至少一个运动矢量集合包括两个或以上的运动矢量预测值,且所述第一运动矢量集合所对应的第一运动矢量精度不同于所述第二运动矢量集合所对应的第二运动矢量精度;以及,基于所述当前解码图像块的运动矢量得到所述当前解码图像块的预测块;An inter prediction module, configured to acquire a motion vector predictor MVP of the current decoded image block; and when the motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy, based on the motion vector prediction a value, the motion vector difference information, and the target motion vector accuracy, to obtain a motion vector of the current decoded image block, wherein the motion vector of the current decoded image block has the target motion vector accuracy, the target The motion vector set is one of a plurality of motion vector sets, the target motion vector precision being one of a plurality of motion vector precisions including a first motion vector precision and a second motion vector precision, the plurality of motion vector sets The first motion vector set and the second motion vector set are included, and at least one of the first motion vector set and the second motion vector set includes two or more motion vector predictors, and the first motion The first motion vector accuracy corresponding to the vector set is different from the second motion vector set corresponding to Two motion vector accuracy; and a prediction block based on the motion vector decoding a current image block to obtain the decoded image of the current block;
    重建模块,用于基于所述当前解码图像块的预测块对所述当前解码图像块进行重建。And a reconstruction module, configured to reconstruct the current decoded image block based on the prediction block of the current decoded image block.
  12. 如权利要求11所述的视频解码器,其特征在于,在所述当所述运动矢量预测值被包括于与目标运动矢量精度对应的目标运动矢量集合时,基于所述运动矢量预测值、所述MVD信息以及目标运动矢量精度,得到所述当前解码图像块的运动矢量的方面,所述帧间预测模块具体用于:The video decoder according to claim 11, wherein when said motion vector predictor is included in a target motion vector set corresponding to a target motion vector accuracy, based on said motion vector predictor value Having the MVD information and the target motion vector precision, the aspect of the motion vector of the current decoded image block is obtained, and the inter prediction module is specifically configured to:
    确定所述运动矢量预测值被包括于所述目标运动矢量集合,根据多个运动矢量集合与多种运动矢量精度的对应关系确定所述目标矢量集合对应的目标运动矢量精度为所述运动矢量预测值具有的运动矢量精度;计算所述运动矢量预测值和所述运动矢量差值信息之和,以得到所述当前解码图像块的运动矢量,其中所述当前解码图像块的运动矢量、所述运动矢量预测值MVP和所述运动矢量差值MVD具有所述目标运动矢量精度;或者,Determining that the motion vector predictor is included in the target motion vector set, and determining a target motion vector accuracy corresponding to the target vector set as the motion vector prediction according to a correspondence between a plurality of motion vector sets and a plurality of motion vector precisions a value of motion vector accuracy; calculating a sum of the motion vector predictor and the motion vector difference information to obtain a motion vector of the current decoded image block, wherein the motion vector of the currently decoded image block, the The motion vector predictor value MVP and the motion vector difference value MVD have the target motion vector accuracy; or
    基于所述目标运动矢量精度对所述运动矢量差值信息进行放大处理,以得到经放大的运动矢量差值MVD;计算所述运动矢量预测值和所述经放大的运动矢量差值MVD之和,以得到所述当前解码图像块的运动矢量,其中所述当前解码图像块的运动矢量、所述运动矢量预测值和经放大的运动矢量差值MVD具有所述目标运动矢量精度。And enlarging the motion vector difference information based on the target motion vector precision to obtain an amplified motion vector difference MVD; calculating a sum of the motion vector predictor and the amplified motion vector difference MVD And obtaining a motion vector of the current decoded image block, wherein the motion vector of the current decoded image block, the motion vector predictor, and the amplified motion vector difference MVD have the target motion vector precision.
  13. 如权利要求11或12所述的视频解码器,其特征在于,A video decoder as claimed in claim 11 or 12, wherein
    所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前图像块的第一距离不同于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前图像块的第二距离,所述第一邻近块和第二邻近块被包括于所述当前图像块的空域邻近块和 /或时域邻近块中。The first distance between the first neighboring block and the current image block corresponding to the motion vector predictor in the first motion vector set is different from the second neighboring block corresponding to the motion vector predictor in the second motion vector set The second neighboring block and the second neighboring block are included in a spatial neighboring block and/or a time domain neighboring block of the current image block, with a second distance from the current image block.
  14. 如权利要求11至13任一项所述的视频解码器,其特征在于,A video decoder according to any of claims 11 to 13, wherein
    如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离小于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度高于所述第二运动矢量集合对应的第二运动矢量精度;或者,If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is smaller than the second neighbor corresponding to the motion vector predictor in the second motion vector set a second motion distance of the first motion vector set is higher than a second motion vector accuracy corresponding to the second motion vector set; or
    如果所述第一运动矢量集合中的运动矢量预测值所对应的第一邻近块与当前解码图像块的第一距离大于所述第二运动矢量集合中的运动矢量预测值所对应的第二邻近块与当前解码图像块的第二距离,则所述第一运动矢量集合对应的第一运动矢量精度低于所述第二运动矢量集合对应的第二运动矢量精度。If the first distance between the first neighboring block corresponding to the motion vector predictor in the first motion vector set and the current decoded image block is greater than the second distance corresponding to the motion vector predictor in the second motion vector set And the second motion distance of the first motion vector set is lower than the second motion vector precision corresponding to the second motion vector set.
  15. 如权利要求12所述的视频解码器,其特征在于,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是预先设置的。The video decoder according to claim 12, wherein the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is preset.
  16. 如权利要求12或15所述的视频解码器,其特征在于,所述多个运动矢量集合与所述多种运动矢量精度的对应关系是根据运动矢量精度赋值规则而确定的,其中,所述运动矢量精度赋值规则用于表征:所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离越远,运动矢量精度越低;所述运动矢量集合中包括的运动矢量预测值所对应的邻近块与当前解码图像块之间的距离越近,运动矢量精度越高。The video decoder according to claim 12 or 15, wherein the correspondence between the plurality of motion vector sets and the plurality of motion vector precisions is determined according to a motion vector accuracy assignment rule, wherein The motion vector precision assignment rule is used to: the farther the distance between the neighboring block corresponding to the motion vector predictor corresponding to the motion vector predictor and the current decoded image block is, the lower the motion vector accuracy is; The closer the distance between the neighboring block corresponding to the included motion vector predictor and the currently decoded image block, the higher the motion vector accuracy.
  17. 如权利要求11至16任一项所述的视频解码器,其特征在于,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示所述多种运动矢量精度的值,所述运动矢量精度参数携带在所述解码图像块的序列参数集、图像参数集PPS或者条带头中的任一种中;The video decoder according to any one of claims 11 to 16, wherein the code stream further carries a motion vector precision parameter, and the motion vector precision parameter is used to indicate a value of the plurality of motion vector precisions. The motion vector accuracy parameter is carried in any one of a sequence parameter set, an image parameter set PPS, or a slice header of the decoded image block;
    相应地,所述熵解码模块还用于从所述码流中解析出所述运动矢量精度参数。Correspondingly, the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
  18. 如权利要求11至16任一项所述的视频解码器,其特征在于,所述码流进一步携带有运动矢量精度参数,所述运动矢量精度参数用于指示用于当前解码处理单元的运动矢量精度个数和与所述运动矢量精度个数对应的至少两种运动矢量精度值,其中所述当前解码处理单元包括视频序列、图像、条带slice、区域partition、解码树单元CTU和解码单元CU中的一种或多种;The video decoder according to any one of claims 11 to 16, wherein the code stream further carries a motion vector precision parameter, the motion vector precision parameter being used to indicate a motion vector for the current decoding processing unit a number of precisions and at least two motion vector precision values corresponding to the number of motion vector precisions, wherein the current decoding processing unit includes a video sequence, an image, a slice slice, a region partition, a decoding tree unit CTU, and a decoding unit CU One or more of
    相应地,所述熵解码模块还用于从所述码流中解析出所述运动矢量精度参数。Correspondingly, the entropy decoding module is further configured to parse the motion vector precision parameter from the code stream.
  19. 如权利要求11至18任一项所述的视频解码器,其特征在于,A video decoder according to any of claims 11 to 18, characterized in that
    所述码流进一步携带有第一标识,所述第一标识用于指示第三运动矢量集合对应的第三运动矢量精度;或者,The code stream further carries a first identifier, where the first identifier is used to indicate a third motion vector precision corresponding to the third motion vector set; or
    所述码流进一步携带有第一标识和第二标识,所述第一标识用于指示第三运动矢量精度,所述第二标识用于指示第三运动矢量集合;The code stream further carries a first identifier and a second identifier, where the first identifier is used to indicate a third motion vector precision, and the second identifier is used to indicate a third motion vector set;
    相应地,所述熵解码模块还用于从所述码流中解析出所述第一标识,或者解码出所述 第一标识和第二标识;Correspondingly, the entropy decoding module is further configured to parse the first identifier from the code stream, or decode the first identifier and the second identifier;
    其中,所述第三运动矢量集合为所述多个运动矢量集合中的第一运动矢量集合,或者第二运动矢量集合,或者其它运动矢量集合;所述第三运动矢量精度为所述多种运动矢量精度中的第一运动矢量精度,或者第二运动矢量精度,或者其它运动矢量精度。The third motion vector set is a first motion vector set of the plurality of motion vector sets, or a second motion vector set, or other motion vector set; the third motion vector precision is the multiple First motion vector accuracy in motion vector accuracy, or second motion vector accuracy, or other motion vector accuracy.
  20. 如权利要求11至19任一项所述的视频解码器,其特征在于,所述码流还携带有第三标识,所述第三标识用于指示当前解码图像块的候选运动矢量预测值MVP;The video decoder according to any one of claims 11 to 19, wherein the code stream further carries a third identifier, where the third identifier is used to indicate a candidate motion vector predictor value MVP of the currently decoded image block. ;
    所述熵解码模块还用于从所述码流中解析出所述第三标识;The entropy decoding module is further configured to parse the third identifier from the code stream;
    在获取所述当前解码图像块的运动矢量预测值MVP的方面,所述帧间预测模块具体用于:基于所述第三标识从候选运动矢量预测列表中确定所述当前解码图像块的候选运动矢量预测值MVP;In the aspect of acquiring the motion vector predictor MVP of the current decoded image block, the inter prediction module is specifically configured to: determine a candidate motion of the currently decoded image block from the candidate motion vector prediction list based on the third identifier Vector predictive value MVP;
    或者,or,
    在获取所述当前解码图像块的运动矢量预测值MVP的方面,所述帧间预测模块具体用于:采用双向匹配方法或者模板匹配方法,获取所述当前解码图像块的运动矢量预测值MVP。In the aspect of acquiring the motion vector predictor MVP of the current decoded image block, the inter prediction module is specifically configured to: acquire the motion vector predictor MVP of the current decoded image block by using a bidirectional matching method or a template matching method.
  21. 一种电子设备,包括如权利要求11至20任一项所述的视频解码器。An electronic device comprising the video decoder of any one of claims 11 to 20.
PCT/CN2019/074822 2018-02-12 2019-02-12 Video decoding method, video decoder, and electronic device WO2019154424A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810147223.9A CN110166778A (en) 2018-02-12 2018-02-12 Video encoding/decoding method, Video Decoder and electronic equipment
CN201810147223.9 2018-02-12

Publications (1)

Publication Number Publication Date
WO2019154424A1 true WO2019154424A1 (en) 2019-08-15

Family

ID=67548796

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/074822 WO2019154424A1 (en) 2018-02-12 2019-02-12 Video decoding method, video decoder, and electronic device

Country Status (2)

Country Link
CN (1) CN110166778A (en)
WO (1) WO2019154424A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572674A (en) * 2019-09-27 2019-12-13 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, storage medium and electronic device
CN110572672A (en) * 2019-09-27 2019-12-13 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, storage medium and electronic device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636290B (en) * 2019-08-30 2021-12-03 北京大学 Video image motion vector encoding/decoding method and encoder/decoder
CN111050182B (en) * 2019-12-27 2022-02-18 浙江大华技术股份有限公司 Motion vector prediction method, video coding method, related equipment and device
CN111818342B (en) * 2020-08-28 2020-12-11 浙江大华技术股份有限公司 Inter-frame prediction method and prediction device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102668562A (en) * 2009-10-20 2012-09-12 汤姆森特许公司 Motion vector prediction and refinement
US20130272409A1 (en) * 2012-04-12 2013-10-17 Qualcomm Incorporated Bandwidth reduction in video coding through applying the same reference index
CN105900420A (en) * 2014-01-08 2016-08-24 微软技术许可有限责任公司 Selection of motion vector precision
CN106165419A (en) * 2014-01-09 2016-11-23 高通股份有限公司 Adaptive motion vector resolution signaling for video coding

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7321625B2 (en) * 2002-12-13 2008-01-22 Ntt Docomo, Inc. Wavelet based multiresolution video representation with spatially scalable motion vectors
US7142601B2 (en) * 2003-04-14 2006-11-28 Mitsubishi Electric Research Laboratories, Inc. Transcoding compressed videos to reducing resolution videos
CN106331722B (en) * 2015-07-03 2019-04-26 华为技术有限公司 Image prediction method and relevant device
CN106331703B (en) * 2015-07-03 2020-09-08 华为技术有限公司 Video encoding and decoding method, video encoding and decoding device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102668562A (en) * 2009-10-20 2012-09-12 汤姆森特许公司 Motion vector prediction and refinement
US20130272409A1 (en) * 2012-04-12 2013-10-17 Qualcomm Incorporated Bandwidth reduction in video coding through applying the same reference index
CN105900420A (en) * 2014-01-08 2016-08-24 微软技术许可有限责任公司 Selection of motion vector precision
CN106165419A (en) * 2014-01-09 2016-11-23 高通股份有限公司 Adaptive motion vector resolution signaling for video coding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572674A (en) * 2019-09-27 2019-12-13 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, storage medium and electronic device
CN110572672A (en) * 2019-09-27 2019-12-13 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, storage medium and electronic device
CN110572672B (en) * 2019-09-27 2024-03-15 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, storage medium and electronic device
CN110572674B (en) * 2019-09-27 2024-03-15 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, storage medium and electronic device

Also Published As

Publication number Publication date
CN110166778A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
US10652571B2 (en) Advanced motion vector prediction speedups for video coding
CN109792531B (en) Method, device and storage medium for encoding and decoding video data
KR102621943B1 (en) Adaptive motion vector precision for video coding
CN111543059B (en) Image prediction method, device and coder-decoder
TWI714565B (en) Motion vector derivation in video coding
WO2019120305A1 (en) Method for predicting motion information of image block , device and codec
CN107710764B (en) System and method for determining illumination compensation states for video coding
CN106165419B (en) Adaptive motion vector resolution signaling for video coding
CN110089116B (en) Encoding optimization by illumination compensation and integer motion vector restriction
JP5869122B2 (en) Predictive data buffering in video coding
JP5778299B2 (en) Motion vector prediction
TW201842766A (en) Deriving motion vector information at a video decoder
JP2018530246A (en) Improved video intra prediction using position-dependent prediction combinations for video coding
WO2019154424A1 (en) Video decoding method, video decoder, and electronic device
JP2015529065A (en) Multiple hypothesis motion compensation for scalable video coding and 3D video coding
WO2019114721A1 (en) Interframe prediction method and device for video data
WO2019218286A1 (en) Video encoding and decoding method and apparatus
CN112740663B (en) Image prediction method, device and corresponding encoder and decoder
WO2020007261A9 (en) V refinement of video motion vectors in adjacent video data
WO2020047807A1 (en) Inter prediction method and apparatus, and codec
US11394996B2 (en) Video coding method and apparatus
US11197018B2 (en) Inter-frame prediction method and apparatus
CN113170141B (en) Inter-frame prediction method and related device
WO2020043111A1 (en) Historic candidate list-based image coding and decoding methods, and codec
WO2019084776A1 (en) Method and device for obtaining candidate motion information of image block, and codec

Legal Events

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

Ref document number: 19752012

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

Country of ref document: EP

Kind code of ref document: A1