CN112073734B - Encoding and decoding method, device and equipment - Google Patents

Encoding and decoding method, device and equipment Download PDF

Info

Publication number
CN112073734B
CN112073734B CN201910498015.8A CN201910498015A CN112073734B CN 112073734 B CN112073734 B CN 112073734B CN 201910498015 A CN201910498015 A CN 201910498015A CN 112073734 B CN112073734 B CN 112073734B
Authority
CN
China
Prior art keywords
motion information
candidate motion
hmvp
candidate
current block
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910498015.8A
Other languages
Chinese (zh)
Other versions
CN112073734A (en
Inventor
方树清
陈方栋
王莉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201910498015.8A priority Critical patent/CN112073734B/en
Publication of CN112073734A publication Critical patent/CN112073734A/en
Application granted granted Critical
Publication of CN112073734B publication Critical patent/CN112073734B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • 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/567Motion estimation based on rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures

Abstract

The application provides a coding and decoding method, a device and equipment thereof, wherein the method comprises the following steps: acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information; for each candidate motion information of the HMVP to be checked, carrying out duplicate checking processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information; according to the duplicate checking result of the HMVP candidate motion information to be checked, adding the HMVP candidate motion information to be checked and the unrepeated candidate motion information in the appointed candidate motion information into a motion information prediction mode candidate list, and adding the HMVP candidate motion information which is not subjected to duplicate checking in the HMVP candidate motion information into the motion information prediction mode candidate list; the current block is encoded or decoded according to the motion information prediction mode candidate list. According to the technical scheme, the complexity of hardware implementation is reduced, and the coding performance is improved.

Description

Encoding and decoding method, device and equipment
Technical Field
The present application relates to the field of encoding and decoding technologies, and in particular, to an encoding and decoding method, apparatus, and device.
Background
In order to achieve the purpose of saving space, video images are transmitted after being coded, and the complete video coding method can comprise the processes of prediction, transformation, quantization, entropy coding, filtering and the like. The predictive coding comprises intra-frame coding and inter-frame coding, wherein the inter-frame coding uses the correlation of a video time domain to predict the pixels of the current block by using the pixels adjacent to the coded image, thereby achieving the aim of effectively removing the video time domain redundancy.
In inter-frame coding, a Motion Vector (MV) may be used to represent a relative displacement between a current block of a current frame and a reference block of a reference frame. For example, when an image block A1 (current block) of the image a is transmitted, a motion search is performed in the image B to find an image block B1 (reference block) that most matches the image block A1, and a relative displacement between the image block A1 and the image block B1, that is, a motion vector of the image block A1, is determined.
In the prior art, in order to implement inter-frame coding, a motion information prediction mode candidate list needs to be created for a current block, and when the motion information prediction mode candidate list is created for the current block, for some modes, such as a skip mode, a direct mode, and the like, all the supported candidate motion information needs to be checked one by one, so that the problems of too many times of checking, high hardware implementation complexity, poor coding performance, and the like exist.
Disclosure of Invention
The application provides a coding and decoding method, device and equipment thereof, which can improve coding performance.
The application provides a coding and decoding method, which comprises the following steps:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information;
for each candidate motion information of the HMVP to be checked, carrying out checking processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block;
according to the duplicate checking result of the HMVP candidate motion information to be checked, adding unrepeated candidate motion information in the HMVP candidate motion information to be checked and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding unrepeated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
encoding or decoding the current block according to the motion information prediction mode candidate list.
The application provides a coding and decoding device, the device includes:
an obtaining module, configured to obtain multiple HMVP candidate motion information corresponding to a current block;
a selecting module, configured to select at least one HMVP candidate motion information from the HMVP candidate motion information as a candidate HMVP motion information to be checked;
the duplication checking module is used for checking the duplication of the HMVP candidate motion information to be checked and the specified candidate motion information corresponding to the current block aiming at each HMVP candidate motion information to be checked;
an adding module, configured to add, according to a duplicate checking result of the HMVP candidate motion information to be checked, unrepeated candidate motion information in the HMVP candidate motion information to be checked and the specified candidate motion information to a motion information prediction mode candidate list of the current block, and add, to the motion information prediction mode candidate list of the current block, HMVP candidate motion information that is not subjected to duplicate checking in the HMVP candidate motion information;
and the coding and decoding module is used for coding or decoding the current block according to the motion information prediction mode candidate list.
The application provides a decoding side device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine executable instructions to perform the steps of:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information;
for each candidate motion information of the HMVP to be checked, carrying out duplicate checking processing on the candidate motion information of the HMVP to be checked and the appointed candidate motion information corresponding to the current block;
according to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated candidate motion information in the HMVP candidate motion information to be duplicated and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding non-duplicated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
decoding the current block according to the motion information prediction mode candidate list.
The application provides a coding end device, including: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine executable instructions to perform the steps of:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information;
for each candidate motion information of the HMVP to be checked, carrying out duplicate checking processing on the candidate motion information of the HMVP to be checked and the appointed candidate motion information corresponding to the current block;
according to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated candidate motion information in the HMVP candidate motion information to be duplicated and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding non-duplicated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
encoding the current block according to the motion information prediction mode candidate list.
As can be seen from the above technical solutions, in the embodiment of the present application, at least one HMVP candidate motion information may be selected from all HMVP candidate motion information as the HMVP candidate motion information to be checked and repeated, and the HMVP candidate motion information to be checked and repeated is checked. Assuming that 8 HMVP candidate motion information exist in total, 3 HMVP candidate motion information are selected from the 8 HMVP candidate motion information as the to-be-checked HMVP candidate motion information, and it is only necessary to check the 3 HMVP candidate motion information, so that the number of times of checking the HMVP candidate motion information can be reduced, the hardware implementation complexity can be reduced, and the encoding performance can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required to be used in the embodiments of the present application or the technical solutions in the prior art are briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of a video coding framework in one embodiment of the present application;
FIG. 2 is a flow chart of a coding and decoding method according to an embodiment of the present application;
FIG. 3 is a flow chart of a method of encoding and decoding in one embodiment of the present application;
FIG. 4 is a diagram of spatial neighboring blocks corresponding to a current block according to an embodiment of the present application;
FIG. 5 is a flow chart of a method of encoding and decoding in one embodiment of the present application;
fig. 6 is a block diagram of a codec device according to an embodiment of the present application;
fig. 7 is a hardware configuration diagram of a decoding-side device according to an embodiment of the present application;
fig. 8 is a hardware configuration diagram of an encoding-side device according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the embodiments of the present application. The word "if" used may be interpreted as "at \8230; \8230when" or "when 8230; \8230, when" or "in response to a determination", depending on the context.
The embodiment of the application provides a coding and decoding method, which can relate to the following concepts:
motion Vector (MV): in inter-frame coding, a motion vector is used to represent a relative displacement between a current image block of a current frame video image and a reference image block of a reference frame video image, for example, there is a strong temporal correlation between a video image a of the current frame and a video image B of the reference frame, when an image block A1 (current image block) of the video image a is transmitted, a motion search may be performed in the video image B to find an image block B1 (reference image block) that best matches the image block A1, and a relative displacement between the image block A1 and the image block B1, that is, a motion vector of the image block A1, is determined. Each divided image block has a corresponding motion vector transmitted to a decoding side, and if the motion vector of each image block is independently encoded and transmitted, especially divided into a large number of image blocks of small size, a considerable number of bits are consumed. In order to reduce the bit number used for encoding the motion vector, the spatial correlation between adjacent image blocks can be utilized, the motion vector of the current image block to be encoded is predicted according to the motion vector of the adjacent encoded image block, and then the prediction difference is encoded, so that the bit number representing the motion vector can be effectively reduced.
For example, in the process of encoding a Motion Vector of a current image block, a Motion Vector of a current macroblock may be predicted by using Motion vectors of neighboring encoded image blocks, and then a Difference value (MVD) between a predicted value (MVP) of the Motion Vector and a true estimate of the Motion Vector may be encoded, so as to effectively reduce the number of encoding bits of the Motion Vector.
Motion Information (Motion Information): since the motion vector indicates the position offset of the current image block from a certain reference image block, in order to accurately acquire information pointing to the image block, index information of the reference frame image is required in addition to the motion vector to indicate which reference frame image is used. In the video coding technology, for a current frame image, a reference frame image list may be generally established, and the reference frame image index information indicates that the current image block adopts the several reference frame images in the reference frame image list. Many coding techniques also support multiple reference picture lists, and therefore, an index value, which may be referred to as a reference direction, may also be used to indicate which reference picture list is used. In the video encoding technology, motion-related information such as a motion vector, a reference frame index, and a reference direction may be collectively referred to as motion information.
Rate-Distortion principle (Rate-Distortion Optimized): there are two major indicators for evaluating coding efficiency: code rate and Peak Signal to Noise Ratio (PSNR), the smaller the bit stream, the larger the compression rate, and the larger the PSNR, the better the reconstructed image quality, and in the mode selection, the discrimination formula is essentially the comprehensive evaluation of the two. For example, the cost for a mode: j (mode) = D + λ R, illustratively, D denotes Distortion, which can generally be measured using SSE index, SSE refers to the mean square sum of the differences of the reconstructed image block and the source image; λ is lagrange multiplier, and R is the actual number of bits required for encoding an image block in this mode, including the sum of bits required for encoding mode information, motion information, residual, and the like.
Intra and inter prediction (intra and inter) techniques: the intra prediction refers to prediction encoding using reconstructed pixel values of spatial neighboring image blocks of a current image block (i.e., the same frame image as the current image block). Inter-frame prediction refers to performing predictive coding by using reconstructed pixel values of time-domain adjacent image blocks (located in different frame images from the current image block) of the current image block, wherein inter-frame prediction refers to using correlation of a video time domain, and because a video sequence contains strong time domain correlation, pixels of an adjacent coded image are used for predicting pixels of the current image, so that the purpose of effectively removing video time domain redundancy is achieved.
Skip mode: the Skip mode is a Skip mode in inter-frame prediction, and a coding end does not need to transmit residual information or motion vector difference value MVD, and only needs to transmit an index of motion information. The decoding end can deduce the motion information of the current block by analyzing the index of the motion information, and after obtaining the motion information, the decoding end can determine a predicted value by using the motion information and directly use the predicted value as a reconstruction value.
Direct (Direct) mode: the Direct mode is a Direct mode in inter-frame prediction, and a coding end needs to transmit residual information, but does not need to transmit a Motion Vector Difference (MVD) and only needs to transmit an index of motion information. The decoding end can deduce the motion information of the current block by analyzing the index of the motion information, after obtaining the motion information, the motion information is used for determining a predicted value, and the predicted value and the residual value are added to obtain a reconstructed value.
A video coding framework: referring to fig. 1, a schematic diagram of a video encoding framework is shown, where the video encoding framework can be used to implement a processing flow at an encoding end in the embodiment of the present application, the schematic diagram of the video decoding framework is similar to that in fig. 1, and is not described herein again, and the video decoding framework can be used to implement a processing flow at a decoding end in the embodiment of the present application. In the video coding and decoding frameworks, intra prediction, motion estimation/motion compensation, reference picture buffer, in-loop filtering, reconstruction, transform, quantization, inverse transform, inverse quantization, entropy coder, etc. modules may be included. At the encoding end, the processing flow at the encoding end can be realized through the matching among the modules, and at the decoding end, the processing flow at the decoding end can be realized through the matching among the modules.
Skip mode and Direct mode: in the inter-frame prediction, because a video has strong time-domain correlation, namely two adjacent frame images in a time domain have a plurality of similar image blocks, the image block of a current frame carries out motion search in an adjacent reference image, and a block which is most matched with the current block is found to be used as a reference block. Because the similarity between the reference block and the current block is high and the difference between the reference block and the current block is small, the code rate overhead for coding the difference is far less than the code rate overhead brought by directly coding the pixel value of the current block. In order to indicate the position of the block that most matches the current block, it is necessary to encode a lot of motion information to be transmitted to the decoding end so that the decoding end knows the position of the most matching block. The motion information, especially the motion vector information, needs to consume a large amount of code rate for coding transmission. In order to save the rate overhead of the part, a special mode for comparatively saving the motion vector information coding is designed in the video coding standard: skip mode or Direct mode. In Skip mode or Direct mode, the motion information of a current block is completely multiplexed with the motion information of some neighboring block in temporal or spatial domain, that is, one motion information is selected as the motion information of the current block from the motion information sets of a plurality of surrounding blocks. Therefore, in Skip mode or Direct mode, only one index value needs to be encoded to indicate which motion information in the motion information set is used by the current block, and the difference between Skip mode and Direct mode is that: skip mode does not require coding of the residual, direct mode does. Obviously, skip mode or Direct mode can greatly save the coding overhead of motion information.
HMVP mode: a History-based motion-vector prediction (HMVP) method is a technique adopted in a new generation of video coding standard, and its principle is to predict motion information of a current block using motion information of a previous coding block. The motion information of previously encoded blocks is preserved by building a list of HMVPs, which is updated when a block is decoded and the motion information changes. Therefore, for the current block, motion information in the list of HMVPs is always available, and by using the motion information in the list of HMVPs, prediction accuracy can be improved.
MHBSKIP mode: MHBSKIP is a prediction mode of Skip mode or Direct mode, and predicts motion information of a current block using motion information of spatial neighboring blocks of the current block. The MHBSKIP mode predicts the current block by constructing three motion information of bidirectional motion, backward motion and forward motion through the spatial adjacent blocks of the current block.
When a current block is predicted in a Skip mode or a Direct mode, a motion information prediction mode candidate list needs to be created for the current block, and the current block is predicted by using the motion information prediction mode candidate list. The created motion information prediction mode candidate list sequentially includes temporal candidate motion information, MHBSKIP mode candidate motion information (for convenience of distinction, referred to herein as MHBSKIP candidate motion information), and HMVP mode candidate motion information (for convenience of distinction, referred to herein as HMVP candidate motion information). The temporal candidate motion information may be 1, the MHBSKIP candidate motion information may be 3, and the HMVP candidate motion information may be 8. Of course, the number of temporal candidate motion information may be other values, the number of MHBSKIP candidate motion information may be other values, and the HMVP candidate motion information may be other values.
When the HMVP candidate motion information is added to the motion information prediction mode candidate list, the HMVP candidate motion information, the time domain candidate motion information, and the MHBSKIP candidate motion information also need to be checked for duplication, that is, 4 times of duplication checking are performed for each HMVP candidate motion information, that is, 32 times of duplication checking are performed for 8 HMVP candidate motion information in total, the number of duplication checking times is too many, the hardware implementation complexity is high, and the encoding performance is poor.
For the above problem of poor encoding performance, in the embodiment of the present application, part of the HMVP candidate motion information may be selected from all the HMVP candidate motion information, and the part of the HMVP candidate motion information may be subjected to the duplication checking process, for example, 3 HMVP candidate motion information are selected from 8 HMVP candidate motion information, so that only 3 HMVP candidate motion information need to be subjected to the duplication checking process, thereby reducing the duplication checking times of the HMVP candidate motion information, reducing the hardware implementation complexity, and improving the encoding performance.
For example, referring to table 1, the prediction mode candidate list for motion information in Skip mode or Direct mode includes temporal candidate motion information, MHBSKIP candidate motion information, and HMVP candidate motion information. When the HMVP candidate motion information is added to the motion information prediction mode candidate list, part of the HMVP candidate motion information may be selected from all of the HMVP candidate motion information, and the selected part of the HMVP candidate motion information may be duplicated with the temporal domain candidate motion information and the MHBSKIP candidate motion information.
TABLE 1
Figure BDA0002089273420000071
In one possible implementation manner, when partial HMVP candidate motion information is selected from all the HMVP candidate motion information, one or more HMVP candidate motion information with a subsequent coding order may be selected from all the HMVP candidate motion information for duplication checking. In all the HMVP candidate motion information, the coded blocks corresponding to a plurality of HMVP candidate motion information which are coded sequentially are closer to the current block, the probability that the HMVP candidate motion information is repeated with the time domain candidate motion information and the MHBSKIP candidate motion information is higher, and duplication checking is carried out on the HMVP candidate motion information, the time domain candidate motion information and the MHBSKIP candidate motion information. The coded blocks corresponding to a plurality of HMVP candidate motion information with the encoding sequence being earlier are far away from the current block, the probability of the repetition of the HMVP candidate motion information with the time domain candidate motion information and the MHBSKIP candidate motion information is lower, and the repetition of the HMVP candidate motion information with the time domain candidate motion information and the MHBSKIP candidate motion information can be avoided. In summary, several HMVP candidate motion information that are sequentially encoded may be selected from all HMVP candidate motion information as partial HMVP candidate motion information, and the partial HMVP candidate motion information may be checked for duplication.
The following describes the encoding and decoding method in the embodiment of the present application with reference to several specific embodiments.
Example 1: referring to fig. 2, a schematic flow chart of a coding and decoding method in an embodiment of the present application is shown, where the method may be applied to a decoding end or an encoding end, and the method may include the following steps:
step 201, obtaining a plurality of HMVP candidate motion information corresponding to the current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as the HMVP candidate motion information to be checked. That is, the duplicate checking process is required for at least one selected HMVP candidate motion information, and the duplicate checking process is not required for the unselected HMVP candidate motion information.
For example, selecting at least one HMVP candidate motion information from a plurality of HMVP candidate motion information as the HMVP candidate motion information to be checked may include, but is not limited to: and selecting at least one HMVP candidate motion information with the next coding sequence from the plurality of HMVP candidate motion information according to the coding sequence of the coded block corresponding to each HMVP candidate motion information, and taking the selected HMVP candidate motion information as the HMVP candidate motion information to be checked. The number of the HMVP candidate motion information to be checked may be greater than or equal to 1, and less than the total number of the HMVP candidate motion information.
Step 202, for each candidate motion information of the HMVP to be checked, performing a checking process on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block.
Illustratively, specifying candidate motion information includes: temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block. The MHBSKIP candidate motion information may include: and obtaining the forward motion information, the backward motion information and the bidirectional motion information from the spatial adjacent blocks corresponding to the current block.
For example, the duplication checking processing is performed on the candidate motion information of the HMVP to be duplicated and the specified candidate motion information corresponding to the current block, which may include, but is not limited to, the following manners: carrying out duplication checking processing on the HMVP candidate motion information to be duplicated and the time domain candidate motion information corresponding to the current block; or, performing duplication checking processing on the HMVP candidate motion information to be duplicated and at least one MHBSKIP candidate motion information corresponding to the current block; or, performing duplication checking processing on the HMVP candidate motion information to be duplicated and the time domain candidate motion information and at least one MHBSKIP candidate motion information corresponding to the current block.
For example, the performing duplicate checking on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block may include: if the candidate motion information of the HMVP to be checked is the same as the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is repeated with the specified candidate motion information; if the candidate motion information of the HMVP to be reviewed is different from the designated candidate motion information, it may be determined that the candidate motion information of the HMVP to be reviewed is not repeated with the designated candidate motion information.
For example, the performing the duplication checking process on the candidate motion information of the HMVP to be duplicated and the specified candidate motion information corresponding to the current block may include: if the number of the designated candidate motion information is multiple, selecting at least one designated candidate motion information (such as partial designated candidate motion information) from the multiple designated candidate motion information as candidate motion information to be compared; if the candidate motion information of the HMVP to be checked is the same as one of the candidate motion information to be compared, determining that the candidate motion information of the HMVP to be checked is repeated with the candidate motion information to be compared; and if the candidate motion information of the HMVP to be checked is different from the candidate motion information to be compared, determining that the candidate motion information of the HMVP to be checked is not repeated with the candidate motion information to be compared.
Step 203, according to the duplication result of the HMVP candidate motion information to be duplicated, adding the HMVP candidate motion information to be duplicated and the candidate motion information that does not duplicate in the designated candidate motion information to the motion information prediction mode candidate list of the current block, and adding the HMVP candidate motion information that is not duplicated in the HMVP candidate motion information to the motion information prediction mode candidate list of the current block.
For example, the motion information prediction mode candidate list of the current block may be: a motion information prediction mode candidate list for Skip mode; and/or, a motion information prediction mode candidate list for Direct mode.
For example, the motion information prediction mode candidate list of the current block may be a motion information prediction mode candidate list of a Skip mode and a motion information prediction mode candidate list of a Direct mode, and may include: skip mode and Direct mode share the same motion information prediction mode candidate list.
For example, adding the candidate motion information to be repeated and the non-repeated candidate motion information in the specified candidate motion information to the motion information prediction mode candidate list of the current block according to the result of the repetition check of the candidate motion information to be repeated, may include: and if the specified candidate motion information is already added into the motion information prediction mode candidate list, adding the candidate motion information to be checked into the motion information prediction mode candidate list when the candidate motion information to be checked is not repeated with the specified candidate motion information. And when the HMVP candidate motion information to be checked is repeated with the specified candidate motion information, prohibiting the HMVP candidate motion information to be checked from being added into the motion information prediction mode candidate list. Or, if the specified candidate motion information is not added to the motion information prediction mode candidate list, when the candidate motion information to be checked and the specified candidate motion information are not repeated, adding both the candidate motion information to be checked and the specified candidate motion information to the motion information prediction mode candidate list. When the HMVP candidate motion information to be checked is repeated with the appointed candidate motion information, adding the HMVP candidate motion information to be checked into a motion information prediction mode candidate list, and forbidding adding the appointed candidate motion information into the motion information prediction mode candidate list, or adding the HMVP candidate motion information to be checked into the motion information prediction mode candidate list, and forbidding adding the HMVP candidate motion information to be checked into the motion information prediction mode candidate list.
In step 204, the current block is encoded or decoded according to the motion information prediction mode candidate list.
For example, if the encoding and decoding method is applied to a decoding end, the current block is decoded according to the motion information prediction mode candidate list. In the decoding process, indication information may be obtained from the coded bitstream, where the indication information is used to indicate an index value of the target motion information in the motion information prediction mode candidate list, and the target motion information is one of candidate motion information in the motion information prediction mode candidate list. Then, based on the indication information, selecting candidate motion information corresponding to the index value from the motion information prediction mode candidate list, determining the selected candidate motion information as target motion information, and performing motion compensation on the current block according to the target motion information, wherein a specific motion compensation process is not repeated.
For example, if the encoding and decoding method is applied to an encoding side, the current block is encoded according to the motion information prediction mode candidate list. In the encoding process, for each candidate motion information in the motion information prediction mode candidate list, the encoding end may determine the rate distortion cost value corresponding to the candidate motion information by using a rate distortion principle. After obtaining the rate-distortion cost value corresponding to each candidate motion information, the encoding end may determine the candidate motion information corresponding to the minimum rate-distortion cost value as the target motion information, and perform motion compensation on the current block according to the target motion information, and the specific motion compensation process is not repeated.
After the encoding end encodes the current block according to the motion information prediction mode candidate list, the encoding end may further send an encoded bitstream to the decoding end, where the encoded bitstream may include indication information, and the indication information is used to indicate an index value of the target motion information in the motion information prediction mode candidate list.
As can be seen from the above technical solutions, in the embodiment of the present application, at least one HMVP candidate motion information may be selected from all HMVP candidate motion information as the HMVP candidate motion information to be checked and repeated, and the HMVP candidate motion information to be checked and repeated is checked. Assuming that a total of 8 HMVP candidate motion information exists, 3 HMVP candidate motion information are selected from the 8 HMVP candidate motion information as the HMVP candidate motion information to be checked, and only the 3 HMVP candidate motion information need to be checked for duplication, so that the number of times of checking the HMVP candidate motion information can be reduced, hardware implementation complexity can be reduced, and encoding performance can be improved.
Example 2: based on the same application concept as the above method, referring to fig. 3, it is a schematic flow chart of the encoding and decoding method in the embodiment of the present application, where the method may be applied to an encoding end, and the method may include:
step 301, the encoding end obtains a plurality of HMVP candidate motion information corresponding to the current block.
For example, in the HMVP mode, an encoding end needs to obtain a plurality of candidate motion information corresponding to a current block, and for convenience of distinguishing, the candidate motion information in the HMVP mode is referred to as HMVP candidate motion information. The number of the HMVP candidate motion information may be determined as required, such as 6, 8, 10, 12, etc., which is not limited to this, and the following description will take the example of obtaining 8 HMVP candidate motion information as an example. Of course, 8 HMVP candidate motion information are used as an example, and other numbers of HMVP candidate motion information are not excluded.
HMVP mode is a technique adopted in a new generation of video coding standards, the principle of which is to predict motion information of a current block using motion information of a previously encoded block. For example, an HMVP list may be established for the current block, and the HMVP list is used to store motion information of the previous encoding blocks, e.g., the HMVP list is used to store different motion information of 8 previous encoding blocks, which may be referred to as HMVP candidate motion information.
For example, after the motion information of the coded block a is obtained, if the motion information of the coded block a is different from the HMVP candidate motion information stored in the HMVP list, the motion information of the coded block a is added to the HMVP list to become the HMVP candidate motion information, and meanwhile, the HMVP candidate motion information with the highest coding order in the HMVP list is removed according to the first-in first-out principle. Or, if the motion information of the encoded block a is the same as one of the HMVP candidate motion information stored in the HMVP list, the motion information of the encoded block a is not added to the HMVP list. In summary, the HMVP list includes 8 HMVP candidate motion informations, and there is no duplicate HMVP candidate motion information among the 8 HMVP candidate motion informations.
The motion information of the candidate HMVP in the HMVP list is continuously updated, and for each encoded block, after the motion information of the encoded block is obtained, whether the HMVP list is updated by using the motion information of the encoded block is decided, if so, one of the candidate HMVP motion information in the HMVP list is updated by using the motion information of the encoded block, and if not, the motion information of the encoded block is not added to the HMVP list. When the current block needs to be encoded, the encoding end may directly obtain 8 HMVP candidate motion information from the HMVP list, that is, 8 HMVP candidate motion information corresponding to the current block.
Of course, the above-mentioned manner is only an example of obtaining multiple HMVP candidate motion information, and the encoding end may also obtain multiple HMVP candidate motion information corresponding to the current block in other manners, which is not limited to this obtaining manner, as long as the encoding end can obtain multiple HMVP candidate motion information corresponding to the current block.
In step 302, the encoding end selects at least one HMVP candidate motion information (i.e., partial HMVP candidate motion information) from the HMVP candidate motion information as the candidate HMVP motion information to be checked. That is, the duplicate checking process is required for at least one selected HMVP candidate motion information, and the duplicate checking process is not required for the remaining HMVP candidate motion information that is not selected.
The encoding end and the decoding end may agree in advance on the number of candidate motion information of the HMVP to be reviewed, such as 1, 2, 3, 4, and the like, which is not limited thereto, as long as the number of candidate motion information of the HMVP to be reviewed is less than the total number of candidate motion information of the HMVP, and then 3 candidate motion information of the HMVP to be reviewed are taken as an example.
For example, assuming that the HMVP list includes 8 HMVP candidate motion information and 3 HMVP candidate motion information needs to be selected as the HMVP candidate motion information to be checked, the encoding end may randomly select 3 HMVP candidate motion information from the 8 HMVP candidate motion information in the HMVP list as the HMVP candidate motion information to be checked; or, from 8 HMVP candidate motion information in the HMVP list, selecting the first 3 HMVP candidate motion information as the candidate HMVP motion information to be reviewed; or, from 8 HMVP candidate motion information in the HMVP list, selecting the last 3 HMVP candidate motion information as the HMVP candidate motion information to be checked; or, the 1 st, 3 rd and 5 th HMVP candidate motion information is selected from the 8 HMVP candidate motion information in the HMVP list as the candidate HMVP motion information to be checked. Of course, the above are only a few examples, and the selection manner is not limited as long as 3 HMVP candidate motion information can be selected from the HMVP list as the HMVP candidate motion information to be checked.
For example, the encoding end selects at least one HMVP candidate motion information from the HMVP candidate motion information as the HMVP candidate motion information to be checked, which may include but is not limited to: and selecting at least one HMVP candidate motion information with the next coding sequence from the plurality of HMVP candidate motion information according to the coding sequence of the coded block corresponding to each HMVP candidate motion information, and taking the selected HMVP candidate motion information as the HMVP candidate motion information to be checked. The number of the HMVP candidate motion information to be checked may be greater than or equal to 1, and less than the total number of the HMVP candidate motion information.
It is assumed that the HMVP list includes 8 HMVP candidate motion information, and 3 HMVP candidate motion information need to be selected as the HMVP candidate motion information to be checked, and the 8 HMVP candidate motion information in the HMVP list are HMVP candidate motion information A1-HMVP candidate motion information A8, respectively.
The encoding order of the encoded block corresponding to each HMVP candidate motion information may include: when the encoding end encodes each image block of the current frame, the encoding end encodes an image block A1 (when the current block is encoded, the image block A1 is already an encoded block A1), adds the motion information of the image block A1 to the HMVP list, and then refers to the motion information of the image block A1 as HMVP candidate motion information A1. Then, the image block A2 (i.e., the encoded block A2) is encoded, and after the motion information of the image block A2 is added to the HMVP list, the motion information of the image block A2 is referred to as HMVP candidate motion information A2. By analogy, the image block A8 (i.e., the encoded block A8) is encoded, and after the motion information of the image block A8 is added to the HMVP list, the motion information of the image block A8 is referred to as HMVP candidate motion information A8.
When encoding the current block, the encoding end may obtain the 8 HMVP candidate motion information from the HMVP list, and the encoding order of the encoded blocks corresponding to the 8 HMVP candidate motion information may be, from front to back: the encoded block A1, the encoded block A2, the encoded block A3, the encoded block A4, the encoded block A5, the encoded block A6, the encoded block A7, the encoded block A8.
Therefore, when encoding the current block, the encoding order of the 8 HMVP candidate motion information may be, in order from front to back: HMVP candidate motion information A1, HMVP candidate motion information A2, HMVP candidate motion information A3, HMVP candidate motion information A4, HMVP candidate motion information A5, HMVP candidate motion information A6, HMVP candidate motion information A7, and HMVP candidate motion information A8.
Then, the encoding end selects the 3 HMVP candidate motion information with the next encoding order, such as the HMVP candidate motion information A6, the HMVP candidate motion information A7, and the HMVP candidate motion information A8, from the 8 HMVP candidate motion information according to the encoding order, and takes the HMVP candidate motion information A6, the HMVP candidate motion information A7, and the HMVP candidate motion information A8 as the HMVP candidate motion information to be repeated.
Step 303, for each candidate motion information of the HMVP to be checked, the encoding end performs a check processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block.
For example, the specified candidate motion information may be any type of candidate motion information, the type of the specified candidate motion information is not limited, and the specified candidate motion information is candidate motion information that needs to be added to the motion information prediction mode candidate list of the current block. When the HMVP candidate motion information and the designated candidate motion information to be duplicated are subjected to duplication checking processing, the designated candidate motion information may or may not have been added to the motion information prediction mode candidate list.
For example, specifying candidate motion information may include, but is not limited to: temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block. The number of temporal candidate motion information may be one or more, and in the subsequent process, 1 temporal candidate motion information is taken as an example. The number of MHBSKIP candidate motion information may be one or more, and in the subsequent process, a plurality of MHBSKIP candidate motion information are taken as an example, for example, 3 MHBSKIP candidate motion information are taken as an example. Of course, the number of MHBSKIP candidate motion information may also be other values, such as 4, 5, etc., without limitation.
When encoding a current block, an encoding end may select a reference block for the current block from a time-domain reference frame corresponding to a current frame where the current block is located, without limitation on the selection manner, and use motion information of the reference block as candidate motion information, which may be referred to as time-domain candidate motion information. Also, the encoding side needs to add temporal candidate motion information to the motion information prediction mode candidate list of the current block.
When encoding a current block, an encoding end may determine an airspace neighboring block corresponding to the current block, and determine MHBSKIP candidate motion information according to motion information of the airspace neighboring block, where the MHBSKIP candidate motion information may include: and obtaining the forward motion information, the backward motion information and the bidirectional motion information from the spatial adjacent blocks corresponding to the current block. The MHBSKIP mode is a prediction mode of Skip mode or Direct mode, and predicts the motion information of the current block by using the motion information of the spatial neighboring blocks of the current block, for example, the current block is predicted by constructing three motion information of bi-directional, backward and forward directions by the spatial neighboring blocks of the current block.
Referring to fig. 4, for an example of the spatial neighboring blocks corresponding to the current block, it is assumed that the selection sequence of the spatial neighboring blocks is, in turn, the neighboring block F, the neighboring block a, the neighboring block D, the neighboring block B, the neighboring block G, and the neighboring block C.
The encoding end first obtains the motion information of the neighboring block F, and if the motion information of the neighboring block F is bidirectional motion information, the motion information of the neighboring block F may be used as MHBSKIP candidate motion information (bidirectional). If the motion information of the neighboring block F is backward motion information, the motion information of the neighboring block F may be used as MHBSKIP candidate motion information (backward). If the motion information of the neighboring block F is forward motion information, the motion information of the neighboring block F may be used as MHBSKIP candidate motion information (forward).
Then, obtaining the motion information of the adjacent block A, if the motion information of the adjacent block A is bidirectional motion information, judging whether MHBSKIP candidate motion information (bidirectional) exists at present, if not, using the motion information of the adjacent block A as the MHBSKIP candidate motion information (bidirectional), and if so, not using the motion information of the adjacent block A as the MHBSKIP candidate motion information. If the motion information of the adjacent block A is backward motion information, judging whether MHBSKIP candidate motion information exists at present (backward), if not, taking the motion information of the adjacent block A as the MHBSKIP candidate motion information (backward), and if so, not taking the motion information of the adjacent block A as the MHBSKIP candidate motion information. If the motion information of the adjacent block a is forward motion information, it is determined whether MHBSKIP candidate motion information (forward direction) already exists at present, if not, the motion information of the adjacent block a is taken as the MHBSKIP candidate motion information (forward direction), and if so, the motion information of the adjacent block a is not taken as the MHBSKIP candidate motion information.
Then, the motion information of the neighboring block D is obtained, if the motion information of the neighboring block D is bidirectional motion information, it is determined whether MHBSKIP candidate motion information (bidirectional) already exists at present, if not, the motion information of the neighboring block D is taken as the MHBSKIP candidate motion information (bidirectional), and if so, the motion information of the neighboring block D is not taken as the MHBSKIP candidate motion information. If the motion information of the adjacent block D is backward motion information, judging whether MHBSKIP candidate motion information (backward direction) exists at present, if not, taking the motion information of the adjacent block D as the MHBSKIP candidate motion information (backward direction), and if so, not taking the motion information of the adjacent block D as the MHBSKIP candidate motion information. If the motion information of the neighboring block D is forward motion information, it is determined whether MHBSKIP candidate motion information (forward direction) already exists at present, if not, the motion information of the neighboring block D is taken as the MHBSKIP candidate motion information (forward direction), and if so, the motion information of the neighboring block D is not taken as the MHBSKIP candidate motion information.
By analogy, the above processing may be performed on the neighboring block F, the neighboring block a, the neighboring block D, the neighboring block B, the neighboring block G, and the neighboring block C in sequence until a bidirectional MHBSKIP candidate motion information, a backward MHBSKIP candidate motion information, and a forward MHBSKIP candidate motion information are obtained from the spatial neighboring blocks. If no forward or backward MHBSKIP candidate motion information is acquired after traversal is finished, the forward motion information of the bidirectional MHBSKIP candidate motion information can be used as the forward MHBSKIP candidate motion information, the backward motion information of the bidirectional MHBSKIP candidate motion information can be used as the backward MHBSKIP candidate motion information, and if no available motion information is acquired after traversal is finished, zero motion vectors can be used for filling. In summary, 3 MHBSKIP candidate motion information can be obtained, and the MHBSKIP candidate motion information needs to be added to the motion information prediction mode candidate list of the current block.
For example, for each candidate motion information of the HMVP to be checked, the performing, by the encoding end, a duplicate checking process on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block may include: carrying out duplication checking processing on the HMVP candidate motion information to be duplicated and the time domain candidate motion information corresponding to the current block; or, performing duplication checking processing on the candidate motion information to be duplicated and at least one MHBSKIP candidate motion information (such as part of MHBSKIP candidate motion information or all MHBSKIP candidate motion information in all MHBSKIP candidate motion information) corresponding to the current block; or, performing duplication checking processing on the candidate motion information to be duplicated and the time domain candidate motion information corresponding to the current block and at least one MHBSKIP candidate motion information (such as part of the candidate motion information of MHBSKIP or all the candidate motion information of MHBSKIP in all the candidate motion information of MHBSKIP).
For example, for each candidate motion information to be checked and repeated (e.g., the HMVP candidate motion information A6, the HMVP candidate motion information A7, and the HMVP candidate motion information A8 is taken as an example in the following, and the HMVP candidate motion information is implemented in a similar manner for other HMVP candidate motion information), the HMVP candidate motion information A8 to be checked and the temporal candidate motion information may be subjected to the duplication processing. If the HMVP candidate motion information A8 to be repeated is the same as the time domain candidate motion information, determining that the HMVP candidate motion information A8 to be repeated is repeated with the time domain candidate motion information; and if the HMVP candidate motion information A8 to be checked is different from the time domain candidate motion information, determining that the HMVP candidate motion information A8 to be checked is not repeated with the time domain candidate motion information.
For another example, the HMVP candidate motion information A8 to be checked and at least one MHBSKIP candidate motion information are subjected to the checking process, and it is assumed that at least one MHBSKIP candidate motion information is selected from all MHBSKIP candidate motion information as the MHBSKIP candidate motion information to be compared. If the HMVP candidate motion information A8 to be re-checked is the same as one of the MHBSKIP candidate motion information to be compared, determining that the HMVP candidate motion information A8 to be re-checked is repeated with the MHBSKIP candidate motion information to be compared; and if the HMVP candidate motion information A8 to be checked and the MHBSKIP candidate motion information to be compared are different, determining that the HMVP candidate motion information A8 to be checked and the MHBSKIP candidate motion information to be compared are not repeated.
For another example, the HMVP candidate motion information A8 to be checked and the time domain candidate motion information and the at least one MHBSKIP candidate motion information are subjected to the checking and resetting process, and it is assumed that the at least one MHBSKIP candidate motion information is selected from all the MHBSKIP candidate motion information as the MHBSKIP candidate motion information to be compared.
If the HMVP candidate motion information A8 to be repeated is the same as the time domain candidate motion information, determining that the HMVP candidate motion information A8 to be repeated is repeated with the time domain candidate motion information; and if the HMVP candidate motion information A8 to be checked and repeated is the same as one of the MHBSKIP candidate motion information to be compared, determining that the HMVP candidate motion information A8 to be checked and repeated is the same as the MHBSKIP candidate motion information to be compared.
And if the HMVP candidate motion information A8 to be checked is different from the time domain candidate motion information, determining that the HMVP candidate motion information A8 to be checked is not repeated with the time domain candidate motion information. And if the HMVP candidate motion information A8 to be checked and the MHBSKIP candidate motion information to be compared are different, determining that the HMVP candidate motion information A8 to be checked and the MHBSKIP candidate motion information to be compared are not repeated.
For example, for each candidate motion information of the HMVP to be checked, the performing, by the encoding end, the check processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block may include: if the candidate motion information of the HMVP to be checked is the same as the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is repeated with the specified candidate motion information; and if the candidate motion information of the HMVP to be checked is different from the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is not repeated with the specified candidate motion information.
For example, for each piece of motion information of the HMVP candidate to be checked (e.g., the HMVP candidate motion information A6, the HMVP candidate motion information A7, the HMVP candidate motion information A8, and the like, and the HMVP candidate motion information A8 is described later as an example), the HMVP candidate motion information A8 to be checked and the designated candidate motion information (the number of the designated candidate motion information may be one or more, and the designated candidate motion information may be time domain candidate motion information, MHBSKIP candidate motion information, or other types of candidate motion information) may be subjected to the duplication checking process. If the HMVP candidate motion information A8 to be checked is the same as one of the designated candidate motion information, determining that the HMVP candidate motion information A8 to be checked is repeated with the designated candidate motion information; and if the candidate motion information A8 of the HMVP to be checked is different from all the specified candidate motion information, determining that the candidate motion information A8 of the HMVP to be checked is not repeated with the specified candidate motion information.
For example, for each candidate motion information of the HMVP to be checked, the performing, by the encoding end, a duplicate checking process on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block may include: if the number of candidate motion information candidates is multiple, at least one of the candidate motion information candidates (e.g., part of the candidate motion information candidates) may be selected from the multiple candidate motion information candidates as candidate motion information to be compared (the number of candidate motion information to be compared may be one or more). If the candidate motion information of the HMVP to be checked is the same as one of the candidate motion information to be compared, determining that the candidate motion information of the HMVP to be checked is repeated with the candidate motion information to be compared; and if the candidate motion information of the HMVP to be checked and the candidate motion information to be compared are different, determining that the candidate motion information of the HMVP to be checked and the candidate motion information to be compared are not repeated.
For example, at least one piece of designated candidate motion information may be selected from the plurality of pieces of designated candidate motion information as candidate motion information to be compared (the number of candidate motion information to be compared may be one or more, and the candidate motion information to be compared may be time domain candidate motion information, MHBSKIP candidate motion information, or other types of candidate motion information). For each candidate motion information to be checked (e.g., the HMVP candidate motion information A6, the HMVP candidate motion information A7, and the HMVP candidate motion information A8, and then the HMVP candidate motion information A8 is taken as an example), the HMVP candidate motion information A8 to be checked and the candidate motion information to be compared are subjected to a check process. If the HMVP candidate motion information A8 to be checked is the same as one of the candidate motion information to be compared, determining that the HMVP candidate motion information A8 to be checked is repeated with the candidate motion information to be compared; and if the HMVP candidate motion information A8 to be checked is different from all the candidate motion information to be compared, determining that the HMVP candidate motion information A8 to be checked is not repeated with the candidate motion information to be compared.
Step 304, the encoding end adds the candidate motion information to be checked and the unrepeated candidate motion information in the specified candidate motion information to the motion information prediction mode candidate list of the current block according to the result of checking the candidate motion information to be checked and adds the candidate motion information not to be checked in the HMVP candidate motion information to the motion information prediction mode candidate list of the current block.
For example, the motion information prediction mode candidate list of the current block may be: a motion information prediction mode candidate list of Skip mode; and/or, a motion information prediction mode candidate list for Direct mode.
For example, adding the candidate motion information to be repeated and the non-repeated candidate motion information in the specified candidate motion information to the motion information prediction mode candidate list of the current block according to the result of the repetition check of the candidate motion information to be repeated, may include: and if the specified candidate motion information is already added into the motion information prediction mode candidate list, adding the candidate motion information to be checked into the motion information prediction mode candidate list when the candidate motion information to be checked is not repeated with the specified candidate motion information. And when the HMVP candidate motion information to be checked is repeated with the specified candidate motion information, prohibiting the HMVP candidate motion information to be checked from being added into the motion information prediction mode candidate list. Or, if the specified candidate motion information is not added to the motion information prediction mode candidate list, when the candidate motion information to be checked and the specified candidate motion information are not repeated, adding both the candidate motion information to be checked and the specified candidate motion information to the motion information prediction mode candidate list. When the HMVP candidate motion information to be checked and the appointed candidate motion information are repeated, adding the HMVP candidate motion information to be checked into the motion information prediction mode candidate list, and forbidding adding the appointed candidate motion information into the motion information prediction mode candidate list, or adding the HMVP candidate motion information to be checked into the motion information prediction mode candidate list, and forbidding adding the HMVP candidate motion information to be checked into the motion information prediction mode candidate list.
For example, the HMVP candidate motion information to be checked may include HMVP candidate motion information A6, HMVP candidate motion information A7, and HMVP candidate motion information A8, assuming that the result of checking the HMVP candidate motion information A6 is that the HMVP candidate motion information A6 does not overlap with all the specified candidate motion information (e.g., MHBSKIP candidate motion information (bidirectional), MHBSKIP candidate motion information (backward), MHBSKIP candidate motion information (forward), temporal candidate motion information, etc.), the result of checking the HMVP candidate motion information A7 is that the HMVP candidate motion information A7 overlaps with the specified candidate motion information a (e.g., temporal candidate motion information, which is subsequently recorded as the specified candidate motion information a), and the result of checking the HMVP candidate motion information A8 is that the HMVP candidate motion information A8 overlaps with the specified candidate motion information B (e.g., MHBSKIP candidate motion information (backward), which is subsequently recorded as the specified candidate motion information B).
For example, assuming that the specified candidate motion information (e.g., MHBSKIP candidate motion information (bidirectional), MHBSKIP candidate motion information (backward), MHBSKIP candidate motion information (forward), temporal candidate motion information) has been added to the motion information prediction mode candidate list, the HMVP candidate motion information A6 is added to the motion information prediction mode candidate list since the HMVP candidate motion information A6 is not repeated with all the specified candidate motion information. Since the HMVP candidate motion information A7 is duplicated with the specified candidate motion information a, the addition of the HMVP candidate motion information A7 to the motion information prediction mode candidate list is prohibited. Since the HMVP candidate motion information A8 is duplicated with the specified candidate motion information B, the addition of the HMVP candidate motion information A8 to the motion information prediction mode candidate list is prohibited.
For example, assuming that the specified candidate motion information (e.g., MHBSKIP candidate motion information (bidirectional), MHBSKIP candidate motion information (backward), MHBSKIP candidate motion information (forward), temporal candidate motion information) is not added to the motion information prediction mode candidate list, since the HMVP candidate motion information A6 is not repeated with all the specified candidate motion information, the HMVP candidate motion information A7 is repeated with the specified candidate motion information a, and the HMVP candidate motion information A8 is repeated with the specified candidate motion information B, the HMVP candidate motion information A6, and the specified candidate motion information other than the specified candidate motion information a and the specified candidate motion information B may be added to the motion information prediction mode candidate list.
Then, the HMVP candidate motion information A7 and the HMVP candidate motion information A8 are added to the motion information prediction mode candidate list, and the addition of the specified candidate motion information a and the specified candidate motion information B to the motion information prediction mode candidate list is prohibited. Or, adding the HMVP candidate motion information A7 and the decided candidate motion information B to the motion information prediction mode candidate list, and prohibiting the addition of the specified candidate motion information a and the HMVP candidate motion information A8 to the motion information prediction mode candidate list; or, adding the specified candidate motion information a and the HMVP candidate motion information A8 to the motion information prediction mode candidate list, and prohibiting the HMVP candidate motion information A7 and the specified candidate motion information B from being added to the motion information prediction mode candidate list; alternatively, the specified candidate motion information a and the specified candidate motion information B are added to the motion information prediction mode candidate list, and the HMVP candidate motion information A7 and the HMVP candidate motion information A8 are prohibited from being added to the motion information prediction mode candidate list.
For example, the HMVP candidate motion information that is not subjected to the duplication check may include: in this embodiment, it is not necessary to perform duplication checking processing on the HMVP candidate motion information A1, the HMVP candidate motion information A2, the HMVP candidate motion information A3, the HMVP candidate motion information A4, and the HMVP candidate motion information A5, and the HMVP candidate motion information A1, the HMVP candidate motion information A2, the HMVP candidate motion information A3, the HMVP candidate motion information A4, and the HMVP candidate motion information A5 are directly added to the motion information prediction mode candidate list.
Step 305, aiming at each candidate motion information in the motion information prediction mode candidate list, the encoding end determines the rate distortion cost value corresponding to the candidate motion information by adopting a rate distortion principle.
Step 306, after obtaining the rate-distortion cost value corresponding to each candidate motion information, the encoding end determines the candidate motion information corresponding to the minimum rate-distortion cost value as the target motion information.
Step 307, the encoding end performs motion compensation on the current block according to the target motion information.
For example, for each candidate motion information (e.g., temporal candidate motion information, MHBSKIP candidate motion information, HMVP candidate motion information, etc.) in the motion information prediction mode candidate list, the encoding end may determine a rate-distortion cost value corresponding to the candidate motion information by using a rate-distortion principle. The rate-distortion cost value may be determined by the following formula: j (mode) = D + λ R, D denotes Distortion, and can be generally measured using SSE index, where SSE refers to the sum of the mean square of the difference between the reconstructed image block and the source image; λ is lagrange multiplier, R is the actual number of bits required for encoding the image block in the mode, including the sum of bits required for encoding mode information, motion information, residual, and the like, and this determination is not limited.
After obtaining the rate distortion cost value corresponding to each candidate motion information, the encoding end may determine the candidate motion information with the minimum rate distortion cost value, determine the candidate motion information with the minimum rate distortion cost value as the target motion information, and perform motion compensation on the current block according to the target motion information, for example, determine the predicted value of the current block according to the target motion information, which is not described in detail again in the motion compensation process.
As can be seen from the above technical solutions, in the embodiment of the present application, at least one HMVP candidate motion information may be selected from all HMVP candidate motion information as the HMVP candidate motion information to be checked and repeated, and the HMVP candidate motion information to be checked and repeated is checked and repeated. Assuming that 8 HMVP candidate motion information exist in total, 3 HMVP candidate motion information are selected from the 8 HMVP candidate motion information as the to-be-checked HMVP candidate motion information, and it is only necessary to check the 3 HMVP candidate motion information, so that the number of times of checking the HMVP candidate motion information can be reduced, the hardware implementation complexity can be reduced, and the encoding performance can be improved.
Example 3: based on the same application concept as the above method, referring to fig. 5, it is a schematic flow chart of the encoding and decoding method in the embodiment of the present application, where the method may be applied to a decoding end, and the method may include:
step 501, a decoding end obtains a plurality of HMVP candidate motion information corresponding to a current block.
In step 502, the decoding end selects at least one HMVP candidate motion information (i.e., partial HMVP candidate motion information) from the HMVP candidate motion information as the HMVP candidate motion information to be checked. That is, the duplicate checking process is required for at least one selected HMVP candidate motion information, and the duplicate checking process is not required for the remaining HMVP candidate motion information that is not selected.
For example, the decoding end selects at least one HMVP candidate motion information from the HMVP candidate motion information as the HMVP candidate motion information to be checked, which may include but is not limited to: and selecting at least one HMVP candidate motion information with the next coding sequence from the plurality of HMVP candidate motion information according to the coding sequence of the coded block corresponding to each HMVP candidate motion information, and taking the selected HMVP candidate motion information as the HMVP candidate motion information to be checked. The number of the HMVP candidate motion information to be checked may be greater than or equal to 1, and less than the total number of the HMVP candidate motion information.
Step 503, aiming at each candidate motion information of the HMVP to be checked, the decoding end performs the check processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block.
For example, specifying candidate motion information may include, but is not limited to: temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block. The number of temporal candidate motion information may be one or more, and the number of MHBSKIP candidate motion information may be one or more.
For example, for each candidate motion information of the HMVP to be checked, the performing, by the decoding end, a duplicate checking process on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block may include: carrying out duplication checking processing on the HMVP candidate motion information to be duplicated and the time domain candidate motion information corresponding to the current block; or, carrying out duplication checking processing on the HMVP candidate motion information to be duplicated and at least one MHBSKIP candidate motion information corresponding to the current block; or, the candidate motion information of the HMVP to be checked and the time domain candidate motion information corresponding to the current block and at least one candidate motion information of the MHBSKIP are checked and processed.
Step 504, the decoding end adds the candidate motion information to be repeated and the unrepeated candidate motion information in the specified candidate motion information to the motion information prediction mode candidate list of the current block according to the repetition result of the candidate motion information to be repeated, and adds the non-repeated candidate motion information in the plurality of HMVP candidate motion information to the motion information prediction mode candidate list of the current block.
For example, the motion information prediction mode candidate list of the current block may be: a motion information prediction mode candidate list of Skip mode; and/or, a motion information prediction mode candidate list for Direct mode.
The implementation process of steps 501 to 504 can refer to steps 301 to 304, and the difference between the steps 501 to 504 is implemented by the decoding end, not by the encoding end.
In step 505, the decoding end obtains indication information from the coded bit stream. Illustratively, the indication information is used to indicate an index value of the target motion information in the motion information prediction mode candidate list, and the target motion information is one of the candidate motion information in the motion information prediction mode candidate list.
Step 506, based on the indication information, the decoding end selects candidate motion information corresponding to the index value from the motion information prediction mode candidate list, determines the selected candidate motion information as target motion information, and performs motion compensation on the current block according to the target motion information, and the specific motion compensation process is not repeated.
For example, in one possible implementation, when the encoding end sends the encoded bitstream to the decoding end, the encoded bitstream may further carry indication information, where the indication information is used to indicate an index value of the target motion information in the motion information prediction mode candidate list. For example, assuming that the target motion information is the first candidate motion information in the motion information prediction mode candidate list, the indication information is used to indicate an index value of 1, and the index value of 1 may represent the first candidate motion information of the motion information prediction mode candidate list.
After receiving the coded bit stream, the decoding end may obtain the indication information from the coded bit stream, select candidate motion information corresponding to the index value from the motion information prediction mode candidate list, and determine the selected candidate motion information as the target motion information. For example, when the indication information is used to indicate an index value of 1, the decoding end selects 1 st candidate motion information from the motion information prediction mode candidate list, and determines the 1 st candidate motion information in the motion information prediction mode candidate list as the target motion information.
Then, the decoding end performs motion compensation on the current block according to the target motion information, for example, the decoding end determines a prediction value of the current block according to the target motion information, and details of the motion compensation process are not repeated.
Example 4: in constructing the motion information prediction mode candidate list for Skip mode and/or Direct mode, specified candidate motion information (e.g., one or more specified candidate motion information) may be added to the motion information prediction mode candidate list. When the HMVP candidate motion information needs to be added to the motion information prediction mode candidate list, at least one HMVP candidate motion information is selected from all HMVP candidate motion information to serve as the HMVP candidate motion information to be checked, and at least one designated candidate motion information in the HMVP candidate motion information to be checked and the motion information prediction mode candidate list is subjected to the check processing.
According to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated HMVP candidate motion information to be duplicated into a motion information prediction mode candidate list, prohibiting adding repeated HMVP candidate motion information to be duplicated into the motion information prediction mode candidate list, and adding the HMVP candidate motion information which is not duplicated in all the HMVP candidate motion information into the motion information prediction mode candidate list.
For each candidate motion information to be duplicated, which is subjected to duplication checking processing, the number of the specified candidate motion information to be duplicated with the candidate motion information to be duplicated may be different or the same. For example, if there are 4 pieces of designated candidate motion information in the motion information prediction mode candidate list, and it is necessary to perform the deduplication processing on the HMVP candidate motion information A6, the HMVP candidate motion information A7, and the HMVP candidate motion information A8, it is possible to perform the deduplication processing on the HMVP candidate motion information A6 and 3 pieces of designated candidate motion information (i.e., 3 pieces of all the designated candidate motion information), perform the deduplication processing on the HMVP candidate motion information A7 and 3 pieces of designated candidate motion information, and perform the deduplication processing on the HMVP candidate motion information A8 and 1 piece of designated candidate motion information (i.e., 1 piece of all the designated candidate motion information).
Example 5: in constructing the motion information prediction mode candidate list of Skip mode and/or Direct mode, temporal candidate motion information (e.g., 1 temporal candidate motion information) and MHBSKIP candidate motion information (e.g., 3 MHBSKIP candidate motion information) may be added to the motion information prediction mode candidate list. When the HMVP candidate motion information needs to be added to the motion information prediction mode candidate list, at least one HMVP candidate motion information is selected from all HMVP candidate motion information to serve as the HMVP candidate motion information to be checked, and the HMVP candidate motion information to be checked, the time domain candidate motion information in the motion information prediction mode candidate list and at least one MHBSKIP candidate motion information are subjected to checking processing.
According to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated HMVP candidate motion information to be duplicated into a motion information prediction mode candidate list, prohibiting adding repeated HMVP candidate motion information to be duplicated into the motion information prediction mode candidate list, and adding the HMVP candidate motion information which is not duplicated in all the HMVP candidate motion information into the motion information prediction mode candidate list.
For each candidate motion information to be checked and duplicated, the number of candidate motion information to be checked and duplicated (time domain candidate motion information to be checked and duplicated, MHBSKIP candidate motion information) may be different from or the same as the number of candidate motion information to be checked and duplicated.
Example 6: in constructing the motion information prediction mode candidate list of Skip mode and/or Direct mode, temporal candidate motion information (e.g., 1 temporal candidate motion information) and MHBSKIP candidate motion information (e.g., 3 MHBSKIP candidate motion information) may be added to the motion information prediction mode candidate list. When the HMVP candidate motion information needs to be added to the motion information prediction mode candidate list, at least one HMVP candidate motion information is selected from all the HMVP candidate motion information to be checked and reset as the HMVP candidate motion information to be checked and reset, the time domain candidate motion information in the HMVP candidate motion information to be checked and the motion information prediction mode candidate list is subjected to the reset processing, and the MHBSKIP candidate motion information in the HMVP candidate motion information to be checked and the motion information prediction mode candidate list does not need to be subjected to the reset processing.
Adding unrepeated candidate motion information of the HMVP candidates to be checked into a motion information prediction mode candidate list according to a duplicate checking result of the candidate motion information of the HMVP to be checked, forbidding adding repeated candidate motion information of the HMVP to be checked into the motion information prediction mode candidate list, and adding the candidate motion information of the HMVP which is not subjected to duplicate checking in all the candidate motion information of the HMVP into the motion information prediction mode candidate list.
Example 7: in constructing the motion information prediction mode candidate list of Skip mode and/or Direct mode, temporal candidate motion information (e.g., 1 temporal candidate motion information) and MHBSKIP candidate motion information (e.g., 3 MHBSKIP candidate motion information) may be added to the motion information prediction mode candidate list. When the HMVP candidate motion information needs to be added to the motion information prediction mode candidate list, at least one HMVP candidate motion information is selected from all the HMVP candidate motion information to be checked and reset as the HMVP candidate motion information to be checked and reset, the at least one MHBSKIP candidate motion information in the HMVP candidate motion information to be checked and the motion information prediction mode candidate list is subjected to the re-checking processing, and the time domain candidate motion information in the HMVP candidate motion information to be checked and the motion information prediction mode candidate list can not be subjected to the re-checking processing.
According to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated HMVP candidate motion information to be duplicated into a motion information prediction mode candidate list, prohibiting adding repeated HMVP candidate motion information to be duplicated into the motion information prediction mode candidate list, and adding the HMVP candidate motion information which is not duplicated in all the HMVP candidate motion information into the motion information prediction mode candidate list.
For each candidate motion information of the HMVP to be checked for duplicate, the number of the MHBSKIP candidate motion information to be checked for duplicate with the HMVP to be checked for duplicate may be different or the same.
Example 8: based on the same application concept as the method, an embodiment of the present application provides an encoding and decoding apparatus applied to a decoding end or an encoding end, as shown in fig. 6, which is a structural diagram of the apparatus, including:
an obtaining module 61, configured to obtain multiple HMVP candidate motion information corresponding to a current block;
a selecting module 62, configured to select at least one HMVP candidate motion information from the HMVP candidate motion information as a candidate HMVP motion information to be checked;
a duplicate checking module 63, configured to perform duplicate checking processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block for each candidate motion information of the HMVP to be checked;
an adding module 64, configured to add, according to a duplicate checking result of the HMVP candidate motion information to be checked, unrepeated candidate motion information in the HMVP candidate motion information to be checked and the specified candidate motion information to a motion information prediction mode candidate list of the current block, and add, to the motion information prediction mode candidate list of the current block, HMVP candidate motion information that is not subjected to duplicate checking in the HMVP candidate motion information;
a coding/decoding module 65 for coding or decoding the current block according to the motion information prediction mode candidate list.
For example, the specified candidate motion information may include, but is not limited to: the time domain candidate motion information of the current block and/or the MHBSKIP candidate motion information of the current block;
wherein, the MHBSKIP candidate motion information specifically includes: and obtaining forward motion information, backward motion information and bidirectional motion information from the spatial adjacent blocks corresponding to the current block.
For example, when the duplication checking module 63 performs duplication checking on the candidate motion information of the HMVP to be duplicated and the specified candidate motion information corresponding to the current block, it is specifically configured to: performing duplication checking processing on the HMVP candidate motion information to be duplicated and the time domain candidate motion information corresponding to the current block; or, performing duplicate checking processing on the candidate motion information of the HMVP to be checked and at least one candidate motion information of MHBSKIP corresponding to the current block; or, performing duplication checking processing on the candidate motion information of the HMVP to be duplicated, the time domain candidate motion information corresponding to the current block, and at least one MHBSKIP candidate motion information.
For example, when the selecting module 62 selects at least one HMVP candidate motion information from the HMVP candidate motion information as the HMVP candidate motion information to be checked, the selecting module is specifically configured to:
selecting at least one HMVP candidate motion information with a later coding sequence from the plurality of HMVP candidate motion information according to the coding sequence of the coded block corresponding to each HMVP candidate motion information;
and taking the selected HMVP candidate motion information as the HMVP candidate motion information to be checked.
For example, when the duplication checking module 63 performs duplication checking on the candidate motion information of the HMVP to be duplicated and the specified candidate motion information corresponding to the current block, it is specifically configured to:
if the candidate motion information of the HMVP to be checked is the same as the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is repeated with the specified candidate motion information;
and if the candidate motion information of the HMVP to be checked is different from the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is not repeated with the specified candidate motion information.
For example, the duplication checking module 63 is specifically configured to, when performing duplication checking processing on the candidate motion information of the HMVP to be duplicated and the specified candidate motion information corresponding to the current block:
if the number of the designated candidate motion information is multiple, selecting at least one designated candidate motion information from the multiple designated candidate motion information as candidate motion information to be compared;
if the candidate motion information of the HMVP to be checked is the same as one of the candidate motion information to be compared, determining that the candidate motion information of the HMVP to be checked is repeated with the candidate motion information to be compared;
and if the candidate motion information of the HMVP to be checked and the candidate motion information to be compared are different, determining that the candidate motion information of the HMVP to be checked and the candidate motion information to be compared are not repeated.
Illustratively, the motion information prediction mode candidate list is: a motion information prediction mode candidate list for Skip mode; and/or, a motion information prediction mode candidate list for Direct mode.
For example, if the apparatus is applied to a decoding end, the coding/decoding module 65 is specifically configured to, when decoding the current block according to the motion information prediction mode candidate list:
acquiring indication information from a coded bit stream; the indication information is used for indicating an index value of target motion information in the motion information prediction mode candidate list, and the target motion information is one of candidate motion information in the motion information prediction mode candidate list;
selecting candidate motion information corresponding to the index value from the motion information prediction mode candidate list based on the indication information, and determining the selected candidate motion information as target motion information;
and performing motion compensation on the current block according to the target motion information.
For example, if the apparatus is applied to an encoding end, the encoding/decoding module 65 is specifically configured to, when encoding the current block according to the motion information prediction mode candidate list:
determining a rate distortion cost value corresponding to each candidate motion information in the motion information prediction mode candidate list by adopting a rate distortion principle aiming at each candidate motion information;
determining candidate motion information corresponding to the minimum rate distortion cost value as target motion information;
and performing motion compensation on the current block according to the target motion information.
For example, the codec module 65 is further configured to, after encoding the current block according to the motion information prediction mode candidate list: and sending a coded bit stream to a decoding end, wherein the coded bit stream comprises indication information, and the indication information is used for indicating the index value of the target motion information in the motion information prediction mode candidate list.
As for the decoding-end device provided in the embodiment of the present application, in terms of a hardware level, a schematic diagram of a hardware architecture of the decoding-end device may specifically refer to fig. 7. The method comprises the following steps: a processor 71 and a machine-readable storage medium 72, the machine-readable storage medium 72 storing machine-executable instructions executable by the processor 71; the processor 71 is configured to execute machine-executable instructions to implement the methods disclosed in the above examples of the present application. For example, the processor is configured to execute machine-executable instructions to perform the following steps:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information;
for each candidate motion information of the HMVP to be checked, carrying out checking processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block;
according to the duplicate checking result of the HMVP candidate motion information to be checked, adding unrepeated candidate motion information in the HMVP candidate motion information to be checked and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding unrepeated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
decoding the current block according to the motion information prediction mode candidate list.
In terms of hardware, the hardware architecture diagram of the encoding end device provided in the embodiment of the present application may specifically refer to fig. 8. The method comprises the following steps: a processor 81 and a machine-readable storage medium 82, the machine-readable storage medium 82 storing machine-executable instructions executable by the processor 81; the processor 81 is configured to execute machine-executable instructions to implement the methods disclosed in the above examples of the present application. For example, the processor is configured to execute machine-executable instructions to perform the steps of: acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information;
for each candidate motion information of the HMVP to be checked, carrying out checking processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block;
according to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated candidate motion information in the HMVP candidate motion information to be duplicated and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding non-duplicated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
encoding the current block according to the motion information prediction mode candidate list.
Based on the same application concept as the method, embodiments of the present application further provide a machine-readable storage medium, where a plurality of computer instructions are stored on the machine-readable storage medium, and when the computer instructions are executed by a processor, the encoding and decoding methods disclosed in the above examples of the present application can be implemented.
The machine-readable storage medium may be, for example, any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (11)

1. A method of encoding and decoding, the method comprising:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information; wherein the selecting at least one HMVP candidate motion information from the plurality of HMVP candidate motion information as the HMVP candidate motion information to be reviewed includes: selecting at least one HMVP candidate motion information with a later coding sequence from the plurality of HMVP candidate motion information according to the coding sequence of the coded block corresponding to each HMVP candidate motion information; using the selected HMVP candidate motion information as the candidate motion information of the HMVP to be checked;
for each candidate motion information of the HMVP to be checked, carrying out checking processing on the candidate motion information of the HMVP to be checked and the specified candidate motion information corresponding to the current block; wherein the specified candidate motion information comprises temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block; predicting the MHBSKIP candidate motion information of the current block by utilizing the motion information of the spatial adjacent block corresponding to the current block; the MHBSKIP candidate motion information specifically includes: forward motion information, backward motion information and bidirectional motion information which are obtained from the spatial adjacent blocks corresponding to the current block;
according to the duplicate checking result of the HMVP candidate motion information to be checked, adding unrepeated candidate motion information in the HMVP candidate motion information to be checked and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding unrepeated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
encoding or decoding the current block according to the motion information prediction mode candidate list.
2. The method of claim 1, wherein the performing the duplication checking on the candidate HMVP motion information to be duplicated and the specified candidate motion information corresponding to the current block comprises:
performing duplicate checking processing on the HMVP candidate motion information to be checked and the time domain candidate motion information corresponding to the current block; alternatively, the first and second electrodes may be,
performing duplicate checking processing on the HMVP candidate motion information to be checked and at least one MHBSKIP candidate motion information corresponding to the current block; alternatively, the first and second liquid crystal display panels may be,
and performing duplication checking processing on the HMVP candidate motion information to be duplicated and the time domain candidate motion information and at least one MHBSKIP candidate motion information corresponding to the current block.
3. The method of claim 1, wherein the performing the duplication checking on the candidate HMVP motion information to be duplicated and the specified candidate motion information corresponding to the current block comprises:
if the candidate motion information of the HMVP to be checked is the same as the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is repeated with the specified candidate motion information;
and if the candidate motion information of the HMVP to be checked is different from the specified candidate motion information, determining that the candidate motion information of the HMVP to be checked is not repeated with the specified candidate motion information.
4. The method of claim 1, wherein the performing the duplication checking on the candidate HMVP motion information to be duplicated and the specified candidate motion information corresponding to the current block comprises:
if the number of the designated candidate motion information is multiple, selecting at least one designated candidate motion information from the multiple designated candidate motion information as candidate motion information to be compared;
if the candidate motion information of the HMVP to be checked is the same as one of the candidate motion information to be compared, determining that the candidate motion information of the HMVP to be checked is repeated with the candidate motion information to be compared;
and if the candidate motion information of the HMVP to be checked and the candidate motion information to be compared are different, determining that the candidate motion information of the HMVP to be checked and the candidate motion information to be compared are not repeated.
5. The method of claim 1,
the motion information prediction mode candidate list is: a motion information prediction mode candidate list for Skip mode; and/or, a motion information prediction mode candidate list for Direct mode.
6. The method of claim 1, wherein if the method is applied to a decoding side, decoding the current block according to the motion information prediction mode candidate list comprises:
acquiring indication information from a coded bit stream; the indication information is used for indicating an index value of target motion information in the motion information prediction mode candidate list, and the target motion information is one of candidate motion information in the motion information prediction mode candidate list;
selecting candidate motion information corresponding to the index value from the motion information prediction mode candidate list based on the indication information, and determining the selected candidate motion information as target motion information;
and performing motion compensation on the current block according to the target motion information.
7. The method of claim 1, wherein if the method is applied to an encoding side, encoding the current block according to the motion information prediction mode candidate list comprises:
determining a rate distortion cost value corresponding to each candidate motion information in the motion information prediction mode candidate list by adopting a rate distortion principle aiming at each candidate motion information;
determining candidate motion information corresponding to the minimum rate distortion cost value as target motion information;
and performing motion compensation on the current block according to the target motion information.
8. The method of claim 7, wherein after encoding the current block according to the motion information prediction mode candidate list, the method further comprises:
and sending a coded bit stream to a decoding end, wherein the coded bit stream comprises indication information, and the indication information is used for indicating the index value of the target motion information in the motion information prediction mode candidate list.
9. An apparatus for encoding and decoding, the apparatus comprising:
the acquisition module is used for acquiring a plurality of HMVP candidate motion information corresponding to the current block;
a selecting module, configured to select at least one HMVP candidate motion information from the HMVP candidate motion information as a candidate HMVP motion information to be checked; the selection module is specifically configured to: selecting at least one HMVP candidate motion information with a later coding sequence from the plurality of HMVP candidate motion information according to the coding sequence of the coded block corresponding to each HMVP candidate motion information; using the selected HMVP candidate motion information as the candidate motion information of the HMVP to be checked;
the duplication checking module is used for checking the duplication of the HMVP candidate motion information to be checked and the specified candidate motion information corresponding to the current block aiming at each HMVP candidate motion information to be checked; wherein the specified candidate motion information comprises temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block; predicting the MHBSKIP candidate motion information of the current block by utilizing the motion information of the spatial adjacent block corresponding to the current block; the MHBSKIP candidate motion information specifically includes: forward motion information, backward motion information and bidirectional motion information which are obtained from the spatial adjacent blocks corresponding to the current block;
an adding module, configured to add, according to a duplicate checking result of the HMVP candidate motion information to be checked, unrepeated candidate motion information in the HMVP candidate motion information to be checked and the specified candidate motion information to a motion information prediction mode candidate list of the current block, and add, to the motion information prediction mode candidate list of the current block, HMVP candidate motion information that is not subjected to duplicate checking in the HMVP candidate motion information;
and the coding and decoding module is used for coding or decoding the current block according to the motion information prediction mode candidate list.
10. A decoding-side apparatus, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine executable instructions to perform the steps of:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information; wherein, the selecting at least one HMVP candidate motion information from the HMVP candidate motion information as the HMVP candidate motion information to be checked includes: selecting at least one HMVP candidate motion information with a later encoding sequence from the plurality of HMVP candidate motion information according to the encoding sequence of the encoded block corresponding to each HMVP candidate motion information; using the selected HMVP candidate motion information as the HMVP candidate motion information to be checked;
for each candidate motion information of the HMVP to be checked, carrying out duplicate checking processing on the candidate motion information of the HMVP to be checked and the appointed candidate motion information corresponding to the current block; wherein the specified candidate motion information comprises temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block; predicting the candidate motion information of the MHBSKIP of the current block by utilizing the motion information of the spatial adjacent block corresponding to the current block; the MHBSKIP candidate motion information specifically includes: forward motion information, backward motion information and bidirectional motion information which are obtained from the spatial adjacent blocks corresponding to the current block;
according to the duplication result of the HMVP candidate motion information to be duplicated, adding unrepeated candidate motion information in the HMVP candidate motion information to be duplicated and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding non-duplicated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
decoding the current block according to the motion information prediction mode candidate list.
11. An encoding side apparatus, comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor;
the processor is configured to execute machine executable instructions to perform the steps of:
acquiring a plurality of HMVP candidate motion information corresponding to a current block, and selecting at least one HMVP candidate motion information from the HMVP candidate motion information as to-be-checked HMVP candidate motion information; wherein the selecting at least one HMVP candidate motion information from the plurality of HMVP candidate motion information as the HMVP candidate motion information to be reviewed includes: selecting at least one HMVP candidate motion information with a later encoding sequence from the plurality of HMVP candidate motion information according to the encoding sequence of the encoded block corresponding to each HMVP candidate motion information; using the selected HMVP candidate motion information as the candidate motion information of the HMVP to be checked;
for each candidate motion information of the HMVP to be checked, carrying out duplicate checking processing on the candidate motion information of the HMVP to be checked and the appointed candidate motion information corresponding to the current block; wherein the specified candidate motion information comprises temporal candidate motion information of the current block and/or MHBSKIP candidate motion information of the current block; predicting the MHBSKIP candidate motion information of the current block by utilizing the motion information of the spatial adjacent block corresponding to the current block; the MHBSKIP candidate motion information specifically includes: forward motion information, backward motion information and bidirectional motion information which are obtained from the spatial adjacent blocks corresponding to the current block;
according to the duplicate checking result of the HMVP candidate motion information to be checked, adding unrepeated candidate motion information in the HMVP candidate motion information to be checked and the appointed candidate motion information into a motion information prediction mode candidate list of the current block, and adding unrepeated HMVP candidate motion information in the HMVP candidate motion information into the motion information prediction mode candidate list of the current block;
encoding the current block according to the motion information prediction mode candidate list.
CN201910498015.8A 2019-06-10 2019-06-10 Encoding and decoding method, device and equipment Active CN112073734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910498015.8A CN112073734B (en) 2019-06-10 2019-06-10 Encoding and decoding method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910498015.8A CN112073734B (en) 2019-06-10 2019-06-10 Encoding and decoding method, device and equipment

Publications (2)

Publication Number Publication Date
CN112073734A CN112073734A (en) 2020-12-11
CN112073734B true CN112073734B (en) 2023-02-28

Family

ID=73658411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910498015.8A Active CN112073734B (en) 2019-06-10 2019-06-10 Encoding and decoding method, device and equipment

Country Status (1)

Country Link
CN (1) CN112073734B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107710764A (en) * 2015-06-09 2018-02-16 高通股份有限公司 It is determined that the system and method for the illumination compensation state for video coding
CN109819255A (en) * 2018-12-28 2019-05-28 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107710764A (en) * 2015-06-09 2018-02-16 高通股份有限公司 It is determined that the system and method for the illumination compensation state for video coding
CN109819255A (en) * 2018-12-28 2019-05-28 杭州海康威视数字技术股份有限公司 A kind of decoding method and its equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CE4-related: Simplification to History Based Motion Vector Prediction;Jie Zhao;《Joint Video Experts Team (JVET)of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 1112th Meeting: Macao, CN》;20181012;全文 *

Also Published As

Publication number Publication date
CN112073734A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
KR101440610B1 (en) Apparatus and method for image incoding/decoding
CN107277545B (en) Encoding device and method, decoding device and method, and storage medium
EP3070944B1 (en) Video encoding and decoding with improved motion vector diversity
AU2019416266A1 (en) Video encoding and decoding
GB2492778A (en) Motion compensated image coding by combining motion information predictors
CN112118451B (en) Encoding and decoding method, device and equipment
CN112073734B (en) Encoding and decoding method, device and equipment
CN112449180B (en) Encoding and decoding method, device and equipment
CN113747166B (en) Encoding and decoding method, device and equipment
CN111510726B (en) Coding and decoding method and equipment thereof
CN110662074B (en) Motion vector determination method and device
CN112565747A (en) Decoding and encoding method, device and equipment
CN112543322B (en) Decoding and encoding method, device and equipment
CN110691247B (en) Decoding and encoding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant