Inter-frame prediction method and device
By determining whether the current image block is allowed to use K alternative fusion modes in the video decoder, and directly parsing the identifier value of the current fusion mode from the bitstream for inter-frame prediction, the problem of high decoding complexity and low efficiency in the prior art is solved, and a more efficient decoding process is achieved.
Patent Information
- Application Number
- CN202410646140.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-06-25
- Filing Date
- 2019-07-04
- Publication Date
- 2024-09-10
AI Technical Summary
In existing video coding technologies, the inter-frame prediction process in fusion mode suffers from high decoding complexity and low efficiency, especially when the parsing redundancy is high.
By determining in the video decoder whether the current image block is allowed to use K alternative fusion modes, and if so, parsing the identifier value of the current fusion mode from the bitstream, the current fusion mode is directly used for inter-frame prediction, avoiding the parsing of the identifier values of other alternative modes and reducing decoding complexity.
It effectively reduces the complexity of video decoding, improves decoding efficiency, and reduces redundant syntax element parsing processes.
Smart Images

Figure CN118631998A
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 201910554685.7. The application number for the divisional application is
[0002] 201910600591.9, the original application date is June 25, 2019, and all the contents of the original application are incorporated into this application by reference. Technical Field
[0003] The present application relates to the technical field of video image processing, and in particular to an inter-frame prediction method and device. Background Art
[0004] Digital video capabilities may be incorporated into a wide variety of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, electronic book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones (so-called "smart phones"), video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video compression techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), Video Coding Standard H.265 / High Efficiency Video Coding (HEVC) standards, and extensions of such standards. Video devices may transmit, receive, encode, decode, and / or store digital video information more efficiently by implementing such video compression techniques.
[0005] Video compression techniques perform spatial (intra-image) prediction and / or temporal (inter-image) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (i.e., a video frame or a portion of a video frame) may be partitioned into several image blocks, which may also be referred to as tree blocks, coding units (CUs), and / or coding nodes. Image blocks in an intra-coded (I) slice of an image are encoded using spatial predictions with respect to reference samples in neighboring blocks in the same image. Image blocks in an inter-coded (P or B) slice of an image may use spatial predictions with respect to reference samples in neighboring blocks in the same image or temporal predictions with respect to reference samples in other reference images. Images may be referred to as frames, and reference images may be referred to as reference frames.
[0006] At present, the merge technology is an inter-frame prediction technology. By constructing a candidate motion vector list, the motion information with the lowest rate-distortion (RD) cost in the list is determined as the motion vector predictor (MVP) of the current block. If the current image block uses the fusion technology for inter-frame prediction, it is necessary to select a fusion mode to obtain inter-frame prediction parameters to perform inter-frame prediction on the current image block. The fusion mode may include: one or more of the traditional fusion mode, merge with motion vector difference (MMVD) mode, sub-block merge mode (SBMM), combined intra prediction mode and inter prediction mode (CIIP), and triangle prediction unit mode (TPM). In the syntax parsing process of the merge data, it is necessary to determine in turn which one or several fusion modes will be used to perform inter-frame prediction on the current image block. In this way, there will be parsing redundancy, resulting in high decoding complexity and low decoding efficiency in some cases. Summary of the invention
[0007] The present application provides an inter-frame prediction method and device, which can reduce the complexity of decoding and improve decoding efficiency to a certain extent.
[0008] In a first aspect, the present application provides an inter-frame prediction method that can be applied to a video decoder. The method may include: after determining to use a fusion mode for inter-frame prediction of a current image block, determining whether the current image block is allowed to use each fusion mode of K candidate fusion modes, where K is a positive integer greater than or equal to 2; when the current image block is allowed to use the current fusion mode, and the current image block is allowed to use a fusion mode other than the current fusion mode among the K candidate fusion modes, parsing the value of a first identifier of the current fusion mode from the bitstream; when the value of the first identifier indicates that the fusion mode for inter-frame prediction of the current image block is the current fusion mode, using the current fusion mode to perform inter-frame prediction on the current image block to obtain a prediction block of the current image block.
[0009] In the present application, the second flag is used to indicate whether the current image block uses the corresponding fusion mode. The first flag may include but is not limited to: one or more of regular_merge_flag, mmvd_merge_flag, merge_subblock_flag, ciip_flag, merge_triangle_flag and the like.
[0010] Among them, merge_triangle_flag can also be MergeTriangleFlag.
[0011] In the present application, on the premise that the decoder determines that the current image block uses a fusion mode for inter-frame prediction, if the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among K alternative fusion modes, the decoder uses the current fusion mode to perform inter-frame prediction on the current image block according to the indication of the value of the first identifier of the current image block obtained by parsing in the bitstream, so as to obtain a prediction block of the current image block, without having to parse the values of the first identifiers of each fusion mode other than the current fusion mode among the K alternative fusion modes, thereby removing the parsing redundancy of the fusion syntax elements, reducing the complexity of decoding to a certain extent, and improving decoding efficiency.
[0012] Based on the first aspect, in some possible implementations, the method further includes: when the current image block does not allow the use of K alternative fusion modes other than the current fusion mode, using the current fusion mode to perform inter-frame prediction on the current image block to obtain a prediction block of the current image block.
[0013] Based on the first aspect, in some possible implementations, determining whether the current image block is allowed to use each fusion mode of K alternative fusion modes includes: obtaining prediction parameters corresponding to the current image block; determining whether the current image block is allowed to use each fusion mode based on the prediction parameters; wherein the prediction parameters include one or more of the following: an indication of a syntax element of a parent video processing unit related to the current image block, the size of the current image block, indication information for indicating whether the current image block has a residual, and the type of the parent video processing unit.
[0014] Based on the first aspect, in some possible implementations, the upper-level video processing unit includes a slice where the current image block is located, a slice group where the current image block is located, an image where the current image block is located, or a video sequence where the current image block is located.
[0015] Based on the first aspect, in some possible implementations, when the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among K alternative fusion modes, the value of the first identifier of the current fusion mode is parsed from the bitstream, including: when the current image block allows the use of at least one of the MMVD mode, SBMM, CIIP mode, and TPM, the value of regular_merge_flag of the traditional fusion mode is parsed from the bitstream; wherein regular_merge_flag is the first identifier of the traditional fusion mode.
[0016] Based on the first aspect, in some possible implementations, when the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among K alternative fusion modes, the value of the first identifier of the current fusion mode is parsed from the bitstream, including: when the current image block allows the use of the MMVD mode, and the current image block allows the use of at least one of the SBMM, CIIP mode, and TPM, the value of mmvd_merge_flag of the MMVD mode is parsed from the bitstream; wherein mmvd_merge_flag is the first identifier of the MMVD mode.
[0017] Based on the first aspect, in some possible implementations, when the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among K alternative fusion modes, the value of the first identifier of the current fusion mode is parsed from the bitstream, including: when the current image block allows the use of the SBMM mode, and the current image block allows the use of the CIIP mode and / or TPM, the value of the merge_subblock_flag of the SBMM is parsed from the bitstream; wherein merge_subblock_flag is the first identifier of the SBMM.
[0018] Based on the first aspect, in some possible implementations, when the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among K alternative fusion modes, the value of the first identifier of the current fusion mode is parsed from the bitstream, including: when the current image block allows the use of the CIIP mode and TPM, the value of ciip_flag of the CIIP mode is parsed from the bitstream; wherein ciip_flag is the first identifier of the CIIP mode.
[0019] Based on the first aspect, in some possible implementations, the method further includes: when the current image block does not allow the use of the current fusion mode, or the current image block does not allow the use of a fusion mode other than the current fusion mode among K alternative fusion modes, obtaining the value of the first identifier of the current fusion mode by deduction.
[0020] Based on the first aspect, in some possible implementations, the method further includes: when the value of the first identifier of the current fusion mode cannot be parsed from the bitstream, obtaining the value of the first identifier of the current fusion mode by deduction.
[0021] Based on the first aspect, in some possible implementations, the current fusion mode is a traditional fusion mode, and the value of the first identifier of the current fusion mode is obtained by deduction, including: setting general_merge_flag to the value of regular_merge_flag; or, setting the value of regular_merge_flag to a first value; wherein general_merge_flag is used to indicate whether the inter-frame prediction parameters of the current image block are obtained from adjacent inter-frame prediction blocks, and regular_merge_flag is the first identifier of the traditional fusion mode.
[0022] Based on the first aspect, in some possible implementations, the current fusion mode is the MMVD mode, and when a first derivation condition is met, the value of the first identifier mmvd_merge_flag of the MMVD mode is set to a first value; wherein the first derivation condition includes: the current image block allows the use of the MMVD mode.
[0023] Based on the first aspect, in some possible implementations, the current fusion mode is SBMM, and the value of the first identifier of the current fusion mode is obtained by derivation, including: when a second derivation condition is met, setting the value of the first identifier merge_subblock_flag of SBMM to a first value; wherein the second derivation condition includes: the current image block allows the use of SBMM.
[0024] Based on the first aspect, in some possible implementations, the current fusion mode is the CIIP mode, and the value of the first identifier of the current fusion mode is obtained by derivation, including: when a third derivation condition is met, setting the value of the first identifier ciip_flag of the CIIP mode to a first value; wherein the third derivation condition includes: the current image block allows the use of the CIIP mode.
[0025] Based on the first aspect, in some possible implementations, the current fusion mode is TPM, and the value of the first identifier of the current fusion mode is obtained by derivation, including: when a fourth derivation condition is met, setting the value of the first identifier merge_triangle_flag of TPM to a first value; wherein the fourth derivation condition includes: the current image block allows the use of TPM.
[0026] Among them, merge_triangle_flag can also be MergeTriangleFlag.
[0027] Based on the first aspect, in some possible implementations, the K candidate fusion modes include the following: a traditional fusion mode, an MMVD mode, a SBMM, a CIIP mode, and a TPM.
[0028] In a second aspect, the present application provides an inter-frame prediction device that can be applied to a video decoder. The device may include: a determination module, which is used to determine whether the current image block is allowed to use each fusion mode in K candidate fusion modes after determining that the current image block uses a fusion mode for inter-frame prediction, where K is a positive integer greater than or equal to 2; a parsing module, which is used to parse and obtain the value of a first identifier of the current fusion mode from a bitstream when the current image block is allowed to use the current fusion mode and the current image block is allowed to use a fusion mode other than the current fusion mode in the K candidate fusion modes; and a prediction module, which is used to perform inter-frame prediction on the current image block using the current fusion mode when the value of the first identifier indicates that the fusion mode for inter-frame prediction of the current image block is the current fusion mode, so as to obtain a prediction block of the current image block.
[0029] Based on the second aspect, in some possible implementations, the prediction module is also used to perform inter-frame prediction on the current image block using the current fusion mode when the current image block does not allow the use of K alternative fusion modes other than the current fusion mode to obtain a prediction block of the current image block.
[0030] Based on the second aspect, in some possible implementations, a determination module is used to obtain prediction parameters corresponding to a current image block; based on the prediction parameters, it is determined whether the current image block is allowed to use various fusion modes; wherein the prediction parameters include one or more of the following: an indication of a syntax element of a parent video processing unit related to the current image block, the size of the current image block, indication information for indicating whether the current image block has a residual, and the type of the parent video processing unit.
[0031] Based on the second aspect, in some possible implementations, the upper-level video processing unit includes a slice where the current image block is located, a slice group where the current image block is located, an image where the current image block is located, or a video sequence where the current image block is located.
[0032] Based on the second aspect, in some possible implementations, the parsing module is used to parse and obtain the value of regular_merge_flag of the traditional fusion mode from the bitstream when the current image block allows the use of at least one of the MMVD mode, SBMM, CIIP mode, and TPM; wherein regular_merge_flag is the first identifier of the traditional fusion mode.
[0033] Based on the second aspect, in some possible implementations, the parsing module is used to parse and obtain the value of mmvd_merge_flag of the MMVD mode from the bitstream when the current image block allows the use of the MMVD mode and the current image block allows the use of at least one of the SBMM, CIIP mode, and TPM; wherein mmvd_merge_flag is the first identifier of the MMVD mode.
[0034] Based on the second aspect, in some possible implementations, the parsing module is used to parse and obtain the merge_subblock_flag value of the SBMM from the bitstream when the current image block allows the use of the SBMM mode and the current image block allows the use of the CIIP mode and / or TPM; wherein merge_subblock_flag is the first identifier of the SBMM.
[0035] Based on the second aspect, in some possible implementations, the parsing module is used to parse and obtain the value of ciip_flag of the CIIP mode from the code stream when the current image block allows the use of the CIIP mode and TPM; wherein ciip_flag is the first identifier of the CIIP mode.
[0036] Based on the second aspect, in some possible implementations, the device also includes: a derivation module, which is used to obtain the value of the first identifier of the current fusion mode by derivation when the current image block does not allow the use of the current fusion mode, or the current image block does not allow the use of a fusion mode other than the current fusion mode among K alternative fusion modes.
[0037] Based on the second aspect, in some possible implementations, the device further includes: a derivation module, configured to obtain the value of the first identifier of the current fusion mode by derivation when the value of the first identifier of the current fusion mode cannot be obtained by parsing the code stream.
[0038] Based on the second aspect, in some possible implementations, the current fusion mode is a traditional fusion mode, and the derivation module is used to set general_merge_flag to the value of regular_merge_flag; or, set the value of regular_merge_flag to a first value; wherein general_merge_flag is used to indicate whether the inter-frame prediction parameters of the current image block are obtained from adjacent inter-frame prediction blocks, and regular_merge_flag is the first identifier of the traditional fusion mode.
[0039] Based on the second aspect, in some possible implementations, the current fusion mode is the MMVD mode, and the derivation module is used to set the value of the first identifier mmvd_merge_flag of the MMVD mode to a first value when a first derivation condition is met; wherein the first derivation condition includes: the current image block allows the use of the MMVD mode.
[0040] Based on the second aspect, in some possible implementations, when the current fusion mode is SBMM, the derivation module is used to set the value of the first identifier merge_subblock_flag of SBMM to a first value when a second derivation condition is met; wherein the second derivation condition includes: the current image block allows the use of SBMM.
[0041] Based on the second aspect, in some possible implementations, the current fusion mode is the CIIP mode, and the derivation module is used to set the value of the first identifier ciip_flag of the CIIP mode to a first value when a third derivation condition is met; wherein the third derivation condition includes: the current image block allows the use of the CIIP mode.
[0042] Based on the second aspect, in some possible implementations, the current fusion mode is a TPM mode, and the derivation module is used to set the value of the first identifier merge_triangle_flag of TPM to a first value when a fourth derivation condition is met; wherein the fourth derivation condition includes: the current image block allows the use of TPM.
[0043] Based on the second aspect, in some possible implementations, the K candidate fusion modes include the following: traditional fusion mode, MMVD mode, SBMM, CIIP mode, and TPM.
[0044] In a third aspect, the present application provides a video decoder, which is used to decode an image block from a bitstream, comprising: an entropy decoding module, used to decode an index identifier from the bitstream, the index identifier being used to indicate target candidate motion information of a currently decoded image block; an inter-frame prediction device as described in any one of the second aspects above, the inter-frame prediction device being used to predict motion information of a currently decoded image block based on the target candidate motion information indicated by the index identifier, and determining a predicted pixel value of the currently decoded image block based on the motion information of the currently decoded image block; and a reconstruction module, used to reconstruct the currently decoded image block based on the predicted pixel value.
[0045] In a fourth aspect, the present application provides a device for decoding video data, the device comprising: a memory for storing video data in the form of a code stream; and a video decoder for decoding the video data from the code stream.
[0046] In a fifth aspect, the present application provides a decoding device, comprising: a non-volatile memory and a processor coupled to each other, wherein the processor calls a program code stored in the memory to execute part or all of the steps of any one method of the first aspect.
[0047] In a sixth aspect, the present application provides a computer-readable storage medium storing a program code, wherein the program code includes instructions for executing part or all of the steps of any one of the methods of the first aspect.
[0048] In a seventh aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute part or all of the steps of any one of the methods of the first aspect.
[0049] It should be understood that the second to seventh aspects of the present application are consistent with the technical solutions of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0051] Figure 1A is a block diagram of an example of a video encoding and decoding system 10 for implementing an embodiment of the present application;
[0052] Figure 1B is a block diagram of an example of a video decoding system 40 for implementing an embodiment of the present application;
[0053] Figure 2 is a block diagram of an example structure of an encoder 20 for implementing an embodiment of the present application;
[0054] Figure 3 is a block diagram of an example structure of a decoder 30 for implementing an embodiment of the present application;
[0055] Figure 4 is a block diagram of an example of a video decoding device 400 for implementing an embodiment of the present application;
[0056] Figure 5 is a block diagram of another encoding device or decoding device example for implementing the embodiments of the present application;
[0057] Figure 6 Schematic diagram of the spatial domain and temporal domain of the current image block in the embodiment of the present application;
[0058] Fig. 7A A schematic diagram of an MMVD search point in an embodiment of the present application;
[0059] Figure 7B Schematic diagram of the MMVD search process in an embodiment of the present application;
[0060] Figure 8 A schematic diagram of dividing the current image block in an embodiment of the present application;
[0061] Fig. 9 FIG1 is a flowchart of an inter-frame prediction method in an embodiment of the present application;
[0062] Fig.10 The process diagram of the inter-frame prediction method in the embodiment of the present application is as follows: Figure 2 ;
[0063] Fig.11 Schematic diagram of the structure of the inter-frame prediction device in the embodiment of the present application. DETAILED DESCRIPTION
[0064] The following is a description of the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. In the following description, reference is made to the drawings that form a part of the present disclosure and show the specific aspects of the embodiments of the present application or the specific aspects of the embodiments of the present application in an illustrative manner. It should be understood that the embodiments of the present application can be used in other aspects and may include structural or logical changes not depicted in the drawings. Therefore, the following detailed description should not be understood in a restrictive sense, and the scope of the present application is defined by the appended claims. For example, it should be understood that the disclosure of the described method can be equally applicable to the corresponding device or system for performing the method, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units such as functional units to perform the one or more method steps described (for example, one unit performs one or more steps, or multiple units, each of which performs one or more of the multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific device is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of the one or more units (e.g., a step to perform the functionality of the one or more units, or multiple steps, each of which performs the functionality of one or more of the multiple units), even if such one or more steps are not explicitly described or illustrated in the drawings. Further, it should be understood that, unless otherwise explicitly stated, the features of the various exemplary embodiments and / or aspects described herein may be combined with each other.
[0065] The technical solutions involved in the embodiments of the present application may not only be applied to existing video coding standards (such as H.264, HEVC and other standards), but may also be applied to future video coding standards (such as H.266 standards). The terms used in the implementation method section of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application. The following is a brief introduction to some concepts that may be involved in the embodiments of this application.
[0066] Video coding generally refers to processing a sequence of pictures that form a video or video sequence. In the field of video coding, the terms "picture", "frame" or "image" can be used as synonyms. Video coding used in this article means video encoding or video decoding. Video encoding is performed on the source side and generally includes processing (e.g., by compression) the original video picture to reduce the amount of data required to represent the video picture, thereby more efficiently storing and / or transmitting. Video decoding is performed on the destination side and generally includes inverse processing relative to the encoder to reconstruct the video picture. The "encoding" of video pictures involved in the embodiments should be understood as involving "encoding" or "decoding" of video sequences. The combination of the encoding part and the decoding part is also referred to as codec (encoding and decoding).
[0067] A video sequence consists of a series of pictures, which are further divided into slices, which are further divided into blocks. Video coding is performed in blocks. In some new video coding standards, the concept of blocks is further expanded. For example, in the H.264 standard, there are macroblocks (MB), which can be further divided into multiple prediction blocks (partitions) that can be used for predictive coding. In the high-performance video coding (HEVC) standard, basic concepts such as coding units (CU), prediction units (PU) and transform units (TU) are used to functionally divide various block units and describe them using a new tree-based structure. For example, the video coding standard divides a frame of an image into non-overlapping coding tree units (CTUs), and then divides a CTU into several child nodes. These child nodes can be divided into smaller child nodes according to the quad tree (QT), and the smaller child nodes can continue to be divided, thus forming a quad tree structure. If a node is no longer divided, it is called a CU. CU is the basic unit for dividing and encoding the coded image. There are similar tree structures for PU and TU. PU can correspond to the prediction block and is the basic unit of prediction coding. CU is further divided into multiple PUs according to the division mode. TU can correspond to the transform block and is the basic unit for transforming the prediction residual. However, no matter CU, PU or TU, they all belong to the concept of block (or image block) in essence.
[0068] For example, in HEVC, a CTU is split into multiple CUs using a quadtree structure represented as a coding tree. A decision is made at the CU level whether to use inter-picture (temporal) or intra-picture (spatial) prediction to encode a picture area. Each CU can be further split into one, two or four PUs according to the PU split type. The same prediction process is applied within a PU, and relevant information is transmitted to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the PU split type, the CU can be divided into transform units (TUs) according to other quadtree structures similar to the coding tree for the CU. In the latest developments in video compression technology, quadtree and binarytree (QTBT) are used to split frames to split coding blocks. In the QTBT block structure, the CU can be square or rectangular in shape.
[0069] In this article, for the convenience of description and understanding, the image block to be encoded in the current encoded image may be referred to as the current block. For example, in encoding, it refers to the block currently being encoded; in decoding, it refers to the block currently being decoded. The decoded image block in the reference image used to predict the current block is referred to as a reference block, that is, the reference block is a block that provides a reference signal for the current block, wherein the reference signal represents the pixel value in the image block. The block in the reference image that provides a prediction signal for the current block may be referred to as a prediction block, wherein the prediction signal represents the pixel value or sampling value or sampling signal in the prediction block. For example, after traversing multiple reference blocks, the best reference block is found. This best reference block will provide a prediction for the current block, and this block is referred to as a prediction block.
[0070] In the case of lossless video coding, the original video picture can be reconstructed, that is, the reconstructed video picture has the same quality as the original video picture (assuming no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression is performed by, for example, quantization to reduce the amount of data required to represent the video picture, but the decoder side cannot fully reconstruct the video picture, that is, the quality of the reconstructed video picture is lower or worse than the quality of the original video picture.
[0071] Several video coding standards of H.261 belong to the category of "lossy hybrid video codecs" (i.e., combining spatial and temporal prediction in the sample domain with 2D transform coding in the transform domain for applying quantization). Each picture of a video sequence is usually divided into a set of non-overlapping blocks, which are usually encoded at the block level. In other words, the encoder side usually processes, i.e., encodes the video at the block (video block) level, for example, by generating a prediction block through spatial (intra-picture) prediction and temporal (inter-picture) prediction, subtracting the prediction block from the current block (currently processed or to be processed block) to obtain a residual block, transforming the residual block in the transform domain and quantizing the residual block to reduce the amount of data to be transmitted (compressed), while the decoder side applies the inverse processing part relative to the encoder to the coded or compressed block to reconstruct the current image block for representation. In addition, the encoder replicates the decoder processing cycle, so that the encoder and decoder generate the same prediction (e.g., intra-frame prediction and inter-frame prediction) and / or reconstruction for processing, i.e., encoding subsequent blocks.
[0072] The following describes the system architecture used in the embodiments of the present application. Figure 1A , Figure 1A A schematic block diagram of a video encoding and decoding system 10 used in an embodiment of the present application is given as an example. Figure 1AAs shown, the video encoding and decoding system 10 may include a source device 12 and a destination device 14, the source device 12 generating encoded video data, and therefore, the source device 12 may be referred to as a video encoding device. The destination device 14 may decode the encoded video data generated by the source device 12, and therefore, the destination device 14 may be referred to as a video decoding device. Various implementations of the source device 12, the destination device 14, or both may include one or more processors and a memory coupled to the one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other media that can be used to store the desired program code in the form of instructions or data structures that can be accessed by a computer, as described herein. The source device 12 and the destination device 14 may include various devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, wireless communication devices, or the like.
[0073] Although Figure 1A The source device 12 and the destination device 14 are depicted as separate devices, but device embodiments may also include both the source device 12 and the destination device 14 or the functionality of both, i.e., the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality. In such embodiments, the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0074] The source device 12 and the destination device 14 may be communicatively connected via a link 13, and the destination device 14 may receive the encoded video data from the source device 12 via the link 13. The link 13 may include one or more media or devices capable of moving the encoded video data from the source device 12 to the destination device 14. In one example, the link 13 may include one or more communication media that enable the source device 12 to transmit the encoded video data directly to the destination device 14 in real time. In this example, the source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol), and may transmit the modulated video data to the destination device 14. The one or more communication media may include wireless and / or wired communication media, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the source device 12 to the destination device 14.
[0075] The source device 12 includes an encoder 20. Optionally, the source device 12 may also include a picture source 16, a picture preprocessor 18, and a communication interface 22. In a specific implementation, the encoder 20, the picture source 16, the picture preprocessor 18, and the communication interface 22 may be hardware components in the source device 12, or may be software programs in the source device 12.
[0076] They are described as follows:
[0077] The picture source 16 may include or may be any type of picture capture device, for example, for capturing real-world pictures, and / or any type of pictures or comments (for screen content encoding, some text on the screen is also considered to be part of the picture or image to be encoded) generating device, for example, a computer graphics processor for generating computer animation pictures, or any type of device for acquiring and / or providing real-world pictures, computer animation pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). The picture source 16 may be a camera for capturing pictures or a memory for storing pictures, and the picture source 16 may also include any type of (internal or external) interface for storing previously captured or generated pictures and / or acquiring or receiving pictures. When the picture source 16 is a camera, the picture source 16 may be, for example, a local or integrated camera integrated in the source device; when the picture source 16 is a memory, the picture source 16 may be, for example, a local or integrated memory integrated in the source device. When the picture source 16 includes an interface, the interface may be, for example, an external interface for receiving pictures from an external video source, such as an external picture capture device, such as a camera, an external memory, or an external picture generating device, such as an external computer graphics processor, a computer, or a server. The interface may be any type of interface according to any proprietary or standardized interface protocol, such as a wired or wireless interface, an optical interface.
[0078] Among them, the picture can be regarded as a two-dimensional array or matrix of pixels (picture element). The pixels in the array can also be called sampling points. The number of sampling points in the array or picture in the horizontal and vertical directions (or axes) defines the size and / or resolution of the picture. In order to represent the color, three color components are usually used, that is, the picture can be represented as or include three sampling arrays. For example, in the RBG format or color space, the picture includes corresponding red, green and blue sampling arrays. However, in video coding, each pixel is usually represented in a brightness / chroma format or color space, such as for a picture in the YUV format, including a brightness component indicated by Y (sometimes also indicated by L) and two chroma components indicated by U and V. The brightness (luma) component Y represents the brightness or grayscale level intensity (for example, the two are the same in a grayscale picture), and the two chroma (chroma) components U and V represent the chroma or color information components. Accordingly, the picture in the YUV format includes a brightness sampling array of brightness sampling values (Y), and two chroma sampling arrays of chroma values (U and V). An image in RGB format may be converted or transformed into YUV format, and vice versa, which process is also referred to as color conversion or transformation. If the image is black and white, the image may only include a brightness sampling array. In the embodiment of the present application, the image transmitted from the image source 16 to the image processor may also be referred to as raw image data 17.
[0079] The image preprocessor 18 is used to receive the original image data 17 and perform preprocessing on the original image data 17 to obtain a preprocessed image 19 or preprocessed image data 19. For example, the preprocessing performed by the image preprocessor 18 may include refurbishment, color format conversion (e.g., from RGB format to YUV format), color adjustment, or denoising.
[0080] The encoder 20 (or video encoder 20) is used to receive the pre-processed picture data 19, and process the pre-processed picture data 19 using a relevant prediction mode (such as the prediction mode in each embodiment of this invention), so as to provide encoded picture data 21 (hereinafter further based on Figure 2 or Figure 4 or Figure 5 ). In some embodiments, the encoder 20 may be used to execute the various embodiments described below to implement the application of the chroma block prediction method described in the embodiments of the present application on the encoding side.
[0081] The communication interface 22 can be used to receive the encoded picture data 21 and transmit the encoded picture data 21 to the destination device 14 or any other device (such as a memory) through the link 13 for storage or direct reconstruction. The other device can be any device for decoding or storage. The communication interface 22 can, for example, be used to encapsulate the encoded picture data 21 into a suitable format, such as a data packet, for transmission on the link 13.
[0082] The destination device 14 includes a decoder 30. Optionally, the destination device 14 may also include a communication interface 28, a picture post-processor 32, and a display device 34. They are described as follows:
[0083] The communication interface 28 can be used to receive the encoded picture data 21 from the source device 12 or any other source, such as a storage device, such as an encoded picture data storage device. The communication interface 28 can be used to transmit or receive the encoded picture data 21 via the link 13 between the source device 12 and the destination device 14 or via any type of network, such as a direct wired or wireless connection, any type of network, such as a wired or wireless network or any combination thereof, or any type of private network and public network, or any combination thereof. The communication interface 28 can be used, for example, to decapsulate the data packet transmitted by the communication interface 22 to obtain the encoded picture data 21.
[0084] Both communication interface 28 and communication interface 22 may be configured as unidirectional communication interfaces or bidirectional communication interfaces and may be used, for example, to send and receive messages to establish connections, confirm and exchange any other information related to communication links and / or data transmissions such as encoded picture data transmissions.
[0085] The decoder 30 (or decoder 30) is configured to receive the encoded picture data 21 and provide decoded picture data 31 or decoded picture 31 (hereinafter further described based on Figure 3 or Figure 4 or Figure 5 ). In some embodiments, the decoder 30 may be used to execute the various embodiments described below to implement the application of the chrominance block prediction method described in the embodiments of the present application on the decoding side.
[0086] The picture post-processor 32 is used to perform post-processing on the decoded picture data 31 (also called reconstructed picture data) to obtain post-processed picture data 33. The post-processing performed by the picture post-processor 32 may include: color format conversion (for example, from YUV format to RGB format), color adjustment, repair or resampling, or any other processing, and can also be used to transmit the post-processed picture data 33 to the display device 34.
[0087] A display device 34 is provided for receiving the post-processed picture data 33 to display the picture to, for example, a user or viewer. The display device 34 may be or may include any type of display for presenting the reconstructed picture, such as an integrated or external display or monitor. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display.
[0088] Although, Figure 1A The source device 12 and the destination device 14 are depicted as separate devices, but device embodiments may also include both the source device 12 and the destination device 14 or the functionality of both, i.e., the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality. In such embodiments, the source device 12 or the corresponding functionality and the destination device 14 or the corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0089] It is obvious to a person skilled in the art based on the description that the functionality or Figure 1A The presence and (exact) division of the functionality of the source device 12 and / or destination device 14 shown may vary depending on the actual device and application. The source device 12 and the destination device 14 may include any of a variety of devices, including any type of handheld or stationary device, such as a notebook or laptop computer, a mobile phone, a smart phone, a tablet or tablet computer, a video camera, a desktop computer, a set-top box, a television, a camera, a car device, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or a content distribution server), a broadcast receiver device, a broadcast transmitter device, etc., and may not use or use any type of operating system.
[0090] Both the encoder 20 and the decoder 30 may be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the technology is partially implemented in software, the device may store the instructions of the software in a suitable non-transitory computer-readable storage medium, and may use one or more processors to execute the instructions in hardware to perform the technology of the present disclosure. Any of the foregoing (including hardware, software, a combination of hardware and software, etc.) may be considered one or more processors.
[0091] In some cases, Figure 1A The video encoding and decoding system 10 shown in is only an example, and the technology of the embodiment of the present application can be applied to video encoding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between the encoding and decoding devices. In other examples, data can be retrieved from a local memory, streamed over a network, etc. The video encoding device can encode the data and store the data in a memory, and / or the video decoding device can retrieve the data from the memory and decode the data. In some examples, encoding and decoding are performed by devices that do not communicate with each other but only encode data to a memory and / or retrieve data from a memory and decode data.
[0092] See also Figure 1B , Figure 1B According to an exemplary embodiment, Figure 2 The encoder 20 and / or Figure 3 30. The video decoding system 40 may implement a combination of various techniques of the embodiments of the present application. In the illustrated embodiment, the video decoding system 40 may include an imaging device 41, an encoder 20, a decoder 30 (and / or a video codec implemented by logic circuits 47 of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and / or a display device 45.
[0093] like Figure 1B As shown, imaging device 41, antenna 42, processing unit 46, logic circuit 47, encoder 20, decoder 30, processor 43, memory 44 and / or display device 45 can communicate with each other. As discussed, although video decoding system 40 is illustrated with encoder 20 and decoder 30, in different examples, video decoding system 40 may include only encoder 20 or only decoder 30.
[0094] In some examples, antenna 42 can be used to transmit or receive a coded bit stream of video data. In addition, in some examples, display device 45 can be used to present video data. In some examples, logic circuit 47 can be implemented by processing unit 46. Processing unit 46 can include application-specific integrated circuit (ASIC) logic, graphics processor, general processor, etc. Video decoding system 40 can also include optional processor 43, which can similarly include application-specific integrated circuit (ASIC) logic, graphics processor, general processor, etc. In some examples, logic circuit 47 can be implemented by hardware, such as video encoding dedicated hardware, etc., and processor 43 can be implemented by general software, operating system, etc. In addition, memory 44 can be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.). In a non-limiting example, memory 44 can be implemented by cache memory. In some examples, logic circuitry 47 may access memory 44 (eg, for implementing an image buffer). In other examples, logic circuitry 47 and / or processing unit 46 may include memory (eg, cache, etc.) for implementing an image buffer, etc.
[0095] In some examples, encoder 20 implemented by logic circuits may include an image buffer (e.g., implemented by processing unit 46 or memory 44) and a graphics processing unit (e.g., implemented by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include encoder 20 implemented by logic circuits 47 to implement reference Figure 2 The various modules discussed in connection with the encoder and / or any other encoder system or subsystem described herein. Logic circuits may be used to perform the various operations discussed herein.
[0096] In some examples, decoder 30 may be implemented in a similar manner by logic circuit 47 to implement reference Figure 3The decoder 30 and / or any other decoder system or subsystem described herein may include various modules discussed above. In some examples, the decoder 30 implemented by logic circuits may include an image buffer (implemented by processing unit 43 or memory 44) and a graphics processing unit (implemented, for example, by processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the decoder 30 implemented by logic circuits 47 to implement the decoder 30 with reference to FIG. Figure 3 and / or the various modules discussed above for any other decoder system or subsystem described herein.
[0097] In some examples, antenna 42 may be used to receive an encoded bitstream of video data. As discussed, the encoded bitstream may include data related to the encoded video frames, indicators, index values, mode selection data, etc. discussed herein, such as data related to the encoded partitions (e.g., transform coefficients or quantized transform coefficients, (as discussed) optional indicators, and / or data defining the encoded partitions). Video decoding system 40 may also include decoder 30 coupled to antenna 42 and used to decode the encoded bitstream. Display device 45 is used to present the video frames.
[0098] It should be understood that in the embodiments of the present application, for the examples described with reference to encoder 20, decoder 30 can be used to perform the reverse process. With respect to signaling prediction parameters, decoder 30 can be used to receive and parse such prediction parameters and decode the relevant video data accordingly. In some examples, encoder 20 can entropy encode the prediction parameters into a coded video bitstream. In such examples, decoder 30 can parse such prediction parameters and decode the relevant video data accordingly.
[0099] It should be noted that the optimization processing method for integrating motion vector difference technology described in the embodiment of the present application is mainly used for the inter-frame prediction process, which exists in both the encoder 20 and the decoder 30. The encoder 20 and the decoder 30 in the embodiment of the present application can be, for example, H.263, H.264, HEVV, MPEG-2, MPEG-4, VP8, VP9 and other video standard protocols or encoders / decoders corresponding to the next generation video standard protocols (such as H.266, etc.).
[0100] See also Figure 2 , Figure 2 Schematic / conceptual block diagram of an example of an encoder 20 for implementing an embodiment of the present application is shown. Figure 2In the example of , the encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy encoding unit 270. The prediction processing unit 260 may include an inter-prediction unit 244, an intra-prediction unit 254, and a mode selection unit 262. The inter-prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). Figure 2 The illustrated encoder 20 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.
[0101] For example, the residual calculation unit 204, the transform processing unit 206, the quantization unit 208, the prediction processing unit 260, and the entropy coding unit 270 form a forward signal path of the encoder 20, while for example, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, and the prediction processing unit 260 form a backward signal path of the encoder, wherein the backward signal path of the encoder corresponds to the signal path of the decoder (see Figure 3 Decoder 30 in ).
[0102] The encoder 20 receives a picture 201 or an image block 203 of the picture 201, e.g., a picture in a sequence of pictures forming a video or a video sequence, via, e.g., an input 202. The image block 203 may also be referred to as a current picture block or a picture block to be encoded, and the picture 201 may be referred to as a current picture or a picture to be encoded (particularly when the current picture is distinguished from other pictures in video coding, e.g., previously encoded and / or decoded pictures in the same video sequence, i.e., a video sequence that also includes the current picture).
[0103] An embodiment of the encoder 20 may include a segmentation unit ( Figure 2 201 into a plurality of blocks, such as image blocks 203, usually into a plurality of non-overlapping blocks. The segmentation unit may be used to use the same block size for all pictures in the video sequence and define a corresponding grid of block sizes, or to change the block size between pictures or subsets or groups of pictures, and to segment each picture into corresponding blocks.
[0104] In one example, prediction processing unit 260 of encoder 20 may be used to perform any combination of the above-described partitioning techniques.
[0105] Like the picture 201, the image block 203 is also or can be regarded as a two-dimensional array or matrix of sampling points with sample values, although its size is smaller than that of the picture 201. In other words, the image block 203 may include, for example, one sampling array (e.g., a luminance array in the case of the black and white picture 201) or three sampling arrays (e.g., one luminance array and two chrominance arrays in the case of a color picture) or any other number and / or type of arrays depending on the color format applied. The number of sampling points in the horizontal and vertical directions (or axes) of the image block 203 defines the size of the image block 203.
[0106] like Figure 2 The encoder 20 shown is used to encode the picture 201 block by block, for example, encoding and prediction are performed on each image block 203.
[0107] The residual calculation unit 204 is used to calculate the residual block 205 based on the picture image block 203 and the prediction block 265 (other details of the prediction block 265 are provided below), for example, by subtracting the sample value of the prediction block 265 from the sample value of the picture image block 203 sample by sample (pixel by pixel) to obtain the residual block 205 in the sample domain.
[0108] The transform processing unit 206 is used to apply a transform such as discrete cosine transform (DCT) or discrete sine transform (DST) on the sample values of the residual block 205 to obtain a transform coefficient 207 in the transform domain. The transform coefficient 207 can also be called a transform residual coefficient and represents the residual block 205 in the transform domain.
[0109] The transform processing unit 206 can be used to apply an integer approximation of the DCT / DST, such as the transform specified for HEVC / H.265. Compared to the orthogonal DCT transform, this integer approximation is usually scaled by a certain factor. In order to maintain the norm of the residual block processed by the forward transform and the inverse transform, an additional scaling factor is applied as part of the transform process. The scaling factor is usually selected based on certain constraints, such as the scaling factor is a power of 2 for the shift operation, the bit depth of the transform coefficients, the trade-off between accuracy and implementation cost, etc. For example, a specific scaling factor is specified for the inverse transform on the decoder 30 side by, for example, the inverse transform processing unit 212 (and for the corresponding inverse transform on the encoder 20 side by, for example, the inverse transform processing unit 212), and accordingly, a corresponding scaling factor can be specified for the forward transform on the encoder 20 side by the transform processing unit 206.
[0110] The quantization unit 208 is used to quantize the transform coefficients 207, for example, by applying scalar quantization or vector quantization, to obtain quantized transform coefficients 209. The quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded down to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. A suitable quantization step size may be indicated by the QP. For example, the quantization parameter may be an index of a predefined set of suitable quantization step sizes. For example, a smaller quantization parameter may correspond to fine quantization (smaller quantization step size), a larger quantization parameter may correspond to coarse quantization (larger quantization step size), and vice versa. Quantization may include dividing by the quantization step size and corresponding quantization or inverse quantization, for example, performed by inverse quantization 210, or may include multiplying by the quantization step size. Embodiments according to some standards such as HEVC may use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation containing division. Additional scaling factors may be introduced for quantization and inverse quantization to recover the norm of the residual block that may be modified by the scale used in the fixed-point approximation of the equation for the quantization step size and the quantization parameter. In an example implementation, the scales for the inverse transform and inverse quantization may be combined. Alternatively, a custom quantization table may be used and signaled from an encoder to a decoder in, for example, a bitstream. Quantization is a lossy operation, where the larger the quantization step size, the greater the loss.
[0111] The inverse quantization unit 210 is used to apply the inverse quantization of the quantization unit 208 on the quantized coefficients to obtain inverse quantized coefficients 211, for example, applying an inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step size as the quantization unit 208. The inverse quantized coefficients 211 may also be referred to as inverse quantized residual coefficients 211, corresponding to the transform coefficients 207, although the loss due to quantization is generally different from that of the transform coefficients.
[0112] The inverse transform processing unit 212 is used to apply the inverse transform of the transform applied by the transform processing unit 206, such as an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), to obtain an inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as an inverse transform dequantized block 213 or an inverse transform residual block 213.
[0113] The reconstruction unit 214 (e.g., the summer 214) is used to add the inverse transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain the reconstructed block 215 in the sample domain, for example, by adding the sample values of the reconstructed residual block 213 to the sample values of the prediction block 265.
[0114] Optionally, a buffer unit 216 (or simply "buffer" 216), such as a line buffer 216, is used to buffer or store the reconstructed blocks 215 and corresponding sample values for, for example, intra-frame prediction. In other embodiments, the encoder can be used to use the unfiltered reconstructed blocks and / or corresponding sample values stored in the buffer unit 216 for any type of estimation and / or prediction, such as intra-frame prediction.
[0115] For example, embodiments of the encoder 20 may be configured such that the buffer unit 216 is used not only to store the reconstructed blocks 215 used for the intra prediction 254, but also for the loop filter unit 220 (in Figure 2 ), and / or, for example, such that the buffer unit 216 and the decoded picture buffer unit 230 form a buffer. Other embodiments may be used to store the filtered block 221 and / or the blocks or samples ( Figure 2 (not shown) is used as input or basis for intra-frame prediction 254.
[0116] The loop filter unit 220 (or simply "loop filter" 220) is used to filter the reconstructed block 215 to obtain a filtered block 221, so as to smoothly perform pixel conversion or improve video quality. The loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 220 is in Figure 2 2 is shown as an in-loop filter, but in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221. The decoded picture buffer 230 may store the reconstructed coding block after the loop filter unit 220 performs a filtering operation on the reconstructed coding block.
[0117] Embodiments of the encoder 20 (correspondingly, the loop filter unit 220) can be used to output loop filter parameters (e.g., sample adaptive offset information), for example, directly or after entropy encoding by the entropy encoding unit 270 or any other entropy encoding unit, such that the decoder 30 can receive and apply the same loop filter parameters for decoding.
[0118] The decoded picture buffer (DPB) 230 may be a reference picture memory for storing reference picture data for use by the encoder 20 in encoding video data. The DPB 230 may be formed by any of a variety of memory devices, such as a dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM)) or other types of memory devices. The DPB 230 and the buffer 216 may be provided by the same memory device or separate memory devices. In one example, the decoded picture buffer (DPB) 230 is used to store the filtered block 221. The decoded picture buffer 230 may further be used to store other previously filtered blocks of the same current picture or a different picture, such as a previously reconstructed picture, such as the previously reconstructed and filtered block 221, and may provide a complete previously reconstructed, i.e., decoded picture (and corresponding reference blocks and samples) and / or a portion of the reconstructed current picture (and corresponding reference blocks and samples), such as for inter-frame prediction. In one example, if the reconstructed block 215 is reconstructed without in-loop filtering, the decoded picture buffer (DPB) 230 is used to store the reconstructed block 215.
[0119] The prediction processing unit 260, also referred to as the block prediction processing unit 260, is used to receive or obtain an image block 203 (a current image block 203 of a current picture 201) and reconstructed picture data, such as reference samples of the same (current) picture from a buffer 216 and / or reference picture data 231 of one or more previously decoded pictures from a decoded picture buffer 230, and to process such data for prediction, i.e. to provide a prediction block 265 which may be an inter-prediction block 245 or an intra-prediction block 255.
[0120] The mode selection unit 262 may be used to select a prediction mode (eg, intra or inter prediction mode) and / or a corresponding prediction block 245 or 255 for use as a prediction block 265 to calculate the residual block 205 and reconstruct the reconstructed block 215 .
[0121] Embodiments of the mode selection unit 262 may be used to select a prediction mode (e.g., from those prediction modes supported by the prediction processing unit 260) that provides the best match or minimum residual (minimum residual means better compression in transmission or storage), or provides minimum signaling overhead (minimum signaling overhead means better compression in transmission or storage), or considers or balances both. The mode selection unit 262 may be used to determine the prediction mode based on rate distortion optimization (RDO), i.e., select a prediction mode that provides minimum rate distortion optimization, or select a prediction mode whose associated rate distortion at least satisfies the prediction mode selection criteria.
[0122] The prediction processing performed by an example of encoder 20 (eg, by prediction processing unit 260) and the mode selection performed (eg, by mode selection unit 262) will be explained in detail below.
[0123] As described above, the encoder 20 is used to determine or select the best or optimal prediction mode from a (predetermined) prediction mode set. The prediction mode set may include, for example, an intra-frame prediction mode and / or an inter-frame prediction mode.
[0124] The intra-frame prediction mode set may include 35 different intra-frame prediction modes, for example, non-directional modes such as DC (or mean) mode and planar mode, or directional modes as defined in H.265, or may include 67 different intra-frame prediction modes, for example, non-directional modes such as DC (or mean) mode and planar mode, or directional modes as defined in H.266 under development.
[0125] In a possible implementation, the inter-prediction mode set depends on the available reference picture (i.e., at least part of the decoded picture stored in the DBP 230 as described above) and other inter-prediction parameters, such as whether to use the entire reference picture or only a part of the reference picture, such as a search window area around the area of the current block, to search for the best matching reference block, and / or, for example, whether to apply pixel interpolation such as half-pixel and / or quarter-pixel interpolation. The inter-prediction mode set may include, for example, an advanced motion vector prediction (AMVP) mode and a merge mode. In a specific implementation, the inter-prediction mode set may include an improved control point-based AMVP mode according to an embodiment of the present application, and an improved control point-based merge mode. In one example, the intra-prediction unit 254 may be used to perform any combination of the inter-prediction techniques described below.
[0126] In addition to the above prediction modes, the embodiments of the present application may also apply a skip mode and / or a direct mode.
[0127] The prediction processing unit 260 can be further used to partition the image block 203 into smaller block partitions or sub-blocks, for example, by iteratively using quad-tree (QT) partitioning, binary-tree (BT) partitioning or triple-tree (TT) partitioning, or any combination thereof, and for performing prediction for each of the block partitions or sub-blocks, for example, wherein the mode selection includes selecting a tree structure of the partitioned image block 203 and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.
[0128] The inter-frame prediction unit 244 may include a motion estimation (ME) unit ( Figure 2 ) and a motion compensation (MC) unit ( Figure 2 ). The motion estimation unit is used to receive or obtain a picture image block 203 (a current picture image block 203 of a current picture 201) and a decoded picture 231, or at least one or more previously reconstructed blocks, for example, reconstructed blocks of one or more other / different previously decoded pictures 231, to perform motion estimation. For example, a video sequence may include a current picture and a previously decoded picture 31, or in other words, the current picture and the previously decoded picture 31 may be part of a picture sequence forming a video sequence, or form the picture sequence.
[0129] For example, the encoder 20 may be configured to select a reference block from a plurality of reference blocks of the same or different pictures in a plurality of other pictures and send the reference block to the motion estimation unit ( Figure 2 (not shown) provides a reference picture and / or provides an offset (spatial offset) between the position (X, Y coordinates) of a reference block and the position of a current block as an inter-frame prediction parameter. The offset is also called a motion vector (MV).
[0130] The motion compensation unit is used to obtain inter-frame prediction parameters, and perform inter-frame prediction based on or using the inter-frame prediction parameters to obtain the inter-frame prediction block 245. Figure 2Motion compensation performed by the motion compensation unit 246 (not shown) may include fetching or generating a prediction block based on a motion / block vector determined by motion estimation (possibly performing interpolation to sub-pixel accuracy). Interpolation filtering may generate additional pixel samples from known pixel samples, thereby potentially increasing the number of candidate prediction blocks that may be used to encode the picture block. Upon receiving the motion vector for the PU of the current picture block, the motion compensation unit 246 may locate the prediction block to which the motion vector points in a reference picture list. The motion compensation unit 246 may also generate prediction parameters associated with the block and video slice for use by the decoder 30 when decoding the picture blocks of the video slice.
[0131] Specifically, the inter-frame prediction unit 244 may transmit prediction parameters to the entropy coding unit 270, wherein the prediction parameters include inter-frame prediction parameters (such as indication information of selecting an inter-frame prediction mode for current block prediction after traversing multiple inter-frame prediction modes). In a possible application scenario, if there is only one inter-frame prediction mode, the inter-frame prediction parameters may not be carried in the prediction parameters, and the decoding end 30 may directly use the default prediction mode for decoding. It can be understood that the inter-frame prediction unit 244 can be used to perform any combination of inter-frame prediction techniques.
[0132] The intra prediction unit 254 is used to obtain, for example, receive a picture block 203 (current picture block) of the same picture and one or more previously reconstructed blocks, for example, reconstructed adjacent blocks, for intra estimation. For example, the encoder 20 can be used to select an intra prediction mode from a plurality of (predetermined) intra prediction modes.
[0133] Embodiments of the encoder 20 may be configured to select an intra prediction mode based on an optimization criterion, such as minimum residual (eg, the intra prediction mode that provides a prediction block 255 most similar to the current picture block 203) or minimum rate distortion.
[0134] The intra prediction unit 254 is further configured to determine an intra prediction block 255 based on the intra prediction parameters of the selected intra prediction mode. In any case, after selecting the intra prediction mode for the block, the intra prediction unit 254 is further configured to provide the intra prediction parameters, i.e., provide information indicating the selected intra prediction mode for the block, to the entropy encoding unit 270. In one example, the intra prediction unit 254 can be configured to perform any combination of intra prediction techniques.
[0135] Specifically, the intra-frame prediction unit 254 may transmit prediction parameters to the entropy coding unit 270, wherein the prediction parameters include intra-frame prediction parameters (such as indication information of selecting an intra-frame prediction mode for current block prediction after traversing multiple intra-frame prediction modes). In a possible application scenario, if there is only one intra-frame prediction mode, the intra-frame prediction parameters may not be carried in the prediction parameters, and the decoding end 30 may directly use the default prediction mode for decoding.
[0136] The entropy coding unit 270 is used to apply an entropy coding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC (CAVLC) scheme, an arithmetic coding scheme, a context adaptive binary arithmetic coding (CABAC), a syntax-based context-adaptive binary arithmetic coding (SBAC), a probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques) to a single or all (or none) of the quantized residual coefficients 209, inter-frame prediction parameters, intra-frame prediction parameters, and / or loop filter parameters to obtain the encoded picture data 21 that can be output through the output 272 in the form of, for example, an encoded bitstream 21. The encoded bitstream can be transmitted to the video decoder 30, or archived for later transmission or retrieval by the video decoder 30. The entropy coding unit 270 can also be used to entropy encode other prediction parameters of the current video slice being encoded.
[0137] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform based encoder 20 may directly quantize the residual signal without a transform processing unit 206 for certain blocks or frames. In another embodiment, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 combined into a single unit.
[0138] Specifically, in the embodiment of the present application, the encoder 20 may be used to implement the optimization processing method for fusing motion vector difference technology described in the embodiments below.
[0139] It should be understood that other structural changes of the video encoder 20 can be used to encode the video stream. For example, for some image blocks or image frames, the video encoder 20 can directly quantize the residual signal without processing by the transform processing unit 206, and accordingly, it does not need to be processed by the inverse transform processing unit 212; or, for some image blocks or image frames, the video encoder 20 does not generate residual data, and accordingly, it does not need to be processed by the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210 and the inverse transform processing unit 212; or, the video encoder 20 can directly store the reconstructed image block as a reference block without being processed by the filter 220; or, the quantization unit 208 and the inverse quantization unit 210 in the video encoder 20 can be combined together. The loop filter 220 is optional, and in the case of lossless compression encoding, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210 and the inverse transform processing unit 212 are optional. It should be understood that, according to different application scenarios, the inter-frame prediction unit 244 and the intra-frame prediction unit 254 may be selectively enabled.
[0140] See also Figure 3 , Figure 3 A schematic / conceptual block diagram of an example of a decoder 30 for implementing an embodiment of the present application is shown. The video decoder 30 is used to receive encoded picture data (e.g., encoded bitstream) 21, for example, encoded by the encoder 20, to obtain a decoded picture 231. During the decoding process, the video decoder 30 receives video data from the video encoder 20, such as an encoded video bitstream representing picture blocks of an encoded video slice and associated prediction parameters.
[0141] exist Figure 3 In the example of , decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., summer 314), a buffer 316, a loop filter 320, a decoded picture buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter-prediction unit 344, an intra-prediction unit 354, and a mode selection unit 362. In some examples, video decoder 30 may perform substantially the same as reference. Figure 2 The encoding pass described by video encoder 20 is the inverse of the decoding pass.
[0142] The entropy decoding unit 304 is used to perform entropy decoding on the encoded picture data 21 to obtain, for example, quantized coefficients 309 and / or decoded encoding parameters ( Figure 3The entropy decoding unit 304 is further configured to forward the inter-frame prediction parameters, the intra-frame prediction parameters, and / or the other prediction parameters to the prediction processing unit 360. The video decoder 30 may receive the prediction parameters at the video slice level and / or the video block level.
[0143] The inverse quantization unit 310 may be functionally the same as the inverse quantization unit 110, the inverse transform processing unit 312 may be functionally the same as the inverse transform processing unit 212, the reconstruction unit 314 may be functionally the same as the reconstruction unit 214, the buffer 316 may be functionally the same as the buffer 216, the loop filter 320 may be functionally the same as the loop filter 220, and the decoded picture buffer 330 may be functionally the same as the decoded picture buffer 230.
[0144] The prediction processing unit 360 may include an inter-prediction unit 344 and an intra-prediction unit 354, wherein the inter-prediction unit 344 may be functionally similar to the inter-prediction unit 244, and the intra-prediction unit 354 may be functionally similar to the intra-prediction unit 254. The prediction processing unit 360 is generally used to perform block prediction and / or obtain a prediction block 365 from the encoded data 21, and receive or obtain prediction related parameters and / or information about the selected prediction mode from, for example, the entropy decoding unit 304 (explicitly or implicitly).
[0145] When the video slice is encoded as an intra-coded (I) slice, the intra-prediction unit 354 of the prediction processing unit 360 is used to generate a prediction block 365 for a picture block of the current video slice based on the signaled intra-prediction mode and data from a previously decoded block of the current frame or picture. When the video frame is encoded as an inter-coded (i.e., B or P) slice, the inter-prediction unit 344 (e.g., motion compensation unit) of the prediction processing unit 360 is used to generate a prediction block 365 for the video block of the current video slice based on the motion vector and other prediction parameters received from the entropy decoding unit 304. For inter-prediction, the prediction block may be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 may construct the reference frame lists: List 0 and List 1 using a default construction technique based on the reference pictures stored in the DPB 330.
[0146] The prediction processing unit 360 is configured to determine prediction information for a video block of a current video slice by parsing the motion vector and other prediction parameters, and use the prediction information to generate a prediction block for the current video block being decoded. In one example of the present application, the prediction processing unit 360 uses some of the received prediction parameters to determine a prediction mode (e.g., intra-frame or inter-frame prediction) for encoding the video block of the video slice, an inter-frame prediction slice type (e.g., B slice, P slice, or GPB slice), construction information of one or more of the reference picture lists for the slice, a motion vector for each inter-frame coded video block of the slice, an inter-frame prediction state of each inter-frame coded video block of the slice, and other information to decode the video block of the current video slice. In another example of the present disclosure, the prediction parameters received by the video decoder 30 from the bitstream include receiving prediction parameters in one or more of an adaptive parameter set (APS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.
[0147] Inverse quantization unit 310 may be used to inverse quantize (i.e., dequantize) quantized transform coefficients provided in the bitstream and decoded by entropy decoding unit 304. The inverse quantization process may include using quantization parameters calculated by video encoder 20 for each video block in a video slice to determine a degree of quantization that should be applied and likewise a degree of inverse quantization that should be applied.
[0148] The inverse transform processing unit 312 is used to apply an inverse transform (eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to generate a residual block in the pixel domain.
[0149] The reconstruction unit 314 (e.g., the summer 314) is used to add the inverse transform block 313 (i.e., the reconstructed residual block 313) to the prediction block 365 to obtain the reconstructed block 315 in the sample domain, for example, by adding the sample values of the reconstructed residual block 313 to the sample values of the prediction block 365.
[0150] The loop filter unit 320 is used to filter the reconstructed block 315 (during or after the encoding cycle) to obtain a filtered block 321, thereby smoothing pixel conversion or improving video quality. In one example, the loop filter unit 320 can be used to perform any combination of the filtering techniques described below. The loop filter unit 320 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters, such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a collaborative filter. Although the loop filter unit 320 is in Figure 3 3. Although shown as an in-loop filter in FIG. 3, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.
[0151] The decoded video blocks 321 in a given frame or picture are then stored in a decoded picture buffer 330 which stores reference pictures for subsequent motion compensation.
[0152] Decoder 30 is operable to output decoded picture 31 , eg, via output 332 , for presentation to or viewing by a user.
[0153] Other variations of the video decoder 30 may be used to decode the compressed bitstream. For example, the decoder 30 may generate an output video stream without the loop filter unit 320. For example, a non-transform based decoder 30 may directly inverse quantize the residual signal without the inverse transform processing unit 312 for certain blocks or frames. In another embodiment, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0154] Specifically, in the embodiment of the present application, the decoder 30 is used to implement the optimization processing method for fusing motion vector difference technology described in the embodiments below.
[0155] It should be understood that other structural changes of the video decoder 30 can be used to decode the encoded video bitstream. For example, the video decoder 30 can generate an output video stream without being processed by the filter 320; or, for some image blocks or image frames, the entropy decoding unit 304 of the video decoder 30 does not decode the quantized coefficients, and accordingly does not need to be processed by the inverse quantization unit 310 and the inverse transform processing unit 312. The loop filter 320 is optional; and for lossless compression, the inverse quantization unit 310 and the inverse transform processing unit 312 are optional. It should be understood that, according to different application scenarios, the inter-frame prediction unit and the intra-frame prediction unit can be selectively enabled.
[0156] It should be understood that in the encoder 20 and decoder 30 of the embodiment of the present application, the processing result of a certain link can be output to the next link after further processing. For example, after the interpolation filtering, motion vector derivation or loop filtering links, the processing results of the corresponding links can be further subjected to operations such as Clip or shift.
[0157] For example, the motion vector of the control point of the current image block derived from the motion vector of the adjacent affine coding block, or the motion vector of the sub-block of the current image block derived, can be further processed, and the embodiments of the present application do not limit this. For example, the value range of the motion vector is constrained to be within a certain bit width. Assuming that the bit width of the allowed motion vector is bitDepth, the range of the motion vector is -2 bitDepth-1 ~2 bitDepth-1 -1. If bitDepth is 16, the value range is -32768 to 32767. If bitDepth is 18, the value range is -131072 to 131071. For another example, the value of a motion vector (e.g., a motion vector MV of four 4×4 sub-blocks in an 8x8 image block) is constrained so that the maximum difference between the integer parts of the four 4×4 sub-block MVs does not exceed N pixels, for example, does not exceed one pixel.
[0158] It can be constrained in the following two ways to keep it within a certain bit width:
[0159] Method 1: remove the high bits of motion vector overflow:
[0160] ux=(vx+2 bitDepth )%2 bitDepth
[0161] vx=(ux≥2 bitDepth-1 )? (ux-2 bitDepth ):ux
[0162] uy=(vy+2 bitDepth )%2 bitDepth
[0163] vy=(uy≥2 bitDepth-1 )? (uy-2 bitDepth ):uy
[0164] Among them, vx is the horizontal component of the motion vector of the image block or the sub-block of the image block, vy is the vertical component of the motion vector of the image block or the sub-block of the image block, ux and uy are intermediate values; bitDepth represents the bit width.
[0165] For example, if the value of vx is -32769, the value obtained by the above formula is 32767. Because in computers, values are stored in binary complement form, the binary complement of -32769 is 1,0111,1111,1111,1111 (17 bits), and the computer handles overflow by discarding the high bits, so the value of vx is 0111,1111,1111,1111, which is 32767, which is consistent with the result obtained by the formula.
[0166] Method 2: Clipping the motion vector, as shown in the following formula:
[0167] vx=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vx)
[0168] vy=Clip3(-2 bitDepth-1 ,2 bitDepth-1 -1,vy)
[0169] Wherein vx is the horizontal component of the motion vector of the image block or a sub-block of the image block, and vy is the vertical component of the motion vector of the image block or a sub-block of the image block; wherein x, y and z correspond to three input values of the MV clamping process Clip3, respectively, and the definition of Clip3 is to clamp the value of z to the interval [x, y]:
[0170]
[0171] See also Figure 4 , Figure 4 FIG. 4 is a schematic diagram of the structure of a video decoding device 400 (eg, a video encoding device 400 or a video decoding device 400) provided in an embodiment of the present application. The video decoding device 400 is suitable for implementing the embodiments described herein. In one embodiment, the video decoding device 400 may be a video decoder (eg, Figure 1A decoder 30) or a video encoder (e.g. Figure 1A In another embodiment, the video decoding device 400 may be the above-mentioned Figure 1A Decoder 30 or Figure 1A One or more components in encoder 20.
[0172] The video decoding device 400 includes: an inlet port 410 and a receiving unit (Rx) 420 for receiving data, a processor, a logic unit or a central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an outlet port 450 for transmitting data, and a memory 460 for storing data. The video decoding device 400 may also include an optical-to-electrical conversion component and an electro-optical (EO) component coupled to the inlet port 410, the receiver unit 420, the transmitter unit 440 and the outlet port 450 for the outlet or inlet of an optical signal or an electrical signal.
[0173] The processor 430 is implemented by hardware and software. The processor 430 can be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. The processor 430 communicates with the inlet port 410, the receiver unit 420, the transmitter unit 440, the outlet port 450, and the memory 460. The processor 430 includes a decoding module 470 (e.g., an encoding module 470 or a decoding module 470). The encoding / decoding module 470 implements the embodiments disclosed herein to implement the chrominance block prediction method provided in the embodiments of the present application. For example, the encoding / decoding module 470 implements, processes, or provides various encoding operations. Therefore, the encoding / decoding module 470 provides substantial improvements to the functions of the video decoding device 400 and affects the conversion of the video decoding device 400 to different states. Alternatively, the encoding / decoding module 470 is implemented with instructions stored in the memory 460 and executed by the processor 430.
[0174] The memory 460 includes one or more disks, tape drives, and solid-state drives, and can be used as an overflow data storage device for storing programs when these programs are selectively executed, and for storing instructions and data read during program execution. The memory 460 can be volatile and / or non-volatile, and can be a read-only memory (ROM), a random access memory (RAM), a ternary content-addressable memory (TCAM), and / or a static random access memory (SRAM).
[0175] See also Figure 5 , Figure 5 According to an exemplary embodiment, it can be used as Figure 1A A simplified block diagram of an apparatus 500 for either or both of the source device 12 and the destination device 14 in FIG. The apparatus 500 can implement the technology of the embodiment of the present application. In other words, Figure 5A schematic block diagram of an implementation of an encoding device or decoding device (referred to as a decoding device 500) of an embodiment of the present application. Among them, the decoding device 500 may include a processor 510, a memory 530 and a bus system 550. Among them, the processor and the memory are connected via a bus system, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. The memory of the decoding device stores program code, and the processor can call the program code stored in the memory to execute various video encoding or decoding methods described in the embodiments of the present application. To avoid repetition, it is not described in detail here.
[0176] In the embodiment of the present application, the processor 510 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0177] The memory 530 may include a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may also be used as the memory 530. The memory 530 may include code and data 531 accessed by the processor 510 using the bus 550. The memory 530 may further include an operating system 533 and an application 535, which includes at least one program that allows the processor 510 to execute the video encoding or decoding method described in the embodiment of the present application (especially the optimization processing method for fusion motion vector difference technology described in the embodiment of the present application). For example, the application 535 may include applications 1 to N, which further include a video encoding or decoding application (referred to as a video decoding application) that executes the video encoding or decoding method described in the embodiment of the present application.
[0178] The bus system 550 may include, in addition to the data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus system 550 in the figure.
[0179] Optionally, the decoding device 500 may further include one or more output devices, such as a display 570. In one example, the display 570 may be a touch-sensitive display that combines a display with a touch-sensitive unit operable to sense touch input. The display 570 may be connected to the processor 510 via the bus 550.
[0180] The scheme of the embodiment of the present application is described in detail below:
[0181] In video coding technology, if the current image block uses a merge mode for inter-frame prediction, one of the following prediction modes will be used to obtain inter-frame prediction parameters: conventional merge mode, MMVD mode, SBMM, CIIP mode, TPM.
[0182] 1. Traditional fusion model
[0183] The merge mode is one of the technologies that can effectively improve the efficiency of inter-frame coding. For the merge mode, the encoder first constructs a candidate motion vector list through the motion information of the coded image blocks adjacent to the current image block in the spatial domain or temporal domain, and uses the candidate motion information with the lowest rate-distortion cost (RD Cost) in the candidate motion vector list as the motion vector predictor (MVP) of the current image block, and then passes the index value of the position of the optimal candidate motion information in the candidate motion vector list (referred to as merge index) to the decoder.
[0184] The positions of adjacent image blocks and their traversal order are predefined. RD Cost can be calculated by the following formula (1), where J represents RD Cost, SAD is the sum of absolute differences (SAD) between the predicted pixel value obtained after motion estimation using the candidate motion vector prediction value and the original pixel value, R represents the bit rate, and λ represents the Lagrange multiplier.
[0185] J=SAD+λR (1)
[0186] Furthermore, the encoder can perform motion search in a neighborhood centered on the MVP to obtain the actual motion vector of the current image block, and then transmit the difference (ie, residual) between the MVP and the actual motion vector to the decoder.
[0187] For example, Figure 6 This is a schematic diagram of the spatial domain and temporal domain of the current image block in the embodiment of the present application, see Figure 6As shown in the figure, the spatial candidate motion information comes from the five spatially adjacent blocks (A0, A1, B0, B1 and B2). If the adjacent image block is not available (i.e., the adjacent image block does not exist, the adjacent image block is not encoded, or the prediction mode adopted by the adjacent image block is not the inter-frame prediction mode), the motion information of the adjacent image block is not added to the candidate motion vector list of the current image block. The temporal candidate motion information of the current image block is obtained by scaling the motion vector (MV) of the image block at the corresponding position in the reference frame according to the picture order count (POC) of the reference frame and the current frame. First, it is determined whether the image block at position T in the reference frame is available. If not, the image block at position C in the reference frame is selected.
[0188] The positions of neighbor blocks in merge mode and their traversal order are also predefined, and the positions of neighbor blocks and their traversal order may be different in different merge modes.
[0189] (II) MMVD mode
[0190] The MMVD mode uses the merge candidate motion vector list, selects one or more candidate motion vectors from the merge candidate motion vector list, and then performs motion vector (MV) expansion expression based on the candidate motion vector. The MV expansion expression includes the MV starting point, motion step size and motion direction.
[0191] The existing merge candidate motion vector list is used, and the selected candidate motion vector is the default merge type (such as MRG_TYPE_DEFAULT_N). The selected candidate motion vector is the starting point of the MV. In other words, the selected candidate motion vector is used to determine the initial position of the MV.
[0192] As shown in Table 1, the base candidate index (base candidate IDX) indicates which candidate motion vector in the candidate motion vector list is selected as the optimal candidate motion vector.
[0193] Table 1
[0194] base candidate IDX 0 1 2 3 <![CDATA[N th MVP]]> <![CDATA[1 st MVP]]> <![CDATA[2 nd MVP]]> <![CDATA[3 rd MVP]]> <![CDATA[4 th MVP]]>
[0195] In some possible implementations, if the number of candidate motion vectors available for selection in the merge candidate motion vector list is 1, the base candidate IDX may not be determined.
[0196] The step length identifier (distance IDX) represents the offset distance information of the motion vector. The value of the step length identifier represents the distance of the offset initial position (eg, a preset distance). The definition of the preset distance is shown in Table 2.
[0197] Table 2
[0198] distance IDX 0 1 2 3 4 5 6 7 Pixel distance 1 / 4-pel 1 / 2-pel 1-pel 2-pel 4-pel 8-pel 16-pel 32-pel
[0199] The direction identifier (direction IDX) indicates the direction based on the initial position motion vector difference (MVD). The direction identifier may include four cases in total, and the specific definitions are shown in Table 3:
[0200] Table 3
[0201] direction IDX 00 01 10 11 x-axis + – N / A N / A y-axis N / A N / A + –
[0202] Among them, 00 represents the right side, 01 represents the left side, 10 represents the top, and 11 represents the bottom.
[0203] Fig. 7A is a schematic diagram of the MMVD search point in the embodiment of the present application, Figure 7B Schematic diagram of the MMVD search process in the embodiment of the present application. The process of determining the predicted pixel value of the current image block according to the MMVD method includes: firstly determining the MV starting point according to the basecandidate IDX, for example, Fig. 7A The hollow dots in the center of the L0 reference frame and the L1 reference frame, that is, Figure 7B The solid arrow in the figure points to the position on the L0 reference frame and the L1 reference frame. Then, based on the direction IDX, determine the direction to offset based on the starting point of the MV, and then based on the distance IDX, determine how many pixels to offset in the direction indicated by the direction IDX. For example, direction IDX = 00, distance IDX = 2, which means that the motion vector offset by one pixel in the positive x direction is used as the motion vector of the current image block to predict or obtain the predicted pixel value of the current image block.
[0204] (III) SBMM
[0205] In the inter-frame prediction of HEVC, motion compensation is performed based on the assumption that the motion information of all pixels in the current image block is the same to obtain the predicted value of the pixels in the current image block. However, not all pixels in the current image block necessarily have the same motion characteristics. Therefore, using the same motion information to predict all pixels in the current image block may reduce the accuracy of motion compensation, thereby increasing the residual information.
[0206] In order to further improve the coding efficiency, in some possible implementations, the current image block is divided into at least two sub-blocks, and then the motion information of each sub-block is derived, and motion compensation is performed based on the motion information of the sub-block, thereby improving the prediction accuracy, for example, sub-CU based motion vector prediction (SMVP) technology. SMVP divides the current image block into sub-blocks of size m×n, and derives the motion information of each sub-block, and then uses the motion information of each block to perform motion compensation to obtain the predicted value of the current image block.
[0207] In SBMM, based on SMVP technology, corresponding sub-block fusion modes can be used to construct a sub-block based merging candidate list. Accordingly, SBMM may include: advanced temporal motion vector prediction (ATMVP), spatial-temporal motion vector prediction (STMVP), prediction mode based on affine model (including using inherited control point motion vector prediction method and / or using constructed control point motion vector prediction method), and one or more of the following prediction modes (PLANAR). Among them, ATMVP is also called sub-block-based temporal motion vector prediction (SbTMVP).
[0208] (IV) CIIP Model
[0209] In the current image block encoded using the merge mode, a flag (e.g., ciip_flag) is transmitted to indicate whether the current block uses the CIIP mode. When the CIIP mode is used, the intra prediction block is generated by the intra prediction mode selected from the intra candidate list according to the relevant syntax elements, the inter prediction block is generated using the traditional inter prediction method, and finally the final prediction block is generated by combining the intra prediction coding and inter prediction coding prediction blocks using an adaptive weighting method.
[0210] For luma blocks, the intra candidate mode list is selected from four modes: DC, PLANAR, horizontal, and vertical. The size of the intra candidate mode list is selected according to the shape of the current coding block, which may be 3 or 4. When the width of the current image block is greater than twice the height, the intra candidate mode list does not contain horizontal modes. When the height of the current image block is greater than twice the width, the intra candidate mode list does not contain vertical modes.
[0211] In the weighted method of combining intra-frame prediction coding and inter-frame prediction coding, different weighting coefficients are used for different intra-frame prediction modes. Specifically, when the intra-frame prediction coding uses the DC or PLANAR mode, or when the length or width of the current image block is less than or equal to 4, the prediction values obtained by the intra-frame prediction and the inter-frame prediction use the same weight value / weighting coefficient. Otherwise, the weight value / weighting coefficient can be determined according to the intra-frame prediction mode used by the current image block and / or the position of the prediction sample in the current image block, for example, a variable weighting coefficient is adopted when the intra-frame prediction coding adopts the horizontal and vertical modes.
[0212] (V) TPM
[0213] The triangle prediction unit mode (abbreviated as triangle PU) may also be called triangle partition mode (triangle partition mode, TPM) or fused triangle mode. For the convenience of description, the triangle prediction unit mode or triangle partition mode is referred to as TPM, which is also applicable in the following description.
[0214] Figure 8 This is a schematic diagram of the division of the current image block in the embodiment of the present application, see Figure 8 As shown, the current block is divided into two triangular prediction units, and each triangular prediction unit selects a motion vector and a reference frame index from the unidirectional prediction candidate list. Then a prediction value is obtained for each of the two triangular prediction units. Then the pixels included in the hypotenuse area are adaptively weighted to obtain a prediction value. Then the entire current block is transformed and quantized. In addition, it should be noted that the triangular prediction unit method is generally only applied to skip mode or merge mode. Figure 8 (1) is the division method of upper left and lower right (i.e., division from upper left to lower right). Figure 8 (2) is the division method of upper right and lower left (i.e., division from upper right to lower left).
[0215] In practical applications, when the current image block uses the merge mode for inter-frame prediction, in addition to the above-mentioned fusion modes to obtain inter-frame prediction parameters, other fusion modes can also be used, which are not specifically limited in the embodiments of the present application.
[0216] An embodiment of the present application provides an inter-frame prediction method, which can be executed by the video decoder in the above embodiment.
[0217] Fig. 9 FIG. 1 is a flow chart of the inter-frame prediction method in the embodiment of the present application, see Fig. 9 As shown, the method may include:
[0218] S901: Determine to use a fusion mode to perform inter-frame prediction on the current image block;
[0219] Here, the decoder can parse and obtain syntax elements from the bitstream, and the syntax elements can be used to indicate whether the inter-frame prediction parameters of the current image block are obtained from the adjacent inter-frame prediction blocks, that is, to indicate whether the prediction parameters of the inter-frame prediction using the fusion mode are used for the current image block. Specifically, the syntax elements can be general_merge_flag, merge_flag, etc.; then, when general_merge_flag is the first value (such as general_merge_flag is 1), it indicates that the decoder uses the fusion mode for inter-frame prediction of the current image block; when general_merge_flag is the second value (such as general_merge_flag is 0), it indicates that the decoder does not use the fusion mode for inter-frame prediction of the current image block.
[0220] If the value of the syntax element general_merge_flag does not exist or does not appear in the bitstream, the decoder can also use the following method to derive: if cu_skip_flag (used to indicate whether the current image block has a residual, that is, whether the current image block uses the skip mode) is a first value (such as cu_skip_flag is 1), then general_merge_flag is a first value, otherwise, cu_skip_flag is a second value (such as cu_skip_flag is 0), and general_merge_flag is a second value. Among them, cu_skip_flag is the first value, indicating that the current image block uses the skip mode, otherwise, cu_skip_flag is the second value, indicating that the current image block does not use the skip mode.
[0221] Then, the decoder can determine whether to use the fusion mode for inter-frame prediction for the current image block according to the value of the syntax element (such as general_merge_flag) parsed from the bitstream, or according to the value of the syntax element (such as general_merge_flag) derived. After determining to use the fusion mode for inter-frame prediction for the current image block, the decoder performs S902.
[0222] In the embodiment of the present application, the current image block is a CU-level image block, that is, one image block is one CU.
[0223] S902: Determine whether the current image block is allowed to use each fusion mode among K candidate fusion modes;
[0224] The decoding end and the encoding end may pre-negotiate or stipulate by agreement a fusion mode set (or fusion mode list), and the fusion mode set may include multiple candidate fusion modes. The K candidate fusion modes may be all fusion modes in the fusion mode set, or may be fusion modes in the fusion mode set for which it is not determined whether the current image block is allowed to use.
[0225] Regardless of whether the K fusion modes are part or all of the fusion mode set, the K candidate fusion modes may include one or more of the above fusion modes. For example, the K candidate fusion modes may include: traditional fusion mode, MMVD mode, SBMM, CIIP mode, TPM; or, the K candidate fusion modes may also include: MMVD mode, SBMM, CIIP mode, TPM. Of course, the K candidate fusion modes may also include other fusion modes, which are not specifically limited in the embodiments of the present application.
[0226] Here, after the decoder determines to use the fusion mode for inter-frame prediction for the current image block through S901, it can determine whether the current image block is allowed to use each fusion mode among the K candidate fusion modes. In practical applications, the decoder can judge each fusion mode in sequence according to the arrangement order of each fusion mode, or can judge each fusion mode in parallel, thereby determining the fusion mode allowed to be used by the current image block.
[0227] In a specific implementation process, S902 may include: obtaining prediction parameters corresponding to the current image block; determining whether the current image block is allowed to use various fusion modes according to the prediction parameters;
[0228] First, the decoder can obtain the prediction parameters corresponding to the current image block by parsing from the bitstream or from the syntax elements (i.e., merge data syntax). In the embodiment of the present application, the above prediction parameters may include but are not limited to one or more of the following: an indication of the syntax elements of the upper-level video processing unit, the size of the current image block (i.e., cbWidth, cbHeight), an indication information for indicating whether the current image block has a residual (i.e., cu_skip_flag), and the type of the upper-level video processing unit.
[0229] In the high-level syntax of the existing VVC draft, in addition to the CU level, it mainly includes the syntax structures of the sequence level, image level, tile group level and / or slice level. The sizes of the video processing units corresponding to each level are different. For example, the video processing unit at the sequence level includes multiple frames of images, the video processing unit at the image level can be divided into multiple tile groups or slices, and the video processing unit at the tile group level or slice level can be divided into multiple CTUs. In an embodiment of the present application, the upper-level video processing unit may include a slice, a tile group, a frame of image, or a video sequence. Then, the type of the upper-level video processing unit can be the image type, slice type (slice_type) or tile group type (tile group type) of the image where the current image block is located.
[0230] In practical applications, the above prediction parameters may include but are not limited to: sps_mmvd_enabled_flag, sps_ciip_enabled_flag, sps_triangle_enabled_flag, MaxNumSubblockMergeCand, MaxNumTriangleMergeCand, cbWidth, cbHeight, cu_skip_flag, slice_type, etc.
[0231] Wherein, sps_mmvd_enabled_flag is used to indicate whether the current sequence allows the use of the MMVD mode. Here, it can be understood that sps_mmvd_enabled_flag is used to indicate whether the current image block allows the use of the MMVD mode. When sps_mmvd_enabled_flag is a first value (such as sps_mmvd_enabled_flag is 1), it can be determined that the current image block allows the use of the MMVD mode. Conversely, when sps_mmvd_enabled_flag is a second value (such as sps_mmvd_enabled_flag is 0), it can be determined that the current image block does not allow the use of the MMVD mode.
[0232] Similarly, sps_ciip_enabled_flag is used to indicate whether the current sequence allows the use of the CIIP mode. Here, it can be understood that sps_ciip_enabled_flag is used to indicate whether the current image block allows the use of the CIIP mode. When sps_ciip_enabled_flag is a first value (such as sps_ciip_enabled_flag is 1), it can be determined that the current image block allows the use of the CIIP mode. Conversely, when sps_ciip_enabled_flag is a second value (such as sps_ciip_enabled_flag is 0), it can be determined that the current image block does not allow the use of the CIIP mode.
[0233] sps_triangle_enabled_flag is used to indicate whether the current sequence allows the use of the TPM mode. Here, it can be understood that sps_triangle_enabled_flag is used to indicate whether the current image block allows the use of the TPM mode. When sps_triangle_enabled_flag is a first value (such as sps_triangle_enabled_flag is 1), it can be determined that the current image block allows the use of the TPM mode. Conversely, when sps_triangle_enabled_flag is a second value (such as sps_triangle_enabled_flag is 0), it can be determined that the current image block does not allow the use of the TPM mode.
[0234] MaxNumSubblockMergeCand is used to indicate the maximum length of the sub-block fusion candidate list, MaxNumMergeCand indicates the maximum length of the fusion candidate motion vector list, cbWidth is the width of the current image block, cbHeight is the height of the current image block, and slice_type is used to indicate the image type or slice type of the current image block.
[0235] Then, after obtaining the prediction parameters, the decoder can determine whether the current image block uses each fusion mode according to the prediction parameters.
[0236] Specifically, the decoder can obtain the value of the second identifier corresponding to each fusion mode according to the prediction parameter, and use the second identifier to indicate whether the current image block uses the corresponding fusion mode. In an embodiment of the present application, the second identifier may include but is not limited to: one or more of allowMMVD, allowSBMM, allowCIIP, and allowTPM. allowMMVD is the second identifier of the MMVD mode, allowSBMM is the second identifier of the SBMM, allowCIIP is the second identifier of the CIIP mode, and allowTPM is the second identifier of the TPM. When the second identifier is the first value (such as the first identifier is 1), the decoder determines that the current image block allows the use of the fusion mode corresponding to the second identifier; conversely, when the second identifier is the second value (such as the first identifier is 0), the decoder determines that the current image block allows the use of the fusion mode corresponding to the second identifier. For example, when allowMMVD is 1, the decoder determines that the current image block allows the use of the MMVD mode, and when allowMMVD is 0, the decoder determines that the current image block does not allow the use of the MMVD mode. The above-mentioned other fusion modes can be deduced by analogy, and will not be repeated here.
[0237] In some possible implementations, the decoder may obtain the value of the second identifier of each fusion mode through the following formulas (1) to (4).
[0238] allowMMVD = sps_mmvd_enabled_flag (1)
[0239] allowSBMM=MaxNumSubblockMergeCand>0&&cbWidth>=8
[0240] && cbHeight >= 8 (2)
[0241] allowCIIP=sps_ciip_enabled_flag&&! cu_skip_flag&&(cbWidth*cbHeight)>=64
[0242] && cbWidth < 128 && cbHeight < 128 (3)
[0243] allowTPM=sps_triangle_enabled_flag&&slice_type==B
[0244] && MaxNumTriangleMergeCand >= 2 && (cbWidth*cbHeight) >= 64 (4)
[0245] Of course, in some possible implementations, the decoder may also use other methods to obtain the value of the second identifier of each fusion mode according to the prediction parameters, which is not specifically limited in the embodiments of the present application.
[0246] S903: When the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among the K candidate fusion modes, parse the bitstream to obtain a value of a first identifier of the current fusion mode;
[0247] The first flag is used to indicate whether the current image block uses the corresponding fusion mode. The first flag may include but is not limited to: one or more of regular_merge_flag, mmvd_merge_flag, merge_subblock_flag, ciip_flag, merge_triangle_flag, etc. Among them, regular_merge_flag is the first flag of the traditional fusion mode, mmvd_merge_flag is the first flag of the MMVD mode, merge_subblock_flag is the first flag of SBMM, ciip_flag is the first flag of CIIP, and merge_triangle_flag is the first flag of TPM. Assume that, when regular_merge_flag is 1, the decoder can determine to use the traditional fusion mode for inter-frame prediction for the current image block, and when regular_merge_flag is 0, the decoder can determine not to use the traditional fusion mode for inter-frame prediction for the current image block; when mmvd_merge_flag is 1, the decoder can determine to use the MMVD mode for inter-frame prediction for the current image block, and when mmvd_merge_flag is 0, the decoder can determine not to use the MMVD mode for inter-frame prediction for the current image block; when merge_subblock_flag is 1, the decoder can determine to use SBMM for inter-frame prediction for the current image block, and when merge_subblock_flag is 0, the decoder can determine not to use SBMM for inter-frame prediction for the current image block; when ciip_flag is 1, the decoder can determine to use the CIIP mode for inter-frame prediction for the current image block, and when ciip_flag is 0, the decoder can determine not to use the CIIP mode for inter-frame prediction for the current image block. Among them, merge_triangle_flag can also be MergeTriangleFlag.
[0248] Here, after determining the fusion mode allowed for the current image block, the decoder parses the value of the first identifier of the current fusion mode from the bitstream if the current image block allows the current fusion mode and the current image block allows a fusion mode other than the current fusion mode among K alternative fusion modes.
[0249] Specifically, S903 may include:
[0250] In the first case, when the current image block allows the use of at least one of the MMVD mode, SBMM, CIIP mode, and TPM, the value of regular_merge_flag of the traditional fusion mode is obtained by parsing the bitstream. At this time, general_merge_flag defaults to the first value, such as general_merge_flag defaults to 1; or,
[0251] In the second case, when the current image block allows the use of the MMVD mode and the current image block allows the use of at least one of the SBMM mode, the CIIP mode, and the TPM mode, the value of the mmvd_merge_flag of the MMVD mode is obtained by parsing the bitstream; or,
[0252] In the third case, when the current image block allows the use of the SBMM mode, and the current image block allows the use of the CIIP mode and / or TPM, the value of merge_subblock_flag of the SBMM is obtained by parsing from the bitstream; or,
[0253] In the fourth case, when the current image block allows the use of the CIIP mode and TPM, the value of the ciip_flag of the CIIP mode is obtained by parsing the code stream.
[0254] It should be noted that the decoding module can determine whether to parse the value of the first identifier of the current fusion mode from the bitstream in the order of the K candidate fusion modes. When the value of the first identifier of the previous fusion mode is the second value, that is, when the current image block does not use the previous fusion mode, the decoder further determines whether to parse the value of the first identifier of the current fusion mode from the bitstream.
[0255] Then, the above S903 may also include:
[0256] Corresponding to the first case, when general_merge_flag is the first value and the current image block allows the use of at least one of the MMVD mode, SBMM, CIIP mode, and TPM, the value of regular_merge_flag of the traditional fusion mode is obtained by parsing the bitstream; or,
[0257] Corresponding to the second case, when regular_merge_flag is the second value, the current image block allows the use of the MMVD mode, and the current image block allows the use of at least one of the SBMM, CIIP mode, and TPM, the value of mmvd_merge_flag in the MMVD mode is obtained by parsing the bitstream; or,
[0258] Corresponding to the third case, when regular_merge_flag is the second value, mmvd_merge_flag is the second value, the current image block allows the use of the SBMM mode, and the current image block allows the use of the CIIP mode and / or TPM, the value of merge_subblock_flag of SBMM is obtained by parsing from the bitstream; or,
[0259] Corresponding to the fourth case, when regular_merge_flag is the second value, mmvd_merge_flag is the second value, merge_subblock_flag is the second value, and the current image block allows the use of CIIP mode and TPM, the value of ciip_flag in CIIP mode is parsed from the code stream.
[0260] In some possible implementations, when the decoder indicates whether the current image block uses the corresponding fusion mode with the second identifier, before the above S903, the method may further include: the decoder determines whether the value of the second identifier of the current fusion mode meets the preset parsing condition. Then, when the value of the second identifier meets the preset parsing condition, the value of the first identifier of the current fusion mode is parsed from the bitstream; otherwise, when the value of the second identifier of the current fusion mode does not meet the preset parsing condition, the decoder determines the value of the first identifier of the current fusion mode according to the preset derivation condition.
[0261] For example, assuming that the order of the fusion modes in the fusion mode set can be: traditional fusion mode, MMVD mode, SBMM, CIIP mode, TPM; then,
[0262] The current fusion mode is a traditional fusion mode. The preset parsing conditions corresponding to the first case above may include but are not limited to:
[0263] 1) At least one of allowMMVD, allowSBMM, allowCIIP, and allowTPM is greater than 0;
[0264] In some possible implementations, the preset parsing condition 1) may also be described as: allowMMVD+allowSBMM+allowCIIP+allowTPM>0; or, allowMMVD||allowSBMM||allowCIIP||allowTPM.
[0265] The current fusion mode is the MMVD mode, and the preset parsing conditions corresponding to the second case may include but are not limited to:
[0266] 2) regular_merge_flag is 0, allowMMVD is greater than 0, and at least one of allowSBMM, allowCIIP, and allowTPM is greater than 0;
[0267] In some possible implementations, the preset parsing condition 2) can also be described as: allowMMVD&&
[0268] allowSBMM+allowCIIP+allowTPM>0; or, allowMMVD&&(allowSBMM+allowCIIP+allowTPM); or, allowMMVD&&(allowSBMM||allowCIIP||allowTPM).
[0269] It should be noted that, when the current fusion mode is the MMVD mode, the traditional fusion mode has been confirmed not to be used, that is, regular_merge_flag is 0. In this case, there is no need to repeatedly determine the value of regular_merge_flag.
[0270] The current fusion mode is SBMM, and the preset parsing conditions corresponding to the third case may include but are not limited to:
[0271] 3) regular_merge_flag is 0, mmvd_merge_flag is 0, allowSBMM is greater than 0, allowCIIP and / or allowTPM is greater than 0;
[0272] In some possible implementations, the preset parsing condition 3) may also be described as: allowSBMM&&allowCIIP+allowTPM>0; or, allowSBMM&&(allowCIIP+allowTPM)>0; or, allowSBMM&&(allowCIIP||allowTPM).
[0273] It should be noted that when the current fusion mode is the SBMM mode, the traditional fusion mode and the MMVD mode have been confirmed not to be used, that is, regular_merge_flag is 0 and mmvd_merge_flag is 0. At this time, there is no need to repeatedly determine the values of regular_merge_flag and mmvd_merge_flag.
[0274] The current fusion mode is the CIIP mode, and the preset parsing conditions corresponding to the fourth case may include but are not limited to:
[0275] 4) regular_merge_flag is 0, regular_merge_flag is 0, merge_subblock_flag is 0, allowCIIP is greater than 0, allowTPM is greater than 0;
[0276] In some possible implementations, the preset parsing condition 4) may also be described as: allowCIIP&&allowTPM.
[0277] It should be noted that when the current fusion mode is CIIP mode, the traditional fusion mode, MMVD mode and SBMM have been confirmed not to be used, that is, regular_merge_flag is 0, mmvd_merge_flag is 0, and merge_subblock_flag is 0. At this time, there is no need to repeatedly judge the values of regular_merge_flag, mmvd_merge_flag and merge_subblock_flag.
[0278] The above judgment process can be specifically referred to the syntax table described in Table 4 below. That is, when general_merge_flag is the first value, the code stream can be parsed according to the syntax structure of merge_data() to obtain the values of the syntax elements in Table 4. Wherein (x0, y0) represents the coordinate position of the brightness pixel value of the upper left vertex of the current image block relative to the brightness pixel of the upper left vertex of the current image block. The meanings of (x0, y0) in the following syntax table are the same and will not be repeated.
[0279] Table 4
[0280]
[0281]
[0282] It should be noted that the above-mentioned preset analysis conditions 1), 2), 3) and 4) may also be described in other ways, and the embodiments of the present application do not make specific limitations.
[0283] If the decoder determines through the above process that the value of the second identifier satisfies the preset parsing condition, the decoder can parse the value of the first identifier of the corresponding fusion mode from the bitstream. For example, if the values of allowMMVD, allowSBMM, allowCIIP and allowTPM meet the preset parsing condition 1), the decoder can parse the value of the first identifier of the traditional fusion mode from the bitstream, that is, the value of regular_merge_flag; for another example, if the values of allowMMVD, allowSBMM, allowCIIP and allowTPM meet the preset parsing condition 2), the decoder can parse the value of the first identifier of the MMVD mode from the bitstream, that is, the value of mmvd_merge_flag; it can also be: if the values of allowSBMM, allowCIIP and allowTPM meet the preset parsing condition 3), the decoder can parse the value of the first identifier of SBMM from the bitstream, that is, the value of merge_subblock_flag; or if the values of allowCIIP and allowTPM meet the preset parsing condition 4), the decoder can parse the value of the first identifier of the CIIP mode from the bitstream, that is, the value of ciip_flag.
[0284] If the decoder determines through the above process that the value of the second identifier does not satisfy the preset parsing condition, the decoder can determine the value of the first identifier of each fusion mode according to the preset derivation condition.
[0285] Here, the preset derivation conditions are explained below.
[0286] In some possible implementations, when the value of the second identifier of each fusion mode meets the above-mentioned preset parsing condition, the value of the first identifier of each fusion mode may not exist or appear in the bitstream, so the decoder cannot parse the bitstream to obtain the value of the first identifier of each fusion mode. In this case, the decoder can also derive according to the preset derivation condition to obtain the value of the first identifier of each fusion mode. For example, if the preset derivation condition is met, the value of the first identifier of the fusion mode is set to the first value, otherwise, the value of the first identifier of the fusion mode is set to the second value.
[0287] For example, if allowMMVD, allowSBMM, allowCIIP and allowTPM do not satisfy the above-mentioned preset parsing condition 1) or the value of regular_merge_flag does not exist in the bitstream, then the value of general_merge_flag of the decoder is set to the value of regular_merge_flag. Since general_merge_flag is the first value at this time (such as general_merge_flag is 1), the value of regular_merge_flag is also the first value; or, the decoder sets the value of regular_merge_flag to the first value, that is, sets regular_merge_flag to 1. At this time, it indicates that the current image block uses the traditional fusion mode for inter-frame prediction.
[0288] Alternatively, if allowMMVD, allowSBMM, allowCIIP, and allowTPM do not satisfy the above-mentioned preset parsing condition 1) or the value of regular_merge_flag does not exist in the bitstream, and when CuPredMode is MODE_INTER (the current image block uses inter-frame prediction), the value of regular_merge_flag is set to the value of general_merge_flag. That is, when CuPredMode is MODE_INTER and the value of general_merge_flag is 1, the value of regular_merge_flag is set to 1, otherwise the value of regular_merge_flag is set to 0.
[0289] Among them, CuPredMode is the prediction mode identifier of the current image block, which can also be expressed as CuPredMode[x0][y0] in some embodiments. CuPredMode[x0][y0] is MODE_INTER, indicating that the current image block uses inter-frame prediction. The coordinate (x0, y0) represents the position of the brightness pixel of the upper left vertex of the current image block relative to the brightness pixel of the upper left vertex of the image where the current image block is located. The following CuPredMode[x0][y0] identifier has the same meaning as described here and will not be repeated.
[0290] If allowMMVD, allowSBMM, allowCIIP and allowTPM do not satisfy the above-mentioned preset parsing condition 2) or the value of mmvd_merge_flag does not exist in the code stream, then, when the first derivation condition is met, the decoder sets the value of mmvd_merge_flag to the first value; here, the first derivation condition may be that the current image block allows the use of the MMVD mode (that is, the allowMMVD value is the first value), the general_merge_flag value is the first value, and the regular_merge_flag value is the second value; for example, if the allowMMVD value is 1, the general_merge_flag value is 1, and the regular_merge_flag is 0, then the mmvd_merge_flag is set to 1, which indicates that the current image block uses the MMVD mode for inter-frame prediction. Alternatively, the first inference condition may also be that the current image block allows the use of the MMVD mode (i.e., the allowMMVD value is the first value), the general_merge_flag value is the first value, the regular_merge_flag value is the second value, and the current image block uses inter-frame prediction; for example, the allowMMVD value is 1, the general_merge_flag value is 1, the regular_merge_flag is 0, and CuPredMode is MODE_INTER, then mmvd_merge_flag is set to 1.
[0291] If allowSBMM, allowCIIP and allowTPM do not satisfy the above-mentioned preset parsing condition 3) or the value of merge_subblock_flag does not exist in the code stream, then, when the second derivation condition is met, the decoder sets the value of merge_subblock_flag to the first value; here, the second derivation condition may be that the current image block allows the use of SBMM (that is, the value of allowSBMM is the first value), the value of general_merge_flag is the first value, the value of regular_merge_flag is the second value, and the value of merge_mmvd_flag is the second value; for example, if the value of allowSBMM is 1, the value of general_merge_flag is 1, the value of regular_merge_flag is 1, and merge_mmvd_flag is 0, then merge_subblock_flag is set to 1, which indicates that the current image block uses SBMM for inter-frame prediction.
[0292] Alternatively, the second derivation condition may be that the current image block allows the use of SBMM (i.e., the value of allowSBMM is the first value), the value of general_merge_flag is the first value, the value of regular_merge_flag is the second value, the value of merge_mmvd_flag is the second value, and the current image block uses inter-frame prediction; for example, if the value of allowSBMM is 1, the value of general_merge_flag is 1, the value of regular_merge_flag is 1, the value of merge_mmvd_flag is 0, and CuPredMode is MODE_INTER, then merge_subblock_flag is set to 1.
[0293] If allowCIIP and allowTPM do not satisfy the above-mentioned preset parsing condition 4) or the value of ciip_flag does not exist in the code stream, then, when the third derivation condition is met, the decoder sets the value of ciip_flag to the first value; here, the third derivation condition may be that the current image block allows the use of CIIP mode (that is, allowCIIP is the first value), general_merge_flag is the first value, regular_merge_flag is the second value, mmvd_merge_flag is the second value, and merge_subblock_flag is the second value; for example, if the allowCIIP value is 1, the general_merge_flag value is 1, the regular_merge_flag is 0, the merge_mmvd_flag is 0, and the merge_subblock_flag is 0, then ciip_flag is set to 1, which indicates that the current image block uses the CIIP mode for inter-frame prediction.
[0294] Alternatively, the third derivation condition may also be that the current image block allows the use of CIIP mode (i.e., allowCIIP is the first value), general_merge_flag is the first value, regular_merge_flag is the second value, mmvd_merge_flag is the second value, merge_subblock_flag is the second value, and the current image block uses inter-frame prediction; for example, if the allowCIIP value is 1, the general_merge_flag value is 1, the regular_merge_flag is 0, the merge_mmvd_flag is 0, the merge_subblock_flag is 0, and CuPredMode is MODE_INTER, then ciip_flag is set to 1.
[0295] The value of merge_triangle_flag can be derived. For example, when the fourth derivation condition is met, the decoder sets the value of merge_triangle_flag to the first value; here, the fourth derivation condition may be that the current image block allows the use of TPM mode (that is, allowTPM is the first value), general_merge_flag is the first value, regular_merge_flag is the second value, mmvd_merge_flag is the second value, merge_subblock_flag is the second value, and ciip_flag is the second value; for example, if the allowTPM value is 1, the general_merge_flag value is 1, the regular_merge_flag is 0, the merge_mmvd_flag is 0, the merge_subblock_flag is 0, and the ciip_flag is 0, then merge_triangle_flag is set to 1. At this time, it means that when the image type or slice type of the current image block is B, the current image block uses the TPM mode for inter-frame prediction.
[0296] Alternatively, the fourth derivation condition may also be that the current image block allows the use of TPM mode (that is, allowTPM is the first value), general_merge_flag is the first value, regular_merge_flag is the second value, mmvd_merge_flag is the second value, merge_subblock_flag is the second value, ciip_flag is the second value, and the current image block uses inter-frame prediction; for example, if the allowTPM value is 1, the general_merge_flag value is 1, the regular_merge_flag is 0, the merge_mmvd_flag is 0, the merge_subblock_flag is 0, the ciip_flag is 0, and CuPredMode is MODE_INTER, then MergeTriangleFlag is set to 1.
[0297] In practical applications, the decoder may also determine the value of the first identifier of each fusion mode through other preset derivation conditions, which is not specifically limited in the embodiments of the present application.
[0298] In summary, the decoder can, but is not limited to, obtain the second identifier, the first identifier, the corresponding preset parsing condition and the preset derivation condition of the first fusion mode respectively by referring to Table 5. Table 5 is specifically as follows:
[0299] Table 5
[0300]
[0301]
[0302] In summary, the decoder may also, but is not limited to, obtain the second identifier, the first identifier, and the corresponding preset parsing condition or preset derivation condition of the first fusion mode respectively by referring to Table 6. Table 6 is specifically as follows:
[0303] Table 6
[0304]
[0305]
[0306] In an embodiment of the present application, after S902, the decoder determines whether the current image block is allowed to use various fusion modes. Then, if the current image block is not allowed to use K alternative fusion modes except the current fusion mode, the current fusion mode is used to perform inter-frame prediction on the current image block to obtain a prediction block of the current image block.
[0307] Here, after the decoder determines that the current image block is not allowed to use K alternative fusion modes except the current fusion mode, the decoder does not need to further parse the value of the first identifier of the current image block, but uses the current fusion mode to perform inter-frame prediction on the current image block to obtain the prediction block of the current image block, thereby removing the parsing redundancy of the fusion syntax elements, reducing the decoding complexity to a certain extent, and improving the decoding efficiency.
[0308] S904: When the value of the first identifier indicates that the fusion mode for performing inter-frame prediction on the current image block is the current fusion mode, perform inter-frame prediction on the current image block using the current fusion mode to obtain a prediction block of the current image block.
[0309] Here, after the decoder obtains the value of the first identifier of the current fusion mode by parsing or deriving from the bitstream through S903, it can determine whether the current image block uses the current fusion mode according to the value of the first identifier. In the case where the value of the first identifier indicates that the fusion mode for inter-frame prediction of the current image block is the current fusion mode, the decoder does not need to parse the values of the first identifiers of other fusion modes in the K candidate fusion modes from the bitstream, and uses the current fusion mode to perform inter-frame prediction on the current image block to obtain a prediction block of the current image block, thereby removing the parsing redundancy of the fusion syntax elements, reducing the complexity of decoding to a certain extent, and improving decoding efficiency.
[0310] At this point, the decoder has completed the inter-frame prediction process for the current image block.
[0311] The above method is described below with reference to a specific example.
[0312] Assume that the order of the fusion modes in the fusion mode set may be: traditional fusion mode→MMVD mode→SBMM→CIIP mode→TPM.
[0313] Step 1: The decoder determines whether to use the fusion mode for the current image block.
[0314] Specifically, whether the current image block uses the fusion mode can be determined according to the CU-level syntax element general_merge_flag, that is, if the value of general_merge_flag is 1, the current image block uses the fusion mode for inter-frame prediction, and then, step 2 is executed;
[0315] Step 2: The decoder determines whether the current image block uses the traditional fusion mode;
[0316] Specifically, whether the current image block uses the traditional fusion mode can be determined according to the value of the syntax element regular_merge_flag. If the value of regular_merge_flag is 1, it means that the current image block uses the traditional fusion mode for inter-frame prediction, and if the value of regular_merge_flag is 0, it means that the current image block does not use the traditional fusion mode for inter-frame prediction.
[0317] Further, the value of regular_merge_flag can be determined by parsing the syntax element as described in the above embodiment, or can be obtained by deduction. If the above preset parsing condition 1) is met, the decoder parses the value of the syntax element regular_merge_flag from the bitstream, otherwise, when the value of the syntax element does not exist in the bitstream, the value of regular_merge_flag defaults to the same as the value of general_merge_flag, and when the value of general_merge_flag is 1, the value of regular_merge_flag is set to 1.
[0318] If the value of regular_merge_flag is 1, the current image block uses the traditional fusion mode for inter-frame prediction, otherwise, execute step 3.
[0319] Step 3: The decoder determines whether the current image block uses the MMVD mode;
[0320] Specifically, whether the current image block uses MMVD can be determined according to the value of the syntax element mmvd_merge_flag. The value of mmvd_merge_flag is 1, indicating that the current image block uses the MMVD mode for inter-frame prediction, otherwise, when the value of mmvd_merge_flag is 0, it indicates that the current image block does not use the MMVD mode for inter-frame prediction.
[0321] Similarly, the value of mmvd_merge_flag can be determined by parsing the syntax element as described in the above embodiment, or can be obtained by derivation. If the above preset parsing condition 2) is met, the decoder can parse the value of mmvd_merge_flag from the bitstream, otherwise, when the value of the syntax element does not exist in the bitstream, it can be derived using the following preset derivation conditions:
[0322] If the following preset derivation conditions a) to c) are all met, the value of mmvd_merge_flag is set to 1, otherwise, it is set to 0.
[0323] a)allowMMVD value is 1;
[0324] b) general_merge_flag value is 1;
[0325] c)regular_merge_flag value is 0.
[0326] Alternatively, when the value of the syntax element does not exist in the bitstream or the above preset parsing condition 2) is not satisfied, the following preset derivation conditions may be used for derivation:
[0327] If the following preset derivation conditions a) to c) and c2) are all met, the value of mmvd_merge_flag is set to 1, otherwise, it is set to 0.
[0328] a)allowMMVD value is 1;
[0329] b) general_merge_flag value is 1;
[0330] c) regular_merge_flag value is 0;
[0331] c2)CuPredMode[x0][y0] is MODE_INTER.
[0332] Wherein, CuPredMode[x0][y0] is the prediction mode identifier of the current image block. CuPredMode[x0][y0] is MODE_INTER, which means that the current image block uses inter-frame prediction. The coordinate (x0, y0) represents the position of the brightness pixel of the upper left vertex of the current image block relative to the brightness pixel of the upper left vertex of the image where the current image block is located.
[0333] CuPredMode[x0][y0] is MODE_INTRA, which means that the current image block uses intra prediction. CuPredMode[x0][y0] is MODE_IBC, which means that the current image block uses IBC mode (intra block copy).
[0334] If the value of mmvd_merge_flag is 1, the current image block uses the MMVD mode for inter-frame prediction, otherwise, execute step 4.
[0335] Step 4: The decoder determines whether the current image block uses SBMM;
[0336] Specifically, whether the current image block uses SBMM can be determined according to the value of the syntax element merge_subblock_flag. The value of merge_subblock_flag is 1, indicating that the current image block uses SBMM for inter-frame prediction, otherwise, the value of merge_subblock_flag is 0, indicating that the current image block does not use SBMM for inter-frame prediction.
[0337] Similarly, the value of merge_subblock_flag can be determined by parsing the syntax element as described in the above embodiment, or can be obtained by derivation. If the above preset parsing condition 3) is met, the decoder parses the value of merge_subblock_flag from the bitstream, otherwise, when the value of the syntax element does not exist in the bitstream, it can be derived using the following preset derivation conditions:
[0338] If the following preset derivation conditions d) to g) are all met, the value of merge_subblock_flag is set to 1, otherwise, it is set to 0.
[0339] d) allowSBMM value is 1
[0340] e) general_merge_flag value is 1
[0341] f) regular_merge_flag value is 0
[0342] g)merge_mmvd_flag value is 0.
[0343] Alternatively, when the value of the syntax element does not exist in the bitstream or the above preset parsing condition 3) is not satisfied, the following preset derivation conditions may be used for derivation:
[0344] If the following preset derivation conditions d) to g) and g2) are all met, the value of merge_subblock_flag is set to 1, otherwise, it is set to 0.
[0345] d) allowSBMM value is 1
[0346] e) general_merge_flag value is 1
[0347] f) regular_merge_flag value is 0
[0348] g)merge_mmvd_flag value is 0
[0349] g2)CuPredMode[x0][y0] is MODE_INTER.
[0350] If the value of merge_subblock_flag is 1, the current image block uses SBMM for inter-frame prediction, otherwise, execute step 5.
[0351] Step 5: The decoder determines whether the current image block uses CIIP;
[0352] Specifically, whether the current image block uses CIIP is determined according to the value of the syntax element ciip_flag. If the value of ciip_flag is 1, it indicates that the current image block uses the CIIP mode for inter-frame prediction, otherwise, the value of ciip_flag is 0, indicating that the current image block does not use the CIIP mode for inter-frame prediction.
[0353] Similarly, the value of ciip_flag can be determined by parsing the syntax element as described in the above embodiment, or can be obtained by derivation. If the above preset parsing condition 4) is met, the decoder parses the bitstream to obtain the value of ciip_flag, otherwise, when the value of the syntax element does not exist in the bitstream, the value of ciip_flag is derived according to the following preset derivation conditions:
[0354] If the following preset derivation conditions h) to l) are all met, the value of ciip_flag is set to 1, otherwise, the value of ciip_flag is set to 0.
[0355] h)allowCIIP is 1
[0356] i) general_merge_flag is 1
[0357] j) regular_merge_flag is 0
[0358] k)merge_mmvd_flag is 0
[0359] l)merge_subblock_flag is 0.
[0360] Alternatively, when the value of the syntax element does not exist in the bitstream or the above preset parsing condition 4) is not satisfied, the following preset derivation conditions may be used for derivation:
[0361] If the following preset derivation conditions h) to l) and l2) are all met, the value of ciip_flag is set to 1, otherwise, the value of ciip_flag is set to 0.
[0362] h)allowCIIP is 1
[0363] i) general_merge_flag is 1
[0364] j) regular_merge_flag is 0
[0365] k)merge_mmvd_flag is 0
[0366] l) merge_subblock_flag is 0
[0367] l2) CuPredMode[x0][y0] is MODE_INTER.
[0368] If the value of ciip_flag is 0, the current image block uses TPM for inter-frame prediction.
[0369] Alternatively, if ciip_flag is 0, optionally, the MergeTriangleFlag value is set to 1 and the current image block uses TPM for inter-frame prediction.
[0370] Alternatively, if the following preset derivation conditions m) to r) are all met, the MergeTriangleFlag value is 1, otherwise it is 0.
[0371] m)allowTPM is 1
[0372] n)general_merge_flag[x0][y0] is 1
[0373] o)regular_merge_flag[x0][y0] is 0
[0374] p)mmvd_merge_flag[x0][y0] is 0
[0375] q)merge_subblock_flag[x0][y0] is 0
[0376] r)ciip_flag[x0][y0] is 0
[0377] Alternatively, if the following preset derivation conditions m) to r) and s) are all met, the MergeTriangleFlag value is 1, otherwise it is 0.
[0378] m)allowTPM is 1
[0379] n)general_merge_flag[x0][y0] is 1
[0380] o)regular_merge_flag[x0][y0] is 0
[0381] p)mmvd_merge_flag[x0][y0] is 0
[0382] q)merge_subblock_flag[x0][y0] is 0
[0383] r)ciip_flag[x0][y0] is 0
[0384] s)CuPredMode[x0][y0] is MODE_INTER
[0385] Furthermore, if the merge_triangle_flag value is 1, the decoder can parse TPM-related syntax elements, such as merge_triangle_split_dir, merge_triangle_idx0, merge_triangle_idx1, etc.
[0386] In an embodiment of the present application, on the premise that the decoder determines that the current image block uses a fusion mode for inter-frame prediction, if the current image block allows the use of the current fusion mode, and the current image block allows the use of a fusion mode other than the current fusion mode among K alternative fusion modes, the decoder uses the current fusion mode to perform inter-frame prediction on the current image block according to the indication of the value of the first identifier of the current image block obtained by parsing in the bitstream to obtain a prediction block of the current image block, without further parsing the values of the first identifiers of each fusion mode other than the current fusion mode among the K alternative fusion modes, thereby removing the parsing redundancy of the fusion syntax elements, reducing the complexity of decoding to a certain extent, and improving decoding efficiency.
[0387] Based on the foregoing embodiments, an embodiment of the present application provides an inter-frame prediction method, which can be executed by the video encoder in the foregoing embodiments.
[0388] Fig.10 The process diagram of the inter-frame prediction method in the embodiment of the present application is as follows: Figure 2 , see Fig.10 As shown, the method may include:
[0389] S1001: Determine to use a fusion mode to perform inter-frame prediction on a current image block;
[0390] Here, the encoder can determine whether the inter-frame prediction parameters of the current image block are obtained from the adjacent inter-frame prediction blocks according to the RD Cost, that is, determine whether the prediction parameters of the inter-frame prediction are performed on the current image block using the fusion mode. If the encoder determines that the current image block uses the fusion mode for inter-frame prediction, the syntax element general_merge_flag is set to a first value (such as general_merge_flag is set to 1), conversely, if the encoder determines that the current image block does not use the fusion mode for inter-frame prediction, the syntax element general_merge_flag is set to a second value (such as general_merge_flag is set to 0), and finally, the encoder carries the value of general_merge_flag in the bitstream and passes it to the decoder.
[0391] In some possible implementations, the encoder does not need to write general_merge_flag into the bitstream. In this case, the decoder can use the following method for derivation: if cu_skip_flag (a syntax element used to indicate whether the current image block uses skip mode) is a first value, then general_merge_flag is a first value; otherwise, cu_skip_flag is a second value and general_merge_flag is a second value.
[0392] Then, the encoder may execute S1002 after determining to use the fusion mode to perform inter-frame prediction on the current image block.
[0393] S1002: Determine at least one fusion mode allowed to be used for the current image block from K candidate fusion modes;
[0394] The decoding end and the encoding end may pre-negotiate or stipulate by agreement a fusion mode set (or fusion mode list), and the fusion mode set may include multiple candidate fusion modes. The K candidate fusion modes may be all fusion modes in the fusion mode set, or may be fusion modes in the fusion mode set for which it is not determined whether the current image block is allowed to use.
[0395] Regardless of whether the K fusion modes are part or all of the fusion mode set, the K candidate fusion modes may include one or more of the above fusion modes. For example, the K candidate fusion modes may include: traditional fusion mode, MMVD mode, SBMM, CIIP mode, TPM; or, the K candidate fusion modes may also include: MMVD mode, SBMM, CIIP mode, TPM. Of course, the K candidate fusion modes may also include other fusion modes, which are not specifically limited in the embodiments of the present application.
[0396] Here, after the encoder determines to use a fusion mode for the current image block through S1001, the prediction parameters described in the above embodiment can be obtained through pre-stored syntax elements or derived syntax elements. Then, the encoder determines whether the current image block is allowed to use each of the K candidate fusion modes based on the prediction parameters, that is, obtains the value of the second identifier of each fusion mode, and then determines whether the current image block is allowed to use each fusion mode based on the value of the second identifier. Specifically, the encoder can obtain the value of the second identifier of the fusion mode through formulas (1) to (4) in the above embodiment, which will not be repeated here. In actual applications, the encoder does not need to pass the value of the second identifier of each fusion mode to the decoder, and the decoder can obtain it through the above formulas (1) to (4).
[0397] S1003: Determine a target fusion mode from at least one fusion mode;
[0398] Here, after the encoder determines the fusion mode allowed for the current image block through S1002, it calculates the RD Cost corresponding to each fusion mode, and selects a fusion mode with the smallest RD Cost as the target fusion mode, where the target fusion mode is the fusion mode finally used for the current image block. Further, the encoder can set the value of the first identifier of the target fusion mode, and carry the value of the first identifier of the target fusion mode in the bitstream to the decoder. Specifically, the encoder can first determine whether the value of the second identifier of each fusion mode meets the preset parsing condition. If the preset condition is met, the value of the first identifier of the corresponding fusion mode is carried in the bitstream and passed to the decoder as shown in the syntax table shown in Table 4 above.
[0399] In some possible implementations, after the encoder obtains the value of the second identifier of each fusion mode through S1002, it can determine which fusion modes are allowed to be used for the current image block for inter-frame prediction, and then set the value of the first identifier of the fusion mode allowed to be used. For example, when allowMMVD is the first value, the encoder determines that the MMVD mode is not allowed to be used for inter-frame prediction for the current image block, and then the encoder can set the first identifier of the MMVD mode, that is, mmvd_merge_flag, to the first value. On the contrary, when allowMMVD is the second value, the encoder determines that the MMVD mode is allowed to be used for inter-frame prediction for the current image block, and then the encoder can set the first identifier of the MMVD mode, that is, mmvd_merge_flag, to the second value. For other fusion modes, the same can be applied. In this way, the encoder can obtain the value of the first identifier of the fusion mode allowed to be used for the current image block, and then the encoder can carry the value of the first identifier of the fusion mode whose second identifier value satisfies the preset condition in the code stream according to the syntax table shown in Table 4 above and pass it to the decoder.
[0400] In the specific implementation process, the encoder can also set the value of the first identifier of the fusion mode allowed to be used in sequence according to the order of K alternative fusion modes. For example, the order of the fusion modes allowed to be used can be: MMVD mode → SBMM → CIIP mode, then the encoder can set the first identifier of the MMVD mode, that is, mmvd_merge_flag, to the second value, and then set the first identifiers of the SBMM and CIIP modes, that is, merge_subblock_flag and ciip_flag, to the first value, without having to judge one by one. Then the encoder can obtain the value of the first identifier of the fusion mode allowed to be used for the current image block, and then the encoder can carry the value of the first identifier of the fusion mode whose value of the second identifier meets the preset conditions in the code stream to the decoder according to the syntax table shown in Table 4 above.
[0401] In the above process, the process of the encoder determining whether the value of the second identifier satisfies the preset parsing condition is similar to the process of the decoder determining whether the value of the second identifier satisfies the preset parsing condition in the above embodiment. For details, please refer to the above embodiment, which will not be repeated here. Then, when the value of the second identifier satisfies the preset parsing condition, the encoder carries the value of the first identifier of the corresponding fusion mode in the bitstream and passes it to the decoder, so that the decoder can parse the bitstream to obtain the value of the first identifier. Otherwise, the encoder does not need to carry the value of the first identifier in the bitstream and pass it to the decoder.
[0402] S1004: Perform inter-frame prediction on the current image block using the target fusion mode to obtain a prediction block of the current image block.
[0403] At this point, the encoder has completed the inter-frame prediction process for the current image block.
[0404] Based on the same inventive concept, an embodiment of the present application provides an inter-frame prediction device, which can be applied to the video decoder described in the above embodiment.
[0405] Fig.11 This is a schematic diagram of the structure of the inter-frame prediction device in the embodiment of the present application, see Fig.11 As shown, the inter-frame prediction device 1100 may include: a determination module 1101, which is used to determine whether the current image block is allowed to use each fusion mode of K alternative fusion modes after determining to use the fusion mode for inter-frame prediction of the current image block, where K is a positive integer greater than or equal to 2; a parsing module 1102, which is used to parse and obtain the value of a first identifier of the current fusion mode from the bitstream when the current image block is allowed to use the current fusion mode and the current image block is allowed to use a fusion mode other than the current fusion mode among the K alternative fusion modes; a prediction module 1103, which is used to perform inter-frame prediction on the current image block using the current fusion mode when the value of the first identifier indicates that the fusion mode for inter-frame prediction of the current image block is the current fusion mode, so as to obtain a prediction block of the current image block.
[0406] In some possible implementations, the prediction module is further used to perform inter-frame prediction on the current image block using the current fusion mode to obtain a prediction block of the current image block when the current image block does not allow the use of K alternative fusion modes other than the current fusion mode.
[0407] In some possible implementations, a determination module is used to obtain prediction parameters corresponding to the current image block; based on the prediction parameters, it is determined whether the current image block is allowed to use various fusion modes; wherein the prediction parameters include one or more of the following: an indication of a syntax element of a superior video processing unit related to the current image block, the size of the current image block, indication information for indicating whether the current image block has a residual, and the type of the superior video processing unit.
[0408] In some possible implementations, the upper-level video processing unit includes a slice where the current image block is located, a slice group where the current image block is located, an image where the current image block is located, or a video sequence where the current image block is located.
[0409] In some possible implementations, the parsing module is used to parse and obtain the value of regular_merge_flag of the traditional fusion mode from the bitstream when the current image block allows the use of at least one of the MMVD mode, SBMM, CIIP mode, and TPM; wherein regular_merge_flag is the first identifier of the traditional fusion mode.
[0410] In some possible implementations, the parsing module is used to parse and obtain the value of mmvd_merge_flag of the MMVD mode from the bitstream when the current image block allows the use of the MMVD mode and the current image block allows the use of at least one of the SBMM, CIIP mode, and TPM; wherein mmvd_merge_flag is the first identifier of the MMVD mode.
[0411] In some possible implementations, the parsing module is used to parse and obtain the value of merge_subblock_flag of SBMM from the bitstream when the current image block allows the use of SBMM mode and the current image block allows the use of CIIP mode and / or TPM; wherein merge_subblock_flag is the first identifier of SBMM.
[0412] In some possible implementations, the parsing module is used to parse and obtain the value of ciip_flag of the CIIP mode from the code stream when the current image block allows the use of the CIIP mode and TPM; wherein ciip_flag is the first identifier of the CIIP mode.
[0413] In some possible implementations, the device also includes: a derivation module, which is used to obtain the value of the first identifier of the current fusion mode by derivation when the current image block does not allow the use of the current fusion mode, or the current image block does not allow the use of a fusion mode other than the current fusion mode among K alternative fusion modes.
[0414] In some possible implementations, the device further includes: a derivation module, configured to obtain the value of the first identifier of the current fusion mode by derivation when the value of the first identifier of the current fusion mode cannot be obtained by parsing the bitstream.
[0415] In some possible implementations, the current fusion mode is a traditional fusion mode, and the derivation module is used to set general_merge_flag to the value of regular_merge_flag; or, to set the value of regular_merge_flag to a first value; wherein general_merge_flag is used to indicate whether the inter-frame prediction parameters of the current image block are obtained from adjacent inter-frame prediction blocks, and regular_merge_flag is the first identifier of the traditional fusion mode.
[0416] In some possible implementations, the current fusion mode is the MMVD mode, and the derivation module is used to set the value of the first identifier mmvd_merge_flag of the MMVD mode to a first value when a first derivation condition is met; wherein the first derivation condition includes: the current image block allows the use of the MMVD mode.
[0417] In some possible implementations, the current fusion mode is SBMM, and the derivation module is used to set the value of the first identifier merge_subblock_flag of SBMM to a first value when a second derivation condition is met; wherein the second derivation condition includes: the current image block allows the use of SBMM.
[0418] In some possible implementations, the current fusion mode is the CIIP mode, and the derivation module is used to set the value of the first identifier ciip_flag of the CIIP mode to a first value when a third derivation condition is met; wherein the third derivation condition includes: the current image block allows the use of the CIIP mode.
[0419] In some possible implementations, the current fusion mode is TPM, and the derivation module is used to set the value of the first identifier merge_triangle_flag of TPM to the first value when a fourth derivation condition is met; wherein the fourth derivation condition includes: the current image block allows the use of TPM.
[0420] In some possible implementations, the K candidate fusion modes include the following: traditional fusion mode, MMVD mode, SBMM, CIIP mode, and TPM.
[0421] Based on the same inventive concept, an embodiment of the present application provides a video decoder, which is used to decode an image block from a bit stream, including: an entropy decoding module, which is used to decode an index identifier from the bit stream, and the index identifier is used to indicate the target candidate motion information of the current decoded image block; an inter-frame prediction device as any one of the second aspects above, the inter-frame prediction device is used to predict the motion information of the current decoded image block based on the target candidate motion information indicated by the index identifier, and determine the predicted pixel value of the current decoded image block based on the motion information of the current decoded image block; a reconstruction module, which is used to reconstruct the current decoded image block based on the predicted pixel value.
[0422] Based on the same inventive concept, an embodiment of the present application provides a device for decoding video data, the device comprising: a memory for storing video data in the form of a code stream; and a video decoder for decoding the video data from the code stream.
[0423] Based on the same inventive concept, an embodiment of the present application provides a decoding device, comprising: a non-volatile memory and a processor coupled to each other, wherein the processor calls a program code stored in the memory to execute part or all of the steps of any one method of the first aspect.
[0424] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, which stores program code, wherein the program code includes instructions for executing part or all of the steps of any one method of the first aspect.
[0425] Based on the same inventive concept, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, the computer executes part or all of the steps of any one of the methods of the first aspect.
[0426] Those skilled in the art will appreciate that the functions described in conjunction with the various illustrative logic blocks, modules, and algorithm steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any communication media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this application. A computer program product may include computer-readable media.
[0427] As an example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are actually directed to non-temporary tangible storage media. As used herein, disks and optical disks include compact disks (CDs), laser optical disks, optical optical disks, digital versatile disks (DVDs), and Blu-ray disks, where disks typically reproduce data magnetically, while optical disks reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0428] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Thus, the term "processor" as used herein may refer to any of the aforementioned structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functions described by the various illustrative logic blocks, modules, and steps described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the techniques may be fully implemented in one or more circuits or logic elements.
[0429] The techniques of the present application may be implemented in a variety of devices or apparatuses, including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this application to emphasize functional aspects of devices for performing the disclosed techniques, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units may be combined in a codec hardware unit in conjunction with appropriate software and / or firmware, or provided by interoperating hardware units (including one or more processors as described above).
[0430] In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0431] The above is only an exemplary embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An inter-frame prediction method, characterized in that: include: Determining whether to use a fusion mode to perform inter-frame prediction on the current image block according to the first syntax element; When inter-frame prediction is performed on the current image block using the fusion mode, determining whether the current image block is allowed to use each fusion mode of K candidate fusion modes, where K is a positive integer greater than or equal to 2; When the current image block allows the use of the current fusion mode, and the current image block allows the use of one or more fusion modes other than the current fusion mode among the K candidate fusion modes, parsing from a bitstream to obtain a value of a second syntax element indicating whether to use the current fusion mode; When the value of the second syntax element is the first value, inter-frame prediction is performed on the current image block using the current fusion mode to obtain a prediction block of the current image block.
2. The method according to claim 1, characterized in that The method further comprises: When the current image block does not allow the use of a fusion mode other than the current fusion mode among the K candidate fusion modes, inter-frame prediction is performed on the current image block using the current fusion mode to obtain a prediction block of the current image block.
3. The method according to claim 1, characterized in that The determining whether the current image block is allowed to use each fusion mode among the K candidate fusion modes includes: Obtaining prediction parameters corresponding to the current image block; determining, according to the prediction parameters, whether the current image block is allowed to use the respective fusion modes; Among them, the prediction parameters include one or more of the following: an indication of a syntax element of a superior video processing unit related to the current image block, the size of the current image block, indication information for indicating whether the current image block has a residual, and the type of the superior video processing unit.
4. The method according to claim 3, characterized in that The upper-level video processing unit includes the slice where the current image block is located, the slice group where the current image block is located, the image where the current image block is located, or the video sequence where the current image block is located.
5. The method according to any one of claims 1 to 4, characterized in that The first syntax element is general_merge_flag.
6. The method according to any one of claims 1 to 5, characterized in that The current fusion mode is the CIIP mode.
7. The method according to any one of claims 1 to 6, characterized in that The second syntax element is ciip_flag.
8. A coding method, characterized in that include: Encoding a first syntax element into a bitstream, where the first syntax element is used to indicate whether to use a fusion mode to perform inter-frame prediction on the current image block; When inter-frame prediction is performed on the current image block using the fusion mode, determining whether the current image block is allowed to use each fusion mode of K candidate fusion modes, where K is a positive integer greater than or equal to 2; When the current image block allows the use of the current fusion mode and allows the use of one or more fusion modes other than the current fusion mode among the K alternative fusion modes, encoding a second syntax element into the bitstream, where the second syntax element is used to indicate whether to use the current fusion mode to perform inter-frame prediction on the current image block.
9. The method according to claim 8, characterized in that The determining whether the current image block is allowed to use each fusion mode among the K candidate fusion modes includes: Obtaining prediction parameters corresponding to the current image block; determining, according to the prediction parameters, whether the current image block is allowed to use the respective fusion modes; Among them, the prediction parameters include one or more of the following: an indication of a syntax element of a superior video processing unit related to the current image block, the size of the current image block, indication information for indicating whether the current image block has a residual, and the type of the superior video processing unit.
10. The method according to claim 9, characterized in that The upper-level video processing unit includes the slice where the current image block is located, the slice group where the current image block is located, the image where the current image block is located, or the video sequence where the current image block is located.
11. The method according to any one of claims 8 to 10, characterized in that The first syntax element is general_merge_flag.
12. The method according to any one of claims 8 to 11, characterized in that The current fusion mode is the CIIP mode.
13. The method according to any one of claims 8 to 12, characterized in that The second syntax element is ciip_flag.
14. A code stream storage device, characterized in that: include: A receiving module, used for receiving code stream; A storage module is used to store the code stream, wherein the code stream is encoded by the following method: Encoding a first syntax element into the bitstream, where the first syntax element is used to indicate whether to use a fusion mode to perform inter-frame prediction on the current image block; When inter-frame prediction is performed on the current image block using the fusion mode, determining whether the current image block is allowed to use each fusion mode of K candidate fusion modes, where K is a positive integer greater than or equal to 2; When the current image block allows the use of the current fusion mode and allows the use of one or more fusion modes other than the current fusion mode among the K alternative fusion modes, encoding a second syntax element into the bitstream, where the second syntax element is used to indicate whether to use the current fusion mode to perform inter-frame prediction on the current image block.
15. The device according to claim 14, characterized in that The first syntax element is general_merge_flag.
16. The device according to claim 14, characterized in that The current fusion mode is the CIIP mode.
17. The device according to claim 14, characterized in that The second syntax element is ciip_flag.
18. A code stream storage device, characterized in that: include: a receiver, configured to receive a code stream, the code stream comprising a first syntax element and a second syntax element, wherein the first syntax element is used to indicate whether to use a fusion mode to perform inter-frame prediction on a current image block, and the second syntax element is used to indicate whether to use a current fusion mode to perform inter-frame prediction on the current image block; A memory is used to store the code stream.
19. The device according to claim 18, characterized in that The first syntax element is general_merge_flag.
20. The device according to claim 18, characterized in that The current fusion mode is the CIIP mode.
21. The device according to claim 18, characterized in that The second syntax element is ciip_flag.
22. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a code stream, where the code stream includes a first syntax element and a second syntax element, wherein the first syntax element is used to indicate whether to use a fusion mode to perform inter-frame prediction on a current image block, and the second syntax element is used to indicate whether to use the current fusion mode to perform inter-frame prediction on the current image block.
23. A computer-readable storage medium, characterized in that The computer-readable storage medium includes computer instructions. When the computer instructions are executed by one or more processors, the one or more processors implement the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 13.
24. A computer program product, characterized in that The computer program product includes computer instructions. When the computer instructions are executed by one or more processors, the one or more processors implement the method according to any one of claims 1 to 7 or the method according to any one of claims 8 to 13.
25. A decoding device, characterized in that: include: one or more processors; a memory for storing one or more computer programs or instructions; When the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
26. An encoding device, characterized in that include: one or more processors; a memory for storing one or more computer programs or instructions; When the one or more computer programs or instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 8 to 13.
