Encoding method and apparatus, decoding method and apparatus, bitstream, decoder, encoder, and storage medium
By improving the first candidate list of video codec and generating a new motion information candidate list for inter-frame prediction, the problem of insufficient inter-frame prediction accuracy in the existing technology is solved, and more efficient video codec performance and code byte reduction are achieved.
Patent Information
- Application Number
- PCT/CN2024/087589
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-04-12
- Publication Date
- 2025-10-16
AI Technical Summary
The inter-frame prediction in the existing video coding and decoding standards has the problem of poor video coding and decoding performance, and it is difficult to further improve the accuracy of the inter-frame prediction.
By improving the first candidate list, new motion information candidates are determined, and based on these candidates, a second candidate list is generated for inter-frame prediction. The motion information candidate indexes in the second candidate list are directly written into the bitstream to avoid directly using the motion information candidate indexes in the first candidate list.
The accuracy of inter-frame prediction is improved, video encoding and decoding performance is enhanced, and codeword overhead is saved.
Smart Images

Figure CN2024087589_16102025_PF_FP_ABST
Abstract
Description
Coding method and device, code stream, decoder, encoder, and storage medium TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of video coding, and in particular to a coding method and device, a code stream, a decoder, and an encoder. BACKGROUND
[0002] In the field of video coding, how to enhance the video compression efficiency is crucial. During the digitalization of images and videos, a large amount of data redundancy is generated, which makes video compression technology possible. A video is composed of multiple images. In order to make the video look smooth, dozens or even hundreds of images per second are included in the video, such as 24 frames per second, 30 frames per second, 50 frames per second, 60 frames per second, or 120 frames per second. Therefore, there is a very obvious temporal redundancy in the video. Or in other words, there is a relatively high temporal correlation in the video. Inter prediction utilizes this temporal correlation to improve the compression efficiency.
[0003] However, the inter prediction in the existing video coding standard has the problem of poor video coding performance. Therefore, it is still of certain significance to study how to further improve the accuracy of inter prediction and thus enhance the video coding performance.
[0004] SUMMARY
[0005] Embodiments of the present application provide a coding method and device, a code stream, a decoder, an encoder, and a storage medium, which can further improve the coding performance.
[0006] In a first aspect, embodiments of the present application provide a decoding method applied to a decoder, including: determining a first candidate list of a current block, the first candidate list including at least one first motion information candidate; determining at least one second motion information candidate according to the first motion information candidate; wherein a motion vector (MV) in the second motion information candidate is different from an MV in the first motion information candidate; determining a second candidate list according to at least one second motion information candidate and the first candidate list; decoding a code stream to determine a motion information candidate index of the current block; determining an inter prediction value of the current block according to the motion information candidate index of the current block and the second candidate list; and determining a reconstructed value of the current block according to the inter prediction value of the current block.
[0007] In the decoding method provided in the embodiments of the present application, instead of directly using a certain motion information candidate in the first candidate list to perform inter prediction, the first candidate list is first improved, that is, a new motion information candidate (i.e., a second motion information candidate) is determined according to at least one first motion information candidate in the first candidate list; a second candidate list is determined based on at least one second motion information candidate and the first candidate list; and then the current block is inter predicted by using the motion information candidate in the second candidate list carried in the motion information candidate index in the code stream; in this way, the accuracy of inter prediction of the current block is improved, the reconstruction quality of the current block is improved, and the decoding performance is enhanced.
[0008] In the second aspect, the embodiments of the present application provide an encoding method for an encoder, comprising: determining a first candidate list of a current block, wherein the first candidate list comprises at least one first motion information candidate; determining at least one second motion information candidate according to the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; determining a second candidate list according to at least one second motion information candidate and the first candidate list; determining a motion information candidate index of the current block according to the second candidate list; and encoding the motion information candidate index of the current block, and writing the encoded bits into a code stream.
[0009] In the encoding method provided in the embodiments of the present application, instead of directly writing a certain motion information candidate index in the first candidate list into the code stream, the first candidate list is first improved, that is, a new motion information candidate (i.e., a second motion information candidate) is determined according to at least one first motion information candidate in the first candidate list; a second candidate list is determined based on at least one second motion information candidate and the first candidate list; and finally a certain motion information candidate index in the second candidate list is written into the code stream; in this way, the accuracy of inter prediction of the current block is improved, and the code word overhead is saved.
[0010] In a third aspect, an embodiment of the present application provides a decoding apparatus for a decoder, comprising: a first determining module configured to determine a first candidate list of a current block, the first candidate list comprising at least one first motion information candidate; a second determining module configured to determine at least one second motion information candidate according to the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; a third determining module configured to determine a second candidate list according to the at least one second motion information candidate and the first candidate list; a decoding module configured to decode a bitstream to determine a motion information candidate index of the current block; a fourth determining module configured to determine an inter prediction value of the current block according to the motion information candidate index of the current block and the second candidate list; and a fifth determining module configured to determine a reconstructed value of the current block according to the inter prediction value of the current block.
[0011] In a fourth aspect, an embodiment of the present application provides an encoding apparatus for an encoder, comprising: a sixth determining module configured to determine a first candidate list of a current block, the first candidate list comprising at least one first motion information candidate; a seventh determining module configured to determine at least one second motion information candidate according to the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; an eighth determining module configured to determine a second candidate list according to the at least one second motion information candidate and the first candidate list; a ninth determining module configured to determine a motion information candidate index of the current block according to the second candidate list; and an encoding module configured to encode the motion information candidate index of the current block and write the encoded bits into a bitstream.
[0012] In a fifth aspect, an embodiment of the present application provides a decoder, comprising a first memory and a first processor; wherein the first memory is configured to store a computer program capable of running on the first processor; and the first processor is configured to execute the decoding method according to the embodiments of the present application when running the computer program.
[0013] In a sixth aspect, an embodiment of the present application provides an encoder, comprising a second memory and a second processor; wherein the second memory is configured to store a computer program capable of running on the second processor; and the second processor is configured to execute the method according to the first aspect when running the computer program.
[0014] In a seventh aspect, an embodiment of the present application provides a bitstream, which is generated by bit-encoding a motion information candidate index of a current block; wherein the motion information candidate index of the current block is obtained by the encoding method according to the embodiments of the present application.
[0015] In an eighth aspect, an embodiment of the present application provides an electronic device, comprising: a processor adapted to execute a computer program; and a computer readable storage medium having stored therein a computer program, which, when executed by the processor, implements the method according to the first aspect, or which, when executed by the processor, implements the method according to the second aspect.
[0016] In a ninth aspect, an embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, which, when executed, implements the method according to the first aspect, or implements the method according to the second aspect.
[0017] In a tenth aspect, an embodiment of the present application provides a computer program product comprising a computer program or instructions, which, when executed by a processor, implements the method according to the first aspect, or which, when executed by a processor, implements the method according to the second aspect.
[0018] It should be understood that the general description above and the detailed description below are only exemplary and explanatory, and are not limiting of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and serve to explain the technical solutions of the present application. It is obvious that the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0020] The flowcharts shown in the drawings are only exemplary descriptions, and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further divided, and some operations / steps can be combined or partially combined, so the actual execution order can be changed according to the actual situation.
[0021] FIG. 1 is a schematic block diagram of an encoding framework according to an embodiment of the present application;
[0022] FIG. 2 is a schematic block diagram of a decoding framework according to an embodiment of the present application;
[0023] FIG. 3 is an example diagram of unidirectional prediction;
[0024] FIG. 4 is an example diagram of bidirectional prediction;
[0025] FIG. 5 is a schematic diagram of screening BCW weights based on template matching;
[0026] FIG. 6 is an example diagram of template matching searching around an initial MV / BV;
[0027] FIG. 7 is a schematic diagram of an implementation flow of an encoding method according to an embodiment of the present application;
[0028] FIG. 8 is a schematic diagram of an implementation flow of step 702 according to an embodiment of the present application;
[0029] FIG. 9 is a schematic diagram of an implementation flow of a second MV determination method according to an embodiment of the present application;
[0030] FIG. 10 is an example diagram of a first reference picture list and a second reference picture list;
[0031] FIG. 11 is a schematic diagram of an implementation flow of a second MV determination method according to another embodiment of the present application;
[0032] FIG. 12 is an example diagram of obtaining an MV1 on a reference picture in RefPicList1 through an MV0 according to an embodiment of the present application;
[0033] FIG. 13 is a schematic diagram of an implementation flow of step 703 according to an embodiment of the present application;
[0034] FIG. 14A is an example diagram of generating a prediction value in a template region according to an MV0, RefPic0 according to an embodiment of the present application;
[0035] FIG. 14B is an example diagram of generating a prediction value in a template region according to an MV0, RefPic0, MV1, RefPic1 according to an embodiment of the present application;
[0036] FIG. 15 is a schematic diagram of an implementation flow of step 1302 according to an embodiment of the present application;
[0037] FIG. 16 is a schematic diagram of an implementation flow of an encoding method according to another embodiment of the present application;
[0038] FIG. 17 is a schematic diagram of an implementation flow of a decoding method according to an embodiment of the present application;
[0039] FIG. 18 is a flowchart of determining a final merge mode list according to an embodiment of the present application;
[0040] FIG. 19 is a schematic block diagram of an encoding apparatus according to an embodiment of the present application;
[0041] FIG. 20 is a schematic block diagram of a decoding apparatus according to an embodiment of the present application;
[0042] FIG. 21 is a schematic block diagram of a decoder according to an embodiment of the present application;
[0043] FIG. 22 is a schematic block diagram of an encoder according to an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will further describe the specific technical solutions of the present application with reference to the drawings in the embodiments of the present application. The following embodiments are used to explain the present application, but are not used to limit the scope of the present application.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification is for describing the embodiments of the present application only and is not intended to limit the present application.
[0046] In the following description, “some embodiments”, “this embodiment”, “embodiments of the present application” and the like describe a subset of all possible embodiments, but it should be understood that “some embodiments” can be the same subset or different subsets as each other and can be combined with each other without conflict.
[0047] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0048] The scheme provided by the embodiments of the present application can be applied to the field of digital video coding, for example, including but not limited to: the field of image coding, the field of video coding, the field of hardware video coding, the field of special circuit video coding, and the field of real-time video coding, etc. The scheme provided by the embodiments of the present application can be applied to the potential fourth generation AVS standard (AVS4), H.267 standard. In addition, the scheme provided by the embodiments of the present application can also be combined with the audio video coding standard (AVS), the second generation AVS standard (AVS2) or the third generation AVS standard (AVS3). For example, including but not limited to: H.264 / audio video coding (AVC) standard, H.265 / high efficiency video coding (HEVC) standard, and H.266 / versatile video coding (VVC) standard. In addition, the scheme provided by the embodiments of the present application can be used for lossy compression of images, or can be used for lossless compression of images. The lossless compression can be visually lossless compression or mathematically lossless compression.
[0049] Video coding standards employ a hybrid coding framework based on blocks. Specifically, each picture in a video is partitioned into square-shaped largest coding units (LCUs) or coding tree units (CTUs) of the same size, such as 128x128, 64x64, etc. Each LCU or CTU can be recursively split into rectangular coding units (CUs) according to a rule. A CU can be further split into prediction units (PUs), transform units (TUs), etc. The hybrid coding framework includes modules of prediction, transform, quantization, entropy coding, in loop filter, etc. The prediction module includes intra prediction and inter prediction. Inter prediction includes motion estimation and motion compensation. Since there is a strong similarity between adjacent pictures in a video, inter prediction is used in video coding techniques to eliminate temporal redundancy between adjacent pictures, thereby improving coding efficiency. Inter prediction can refer to picture information of different frames to search for motion vector information matching a current divided block using motion estimation. Transform converts the predicted image block to the frequency domain, energy is redistributed, and combined with quantization, information that is not sensitive to the human eye can be removed to eliminate visual redundancy. Entropy coding can eliminate character redundancy according to the current context model and the probability information of the binary code stream.
[0050] In a digital video encoding process, an encoder can read a black-and-white image or a color image from an original video sequence first, and then encode the black-and-white image or the color image. The black-and-white image can include pixels of a luma component, and the color image can include pixels of a chroma component. Alternatively, the color image can also include pixels of the luma component. The color format of the original video sequence can be a luma-chroma (YCbCr, YUV) format or a red-green-blue (RGB) format, etc. Specifically, after the encoder reads a black-and-white image or a color image, the encoder divides the black-and-white image or the color image into blocks respectively, and generates a prediction block of a current block using intra prediction or inter prediction on the current block, subtracts the prediction block from the original block of the current block to obtain a residual block, performs transform and quantization on the residual block to obtain a quantized coefficient matrix, and performs entropy encoding on the quantized coefficient matrix and outputs the quantized coefficient matrix to a bitstream. In a digital video decoding process, a decoder generates a prediction block of a current block using intra prediction or inter prediction on the current block. In addition, the decoder decodes the bitstream to obtain a quantized coefficient matrix, performs inverse quantization and inverse transform on the quantized coefficient matrix to obtain a residual block, and adds the prediction block and the residual block to obtain a reconstructed block. The reconstructed block can be used to compose a reconstructed image, and the decoder performs loop filtering on the reconstructed image based on the image or based on the block to obtain a decoded image.
[0051] The current block can be a current coding unit (CU) or a current prediction unit (PU), etc.
[0052] It should be noted that the encoding end also needs to perform similar operations as the decoding end to obtain a decoded image. The decoded image can be used as a reference image for inter prediction of subsequent image frames. The block division information determined by the encoding end, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information, if necessary, need to be output to the bitstream. The decoding end determines the same block division information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information by parsing and analyzing the existing information, so as to ensure that the decoded image obtained by the encoding end is the same as the decoded image obtained by the decoding end. The decoded image obtained by the encoding end is also commonly referred to as a reconstructed image. The current block can be divided into a prediction unit during prediction, and can be divided into a transformation unit during transformation. The division of the prediction unit and the transformation unit can be the same or different. Of course, the above is only the basic process of the video codec based on the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework can be optimized. The basic process of the video codec or the video coding framework described in the embodiments of the present application is to more clearly illustrate the technical solutions provided by the embodiments of the present application, and does not constitute a limitation on the technical solutions provided by the embodiments of the present application. It is known to those skilled in the art that, with the evolution of the basic process of the video codec or the video coding framework and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0053] For ease of understanding, the video coding framework provided by the present application will be briefly introduced first.
[0054] FIG. 1 is a schematic block diagram of a video coding framework 100 provided by an embodiment of the present application.
[0055] As shown in FIG. 1, the video coding framework 100 can include an intra prediction unit 180, an inter prediction unit 170, a residual unit 110, a transformation and quantization unit 120, an entropy coding unit 130, an inverse transformation and inverse quantization unit 140, and a loop filtering unit 150. Optionally, the coding framework 100 can also include a decoded image buffer unit 160. The coding framework 100 can also be referred to as a hybrid framework coding mode.
[0056] The intra prediction unit 180 or the inter prediction unit 170 can perform prediction on the image block to be coded to output a prediction block. The residual unit 110 can calculate a residual block based on the prediction block and the image block to be coded, i.e., the difference between the prediction block and the image block to be coded. The transform and quantization unit 120 is configured to perform transform and quantization on the residual block to remove information that is not sensitive to human eyes, thereby eliminating visual redundancy. Optionally, the residual block before being transformed and quantized by the transform and quantization unit 120 can be referred to as a time domain residual block, and the residual block after being transformed and quantized by the transform and quantization unit 120 can be referred to as a frequency residual block or a frequency domain residual block. The entropy coding unit 130 receives the transform and quantization coefficients output by the transform and quantization unit 120 and outputs a bitstream based on the transform and quantization coefficients. For example, the entropy coding unit 130 can eliminate character redundancy based on a target context model and probability information of a binary code stream. For example, the entropy coding unit 130 can be configured to perform context-based adaptive binary arithmetic coding (CABAC). The entropy coding unit 130 can also be referred to as a header information coding unit. Optionally, in this application, the image block to be coded can also be referred to as an original image block or a target image block, the prediction block can also be referred to as a predicted image block or an image prediction block, and can also be referred to as a prediction signal or prediction information, and the reconstructed block can also be referred to as a reconstructed image block or an image reconstructed block, and can also be referred to as a reconstructed signal or reconstructed information. In addition, for the encoding end, the image block to be coded can also be referred to as a coding block or a coding image block, and for the decoding end, the image block to be coded can also be referred to as a decoding block or a decoding image block. The image block to be coded can be a CTU or a CU.
[0057] The encoding framework 100 transmits the residual block obtained by calculating the residual between the prediction block and the image block to be coded to the decoding end via a transform and quantization process. Correspondingly, after receiving and decoding the bitstream, the decoding end obtains the residual block via a reverse transform and reverse quantization process, and obtains the reconstructed block by superimposing the prediction block predicted by the decoding end on the residual block.
[0058] It should be noted that the reverse transform and reverse quantization unit 140, the loop filter unit 150, and the decoded image buffer unit 160 in the encoding framework 100 can be used to form a decoder. That is, the intra prediction unit 180 or the inter prediction unit 170 can perform prediction on the image block to be coded based on the reconstructed block, thereby ensuring that the understanding of the reference image by the encoding end and the decoding end is consistent. In other words, the encoder can replicate the processing loop of the decoder, thereby generating the same prediction as the decoding end. Specifically, the quantized transform coefficients are reverse transformed and reverse quantized by the reverse transform and reverse quantization unit 140 to replicate the approximate residual block of the decoding end. The approximate residual block plus the prediction block can be filtered by the loop filter unit 150 to smooth the block effect and the like caused by the block-based processing and quantization. The image block output by the loop filter unit 150 can be stored in the decoded image buffer unit 160 for use in the prediction of subsequent images.
[0059] It should be understood that FIG. 1 is merely an example of the present application and should not be understood as a limitation of the present application.
[0060] For example, the loop filter 150 in the encoding framework 100 can include a DeBlocking Filter (DBF) and a Sample Adaptive Offset (SAO) filter. The function of the DBF is to remove blocking effects, and the function of the SAO is to remove ringing effects. In other embodiments of the present application, the encoding framework 100 can use a neural network-based loop filtering algorithm to improve the compression efficiency of the video. In other words, the encoding framework 100 can be a hybrid framework of video encoding based on a deep learning neural network. In one implementation, a convolutional neural network-based model can be used to calculate the result of pixel filtering based on the DeBlocking Filter and the Sample Adaptive Offset filter. The network structure of the loop filter 150 on the luminance component and the chrominance component can be the same or different. Considering that the luminance component contains more visual information, the luminance component can also be used to guide the filtering of the chrominance component to improve the reconstruction quality of the chrominance component.
[0061] FIG. 2 is a schematic block diagram of a decoding framework 200 according to an embodiment of the present application.
[0062] As shown in FIG. 2, the decoding framework 200 can include an entropy decoding unit 210, an inverse transform and inverse quantization unit 220, a residual unit 230, an intra prediction unit 240, an inter prediction unit 250, a loop filter 260, and a decoded image buffer unit 270. The entropy decoding unit 210 receives and parses the code stream to obtain a prediction block and a frequency domain residual block. For the frequency domain residual block, the inverse transform and inverse quantization unit 220 performs inverse transform and inverse quantization, and the time domain residual block is obtained. The residual unit 230 superimposes the prediction block obtained by the intra prediction unit 240 or the inter prediction unit 250 on the time domain residual block obtained by the inverse transform and inverse quantization unit 220, and the reconstruction block is obtained.
[0063] It should be understood that FIG. 2 is merely an example of the present application and should not be understood as a limitation of the present application.
[0064] In order to facilitate understanding of the technical solutions of the present application, the related content is described as follows.
[0065] (1) The following first describes the single prediction and the double prediction.
[0066] In inter-frame prediction, the inter-frame prediction value of the current block is obtained through motion compensation that is greater than or equal to a motion vector. Common inter-frame prediction methods are unidirectional prediction and bidirectional prediction. Unidirectional prediction uses a motion vector and a reference image to find a reference block and complete the prediction. Bidirectional prediction uses two motion vectors and two reference images to find two reference blocks and complete the prediction.
[0067] FIG3 is an example diagram of unidirectional prediction. As shown in FIG3 , a current block CurBlock in a current image CurPic points to a reference image in a reference image list RefPicList0 through a motion vector Mv0 to find a reference block RefBlock.
[0068] Figure 4 is an example diagram of bidirectional prediction. As shown in Figure 4, the current block CurBlock in the current image CurPic points to a frame of reference image in the reference image list RefPicList0 through a motion vector Mv0, and finds a reference block RefBlock0; and points to a frame of reference image in the reference image list RefPicList1 through another motion vector Mv1, and finds another reference block RefBlock1.
[0069] In some standards or reference software, the bi-prediction with CU-level weights (BCW) technology is introduced. For example, in VVC and ECM, the bi-prediction can be calculated by the following formula to obtain the inter-frame prediction value P of the current block. bi-pred : P bi-pred =((8-w)*P0+w*P1+4)>>3
[0070] Among them, P0 and P1 are the predicted values obtained by the two motion vectors of the two reference images, w is the weighted weight, P bi-pred is the weighted value of bidirectional prediction. In the ECM reference software, the value of w in merge mode can be one of the seven values {1, 2, 3, 4, 5, 6, 7}.
[0071] (2) The merge mode of inter-frame prediction is explained below.
[0072] Merge mode for inter-frame prediction constructs a merge list containing several motion information blocks and then encodes / decodes the list index value to determine the motion information used for the current block. This directly encodes / decodes the index value to determine the motion information for the current block, significantly reducing codeword overhead compared to directly encoding / decoding motion information and achieving better codec compression efficiency. Motion information in merge mode can be unidirectional or bidirectional.
[0073] The construction of the merge list in VVC includes the following motion information:
[0074] 1) the motion information of spatial neighboring coding units;
[0075] 2) the temporal motion information on the co-located picture;
[0076] 3) the history-based motion information from a FIFO table;
[0077] 4) the pairwise averaged motion information.
[0078] In ECM, the motion information of spatial non-adjacent coding units and the chained motion vector prediction are further included in the candidate motion information of the merge list.
[0079] It should be noted that the above-described merge list can also be called a merge mode list, and the motion information in the merge list can also be called a motion information candidate. The first candidate list described in the embodiments of the present application can be the above-described merge list.
[0080] (3) The following describes the adjustment method of the bi-directional weighting weight in the merge mode.
[0081] In VVC, the BCW technology can assign different weights to the current bi-prediction according to different current blocks. In the merge mode, whether the BCW is enabled and the weight assigned by the BCW is directly inherited from the motion information in the merge list; and in the non-merge mode, the coding unit determines whether to start the BCW according to the identification of the BCW enable parsed from the code stream, and when the BCW is started, the weighting weight is further determined according to the syntax elements related to the BCW weighting weight parsed.
[0082] In ECM, the template matching is introduced to determine whether the BCW weight inherited in the merge mode needs to be adjusted.
[0083] Figure 5 is a diagram illustrating template matching based BCW selection. As shown in Figure 5, L-shaped reconstructed region RecTemp around the current block CurBlockO is the template region for matching, RefTempO and RefTempi are the corresponding positions of RefTempO and RefTempi found by MvO and MvI, and RefPred is the predicted value of the template region generated by weighting RefTempO and RefTempi: RefPred = ((8-w)*RefTempO + w*RefTempi + 4) » 3
[0084] wherein RefTempO and RefTempi are reconstructed values.
[0085] By selecting one from the predefined candidate weights that can minimize the difference between RefPred and RecTemp, the original inherited weight from the motion information can be replaced. The difference value can be sum of absolute difference (SAD), mean removed sum of absolute difference (MRSAD), or sum of square error (SSE), etc.
[0086] (4) The template matching technique is described as follows.
[0087] The template matching technique described herein refers to a technique that finds a pointing position by a given initial MV or BV and searches for a better MV and BV within a predetermined range around the pointing position in the inter prediction or IBC prediction mode. The template matching technique is controlled by a coding unit level flag tmMergeFlag. When the flag is true, the encoder / decoder obtains that the initial MV or BV of the current coding unit needs to be further optimized by the template matching technique, otherwise, no further optimization is needed.
[0088] The optimization process is described as follows.
[0089] If the current block uses single prediction, the template matching based search method is shown in Figure 6. By finding a set of L-shaped reference regions (e.g., the reference region with the minimum cost difference is the reference template 605 shown in Figure 6) that can minimize the cost difference of the L-shaped template 604 around the current block (Current CU) 603 of the current picture / current frame (Current Frame) 602 within the search range (Search range) 601, the position difference value between the reference region and the current block 603 is the optimized MV / BV. As shown in Figure 6, the search range 601 is the region in the reference picture / reference frame (Reference frame) 606 pointed by the inter prediction MV (Initial MV) in the motion information.
[0090] If the current block 603 uses bidirectional prediction, meaning that the current block 603 has two MVs (MV0 and MV1) pointing to different reference pictures, the template matching search process is to first search Mv0' and MV1' with the minimum template cost in the given area based on the initial MV0, MV1 respectively. If the cost of MV0' is smaller than that of MV1', further search MV1" with a smaller weighted cost of MV0' based on MV0'; if the cost of MV1' is smaller than that of MV0', further search MV0" with a smaller weighted cost of MV1' based on MV1'. Then, it is determined whether to use bidirectional prediction or unidirectional prediction by comparing the minimum weighted cost with the cost of Mv0' and Mv1'.
[0091] The encoding method and the decoding method provided by the embodiments of the present application are described as follows.
[0092] FIG. 7 is a schematic diagram of an implementation process of an encoding method provided by an embodiment of the present application, which can be applied to an encoder. As shown in FIG. 7, the method includes the following steps 701 to 705.
[0093] Step 701: determining a first candidate list of a current block, wherein the first candidate list includes at least one first motion information candidate;
[0094] Step 702: determining at least one second motion information candidate according to the first motion information candidate, wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate;
[0095] Step 703: determining a second candidate list according to the at least one second motion information candidate and the first candidate list;
[0096] Step 704: determining a motion information candidate index of the current block according to the second candidate list;
[0097] Step 705: encoding the motion information candidate index of the current block and writing the encoded bits into a bitstream.
[0098] In the embodiments of the present application, instead of directly writing a certain motion information candidate index in the first candidate list into a bitstream, the first candidate list is first improved, that is, new motion information candidates (i.e. second motion information candidates) are determined according to at least one first motion information candidate in the first candidate list; a second candidate list is determined based on the at least one second motion information candidate and the first candidate list; and finally a certain motion information candidate index in the second candidate list is written into a bitstream; in this way, the accuracy of inter-frame prediction of the current block is improved, thereby saving the code word overhead.
[0099] Further optional implementation and related terms of each step are described as follows.
[0100] In step 701, a first candidate list of the current block is determined, and the first candidate list includes at least one first motion information candidate.
[0101] In the embodiments of the present application, the determination method of the first candidate list is not limited, and the encoder or the decoder can use various methods to construct the first candidate list, and in general, at least one first motion information candidate is included in the list.
[0102] In some embodiments, for the current block, the encoder or the decoder can enable the merge mode of inter prediction, and construct a merge list including several motion information candidates as the first candidate list.
[0103] Further, in some embodiments, the first candidate list can include but is not limited to at least one of the following list 1-list 4:
[0104] List 1: a regular merge list;
[0105] List 2: a template matching based merge list;
[0106] List 3: a merge list of combined intra-inter prediction (CIIP) merge mode;
[0107] List 4: a merge list of merge mode with motion vector difference (MMVD).
[0108] In a possible implementation, the first motion information candidate in the first candidate list includes but is not limited to at least one of the following (1)-(6):
[0109] (1) motion information of a spatially adjacent coding unit;
[0110] (2) time domain motion information on a co-located picture;
[0111] (3) history-based motion information from a FIFO table;
[0112] (4) pairwise averaged motion information;
[0113] (5) motion information of spatial non-adjacent coding units;
[0114] (6) Chained motion vector prediction.
[0115] It can be understood that inter prediction uses motion information to represent "motion". Basic motion information includes information of reference picture and information of MV. In order to use bi-prediction, a block naturally needs to find 2 reference blocks, so 2 sets of information of reference picture and information of MV are needed. Each set can be understood as a single-direction motion information, and the 2 sets are combined to form a bi-directional motion information. In specific implementation, the single-direction motion information and the bi-directional motion information can use the same data structure, only the 2 sets of information of reference picture and information of MV of the bi-directional motion information are valid, while one set of information of reference picture and information of MV of the single-direction motion information is invalid. The valid can be understood as "use", and the invalid can be understood as "not use".
[0116] It can be understood that the motion information candidate (whether the first motion information candidate or the second motion information candidate) described in the embodiments of the present application can be understood as the candidate motion information.
[0117] In the present application, it can also be considered that the information of reference picture (such as reference picture index) and the flag of whether to use the corresponding motion information in the motion information are the accessories of the motion vector. Therefore, the "motion information" can also be described as "motion vector". The "motion information" can also be called "motion parameter".
[0118] In step 702, at least one second motion information candidate is determined according to the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate.
[0119] In the embodiments of the present application, the MV in the second motion information candidate is different from the MV in the first motion information candidate, which can be that the number of MVs in the two motion information candidates is different, one is bi-prediction and the other is single-prediction. The MV in the second motion information candidate is different from the MV in the first motion information candidate, which can be that the number of MVs in the two motion information candidates is the same but the direction and / or reference picture pointed by the MV is different.
[0120] It should be understood that, in the embodiments of the present application, at least one second motion information candidate is determined based on at least one first motion information candidate in the first candidate list. That is, in the embodiments of the present application, the second motion information candidate can be generated based on one or more first motion information candidates in the first candidate list. Step 702 describes that at least one second motion information candidate is determined based on one first motion information candidate. However, the at least one second motion information candidate described in step 703 can be obtained based on one first motion information candidate, or can be obtained by performing step 702 on multiple first motion information candidates.
[0121] In the embodiments of the present application, the first motion information candidate can be bi-prediction or uni-prediction. For the first motion information candidate of uni-prediction, the uni-prediction second motion information candidate and / or the bi-prediction second motion information candidate can be determined based on the first motion information candidate. For the first motion information candidate of bi-prediction, the uni-prediction second motion information candidate and / or the bi-prediction second motion information candidate can be determined based on the first motion information candidate. The present application does not make any limitation in this regard.
[0122] For the case where the first motion information candidate is uni-prediction, in some embodiments, as shown in FIG. 8, step 702 described above can be implemented by steps 7021 and 7022 as follows:
[0123] Step 7021, in the case where the first motion information candidate is uni-prediction, at least one second MV is determined based on the first MV in the first motion information candidate.
[0124] For the first motion information candidate of uni-prediction, one MV can be included or two MVs can be included. For the case where one MV is included, the first MV described in step 7021 is the MV. For the case where two MVs are included in the first motion information candidate of uni-prediction, as described above, one of the MVs is identified as invalid, and the first MV described in step 7021 can be the MV identified as valid or the MV identified as invalid.
[0125] Further, for how to determine the second MV based on the first MV, refer to the embodiments described below, and the present application does not make any description in this regard. In addition, in the embodiments of the present application, the number of second MVs determined based on one first MV is not limited, and can be one or multiple.
[0126] Step 7022, at least one second motion information candidate is determined based on the at least one second MV.
[0127] It should be understood that, in the embodiments of the present application, the second motion information candidate of uni-prediction and / or the second motion information candidate of bi-prediction can be determined based on the at least one second MV. That is, the at least one second motion information candidate described in step 7022 can include the second motion information candidate of uni-prediction and / or the second motion information candidate of bi-prediction. That is, step 7022 can be implemented by at least one of Embodiment 1 to Embodiment 3.
[0128] In Embodiment 1, the second motion information candidate of uni-prediction is determined according to the second MV. For example, the second motion information candidate of uni-prediction includes the second MV, the identification information identifying that the second MV is valid, and the index of the reference picture pointed to by the second MV.
[0129] In the embodiments of the present application, the corresponding current predicted second motion information candidate can be determined based on part or all of the at least one second MV described in step 7022.
[0130] In some embodiments, the mth second motion information candidate of uni-prediction can be generated according to the mth second MV; wherein the mth second MV is any one of the at least one second MV described in step 7022, and m is greater than 0 and less than or equal to the number of the second MVs.
[0131] In Embodiment 2, at least one first MV pair is combined according to the at least one second MV and the first MV, and the second motion information candidate of bi-prediction is determined according to the first MV pair; wherein the directions of the two MVs in the first MV pair are different.
[0132] In a possible implementation, the first MV pair includes one first MV and one second MV, and the second MVs included in different first MV pairs are different.
[0133] In Embodiment 3, at least one first MV pair is combined according to the at least one second MV, and the second motion information candidate of bi-prediction is determined according to the first MV pair; wherein the directions of the two MVs in the first MV pair are different.
[0134] It should be understood that Embodiment 3 is implemented when the second MVs are multiple. In a possible implementation, any two second MVs with different directions in the multiple second MVs can be combined to obtain a first MV pair.
[0135] It should be noted that, in the embodiments of the present application, for the first motion information candidate of the unidirectional prediction, the step 7022 can be implemented by using the above-mentioned embodiment 1, embodiment 2 or embodiment 3, or can be implemented by using any two of the above-mentioned embodiment 1, embodiment 2 and embodiment 3 in combination, or can be implemented by using the combination of embodiment 1, embodiment 2 and embodiment 3, so as to obtain at least one second motion information candidate.
[0136] For the case that the first motion information candidate is bidirectional prediction, the following embodiment 4 and / or embodiment 5 can be used to implement the “determining at least one second motion information candidate according to the first motion information candidate” of the step 7022.
[0137] In the embodiment 4, the “determining at least one second motion information candidate according to the first motion information candidate” of the step 7022 can be implemented as follows: in the case that the first motion information candidate is bidirectional prediction, determining at least one second MV according to the first MV in the first motion information candidate; and / or, determining at least one fourth MV according to the third MV in the first motion information candidate; wherein the direction of the second MV is different from that of the fourth MV; and determining at least one second motion information candidate according to the at least one second MV and / or the at least one fourth MV.
[0138] It can be understood that the above-mentioned embodiments include a plurality of combination schemes, wherein the combination scheme 1 to the combination scheme 3 are described as follows:
[0139] In the combination scheme 1, in the case that the first motion information candidate is bidirectional prediction, determining at least one second MV according to the first MV in the first motion information candidate; and determining at least one fourth MV according to the third MV in the first motion information candidate; and determining at least one second motion information candidate according to the at least one second MV and the at least one fourth MV; wherein the direction of the second MV is different from that of the fourth MV.
[0140] In the combination scheme 2, in the case that the first motion information candidate is bidirectional prediction, determining at least one second MV according to the first MV in the first motion information candidate; and determining at least one second motion information candidate according to the at least one second MV.
[0141] In the combination scheme 3, in the case that the first motion information candidate is bidirectional prediction, determining at least one fourth MV according to the third MV in the first motion information candidate; and determining at least one second motion information candidate according to the at least one fourth MV.
[0142] For the embodiments described above, the at least one second motion information candidate is determined according to at least one second MV and / or at least one fourth MV. In some embodiments, the at least one second motion information candidate is determined according to the second MV, and / or the at least one second motion information candidate is determined according to the fourth MV, and / or at least one second MV pair is combined according to the first MV, the at least one second MV, the third MV and / or the at least one fourth MV, and a bi-predictive second motion information candidate is determined according to the second MV pair. The two MVs in the second MV pair are different in direction, and the at least one second MV pair does not include the MV pair combined from the first MV and the third MV.
[0143] It can be understood that a uni-predictive second motion information candidate can be determined based on one second MV. For example, the uni-predictive second motion information candidate includes the second MV. A uni-predictive second motion information candidate can be determined based on one fourth MV. For example, the uni-predictive second motion information candidate includes the fourth MV. In the embodiments of the present application, the number of uni-predictive second motion information candidates determined is not limited. A respective uni-predictive second motion information candidate can be determined based on part of the second MVs and / or part of the fourth MVs, or a respective uni-predictive second motion information candidate can be determined based on all the second MVs and / or all the fourth MVs. Similarly, the number of second MV pairs combined is not limited.
[0144] It can be understood that, for the case where the first motion information candidate is bi-predictive, in the embodiments described above, new MVs (i.e., the second MV and / or the fourth MV) are determined based on the MVs in the first motion information candidate, and the second motion information candidate is determined based on part or all of the MVs. Of course, in other embodiments, i.e., in Embodiment 5, the second motion information candidate can also be obtained as follows: in the case where the first motion information candidate is bi-predictive, a uni-predictive second motion information candidate is determined according to the first MV in the first motion information candidate, and / or a uni-predictive second motion information candidate is determined according to the third MV in the first motion information candidate. For example, one uni-predictive second motion information candidate includes the first MV, and another uni-predictive second motion information candidate includes the third MV.
[0145] Embodiment 5 can not be limited by conditions such as syntax elements. For example, even if a certain high-level syntax element indicates that a coding mode in which MV search is not performed using template matching is used, the method described in Embodiment 5 can be used to determine the second candidate list.
[0146] It should be noted that, for the first motion information candidate of bi-prediction, the at least one second motion information candidate can be determined by using the above-mentioned embodiment 4 and / or embodiment 5.
[0147] It can be understood that the above describes how to determine the new motion information candidate (i.e., the second motion information candidate) based on the first motion information candidate in the first candidate list, which involves the operation of determining the at least one second MV based on the first MV in the first motion information candidate. For the first motion information candidate of bi-prediction, it can also involve the operation of determining the at least one fourth MV based on the third MV in the first motion information candidate. Of course, the determination method of the at least one fourth MV is the same as that of the at least one second MV, only the input MV is different, the former input MV is the third MV, and the latter input MV is the first MV. Therefore, for the determination method of the fourth MV, refer to the determination method of the second MV as follows.
[0148] For the above-mentioned "determining the at least one second MV based on the first MV in the first motion information candidate", in some embodiments, as shown in FIG. 9, it can be implemented by the following steps 901 to 903:
[0149] Step 901, obtaining the POC of at least one frame of first reference image and / or the POC of at least one frame of second reference image; wherein the first reference image is the image in the first direction of the first MV, and the second reference image is the image in the second direction, and the second direction is opposite to the first direction.
[0150] It can be understood that the POC (picture order count) can be used as an identifier of an image, which represents the playing sequence number of the image in a video.
[0151] In some embodiments, the at least one frame of first reference image can be one or more frames of reference image in the first reference image list pointed by the first MV. Further, in some embodiments, the at least one frame of first reference image is the image in the first reference image list satisfying the first condition; the first condition includes: the minimum distance difference from the POC of the current image, and / or the distance difference from the POC of the current image is less than or equal to the distance threshold. For example, the at least one frame of first reference image is the image in the first reference image list closest to the POC of the current image in which the current block is located. For another example, the at least one frame of first reference image can also be all images in the first reference image list except the third reference image pointed by the first MV.
[0152] Similarly, in some embodiments, the at least one frame of the second reference picture can be one or more frames of reference pictures in a second reference picture list pointing in a second direction. Further, in some embodiments, the at least one frame of the second reference picture is a picture in the second reference picture list satisfying a first condition; the first condition includes: a minimum distance difference of POCs, and / or a distance difference of POCs less than or equal to a distance threshold. For example, the at least one frame of the second reference picture is a picture in the second reference picture list having a POC closest to a POC of a current picture in which the current block is located. For another example, the at least one frame of the second reference picture can also be all pictures in the second reference picture list.
[0153] For example, the first reference picture list is RefPicList0 and the second reference picture list is RefPicList1, as shown in FIG. 10, the POCs of pictures in the first reference picture list are before the POC of a current picture CurPic, and the POCs of pictures in the second reference picture list are after the POC of the current picture CurPic.
[0154] At step 902, a POC of a third reference picture pointed to by the first MV and a POC of a current picture in which the current block is located are obtained.
[0155] At step 903, at least one second MV is determined according to the POC of the at least one frame of the first reference picture and / or the POC of the at least one frame of the second reference picture, and the POC of the third reference picture, the POC of the current picture and the first MV; wherein the second MV points to the first reference picture or the second reference picture.
[0156] It should be noted that the method of determining the second MV is the same whether it is based on the POC of the first reference picture or the POC of the second reference picture. Therefore, the following embodiments further describe the method of determining the second MV by taking the POC of one frame of reference picture as an example.
[0157] That is, in some embodiments, as shown in FIG. 11, the ith second MV is determined according to the POC of the ith reference picture, and the POC of the third reference picture, the POC of the current picture and the first MV, including the following steps 1101 to 1103:
[0158] At step 1101, a first distance difference between the POC of the third reference picture and the POC of the current picture is determined.
[0159] Step 1102, determining a second distance difference between the POC of the ith reference picture and the POC of the current picture; wherein the ith reference picture is any picture in the at least one frame of first reference pictures, i is greater than 0 and less than or equal to the number of the first reference pictures; or the ith reference picture is any picture in the at least one frame of second reference pictures, i is greater than 0 and less than or equal to the number of the second reference pictures.
[0160] Step 1103, determining the ith second MV according to the first MV, the first distance difference and the second distance difference; wherein the ith second MV points to the ith reference picture.
[0161] Exemplarily, in some embodiments, the ith second MV = the first MV * the second distance difference ÷ the first distance difference.
[0162] For the convenience of understanding the above embodiments, a specific implementation method is exemplarily illustrated as follows.
[0163] As shown in FIG. 12, it is assumed that the third reference picture pointed by the first MV (denoted as MV0) is RefPic0, and the POC of RefPic0 is denoted as POC RefPic0 , the reference picture RefPic1 in the second reference picture list RefPicList1 and the POC of RefPic1 are obtained RefPic1 , the current picture CurPic and the POC of CurPic are obtained CurPic .
[0164] According to the POC position of RefPic0, RefPic1 and CurPic, their POC distance differences are calculated according to the following formula: POC Diff0 = POC RefPic0 - POC CurPic .
[0165] POC Diff1 = POC RefPic1 - POC CurPic .
[0166] Wherein, POC Diff0 is an example of the first distance difference, and POC Diff1 is an example of the second distance difference.
[0167] According to Mv0, POC Diff0 and POC Diff1 , Mv1 pointing to the reference picture RefPic1 is determined according to the following formula: Mv1 = Mv0 * POC Diff1 ÷ POC Diff0 .
[0168] Mv1 is an example of the second MV.
[0169] It should be understood that, in the embodiments of the present application, whether the first motion information candidate is uni-prediction or bi-prediction, a new MV, such as the second MV or the fourth MV, can be determined based on one of the MVs by using the above-mentioned any embodiment based on POC.
[0170] In step 703, a second candidate list is determined according to at least one of the second motion information candidates and the first candidate list.
[0171] For step 703, further, in some embodiments, as shown in FIG. 13, the step 703 can be implemented by the following step 1301 and step 1302:
[0172] In step 1301, a first prediction error corresponding to each of the at least one second motion information candidate is determined.
[0173] It should be understood that the first prediction error and the second prediction error described in the embodiments of the present application are actually both prediction errors, and we call the prediction error of the second motion information candidate the first prediction error and the prediction error of the first motion information candidate the second prediction error for the convenience of distinguishing and describing. It can be understood that the prediction error of the motion information candidate refers to the error of inter-frame prediction based on the motion information candidate. In a possible implementation, a template cost of the motion information candidate can be calculated, which is an example of the prediction error.
[0174] It can be understood that the second motion information candidate can be uni-prediction or bi-prediction. For the case that the second motion information candidate is uni-prediction, the determination method of the template cost is described as follows.
[0175] Exemplarily, as shown in FIG. 14A, when implementing template matching, first, a part of the current image CurPic around the current block CurBlock which has been completed reconstruction should be selected as a template region, for example, the region of the above template and the left template of the current block CurBlock can be selected as the template region 1401 of the current block CurBlock. Then, the MV0 of the single-direction prediction and the reference image RefPic0 required for calculating the template cost are determined, the reference template 1402 of the template region 1401 of the current block CurBlock is determined, and then the prediction value of the template region 1401 is determined based on the reconstructed value of the reference template 1402. Finally, the cost value (such as SAD, SATD or MRSAD, etc.) between the prediction value of the template region 1401 and the reconstructed value of the template region 1401 is determined, which is the template cost of the MV0 of the single-direction prediction, that is, the prediction error of the motion information candidate to which the MV0 belongs.
[0176] Exemplarily, as shown in FIG. 14B, when implementing template matching, first, a part of the current image CurPic around the current block CurBlock which has been completed reconstruction should be selected as a template region, for example, the region of the above template and the left template of the current block CurBlock can be selected as the template region 1401 of the current block CurBlock. Then, the MV0, MV1 of the bi-directional prediction and the reference images RefPic0, RefPic1 required for calculating the template cost are determined, the reference template 1402 and the reference template 1403 of the template region 1401 of the current block CurBlock are determined, and then the prediction value of the template region 1401 is determined based on the reconstructed value of the reference template 1402 and the reconstructed value of the reference template 1403. Finally, the cost value (such as SAD, SATD or MRSAD, etc.) between the prediction value of the template region 1401 and the reconstructed value of the template region 1401 is determined, which is the template cost of the bi-directional prediction, that is, the prediction error of the motion information candidate to which the MV0 and MV1 belong.
[0177] Of course, the second prediction error of the first motion information candidate mentioned below can also be implemented by the above method, and therefore the determination method of the template cost of the first motion information candidate will not be described again.
[0178] Step 1302, determining the second candidate list according to the first prediction error and the first candidate list.
[0179] For step 1302, the following embodiment 6, embodiment 7 or embodiment 8 can be implemented.
[0180] In embodiment 6, as shown in FIG. 15, step 1302 can be implemented by steps 1501 to 1505 as follows:
[0181] Step 1501, determining a second prediction error of a first motion information candidate in the first candidate list.
[0182] Step 1502, determining a target prediction error satisfying a second condition from the second prediction error of the j th first motion information candidate and the first prediction error of the second motion information candidate corresponding to the j th first motion information candidate; wherein the second condition comprises: the prediction error is minimum, and / or the prediction error is less than or equal to an error threshold; j is greater than 0 and less than or equal to the number of the first motion information candidates in the first candidate list.
[0183] It should be noted that the second motion information candidate corresponding to the j th first motion information candidate refers to that the second motion information candidate is determined based on the j th first motion information candidate.
[0184] Exemplarily, in some embodiments, the target prediction error refers to the minimum value of the second prediction error of the j th first motion information candidate and the first prediction error of the second motion information candidate corresponding to the j th first motion information candidate.
[0185] Step 1503, in the case that the motion information candidate corresponding to the target prediction error is the second motion information candidate, updating the j th first motion information candidate in the first candidate list as the motion information candidate corresponding to the target prediction error.
[0186] Step 1504, determining whether j is equal to K; if yes, traversing the K first motion information candidates in the first candidate list to obtain a third candidate list, and entering step 1505; otherwise, j+1, and then returning to implement steps 1502 to 1503; wherein K is less than or equal to the number of the first motion information candidates in the first candidate list.
[0187] It can be understood that, in the embodiments of the present application, the value of K can be the number of the motion information candidates in the first candidate list. The value of K can also be less than the number of the motion information candidates in the first candidate list, which is beneficial to control the calculation complexity of the method.
[0188] In some embodiments, K is a predefined value. In other embodiments, the method further comprises: writing a first syntax element into a bitstream; wherein the first syntax element is used to indicate the value of K. The decoding end determines the first syntax element by decoding the bitstream, wherein the first syntax element is used to indicate the value of K; and determines the K according to the first syntax element.
[0189] In step 1505, the second candidate list is determined according to the third candidate list.
[0190] For step 1505, further, in some embodiments, the second candidate list is the same as the third candidate list.
[0191] For step 1505, further, in some other embodiments, the second candidate list can be determined by: in case that the number of motion information candidates in the third candidate list is less than N, filling the third candidate list with at least one motion information candidate with the minimum prediction error from the unused motion information candidates, wherein N is greater than or equal to 1, and the unused motion information candidates refer to the first motion information candidates and / or the second motion information candidates not in the third candidate list.
[0192] In some embodiments, the number of motion information candidates in the second candidate list is equal to N.
[0193] In embodiment 7, the "determining the second candidate list according to the first prediction error and the first candidate list" in step 1302 can also be implemented by: filling the first candidate list with at least one motion information candidate with the minimum first prediction error from the second motion information candidates, to obtain the second candidate list.
[0194] In embodiment 8, the "determining the second candidate list according to the first prediction error and the first candidate list" in step 1302 can also be implemented by: determining the second prediction error of the first motion information candidate in the first candidate list; selecting N motion information candidates with the minimum prediction error from the first prediction error and the second prediction error, wherein N is greater than or equal to 1; and determining the second candidate list according to the N motion information candidates.
[0195] In some embodiments, the motion information candidates in the second candidate list can be arranged in the order of prediction error from small to large.
[0196] In step 704, the motion information candidate index of the current block is determined according to the second candidate list.
[0197] In a possible implementation, a rate-distortion optimization algorithm can be introduced to select the motion information candidate with the minimum rate-distortion cost from the second candidate list, and the index of the candidate is written into the bitstream as the motion information candidate index of the current block.
[0198] In step 705, the motion information candidate index of the current block is encoded, and the encoded bits are written into the bitstream.
[0199] For the decoding end, the same second candidate list can be determined by the same method as the encoding end, so that the decoding end can find the corresponding motion information candidate from the second candidate list based on the motion information candidate index of the current block in the code stream, and use the motion information candidate to perform inter prediction on the current block.
[0200] In some embodiments, as shown in FIG. 16, the encoding method further includes steps 1601 to 1603 as follows:
[0201] Step 1601, determining the inter prediction value of the current block according to the corresponding motion information candidate of the current block in the second candidate list based on the motion information candidate index of the current block;
[0202] Step 1602, determining the residual value of the current block according to the inter prediction value of the current block;
[0203] Step 1603, encoding the residual value of the current block and writing the encoded bits into the code stream.
[0204] For step 1603, in some embodiments, it can be implemented as follows: quantizing the residual value of the current block to obtain the quantized value of the residual value, and writing the quantized value of the residual value into the code stream.
[0205] In some embodiments, the encoding method further includes: dequantizing the quantized value of the residual value of the current block to obtain the dequantized residual value; and determining the reconstructed value of the current block according to the dequantized residual value and the inter prediction value of the current block.
[0206] The use of the encoding method described in the embodiments of the present application can be unrestricted or restricted.
[0207] For the case of restriction, in some embodiments, the method further includes: determining the shape and / or size of the current block; and determining whether to perform the steps in the encoding method according to the shape and / or size of the current block. Similarly, for the decoding method described below, the same method can be used to derive whether to perform the steps in the decoding method. That is, in some embodiments, the decoding method further includes: determining the shape and / or size of the current block; and determining whether to perform the steps in the decoding method according to the shape and / or size of the current block.
[0208] For the case of limited conditions, in some embodiments, it can be controlled by a high-level syntax element whether to allow the use of the encoding method or the decoding method described below. That is, in some embodiments, the method further comprises: writing a second syntax element into the bitstream, the second syntax element being used to indicate whether to perform the steps in the encoding method. Correspondingly, in the decoding method described below, the method further comprises: decoding the bitstream, determining the second syntax element; and according to the second syntax element, determining whether to perform the steps in the decoding method.
[0209] Exemplarily, in some embodiments, the second syntax element can be a syntax element at the sequence level (SPS), the picture level (Picture header), or the slice level (Slice header).
[0210] In a possible implementation, the second syntax element can be a syntax element used to indicate whether to allow the use of template matching for MV search. At the decoding end, in the case where the second syntax element indicates to allow the use of template matching for MV search, the decoding end can enable the decoding method described in the embodiments of the present application; in the case where the second syntax element indicates not to allow the use of template matching for MV search, the decoding end does not enable the decoding method described in the embodiments of the present application.
[0211] Of course, the second syntax element can also not be a syntax element used to indicate whether to allow the use of template matching for MV search, but other syntax elements.
[0212] The embodiments of the present application provide a decoding method, which is applied to a decoder, and Fig. 17 is a flowchart of the implementation of the decoding method provided by the embodiments of the present application. As shown in Fig. 17, the method comprises the following steps 1701 to 1706:
[0213] Step 1701: determining a first candidate list of a current block, the first candidate list comprising at least one first motion information candidate.
[0214] Step 1702: determining at least one second motion information candidate according to the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate.
[0215] Step 1703: determining a second candidate list according to the at least one second motion information candidate and the first candidate list.
[0216] Step 1704: decoding a bitstream to determine a motion information candidate index of the current block.
[0217] Step 1705: determining an inter prediction value of the current block according to the motion information candidate index of the current block and the second candidate list.
[0218] At step 1706, a reconstructed value of the current block is determined according to the inter prediction value of the current block.
[0219] For step 1706, further, in some embodiments, it can be implemented as follows: decoding the code stream to determine a residual value of the current block; and determining the reconstructed value of the current block according to the residual value of the current block and the inter prediction value.
[0220] Exemplarily, in some embodiments, the decoding the code stream to determine the residual value of the current block comprises: decoding the code stream to obtain a decoded residual value of the current block, and performing inverse quantization on the decoded residual value to obtain the residual value of the current block (i.e. the decoded residual value after inverse quantization).
[0221] In the decoding method provided by the embodiments of the present application, instead of directly using a certain motion information candidate in the first candidate list to perform inter prediction, the first candidate list is first improved, i.e. a new motion information candidate (i.e. a second motion information candidate) is determined according to at least one first motion information candidate in the first candidate list; a second candidate list is determined based on at least one second motion information candidate and the first candidate list; and then the current block is inter predicted using the motion information candidate in the second candidate list carried by the motion information candidate index in the code stream; in this way, it is beneficial to improve the accuracy of inter prediction of the current block, and thus to improve the reconstructed quality of the current block and enhance the decoding performance.
[0222] It should be noted that, since the decoding end needs to use the same method as the encoding end to obtain the second candidate list, the specific implementation methods of steps 1701, 1702 and 1703 can refer to the embodiments of the encoding end described above. Here, for the sake of brevity, no further description is given.
[0223] In the following, an exemplary application of the embodiments of the present application in an actual application scenario will be described.
[0224] In the related art, if the current block selects the merge mode, and the motion information determined according to the merge mode index is single prediction, the current block uses single prediction, and if the motion information is bi-prediction, the current block uses bi-prediction. However, the current block cannot use bi-prediction when the inherited motion information is single prediction in the merge mode, and cannot use single prediction when the inherited motion information is bi-prediction and the template matching technique described above is turned off for the current block.
[0225] In the embodiments of the present application, it is proposed that in the merge mode, the single-direction or bi-directional prediction in the inherited motion information can not be followed, and when the inherited motion information is single-direction prediction, bi-directional prediction can be used, and when the inherited motion information is bi-directional prediction, single-direction prediction can be used. Moreover, when determining whether to convert the single-direction and bi-directional prediction in the inherited motion information, the cost of template matching can be used for measurement.
[0226] The implementation mode of converting bi-directional prediction into single-direction prediction is described as follows.
[0227] When the inherited motion information is bi-directional prediction, two motion vectors MV0 and MV1 can be obtained, wherein MV0 points to a frame of image in the reference image list RefPicList0, and MV1 points to a frame of image in the reference image list RefPicList1. After the template cost of bi-directional prediction is calculated, the cost of single-direction prediction using only MV0 and the cost of single-direction prediction using only MV1 are calculated respectively, and compared with the cost of bi-directional prediction. If the cost of MV0 prediction is the minimum, single-direction prediction in the direction of reference image list 0 is set, and the motion vector only retains MV0, and the reference image list index only retains the index of RefPicList0. If the cost of MV1 prediction is the minimum, single-direction prediction in the direction of reference image list 1 is set, and the motion vector only retains MV1, and the reference image list index only retains the index of RefPicList1. If the cost of bi-directional prediction is the minimum, bi-directional prediction is kept unchanged.
[0228] The implementation mode of converting single-direction prediction into bi-directional prediction is described as follows.
[0229] When the inherited motion information is single-direction prediction, one motion vector can be obtained, which is MV0 or MV1, wherein MV0 is a motion vector pointing to a frame of image in the reference image list RefPicList0, and MV1 is a motion vector pointing to a frame of image in the reference image list RefPicList1. When it is attempted to convert single-direction prediction into bi-directional prediction, the MV of the other reference image list (which can be in the other direction or in the same direction) needs to be obtained first. If the MV obtained from the inherited motion information is MV0 pointing to the image in the reference image list RefPicList0, referring to FIG. 12, the MV1 pointing to the image in the reference image list RefPicList1 can be obtained by the following method.
[0230] Obtaining the specific image RefPic0 pointed by MV0 and the POC thereof RefPic0 , obtaining the reference image RefPic1 in the reference image list RefPicList1 and the POC thereof RefPic1 , obtaining the current image CurPic and the POC thereof CurPic ;
[0231] POC Diff0 = POC RefPic0 - POC CurPic POC Diff1 = POC RefPic1 - POC CurPic
[0232] POC Diff0 and POC Diff1 Mv1 = Mv0 * POC Diff1 ÷ POC Diff0
[0233] If there are multiple reference pictures in RefPicList1, multiple Mv1s can be obtained by the above method, each of which points to a different reference picture in RefPicList1.
[0234] In some schemes, the Mv1 of the reference picture in RefPicList1 closest to the current picture can be selected together with Mv0 to form a bi-prediction candidate to be converted. For example, in the above figure, there are five reference pictures in RefPicList1, and their POCs are POC-c, POC-d, POC-e, POC-f, and POC-g. In this case, the one with the smallest POC difference with the POC-a of the current picture can be calculated, and the corresponding POCdiff1, RefPic1 can be used to calculate Mv1.
[0235] In some schemes, all candidate Mv1s in RefPicList1 can be calculated, and each of them can form a bi-prediction candidate together with Mv0. For example, in the above figure, there are five reference pictures in RefPicList1, and they can map to five Mv1s, each of which can form a bi-prediction candidate together with Mv0.
[0236] After obtaining the bi-prediction candidate, a template matching method can be used to determine whether to use bi-prediction instead of the original uni-prediction.
[0237] If the Mv1 obtained from the inherited motion information points to a picture in RefPicList1, Mv0 can be obtained by the same method, and a template matching method can be used to determine whether to replace the uni-prediction.
[0238] The following describes an implementation of converting uni-prediction to uni-prediction.
[0239] In the foregoing, it is described how to generate Mv1 pointing to reference picture RefPic1 in RefPicList1 using Mv0 pointing to reference picture RefPic0 in RefPicList0. In addition to the template matching to determine whether to convert to bi-prediction after Mv1 is generated, Mv1 can also be used as a uni-prediction to make a decision on uni-prediction candidates with Mv0. By using template matching cost as a criterion, it can be determined whether to use uni-prediction Mv1 instead of Mv0, or to use bi-prediction combined from Mv0 and Mv1 instead of Mv0.
[0240] A template matching method for determining whether to convert uni-prediction or bi-prediction is described as follows.
[0241] When implementing template matching, first, a part of the already reconstructed surrounding of the current block should be selected as a template region, for example, the region above a row and to the left of a column can be selected. Then, the Mv and reference pictures of uni-prediction or bi-prediction for which the template cost is calculated are used to obtain the predicted values on the template region. Referring to FIG. 14A, a diagram for finding a reference template from the reconstructed picture and uni-prediction Mv to generate predicted values on the current template region in uni-prediction is shown. Referring to FIG. 14B, a diagram for finding a reference template from the reconstructed picture RefPic0 and uni-prediction Mv0 and another reference template from the reconstructed picture RefPic1 and uni-prediction Mv1 to generate predicted values on the current template region and weighted by the current bi-prediction weight in bi-prediction is shown.
[0242] The predicted values generated on the template region and the reconstructed values on the template region can be calculated as the template cost by using one of SAD, SATD, MRSAD, etc.
[0243] Finally, according to the calculated template cost, a decision is made on whether to convert uni-prediction or bi-prediction.
[0244] A specific implementation method is described as follows.
[0245] This method is only used in inter-frame merge mode. After the merge list is constructed, this method is used to perform uni-prediction and bi-prediction conversion based on template matching on the merge candidates in the merge list. The merge list here can include but is not limited to:
[0246] a regular merge list;
[0247] a template matching based merge list;
[0248] a merge list of combined intra-inter prediction (CIIP) merge mode;
[0249] Merge list with merge mode with motion vector difference (MMVD).
[0250] FIG. 18 is a flow chart of determining the final merge list according to an embodiment of the present application. As shown in FIG. 18, the pre- and post- other template matching or merge list adjustment can include, but not limited to, the template matching based illumination compensation flag adjustment technique, the template matching based bi- directional weighting weight adjustment, and the template matching technique. It should be noted that the pre- other template matching or merge list adjustment in FIG. 18 is optional. The post- other template matching or merge list adjustment in FIG. 18 is also optional. The merge list outputted by the template based uni- to bi-prediction conversion can be used as the final merge list.
[0251] When implementing the template based uni- to bi-prediction conversion, all the merge candidates in the current constructed merge list should be traversed. If the candidate is uni-prediction, the uni- to bi-prediction conversion method described above is used to generate the potential MVs pointing to the reference pictures in the other reference picture list. If there is no potential MV pointing to the reference pictures in the other reference picture list, the traversal of the current merge candidate is skipped and the traversal of the next merge candidate is performed. The template matching is performed on all the generated uni-prediction MVs and the bi-prediction MVs that can be combined from the uni-prediction MVs. The set of MVs with the minimum cost is found as the adjusted candidate of the traversal.
[0252] • When comparing the template cost of the uni-prediction MV and the bi-prediction MV, the template used should include, but not limited to, the area above and left of the current block. For example, one row and one column, two rows and two columns.
[0253] • When comparing the template cost of the uni-prediction MV and the bi-prediction MV, the original inherited merge candidate can be given priority. For example, when calculating the template cost of the inherited uni-prediction or bi-prediction MV, a coefficient less than 1 is multiplied. The other alternative new MV or new combination is not multiplied by the coefficient. This makes it more likely to make a decision to adjust the original inherited MV.
[0254] • When comparing the template cost of the uni-prediction MV and the bi-prediction MV, the calculation method can be simplified. For example, but not limited to: the illumination compensation technique is not used when calculating the template cost. The sub-pixel level MV is approximated to an integer pixel MV for calculation, etc.
[0255] • In the template cost comparison between uni-directional Mv and bi-directional Mv, the cost value used for the measurement uses SAD, MRSAD, etc.
[0256] In this solution, since the existing reference software has already allowed the conversion from bi-directional prediction to uni-directional prediction when using the template matching technique described above, if the current block uses the template matching technique described above, this solution will skip the attempt to convert the bi-directional prediction in the candidate list to uni-directional prediction, and only check the replacement between uni-directional predictions or the conversion from uni-directional prediction to bi-directional prediction.
[0257] Some general restrictions of this technical solution are described as follows
[0258] In some embodiments, the coding method provided by the embodiments of the present application can be subject to one or more of the following (1)-(5) restrictions.
[0259] (1) The coding method provided by the embodiments of the present application can be controlled by a high-level syntax element whether to allow using. For example, it can be a syntax element of sequence level (SPS), image level (Picture header), slice level (Slice header).
[0260] (2) The opening or closing of the coding method provided by the embodiments of the present application can depend on a general control flag. For example, whether to use a high-level syntax element based on template technology to control whether to allow using the present technology, when the high-level syntax element based on template technology is enabled, the present technology can also be opened together. This high-level syntax element based on template technology can be a syntax element that uniformly controls all inter prediction related tools of template technology, or a syntax element that simultaneously enables or disables the template technology related tools of intra, inter, transform, etc.
[0261] (3) The coding method provided by the embodiments of the present application can be enabled for blocks of specific shapes or sizes. For example, template cost calculation on small blocks often has higher computational complexity than on large blocks, so the use of the present technology can be limited on small blocks, and small blocks can be blocks smaller than 8x8, blocks smaller than 16x16, etc. For example, template cost calculation on large blocks requires more storage space for storing the prediction values and reconstructed values of the template, which will bring additional hardware overhead, so the use of the present technology can be limited on large blocks, and large blocks can be blocks larger than 32x32, blocks larger than 64x64, etc.
[0262] (4) The coding method provided by the embodiments of the present application can control to only allow converting at most K merge candidates in the merge list to uni-directional and bi-directional predictions by encoding and decoding a syntax element or setting a predefined variable value K, which is beneficial to control the computational complexity of the method.
[0263] (5) The coding method provided in the embodiments of the present application can convert the uni-prediction and bi-prediction based on the template cost of the luminance template, or convert the uni-prediction and bi-prediction based on the template cost of the luminance and chrominance templates.
[0264] Since it is introduced above how to generate the new uni-prediction Mv and bi-prediction Mv, it is actually that the merge list cannot obtain enough candidates to fill in the maximum length in some cases, and the generated new uni-prediction or bi-prediction Mv can be used as an additional candidate for the merge list when it is not filled up, which can also improve the performance of the merge mode to a certain extent.
[0265] When the uni-prediction or bi-prediction Mv generated according to the above description is used to fill in the merge candidate list, the generated uni-prediction or bi-prediction Mv can be recorded in the order of the existing merge candidates in the traversal, and the generated new uni-prediction or bi-prediction Mv can be sequentially added to the merge list until the number of candidates in the merge list reaches the upper limit; or the generated new uni-prediction or bi-prediction Mv can be sorted according to the template cost calculated in the conversion process, and the uni-prediction or bi-prediction Mv that is not selected after the replacement can be sequentially added to the merge list until the number of candidates in the merge list reaches the upper limit.
[0266] It can be understood that, by the template cost calculation, the uni-prediction and bi-prediction in the merge candidate can be converted to each other in the embodiments of the present application, so that the candidates in the merge list have better prediction accuracy than before. Moreover, the method does not introduce additional rate-distortion optimization calculation, so that the complexity of the encoder does not increase.
[0267] In the embodiments of the present application, it is proposed that the bi-prediction Mv in the merge list can be converted into two uni-prediction Mvs; the uni-prediction Mv in one direction can be converted into the uni-prediction Mv in the other direction or a group of bi-prediction Mvs.
[0268] In the embodiments of the present application, the newly generated Mv can be calculated according to the template cost, so as to determine whether to replace the original Mv.
[0269] In the embodiments of the present application, the newly generated Mv can also be used as an additional merge mode candidate to fill in when the existing merge list is not filled up.
[0270] It should be noted that the "Mv" appearing in the present text is the motion vector MV.
[0271] The preferred embodiments of the present application are described in detail above with reference to the drawings, but the present application is not limited to the specific details of the above-described embodiments. Within the technical concept of the present application, various simple modifications can be made to the technical solutions of the present application, and these simple modifications all belong to the protection scope of the present application. For example, in the above-described specific embodiments, various specific technical features described in the embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, various possible combination manners are not described again in the present application. For another example, various different embodiments of the present application can also be combined in any manner, as long as it does not deviate from the idea of the present application, and it should also be considered as disclosed in the present application. It should also be understood that in various method embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0272] The method embodiments of the present application are described in detail above, and the device embodiments of the present application are described in detail below with reference to FIGS. 19-20.
[0273] FIG. 19 is a schematic block diagram of an encoding device according to an embodiment of the present application. As shown in FIG. 19, the encoding device 190 includes:
[0274] A sixth determining module 1901 configured to determine a first candidate list of a current block, the first candidate list including at least one first motion information candidate;
[0275] A seventh determining module 1902 configured to determine at least one second motion information candidate according to the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate;
[0276] An eighth determining module 1903 configured to determine a second candidate list according to at least one of the second motion information candidate and the first candidate list;
[0277] A ninth determining module 1904 configured to determine a motion information candidate index of the current block according to the second candidate list;
[0278] An encoding module 1905 configured to encode the motion information candidate index of the current block and write the encoding bits into a bitstream.
[0279] In some embodiments, the encoding apparatus 190 further comprises a tenth determining module and an eleventh determining module; the tenth determining module is configured to determine the inter prediction value of the current block according to the corresponding motion information candidate of the current block in the second candidate list according to the motion information candidate index of the current block; the eleventh determining module is configured to determine the residual value of the current block according to the inter prediction value of the current block; the encoding module 1905 is further configured to encode the residual value of the current block and write the encoded bits into the bitstream.
[0280] In some embodiments, the encoding module 1905 is further configured to write a first syntax element and / or a second syntax element into the bitstream, wherein the first syntax element is used to indicate the value of K, and the second syntax element is used to indicate whether the step in the encoding method is performed.
[0281] In some embodiments, the encoding apparatus 190 further comprises a twelfth determining module configured to determine the shape and / or size of the current block, and determine whether the step in the encoding method is performed according to the shape and / or size of the current block.
[0282] It should be noted that further embodiments of the operations performed by the modules in the encoding apparatus 190 can be found in the foregoing description of the various embodiments of the encoding method, which will not be repeated here for brevity.
[0283] FIG. 20 is a schematic block diagram of a decoding apparatus according to an embodiment of the present application. As shown in FIG. 20, the decoding apparatus 200 comprises:
[0284] A first determining module 2001 is configured to determine a first candidate list of a current block, wherein the first candidate list comprises at least one first motion information candidate.
[0285] A second determining module 2002 is configured to determine at least one second motion information candidate according to the first motion information candidate, wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate.
[0286] A third determining module 2003 is configured to determine a second candidate list according to the at least one second motion information candidate and the first candidate list.
[0287] A decoding module 2004 is configured to decode a bitstream to determine a motion information candidate index of the current block.
[0288] A fourth determining module 2005 is configured to determine an inter prediction value of the current block according to the motion information candidate index of the current block and the second candidate list.
[0289] The fifth determining module 2006 is configured to determine the reconstructed value of the current block according to the inter prediction value of the current block.
[0290] In some embodiments, the decoding apparatus 200 further comprises a thirteenth determining module; wherein the decoding module 2004 is further configured to decode the bitstream to determine the residual value of the current block; and the thirteenth determining module is configured to determine the reconstructed value of the current block according to the residual value of the current block and the inter prediction value.
[0291] In some embodiments, the decoding module 2004 is further configured to decode the bitstream to determine a first syntax element; wherein the first syntax element is used to indicate the value of K; and the K is determined according to the first syntax element.
[0292] In some embodiments, the decoding apparatus 200 further comprises a fourteenth determining module; the decoding module 2004 is further configured to decode the bitstream to determine a second syntax element; and the fourteenth determining module is configured to determine whether to perform the step in the decoding method according to the second syntax element.
[0293] In some embodiments, the decoding apparatus 200 further comprises a fourteenth determining module; the fourteenth determining module is configured to determine the shape and / or size of the current block; and determine whether to perform the step in the decoding method according to the shape and / or size of the current block.
[0294] It should be noted that further embodiments of the operations performed by the modules of the decoding apparatus 200 can be found in the descriptions of the embodiments of the encoding method and the decoding method above, which will not be repeated here for brevity.
[0295] The descriptions of the above apparatus embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the apparatus embodiments of the present application, please refer to the descriptions of the method embodiments of the present application.
[0296] It should be noted that the division of the apparatus into modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, another division mode can be used. In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or can be physically separated, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional unit. It can also be realized in the form of a combination of software and hardware.
[0297] It should be noted that, in the embodiments of the present application, if the above-mentioned method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for causing an electronic device to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various program code storage media. Thus, the embodiments of the present application are not limited to any particular hardware and software combination.
[0298] The embodiments of the present application provide a decoder, as shown in FIG. 21, the decoder 210 includes: a first communication interface 2101, a first memory 2102 and a first processor 2103; each component is coupled together through a first bus system 2104. It can be understood that the first bus system 2104 is used to realize the connection communication between the components. In addition to including a data bus, the first bus system 2104 also includes a power bus, a control bus and a state signal bus. However, in order to clearly illustrate, various buses are marked as the first bus system 2104 in FIG. 21. Among them,
[0299] The first communication interface 2101 is used for receiving and sending signals in the process of transmitting information with other external network elements;
[0300] The first memory 2102 is used for storing a computer program capable of running on the first processor 2103;
[0301] The first processor 2103 is used for executing the steps in the decoding method described in the embodiments of the present application when running the computer program.
[0302] It is to be appreciated that the first memory 2102 in the embodiments of the application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Where the nonvolatile memory is a Read-Only Memory (ROM), Programmable ROM (PROM), Erasable PROM (EPROM), Electrically EPROM (EEPROM), or flash memory. The volatile memory can be a Random Access Memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, for example, Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The first memory 2102 of the system and method described herein are intended to include, without being limited to, these and any other suitable types of memory.
[0303] The first processor 2103 can be an integrated circuit chip having a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the first processor 2103. The first processor 2103 described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. Each method, step and logic block diagram disclosed in the embodiment of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiment of the present application can be directly embodied as a hardware code processor to execute, or be executed by a combination of hardware and software modules in the code processor. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the first memory 2102, and the first processor 2103 reads the information in the first memory 2102 and combines the hardware to complete the steps of the above method.
[0304] It can be understood that the embodiments described in the present application can be realized by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be realized in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP Device, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general processors, controllers, microcontrollers, microprocessors, other electronic units for executing functions described in the present application or a combination thereof. For software implementation, the technology described in the present application can be realized by modules (such as processes, functions, etc.) for executing functions described in the present application. The software code can be stored in the memory and executed by the processor. The memory can be implemented in the processor or outside the processor.
[0305] Optionally, as another embodiment, the first processor 2103 is further configured to execute any embodiment of the aforementioned decoding method when running the computer program.
[0306] The present application provides an encoder, as shown in FIG22 , wherein the encoder 220 includes: a second communication interface 2201, a second memory 2202, and a second processor 2203; each component is coupled together via a second bus system 2204. It is understood that the second bus system 2204 is used to implement connection and communication between these components. In addition to the data bus, the second bus system 2204 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 2204 in FIG22 . Among them,
[0307] The second communication interface 2201 is used to receive and send signals during the process of sending and receiving information between other external network elements;
[0308] The second memory 2202 is used to store computer programs that can be run on the second processor 2203;
[0309] The second processor 2203 is configured to execute the steps of the encoding method described in the embodiment of the present application when running the computer program.
[0310] Optionally, as another embodiment, the second processor 2203 is further configured to execute any embodiment of the aforementioned encoding method when running the computer program.
[0311] It can be understood that the hardware functions of the second memory 2202 and the first memory 2102 are similar, and the hardware functions of the second processor 2203 and the first processor 2103 are similar; they will not be described in detail here.
[0312] An embodiment of the present application provides a code stream, which is generated by bit-coding candidate motion information indexes of a current block; wherein the candidate motion information indexes of the current block are obtained by the encoding method described in the embodiment of the present application.
[0313] Optionally, as another embodiment, the code stream is generated based on the quantized residual value, the first syntax element and / or the second prediction element.
[0314] An embodiment of the present application provides an electronic device, comprising: a processor, adapted to execute a computer program; a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the encoding method as described in the embodiment of the present application is implemented, or when the computer program is executed by the processor, the decoding method as described in the embodiment of the present application is implemented.
[0315] The embodiment of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed to implement the encoding method or the decoding method.
[0316] In a tenth aspect, the embodiment of the present application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the encoding method or the decoding method.
[0317] It should be noted that the description of the above embodiments of the device, the storage medium, the code stream and the computer program product is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details of the embodiments of the device, the storage medium, the code stream and the computer program product that are not disclosed in the present application, please refer to the description of the method embodiments.
[0318] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each process does not mean the execution order, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The serial number of the above embodiment of the present application is only for description, not representing the pros and cons of the embodiments. The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be referred to each other. For the sake of brevity, this paper will not repeat here.
[0319] The term "and / or" in this paper is only a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, object A and / or object B, which can represent three cases: object A exists alone, object A and object B exist together, and object B exists alone.
[0320] It should be noted that, in the present document, the terms "comprising", "containing", or any other similar term are intended to encompass non-exclusive inclusion, such that processes, methods, articles, or apparatuses that comprise a list of elements are not limited to those elements, but can also include other elements not expressly listed, or inherent to such processes, methods, articles, or apparatuses. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0321] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The above-described embodiments are merely illustrative, for example, the division of the modules is only a logical functional division, and actual implementation can have another division manner, such as: a plurality of modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be indirect coupling or communication connection between some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0322] The above-described modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules; they can be located in one place or distributed on multiple network units; and part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment.
[0323] In addition, all the functional modules in the embodiments of the present application can be integrated in one processing unit, or each module can be a separate unit, or two or more modules can be integrated in one unit; the above integrated modules can be realized in the form of hardware or hardware plus software functional units.
[0324] Those of ordinary skill in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction-related hardware, and the aforementioned program can be stored in a computer-readable storage medium, and the program executes the steps of the above method embodiments when executed; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic discs or optical discs, and various program code storage media.
[0325] Alternatively, the above-mentioned integrated units of the present application, if realized in the form of software function modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, and includes several instructions to cause an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes: mobile storage devices, ROM, magnetic disks or optical disks and various other media that can store program codes.
[0326] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new method embodiments.
[0327] The features disclosed in the several product embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new product embodiments.
[0328] The features disclosed in the several method or device embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new method or device embodiments.
[0329] The above is only an implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A decoding method, applied to a decoder, comprising: Determine a first candidate list for the current block, where the first candidate list includes at least one first motion information candidate; Determine at least one second motion information candidate based on the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; determining a second candidate list according to at least one second motion information candidate and the first candidate list; Decoding the code stream to determine a candidate motion information index of the current block; Determining an inter-frame prediction value of the current block according to the motion information candidate index of the current block and the second candidate list; A reconstructed value of the current block is determined according to the inter-frame prediction value of the current block.
2. The method according to claim 1, wherein The determining, according to the inter-frame prediction value of the current block, a reconstructed value of the current block includes: Decoding a bitstream to determine a residual value of the current block; A reconstructed value of the current block is determined according to the residual value of the current block and the inter-frame prediction value.
3. The method according to claim 1, wherein The determining, according to the first motion information candidate, at least one second motion information candidate includes: In a case where the first motion information candidate is unidirectionally predicted, determining at least one second MV according to a first MV in the first motion information candidate; At least one second motion information candidate is determined according to the at least one second MV.
4. The method according to claim 3, wherein: The determining, according to the at least one second MV, at least one second motion information candidate includes: determining, according to the second MV, a second motion information candidate for unidirectional prediction; and / or, Combining at least one first MV pair based on the at least one second MV and the first MV, or based on the at least one second MV; Determine a second motion information candidate for bidirectional prediction according to the first MV pair; wherein the directions of two MVs in the first MV pair are different.
5. The method according to claim 1, wherein The determining, according to the first motion information candidate, at least one second motion information candidate includes: In a case where the first motion information candidate is bidirectionally predicted, determining at least one second MV according to a first MV in the first motion information candidate; and / or, determining at least one fourth MV according to the third MV in the first motion information candidate; wherein the second MV and the fourth MV have different directions; At least one second motion information candidate is determined according to the at least one second MV and / or the at least one fourth MV.
6. The method according to claim 5, wherein: The determining, according to the at least one second MV and / or the at least one fourth MV, at least one second motion information candidate includes: determining, according to the second MV, a second motion information candidate for unidirectional prediction; and / or, Determining a second motion information candidate for unidirectional prediction according to the fourth MV; and / or, Combining at least one second MV pair according to the first MV, the at least one second MV, the third MV and / or the at least one fourth MV; determining, according to the second MV pair, a second motion information candidate for bidirectional prediction; The directions of the two MVs in the second MV pair are different, and the at least one second MV pair does not include an MV pair composed of the first MV and the third MV.
7. The method according to claim 1, 5 or 6, wherein The determining, according to the first motion information candidate, at least one second motion information candidate includes: In the case where the first motion information candidate is bidirectionally predicted, determining a second motion information candidate for unidirectional prediction according to the first MV in the first motion information candidate; and / or, A second motion information candidate for unidirectional prediction is determined according to the third MV in the first motion information candidate.
8. The method according to any one of claims 3 to 6, wherein: The determining, according to the first MV in the first motion information candidate, at least one second MV includes: Obtaining a POC of at least one first reference image and / or a POC of at least one second reference image; wherein the first reference image is an image in a first direction of the first MV, and the second reference image is an image in a second direction, the second direction being opposite to the first direction; Obtaining a POC of a third reference image pointed to by the first MV and a POC of a current image where the current block is located; At least one second MV is determined based on the POC of the at least one frame of the first reference image and / or the POC of the at least one frame of the second reference image, the POC of the third reference image, the POC of the current image and the first MV; wherein the second MV points to the first reference image or the second reference image.
9. The method according to claim 8, wherein Determining an i-th second MV according to the POC of the i-th reference image, the POC of the third reference image, the POC of the current image, and the first MV, comprising: Determining a first distance difference between a POC of the third reference image and a POC of the current image; Determining a second distance difference between a POC of an i-th reference image and a POC of the current image; wherein the i-th reference image is any image in the at least one frame of first reference images, i is greater than 0 and less than or equal to the number of the first reference images; or, the i-th reference image is any image in the at least one frame of second reference images, i is greater than 0 and less than or equal to the number of the second reference images; The i-th second MV is determined according to the first MV, the first distance difference, and the second distance difference; wherein the i-th second MV points to the i-th reference image.
10. The method according to claim 8, wherein The at least one first reference image is an image that satisfies a first condition in the first reference image list pointed to by the first MV; And / or, the at least one second reference image is an image in the second reference image list pointed to by the second direction that satisfies the first condition; The first condition includes: the distance difference from the POC of the current image is minimum, and / or the distance difference from the POC of the current image is less than or equal to a distance threshold.
11. The method according to any one of claims 1 to 10, wherein: The determining a second candidate list according to the at least one second motion information candidate and the first candidate list includes: determining a first prediction error corresponding to at least one of the second motion information candidates; The second candidate list is determined according to the first prediction error and the first candidate list.
12. The method according to claim 11, wherein The determining the second candidate list according to the first prediction error and the first candidate list includes: determining a second prediction error of a first motion information candidate in the first candidate list; determining a target prediction error that satisfies a second condition from the second prediction error of the j-th first motion information candidate and the first prediction error of the second motion information candidate corresponding to the j-th first motion information candidate; wherein the second condition includes: the prediction error is minimal and / or the prediction error is less than or equal to an error threshold; and j is greater than 0 and less than or equal to the number of first motion information candidates in the first candidate list; When the motion information candidate corresponding to the target prediction error is the second motion information candidate, updating the j-th first motion information candidate in the first candidate list to the motion information candidate corresponding to the target prediction error, traversing K first motion information candidates in the first candidate list to obtain a third candidate list; wherein K is less than or equal to the number of first motion information candidates in the first candidate list; The second candidate list is determined according to the third candidate list.
13. The method according to claim 12, wherein: K is a predefined value.
14. The method according to claim 12, wherein: The method further comprises: Decoding the code stream, and determining a first syntax element; wherein the first syntax element is used to indicate a value of K; The K is determined according to the first syntax element.
15. The method according to claim 12, wherein: The second candidate list is the same as the third candidate list.
16. The method according to claim 12, wherein: Determining the second candidate list according to the third candidate list includes: When the number of motion information candidates in the third candidate list is less than N, at least one motion information candidate with the smallest prediction error is selected from the unused motion information candidates to fill the third candidate list to obtain the second candidate list; wherein N is greater than or equal to 1, and the unused motion information candidate refers to the first motion information candidate and / or the second motion information candidate that is not in the third candidate list.
17. The method according to claim 11, wherein The determining the second candidate list according to the first prediction error and the first candidate list includes: At least one candidate with the smallest first prediction error is selected from the second motion information candidates to fill the first candidate list, thereby obtaining the second candidate list.
18. The method according to claim 11, wherein The determining the second candidate list according to the first prediction error and the first candidate list includes: determining a second prediction error of a first motion information candidate in the first candidate list; Selecting N motion information candidates with the smallest prediction errors from the first prediction error and the second prediction error; The second candidate list is determined according to the N motion information candidates.
19. The method according to any one of claims 1 to 18, wherein: The method further comprises: Decoding the code stream and determining a second syntax element; Determine whether to execute steps in the decoding method according to the second syntax element.
20. The method according to any one of claims 1 to 19, wherein: The method further comprises: determining a shape and / or size of the current block; Whether to execute the steps in the decoding method is determined according to the shape and / or size of the current block.
21. An encoding method, used in an encoder, comprising: Determine a first candidate list for the current block, where the first candidate list includes at least one first motion information candidate; Determine at least one second motion information candidate based on the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; determining a second candidate list according to at least one second motion information candidate and the first candidate list; Determining a motion information candidate index of the current block according to the second candidate list; The motion information candidate index of the current block is encoded, and the encoded bits are written into a bitstream.
22. The method according to claim 21, wherein The method further comprises: determining an inter-frame prediction value of the current block according to a motion information candidate corresponding to the motion information candidate index of the current block in the second candidate list; Determining a residual value of the current block according to the inter-frame prediction value of the current block; The residual value of the current block is encoded, and the encoded bits are written into a bitstream.
23. The method according to claim 21, wherein The determining, according to the first motion information candidate, at least one second motion information candidate includes: In a case where the first motion information candidate is unidirectionally predicted, determining at least one second MV according to a first MV in the first motion information candidate; At least one second motion information candidate is determined according to the at least one second MV.
24. The method according to claim 23, wherein The determining, according to the at least one second MV, at least one second motion information candidate includes: determining, according to the second MV, a second motion information candidate for unidirectional prediction; and / or, Combining at least one first MV pair based on the at least one second MV and the first MV, or based on the at least one second MV; Determine a second motion information candidate for bidirectional prediction according to the first MV pair; wherein the directions of two MVs in the first MV pair are different.
25. The method according to claim 21, wherein The determining, according to the first motion information candidate, at least one second motion information candidate includes: In a case where the first motion information candidate is bidirectionally predicted, determining at least one second MV according to a first MV in the first motion information candidate; and / or, determining at least one fourth MV according to the third MV in the first motion information candidate; wherein the second MV and the fourth MV have different directions; At least one second motion information candidate is determined according to the at least one second MV and / or the at least one fourth MV.
26. The method according to claim 25, wherein The determining, according to the at least one second MV and / or the at least one fourth MV, at least one second motion information candidate includes: determining, according to the second MV, a second motion information candidate for unidirectional prediction; and / or, Determining a second motion information candidate for unidirectional prediction according to the fourth MV; and / or, Combining at least one second MV pair according to the first MV, the at least one second MV, the third MV and / or the at least one fourth MV; determining, according to the second MV pair, a second motion information candidate for bidirectional prediction; The directions of the two MVs in the second MV pair are different, and the at least one second MV pair does not include an MV pair composed of the first MV and the third MV.
27. The method of claim 21, 25 or 26, wherein The determining, according to the first motion information candidate, at least one second motion information candidate includes: In the case where the first motion information candidate is bidirectionally predicted, determining a second motion information candidate for unidirectional prediction according to the first MV in the first motion information candidate; and / or, A second motion information candidate for unidirectional prediction is determined according to the third MV in the first motion information candidate.
28. The method according to any one of claims 23 to 26, wherein: The determining, according to the first MV in the first motion information candidate, at least one second MV includes: Obtaining a POC of at least one first reference image and / or a POC of at least one second reference image; wherein the first reference image is an image in a first direction of the first MV, and the second reference image is an image in a second direction, the second direction being opposite to the first direction; Obtaining a POC of a third reference image pointed to by the first MV and a POC of a current image where the current block is located; At least one second MV is determined based on the POC of the at least one frame of the first reference image and / or the POC of the at least one frame of the second reference image, the POC of the third reference image, the POC of the current image and the first MV; wherein the second MV points to the first reference image or the second reference image.
29. The method according to claim 28, wherein Determining an i-th second MV according to the POC of the i-th reference image, the POC of the third reference image, the POC of the current image, and the first MV, comprising: Determining a first distance difference between a POC of the third reference image and a POC of the current image; Determining a second distance difference between a POC of an i-th reference image and a POC of the current image; wherein the i-th reference image is any image in the at least one frame of first reference images, i is greater than 0 and less than or equal to the number of the first reference images; or, the i-th reference image is any image in the at least one frame of second reference images, i is greater than 0 and less than or equal to the number of the second reference images; The i-th second MV is determined according to the first MV, the first distance difference, and the second distance difference; wherein the i-th second MV points to the i-th reference image.
30. The method according to claim 29, wherein The at least one first reference image is an image that satisfies a first condition in the first reference image list pointed to by the first MV; And / or, the at least one second reference image is an image in the second reference image list pointed to by the second direction that satisfies the first condition; The first condition includes: the distance difference from the POC of the current image is minimum, and / or the distance difference from the POC of the current image is less than or equal to a distance threshold.
31. The method according to any one of claims 21 to 30, wherein: The determining a second candidate list according to the at least one second motion information candidate and the first candidate list includes: determining a first prediction error corresponding to at least one of the second motion information candidates; The second candidate list is determined according to the first prediction error and the first candidate list.
32. The method according to claim 31, wherein The determining the second candidate list according to the first prediction error and the first candidate list includes: determining a second prediction error of a first motion information candidate in the first candidate list; determining a target prediction error that satisfies a second condition from the second prediction error of the j-th first motion information candidate and the first prediction error of the second motion information candidate corresponding to the j-th first motion information candidate; wherein the second condition includes: the prediction error is minimal and / or the prediction error is less than or equal to an error threshold; and j is greater than 0 and less than or equal to the number of first motion information candidates in the first candidate list; When the motion information candidate corresponding to the target prediction error is the second motion information candidate, updating the j-th first motion information candidate in the first candidate list to the motion information candidate corresponding to the target prediction error, traversing K first motion information candidates in the first candidate list to obtain a third candidate list; wherein K is less than or equal to the number of first motion information candidates in the first candidate list; The second candidate list is determined according to the third candidate list.
33. The method according to claim 32, wherein K is a predefined value.
34. The method of claim 32, wherein: The method further comprises: A first syntax element is written into a codestream; wherein the first syntax element is used to indicate a value of K.
35. The method of claim 32, wherein: The second candidate list is the same as the third candidate list.
36. The method of claim 32, wherein: Determining the second candidate list according to the third candidate list includes: When the number of motion information candidates in the third candidate list is less than N, at least one motion information candidate with the smallest prediction error is selected from the unused motion information candidates to fill the third candidate list to obtain the second candidate list; wherein N is greater than 1, and the unused motion information candidate refers to the first motion information candidate and / or the second motion information candidate that is not in the third candidate list.
37. The method of claim 31, wherein The determining the second candidate list according to the first prediction error and the first candidate list includes: Select at least one candidate with the smallest first prediction error from the second motion information candidates to fill the first candidate list, and obtain the second candidate list.
38. The method of claim 31, wherein The determining the second candidate list according to the first prediction error and the first candidate list includes: determining a second prediction error of a first motion information candidate in the first candidate list; Selecting N motion information candidates with the smallest prediction errors from the first prediction error and the second prediction error; The second candidate list is determined according to the N motion information candidates.
39. The method according to any one of claims 21 to 38, wherein: The method further comprises: A second syntax element is written into a code stream; the second syntax element is used to indicate whether to execute a step in the encoding method.
40. The method according to any one of claims 21 to 39, wherein: The method further comprises: determining a shape and / or size of the current block; Determine whether to execute the steps in the encoding method according to the shape and / or size of the current block.
41. A decoding device, used in a decoder, comprising: A first determining module is configured to determine a first candidate list for a current block, wherein the first candidate list includes at least one first motion information candidate; a second determining module configured to determine at least one second motion information candidate based on the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; a third determining module, configured to determine a second candidate list according to at least one second motion information candidate and the first candidate list; A decoding module configured to decode a code stream and determine a candidate motion information index of the current block; a fourth determining module, configured to determine an inter-frame prediction value of the current block according to the motion information candidate index of the current block and the second candidate list; The fifth determination module is configured to determine the reconstructed value of the current block according to the inter-frame prediction value of the current block.
42. An encoding device for an encoder, comprising: A sixth determining module is configured to determine a first candidate list for the current block, where the first candidate list includes at least one first motion information candidate; a seventh determining module configured to determine at least one second motion information candidate based on the first motion information candidate; wherein the MV in the second motion information candidate is different from the MV in the first motion information candidate; an eighth determining module, configured to determine a second candidate list according to at least one second motion information candidate and the first candidate list; a ninth determining module, configured to determine a candidate index of motion information of the current block according to the second candidate list; The encoding module is configured to encode the motion information candidate index of the current block and write the encoded bits into a bitstream.
43. A decoder comprising a first memory and a first processor; wherein, The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the decoding method according to any one of claims 1 to 20 when running the computer program.
44. An encoder comprising a second memory and a second processor; wherein The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the encoding method according to any one of claims 21 to 40 when running the computer program.
45. A code stream, the code stream being generated by bit-coding candidate motion information indexes of a current block; wherein The candidate motion information index of the current block is obtained according to any one of claims 21-40.
46. An electronic device comprising: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the decoding method according to any one of claims 1 to 20 is implemented, or when the computer program is executed by the processor, the encoding method according to any one of claims 21 to 40 is implemented.
47. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and when the computer program is executed, it implements the decoding method according to any one of claims 1 to 20, or implements the encoding method according to any one of claims 21 to 40.
48. A computer program product comprising a computer program or instructions, which, when executed by a processor, implement the method of any one of claims 1 to 20; or, when executed by a processor, implement the method of any one of claims 21 to 40.
Citation Information
Patent Citations
And MV precision in BIO is improved
CN110809164A
Image processing device and method
CN112313956A
Inter-frame prediction method, encoder, decoder and computer storage medium
CN113709498A
Hybrid inter dual prediction in video coding
CN117529921A
Image decoding method and apparatus based on inter prediction in image coding system
US20210037238A1