Decoding method, decoding device, decoding side device, electronic device, and non-volatile storage medium
By partitioning video blocks into triangular sub-blocks with unique motion information, the method improves prediction accuracy and reduces residuals, addressing the inefficiencies in encoding blocks with irregular edges.
Patent Information
- Application Number
- JP2023111410
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-24
- Filing Date
- 2023-07-06
- Publication Date
- 2024-08-28
- Estimated Expiration
- 2040-06-17
AI Technical Summary
Existing video encoding methods face challenges in accurately predicting blocks with irregular edges, leading to decreased prediction effectiveness and increased encoding residuals due to the use of rectangular blocks that do not align with the edges of actual objects.
The method involves partitioning current blocks into two triangular sub-blocks with distinct motion information for improved prediction accuracy by using a triangular prediction mode, allowing for separate motion compensation on each sub-block.
This approach enhances prediction accuracy and encoding performance while reducing encoding residuals by adapting to the shape of the objects within the video frames.
Smart Images

Figure 0007541599000008 
Figure 0007541599000016 
Figure 0007541599000014
Abstract
Description
[Technical field]
[0001] The present application relates to the field of codec technology, and in particular to a codec method, device and apparatus thereof. [Background technology]
[0002] In order to save space, video images are coded before being transmitted. A complete video coding method may include processes such as prediction, transformation, quantization, entropy coding, and filtering. Among them, predictive coding includes intraframe coding and interframe coding. Furthermore, interframe coding is to use pixels of adjacent coded images to predict a current pixel through correlation in the video time domain, thereby achieving the purpose of efficiently removing redundancy in the video time domain. Intraframe coding is to use pixels of coded blocks of a current frame image to predict a current pixel through correlation in the video space domain, thereby achieving the purpose of removing redundancy in the video space domain.
[0003] In interframe coding, a motion vector represents the relative shift between a current block of a current frame image and a reference block of a reference frame image. For example, a current frame image A and a reference frame image B have a high correlation in the time domain. When a current block A1 of an image A needs to be transmitted, a motion search can be performed in an image B to find a reference block B1 that is most suitable for the current block A1, and a relative shift between the current block A1 and the reference block B1 is determined. The relative shift is the motion vector of the current block A1.
[0004] In some embodiments, the current block is rectangular, but the edge of an actual object is often not rectangular. For one current block at the edge of an object, there are often two different objects (e.g., a foreground object and a background). In this case, predicting the rectangular current block using only a single prediction mode may cause problems such as a decrease in prediction efficiency, an increase in coding residual, and a decrease in coding performance. Summary of the Invention [Problem to be solved by the invention]
[0005] The present application provides a codec method and device thereof that can improve encoding performance. [Means for solving the problem]
[0006] The present application provides a codec method, the method comprising: If the feature information of the current block satisfies a certain condition, dividing the current block into a first triangular sub-block and a second triangular sub-block; constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; Obtaining first target motion information of the first triangular sub-block and second target motion information of the second triangular sub-block from the motion information list, and determining that the first target motion information is different from the second target motion information; performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block; and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block.
[0007] The present application provides a codec device, comprising: a partition module for partitioning the current block into a first triangular sub-block and a second triangular sub-block when the feature information of the current block satisfies a certain condition; a construction module for constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; an acquisition module for acquiring first target motion information of the first triangular sub-block and second target motion information of the second triangular sub-block from the motion information list, the first target motion information being different from the second target motion information; a codec module for performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block.
[0008] The present application provides an encoding device including a processor and a computer-readable storage medium storing computer-executable instructions to be executed by the processor, the processor comprising: If the feature information of the current block satisfies a certain condition, dividing the current block into a first triangular sub-block and a second triangular sub-block; constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; Obtaining first target motion information of the first triangular sub-block and second target motion information of the second triangular sub-block from the motion information list, and determining that the first target motion information is different from the second target motion information; performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block; The present invention is directed to executing computer-executable commands to achieve the above.
[0009] The present application provides a decryption device including a processor and a computer-readable storage medium storing computer-executable instructions to be executed by the processor, the processor comprising: If the feature information of the current block satisfies a certain condition, dividing the current block into a first triangular sub-block and a second triangular sub-block; constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; Obtaining first target motion information of the first triangular sub-block and second target motion information of the second triangular sub-block from the motion information list, and determining that the first target motion information is different from the second target motion information; performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block; The present invention is directed to executing computer-executable commands to achieve the above. Effect of the Invention
[0010] According to the above technical solution, in the embodiment of the present application, when the feature information of the current block satisfies a certain condition, the current block is divided into a first triangular sub-block and a second triangular sub-block, a first target motion information of the first triangular sub-block and a second target motion information of the second triangular sub-block are obtained, motion compensation is performed on the first triangular sub-block according to the first target motion information to obtain a predicted value of the first triangular sub-block, and motion compensation is performed on the second triangular sub-block according to the second target motion information to obtain a predicted value of the second triangular sub-block. According to the above embodiment, it is possible to improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residual. [Brief description of the drawings]
[0011] In order to more clearly describe the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below. Obviously, the drawings described below are only according to some embodiments described in the present application, and those skilled in the art can obtain other drawings based on these drawings of the embodiments of the present application.
[0012] [Figure 1] FIG. 1 is a schematic diagram of a video coding framework according to an embodiment of the present application. [Diagram 2]FIG. 2 is a flow chart of a codec method according to an embodiment of the present application. [Diagram 3] FIG. 3 is a flow chart of an encoding method according to an embodiment of the present application. [Figure 4] FIG. 4 is a flow chart of a decoding method according to an embodiment of the present application. [Figure 5A] FIG. 5A is a schematic diagram of a candidate block according to an embodiment of the present application. [Figure 5B] FIG. 5B is a schematic diagram of a candidate block according to an embodiment of the present application. [Figure 6A] FIG. 6A is a schematic diagram of a partition of a current block according to an embodiment of the present application. [Figure 6B] FIG. 6B is a schematic diagram of a partition of a current block according to an embodiment of the present application. [Figure 7A] FIG. 7A is a schematic diagram of a corresponding relationship between index values and unidirectional motion information according to an embodiment of the present application. [Figure 7B] FIG. 7B is a schematic diagram of a partition of a triangular sub-block according to an embodiment of the present application. [Figure 7C] FIG. 7C is a schematic diagram of a partition of a triangular sub-block according to an embodiment of the present application. [Figure 7D] FIG. 7D is a schematic diagram of motion compensation according to an embodiment of the present application. [Figure 7E] FIG. 7E is a schematic diagram of storing motion information according to an embodiment of the present application. [Figure 7F] FIG. 7F is a schematic diagram of storing motion information according to an embodiment of the present application. [Figure 8] FIG. 8 is a configuration diagram of a codec device according to an embodiment of the present application. [Figure 9A] FIG. 9A is a hardware configuration diagram of a decoding side device according to an embodiment of the present application. [Figure 9B] FIG. 9B is a hardware configuration diagram of the encoding side device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] The terms used in the embodiments are merely for the purpose of describing a particular embodiment and are not intended to limit each of the embodiments. The singular terms "a kind of," "said," and "the" used in the present specification and claims are intended to further include the plural, unless the context clearly indicates otherwise. The term "and / or" used in this specification should also be understood to refer to any or all possible combinations including one or more associated items. In the embodiments, the terms "first," "second," "third," and the like may be used to describe various types of information, but such information is not limited to these terms, and these terms should be understood to be merely used to distinguish the same types of information from each other. For example, the first information may be referred to as the second information without departing from the scope of the present application. Similarly, the second information may be referred to as the first information. In addition, the term "if..." used is to be interpreted as "when...," "at...," or "in response to determining...," depending on the context.
[0014] The codec method, device and apparatus provided in the present embodiment relate to the following concepts.
[0015] Regarding intra prediction and inter prediction techniques, intra prediction refers to predicting the current pixel using the pixel of the coded block of the current image through the correlation of the video spatial domain, thereby achieving the purpose of removing the redundancy of the video spatial domain. Inter prediction refers to predicting the pixel of the current image using the pixel of the adjacent coded image through the correlation of the video temporal domain, since the video sequence contains high temporal correlation, thereby achieving the purpose of efficiently removing the redundancy of the video temporal domain. The inter prediction part of the video coding standard basically adopts the technique of block-based motion compensation. The principle is to find the most matching block from the coded image for each pixel block of the current image. Such a process is called motion estimation (ME).
[0016] Regarding the motion vector (MV), in inter-frame coding, the motion vector represents the relative shift between the currently coded block and its most matching block in the reference image. Each partitioned block needs its corresponding motion vector to be transmitted to the decoding side. If the motion vector of each block is coded and transmitted separately, a significant number of bits will be required, especially when the block is partitioned into small blocks. In order to reduce the number of bits for coding the motion vector, the motion vector of the currently to be coded block is predicted based on the motion vector of the adjacent coded block by utilizing the spatial correlation between adjacent image blocks, and the difference of the predicted value is coded. This can efficiently reduce the number of bits representing the motion vector. In the process of coding the motion vector of the current block, the motion vector of the current block is first predicted using the motion vector of the adjacent coded block, and the difference between the predicted value of the motion vector (MVP, Motion Vector Prediction) and the estimated value of the motion vector (MVD, Motion Vector Difference) is coded, thereby efficiently reducing the number of coding bits of the MV.
[0017] Regarding the motion information, in order to express the positional deviation between the current image block and a certain reference image block by a motion vector, in addition to the motion vector, index information of the reference frame image indicating which reference frame image is to be used is also required so as to accurately obtain information pointing to the image block. In the video coding technology, one reference frame image list may usually be created for the current frame image. The index information of the reference frame image indicates which reference frame image in the reference frame image list is used by the current image block. In addition, since many coding technologies also support multiple reference image lists, one index value may indicate which reference image list is to be used, and this index value may be called a reference direction. In the video coding technology, information related to the motion, such as the motion vector, the reference frame index, and the reference direction, may be collectively called motion information.
[0018] Regarding rate-distortion optimization, there are two indices for evaluating the coding efficiency: bit rate and PSNR (Peak Signal to Noise Ratio). The smaller the bit rate, the higher the compression rate, while the higher the PSNR, the better the quality of the reconstructed image. When selecting a mode, the judgment formula is to substantially perform a comprehensive evaluation of both. For example, the cost corresponding to a mode is J(mode)=D+λ*R. Here, D indicates distortion, and may be generally evaluated by an index called SSE, which is the mean square sum of the difference between the reconstructed image block and the original image, λ is the Lagrange multiplier, and R is the actual number of bits required to code the image block in the mode, which is the sum of the number of bits required for the included coding mode information, motion information, residual, etc.
[0019] Regarding the video coding framework, as shown in FIG. 1, the processing process on the coding side in the embodiment of the present application may be realized by the video coding framework. In addition, since the schematic diagram of the video decoding framework is similar to that of FIG. 1, the overlapping description will be omitted, and the processing process on the decoding side in the embodiment of the present application may be realized by the video decoding framework. Specifically, the video coding framework and the video decoding framework include modules such as intra prediction, motion estimation / motion compensation, reference image buffer, in-loop filtering, reconstruction, transform, quantization, inverse transform, inverse quantization, and entropy coder. On the coding side, the coding side processing process can be realized by the cooperation of these modules, while on the decoding side, the decoding side processing process can be realized by the cooperation of these modules.
[0020] Regarding flag bit coding, there are various modes in video coding, such as merge mode and triangular prediction mode. A certain mode may be adopted for a certain block. In order to indicate which mode is adopted, each block needs to be marked by coding a corresponding flag bit. That is, the coding side determines the value of the flag bit, then codes the flag bit and transmits it to the decoding side, while the decoding side analyzes the flag bit to determine whether to enable the corresponding mode.
[0021] Regarding the merge mode, it may include, but is not limited to, a normal merge mode, a merge mode for triangular prediction (also called triangular prediction mode, TPM mode), a merge mode with coded motion vector difference (also called merge mode with MVD, MMVD mode), a merge mode with motion information of a sub-block (also called sub-block merge, SB merge mode), and a merge mode for generating a new predicted value by combining with intra prediction (combine intra inter prediction mode, CIIP mode). If the current block uses a merge mode, one of the above five merge modes may be used.
[0022] It is a special merge mode with respect to skip mode. It is different from merge mode in that it does not require coding residual. When the current block is in skip mode, CIIP mode is off by default, but normal merge mode, merge mode for triangular prediction, merge mode of coded motion vector difference, and merge mode by motion information of sub-block are applicable.
[0023] In addition, the method of generating the predicted value can be determined based on the Normal Merge mode, the TPM mode, the MMVD mode, the SB Merge mode, the CIIP mode, etc. After the predicted value is generated, in the Merge mode, the reconstructed value is obtained by the predicted value and the residual value, but in the Skip mode, since there is no residual value, the reconstructed value is obtained directly by using the predicted value.
[0024] Regarding frame type, if the current frame does not allow encoding with reference to information of other frames, the current frame may be an I frame; if the current frame allows encoding with reference to information of one other frame (but not more than one frame), the current frame may be a P frame; if the current frame allows encoding with reference to information of one or two other frames, the current frame may be a B frame.
[0025] Regarding the sequence parameter set (SPS), in the sequence parameter set there is a flag bit that determines whether some tools are allowed to be turned on in the whole sequence. If the flag bit is 1, the tool corresponding to the flag bit is allowed to be turned on in the video sequence, and if the flag bit is 0, the tool corresponding to the flag bit is not allowed to be turned on in the video sequence.
[0026] Regarding Context-Based Adaptive Binary Arithmetic Coding (CABAC), CABAC is a commonly used entropy encoding / decoding method that has two modes: a CABAC mode that requires storing and updating at least one context model, and a bypass CABAC mode that does not require storing and updating a context model.
[0027] Currently, the current block is rectangular, but the edge of the actual object may not be horizontal and vertical, so that two different objects may exist for one current block at the edge of the object (for example, a foreground object and a background exist at the same time). In this case, if the current block is predicted by only a single prediction mode, there are problems such as a decrease in prediction effect, an increase in coding residual, and a decrease in coding performance.
[0028] In view of the above knowledge, in the present embodiment, a triangular prediction mode is provided that can improve the convenience of hardware implementation and improve the coding performance by dividing a current block into two triangular sub-blocks having different target motion information. Hereinafter, a codec method according to the present embodiment will be described in detail with reference to some specific embodiments.
[0029] Example 1 As shown in Figure 2, Figure 2 is a process diagram of a coding method according to an embodiment of the present application, which is applied to the decoding side or the encoding side and includes the following steps:
[0030] In step 201, if the feature information of the current block meets a certain condition, the current block is divided into a first triangular sub-block and a second triangular sub-block, that is, at the decoding / encoding side, the current block is divided into two triangular sub-blocks.
[0031] By way of example, the feature information may include, but is not limited to, one or more of motion information mode, size information, frame type, and sequence level switch control information, which are of course merely examples and are not limiting.
[0032] The feature information includes a motion information mode, and the motion information mode is: The motion information mode of the current block is merge mode or skip mode; and The motion information mode of the current block is a merge mode or a skip mode, and the motion information mode of the current block is not a merge submode or a skip submode of another type other than a triangular prediction submode; The motion information mode of the current block is a merge mode, and the motion information mode of the current block is not one of a normal merge submode (i.e., a normal merge mode, also called a regular merge mode), an MMVD submode (a merge mode of a coded motion vector difference), an SB merge submode (a merge mode based on motion information of a subblock), and a CIIP (a merge mode for generating a new predicted value in combination with intra prediction) submode; The motion information mode of the current block is a skip mode, and the motion information mode of the current block is not one of a normal merge submode, an MMVD submode, and an SB merge submode; If at least one of the above is satisfied, it is determined that the motion information mode satisfies a specific condition.
[0033] Of course, these are examples and are not limited. Through the above examples, it can be determined whether the motion information mode of the current block is a triangular prediction mode. When it is determined that the motion information mode of the current block is a triangular prediction mode, it is determined that the motion information mode meets a certain condition. For convenience of description, in this application, the TPM mode and the triangular prediction submode are compatible, the normal merge mode and the normal merge submode are compatible, the coded motion vector difference merge mode and the MMVD submode are compatible, the sub-block motion information merge mode and the SB merge submode are compatible, and the CIIP mode and the CIIP submode are compatible.
[0034] The characteristic information includes a frame type, and the frame type is The current frame to which the current block belongs is frame B, The current frame to which the current block belongs allows intra-block copying; and If at least one of the following is satisfied, it is determined that the frame type satisfies the specific condition.
[0035] The feature information includes sequence level switch control information, and if the sequence level switch control information allows the current block to adopt a triangular prediction mode, it can be determined that the sequence level switch control information satisfies a specific condition.
[0036] If the feature information includes size information, and the size information includes at least one of a width value, a height value, and an area value, and at least one of the width value, height value, and area value in the size information satisfies a corresponding threshold condition, the size information satisfies the specific condition. For example, if the size information satisfies at least one of the following, it is determined that the size information satisfies the specific condition: 1. The width value of the current block is greater than or equal to the first threshold, and the width value of the current block is less than or equal to the second threshold. 2. The height value of the current block is greater than or equal to the third threshold, and the height value of the current block is less than or equal to the fourth threshold. 3. The area value of the current block is greater than or equal to the fifth threshold, and the area value of the current block is less than or equal to the sixth threshold. 4. The area value of the current block is greater than or equal to the seventh threshold. 5. The area value of the current block is less than or equal to the 8th threshold. 6. The width value of the current block is less than or equal to the ninth threshold, and the height value of the current block is less than or equal to the tenth threshold.
[0037] Of course, these are examples and are not limiting. By way of example, but not by way of limitation, each of the above threshold conditions may be set empirically.
[0038] For example, the feature information includes one or more of a motion information mode, a size information, a frame type, and a sequence level switch control information. If the feature information includes a motion information mode, and if the motion information mode satisfies a specific condition, it indicates that the feature information satisfies the specific condition. If the feature information includes a frame type, and if the frame type satisfies a specific condition, it indicates that the feature information satisfies the specific condition. The same applies to other cases. If the feature information includes at least two of a motion information mode, a size information, a frame type, and a sequence level switch control information, for example, the motion information mode and the frame type, it indicates that the feature information satisfies a specific condition, and if the motion information mode satisfies a specific condition, it indicates that the feature information satisfies a specific condition. The same applies to other cases.
[0039] For example, at least one specific condition of one type of feature information (e.g., motion information mode, size information, frame type, sequence level switch control information, etc.) may be arbitrarily combined with at least one specific condition of another type of feature information to form a specific condition of the current block, although the manner of such combination is not particularly limited and may be arbitrarily set.
[0040] For example, when the codec method is applied to the decoding side, partitioning the current block into a first triangular sub-block and a second triangular sub-block at the decoding side can be Obtaining first indication information from the encoded bitstream for indicating partition information of the triangular sub-block; If the partition information of the triangular sub-block is a partition method by a main diagonal, partitioning the current block into a first triangular sub-block and a second triangular sub-block by the main diagonal of the current block; If the partition information of the triangular sub-block is a partition method by a sub-diagonal, partitioning the current block into a first triangular sub-block and a second triangular sub-block by a sub-diagonal of the current block; may include, but is not limited to:
[0041] For example, the first indication information may be obtained by binary arithmetic decoding with a bypass, or the first indication information may be obtained by context-adaptive binary arithmetic decoding with a context model.
[0042] As an example, CABAC has two modes: a CABAC mode (i.e., context-adaptive binary arithmetic coding) that requires storing and updating at least one context model, and a CABAC mode with bypass (i.e., binary arithmetic coding with bypass) that does not require storing and updating a context model. Thus, binary arithmetic with bypass is one type of CABAC mode, and context-adaptive binary arithmetic with context model is another type of CABAC mode.
[0043] In step 202, a motion information list is constructed for the current block, which includes multiple candidate motion information.
[0044] For example, a motion information list is constructed for a current block by reusing a motion information list construction method of a normal merge mode. For example, a motion information list construction method of a normal merge mode is first determined. Then, a motion information list including multiple candidate motion information is constructed for the current block based on the motion information list construction method of the normal merge mode.
[0045] In step 203, obtain the first target motion information of the first triangular sub-block and the second target motion information of the second triangular sub-block from the motion information list. For example, the first target motion information may be different from the second target motion information.
[0046] When the codec method is applied to a decoding side, obtaining, at the decoding side, a first target motion information of a first triangular sub-block and a second target motion information of a second triangular sub-block from a motion information list includes: At a decoding side, obtain second indication information from the encoded bitstream, for indicating a first index value of a first target motion information in the motion information list and a second index value of a second target motion information in the motion information list; According to the second indication information, at the decoding side, obtain candidate motion information corresponding to the first index value from the motion information list, and determine the obtained candidate motion information corresponding to the first index value as the first target motion information of the first triangular sub-block; According to the second indication information, at the decoding side, obtain candidate motion information corresponding to the second index value from the motion information list, and determine the obtained candidate motion information corresponding to the second index value as second target motion information of the second triangular sub-block; may include, but is not limited to:
[0047] For example, the first index value may be obtained by binary arithmetic decoding with a bypass. Or, the first index value may be obtained by context-adaptive binary arithmetic decoding with a context model. The second index value may be obtained by binary arithmetic decoding with a bypass. Or, the second index value may be obtained by context-adaptive binary arithmetic decoding with a context model.
[0048] For example, the first index value includes M1 bits, N1 bits among the M1 bits are obtained by context-adaptive binary arithmetic decoding using a context model, while the remaining (M1-N1) bits among the M1 bits are obtained by binary arithmetic decoding using a bypass, where M1 is a positive integer equal to or greater than 1, N1 is a positive integer equal to or greater than 1, and M1 is equal to or greater than N1. For example, the first index value includes four bits, where the first bit is obtained by context-adaptive binary arithmetic decoding using a context model, and the second, third, and fourth bits are obtained by binary arithmetic decoding using a bypass. Also, for example, the first index value includes two bits, where the first bit is obtained by context-adaptive binary arithmetic decoding using a context model.
[0049] For example, the second index value includes M2 bits, N2 bits among the M2 bits are obtained by context-adaptive binary arithmetic decoding using a context model, and the remaining (M2-N2) bits among the M2 bits are obtained by binary arithmetic decoding using a bypass, where M2 is a positive integer equal to or greater than 1, N2 is a positive integer equal to or greater than 1, and M2 is equal to or greater than N2. For example, the second index value includes 4 bits, a first bit is obtained by context-adaptive binary arithmetic decoding using a context model, and second, third, and fourth bits are obtained by binary arithmetic decoding using a bypass. Also, for example, the second index value includes 1 bit, and a first bit is obtained by context-adaptive binary arithmetic decoding using a context model.
[0050] For example, the context model corresponding to the first index value and the context model corresponding to the second index value are the same. Or, the context model corresponding to the first index value and the context model corresponding to the second index value are different. Or, the context model corresponding to the first index value and the first partition information and the context model corresponding to the second index value and the first partition information may be the same, the context model corresponding to the first index value and the second partition information and the context model corresponding to the second index value and the second partition information may be the same, and the context model corresponding to the first index value and the first partition information and the context model corresponding to the first index value and the second partition information may be different. Or, the context model corresponding to the first index value and the first partition information and the context model corresponding to the second index value and the first partition information and the context model corresponding to the first index value and the second partition information may be different from each other. The first partition information indicates that the partition information of the triangular sub-block is a main-diagonal partitioning scheme, and the second partition information indicates that the partition information of the triangular sub-block is a sub-diagonal partitioning scheme.
[0051] For example, obtaining candidate motion information corresponding to a first index value from the motion information list, and determining the obtained candidate motion information corresponding to the first index value as the first target motion information of the first triangular sub-block, When the first index value is an even number and the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list0 as the first target motion information of the first triangle sub-block; When the first index value is an even number and the candidate motion information corresponding to the first index value does not include the unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list1 as the first target motion information of the first triangle sub-block; When the first index value is an odd number and the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list1 as the first target motion information of the first triangle sub-block; When the first index value is an odd number and the candidate motion information corresponding to the first index value does not include the unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list0 as the first target motion information of the first triangle sub-block; may include, but is not limited to:
[0052] For example, obtaining candidate motion information corresponding to a second index value from the motion information list, and determining the obtained candidate motion information corresponding to the second index value as the second target motion information of the second triangular sub-block, When the second index value is an even number and the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list0 as the second target motion information of the second triangle sub-block; When the second index value is an even number and the candidate motion information corresponding to the second index value does not include the unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular sub-block; When the second index value is an odd number and the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list1 as second target motion information of the second triangle sub-block; When the second index value is an odd number and the candidate motion information corresponding to the second index value does not include the unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list0 as the second target motion information of the second triangle sub-block; may include, but is not limited to:
[0053] For example, obtaining candidate motion information corresponding to a first index value from the motion information list, and determining the obtained candidate motion information corresponding to the first index value as the first target motion information of the first triangular sub-block, When the first index value is an odd number and the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list0 as the first target motion information of the first triangle sub-block; When the first index value is an odd number and the candidate motion information corresponding to the first index value does not include the unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list1 as the first target motion information of the first triangle sub-block; When the first index value is an even number and the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list1 as the first target motion information of the first triangle sub-block; When the first index value is an even number and the candidate motion information corresponding to the first index value does not include the unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list0 as the first target motion information of the first triangle sub-block; may include, but is not limited to:
[0054] For example, obtaining candidate motion information corresponding to a second index value from the motion information list, and determining the obtained candidate motion information corresponding to the second index value as the second target motion information of the second triangular sub-block, When the second index value is an odd number and the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list0 as the second target motion information of the second triangle sub-block; When the second index value is an odd number and the candidate motion information corresponding to the second index value does not include the unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list1 as the second target motion information of the second triangle sub-block; When the second index value is an even number and the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list1 as second target motion information of the second triangle sub-block; When the second index value is an even number and the candidate motion information corresponding to the second index value does not include the unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list0 as the second target motion information of the second triangle sub-block; may include, but is not limited to:
[0055] In the above embodiment, if the frame type of the current frame to which the current block belongs is a B frame, the B frame allows inter-prediction blocks pointing to multiple Lists (reference frame lists) to exist simultaneously. For example, an inter-prediction block pointing to list0 and an inter-prediction block pointing to list1 exist simultaneously. Therefore, if the current frame to which the current block belongs is a B frame, the configuration of the reference frame of the current frame to which the current block belongs may include two reference frame lists. These two reference frame lists may be list0 and list1, respectively. The candidate motion information may be unidirectional motion information, such as unidirectional motion information corresponding to list0 or unidirectional motion information corresponding to list1, or may be bidirectional motion information including unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1.
[0056] For example, the decoding side further obtains a first candidate set and a second candidate set. The first candidate set includes a part of the candidate motion information in the motion information list, and the second candidate set includes a part of the candidate motion information in the motion information list, and the candidate motion information in the first candidate set is not completely the same as the candidate motion information in the second candidate set. Then, the decoding side obtains candidate motion information corresponding to a first index value from the first candidate set, and determines the candidate motion information corresponding to the obtained first index value as the first target motion information of the first triangular subblock. The decoding side obtains candidate motion information corresponding to a second index value from the second candidate set, and determines the candidate motion information corresponding to the obtained second index value as the second target motion information of the second triangular subblock.
[0057] In step 204, motion compensation is performed on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and motion compensation is performed on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block.
[0058] As an example, after obtaining first target motion information for a first triangular subblock and second target motion information for a second triangular subblock, for a subblock in the first triangular subblock that uses unweighted prediction compensation, the first target motion information for the subblock is stored, for a subblock in the second triangular subblock that uses unweighted prediction compensation, the second target motion information for the subblock is stored, and for a subblock that uses weighted prediction compensation, the first target motion information, the second target motion information, or the bidirectional motion information for the subblock is stored.
[0059] For a sub-block using weighted prediction compensation, storing the first target motion information, the second target motion information, or the bidirectional motion information for the sub-block includes: storing first target motion information for the sub-block; storing second target motion information for the sub-block; storing first desired motion information or second desired motion information for the sub-block according to a position of the sub-block; storing first target motion information or second target motion information for the sub-block according to a partition direction of the current block; storing first desired motion information or second desired motion information for the sub-block according to a position of the sub-block and a partition direction of the current block; may include, but is not limited to, any one of the following:
[0060] For a sub-block using weighted predictive compensation, storing the first target motion information, the second target motion information, or the bidirectional motion information for the sub-block includes: if the first target motion information and the second target motion information are from different lists, merging the first target motion information and the second target motion information into bidirectional motion information and storing the bidirectional motion information for the subblock; Or, storing the first target motion information for the sub-block if the first target motion information and the second target motion information are from the same list, or storing the second target motion information for the sub-block; may include, but is not limited to:
[0061] For example, when the first target motion information and the second target motion information are from the same list, storing the first target motion information for the sub-block or storing the second target motion information for the sub-block may include: storing first target motion information for the sub-block; storing second target motion information for the sub-block; storing first desired motion information or second desired motion information for the sub-block according to a position of the sub-block; storing first target motion information or second target motion information for the sub-block according to a partition direction of the current block; storing first desired motion information or second desired motion information for the sub-block according to a position of the sub-block and a partition direction of the current block; storing an average value of the first desired motion information and the second desired motion information for the sub-block; storing the first target motion information or the second target motion information for the sub-block according to size information of the current block; may include, but is not limited to, any one of the following:
[0062] As can be seen from the above example, in the embodiment of the present application, if the feature information of the current block satisfies a certain condition, the current block is divided into a first triangular sub-block and a second triangular sub-block, a first target motion information of the first triangular sub-block and a second target motion information of the second triangular sub-block are obtained, motion compensation is performed on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and motion compensation is performed on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block. According to the above embodiment, it is possible to improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residual.
[0063] Example 2 Based on the same idea as the above method, the present embodiment provides an encoding method applied to the encoding side. As shown in Figure 3, Figure 3 is a process diagram of the method. The method may include the following steps:
[0064] In step 301, the encoding side judges whether the feature information of the current block satisfies a certain condition. If the certain condition is met, the triangular prediction mode is enabled, and step 302 is executed. If the certain condition is not met, the triangular prediction mode is disabled, and the technical solution of this embodiment is not adopted.
[0065] In step 302, the encoding side constructs a motion information list for the current block, which includes multiple candidate motion information.
[0066] In step 303, the encoding side partitions the current block into a first triangular sub-block and a second triangular sub-block, for example, partitioning the current block into a first triangular sub-block and a second triangular sub-block along a main diagonal (45 degrees clockwise from horizontal), or partitioning the current block into a first triangular sub-block and a second triangular sub-block along a sub-diagonal (135 degrees clockwise from horizontal).
[0067] In step 304, at the encoding side, a first target motion information of a first triangular sub-block and a second target motion information of a second triangular sub-block are obtained from the motion information list, and the first target motion information and the second target motion information may be different.
[0068] In step 305, the encoding side performs motion compensation on the first triangular sub-block according to the first target motion information to obtain a predicted value of the first triangular sub-block, and performs motion compensation on the second triangular sub-block according to the second target motion information to obtain a predicted value of the second triangular sub-block, where the predicted value of the first triangular sub-block and the predicted value of the second triangular sub-block are predicted values of the current block.
[0069] In step 306, the encoding side stores the motion information of the current block as a reference during encoding of the subsequent blocks.
[0070] Example 3 Based on the same idea as the above method, the present embodiment provides a decoding method applied to the decoding side. As shown in Figure 4, Figure 4 is a process diagram of the method. The method may include the following steps:
[0071] In step 401, the decoding side judges whether the feature information of the current block satisfies a certain condition. If the certain condition is met, the triangular prediction mode is enabled, and step 402 is executed. If the certain condition is not met, the triangular prediction mode is disabled, and the technical solution of this embodiment is not adopted.
[0072] In step 402, the decoding side constructs a motion information list for a current block, which includes multiple candidate motion information.
[0073] In step 403, the decoding side partitions the current block into a first triangular sub-block and a second triangular sub-block, for example, partitions the current block into a first triangular sub-block and a second triangular sub-block along a main diagonal (45 degrees clockwise from horizontal), or partitions the current block into a first triangular sub-block and a second triangular sub-block along a sub-diagonal (135 degrees clockwise from horizontal).
[0074] In step 404, at the decoding side, a first target motion information of a first triangular sub-block and a second target motion information of a second triangular sub-block are obtained from the motion information list, and the first target motion information and the second target motion information may be different.
[0075] In step 405, at the decoding side, motion compensation is performed on the first triangular sub-block according to the first target motion information to obtain a predicted value of the first triangular sub-block, and motion compensation is performed on the second triangular sub-block according to the second target motion information to obtain a predicted value of the second triangular sub-block, where the predicted value of the first triangular sub-block and the predicted value of the second triangular sub-block are predicted values of the current block.
[0076] In step 406, the decoder stores the motion information of the current block as a reference when encoding subsequent blocks.
[0077] Example 4 In step 301 and step 401, the encoding side / decoding side needs to determine whether the feature information of the current block satisfies a certain condition. If the certain condition is met, enable the triangular prediction mode, i.e., partition the current block into a first triangular sub-block and a second triangular sub-block. If the certain condition is not met, disable the triangular prediction mode. For example, the feature information may include, but is not limited to, one or more of motion information mode, size information, frame type, and sequence level switch control information.
[0078] Below, we will refer to several specific application scenarios to illustrate how the feature information of the current block satisfies certain conditions.
[0079] Application scenario 1: It is determined that the feature information of the current block satisfies a specific condition if the feature information satisfies the following condition:
[0080] The motion information mode of the current block is a merge mode or a skip mode, and the motion information mode of the current block is not another type of merge submode or skip submode other than the triangular prediction submode.
[0081] Application scenario 2: It is determined that the feature information of the current block satisfies a specific condition when the feature information simultaneously satisfies at least the following conditions:
[0082] The sequence level switch control information allows the current block to use a triangular prediction mode, i.e., the sequence level control allows the triangular prediction mode to be enabled, i.e., turning on the sequence level control switch indicates that the current block is allowed to use the triangular prediction mode; The current frame to which the current block belongs is a B frame, that is, the current frame allows two reference frame lists to exist; The area (width * height) of the current block is N*N or more, where N can be 8. The motion information mode of the current block is merge mode or skip mode, Includes.
[0083] Application scenario 3: It is determined that the feature information of the current block satisfies a specific condition when the feature information simultaneously satisfies at least the following conditions:
[0084] The sequence level switch control information allows the current block to use a triangular prediction mode, i.e., the sequence level control allows the triangular prediction mode to be enabled, i.e., turning on the sequence level control switch indicates that the current block is allowed to use the triangular prediction mode; The current frame to which the current block belongs is a B frame, that is, the current frame allows two reference frame lists to exist; The area (width * height) of the current block is greater than or equal to N * N, where N can be 8. The motion information mode of the current block is a merge mode, and the motion information mode of the current block is not one of a normal merge submode, an MMVD submode, an SB merge submode, and a CIIP submode; The motion information mode of the current block is a skip mode, and the motion information mode of the current block is not one of a normal merge submode, an MMVD submode, and an SB merge submode; Includes.
[0085] Application scenario 4: It is determined that the feature information of the current block satisfies a specific condition when the feature information simultaneously satisfies at least the following conditions:
[0086] The sequence level switch control information is to allow the current block to use triangular prediction mode, i.e., the sequence level control allows the triangular prediction mode to be enabled, i.e., turning on the sequence level control switch indicates that the current block is allowed to use triangular prediction mode; The current frame to which the current block belongs is a B frame, that is, the current frame allows two reference frame lists to exist; The motion information mode of the current block is merge mode or skip mode, The area (width * height) of the current block is greater than or equal to N * N, where N can be 8. The width of the current block is equal to or less than M, and the height of the current block is equal to or less than M, where M may be 128; Includes.
[0087] Application scenario 5: It is determined that the feature information of the current block satisfies a specific condition when the feature information simultaneously satisfies at least the following conditions:
[0088] The sequence level switch control information is to allow the current block to use triangular prediction mode, i.e., the sequence level control allows the triangular prediction mode to be enabled, i.e., turning on the sequence level control switch indicates that the current block is allowed to use triangular prediction mode; The current frame to which the current block belongs is a B frame, that is, the current frame allows two reference frame lists to exist; The motion information mode of the current block is merge mode or skip mode, The area (width * height) of the current block is greater than or equal to N * N, where N can be 8. The area (width * height) of the current block is less than or equal to M * M, where M can be 128. Includes.
[0089] Application scenario 6: It is determined that the feature information of the current block satisfies a specific condition when the feature information simultaneously satisfies at least the following conditions: The sequence level switch control information is to allow the current block to use triangular prediction mode, i.e., the sequence level control allows the triangular prediction mode to be enabled, i.e., turning on the sequence level control switch indicates that the current block is allowed to use triangular prediction mode; The current frame to which the current block belongs is a B frame, that is, the current frame allows two reference frame lists to exist; The motion information mode of the current block is merge mode or skip mode, The width value of the current block is in the range of [Wmin, Wmax]. For example, Wmin and Wmax may be positive integer powers of 2, for example, Wmin is 4 and Wmax is 128; The height value of the current block is in the range of [Hmin, Hmax], where Hmin and Hmax are both positive integer powers of 2, for example, Hmin is 4 and Hmax is 128; The area value of the current block is within the range of [Smin, Smax]. For example, Smin and Smax may be positive integer powers of 2, for example, Smin is 64 and Smax is 128*128=16384; Includes.
[0090] In the above embodiment, [a, b] indicates that it is equal to or greater than a and equal to or less than b.
[0091] Application scenario 7: For any one of application scenarios 2 to 6, "the current frame to which the current block belongs is a B frame" is changed to "the current frame to which the current block belongs allows intra block copy," and other restrictive conditions remain unchanged. "The current frame to which the current block belongs allows intra block copy" means that the current block searches for a similar block in the decoded reconstructed blocks of the current frame (not the decoded reconstructed blocks of other frames), and this condition does not require that the current frame to which the current block belongs is a B frame.
[0092] Application scenario 8: If both the height and width values of the current block are CTU_Size, the triangular prediction mode is disabled, that is, the feature information does not meet a specific condition. If the height value of the current block is smaller than CTU_Size, or if the width value of the current block is smaller than CTU_Size, one of application scenarios 1 to 7 is adopted to determine whether to enable the triangular prediction mode.
[0093] As an example, CTU_Size is the maximum size allowed by the current block, which may be 128 or some other value.
[0094] Application scenario 9: If the height or width of the current block is equal to CTU_Size, the triangular prediction mode is disabled, that is, the feature information does not meet a specific condition. If the height or width of the current block is smaller than CTU_Size and the width of the current block is smaller than CTU_Size, one of application scenarios 1 to 7 is adopted to determine whether to enable the triangular prediction mode.
[0095] As an example, CTU_Size is the maximum size allowed by the current block, which may be 128 or some other value.
[0096] Example 5 In step 302 and step 402, the encoding side / decoding side needs to construct a motion information list for the current block, which includes multiple candidate motion information. The process of constructing the motion information list is described below.
[0097] Aspect 1: At the encoding side / decoding side, a motion information list is configured to include multiple candidate motion information, for example, but not limited to, 5 candidate motion information. For example, a candidate block corresponding to a current block is obtained, and the motion information of the candidate block is added to the motion information list, and each motion information in the motion information list may be called a candidate motion information.
[0098] As for the candidate block corresponding to the current block, as shown in FIG. 5A, the blocks at seven positions are used as the candidate blocks corresponding to the current block. In FIG. 5A, block 1, block 2, block 3, block 4, and block 5 are candidate blocks in the current frame, while block 6 and block 7 are candidate blocks in other frames (i.e., blocks corresponding to the time domain). First, the available motion information at these seven positions is collected and arranged in the order of unidirectional motion information, L0 motion information of bidirectional prediction, L1 motion information of bidirectional prediction, and the average value of L0 motion information and L1 motion information of bidirectional prediction. Then, the top five arranged motion information are added to the motion information list. If the quantity of motion information added to the motion information list is 5 or less, it may be supplemented with a zero motion vector. In the above supplement process, a duplication check may be performed to avoid the existence of duplicate motion information in the motion information list.
[0099] Aspect 2: At the encoding side / decoding side, a motion information list is configured for the current block by reusing the motion information list configuration method of the normal merge mode. For example, a motion information list configuration method of the normal merge mode is determined, and a motion information list including multiple candidate motion information is configured for the current block based on the motion information list configuration method of the normal merge mode. That is, the motion information list configuration method of the triangular prediction mode is the same as the motion information list configuration method of the normal merge mode.
[0100] For example, as shown in FIG. 5B, the motion information list configuration method of the normal merge mode is that the candidate block corresponding to the current block includes block A1, block A0, block B0, block B1, and block B2, and the available motion information at these five positions is collected, and the collected available motion information is arranged in the order of block A1, block A0, block B0, block B1, and block B2, and the arranged top multiple motion information (e.g., top five motion information) is supplemented to the motion information list. The motion information list configuration method of the triangular prediction mode is that the available motion information at these five positions is collected, and the collected available motion information is arranged in the order of block A1, block A0, block B0, block B1, and block B2, and the arranged top multiple motion information (e.g., top five motion information) is supplemented to the motion information list. Of course, the above method is an example of how the normal merge mode configures a motion information list, and is not limited.
[0101] Example 6 In step 303 and step 403, the current block needs to be divided into a first triangular sub-block and a second triangular sub-block at the encoding side / decoding side. For example, the current block may be divided into a first triangular sub-block and a second triangular sub-block along a main diagonal (45 degrees clockwise from the horizontal) as shown in Fig. 6A, or the current block may be divided into a first triangular sub-block and a second triangular sub-block along a sub-diagonal (135 degrees clockwise from the horizontal) as shown in Fig. 6B.
[0102] In order to partition the current block into a first triangular sub-block and a second triangular sub-block, the following manner may be adopted.
[0103] Aspect 1: On the encoding side, the protocol partitions the current block using the main diagonal method by default, while on the decoding side, the protocol partitions the current block using the main diagonal method by default. Based on this, as shown in Figure 6A, on the encoding side, the current block is partitioned into a first triangular sub-block and a second triangular sub-block using the main diagonal method (angle rotated 45 degrees clockwise from the horizontal), while on the decoding side, the current block is partitioned into a first triangular sub-block and a second triangular sub-block using the main diagonal method.
[0104] Aspect 2: On the encoding side, the protocol partitions the current block using subdiagonal method by default, while on the decoding side, the protocol partitions the current block using subdiagonal method by default. Based on this, as shown in Figure 6B, on the encoding side, the current block is partitioned into a first triangular sub-block and a second triangular sub-block using subdiagonal method (angle rotated 135 degrees clockwise from horizontal), while on the decoding side, the current block is partitioned into a first triangular sub-block and a second triangular sub-block using subdiagonal method.
[0105] Aspect 3: The encoding side determines the rate-distortion cost 1 corresponding to the partitioning method by the main diagonal line and the rate-distortion cost 2 corresponding to the partitioning method by the sub-diagonal line, and the method of determining the rate-distortion cost 1 and the rate-distortion cost 2 is not limited. If the rate-distortion cost 1 is smaller than the rate-distortion cost 2, the encoding side partitions the current block into a first triangular sub-block and a second triangular sub-block by the main diagonal line method, as shown in Figure 6A. Or, if the rate-distortion cost 1 is larger than the rate-distortion cost 2, the encoding side partitions the current block into a first triangular sub-block and a second triangular sub-block by the sub-diagonal line method, as shown in Figure 6B. Of course, the encoding side may partition the triangular sub-blocks by the main diagonal line method or the sub-diagonal line method according to other measures or decisions, but is not limited thereto.
[0106] When transmitting an encoded bitstream from the encoding side to the decoding side, the encoded bitstream may include first indication information to indicate partition information of a triangular subblock, such as a partition scheme by a main diagonal or a partition scheme by a sub-diagonal.
[0107] For example, when the encoding side partitions the current block into a first triangular sub-block and a second triangular sub-block using the main diagonal method, the partition information of the triangular sub-block is the partition method by the main diagonal.When the encoding side partitions the current block into a first triangular sub-block and a second triangular sub-block using the subdiagonal method, the partition information of the triangular sub-block is the partition method by the subdiagonal.
[0108] After receiving the coded bitstream, the decoding side obtains first indication information from the coded bitstream to indicate partition information of the triangular sub-block, such as partition manner by main diagonal or partition manner by sub-diagonal. If the partition information of the triangular sub-block is partition manner by main diagonal, the decoding side partitions the current block into a first triangular sub-block and a second triangular sub-block along the main diagonal of the current block, as shown in Fig. 6A. If the partition information of the triangular sub-block is partition manner by sub-diagonal, the decoding side partitions the current block into a first triangular sub-block and a second triangular sub-block along the sub-diagonal of the current block, as shown in Fig. 6B.
[0109] Of course, the above three aspects are merely examples, and the partitioning method of the triangular subblocks is not limited.
[0110] Example 7 In the above embodiment 6, when transmitting an encoded bitstream from the encoding side to the decoding side, the encoded bitstream may include first indication information for indicating partition information of a triangular subblock, for example, one flag bit indicates partition information of a triangular subblock. For example, if the flag bit has a first tag of 0, it indicates that the partition information of the triangular subblock is a partition scheme based on a main diagonal. If the flag bit has a second tag of 1, it indicates that the partition information of the triangular subblock is a partition scheme based on a sub-diagonal.
[0111] As an example, for the partition information of a triangular sub-block, the encoding side encodes the first indication information by the CABAC scheme. Of course, the CABAC scheme is merely an example, and the encoding scheme is not limited. The CABAC scheme has two modes: a CABAC mode (hereinafter referred to as context-adaptive binary arithmetic coding) that needs to store and update at least one context model, and a CABAC mode by bypass (hereinafter referred to as binary arithmetic coding by bypass) that does not need to store and update a context model. Moreover, the first indication information (e.g., a flag bit of the partition information of the triangular sub-block) is encoded by the binary arithmetic coding by bypass, or the first indication information is encoded by the context-adaptive binary arithmetic coding scheme, i.e., the first indication information is encoded by the context-adaptive binary arithmetic coding scheme by a context model.
[0112] When the encoding side encodes the first indication information by the CABAC method, the decoding side decodes the first indication information by the CABAC method. For example, when the encoding side encodes the first indication information by the bypass binary arithmetic coding method, the decoding side decodes the first indication information by the bypass binary arithmetic decoding method to obtain the partition information of the triangular subblock. Or, when the encoding side encodes the first indication information by the context-adaptive binary arithmetic coding method, the decoding side decodes the first indication information by the context-adaptive binary arithmetic decoding method to obtain the partition information of the triangular subblock. That is, the first indication information is decoded by the context-adaptive binary arithmetic decoding method by the context model to obtain the partition information of the triangular subblock.
[0113] As described above, after the first indication information is decoded, the partition information of the triangular sub-block can be obtained, for example, a flag bit indicating the partition information of the triangular sub-block. If the flag bit is a first tag 0, it indicates that the partition information of the triangular sub-block is a partition scheme by a main diagonal line. If the flag bit is a second tag 1, it indicates that the partition information of the triangular sub-block is a partition scheme by a sub-diagonal line.
[0114] As described above, the decoding side can decode the flag bits of the partition information of the triangular sub-blocks and perform entropy decoding, for example, by CABAC using a bypass mode, i.e., there is no need to store and update the context model, or decode the flag bits of the partition information of the triangular sub-blocks and perform entropy decoding, for example, by CABAC using a mode including the context model.
[0115] Example 8 In step 304 and step 404, the encoding side / decoding side obtains the first target motion information of the first triangular sub-block and the second target motion information of the second triangular sub-block from the motion information list, and the first target motion information and the second target motion information can be different. The process of obtaining the first target motion information and the second target motion information is described below.
[0116] Aspect 1: On the encoding side, the first target motion information is set as a default by a protocol. For example, on the encoding side, the first candidate motion information in the motion information list is set as a default to be the first target motion information of the first triangular subblock. On the other hand, on the decoding side, the first target motion information is set as a default by a protocol. For example, on the decoding side, the first candidate motion information in the motion information list is set as a default to be the first target motion information of the first triangular subblock. On the encoding side, the second target motion information is set as a default by a protocol. For example, on the encoding side, the second candidate motion information in the motion information list is set as a default to be the second target motion information of the second triangular subblock. On the decoding side, the second target motion information is set as a default by a protocol. For example, on the decoding side, the second candidate motion information in the motion information list is set as a default to be the second target motion information of the second triangular subblock.
[0117] Aspect 2: The encoding side determines the rate-distortion cost corresponding to each candidate motion information in the motion information list, and the candidate motion information corresponding to the minimum rate-distortion cost is the first target motion information of the first triangular subblock, but this determination method is not limited. The encoding side excludes the first target motion information from the motion information list (i.e., does not select the first target motion information in the motion information list), and determines the rate-distortion cost corresponding to each other candidate motion information in the motion information list (i.e., each other candidate motion information after excluding the first target motion information), and the candidate motion information corresponding to the minimum rate-distortion cost is the second target motion information of the second triangular subblock. Of course, the encoding side may determine the first target motion information of the first triangular subblock and the second target motion information of the second triangular subblock by other measures, but is not limited thereto.
[0118] When transmitting an encoded bitstream from the encoding side to the decoding side, the encoded bitstream may include second indication information, which is used to indicate a first index value of a first target motion information in the motion information list (used to indicate which candidate motion information in the motion information list the first target motion information is) and a second index value of a second target motion information in the motion information list (used to indicate which candidate motion information in the motion information list the second target motion information is).
[0119] After receiving the encoded bitstream, the decoding side obtains second indication information from the encoded bitstream, and the second indication information is used to indicate a first index value of a first target motion information in a motion information list (used to indicate which candidate motion information in the motion information list the first target motion information is) and a second index value of a second target motion information in a motion information list (used to indicate which candidate motion information in the motion information list the second target motion information is). Based on the first index value indicated by the second indication information, the decoding side obtains candidate motion information corresponding to the first index value from the motion information list, and determines the candidate motion information corresponding to the obtained first index value as the first target motion information of the first triangular subblock. Based on the second index value indicated by the second indication information, the decoding side obtains candidate motion information corresponding to the second index value from the motion information list, and determines the candidate motion information corresponding to the obtained second index value as the second target motion information of the second triangular subblock.
[0120] Example 9 In the above Example 8, the encoding side / decoding side can determine which unidirectional motion information the first target motion information of the first triangular sub-block will use based on the parity of the first index value, and the encoding side / decoding side can determine which unidirectional motion information the second target motion information of the second triangular sub-block will use based on the parity of the second index value.
[0121] On the decoding side, after obtaining a first index value (indicating the index value of the first target motion information in the motion information list) from the encoded bitstream, if the first index value is an even number, determine whether the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block.
[0122] For example, the decoding side obtains candidate motion information corresponding to a first index value from a motion information list. If the first index value is an even number, and the candidate motion information corresponding to the first index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular subblock. If the first index value is an even number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular subblock. If the first index value is an even number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular subblock.
[0123] On the decoding side, after obtaining a first index value (indicating the index value of the first target motion information in the motion information list) from the encoded bitstream, if the first index value is an odd number, determine whether the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block.
[0124] For example, the decoding side obtains candidate motion information corresponding to a first index value from a motion information list. If the first index value is an odd number, and the candidate motion information corresponding to the first index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular subblock. If the first index value is an odd number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular subblock. If the first index value is an odd number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular subblock.
[0125] On the decoding side, after obtaining a second index value (indicating the index value of the second target motion information in the motion information list) from the encoded bitstream, if the second index value is an even number, it is determined whether the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, the unidirectional motion information corresponding to list0 is determined as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list0, the unidirectional motion information corresponding to list1 is determined as the second target motion information of the second triangular sub-block.
[0126] For example, the decoding side obtains candidate motion information corresponding to a second index value from the motion information list. If the second index value is an even number, and the candidate motion information corresponding to the second index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular subblock. If the second index value is an even number, and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular subblock. If the second index value is an even number, and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular subblock.
[0127] On the decoding side, after obtaining a second index value (indicating the index value of the second target motion information in the motion information list) from the encoded bitstream, if the second index value is an odd number, it is determined whether the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, the unidirectional motion information corresponding to list1 is determined as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list1, the unidirectional motion information corresponding to list0 is determined as the second target motion information of the second triangular sub-block.
[0128] For example, the decoding side obtains candidate motion information corresponding to a second index value from the motion information list. If the second index value is an even number and the candidate motion information corresponding to the second index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular subblock. If the second index value is an odd number and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular subblock. If the second index value is an odd number and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular subblock.
[0129] In the encoding side, when determining the first target motion information of the first triangular sub-block, the candidate motion information (hereinafter referred to as A1) corresponding to the minimum rate-distortion cost is selected from the motion information list, and then the first index, which is the index value of the complementary motion information A1 in the candidate motion information list, is determined. a first index value indicating the position of the candidate motion information A1 in the motion information list;
[0130] If the first index value is an even number, the encoding side determines whether the candidate motion information A1 includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block.
[0131] If the first index value is an odd number, the encoding side determines whether the candidate motion information A1 includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block.
[0132] On the encoding side, when determining the second target motion information of the second triangular subblock, a candidate motion information (hereinafter referred to as A2) corresponding to the minimum rate-distortion cost is selected from the motion information list, and then a second index value, which is the index value of the complementary motion information A2 in the candidate motion information list, is determined, and the second index value indicates the position of the candidate motion information A2 in the motion information list.
[0133] If the second index value is an even number, the encoding side determines whether the candidate motion information A2 includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular sub-block.
[0134] If the second index value is an odd number, the encoding side determines whether the candidate motion information A2 includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular sub-block.
[0135] As described above, as shown in FIG. 7A, when the first index value / second index value is an even number, if unidirectional motion information corresponding to list0 exists in the candidate motion information corresponding to the first index value / second index value, the unidirectional motion information corresponding to list0 is set as the target motion information, but if unidirectional motion information corresponding to list0 does not exist in the candidate motion information corresponding to the first index value / second index value, the unidirectional motion information corresponding to list1 is set as the target motion information. When the first index value / second index value is an odd number, if unidirectional motion information corresponding to list1 exists in the candidate motion information corresponding to the first index value / second index value, the unidirectional motion information corresponding to list1 is set as the target motion information, but if unidirectional motion information corresponding to list1 does not exist in the candidate motion information corresponding to the first index value / second index value, the unidirectional motion information corresponding to list0 is set as the target motion information.
[0136] In the above example, the first index value may be candIdx1, and the second index value may be candIdx2.
[0137] For example, if the frame type of the current frame to which the current block belongs is a B frame, the B frame allows inter-prediction blocks pointing to multiple Lists (reference frame lists) to exist simultaneously, for example, an inter-prediction block pointing to list0 and an inter-prediction block pointing to list1 exist simultaneously. Therefore, if the current frame to which the current block belongs is a B frame, the reference frame configuration of the current frame to which the current block belongs may include two reference frame lists. These two reference frame lists may be list0 and list1, respectively. As described above, the candidate motion information may be unidirectional motion information such as unidirectional motion information corresponding to list0 or unidirectional motion information corresponding to list1, or may be bidirectional motion information including unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1.
[0138] Example 10 In the above Example 8, the encoding side / decoding side may determine which unidirectional motion information the first target motion information of the first triangular sub-block will use based on the parity of the first index value, and the encoding side / decoding side may determine which unidirectional motion information the second target motion information of the second triangular sub-block will use based on the parity of the second index value.
[0139] On the decoding side, after obtaining a first index value (indicating the index value of the first target motion information in the motion information list) from the encoded bitstream, if the first index value is an odd number, determine whether the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block.
[0140] For example, the decoding side obtains candidate motion information corresponding to a first index value from a motion information list. If the first index value is an odd number, and the candidate motion information corresponding to the first index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular subblock. If the first index value is an odd number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular subblock. If the first index value is an odd number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular subblock.
[0141] On the decoding side, after obtaining a first index value (indicating the index value of the first target motion information in the motion information list) from the encoded bitstream, if the first index value is an even number, determine whether the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block.
[0142] For example, the decoding side obtains candidate motion information corresponding to a first index value from a motion information list. If the first index value is an even number, and the candidate motion information corresponding to the first index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular subblock. If the first index value is an even number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular subblock. If the first index value is an even number, and the candidate motion information corresponding to the first index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular subblock.
[0143] On the decoding side, after obtaining a second index value (indicating the index value of the second target motion information in the motion information list) from the encoded bitstream, if the second index value is an odd number, determine whether the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular sub-block.
[0144] For example, the decoding side obtains candidate motion information corresponding to a second index value from the motion information list. If the second index value is an odd number, and the candidate motion information corresponding to the second index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular subblock. If the second index value is an odd number, and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular subblock. If the second index value is an odd number, and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular subblock.
[0145] On the decoding side, after obtaining a second index value (indicating the index value of the second target motion information in the motion information list) from the encoded bitstream, if the second index value is an even number, it is determined whether the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, the unidirectional motion information corresponding to list1 is determined as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list1, the unidirectional motion information corresponding to list0 is determined as the second target motion information of the second triangular sub-block.
[0146] For example, the decoding side obtains candidate motion information corresponding to a second index value from the motion information list. If the second index value is an even number, and the candidate motion information corresponding to the second index value is bidirectional motion information, and the bidirectional motion information includes unidirectional motion information corresponding to list0 and unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular subblock. If the second index value is an even number, and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular subblock. If the second index value is an even number, and the candidate motion information corresponding to the second index value is unidirectional motion information, and the unidirectional motion information is unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular subblock.
[0147] On the encoding side, when determining the first target motion information of the first triangular subblock, a candidate motion information (hereinafter referred to as A1) corresponding to the minimum rate-distortion cost is selected from the motion information list, and then a first index value, which is the index value of the candidate motion information A1 in the candidate motion information list, is determined, and the first index value indicates the position of the candidate motion information A1 in the motion information list.
[0148] If the first index value is an odd number, the encoding side determines whether the candidate motion information A1 includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block.
[0149] If the first index value is an even number, the encoding side determines whether the candidate motion information A1 includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list1 as the first target motion information of the first triangular sub-block. If it does not include unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list0 as the first target motion information of the first triangular sub-block.
[0150] On the encoding side, when determining the second target motion information of the second triangular subblock, a candidate motion information (hereinafter referred to as A2) corresponding to the minimum rate-distortion cost is selected from the motion information list, and then a second index value, which is the index value of the complementary motion information A2 in the candidate motion information list, is determined, and the second index value indicates the position of the candidate motion information A2 in the motion information list.
[0151] If the second index value is an odd number, the encoding side determines whether the candidate motion information A2 includes unidirectional motion information corresponding to list0. If it includes unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list0, the encoding side determines the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular sub-block.
[0152] If the second index value is an even number, the encoding side determines whether the candidate motion information A2 includes unidirectional motion information corresponding to list1. If it includes unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list1 as the second target motion information of the second triangular sub-block. If it does not include unidirectional motion information corresponding to list1, the encoding side determines the unidirectional motion information corresponding to list0 as the second target motion information of the second triangular sub-block.
[0153] Example 11 In the above-mentioned embodiment 8, the encoding side / decoding side may obtain a first candidate set and a second candidate set according to the motion information list. For example, the first candidate set may include a part of the candidate motion information in the motion information list, the second candidate set may include a part of the candidate motion information in the motion information list, and the candidate motion information in the first candidate set and the candidate motion information in the second candidate set are not completely the same.
[0154] From the encoding side, the encoding side determines the rate-distortion cost corresponding to each candidate motion information in the first candidate set, and the candidate motion information corresponding to the minimum rate-distortion cost is the first target motion information of the first triangular sub-block.Then, the encoding side excludes the first target motion information from the second candidate set, and determines the rate-distortion cost corresponding to each other candidate motion information in the second candidate set (i.e., each other candidate motion information after excluding the first target motion information), and the candidate motion information corresponding to the minimum rate-distortion cost is the second target motion information of the second triangular sub-block.
[0155] When transmitting an encoded bitstream from the encoding side to the decoding side, the encoded bitstream may include second instruction information, which is used to indicate a first index value of a first target motion information in a first candidate set (to indicate which candidate motion information in the first candidate set the first target motion information is) and a second index value of a second target motion information in a second candidate set (to indicate which candidate motion information in the second candidate set the second target motion information is).
[0156] From the decoding side, after receiving the encoded bitstream at the decoding side, the decoding side may obtain second indication information from the encoded bitstream, and the second indication information is used to indicate a first index value of the first target motion information in the first candidate set and a second index value of the second target motion information in the second candidate set. According to the first index value indicated by the second indication information, the decoding side obtains candidate motion information corresponding to the first index value from the first candidate set, and determines the candidate motion information corresponding to the obtained first index value as the first target motion information of the first triangle sub-block. Also, according to the second index value indicated by the second indication information, the decoding side obtains candidate motion information corresponding to the second index value from the second candidate set, and determines the candidate motion information corresponding to the obtained second index value as the second target motion information of the second triangle sub-block.
[0157] Example 12 As shown in Figure 7B, Figure 7B is a schematic diagram of the partitioning of a triangular sub-block when splitDir = 0, where splitDir is a flag bit for the partition direction and indicates the partition information of the triangular sub-block, where splitDir = 0 indicates that the current block is partitioned into a first triangular sub-block and a second triangular sub-block along the main diagonal (an angle rotated 45 degrees clockwise from the horizontal), and the motion information list includes motion information of block A1, motion information of block B1, motion information of block B0, motion information of block A0, and motion information of block B2.
[0158] For example, the order of the motion information in the motion information list may be the motion information of block A1, the motion information of block B1, the motion information of block B0, the motion information of block A0, and the motion information of block B2. If the motion information of block A1 is available, the motion information of block A1 is added to the motion information list according to the above order. If the motion information of block A1 is unavailable, the motion information of block A1 is not added to the motion information list. If the motion information of block B1 is available, the motion information of block B1 is added to the motion information list according to the above order. If the motion information of block B1 is unavailable, the motion information of block B1 is not added to the motion information list. The same applies to other cases. In practical applications, other types of motion information, such as, for example, time domain motion information, etc., may be inserted between the motion information of block B0 and the motion information of block A0, but are not limited thereto.
[0159] For the first triangular sub-block at the top, the motion information of block A1 and the motion information of block A0 are highly likely not to be selected. Suppose that in the motion information list, the index value of the motion information of block A1 is 0, the index value of the motion information of block B0 is 1, the index value of the motion information of block B1 is 2, the index value of the motion information of block A0 is 3, and the index value of the motion information of block B2 is 4, and the first candidate set includes the motion information of block B0, the motion information of block B1, and the motion information of block B2.
[0160] On the encoding side, the first index value "0" is used to encode the motion information of block B0, indicating that the first candidate motion information in the first candidate set is also the second candidate motion information in the motion information list. That is, the first index value "0" corresponds to the index value 1 in the motion information list. On the encoding side, the first index value "10" is used to encode the motion information of block B1, indicating that the second candidate motion information in the first candidate set is also the third candidate motion information in the motion information list. That is, the first index value "10" corresponds to the index value 2 in the motion information list. On the encoding side, the first index value "11" is used to encode the motion information of block B2, indicating that the third candidate motion information in the first candidate set is also the fifth candidate motion information in the motion information list. That is, the first index value "11" corresponds to the index value 4 in the motion information list.
[0161] After obtaining the first index value from the encoded bitstream, the decoding side determines the first candidate motion information in the first candidate set (i.e., the second candidate motion information in the motion information list) as the first target motion information of the first triangular subblock if the first index value is "0". If the first index value is "10", the decoding side determines the second candidate motion information in the first candidate set (i.e., the third candidate motion information in the motion information list) as the first target motion information of the first triangular subblock. If the first index value is "11", the decoding side determines the third candidate motion information in the first candidate set (i.e., the fifth candidate motion information in the motion information list) as the first target motion information of the first triangular subblock.
[0162] For the second triangular sub-block at the bottom, the motion information of block B1 and the motion information of block B0 are highly likely not to be selected. Suppose that in the motion information list, the index value of the motion information of block A1 is 0, the index value of the motion information of block B0 is 1, the index value of the motion information of block B1 is 2, the index value of the motion information of block A0 is 3, and the index value of the motion information of block B2 is 4, and the second candidate set includes the motion information of block A0, the motion information of block A1, and the motion information of block B2.
[0163] The encoding side encodes the motion information of block A1 with the second index value "0", which indicates that the first candidate motion information in the second candidate set is also the first candidate motion information in the motion information list. That is, the second index value "0" corresponds to the index value 0 in the motion information list. The encoding side encodes the motion information of block A0 with the second index value "10", which indicates that the second candidate motion information in the second candidate set is also the fourth candidate motion information in the motion information list. That is, the second index value "10" corresponds to the index value 3 in the motion information list. The encoding side encodes the motion information of block B2 with the second index value "11", which indicates that the third candidate motion information in the second candidate set is also the fifth candidate motion information in the motion information list. That is, the second index value "11" corresponds to the index value 4 in the motion information list.
[0164] After obtaining the second index value from the encoded bitstream, the decoding side determines the first candidate motion information in the second candidate set (i.e., the first candidate motion information in the motion information list) as the second target motion information of the second triangular subblock if the second index value is "0". If the second index value is "10", the decoding side determines the second candidate motion information in the second candidate set (i.e., the fourth candidate motion information in the motion information list) as the second target motion information of the second triangular subblock. If the second index value is "11", the decoding side determines the third candidate motion information in the second candidate set (i.e., the fifth candidate motion information in the motion information list) as the second target motion information of the second triangular subblock.
[0165] For example, because the second target motion information is different from the first target motion information, i.e., the second index value and the first index value cannot correspond to the same candidate motion information in the motion information list, when the first target motion information is the motion information of block B2, i.e., the first index value is "11", the second candidate set includes the motion information of block A0 and the motion information of block A1.
[0166] The encoding side encodes the motion information of block A1 with the second index value "0", which indicates that the first candidate motion information in the second candidate set is also the first candidate motion information in the motion information list. The encoding side encodes the motion information of block A0 with the second index value "1", which indicates that the second candidate motion information in the second candidate set is also the fourth candidate motion information in the motion information list. The decoding side, after obtaining the second index value from the encoded bitstream, if the second index value is "0", the first candidate motion information in the second candidate set (i.e., the first candidate motion information in the motion information list) is taken as the second target motion information of the second triangular sub-block. If the second index value is "1", the second candidate motion information in the second candidate set (i.e., the fourth candidate motion information in the motion information list) is taken as the second target motion information of the second triangular sub-block.
[0167] For example, if the first target motion information is not the motion information of block B2, the second candidate set includes the motion information of block A0, the motion information of block A1, and the motion information of block B2. The codec method can be referred to in the above embodiment, and the description is omitted here.
[0168] As described above, when the first index value (candIdx1) is 11, that is, corresponds to the index value 4 of the motion information list, the second index value (candIdx2) has two possibilities, that is, index value 0 and index value 3, so the encoding side encodes the motion information corresponding to index value 0 (i.e., the first candidate motion information in the motion information list) by the second index value "0", and encodes the motion information corresponding to encoding index value 3 (i.e., the fourth candidate motion information in the motion information list) by the second index value "1". When the first index value (candIdx1) is not 11, that is, does not correspond to index value 4 of the motion information list, the process of decoding the second index value may refer to Table 1. In this case, since the second index value (candIdx2) has three possibilities, index value 0, index value 3, and index value 4, the encoding side encodes the motion information corresponding to index value 0 using the second index value "0", encodes the motion information corresponding to index value 3 using the second index value "10", and encodes the motion information corresponding to index value 4 using the second index value "11".
[0169] [Table 1]
[0170] For example, in another possible embodiment, the first index value (candIdx1) may be restricted to correspond to index values 1 and 2, i.e. the first index value corresponds to the motion information of block B0 (index value is 1) or the motion information of block B1 (index value is 2). That is, the first index value (candIdx1) needs to be encoded by only one bit. For example, the index value 1 is encoded by 0, and the index value 2 is encoded by 1. The second index value (candIdx2) may correspond to index values 0, 3, 4, i.e. the second index value corresponds to the motion information of block A1 (index value is 0), the motion information of block A0 (index value is 3), and the motion information of block B2 (index value is 4). It is obvious that the motion information corresponding to the second index value is different from the motion information corresponding to the first index value. Based on this, these three index values are encoded by 0, 10, and 11. For example, encode index value 0 by 0, encode index value 3 by 10, and encode index value 4 by 11. The above form reduces reliance on analysis since it does not require the process to depend on the first index value to decode.
[0171] For example, in another possible embodiment, the first index value (candIdx1) may be limited to correspond to index values 1, 2, 4, i.e., the first index value corresponds to the motion information of block B0 (index value is 1), the motion information of block B1 (index value is 2), and the motion information of block B2 (index value is 4). That is, the first index value (candIdx1) may be encoded by 0, 10, 11. For example, the index value 1 is encoded by 0, the index value 2 is encoded by 10, and the index value 4 is encoded by 11. The second index value (candIdx2) may be limited to correspond to index values 0, 3, i.e., the second index value corresponds to the motion information of block A1 (index value is 0) and the motion information of block A0 (index value is 3). It is obvious that the motion information corresponding to the second index value is different from the motion information corresponding to the first index value. Based on this, the two index values may be coded by 0 and 1, for example coding index value 0 by 0 and index value 3 by 1. The above embodiment reduces reliance on analysis as it does not require the decoding process to depend on the first index value.
[0172] Example 13 As shown in Figure 7C, Figure 7C is a schematic diagram of the partitioning of a triangular sub-block when splitDir=1, where splitDir is a flag bit for the partition direction and indicates the partition information of the triangular sub-block, where splitDir=1 indicates that the current block is partitioned into a first triangular sub-block and a second triangular sub-block on the sub-diagonal (an angle rotated 135 degrees clockwise from the horizontal), and the motion information list includes motion information of block A1, motion information of block B1, motion information of block B0, motion information of block A0, and motion information of block B2.
[0173] For the first triangular sub-block on the top, there is no need to configure a first candidate set for the first triangular sub-block, and the encoding / decoding side can directly select the first target motion information from the motion information list, and the selection process is not described here.
[0174] For the second triangular sub-block at the bottom, the motion information of block B2 is likely not to be selected. Suppose that in the motion information list, the index value of the motion information of block A1 is 0, the index value of the motion information of block B0 is 1, the index value of the motion information of block B1 is 2, the index value of the motion information of block A0 is 3, and the index value of the motion information of block B2 is 4, and the second candidate set includes the motion information of block A1, the motion information of block A0, the motion information of block B0, and the motion information of block B1.
[0175] When the first target motion information is the fifth motion information (motion information of block B2) in the motion information list and the index value corresponding to the first target motion information is 4, the encoding side encodes the motion information of block A1 with the second index value "0", indicating that the first candidate motion information in the second candidate set is also the first candidate motion information in the motion information list. That is, the second index value "0" corresponds to the index value 0 in the motion information list. The encoding side encodes the motion information of block B0 with the second index value "10", indicating that the second candidate motion information in the second candidate set is also the second candidate motion information in the motion information list. That is, the second index value "10" corresponds to the index value 1 in the motion information list. The encoding side encodes the motion information of block B1 with the second index value "110", indicating that the third candidate motion information in the second candidate set is also the third candidate motion information in the motion information list. That is, the second index value "110" corresponds to index value 2 in the motion information list. On the encoding side, the motion information of block A0 is encoded using the second index value "111", indicating that the fourth candidate motion information in the second candidate set is also the fourth candidate motion information in the motion information list. That is, the second index value "111" corresponds to index value 3 in the motion information list.
[0176] After obtaining the second index value from the encoded bitstream, the decoding side determines the first candidate motion information in the second candidate set (i.e., the first candidate motion information in the motion information list) as the second target motion information of the second triangular subblock if the second index value is "0". If the second index value is "10", the decoding side determines the second candidate motion information in the second candidate set (i.e., the second candidate motion information in the motion information list) as the second target motion information of the second triangular subblock. If the second index value is "110", the decoding side determines the third candidate motion information in the second candidate set (i.e., the third candidate motion information in the motion information list) as the second target motion information of the second triangular subblock. If the second index value is "111", the decoding side determines the fourth candidate motion information in the second candidate set (i.e., the fourth candidate motion information in the motion information list) as the second target motion information of the second triangular subblock.
[0177] If the first index value does not correspond to the index value 4, it indicates that the first target motion information is the fourth motion information in the motion information list (i.e., the motion information of block A0). Hereinafter, an example will be described in which the first index value corresponds to the index value 3. In this case, the encoding side encodes the motion information of block A1 with the second index value "0", and indicates that the first candidate motion information in the second candidate set is also the first candidate motion information in the motion information list. That is, the second index value "0" corresponds to the index value 0 in the motion information list. The encoding side encodes the motion information of block B0 with the second index value "10", and indicates that the second candidate motion information in the second candidate set is also the second candidate motion information in the motion information list. That is, the second index value "10" corresponds to the index value 1 in the motion information list. The encoding side encodes the motion information of block B1 with the second index value "11", and indicates that the third candidate motion information in the second candidate set is also the third candidate motion information in the motion information list. That is, the second index value "11" corresponds to the index value 2 in the motion information list.
[0178] After obtaining the second index value from the encoded bitstream, the decoding side determines the first candidate motion information in the second candidate set (i.e., the first candidate motion information in the motion information list) as the second target motion information of the second triangular subblock if the second index value is "0". If the second index value is "10", the decoding side determines the second candidate motion information in the second candidate set (i.e., the second candidate motion information in the motion information list) as the second target motion information of the second triangular subblock. If the second index value is "11", the decoding side determines the third candidate motion information in the second candidate set (i.e., the third candidate motion information in the motion information list) as the second target motion information of the second triangular subblock.
[0179] As described above, if the first index value (candIdx1) is 11, i.e., corresponds to the index value 4 in the motion information list, the process of decoding the second index value (candIdx2) may refer to Table 2. If the first index value (candIdx1) is not 11, i.e., does not correspond to the index value 4 in the motion information list, the process of decoding the second index value (candIdx2) may refer to Table 3.
[0180] [Table 2]
[0181] [Table 3]
[0182] As an example, in another possible embodiment, the second index value (candIdx2) may be encoded first. Since the second index value (candIdx2) may only correspond to index value 0, index value 1, index value 2, and index value 3, it may be encoded using 0, 10, 110, 111. That is, the second index value (candIdx2) is encoded using at most 3 bits. For example, index value 0 is encoded by 0, index value 1 is encoded by 10, index value 2 is encoded by 110, and index value 3 is encoded by 111. Then, the first index value (candIdx1) may be encoded, that is, candIdx1 -= candIdx1 < candIdx2? 0 : 1. That is, the first index value (candIdx1) is the four index values remaining after removing the second index value (candIdx2) from among index value 0, index value 1, index value 2, index value 3, and index value 4. Therefore, it may be encoded using 0, 10, 110, 111, that is, the first index value (candIdx1) is encoded using at most 3 bits. Obviously, in this form, it is not necessary to determine the number of bits to be currently decoded depending on the magnitude of the previous index value, thus reducing the dependence on analysis.
[0183] As an example, when splitDir = 1, the second index value (candIdx2) may be encoded first and then the first index value (candIdx1) may be encoded. When splitDir = 0, the first index value (candIdx1) may be encoded first and then the second index value (candIdx2) may be encoded. Alternatively, the second index value (candIdx2) may be encoded first and then the first index value (candIdx1) may be encoded.
[0184] For example, when splitDir=0, processing may be performed using Example 12, and when splitDir=1, processing may be performed using Example 13. Of course, the above Example 12 and Example 13 are merely examples, and the present invention is not limited to these.
[0185] As an example, the above example of encoding index values has been described in which the motion information list includes five candidate motion information, but if the motion information list includes other exemplary candidate motion information, the implementation method is similar, so the description will be omitted here.
[0186] Example 14 In the above embodiment, when transmitting the encoded bitstream from the encoding side to the decoding side, the encoded bitstream may include second indication information for indicating the first index value of the first target motion information in the motion information list and the second index value of the second target motion information in the motion information list. For example, for the first index value, the encoding side may encode the first index value in the CABAC scheme, and the decoding side may decode the first index value in the CABAC scheme. For the second index value, the encoding side may encode the second index value in the CABAC scheme, and the decoding side may decode the second index value in the CABAC scheme. Of course, CABAC is only one example, and is not limited thereto.
[0187] As an example, it is assumed that the motion information list includes five candidate motion information, a first index value (say candIdx1) is represented by four bits, and a second index value (say candIdx2) is represented by four bits.
[0188] On the encoding side, when candIdx1 indicates the first candidate motion information in the motion information list, the first bit is encoded by the CABAC method, and the first bit is 0. When candIdx1 indicates the second candidate motion information in the motion information list, the first bit and the second bit are encoded by the CABAC method, and the first bit is 1 and the second bit is 0. When candIdx1 indicates the third candidate motion information in the motion information list, the first bit, the second bit and the third bit are encoded by the CABAC method, and the first bit is 1, the second bit is 1 and the third bit is 0. When candIdx1 indicates the fourth candidate motion information in the motion information list, the first bit, the second bit, the third bit and the fourth bit are encoded by the CABAC method, and the first bit is 1, the second bit is 1, the third bit is 1 and the fourth bit is 0. When candIdx1 indicates the fifth candidate motion information in the motion information list, the first bit, the second bit, the third bit, and the fourth bit are encoded using the CABAC method, and the first bit is 1, the second bit is 1, the third bit is 1, and the fourth bit is 1.
[0189] On the decoding side, first, the first bit of candIdx1 is decoded by the CABAC method. If the first bit is 0, it is determined that candIdx1 corresponds to 0, and candIdx1 indicates the first candidate motion information in the motion information list. If the first bit is 1, the second bit of candIdx1 is decoded by the CABAC method. If the second bit is 0, it is determined that candIdx1 corresponds to 1 (represented by 10), and candIdx1 indicates the second candidate motion information in the motion information list. If the second bit is 1, the third bit of candIdx1 is decoded by the CABAC method. If the third bit is 0, it is determined that candIdx1 corresponds to 2 (represented by 110), and candIdx1 indicates the third candidate motion information in the motion information list. If the third bit is 1, the fourth bit of candIdx1 is decoded by the CABAC method. If the fourth bit is 0, it is determined that candIdx1 corresponds to 3 (represented by 1110), and candIdx1 indicates the fourth candidate motion information in the motion information list. If the fourth bit is 1, the number of bits has reached the maximum number, so it is determined that candIdx1 corresponds to 4 (represented by 1111), and candIdx1 indicates the fifth candidate motion information in the motion information list. For example, in the decoding process, the termination condition is that the decoded bit is 0 or the number of decoded bits reaches the maximum number (numCandminus1). The numCandminus1 may be obtained by grammar information, but is not limited thereto. For example, if the numCandminus1 is 4, it indicates that the maximum number of bits of the first index value candIdx1 is 4.
[0190] In the above embodiment, the process of encoding candIdx1 on the encoding side and the process of decoding candIdx1 on the decoding side were described, but the process of encoding candIdx2 and the process of decoding candIdx2 are similar to the above embodiment, so the description will be omitted here.
[0191] As an example, for the above embodiment, the bits corresponding to candIdx1 / candIdx2 are shown in Table 4.
[0192] [Table 4]
[0193] Example 15 In the above embodiment, when transmitting an encoded bitstream from the encoding side to the decoding side, the encoded bitstream may include second indication information for indicating a first index value of a first target motion information in the motion information list and a second index value of a second target motion information in the motion information list. For example, for the first index value, the encoding side may encode the first index value by the CABAC method, and the decoding side may decode the first index value by the CABAC method. For the second index value, the encoding side may encode the first index value by the CABAC method, and the decoding side may decode the first index value by the CABAC method. In the encoding side, the second index value may be encoded by the CABAC scheme, and in the decoding side, the second index value may be decoded by the CABAC scheme. Of course, CABAC is only one example, and is not limited thereto.
[0194] CABAC includes a CABAC mode (hereinafter, context-adaptive binary arithmetic coding) in which at least one context model needs to be stored and updated, and a CABAC mode with bypass (hereinafter, binary arithmetic coding with bypass) in which no context model needs to be stored and updated. A first index value is encoded with a binary arithmetic coding scheme with bypass, or the first index value is encoded with a context-adaptive binary arithmetic coding scheme, i.e., the first index value is encoded with a context-adaptive binary arithmetic coding scheme with a context model. A second index value is encoded with a binary arithmetic coding scheme with bypass, or the second index value is encoded with a context-adaptive binary arithmetic coding scheme, i.e., the second index value is encoded with a context-adaptive binary arithmetic coding scheme with a context model.
[0195] When the encoding side encodes the first index value using the CABAC method, the decoding side decodes the first index value using the CABAC method. For example, when the encoding side encodes the first index value using the bypass binary arithmetic coding method, the decoding side decodes the first index value using the bypass binary arithmetic decoding method to obtain the first index value. When the encoding side encodes the first index value using the context-adaptive binary arithmetic coding method, the decoding side decodes the first index value using the context-adaptive binary arithmetic decoding method to obtain the first index value, that is, the decoding side decodes the first index value using the context-adaptive binary arithmetic decoding method using a context model to obtain the first index value.
[0196] When the encoding side encodes the second index value using the CABAC method, the decoding side decodes the second index value using the CABAC method. For example, when the encoding side encodes the second index value using the bypass binary arithmetic coding method, the decoding side decodes the second index value using the bypass binary arithmetic decoding method to obtain the second index value. When the encoding side encodes the second index value using the context-adaptive binary arithmetic coding method, the decoding side decodes the second index value using the context-adaptive binary arithmetic decoding method to obtain the second index value, that is, the second index value is decoded using the context-adaptive binary arithmetic decoding method using a context model to obtain the second index value.
[0197] As an example, the first index value may include M1 bits, where N1 bits among the M1 bits are obtained by context-adaptive binary arithmetic decoding with a context model, and the remaining (M1-N1) bits among the M1 bits are obtained by binary arithmetic decoding with bypass, where M1 is equal to or greater than N1. For example, the first index value includes 4 bits, where a first bit is obtained by context-adaptive binary arithmetic decoding with a context model, and a second, third, and fourth bits are obtained by binary arithmetic decoding with bypass.
[0198] For example, for the first bit in the first index value, the encoding side encodes the first bit using a context-adaptive binary arithmetic coding method based on a context model, and the decoding side decodes the first bit using a context-adaptive binary arithmetic decoding method based on the context model to obtain the first bit.
[0199] If the first index value has other bits (e.g., the second bit, the third bit, the fourth bit, etc.), the encoding side encodes the other bits using a bypass binary arithmetic encoding method, and the decoding side decodes the other bits using a bypass binary arithmetic decoding method to obtain the other bits.
[0200] As described above, the encoding / decoding side may use a CABAC method that updates a certain context model to encode / decode the first bit, and the encoding / decoding side may use a CABAC method that does not update the context model to encode / decode the other bits, i.e., use a CABAC method in Bypass mode.
[0201] As an example, the second index value may include M2 bits, where N2 bits of the M2 bits are obtained by context-adaptive binary arithmetic decoding with a context model, and the remaining (M2-N2) bits of the M2 bits are obtained by binary arithmetic decoding with bypass, where M2 is equal to or greater than N2. For example, the second index value includes 4 bits, where a first bit is obtained by context-adaptive binary arithmetic decoding with a context model, and a second, third, and fourth bits are obtained by binary arithmetic decoding with bypass.
[0202] For example, for the first bit in the second index value, the encoding side encodes the first bit using a context-adaptive binary arithmetic coding method based on a context model, and the decoding side decodes the first bit using a context-adaptive binary arithmetic decoding method based on a context model to obtain the first bit.
[0203] If the second index value has other bits (e.g., the second bit, the third bit, the fourth bit, etc.), the encoding side encodes the other bits using a bypass binary arithmetic encoding method, and the decoding side decodes the other bits using a bypass binary arithmetic decoding method to obtain the other bits.
[0204] As described above, for the first bit, the encoding / decoding side may employ a CABAC method that updates a certain context model for encoding / decoding, but for the other bits, the encoding / decoding side may employ a CABAC method that does not update the context model for encoding / decoding, i.e., a CABAC method in Bypass mode is used.
[0205] Example 16 A context model corresponding to the first index value and a context model corresponding to the second index value are the same. Or, a context model corresponding to the first index value and a context model corresponding to the second index value are different. Or, a context model corresponding to the first index value and the first partition information and a context model corresponding to the second index value and the first partition information are the same, a context model corresponding to the first index value and the second partition information and a context model corresponding to the second index value and the second partition information are the same, and a context model corresponding to the first index value and the first partition information and a context model corresponding to the first index value and the second partition information are different. Or, a context model corresponding to the first index value and the first partition information and a context model corresponding to the second index value and the first partition information and a context model corresponding to the first index value and the second partition information are different from each other. Alternatively, a context model corresponding to the first index value and the first partition information is different from a context model corresponding to the second index value and the first partition information, and a context model corresponding to the first index value and the second partition information is the same as a context model corresponding to the second index value and the second partition information. Alternatively, a context model corresponding to the first index value and the first partition information is the same as a context model corresponding to the second index value and the first partition information, and a context model corresponding to the first index value and the second partition information is different from a context model corresponding to the second index value and the second partition information. For example, the first partition information indicates that the partition information of the triangular sub-block is a partition scheme by a main diagonal line, and the second partition information indicates that the partition information of the triangular sub-block is a partition scheme by a sub-diagonal line.
[0206] In the following, the above context model will be explained in detail with reference to some specific application scenarios.
[0207] Application scenario 1: On the encoding / decoding side, the context model A1 Model and a context model corresponding to a first index value (to indicate an index value of a first target motion information of a first triangular sub-block in a triangular prediction mode) is defined as context model A1. Model and the context model corresponding to the second index value (in the triangular prediction mode, to indicate the index value of the second target motion information of the second triangular sub-block) is the context model A1. Model and the context model corresponding to the index value of the normal merge model is the context model A1 Model It is.
[0208] For example, on the encoding side / decoding side, when the first index value needs to be encoded or decoded according to the context model, the context model A1 Model The encoding / decoding side uses the context model A1 to encode or decode the first index value (e.g., the first bit of the first index value). When the encoding / decoding side needs to encode or decode the second index value according to the context model, the encoding / decoding side uses the context model A1 Model The encoding / decoding side uses the context model A1 to encode or decode the second index value (e.g., the first bit of the second index value). When the encoding / decoding side needs to encode or decode the index value of the normal merge model according to the context model, the context model A1 is used. Model is adopted to encode or decode the index value of the normal merge model (for example, the first bit of the index value of the normal merge model).
[0209] Application scenario 2: On the encoding / decoding side, the context model B1 Model and context model B2 Model , and the context model corresponding to the first index value is context model B1. Modeland the context model corresponding to the second index value is context model B1. Model and the context model corresponding to the index value in the normal merge mode (e.g., regular merge mode) is context model B2. Model It is.
[0210] For example, on the encoding / decoding side, if the first index value needs to be encoded or decoded according to the context model, then the context model B1 Model The encoding / decoding side uses the context model B1 to encode or decode the first index value (e.g., the first bit of the first index value). When the encoding / decoding side needs to encode or decode the second index value according to the context model, the encoding / decoding side uses the context model B1 Model The second index value (e.g., the first bit of the second index value) is encoded or decoded by adopting the context model B2. Model is adopted to encode or decode the index value of the normal merge model (for example, the first bit of the index value of the normal merge model).
[0211] Application scenario 3: At the encoding / decoding side, a context model C1, a context model C2, and a context model C3 may be maintained, where the context model corresponding to the first index value is context model C1, the context model corresponding to the second index value is context model C2, and the context model corresponding to the index value for a regular merge mode (e.g., regular merge mode) is context model C3.
[0212] For example, on the encoding side / decoding side, when the context model requires encoding or decoding a first index value, the context model C1 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). On the encoding side / decoding side, when the context model requires encoding or decoding a second index value, the context model C2 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). On the encoding side / decoding side, when the context model requires encoding or decoding an index value of a normal merge model, the context model C3 is adopted to encode or decode an index value of a normal merge model (e.g., the first bit of the index value of a normal merge model).
[0213] Application scenario 4: The encoding / decoding side may maintain a context model D1, a context model D2, and a context model D3. For example, a context model corresponding to a first index value and a first partition information is a context model D1, and a context model corresponding to a second index value and a first partition information is a context model D1. A context model corresponding to a first index value and a second partition information is a context model D2, and a context model corresponding to a second index value and a second partition information is a context model D2. A context model corresponding to an index value of a regular merge mode (e.g., a regular merge mode) is a context model D3.
[0214] For example, on the encoding side / decoding side, when the first index value needs to be encoded or decoded according to the context model, the partition information of the triangular subblock is determined first. If the partition information of the triangular subblock is the first partition information (indicating that the current block is partitioned into a first triangular subblock and a second triangular subblock along the main diagonal (angle rotated 45 degrees clockwise from the horizontal direction)), the context model D1 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). If the partition information of the triangular subblock is the second partition information (indicating that the current block is partitioned into a first triangular subblock and a second triangular subblock along the sub diagonal (angle rotated 135 degrees clockwise from the horizontal direction), the context model D2 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). On the encoding side / decoding side, when the second index value needs to be encoded or decoded according to the context model, the partition information of the triangular subblock is determined first. If the partition information of the triangular subblock is the first partition information, the context model D1 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). If the partition information of the triangular subblock is the second partition information, the context model D2 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). On the encoding side / decoding side, if the index value of the normal merge model needs to be encoded or decoded according to the context model, the context model D3 is adopted to encode or decode the index value of the normal merge model (e.g., the first bit of the index value of the normal merge model).
[0215] Application scenario 5: The encoding / decoding side may maintain a context model E1, a context model E2, a context model E3, a context model E4, and a context model E5. For example, the context model corresponding to the first index value and the first partition information is the context model E1, the context model corresponding to the first index value and the second partition information is the context model E2, the context model corresponding to the second index value and the first partition information is the context model E3, and the context model corresponding to the second index value and the second partition information is the context model E4. The context model corresponding to the index value of the normal merge model is the context model E5.
[0216] For example, the encoding side / decoding side determines the partition information of the triangular subblock when encoding or decoding the first index value according to the context model. If the partition information of the triangular subblock is the first partition information, the context model E1 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). If the partition information of the triangular subblock is the second partition information, the context model E2 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). The encoding side / decoding side determines the partition information of the triangular subblock when encoding or decoding the second index value according to the context model. If the partition information of the triangular subblock is the first partition information, the context model E3 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). If the partition information of the triangular subblock is the second partition information, the context model E4 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). On the encoding side / decoding side, when the context model requires encoding or decoding the index value of the normal merge model, the context model E5 is adopted to encode or decode the index value of the normal merge model (e.g., the first bit of the index value of the normal merge model).
[0217] Application scenario 6: The encoding / decoding side may maintain a context model F1, a context model F2, a context model F3, and a context model F4. For example, the context model corresponding to the first index value and the first partition information may be the context model F1, and the context model corresponding to the second index value and the first partition information may be the context model F2. The context model corresponding to the first index value and the second partition information may be the context model F3, and the context model corresponding to the second index value and the second partition information may be the context model F3. The context model corresponding to the index value of the normal merge model is the context model F4.
[0218] For example, on the encoding side / decoding side, when the first index value is encoded or decoded by the context model, the partition information of the triangular subblock is determined. If the partition information of the triangular subblock is the first partition information, the context model F1 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). If the partition information of the triangular subblock is the second partition information, the context model F3 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). On the encoding side / decoding side, when the second index value is encoded or decoded by the context model, the partition information of the triangular subblock is determined. If the partition information of the triangular subblock is the first partition information, the context model F2 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). If the partition information of the triangular subblock is the second partition information, the context model F3 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). On the encoding / decoding side, when the context model requires encoding or decoding the index value of the normal merge model, the context model F4 is adopted to encode or decode the index value of the normal merge model (e.g., the first bit of the index value of the normal merge model).
[0219] Application scenario 7: The encoding side / decoding side may maintain a context model G1, a context model G2, a context model G3, and a context model G4. For example, the context model corresponding to the first index value and the first partition information may be the context model G1, and the context model corresponding to the second index value and the first partition information may be the context model G1. The context model corresponding to the first index value and the second partition information may be the context model G2, and the context model corresponding to the second index value and the second partition information may be the context model G3. The context model corresponding to the index value of the normal merge model is the context model G4.
[0220] On the encoding side / decoding side, when the first index value is encoded or decoded by the context model, the partition information of the triangular subblock is determined. If the partition information of the triangular subblock is the first partition information, the context model G1 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). If the partition information of the triangular subblock is the second partition information, the context model G2 is adopted to encode or decode the first index value (e.g., the first bit of the first index value). On the encoding side / decoding side, when the second index value is encoded or decoded by the context model, the partition information of the triangular subblock is determined. If the partition information of the triangular subblock is the first partition information, the context model G1 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). If the partition information of the triangular subblock is the second partition information, the context model G3 is adopted to encode or decode the second index value (e.g., the first bit of the second index value). On the encoding side / decoding side, when the context model requires encoding or decoding the index value of the normal merge model, the context model G4 is adopted to encode or decode the index value of the normal merge model (e.g., the first bit of the index value of the normal merge model).
[0221] (Example 17) On the encoding side, the partition information of the triangular subblock is encoded first, and then the first index value and the second index value are encoded. On the decoding side, the partition information of the triangular subblock is decoded first, and then the first index value and the second index value are decoded. Alternatively, on the encoding side, the first index value and the second index value are encoded first, and then the partition information of the triangular subblock is encoded. On the decoding side, the first index value and the second index value are decoded first, and then the partition information of the triangular subblock is decoded.
[0222] (Example 18) In step 305 and step 405, the encoding side / decoding side needs to perform motion compensation on the first triangular sub-block according to the first target motion information to obtain a predicted value of the first triangular sub-block, and perform motion compensation on the second triangular sub-block according to the second target motion information to obtain a predicted value of the second triangular sub-block. The above process is the process of motion compensation.
[0223] For example, a current block may be partitioned into a number of sub-blocks, and for each sub-block, if the sub-block is located in a first triangular sub-block, motion compensation is performed on the sub-block based on first target motion information; if the sub-block is located in a second triangular sub-block, motion compensation is performed on the sub-block based on second target motion information; if the sub-block is located in both the first triangular sub-block and the second triangular sub-block at the same time, weighted compensation (also referred to as weighted predictive compensation) is performed on the sub-block based on the first target motion information and the second target motion information.
[0224] For example, the current block may be partitioned into a first region sub-block, a second region sub-block, and a third region sub-block, the first region sub-block being located within the first triangular sub-block, the second region sub-block being located within the second triangular sub-block, and a vertical distance between a center of each sub-block within the third region sub-block and a diagonal line partitioning the first triangular sub-block and the second triangular sub-block is smaller than a preset threshold. Motion compensation is performed on the first region sub-block based on the first target motion information. Motion compensation is performed on the second region sub-block based on the second target motion information. Weighted compensation is performed on the third region sub-block based on the first target motion information and the second target motion information. For example, for each subblock in the third region subblock, a first predicted value of the subblock is determined according to the first target motion information, a second predicted value of the subblock is determined according to the second target motion information, and weighted compensation is performed for the subblock according to the first predicted value, a first weighting factor corresponding to the first predicted value, and a second predicted value and a second weighting factor corresponding to the second predicted value. For example, if the subblock is located in a first triangular subblock, the first weighting factor is greater than the second weighting factor. If the subblock is located in a second triangular subblock, the first weighting factor is less than the second weighting factor. If the subblock is located on a diagonal, the first weighting factor and the second weighting factor are equal. Wherein, the subblock being located on a diagonal refers to the center of the subblock being located on a diagonal.
[0225] As shown in FIG. 7D, for a subblock in the Z1 region (i.e., the first region subblock), if the subblock in the Z1 region is located in the first triangular subblock, the subblock in the Z1 region is motion compensated according to the first target motion information of the first triangular subblock to obtain a predicted value. This motion compensation process is not limited. For a subblock in the Z2 region (i.e., the second region subblock), if the subblock in the Z2 region is located in the second triangular subblock, the subblock in the Z2 region is motion compensated according to the second target motion information of the second triangular subblock to obtain a predicted value. This motion compensation process is not limited. As for the sub-blocks of regions other than the Z1 region and the Z2 region (i.e., the third region sub-blocks), they include the sub-block indicated by 1 (referred to as sub-block 1), the sub-block indicated by 2 (referred to as sub-block 2), the sub-block indicated by 3 (referred to as sub-block 3), the sub-block indicated by 4 (referred to as sub-block 4), the sub-block indicated by 5 (referred to as sub-block 5), the sub-block indicated by 6 (referred to as sub-block 6), and the sub-block indicated by 7 (referred to as sub-block 7).
[0226] For each of the sub-blocks 7 denoted by 7, a prediction value P 1 , and a prediction value P 2 Let us assume that the predicted value P 1 The first weighting factor is a, and the predicted value P 2 If the second weighting coefficient of is b, weighted compensation is performed on subblock 7, and the weighted compensated predicted value is P 1 *a+P 2 *b. Since subblock 7 is located in the first triangular subblock, the first weighting factor a is greater than the second weighting factor b. If a is 7 / 8 and b is 1 / 8, the weighted compensated prediction value is P 1 *7 / 8+P 2 *1 / 8.
[0227] Each of the sub-blocks 6 denoted by 6 may refer to the sub-block 7 in its processing process, so the description is omitted here. Since the sub-block 6 is located in the first triangular sub-block, the first weighting factor a is larger than the second weighting factor b. Also, the sub-block 6 is closer to the P 2 To get closer to the region, the first weighting factor a of sub-block 6 may be smaller than the first weighting factor a of sub-block 7. For example, the first weighting factor a of sub-block 6 is 6 / 8 and b is 2 / 8, and the weighted compensated prediction value is P 1 *6 / 8+P 2 *2 / 8.
[0228] Each of the sub-blocks 5 denoted by 5 may refer to the sub-block 7 in its processing process, so the description is omitted here. If the first weighting factor a of the sub-block 5 is 5 / 8 and the second weighting factor b of the sub-block 5 is 3 / 8, the weighted compensated prediction value is P 1 *5 / 8+P 2 *3 / 8.
[0229] For each of the sub-blocks 4 denoted by 4, the processing process may refer to the sub-block 7, so the description is omitted here. Since the sub-block 4 is located on the diagonal, the first weighting factor a may be equal to the second weighting factor b. For example, if the first weighting factor a of the sub-block 4 is 4 / 8 and the second weighting factor b of the sub-block 4 is 4 / 8, the weighted compensated prediction value is P 1 *4 / 8+P 2 *4 / 8.
[0230] For each of the sub-blocks 3 denoted by 3, the processing process may refer to the sub-block 7, so the description is omitted here. If the first weighting factor a of the sub-block 3 is 3 / 8 and the second weighting factor b of the sub-block 3 is 5 / 8, the weighted compensated prediction value is P 1 *3 / 8+P 2 *5 / 8.
[0231] For each of the sub-blocks 2 denoted by 2, the processing process thereof may refer to the sub-block 7, so the description thereof is omitted here. Since the sub-block 2 is located in the second triangular sub-block, the first weighting factor a may be smaller than the second weighting factor b. For example, if the first weighting factor a of the sub-block 2 is 2 / 8 and the second weighting factor b of the sub-block 2 is 6 / 8, the weighted compensated prediction value is P 1 *2 / 8+P 2 *6 / 8.
[0232] The subblock 1 denoted by 1 is not described here because its processing process may refer to the subblock 7. Since the subblock 1 is located in the second triangular subblock, the first weighting factor a is smaller than the second weighting factor b. Also, the subblock 1 is closer to the subblock 2 than the P 2 To get closer to the region, the first weighting coefficient a of subblock 1 may be smaller than the first weighting coefficient a of subblock 2. For example, if the first weighting coefficient a of subblock 1 is 1 / 8 and b is 7 / 8, the weighted compensated prediction value is P 1 *1 / 8+P 2 *7 / 8.
[0233] As described above, this embodiment provides weighting coefficients used for the luminance component, and the first weighting coefficient a of each subblock is {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8} in the order from the Z1 region to the Z2 region. For example, the first weighting coefficient a of the subblock 7 is 7 / 8, the first weighting coefficient a of the subblock 6 is 6 / 8, the first weighting coefficient a of the subblock 5 is 5 / 8, the first weighting coefficient a of the subblock 4 is 4 / 8, the first weighting coefficient a of the subblock 3 is 3 / 8, the first weighting coefficient a of the subblock 2 is 2 / 8, and the first weighting coefficient a of the subblock 1 is 1 / 8. The above luminance component refers to the predicted value P 1 is the brightness prediction value, and the prediction value P 2 is the luminance prediction value, and the weighted compensated prediction value P 1 *a+P 2 *b also indicates that it is a luminance prediction value.
[0234] As shown in FIG. 7D, this embodiment further provides weighting coefficients for chrominance components, where the first weighting coefficient a of each sub-block is {6 / 8, 4 / 8, 2 / 8} in sequence from the Z1 domain to the Z2 domain. For example, the first weighting coefficient a of sub-block 6 is 6 / 8, the first weighting coefficient a of sub-block 4 is 4 / 8, and the first weighting coefficient a of sub-block 2 is 2 / 8. The above chrominance components are the predicted value P 1 is the chromaticity prediction value, and the prediction value P 2 is a chrominance prediction value, and the weighted compensated prediction value is also a chrominance prediction value.
[0235] (Example 19) In step 306 and step 406, the encoding side / decoding side needs to store motion information of the current block. For a sub-block in the first triangular sub-block that uses unweighted prediction compensation, store the first target motion information for the sub-block. For a sub-block in the second triangular sub-block that uses unweighted prediction compensation, store the second target motion information for the sub-block. For a sub-block that uses weighted prediction compensation, store the first target motion information, the second target motion information or the bidirectional motion information for the sub-block.
[0236] As shown in FIG. 7E, if block 2, block 3, block 4, block 7, block 8, and block 12 are sub-blocks using unweighted prediction compensation in the first triangular sub-block, first target motion information for block 2, block 3, block 4, block 7, block 8, and block 12 (i.e., first target motion information of the first triangular sub-block) may be stored. If block 5, block 9, block 10, block 13, block 14, and block 15 are sub-blocks using unweighted prediction compensation in the second triangular sub-block, second target motion information for block 5, block 9, block 10, block 13, block 14, and block 15 (i.e., second target motion information of the second triangular sub-block) may be stored. If block 1, block 6, block 11, and block 16 are sub-blocks that use weighted prediction compensation, the first target motion information, the second target motion information, or the bidirectional motion information for block 1, block 6, block 11, and block 16 may be stored. For specific storage manners, refer to the following embodiments.
[0237] As shown in FIG. 7F, if block 1, block 2, block 3, block 5, block 6, and block 9 are sub-blocks using unweighted prediction compensation in the first triangular sub-block, first target motion information for block 1, block 2, block 3, block 5, block 6, and block 9 (i.e., first target motion information of the first triangular sub-block) may be stored. If block 8, block 11, block 12, block 14, block 15, and block 16 are sub-blocks using unweighted prediction compensation in the second triangular sub-block, second target motion information for block 8, block 11, block 12, block 14, block 15, and block 16 (i.e., second target motion information of the second triangular sub-block) may be stored. If block 4, block 7, block 10, and block 13 are sub-blocks that use weighted prediction compensation, the first target motion information, the second target motion information, or the bidirectional motion information for block 4, block 7, block 10, and block 13 may be stored. For specific storage manners, refer to the following embodiments.
[0238] As an example, motion information for each of the sub-blocks of size 4*4 may be stored, although of course the size of the sub-blocks is not limited.
[0239] (Example 20) For a sub-block in the first triangular sub-block that uses unweighted prediction compensation, first target motion information for the sub-block is stored. For a sub-block in the second triangular sub-block that uses unweighted prediction compensation, second target motion information for the sub-block is stored. For a sub-block that uses weighted prediction compensation, first target motion information, second target motion information or second target motion information for the sub-block is stored.
[0240] Application scenario 1: For a sub-block that uses weighted prediction compensation, the first target motion information for the sub-block is stored directly.
[0241] Application scenario 2: For a sub-block that uses weighted prediction compensation, the second target motion information for the sub-block is stored directly.
[0242] Application scenario 3: For sub-blocks using weighted prediction compensation, first or second target motion information for the sub-block is stored according to the partition direction (eg, diagonal or sub-diagonal) of the current block.
[0243] For example, if the partition direction of the current block is a sub-diagonal direction (angle rotated 135 degrees clockwise from horizontal), first target motion information for the sub-block is stored. If the partition direction of the current block is a main diagonal direction (angle rotated 45 degrees clockwise from horizontal), second target motion information for the sub-block is stored. Alternatively, if the partition direction of the current block is a sub-diagonal direction (angle rotated 135 degrees clockwise from horizontal), second target motion information for the sub-block is stored. If the partition direction of the current block is a main diagonal direction (angle rotated 45 degrees clockwise from horizontal), first target motion information for the sub-block is stored.
[0244] Application scenario 4: For sub-blocks that use weighted prediction compensation, first or second target motion information for the sub-block is stored depending on the position of the sub-block (e.g., whether the sub-block is on the diagonal, above the diagonal, below the diagonal, etc.).
[0245] As an example, if the subblock is on the diagonal or above the diagonal, first target motion information for the subblock is stored. If the subblock is on the diagonal or below the diagonal, second target motion information for the subblock is stored. Or, if the subblock is on the diagonal or below the diagonal, second target motion information for the subblock is stored. If the subblock is on the diagonal or above the diagonal, first target motion information for the subblock is stored. Or, if the subblock is on the diagonal or above the diagonal, second target motion information for the subblock is stored. If the subblock is on the diagonal or below the diagonal, first target motion information for the subblock is stored. Or, if the subblock is on the diagonal or below the diagonal, first target motion information for the subblock is stored. Or, if the subblock is on the diagonal or below the diagonal, second target motion information for the subblock is stored.
[0246] Application scenario 5: For a sub-block that uses weighted prediction compensation, first or second target motion information for the sub-block is stored depending on the position of the sub-block (e.g., whether the sub-block is diagonal, above the diagonal, below the diagonal, etc.) and the partition direction of the current block (e.g., main diagonal direction or sub diagonal direction).
[0247] For example, if a sub-block is diagonal, first target motion information or second target motion information for the sub-block is stored according to the partition direction of the current block. For example, if the partition direction of the current block is sub-diagonal, first target motion information for the sub-block is stored. If the partition direction of the current block is main diagonal, second target motion information for the sub-block is stored. Or, if the partition direction of the current block is sub-diagonal, second target motion information for the sub-block is stored. If the partition direction of the current block is main diagonal, first target motion information for the sub-block is stored.
[0248] As an example, if a sub-block is above the diagonal, store the first target motion information for that sub-block.
[0249] As an example, if a sub-block is below the diagonal, store the second target motion information for said sub-block.
[0250] Example 21 For a subblock in the first triangular subblock that uses unweighted prediction compensation, store first target motion information for the subblock. For a subblock in the second triangular subblock that uses unweighted prediction compensation, store second target motion information for the subblock. For a subblock that uses weighted prediction compensation, store first target motion information, second target motion information, or bidirectional motion information (i.e., bidirectional motion information consisting of first target motion information and second target motion information) for the subblock.
[0251] Application scenario 1: For a sub-block using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, directly merge the first target motion information and the second target motion information into bidirectional motion information and store the bidirectional motion information for the sub-block (i.e., bidirectional motion information consisting of the first target motion information and the second target motion information). If the first target motion information and the second target motion information are from the same list, store the first target motion information for the sub-block.
[0252] Application scenario 2: For a sub-block using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, directly merge the first target motion information and the second target motion information into bidirectional motion information and store the bidirectional motion information for the sub-block (i.e., bidirectional motion information consisting of the first target motion information and the second target motion information). If the first target motion information and the second target motion information are from the same list, store the second target motion information for the sub-block.
[0253] Application scenario 3: For a sub-block using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, the first target motion information and the second target motion information are directly merged into bidirectional motion information to store the bidirectional motion information for the sub-block (i.e., bidirectional motion information consisting of the first target motion information and the second target motion information).If the first target motion information and the second target motion information are from the same list, the first target motion information or the second target motion information for the sub-block is stored according to the partition direction of the current block (e.g., the main diagonal direction or the sub-diagonal direction).
[0254] For example, if the partition direction of the current block is a sub-diagonal direction, first target motion information for the sub-block may be stored. If the partition direction of the current block is a diagonal direction, second target motion information for the sub-block may be stored. Or, if the partition direction of the current block is a sub-diagonal direction, second target motion information for the sub-block may be stored. If the partition direction of the current block is a diagonal direction, first target motion information for the sub-block may be stored.
[0255] Application scenario 4: For a subblock using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, directly merge the first target motion information and the second target motion information into bidirectional motion information and store the bidirectional motion information for the subblock (i.e., bidirectional motion information consisting of the first target motion information and the second target motion information). If the first target motion information and the second target motion information are from the same list, store the first target motion information or the second target motion information for the subblock according to the position of the subblock (e.g., the subblock is on the diagonal, above the diagonal, below the diagonal, etc.).
[0256] As an example, if the subblock is on the diagonal or above the diagonal, first target motion information for the subblock is stored. If the subblock is on the diagonal or below the diagonal, second target motion information for the subblock is stored. Or, if the subblock is on the diagonal or below the diagonal, second target motion information for the subblock is stored. If the subblock is on the diagonal or above the diagonal, first target motion information for the subblock is stored. Or, if the subblock is on the diagonal or above the diagonal, second target motion information for the subblock is stored. If the subblock is on the diagonal or below the diagonal, first target motion information for the subblock is stored. Or, if the subblock is on the diagonal or below the diagonal, first target motion information for the subblock is stored. Or, if the subblock is on the diagonal or below the diagonal, second target motion information for the subblock is stored.
[0257] Application scenario 5: For a subblock using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, directly merge the first target motion information and the second target motion information into bidirectional motion information and store the bidirectional motion information for the subblock (i.e., bidirectional motion information consisting of the first target motion information and the second target motion information). If the first target motion information and the second target motion information are from the same list, store the first target motion information or the second target motion information for the subblock according to the position of the subblock (e.g., whether the subblock is diagonal, above the diagonal, below the diagonal, etc.) and the partition direction of the current block (e.g., main diagonal direction or sub diagonal direction).
[0258] For example, if a sub-block is diagonal, first target motion information or second target motion information for the sub-block is stored according to the partition direction of the current block. For example, if the partition direction of the current block is sub-diagonal, first target motion information for the sub-block is stored. If the partition direction of the current block is main diagonal, second target motion information for the sub-block is stored. Or, if the partition direction of the current block is sub-diagonal, second target motion information for the sub-block is stored. If the partition direction of the current block is main diagonal, first target motion information for the sub-block is stored.
[0259] As an example, if a sub-block is above the diagonal, store the first target motion information for that sub-block.
[0260] As an example, if a sub-block is below the diagonal, store the second target motion information for said sub-block.
[0261] Application scenario 6: For a subblock using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, directly merge the first target motion information and the second target motion information into bidirectional motion information and store the bidirectional motion information for the subblock (i.e., bidirectional motion information consisting of the first target motion information and the second target motion information). If the first target motion information and the second target motion information are from the same list, store the average value of the first target motion information and the second target motion information for the subblock. For example, if the reference frame of the list corresponding to the first target motion information and the reference frame of the list corresponding to the second target motion information are the same, store the average value of the first target motion information and the second target motion information for the subblock.
[0262] For example, the average value of the first target motion information and the second target motion information may include the average value of the first target motion information and the second target motion information. For example, the average value of the motion vector in the first target motion information and the motion vector in the second target motion information may be included. That is, the weights of both may be the same. Or, the average value of the first target motion information and the second target motion information may be included. For example, the average value of the motion vector in the first target motion information and the motion vector in the second target motion information may be included. That is, the weights of both may be different.
[0263] For example, when the reference frame of the list corresponding to the first target motion information is the same as the reference frame of the list corresponding to the second target motion information, the average value of the first target motion information and the second target motion information for the sub-block is stored. When the reference frame of the list corresponding to the first target motion information is different from the reference frame of the list corresponding to the second target motion information, the first target motion information or the second target motion information for the sub-block is stored according to the partition direction of the current block (e.g., the main diagonal direction or the sub diagonal direction).
[0264] For example, if the partition direction of the current block is a sub-diagonal direction, first target motion information for the sub-block may be stored. If the partition direction of the current block is a diagonal direction, second target motion information for the sub-block may be stored. Or, if the partition direction of the current block is a sub-diagonal direction, second target motion information for the sub-block may be stored. If the partition direction of the current block is a diagonal direction, first target motion information for the sub-block may be stored.
[0265] Application scenario 7: For a sub-block using weighted prediction compensation, if the first target motion information and the second target motion information are from different lists, the first target motion information and the second target motion information are directly merged into bidirectional motion information to store the bidirectional motion information for the sub-block. If the first target motion information and the second target motion information are from the same list, the first target motion information or the second target motion information for the sub-block may be stored according to the size information of the current block.
[0266] For example, when the width value of the current block is equal to the height value of the current block, the first target motion information or the second target motion information for the sub-block is stored according to the partition direction of the current block. For example, when the partition direction is a sub-diagonal direction, the first target motion information for the sub-block may be stored. When the partition direction is a main diagonal direction, the second target motion information for the sub-block may be stored. Or, when the partition direction is a sub-diagonal direction, the second target motion information for the sub-block may be stored. When the partition direction is a main diagonal direction, the first target motion information for the sub-block may be stored.
[0267] For example, if the width value and height value of the current block are not equal, first target motion information or second target motion information for the sub-block is stored based on the relationship between the width and height. For example, if the height value of the current block is greater than the width value of the current block, first target motion information for the sub-block is stored. If the height value of the current block is less than the width value of the current block, second target motion information for the sub-block is stored.
[0268] Application scenario 8: For a sub-block that uses weighted prediction compensation, the bidirectional motion information derived by the following rule may be stored: if the first target motion information and the second target motion information are from different lists, directly merge the first target motion information and the second target motion information into bidirectional motion information to store the bidirectional motion information for the sub-block; otherwise, if the first target motion information and the second target motion information are from one list, use ListX (X=0 / 1). In this case,
[0269] If the reference frame of the second target motion information is the same as a reference frame in List(1-X), the second target motion information is scaled to match the reference frame, and the first target motion information and the scaled second target motion information are merged into bidirectional motion information.
[0270] If the reference frame of the first target motion information is the same as a reference frame in List(1-X), the first target motion information is scaled to match the reference frame, and the second target motion information and the scaled first target motion information are merged into bidirectional motion information.
[0271] Otherwise, these sub-blocks using weighted prediction compensation store only the first target motion information.
[0272] Example 22 Based on the same idea as the above method, the present embodiment further proposes a codec device used on the encoding side or the decoding side. As shown in FIG. 8, FIG. 8 is a configuration diagram of the device, and the device includes: a partition module 81 for partitioning the current block into a first triangular sub-block and a second triangular sub-block when the feature information of the current block satisfies a certain condition; a construction module 82 for constructing a motion information list including a plurality of candidate motion information for the current block; an obtaining module 83 for obtaining a first target motion information of the first triangular sub-block and a second target motion information of the second triangular sub-block from the motion information list, the first target motion information being different from the second target motion information; and a codec module 84 for performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block.
[0273] As an example, the feature information may include one or more of: motion information mode, size information, frame type, and sequence level switch control information.
[0274] The partition module 81 is further used to determine that the feature information includes the motion information mode, and the motion information mode satisfies a certain condition when the motion information mode satisfies at least one of the following:
[0275] The motion information mode of the current block is either merge mode or skip mode. The motion information mode of the current block is a merge mode or a skip mode, and the motion information mode of the current block is not a merge submode or a skip submode of another type other than a triangular prediction submode. The motion information mode of the current block is a merge mode, and the motion information mode of the current block is not one of a normal merge submode, an MMVD submode, an SB merge submode, and a CIIP submode. The motion information mode of the current block is a skip mode, and the motion information mode of the current block is not one of a normal merge sub-mode, an MMVD sub-mode, and an SB merge sub-mode.
[0276] The partition module 81 further comprises: the feature information includes the frame type, and the frame type is used to determine that the motion information mode satisfies a certain condition if it satisfies at least one of the following:
[0277] The frame type is that the current frame to which the current block belongs is a B frame. The frame type indicates that the current frame to which the current block belongs allows intra block copy.
[0278] The partition module 81 further includes the sequence level switch control information, which is used to determine that the sequence level switch control information satisfies a specific condition if the feature information includes the sequence level switch control information that allows the current block to use a triangular prediction mode.
[0279] The partition module 81 is further used to determine that the size information meets a specific condition when the feature information includes the size information, and the size information meets at least one of the following:
[0280] The width value of the current block is greater than or equal to a first threshold, and the width value of the current block is less than or equal to a second threshold. The height value of the current block is equal to or greater than a third threshold, and the height value of the current block is equal to or less than a fourth threshold. The area value of the current block is equal to or greater than a fifth threshold, and the area value of the current block is equal to or less than a sixth threshold. The area value of the current block is equal to or greater than a seventh threshold. The area value of the current block is less than or equal to an eighth threshold. The width value of the current block is less than or equal to a ninth threshold, and the height value of the current block is less than or equal to a tenth threshold.
[0281] When the codec device is applied to the decoding side, the partition module 81 is specifically used to obtain the first indication information indicating partition information of the triangular sub-block from the encoded bitstream when partitioning the current block into a first triangular sub-block and a second triangular sub-block, and partition the current block into a first triangular sub-block and a second triangular sub-block along the main diagonal of the current block if the partition information of the triangular sub-block is a partition method based on a main diagonal, and partition the current block into a first triangular sub-block and a second triangular sub-block along the sub-diagonal of the current block if the partition information of the triangular sub-block is a partition method based on a sub-diagonal.
[0282] For example, the first indication information is obtained by binary arithmetic decoding with a bypass, or the first indication information is obtained by context-adaptive binary arithmetic decoding with a context model.
[0283] When constructing a motion information list for the current block, the construction module 82 specifically: It is used to construct a motion information list for the current block by reusing the motion information list construction method of the normal merge mode.
[0284] When the codec device is applied to the decoding side, the acquisition module 83 is specifically used for the following when acquiring the first target motion information of the first triangle sub-block and the second target motion information of the second triangle sub-block from the motion information list: Second indication information is obtained from the encoded bitstream to indicate a first index value of a first target motion information in the motion information list and a second index value of a second target motion information in the motion information list.
[0285] Based on the second instruction information, candidate motion information corresponding to the first index value is obtained from the motion information list, and the candidate motion information corresponding to the obtained first index value is determined as the first target motion information of the first triangular sub-block.
[0286] Based on the second instruction information, candidate motion information corresponding to the second index value is obtained from the motion information list, and the candidate motion information corresponding to the obtained second index value is determined as the second target motion information of the second triangular sub-block.
[0287] The first index value is obtained by binary arithmetic decoding with a bypass, or the first index value is obtained by context-adaptive binary arithmetic decoding with a context model, and the second index value is obtained by binary arithmetic decoding with a bypass, or the second index value is obtained by context-adaptive binary arithmetic decoding with a context model.
[0288] The first index value includes M1 bits, N1 bits among the M1 bits are obtained by context-adaptive binary arithmetic decoding using a context model, and the remaining (M1-N1) bits among the M1 bits are obtained by binary arithmetic decoding using a bypass, where M1 is a positive integer greater than or equal to 1, N1 is a positive integer greater than or equal to 1, and M1 is greater than or equal to N1.
[0289] The second index value includes M2 bits, N2 bits among the M2 bits are obtained by context-adaptive binary arithmetic decoding using a context model, and the remaining (M2-N2) bits among the M2 bits are obtained by binary arithmetic decoding using a bypass, where M2 is a positive integer greater than or equal to 1, N2 is a positive integer greater than or equal to 1, and M2 is greater than or equal to N2.
[0290] A context model corresponding to the first index value and a context model corresponding to the second index value are the same, or a context model corresponding to the first index value and a context model corresponding to the second index value are different.
[0291] The obtaining module 83 obtains candidate motion information corresponding to the first index value from the motion information list, and determines the obtained candidate motion information corresponding to the first index value as the first target motion information of the first triangular sub-block, specifically: If the first index value is an even number and the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list0 as first target motion information of the first triangle sub-block; When the first index value is an even number and the candidate motion information corresponding to the first index value does not include unidirectional motion information corresponding to list0, determine the unidirectional motion information corresponding to list1 as the first target motion information of the first triangle sub-block; If the first index value is an odd number and the candidate motion information corresponding to the first index value includes unidirectional motion information corresponding to list1, determine the unidirectional motion information corresponding to list1 as first target motion information of the first triangle sub-block; When the first index value is an odd number and the candidate motion information corresponding to the first index value does not include unidirectional motion information corresponding to list1, the unidirectional motion information corresponding to list0 is used to determine the first target motion information of the first triangle subblock.
[0292] Obtaining candidate motion information corresponding to the second index value from the motion information list, and determining the obtained candidate motion information corresponding to the second index value as second target motion information of the second triangular sub-block;
[0293] When the second index value is an even number and the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list0 as second target motion information of the second triangular sub-block; and when the second index value is an even number and the candidate motion information corresponding to the second index value does not include unidirectional motion information corresponding to list0, determining the unidirectional motion information corresponding to list1 as second target motion information of the second triangular sub-block; When the second index value is an odd number and the candidate motion information corresponding to the second index value includes unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list1 as second target motion information of the second triangle sub-block; When the second index value is an odd number and the candidate motion information corresponding to the second index value does not include unidirectional motion information corresponding to list1, determining the unidirectional motion information corresponding to list0 as the second target motion information of the second triangle subblock.
[0294] The obtaining module 83 further obtains a first candidate set and a second candidate set, the first candidate set including a part of the candidate motion information in the motion information list, and the second candidate set including a part of the candidate motion information in the motion information list, and the candidate motion information in the first candidate set and the candidate motion information in the second candidate set are not completely identical; obtains candidate motion information corresponding to the first index value from the first candidate set; and determines the obtained candidate motion information corresponding to the first index value as the first target motion information of the first triangular sub-block;
[0295] It is used to obtain candidate motion information corresponding to the second index value from the second candidate set, and determine the candidate motion information corresponding to the obtained second index value as the second target motion information of the second triangular subblock.
[0296] The device further includes a storage module, which is used to store, for a sub-block using unweighted prediction compensation in a first triangular sub-block, first target motion information for the sub-block, for a sub-block using unweighted prediction compensation in a second triangular sub-block, second target motion information for the sub-block, and for a sub-block using weighted prediction compensation, store the first target motion information, second target motion information or bidirectional motion information for the sub-block.
[0297] The storage module, for a sub-block using weighted prediction compensation, specifically stores the first target motion information, the second target motion information, or the bidirectional motion information for the sub-block.
[0298] storing first desired motion information for the sub-block; or storing second desired motion information for the sub-block; or storing first desired motion information or second desired motion information for the sub-block according to the position of the sub-block; or storing first target motion information or second target motion information for the sub-block according to a partition direction of the current block; or It is used to store the first target motion information or the second target motion information for the sub-block according to the position of the sub-block and the partition direction of the current block.
[0299] The storage module specifically comprises, for a sub-block using weighted prediction compensation, when storing the first target motion information, the second target motion information, or the bidirectional motion information for the sub-block:
[0300] if the first target motion information and the second target motion information are from different lists, merging the first target motion information and the second target motion information into bidirectional motion information and storing the bidirectional motion information for the sub-block; It is used to store the first target motion information for the sub-block, or to store the second target motion information for the sub-block, if the first target motion information and the second target motion information are from the same list.
[0301] The storage module stores the first desired motion information for the sub-block; or, when storing the second desired motion information for the sub-block, specifically stores the first desired motion information for the sub-block; or storing the second desired motion information for the sub-block; or storing first desired motion information or second desired motion information for the sub-block according to the position of the sub-block; or storing first target motion information or second target motion information for the sub-block according to a partition direction of the current block; or storing first desired motion information or second desired motion information for the sub-block according to the position of the sub-block and the partition direction of the current block; or storing an average value of the first desired motion information and the second desired motion information for the sub-block; or According to size information of the current block, first target motion information or second target motion information for the sub-block is stored.
[0302] The decoding device provided in the embodiment of the present application, from the viewpoint of hardware, has a schematic diagram of its hardware architecture shown in Fig. 9A. The decoding device includes a processor 91 and a computer-readable storage medium 92, the computer-readable storage medium 92 stores computer-executable commands executed by the processor 91, and the processor 91 executes the computer-executable commands to realize the method disclosed in the above examples of the present application.
[0303] For example, the processor 91 If the feature information of the current block satisfies a certain condition, dividing the current block into a first triangular sub-block and a second triangular sub-block; constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; Obtaining first target motion information of the first triangular sub-block and second target motion information of the second triangular sub-block from the motion information list, and determining that the first target motion information is different from the second target motion information; performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block; Execute computer-executable commands to achieve the above.
[0304] The encoding device provided in the embodiment of the present application is, from the viewpoint of hardware, the schematic diagram of the hardware architecture of which is shown in Fig. 9B. It includes a processor 93 and a computer-readable storage medium 94, the computer-readable storage medium 94 storing computer-executable commands executed by the processor 93, and the processor 93 executes the computer-executable commands to realize the method disclosed in the above examples of the present application.
[0305] For example, the processor 93 may If the feature information of the current block satisfies a certain condition, dividing the current block into a first triangular sub-block and a second triangular sub-block; constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; Obtaining first target motion information of the first triangular sub-block and second target motion information of the second triangular sub-block from the motion information list, and determining that the first target motion information is different from the second target motion information; performing motion compensation on the first triangular sub-block based on the first target motion information to obtain a predicted value of the first triangular sub-block, and performing motion compensation on the second triangular sub-block based on the second target motion information to obtain a predicted value of the second triangular sub-block; Execute computer-executable commands to achieve the above.
[0306] Based on the same idea as the above method, the embodiment of the present application further provides a computer-readable storage medium, in which some computer commands are stored. When the computer commands are executed by a processor, the codec method disclosed in the above examples of the present application can be realized. Wherein, the computer-readable storage medium can be any electronic, magnetic, optical or other physical storage device, and can contain or store information, such as executable commands or data. For example, the computer-readable storage medium can be a random access memory (RAM), a volatile memory, a non-volatile memory, a flash memory, a storage drive (such as a hard disk drive), a solid-state disk, any type of storage disk (such as an optical disk, a DVD, etc.), or a similar storage medium, or a combination thereof.
[0307] The system, device, module or unit described in the above embodiments can be realized by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer, which may be specifically a personal computer, a laptop computer, a mobile phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an e-mail transceiver, a game console, a tablet computer, a wearable device, or some combination thereof.
[0308] For convenience of explanation, the above devices will be described by dividing them into various units according to their functions. Of course, in implementing the present application, the functions of each unit may be realized by the same or multiple software and / or hardware. Those skilled in the art should understand that the present application may provide a method, a system, or a computer program product. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. The present application may also take the form of a computer program product embodied in one or more computer usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) having computer usable program code thereon.
[0309] The present application has been described with reference to flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams, may be realized by computer program commands. Providing these computer program commands to a processor of a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing device produces a device that performs the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams by the commands executed by the processor of the computer or other programmable data processing device. Also, storing these computer program commands in a computer readable memory that supports the computer or other programmable data processing device to operate in a specific manner produces a product including a command device that performs the functions specified in one or more processes in the flowcharts and / or one or more blocks in the block diagrams by the commands stored in the computer readable memory.
[0310] In addition, by implementing these computer program commands in a computer or other programmable data processing device, the computer or other programmable device executes a series of operation steps to perform the processing realized by the computer, whereby the commands executed by the computer or other programmable device realize the functions specified in one or more processes in the flowchart and / or one or more blocks in the block diagram. The above describes the embodiments of the present application, but does not limit the present application. For those skilled in the art, there are various modifications and variations of the present application. All modifications, equivalent replacements, improvements, etc. made without departing from the spirit and principles of the present application are within the scope of protection of the present application.
Claims
1. obtaining first target motion information and second target motion information, the first target motion information being target motion information of a first sub-block into which a current block is partitioned, the second target motion information being target motion information of a second sub-block into which a current block is partitioned, the first target motion information being different from the second target motion information, and the first sub-block and the second sub-block being two triangular sub-blocks into which a current block is partitioned by a partition line; determining a first area, a second area, and a third area included in a current block based on the first sub-block and the second sub-block partitioned by a partition line, the first area being located within the first sub-block, the second area being located within the second sub-block, the partition line being located within the third area, and there being overlapping areas between both the third area and the first sub-block and between the third area and the second sub-block; storing motion information of a current block, and if the first target motion information and the second target motion information are from the same reference frame list, storing the second target motion information as target motion information of the third region, and if the first target motion information and the second target motion information are from different reference frame lists, merging the first target motion information and the second target motion information into bidirectional motion information and then storing it as target motion information of the third region; A method of decoding, comprising:
2. When storing motion information, the motion information is stored in units of 4*4 blocks. Or, the two triangular sub-blocks are two triangular sub-blocks obtained by partitioning the current block according to a partitioning scheme indicated by the indication information; 2. The method of claim 1, wherein the first and second bits are encoded in a first bit sequence.
3. a sub-block in the first region is a sub-block using unweighted prediction compensation, and the first target motion information is stored as target motion information of the sub-block in the first region; a sub-block in the second region is a sub-block using unweighted prediction compensation, and the second target motion information is stored as target motion information of the sub-block in the second region; 2. The method of claim 1, further comprising:
4. After determining a first area, a second area, and a third area included in a current block based on the first sub-block and the second sub-block divided by the dividing line, performing motion compensation on each sub-block in the first region based on the first target motion information to obtain a predicted value of each sub-block in the first region; performing motion compensation on each sub-block in the second region based on the second target motion information to obtain a predicted value of each sub-block in the second region; performing weighted compensation for each sub-block in the third region based on the first desired motion information and the second desired motion information to obtain a predicted value for each sub-block in the third region; determining a prediction value of the current block based on the prediction value of each sub-block in the first region, the prediction value of each sub-block in the second region, and the prediction value of each sub-block in the third region; Including, performing weighted compensation on each sub-block in the third region based on the first desired motion information and the second desired motion information to obtain a predicted value of each sub-block in the third region; for each sub-block in the third region, determining a first prediction value for the sub-block based on the first desired motion information and determining a second prediction value for the sub-block based on the second desired motion information; performing weighted compensation on the sub-block based on the first predicted value, a first weighting factor corresponding to the first predicted value, the second predicted value, and a second weighting factor corresponding to the second predicted value to obtain a predicted value of the sub-block; 2. The method of claim 1, comprising:
5. Obtaining the first target motion information and the second target motion information includes: constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; obtaining first target motion information of the first sub-block and second target motion information of the second sub-block from the motion information list; Including, 2. The method of claim 1, wherein the first and second bits are encoded in a first bit sequence.
6. Obtaining the first target motion information and the second target motion information includes: constructing a motion information list for the current block, the motion information list including a plurality of candidate motion information; selecting, from the motion information list, candidate motion information corresponding to a first index value indicated by the indication information, and setting the candidate motion information as the first target motion information; selecting, from the motion information list, candidate motion information corresponding to a second index value indicated by the indication information, and setting the candidate motion information as the second target motion information; 2. The method of claim 1, comprising:
7. When the motion information mode of the current block, the size information of the current block, the frame type of the current frame, and the sequence level switch control information of the current block meet a certain condition, carry out the steps of claim 1; The motion information mode of the current block satisfies a certain condition, including that the motion information mode of the current block is a merge mode, and the motion information mode of the current block is not a normal merge mode, a sub-block merge mode, or a CIIP mode; The frame type of the current frame satisfies a specific condition, including that the current frame to which the current block belongs is a B frame.
2. The method of claim 1, wherein the first and second bits are encoded in a first bit sequence.
8. If a first predicted value is P1, a second predicted value is P2, a first weighting factor is a, and a second weighting factor is b, then a weighted compensated predicted value of the subblock is P1*a+P2*b, the set of values of the first weighting factor is {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8}, the sum of the first weighting factor and the second weighting factor is 1, each sub-block in the third region includes a luminance component, and the set of weighting coefficients used for the luminance component is {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8}; For any one of the luminance components, the first predicted value is a luminance predicted value determined based on a first target motion information, the second predicted value is a luminance predicted value determined based on a second target motion information, and the weighted compensated predicted value of the corresponding sub-block is a weighted compensated luminance predicted value determined based on the first predicted value, the second predicted value, the first weighting factor, and the second weighting factor.
5. The method of claim 4.
9. each sub-block in the third region includes a chrominance component; For a chroma component, the first predicted value is a chroma predicted value determined based on the first desired motion information, the second predicted value is a chroma predicted value determined based on the second desired motion information, and the weighted compensated predicted value of the sub-block is a weighted compensated chroma predicted value determined based on the first predicted value, the second predicted value, the first weighting factor, and the second weighting factor.
9. The method of claim 8.
10. a module for obtaining first target motion information and second target motion information, the first target motion information being target motion information of a first sub-block into which a current block is partitioned, the second target motion information being target motion information of a second sub-block into which a current block is partitioned, the first target motion information being different from the second target motion information, and the first sub-block and the second sub-block being two triangular sub-blocks into which a current block is partitioned by a partition line; a module for determining a first region, a second region, and a third region included in a current block based on the first sub-block and the second sub-block partitioned by a partition line, the module including: the first region located within the first sub-block; the second region located within the second sub-block; the partition line located within the third region; and an overlapping region existing between both the third region and the first sub-block and the third region and the second sub-block; a module for storing motion information of a current block, the module storing the second target motion information as target motion information of the third region when the first target motion information and the second target motion information are from the same reference frame list, and merging the first target motion information and the second target motion information into bidirectional motion information and then storing the bidirectional motion information as target motion information of the third region when the first target motion information and the second target motion information are from different reference frame lists; 13. A decoding device comprising:
11. When storing motion information, the motion information is stored in units of 4*4 blocks. Alternatively, the sub-blocks in the first region are sub-blocks that use unweighted prediction compensation, and the first target motion information is stored as the target motion information of the sub-blocks in the first region; the sub-blocks in the second region are sub-blocks that use unweighted prediction compensation, and the second target motion information is stored as the target motion information of the sub-blocks in the second region; Or the decoding device further comprises: performing motion compensation on each sub-block in the first region based on the first target motion information to obtain a predicted value of each sub-block in the first region; performing motion compensation on each sub-block in the second region based on the second target motion information to obtain a predicted value of each sub-block in the second region; performing weighted compensation for each sub-block in the third region based on the first desired motion information and the second desired motion information to obtain a predicted value for each sub-block in the third region; determining a predicted value of the current block based on the predicted value of each sub-block in the first region, the predicted value of each sub-block in the second region, and the predicted value of each sub-block in the third region; It is used for performing weighted compensation on each sub-block in the third region based on the first desired motion information and the second desired motion information to obtain a predicted value of each sub-block in the third region; for each sub-block in the third region, determining a first prediction value for the sub-block based on the first desired motion information and determining a second prediction value for the sub-block based on the second desired motion information; performing weighted compensation on the sub-block based on the first predicted value, a first weighting factor corresponding to the first predicted value, the second predicted value, and a second weighting factor corresponding to the second predicted value to obtain a predicted value of the sub-block; 11. The decoding device according to claim 10, comprising:
12. A decryption device including a processor and a computer-readable storage medium storing computer-executable instructions executable by the processor, The processor is configured to execute computer-executable instructions to implement the decoding method of any one of claims 1 to 9. A decryption device comprising:
13. 1. An electronic device including a processor and a memory for storing instructions executable by the processor, 10. An electronic device, characterized in that the processor is arranged to execute the decoding method according to any one of claims 1 to 9.
14. A non-volatile storage medium storing commands, A non-volatile storage medium, which, when the commands are executed by a processor, realizes the decoding method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Apparatuses and methods for inter prediction of a triangle partition of a coding block
WO2020073896A1
Position dependent storage of motion information
WO2020094078A1
Triangle motion information for video coding
WO2020118064A1
