WO2021196235A1 - 帧间预测方法、编码器、解码器及存储介质 - Google Patents

帧间预测方法、编码器、解码器及存储介质 Download PDF

Info

Publication number
WO2021196235A1
WO2021196235A1 PCT/CN2020/083373 CN2020083373W WO2021196235A1 WO 2021196235 A1 WO2021196235 A1 WO 2021196235A1 CN 2020083373 W CN2020083373 W CN 2020083373W WO 2021196235 A1 WO2021196235 A1 WO 2021196235A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
partition
prediction
preset
area
Prior art date
Application number
PCT/CN2020/083373
Other languages
English (en)
French (fr)
Inventor
马彦卓
霍俊彦
万帅
杨付正
冉启宏
邱瑞鹏
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to CN202080073861.6A priority Critical patent/CN114586366A/zh
Priority to PCT/CN2020/083373 priority patent/WO2021196235A1/zh
Priority to TW110109408A priority patent/TW202139709A/zh
Publication of WO2021196235A1 publication Critical patent/WO2021196235A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the embodiments of the present application relate to video coding technology, and relate to, but are not limited to, inter-frame prediction methods, encoders, decoders, and storage media.
  • inter-frame prediction can include motion estimation and motion compensation.
  • GMP Geometrical Partition Mode
  • the embodiments of the present application provide an inter-frame prediction method, encoder, decoder, and storage medium.
  • the partition near the upper right pixel position can be selected as the first partition, so that the candidates of the first partition are more advanced than the candidates of the second partition Can make the coding rate lower.
  • an embodiment of the present application provides an inter-frame prediction method applied to an encoder, and the method includes:
  • the prediction mode parameter indicates that the geometric partition prediction mode is used to determine the inter prediction value of the current block, determine the first position in the current block of the partition that meets the preset condition
  • an embodiment of the present application provides an inter-frame prediction method, which is applied to a decoder, and the method includes:
  • the predictive decoding parameter indicates that the geometric partition prediction mode is used to determine the inter-frame prediction value of the current block, determine the first position in the current block of the partition that meets the preset condition;
  • an encoder wherein:
  • the first determining module is used to determine the prediction mode parameter of the current block
  • the first indication module is configured to determine the first position in the current block of the partition that meets the preset condition when the prediction mode parameter indicates that the geometric partition prediction mode is used to determine the inter-frame prediction value of the current block;
  • a first division module configured 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 division
  • a second partition module configured to determine a second partition from the area of the current block excluding the first partition
  • a second determining module configured to determine the first predicted value of the first partition and the second predicted value of the second partition
  • the first fusion module is configured to perform weighted fusion on the first predicted value and the second predicted value to determine the inter-frame predicted value of the current block.
  • an encoder wherein:
  • the first parsing module is used to parse the code stream and determine the predictive decoding parameters of the current block
  • the second indication module is configured to determine the first position in the current block of the partition that meets the preset condition when the prediction decoding parameter indicates that the geometric partition prediction mode is used to determine the inter-frame prediction value of the current block;
  • a third division module configured 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 division
  • a fourth partition module configured to determine a second partition from the area of the current block excluding the first partition
  • a third determining module configured to determine the first predicted value of the first partition and the second predicted value of the second partition
  • the second fusion module is configured to perform weighted fusion on the first predicted value and the second predicted value to determine the inter-frame predicted value of the current block
  • an encoder including:
  • the first memory and the first processor are The first memory and the first processor;
  • the first memory stores a computer program that can be run on a first processor, and when the first processor executes the program, the inter-frame prediction method of the encoder is implemented.
  • an embodiment of the present application also provides a decoder, including:
  • the second memory stores a computer program that can be run on a second processor, and the second processor implements the inter-frame prediction method of the decoder when the second processor executes the program.
  • an embodiment of the present application provides a storage medium, including:
  • 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 realized; or, when the computer program is executed by the second processor, the inter-frame prediction method of the decoder is realized. method of prediction.
  • the embodiments of the application provide an inter-frame prediction method, an encoder, a decoder, and a storage medium.
  • the position of the partition arranged in the preset sequence number in the construction sequence is determined as the first position; then, in the current block, the distance from the first position of the current block is less than the preset distance
  • the area is determined as the first partition; the second partition is determined from the area of the current block excluding the first partition; in this way, the partition close to the upper right pixel position is selected as the first partition, so that the first partition is The candidate is more advanced than the candidate of the second partition, which can make the coding rate lower.
  • the current block is partitioned, so that the predicted inter-frame prediction value of the current block is more accurate.
  • FIG. 1A is a schematic diagram of GPM partitions from different angles in an exemplary embodiment of this application;
  • FIG. 1B is a schematic diagram of the distribution of the positive and negative values of the directly calculated distance under different angles in an exemplary embodiment of this application;
  • FIG. 2A is a block diagram of a video encoding system provided by an embodiment of this application.
  • 2B is a block diagram of a video decoding system provided by an embodiment of this application.
  • FIG. 3 is a schematic flowchart of an image component prediction method provided by an embodiment of the application.
  • 4a-4g are schematic diagrams of exemplary multiple division modes provided by embodiments of this application.
  • FIG. 5A is a schematic diagram of the angle and step size of an exemplary current block provided by an embodiment of the application.
  • FIG. 5B is a schematic diagram of neighboring blocks in a candidate list according to an embodiment of the application.
  • FIG. 5C is a schematic diagram of a candidate list according to an embodiment of the application.
  • FIG. 6a is a schematic diagram of an exemplary first weight value of brightness provided by an embodiment of the application.
  • FIG. 6b is a schematic diagram of an exemplary first weight value of chromaticity provided by an embodiment of the application.
  • FIG. 7 is a flowchart of a codec prediction process according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of judging the AB partition based on the distance between two points according to the embodiment of the application.
  • FIG. 9 is a schematic diagram of residual calculation according to an embodiment of the application.
  • FIG. 10 is a schematic diagram of a revised partition distribution according to an embodiment of the application.
  • FIG. 11 is a schematic diagram of an implementation process of an intra-frame prediction method according to an embodiment of the application.
  • FIG. 12 is a schematic diagram of the hardware structure of an encoder according to an embodiment of the application.
  • FIG. 13 is a schematic diagram of the hardware structure of another encoder according to an embodiment of the application.
  • FIG. 14 is a schematic diagram of the hardware structure of a decoder according to an embodiment of the application.
  • FIG. 15 is a schematic diagram of the hardware structure of another decoder according to an embodiment of the application.
  • FIG. 1A is a schematic diagram of the GPM partition from different angles in an exemplary embodiment of the application.
  • 11 represents the first partition (that is, partition A)
  • partition 12 represents the second partition (that is, partition B); the partitions between sequence number 12 and sequence number 28 are reversed.
  • the obtained positive and negative regions of the weight index (weightIdx) value are the results shown in Figure 1B.
  • the weight index of partition 13 is positive
  • the weight index of partition 14 is negative; a comprehensive comparison of Figure 1A Compared with Fig. 1B, it can be concluded that in the range of 13-27 angles, the A zone corresponds to the area with a negative distance, while the other angles A zone corresponds to the area with a positive distance.
  • partition A corresponds to the area where the distance is negative.
  • a zone corresponds to the area where the distance is positive at other angles.
  • the first drawback is that it may be sloppy to judge the AB partition based on the angle.
  • the construction order of the existing Merge list is: B1-A1-B0-A0- B2-Co-location time-domain candidate-historical-based candidate-combined average candidate-zero candidate, so the partition close to the upper right pixel position should be selected as partition A as much as possible, so that the candidate of partition A is more advanced than the candidate of partition B so that The encoding rate is lower.
  • the second drawback is that at an angle in the range of 13-27, the two partitions need to be flipped, so that the weight index of the A partition is always positive. But by analyzing the partition distribution of each angle, theoretically speaking, the partitions corresponding to the angle index 12 and 28 should be consistent, that is, the upper left side is the A partition, and the lower right is the B partition, but there are obvious faults here. Although there is little difference in performance, it violates GPM's partition distribution rules.
  • an embodiment of the present application provides an inter prediction method.
  • the prediction mode parameter of the current block is determined; when the prediction mode parameter indicates that the geometric partition prediction mode GPM is used to determine the inter prediction value of the current block, it is determined to satisfy The partition of the preset condition is at the first position in the current block; then, in the current block, an area whose distance from the first position of the current block is less than the preset distance is determined as the first partition; From the area of the current block other than the first partition, determine a second partition; determine the first prediction value of the first partition and the second prediction value of the second partition; finally, the The first predicted value and the second predicted value are weighted and merged to determine the inter-frame predicted value of the current block.
  • the construction order is B1-A1-B0-A0-B2-Co-located temporal candidates-historical-based candidates-combined average candidates-zero candidates
  • the construction order is B1-A1-B0-A0-B2-Co-located temporal candidates-historical-based candidates-combined average candidates-zero candidates
  • coding techniques such as prediction, transformation, and quantization are implemented in units of square and rectangular blocks.
  • edges of moving objects are not necessarily horizontal or vertical. Even if they are, they may not be exactly on the edge of the block that can be divided.
  • the motion vectors on both sides of the moving edge are often different, so in the encoding process Performing motion prediction and compensation in a whole block is prone to large prediction errors, which leads to limited coding efficiency.
  • VVC Versatile Video Coding
  • TPM Triangular Partition Mode
  • the geometrical partitioning for inter-blocks (Geometrical partitioning for interblocks, GEO) prediction mode is adopted into the VVC standard to form a geometrical partitioning mode (GPM).
  • GPM geometrical partitioning mode
  • the inter-frame block is divided into two non-rectangular sub-partitions for prediction and weighted fusion.
  • the first The image component, the second image component, and the third image component represent the coding block (CB); among them, the 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 symbol Cb or U
  • the red chrominance component is usually represented by the symbol Cr or V; in this way, the video image can be represented by the YCbCr format or the YUV format.
  • the first image component may be a luminance component
  • the second image component may be a blue chrominance component
  • the third image component may be a red chrominance component
  • the video encoding 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, and a motion estimation unit 105, The inverse transform and inverse quantization unit 106, the filter control analysis unit 107, the filter unit 108, the encoding unit 109, and the decoded image buffer unit 110, etc., wherein the filter unit 108 can implement deblocking filtering and sample adaptive indentation (Sample Adaptive Offset).
  • the encoding unit 109 can implement header information encoding and context-based adaptive binary arithmetic coding (Context-based Adaptive Binary Arithmatic Coding, CABAC).
  • a video coding block can be obtained by dividing the coding tree unit (CTU), and then the residual pixel information obtained after intra-frame or inter-frame prediction is paired by the transformation and quantization unit 101 The video coding block is transformed, including transforming the residual information from the pixel domain to the transform domain, and quantizing the resulting transform coefficients to further reduce the bit rate;
  • the intra-frame estimation unit 102 and the intra-frame prediction unit 103 are used for Perform intra-frame prediction on the video encoding 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 encoding block;
  • the motion compensation unit 104 and the motion estimation unit 105 is used to perform inter-frame predictive coding of the received video coding block relative to
  • the context content can be based on adjacent coding blocks, can be used to encode information indicating the determined intra prediction mode, and output the code stream of the video signal; and the decoded image buffer unit 110 is used to store reconstructed video coding blocks for Forecast reference. As the video image encoding progresses, new reconstructed video encoding blocks will be continuously generated, and these reconstructed video encoding blocks will be stored in the decoded image buffer unit 110.
  • the video decoding system 20 includes a decoding unit 201, an inverse transform and inverse quantization unit 202, and an intra-frame
  • the prediction unit 203, the motion compensation unit 204, the filtering unit 205, and the 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 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 coefficient; the transform coefficient is passed through
  • the inverse transform and inverse quantization unit 202 performs processing to generate a residual block in the pixel domain; the intra prediction unit 203 can be used to generate data based on the determined intra prediction mode and the data from the previous decoded block of the current frame or picture The prediction data of the current video decoding block; 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 the predictability of the video decoding block being decoded Block; by summing the residual block from the inverse transform and inverse quantization unit 202 and the corresponding predictive block generated by the intra prediction unit 203 or the motion compensation unit 204 to form a decoded video block; the decoded video signal Through the filtering unit 205 in order to remove the block effect artifacts, the video quality can
  • the image component prediction method in the embodiment of the present application is mainly applied to the part of the intra prediction unit 103 shown in FIG. 2A and the part of the intra prediction unit 203 shown in FIG. 2B. That is to say, the image component prediction method in the embodiment of the present application can be applied to both a video encoding system, a video decoding system, or even a video encoding system and a video decoding system at the same time.
  • the embodiment of the present application There is no specific limitation.
  • the "current block” specifically refers to the current block in the intra prediction; when the image component prediction method is applied to the intra prediction unit 203 In some cases, the "current block” specifically refers to the current decoded block in intra prediction.
  • the embodiment of the present application provides an inter-frame prediction method, which is applied to a video encoding device, that is, an encoder.
  • the functions implemented by the method can be implemented by the processor in the video encoding device calling program codes.
  • the program code can be stored in a computer storage medium.
  • the video encoding device includes at least a processor and a storage medium.
  • Step S301 Determine the prediction mode parameter of the current block.
  • each image block currently to be encoded may be referred to as a coding block (CB).
  • each encoding block may include a first image component, a second image component, and a third image component; and the current block is the encoding of the first image component, the second image component, or the third image component currently to be predicted in the video image.
  • the current block is the encoding of the first image component, the second image component, or the third image component currently to be predicted in the video image.
  • the current block performs the first image component prediction, and the first image component is the brightness component, that is, the image component to be predicted is the brightness component, then the current block can also be called the brightness block; or, it is assumed that the current block performs the 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.
  • the prediction mode parameter indicates the coding mode of the current block and parameters related to the mode.
  • a rate-distortion optimization (Rate Distortion Optimization, RDO) method can be used to determine the prediction mode parameters of the current block.
  • the encoder to determine the prediction mode parameters of the current block is implemented as follows: the encoder determines the image components to be predicted for the current block; based on the parameters of the current block, multiple prediction modes are used to perform the prediction on the image components to be predicted. Predictive coding, calculate the rate-distortion cost result corresponding to each prediction mode in multiple prediction modes; select the minimum rate-distortion cost result from the calculated multiple rate-distortion cost results, and assign the minimum rate-distortion cost result to the corresponding prediction mode Determined as the prediction mode parameter of the current block.
  • multiple prediction modes can be used for the current block to respectively encode the image components to be predicted.
  • multiple prediction modes usually include inter prediction mode, traditional intra prediction mode, and non-traditional intra prediction mode
  • traditional intra prediction modes can include direct current (DC) mode and plane (PLANAR). Mode and angle mode, etc.
  • Non-traditional intra prediction modes 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 may include: geometrical partitioning for inter-blocks (GEO), geometrical partitioning prediction mode, and triangular partitioning mode (TPM).
  • the rate-distortion cost result corresponding to each prediction mode can be obtained; then the minimum rate-distortion cost result is selected from the obtained multiple rate-distortion cost results, 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 determined prediction mode can be used to encode the current block, and in this prediction mode, the prediction residual can be made small , Can improve coding efficiency.
  • Step S302 When the prediction mode parameter indicates that the geometric partition prediction mode GPM is used to determine the inter prediction value of the current block, determine the first position of the partition that meets the preset condition in the current block.
  • the position of the B1 partition constructed first in the construction order of the merge list is determined as the first position.
  • GMP divides the inter-frame block (that is, the current block) into two non-rectangular sub-partitions for the edge part of the object in the image, respectively, and then performs weighted fusion after prediction.
  • the non-rectangular form can be as shown in Figures 4a-4g below.
  • GPM there are a total of 64 division modes, and each division mode corresponds to an angle ⁇ and a step size ⁇ . There are a total of 20 angles and 4 step sizes. The combination of each angle and step size constitutes one Kind of division mode.
  • GPM divides the current block into two non-rectangular sub-partitions, and each sub-partition performs one-way motion compensation separately to obtain a one-way prediction value, and finally uses a weight matrix to weight and fuse the one-way prediction values of the two partitions to obtain the final GPM prediction value .
  • angle table replaces the previous angle table based on a fixed step with a slope-based angle table, and uses 5 fixed slopes (1, 1/2, 1/4, 4, 2) to construct unequal intervals Angle table.
  • each combination of angle ⁇ and step size ⁇ constitutes a division mode.
  • GPM divides the current block into two non-rectangular sub-partitions, and each sub-partition performs one-way motion compensation separately to obtain a one-way prediction value, and finally uses a weight matrix to weight and fuse the one-way prediction values of the two partitions to obtain the final GPM prediction value .
  • the partition that meets the preset condition can be understood as the partition that is in the front of the construction order in the candidate list.
  • the partition that is arranged first in the construction order is determined as the partition that meets the preset condition. Partition, and then determine the position of the partition in the coding block in the candidate list.
  • the order of construction of the Merge list is: B1-A1-B0-A0-B2- co-located time domain candidates-historical-based candidates-combined average candidates-zero candidates; that is, the first constructed partition is B1, from As can be seen in Figure 5B, B1 is in the upper right corner of the current block, so in order to select the partition close to the upper right pixel position as the A partition as much as possible, the area near the upper right corner is divided into the A partition, thereby ensuring the candidate of the A partition More advanced than the candidate of the B partition can make the coding rate lower.
  • VTM8.0 the use of GPM by each coding unit (CU) needs to meet some restrictive conditions:
  • Block size restriction both width and height must be greater than or equal to 8 and less than or equal to 64, and the aspect ratio and aspect ratio of the current block are both less than 8.
  • the current block is non-general merge prediction (general merge), non-merged subblock prediction (merge_subblock), non-affine prediction, and non-composed intra-inter prediction (CIIP).
  • the code unit layer syntax is as follows:
  • the first step construct a merge candidate list, which is consistent with the process of constructing a list in the normal merge mode.
  • GMP uses the one-way merge candidate list of the TPM in the original VVC8, that is, the preset merge candidate list, to find the respective motion vectors (MV) of the two partitions of the GMP, that is, motion information.
  • FIG. 5B is a schematic structural diagram of adjacent blocks in the candidate list of an exemplary embodiment of this application.
  • FIG. 503 A1
  • upper right adjacent block 502 B0
  • lower left adjacent block 504 A0
  • historical reference block his
  • first 1 The average of the second candidate MV (MVavg), and the zero motion vector 0.
  • Step 2 Obtain MV of two partitions (for example, obtain partition A first and then partition B)
  • merge_gpm_idx1[x0][y0] represents the position of the MV of the B partition in the merge list.
  • the position of the MV of the B partition in the merge list may be reduced by 1 because A first selected the option at the higher position.
  • 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 the B partition in the merge candidate list, waiting for subsequent processing.
  • each partition will only use the unidirectional prediction mode, and each item in the merge list may be bidirectionally predicted MV information, so the unidirectional predicted MV needs to be taken out for use.
  • X (m&0x01), where & is a bitwise AND operation, that is, take out the last bit of m (similar to parity check).
  • & is a bitwise AND operation, that is, take out the last bit of m (similar to parity check).
  • the MV information predFlagLXM corresponding to the reference frame in the reference list corresponding to X is preferentially used for partition prediction, as shown in the option corresponding to block 511 in FIG. 5C.
  • the opposite MV the MV represented by the block 512 corresponding to the level of the block 511 (ie, the white block in FIG. 5C)
  • X 1-X.
  • the corresponding MV information is stored in the processing variables of the A partition, and the subsequent prediction block structure is prepared, as shown below:
  • MVA is the MV vector
  • refIdxA is the reference frame corresponding to the motion vector
  • predListFlagA indicates which component of the list of the motion vector alternatives is currently selected.
  • N mergeCandList[n]
  • the corresponding MV information is stored in the processing variables of the B partition, and the subsequent prediction block structure is prepared, as shown below:
  • MVB is the MV vector
  • refIdxB is the reference frame corresponding to the motion vector
  • predListFlagB indicates which component of the list of the motion vector alternatives is currently selected.
  • the encoder determines the partition mode with the least rate-distortion cost by traversing the 64 partition models corresponding to the GPM, that is, determines the target partition mode; the encoder can then determine the target partition mode according to the target partition mode, through preset partitioning
  • the mapping table of mode, angle index, and step index determines the angle index information and step index information corresponding to the target division mode.
  • the current prediction block is in GPM mode, it will look up the table according to the selected partition mode index merge_gpm_partition_idx of the current block to obtain the corresponding angle angleIdx and step distanceIdx.
  • the mapping table of this partition mode is shown in Table 1:
  • Table 1 Mapping table of angle and step size based on wedge_partition_idx
  • Step S303 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.
  • the current block and the upper right corner of the current block (that is, the B1 constructed first in the construction order of the merge list)
  • the area with the smaller distance between the first position of the partition is divided into the first partition.
  • the area near the upper right corner of the current block is divided into the A partition; so that the candidate of the A partition is more advanced than the candidate of the B partition , In order to make the encoding rate lower.
  • the first position can be understood as first determining that the first structured partition is in the encoding block through the construction order between the different partitions of the encoding block in the obtained candidate list (for example, the merge list). s position. Then, after the first position is determined, it is determined that the distance between the current block and the first position of the current block is less than the preset distance, and this area is divided into the first partition (for example, the A partition), and finally, the The remaining areas in the current block are determined as the second partition (for example, the B partition), so that it is ensured that the candidates of the A partition are more advanced than the candidates of the B partition.
  • the position of the first constructed partition in the coding block is the upper right corner, then the upper right corner is the first position; then, in the current block In the middle, make sure that the area near the upper right corner is zone A, and the other areas are zone B.
  • first determine the first position of the current block, for example, the position of the upper right corner of the current block, and then, in the current block, determine the area where the distance from the upper right corner position is less than the preset distance, Divide this area into the first partition, for example, determine the area within 0.1 mm around the first position of the current block as an area where the distance between the first positions of the current block is less than a preset distance.
  • GMP uses the one-way Merge candidate list of the TPM in the original VVC8, that is, the preset merge candidate list, to find the respective MVs of the two partitions of the GMP, that is, the motion information.
  • the Merge candidate list generally includes a preset number of reference block elements, the preset number can be 6, and each element stores data in the form of a structure, and each structure can include: the reference Motion information of the block, reference frame list, prediction direction, etc.
  • the Merge candidate list When storing data corresponding to GMP, it is stored in 4 ⁇ 4 blocks.
  • information such as angle index information and step length index information, first motion information, and second motion information needs to be written into the code stream during encoding for use during decoding.
  • Step S304 Determine a second partition from the area of the current block excluding the first partition.
  • the second partition is a part of other areas in the current block except the first partition, that is, the current block includes: the first partition, the second partition, and other remaining parts.
  • the current block only includes the first partition and the second partition.
  • part or all of the area of the current block excluding the first partition is determined as the second partition.
  • Step S305 Determine the first predicted value of the first partition and the second predicted value of the second partition.
  • the first predicted value of the first partition and the second predicted value of the second partition may be determined according to the GMP parameter.
  • GMP parameters can include angle index information and target division mode
  • the encoder can divide the current block according to the target division mode to obtain the first partition and the second partition;
  • the encoder performs motion compensation according to the first motion information to obtain the first prediction value of the first partition
  • the encoder performs motion compensation according to the second motion information to obtain the second prediction value of the second partition.
  • Step S306 Perform weighted fusion on the first predicted value and the second predicted value to determine the inter-frame predicted value of the current block.
  • the first weight value of the pixel in the current block and the second weight value of the pixel in the current block are determined, and then, according to the first predicted value and the second weight value, The prediction value, the first weight value and the second weight value are weighted and merged on the pixels in the current block to obtain the inter-frame prediction value of the current block.
  • the encoder can multiply the first predicted value of each pixel by the first weight value, and add the product of the second predicted value and the second weight value of each pixel to complete the pixel in the current block. Weighted fusion to obtain the inter-frame prediction value of the current block.
  • first prediction value and the second prediction value are the two prediction values of each pixel in the current block, and the first weight value and the second weight value also correspond to each pixel of the current block.
  • the two different weight values are the two prediction values of each pixel in the current block, and the first weight value and the second weight value also correspond to each pixel of the current block. The two different weight values.
  • the inter-frame prediction value of the current block can be obtained by using expression (1), as shown below:
  • pbSamples[x][y] Clip3(0,(1 ⁇ bitDepth)1,(predSamplesLPART1[x][y]*(8sampleWeight1)+predSamplesLPART2[x][y]*sampleWeight2+offset1)>>shift1) ( 1);
  • pbSamples[x][y] is the inter prediction value of each pixel in the current block
  • predSamplesLPART1[x][y] is the first prediction value of each pixel
  • sampleWeight1 is the first prediction value of each pixel
  • the weight value, predSamplesLPART2[x][y] is the second predicted value of each pixel
  • sampleWeight2 is the second weight value of each pixel.
  • the encoder when the encoder performs inter-frame prediction of the current block, it predicts the video components separately, that is, the first predicted value and the second predicted value both include the luminance predicted value and Predicted value of chroma.
  • the encoder may first obtain the weight value of the luminance component, and the weight value of the chrominance component may be obtained according to the weight value of the luminance component.
  • the aforementioned first weight and second weight value in this application may be the weight value of the luminance component.
  • the encoder directly uses the weight of the chrominance sample at the current (x, y) by obtaining the weight of the luminance sample in the upper right corner of each 2*2 block, that is, down-sampling the weight of the luminance sample.
  • the first weight of brightness is down-sampled to obtain the first weight value of chroma shown in FIG. 6b.
  • it can be performed according to the second weight of brightness.
  • 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 is directly used as the second weight of the chrominance sample at the current (x, y).
  • the encoder can determine the first position of the partition that meets the preset condition, and then, the area whose distance from the first position of the current block is less than the preset distance , Determine it as the first partition; determine other areas in the current block as the second partition, so that the candidate of the first partition is higher than the candidate of the second partition, which can make the coding rate lower.
  • the codec GPM prediction process is shown in FIG. 7, which is a flowchart of the codec prediction process according to an embodiment of the application.
  • the GPM prediction process is as follows:
  • the input module 701 input the brightness values (xCb, yCb), (width, height), the MV of the A partition and the MV of the B partition with a maximum accuracy of 1/16, and the A partition with the maximum brightness accuracy of 1/32 MV and B partition MV, the reference frame corresponding to the motion vector of the A partition and the reference frame corresponding to the motion vector of the B partition, the component in the list of which partition A motion vector option is currently selected and the current selection of the B partition motion vector backup Which component of the list of options.
  • processing module 702 the following four steps of processing are performed:
  • Step 1 derive the reference frame list refPicLN and the sub-pixel predicted pixel value predSamplesLN (14-bit depth) for the three components of L, Cb, and Cr, where N is A or B.
  • L, Cb, and Cr respectively represent blue and red in the brightness and chroma of the current block.
  • Step two push to the split angle and position.
  • Step three is to derive the weighted prediction pixel value predSamples for the three components of L, Cb, and Cr.
  • Step 4 Store MV information for subsequent prediction of MVN, refidxN, and predListFlagN.
  • the GPM prediction results are output, such as predicted pixel values, pre-sampled brightness (predSamplesL), pre-sampled blue (predSamplesCb), and pre-sampled red (predSamplesCr).
  • the GPM mode reuses the existing conventional Merge list, and constructs the one-way Merge list belonging to GPM according to the parity check.
  • the merge candidates of the two sub-partitions after the GPM division are all from the one-way Merge.
  • the candidate list is selected, that is, the merge candidate list is constructed first, and then the MVs of the two partitions are obtained.
  • the motion compensation method is used to calculate the respective one-way motion compensation prediction values of the two partitions, which are used in the final weighted fusion process of the subsequent GPM.
  • the motion compensation here is the same as the conventional motion compensation process, that is, the pixel value of the corresponding area is found through the motion vector and copied.
  • step S302 in order to enable the determined first location to enable the partition to meet the preset condition, step S302 may be implemented through the following steps:
  • Step S321 When the prediction mode parameter indicates that the geometric partition prediction mode GPM is used 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.
  • the preset candidate list can be a merge candidate list, which is to find all MVp information related to the current block motion information as much as possible, that is, to find all MVp information related to the current block motion information.
  • Stored in the merge list to give a reference to the current block.
  • the construction sequence between the different partitions of the coding block in the merge candidate list is: the upper adjacent block B1, the left adjacent block A1, the upper right adjacent block B0, the lower left adjacent block A0, and the upper left adjacent block B2 .
  • the reference frame corresponds to the location block col, the historical reference block his, the average MVavg of the first and second candidate MVs, and the zero motion vector 0.
  • Step S322 Determine the position of the partition arranged in the preset sequence number in the construction sequence as the first position.
  • the preset serial number is the first few serial numbers arranged in the construction order.
  • first according to the construction order, determine the partition of the first construction; that is, determine the first one in the construction order.
  • the constructed partition is the upper adjacent block B1; then, the first position of the first constructed partition in the current block is determined. That is, the upper right corner of the current block is determined as the first position.
  • step S304 may be implemented in the following multiple ways:
  • Step S341 Determine at least one reference point at the second position in the current block.
  • the second position may be the upper right corner of the current block.
  • two reference points 81 and 82 are determined.
  • Step S342 Determine the sum of the distances between the at least one reference point and the dividing line in the current block.
  • the dividing line is used to divide the current block into multiple partitions. As shown in FIG. 9, the dividing line of the current block 901 is 902. The sum of distances is generally in the coordinate system. If the dividing line is on the right side of the pixel, then the distance between the two is positive, and if the dividing line is on the left side of the pixel, then the distance between the two is negative.
  • step S343 if the sum of the distances is greater than or equal to a preset value, determine the area where the pixel points with a positive distance from the dividing line in the current block are located as the first area.
  • the chroma processing is consistent with the brightness
  • the motion vector storage is also consistent with the A and B partitions here.
  • pbSamples[x][y] Clip3(0,(1 ⁇ BitDepth)-1,(predSamplesLA[x][y]*wValue+predSamplesLB[x][y]*(8-wValue)+offset1)>> shift1) (2);
  • the chroma processing is proportional to the brightness
  • the motion vector storage is also consistent with the A and B partitions here.
  • step S344 if the sum of the distances is less than the preset value, determine the area where the pixel points with the negative distance from the dividing line in the current block are located as the first area.
  • the partition corresponding to the negative distance value is judged to be the first partition (A partition).
  • Step S351 Determine the GPM parameter of the current block.
  • the GPM parameter of the current block includes angle index information and size information of the current block.
  • Step S352 Determine the weight of each pixel in the current block according to the GPM parameter.
  • the encoder can determine the pixels in the current block according to the size information of the current block.
  • the position information of the point based on the position information of each pixel in the current block, the angle index information and the update of the angle mapping table, the weight index corresponding to each pixel in the current block can be calculated.
  • the weight of the pixels in the current block is determined.
  • the encoder determines the implementation process of the weight index corresponding to the pixel in the current block according to the cosine angle index information, the sine angle index information, the updated angle mapping table, and the position information of the pixels in the current block.
  • the encoder needs to determine the vertical distance rho from the center point of the block to the current dividing line according to the cosine angle index information and the sine angle index information, and then update the angle mapping table according to the cosine angle index information, the sine angle index information, and the current block
  • the position information of the pixel and rho determine the weight index of each pixel.
  • 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 of L, Cb, and Cr is:
  • the weight mask matrix of the current brightness block is obtained by cropping the predefined weight matrix, and the process is as follows:
  • Step 1 The acquisition of the weight matrix requires the current block and the division mode of the current block to calculate the offset value Offset (x, y) of the upper left corner of the current block corresponding to the origin of the coordinates, and the origin of the coordinates is at the same angle and the division line crosses the geometry.
  • the geometric center point of the same size block of the center point is shown in Figure 9, where the background 903 is the maximum moving range ( 112x112). If the dividing line does not pass through the center point of the block, keep the relative position of the dividing line unchanged, and move the position of the block in the coordinate system to obtain a proper division.
  • the step size used when constructing the predefined weight matrix is only the first step size (that is, the dividing line must intersect the center point of the block).
  • partFlip is 0, which means that the side where the distance (weightIdx) between the point obtained in the subsequent expression (8) and the dividing line is negative is the A partition, and the opposite side of the dividing line is the B partition; when the value is 1, then On the contrary, the side where the distance weightIdx is positive is the A partition, and the negative side is the B partition.
  • the key parameter shiftHor is calculated by the following expressions (6) and (7):
  • shiftHor is the determination of the displacement direction between different dividing lines at the same angle. If its value is 0, the dividing line will be shifted on the Y axis; if its value is 1, the dividing line will be shifted on the X axis. .
  • offsetY (-nH)>>1+angleIdx ⁇ 16? (distanceIdx*nH)>>3:-((distanceIdx*nH)>>3) (8);
  • the current block has an offset value related to the width of the block in the horizontal direction.
  • offsetX (-nW)>>1+angleIdx ⁇ 16? (distanceIdx*nW)>>3:-((distanceIdx*nW)>>3);
  • Step 2 Calculate the weight index weightIdx at the current pixel through the position of the pixel, and directly calculate the weight value at the current pixel through the expressions (10) to (12).
  • weightIdx (((x*subW+offsetX) ⁇ 1)+1)*disLut[displacementX]+(((y*subH+offsetY) ⁇ 1)+1))*disLut[displacementY](10);
  • weightIdxL partFlip? 32+weightIdx:32–weightIdx (11);
  • subW and subH indicate the downsampling rate, if it is 420 format, both subW and subH are 2.
  • the brightness does not need to be down-sampled, and the chroma weight is obtained by down-sampling the brightness weight.
  • Table 2 Lookup table for distance arrangement of multiple dividing lines
  • pbSamples[x][y] Clip3(0,(1 ⁇ BitDepth)-1,(predSamplesLA[x][y]*;
  • offset1 is used for rounding
  • shift1 is used to restore the predicted value after weighted average to the same bit depth as the input video, as shown in expressions (14) and (15):
  • the GPM motion vector of the current prediction block needs to be stored, and the process is as follows:
  • the storage process is realized by using the motion mask matrix of the current brightness block. If the predicted value is completely from the A partition, then the motion vector of the A partition is recorded, and if it is completely from the B partition, the motion vector of the B partition is recorded; otherwise, at the same time Record the motion vectors of the two partitions.
  • the calculation of the motion mask is basically the same as the process of calculating the brightness weight matrix. First, the offset value offset is calculated. The calculation of the offset is shown in Expression (16) and Expression (17):
  • offsetY ((-cbHeight)>>1)+(angleIdx ⁇ 16?(distanceIdx*cbHeight)>>3-((distanceIdx*cbHeight)>>3)) (16);
  • offsetX ((-cbWidth)>>1+(angleIdx ⁇ 16?(distanceIdx*cbWidth)>>3-((distanceIdx*cbWidth)>>3))?;
  • cbWidth and cbHeight are respectively the width and height of the motion mask matrix corresponding to the current prediction block (that is, the width and height of the luminance component of the current block).
  • the motion mask matrix of the current prediction block is still calculated in units of 4 ⁇ 4 sub-blocks, and the calculation of the motion index (motionIdx) at the center position (4i+2, 4j+2) of each 4 ⁇ 4 sub-block is similar
  • weightIdx in expression (18):
  • motionIdx (((4*xSbIdx+offsetX) ⁇ 1)+5)*disLut[displacementX]+((((4*ySbIdx+offsetY) ⁇ 1)+5)*disLut[displacementY] (18);
  • motionIdx is the motion index information, the position information of the pixel in the upper left corner of the current block (xSbIdx, ySbIdx), (xSbIdx, ySbIdx) represents the sub-block of each 4 ⁇ 4 sub-block (subblock, sb) in the current CU coordinate.
  • offsetX is the movement abscissa offset value
  • offsetY is the movement ordinate offset value
  • DisLut[displacementX] is the first angle
  • DisLut[displacementY] is the second angle.
  • partIdx indicates whether the two partitions need to be flipped.
  • the current block stores the MVA of the first partition
  • the current block stores the MVB of the second partition
  • the stored MV information will be used for MV prediction of subsequent coding blocks.
  • the encoding process of the encoder for the GPM prediction mode related syntax is as follows:
  • the encoder regards GPM and other inter-frame prediction modes as competing modes, selects between modes according to rate-distortion optimization or other strategies, and transmits the selected result to the decoder in the form of syntax elements in the code stream. That is, the write operation of the syntax described in section 1). This process is opposite to the parsing process. First, get the position information of the reference option selected in the merge list for the two partitions A and B of m and n, and then assign the syntax elements in the following way:
  • 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, determine the area where the weight of the determined pixel point is the sum of the weight values in the current block as the first partition.
  • 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, the A partition; otherwise, the second partition is judged to correspond to the current weight , Namely B partition.
  • WeightSum The specific implementation of the two-point weight sum (WeightSum) is as follows:
  • WeightSum wValue[nCbW-1][0]+wValue[nCbW-2][0];
  • wValue refers to the value determined according to the following method:
  • weightIdx can be expressed as:
  • weightIdx (((x*subW+offsetX) ⁇ 1)+1)*disLut[displacementX]+(((y*
  • 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 where the weight of the pixel in the current block is the sum of the weight values as the second partition.
  • the weight threshold is set to 8, and the sum of the weights of the two points is less than 8, it is determined that the current weight corresponds to the second partition, that is, the B partition.
  • the A partition selects the top option in the merge list, and the B partition selects the latter option, which makes the coding rate lower.
  • Method 3 The encoder determines the first partition according to the angle number and the position of the intersection between the dividing line and the boundary.
  • the implementation process is as follows:
  • the chroma processing is proportional to the brightness
  • the motion vector storage is also consistent with the A and B partitions here.
  • Method 4 Specify the A and B partitions in various sizes and modes through the set list, as shown in Table 3.
  • Table 3 How to divide the current block can be obtained, that is, it can be realized by looking up the table, so that the current block can be divided more quickly, conveniently and accurately.
  • the revised partition distribution diagram is as shown in FIG. 10, which is a schematic diagram of the revised partition distribution according to the embodiment of the application. It can be seen from FIG. The situation where the partitions between the corresponding blocks in the GPM partition are different from the perspective.
  • the method may further include:
  • the angle index information is written into the code stream.
  • the second step is to determine the motion offset value according to the cosine angle index information, sine angle index information, and update the angle mapping table, and according to the angle index information, step index information, and size information of the current block, obtain the motion profile corresponding to the current block. Coordinate offset value and movement ordinate offset value.
  • the third step according to the motion offset value, the motion abscissa offset value, the motion ordinate 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 sine angle index information Corresponding to the second angle, the motion index information is obtained.
  • the first motion information and the second motion information are determined as the motion information of the current block.
  • the first motion information is determined as the motion information of the current block.
  • the second motion information is determined as the motion information of the current block.
  • the seventh step is to store the motion information of the current block in the preset merge candidate list.
  • the encoder when the encoder performs the coding of the current block, it also needs to store the coded motion information of the current block for use in inter-frame prediction of subsequent coding blocks.
  • the encoder calculates the first angle and the second angle according to 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 offsets according to the motion Value, motion abscissa offset value, motion ordinate offset value
  • the position information of the pixel 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 to obtain the motion 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 Determine the first motion information as the motion information of the current block; when the motion
  • the embodiment of the present application provides an inter-frame prediction method, which is applied to a video decoding device, that is, a decoder.
  • the function implemented by this method can be implemented by the processor in the video decoding device calling program code.
  • the program code can be stored in a computer storage medium. It can be seen that the video encoding device at least includes a processor and a storage medium.
  • FIG. 11 is a schematic diagram of the implementation process of an intra-frame prediction method according to an embodiment of the application, which is applied to a decoder. As shown in FIG. 11, the method includes:
  • Step S1101 Parse the code stream and determine the predictive decoding parameters of the current block.
  • Step S1102 When the predictive decoding parameter indicates that the geometric partition prediction mode GPM is used to determine the inter-frame prediction value of the current block, determine the first position of the partition that meets the preset condition in the current block.
  • the construction order between different partitions of the coding block in the preset candidate list is determined; then, the construction The position of the partition arranged in the preset sequence number in the sequence is determined as the first position; in a specific example, the first structured partition is determined according to the structure order; it is determined that the first structured partition is in the The first position in the current block.
  • Step S1103 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.
  • Step S1104 Determine a second partition from the area of the current block excluding the first partition.
  • Step S1105 Determine the first predicted value of the first partition and the second predicted value of the second partition.
  • Step S1106 Perform weighted fusion on the first predicted value and the second predicted value to determine the inter-frame predicted value of the current block.
  • the decoder determines the predictive decoding parameters of the current block by parsing the code stream; then, combined with the construction order in the candidate list, determines the first position of the partition that meets the preset condition in the current block; next, 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 A partition; the area of the current block other than the first partition is determined as the B partition; In this way, it is ensured that the candidates of the A partition are more advanced than the candidates of the B partition, which can make the coding rate lower. Finally, determine the first predicted value of the first partition and the second predicted value of the second partition; perform weighted fusion on the first predicted value and the second predicted value to determine the frame of the current block Time prediction value; improve the accuracy of prediction.
  • the decoder determines an area whose distance from the first position of the current block is less than a preset distance as the first partition in the following manners: :
  • Manner 1 The decoder first determines at least one reference point at a 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 area where the pixel points in the current block with a positive distance from the dividing line are located as the first area. If the sum of the distances is less than the preset value, the decoder determines the area where the pixel points in the current block with a negative distance from the dividing line are located as the first area.
  • the decoder first determines the GPM parameter of the current block; then, according to the GPM parameter, 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 For a weight threshold, the decoder determines an area in the current block where the weight of the determined pixel point is 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 where the weight of the pixel in the current block is the sum of the weight values, and determines the second partition.
  • Manner 3 The decoder determines the first partition according to the angle number and the position of the intersection of the partition line and the boundary.
  • Method 4 The decoder specifies the A and B partitions in various sizes and modes through the set list.
  • the implementation of S1101-S1106 on the decoder is basically the same as the process of implementing S301-S306 on the encoder side, and will not be repeated here.
  • the difference is that the predictive decoding parameters and GMP parameters of the current block on the decoder side are both parsed from the code stream.
  • the encoder is obtained by itself.
  • the decoder can arrange the order of the different partitions of the coding block in the preset candidate list according to the construction order; arrange the construction order at the position of the partition with the preset number, Determine as the first position; then, in the current block, determine an area with a distance less than a preset distance from the first position of the current block as the first partition; divide from the current block In the area outside the first partition, the second partition is determined; in this way, the partition near the upper right pixel position is selected as the A partition, so that the candidate of the A partition is higher than the candidate of the B partition, which can make the coding rate lower .
  • the current block is partitioned AB, so that the predicted inter-frame prediction value of the current block is more accurate.
  • the GPM parameters of the current block include: angle index information and size information of the current block; in the embodiments of the present application, the implementation of determining the weight of each pixel in the current block may include:
  • the first step is to determine the position information of pixels in the current block according to the size information of the current block.
  • the second step is to determine the weight of the pixels in the current block according to the angle index information, the preset angle mapping table, and the position information of the pixels in the current block.
  • the decoder may determine the cosine angle index information and the sine angle index information according to the angle index information; reduce the power of the angle of the preset angle mapping table to obtain the updated angle mapping table;
  • the angle index information, the sine angle index information, and the updated angle mapping table are respectively combined with the position information of the pixels in the current block to determine the weight index corresponding to the pixels in the current block.
  • an encoder 1 including:
  • the first determining module 1201 is configured to determine the prediction mode parameter of the current block
  • the first indication module 1202 is configured to determine the first position in the current block of the partition that meets the preset condition when the prediction mode parameter indicates that the geometric partition prediction mode GPM is used to determine the inter prediction value of the current block;
  • the first division module 1203 is configured 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;
  • the second partition module 1204 is configured to determine a second partition from the area of the current block excluding the first partition
  • the second determining module 1205 is configured to determine the first predicted value of the first partition and the second predicted value of the second partition;
  • the first fusion module 1206 is configured to perform weighted fusion on the first predicted value and the second predicted value to determine the inter-frame predicted value of the current block.
  • the first indication module 1202 is further configured to: when the prediction mode parameter indicates that the geometric partition prediction mode GPM is used to determine the inter prediction value of the current block, determine that it is in the preset candidate list The construction sequence between the different partitions of the coding block; the position of the partition arranged in the preset sequence number in the construction order is determined as the first position.
  • the first indication module 1202 is further configured to: determine the first structured partition according to the structure sequence; determine the first structure of the first structured partition in the current block One location.
  • the first dividing module 1203 is further configured to: determine at least one reference point at a second position in the current block; determine the at least one reference point and the current The sum of the distances between the dividing lines in the block; if the sum of the distances is greater than or equal to the preset value, determine the area where the pixel points in the current block with a positive distance from the dividing line are located Is the first area.
  • the first dividing module 1203 is further configured to: if the sum of the distances is less than the preset value, the distance between the current block and the dividing line is The area where the negative pixel points are located is determined as the first area.
  • the first dividing module 1203 is further configured to: determine the GPM parameter of the current block; determine the weight of each pixel in the current block according to the GPM parameter; if The sum of the weight values of the at least one reference point is greater than or equal to the weight threshold, and the area where the weight of the determined pixel point in the current block is the sum of the weight values is determined as the first partition.
  • the first dividing module 1203 is further configured to: if the sum of the weight values of the at least one reference point is less than the weight threshold, the weight of the pixel in the current block is The area of the sum of the weight values is determined as the second partition.
  • the GPM parameters of the current block include: angle index information and size information of the current block; the first division module 1203 is further configured to: determine according to the size information of the current block The position information of the pixels in the current block; and the weight of the pixels in the current block is determined according to the angle index information, the preset angle mapping table, and the position information of the pixels in the current block.
  • 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 data that can be stored in the first processor A computer program running on 1302, an inter-frame prediction method on the encoder side when the first processor 1302 executes the program.
  • the encoder determines the order of construction between different partitions of the coding block in the preset candidate list; arranges the position of the partition with the preset number in the construction order to determine Is 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; and the current block is divided by In the area outside the first partition, the second partition is determined; in this way, the partition close to the upper right pixel position is selected as the A partition, so that the candidate of the A partition is higher than the candidate of the B partition, which can make the coding rate lower.
  • the current block is partitioned AB, so that the predicted inter-frame prediction value of the current block is more accurate.
  • an embodiment of the present application provides a decoder 2, which includes: a first parsing module 1401, used to parse a code stream, and determine the predictive decoding parameters of the current block; a second indicating module 1402, used to The predictive decoding parameter indicates that when 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 that meets the preset condition is determined in the current block; the third partition module 1403 is used for determining the first position of the partition in the current block.
  • the fourth division module 1404 is used to select the area from the current block except the first partition Area, determine the second partition; the third determination module 1405, used to determine the first prediction value of the first partition and the second prediction value of the second partition; the second fusion module 1406, used to compare the The first predicted value and the second predicted value are weighted and merged to determine the inter-frame predicted value of the current block.
  • the second indication module 1402 is further configured to: when the prediction mode parameter indicates that the geometric partition prediction mode GPM is used to determine the inter prediction value of the current block, determine that it is in the preset candidate list The construction sequence between the different partitions of the coding block; the position of the partition arranged in the preset sequence number in the construction order is determined as the first position.
  • the second indication module 1402 is further configured to: determine the first structured partition according to the structure order; determine the first structure of the first structured partition in the current block One location.
  • the third dividing module 1403 is further configured to: determine at least one reference point at a second position in the current block; determine the at least one reference point and the current block The sum of the distances between the dividing lines in the block; if the sum of the distances is greater than or equal to the preset value, determine the area where the pixels whose distances between the dividing lines are positive in the current block are Is the first area.
  • the third dividing module 1403 is further configured to: if the sum of the distances is less than the preset value, the distance between the current block and the dividing line is The area where the negative pixel points are located is determined as the first area.
  • the third dividing module 1403 is further configured to: determine the GPM parameter of the current block; determine the weight of each pixel in the current block according to the GPM parameter; if The sum of the weight values of the at least one reference point is greater than or equal to the weight threshold, and the area where the weight of the determined pixel point in the current block is the sum of the weight values is determined as the first partition.
  • the third dividing module 1403 is further configured to: if the sum of the weight values of the at least one reference point is less than the weight threshold, the weight of the pixel in the current block is The area of the sum of the weight values is determined as the second partition.
  • the third dividing module 1403 is further configured to: determine the position information of pixels in the current block according to the size information of the current block; Set the angle mapping table and the position information of the pixels in the current block to determine the weight of the pixels in the current block.
  • 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 data that can be stored in the second processor A computer program running on 1502, when the second processor 1502 executes the program, the inter-frame prediction method on the decoder side is implemented.
  • the decoder is based on the construction order between the different partitions of the coded block in the preset candidate list; arranges the position of the partition with the preset number in the construction order to determine Is 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; and the current block is divided by In the area outside the first partition, the second partition is determined; in this way, the partition close to the upper right pixel position is selected as the A partition, so that the candidate of the A partition is higher than the candidate of the B partition, which can make the coding rate lower.
  • the current block is partitioned AB, so that the predicted inter-frame prediction value of the current block is more accurate.
  • an embodiment of the present application provides a storage medium on which a computer program is stored.
  • the inter-frame prediction method of the encoder is implemented; or, the computer program is processed by the second processor.
  • the decoder is executed, the inter-frame prediction method of the decoder is realized.
  • 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, an area whose distance from the first position of the current block is less than a preset distance is determined as the first partition; and the current block is divided by In the area outside the first partition, determine the second partition; in this way, select the partition close to the upper-right pixel position as the first partition, so that the candidates of the first partition are ahead of the candidates of the second partition, which can make the coding rate higher. Low.
  • the current block is partitioned, so that the predicted inter-frame prediction value of the current block is more accurate.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请实施例公开了一种帧间预测方法、编码器、解码器及存储介质,该方法包括:确定当前块的预测模式参数;当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;确定所述第一分区的第一预测值和所述第二分区的第二预测值;对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。

Description

帧间预测方法、编码器、解码器及存储介质 技术领域
本申请实施例涉及视频编码技术,涉及但不限于帧间预测方法、编码器、解码器及存储介质。
背景技术
在视频编解码,对当前块进行编解码的过程中,除了有帧内预测外,还可以采用帧间预测方式。帧间预测可以包括运动估计和运动补偿,针对运动补偿,可以采用几何划分预测模式(Geometrical partition Mode,GMP),将帧间的当前块划分为两个非矩形的分区分别进行预测后进行加权融合,从而得到当前块的预测值。
发明内容
本申请实施例提供一种帧间预测方法、编码器、解码器及存储介质,可以选取靠近右上角像素位置的分区作为第一分区,这样第一分区的候选比第二分区的候选更靠前可以使得编码码率更低。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种帧间预测方法,应用于编码器,该方法包括:
确定当前块的预测模式参数;
当所述预测模式参数指示使用几何划分预测模式确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
从所述当前块除所述第一分区之外的区域中,确定第二分区;
确定所述第一分区的第一预测值和所述第二分区的第二预测值;
对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
第二方面,本申请实施例提供了一种帧间预测方法,应用于解码器,该方法包括:
解析码流,确定当前块的预测解码参数;
当所述预测解码参数指示使用几何划分预测模式确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
从所述当前块除所述第一分区之外的区域中,确定第二分区;
确定所述第一分区的第一预测值和所述第二分区的第二预测值;
对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
第三方面,本申请实施例提供了一种编码器,其中,
第一确定模块,用于确定当前块的预测模式参数;
第一指示模块,用于当所述预测模式参数指示使用几何划分预测模式确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
第一划分模块,用于在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
第二划分模块,用于从所述当前块除所述第一分区之外的区域中,确定第二分区;
第二确定模块,用于确定所述第一分区的第一预测值和所述第二分区的第二预测值;
第一融合模块,用于对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
第四方面,本申请实施例提供了一种编码器,其中,
第一解析模块,用于解析码流,确定当前块的预测解码参数;
第二指示模块,用于当所述预测解码参数指示使用几何划分预测模式确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
第三划分模块,用于在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
第四划分模块,用于从所述当前块除所述第一分区之外的区域中,确定第二分区;
第三确定模块,用于确定所述第一分区的第一预测值和所述第二分区的第二预测值;
第二融合模块,用于对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值
第五方面,本申请实施例还提供了一种编码器,包括:
第一存储器和第一处理器;
所述第一存储器存储有可在第一处理器上运行的计算机程序,所述第一处理器执行所述程序时实现编码器的所述帧间预测方法。
第六方面,本申请实施例还提供了一种解码器,包括:
第二存储器和第二处理器;
所述第二存储器存储有可在第二处理器上运行的计算机程序,所述第二处理器执行所述程序时实现解码器的所述帧间预测方法。
第七方面,本申请实施例提供了一种存储介质,包括:
其上存储有计算机程序,该计算机程序被第一处理器执行时,实现编码器的所述帧间预测方法;或者,该计算机程序被第二处理器执行时,实现解码器的所述帧间预测方法。
本申请实施例提供了一种帧间预测方法、编码器、解码器及存储介质,在进行帧间预测的过程中,根据预设候选列表中当前块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置;然后,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;这样,选取靠近右上角像素位置的分区作为第一分区,这样第一分区的候选比第二分区的候选更靠前可以使得编码码率更低,利用这样的分区方式,对当前块进行分区,从而使得预测到的当前块的帧间预测值更加准确。
附图说明
图1A为本申请一示例性实施例不同角度下GPM分区示意图;
图1B为本申请一示例性实施例不同角度下直接计算距离的正负值分布示意图;
图2A为本申请实施例提供的一种视频编码系统的组成框图;
图2B为本申请实施例提供的一种视频解码系统的组成框图;
图3为本申请实施例提供的一种图像分量预测方法的流程示意图;
图4a-4g为本申请实施例提供的示例性的多种划分模式的示意图;
图5A为本申请实施例提供的示例性当前块的角度和步长的示意图;
图5B为本申请实施例候选列表中相邻块示意图;
图5C为本申请实施例候选列表示意图;
图6a为本申请实施例提供的示例性的亮度的第一权重值的示意图;
图6b为本申请实施例提供的示例性的色度的第一权重值的示意图;
图7为本申请实施例编解码器预测过程流程图;
图8为本申请实施例通过两点距离判断AB分区示意图;
图9为本申请实施例残差计算示意图;
图10为本申请实施例修正后的分区分布示意图;
图11为本申请实施例一种帧内预测方法的实现流程示意图;
图12为本申请实施例一种编码器的硬件结构示意图;
图13为本申请实施例另一种编码器的硬件结构示意图;
图14为本申请实施例一种解码器的硬件结构示意图;
图15为本申请实施例另一种解码器的硬件结构示意图。
具体实施方式
为了能够更加详尽地了解本申请实施例的特点与技术内容,下面结合附图对本申请实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本申请实施例。
在相关技术中,GPM的两个分区的选取是由角度确定的结果,如图1A所示,图1A为本申请一示例性实施例不同角度下GPM分区示意图,从图1A可以看出,分区11表示第一分区(即A分区),分区12表示第二分区(即B分区);序号12与序号28之间的分区情况是相反的。然而,得到的权重索引(weightIdx)值的正负区域则是如图1B所示的结果,从图1B所示,分区13的权重索引为正,分区14的权重索引为负;综合对比图1A与图1B,可以得出,在范围为13-27的角度内,A分区对应距离为负的区域,而其他角度上A分区对应距离为正的区域。
为了统一实现计算的权值与A分区像素相乘的计算式;在计算权重值的时候,需要用partFlip进行分区的翻转,在范围为13-27的角度内,A分区对应距离为负的区域,而其他角度上A分区对应距离为正的区域。
但是这样根据角度的翻转方式有一些弊端存在:
第一个弊端就是单纯按照角度进行AB分区的判断或许比较草率,考虑到Merge候选的构造规则对AB分区候选选取的影响,现有的Merge列表的构造顺序为:B1-A1-B0-A0-B2-同位时域候选-基于历史的候选-组合平均候选-零候选,因此应该尽可能选取靠近右上角像素位置的分区作为A分区,这样A分区的候选比B分区的候选更靠前可以使得编码码率更低。尽管多数角度上在正方形块的分布接近了这样的选择,但是还有很多情况不满足。
第二个弊端在于,在13-27范围内的角度,需要对两个分区进行翻转,使得A分区的权值索引始终为正。但是通过分析每个角度的分区分布,从理论上讲角度索引为12和28所对应的分区应该保持一致,即左上侧为A分区,右下侧为B分区,但是这里却出现明显的断层,虽然对性能影响差别不大,但是违背了GPM的分区分布规则。
基于此,本申请实施例提供一种帧间预测方法,首先,确定当前块的预测模式参数;当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;然后,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;确定所述第一分区的第一预测值和所述第二分区的第二预测值;最后,对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。如此,结合Merge列表的构造顺序(比如,构造顺序为B1-A1-B0-A0-B2-同位时域候选-基于历史的候选-组合平均候选-零候选),选取靠近右上角像素位置的分区作为A分区,这样A分区的候选比B分区的候选更靠前可以使得编码码率更低。
在视频编码混合框架中,以正方形和矩形的块为单位实施预测、变换和量化等编码技术。然而实际中运动物体的边缘并不一定都是水平或者垂直方向的,即使是,也不一定刚好在可以划分的块边缘上,而运动边缘两侧的运动矢量往往不同,这样在编码的过程中以一个整块进行运动预测和补偿,易产生较大的预测误差,从而导致编码效率受限。
在多功能视频编码(Versatile Video Coding,VVC)的制定过程中,引入了正方形和矩形之外的其他形状划分。首先是三角形划分模式(Triangular partition Mode,TPM)的引入,以一个正方形或矩形的对角线、或反对角线为分割线,得到三角形的预测单元,从而更灵活的表示帧间预测数据,降低预测误差,从而提高编码效率。
将帧间几何划分帧间预测模式(Geometrical partitioning for inter blocks,GEO),预测模式采纳到VVC的标准中,形成几何划分预测模式(Geometrical partition Mode,GPM)。在GPM中,针对图像中运动物体边缘部分,采用更为灵活的表示方法,将帧间块划分为两个非矩形的子分区分别进行预测后进行加权融合,在视频图像中,一般采用第一图像分量、第二图像分量和第三图像分量来表征编码块(Coding Block,CB);其中,这三个图像分量分别为一个亮度分量、一个蓝色色度分量和一个红色色度分量,具体地,亮度分量通常使用符号Y表示,蓝色色度分量通常使用符号Cb或者U表示,红色色度分量通常使用符号Cr或者V表示;这样,视频图像可以用YCbCr格式表示,也可以用YUV格式表示。
在本申请实施例中,第一图像分量可以为亮度分量,第二图像分量可以为蓝色色度分量,第三图像分量可以为红色色度分量,但是本申请实施例不作具体限定。
为本申请提供一种视频编码系统,如图2A所示,该视频编码系统10包括变换与量化单元101、帧内估计单元102、帧内预测单元103、运动补偿单元104、运动估计单元105、反变换与反量化单 元106、滤波器控制分析单元107、滤波单元108、编码单元109和解码图像缓存单元110等,其中,滤波单元108可以实现去方块滤波及样本自适应缩进(Sample Adaptive 0ffset,SAO)滤波,编码单元109可以实现头信息编码及基于上下文的自适应二进制算术编码(Context-based Adaptive Binary Arithmatic Coding,CABAC)。针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可以得到一个视频编码块,然后对经过帧内或帧间预测后得到的残差像素信息通过变换与量化单元101对该视频编码块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内估计单元102和帧内预测单元103是用于对该视频编码块进行帧内预测;明确地说,帧内估计单元102和帧内预测单元103用于确定待用以编码该视频编码块的帧内预测模式;运动补偿单元104和运动估计单元105用于执行所接收的视频编码块相对于一或多个参考帧中的一或多个块的帧间预测编码以提供时间预测信息;由运动估计单元105执行的运动估计为产生运动向量的过程,所述运动向量可以估计该视频编码块的运动,然后由运动补偿单元104基于由运动估计单元105所确定的运动向量执行运动补偿;在确定帧内预测模式之后,帧内预测单元103还用于将所选择的帧内预测数据提供到编码单元109,而且运动估计单元105将所计算确定的运动向量数据也发送到编码单元109;此外,反变换与反量化单元106是用于该视频编码块的重构建,在像素域中重构建残差块,该重构建残差块通过滤波器控制分析单元107和滤波单元108去除方块效应伪影,然后将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频编码块;编码单元109是用于编码各种编码参数及量化后的变换系数,在基于CABAC的编码算法中,上下文内容可基于相邻编码块,可用于编码指示所确定的帧内预测模式的信息,输出该视频信号的码流;而解码图像缓存单元110是用于存放重构建的视频编码块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频编码块,这些重构建的视频编码块都会被存放在解码图像缓存单元110中。
参见图2B,其示出了本申请实施例提供的一种视频解码系统的组成框图示例;如图2B所示,该视频解码系统20包括解码单元201、反变换与反量化单元202、帧内预测单元203、运动补偿单元204、滤波单元205和解码图像缓存单元206等,其中,解码单元201可以实现头信息解码以及CABAC解码,滤波单元205可以实现去方块滤波以及SAO滤波。输入的视频信号经过图2A的编码处理之后,输出该视频信号的码流;该码流输入视频解码系统20中,首先经过解码单元201,用于得到解码后的变换系数;针对该变换系数通过反变换与反量化单元202进行处理,以便在像素域中产生残差块;帧内预测单元203可用于基于所确定的帧内预测模式和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元204是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换与反量化单元202的残差块与由帧内预测单元203或运动补偿单元204产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过滤波单元205以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元206中,解码图像缓存单元206存储用于后续帧内预测或运动补偿的参考图像,同时也用于视频信号的输出,即得到了所恢复的原始视频信号。
本申请实施例中的图像分量预测方法,主要应用在如图2A所示的帧内预测单元103部分和如图2B所示的帧内预测单元203部分。也就是说,本申请实施例中的图像分量预测方法,既可以应用于视频编码系统,也可以应用于视频解码系统,甚至还可以同时应用于视频编码系统和视频解码系统,但是本申请实施例不作具体限定。还需要说明的是,当该图像分量预测方法应用于帧内预测单元103部分时,“当前块”具体是指帧内预测中的当前块;当该图像分量预测方法应用于帧内预测单元203部分时,“当前块”具体是指帧内预测中的当前解码块。
基于此,下面结合附图和实施例对本申请的技术方案进一步详细阐述。在进行详细阐述之前,需要说明的是,说明书通篇中提到的“第一”、“第二”、“第三”等,仅仅是为了区分不同的特征,不具有限定优先级、先后顺序、大小关系等功能。
本申请实施例提供一种帧间预测方法,该方法应用于视频编码设备,即编码器。该方法所实现的功能可以通过视频编码设备中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该视频编码设备至少包括处理器和存储介质。参见图3,其示出了本申请实施例提供的一种帧间预测方法的流程示意图。如图3所示,该方法可以包括:
步骤S301,确定当前块的预测模式参数。
需要说明的是,视频图像可以划分为多个图像块,每个当前待编码的图像块可以称为编码块(Coding Block,CB)。这里,每个编码块可以包括第一图像分量、第二图像分量和第三图像分量; 而当前块为视频图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的编码块。
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。
还需要说明的是,预测模式参数指示了当前块的编码模式及该模式相关的参数。通常可以采用率失真优化(Rate Distortion Optimization,RDO)的方式确定当前块的预测模式参数。
具体地,在一些实施例中,编码器确定当前块的预测模式参数的实现为:编码器确定当前块的待预测图像分量;基于当前块的参数,利用多种预测模式分别对待预测图像分量进行预测编码,计算多种预测模式下每一种预测模式对应的率失真代价结果;从计算得到的多个率失真代价结果中选取最小率失真代价结果,并将最小率失真代价结果对应的预测模式确定为当前块的预测模式参数。
也就是说,在编码器侧,针对当前块可以采用多种预测模式分别对待预测图像分量进行编码。这里,多种预测模式通常包括有帧间预测模式、传统帧内预测模式和非传统帧内预测模式,而传统帧内预测模式又可以包括有直流(Direct Current,DC)模式、平面(PLANAR)模式和角度模式等,非传统帧内预测模式又可以包括有MIP模式、跨分量线性模型预测(Cross-component Linear Model Prediction,CCLM)模式、帧内块复制(Intra Block Copy,IBC)模式和PLT(Palette)模式等,帧间预测模式可以包括:帧间几何划分预测模式(Geometrical partitioning for inter blocks,GEO)、几何划分预测模式、三角预测模式(Triangle partition mode,TPM)等。
这样,在利用多种预测模式分别对当前块进行编码之后,可以得到每一种预测模式对应的率失真代价结果;然后从所得到的多个率失真代价结果中选取最小率失真代价结果,并将该最小率失真代价结果对应的预测模式确定为当前块的预测模式参数;如此,最终可以使用所确定的预测模式对当前块进行编码,而且在这种预测模式下,可以使得预测残差小,能够提高编码效率。
步骤S302,当预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置。
在本申请实施例中,为使得A分区的候选比B分区的候选更靠前,这里,将按照merge列表的构造顺序中第一个构造的B1分区的位置确定为第一位置。GMP是针对图像中物体边缘部分,将帧间块(即,当前块)划分为两个非矩形的子分区分别进行预测后进行加权融合。例如,非矩形的形式可以如下图4a-4g所示。
其中,在GPM中,总共有64种划分模式,每种划分模式对应一种角度α和一种步长ρ,总共有20种角度,4种步长,每种角度和步长的组合构成一种划分模式。GPM将当前块划分为两个非矩形的子分区,每个子分区单独进行单向的运动补偿得到单向预测值,最后利用权重矩阵对两分区的单向预测值加权融合得到最终的GPM预测值。
需要说明的是,角度表用基于斜率的角度表替代之前基于固定步长的角度表,使用5种固定的斜率(1、1/2、1/4、4、2)去构造不等间隔的角度表。
示例性的,如图5A所示,每种角度α和步长ρ的组合构成一种划分模式。GPM将当前块划分为两个非矩形的子分区,每个子分区单独进行单向的运动补偿得到单向预测值,最后利用权重矩阵对两分区的单向预测值加权融合得到最终的GPM预测值。
在本申请实施例中,满足预设条件的分区可以理解为是候选列表中构造顺序靠前的分区,比如,在构造顺序中排列在首个的分区,将该分区确定为满足预设条件的分区,然后,确定该分区在候选列表中的编码块中的位置。在一个具体例子中,Merge列表的构造顺序为:B1-A1-B0-A0-B2-同位时域候选-基于历史的候选-组合平均候选-零候选;即首个构造的分区为B1,从图5B可以看出,B1在当前块的右上角,所以为了使得尽可能选取靠近右上角像素位置的分区作为A分区,所以将右上角附近的区域划分为A分区,从而保证了A分区的候选比B分区的候选更靠前可以使得编码码率更低。
在本申请的一些实施例中,在VTM8.0中,每个编码单元(coding unit,CU)对GPM的使用需要满足一些限制条件:
(1)序列层参数集(sequence parameter set,Sps)允许采用GPM预测方式
(2)当前编码图像区域属于双向预测片(B slice)
(3)块尺寸限制:宽和高必须都大于等于8,且小于等于64,并且当前块的宽高比和高宽比都小于8。
(4)当前块非普通融合预测(general merge),非融合子块预测(merge_subblock),非仿射预测,也非联合帧内帧间预测(composed intra inter prediction,CIIP)。
(5)对4:0:0格式的色度分量禁用GPM预测过程。
编码单元层语法,如下所示:
Figure PCTCN2020083373-appb-000001
上述语法解析包括以下步骤:
第一步:构造merge候选列表,与普通merge模式构造列表的过程一致。
这里,GMP采用原有VVC8中TPM的单向merge候选列表,即预设合并候选列表,找到GMP的划分后的两个分区各自的运动矢量(MV),即运动信息。
如图5B所示,图5B为本申请一示例性实施例候选列表相邻块的结构示意图,从图5B可以看出,构造顺序为上侧相邻块(B1)501,左侧相邻块503(A1),右上侧相邻块502(B0),左下侧相邻块504(A0),左上侧相邻块B2,参考帧对应位置块505(col),历史参考块(his),第一、第二候选MV的平均(MV avg),以及零运动矢量0。
第二步:两个分区的MV获取(比如,先获取A分区后获取B分区)
merge_gpm_idx0[x0][y0],表示A分区的MV在merge列表中的位置,令m=merge_gpm_idx0[xCb][yCb],等待后续处理。
merge_gpm_idx1[x0][y0],代表B分区的MV在merge列表中的位置,B分区的MV在merge列表中的位置可能因为A先选去了靠前位置的选项,而减小1。
令n=merge_gpm_idx1[xCb][yCb]+(merge_gpm_idx1[xCb][yCb]>m)?1:0,其中,n表示的就是B分区选择的MV在merge候选列表中的实际位置,等待后续处理。
令M=mergeCandList[m],从merge列表中取出第m项用于A分区的MV构造。
因为在几何预测的块中,每个分区都只会使用单向预测模式,而merge列表中每一项都可能是双向预测的MV信息,因此需要取出其中的单向预测MV来供使用。令X=(m&0x01),其中,&为位与运算,即取出m的最后一个比特位(类似于奇偶校验)。这样,优先使用X对应的参考列表中的参考帧对应的MV信息predFlagLXM用于分区预测,如图5C中的块511对应的选项。如果相应的MV不可用(相邻块的MV本身也可能是单向的),才使用对向的MV(与块511水平对应的块512(即图5C中的白色块)表示的MV),X=1-X。
此时,再将相应的MV信息存入给A分区的处理变量,准备后续的预测块构造,如下所示:
MVA[0]=MVLXM[0]
MVA[1]=MVLXM[1]
refIdxA=refIdxLXM
predListFlagA=X
其中,MVA为MV矢量,refIdxA为该运动矢量对应的参考帧,predListFlagA表示当前选用了该运动矢量备选项的哪个list中的分量。
令N=mergeCandList[n],从merge列表中取出第n项用于B分区的MV构造。
第n项的单向运动矢量用于MVB构造,优先使用如图5C中的块511(比如图5C中的黑色块)对应MV,如不可用,才使用对向的MV。因此令X=(n&0x01)。如果predFlagLXN不可用,则X=1-X。
此时,再将相应的MV信息存入给B分区的处理变量,准备后续的预测块构造,如下所示:
MVB[0]=MVLXN[0]
MVB[1]=MVLXN[1]
refIdxB=refIdxLXN
predListFlagB=X
其中,MVB为MV矢量,refIdxB为该运动矢量对应的参考帧,predListFlagB表示当前选用了该运动矢量备选项的哪个list中的分量。
在本申请实施例中,编码器通过遍历GPM对应的64种划分模型,确定出率失真代价最小的划分模式,即确定出目标划分模式;该编码器就可以依据目标划分模式,通过预设划分模式、角度索引和步长索引的映射表,确定出该目标划分模式对应的角度索引信息和步长索引信息了。当前预测块是GPM模式时,会根据当前块选中的划分模式索引merge_gpm_partition_idx去查表得到对应的角度angleIdx和步长distanceIdx,该划分模式的映射表如表1所示:
表1.基于wedge_partition_idx的角度和步长的映射表
Figure PCTCN2020083373-appb-000002
步骤S303,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区。
在本申请实施例中,为使得A分区的候选比B分区的候选更靠前,这里,将当前块中与该当前块的右上角(即按照merge列表的构造顺序中第一个构造的B1分区的第一位置)之间的距离较小的区域,划分为第一分区,这样,当前块的右上角附近的区域划分为A分区;从而使得A分区的候选比B分区的候选更靠前,以使得编码码率更低。
在本申请实施例中,所述第一位置可以理解为是先通过获取的候选列表(比如,merge列表)中的编码块的不同分区之间的构造顺序,确定首个构造的分区在编码块的位置。然后,确定第一位置之后,判断当前块中与该当前块的第一位置之间的距离小于预设距离的区域,将这一区域划分为第一分区(比如,A分区),最后,将当前块中剩余的其他区域确定为第二分区(比如,B分区),这样,就保证了A分区的候选比B分区的候选更靠前。在一个具体例子中,按照merge列表中编码块的不同分区之间的构造顺序,首个构造的分区在编码块中的位置为右上角,那么右上角即为第一位置;然后,在当前块中,确定与右上角附近的区域为A分区,其他区域为B分区。
在一些可能的实现方式中,首先,确定当前块的第一位置,比如,当前块的右上角位置,然后,在当前块中,确定与右上角位置之间的距离小于预设距离的区域,将这一区域划分为第一分区,比如,将当前块的第一位置的周围0.1毫米以内的区域,确定为当前块的第一位置之间的距离小于预设距离的区域。
需要说明的是,在本申请实施例中,GMP采用原有VVC8中TPM的单向Merge候选列表,即预设合并候选列表,找到GMP的划分后的两个分区各自的MV,即运动信息。
其中,Merge候选列表中一般包括预设个数的参考块的元素,预设个数可以为6个,每个元素是以结构体的形式存储数据的,每个结构体中可以包括:该参考块的运动信息、参考帧列表,预测方向等。而存储GMP对应的数据时,是按照4×4大小的块存储的。
在本申请实施例中,角度索引信息和步长索引信息、第一运动信息和第二运动信息等信息,都需要在编码时被写入码流,供解码时使用。
步骤S304,从所述当前块除所述第一分区之外的区域中,确定第二分区。
这里,第二分区是所述当前块中除第一分区外的其他区域中的一部分,即:当前块包括:第一分区、第二分区、其他剩余部分。比如,当前块仅包括第一分区和第二分区。比如,将当前块除所述第一分区之外的区域的部分或者全部确定为第二分区。
步骤S305,确定所述第一分区的第一预测值和所述第二分区的第二预测值。
在本申请实施例中,可以根据由于GMP参数,确定所述第一分区的第一预测值和所述第二分区的第二预测值。由于GMP参数可以包括角度索引信息和目标划分模式,因此,编码器可以根据目标 划分模式对当前块进行划分,得到第一分区和第二分区;从预设合并候选列表中,确定出与第一分区对应的第一参考块的第一运动信息,以及与第二分区对应的第二参考块的第二运动信息;编码器根据第一运动信息进行运动补偿,得到第一分区的第一预测值,编码器根据第二运动信息进行运动补偿,得到第二分区的第二预测值。
步骤S306,对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
在本申请实施例中,首先,根据GMP参数,确定当前块内像素点的第一权重值和当前块内像素点的第二权重值,然后,根据所述第一预测值、所述第二预测值、第一权重值和第二权重值,对所述当前块内像素点进行加权融合,得到所述当前块的帧间预测值。编码器可以根据每个像素点的第一预测值与第一权重值相乘,加上对应的每个像素点的第二预测值与第二权重值之积,完成对当前块内像素点的加权融合,得到当前块的帧间预测值。
需要说明的是,第一预测值和第二预测值为当前块内的各个像素点对饮的两个预测值,第一权重值和第二权重值也是分别都对应了当前块的各个像素点的不同的两种权重值。
当前块的帧间预测值的获取可以采用表达式(1)得到,如下所示:
pbSamples[x][y]=Clip3(0,(1<<bitDepth)1,(predSamplesLPART1[x][y]*(8sampleWeight1)+predSamplesLPART2[x][y]*sampleWeight2+offset1)>>shift1)  (1);
其中,pbSamples[x][y]为当前块的每个像素点的帧间预测值,predSamplesLPART1[x][y]为每个像素点的第一预测值,sampleWeight1为每个像素点的第一权重值,predSamplesLPART2[x][y]为每个像素点的第二预测值,sampleWeight2为每个像素点的第二权重值。
在本申请的一些实施例中,编码器在进行当前块的帧间预测时,是对视频分量分别进行预测的,也就是说,第一预测值和第二预测值均为包括亮度预测值和色度预测值的。
在本申请实施例中,编码器可以先进行亮度分量的权重值的获取,而色度分量的权重值则可以依据亮度分量的权重值得到。
本申请前述的第一权重和第二权重值可以为亮度分量的权重值。
需要说明的是,编码器通过获取每个2*2块的右上角的亮度样本权重直接作为当前(x,y)处的色度样本权重,即对亮度样本权重进行下采样。
示例性的,如图6a所示为亮度的第一权重,对其进行下采样,得到图6b所示的色度的第一权重值,同理,可以根据亮度的第二权重,对其进行下采样后,每个2*2块的右上角(或左上角或有下角或左下角等)的亮度样本的第二权重直接作为当前(x,y)处的色度样本的第二权重。
可以理解的是,编码器在进行帧间预测的过程中,可以通过确定满足预设条件的分区的第一位置,然后,将与当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;将当前块中的其他区域确定为第二分区,这样,第一分区的候选比第二分区的候选更靠前可以使得编码码率更低。
在一些实施例中,编解码器GPM预测过程,如图7所示,图7为本申请实施例编解码器预测过程流程图,GPM的预测流程为:
首先,在输入模块701中,输入亮度值(xCb,yCb)、(宽度,高度)、最大精度为1/16的A分区的MV和B分区的MV、最大亮度精度为1/32的A分区的MV和B分区的MV、A分区运动矢量对应的参考帧和B分区运动矢量对应的参考帧、当前选用了A分区运动矢量备选项的哪个list中的分量和当前选用了B分区运动矢量备选项的哪个list中的分量。
其次,在处理模块702中,进行以下四个步骤的处理过程:
步骤一,为L、Cb、Cr三个分量推导参考帧列表refPicLN、亚像素预测像素值predSamplesLN(14比特深度),N为A或B。
这里,L、Cb、Cr分别表示当前块的亮度、色度中的蓝色和红色。
步骤二,推到分割角度和位置。
步骤三,为L、Cb、Cr三个分量推导加权预测像素值predSamples。
步骤四,存储MV信息用于后续预测MVN、refidxN、predListFlagN。
最后,在输出模块703,输出GPM预测结果,比如,预测像素值、预采样亮度(predSamplesL)、预采样蓝色(predSamplesCb)和预采样红色(predSamplesCr)。
在本申请实施例中,GPM模式重用现有的常规Merge列表,按照奇偶校验的方式构造属于GPM的单向Merge列表,GPM划分后的两个子分区各自的Merge候选都是从该单向Merge候选列表中选出的,即先是构造merge候选列表,然后,两个分区的MV获取。
为L、Cb、Cr三个分量推导参考帧列表refPicLN、亚像素预测像素值predSamplesLN,N为A 或B。即采用运动补偿方式,计算得到两个分区各自的单向运动补偿预测值,用于后面GPM最终的加权融合过程。这里的运动补偿和常规运动补偿过程一样,即通过运动矢量找到相应的区域的像素值并复制。
在一些实施例中,为使得确定的第一位置能够使得分区满足预设条件,步骤S302可以通过以下步骤实现:
步骤S321,当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定预设候选列表中编码块的不同分区之间的构造顺序。
这里,预设候选列表可以是merge候选列表,该列表就是极尽所能找到所有的与当前块运动信息有关的MVp信息,也就是找到对当前块运动信息有联系有相关性的所有的MVp信息,存储到merge列表中对当前块给与参考。merge候选列表中编码块的不同分区之间的构造顺序为:上侧相邻块B1,左侧相邻块A1,右上侧相邻块B0,左下侧相邻块A0,左上侧相邻块B2,参考帧对应位置块col,历史参考块his,第一、第二候选MV的平均MV avg,以及零运动矢量0。
步骤S322,将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置。
这里,预设序号为排列在构造顺序中前几个的序号,在一些可能的实现方式中,首先,按照所述构造顺序,确定首个构造的分区;即,确定构造顺序中第一个需要构造的分区,即上侧相邻块B1;然后,确定所述首个构造的分区在所述当前块中的第一位置。即,将当前块的右上角确定为第一位置。
在一些实施例中,为使得划分的第一分区的候选块比第二分区的候选块更靠前,步骤S304可以通过以下多种方式实现:
方式一:
步骤S341,在所述当前块中的第二位置处,确定至少一个参考点。
这里,第二位置可以是当前块的右上角,比如,如图8所示,在第二位置801处,确定两个参考点81和82。
步骤S342,确定所述至少一个参考点与所述当前块中的分割线之间的距离之和。
在一些实施例中,分割线用于将当前块分割为多个分区,如图9所示,当前块901的分割线为902,确定当前块901的右上角的两个参考点到分割线的距离之和,一般在坐标系中,如果分割线在像素点的右侧,那么二者之间的距离为正,如果分割线在像素点的左侧,那么二者之间的距离为负。
步骤S343,如果所述距离之和大于等于预设数值,将所述当前块中与所述分割线之间的距离为正值的像素点所在的区域,确定为所述第一区域。
在一些实施例中,预设数值可以是0,如图8所示,如果两个参考点81和82与分割线的距离之和大于等于0,那么将则将正距离值所对应的分区判断为第一分区(即A分区(partFlip=1))。
这里,色度处理与亮度一致,运动矢量存储也与此处A、B分区一致。
或者具体实现为,最后计算加权和时,用表达式(2)计算最终结果:
wValue=weightSum>0?wValue:8-wValue;
pbSamples[x][y]=Clip3(0,(1<<BitDepth)-1,(predSamplesLA[x][y]*wValue+predSamplesLB[x][y]*(8-wValue)+offset1)>>shift1)  (2);
这里,色度处理与亮度按比例一致,而且运动矢量存储也与此处A、B分区一致。
步骤S344,如果所述距离之和小于所述预设数值,将所述当前块中与所述分割线之间的距离为负值的像素点所在的区域,确定为所述第一区域。
如图8所示,如果两个参考点81和82与分割线的距离之和小于0,那么将负距离值所对应的分区判断为第一分区(A分区)。
方式二:
步骤S351,确定所述当前块的GPM参数。
在本申请实施例中,所述当前块的GPM参数包括:角度索引信息和当前块的尺寸信息。
步骤S352,根据所述GPM参数,确定所述当前块中每一像素点的权重。
首先,根据所述当前块的尺寸信息,确定所述当前块内像素点的位置信息;比如,当前块中包括有很多像素点,编码器可以根据当前块的尺寸信息,确定出当前块内像素点的位置信息,基于该当前块内的每个像素点的位置信息,角度索引信息和更新角度映射表,就可以计算得到当前块内的每个像素点对应的权重索引了。
然后,根据所述角度索引信息、预设角度映射表和所述当前块内像素点的位置信息,确定出当 前块内像素点的权重。
在本申请实施例中,编码器根据余弦角度索引信息、正弦角度索引信息、更新角度映射表,分别结合当前块内像素点的位置信息,确定出当前块内像素点对应的权重索引的实现过程中,该编码器需要先根据余弦角度索引信息和正弦角度索引信息确定块中心点到当前分割线的垂直距离rho,再根据余弦角度索引信息、正弦角度索引信息、更新角度映射表、当前块内像素点的位置信息和rho,确定每个像素点的权重索引。
这里,确定当前块中每一个分量的权重预测像素值的过程如下,即为L、Cb、Cr三个分量推导加权预测像素值predSamples的过程为:
首先,对当前亮度块预测值进行计算。通过对预定义的权重矩阵裁剪获取当前亮度块的权重掩码矩阵,过程如下:
步骤一,权重矩阵的获取需要通过当前块以及当前块的划分模式去计算当前块的左上角对应于坐标原点的偏移值Offset(x,y),而坐标原点处于同样角度分割线穿过几何中心点的同样尺寸块的几何中心点,如图9所示,其中,背景903是根据限定条件,通过偏移值offset矢量,确定的最大尺寸块(64x64)相对该坐标系的最大移动范围(112x112)。如果分割线不经过块中心点,那么就保持分割线相对位置不动,移动该块在坐标系中的位置,从而得到恰当的分割。
下面是偏移值计算所需要用到的核心参数:
因为点(x1,y1)到线cosαx-sinαy=0的距离d=cosαx1-sinαy1;
首先,需要获取当前角度所对应的cos(α)中α的索引号displacementX,如表达式(3)所示,以及对应的-sin(α)=cos(α+π/2)对应的α+π/2的索引号displacementY如表达式(4)所示。
displacementX=angleIdx;       (3);
displacementY=(displacementX+8)%32;       (4);
构造预定义权重矩阵时所使用的步长仅仅为第一个步长(即分割线一定与块的中心点相交)。
A分区和B分区在码流中相关信息的传输是有先后顺序的。因此在两个分区的顺序安排上须遵循一定的原则,通过表达式(5)计算获得partFlip:
partFlip=(angleIdx>=13&&angleIdx<=27)?0:1    (5);
其中,partFlip为0,表示后续表达式(8)中得到的点与分割线之间的距离(weightIdx)为负值的一侧为A分区,分割线对侧为B分区;值为1时则相反,距离weightIdx为正值的一侧为A分区,负值一侧对应B分区。
通过下面表达式(6)和(7)计算获得关键参数shiftHor:
hwRatio=nH/nW     (6);
这里,即CU的高/CU的宽。
shiftHor=(angleIdx%16==8||(angleIdx%16!=0&&hwRatio>0))?0    (7);
其中,shiftHor的含义是在同一角度下不同分割线之间的位移方向的确定,如其值为0,分割线将在Y轴上偏移;其值为1,分割线将在X轴上偏移。
然后,根据当前预测块的尺寸和划分信息,用表达式(8)和(9)计算当前预测块的偏移值offsetX和offsetY:
如果shiftHor==0,当前块在垂直方向上存在跟块的高相关的偏移值。
offsetX=(-nW)>>1
offsetY=(-nH)>>1+angleIdx<16?(distanceIdx*nH)>>3:-((distanceIdx*nH)>>3)     (8);
其中,如果shiftHor==1,当前块在水平方向上存在跟块的宽相关的偏移值。
offsetX=(-nW)>>1+angleIdx<16?(distanceIdx*nW)>>3:-((distanceIdx*nW)>>3);
offsetY=(-nH)>>1     (9);
步骤二,通过像素点的位置计算当前像素点处的权重索引weightIdx,通过表达式(10)至(12)直接计算当前像素点处的权重值。
weightIdx=(((x*subW+offsetX)<<1)+1)*disLut[displacementX]+(((y*subH+offsetY)<<1)+1))*disLut[displacementY]     (10);
weightIdxL=partFlip?32+weightIdx:32–weightIdx     (11);
wValue=Clip3(0,8,(weightIdxL+4)>>3)      (12);
其中,使用的disLut[]如表2所示。subW和subH表示下采样率,如果是420格式,subW和subH都为2。亮度不需要下采样,色度权重是对亮度权重下采样得到的。
表2 多个分割线距离排列查找表
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
这里,weightIdxL越小,当前像素点距离分区边缘越近,该点处在A、B两分区上的权重分布越平均。
其次,对两个分区的单向预测值进行逐像素加权,得到最终的GPM预测块,具体加权的计算如表达式(13)所示:
pbSamples[x][y]=Clip3(0,(1<<BitDepth)-1,(predSamplesLA[x][y]*;
wValue+predSamplesLB[x][y]*(8-wValue)+offset1)>>shift1)    (13);
其中,offset1和shift1的计算过程如下,offset1用于四舍五入,shift1用于使得加权平均后的预测值恢复到与输入视频相同的比特深度,如表达式(14)和(15)所示:
shift1=Max(5,17-BitDepth)     (14);
offset1=1<<(shift1-1)      (15);
再次,对当前色度块(Cb和Ct)预测值的计算,过程如下:
通过获取每个2*2块的右上角的亮度样本权重直接作为当前(x,y)处的色度样本权重,即对亮度样本权重进行下采样。色度加权的计算也如表达式(13)所示。
在一些实施例中,为L、Cb、Cr三个分量推导加权预测像素值完成之后,需要对当前预测块GPM运动矢量进行存储,过程如下:
该存储过程是利用当前亮度块的运动掩码矩阵来实现的,预测值完全来自于A分区的,则记录A分区的运动矢量,完全来自于B分区的,记录B分区的运动矢量;否则同时记录两个分区的运动矢量。运动掩码的计算同计算亮度权重矩阵的过程基本一致,首先计算偏移值offset,该offset的计算如表达式(16)和表达式(17)所示:
如果shiftHor==0;
offsetX=(-cbWidth)>>1;
offsetY=((-cbHeight)>>1)+(angleIdx<16?(distanceIdx*cbHeight)>>3-((distanceIdx*cbHeight)>>3))     (16);
如果shiftHor==1;
offsetX=((-cbWidth)>>1+(angleIdx<16?(distanceIdx*cbWidth)>>3-((distanceIdx*cbWidth)>>3))?;
offsetY=(-cbHeight)>>1       (17);
其中,cbWidth和cbHeight分别是当前预测块对应的运动掩码矩阵的宽和高(也即当前块亮度分量的宽和高)。
当前预测块的运动掩码矩阵仍是以4×4子块为单位进行计算的,每个4×4子块中心位置(4i+2,4j+2)处的运动索引(motionIdx)的计算类似于如表达式(8)中weightIdx的计算,如表达式(18)所示:
motionIdx=(((4*xSbIdx+offsetX)<<1)+5)*disLut[displacementX]+(((4*ySbIdx+offsetY)<<1)+5)*disLut[displacementY]   (18);
其中,motionIdx为运动索引信息,当前块的左上角的像素点的位置信息(xSbIdx,ySbIdx),(xSbIdx,ySbIdx)表示每个4×4子块(subblock,sb)在当前CU中的子块坐标。坐标的范围为xSbIdx=0..numSbX 1和ySbIdx=0..numSbY 1。offsetX为运动横坐标偏移值,offsetY为运动纵坐标偏移值,DisLut[displacementX]为第一角度,DisLut[displacementY]为第二角度。
然后,再确定当前4x4的子块需要存储的MV信息。同预测加权时一样,需要首先确定当前子块处于A分区还是B分区的一侧,如表达式(19)所示:
partIdx=(angleIdx>=13&&angleIdx<=27)?0:1    (19);
其中,partIdx表示是否需要对两个分区进行翻转。
在一些实施例中,可以通过判断类型(sType)的值,来判断当前子块存储单向还是双向MV,如表达式(20)所示:
sType=abs(motionIdx)<32?2:(motionIdx<=0?partIdx:(1-partIdx))   (20);
根据每个4×4子块中心位置(4i+2,4j+2)处的motionIdx的绝对值(即abs(motionIdx))的 大小,来判断当前子块存储单向还是双向MV:
如果sType为2,当前块存储构造的双向MV;
否则,
如果sType为0,当前块存储第一个分区的MVA;
如果sType为1,当前块存储第二个分区的MVB;
这些存储下来的MV信息将用于后续编码块的MV预测。
在一些实施例中,编码器针对GPM预测模式相关语法的编码过程如下:
编码器中将GPM与其他帧间预测模式视为相互竞争的模式,依照率失真优化或其他策略在模式之间进行选择,将选择的结果以码流中语法元素的形式传送给解码端。即1)节中所述语法的写入操作。该过程与解析过程相反,首先得到的m和n这两个A、B分区各自在merge列表中所选择的参考选项位置信息,然后再依照如下方式对语法元素进行赋值:
merge_gpm_idx0[xCb][yCb]=m
merge_gpm_idx1[xCb][yCb]=n-(merge_gpm_idx1[xCb][yCb]>=m)?1:0
然后,再对其进行二值化、熵编码,从而最终写入码流传输。
步骤S353,如果所述至少一个参考点的权重值之和大于等于权重阈值,将所述当前块中确定像素点的权重为所述权重值之和的区域,确定为所述第一分区。
这里,权重阈值可以设定为8,如果两点权重之和大于8,则将目前权值所对应的分区判断为第一分区,即A分区;否则判断目前权值所对应的为第二分区,即B分区。
两点权重之和(WeightSum)的具体实现如下所示:
WeightSum=wValue[nCbW-1][0]+wValue[nCbW-2][0];
partFlip=WeightSum>8;或partFlip=WeightSum<=8?0:1;
其中,wValue指的是按照以下方法确定的值:
wValue=Clip3(0,8,(weightIdxL+4)>>3)
其中,weightIdxL可以表示为weightIdxL=32+weightIdx;
weightIdx可以表示为:
weightIdx=(((x*subW+offsetX)<<1)+1)*disLut[displacementX]+(((y*
subH+offsetY)<<1)+1))*disLut[displacementY];
步骤S355,如果所述至少一个参考点的权重值之和小于所述权重阈值,将所述当前块中像素点的权重为所述权重值之和的区域,确定为第二分区。
这里,如果权重阈值设定为8,两点权重之和小于8,判断目前权值所对应的为第二分区,即B分区。这样,通过结合Merge列表的构造顺序,将A分区选择merge列表中靠前的选项,而B分区选择其后面的选项,使得编码码率更低。
方式三:编码器根据角度序号,以及分割线与边界的交点位置来确定第一分区,实现过程如下所示:
当angleIdx为0~8时,weightIdx为正值的一边为A分区(partFlip=1)。
当angleIdx为8~15时,如果分割线与上边界不相交,weightIdx正值的一边为A分区(partFlip=1);如果分割线与上边界相交,weightIdx负值的一边为A分区(partFlip=0)。
当angleIdx为16~23时,weightIdx负值的一边为A分区(partFlip=0)。
当angleIdx为24~31时,如果分割线与上边界不相交,weightIdx负值的一边为A分区(partFlip=0);如果分割线与上边界相交:weightIdx正值的一边为A分区(partFlip=1)。
这里,色度处理与亮度按比例一致,而且运动矢量存储也与此处A、B分区一致。
方式四:通过设定的列表,把各种尺寸、各种模式下的A、B分区进行指定,如表3所示,当需要对当前块进行分区时,根据当前块的尺寸和表3即可获取该如何对当前块进行划分,即通过查表的方式即可实现,从而能够更加快捷方便且准确的实现当前块的分区。
表3 不同尺寸和模式下的分区指示表
Figure PCTCN2020083373-appb-000003
Figure PCTCN2020083373-appb-000004
方式五:修正GPM分区翻转一致性修改,将表达式(3)修改为:partFlip=(angleIdx>=13&&angleIdx<=27)?0:1;
将表达式(19)修改为:partIdx=(angleIdx>=13&&angleIdx<=28)?0:1;
修正后的分区分布图,如图10所示,图10为本申请实施例修正后的分区分布示意图,从图10可以看出,分区之后序号12和序号28的分区是相同的,解决了不同角度下GPM分区中对应块之间的分区不同的情况。
在本申请的一些实施例中,本申请实施例提供的一种帧间预测方法的步骤S306之后,该方法还可以包括:
第一步,将所述角度索引信息写入码流。
第二步,根据余弦角度索引信息、正弦角度索引信息、更新角度映射表,确定运动偏移值,以及根据角度索引信息、步长索引信息和当前块的尺寸信息,得到当前块对应的运动横坐标偏移值和运动纵坐标偏移值。
第三步,根据运动偏移值,运动横坐标偏移值、运动纵坐标偏移值、当前块的左上角的像素点的位置信息、余弦角度索引信息对应的第一角度、正弦角度索引信息对应的第二角度,得到运动索引信息。
第四步,当运动索引信息的绝对值小于预设运动索引阈值的一半时,将第一运动信息和第二运动信息确定为当前块的运动信息。
第五步,当运动索引信息小于等于0时,将第一运动信息确定为当前块的运动信息。
第六步,当运动索引信息大于0时,将第而运动信息确定为当前块的运动信息。
第七步,将当前块的运动信息存储在预设合并候选列表中。
在本申请实施例中,编码器在进行当前块的编码时,还需要将当前块的编码的运动信息存储起来,供后续的编码块进行帧间预测时使用。编码器根据余弦角度索引信息、正弦角度索引信息、更新角度映射表,计算出第一角度和第二角度,再基于第一角度和第二角度,得到运动偏移值;编码器根据运动偏移值,运动横坐标偏移值、运动纵坐标偏移值当前块的左上角的像素点的位置信息、余弦角度索引信息对应的第一角度、正弦角度索引信息对应的第二角度,得到运动索引信息;当运动索引信息的绝对值小于预设运动索引阈值的一半时,编码器将第一运动信息和第二运动信息确定为当前块的运动信息;当运动索引信息小于等于0时,编码器将第一运动信息确定为当前块的运动信息;当运动索引信息大于0时,编码器将第而运动信息确定为当前块的运动信息;将当前块的运动信息存储在预设合并候选列表中。
本申请实施例提供一种帧间预测方法,该方法应用于视频解码设备,即解码器。该方法所实现的功能可以通过视频解码设备中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该视频编码设备至少包括处理器和存储介质。
图11为本申请实施例一种帧内预测方法的实现流程示意图,应用于解码器,如图11所示,该方法包括:
步骤S1101,解析码流,确定当前块的预测解码参数。
步骤S1102,当预测解码参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置。
这里,首先,当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定预设候选列表中编码块的不同分区之间的构造顺序;然后,将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置;在一个具体例子中,按照所述构造顺序,确定首个构造的分区;确定所述首个构造的分区在所述当前块中的第一位置。
步骤S1103,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区。
步骤S1104,从所述当前块除所述第一分区之外的区域中,确定第二分区。
步骤S1105,确定所述第一分区的第一预测值和所述第二分区的第二预测值。
步骤S1106,对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
在本申请实施例中,解码器通过解析码流,确定当前块的预测解码参数;然后,结合候选列表中构造顺序,确定满足预设条件的分区在当前块中的第一位置;接下来,在当前块中,将与当前块的第一位置之间的距离小于预设距离的区域,确定为A分区;将所述当前块除所述第一分区之外的区域,确定为B分区;这样,就保证了A分区的候选比B分区的候选更靠前可以使得编码码率更低。最后,确定所述第一分区的第一预测值和所述第二分区的第二预测值;对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值;提高了预测的准确度。
在本申请的一些实施例中,解码器在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区的方式包括以下多种:
方式一:解码器首先,在所述当前块中的第二位置处,确定至少一个参考点;然后,确定所述至少一个参考点与所述当前块中的分割线之间的距离之和;如果所述距离之和大于等于预设数值,解码器将所述当前块中与所述分割线之间的距离为正值的像素点所在的区域,确定为所述第一区域。如果所述距离之和小于所述预设数值,解码器将所述当前块中与所述分割线之间的距离为负值的像素点所在的区域,确定为所述第一区域。
方式二:解码器首先确定所述当前块的GPM参数;然后,根据所述GPM参数,确定所述当前块中每一像素点的权重;如果所述至少一个参考点的权重值之和大于等于权重阈值,解码器将所述当前块中确定像素点的权重为所述权重值之和的区域,确定为所述第一分区。如果所述至少一个参考点的权重值之和小于所述权重阈值,解码器将所述当前块中像素点的权重为所述权重值之和的区域,确定为第二分区。
方式三:解码器根据角度序号,以及分割线与边界的交点位置来确定第一分区。
方式四:解码器通过设定的列表,把各种尺寸、各种模式下的A、B分区进行指定。
在本申请实施例中,解码器的S1101-S1106的实现与编码器侧的实现S301-S306的过程基本一致,这里不再赘述。
不同的是,解码器侧的当前块的预测解码参数和GMP参数都是从码流中解析出来的。而编码器则是自己获取的。
可以理解的是,解码器在进行帧间预测的过程中,可以根据预设候选列表中编码块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置;然后,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;这样,选取靠近右上角像素位置的分区作为A分区,这样A分区的候选比B分区的候选更靠前可以使得编码码率更低。利用这样的分区方式,对当前块进行AB分区,从而使得预测到的当前块的帧间预测值更加准确。
在本申请的一些实施例中,当前块的GPM参数包括:角度索引信息和当前块的尺寸信息;本申请实施例中确定所述当前块中每一像素点的权重的实现可以包括:
第一步,根据所述当前块的尺寸信息,确定所述当前块内像素点的位置信息。
第二步,根据所述角度索引信息、预设角度映射表和所述当前块内像素点的位置信息,确定出当前块内像素点的权重。
在本申请的一些实施例中,解码器可以根据角度索引信息,确定出余弦角度索引信息和正弦角 度索引信息;将预设角度映射表的角度进行降幂处理,得到更新角度映射表;根据余弦角度索引信息、正弦角度索引信息、更新角度映射表,分别结合当前块内像素点的位置信息,确定出当前块内像素点对应的权重索引。
如图12所示,本申请实施例提供一种编码器1,包括:
第一确定模块1201,用于确定当前块的预测模式参数;
第一指示模块1202,用于当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
第一划分模块1203,用于在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
第二划分模块1204,用于从所述当前块除所述第一分区之外的区域中,确定第二分区;
第二确定模块1205,用于确定所述第一分区的第一预测值和所述第二分区的第二预测值;
第一融合模块1206,用于对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
在本申请的一些实施例中,所述第一指示模块1202,还用于:当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定预设候选列表中编码块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置。
在本申请的一些实施例中,所述第一指示模块1202,还用于:按照所述构造顺序,确定首个构造的分区;确定所述首个构造的分区在所述当前块中的第一位置。
在本申请的一些实施例中,所述第一划分模块1203,还用于:在所述当前块中的第二位置处,确定至少一个参考点;确定所述至少一个参考点与所述当前块中的分割线之间的距离之和;如果所述距离之和大于等于预设数值,将所述当前块中与所述分割线之间的距离为正值的像素点所在的区域,确定为所述第一区域。
在本申请的一些实施例中,所述第一划分模块1203,还用于:如果所述距离之和小于所述预设数值,将所述当前块中与所述分割线之间的距离为负值的像素点所在的区域,确定为所述第一区域。
在本申请的一些实施例中,所述第一划分模块1203,还用于:确定所述当前块的GPM参数;根据所述GPM参数,确定所述当前块中每一像素点的权重;如果所述至少一个参考点的权重值之和大于等于权重阈值,将所述当前块中确定像素点的权重为所述权重值之和的区域,确定为所述第一分区。
在本申请的一些实施例中,所述第一划分模块1203,还用于:如果所述至少一个参考点的权重值之和小于所述权重阈值,将所述当前块中像素点的权重为所述权重值之和的区域,确定为第二分区。
在本申请的一些实施例中,所述当前块的GPM参数包括:角度索引信息和当前块的尺寸信息;所述第一划分模块1203,还用于:根据所述当前块的尺寸信息,确定所述当前块内像素点的位置信息;根据所述角度索引信息、预设角度映射表和所述当前块内像素点的位置信息,确定出当前块内像素点的权重。
在实际应用中,如图13所示,本申请实施例还提供了一种编码器,包括:第一存储器1301和第一处理器1302;所述第一存储器1301存储有可在第一处理器1302上运行的计算机程序,所述第一处理器1302执行所述程序时编码器侧的帧间预测方法。
可以理解的是,编码器在进行帧间预测的过程中,根据预设候选列表中编码块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置;然后,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;这样,选取靠近右上角像素位置的分区作为A分区,这样A分区的候选比B分区的候选更靠前可以使得编码码率更低。利用这样的分区方式,对当前块进行AB分区,从而使得预测到的当前块的帧间预测值更加准确。
如图14所示,本申请实施例提供一种解码器2,包括:第一解析模块1401,用于解析码流,确定当前块的预测解码参数;第二指示模块1402,用于当所述预测解码参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;第三划分模块1403,用于在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;第四划分模块1404,用于从所述当前块除所述第一分区之外的区域中,确定第二分区;第三确定模块1405,用于确定所述第一分区的第一预测值和所述第二分区的第二预测值;第二融合模块1406,用于对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
在本申请的一些实施例中,所述第二指示模块1402,还用于:当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定预设候选列表中编码块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置。
在本申请的一些实施例中,所述第二指示模块1402,还用于:按照所述构造顺序,确定首个构造的分区;确定所述首个构造的分区在所述当前块中的第一位置。
在本申请的一些实施例中,所述第三划分模块1403,还用于:在所述当前块中的第二位置处,确定至少一个参考点;确定所述至少一个参考点与所述当前块中的分割线之间的距离之和;如果所述距离之和大于等于预设数值,将所述当前块中与所述分割线之间的距离为正值的像素点所在的区域,确定为所述第一区域。
在本申请的一些实施例中,所述第三划分模块1403,还用于:如果所述距离之和小于所述预设数值,将所述当前块中与所述分割线之间的距离为负值的像素点所在的区域,确定为所述第一区域。
在本申请的一些实施例中,所述第三划分模块1403,还用于:确定所述当前块的GPM参数;根据所述GPM参数,确定所述当前块中每一像素点的权重;如果所述至少一个参考点的权重值之和大于等于权重阈值,将所述当前块中确定像素点的权重为所述权重值之和的区域,确定为所述第一分区。
在本申请的一些实施例中,所述第三划分模块1403,还用于:如果所述至少一个参考点的权重值之和小于所述权重阈值,将所述当前块中像素点的权重为所述权重值之和的区域,确定为第二分区。
在本申请的一些实施例中,所述第三划分模块1403,还用于:根据所述当前块的尺寸信息,确定所述当前块内像素点的位置信息;根据所述角度索引信息、预设角度映射表和所述当前块内像素点的位置信息,确定出当前块内像素点的权重。
在实际应用中,如图15所示,本申请实施例还提供了一种解码器,包括:第二存储器1501和第二处理器1502;所述第二存储器1501存储有可在第二处理器1502上运行的计算机程序,所述第二处理器1502执行所述程序时实现解码器侧的帧间预测方法。
可以理解的是,解码器在进行帧间预测的过程中,根据预设候选列表中编码块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置;然后,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;这样,选取靠近右上角像素位置的分区作为A分区,这样A分区的候选比B分区的候选更靠前可以使得编码码率更低。利用这样的分区方式,对当前块进行AB分区,从而使得预测到的当前块的帧间预测值更加准确。
相应的,本申请实施例提供了一种存储介质,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现编码器的帧间预测方法;或者,该计算机程序被第二处理器执行时,实现解码器的帧间预测方法。这里需要指出的是:以上存储介质和装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质和装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。以上所述,仅为本申请的实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
工业实用性
本申请实施例中,在帧间预测的过程中,可以根据预设候选列表中编码块的不同分区之间的构造顺序;将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置;然后,在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;从所述当前块除所述第一分区之外的区域中,确定第二分区;这样,选取靠近右上角像素位置的分区作为第一分区,这样第一分区的候选比第二区的候选更靠前可以使得编码码率更低。利用这样的分区方式,对当前块进行分区,从而使得预测到的当前块的帧间预测值更加准确。

Claims (21)

  1. 一种帧间预测方法,应用于编码器,所述方法包括:
    确定当前块的预测模式参数;
    当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在所述当前块中的第一位置;
    在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
    从所述当前块除所述第一分区之外的区域中,确定第二分区;
    确定所述第一分区的第一预测值和所述第二分区的第二预测值;
    对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
  2. 根据权利要求1所述的方法,其中,所述当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置,包括:
    当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定预设候选列表中编码块的不同分区之间的构造顺序;
    将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置。
  3. 根据权利要求1所述的方法,其中,所述将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置,包括:
    按照所述构造顺序,确定首个构造的分区;
    确定所述首个构造的分区在所述当前块中的第一位置。
  4. 根据权利要求1所述的方法,其中,所述在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区,包括:
    在所述当前块中的第二位置处,确定至少一个参考点;
    确定所述至少一个参考点与所述当前块中的分割线之间的距离之和;
    如果所述距离之和大于等于预设数值,将所述当前块中与所述分割线之间的距离为正值的像素点所在的区域,确定为所述第一区域。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    如果所述距离之和小于所述预设数值,将所述当前块中与所述分割线之间的距离为负值的像素点所在的区域,确定为所述第一区域。
  6. 根据权利要求4所述的方法,其中,所述在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区之前,所述方法还包括:
    确定所述当前块的GPM参数;
    根据所述GPM参数,确定所述当前块中每一像素点的权重;
    对应地,所述在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区,包括:
    如果所述至少一个参考点的权重值之和大于等于权重阈值,将所述当前块中确定像素点的权重为所述权重值之和的区域,确定为所述第一分区。
  7. 根据权利要求6所述的方法,其中,所述方法还包括:
    如果所述至少一个参考点的权重值之和小于所述权重阈值,将所述当前块中像素点的权重为所述权重值之和的区域,确定为第二分区。
  8. 根据权利要求6所述的方法,其中,所述当前块的GPM参数包括:角度索引信息和当前块的尺寸信息;所述根据所述GPM参数,确定所述当前块中每一像素点的权 重,包括:
    根据所述当前块的尺寸信息,确定所述当前块内像素点的位置信息;
    根据所述角度索引信息、预设角度映射表和所述当前块内像素点的位置信息,确定出当前块内像素点的权重。
  9. 一种帧间预测方法,应用于解码器,所述方法包括:
    解析码流,确定当前块的预测解码参数;
    当所述预测解码参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在所述当前块中的第一位置;
    在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
    从所述当前块除所述第一分区之外的区域中,确定第二分区;
    确定所述第一分区的第一预测值和所述第二分区的第二预测值;
    对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
  10. 根据权利要求9所述的方法,其中,所述当所述预测解码参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置,包括:
    当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定预设候选列表中编码块的不同分区之间的构造顺序;
    将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置。
  11. 根据权利要求10所述的方法,其中,所述将所述构造顺序中排列在预设序号的分区的位置,确定为所述第一位置,包括:
    按照所述构造顺序,确定首个构造的分区;
    确定所述首个构造的分区在所述当前块中的第一位置。
  12. 根据权利要求9所述的方法,其中,所述在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区,包括:
    在所述当前块中的第二位置处,确定至少一个参考点;
    确定所述至少一个参考点与所述当前块中的分割线之间的距离之和;
    如果所述距离之和大于等于预设数值,将所述当前块中与所述分割线之间的距离为正值的像素点所在的区域,确定为所述第一区域。
  13. 根据权利要求12所述的方法,其中,所述方法还包括:
    如果所述距离之和小于所述预设数值,将所述当前块中与所述分割线之间的距离为负值的像素点所在的区域,确定为所述第一区域。
  14. 根据权利要求12所述的方法,其中,所述在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区之前,所述方法还包括:
    确定所述当前块的GPM参数;
    根据所述GPM参数,确定所述当前块中每一像素点的权重;
    对应地,所述在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区,包括:
    如果所述至少一个参考点的权重值之和大于等于权重阈值,将所述当前块中确定像素点的权重为所述权重值之和的区域,确定为所述第一分区。
  15. 根据权利要求14所述的方法,其中,所述方法还包括:
    如果所述至少一个参考点的权重值之和小于所述权重阈值,将所述当前块中像素点的权重为所述权重值之和的区域,确定为第二分区。
  16. 根据权利要求15所述的方法,其中,所述当前块的GPM参数包括:角度索引 信息和当前块的尺寸信息;所述根据所述GPM参数,确定所述当前块中每一像素点的权重,包括:
    根据所述当前块的尺寸信息,确定所述当前块内像素点的位置信息;
    根据所述角度索引信息、预设角度映射表和所述当前块内像素点的位置信息,确定出当前块内像素点的权重。
  17. 一种编码器,其中,包括:
    第一确定模块,用于确定当前块的预测模式参数;
    第一指示模块,用于当所述预测模式参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
    第一划分模块,用于在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
    第二划分模块,用于从所述当前块除所述第一分区之外的区域中,确定第二分区;
    第二确定模块,用于确定所述第一分区的第一预测值和所述第二分区的第二预测值;
    第一融合模块,用于对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
  18. 一种解码器,其中,包括:
    第一解析模块,用于解析码流,确定当前块的预测解码参数;
    第二指示模块,用于当所述预测解码参数指示使用几何划分预测模式GPM确定当前块的帧间预测值时,确定满足预设条件的分区在当前块中的第一位置;
    第三划分模块,用于在所述当前块中,将与所述当前块的第一位置之间的距离小于预设距离的区域,确定为第一分区;
    第四划分模块,用于从所述当前块除所述第一分区之外的区域中,确定第二分区;
    第三确定模块,用于确定所述第一分区的第一预测值和所述第二分区的第二预测值;
    第二融合模块,用于对所述第一预测值和所述第二预测值进行加权融合,确定所述当前块的帧间预测值。
  19. 一种编码器,其中,包括:
    第一存储器和第一处理器;
    所述第一存储器存储有可在第一处理器上运行的计算机程序,所述第一处理器执行所述程序时实现权利要求1至8任一项所述帧间预测方法。
  20. 一种解码器,其中,包括:
    第二存储器和第二处理器;
    所述第二存储器存储有可在第二处理器上运行的计算机程序,所述第二处理器执行所述程序时实现权利要求9至16任一项所述帧间预测方法。
  21. 一种存储介质,其中,其上存储有计算机程序,该计算机程序被第一处理器执行时,实现权利要求1至8任一项所述帧间预测方法;或者,该计算机程序被第二处理器执行时,实现权利要求9至16任一项所述帧间预测方法。
PCT/CN2020/083373 2020-04-03 2020-04-03 帧间预测方法、编码器、解码器及存储介质 WO2021196235A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202080073861.6A CN114586366A (zh) 2020-04-03 2020-04-03 帧间预测方法、编码器、解码器及存储介质
PCT/CN2020/083373 WO2021196235A1 (zh) 2020-04-03 2020-04-03 帧间预测方法、编码器、解码器及存储介质
TW110109408A TW202139709A (zh) 2020-04-03 2021-03-16 幀間預測方法、編碼器、解碼器及儲存媒介

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/083373 WO2021196235A1 (zh) 2020-04-03 2020-04-03 帧间预测方法、编码器、解码器及存储介质

Publications (1)

Publication Number Publication Date
WO2021196235A1 true WO2021196235A1 (zh) 2021-10-07

Family

ID=77927567

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/083373 WO2021196235A1 (zh) 2020-04-03 2020-04-03 帧间预测方法、编码器、解码器及存储介质

Country Status (3)

Country Link
CN (1) CN114586366A (zh)
TW (1) TW202139709A (zh)
WO (1) WO2021196235A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422781A (zh) * 2022-03-29 2022-04-29 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
CN114598880A (zh) * 2022-05-07 2022-06-07 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
WO2023174426A1 (en) * 2022-03-18 2023-09-21 Mediatek Inc. Geometric partitioning mode and merge candidate reordering
WO2024012054A1 (zh) * 2022-07-15 2024-01-18 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230156181A1 (en) * 2021-11-17 2023-05-18 Mediatek Inc. Methods and Apparatuses for a High-throughput Video Encoder or Decoder
CN115379214B (zh) * 2022-10-26 2023-05-23 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120106627A1 (en) * 2009-06-26 2012-05-03 Thomson Licensing Methods and apparatus for video encoding and decoding using adaptive geometric partitioning
CN102611880A (zh) * 2011-01-19 2012-07-25 华为技术有限公司 标识图像块几何划分模式的编解码方法和设备
CN102790892A (zh) * 2012-07-05 2012-11-21 清华大学 深度图编码方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120106627A1 (en) * 2009-06-26 2012-05-03 Thomson Licensing Methods and apparatus for video encoding and decoding using adaptive geometric partitioning
CN102611880A (zh) * 2011-01-19 2012-07-25 华为技术有限公司 标识图像块几何划分模式的编解码方法和设备
CN102790892A (zh) * 2012-07-05 2012-11-21 清华大学 深度图编码方法及装置

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
H. GAO (HUAWEI), S. ESENLIK (HUAWEI), E. ALSHINA (HUAWEI), A. M. KOTRA (HUAWEI), B. WANG (HUAWEI), M. BLÄSER (RWTH-AACHEN), J. SAU: "CE4: CE4-1.1, CE4-1.2 and CE4-1.14: Geometric Merge Mode (GEO),", 16. JVET MEETING; 20191001 - 20191011; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-P0068-v2, 25 September 2019 (2019-09-25), Geneva CH, pages 1 - 7, XP030216132 *
S. ESENLIK (HUAWEI), H. GAO (HUAWEI), A. FILIPPOV, V. RUFITSKIY, A. M. KOTRA, B. WANG, E. ALSHINA (HUAWEI), M. BLÄSER (RWTH-AACHEN: "Non-CE4: Geometrical partitioning for inter blocks", 15. JVET MEETING; 20190703 - 20190712; GOTHENBURG; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 27 June 2019 (2019-06-27), Gothenburg SE, pages 1 - 9, XP030219715 *
Y. KIDANI (KDDI), K. KAWAMURA (KDDI), K. UNNO, S. NAITO (KDDI): "Non-CE4: On merge list generation for geometric partitioning", 17. JVET MEETING; 20200107 - 20200117; BRUSSELS; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 1 January 2020 (2020-01-01), Brussels BE, pages 1 - 6, XP030222641 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023174426A1 (en) * 2022-03-18 2023-09-21 Mediatek Inc. Geometric partitioning mode and merge candidate reordering
CN114422781A (zh) * 2022-03-29 2022-04-29 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
WO2023185351A1 (zh) * 2022-03-29 2023-10-05 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
CN114598880A (zh) * 2022-05-07 2022-06-07 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质
WO2024012054A1 (zh) * 2022-07-15 2024-01-18 深圳传音控股股份有限公司 图像处理方法、智能终端及存储介质

Also Published As

Publication number Publication date
TW202139709A (zh) 2021-10-16
CN114586366A (zh) 2022-06-03

Similar Documents

Publication Publication Date Title
WO2021196235A1 (zh) 帧间预测方法、编码器、解码器及存储介质
CN114868395A (zh) 采用几何分割进行帧间预测的高级语法
JP2023179747A (ja) オプティカルフローを用いた予測リファインメントに関する方法および装置
US11785208B2 (en) Prediction method for decoding and apparatus, and computer storage medium
US20230023856A1 (en) Inter prediction method, encoder, decoder, and storage medium
WO2021203841A1 (zh) 一种帧间预测方法、编码器、解码器及存储介质
WO2021203924A1 (zh) 编码方法、解码方法、编码器、解码器以及存储介质
WO2021196857A1 (zh) 帧间预测方法、编码器、解码器及计算机可读存储介质
CN116233466A (zh) 光流预测细化(prof)的方法和装置
US20230042640A1 (en) Inter prediction method, encoder, decoder, and storage medium
CN114342378A (zh) 关于利用光流的预测细化的方法和装置
WO2021238396A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
WO2021258841A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
CN114503561A (zh) 用于利用光流的预测细化、双向光流和解码器侧运动矢量细化的方法和装置
US20230045687A1 (en) Inter Prediction Method, Encoder, Decoder, and Storage Medium
US20230080546A1 (en) Inter Prediction Method, Encoder, Decoder and Storage Medium
CN113709498A (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
WO2022022278A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
WO2022061680A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质
WO2020258052A1 (zh) 图像分量预测方法、装置及计算机存储介质
CN113545090A (zh) 用于帧内子分区编解码模式的方法和设备
WO2023044916A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044917A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044918A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2022037344A1 (zh) 帧间预测方法、编码器、解码器以及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20929568

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20929568

Country of ref document: EP

Kind code of ref document: A1