A coding and decoding method, device and equipment thereof
By dividing the current block into sub-blocks and performing weighted prediction, the problem of poor object edge prediction in inter-frame coding is solved, improving the accuracy and performance of coding.
Patent Information
- Application Number
- CN202310489496.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2039-07-23
AI Technical Summary
In existing technologies, the prediction of the current block of object edges during inter-frame coding is not good, the coding residual is large, the coding performance is poor, and it is impossible to effectively utilize the spatiotemporal correlation of video for accurate prediction.
The current block is divided into at least two sub-blocks, and the prediction mode information and prediction value of each sub-block are obtained. The target prediction value of the current block is obtained through weighted processing, thereby improving the prediction accuracy.
By combining sub-block prediction and weighted processing, the prediction accuracy and coding performance of inter-frame coding are improved, and the coding residual is reduced.
Smart Images

Figure CN116405697B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of coding and decoding technology, and in particular to a coding and decoding method, device and equipment thereof. Background Art
[0002] In order to save space, video images are transmitted after being encoded. The complete video encoding method may include prediction, transformation, quantization, entropy coding, filtering and other processes. Among them, predictive coding may include intra-frame coding and inter-frame coding. Furthermore, inter-frame coding uses the correlation of the video time domain to predict the current pixel using the pixels of the adjacent encoded image to effectively remove the redundancy of the video time domain. In addition, intra-frame coding refers to using the correlation of the video space domain to predict the current pixel using the pixels of the encoded block of the current frame image to remove the redundancy of the video space domain.
[0003] In inter-frame coding, a motion vector (MV) can be used to represent the relative displacement between the current block of the current frame image and the reference block of the reference frame image. For example, there is a strong temporal correlation between the current frame image A and the reference frame image B. When the current block A1 of image A needs to be transmitted, a motion search can be performed in image B to find the reference block B1 that best matches the current block A1, and determine the relative displacement between the current block A1 and the reference block B1, that is, the motion vector of the current block A1.
[0004] In the prior art, the current block is a rectangle, but the edge of an actual object is often not a rectangle. For the current block at the edge of an object, there are often two different objects (such as a foreground object and a background). In this case, only a single prediction mode is used to predict the current block, which has problems such as poor prediction effect, large coding residual, and poor coding performance. Summary of the invention
[0005] The present application provides a coding and decoding method, apparatus and device thereof, which improve the accuracy of prediction.
[0006] The present application provides a coding and decoding method, the method comprising:
[0007] When determining to start sub-block-based joint prediction for a current block, obtaining block partitioning information of the current block;
[0008] Dividing the current block into at least two sub-blocks according to the block division information;
[0009] Obtain prediction mode information corresponding to the at least two sub-blocks respectively;
[0010] Acquire prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information;
[0011] The prediction value of the current block is obtained according to the prediction values respectively corresponding to the at least two sub-blocks.
[0012] The present application provides a coding and decoding method, the method comprising:
[0013] When determining that the current block starts the target weighted prediction, the target prediction value of the current block is obtained by the following steps, and the target prediction value is used for encoding or decoding of the current block:
[0014] Obtaining a first prediction mode and a second prediction mode corresponding to the current block;
[0015] Determine a first prediction value corresponding to the current block according to the first prediction mode;
[0016] Determine a second prediction value corresponding to the current block according to the second prediction mode;
[0017] A weighted process is performed according to the first prediction value and the second prediction value to obtain a target prediction value of the current block.
[0018] The present application provides a coding and decoding device, the device comprising:
[0019] An acquisition module, used for acquiring block partitioning information of the current block when determining to start sub-block-based joint prediction for the current block;
[0020] A processing module, configured to divide the current block into at least two sub-blocks according to the block division information;
[0021] The acquisition module is also used to obtain prediction mode information corresponding to the at least two sub-blocks respectively; obtain prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information; and obtain the prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks respectively.
[0022] The present application provides a coding and decoding device, the device comprising: an acquisition module, used to acquire a first prediction mode and a second prediction mode corresponding to the current block when determining that a target weighted prediction is started for the current block;
[0023] a determination module, configured to determine a first prediction value corresponding to the current block according to the first prediction mode; and determine a second prediction value corresponding to the current block according to the second prediction mode;
[0024] A processing module is used to perform weighted processing according to the first prediction value and the second prediction value to obtain a target prediction value of the current block, and the target prediction value is used for encoding or decoding of the current block.
[0025] The present application provides a decoding end device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
[0026] The processor is used to execute machine executable instructions to implement the following steps:
[0027] When determining to start sub-block-based joint prediction for a current block, obtaining block partitioning information of the current block; dividing the current block into at least two sub-blocks according to the block partitioning information; obtaining prediction mode information corresponding to the at least two sub-blocks; obtaining prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining a prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
[0028] When determining that a target weighted prediction is started for a current block, a first prediction mode and a second prediction mode corresponding to the current block are obtained; a first prediction value corresponding to the current block is determined according to the first prediction mode; a second prediction value corresponding to the current block is determined according to the second prediction mode; and a target prediction value of the current block is obtained by performing weighted processing according to the first prediction value and the second prediction value, and the target prediction value is used for decoding the current block.
[0029] The present application provides an encoding end device, a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor;
[0030] The processor is used to execute machine executable instructions to implement the following steps:
[0031] When determining to start sub-block-based joint prediction for a current block, obtaining block partitioning information of the current block; dividing the current block into at least two sub-blocks according to the block partitioning information; obtaining prediction mode information corresponding to the at least two sub-blocks; obtaining prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining a prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
[0032] When determining that the current block starts target weighted prediction, obtain a first prediction mode and a second prediction mode corresponding to the current block; determine a first prediction value corresponding to the current block according to the first prediction mode; determine a second prediction value corresponding to the current block according to the second prediction mode; perform weighted processing according to the first prediction value and the second prediction value to obtain a target prediction value of the current block, and the target prediction value is used for encoding the current block.
[0033] It can be seen from the above technical solution that in the embodiment of the present application, when determining to start the joint prediction based on the sub-block for the current block, the current block can be divided into at least two sub-blocks, and the prediction values corresponding to the at least two sub-blocks are obtained, and the prediction value of the current block is obtained according to the prediction values corresponding to the at least two sub-blocks. In the above manner, prediction can be performed for at least two sub-blocks respectively, which can improve the prediction accuracy, improve the prediction performance, improve the coding performance, and reduce the coding residual. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic diagram of a video coding framework in one implementation of the present application;
[0035] Figure 2 is a flowchart of a coding and decoding method in one embodiment of the present application;
[0036] Figure 3A-3H is a schematic diagram of dividing the current block in one implementation manner of the present application;
[0037] Figure 4A-4D is a schematic diagram of an intra block copy prediction mode and an intra block copy prediction mode;
[0038] Figure 5A-5H is a schematic diagram of an intra-frame block copy prediction mode and an inter-frame prediction mode;
[0039] Figure 5I-5L It is a schematic diagram of determining an intra-frame block copy prediction mode and an inter-frame prediction mode based on surrounding block prediction modes;
[0040] Figure 6A-6H is a schematic diagram of an intra block copy prediction mode and an intra prediction mode;
[0041] Figure 7A-7D is a schematic diagram of determining an intra-block copy prediction mode and an intra-frame prediction mode based on a surrounding block prediction mode;
[0042] Figure 8A-8D is a schematic diagram of intra prediction mode and intra prediction mode;
[0043] Figure 9A-9D It is a schematic diagram of intra-frame prediction mode and inter-frame prediction mode;
[0044] Figures 10A-10D is a schematic diagram of determining an intra-frame prediction mode and an inter-frame prediction mode based on surrounding block prediction modes;
[0045] Figures 11A-11D is a schematic diagram of an inter prediction mode and an intra prediction mode;
[0046] Figures 12A-12F It is a schematic diagram of a process for obtaining a predicted value in one embodiment of the present application;
[0047] Fig.13 is a flowchart of a coding and decoding method in one embodiment of the present application;
[0048] Fig.14 is a schematic structural diagram of a coding and decoding device in one embodiment of the present application;
[0049] Fig.15 is a schematic structural diagram of a coding and decoding device in one embodiment of the present application;
[0050] Fig.16 is a hardware structure diagram of a decoding end device in one embodiment of the present application;
[0051] Fig.17 It is a hardware structure diagram of an encoding end device in one implementation of the present application. DETAILED DESCRIPTION
[0052] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items. It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at the time of" or "when" or "in response to determination".
[0053] In the embodiments of the present application, a coding and decoding method, apparatus and device thereof are proposed, which may involve the following concepts:
[0054] Intra prediction, inter prediction and IBC (intra block copy) prediction:
[0055] Intra-frame prediction refers to the use of the correlation in the video spatial domain to predict the current pixel using the pixels of the coded blocks of the current image to remove the spatial redundancy of the video. Intra-frame prediction specifies multiple prediction modes, each of which corresponds to a texture direction (except the DC mode). The predicted pixel of the current block is generated by the reconstructed pixel value of the boundary of the adjacent block in its prediction direction. For example, if the texture of the image is arranged horizontally, the horizontal prediction mode can better predict the image information.
[0056] Inter-frame prediction refers to the use of adjacent coded image pixels to predict the pixels of the current image based on the correlation of the video time domain. Since the video sequence contains strong temporal correlation, it can effectively remove the temporal redundancy of the video. The inter-frame prediction part of the video coding standard uses block-based motion compensation technology. The main principle is to find a best matching block in the previously coded image for each pixel block of the current image. This process is called motion estimation (ME).
[0057] Intra Block Copy (IBC) means that the same-frame reference is allowed, and the reference data of the current block comes from the same frame. Intra Block Copy can also be called Intra Block Copy. In the Screen Content Coding extension standard of HEVC (High Efficiency Video Coding), intra block copy technology was proposed, and the block vector was used to obtain the prediction value of the current block. Based on the characteristic that there are a large number of repetitive textures in the same frame of the screen content, when the block vector is used to obtain the prediction value of the current block, the compression efficiency of the screen content sequence can be significantly improved. Subsequently, during the formulation of the VVC (Versatile Video Coding) standard, the intra block copy technology was adopted again.
[0058] Motion Vector (MV): In inter-frame coding, a motion vector can be used to represent the relative displacement between the current block of the current frame video image and the reference block of the reference frame video image. Each divided block has a corresponding motion vector transmitted to the decoding end. If the motion vector of each block is independently encoded and transmitted, especially when divided into a large number of small-sized blocks, a considerable number of bits are consumed. In order to reduce the number of bits used to encode the motion vector, the spatial correlation between adjacent blocks can be used to predict the motion vector of the current block to be encoded based on the motion vector of the adjacent encoded block, and then the prediction difference is encoded, which can effectively reduce the number of bits representing the motion vector. Furthermore, in the process of encoding the motion vector of the current block, the motion vector of the current block can be first predicted using the motion vector of the adjacent encoded block, and then the difference (MVD, Motion Vector Difference) between the predicted value (MVP, Motion Vector Prediction) of the motion vector and the true estimate of the motion vector is encoded, thereby effectively reducing the number of bits for encoding the motion vector.
[0059] Motion Information: Since the motion vector represents the position offset between the current block and a reference block, in order to accurately obtain the information pointing to the block, in addition to the motion vector, the index information of the reference frame image is also required to indicate which reference frame image the current block uses. In video coding technology, for the current frame image, a reference frame image list can usually be established, and the reference frame image index information indicates which reference frame image in the reference frame image list is used by the current block. In addition, many coding technologies also support multiple reference image lists, so an index value can also be used to indicate which reference image list is used. This index value can be called a reference direction. In summary, in video coding technology, motion-related information such as motion vectors, reference frame indexes, and reference directions can be collectively referred to as motion information.
[0060] Block Vector (BV): Block vectors are used in intra-frame block copy technology, which uses block vectors for motion compensation, that is, using block vectors to obtain the predicted value of the current block. Unlike motion vectors, block vectors represent the relative displacement between the current block and the best matching block in the encoded blocks of the current frame. Based on the fact that there are a large number of repeated textures in the same frame, when block vectors are used to obtain the predicted value of the current block, the compression efficiency can be significantly improved.
[0061] Intra-frame prediction mode: In intra-frame coding, intra-frame prediction mode can be used for motion compensation, that is, intra-frame prediction mode is used to obtain the prediction value of the current block. For example, intra-frame prediction mode can include Planar mode, DC mode and 33 angle modes. See Table 1 for examples of intra-frame prediction modes. Planar mode corresponds to mode 0, DC mode corresponds to mode 1, and the remaining 33 angle modes correspond to modes 1-34. Planar mode is suitable for areas where pixel values change slowly. Two linear filters in the horizontal and vertical directions are used, and the average value of the two is used as the prediction value of the current block pixel. DC mode is suitable for large flat areas. The average value of the surrounding pixels of the current block is used as the predicted pixel value of the current block. There are 33 angle modes, mode 26 represents the vertical direction, and mode 10 represents the horizontal direction. In the latest new generation codec standard VVC, more subdivided angle directions are adopted, such as a total of 67 angle modes.
[0062] Table 1
[0063]
[0064]
[0065] Rate-Distortion Optimized: There are two major indicators for evaluating coding efficiency: bit rate and PSNR (Peak Signal to Noise Ratio). The smaller the bit stream, the greater the compression rate, and the greater the PSNR, the better the quality of the reconstructed image. When selecting a mode, the discriminant formula is essentially a comprehensive evaluation of the two. For example, the cost corresponding to the mode: J(mode) = D + λ*R, where D represents Distortion, which can usually be measured using the SSE indicator. SSE refers to the mean square sum of the differences between the reconstructed image block and the source image; λ is the Lagrange multiplier, and R is the actual number of bits required for encoding the image block in this mode, including the sum of bits required for encoding mode information, motion information, residuals, etc.
[0066] Video Coding Framework: See Figure 1 As shown, the video encoding framework can be used to implement the encoding end processing flow of the embodiment of the present application. In addition, the schematic diagram of the video decoding framework is similar to Figure 1Similarly, no further description will be given here, and the decoding end processing flow of the embodiment of the present application can be implemented using a video decoding framework. Specifically, in the video encoding framework and the video decoding framework, modules such as intra-frame prediction, motion estimation / motion compensation, reference image buffer, in-loop filtering, reconstruction, transformation, quantization, inverse transformation, inverse quantization, and entropy encoder can be included. At the encoding end, the encoding end processing flow can be implemented through the cooperation between these modules, and at the decoding end, the decoding end processing flow can be implemented through the cooperation between these modules.
[0067] The encoding and decoding method is described in detail below in conjunction with several specific embodiments.
[0068] Example 1: See Figure 2 FIG. 1 is a flow chart of a coding and decoding method in an embodiment of the present application. The coding and decoding method can be applied to a decoding end or an encoding end. The coding and decoding method can include the following steps:
[0069] Step 201: when it is determined to start sub-block-based joint prediction for a current block, block partitioning information of the current block is obtained.
[0070] Step 202: divide the current block into at least two sub-blocks according to the block division information.
[0071] For the convenience of description, in the embodiment of the present application, the current block is divided into two sub-blocks as an example for description, that is, the current block is divided into a first sub-block and a second sub-block according to the block division information. For the case where the current block is divided into three or more sub-blocks, the implementation process is similar to the implementation process of the two sub-blocks, and will not be repeated later.
[0072] Step 203: Obtain prediction mode information corresponding to at least two sub-blocks.
[0073] For example, prediction mode information corresponding to the first sub-block is obtained, and prediction mode information corresponding to the second sub-block is obtained.
[0074] Step 204: Obtain prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information corresponding to the at least two sub-blocks respectively. For example, obtain the prediction value corresponding to the first sub-block according to the prediction mode information corresponding to the first sub-block, and obtain the prediction value corresponding to the second sub-block according to the prediction mode information corresponding to the second sub-block.
[0075] Step 205: Obtain a prediction value of the current block according to the prediction values corresponding to at least two sub-blocks.
[0076] As can be seen from the above technical solutions, in this embodiment, when determining to start sub-block-based joint prediction for the current block, the current block can be divided into at least two sub-blocks, and the prediction values corresponding to the at least two sub-blocks are obtained, and the prediction value of the current block is obtained according to the prediction values corresponding to the at least two sub-blocks. In the above manner, prediction can be performed for at least two sub-blocks respectively, which can improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residuals.
[0077] In step 201, the decoding end or the encoding end needs to determine whether to start the sub-block-based joint prediction for the current block. If the sub-block-based joint prediction is started for the current block, the encoding and decoding method of the embodiment of the present application can be used. If the sub-block-based joint prediction is not started for the current block, the encoding and decoding method of the embodiment of the present application may not be used.
[0078] Exemplarily, it can be determined whether the characteristic information of the current block meets a specific condition; if yes, it is determined to start the sub-block-based joint prediction for the current block; if not, it is determined not to start the sub-block-based joint prediction for the current block. The characteristic information may include but is not limited to one of the following or any combination: the frame type of the current frame where the current block is located, the size information of the current block, and the switch control information. The switch control information may be SPS (sequence level) switch control information, or PPS (picture parameter level) switch control information, or TILE (tile level) switch control information.
[0079] For example, if the characteristic information is the frame type of the current frame where the current block is located, the frame type of the current frame where the current block is located satisfies specific conditions, which may include but is not limited to: if the frame type of the current frame where the current block is located is a B frame, then it is determined that the frame type satisfies the specific conditions; or, if the frame type of the current frame where the current block is located is an I frame, then it is determined that the frame type satisfies the specific conditions.
[0080] For example, if the characteristic information is the size information of the current block, and the size information includes the width of the current block and the height of the current block, then the size information of the current block satisfies a specific condition, which may include but is not limited to: if the width of the current block is greater than or equal to the first value, and the height of the current block is greater than or equal to the second value, it is determined that the size information of the current block satisfies the specific condition. Or, if the width of the current block is greater than or equal to the third value, the height of the current block is greater than or equal to the fourth value, the width of the current block is less than or equal to the fifth value, and the height of the current block is less than or equal to the sixth value, it is determined that the size information of the current block satisfies the specific condition.
[0081] Exemplarily, the above values can be configured based on experience, such as 8, 16, 32, 64, 128, etc., without limitation. In one possible implementation, the first value can be 8, the second value can be 8, the third value can be 8, the fourth value can be 8, the fifth value can be 64, and the sixth value can be 64. Of course, the above are just examples and no limitation is imposed on this. In summary, if the width of the current block is greater than or equal to 8 and the height of the current block is greater than or equal to 8, it is determined that the size information of the current block meets certain conditions. Or, if the width of the current block is greater than or equal to 8, the height of the current block is greater than or equal to 8, the width of the current block is less than or equal to 64, and the height of the current block is less than or equal to 64, it is determined that the size information of the current block meets certain conditions.
[0082] For example, if the characteristic information is switch control information, the switch control information satisfies a specific condition, which may include but is not limited to: if the switch control information is enabled, it is determined that the switch control information satisfies the specific condition. Exemplarily, a switch control information may be added for the geometric partitioning mode, and if the switch control information is enabled, it indicates that the geometric partitioning mode is allowed to be enabled. At this time, the switch control information satisfies the specific condition and can start the sub-block-based joint prediction for the current block.
[0083] For example, if the characteristic information is the frame type of the current frame where the current block is located and the size information of the current block, then when the frame type satisfies a specific condition and the size information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies the specific condition. If the characteristic information is the frame type and switch control information of the current frame where the current block is located, then when the frame type satisfies a specific condition and the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies a specific condition. If the characteristic information is the size information and switch control information of the current block, then when the size information satisfies a specific condition and the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies a specific condition. If the characteristic information is the frame type, the size information and switch control information of the current frame where the current block is located, then when the frame type satisfies a specific condition and the size information satisfies a specific condition and the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies a specific condition.
[0084] In step 201 and step 202, the decoding end or the encoding end needs to obtain block division information of the current block, and divide the current block into at least two sub-blocks according to the block division information, and the at least two sub-blocks include a first sub-block and a second sub-block. Exemplarily, the shape of the first sub-block may be the same as the shape of the second sub-block; or, the shape of the first sub-block may be different from the shape of the second sub-block. The first sub-block may include, but is not limited to, one of the following sub-blocks: a triangular sub-block, a trapezoidal sub-block, and a pentagonal sub-block; the second sub-block may include, but is not limited to, one of the following sub-blocks: a triangular sub-block, a trapezoidal sub-block, and a pentagonal sub-block.
[0085] For example, in the triangle prediction mode (TPM), the current block can be divided into two triangle sub-blocks. Figure 3A As shown in FIG. 1 , it is an example of dividing the current block into two triangular sub-blocks according to the main diagonal line, that is, dividing the current block into two triangular sub-blocks according to the direction of 45 degrees to the horizontal right direction, that is, the first sub-block can be a triangular sub-block, and the second sub-block can also be a triangular sub-block. Figure 3B As shown, it is an example of dividing the current block into two triangular sub-blocks in a sub-diagonal manner, that is, dividing the current block into two triangular sub-blocks in a direction with an angle of 135 degrees to the horizontal right direction, that is, the first sub-block can be a triangular sub-block, and the second sub-block can also be a triangular sub-block.
[0086] For another example, in the geometrical partitioning mode (GEO), different from the partitioning method of two triangular sub-blocks, GEO can support partitioning methods in more directions. The current block can be divided into a triangular sub-block and a trapezoidal sub-block, the current block can also be divided into two trapezoidal sub-blocks, and the current block can also be divided into a triangular sub-block and a pentagonal sub-block. Of course, the above are just a few examples of partitioning in more directions, and there is no restriction on the partitioning direction. In the geometric partitioning mode, the current block can also be divided into two sub-blocks of arbitrary shapes. This article only introduces some possibilities of partitioning.
[0087] See also Figure 3C and Figure 3D As shown, the current block is divided into a triangular sub-block and a trapezoidal sub-block, that is, the first sub-block is a triangular sub-block and the second sub-block is a trapezoidal sub-block. Figure 3E and Figure 3F As shown, the current block is divided into two trapezoidal sub-blocks, that is, the first sub-block is a trapezoidal sub-block, and the second sub-block is a trapezoidal sub-block. Figure 3G and Figure 3H As shown, the current block is divided into a triangular sub-block and a pentagonal sub-block, that is, the first sub-block is a triangular sub-block, and the second sub-block is a pentagonal sub-block.
[0088] Exemplarily, a switch may be added to decide whether to adopt the triangular prediction mode or the geometric partitioning mode.
[0089] In summary, the decoding end or the encoding end can Figure 3A-3H Select a block partition information, such as Figure 3A When Figure 3AThe block division information shown divides the current block into a first sub-block and a second sub-block. Further, in order to obtain the block division information of the current block, the decoding end and the encoding end can obtain the block division information of the current block in the following manner:
[0090] Method 1: The encoder uses a certain block division information by default through a protocol agreement, and the decoder uses the block division information by default through a protocol agreement. Figure 3A The block division information shown is used by the decoder by default through protocol agreement Figure 3A The block division information shown in the figure is used by the encoder. Figure 3A The block division information shown in FIG. 1 divides the current block into a first triangular sub-block and a second triangular sub-block. The decoding end follows Figure 3A The block division information shown in FIG. 1 divides the current block into a first triangular sub-block and a second triangular sub-block. For another example, the encoding end uses the default method through the protocol agreement. Figure 3C The block division information shown is used by the decoder by default through protocol agreement Figure 3C The block division information shown in the figure is used by the encoder. Figure 3C The block division information shown in FIG. 1 divides the current block into a first triangular sub-block and a second trapezoidal sub-block. The decoding end follows Figure 3A The block division information shown divides the current block into a first triangular sub-block and a second trapezoidal sub-block. Of course, the above is only an example and is not limited to this.
[0091] Method 2: Agree on several block division information through the protocol, such as Figure 3A-3H The encoder determines the rate-distortion cost corresponding to each block division information based on part of the block division information or all of the block division information. For example, based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information, the current block is jointly predicted to obtain the prediction information of the current block, and the rate-distortion cost of the current block is determined using the rate-distortion principle and the prediction information. There is no restriction on this process. Then, the encoder selects the minimum rate-distortion cost from all rate-distortion costs, uses the block division information corresponding to the minimum rate-distortion cost as the target block division information, and divides the current block into at least two sub-blocks through the target block division information. For example, if Figure 3A The rate distortion cost of the block partition information shown is the smallest, so the encoder follows Figure 3A The block division information shown is used to divide the current block into a first triangular sub-block and a second triangular sub-block. Figure 3C The rate distortion cost of the block partition information shown is the smallest, so the encoder follows Figure 3C The block division information shown divides the current block into a first triangular sub-block and a second trapezoidal sub-block.
[0092] When the encoder sends the coded bit stream to the decoder, the coded bit stream may carry indication information of block division information, and the indication information is used to indicate the block division information of the current block. After receiving the coded bit stream, the decoder may obtain the indication information of the block division information from the coded bit stream, and determine the block division information of the current block according to the indication information. For example, if the indication information is used to indicate Figure 3A The block division information shown in FIG. Figure 3A The block division information shown divides the current block into a first triangular sub-block and a second triangular sub-block. Figure 3C The block division information shown in FIG. Figure 3C The block division information shown divides the current block into a first triangular sub-block and a second trapezoidal sub-block.
[0093] In step 203, after the encoder or decoder divides the current block into at least two sub-blocks, the encoder or decoder may obtain prediction mode information corresponding to the at least two sub-blocks, and the prediction mode information may include but is not limited to: intra-block copy prediction mode (i.e., IBC mode), intra-frame prediction mode, and inter-frame prediction mode. For example, after the current block is divided into a first sub-block and a second sub-block, the prediction mode information of the first sub-block may be obtained, and the prediction mode information of the second sub-block may be obtained.
[0094] For example, the prediction mode information of the first sub-block may be an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block may be an inter-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block may be an intra-frame block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an inter-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an inter-frame prediction mode. Alternatively, the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode.
[0095] For another example, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block may be an intra-frame block copy prediction mode. Alternatively, the prediction mode information of the first sub-block may be an intra-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block may be an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-frame prediction mode. Alternatively, the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode.
[0096] In summary, the prediction mode information of the first sub-block may be an intra-block copy prediction mode, an intra-frame prediction mode, or an inter-frame prediction mode, and the prediction mode information of the second sub-block may be an intra-block copy prediction mode, an intra-frame prediction mode, or an inter-frame prediction mode. To obtain the prediction mode information of the first sub-block and the prediction mode information of the second sub-block, the following method is adopted:
[0097] Method 1: The encoding end uses prediction mode information A as the prediction mode information of the first sub-block by default through protocol agreement, and uses prediction mode information B (the same as or different from prediction mode information A) as the prediction mode information of the second sub-block. The decoding end uses prediction mode information A as the prediction mode information of the first sub-block by default through protocol agreement, and uses prediction mode information B as the prediction mode information of the second sub-block. For example, the encoding end uses the intra-frame block copy prediction mode as the prediction mode information of the first sub-block and uses the intra-frame prediction mode as the prediction mode information of the second sub-block by default through protocol agreement, and the decoding end uses the intra-frame block copy prediction mode as the prediction mode information of the first sub-block and uses the intra-frame prediction mode as the prediction mode information of the second sub-block by default through protocol agreement. Based on this, for the encoding end and the decoding end, the prediction mode information of the first sub-block can be the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block can be the intra-frame prediction mode.
[0098] Method 2: agree on several groups of prediction mode information through a protocol. For example, agree on the following 6 groups of prediction mode information: the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode; the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the inter-frame prediction mode; the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame block copy prediction mode; the prediction mode information of the first sub-block is the intra-frame prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode; the prediction mode information of the first sub-block is the intra-frame prediction mode, and the prediction mode information of the second sub-block is the inter-frame prediction mode; the prediction mode information of the first sub-block is the inter-frame prediction mode, and the prediction mode information of the second sub-block is the inter-frame prediction mode.
[0099] The encoder determines the rate-distortion cost corresponding to each group of prediction mode information, for example, based on each block partition information, each group of prediction mode information, and candidates in each group of prediction mode information, jointly predicts the current block to obtain the prediction information of the current block, and uses the rate-distortion principle and the prediction information to determine the rate-distortion cost of the current block, without limiting this process. Then, the minimum rate-distortion cost is selected from all rate-distortion costs, and the prediction mode information corresponding to the minimum rate-distortion cost is used as the target prediction mode information, and the prediction mode information of the first sub-block and the prediction mode information of the second sub-block are obtained through the target prediction mode information. For example, if the rate-distortion cost of the first group of prediction mode information is the smallest, the encoder determines that the prediction mode information of the first sub-block is the intra-block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode.
[0100] For example, it is assumed that block partition information A1 and block partition information A2 are included, and the above-mentioned 6 sets of prediction mode information are included.
[0101] First, for the block partition information A1 and the first group of prediction mode information (intra-frame block copy prediction mode + intra-frame prediction mode), traverse a candidate for the intra-frame block copy prediction mode (i.e., block vector, the method for obtaining the block vector can be found in the subsequent embodiments, which will not be described in detail here) and a candidate for the intra-frame prediction mode (i.e., intra-frame sub-prediction mode, the method for obtaining the intra-frame sub-prediction mode can be found in the subsequent embodiments, which will not be described in detail here), and based on these two candidates, jointly predict the current block to obtain the prediction information of the current block, and use the rate-distortion principle and the prediction information to determine the rate-distortion cost of the current block. By analogy, for each candidate for the intra-frame block copy prediction mode and each candidate for the intra-frame prediction mode, the current block can be jointly predicted to obtain the prediction information of the current block, and finally the rate-distortion cost of the current block can be obtained based on the rate-distortion principle.
[0102] Then, for the block division information A1 and the second group of prediction mode information (intra-frame block copy prediction mode + inter-frame prediction mode), traverse a candidate for the intra-frame block copy prediction mode (i.e., block vector) and a candidate for the inter-frame prediction mode (i.e., motion information, the method for obtaining the motion information refers to the subsequent embodiments, which will not be repeated here), and jointly predict the current block based on the two candidates to obtain the prediction information of the current block, and use the rate-distortion principle and the prediction information to determine the rate-distortion cost of the current block. By analogy, for each candidate for the intra-frame block copy prediction mode and each candidate for the inter-frame prediction mode, the current block can be jointly predicted to obtain the prediction information of the current block, and finally the rate-distortion cost of the current block is obtained.
[0103] The above processing is performed on block partition information A1 and the third group of prediction mode information, block partition information A1 and the fourth group of prediction mode information, block partition information A1 and the fifth group of prediction mode information, block partition information A1 and the sixth group of prediction mode information, block partition information A2 and the first group of prediction mode information, block partition information A2 and the second group of prediction mode information, block partition information A2 and the third group of prediction mode information, block partition information A2 and the fourth group of prediction mode information, block partition information A2 and the fifth group of prediction mode information, and block partition information A2 and the sixth group of prediction mode information to obtain the rate-distortion cost of the current block.
[0104] After traversing and obtaining all rate-distortion costs, the minimum rate-distortion cost can be selected from all rate-distortion costs. Assuming that the minimum rate-distortion cost is the rate-distortion cost corresponding to the block partition information A1, the first group of prediction mode information, the first candidate of the intra-frame block copy prediction mode, and the second candidate of the intra-frame prediction mode, then the block partition information corresponding to the minimum rate-distortion cost is the block partition information A1, and the current block is divided into the first sub-block and the second sub-block based on the block partition information A1. The prediction mode information corresponding to the minimum rate-distortion cost is the first group of prediction mode information, that is, the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode. The target candidates corresponding to the minimum rate-distortion cost are the first candidate of the intra-frame block copy prediction mode (i.e., the block vector) and the second candidate of the intra-frame prediction mode (i.e., the intra-frame sub-prediction mode). Of course, the above is only an example of determining the rate-distortion cost, and there is no limitation to this.
[0105] When the encoder sends a coded bit stream to the decoder, the coded bit stream may carry indication information of the prediction mode information. After receiving the coded bit stream, the decoder may obtain the indication information of the prediction mode information from the coded bit stream, and obtain the prediction mode information of the first sub-block and the prediction mode information of the second sub-block according to the indication information. For example, if the indication information is used to indicate the first group of prediction mode information among the above 6 groups of prediction mode information, the decoder determines that the prediction mode information of the first sub-block is the intra-block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode.
[0106] Embodiment 2: With respect to step 204 in Embodiment 1, if the prediction mode information of the first sub-block is the intra-block copy prediction mode, and the prediction mode information of the second sub-block is the intra-block copy prediction mode, then Embodiment 2 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 2, a block vector candidate list is constructed, and the block vector candidate list includes a plurality of candidate block vectors; a candidate block vector is selected from the block vector candidate list as a first target block vector for the first sub-block, and another candidate block vector is selected from the block vector candidate list as a second target block vector for the second sub-block; then, a prediction value corresponding to the first sub-block is obtained according to the first target block vector, and a prediction value corresponding to the second sub-block is obtained according to the second target block vector.
[0107] For example, a block vector candidate list is constructed for the current block, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatially adjacent blocks of the current block, historical block vectors in the HMVP (History-based motion vector prediction, motion vector prediction based on historical information) list corresponding to the current block, default block vectors, etc., and there is no restriction on the construction process of this block vector candidate list. The historical block vectors in the HMVP list refer to: in the HMVP mode, it is necessary to obtain multiple block vectors corresponding to the current block. For the convenience of distinction, the block vectors of the HMVP mode are called historical block vectors. The number of historical block vectors is determined according to needs and there is no restriction on this. The HMVP mode is a technology adopted in the new generation of video coding standards. Its principle is to use the block vectors of the encoded blocks to predict the block vectors of the current block. For example, an HMVP list can be established for the current block. The HMVP list is used to store the block vectors of the encoded blocks. These block vectors can be called historical block vectors.
[0108] After constructing a block vector candidate list for the current block, a candidate block vector can be selected from the block vector candidate list as the first target block vector for the first sub-block, and another candidate block vector can be selected from the block vector candidate list as the second target block vector for the second sub-block. Exemplarily, the first target block vector and the second target block vector can be different.
[0109] After determining the first target block vector of the first sub-block, a prediction value corresponding to the first sub-block can be obtained according to the first target block vector, and the process of obtaining the prediction value is not limited. After determining the second target block vector of the second sub-block, a prediction value corresponding to the second sub-block can be obtained according to the second target block vector, and the process of obtaining the prediction value is not limited.
[0110] Exemplarily, when the first sub-block / the second sub-block adopts the MMVD sub-mode in the intra-frame block copy prediction mode, the block vector candidate list may include the block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes the block vector obtained by offsetting the original block vector, and the original block vector may include but is not limited to: the block vector of the spatial neighboring block of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector, etc. For example, the block vector A1 of the spatial neighboring block A1, the block vector A2 of the spatial neighboring block A2, and the historical block vectors B1-B3 in the HMVP list may be obtained, and the block vector A1, the block vector A2, the historical block vector B1, the historical block vector B2, and the historical block vector B3' obtained by offsetting the historical block vector B3 are added to the block vector candidate list. Alternatively, the block vector A1, the block vector A2' obtained by offsetting the block vector A2, the historical block vector B1, the historical block vector B2, and the historical block vector B3' obtained by offsetting the historical block vector B3 are added to the block vector candidate list. Of course, the above methods are just two examples and are not limited thereto, as long as the block vector candidate list includes at least one block vector obtained by offsetting the original block vector.
[0111] MMVD is to offset the original block vector in a fixed direction and with a fixed vector difference to obtain a new block vector. For example, the new block vector is obtained in the following manner, and the new block vector can be added to the block vector candidate list to participate in the process of determining the target block vector: BV(new)=BV(original)+offset; or, BV(new)=BV(original)-offset.
[0112] BV(new) represents the new block vector obtained after the offset, BV(original) represents the original block vector, offset represents the fixed vector difference, and the value of offset can be arbitrarily configured, such as +1, -1, +2, -2, etc., without any restriction.
[0113] The encoder / decoder selects a candidate block vector from the block vector candidate list as a first target block vector for the first sub-block, and selects another candidate block vector from the block vector candidate list as a second target block vector for the second sub-block, which may include:
[0114] Method 1: The encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and uses the rate-distortion principle and the prediction information to determine the rate-distortion cost of the current block. For the specific method, please refer to the above embodiment and will not be repeated here. Assume that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame block copy prediction mode. For each candidate block vector in the block vector candidate list, the candidate block vector with the minimum rate-distortion cost is used as the first target block vector of the first sub-block. On the basis of excluding the first target block vector, the candidate block vector with the minimum rate-distortion cost is used as the second target block vector of the second sub-block.
[0115] When the encoder sends the encoded bit stream to the decoder, the encoded bit stream carries indication information of the target block vector, and the indication information is used to indicate index information of the first target block vector and index information of the second target block vector. The index information of the first target block vector is used to indicate the first target block vector is the candidate block vector in the block vector candidate list, and the index information of the second target block vector is used to indicate the candidate block vector in the block vector candidate list.
[0116] The decoding end receives the coded bit stream from the encoding end, and parses the indication information from the coded bit stream. Based on the index information of the first target block vector, a candidate block vector corresponding to the index information is selected from the block vector candidate list, and the candidate block vector is the first target block vector of the first sub-block. Based on the index information of the second target block vector, a candidate block vector corresponding to the index information is selected from the block vector candidate list, and the candidate block vector is the second target block vector of the second sub-block.
[0117] Method 2: The encoding end uses the first target block vector and the second target block vector as the default through a protocol agreement, and the decoding end also uses the first target block vector and the second target block vector through a protocol agreement. In this way, the encoded bit stream does not need to carry the indication information of the target block vector, thereby saving the encoding overhead of the indication information of the transmission target block vector.
[0118] For example, the encoder agrees through a protocol that the first candidate block vector in the default block vector candidate list is used as the first target block vector of the first sub-block, and the second candidate block vector in the block vector candidate list is used as the second target block vector of the second sub-block. The decoder agrees through a protocol that the first candidate block vector in the default block vector candidate list is used as the first target block vector of the first sub-block, and the second candidate block vector in the block vector candidate list is used as the second target block vector of the second sub-block.
[0119] Based on Embodiment 2, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block can be an intra-frame block copy prediction mode. See Figure 4A-4D As shown, it is an example that the first sub-block adopts the intra-block copy prediction mode and the second sub-block adopts the intra-block copy prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figure 4A-4D Just examples.
[0120] In Example 2, it is assumed that there are two areas in the current block, one area 1 is the screen content, and the other area 2 is also the screen content. However, area 1 needs to refer to the reference block A in the current frame where the current block is located, and area 2 needs to refer to the reference block B in the current frame where the current block is located. In this application scenario, by dividing the current block into a first sub-block (i.e., the sub-block of the area) and a second sub-block (i.e., the sub-block of area 2), and the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame block copy prediction mode, based on the characteristic that there are a large number of repeated textures in the same frame in the screen content, the first sub-block and the second sub-block both adopt the intra-frame block copy prediction mode, which can improve the encoding effect.
[0121] Embodiment 3: For step 204 in Embodiment 1, if the prediction mode information of the first sub-block is an intra-block copy prediction mode and the prediction mode information of the second sub-block is an inter-frame prediction mode, then Embodiment 3 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 3, a block vector candidate list is constructed, the block vector candidate list includes multiple candidate block vectors; a candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. A motion information candidate list is constructed, the motion information candidate list includes at least one candidate motion information; a candidate motion information is selected from the motion information candidate list as the target motion information of the second sub-block. A prediction value corresponding to the first sub-block is obtained according to the target block vector; a prediction value corresponding to the second sub-block is obtained according to the target motion information.
[0122] For example, a block vector candidate list is constructed for the current block, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatially adjacent blocks of the current block, historical block vectors in the HMVP list corresponding to the current block, default block vectors, etc., and there is no restriction on the construction process of this block vector candidate list. After the block vector candidate list is constructed for the current block, a candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. After the target block vector of the first sub-block is determined, a prediction value corresponding to the first sub-block can be obtained according to the target block vector, and there is no restriction on the process of obtaining this prediction value.
[0123] Exemplarily, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list may include the block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes at least one block vector obtained by offsetting the original block vector, and the original block vector may include but is not limited to: the block vector of the spatial neighboring block of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector, etc.
[0124] The encoder / decoder obtains the target block vector of the first sub-block from the block vector candidate list, which may include but is not limited to:
[0125] Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate-distortion cost of the current block using the rate-distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the inter-frame prediction mode. For each candidate block vector in the block vector candidate list, the candidate block vector with the minimum rate-distortion cost is used as the target block vector of the first sub-block. When the encoder sends the coded bit stream to the decoder, the coded bit stream may carry indication information of the target block vector, and the indication information is used to indicate the index information of the target block vector, and the index information is used to indicate the candidate block vector in the block vector candidate list. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target block vector, a candidate block vector corresponding to the index information is selected from the block vector candidate list, and the candidate block vector is the target block vector of the first sub-block.
[0126] Method 2: The encoder agrees on a default target block vector through a protocol, and the decoder agrees on a default target block vector through a protocol, and the coded bitstream does not carry indication information of the target block vector, thereby saving coding overhead. For example, the encoder agrees on the first candidate block vector in the default block vector candidate list through a protocol as the target block vector of the first sub-block, and the decoder agrees on the first candidate block vector in the default block vector candidate list through a protocol as the target block vector of the first sub-block.
[0127] For example, a motion information candidate list is constructed for the current block, the motion information candidate list includes at least one candidate motion information, and the construction process of this motion information candidate list is not limited. After the motion information candidate list is constructed for the current block, a candidate motion information is selected from the motion information candidate list as the target motion information of the second sub-block. After the target motion information of the second sub-block is determined, a prediction value corresponding to the second sub-block can be obtained according to the target motion information, and this process is not limited.
[0128] Exemplarily, when the second sub-block adopts the normal merge sub-mode (i.e., Merge sub-mode) in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the normal merge sub-mode. The normal merge sub-mode can establish a motion information candidate list for the second sub-block, and there are multiple candidate motion information (such as motion vector and reference frame information) in the motion information candidate list, such as spatial candidate motion information, temporal candidate motion information, historical motion information, default motion information, etc.
[0129] Exemplarily, when the second sub-block adopts the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the MMVD sub-mode, that is, the motion information candidate list may include the motion information obtained by offsetting the original motion information, and the original motion information may include but is not limited to: the motion information of the spatial neighboring blocks of the current block, the motion information of the temporal blocks of the current block, the default motion information, etc., and there is no restriction on the original motion information. For example, the motion information of multiple spatial neighboring blocks is obtained, such as motion information C1-motion information C4, and motion information C1, motion information C2, motion information C3' obtained by offsetting motion information C3, and motion information C4' obtained by offsetting motion information C4 are added to the motion information candidate list. Of course, the above method is only an example and is not limited to this, as long as the motion information candidate list includes at least one motion information obtained by offsetting the original motion information.
[0130] MMVD is to offset the original motion information in a fixed direction and with a fixed vector difference, thereby obtaining new motion information. For example, the new motion information is obtained in the following manner, and the new motion information can be added to the motion information candidate list.
[0131] MV(new)=MV(original)+offset;or, MV(new)=MV(original)-offset. MV(new) represents the new motion vector obtained after the offset (based on this new motion vector, the new motion information can be obtained), MV(original) represents the original motion vector (that is, the original motion vector included in the original motion information), offset represents the fixed vector difference, and the value of offset can be arbitrarily configured, such as +1, -1, +2, -2, etc. There is no restriction on the value of this offset.
[0132] Exemplarily, when the second sub-block adopts the affine merging sub-mode in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the affine merging sub-mode, that is, the motion information candidate list of the current block is created by adopting the affine merging sub-mode, and the candidate motion information in the motion information candidate list may include, but is not limited to: motion information constructed based on the motion information of spatial neighboring blocks of the current block, motion information constructed based on the motion information of temporal blocks of the current block, motion information constructed using fixed rules, default motion information, etc., and there is no limitation to this.
[0133] The affine merge sub-mode is a prediction technology based on sub-blocks, and the motion information of each sub-block can be derived through the motion parameter model. Based on this, after selecting a candidate motion information from the motion information candidate list as the target motion information of the second sub-block, for each sub-block of the second sub-block, the motion information of each sub-block of the second sub-block can be derived based on the target motion information and the motion parameter model, and the prediction value of each sub-block is determined according to the motion information of each sub-block of the second sub-block, and then the prediction value of the second sub-block is obtained. For example, the second sub-block is divided into sub-block 1 and sub-block 2, and the motion information of sub-block 1 and the motion information of sub-block 2 can be derived based on the target motion information and the motion parameter model of the second sub-block. Then, the prediction value of sub-block 1 can be determined according to the motion information of sub-block 1, and the prediction value of sub-block 2 can be determined according to the motion information of sub-block 2, and the prediction value of sub-block 1 and the prediction value of sub-block 2 are composed of the prediction value of the second sub-block.
[0134] Exemplarily, when the second sub-block adopts the ATMVP (Alternative Temporal Motion Vector Prediction) sub-mode of the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the ATMVP sub-mode, that is, the candidate motion information is obtained by adopting the ATMVP sub-mode. For example, the reference frame corresponding to the current block is determined by specifying the motion information, and the reference block corresponding to the current block is obtained from the reference frame, and then the candidate motion information of the current block is determined using the motion information of the reference block, such as scaling the motion information of the reference block, and using the changed motion information as the candidate motion information of the current block, and there is no restriction on this. After obtaining the candidate motion information of the current block, the candidate motion information can be added to the motion information candidate list of the ATMVP sub-mode. If the motion information candidate list of the ATMVP sub-mode includes only one of the candidate motion information, the candidate motion information is used as the target motion information of the second sub-block; if the motion information candidate list of the ATMVP sub-mode includes one of the candidate motion information and other candidate motion information (there is no restriction on the method of adding other candidate motion information), then one candidate motion information can be selected from the motion information candidate list of the ATMVP sub-mode as the target motion information of the second sub-block.
[0135] Exemplarily, when the second sub-block adopts the ATMVP sub-mode of the inter-frame prediction mode, the reference frame corresponding to the current block can be determined by specifying motion information, and the reference block corresponding to the current block can be obtained from the reference frame. Then, the motion information of the reference block is used to determine the candidate motion information of the current block, such as scaling the motion information of the reference block, and using the changed motion information as the candidate motion information of the current block. There is no limitation on this. After obtaining the candidate motion information of the current block, the candidate motion information can be directly used as the target motion information of the second sub-block.
[0136] In the above embodiment, the ATMVP sub-mode may also be referred to as the SBTMVP (sub-block TMVP) sub-mode.
[0137] The encoder / decoder obtains target motion information of the second sub-block from the motion information candidate list, including but not limited to:
[0138] Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate distortion cost of the current block by using the rate distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate distortion cost includes: the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the inter-frame prediction mode. For each candidate motion information in the motion information candidate list, the candidate motion information with the minimum rate distortion cost is used as the target motion information of the second sub-block. When the encoder sends the coded bit stream to the decoder, the coded bit stream carries the indication information of the target motion information, and the indication information is used to indicate the index information of the target motion information, and the index information is used to indicate the candidate motion information in the motion information candidate list. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target motion information, the candidate motion information corresponding to the index information is selected from the motion information candidate list, and the candidate motion information is the target motion information of the second sub-block.
[0139] Method 2: The encoding end agrees on the default target motion information through a protocol, and the decoding end agrees on the default target motion information through a protocol. In this way, the indication information of the target motion information may not be carried in the encoded bit stream, thereby saving encoding overhead.
[0140] For example, the encoding end may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the second sub-block, and the decoding end may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the second sub-block. Of course, the above method is only an example and is not limited to this.
[0141] Based on Example 3, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an intra-block copy prediction mode (IBC), and the prediction mode information of the second sub-block can be an inter-frame prediction mode (Inter). See Figure 5A-5H As shown, it is an example that the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the inter-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figure 5A-5H Just examples.
[0142] Exemplarily, when the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the inter-frame prediction mode, the division direction and which sub-block adopts the intra-frame block copy prediction mode and which sub-block adopts the inter-frame prediction mode, that is, which sub-block is the first sub-block and which sub-block is the second sub-block, can also be determined through the prediction mode information of the surrounding blocks of the current block.
[0143] See also Fig.5I As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is the intra-block copy prediction mode and the prediction mode information of N1 is the intra-block copy prediction mode, then Fig.5I One of the three division directions shown, and Fig.5I It shows which sub-block uses the intra block copy prediction mode and which sub-block uses the inter prediction mode.
[0144] See also Figure 5J As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is not the intra-block copy prediction mode, and the prediction mode information of N1 is not the intra-block copy prediction mode, then the prediction mode information of N0 is not the intra-block copy prediction mode. Figure 5J One of the three division directions shown, and Figure 5J It shows which sub-block uses the intra block copy prediction mode and which sub-block uses the inter prediction mode.
[0145] See also Figure 5K As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is the intra-block copy prediction mode, and the prediction mode information of N1 is not the intra-block copy prediction mode, then the prediction mode information of N0 is adopted. Figure 5K One of the three division directions shown, Figure 5K It shows which sub-block uses the intra block copy prediction mode and which sub-block uses the inter prediction mode.
[0146] See also Figure 5L As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is not the intra-block copy prediction mode, and the prediction mode information of N1 is the intra-block copy prediction mode, then the prediction mode information of N0 is adopted. Figure 5L One of the three division directions shown, Figure 5L It shows which sub-block uses the intra block copy prediction mode and which sub-block uses the inter prediction mode.
[0147] certainly, Figure 5I-5L This is just an example. When other shapes are used, such as the first sub-block and the second sub-block are respectively a triangular sub-block and a trapezoidal sub-block, or the first sub-block and the second sub-block are both trapezoidal sub-blocks, or the first sub-block and the second sub-block are respectively a triangular sub-block and a pentagonal sub-block, the implementation method thereof can be referred to. Figure 5I-5L As shown, no further repetition is given here.
[0148] In Embodiment 3, it is assumed that the current block has two regions, one region 1 is the screen content, and the other region 2 has a strong temporal correlation. In this application scenario, by dividing the current block into a first sub-block (i.e., a sub-block of region 1) and a second sub-block (i.e., a sub-block of region 2), and the prediction mode information of the first sub-block is an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode, based on the characteristic that there are a large number of repeated textures in the same frame of the screen content, since the first sub-block uses the intra-frame block copy prediction mode, the encoding effect can be improved. Since the second sub-block uses the inter-frame prediction mode, the purpose of effectively removing the temporal redundancy of the video can be achieved, and the encoding effect can be improved.
[0149] Embodiment 4: For step 204 in Embodiment 1, if the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode, then Embodiment 4 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 3, a block vector candidate list is constructed, and the block vector candidate list includes multiple candidate block vectors; a candidate block vector is selected from the block vector candidate list as a target block vector for the first sub-block. Obtain a target intra-frame sub-prediction mode for the second sub-block. Obtain a prediction value corresponding to the first sub-block according to the target block vector; obtain a prediction value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
[0150] For example, a block vector candidate list is constructed for the current block, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatially adjacent blocks of the current block, historical block vectors in the HMVP list corresponding to the current block, default block vectors, etc., and there is no restriction on the construction process of this block vector candidate list. After the block vector candidate list is constructed for the current block, a candidate block vector is selected from the block vector candidate list as the target block vector of the first sub-block. After the target block vector of the first sub-block is determined, a prediction value corresponding to the first sub-block can be obtained according to the target block vector, and there is no restriction on the process of obtaining this prediction value.
[0151] Exemplarily, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list may include the block vector candidate list of the MMVD sub-mode, that is, the block vector candidate list includes at least one block vector obtained by offsetting the original block vector, and the original block vector may include but is not limited to: the block vector of the spatial neighboring block of the current block, the historical block vector in the HMVP list corresponding to the current block, the default block vector, etc.
[0152] For example, the target intra-frame sub-prediction mode of the second sub-block may be obtained. After the target intra-frame sub-prediction mode is obtained, the prediction value corresponding to the second sub-block may be obtained according to the target intra-frame sub-prediction mode, and the method for obtaining the prediction value is not limited. Exemplarily, obtaining the target intra-frame sub-prediction mode of the second sub-block may include, but is not limited to, the following methods:
[0153] Method 1: Determine the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block. That is, the encoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block, and the decoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block. For example, the encoding end determines the Planar mode as the target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement, and the decoding end determines the Planar mode as the target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement. For another example, the encoding end determines the DC mode as the target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement, and the decoding end determines the DC mode as the target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement. Of course, the above-mentioned Planar mode and DC mode are only an example, and various angle prediction modes can also be determined as the target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement, and there is no limitation to this.
[0154] Method 2: construct an intra-frame sub-prediction mode candidate list, which may include multiple candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode for the second sub-block. For example, construct an intra-frame sub-prediction mode candidate list for the current block, and the candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list include but are not limited to: Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc. There is no restriction on the construction process of this intra-frame sub-prediction mode candidate list, and the intra-frame sub-prediction mode candidate list may also include candidate intra-frame sub-prediction modes of other angles. After constructing the intra-frame sub-prediction mode candidate list for the current block, select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode for the second sub-block, and obtain the prediction value corresponding to the second sub-block according to the target intra-frame sub-prediction mode, and there is no restriction on this acquisition process.
[0155] The encoder / decoder obtains the target intra sub-prediction mode from the intra sub-prediction mode candidate list, including but not limited to:
[0156] Mode A: The encoder performs joint prediction on the current block based on each block partition information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate distortion cost of the current block using the rate distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate distortion cost includes: the prediction mode information of the first sub-block is the intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode. For each candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes, the candidate intra-frame sub-prediction mode with the minimum rate distortion cost is used as the target intra-frame sub-prediction mode of the second sub-block. When the encoder sends a coded bit stream to the decoder, the coded bit stream carries the indication information of the target intra-frame sub-prediction mode, and the indication information is used to indicate the index information of the target intra-frame sub-prediction mode, and the index information is used to indicate the candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target intra sub-prediction mode, a candidate intra sub-prediction mode corresponding to the index information is selected from the intra sub-prediction mode candidate list, and the candidate intra sub-prediction mode is the target intra sub-prediction mode of the second sub-block.
[0157] Method B: The encoder agrees on a default target intra-frame sub-prediction mode through a protocol, and the decoder agrees on a default target intra-frame sub-prediction mode through a protocol, so that the encoded bitstream does not carry the indication information of the target intra-frame sub-prediction mode, thereby saving encoding overhead. For example, the encoder agrees on the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list through a protocol as the target intra-frame sub-prediction mode for the second sub-block, and the decoder agrees on the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list through a protocol as the target intra-frame sub-prediction mode for the second sub-block.
[0158] Method three, determining the intra-frame sub-prediction mode of the neighboring blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. For example, for the encoding end, if the neighboring blocks of the second sub-block are predicted using a certain intra-frame sub-prediction mode, the encoding end can obtain the intra-frame sub-prediction mode of the neighboring blocks of the second sub-block, and determine the intra-frame sub-prediction mode of the neighboring blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. For the decoding end, if the neighboring blocks of the second sub-block are predicted using a certain intra-frame sub-prediction mode, the decoding end can obtain the intra-frame sub-prediction mode of the neighboring blocks of the second sub-block, and determine the intra-frame sub-prediction mode of the neighboring blocks of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block.
[0159] Based on Embodiment 4, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an intra-block copy prediction mode (IBC), and the prediction mode information of the second sub-block can be an intra-frame prediction mode (Intra). See Figure 6A-6H As shown, it is an example that the first sub-block adopts the intra-block copy prediction mode and the second sub-block adopts the intra-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figure 6A-6H Just examples.
[0160] Exemplarily, when the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the intra-frame prediction mode, the division direction and which sub-block adopts the intra-frame block copy prediction mode and which sub-block adopts the intra-frame prediction mode, that is, which sub-block is the first sub-block and which sub-block is the second sub-block, can also be determined through the prediction mode information of the surrounding blocks of the current block.
[0161] See also Fig. 7A As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is the intra-frame prediction mode and the prediction mode information of N1 is the intra-frame prediction mode, then Fig. 7A One of the three division directions shown, and Fig. 7A It shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the intra prediction mode.
[0162] See also Figure 7B As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is not an intra-frame prediction mode and the prediction mode information of N1 is not an intra-frame prediction mode, then Figure 7B One of the three division directions shown, and Figure 7B It shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the intra prediction mode.
[0163] See also Figure 7CAs shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is the intra-frame prediction mode and the prediction mode information of N1 is not the intra-frame prediction mode, then Figure 7C One of the three division directions shown, and Figure 7C It shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the intra prediction mode.
[0164] See also Fig.7D As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is not an intra-frame prediction mode and the prediction mode information of N1 is an intra-frame prediction mode, then Fig.7D One of the three division directions shown, and Fig.7D It shows which sub-block adopts the intra block copy prediction mode and which sub-block adopts the intra prediction mode.
[0165] certainly, Figure 7A-7D This is just an example. When other shapes are used, such as the first sub-block and the second sub-block are respectively a triangular sub-block and a trapezoidal sub-block, or the first sub-block and the second sub-block are both trapezoidal sub-blocks, or the first sub-block and the second sub-block are respectively a triangular sub-block and a pentagonal sub-block, the implementation method thereof can be referred to. Figure 7A-7D As shown, no further repetition is given here.
[0166] In Embodiment 4, it is assumed that there are two regions in the current block, one region 1 is the screen content, and the other region 2 has natural texture. In this application scenario, by dividing the current block into a first sub-block (i.e., a sub-block of region 1) and a second sub-block (i.e., a sub-block of region 2), and the prediction mode information of the first sub-block is an intra-frame block copy prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode, based on the characteristic that there are a large number of repeated textures in the same frame of the screen content, since the first sub-block uses the intra-frame block copy prediction mode, the encoding effect can be improved. Since the intra-frame prediction mode corresponds to the texture direction, when the second sub-block uses the intra-frame prediction mode, the purpose of effectively removing video redundancy can be achieved, and the encoding effect can be improved.
[0167] Embodiment 5: With respect to step 204 in Embodiment 1, if the prediction mode information of the first sub-block is an intra-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode, then Embodiment 5 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 5, a first target intra-frame sub-prediction mode of the first sub-block and a second target intra-frame sub-prediction mode of the second sub-block may be obtained, and the first target intra-frame sub-prediction mode is different from the second target intra-frame sub-prediction mode; a prediction value corresponding to the first sub-block is obtained according to the first target intra-frame sub-prediction mode; and a prediction value corresponding to the second sub-block is obtained according to the second target intra-frame sub-prediction mode.
[0168] For example, a first target intra-frame sub-prediction mode of a first sub-block and a second target intra-frame sub-prediction mode of a second sub-block are obtained, and a prediction value corresponding to the first sub-block is obtained according to the first target intra-frame sub-prediction mode, and a prediction value corresponding to the second sub-block is obtained according to the second target intra-frame sub-prediction mode, and the method for obtaining the prediction value is not limited. Exemplarily, obtaining the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode may include but is not limited to the following methods:
[0169] Method 1: Determine the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the first sub-block, and determine the designated second intra-frame sub-prediction mode as the second target intra-frame sub-prediction mode of the second sub-block. That is, the encoding end may determine the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the first sub-block, and determine the designated second intra-frame sub-prediction mode as the second target intra-frame sub-prediction mode of the second sub-block, and the decoding end may determine the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the first sub-block, and determine the designated second intra-frame sub-prediction mode as the second target intra-frame sub-prediction mode of the second sub-block. For example, the encoding end may determine the Planar mode as the first target intra-frame sub-prediction mode of the first sub-block by default through a protocol agreement, and determine the DC mode as the second target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement. The decoding end may determine the Planar mode as the first target intra-frame sub-prediction mode of the first sub-block by default through a protocol agreement, and determine the DC mode as the second target intra-frame sub-prediction mode of the second sub-block by default through a protocol agreement. Of course, the above method is only an example, and other agreements may also be made, which is not limited to this.
[0170] Method 2: construct an intra-frame sub-prediction mode candidate list, which may include multiple candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the first target intra-frame sub-prediction mode of the first sub-block, and select another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the second sub-block. For example, construct an intra-frame sub-prediction mode candidate list for the current block, and the candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list include but are not limited to: Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc. There is no restriction on the construction process of this intra-frame sub-prediction mode candidate list, and the intra-frame sub-prediction mode candidate list may also include candidate intra-frame sub-prediction modes of other angles. After constructing the intra-frame sub-prediction mode candidate list for the current block, select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the first target intra-frame sub-prediction mode of the first sub-block, and obtain the prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode, and there is no restriction on this acquisition process. On the basis of excluding the first target intra-frame sub-prediction mode, another candidate intra-frame sub-prediction mode is selected from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the second sub-block, and the prediction value corresponding to the second sub-block is obtained according to the second target intra-frame sub-prediction mode, and there is no restriction on this acquisition process.
[0171] The encoder / decoder obtains the target intra sub-prediction mode from the intra sub-prediction mode candidate list, including but not limited to:
[0172] Method A: The encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate-distortion cost of the current block using the rate-distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the intra-frame prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode, for each candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes, the candidate intra-frame sub-prediction mode with the minimum rate-distortion cost is used as the first target intra-frame sub-prediction mode of the first sub-block. On the basis of excluding the first target intra-frame sub-prediction mode, the candidate intra-frame sub-prediction mode with the minimum rate-distortion cost is used as the second target intra-frame sub-prediction mode of the second sub-block.
[0173] When the encoder sends a coded bitstream to the decoder, the coded bitstream carries indication information of a target intra-frame sub-prediction mode, the indication information is used to indicate index information of a first target intra-frame sub-prediction mode, the index information is used to indicate the first target intra-frame sub-prediction mode is the candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes. The indication information is also used to indicate index information of a second target intra-frame sub-prediction mode, the index information is used to indicate the second target intra-frame sub-prediction mode is the candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes.
[0174] The decoding end receives the encoded bit stream from the encoding end, and parses the indication information from the encoded bit stream. Based on the index information of the first target intra-frame sub-prediction mode, a candidate intra-frame sub-prediction mode corresponding to the index information is selected from the intra-frame sub-prediction mode candidate list, and the candidate intra-frame sub-prediction mode is the first target intra-frame sub-prediction mode of the first sub-block. Based on the index information of the second target intra-frame sub-prediction mode, a candidate intra-frame sub-prediction mode corresponding to the index information is selected from the intra-frame sub-prediction mode candidate list, and the candidate intra-frame sub-prediction mode is the second target intra-frame sub-prediction mode of the second sub-block.
[0175] Method B: The encoding end defaults to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode through a protocol agreement, and the decoding end defaults to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode through a protocol agreement. In this way, the encoded bitstream does not carry the indication information of the target intra-frame sub-prediction mode, thereby saving encoding overhead. For example, the encoding end defaults to the first candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes through a protocol agreement as the first target intra-frame sub-prediction mode for the first sub-block, and the second candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes is used as the second target intra-frame sub-prediction mode for the second sub-block. The decoding end defaults to the first candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes through a protocol agreement as the first target intra-frame sub-prediction mode for the first sub-block, and the second candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes is used as the second target intra-frame sub-prediction mode for the second sub-block.
[0176] Mode 3: If the intra-frame sub-prediction mode of the first neighboring block of the first sub-block is different from the intra-frame sub-prediction mode of the second neighboring block of the second sub-block, the intra-frame sub-prediction mode of the first neighboring block can be determined as the first target intra-frame sub-prediction mode of the first sub-block, and the intra-frame sub-prediction mode of the second neighboring block can be determined as the second target intra-frame sub-prediction mode of the second sub-block. Alternatively, if the intra-frame sub-prediction mode of the first neighboring block is the same as the intra-frame sub-prediction mode of the second neighboring block, the intra-frame sub-prediction mode of the first neighboring block can be determined as the first target intra-frame sub-prediction mode of the first sub-block, and another intra-frame sub-prediction mode different from the first target intra-frame sub-prediction mode can be determined as the second target intra-frame sub-prediction mode of the second sub-block. Alternatively, if the intra-frame sub-prediction mode of the first neighboring block is the same as the intra-frame sub-prediction mode of the second neighboring block, the intra-frame sub-prediction mode of the second neighboring block can be determined as the second target intra-frame sub-prediction mode of the second sub-block, and another intra-frame sub-prediction mode different from the second target intra-frame sub-prediction mode can be determined as the first target intra-frame sub-prediction mode of the first sub-block.
[0177] Exemplarily, for the encoding end or the decoding end, if the first adjacent block of the first sub-block is predicted using intra-frame sub-prediction mode A, and the second adjacent block of the second sub-block is predicted using intra-frame sub-prediction mode B, when the intra-frame sub-prediction mode A is different from the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode A can be determined as the first target intra-frame sub-prediction mode of the first sub-block, and the intra-frame sub-prediction mode B can be determined as the second target intra-frame sub-prediction mode of the second sub-block.
[0178] When the intra-frame sub-prediction mode A is the same as the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode A is determined as the first target intra-frame sub-prediction mode of the first sub-block, and another intra-frame sub-prediction mode C different from the intra-frame sub-prediction mode A is determined as the second target intra-frame sub-prediction mode of the second sub-block. For example, the intra-frame sub-prediction mode C can be the intra-frame sub-prediction mode of the adjacent block of the second adjacent block. For another example, if the intra-frame sub-prediction mode A is the Planar mode, the intra-frame sub-prediction mode C can be the DC mode, and there is no limitation on this, as long as the intra-frame sub-prediction mode C is different from the intra-frame sub-prediction mode A.
[0179] When the intra-frame sub-prediction mode A is the same as the intra-frame sub-prediction mode B, the intra-frame sub-prediction mode B is determined as the second target intra-frame sub-prediction mode of the second sub-block, and another intra-frame sub-prediction mode D different from the intra-frame sub-prediction mode B is determined as the first target intra-frame sub-prediction mode of the first sub-block. For example, the intra-frame sub-prediction mode D may be the intra-frame sub-prediction mode of the adjacent block of the first adjacent block, and for another example, if the intra-frame sub-prediction mode B is the Planar mode, the intra-frame sub-prediction mode D may be the DC mode, and there is no limitation on this, as long as the intra-frame sub-prediction mode D is different from the intra-frame sub-prediction mode B.
[0180] Exemplarily, for the encoding end or the decoding end, if the first neighboring block of the first subblock is predicted using the intra-frame sub-prediction mode A, and the second neighboring block of the second subblock is not predicted using the intra-frame prediction mode, then the intra-frame sub-prediction mode A is determined as the first target intra-frame sub-prediction mode of the first subblock, and another intra-frame sub-prediction mode C different from the intra-frame sub-prediction mode A is determined as the second target intra-frame sub-prediction mode of the second subblock. For example, the intra-frame sub-prediction mode C is the intra-frame sub-prediction mode of the neighboring block of the second neighboring block, and for another example, if the intra-frame sub-prediction mode A is the Planar mode, the intra-frame sub-prediction mode C can be the DC mode, and there is no limitation on this, as long as the intra-frame sub-prediction mode C is different from the intra-frame sub-prediction mode A.
[0181] Exemplarily, for the encoding end or the decoding end, if the second adjacent block of the second subblock is predicted using the intra-frame sub-prediction mode B, and the first adjacent block of the first subblock is not predicted using the intra-frame prediction mode, then the intra-frame sub-prediction mode B is determined as the second target intra-frame sub-prediction mode of the second subblock, and another intra-frame sub-prediction mode D different from the intra-frame sub-prediction mode B is determined as the first target intra-frame sub-prediction mode of the first subblock. For example, the intra-frame sub-prediction mode D is the intra-frame sub-prediction mode of the adjacent block of the first adjacent block, and for another example, if the intra-frame sub-prediction mode B is the Planar mode, the intra-frame sub-prediction mode D can be the DC mode, and there is no limitation on this, as long as the intra-frame sub-prediction mode D is different from the intra-frame sub-prediction mode B.
[0182] Based on Example 5, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an intra-frame prediction mode (Intra), and the prediction mode information of the second sub-block can be an intra-frame prediction mode (Intra), but the first target intra-frame sub-prediction mode of the first sub-block is different from the second target intra-frame sub-prediction mode of the second sub-block, and the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode can be fixed or derived from surrounding blocks. See. Figure 8A-8D As shown, it is an example that the first sub-block adopts the intra-frame prediction mode and the second sub-block adopts the intra-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figure 8A-8D Just examples.
[0183] In Example 5, it is assumed that there are two areas in the current block, one area 1 has a natural texture, and the other area 2 also has a natural texture, but the natural texture of area 1 is different from the natural texture of area 2, and different intra-frame sub-prediction modes need to be corresponded. In this application scenario, the current block is divided into a first sub-block (i.e., a sub-block of area 1) and a second sub-block (i.e., a sub-block of area 2), and the prediction mode information of the first sub-block is an intra-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode. Since the first sub-block uses the intra-frame prediction mode, and the second sub-block uses the intra-frame prediction mode, the purpose of effectively removing video redundancy can be achieved, and the encoding effect can be improved.
[0184] Embodiment 6: With respect to step 204 in Embodiment 1, if the prediction mode information of the first sub-block is an inter-frame prediction mode and the prediction mode information of the second sub-block is an intra-frame prediction mode, then Embodiment 6 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 6, a motion information candidate list is constructed, the motion information candidate list includes at least one candidate motion information; a candidate motion information is selected from the motion information candidate list as the target motion information of the first sub-block; a target intra-frame sub-prediction mode of the second sub-block is obtained; a prediction value corresponding to the first sub-block is obtained according to the target motion information; and a prediction value corresponding to the second sub-block is obtained according to the target intra-frame sub-prediction mode.
[0185] For example, a motion information candidate list is constructed for the current block, the motion information candidate list includes at least one candidate motion information, and the construction process of the motion information candidate list is not limited. After the motion information candidate list is constructed for the current block, a candidate motion information is selected from the motion information candidate list as the target motion information of the first sub-block. After the target motion information of the first sub-block is determined, a prediction value corresponding to the first sub-block can be obtained according to the target motion information, and this process is not limited.
[0186] Exemplarily, when the first sub-block adopts the normal merge sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the normal merge sub-mode. When the first sub-block adopts the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the MMVD sub-mode. When the first sub-block adopts the affine merge sub-mode in the inter-frame prediction mode, the motion information candidate list may include the motion information candidate list of the affine merge sub-mode. When the first sub-block adopts the ATMVP sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
[0187] The encoder / decoder obtains target motion information of the first sub-block from the motion information candidate list, including but not limited to:
[0188] Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate distortion cost of the current block using the rate distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate distortion cost includes: the prediction mode information of the first sub-block is the inter-frame prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode. For each candidate motion information in the motion information candidate list, the candidate motion information with the minimum rate distortion cost is used as the target motion information of the first sub-block. When the encoder sends the coded bit stream to the decoder, the coded bit stream may carry indication information of the target motion information, and the indication information is used to indicate the index information of the target motion information, and the index information is used to indicate the candidate motion information in the motion information candidate list. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target motion information, the candidate motion information corresponding to the index information is selected from the motion information candidate list, and the candidate motion information is the target motion information of the first sub-block.
[0189] Method 2: The encoding end agrees on the default target motion information through a protocol, and the decoding end agrees on the default target motion information through a protocol. In this way, the indication information of the target motion information may not be carried in the encoded bit stream, thereby saving encoding overhead.
[0190] For example, the encoding end may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the first sub-block, and the decoding end may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the first sub-block. Of course, the above method is only an example and is not limited to this.
[0191] For example, the target intra-frame sub-prediction mode of the second sub-block may be obtained. After the target intra-frame sub-prediction mode is obtained, the prediction value corresponding to the second sub-block may be obtained according to the target intra-frame sub-prediction mode, and the method for obtaining the prediction value is not limited. Exemplarily, obtaining the target intra-frame sub-prediction mode of the second sub-block may include, but is not limited to, the following methods:
[0192] Method 1: determining a specified intra sub-prediction mode as a target intra sub-prediction mode of the second sub-block.
[0193] Exemplarily, the encoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block, and the decoding end determines the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block.
[0194] Method 2: construct an intra-frame sub-prediction mode candidate list, which may include multiple candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode for the second sub-block. For example, construct an intra-frame sub-prediction mode candidate list for the current block, and the candidate intra-frame sub-prediction modes in the intra-frame sub-prediction mode candidate list include but are not limited to: Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc. Select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode for the second sub-block, and obtain a prediction value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
[0195] The encoder / decoder obtains the target intra sub-prediction mode from the intra sub-prediction mode candidate list, including but not limited to:
[0196] Mode A: The encoder performs joint prediction on the current block based on each block partition information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate distortion cost of the current block using the rate distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate distortion cost includes: the prediction mode information of the first sub-block is the inter-frame prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode. For each candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes, the candidate intra-frame sub-prediction mode with the minimum rate distortion cost is used as the target intra-frame sub-prediction mode of the second sub-block. When the encoder sends a coded bit stream to the decoder, the coded bit stream carries indication information of the target intra-frame sub-prediction mode, and the indication information is used to indicate the index information of the target intra-frame sub-prediction mode, and the index information is used to indicate the candidate intra-frame sub-prediction mode in the candidate list of intra-frame sub-prediction modes. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target intra sub-prediction mode, a candidate intra sub-prediction mode corresponding to the index information is selected from the intra sub-prediction mode candidate list, and the candidate intra sub-prediction mode is the target intra sub-prediction mode of the second sub-block.
[0197] Method B: The encoder agrees on a default target intra-frame sub-prediction mode through a protocol, and the decoder agrees on a default target intra-frame sub-prediction mode through a protocol. For example, the encoder agrees on the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list through a protocol as the target intra-frame sub-prediction mode for the second sub-block, and the decoder agrees on the first candidate intra-frame sub-prediction mode in the default intra-frame sub-prediction mode candidate list through a protocol as the target intra-frame sub-prediction mode for the second sub-block.
[0198] Method 3: Determine the intra-frame sub-prediction mode of the neighboring block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. For example, the encoding end obtains the intra-frame sub-prediction mode of the neighboring block of the second sub-block, and determines the intra-frame sub-prediction mode of the neighboring block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block. The decoding end obtains the intra-frame sub-prediction mode of the neighboring block of the second sub-block, and determines the intra-frame sub-prediction mode of the neighboring block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block.
[0199] Based on Embodiment 6, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an inter-frame prediction mode (Inter), and the prediction mode information of the second sub-block can be an intra-frame prediction mode (Intra). See Figure 9A-9D As shown, it is an example that the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the intra-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figure 9A-9D This is just an example, and an example in which both the first sub-block and the second sub-block are trapezoidal sub-blocks is shown, and other cases such as both the first sub-block and the second sub-block are triangular sub-blocks are not shown.
[0200] Exemplarily, when the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the intra-frame prediction mode, the division direction and which sub-block adopts the inter-frame prediction mode and which sub-block adopts the intra-frame prediction mode, that is, which sub-block is the first sub-block and which sub-block is the second sub-block, can also be determined through the prediction mode information of the surrounding blocks of the current block.
[0201] See also Fig. 10A As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is the intra-frame prediction mode and the prediction mode information of N1 is the intra-frame prediction mode, then Fig. 10A One of the three division directions shown, and Fig. 10A It shows which sub-block uses the inter-frame prediction mode and which sub-block uses the intra-frame prediction mode.
[0202] See also Fig. 10BAs shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is not an intra-frame prediction mode and the prediction mode information of N1 is not an intra-frame prediction mode, then Fig. 10B One of the three division directions shown, and Fig. 10B It shows which sub-block adopts the inter-frame prediction mode and which sub-block adopts the intra-frame prediction mode.
[0203] See also Fig. 10C As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is the intra-frame prediction mode and the prediction mode information of N1 is not the intra-frame prediction mode, then Fig. 10C One of the three division directions shown, and Fig. 10C It shows which sub-block adopts the inter-frame prediction mode and which sub-block adopts the intra-frame prediction mode.
[0204] See also Fig. 10D As shown, N0 and N1 are two surrounding blocks of the current block. Based on the prediction mode information of the two surrounding blocks, when the first sub-block and the second sub-block are both triangular sub-blocks, if the prediction mode information of N0 is not an intra-frame prediction mode and the prediction mode information of N1 is an intra-frame prediction mode, then Fig. 10D One of the three division directions shown, and Fig. 10D It shows which sub-block adopts the inter-frame prediction mode and which sub-block adopts the intra-frame prediction mode.
[0205] certainly, Figures 10A-10D This is just an example. When other shapes are used, such as the first sub-block and the second sub-block are respectively a triangular sub-block and a trapezoidal sub-block, or the first sub-block and the second sub-block are both trapezoidal sub-blocks, or the first sub-block and the second sub-block are respectively a triangular sub-block and a pentagonal sub-block, the implementation method thereof can be referred to. Figures 10A-10D As shown, no further repetition is given here.
[0206] In Example 6, it is assumed that there are two regions in the current block, one region 1 has a strong temporal correlation, and the other region 2 has a natural texture. In this application scenario, the current block is divided into a first sub-block (i.e., a sub-block of region 1) and a second sub-block (i.e., a sub-block of region 2), and the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode. Since the first sub-block uses the inter-frame prediction mode, the purpose of effectively removing the temporal redundancy of the video can be achieved, and the encoding effect can be improved. Since the second sub-block uses the intra-frame prediction mode, the encoding effect can be improved.
[0207] Embodiment 7: For step 204 in Embodiment 1, if the prediction mode information of the first sub-block is the inter-frame prediction mode and the prediction mode information of the second sub-block is the inter-frame prediction mode, then Embodiment 7 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 7, a first motion information candidate list of the first sub-mode in the inter-frame prediction mode is constructed, and the first motion information candidate list includes at least one candidate motion information; one candidate motion information is selected from the first motion information candidate list as the target motion information of the first sub-block. A second motion information candidate list of the second sub-mode in the inter-frame prediction mode is constructed, and the second motion information candidate list includes at least one candidate motion information; one candidate motion information is selected from the second motion information candidate list as the target motion information of the second sub-block; wherein the first sub-mode and the second sub-mode may be different. A prediction value corresponding to the first sub-block is obtained according to the target motion information of the first sub-block; a prediction value corresponding to the second sub-block is obtained according to the target motion information of the second sub-block.
[0208] The first sub-mode includes, but is not limited to, one of the following sub-modes: a normal merge sub-mode, an MMVD sub-mode, an affine merge sub-mode, and an ATMVP sub-mode; the second sub-mode includes, but is not limited to, one of the following sub-modes: a normal merge sub-mode, an MMVD sub-mode, an affine merge sub-mode, and an ATMVP sub-mode. Of course, the above are just a few examples, and there is no limitation on this, as long as it is a sub-mode in the inter-frame prediction mode. The first sub-mode and the second sub-mode may be different. For example, when the first sub-mode is a normal merge sub-mode, the second sub-mode is not a normal merge sub-mode, but is one of the MMVD sub-mode, the affine merge sub-mode, and the ATMVP sub-mode. When the first sub-mode is an MMVD sub-mode, the second sub-mode is not an MMVD sub-mode, but is one of the normal merge sub-mode, the affine merge sub-mode, and the ATMVP sub-mode, and so on.
[0209] For example, a first motion information candidate list of a first sub-mode in an inter-frame prediction mode is constructed for the current block, and the first motion information candidate list includes at least one candidate motion information; there is no restriction on this construction process. After the first motion information candidate list is constructed for the current block, a candidate motion information is selected from the first motion information candidate list as the target motion information of the first sub-block, and a prediction value corresponding to the first sub-block is obtained according to the target motion information, and there is no restriction on this process.
[0210] Exemplarily, when the first sub-mode is a normal merge sub-mode, the first motion information candidate list includes the motion information candidate list of the normal merge sub-mode. When the first sub-mode is an MMVD sub-mode, the first motion information candidate list includes the motion information candidate list of the MMVD sub-mode. When the first sub-mode is an affine merge sub-mode, the first motion information candidate list includes the motion information candidate list of the affine merge sub-mode. When the first sub-mode is an ATMVP sub-mode, the first motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
[0211] The encoder / decoder obtains target motion information of the first sub-block from the first motion information candidate list, including but not limited to:
[0212] Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate-distortion cost of the current block using the rate-distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the inter-frame prediction mode, the prediction mode information of the second sub-block is the inter-frame prediction mode, and for each candidate motion information in the first motion information candidate list, the candidate motion information with the minimum rate-distortion cost is used as the target motion information of the first sub-block. When the encoder sends the coded bit stream to the decoder, the coded bit stream may carry indication information of the target motion information, and the indication information is used to indicate the index information of the target motion information of the first sub-block, and the index information is used to indicate the candidate motion information in the first motion information candidate list. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target motion information, candidate motion information corresponding to the index information is selected from the first motion information candidate list, and the candidate motion information is the target motion information of the first sub-block.
[0213] Method 2: The encoding end agrees on the default target motion information through a protocol, and the decoding end agrees on the default target motion information through a protocol. For example, the encoding end may agree on the default first candidate motion information in the first motion information candidate list as the target motion information of the first sub-block through a protocol, and the decoding end may agree on the default first candidate motion information in the first motion information candidate list as the target motion information of the first sub-block through a protocol. Of course, the above method is only an example and is not limited to this.
[0214] For example, a second motion information candidate list of a second sub-mode in an inter-frame prediction mode is constructed for the current block, and the second motion information candidate list includes at least one candidate motion information; there is no restriction on this construction process. After the second motion information candidate list is constructed for the current block, a candidate motion information is selected from the second motion information candidate list as the target motion information of the second sub-block, and a prediction value corresponding to the second sub-block is obtained according to the target motion information, and there is no restriction on this process.
[0215] Exemplarily, when the second sub-mode is a normal merge sub-mode, the second motion information candidate list includes the motion information candidate list of the normal merge sub-mode. When the second sub-mode is an MMVD sub-mode, the second motion information candidate list includes the motion information candidate list of the MMVD sub-mode. When the second sub-mode is an affine merge sub-mode, the second motion information candidate list includes the motion information candidate list of the affine merge sub-mode. When the second sub-mode is an ATMVP sub-mode, the second motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
[0216] The encoder / decoder obtains the target motion information of the second sub-block from the second motion information candidate list, including but not limited to:
[0217] Method 1: The encoder performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate-distortion cost of the current block using the rate-distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the inter-frame prediction mode, the prediction mode information of the second sub-block is the inter-frame prediction mode, and for each candidate motion information in the second motion information candidate list, the candidate motion information with the minimum rate-distortion cost is used as the target motion information of the second sub-block. When the encoder sends the coded bit stream to the decoder, the coded bit stream may carry indication information of the target motion information, and the indication information is used to indicate the index information of the target motion information of the second sub-block, and the index information is used to indicate the candidate motion information in the second motion information candidate list. The decoder receives the coded bit stream from the encoder and parses the indication information from the coded bit stream. Based on the index information of the target motion information, candidate motion information corresponding to the index information is selected from the second motion information candidate list, and the candidate motion information is the target motion information of the second sub-block.
[0218] Method 2: The encoding end agrees on the default target motion information through a protocol, and the decoding end agrees on the default target motion information through a protocol. For example, the encoding end may agree on the default second candidate motion information in the second motion information candidate list as the target motion information of the second sub-block through a protocol, and the decoding end may agree on the default second candidate motion information in the second motion information candidate list as the target motion information of the second sub-block through a protocol. Of course, the above method is only an example and is not limited to this.
[0219] Based on Example 7, when the current frame where the current block is located is a B frame or an I frame, the current block can be divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an inter-frame prediction mode (Inter), and the prediction mode information of the second sub-block can be an inter-frame prediction mode (Inter). See Figures 11A-11D As shown, it is an example that the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the inter-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figures 11A-11D It is just an example, showing an example where both the first sub-block and the second sub-block are trapezoidal sub-blocks, and not showing other situations such as both the first sub-block and the second sub-block are triangular sub-blocks. Exemplarily, when the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the inter-frame prediction mode, a sub-mode can be selected from the conventional merging sub-mode, the triangular prediction sub-mode, the MMVD sub-mode, the affine merging sub-mode, and the ATMVP sub-mode as the first sub-mode of the first sub-block. A sub-mode can be selected from the conventional merging sub-mode, the triangular prediction sub-mode, the MMVD sub-mode, the affine merging sub-mode, and the ATMVP sub-mode as the second sub-mode of the second sub-block.
[0220] Exemplarily, the first sub-pattern of the first sub-block may be different from the second sub-pattern of the second sub-block.
[0221] In Example 7, it is assumed that there are two regions in the current block, one region 1 has a strong temporal correlation, and the other region 2 also has a strong temporal correlation, but the reference block corresponding to region 1 is different from the reference block corresponding to region 2, and needs to correspond to different motion information. In this application scenario, by dividing the current block into a first sub-block (i.e., a sub-block of region 1) and a second sub-block (i.e., a sub-block of region 2), and the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode. Since the first sub-block uses the inter-frame prediction mode and the second sub-block uses the inter-frame prediction mode, the purpose of effectively removing the temporal redundancy of the video can be achieved, and the encoding effect can be improved.
[0222] Embodiment 8: For step 204 in Embodiment 1, if the prediction mode information of the first sub-block is the inter-frame prediction mode and the prediction mode information of the second sub-block is the inter-frame prediction mode, then Embodiment 3 may be used for implementation, and other processes refer to Embodiment 1. In Embodiment 8, a motion information candidate list of the inter-frame prediction mode is constructed for the current block, and the motion information candidate list includes at least one candidate motion information, and there is no restriction on this construction process; one candidate motion information is selected from the motion information candidate list as the target motion information of the first sub-block, and another candidate motion information is selected from the motion information candidate list as the target motion information of the second sub-block, and the target motion information of the first sub-block is different from the target motion information of the second sub-block. The prediction value corresponding to the first sub-block is obtained according to the target motion information of the first sub-block; the prediction value corresponding to the second sub-block is obtained according to the target motion information of the second sub-block. The motion information candidate list may include but is not limited to a motion information candidate list based on the following sub-modes: conventional merge sub-mode, MMVD sub-mode, affine merge sub-mode, ATMVP sub-mode; of course, the above are just a few examples of sub-modes, and there is no restriction on this sub-mode, as long as it is a sub-mode in the inter-frame prediction mode.
[0223] For example, when both the first sub-block and the second sub-block adopt the normal merge sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the normal merge sub-mode. When both the first sub-block and the second sub-block adopt the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the MMVD sub-mode. When both the first sub-block and the second sub-block adopt the affine merge sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the affine merge sub-mode. When both the first sub-block and the second sub-block adopt the ATMVP sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
[0224] The encoder / decoder obtains the target motion information from the motion information candidate list, which may include but is not limited to:
[0225] Method 1: The encoding end performs joint prediction on the current block based on each block division information, each group of prediction mode information, and the candidates in each group of prediction mode information to obtain the prediction information of the current block, and determines the rate-distortion cost of the current block using the rate-distortion principle and the prediction information. Assuming that the prediction mode information corresponding to the minimum rate-distortion cost includes: the prediction mode information of the first sub-block is the inter-frame prediction mode, and the prediction mode information of the second sub-block is the inter-frame prediction mode, for each candidate motion information in the motion information candidate list, the candidate motion information with the minimum rate-distortion cost is used as the target motion information of the first sub-block. On the basis of excluding the target motion information of the first sub-block from the motion information candidate list, the candidate motion information with the minimum rate-distortion cost is used as the target motion information of the second sub-block. When the encoding end sends the encoded bit stream to the decoding end, the encoded bit stream may carry indication information of the target motion information, wherein the indication information is used to indicate the index information of the target motion information of the first sub-block and the index information of the target motion information of the second sub-block, the index information of the target motion information of the first sub-block is used to indicate the number of candidate motion information in the motion information candidate list that the target motion information of the first sub-block is, and the index information of the target motion information of the second sub-block is used to indicate the number of candidate motion information in the motion information candidate list that the target motion information of the second sub-block is.
[0226] The decoding end receives the coded bit stream from the encoding end and parses the indication information from the coded bit stream. Based on the index information of the target motion information of the first sub-block, the decoding end selects candidate motion information corresponding to the index information from the motion information candidate list, and the candidate motion information is the target motion information of the first sub-block.
[0227] Based on the index information of the target motion information of the second sub-block, the decoding end selects candidate motion information corresponding to the index information from the motion information candidate list, and the candidate motion information is the target motion information of the second sub-block.
[0228] Method 2: The encoder agrees on the default target motion information through a protocol, and the decoder agrees on the default target motion information through a protocol. For example, the encoder may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the first sub-block, and the second candidate motion information in the motion information candidate list is used as the target motion information of the second sub-block, and the decoder may agree through a protocol that the first candidate motion information in the default motion information candidate list is used as the target motion information of the first sub-block, and the second candidate motion information in the motion information candidate list is used as the target motion information of the second sub-block.
[0229] Based on Example 8, when the current frame where the current block is located is a B frame or an I frame, the current block is divided into a first sub-block and a second sub-block according to a fixed direction, the first sub-block and the second sub-block can both be triangular sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and trapezoidal sub-blocks, respectively, the first sub-block and the second sub-block can both be trapezoidal sub-blocks, the first sub-block and the second sub-block can be triangular sub-blocks and pentagonal sub-blocks, respectively, and there is no restriction on the division method of the current block. Exemplarily, the prediction mode information of the first sub-block can be an inter-frame prediction mode (Inter), and the prediction mode information of the second sub-block can be an inter-frame prediction mode (Inter). See Figures 11A-11D As shown, it is an example that the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the inter-frame prediction mode, and there is no restriction on the shapes of the first sub-block and the second sub-block. Figures 11A-11D This is just an example, showing an example where both the first sub-block and the second sub-block are trapezoidal sub-blocks, and does not show other cases where both the first sub-block and the second sub-block are triangular sub-blocks.
[0230] Exemplarily, when the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the inter-frame prediction mode, a sub-mode may be selected from the normal merging sub-mode, the triangle prediction sub-mode, the MMVD sub-mode, the affine merging sub-mode, and the ATMVP sub-mode as the first sub-mode of the first sub-block. A sub-mode may be selected from the normal merging sub-mode, the triangle prediction sub-mode, the MMVD sub-mode, the affine merging sub-mode, and the ATMVP sub-mode as the second sub-mode of the second sub-block.
[0231] Exemplarily, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block may be the same. For example, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block are both conventional merge sub-modes, and the target motion information of the first sub-block is different from the target motion information of the second sub-block. For another example, the first sub-mode of the first sub-block and the second sub-mode of the second sub-block are both MMVD sub-modes, and the target motion information of the first sub-block is different from the target motion information of the second sub-block, and so on.
[0232] In Example 8, it is assumed that there are two regions in the current block, one region 1 has a strong temporal correlation, and the other region 2 also has a strong temporal correlation, but the reference block corresponding to region 1 is different from the reference block corresponding to region 2, and needs to correspond to different motion information. In this application scenario, by dividing the current block into a first sub-block (i.e., a sub-block of region 1) and a second sub-block (i.e., a sub-block of region 2), and the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode. Since the first sub-block uses the inter-frame prediction mode and the second sub-block uses the inter-frame prediction mode, the purpose of effectively removing the temporal redundancy of the video can be achieved, and the encoding effect can be improved.
[0233] For each of the above embodiments, in order to obtain the prediction value of the first sub-block and the prediction value of the second sub-block, the current block can be divided into a first region block, a second region block and a third region block, the first region block is located in the first sub-block, the second region block is located in the second sub-block, the distance between the center of each sub-block in the third region block and the dividing line is less than a preset threshold, and the dividing line is determined based on the block division information. For example, see Fig. 12A As shown, taking the first sub-block as a triangular sub-block and the second sub-block as a triangular sub-block as an example, and the dividing line determined based on the block division information is from the upper left corner to the lower right corner. The triangular sub-block in the upper right corner is the first sub-block, the triangular sub-block in the lower left corner is the second sub-block, the first area block is located in the first sub-block, the second area block is located in the second sub-block, and the distance between the center of each sub-block in the third area block (such as the sub-blocks shown in blocks 1, 2, 4, 6, and 7) and the dividing line is less than a preset threshold (which can be configured based on experience).
[0234] The prediction value corresponding to the first sub-block is obtained according to the first prediction mode information corresponding to the first sub-block, and the prediction value corresponding to the second sub-block is obtained according to the second prediction mode information corresponding to the second sub-block. On this basis, in this embodiment, the target prediction value corresponding to the first regional block is obtained according to the first prediction mode information; the target prediction value corresponding to the second regional block is obtained according to the second prediction mode information; and the target prediction value corresponding to the third regional block is obtained according to the first prediction mode information and / or the second prediction mode information. Exemplarily, the target prediction value corresponding to the third regional block is obtained according to the first prediction mode information and / or the second prediction mode information, including: obtaining the target prediction value corresponding to the third regional block according to the first prediction mode information; or, obtaining the target prediction value corresponding to the third regional block according to the second prediction mode information; or, obtaining the first prediction value corresponding to the third regional block according to the first prediction mode information, obtaining the second prediction value corresponding to the third regional block according to the second prediction mode information, and performing weighted processing on the first prediction value and the second prediction value to obtain the target prediction value corresponding to the third regional block.
[0235] For example, see Fig. 12A As shown, the prediction value corresponding to the first sub-block can be obtained according to the first prediction mode information corresponding to the first sub-block. For the specific acquisition method, please refer to the above embodiment, which will not be repeated here. Since the first area block is located in the first sub-block, and part of the area in the third area block is located in the first sub-block, when the prediction value corresponding to the first sub-block is obtained according to the first prediction mode information, the prediction value corresponding to the first area block can be obtained, that is, the prediction value of each pixel in the first area block. For the convenience of distinction, the prediction value corresponding to the first area block can be called the target prediction value corresponding to the first area block. In summary, the target prediction value corresponding to the first area block can be obtained according to the first prediction mode information.
[0236] For example, see Fig. 12A As shown, the prediction value corresponding to the second sub-block can be obtained according to the second prediction mode information corresponding to the second sub-block. For the specific acquisition method, please refer to the above embodiment, which will not be repeated here. Since the second area block is located in the second sub-block, and part of the area in the third area block is located in the second sub-block, when the prediction value corresponding to the second sub-block is obtained according to the second prediction mode information, the prediction value corresponding to the second area block can be obtained, that is, the prediction value of each pixel in the second area block. For the convenience of distinction, the prediction value corresponding to the second area block can be referred to as the target prediction value corresponding to the second area block. In summary, the target prediction value corresponding to the second area block can be obtained according to the second prediction mode information.
[0237] For example, see Fig. 12A As shown, for the third region block (such as the sub-blocks shown in block 1, block 2, block 4, block 6, and block 7), in order to obtain the target prediction value corresponding to the third region block, the following method can be used:
[0238] Method 1: obtaining a target prediction value corresponding to the third region block according to the first prediction mode information.
[0239] For example, a part of the area in the third area block (such as the entire area of block 6 and block 7, the upper right corner area of block 4, for the convenience of description, hereinafter referred to as part of area A) is located in the first sub-block. When the prediction value corresponding to the first sub-block is obtained according to the first prediction mode information, the prediction value corresponding to the part of area A can be obtained, that is, the prediction value of each pixel in the part of area A. For the convenience of distinction, the prediction value corresponding to the part of area A can be referred to as the target prediction value. The remaining area in the third area block (such as the entire area of block 1 and block 2, the lower left corner area of block 4, for the convenience of description, hereinafter referred to as part of area B) is located in the second sub-block. Therefore, the prediction value corresponding to the part of area B can also be obtained according to the first prediction mode information, that is, the prediction value of each pixel in the part of area B. For the convenience of distinction, the prediction value corresponding to the part of area B can be referred to as the target prediction value. When the target prediction value corresponding to the part of area B is obtained according to the first prediction mode information, the implementation method refers to the method of "obtaining the prediction value corresponding to the first sub-block according to the first prediction mode information", which will not be repeated here.
[0240] Method 2: obtaining a target prediction value corresponding to the third region block according to the second prediction mode information.
[0241] For example, a partial area B in the third area block (such as the entire area of block 1 and block 2, and the lower left corner area of block 4) is located in the second sub-block. When the prediction value corresponding to the second sub-block is obtained according to the second prediction mode information, the prediction value corresponding to the partial area B can be obtained, that is, the prediction value of each pixel in the partial area B. For the convenience of distinction, the prediction value corresponding to the partial area B is referred to as the target prediction value. The remaining area A in the third area block (such as the entire area of block 6 and block 7, and the upper right corner area of block 4) is located in the first sub-block. The prediction value corresponding to the partial area A can be obtained according to the second prediction mode information, that is, the prediction value of each pixel in the partial area A. For the convenience of distinction, the prediction value corresponding to the partial area A can be referred to as the target prediction value. When the target prediction value corresponding to the partial area A is obtained according to the second prediction mode information, the implementation method refers to the method of "obtaining the prediction value corresponding to the second sub-block according to the second prediction mode information", which will not be repeated here.
[0242] Method three, obtaining a first prediction value corresponding to the third area block according to the first prediction mode information (the prediction value of the third area block obtained according to the first prediction mode information is referred to as the first prediction value), obtaining a second prediction value corresponding to the third area block according to the second prediction mode information (the prediction value of the third area block obtained according to the second prediction mode information is referred to as the second prediction value), and performing weighted processing on the first prediction value and the second prediction value to obtain a target prediction value corresponding to the third area block.
[0243] For example, a partial region A in the third region block is located in the first sub-block, and a partial region B in the third region block is located in the second sub-block. When the prediction value corresponding to the first sub-block is obtained according to the first prediction mode information, the first prediction value corresponding to the partial region A can be obtained, that is, the first prediction value of each pixel in the partial region A. When the prediction value corresponding to the second sub-block is obtained according to the second prediction mode information, the second prediction value corresponding to the partial region B can be obtained, that is, the second prediction value of each pixel in the partial region B. Then, the first prediction value corresponding to the partial region B can be obtained according to the first prediction mode information, that is, the first prediction value of each pixel in the partial region B. For implementation, refer to the method of “obtaining the prediction value corresponding to the first sub-block according to the first prediction mode information”, which will not be repeated here. For implementation, refer to the method of “obtaining the prediction value corresponding to the first sub-block according to the first prediction mode information”, which will not be repeated here. For second prediction value corresponding to the partial region A, that is, the second prediction value of each pixel in the partial region A can be obtained according to the second prediction mode information. For implementation, refer to the method of “obtaining the prediction value corresponding to the second sub-block according to the second prediction mode information”, which will not be repeated here.
[0244] In summary, the first prediction value of each pixel in the third area block (i.e., partial area A and partial area B) can be obtained, and the second prediction value of each pixel in the third area block can be obtained, and the first prediction value and the second prediction value are weighted to obtain the target prediction value corresponding to the third area block. For example, for each pixel in the third area block, the first prediction value of the pixel and the second prediction value of the pixel can be weighted to obtain the target prediction value of the pixel. After performing the above processing on each pixel, the target prediction value corresponding to the third area block can be obtained.
[0245] Exemplarily, when weighted processing is performed on the first predicted value of a pixel and the second predicted value of the pixel, the weight value of the first predicted value may be the same as or different from the weight value of the second predicted value. For example, if the pixel is located in the first sub-block, the weight value of the first predicted value may be greater than the weight value of the second predicted value; if the pixel is located in the second sub-block, the weight value of the first predicted value may be less than the weight value of the second predicted value; if the pixel is located on the dividing line, the weight value of the first predicted value may be equal to the weight value of the second predicted value. Of course, the above is only an example of the size of the weight value and is not limited to this.
[0246] Exemplarily, each sub-block in the third area block may be a 1*1 sub-block, that is, a single pixel block, or an N*M sub-block, where N is greater than or equal to 1 and M is greater than or equal to 1. Fig. 12A As shown, the third area block includes a sub-block marked as 1, a sub-block marked as 2, a sub-block marked as 4, a sub-block marked as 6, and a sub-block marked as 7.
[0247] For each sub-block marked as 7, hereinafter referred to as sub-block 7, the prediction value P1 of sub-block 7 can be determined according to the first prediction mode information, and the prediction value P2 of sub-block 7 can be determined according to the second prediction mode information. Assuming that the weight value of the prediction value P1 is a and the weight value of the prediction value P2 is b, the target prediction value of sub-block 7 is: P1*a+P2*b. Sub-block 7 is located in the first sub-block, and the weight value a is greater than the weight value b. Assuming that a is 7 / 8 and b is 1 / 8, the target prediction value is: P1*7 / 8+P2*1 / 8.
[0248] For each sub-block marked as 6, hereinafter referred to as sub-block 6, the prediction value P1 of sub-block 6 can be determined according to the first prediction mode information, and the prediction value P2 of sub-block 6 can be determined according to the second prediction mode information. Assuming that the weight value of the prediction value P1 is a and the weight value of the prediction value P2 is b, the target prediction value of sub-block 6 is: P1*a+P2*b. Sub-block 6 is located in the first sub-block, and the weight value a is greater than the weight value b. Since sub-block 6 is closer to the second sub-block than sub-block 7, the weight value a of sub-block 6 can be less than the weight value a of sub-block 7. Assuming that a is 6 / 8 and b is 2 / 8, the target prediction value is: P1*6 / 8+P2*2 / 8.
[0249] For each sub-block marked as 4, hereinafter referred to as sub-block 4, the prediction value P1 of sub-block 4 can be determined according to the first prediction mode information, and the prediction value P2 of sub-block 4 can be determined according to the second prediction mode information. Assuming that the weight value of the prediction value P1 is a and the weight value of the prediction value P2 is b, the target prediction value of sub-block 4 is: P1*a+P2*b. Sub-block 4 is located on the dividing line, the weight value a is equal to the weight value b, assuming that a is 4 / 8 and b is 4 / 8, the target prediction value is: P1*4 / 8+P2*4 / 8.
[0250] For each sub-block marked as 2, hereinafter referred to as sub-block 2, the prediction value P1 of sub-block 2 can be determined according to the first prediction mode information, and the prediction value P2 of sub-block 2 can be determined according to the second prediction mode information. Assuming that the weight value of the prediction value P1 is a and the weight value of the prediction value P2 is b, the target prediction value of sub-block 2 is: P1*a+P2*b. Sub-block 2 is located in the second sub-block, and the weight value a is less than the weight value b. Assuming that a is 2 / 8 and b is 6 / 8, the target prediction value is: P1*2 / 8+P2*6 / 8.
[0251] For each sub-block marked as 1, hereinafter referred to as sub-block 1, the prediction value P1 of sub-block 1 can be determined according to the first prediction mode information, and the prediction value P2 of sub-block 1 can be determined according to the second prediction mode information. Assuming that the weight value of the prediction value P1 is a and the weight value of the prediction value P2 is b, the target prediction value of sub-block 1 is: P1*a+P2*b. Sub-block 1 is located in the second sub-block, and the weight value a is less than the weight value b. Since sub-block 1 is closer to the first sub-block than sub-block 2, the weight value a of sub-block 1 is less than the weight value a of sub-block 2. Assuming that a is 1 / 8 and b is 7 / 8, the target prediction value is: P1*1 / 8+P2*7 / 8.
[0252] In the above embodiment, the sum of the weight value a and the weight value b of each sub-block may be 1. The closer to the first sub-block, the larger the weight value a and the smaller the weight value b, and the closer to the second sub-block, the smaller the weight value a and the larger the weight value b.
[0253] Of course, the above weight value a and weight value b are just an example, and there is no limitation on the weight value a and weight value b.
[0254] The above-mentioned prediction value P1 and prediction value P2 may be brightness prediction values, and the target prediction value may be a brightness target prediction value. Fig. 12B As shown, for each sub-block in the third area block, the chrominance prediction value P3 of the sub-block can also be determined according to the first prediction mode information, and the chrominance prediction value P4 of the sub-block can be determined according to the second prediction mode information. For each sub-block, the chrominance target prediction value of the sub-block is P3*c+P4*d. For example, the weight value c of sub-block 7 is 7 / 8, the weight value d of sub-block 7 is 1 / 8, the weight value c of sub-block 4 is 4 / 8, the weight value d of sub-block 4 is 4 / 8, the weight value c of sub-block 1 is 1 / 8, and the weight value d of sub-block 1 is 7 / 8. Of course, the above are just examples of weight values c and weight values d, and there is no limitation to this.
[0255] Exemplarily, the magnitude relationship of the weight values may also be determined based on the prediction mode information of the neighboring blocks of the current block. For example, if the prediction mode information of the neighboring blocks of the current block is the same as the prediction mode information of the first sub-block (or the second sub-block), the weight value corresponding to the prediction value of the first sub-block (or the second sub-block) may be increased.
[0256] For example, based on the above weight values, the determination method of weight value a and weight value b refers to the above embodiment. If the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the intra-frame prediction mode, if the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the intra-frame block copy prediction mode, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the intra-frame prediction mode, the weight value corresponding to the prediction value of the second sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame block copy prediction mode and the inter-frame prediction mode, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame prediction mode and the inter-frame prediction mode, the weight value corresponding to the prediction value of the second sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame block copy prediction mode and the intra-frame prediction mode, the weight value can be kept unchanged. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the inter-frame prediction mode, the weight value can be kept unchanged. Of course, the above are just a few examples and are not limiting.
[0257] If the first sub-block adopts the intra-frame block copy prediction mode and the second sub-block adopts the inter-frame prediction mode, if the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the intra-frame block copy prediction mode, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the inter-frame prediction mode, the weight value corresponding to the prediction value of the second sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame block copy prediction mode and the intra-frame prediction mode, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame prediction mode and the inter-frame prediction mode, the weight value corresponding to the prediction value of the second sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame block copy prediction mode and the inter-frame prediction mode, the weight value can be kept unchanged. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the intra-frame prediction mode, the weight value can be kept unchanged. Of course, the above are just a few examples and are not limited to this.
[0258] If the first sub-block adopts the inter-frame prediction mode and the second sub-block adopts the intra-frame prediction mode, if the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the inter-frame prediction mode, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block both adopt the intra-frame prediction mode, the weight value corresponding to the prediction value of the second sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the inter-frame prediction mode and the intra-frame block copy prediction mode, the weight value corresponding to the prediction value of the first sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the intra-frame prediction mode and the intra-frame block copy prediction mode, the weight value corresponding to the prediction value of the second sub-block can be increased. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block respectively adopt the inter-frame prediction mode and the intra-frame prediction mode, the weight value can be kept unchanged. If the neighboring blocks of the first sub-block and the neighboring blocks of the second sub-block are both intra-frame block copy prediction modes, the weight value can be kept unchanged. Of course, the above are just a few examples of the size of the weight value, and there is no limitation on this.
[0259] In summary, for the target prediction value of each sub-block in the third region block (i.e., each sub-block close to the dividing line, such as the N*N sub-block close to the dividing line, where N is configured according to experience, such as 4, etc.), the prediction values obtained based on the two prediction mode information (i.e., the first prediction mode information and the second prediction mode information) can be weighted to obtain the target prediction value, or the prediction value obtained by selecting a certain prediction mode information as the target prediction value according to a fixed rule, which is explained below:
[0260] Case 1, see Fig. 12CAs shown, it is assumed that the current block is divided into a first sub-block and a second sub-block, and both the first sub-block and the second sub-block are triangular sub-blocks. For each sub-block (block 1, block 2, block 4, block 6, block 7) in the third area block, a first prediction value of the sub-block is determined according to the first prediction mode information, a second prediction value of the sub-block is determined according to the second prediction mode information, and the first prediction value of the sub-block and the second prediction value of the sub-block are weighted to obtain a target prediction value of the sub-block.
[0261] Case 2, see Fig.12D As shown, it is assumed that the current block is divided into a first sub-block and a second sub-block, and both the first sub-block and the second sub-block are triangular sub-blocks. For each sub-block in the third area block, the target prediction value of the sub-block can be determined according to the first prediction mode information. Fig.12D The sub-block marked as P2 in the figure is the target prediction value of the sub-block determined according to the first prediction mode information. For each sub-block in the third region block, the target prediction value of the sub-block can be determined according to the second prediction mode information. Fig.12D The sub-block marked as P1 in the figure has a target prediction value determined according to the second prediction mode information.
[0262] Case 3, see Fig.12E As shown, it is assumed that the current block is divided into a first sub-block and a second sub-block, the first sub-block is a triangular sub-block, and the second sub-block is a pentagonal sub-block. For each sub-block (block 2, block 4, block 6, block 7) in the third area block, a first prediction value of the sub-block is determined according to the first prediction mode information, a second prediction value of the sub-block is determined according to the second prediction mode information, and the first prediction value of the sub-block and the second prediction value of the sub-block are weighted to obtain a target prediction value of the sub-block.
[0263] Case 4, see Fig.12F As shown, it is assumed that the current block is divided into a first sub-block and a second sub-block, the first sub-block is a triangular sub-block, and the second sub-block is a pentagonal sub-block. For each sub-block in the third region block, the target prediction value of the sub-block can be determined according to the first prediction mode information. Fig.12F The sub-block marked as P2 in the figure is determined according to the first prediction mode information. For each sub-block in the third region block, the target prediction value of the sub-block can be determined according to the second prediction mode information. Fig.12F For the sub-block marked as P1, the target prediction value of the sub-block is determined according to the second prediction mode information.
[0264] Of course, the above cases 1 to 4 are just examples and are not the only pixel prediction process.
[0265] In step 205, the prediction value of the current block may be obtained according to the prediction values corresponding to the at least two sub-blocks. For example, the encoding end / decoding end may combine the target prediction value of the first region block, the target prediction value of the second region block, and the target prediction value of the third region block to form the prediction value of the current block, and this process will not be described in detail.
[0266] Example 9: See Fig.13 As shown, it is a schematic flow chart of the encoding and decoding method in the embodiment of the present application. The encoding and decoding method can be applied to the decoding end or the encoding end. When it is determined that the current block starts the target weighted prediction, the target prediction value of the current block is obtained by the following steps. The target prediction value is used for encoding or decoding of the current block. The method may include:
[0267] Step 1301: Obtain a first prediction mode and a second prediction mode corresponding to a current block.
[0268] Step 1302: Determine a first prediction value corresponding to the current block according to a first prediction mode.
[0269] Step 1303: Determine a second prediction value corresponding to the current block according to the second prediction mode.
[0270] Step 1304: Perform weighted processing based on the first prediction value and the second prediction value to obtain a target prediction value of the current block.
[0271] As can be seen from the above technical solution, in this embodiment, two prediction modes of the current block can be obtained, prediction values can be obtained according to the two prediction modes respectively, and the prediction value of the current block can be obtained according to the two prediction values. In the above manner, two prediction modes can be used to perform predictions respectively, which can improve prediction accuracy, improve prediction performance, improve coding performance, and reduce coding residuals.
[0272] In step 1301, the decoding end or the encoding end needs to determine whether to start the target weighted prediction for the current block. If the target weighted prediction is started for the current block, the encoding and decoding method of the embodiment of the present application can be adopted. If the target weighted prediction is not started for the current block, the encoding and decoding method of the embodiment of the present application may not be adopted, and the implementation method of this situation is not limited.
[0273] Exemplarily, it can be determined whether the characteristic information of the current block meets a specific condition; if yes, it is determined to start the target weighted prediction for the current block. If not, it is determined not to start the target weighted prediction for the current block. The characteristic information may include but is not limited to one of the following or any combination: the frame type of the current frame where the current block is located, the size information of the current block, and the switch control information. The switch control information may be SPS (sequence level) switch control information, or PPS (picture parameter level) switch control information, or TILE (tile level) switch control information.
[0274] For example, if the characteristic information is the frame type of the current frame where the current block is located, the frame type of the current frame where the current block is located satisfies specific conditions, which may include but is not limited to: if the frame type of the current frame where the current block is located is a B frame, then it is determined that the frame type satisfies the specific conditions; or, if the frame type of the current frame where the current block is located is an I frame, then it is determined that the frame type satisfies the specific conditions.
[0275] For example, if the characteristic information is the size information of the current block, and the size information includes the width of the current block and the height of the current block, then the size information of the current block satisfies a specific condition, which may include but is not limited to: if the width of the current block is greater than or equal to the first value, and the height of the current block is greater than or equal to the second value, it is determined that the size information of the current block satisfies the specific condition. Or, if the width of the current block is greater than or equal to the third value, the height of the current block is greater than or equal to the fourth value, the width of the current block is less than or equal to the fifth value, and the height of the current block is less than or equal to the sixth value, it is determined that the size information of the current block satisfies the specific condition.
[0276] Exemplarily, the above values can be configured based on experience, such as 8, 16, 32, 64, 128, etc., without limitation. In one possible implementation, the first value can be 8, the second value can be 8, the third value can be 8, the fourth value can be 8, the fifth value can be 64, and the sixth value can be 64. Of course, the above are just examples and no limitation is imposed on this. In summary, if the width of the current block is greater than or equal to 8 and the height of the current block is greater than or equal to 8, it is determined that the size information of the current block meets certain conditions. Or, if the width of the current block is greater than or equal to 8, the height of the current block is greater than or equal to 8, the width of the current block is less than or equal to 64, and the height of the current block is less than or equal to 64, it is determined that the size information of the current block meets certain conditions.
[0277] For example, if the characteristic information is switch control information, the switch control information satisfies a specific condition, which may include but is not limited to: if the switch control information is enabled, it is determined that the switch control information satisfies the specific condition.
[0278] For example, if the characteristic information is the frame type of the current frame where the current block is located and the size information of the current block, then when the frame type satisfies a specific condition and the size information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies the specific condition. If the characteristic information is the frame type and switch control information of the current frame where the current block is located, then when the frame type satisfies a specific condition and the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies a specific condition. If the characteristic information is the size information and switch control information of the current block, then when the size information satisfies a specific condition and the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies a specific condition. If the characteristic information is the frame type, the size information and switch control information of the current frame where the current block is located, then when the frame type satisfies a specific condition and the size information satisfies a specific condition and the switch control information satisfies a specific condition, it is determined that the characteristic information of the current block satisfies a specific condition.
[0279] In step 1301, the decoding end or the encoding end obtains the first prediction mode and the second prediction mode corresponding to the current block. The first prediction mode and the second prediction mode may be the same, or the first prediction mode and the second prediction mode may be different. Exemplarily, the first prediction mode may include, but is not limited to, one of the following prediction modes: conventional merged inter-frame prediction mode, triangular inter-frame prediction mode, intra-frame block copy prediction mode, intra-frame prediction mode, MMVD inter-frame prediction mode, affine merged inter-frame prediction mode, and ATMVP inter-frame prediction mode. The second prediction mode may include, but is not limited to, one of the following prediction modes: conventional merged inter-frame prediction mode, triangular inter-frame prediction mode, intra-frame block copy prediction mode, intra-frame prediction mode, MMVD inter-frame prediction mode, affine merged inter-frame prediction mode, and ATMVP inter-frame prediction mode.
[0280] For example, when the first prediction mode is a normal merge inter prediction mode, the second prediction mode may be one of a triangular inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is a triangular inter prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, an intra block copy prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an intra block copy prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, a triangular inter prediction mode, an intra prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is an intra prediction mode, the second prediction mode may be one of a normal merge inter prediction mode, a triangular inter prediction mode, an intra block copy prediction mode, an MMVD inter prediction mode, an affine merge inter prediction mode, and an ATMVP inter prediction mode. When the first prediction mode is the MMVD inter-frame prediction mode, the second prediction mode may be one of the conventional merge inter-frame prediction mode, the triangular inter-frame prediction mode, the intra-frame block copy prediction mode, the intra-frame prediction mode, the affine merge inter-frame prediction mode, and the ATMVP inter-frame prediction mode. When the first prediction mode is the affine merge inter-frame prediction mode, the second prediction mode may be one of the conventional merge inter-frame prediction mode, the triangular inter-frame prediction mode, the intra-frame block copy prediction mode, the intra-frame prediction mode, the MMVD inter-frame prediction mode, and the ATMVP inter-frame prediction mode. When the first prediction mode is the ATMVP inter-frame prediction mode, the second prediction mode may be one of the conventional merge inter-frame prediction mode, the triangular inter-frame prediction mode, the intra-frame block copy prediction mode, the intra-frame prediction mode, the MMVD inter-frame prediction mode, and the affine merge inter-frame prediction mode.
[0281] For another example, when the first prediction mode is a conventional merged inter-frame prediction mode, the second prediction mode may be a conventional merged inter-frame prediction mode. When the first prediction mode is a triangular inter-frame prediction mode, the second prediction mode may be a triangular inter-frame prediction mode. When the first prediction mode is an intra-frame block copy prediction mode, the second prediction mode may be an intra-frame block copy prediction mode. When the first prediction mode is an intra-frame prediction mode, the second prediction mode may be an intra-frame prediction mode. When the first prediction mode is an MMVD inter-frame prediction mode, the second prediction mode may be an MMVD inter-frame prediction mode. When the first prediction mode is an affine merged inter-frame prediction mode, the second prediction mode may be an affine merged inter-frame prediction mode. When the first prediction mode is an ATMVP inter-frame prediction mode, the second prediction mode may be an ATMVP inter-frame prediction mode.
[0282] When determining the first prediction value corresponding to the current block and the second prediction value corresponding to the current block, the determination process of the first prediction value is related to the first prediction mode. For the specific determination process, refer to the above embodiment, except that in the above embodiment, the prediction values of the two sub-blocks are determined, while in this embodiment, the encoding end / decoding end determines the prediction value of the current block. The determination process of the second prediction value is related to the second prediction mode. For the specific determination process, refer to the above embodiment, which will not be described in detail. Except that in the above embodiment, the prediction values of the two sub-blocks are determined, while in this embodiment, the encoding end / decoding end determines the prediction value of the current block.
[0283] Case 1, assuming that the first prediction mode is different from the second prediction mode, the process of determining the first prediction value corresponding to the current block according to the first prediction mode and determining the second prediction value corresponding to the current block according to the second prediction mode may include:
[0284] If the first prediction mode is a regular merged inter-frame prediction mode, a motion information candidate list of the regular merged inter-frame prediction mode may be constructed for the current block, and the motion information candidate list contains multiple candidate motion information (such as motion vector and reference frame information), such as spatial candidate motion information, temporal candidate motion information, historical motion information, default motion information, etc. After the motion information candidate list is constructed for the current block, one candidate motion information is selected from the motion information candidate list as the target motion information of the current block, and the first prediction value corresponding to the current block is obtained according to the target motion information, and this process is not described in detail.
[0285] If the first prediction mode is a triangular inter-frame prediction mode, a motion information candidate list of the triangular inter-frame prediction mode is constructed for the current block, and the motion information candidate list includes multiple candidate motion information (such as unidirectional motion information). There is no restriction on the construction process of this motion information candidate list. The current block is divided into a first triangular sub-block and a second triangular sub-block, and one candidate motion information is selected from the motion information candidate list as the target motion information of the first triangular sub-block, and another candidate motion information is selected from the motion information candidate list as the target motion information of the second triangular sub-block, and the target motion information of the first triangular sub-block is different from the target motion information of the second triangular sub-block. The prediction value of the first triangular sub-block is determined according to the target motion information of the first triangular sub-block, the prediction value of the second triangular sub-block is determined according to the target motion information of the second triangular sub-block, and the first prediction value corresponding to the current block is obtained according to the prediction value of the first triangular sub-block and the prediction value of the second triangular sub-block. This process is not repeated here.
[0286] If the first prediction mode is the intra-block copy prediction mode, a block vector candidate list is constructed for the current block, the block vector candidate list includes multiple candidate block vectors, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatially adjacent blocks of the current block, historical block vectors in the HMVP list corresponding to the current block, default block vectors, etc., and there is no restriction on the construction process of this block vector candidate list. Then, a candidate block vector is selected from the block vector candidate list as the target block vector of the current block, and the first prediction value corresponding to the current block is obtained according to the target block vector, and this process is not repeated.
[0287] If the first prediction mode is an intra-frame prediction mode, the target intra-frame sub-prediction mode of the current block is obtained, and the first prediction value corresponding to the current block is obtained according to the target intra-frame sub-prediction mode. This process will not be described in detail. In order to obtain the target intra-frame sub-prediction mode of the current block, the following method can be used: the specified intra-frame sub-prediction mode is determined as the target intra-frame sub-prediction mode of the current block. Alternatively, an intra-frame sub-prediction mode candidate list is constructed for the current block, and the intra-frame sub-prediction mode candidate list includes multiple candidate intra-frame sub-prediction modes, such as Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc., without limitation; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the current block. Alternatively, the intra-frame sub-prediction mode of the adjacent block of the current block is determined as the target intra-frame sub-prediction mode of the current block.
[0288] If the first prediction mode is the MMVD inter-frame prediction mode, a motion information candidate list of the MMVD inter-frame prediction mode can be constructed for the current block, and the motion information candidate list includes multiple candidate motion information, and the motion information candidate list includes motion information obtained by offsetting the original motion information. There is no restriction on the construction process of this motion information candidate list. Exemplarily, the original motion information may include, but is not limited to: motion information of spatially adjacent blocks of the current block, motion information of temporal blocks of the current block, default motion information, etc. There is no restriction on this original motion information. For example, motion information of multiple spatially adjacent blocks is obtained, such as motion information C1-motion information C4, and motion information C1, motion information C2, motion information C3' obtained by offsetting motion information C3, and motion information C4' obtained by offsetting motion information C4 are added to the motion information candidate list. Then, a candidate motion information is selected from the motion information candidate list as the target motion information of the current block, and the first prediction value corresponding to the current block is obtained according to the target motion information. This process will not be described in detail.
[0289] If the first prediction mode is an affine merged inter-frame prediction mode, a motion information candidate list of the affine merged inter-frame prediction mode can be constructed for the current block, and the motion information candidate list includes multiple candidate motion information, and the motion information candidate list includes but is not limited to: motion information constructed based on the motion information of the spatial adjacent blocks of the current block, motion information constructed based on the motion information of the temporal blocks of the current block, motion information constructed using fixed rules, default motion information, etc., and there is no restriction on the construction process of this motion information candidate list. Then, a candidate motion information is selected from the motion information candidate list as the target motion information of the current block. The affine merged inter-frame prediction mode is a prediction technology based on sub-blocks. The motion information of each sub-block can be derived through the motion parameter model. Therefore, after selecting the target motion information from the motion information candidate list, for each sub-block of the current block, the motion information of each sub-block of the current block can be derived based on the target motion information and the motion parameter model. For each sub-block, the prediction value of the sub-block can be determined using the motion information of the sub-block. Further, based on the prediction value of each sub-block, the first prediction value corresponding to the current block can be obtained.
[0290] If the first prediction mode is the ATMVP inter-frame prediction mode, the reference frame corresponding to the current block is determined by specifying motion information, and the reference block corresponding to the current block is obtained from the reference frame. Then, the target motion information of the current block is determined according to the motion information of the reference block, for example, the motion information of the reference block is scaled and changed, and the changed motion information is used as the target motion information of the current block. The first prediction value corresponding to the current block is obtained according to the target motion information, and this process is not repeated here.
[0291] If the second prediction mode is a conventional merged inter-frame prediction mode, a triangular inter-frame prediction mode, an intra-frame block copy prediction mode, an intra-frame prediction mode, an MMVD inter-frame prediction mode, an affine merged inter-frame prediction mode or an ATMVP inter-frame prediction mode, the process of obtaining the second prediction value corresponding to the current block can be referred to the above embodiment and will not be repeated here.
[0292] Case 2, assuming that the first prediction mode is the same as the second prediction mode, the process of determining the first prediction value corresponding to the current block according to the first prediction mode and determining the second prediction value corresponding to the current block according to the second prediction mode may include:
[0293] If the first prediction mode and the second prediction mode are both conventional merged inter-frame prediction modes, a motion information candidate list of conventional merged inter-frame prediction mode can be constructed for the current block, and the motion information candidate list includes multiple candidate motion information. One candidate motion information is selected from the motion information candidate list as the first target motion information of the current block, and another candidate motion information is selected from the motion information candidate list as the second target motion information of the current block, and a first prediction value corresponding to the current block is obtained according to the first target motion information, and a second prediction value corresponding to the current block is obtained according to the second target motion information.
[0294] If both the first prediction mode and the second prediction mode are intra-block copy prediction modes, a block vector candidate list may be constructed for the current block, the block vector candidate list including multiple candidate block vectors, and the candidate block vectors in the block vector candidate list include but are not limited to: block vectors of spatially adjacent blocks of the current block, historical block vectors in the HMVP list corresponding to the current block, default block vectors, etc. A candidate block vector is selected from the block vector candidate list as the first target block vector of the current block, and another candidate block vector is selected from the block vector candidate list as the second target block vector of the current block, and a first prediction value corresponding to the current block is obtained according to the first target block vector, and a second prediction value corresponding to the current block is obtained according to the second target block vector.
[0295] If the first prediction mode and the second prediction mode are both intra-frame prediction modes, the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode of the current block can be obtained, and the first prediction value corresponding to the current block can be obtained according to the first target intra-frame sub-prediction mode, and the second prediction value corresponding to the current block can be obtained according to the second target intra-frame sub-prediction mode.
[0296] The method for obtaining the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode may include, but is not limited to, the following methods: determining the designated first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the current block, and determining the designated second intra-frame sub-prediction mode as the second target intra-frame sub-prediction mode of the current block. Alternatively, constructing an intra-frame sub-prediction mode candidate list for the current block, the intra-frame sub-prediction mode candidate list may include multiple candidate intra-frame sub-prediction modes, such as Planar mode, DC mode, vertical angle mode, horizontal angle mode, etc.; selecting a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the first target intra-frame sub-prediction mode of the current block, and selecting another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second target intra-frame sub-prediction mode of the current block. Alternatively, the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode of the current block are deduced according to the intra-frame sub-prediction mode of the neighboring block of the current block; for example, the intra-frame sub-prediction mode of the first neighboring block of the current block and the intra-frame sub-prediction mode of the second neighboring block of the current block are obtained, and if the intra-frame sub-prediction mode of the first neighboring block is different from the intra-frame sub-prediction mode of the second neighboring block, the intra-frame sub-prediction mode of the first neighboring block is determined as the first target intra-frame sub-prediction mode of the current block, and the intra-frame sub-prediction mode of the second neighboring block is determined as the second target intra-frame sub-prediction mode of the current block; if the intra-frame sub-prediction mode of the first neighboring block is the same as the intra-frame sub-prediction mode of the second neighboring block, the intra-frame sub-prediction mode of the first neighboring block is determined as the first target intra-frame sub-prediction mode of the current block, and another intra-frame sub-prediction mode different from the first target intra-frame sub-prediction mode is determined as the second target intra-frame sub-prediction mode of the current block. Of course, the above methods are just a few examples and are not limited to this.
[0297] Of course, the above is only an example. Different combinations of the first prediction mode and the second prediction mode have different ways of determining the prediction value of the current block, which will not be described in detail here. For example, the first prediction mode and the second prediction mode are affine merged inter-frame prediction modes, the first prediction mode and the second prediction mode are MMVD inter-frame prediction modes, etc., and the prediction value determination process refers to the above example.
[0298] In step 1304, the encoding end / decoding end may perform weighted processing according to the first prediction value and the second prediction value to obtain a target prediction value of the current block. For example, weighted processing may be performed according to the first prediction value, a first weight value corresponding to the first prediction value, the second prediction value, and a second weight value corresponding to the second prediction value to obtain a target prediction value of the current block. The first weight value and the second weight value may be different or the same. There is no limitation on the method for determining the first weight value and the second weight value.
[0299] Exemplarily, the size relationship of the weight values can be determined according to the prediction mode information of the neighboring blocks of the current block. For example, if the prediction mode information of the neighboring blocks of the current block is the same as the first prediction mode, the first weight value can be increased. If the prediction mode information of the neighboring blocks of the current block is the same as the second prediction mode, the second weight value can be increased.
[0300] For example, if the first prediction mode is a normal merge mode and the second prediction mode is an intra-frame prediction mode, if the prediction mode information of the neighboring blocks of the current block is a normal merge mode, the first weight value is increased; if the prediction mode information of the neighboring blocks of the current block is an intra-frame prediction mode, the second weight value is increased; of course, the above are just a few examples and there is no limitation to this.
[0301] Based on the same application concept as the above method, the embodiment of the present application also proposes a coding and decoding device, which is applied to the coding end or the decoding end, see Fig.14 As shown, it is a structural diagram of the device, including: an acquisition module 1401, used to obtain block division information of the current block when determining to start sub-block-based joint prediction for the current block; a processing module 1402, used to divide the current block into at least two sub-blocks according to the block division information; the acquisition module 1401 is also used to obtain prediction mode information corresponding to the at least two sub-blocks respectively; obtain prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information; obtain the prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks respectively.
[0302] Exemplarily, the at least two sub-blocks include a first sub-block and a second sub-block; wherein the prediction mode information of the first sub-block is an intra-frame block copy prediction mode; and the prediction mode information of the second sub-block is an intra-frame prediction mode, or an inter-frame prediction mode, or an intra-frame block copy prediction mode.
[0303] If the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an intra-block copy prediction mode, the acquisition module 1401 acquires the prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information and is specifically used to: construct a block vector candidate list, the block vector candidate list including multiple candidate block vectors; select a candidate block vector from the block vector candidate list as the first target block vector of the first sub-block, and select another candidate block vector from the block vector candidate list as the second target block vector of the second sub-block; acquire the prediction value corresponding to the first sub-block according to the first target block vector; and acquire the prediction value corresponding to the second sub-block according to the second target block vector.
[0304] If the prediction mode information of the first sub-block is an intra-block copy prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode, the acquisition module 1401 acquires the prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information and is specifically used for: constructing a block vector candidate list, the block vector candidate list includes multiple candidate block vectors; selecting a candidate block vector from the block vector candidate list as the target block vector of the first sub-block; constructing a motion information candidate list, the motion information candidate list includes at least one candidate motion information; selecting a candidate motion information from the motion information candidate list as the target motion information of the second sub-block; obtaining the prediction value corresponding to the first sub-block according to the target block vector; and obtaining the prediction value corresponding to the second sub-block according to the target motion information.
[0305] If the prediction mode information of the first sub-block is the intra-block copy prediction mode, and the prediction mode information of the second sub-block is the intra-frame prediction mode, the acquisition module 1401 acquires the prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information and is specifically used to: construct a block vector candidate list, the block vector candidate list including multiple candidate block vectors; select a candidate block vector from the block vector candidate list as the target block vector of the first sub-block; acquire the target intra-frame sub-prediction mode of the second sub-block; acquire the prediction value corresponding to the first sub-block according to the target block vector; and acquire the prediction value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
[0306] The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an intra-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode. The acquisition module 1401 acquires the prediction values corresponding to the at least two sub-blocks according to the prediction mode information and is specifically used to: acquire a first target intra-frame sub-prediction mode of the first sub-block and a second target intra-frame sub-prediction mode of the second sub-block, wherein the first target intra-frame sub-prediction mode is different from the second target intra-frame sub-prediction mode; acquire a prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode; and acquire a prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode.
[0307] When the acquisition module 1401 acquires the first target intra-frame sub-prediction mode of the first sub-block and the second target intra-frame sub-prediction mode of the second sub-block, it is specifically used to: determine the specified first intra-frame sub-prediction mode as the first target intra-frame sub-prediction mode of the first sub-block, and determine the specified second intra-frame sub-prediction mode as the second target intra-frame sub-prediction mode of the second sub-block; or, construct an intra-frame sub-prediction mode candidate list, the intra-frame sub-prediction mode candidate list includes multiple candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the first target intra-frame sub-prediction mode of the first sub-block, and select another candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the second or, if the intra-frame subprediction mode of the first neighboring block of the first subblock is different from the intra-frame subprediction mode of the second neighboring block of the second subblock, the intra-frame subprediction mode of the first neighboring block is determined as the first target intra-frame subprediction mode of the first subblock, and the intra-frame subprediction mode of the second neighboring block is determined as the second target intra-frame subprediction mode of the second subblock; if the intra-frame subprediction mode of the first neighboring block is the same as the intra-frame subprediction mode of the second neighboring block, the intra-frame subprediction mode of the first neighboring block is determined as the first target intra-frame subprediction mode of the first subblock, and another intra-frame subprediction mode different from the first target intra-frame subprediction mode is determined as the second target intra-frame subprediction mode of the second subblock.
[0308] The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an intra-frame prediction mode. The acquisition module 1401 acquires the prediction values corresponding to the at least two sub-blocks respectively according to the prediction mode information and is specifically used to: construct a motion information candidate list, the motion information candidate list includes at least one candidate motion information; select a candidate motion information from the motion information candidate list as the target motion information of the first sub-block; acquire the target intra-frame sub-prediction mode of the second sub-block; acquire the prediction value corresponding to the first sub-block according to the target motion information; acquire the prediction value corresponding to the second sub-block according to the target intra-frame sub-prediction mode.
[0309] When the acquisition module 1401 acquires the target intra-frame sub-prediction mode of the second sub-block, it is specifically used to: determine the specified intra-frame sub-prediction mode as the target intra-frame sub-prediction mode of the second sub-block; or, construct an intra-frame sub-prediction mode candidate list, the intra-frame sub-prediction mode candidate list includes multiple candidate intra-frame sub-prediction modes; select a candidate intra-frame sub-prediction mode from the intra-frame sub-prediction mode candidate list as the target intra-frame sub-prediction mode of the second sub-block; or, determine the intra-frame sub-prediction mode of the adjacent block of the second sub-block as the target intra-frame sub-prediction mode of the second sub-block.
[0310] The at least two sub-blocks include a first sub-block and a second sub-block; the prediction mode information of the first sub-block is an inter-frame prediction mode, and the prediction mode information of the second sub-block is an inter-frame prediction mode, and the acquisition module 1401 acquires the prediction values respectively corresponding to the at least two sub-blocks according to the prediction mode information, and is specifically used to: construct a first motion information candidate list for the first sub-mode in the inter-frame prediction mode, the first motion information candidate list includes at least one candidate motion information; select a candidate motion information from the first motion information candidate list as the target motion information of the first sub-block; construct a second motion information candidate list for the second sub-mode in the inter-frame prediction mode, the second motion information candidate list includes The invention discloses a method for obtaining a prediction value corresponding to the first sub-block according to the target motion information of the first sub-block; and a method for obtaining a prediction value corresponding to the second sub-block according to the target motion information of the second sub-block. The method comprises the following steps: comprising: including at least one candidate motion information; selecting one candidate motion information from the second motion information candidate list as the target motion information of the second sub-block; the first sub-mode is different from the second sub-mode; obtaining a prediction value corresponding to the first sub-block according to the target motion information of the first sub-block; and obtaining a prediction value corresponding to the second sub-block according to the target motion information of the second sub-block; wherein the first sub-mode is one of the following sub-modes: normal merging sub-mode, MMVD sub-mode, affine merging sub-mode, ATMVP sub-mode; and the second sub-mode is one of the following sub-modes: normal merging sub-mode, MMVD sub-mode, affine merging sub-mode, ATMVP sub-mode.
[0311] Exemplarily, the shape of the first sub-block is the same as the shape of the second sub-block; or, the shape of the first sub-block is different from the shape of the second sub-block. The first sub-block is one of the following sub-blocks: a triangular sub-block, a trapezoidal sub-block, or a pentagonal sub-block; the second sub-block is one of the following sub-blocks: a triangular sub-block, a trapezoidal sub-block, or a pentagonal sub-block.
[0312] Exemplarily, when the first sub-block adopts the MMVD sub-mode in the intra block copy prediction mode, the block vector candidate list includes a block vector candidate list of the MMVD sub-mode.
[0313] Exemplarily, when the second sub-block or the first sub-block adopts the normal merge sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the normal merge sub-mode; or, when the second sub-block or the first sub-block adopts the MMVD sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the MMVD sub-mode; or, when the second sub-block or the first sub-block adopts the affine merge sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the affine merge sub-mode; or, when the second sub-block or the first sub-block adopts the ATMVP sub-mode in the inter-frame prediction mode, the motion information candidate list includes the motion information candidate list of the ATMVP sub-mode.
[0314] The at least two sub-blocks include a first sub-block and a second sub-block, the first sub-block corresponds to first prediction mode information, and the second sub-block corresponds to second prediction mode information. The acquisition module 1401 is specifically used to obtain the prediction values corresponding to the at least two sub-blocks according to the prediction mode information: divide the current block into a first area block, a second area block and a third area block; wherein the first area block is located in the first sub-block, the second area block is located in the second sub-block, the distance between the center of each sub-block in the third area block and the dividing line is less than a preset threshold, and the dividing line is determined based on the block division information; obtain the target prediction value corresponding to the first area block according to the first prediction mode information; obtain the target prediction value corresponding to the second area block according to the second prediction mode information; obtain the target prediction value corresponding to the third area block according to the first prediction mode information and / or the second prediction mode information.
[0315] When the acquisition module 1401 acquires the target prediction value corresponding to the third area block according to the first prediction mode information and / or the second prediction mode information, it is specifically used to: acquire the target prediction value corresponding to the third area block according to the first prediction mode information; or, acquire the target prediction value corresponding to the third area block according to the second prediction mode information; or, acquire the first prediction value corresponding to the third area block according to the first prediction mode information, acquire the second prediction value corresponding to the third area block according to the second prediction mode information, and perform weighted processing on the first prediction value and the second prediction value to obtain the target prediction value corresponding to the third area block.
[0316] Based on the same application concept as the above method, the embodiment of the present application also proposes a coding and decoding device, which is applied to the coding end or the decoding end, see Fig.15 As shown, it is a structural diagram of the device, including:
[0317] The acquisition module 1501 is used to acquire the first prediction mode and the second prediction mode corresponding to the current block when determining that the current block starts the target weighted prediction; the determination module 1502 is used to determine the first prediction value corresponding to the current block according to the first prediction mode; and determine the second prediction value corresponding to the current block according to the second prediction mode; the processing module 1503 is used to perform weighted processing according to the first prediction value and the second prediction value to obtain the target prediction value of the current block, and the target prediction value is used for encoding or decoding of the current block.
[0318] Exemplarily, the first prediction mode is one of the following prediction modes: normal merge inter-frame prediction mode, triangular inter-frame prediction mode, intra-frame block copy prediction mode, intra-frame prediction mode, MMVD inter-frame prediction mode, affine merge inter-frame prediction mode, ATMVP inter-frame prediction mode; the second prediction mode is one of the following prediction modes: normal merge inter-frame prediction mode, triangular inter-frame prediction mode, intra-frame block copy prediction mode, intra-frame prediction mode, MMVD inter-frame prediction mode, affine merge inter-frame prediction mode, ATMVP inter-frame prediction mode.
[0319] Based on the same application concept as the above method, the decoding end device provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to Fig.16 As shown. It includes: a processor 1601 and a machine-readable storage medium 1602, wherein: the machine-readable storage medium 1602 stores machine-executable instructions that can be executed by the processor 1601; the processor 1601 is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0320] For example, the processor 1601 is used to execute machine executable instructions to implement the following steps:
[0321] When determining to start sub-block-based joint prediction for a current block, obtaining block partitioning information of the current block; dividing the current block into at least two sub-blocks according to the block partitioning information; obtaining prediction mode information corresponding to the at least two sub-blocks; obtaining prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining a prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
[0322] When determining that a target weighted prediction is started for a current block, a first prediction mode and a second prediction mode corresponding to the current block are obtained; a first prediction value corresponding to the current block is determined according to the first prediction mode; a second prediction value corresponding to the current block is determined according to the second prediction mode; and a target prediction value of the current block is obtained by performing weighted processing according to the first prediction value and the second prediction value, and the target prediction value is used for decoding the current block.
[0323] Based on the same application concept as the above method, the encoding end device provided in the embodiment of the present application, from the hardware level, its hardware architecture diagram can be specifically referred to Fig.17 As shown. It includes: a processor 1701 and a machine-readable storage medium 1702, wherein: the machine-readable storage medium 1702 stores machine-executable instructions that can be executed by the processor 1701; the processor 1701 is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0324] For example, the processor 1701 is used to execute machine executable instructions to implement the following steps:
[0325] When determining to start sub-block-based joint prediction for a current block, obtaining block partitioning information of the current block; dividing the current block into at least two sub-blocks according to the block partitioning information; obtaining prediction mode information corresponding to the at least two sub-blocks; obtaining prediction values corresponding to the at least two sub-blocks according to the prediction mode information; obtaining a prediction value of the current block according to the prediction values corresponding to the at least two sub-blocks; or,
[0326] When determining that the current block starts target weighted prediction, obtain a first prediction mode and a second prediction mode corresponding to the current block; determine a first prediction value corresponding to the current block according to the first prediction mode; determine a second prediction value corresponding to the current block according to the second prediction mode; perform weighted processing according to the first prediction value and the second prediction value to obtain a target prediction value of the current block, and the target prediction value is used for encoding the current block.
[0327] Based on the same application concept as the above method, the embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented. Among them, the above machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device, which can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0328] The systems, devices, modules or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver device, a game console, a tablet computer, a wearable device, or a combination of any of these devices. For the convenience of description, the above devices are described separately by function into various units. Of course, when implementing this application, the functions of each unit can be implemented in the same one or more software and / or hardware.
[0329] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. The present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. The embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0330] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0331] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes. The above description is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A coding and decoding method, characterized in that: The method comprises: When determining to start sub-block-based joint prediction for a current block, obtaining block partitioning information of the current block; Dividing the current block into a first sub-block and a second sub-block according to the block division information; Acquire prediction mode information corresponding to the first sub-block and prediction mode information corresponding to the second sub-block; wherein the prediction mode information corresponding to the first sub-block is an intra-frame prediction mode, and the prediction mode information corresponding to the second sub-block is an intra-frame prediction mode; Obtaining a first target intra sub-prediction mode of the first sub-block and a second target intra sub-prediction mode of the second sub-block, wherein the first target intra sub-prediction mode is different from the second target intra sub-prediction mode; Acquire a prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode; Acquire a prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode; Obtaining a prediction value of a current block according to a prediction value corresponding to the first sub-block and a prediction value corresponding to the second sub-block; The current block includes a first region block, a second region block and a third region block, the first region block is located in the first sub-block, the second region block is located in the second sub-block, a distance between a center of each sub-block in the third region block and a dividing line is less than a preset threshold, and the dividing line is determined based on the block division information; The acquiring a prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode, and acquiring a prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode, comprises: acquiring a prediction value corresponding to the first area block according to the first target intra-frame sub-prediction mode; acquiring a prediction value corresponding to the second area block according to the second target intra-frame sub-prediction mode; acquiring a prediction value corresponding to the third area block according to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode; Wherein, obtaining the prediction value corresponding to the third region block according to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode includes: obtaining the first prediction value corresponding to the third region block according to the first target intra-frame sub-prediction mode; obtaining the second prediction value corresponding to the third region block according to the second target intra-frame sub-prediction mode; performing weighted processing on the first prediction value and the second prediction value to obtain the prediction value corresponding to the third region block; The shape of the first sub-block is the same as that of the second sub-block; or the shape of the first sub-block is different from that of the second sub-block.
2. The method according to claim 1, characterized in that The obtaining a first target intra-frame sub-prediction mode of the first sub-block and a second target intra-frame sub-prediction mode of the second sub-block includes: Determine the specified first intra sub-prediction mode as the first target intra sub-prediction mode of the first sub-block, and determine the specified second intra sub-prediction mode as the second target intra sub-prediction mode of the second sub-block; or constructing an intra sub-prediction mode candidate list, the intra sub-prediction mode candidate list comprising a plurality of candidate intra sub-prediction modes; selecting a candidate intra sub-prediction mode from the intra sub-prediction mode candidate list as a first target intra sub-prediction mode for the first sub-block, and selecting another candidate intra sub-prediction mode from the intra sub-prediction mode candidate list as a second target intra sub-prediction mode for the second sub-block; or, If the intra-frame subprediction mode of the first neighboring block of the first subblock is different from the intra-frame subprediction mode of the second neighboring block of the second subblock, the intra-frame subprediction mode of the first neighboring block is determined as the first target intra-frame subprediction mode of the first subblock, and the intra-frame subprediction mode of the second neighboring block is determined as the second target intra-frame subprediction mode of the second subblock; if the intra-frame subprediction mode of the first neighboring block is the same as the intra-frame subprediction mode of the second neighboring block, the intra-frame subprediction mode of the first neighboring block is determined as the first target intra-frame subprediction mode of the first subblock, and another intra-frame subprediction mode different from the first target intra-frame subprediction mode is determined as the second target intra-frame subprediction mode of the second subblock.
3. The method according to claim 1 or 2, characterized in that: The first sub-block is one of the following sub-blocks: a triangular sub-block, a trapezoidal sub-block, or a pentagonal sub-block; The second sub-block is one of the following sub-blocks: a triangular sub-block, a trapezoidal sub-block, or a pentagonal sub-block.
4. A coding and decoding device, characterized in that: The device comprises: An acquisition module, used for acquiring block partitioning information of the current block when determining to start sub-block-based joint prediction for the current block; A processing module, configured to divide the current block into a first sub-block and a second sub-block according to the block division information; The acquisition module is further used to acquire prediction mode information corresponding to the first sub-block and prediction mode information corresponding to the second sub-block; wherein the prediction mode information corresponding to the first sub-block is an intra-frame prediction mode, and the prediction mode information corresponding to the second sub-block is an intra-frame prediction mode; acquire a first target intra-frame sub-prediction mode of the first sub-block and a second target intra-frame sub-prediction mode of the second sub-block, wherein the first target intra-frame sub-prediction mode is different from the second target intra-frame sub-prediction mode; acquire a prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode; acquire a prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode; and acquire a prediction value of the current block according to the prediction value corresponding to the first sub-block and the prediction value corresponding to the second sub-block; The current block includes a first region block, a second region block and a third region block, the first region block is located in the first sub-block, the second region block is located in the second sub-block, a distance between a center of each sub-block in the third region block and a dividing line is less than a preset threshold, and the dividing line is determined based on the block division information; The acquisition module acquires the prediction value corresponding to the first sub-block according to the first target intra-frame sub-prediction mode, and acquires the prediction value corresponding to the second sub-block according to the second target intra-frame sub-prediction mode, and is specifically used to: acquire the prediction value corresponding to the first area block according to the first target intra-frame sub-prediction mode; acquire the prediction value corresponding to the second area block according to the second target intra-frame sub-prediction mode; acquire the prediction value corresponding to the third area block according to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode; Wherein, when the acquisition module acquires the prediction value corresponding to the third area block according to the first target intra-frame sub-prediction mode and the second target intra-frame sub-prediction mode, it is specifically used to: acquire the first prediction value corresponding to the third area block according to the first target intra-frame sub-prediction mode; acquire the second prediction value corresponding to the third area block according to the second target intra-frame sub-prediction mode; perform weighted processing on the first prediction value and the second prediction value to obtain the prediction value corresponding to the third area block; The shape of the first sub-block is the same as that of the second sub-block; or the shape of the first sub-block is different from that of the second sub-block.
5. A decoding end device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the method steps described in any one of claims 1-3.
6. A coding end device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the method steps described in any one of claims 1-3.
7. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores a plurality of computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Image compression method of adopting reference pixel extracted from reconstructed pixels having different completion degrees and image compression device
CN106303535A
Method for processing video signal and device for same
CN107534767A
