Inter-frame prediction method, encoder, decoder and storage medium
By selecting the partition close to the upper right corner pixel position as the first partition in inter-frame prediction and performing weighted fusion, the problem of high encoding bit rate in the existing technology is solved, and a lower encoding bit rate and higher prediction accuracy are achieved.
Patent Information
- Application Number
- CN202080073861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-03
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2040-04-03
AI Technical Summary
In existing inter-frame prediction methods, the partition selection method of the geometric partition prediction mode leads to a high encoding bit rate and does not comply with the partition distribution rules, affecting the coding efficiency.
By selecting the partition close to the upper right corner pixel position as the first partition and arranging its candidate positions in front, inter-frame prediction is performed in combination with weighted fusion to determine the partition position that meets the preset conditions, and weighted fusion is performed to reduce the encoding bit rate.
The coding efficiency of inter-frame prediction is improved, the coding bit rate is reduced, the partition distribution rule is complied with, and the prediction accuracy is improved.
Smart Images

Figure CN114586366B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to video coding technology, including but not limited to inter-frame prediction methods, encoders, decoders, and storage media. Background Art
[0002] In video encoding and decoding, in addition to intra-frame prediction, inter-frame prediction can also be used during the encoding and decoding of the current block. Inter-frame prediction includes motion estimation and motion compensation. For motion compensation, the Geometrical Partition Mode (GMP) can be used to divide the current block between frames into two non-rectangular partitions, perform predictions on each partition, and then perform weighted fusion to obtain the predicted value for the current block. Summary of the Invention
[0003] The embodiments of the present application provide an inter-frame prediction method, an encoder, a decoder and a storage medium, which can select a partition close to the upper right corner pixel position as the first partition, so that the candidate for the first partition is closer to the front than the candidate for the second partition, which can make the encoding bit rate lower.
[0004] The technical solution of the embodiment of the present application can be implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides an inter-frame prediction method, applied to an encoder, the method comprising:
[0006] Determining prediction mode parameters for the current block;
[0007] When the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using the geometric partition prediction mode, determining a first position of a partition that meets a preset condition in the current block;
[0008] In the current block, determining a region whose distance from a first position of the current block is less than a preset distance as a first partition;
[0009] Determine a second partition from an area of the current block excluding the first partition;
[0010] determining a first predicted value for the first partition and a second predicted value for the second partition;
[0011] The first prediction value and the second prediction value are weightedly fused to determine an inter-frame prediction value of the current block.
[0012] In a second aspect, an embodiment of the present application provides an inter-frame prediction method, applied to a decoder, the method comprising:
[0013] Parse the code stream and determine the prediction decoding parameters of the current block;
[0014] When the prediction decoding parameter indicates that the inter-frame prediction value of the current block is determined using the geometric partition prediction mode, determining a first position of a partition that meets a preset condition in the current block;
[0015] In the current block, determining a region whose distance from a first position of the current block is less than a preset distance as a first partition;
[0016] Determine a second partition from an area of the current block excluding the first partition;
[0017] determining a first predicted value for the first partition and a second predicted value for the second partition;
[0018] The first prediction value and the second prediction value are weightedly fused to determine an inter-frame prediction value of the current block.
[0019] In a third aspect, an embodiment of the present application provides an encoder, wherein:
[0020] A first determination module, configured to determine prediction mode parameters of a current block;
[0021] A first indication module is configured to determine a first position of a partition meeting a preset condition in the current block when the prediction mode parameter indicates that the inter-frame prediction value of the current block is determined using the geometric partition prediction mode;
[0022] a first partitioning module, configured to determine, in the current block, a region whose distance from a first position of the current block is less than a preset distance as a first partition;
[0023] A second partitioning module, configured to determine a second partition from an area of the current block excluding the first partition;
[0024] a second determining module, configured to determine a first predicted value of the first partition and a second predicted value of the second partition;
[0025] The first fusion module is used to perform weighted fusion on the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block.
[0026] In a fourth aspect, an embodiment of the present application provides an encoder, wherein:
[0027] A first parsing module is used to parse the code stream and determine the prediction decoding parameters of the current block;
[0028] A second indication module is configured to determine a first position of a partition meeting a preset condition in the current block when the prediction decoding parameter indicates that the inter-frame prediction value of the current block is determined using a geometric partition prediction mode;
[0029] a third partitioning module, configured to determine, in the current block, a region whose distance from the first position of the current block is less than a preset distance as a first partition;
[0030] a fourth partitioning module, configured to determine a second partition from an area of the current block excluding the first partition;
[0031] a third determining module, configured to determine a first predicted value of the first partition and a second predicted value of the second partition;
[0032] The second fusion module is used to perform weighted fusion on the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block.
[0033] In a fifth aspect, an embodiment of the present application further provides an encoder, comprising:
[0034] a first memory and a first processor;
[0035] The first memory stores a computer program that can be run on the first processor, and the first processor implements the inter-frame prediction method of the encoder when executing the program.
[0036] In a sixth aspect, an embodiment of the present application further provides a decoder, including:
[0037] a second memory and a second processor;
[0038] The second memory stores a computer program that can be run on the second processor, and the second processor implements the inter-frame prediction method of the decoder when executing the program.
[0039] In a seventh aspect, an embodiment of the present application provides a storage medium, including:
[0040] A computer program is stored thereon, and when the computer program is executed by the first processor, the inter-frame prediction method of the encoder is implemented; or when the computer program is executed by the second processor, the inter-frame prediction method of the decoder is implemented.
[0041] An embodiment of the present application provides an inter-frame prediction method, an encoder, a decoder and a storage medium. In the process of inter-frame prediction, according to the construction order between different partitions of the current block in a preset candidate list; the position of the partition arranged in the preset sequence in the construction order is determined as the first position; then, in the current block, an area whose distance from the first position of the current block is less than a preset distance is determined as the first partition; a second partition is determined from the area of the current block other than the first partition; in this way, the partition close to the upper right corner pixel position is selected as the first partition, so that the candidate of the first partition is closer than the candidate of the second partition, which can make the encoding bit rate lower. By using such a partitioning method, the current block is partitioned, so that the predicted inter-frame prediction value of the current block is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1A Schematic diagram of GPM partitions at different angles according to an exemplary embodiment of the present application;
[0043] Figure 1B This is a schematic diagram of the distribution of positive and negative values of directly calculating distance at different angles according to an exemplary embodiment of the present application;
[0044] Figure 2A A block diagram of a video encoding system provided in an embodiment of the present application;
[0045] Figure 2B A block diagram of a video decoding system provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a flow chart of an image component prediction method provided in an embodiment of the present application;
[0047] Figures 4a-4g A schematic diagram of exemplary multiple partitioning modes provided in an embodiment of the present application;
[0048] Figure 5A A schematic diagram of an exemplary current block angle and step size provided in an embodiment of the present application;
[0049] Figure 5B This is a schematic diagram of adjacent blocks in the candidate list of an embodiment of the present application;
[0050] Figure 5C This is a schematic diagram of a candidate list for an embodiment of the present application;
[0051] Figure 6a A schematic diagram of an exemplary first weight value of brightness provided in an embodiment of the present application;
[0052] Figure 6b A schematic diagram of an exemplary first weight value of chromaticity provided in an embodiment of the present application;
[0053] Figure 7 This is a flow chart of the codec prediction process according to an embodiment of the present application;
[0054] Figure 8 This is a schematic diagram of determining AB partitions by the distance between two points in an embodiment of the present application;
[0055] Figure 9 This is a schematic diagram of residual calculation in an embodiment of the present application;
[0056] Figure 10 This is a revised schematic diagram of the partition distribution of the embodiment of the present application;
[0057] Figure 11 This is a schematic diagram of an implementation flow of an intra-frame prediction method according to an embodiment of the present application;
[0058] Figure 12 This is a schematic diagram of the hardware structure of an encoder according to an embodiment of the present application;
[0059] Figure 13 This is a schematic diagram of the hardware structure of another encoder according to an embodiment of the present application;
[0060] Figure 14 This is a schematic diagram of the hardware structure of a decoder according to an embodiment of the present application;
[0061] Figure 15 This is a schematic diagram of the hardware structure of another decoder according to an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.
[0063] In the related art, the selection of the two partitions of the GPM is determined by the angle, such as Figure 1A As shown, Figure 1A This is a schematic diagram of GPM partitions at different angles according to an exemplary embodiment of this application. Figure 1A It can be seen that partition 11 represents the first partition (i.e., partition A), and partition 12 represents the second partition (i.e., partition B); the partitions between sequence numbers 12 and 28 are opposite. However, the positive and negative ranges of the obtained weight index (weightIdx) values are as follows Figure 1B The results shown are from Figure 1B As shown, the weight index of partition 13 is positive, and the weight index of partition 14 is negative; comprehensive comparison Figure 1A and Figure 1B , it can be concluded that within the angle range of 13-27, partition A corresponds to the area with negative distance, while at other angles, partition A corresponds to the area with positive distance.
[0064] In order to unify the calculation formula of multiplying the calculated weight by the pixels of partition A, when calculating the weight value, it is necessary to use partFlip to flip the partition. Within the angle range of 13-27, partition A corresponds to the area with negative distance, while at other angles, partition A corresponds to the area with positive distance.
[0065] However, there are some disadvantages to this angle-based flipping method:
[0066] The first drawback is that determining AB partitions based solely on angle can be sloppy. Considering the impact of the Merge candidate construction rules on AB partition candidate selection, the current Merge list construction order is: B1-A1-B0-A0-B2-co-located temporal candidate-history-based candidate-combined average candidate-zero candidate. Therefore, the partition closest to the upper right corner pixel position should be selected as Partition A whenever possible. This allows Partition A candidates to be positioned ahead of Partition B candidates, resulting in a lower encoding bitrate. Although the distribution of square blocks at most angles closely matches this selection, there are still many cases where it is not satisfactory.
[0067] The second drawback is that for angles between 13 and 27, the two partitions must be flipped so that the weight index of partition A remains positive. However, analyzing the partition distribution for each angle shows that, theoretically, the partitions corresponding to angle indices 12 and 28 should remain consistent, with partition A on the upper left and partition B on the lower right. However, a significant gap appears here. While the performance impact is minimal, it violates the GPM partition distribution rules.
[0068] Based on this, an embodiment of the present application provides an inter-frame prediction method, first, determining the prediction mode parameters of the current block; when the prediction mode parameters indicate the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block, determining the first position of the partition that meets the preset conditions in the current block; then, in the current block, determining the area whose distance from the first position of the current block is less than the preset distance as the first partition; determining the second partition from the area of the current block other than the first partition; determining the first prediction value of the first partition and the second prediction value of the second partition; finally, weighted fusion of the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block. In this way, combined with the construction order of the Merge list (for example, the construction order is B1-A1-B0-A0-B2-co-located time domain candidate-history-based candidate-combined average candidate-zero candidate), the partition close to the upper right corner pixel position is selected as partition A, so that the candidate of partition A is closer than the candidate of partition B, which can make the encoding bit rate lower.
[0069] In a hybrid video coding framework, coding techniques such as prediction, transform, and quantization are implemented using square and rectangular blocks. However, in reality, the edges of moving objects are not always horizontal or vertical. Even if they are, they do not necessarily coincide with the edges of demarcable blocks. Furthermore, the motion vectors on either side of the moving edge often differ. Therefore, using motion prediction and compensation for an entire block during the coding process can easily lead to large prediction errors, which in turn limits coding efficiency.
[0070] During the development of Versatile Video Coding (VVC), other partitioning shapes besides squares and rectangles were introduced. First, the Triangular Partition Mode (TPM) was introduced. This uses the diagonal or anti-diagonal lines of a square or rectangle as partitions to create triangular prediction units. This allows for more flexible representation of inter-frame prediction data, reduces prediction error, and thus improves coding efficiency.
[0071] The inter-blocks (GEO) prediction mode is adopted into the VVC standard to form the Geometrical Partition Mode (GPM). In GPM, a more flexible representation method is used for the edges of moving objects in the image. The inter-block is divided into two non-rectangular sub-partitions, which are predicted separately and then weighted fused. In video images, the coding block (CB) is generally represented by the first image component, the second image component, and the third image component. These three image components are a luminance component, a blue chrominance component, and a red chrominance component. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbols Cb or U, and the red chrominance component is usually represented by the symbols Cr or V. In this way, video images can be represented in YCbCr format or YUV format.
[0072] In the embodiment of the present application, the first image component may be a luminance component, the second image component may be a blue chrominance component, and the third image component may be a red chrominance component, but the embodiment of the present application does not make any specific limitation.
[0073] This application provides a video coding system, such as Figure 2AAs shown, the video coding system 10 includes a transform and quantization unit 101, an intra-frame estimation unit 102, an intra-frame prediction unit 103, a motion compensation unit 104, a motion estimation unit 105, an inverse transform and inverse quantization unit 106, a filter control analysis unit 107, a filtering unit 108, a coding unit 109 and a decoded image cache unit 110, etc., wherein the filtering unit 108 can implement deblocking filtering and sample adaptive offset (Sample Adaptive Offset, SAO) filtering, and the coding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC). For the input original video signal, through the coding tree block (Coding Tree A video coding block can be obtained by dividing the video coding block into a plurality of frames (CTUs) and then the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 101, including transforming the residual information from the pixel domain to the transform domain and quantizing the obtained transform coefficients to further reduce the bit rate; the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to perform intra-frame prediction on the video coding block; specifically, the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used to determine the intra-frame prediction mode to be used to encode the video coding block; the motion compensation unit 104 and the motion estimation unit 105 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide temporal prediction information; the motion estimation performed by the motion estimation unit 105 is a process of generating a motion vector, which can estimate the motion of the video coding block, and then the motion compensation unit 104 calculates the motion vector based on the motion vector determined by the motion estimation unit 105. After determining the intra-frame prediction mode, the intra-frame prediction unit 103 is further configured to provide the selected intra-frame prediction data to the encoding unit 109, and the motion estimation unit 105 also sends the calculated motion vector data to the encoding unit 109. In addition, the inverse transform and inverse quantization unit 106 is configured to reconstruct the video coding block and reconstruct a residual block in the pixel domain. The reconstructed residual block is subjected to the filter control analysis unit 107 and the filtering unit 108 to remove the block effect artifacts. The reconstructed residual block is then added to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video coding block. The encoding unit 109 is configured to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-frame prediction mode, and output the code stream of the video signal. The decoded image buffer unit 110 is configured to store the reconstructed video coding block for prediction reference.As the video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoded image buffer unit 110 .
[0074] See also Figure 2B , which shows an example of a block diagram of a video decoding system provided by an embodiment of the present application; Figure 2B As shown, the video decoding system 20 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a filtering unit 205 and a decoded image buffer unit 206, etc., wherein the decoding unit 201 can implement header information decoding and CABAC decoding, and the filtering unit 205 can implement deblocking filtering and SAO filtering. The input video signal is processed by Figure 2A After the encoding process, the code stream of the video signal is output; the code stream is input into the video decoding system 20, and first passes through the decoding unit 201 to obtain the decoded transform coefficients; the transform coefficients are processed by the inverse transform and inverse quantization unit 202 to generate a residual block in the pixel domain; the intra-frame prediction unit 203 can be used to generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and the data of the previously decoded block from the current frame or picture; the motion compensation unit 204 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information To generate a predictive block of the video decoding block being decoded; by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra-frame prediction unit 203 or the motion compensation unit 204, a decoded video block is formed; the decoded video signal passes through the filtering unit 205 to remove blocking artifacts, which can improve the video quality; the decoded video block is then stored in the decoded image buffer unit 206, which stores the reference image used for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, that is, the restored original video signal is obtained.
[0075] The image component prediction method in the embodiment of the present application is mainly used in Figure 2A The intra-frame prediction unit 103 shown in FIG. Figure 2BThe intra-frame prediction unit 203 part is shown. That is to say, the image component prediction method in the embodiment of the present application can be applied to both the video encoding system and the video decoding system, and can even be applied to both the video encoding system and the video decoding system at the same time, but the embodiment of the present application does not make any specific limitation. It should also be noted that when the image component prediction method is applied to the intra-frame prediction unit 103 part, the "current block" specifically refers to the current block in the intra-frame prediction; when the image component prediction method is applied to the intra-frame prediction unit 203 part, the "current block" specifically refers to the current decoded block in the intra-frame prediction.
[0076] Based on this, the technical solution of this application is further described in detail below with reference to the accompanying drawings and embodiments. Before proceeding with the detailed description, it should be noted that the terms "first", "second", "third", etc. mentioned throughout the specification are only used to distinguish different features and do not have the function of defining priority, sequence, size relationship, etc.
[0077] The embodiment of the present application provides an inter-frame prediction method, which is applied to a video encoding device, i.e., an encoder. The functions implemented by the method can be implemented by calling program code by a processor in the video encoding device. Of course, the program code can be stored in a computer storage medium. It can be seen that the video encoding device includes at least a processor and a storage medium. Figure 3 , which shows a flow chart of an inter-frame prediction method provided by an embodiment of the present application. Figure 3 As shown, the method may include:
[0078] Step S301: Determine the prediction mode parameters of the current block.
[0079] It should be noted that a video image can be divided into multiple image blocks, and each image block currently to be encoded can be called a coding block (CB). Here, each coding block may include a first image component, a second image component, and a third image component; and the current block is the coding block in the video image currently to be predicted for the first image component, the second image component, or the third image component.
[0080] Here, assuming that the current block performs a first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block can also be called a luminance block; or, assuming that the current block performs a second image component prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block can also be called a chrominance block.
[0081] It should also be noted that the prediction mode parameters indicate the coding mode of the current block and parameters related to the mode. Usually, the prediction mode parameters of the current block can be determined by using Rate Distortion Optimization (RDO).
[0082] Specifically, in some embodiments, the encoder determines the prediction mode parameters of the current block as follows: the encoder determines the image component to be predicted of the current block; based on the parameters of the current block, the image component to be predicted is predictively encoded using multiple prediction modes, and the rate-distortion cost results corresponding to each prediction mode under the multiple prediction modes are calculated; the minimum rate-distortion cost result is selected from the multiple rate-distortion cost results calculated, and the prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block.
[0083] That is to say, on the encoder side, multiple prediction modes can be used for the current block to encode the predicted image components respectively. Here, the multiple prediction modes generally include inter-frame prediction mode, traditional intra-frame prediction mode and non-traditional intra-frame prediction mode, and the traditional intra-frame prediction mode can include direct current (DC) mode, planar (PLANAR) mode and angle mode, etc., and the non-traditional intra-frame prediction mode can include MIP mode, cross-component linear model prediction (CCLM) mode, intra block copy (IBC) mode and PLT (Palette) mode, etc. The inter-frame prediction mode can include: geometrical partitioning for inter blocks (GEO), geometric partitioning prediction mode, triangle partition mode (TPM), etc.
[0084] In this way, after encoding the current block using multiple prediction modes respectively, the rate-distortion cost results corresponding to each prediction mode can be obtained; then the minimum rate-distortion cost result is selected from the multiple rate-distortion cost results obtained, and the prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block; in this way, the current block can finally be encoded using the determined prediction mode, and under this prediction mode, the prediction residual can be made small, which can improve the coding efficiency.
[0085] Step S302: when the prediction mode parameter indicates that the geometric partitioning prediction mode GPM is used to determine the inter-frame prediction value of the current block, the first position of the partition meeting the preset condition in the current block is determined.
[0086] In the embodiment of the present application, in order to make the candidate of partition A more advanced than the candidate of partition B, the position of the first partition B1 constructed in the construction order of the merge list is determined as the first position. GMP is to divide the inter-frame block (i.e., the current block) into two non-rectangular sub-partitions for the edge part of the object in the image, and then perform weighted fusion after prediction. For example, the non-rectangular form can be as follows Figures 4a-4g shown.
[0087] GPM has 64 partitioning modes, each corresponding to an angle α and a step size ρ. There are 20 angles and four step sizes, and each angle and step size combination constitutes a partitioning mode. GPM divides the current block into two non-rectangular sub-partitions. Each sub-partition performs unidirectional motion compensation to obtain a unidirectional prediction value. Finally, the unidirectional prediction values of the two sub-partitions are weighted and fused using a weight matrix to obtain the final GPM prediction value.
[0088] It should be noted that the angle table uses a slope-based angle table instead of the previous fixed-step angle table, and uses 5 fixed slopes (1, 1 / 2, 1 / 4, 4, 2) to construct an unequally spaced angle table.
[0089] For example, Figure 5A As shown in Figure 1, each combination of angle α and step size ρ constitutes a partitioning pattern. GPM divides the current block into two non-rectangular sub-partitions. Each sub-partition performs unidirectional motion compensation to obtain a unidirectional prediction value. Finally, the unidirectional prediction values of the two sub-partitions are weighted and fused using a weight matrix to obtain the final GPM prediction value.
[0090] In the embodiment of the present application, the partition that meets the preset conditions can be understood as the partition that is at the front of the construction order in the candidate list. For example, the partition that is arranged first in the construction order is determined as the partition that meets the preset conditions. Then, the position of the partition in the coding block in the candidate list is determined. In a specific example, the construction order of the Merge list is: B1-A1-B0-A0-B2-co-located time domain candidate-history-based candidate-combined average candidate-zero candidate; that is, the first constructed partition is B1, from Figure 5B It can be seen that B1 is in the upper right corner of the current block. Therefore, in order to select the partition as close to the upper right corner pixel position as possible as partition A, the area near the upper right corner is divided into partition A, thereby ensuring that the candidate for partition A is closer to the candidate for partition B, which can make the encoding bit rate lower.
[0091] In some embodiments of the present application, in VTM 8.0, each coding unit (CU) must meet certain restrictions on the use of GPM:
[0092] (1) Sequence parameter set (Sps) allows the use of GPM prediction method
[0093] (2) The current coded image area belongs to a bidirectional prediction slice (B slice)
[0094] (3) Block size restriction: The width and height must both be greater than or equal to 8 and less than or equal to 64, and the aspect ratio and height-to-width ratio of the current block must both be less than 8.
[0095] (4) The current block is not general merge prediction, merge_subblock prediction, affine prediction, or composed intra inter prediction (CIIP).
[0096] (5) Disable the GPM prediction process for chroma components in 4:0:0 format.
[0097] The syntax of the coding unit layer is as follows:
[0098]
[0099] The above grammar parsing includes the following steps:
[0100] Step 1: Construct a merge candidate list, which is the same as the process of constructing a list in normal merge mode.
[0101] Here, GMP uses the original one-way merge candidate list of TPM in VVC8, that is, the preset merge candidate list, to find the motion vectors (MVs), that is, motion information, of the two partitions after GMP division.
[0102] like Figure 5B As shown, Figure 5B This is a schematic diagram of the structure of the candidate list adjacent blocks of an exemplary embodiment of the present application, from Figure 5B It can be seen that the construction order is the upper neighboring block (B1) 501, the left neighboring block 503 (A1), the upper right neighboring block 502 (B0), the lower left neighboring block 504 (A0), the upper left neighboring block B2, the reference frame corresponding position block 505 (col), the historical reference block (his), the average of the first and second candidate MVs (MV avg), and the zero motion vector 0.
[0103] Step 2: Get the MVs of two partitions (for example, get partition A first and then get partition B)
[0104] merge_gpm_idx0[x0][y0] indicates the position of the MV of partition A in the merge list. Let m=merge_gpm_idx0[xCb][yCb] and wait for subsequent processing.
[0105] merge_gpm_idx1[x0][y0] represents the position of the MV of partition B in the merge list. The position of the MV of partition B in the merge list may be reduced by 1 because A first selects the option at the front position.
[0106] Let n = merge_gpm_idx1[xCb][yCb] + (merge_gpm_idx1[xCb][yCb]>m)? 1:0, where n represents the actual position of the MV selected by partition B in the merge candidate list, waiting for subsequent processing.
[0107] Let M = mergeCandList[m], and take the mth item from the merge list for the MV construction of partition A.
[0108] Because in the geometric prediction block, each partition will only use the unidirectional prediction mode, and each item in the merge list may be the MV information of the bidirectional prediction, so it is necessary to extract the unidirectional prediction MV for use. Let X = (m & 0x01), where & is the bitwise AND operation, that is, extracting the last bit of m (similar to the parity check). In this way, the MV information corresponding to the reference frame in the reference list corresponding to X is preferentially used for partition prediction, such as Figure 5C If the corresponding MV is not available (the MV of the adjacent block itself may also be unidirectional), the opposite MV (block 512 (i.e., block 511 horizontally corresponding to block 512) is used. Figure 5C MV) represented by the white block in the figure, X=1-X.
[0109] At this point, the corresponding MV information is stored in the processing variable of partition A to prepare for the subsequent prediction block construction, as shown below:
[0110] MVA[0]=MVLXM[0]
[0111] MVA[1]=MVLXM[1]
[0112] refIdxA=refIdxLXM
[0113] predListFlagA=X
[0114] Among them, MVA is the MV vector, refIdxA is the reference frame corresponding to the motion vector, and predListFlagA indicates which list of components of the motion vector candidate is currently selected.
[0115] Let N = mergeCandList[n], and take the nth item from the merge list for MV construction of partition B.
[0116] The n-th unidirectional motion vector is used for MVB construction, preferably using Figure 5C Block 511 in (e.g. Figure 5C The black block in the image corresponds to the MV. If it is unavailable, the opposite MV is used. Therefore, let X = (n & 0x01). If predFlagLXN is unavailable, then X = 1-X.
[0117] At this point, the corresponding MV information is stored in the processing variable of the B partition to prepare for the subsequent prediction block construction, as shown below:
[0118] MVB[0]=MVLXN[0]
[0119] MVB[1]=MVLXN[1]
[0120] refIdxB=refIdxLXN
[0121] predListFlagB=X
[0122] Among them, MVB is the MV vector, refIdxB is the reference frame corresponding to the motion vector, and predListFlagB indicates which list of components of the motion vector candidate is currently selected.
[0123] In the embodiment of the present application, the encoder determines the partition mode with the lowest rate-distortion cost by traversing the 64 partition models corresponding to GPM, that is, determining the target partition mode; the encoder can then determine the angle index information and step index information corresponding to the target partition mode based on the target partition mode through a preset mapping table of partition modes, angle indices, and step indices. When the current prediction block is in GPM mode, the corresponding angle angleIdx and step length distanceIdx will be obtained by looking up the table based on the partition mode index merge_gpm_partition_idx selected by the current block. The mapping table for this partition mode is shown in Table 1:
[0124] Table 1. Mapping table of angle and step size based on wedge_partition_idx
[0125]
[0126] Step S303 : In the current block, a region whose distance from the first position of the current block is less than a preset distance is determined as a first partition.
[0127] In an embodiment of the present application, in order to make the candidates for partition A closer than those for partition B, the area in the current block that is closer to the upper right corner of the current block (i.e., the first position of the first constructed B1 partition in the construction order of the merge list) is divided into the first partition. In this way, the area near the upper right corner of the current block is divided into partition A; thereby, the candidates for partition A are closer than those for partition B, so that the encoding bit rate is lower.
[0128] In an embodiment of the present application, the first position can be understood as first determining the position of the first constructed partition in the coding block through the construction order between different partitions of the coding block in the obtained candidate list (for example, the merge list). Then, after determining the first position, determine the area in the current block whose distance from the first position of the current block is less than the preset distance, and divide this area into the first partition (for example, partition A). Finally, determine the remaining other areas in the current block as the second partition (for example, partition B). In this way, it is ensured that the candidate for partition A is ahead of the candidate for partition B. In a specific example, according to the construction order between different partitions of the coding block in the merge list, the position of the first constructed partition in the coding block is the upper right corner, so the upper right corner is the first position; then, in the current block, determine the area near the upper right corner as partition A, and the other areas as partition B.
[0129] In some possible implementations, first, the first position of the current block is determined, for example, the upper right corner position of the current block, and then, in the current block, an area whose distance from the upper right corner position is less than a preset distance is determined, and this area is divided into a first partition, for example, an area within 0.1 mm around the first position of the current block is determined as an area whose distance between the first position of the current block is less than the preset distance.
[0130] It should be noted that in the embodiment of the present application, GMP adopts the one-way Merge candidate list of TPM in the original VVC8, that is, the preset merge candidate list, to find the MV of each of the two partitions after the GMP division, that is, the motion information.
[0131] The Merge candidate list typically includes a preset number of reference block elements, which can be six. Each element stores data in the form of a structure. Each structure can include: motion information, reference frame list, prediction direction, etc. for the reference block. When storing data corresponding to GMP, it is stored in 4×4 blocks.
[0132] In the embodiment of the present application, information such as angle index information, step index information, first motion information, and second motion information needs to be written into the bitstream during encoding for use during decoding.
[0133] Step S304: Determine a second partition from an area of the current block excluding the first partition.
[0134] Here, the second partition is a portion of the area of the current block excluding the first partition, that is, the current block includes the first partition, the second partition, and the remaining portion. For example, the current block includes only the first partition and the second partition. For example, part or all of the area of the current block excluding the first partition is determined as the second partition.
[0135] Step S305: Determine a first prediction value of the first partition and a second prediction value of the second partition.
[0136] In an embodiment of the present application, a first prediction value of the first partition and a second prediction value of the second partition can be determined based on GMP parameters. Since the GMP parameters may include angle index information and a target partition mode, the encoder can partition the current block according to the target partition mode to obtain a first partition and a second partition; determine the first motion information of the first reference block corresponding to the first partition and the second motion information of the second reference block corresponding to the second partition from a preset merge candidate list; the encoder performs motion compensation based on the first motion information to obtain a first prediction value for the first partition, and the encoder performs motion compensation based on the second motion information to obtain a second prediction value for the second partition.
[0137] Step S306: Perform weighted fusion on the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block.
[0138] In an embodiment of the present application, first, a first weight value and a second weight value of pixels in the current block are determined based on the GMP parameters. Then, based on the first prediction value, the second prediction value, the first weight value, and the second weight value, the pixels in the current block are weightedly fused to obtain an inter-frame prediction value for the current block. The encoder can perform weighted fusion on the pixels in the current block by multiplying the first prediction value of each pixel by the first weight value, and adding the product of the corresponding second prediction value of each pixel and the second weight value to obtain an inter-frame prediction value for the current block.
[0139] It should be noted that the first prediction value and the second prediction value are two prediction values corresponding to each pixel in the current block, and the first weight value and the second weight value also correspond to two different weight values of each pixel in the current block.
[0140] The inter-frame prediction value of the current block can be obtained by using expression (1), as shown below:
[0141] pbSamples[x][y]=Clip3(0,(1< <bitDepth)1,(predSamplesLPART1[x][y]*(8sampleWeight1)+predSamplesLPART2[x][y]*sampleWeight2+offset1)> >shift1)(1);
[0142] Among them, pbSamples[x][y] is the inter-frame prediction value of each pixel in the current block, predSamplesLPART1[x][y] is the first prediction value of each pixel, sampleWeight1 is the first weight value of each pixel, predSamplesLPART2[x][y] is the second prediction value of each pixel, and sampleWeight2 is the second weight value of each pixel.
[0143] In some embodiments of the present application, when the encoder performs inter-frame prediction of the current block, it predicts the video components separately, that is, the first prediction value and the second prediction value both include a luminance prediction value and a chrominance prediction value.
[0144] In an embodiment of the present application, the encoder may first obtain the weight value of the luminance component, and the weight value of the chrominance component may be obtained based on the weight value of the luminance component.
[0145] The first weight and the second weight value mentioned in the present application may be the weight value of the brightness component.
[0146] It should be noted that the encoder obtains the luminance sample weight at the upper right corner of each 2*2 block and directly uses it as the chrominance sample weight at the current (x, y), that is, downsampling the luminance sample weight.
[0147] For example, Figure 6a Shown is the first weight of brightness, which is downsampled to obtain Figure 6b The first weight value of the chrominance shown can be downsampled according to the second weight of the luminance. The second weight of the luminance sample in the upper right corner (or upper left corner or lower left corner, etc.) of each 2*2 block can be directly used as the second weight of the chrominance sample at the current (x, y).
[0148] It can be understood that, during the inter-frame prediction process, the encoder can determine the first position of the partition that meets the preset conditions, and then determine the area whose distance from the first position of the current block is less than the preset distance as the first partition; and determine other areas in the current block as the second partition. In this way, the candidate for the first partition is closer to the front than the candidate for the second partition, which can make the encoding bit rate lower.
[0149] In some embodiments, the codec GPM prediction process, such as Figure 7 As shown, Figure 7 This is a flow chart of the codec prediction process of the embodiment of the present application. The prediction process of GPM is:
[0150] First, in the input module 701, input the brightness value (xCb, yCb), (width, height), the MV of the A partition and the MV of the B partition with a maximum accuracy of 1 / 16, the MV of the A partition and the MV of the B partition with a maximum brightness accuracy of 1 / 32, the reference frame corresponding to the A partition motion vector and the reference frame corresponding to the B partition motion vector, the component in which list of the A partition motion vector alternatives is currently selected, and the component in which list of the B partition motion vector alternatives is currently selected.
[0151] Next, in the processing module 702, the following four steps are performed:
[0152] Step 1: derive the reference frame list refPicLN and sub-pixel predicted pixel value predSamplesLN (14-bit depth) for the three components L, Cb, and Cr, where N is A or B.
[0153] Here, L, Cb, and Cr represent the blue and red colors of the luminance and chrominance of the current block, respectively.
[0154] Step 2: Push to the split angle and position.
[0155] Step 3: derive weighted predicted pixel values predSamples for the three components L, Cb, and Cr.
[0156] Step 4: Store the MV information for subsequent prediction of MVN, refidxN, and predListFlagN.
[0157] Finally, in the output module 703, the GPM prediction results, such as the predicted pixel value, pre-sampled brightness (predSamplesL), pre-sampled blue (predSamplesCb) and pre-sampled red (predSamplesCr), are output.
[0158] In an embodiment of the present application, the GPM mode reuses the existing conventional Merge list and constructs a one-way Merge list belonging to the GPM in a parity check manner. The Merge candidates of the two sub-partitions after the GPM division are selected from the one-way Merge candidate list, that is, the merge candidate list is constructed first, and then the MVs of the two partitions are obtained.
[0159] The reference frame list refPicLN and sub-pixel predicted pixel values predSamplesLN are derived for the L, Cb, and Cr components, where N is A or B. This means that motion compensation is used to calculate the unidirectional motion-compensated prediction values for each of the two partitions, which are then used in the final weighted fusion process of GPM. The motion compensation process here is the same as the conventional motion compensation process, where the pixel values of the corresponding area are found using the motion vector and copied.
[0160] In some embodiments, to ensure that the determined first position enables the partition to meet a preset condition, step S302 may be implemented by the following steps:
[0161] Step S321 : when the prediction mode parameter indicates that the geometric partitioning prediction mode GPM is used to determine the inter-frame prediction value of the current block, determining the construction order between different partitions of the coding block in the preset candidate list.
[0162] Here, the preset candidate list can be a merge candidate list, which tries its best to find all the MVp information related to the motion information of the current block, that is, to find all the MVp information that is related to the motion information of the current block, and store it in the merge list for reference to the current block. The construction order between different partitions of the coding block in the merge candidate list is: upper adjacent block B1, left adjacent block A1, upper right adjacent block B0, lower left adjacent block A0, upper left adjacent block B2, reference frame corresponding position block col, historical reference block his, average MV avg of the first and second candidate MVs, and zero motion vector 0.
[0163] Step S322: Determine the position of the partition arranged at the preset serial number in the construction order as the first position.
[0164] Here, the preset sequence numbers are the first sequence numbers in the construction order. In some possible implementations, first, according to the construction order, the first partition to be constructed is determined; that is, the first partition to be constructed in the construction order, i.e., the upper adjacent block B1, is determined; then, the first position of the first partition to be constructed in the current block is determined. That is, the upper right corner of the current block is determined as the first position.
[0165] In some embodiments, to make the candidate blocks of the first partition appear earlier than the candidate blocks of the second partition, step S304 may be implemented in the following ways:
[0166] Method 1:
[0167] Step S341: Determine at least one reference point at a second position in the current block.
[0168] Here, the second position may be the upper right corner of the current block, for example, Figure 8 As shown, at the second position 801 , two reference points 81 and 82 are determined.
[0169] Step S342: Determine the sum of distances between the at least one reference point and the segmentation line in the current block.
[0170] In some embodiments, the partition line is used to partition the current block into multiple partitions, such as Figure 9 As shown, the dividing line of the current block 901 is 902. The sum of the distances from the two reference points in the upper right corner of the current block 901 to the dividing line is determined. Generally, in the coordinate system, if the dividing line is on the right side of the pixel point, the distance between the two is positive; if the dividing line is on the left side of the pixel point, the distance between the two is negative.
[0171] Step S343 : If the sum of the distances is greater than or equal to a preset value, the region where the pixel points in the current block whose distances to the dividing line are positive are located is determined as the first region.
[0172] In some embodiments, the preset value may be 0, such as Figure 8 As shown, if the sum of the distances between the two reference points 81 and 82 and the dividing line is greater than or equal to 0, then the partition corresponding to the positive distance value is determined to be the first partition (ie, partition A (partFlip=1)).
[0173] Here, the chrominance processing is consistent with the luminance, and the motion vector storage is also consistent with the A and B partitions here.
[0174] Or, in the specific implementation, when finally calculating the weighted sum, use expression (2) to calculate the final result:
[0175] wValue=weightSum>0? wValue:8-wValue;
[0176] pbSamples[x][y]=Clip3(0,(1<<BitDepth)-1,(predSamplesLA[x][y]*wValue+predSamplesLB[x][y]*(8-wValue)+offset1)> >shift1)(2);
[0177] Here, chroma processing is proportional to luminance, and motion vector storage is also consistent with the A and B partitions here.
[0178] Step S344: If the sum of the distances is less than the preset value, the region where the pixel points in the current block whose distances to the dividing line are negative are located is determined as the first region.
[0179] like Figure 8 As shown, if the sum of the distances between the two reference points 81 and 82 and the dividing line is less than 0, the partition corresponding to the negative distance value is determined to be the first partition (partition A).
[0180] Method 2:
[0181] Step S351: Determine the GPM parameters of the current block.
[0182] In an embodiment of the present application, the GPM parameters of the current block include: angle index information and size information of the current block.
[0183] Step S352: Determine the weight of each pixel in the current block according to the GPM parameters.
[0184] First, according to the size information of the current block, the position information of the pixel points in the current block is determined; for example, the current block includes many pixel points, and the encoder can determine the position information of the pixel points in the current block according to the size information of the current block. Based on the position information of each pixel point in the current block, the angle index information and the updated angle mapping table, the weight index corresponding to each pixel point in the current block can be calculated.
[0185] Then, the weights of the pixels in the current block are determined according to the angle index information, the preset angle mapping table and the position information of the pixels in the current block.
[0186] In an embodiment of the present application, the encoder determines the weight index corresponding to the pixel point in the current block based on the cosine angle index information, the sine angle index information, the update angle mapping table, and the position information of the pixel point in the current block. In the implementation process, the encoder needs to first determine the vertical distance rho from the block center point to the current dividing line based on the cosine angle index information and the sine angle index information, and then determine the weight index of each pixel point based on the cosine angle index information, the sine angle index information, the update angle mapping table, the position information of the pixel point in the current block, and rho.
[0187] Here, the process of determining the weighted predicted pixel value of each component in the current block is as follows, that is, the process of deriving the weighted predicted pixel value predSamples for the three components L, Cb, and Cr is:
[0188] First, the prediction value of the current luminance block is calculated. The weight mask matrix of the current luminance block is obtained by clipping the predefined weight matrix. The process is as follows:
[0189] Step 1: Obtaining the weight matrix requires calculating the offset value Offset(x, y) of the upper left corner of the current block corresponding to the coordinate origin through the current block and the current block division mode, and the coordinate origin is at the geometric center point of the same size block with the same angle dividing line passing through the geometric center point, such as Figure 9 As shown, background 903 is the maximum movable range (112x112) of the maximum size block (64x64) relative to the coordinate system, determined by the offset value offset vector based on the limited conditions. If the dividing line does not pass through the center point of the block, the dividing line is kept fixed relative to the center point, and the position of the block in the coordinate system is moved to achieve appropriate segmentation.
[0190] The following are the core parameters needed for offset calculation:
[0191] Because the distance from the point (x1, y1) to the line cosαx-sinαy=0 is d=cosαx1-sinαy1;
[0192] First, we need to obtain the index number displacementX of α in cos(α) corresponding to the current angle, as shown in expression (3), and the index number displacementY of α+π / 2 corresponding to -sin(α)=cos(α+π / 2), as shown in expression (4).
[0193] displacementX=angleIdx;(3);
[0194] displacementY=(displacementX+8)%32;(4);
[0195] The step size used when constructing the predefined weight matrix is only the first step size (ie, the segmentation line must intersect with the center point of the block).
[0196] The transmission of related information of partitions A and B in the code stream is sequential. Therefore, the order of the two partitions must follow certain principles. The partFlip is calculated by expression (5):
[0197] partFlip=(angleIdx>=13&&angleIdx<=27)? 0:1(5);
[0198] Among them, partFlip is 0, which means that the side with a negative distance (weightIdx) between the point obtained in the subsequent expression (8) and the dividing line is partition A, and the side opposite to the dividing line is partition B; when the value is 1, the opposite is true, the side with a positive distance weightIdx is partition A, and the negative side corresponds to partition B.
[0199] The key parameter shiftHor is calculated by the following expressions (6) and (7):
[0200] hwRatio=nH / nW(6);
[0201] Here, it is the height of CU / width of CU.
[0202] shiftHor=(angleIdx%16==8||(angleIdx%16!=0&&hwRatio>0))? 0(7);
[0203] Among them, shiftHor means determining the displacement direction between different dividing lines at the same angle. If its value is 0, the dividing line will be offset on the Y axis; if its value is 1, the dividing line will be offset on the X axis.
[0204] Then, according to the size and partition information of the current prediction block, the offset values offsetX and offsetY of the current prediction block are calculated using expressions (8) and (9):
[0205] If shiftHor==0, the current block has an offset value in the vertical direction that is correlated with the height of the block.
[0206] offsetX=(-nW)>>1
[0207] offsetY=(-nH)>>1+angleIdx<16? (distanceIdx*nH)>>3:-((distanceIdx*nH)>>3)(8);
[0208] If shiftHor==1, the current block has an offset value in the horizontal direction that is related to the width of the block.
[0209] offsetX=(-nW)>>1+angleIdx<16? (distanceIdx*nW)>>3:-((distanceIdx*nW)>>3);
[0210] offsetY=(−nH)>>1(9);
[0211] Step 2: Calculate the weight index weightIdx at the current pixel point through the position of the pixel point, and directly calculate the weight value at the current pixel point through expressions (10) to (12).
[0212] weightIdx=(((x*subW+offsetX)<<1)+1)*disLut[displacementX]+(((y*subH+offsetY)<<1)+1))*disLut[displacementY](10);
[0213] weightIdxL=partFlip? 32+weightIdx:32–weightIdx(11);
[0214] wValue=Clip3(0,8,(weightIdxL+4)>>3)(12);
[0215] The disLut[] used is shown in Table 2. subW and subH represent the downsampling rate. If the format is 420, subW and subH are both 2. Luma does not need to be downsampled, and the chroma weight is obtained by downsampling the luma weight.
[0216] Table 2 Multiple segmentation line distance arrangement lookup table
[0217] idx 0 2 3 4 5 6 8 10 11 12 13 14 disLut[idx] 8 8 8 4 4 2 0 -2 -4 -4 -8 -8 idx 16 18 19 20 21 22 24 26 27 28 29 30 disLut[idx] -8 -8 -8 -4 -4 -2 0 2 4 4 8 8
[0218] Here, the smaller weightIdxL is, the closer the current pixel is to the partition edge, and the more evenly the weight distribution of the point in partitions A and B is.
[0219] Secondly, the unidirectional prediction values of the two partitions are weighted pixel by pixel to obtain the final GPM prediction block. The specific weighted calculation is shown in expression (13):
[0220] pbSamples[x][y]=Clip3(0,(1< <BitDepth)-1,(predSamplesLA[x][y]*;
[0221] wValue+predSamplesLB[x][y]*(8-wValue)+offset1)>>shift1)(13);
[0222] The calculation process of offset1 and shift1 is as follows: offset1 is used for rounding, and shift1 is used to restore the weighted average prediction value to the same bit depth as the input video, as shown in expressions (14) and (15):
[0223] shift1=Max(5,17-BitDepth)(14);
[0224] offset1=1<<(shift1-1)(15);
[0225] Again, the calculation of the predicted value of the current chrominance block (Cb and Ct) is as follows:
[0226] By taking the luminance sample weight of the upper right corner of each 2*2 block and directly using it as the chrominance sample weight at the current (x, y), the luminance sample weight is downsampled. The calculation of the chrominance weight is also shown in Expression (13).
[0227] In some embodiments, after deriving the weighted predicted pixel values for the three components L, Cb, and Cr, the GPM motion vector of the current prediction block needs to be stored. The process is as follows:
[0228] This storage process is implemented using the motion mask matrix of the current luminance block. If the predicted value comes entirely from partition A, the motion vector of partition A is recorded. If it comes entirely from partition B, the motion vector of partition B is recorded. Otherwise, the motion vectors of both partitions are recorded. The calculation of the motion mask is basically the same as the process of calculating the luminance weight matrix. First, the offset value offset is calculated. The calculation of the offset is shown in Expressions (16) and (17):
[0229] if shiftHor == 0;
[0230] offsetX=(-cbWidth)>>1;
[0231] offsetY=((-cbHeight)>>1)+(angleIdx<16?(distanceIdx*cbHeight)>>3-((distanceIdx*cbHeight)>>3))(16);
[0232] if shiftHor == 1;
[0233] offsetX=((-cbWidth)>>1+(angleIdx<16?(distanceIdx*cbWidth)>>3-((distanceIdx*cbWidth)>>3))?;
[0234] offsetY=(-cbHeight)>>1(17);
[0235] Among them, cbWidth and cbHeight are the width and height of the motion mask matrix corresponding to the current prediction block (that is, the width and height of the brightness component of the current block).
[0236] The motion mask matrix of the current prediction block is still calculated in units of 4×4 sub-blocks. The calculation of the motion index (motionIdx) at the center position (4i+2, 4j+2) of each 4×4 sub-block is similar to the calculation of weightIdx in expression (8), as shown in expression (18):
[0237] motionIdx=(((4*xSbIdx+offsetX)<<1)+5)*disLut[displacementX]+(((4*ySbIdx+offsetY)<<1)+5)*disLut[displacementY](18);
[0238] Where motionIdx is the motion index information, and the position information of the pixel point in the upper left corner of the current block (xSbIdx, ySbIdx) represents the subblock coordinates of each 4×4 subblock (sb) in the current CU. The coordinate range is xSbIdx = 0..numSbX 1 and ySbIdx = 0..numSbY 1. offsetX is the motion horizontal coordinate offset value, offsetY is the motion vertical coordinate offset value, DisLut[displacementX] is the first angle, and DisLut[displacementY] is the second angle.
[0239] Then, the MV information that needs to be stored for the current 4x4 sub-block is determined. As with the prediction weighting, it is necessary to first determine whether the current sub-block is on the side of partition A or partition B, as shown in expression (19):
[0240] partIdx=(angleIdx>=13&&angleIdx<=27)? 0:1(19);
[0241] Among them, partIdx indicates whether the two partitions need to be flipped.
[0242] In some embodiments, it is possible to determine whether the current sub-block stores a unidirectional or bidirectional MV by determining the value of the type (sType), as shown in Expression (20):
[0243] sType=abs(motionIdx)<32?2:(motionIdx<=0?partIdx:(1-partIdx))(20);
[0244] The absolute value of motionIdx (abs(motionIdx)) at the center position (4i+2, 4j+2) of each 4×4 sub-block is used to determine whether the current sub-block stores a unidirectional or bidirectional MV:
[0245] If sType is 2, the current block stores the constructed bidirectional MV;
[0246] otherwise,
[0247] If sType is 0, the current block stores the MVA of the first partition;
[0248] If sType is 1, the current block stores the MVB of the second partition;
[0249] The stored MV information will be used for MV prediction of subsequent coding blocks.
[0250] In some embodiments, the encoding process of the encoder for the GPM prediction mode related syntax is as follows:
[0251] The encoder treats GPM and other inter-frame prediction modes as competing modes, selecting between them based on rate-distortion optimization or other strategies. The selected mode is then transmitted to the decoder as syntax elements in the bitstream. This is the syntax writing operation described in Section 1). This process is the opposite of the parsing process. First, the position information of the reference options selected by partitions A and B, m and n, in the merge list is obtained. Then, the syntax elements are assigned values as follows:
[0252] merge_gpm_idx0[xCb][yCb]=m
[0253] merge_gpm_idx1[xCb][yCb]=n-(merge_gpm_idx1[xCb][yCb]>=m)? 1:0
[0254] Then, it is binarized and entropy encoded, and finally written into the code stream for transmission.
[0255] Step S353: If the sum of the weight values of the at least one reference point is greater than or equal to the weight threshold, the area in the current block where the weights of the pixels are determined to be the sum of the weight values is determined as the first partition.
[0256] Here, the weight threshold can be set to 8. If the sum of the weights of the two points is greater than 8, the partition corresponding to the current weight is judged to be the first partition, that is, partition A; otherwise, the current weight is judged to be the second partition, that is, partition B.
[0257] The specific implementation of the weight sum of two points (WeightSum) is as follows:
[0258] WeightSum=wValue[nCbW-1][0]+wValue[nCbW-2][0];
[0259] partFlip=WeightSum>8; or partFlip=WeightSum<=8?0:1;
[0260] Where wValue refers to the value determined as follows:
[0261] wValue=Clip3(0,8,(weightIdxL+4)>>3)
[0262] Among them, weightIdxL can be expressed as weightIdxL=32+weightIdx;
[0263] weightIdx can be expressed as:
[0264] weightIdx=(((x*subW+offsetX)<<1)+1)*disLut[displacementX]+(((y*
[0265] subH+offsetY)<<1)+1))*disLut[displacementY];
[0266] Step S355: If the sum of the weight values of the at least one reference point is less than the weight threshold, determine the area in which the weights of the pixels in the current block are equal to the sum of the weight values as the second partition.
[0267] Here, if the weight threshold is set to 8 and the sum of the weights of the two points is less than 8, the current weight corresponds to the second partition, that is, partition B. In this way, by combining the construction order of the merge list, partition A selects the options earlier in the merge list, while partition B selects the options later in the merge list, resulting in a lower encoding bitrate.
[0268] Method 3: The encoder determines the first partition based on the angle sequence number and the intersection of the dividing line and the boundary. The implementation process is as follows:
[0269] When angleIdx is 0 to 8, the side with a positive weightIdx value is partition A (partFlip=1).
[0270] When angleIdx is 8-15, if the dividing line does not intersect with the upper boundary, the side with positive weightIdx value is partition A (partFlip=1); if the dividing line intersects with the upper boundary, the side with negative weightIdx value is partition A (partFlip=0).
[0271] When angleIdx is 16-23, the side with a negative value of weightIdx is partition A (partFlip=0).
[0272] When angleIdx is 24-31, if the dividing line does not intersect with the upper boundary, the side with negative weightIdx is partition A (partFlip=0); if the dividing line intersects with the upper boundary: the side with positive weightIdx is partition A (partFlip=1).
[0273] Here, chroma processing is proportional to luminance, and motion vector storage is also consistent with the A and B partitions here.
[0274] Method 4: Through the set list, specify the A and B partitions of various sizes and modes, as shown in Table 3. When the current block needs to be partitioned, the method of dividing the current block can be obtained according to the size of the current block and Table 3, that is, it can be achieved by looking up the table, so that the partitioning of the current block can be achieved more quickly, conveniently and accurately.
[0275] Table 3 Partition indication table for different sizes and modes
[0276]
[0277]
[0278] Method 5: Modify the GPM partition flip consistency modification and modify expression (3) to: partFlip = (angleIdx>=13&&angleIdx<=27)?0:1;
[0279] Modify expression (19) to: partIdx = (angleIdx>=13&&angleIdx<=28)?0:1;
[0280] The revised zoning distribution map is as follows: Figure 10 As shown, Figure 10 This is a modified schematic diagram of the partition distribution of the embodiment of the present application, from Figure 10 It can be seen that after the partitioning, the partitions with sequence number 12 and sequence number 28 are the same, which solves the problem of different partitions between corresponding blocks in the GPM partition at different angles.
[0281] In some embodiments of the present application, after step S306 of the inter-frame prediction method provided in the embodiment of the present application, the method may further include:
[0282] The first step is to write the angle index information into the bitstream.
[0283] The second step is to determine the motion offset value based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, and to obtain the motion horizontal coordinate offset value and the motion vertical coordinate offset value corresponding to the current block based on the angle index information, the step index information, and the size information of the current block.
[0284] The third step is to obtain the motion index information based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point in the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information.
[0285] In the fourth step, when the absolute value of the motion index information is less than half of the preset motion index threshold, the first motion information and the second motion information are determined as the motion information of the current block.
[0286] Step 5: When the motion index information is less than or equal to 0, the first motion information is determined as the motion information of the current block.
[0287] Step 6: When the motion index information is greater than 0, the second motion information is determined as the motion information of the current block.
[0288] Step 7: Store the motion information of the current block in a preset merge candidate list.
[0289] In an embodiment of the present application, when encoding the current block, the encoder also needs to store the motion information of the current block for use in inter-frame prediction of subsequent encoding blocks. The encoder calculates the first angle and the second angle based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, and then obtains the motion offset value based on the first angle and the second angle; the encoder obtains the motion index information based on the motion offset value, the motion horizontal coordinate offset value, the motion vertical coordinate offset value, the position information of the pixel point in the upper left corner of the current block, the first angle corresponding to the cosine angle index information, and the second angle corresponding to the sine angle index information; when the absolute value of the motion index information is less than half of the preset motion index threshold, the encoder determines the first motion information and the second motion information as the motion information of the current block; when the motion index information is less than or equal to 0, the encoder determines the first motion information as the motion information of the current block; when the motion index information is greater than 0, the encoder determines the second motion information as the motion information of the current block; and stores the motion information of the current block in the preset merge candidate list.
[0290] The present invention provides an inter-frame prediction method for a video decoding device, i.e., a decoder. The functions implemented by the method can be implemented by a processor in the video decoding device calling program code. The program code can also be stored in a computer storage medium. Therefore, the video encoding device includes at least a processor and a storage medium.
[0291] Figure 11 This is a schematic diagram of an implementation flow of an intra-frame prediction method according to an embodiment of the present application, which is applied to a decoder, such as Figure 11 As shown, the method includes:
[0292] Step S1101: parse the code stream to determine the prediction decoding parameters of the current block.
[0293] Step S1102 : when the prediction decoding parameter indicates that the geometric partition prediction mode GPM is used to determine the inter-frame prediction value of the current block, the first position of the partition meeting the preset condition in the current block is determined.
[0294] Here, first, when the prediction mode parameter indicates the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block, the construction order between different partitions of the coding block in the preset candidate list is determined; then, the position of the partition arranged in the preset serial number in the construction order is determined as the first position; in a specific example, the first constructed partition is determined according to the construction order; and the first position of the first constructed partition in the current block is determined.
[0295] Step S1103 : In the current block, a region whose distance from the first position of the current block is less than a preset distance is determined as a first partition.
[0296] Step S1104: Determine a second partition from an area of the current block excluding the first partition.
[0297] Step S1105 : Determine a first prediction value of the first partition and a second prediction value of the second partition.
[0298] Step S1106: Perform weighted fusion on the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block.
[0299] In an embodiment of the present application, the decoder determines the predicted decoding parameters of the current block by parsing the bitstream. Then, based on the construction order in the candidate list, the first position of the partition that meets the preset conditions in the current block is determined. Next, in the current block, the area whose distance from the first position of the current block is less than the preset distance is determined as partition A. The area of the current block other than the first partition is determined as partition B. This ensures that the candidate for partition A is closer than the candidate for partition B, which can reduce the encoding bit rate. Finally, the first predicted value of the first partition and the second predicted value of the second partition are determined. The first predicted value and the second predicted value are weighted and fused to determine the inter-frame predicted value of the current block, thereby improving the accuracy of the prediction.
[0300] In some embodiments of the present application, the decoder determines, in the current block, a region whose distance from the first position of the current block is less than a preset distance as the first partition in the following manners:
[0301] Method 1: The decoder first determines at least one reference point at the second position in the current block; then determines the sum of the distances between the at least one reference point and the dividing line in the current block; if the sum of the distances is greater than or equal to a preset value, the decoder determines the region in the current block where the pixels with positive distances from the dividing line are located as the first region. If the sum of the distances is less than the preset value, the decoder determines the region in the current block where the pixels with negative distances from the dividing line are located as the first region.
[0302] Method 2: The decoder first determines the GPM parameters of the current block; then, based on the GPM parameters, determines the weight of each pixel in the current block; if the sum of the weight values of the at least one reference point is greater than or equal to a weight threshold, the decoder determines the area in the current block where the weights of the pixels are equal to the sum of the weight values as the first partition. If the sum of the weight values of the at least one reference point is less than the weight threshold, the decoder determines the area in the current block where the weights of the pixels are equal to the sum of the weight values as the second partition.
[0303] Method 3: The decoder determines the first partition based on the angle sequence number and the intersection position of the dividing line and the boundary.
[0304] Method 4: The decoder specifies A and B partitions of various sizes and modes through a set list.
[0305] In the embodiment of the present application, the implementation of S1101-S1106 of the decoder is basically the same as the implementation of S301-S306 on the encoder side, and will not be repeated here.
[0306] The difference is that the decoder obtains the predicted decoding parameters and GMP parameters of the current block from the bitstream, while the encoder obtains them by itself.
[0307] It is understandable that, in the process of inter-frame prediction, the decoder can determine the position of the partition arranged in the preset sequence number in the construction order of the coding block according to the preset candidate list; determine the first position of the partition; then, in the current block, determine the area whose distance from the first position of the current block is less than the preset distance as the first partition; determine the second partition from the area of the current block other than the first partition; in this way, the partition close to the upper right corner pixel position is selected as partition A, so that the candidate of partition A is closer to the front than the candidate of partition B, which can make the encoding bit rate lower. Using this partitioning method, the current block is partitioned into AB partitions, so that the predicted inter-frame prediction value of the current block is more accurate.
[0308] In some embodiments of the present application, the GPM parameters of the current block include: angle index information and size information of the current block; and in the embodiments of the present application, the implementation of determining the weight of each pixel in the current block may include:
[0309] The first step is to determine the position information of the pixels in the current block according to the size information of the current block.
[0310] In the second step, the weights of the pixels in the current block are determined according to the angle index information, the preset angle mapping table and the position information of the pixels in the current block.
[0311] In some embodiments of the present application, the decoder can determine the cosine angle index information and the sine angle index information based on the angle index information; reduce the angle of the preset angle mapping table to a power to obtain an updated angle mapping table; and determine the weight index corresponding to the pixel point in the current block based on the cosine angle index information, the sine angle index information, and the updated angle mapping table, respectively in combination with the position information of the pixel point in the current block.
[0312] like Figure 12 As shown, an embodiment of the present application provides an encoder 1, comprising:
[0313] A first determining module 1201 is configured to determine prediction mode parameters of a current block;
[0314] A first indicating module 1202 is configured to determine a first position of a partition meeting a preset condition in the current block when the prediction mode parameter indicates that a geometric partitioning prediction mode GPM is used to determine an inter-frame prediction value of the current block;
[0315] A first partitioning module 1203 is configured to determine, in the current block, a region whose distance from a first position of the current block is less than a preset distance as a first partition;
[0316] A second partitioning module 1204 is configured to determine a second partition from an area of the current block excluding the first partition;
[0317] A second determining module 1205 is configured to determine a first predicted value of the first partition and a second predicted value of the second partition;
[0318] The first fusion module 1206 is configured to perform weighted fusion on the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block.
[0319] In some embodiments of the present application, the first indication module 1202 is further used to: determine the construction order between different partitions of the coding block in the preset candidate list when the prediction mode parameter indicates the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block; and determine the position of the partition arranged in the preset serial number in the construction order as the first position.
[0320] In some embodiments of the present application, the first indication module 1202 is further configured to: determine a first constructed partition according to the construction order; and determine a first position of the first constructed partition in the current block.
[0321] In some embodiments of the present application, the first division module 1203 is further used to: determine at least one reference point at a second position in the current block; determine the sum of the distances between the at least one reference point and the dividing line in the current block; if the sum of the distances is greater than or equal to a preset value, determine the area in the current block where the pixel points whose distances to the dividing line are positive are located as the first area.
[0322] In some embodiments of the present application, the first division module 1203 is further used to: if the sum of the distances is less than the preset value, determine the area where the pixel points in the current block whose distances to the dividing line are negative are located as the first area.
[0323] In some embodiments of the present application, the first partitioning module 1203 is further used to: determine the GPM parameters of the current block; determine the weight of each pixel in the current block based on the GPM parameters; if the sum of the weight values of the at least one reference point is greater than or equal to a weight threshold, determine the area in the current block where the weight of the pixel points is determined to be the sum of the weight values as the first partition.
[0324] In some embodiments of the present application, the first partitioning module 1203 is further used to: if the sum of the weight values of the at least one reference point is less than the weight threshold, determine the area where the weights of the pixel points in the current block are the sum of the weight values as the second partition.
[0325] In some embodiments of the present application, the GPM parameters of the current block include: angle index information and size information of the current block; the first division module 1203 is also used to: determine the position information of the pixel points in the current block based on the size information of the current block; determine the weight of the pixel points in the current block based on the angle index information, the preset angle mapping table and the position information of the pixel points in the current block.
[0326] In practical applications, such as Figure 13 As shown, an embodiment of the present application also provides an encoder, including: a first memory 1301 and a first processor 1302; the first memory 1301 stores a computer program that can be run on the first processor 1302, and the first processor 1302 executes the program when the encoder side inter-frame prediction method.
[0327] It can be understood that, in the process of inter-frame prediction, the encoder determines the position of the partition arranged in the preset sequence number in the construction order of the coding block according to the preset candidate list; determines the position of the partition arranged in the preset sequence number in the construction order as the first position; then, in the current block, the area whose distance from the first position of the current block is less than the preset distance is determined as the first partition; and determines the second partition from the area of the current block other than the first partition; in this way, the partition close to the upper right corner pixel position is selected as partition A, so that the candidate of partition A is closer to the front than the candidate of partition B, which can make the encoding bit rate lower. Using this partitioning method, the current block is partitioned into AB partitions, so that the predicted inter-frame prediction value of the current block is more accurate.
[0328] like Figure 14As shown, an embodiment of the present application provides a decoder 2, including: a first parsing module 1401, used to parse the code stream and determine the prediction decoding parameters of the current block; a second indication module 1402, used to determine the first position of the partition that meets the preset conditions in the current block when the prediction decoding parameters indicate the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block; a third partitioning module 1403, used to determine, in the current block, an area whose distance from the first position of the current block is less than a preset distance as the first partition; a fourth partitioning module 1404, used to determine the second partition from the area of the current block other than the first partition; a third determination module 1405, used to determine the first prediction value of the first partition and the second prediction value of the second partition; a second fusion module 1406, used to perform weighted fusion on the first prediction value and the second prediction value to determine the inter-frame prediction value of the current block.
[0329] In some embodiments of the present application, the second indication module 1402 is further used to: determine the construction order between different partitions of the coding block in the preset candidate list when the prediction mode parameter indicates the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block; and determine the position of the partition arranged in the preset serial number in the construction order as the first position.
[0330] In some embodiments of the present application, the second indication module 1402 is further configured to: determine a first constructed partition according to the construction order; and determine a first position of the first constructed partition in the current block.
[0331] In some embodiments of the present application, the third division module 1403 is also used to: determine at least one reference point at a second position in the current block; determine the sum of the distances between the at least one reference point and the dividing line in the current block; if the sum of the distances is greater than or equal to a preset value, determine the area in the current block where the pixel points whose distances to the dividing line are positive are located as the first area.
[0332] In some embodiments of the present application, the third division module 1403 is further used to: if the sum of the distances is less than the preset value, determine the area where the pixels in the current block whose distance to the dividing line is negative are located as the first area.
[0333] In some embodiments of the present application, the third partitioning module 1403 is also used to: determine the GPM parameters of the current block; determine the weight of each pixel in the current block based on the GPM parameters; if the sum of the weight values of the at least one reference point is greater than or equal to the weight threshold, the area in the current block where the weight of the pixel points is determined to be the sum of the weight values is determined as the first partition.
[0334] In some embodiments of the present application, the third partitioning module 1403 is also used to: if the sum of the weight values of the at least one reference point is less than the weight threshold, determine the area in which the weights of the pixel points in the current block are the sum of the weight values as the second partition.
[0335] In some embodiments of the present application, the third division module 1403 is also used to: determine the position information of the pixel points in the current block based on the size information of the current block; determine the weight of the pixel points in the current block based on the angle index information, the preset angle mapping table and the position information of the pixel points in the current block.
[0336] In practical applications, such as Figure 15 As shown, an embodiment of the present application also provides a decoder, including: a second memory 1501 and a second processor 1502; the second memory 1501 stores a computer program that can be run on the second processor 1502, and the second processor 1502 implements the inter-frame prediction method on the decoder side when executing the program.
[0337] It can be understood that, in the process of inter-frame prediction, the decoder constructs the order of different partitions of the coding block in the preset candidate list; determines the position of the partition arranged in the preset sequence number in the construction order as the first position; then, in the current block, determines the area whose distance from the first position of the current block is less than the preset distance as the first partition; determines the second partition from the area of the current block other than the first partition; in this way, the partition close to the upper right corner pixel position is selected as partition A, so that the candidate of partition A is closer than the candidate of partition B, which can make the encoding bit rate lower. Using this partitioning method, the current block is partitioned into AB partitions, so that the predicted inter-frame prediction value of the current block is more accurate.
[0338] Accordingly, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed by a first processor, implements the inter-frame prediction method of the encoder; or, when executed by a second processor, implements the inter-frame prediction method of the decoder. It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding. The above is only an implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0339] Industrial Applicability
[0340] In an embodiment of the present application, during the inter-frame prediction process, the construction order between different partitions of the coding block in the preset candidate list can be used; the position of the partition arranged in the preset sequence number in the construction order is determined as the first position; then, in the current block, the area whose distance from the first position of the current block is less than the preset distance is determined as the first partition; the second partition is determined from the area of the current block other than the first partition; in this way, the partition close to the upper right corner pixel position is selected as the first partition, so that the candidate of the first partition is closer to the front than the candidate of the second partition, which can make the encoding bit rate lower. By using this partitioning method, the current block is partitioned, so that the predicted inter-frame prediction value of the current block is more accurate.
Claims
1. An inter-frame prediction method, applied to an encoder, comprising: Determining prediction mode parameters for the current block; When the prediction mode parameter indicates that the geometric partitioning prediction mode GPM is used to determine the inter-frame prediction value of the current block, determining a first position of a partition meeting a preset condition in the current block; In the current block, determining a region whose distance from a first position of the current block is less than a preset distance as a first partition; Determine a second partition from an area of the current block excluding the first partition; determining a first predicted value for the first partition and a second predicted value for the second partition; Performing weighted fusion on the first prediction value and the second prediction value to determine an inter-frame prediction value of the current block; When the prediction mode parameter indicates that the geometric partitioning prediction mode GPM is used to determine the inter-frame prediction value of the current block, determining a first position of a partition that meets a preset condition in the current block includes: When the prediction mode parameter indicates that a geometric partitioning prediction mode GPM is used to determine an inter-frame prediction value of the current block, determining a construction order between different partitions of the coding block in the preset candidate list; The position of the partition arranged at the preset serial number in the construction order is determined as the first position.
2. The method according to claim 1, wherein The step of determining the position of the partition arranged at the preset sequence number in the construction order as the first position includes: According to the construction order, determine the partition of the first construction; A first position of the first constructed partition in the current block is determined.
3. The method according to claim 1, wherein Determining, in the current block, a region whose distance from the first position of the current block is less than a preset distance as a first partition includes: determining at least one reference point at a second position in the current block; determining a sum of distances between the at least one reference point and a segmentation line in the current block; If the sum of the distances is greater than or equal to a preset value, the area where the pixel points in the current block whose distances to the dividing line are positive are located is determined as the first partition.
4. The method according to claim 3, wherein: The method further comprises: If the sum of the distances is smaller than the preset value, the area where the pixel points in the current block whose distances from the dividing line are negative are located is determined as the first partition.
5. The method according to claim 3, wherein Before determining, in the current block, a region whose distance from the first position of the current block is less than a preset distance as the first partition, the method further includes: Determining GPM parameters of the current block; Determining a weight of each pixel in the current block according to the GPM parameter; Correspondingly, determining, in the current block, an area whose distance from the first position of the current block is less than a preset distance as a first partition includes: If the sum of the weight values of the at least one reference point is greater than or equal to a weight threshold, an area in the current block where the weights of the pixels are determined to be the sum of the weight values is determined as the first partition.
6. The method according to claim 5, wherein: The method further comprises: If the sum of the weight values of the at least one reference point is less than the weight threshold, an area in which the weights of the pixels in the current block are equal to the sum of the weight values is determined as a second partition.
7. The method according to claim 5, wherein: The GPM parameters of the current block include: angle index information and size information of the current block; and determining the weight of each pixel in the current block according to the GPM parameters includes: Determining position information of pixels within the current block according to size information of the current block; The weights of the pixels in the current block are determined according to the angle index information, the preset angle mapping table and the position information of the pixels in the current block.
8. An inter-frame prediction method, applied to a decoder, the method comprising: Parse the code stream and determine the prediction decoding parameters of the current block; When the prediction decoding parameter indicates that the geometric partitioning prediction mode GPM is used to determine the inter-frame prediction value of the current block, determining a first position of a partition that meets a preset condition in the current block; In the current block, determining a region whose distance from a first position of the current block is less than a preset distance as a first partition; Determine a second partition from an area of the current block excluding the first partition; determining a first predicted value for the first partition and a second predicted value for the second partition; Performing weighted fusion on the first prediction value and the second prediction value to determine an inter-frame prediction value of the current block; When the prediction decoding parameter indicates that the inter-frame prediction value of the current block is determined using the geometric partition prediction mode GPM, determining a first position of a partition that meets a preset condition in the current block includes: When the prediction mode parameter indicates that the geometric partitioning prediction mode GPM is used to determine the inter-frame prediction value of the current block, determining a construction order between different partitions of the coding block in the preset candidate list; The position of the partition arranged at the preset serial number in the construction order is determined as the first position.
9. The method according to claim 8, wherein The step of determining the position of the partition arranged at the preset sequence number in the construction order as the first position includes: According to the construction order, determine the partition of the first construction; A first position of the first constructed partition in the current block is determined.
10. The method according to claim 8, wherein Determining, in the current block, a region whose distance from the first position of the current block is less than a preset distance as a first partition includes: determining at least one reference point at a second position in the current block; determining a sum of distances between the at least one reference point and a segmentation line in the current block; If the sum of the distances is greater than or equal to a preset value, the area where the pixel points in the current block whose distances to the dividing line are positive are located is determined as the first partition.
11. The method according to claim 10, wherein: The method further comprises: If the sum of the distances is smaller than the preset value, the area where the pixel points in the current block whose distances from the dividing line are negative are located is determined as the first partition.
12. The method according to claim 10, wherein: Before determining, in the current block, a region whose distance from the first position of the current block is less than a preset distance as the first partition, the method further includes: Determining GPM parameters of the current block; Determining a weight of each pixel in the current block according to the GPM parameter; Correspondingly, determining, in the current block, an area whose distance from the first position of the current block is less than a preset distance as a first partition includes: If the sum of the weight values of the at least one reference point is greater than or equal to a weight threshold, an area in the current block where the weights of the pixels are determined to be the sum of the weight values is determined as the first partition.
13. The method according to claim 12, wherein: The method further comprises: If the sum of the weight values of the at least one reference point is less than the weight threshold, an area in which the weights of the pixels in the current block are equal to the sum of the weight values is determined as a second partition.
14. The method according to claim 13, wherein The GPM parameters of the current block include: angle index information and size information of the current block; and determining the weight of each pixel in the current block according to the GPM parameters includes: Determining position information of pixels within the current block according to size information of the current block; The weights of the pixels in the current block are determined according to the angle index information, the preset angle mapping table and the position information of the pixels in the current block.
15. An encoder, wherein include: A first determination module, configured to determine prediction mode parameters of a current block; A first indication module is configured to determine a first position of a partition meeting a preset condition in the current block when the prediction mode parameter indicates that a geometric partitioning prediction mode GPM is used to determine an inter-frame prediction value of the current block; a first partitioning module, configured to determine, in the current block, a region whose distance from a first position of the current block is less than a preset distance as a first partition; A second partitioning module, configured to determine a second partition from an area of the current block excluding the first partition; a second determining module, configured to determine a first predicted value of the first partition and a second predicted value of the second partition; a first fusion module, configured to perform weighted fusion on the first prediction value and the second prediction value to determine an inter-frame prediction value of the current block; The first indication module is used to determine the construction order between different partitions of the coding block in the preset candidate list when the prediction mode parameter indicates the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block; and determine the position of the partition arranged in the preset serial number in the construction order as the first position.
16. A decoder, wherein include: A first parsing module is used to parse the code stream and determine the prediction decoding parameters of the current block; A second indication module is configured to determine a first position of a partition meeting a preset condition in the current block when the prediction decoding parameter indicates that a geometric partition prediction mode GPM is used to determine an inter-frame prediction value of the current block; a third partitioning module, configured to determine, in the current block, a region whose distance from the first position of the current block is less than a preset distance as a first partition; a fourth partitioning module, configured to determine a second partition from an area of the current block excluding the first partition; a third determining module, configured to determine a first predicted value of the first partition and a second predicted value of the second partition; a second fusion module, configured to perform weighted fusion on the first prediction value and the second prediction value to determine an inter-frame prediction value of the current block; The second indication module is used to determine the construction order between different partitions of the coding block in the preset candidate list when the prediction mode parameter indicates the use of the geometric partitioning prediction mode GPM to determine the inter-frame prediction value of the current block; and determine the position of the partition arranged in the preset serial number in the construction order as the first position.
17. An encoder, wherein include: a first memory and a first processor; The first memory stores a computer program that can be run on the first processor, and the first processor implements the inter-frame prediction method according to any one of claims 1 to 7 when executing the program.
18. A decoder, wherein include: a second memory and a second processor; The second memory stores a computer program that can be run on the second processor, and the second processor implements the inter-frame prediction method according to any one of claims 8 to 14 when executing the program.
19. A storage medium, wherein: A computer program is stored thereon, which, when executed by a first processor, implements the inter-frame prediction method described in any one of claims 1 to 7; or, when executed by a second processor, implements the inter-frame prediction method described in any one of claims 8 to 14.
Citation Information
Patent Citations
Method and apparatus for encoding / decoding high resolution images
CN102648631A