CN113473141A - Inter prediction method, encoder, decoder, and computer-readable storage medium - Google Patents

Inter prediction method, encoder, decoder, and computer-readable storage medium Download PDF

Info

Publication number
CN113473141A
CN113473141A CN202010246244.3A CN202010246244A CN113473141A CN 113473141 A CN113473141 A CN 113473141A CN 202010246244 A CN202010246244 A CN 202010246244A CN 113473141 A CN113473141 A CN 113473141A
Authority
CN
China
Prior art keywords
curve
determining
prediction
offset
information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010246244.3A
Other languages
Chinese (zh)
Inventor
杨宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010246244.3A priority Critical patent/CN113473141A/en
Priority to PCT/CN2021/074252 priority patent/WO2021196857A1/en
Publication of CN113473141A publication Critical patent/CN113473141A/en
Pending legal-status Critical Current

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/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/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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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
    • 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
    • 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

Landscapes

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

Abstract

The embodiment of the application discloses an inter-frame prediction method, an encoder, a decoder and a computer readable storage medium, comprising: analyzing the code stream, and determining the predictive decoding parameter of the current block; determining a GPM mode parameter and curve partition information of the current block when the prediction decoding parameter indicates that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameter; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to the second reference block based on the GPM mode parameter and the curve partition information; determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.

Description

Inter prediction method, encoder, decoder, and computer-readable storage medium
Technical Field
Embodiments of the present application relate to video coding technology, and relate to, but are not limited to, an inter prediction method, an encoder, a decoder, and a computer readable storage medium.
Background
In the process of video coding and decoding and coding and decoding the current block, besides intra-frame prediction, an inter-frame prediction mode can be adopted. The inter prediction may include motion estimation and motion compensation, and for the motion compensation, an inter Geometric partition prediction Mode (GPM) may be adopted to divide the current block between frames into two non-rectangular partitions (or two blocks) for prediction and then perform weighted fusion, so as to obtain the prediction value of the current block.
Currently, in the prediction process of GPM, a rectangular block is divided into two blocks by a straight line. The geometric partition may be a partition coding unit or a partition prediction unit, and is herein collectively referred to as a block. Thus, the divided blocks have a triangular or trapezoidal shape. The straight line dividing the rectangular block into two blocks can have different angles and different positions, so that various combinations of triangles and trapezoids can be divided. Such geometric partitioning can bring the edge of the block closer to the edge of the object or to the edges of two partitions whose motion vectors are different, thereby improving the encoding performance.
However, such (straight) geometric partitioning cannot completely fit the edge of an object or the edges of two partitions with different motion vectors, and a transition is used for the edge region of the geometric partitioning, and for some scenes, such as the situation of existence of a large number of curves and arcs in a natural object, the straight partitioning is still too rigid, thereby affecting the performance of encoding and decoding.
Disclosure of Invention
Embodiments of the present application provide an inter-frame prediction method, an encoder, a decoder, and a computer-readable storage medium, which can improve encoding and decoding accuracy.
The technical scheme of the application is realized as follows:
the embodiment of the application provides an inter-frame prediction method, which is applied to a decoder and comprises the following steps:
analyzing the code stream, and determining the predictive decoding parameter of the current block;
determining GPM mode parameters and curve partition information of the current block when the prediction decoding parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM;
determining a first reference block and a second reference block based on the GPM mode parameters;
determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
The embodiment of the present application further provides an inter-frame prediction method, which is applied to an encoder, and includes:
determining a prediction mode parameter of a current block;
determining GPM mode parameters and curve partition information of the current block when the prediction mode parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM;
determining a first reference block and a second reference block based on the GPM mode parameters;
Determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
An embodiment of the present application provides a decoder, including:
the decoding unit is used for analyzing the code stream and determining the predictive decoding parameter of the current block;
a first determining unit for determining a GPM mode parameter and curve partition information of the current block when the prediction decoding parameter indicates that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameters; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
a first prediction unit for determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
An embodiment of the present application provides an encoder, including:
a second determining unit for determining a prediction mode parameter of the current block; determining GPM mode parameters and curve partition information of the current block when the prediction mode parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameters; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
A second prediction unit for determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
An embodiment of the present application further provides a decoder, including: a first processor and a first memory storing executable instructions for the first processor, the first memory being dependent on the first processor via a communication bus to perform operations, the executable instructions when executed by the first processor performing the inter prediction method of any of claims 1 to 18 above.
An embodiment of the present application further provides an encoder, including: a second processor and a second memory storing executable instructions for the second processor, the second memory being dependent on the second processor via a communication bus to perform operations, the executable instructions when executed by the second processor performing the inter prediction method of any of claims 19 to 42.
The embodiment of the application provides a computer readable storage medium, which stores executable instructions, when the executable instructions are executed by one or more first processors, the first processors execute the inter-frame prediction method on the decoder side; alternatively, when the executable instructions are executed by one or more second processors, the second processors perform the inter prediction method at the encoder side.
An embodiment of the present application provides an inter-frame prediction method, an encoder, a decoder, and a computer-readable storage medium, including: analyzing the code stream, and determining the predictive decoding parameter of the current block; determining a GPM mode parameter and curve partition information of the current block when the prediction decoding parameter indicates that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameter; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to the second reference block based on the GPM mode parameter and the curve partition information; determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter. That is to say, in the embodiment of the present application, the current block is predicted in the GPM mode by adopting a curve division manner, so that the divided boundary is more attached to the edge of the object or the edges of two portions with different motion vectors, thereby improving the accuracy of encoding and decoding.
Drawings
Fig. 1 is a block diagram illustrating a video coding system according to an embodiment of the present disclosure;
fig. 2 is a block diagram illustrating a video decoding system according to an embodiment of the present disclosure;
Fig. 3 is a schematic flowchart illustrating an implementation process of an inter-frame prediction method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a geometric partitioning method adopted by an exemplary VVC provided in an embodiment of the present application;
fig. 5 is a schematic view of a division angle of a geometric division of an exemplary VVC provided in an embodiment of the present application;
FIG. 6 is a diagram illustrating exemplary linear to curvilinear partition line transformations provided in accordance with embodiments of the present application;
fig. 7 is a first flowchart illustrating an implementation of another inter-frame prediction method according to an embodiment of the present disclosure;
fig. 8 is a schematic flow chart illustrating another implementation of an inter-frame prediction method according to an embodiment of the present application;
fig. 9 is a first schematic structural diagram of a decoder according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a decoder according to an embodiment of the present application;
fig. 11 is a first schematic structural diagram of an encoder according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of an encoder according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The present application provides a video coding system, as shown in fig. 1, the video coding system 11 includes:
A transform unit 111, a quantization unit 112, a mode selection and coding control logic unit 113, an intra prediction unit 114, an inter prediction unit 115 (including: motion compensation and motion estimation), an inverse quantization unit 116, an inverse transform unit 117, a loop filtering unit 118, an encoding unit 119, and a decoded image buffer unit 110; for an input original video signal, a video reconstruction block can be obtained by dividing a Coding Tree Unit (CTU), a Coding mode is determined by a mode selection and Coding control logic Unit 113, and then residual pixel information obtained by intra-frame or inter-frame prediction is transformed by a transformation Unit 111 and a quantization Unit 112, including transforming the residual information from a pixel domain to a transformation domain and quantizing the obtained transformation coefficient, so as to further reduce the bit rate; the intra-prediction unit 114 is configured to perform intra-prediction on the video reconstructed block; wherein, the intra prediction unit 114 is configured to determine an optimal intra prediction mode (i.e. a target prediction mode) of the video reconstructed block; inter-prediction unit 115 is to perform inter-prediction encoding of the received video reconstructed block relative to one or more blocks in one or more reference frames to provide temporal prediction information; wherein motion estimation is the process of generating motion vectors that can estimate the motion of the video reconstructed block, and then motion compensation is performed based on the motion vectors determined by motion estimation; after determining the inter prediction mode, the inter prediction unit 115 is also configured to supply the selected inter prediction data to the encoding unit 119, and also to send the calculated determined motion vector data to the encoding unit 119; furthermore, the inverse quantization unit 116 and the inverse transformation unit 117 are used for reconstruction of the video reconstruction block, reconstructing a residual block in the pixel domain, which removes blocking artifacts through the loop filtering unit 118, and then adding the reconstructed residual block to a predictive block in the frame of the decoded picture buffer unit 110 to generate a reconstructed video reconstruction block; coding section 119 is for coding various coding parameters and quantized transform coefficients. And the decoded picture buffer unit 110 is used to store reconstructed video reconstructed blocks for prediction reference. As the video coding proceeds, new reconstructed video blocks are generated, and these reconstructed video blocks are stored in the decoded picture buffer unit 110.
Fig. 2 is a schematic structural diagram of a video encoding system according to an embodiment of the present invention, and as shown in fig. 2, the video encoding system 12 includes:
a decoding unit 121, an inverse transform unit 127, and inverse quantization unit 122, intra prediction unit 123, motion compensation unit 124, loop filter unit 125, and decoded picture buffer unit 126; after the input video signal is coded by the video coding system 11, the code stream of the video signal is output; the code stream is input into the video decoding system 12, and first passes through the decoding unit 121 to obtain a decoded transform coefficient; the transform coefficients are processed by an inverse transform unit 127 and an inverse quantization unit 122 to produce a residual block in the pixel domain; intra-prediction unit 123 may be used to generate prediction data for a current video decoded block based on the determined intra-prediction direction and data from previously decoded blocks of the current frame or picture; motion compensation unit 124 is a predictive block that determines prediction information for a video decoded block by parsing motion vectors and other associated syntax elements and uses the prediction information to generate the video decoded block being decoded; forming a decoded video block by summing the residual block from inverse transform unit 127 and inverse quantization unit 122 with the corresponding predictive block generated by intra prediction unit 123 or motion compensation unit 124; the decoded video signal passes through the loop filtering unit 125 to remove blocking artifacts, which may improve video quality; the decoded video blocks are then stored in the decoded picture buffer unit 126, and the decoded picture buffer unit 126 stores reference pictures for subsequent intra prediction or motion compensation, and also for the output of the video signal, resulting in a restored original video signal.
The inter-frame prediction method provided by the embodiment of the present application mainly acts on the inter-frame prediction unit 215 of the video coding system 11 and the inter-frame prediction unit, i.e., the motion compensation unit 124, of the video decoding system 12; that is, if the video encoding system 11 can obtain a better prediction effect by the inter-frame prediction method provided in the embodiment of the present application, the video decoding recovery quality can be improved at the decoding end correspondingly.
Based on this, the technical solution of the present application is further elaborated below with reference to the drawings and the embodiments. Before the detailed description is given, it should be noted that "first", "second", "third", etc. are mentioned throughout the specification only for distinguishing different features, and do not have the functions of defining priority, precedence, size relationship, etc.
The embodiment of the application provides an inter-frame prediction method, which is applied to video decoding equipment, namely a decoder. The functions realized by the method can be realized by calling the program code by a first processor in the video decoding device, and the program code can be saved in a first memory.
Fig. 3 is a schematic flow chart illustrating an implementation of an inter-frame prediction method according to an embodiment of the present application, as shown in fig. 3, the method includes:
s101, analyzing the code stream, and determining the predictive decoding parameter of the current block.
And S102, when the prediction decoding parameter indicates that the inter prediction of the current block is determined using the GPM, determining the GPM mode parameter and the curve dividing information of the current block.
S103, determining a first reference block and a second reference block based on the GPM mode parameters.
S104, determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to the second reference block based on the GPM mode parameter and the curve partition information.
And S105, determining the predicted value of the current block based on the first prediction parameter and the second prediction parameter.
In the embodiment of the present application, in the decoding process of the decoder, information such as an encoding means used by the encoder when encoding, that is, a prediction decoding parameter for a current block, may be analyzed from the code stream, and based on the diversity of the current encoding manner, prediction modes decoded by the decoder may be diverse.
When the decoder analyzes the code stream to obtain the prediction decoding parameter and indicates that the GPM (general purpose memory) mode is used for determining the inter-frame prediction of the current block, the GPM mode parameter and the curve dividing information of the current block adopted in the encoding process are analyzed from the code stream by adopting the inter-frame prediction mode provided by the embodiment of the application.
The GPM mode parameter includes a partition mode of the GPM and motion-related information. The GPM here may have 64 partition modes.
In the embodiment of the present application, the decoder decodes the prediction mode of the current block, and if the current block uses the GPM, the GPM needs to decode the partition mode of the GPM. If the GPM uses a mask method, information of MVs used by two partitions of the current block or other GPM related information is decoded.
For the curve partitioning mode, the decoder may decode the curve partitioning usage flag in the code stream to directly determine, for example, if the curve partitioning usage flag is 1 (a token is used), then characterize the current block using curve partitioning, and may decode the translation amplitude transmitted in the code stream and/or the index of the curve shape, where the decoding order of the translation amplitude and the index of the curve shape may be reversed, and the embodiment of the present application is not limited. If the curve partition use flag is 0 (characterizing unused), decoding of the curve partition information is stopped.
In the embodiment of the application, for the curve partitioning mode, the decoder may decode the translation amplitude in the code stream to indirectly determine, and if the translation amplitude is not 0 (indicating that the curve partitioning mode is used), it indicates that curve partitioning is used, and continues to decode the curve shape index. If the translation amplitude is 0 (characterizing the curve partitioning mode is not used), decoding of the curve partitioning information is stopped. The decoding curve partition information, the GPM partition mode, the MV information used by the two partitions of the current block, or other information related to the GPM may be combined in various orders, which is not limited in the embodiments of the present application. The decoding mode of the GPM, the MV information used by the two partitions of the current block, or other information related to the GPM is not limited in this application.
It should be noted that, in the embodiment of the present application, a video image may be divided into a plurality of image blocks, each image block to be currently decoded may be referred to as a decoding block, where each decoding block may include a first image component, a second image component, and a third image component; and the current block is a decoding block to be subjected to prediction of a first image component, a second image component or a third image component in the video image.
Wherein, assuming that the current block performs the first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block may also be called a luminance block; alternatively, assuming that the current block performs the second image component prediction, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, the current block may also be referred to as a chroma block.
It should also be noted that the prediction mode parameter indicates the encoding mode of the current block and the mode-related parameter.
In this embodiment of the present application, the partition mode of the GPM may include: the angle index information may further include: step size index information, target partition mode, and the like, and the embodiments of the present application are not limited.
It should be noted that, at present, GPM geometric partitioning can partition any shape that can be calculated through a geometric function, and in consideration of application scenarios and implementation complexity, existing geometric partitioning methods divide a rectangular block into two blocks through a straight line. The geometric partition may be a partition coding unit (CU coding unit) or a partition prediction unit (PU prediction unit), and is herein collectively referred to as a current block. The divided blocks are triangular, rectangular or trapezoidal. The straight line dividing the rectangular block into two blocks can have different angles and different positions, so that various combinations of triangles, rectangles and trapezoids can be divided. Typically, a transition is applied to the edge region divided geometrically, for example, a gradual coefficient transition is applied to the divided edge by using a weighted average method, so that the divided edge is not too hard. The current VVC adopts a geometric partitioning method. It should be noted that, in the embodiment of the present application, the GPM performs weighted fusion after dividing an inter block (i.e., a current block) into two non-rectangular sub blocks for an edge portion of an object in an image, and performing prediction on the two non-rectangular sub blocks respectively. For example, the non-rectangular form may be as shown in FIGS. 4a-4i below.
As shown in fig. 5, the geometric division of the VVC divides the angle of the revolution into 32, and the offset of the line with respect to the center distance of the block can have 4 different values, one of which is 0, i.e., the line passes through the center of the block. The current VVC uses partial angles in 32 angles, the offset method is different according to the angles, and the mode that partial angles are overlapped with the existing divisions such as a binary tree, a ternary tree and the like is also eliminated.
In this embodiment of the present application, after the decoder acquires the GPM mode parameter and the curve partition information of the current block, the decoder may determine, based on the partition mode and the motion-related information of the GPM in the GPM mode parameter, that the first reference block and the second reference block correspond to different partitions have been determined, and then may determine, based on the GPM mode parameter and the curve partition information, that the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block correspond to each other.
In an embodiment of the present application, the first prediction parameter includes: a first weight value or first boundary position information; the second prediction parameters include: a second weight value or second boundary position information.
It should be noted that the first weight value and the second weight value are weight values corresponding to pixel points when GPM is divided by using a masking method, and the first boundary position information and the second boundary position information are boundary information of the first reference block and the second reference block.
In this embodiment of the present application, the decoder determines, based on the GPM mode parameter and the curve partition information, that the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block may be divided into two ways based on the difference of the prediction parameters, as follows:
the first method is as follows: the first prediction parameters include: a first weight value; the second prediction parameters include: a second weight value; the decoder determines preset weight distribution corresponding to the current GPM mode according to the GPM mode parameters; determining size information of a current block; updating the preset weight distribution according to the size information, the GPM mode parameters and the curve dividing information to obtain curve weight distribution; and obtaining a first weight value and a second weight value according to the curve weight distribution.
It should be noted that the curve dividing information includes: translation amplitude and curve shape index; the decoder determines the offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the preset weight of each pixel position in the preset weight distribution is offset by the offset amount, the updated curve weight of each pixel position is obtained, and thus the curve weight distribution is obtained.
The second method comprises the following steps: the first prediction parameters include: first boundary position information; the second prediction parameters include: second boundary position information; a decoder acquires size information of a current block; determining partition boundary position information based on the GPM mode parameters and the size information; shifting the dividing boundary position information according to the GPM mode parameter, the size information and the curve dividing information, and determining the curve dividing boundary position information; first boundary position information and second boundary position information are determined based on the curve-divided boundary position information.
It should be noted that the curve dividing information includes: translation amplitude and curve shape index; the decoder determines the offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the offset of the position of each pixel point of the boundary dividing position information is offset, the curve dividing boundary position information is obtained.
In the first mode, the preset weight distribution refers to an original mask corresponding to the GPM in the linear division mode, and the curve weight distribution is weight distribution information corresponding to the curve division mode, and is obtained by performing translation calculation and updating on the preset weight distribution. The decoder mainly updates preset weight distribution by adopting size information, GPM mode parameters and curve division information to obtain curve weight distribution, and obtains a first weight value corresponding to a first reference block and a second weight value corresponding to a second reference block of each pixel point of a current block in the curve weight distribution.
In some embodiments of the present application, the decoder determines the offset direction according to the angle information in the GPM mode parameters, and determines the offset to be offset according to the size information, the translation amplitude and the curve shape index.
In the second method, the decoder may adopt the pixel value of the first reference block as the first predicted value for the part of the first reference block, and adopt the pixel value of the second reference block as the second predicted value for the part of the second reference block, but at the boundary position, shift the pixel points on the respective boundary information of the first reference block and the second reference block to obtain the first boundary position information and the second boundary position information, and then predict the pixel points on the boundary based on the first boundary position information and the second boundary position information.
It should be noted that, a GPM mode parameter is adopted to divide the current block, and based on the size information of the current block, the dividing boundary position information of the current block can be obtained; at this time, the decoder determines the offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the position of each pixel point of the boundary dividing position information is offset by the offset, the curve dividing boundary position information is obtained.
In the embodiment of the present application, the decoder decodes the block partition information, and if the current block uses the GPM, the GPM needs to decode the partition mode of the GPM.
For example, if the GPM uses a method of dividing a CU or a PU, the boundary of the division is determined according to mode information and curve division information of the GPM, and the like. If the partition boundary determined according to the mode information of the GPM is boundary, (x)n,yn) Are points on the boundary. The decoder determines the boundary of the partition as boundary ', (x ') according to the pattern information, the curve partition information and the like of the GPM 'n,y′n) Are points on boundary'.
For the above implementation, in the embodiment of the present application, the implementation of determining the offset direction by the decoder according to the GPM mode parameter is as follows: when the angle used by the GPM mode parameter representation GPM meets the horizontal judgment condition, determining the offset direction as the horizontal direction; and when the angle used by the GPM mode parameter representation GPM meets the vertical and horizontal judgment condition, determining the offset direction as the vertical direction.
In some embodiments of the present application, the decoder determines the offset direction from the angle information in the GPM mode parameters.
In some embodiments of the present application, the vertical discrimination condition is that the angle is within a horizontal angle range; the horizontal and horizontal determination conditions are that the angle is within the range of the vertical angle, or the other conditions except the horizontal determination conditions are the vertical direction, and the determination conditions are not limited in the embodiments of the present application as long as the moving direction can be distinguished.
Illustratively, when the angle information in the GPM partition parameter, i.e. the angle is 4 to 12 excluding 12 or the angle is 20 to 28 excluding 28, the offset direction is a vertical direction, otherwise the offset direction is a horizontal direction, and the embodiment of the present application is not limited. That is, the vertical discrimination condition may be If ((angleIdx > -4 & & angleIdx <12) | (angleIdx > -20 & & angleIdx < 28)).
In the following, for the case of different offset modes, the decoder determines the description of the offset according to the size information, the translation amplitude and the curve shape index.
In the embodiment of the present application, the size information includes a length and a width of the current block.
When the offset direction is the horizontal direction, determining a first pixel position in a preset block in the non-offset direction of each pixel position according to the position, the length and the number of preset offset points of each pixel, wherein the non-offset direction is vertical to the offset direction; determining first curve information corresponding to the first pixel position according to the curve shape index; determining a first movement proportion based on the width and the number of preset offset points; and determining an offset according to the first curve information, the translation amplitude and the first movement proportion, wherein the offset does not exceed the width of the current block.
It should be noted that the number of the preset offset points is the number of the corresponding points to be offset in different curve partitioning modes, in this embodiment of the present application, the number of the preset offset points may be 64, which is not limited in this embodiment of the present application, and the larger the number of the preset offset points is, the better the curve partitioning is.
In the embodiment of the present application, when the offset direction is the horizontal direction, the non-offset direction is the vertical direction; when the offset direction is a vertical direction, the non-offset direction is a horizontal direction.
In the embodiment of the application, the decoder multiplies the first curve information by the translation amplitude and the first movement proportion to obtain the offset.
In some embodiments of the present application, the decoder determines, from each pixel position, the length and the number of preset offset points, that the implementation of the first pixel position located in the preset block in the non-offset direction at each pixel position is: determining a first scaling according to the position and length of each pixel and the number of preset offset points; determining a first sub-offset according to the length and the number of preset offset points; based on the first scaling and the first sub-offset amount, a first pixel position of each pixel position in the non-offset direction within the preset block is determined.
In the embodiment of the application, the decoder obtains a first scaling ratio by multiplying the ordinate of each pixel position by the ratio of the number of the preset offset points to the length, or obtains the first scaling ratio by using the logarithm of the base 2 of the length and the number of the preset offset points and the shift; the decoder obtains a first sub-offset according to the number of the preset offset points and the length (2 x); finally, the decoder adds the first scaling and the first sub-offset to obtain the first pixel position. The number of the preset offset points may be 64, 32, 16, 8, etc., and the embodiments of the present application are not limited thereto.
Illustratively, assume that the decoder obtains a mask P' (CURVE weight distribution) according to a translation amplitude and a CURVE shape used by CURVE division and the mask P (preset weight distribution), the translation amplitude is assumed to be curramplitude, a CURVE shape index used by translation is assumed to be curridx, a total number of CURVE shapes NUM _ CURVE, and an LUT (CURVE information) is currfactor [ NUM _ CURVE ] [ N ], where N is equal to or greater than N. Let the width of the current block be width, the length be height, and the angle used by GPM be angle.
If the current block uses the horizontal direction, P' of each pixel point (x, y) is as shown in equation (1), as follows:
P’[x][y]=P[x-offsetX][y] (1)
Wherein, the offset is an offset. The offset is obtained for equation (2) as follows:
offsetX=curveFactor[curveIdx][yN]*curveAmplitude*Scale1 (2)
here, curveFactor [ curveIdx ]][yN]For the first curve information, currevamplude is the translation amplitude, and Scale1 is the first shift ratio.
Here, the first shift ratio is obtained by equation (3), yNThe following is obtained for equation (4):
Scale1=width/N (3)
yN=y*N/height+offset1 (4)
where offset1 is the first sub-offset, determined by equation (5), as follows:
Offset1=N/(2*height) (5)
it should be noted that x-offset x does not exceed the range of the normal current block, such as 0-width-1.
In some embodiments of the present application, when the offset direction is a vertical direction, the decoder determines, according to each pixel position, the width, and the number of preset offset points, a second pixel position located in a preset block in a non-offset direction at each pixel position, wherein the non-offset direction is perpendicular to the offset direction; determining second curve information corresponding to the second pixel position according to the curve shape index; determining a second movement proportion based on the length and the number of the preset offset points; and determining an offset according to the second curve information, the translation amplitude and the second movement proportion, wherein the offset does not exceed the length of the current block.
In the embodiment of the present application, the decoder multiplies the second curve information by the translation amplitude and the second movement ratio to obtain the offset.
In some embodiments of the present application, the decoder determines, from each pixel position, the width and the number of preset offset points, that in the non-offset direction at each pixel position, the implementation of the second pixel position located in the preset block is: the decoder determines a second scaling according to the position, the width and the number of the preset offset points of each pixel, and determines a second sub-offset according to the width and the number of the preset offset points; and determining a second pixel position of each pixel position in the non-offset direction in the preset block based on the second scaling and the second sub-offset amount.
In the embodiment of the present application, the decoder obtains the second scaling ratio by multiplying the abscissa of each pixel position by the ratio of the number of the preset offset points to the width, or obtains the second scaling ratio by using the logarithm of the base 2 of the width and the number of the preset offset points and the shift; the decoder obtains a second sub-offset according to the number and (2 x width) of the preset offset points; finally, the decoder adds the second scaling and the second sub-offset to obtain a second pixel location.
Illustratively, assume that the decoder obtains a mask P' (CURVE weight distribution) according to a translation amplitude and a CURVE shape used by CURVE division and the mask P (preset weight distribution), the translation amplitude is assumed to be curramplitude, a CURVE shape index used by translation is assumed to be curridx, a total number of CURVE shapes NUM _ CURVE, and an LUT (CURVE information) is currfactor [ NUM _ CURVE ] [ N ], where N is equal to or greater than N. Let the width of the current block be width, the length be height, and the angle used by GPM be angle.
If the current block uses the vertical direction, P' of each pixel point (x, y) is as shown in equation (6), as follows:
P’[x][y]=P[x][y-offsetY] (6)
wherein, offset is offset. The offset is obtained for equation (7) as follows:
offsetX=curveFactor[curveIdx][xN]*curveAmplitude*Scale2 (7)
here, curveFactor [ curveIdx ]][xN]For the second curve information, currevamplude is the translation amplitude, and Scale2 is the second shift ratio.
Here, the second shift ratio is obtained by equation (8), xNThe following is obtained for equation (9):
Scale2=height/N (8)
xN=x*N/width+offset2 (9)
where offset2 is the second sub-offset amount, determined by equation (10), as follows:
offset2=N/(2*width) (10)
it should be noted that y-offset does not exceed the range of the normal current block, such as 0-height-1.
Based on the two offset directions, the offset process expressed by adopting another expression mode is as follows:
If((angleIdx>=4&&angleIdx<12)||(angleIdx>=20&&angleIdx<28))
offsetCX=0
offsetCY=curveFactor[curveIdx][xL*N/nW+N/2nW]*curveAmplitude*nH/NOtherwise(shiftHor is equal to 1),the following applies:
offsetCX=curveFactor[curveIdx][yL*N/nH+N/2nH]*curveAmplitude*nW/N
offsetCY=0
where nW is the width, nH is the length, offsetCX is offsetX, offsetCY is offsetY, and angleIdx is the angle index.
In some embodiments of the present application, the decoder may further determine, according to the translation amplitude and the curve shape used for curve division, a position (x ', y') of each pixel (x, y) of the current block on a preset weight distribution, and then temporarily calculate, when calculating predSamples [ x ] [ y ] for each pixel (x, y), a required P [ x '] [ y' ] based on the preset weight distribution, the offset direction, and the offset amount.
Illustratively, if the current block uses the horizontal direction, x '-x-offset x, y' -y
If the current block uses the vertical direction, x '═ x, y' ═ y-offset y
Wherein offset x and offset y are obtained in the same manner as above.
It should be noted that in the embodiment of the present application, the decoder may calculate the mask P first, and then calculate predSamples [ x ] [ y ] for each point (x, y). It is also possible to calculate the required P [ x ] [ y ] temporarily while calculating predSamples [ x ] [ y ] for each point (x, y). In this case, the required P [ x '] [ y' ] is calculated temporarily at the time of calculating predSamples [ x ] [ y ] for each point (x, y) using a curve division method, and the present embodiment is not limited, and the final object is consistent.
After the decoder obtains the first weight value and the second weight value in the first mode, the decoder can determine the predicted value of the current block according to the first weight value, the first pixel value of the first reference block, and the second weight value in combination with the second pixel value of the second reference block.
In the embodiment of the application, the decoder performs weighted sum on the first weight value, the first pixel value of the first reference block, the second weight value and the second pixel value of the second reference block to obtain the prediction value of the current block.
Illustratively, let the pixel value of the first reference block at the (x, y) position be predSamplesLA [ x ] [ y ], the pixel value of the second reference block at the (x, y) position be predSamplesLB [ x ] [ y ], the decoder obtains a mask P mask matrix according to the GPM partition pattern, where each pixel position (x, y) on the mask has a value P [ x ] [ y ] that identifies the weight of the first reference block (x, y), M is the sum of the weights of the corresponding positions of the two reference blocks, and the weight of the second reference block (x, y) is M-P [ x ] [ y ]. The decoder obtains the mask P' according to the translation amplitude and curve shape used by curve division and the mask P.
This is that the prediction value of one pixel (x, y) of the current block is shown in equation (11):
predSamples[x][y]=(P’[x][y]*predSamplesLA[x][y]+(M-P’[x][y])*predSamplesLB
[x][y])/M (11)
wherein predSamples [ x ] [ y ] is a prediction value of a pixel point (x, y) of the current block.
It should be noted that M may be a power of 2 integers, such as 4, 8, 16, etc., so that the division in the equation can be written in a right-shifted form. If predSamples [ x ] [ y ] exceeds the normal value range, the predSamples [ x ] [ y ] needs to be processed within the value range, and the application is not limited herein.
After the decoder obtains the first boundary position information and the second boundary position information in the second mode, the decoder determines that the prediction value of the current block is realized as follows based on the first prediction parameter and the second prediction parameter: the decoder divides the current block according to the first boundary position information and the second boundary position information to obtain a first block and a second block; the first block is predicted based on first pixel values of a first reference block, and the second block is predicted based on second pixel values of a second reference block, thereby determining a prediction value of the current block.
It can be understood that, the decoder predicts the current block by adopting a curve division mode in the GPM mode, so that the divided boundary is more attached to the edge of an object or the edges of two portions with different motion vectors, thereby improving the precision of encoding and decoding.
It should be noted that, after obtaining the prediction block of the current block, the decoder decodes the residual information of the current block, including the decoding coefficient, inverse quantization and inverse transformation are performed to obtain a residual block, and the residual block is added to the prediction block to obtain a decoded block of the current block.
The method adopts a curve dividing mode during inter-frame prediction provided by the embodiment of the application.
In the embodiment of the application, the curve dividing information is a dividing mode in curve dividing; the curve division is realized by translating pixel points on a direct dividing line in the preset straight line geometric division to obtain a continuous curve dividing line.
In some embodiments of the present application, each pixel point of the linear division line is continuously translated in the same moving direction according to different moving distances to obtain a curve division line; or, each pixel point of the straight line dividing line is continuously translated according to different motion vectors to obtain a curve dividing line.
That is, points on a straight line segment (the straight lines are line segments) translate in the same direction, the translation distances of each point are not the same, the moving distances of adjacent points are not greatly different, and a curve segment can be obtained by keeping the line continuous. Or translating the points on one straight line segment, wherein the translation vectors of each point are different, the difference of the moving vectors of adjacent points is small, the continuity of the line is kept, and a curve segment can be obtained. For video coding and decoding, straight lines are all composed of points with pixel positions on the same straight line or on the same approximate straight line, the points are translated according to the same direction, the translation distance of each point is different, and the moving distance of adjacent points meets certain requirements, so that a curve segment can be obtained. The points are translated, the translation vectors of each point are different, and the moving distance of adjacent points meets certain requirements, so that a curve segment can be obtained.
For example, as shown in fig. 6, the transformation diagram from a straight line to a curved line, the point on the boundary line of two blocks in the geometric division is translated by the arrow shown in the above diagram, the boundary line may become a curved line segment, and the straight line division may become a curved line division. By translating the points on the transition region near the dividing line as described above, the transition region of the straight line segment can be changed into the transition region of the curved line segment. For the mask-implemented geometric partitioning method, the values of the points on the mask are translated as described above, and the linear geometric partitioning mask can be changed into a curved geometric partitioning mask.
In some embodiments of the present application, the moving distance is a distance between the corresponding pixel position on the preset curve shape and the straight dividing line; the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
It should be noted that in the embodiment of the present application, an lut (look up table) storage curve may be used to divide a corresponding preset vector or preset distance.
In the embodiment of the present application, assuming that all points move in the same direction (horizontal direction, vertical direction, or some other angular direction), the LUT stores the moving distances of a plurality of points for a curved shape, and one or more curved shapes can be stored in the LUT. The curve shape is the shape of the curve itself, and a curve obtained by translating a straight line in a certain direction in the direction of the curve is not necessarily the same as the shape of the curve itself. If the divided line segment is translated according to a certain curve shape, each point on the line segment finds a corresponding position in the corresponding curve shape in the LUT, and moves according to the indicated moving distance in a given direction, so that the point can be limited not to exceed a certain boundary after moving. In this case, when the linear mask is changed to the curved mask, the shift direction is determined, and then the values of different points on the mask perpendicular to the shift direction are shifted by the shift distance of the corresponding position on the LUT, and the values of the points on the mask in the same shift direction are shifted by the same shift distance. It can be understood that the mask divided for the new curve is obtained with reference to the mask divided for the straight line.
In some embodiments of the present application, the values of the points that are out of the desired range are discarded, or the values of the points may be limited from moving beyond a certain boundary. While the missing points have values that complement the original values of the edges of the valid range.
In some embodiments of the present application, the values of the points of the curved divided mask are found from the straight divided mask in the opposite direction of the direction and distance in which it should move, and if the point to be found exceeds a valid limit, it is replaced by the value of the point on the limit on the same straight line as the direction of movement.
In some embodiments of the present application, the LUT stores motion vectors for points for a curve shape, and one or more curve shapes may be stored in the LUT, assuming that not all points move in the same direction. If the divided line segment is to be translated according to a certain curve shape, each point on the line segment finds a corresponding position in the corresponding curve shape in the LUT, and moves according to the indicated movement vector. Due to the discontinuity caused by the movement, it may be necessary to supplement the points at the location of the discontinuity to maintain the continuity of the curve. If a linear mask is to be changed into a curved mask, the shift direction is determined, and then the values of different points in a certain direction on the mask are shifted according to the shift vector of the corresponding position on the LUT, so as to compensate the values of the points at the positions where the points are discontinuous. The values of the points on the mask in the same vertical direction as the above direction are shifted by the same shift vector. The values of the points are supplemented where the discontinuity is created. The values of the points that are out of the desired range are discarded, or the values of the points may be limited to moving without exceeding a certain boundary. While the missing points have values that complement the original values of the edges of the desired range.
In some embodiments of the present application, the direction of movement is formed by a combination of a horizontal direction and a vertical direction; alternatively, the moving direction is related to the dividing direction of the GPM.
In some embodiments of the present application, when the movement distance is not a full pixel, interpolation or rounding processing is performed on the divided pixel position; or, the moving distance is positively correlated with the length of the current block; alternatively, the moving distance is positively correlated with the smallest value among the length and the width of the current block.
In some embodiments of the present application, the moving direction may be a horizontal direction or a vertical direction, or any other directions. Assuming that the direction of movement is not horizontal or vertical, it can be split into horizontal plus vertical movements.
Illustratively, a movement of 2 pixels in the 45 ° direction may be split into a horizontal 0 ° direction movement
Figure BDA0002434051960000081
One pixel distance plus vertical 90 ° direction shift
Figure BDA0002434051960000082
A pixel distance.
In the embodiment of the present application, for the case that the moving distance is not integer pixel, one possible implementation is to take approximate integer pixel position, such as integer operation, and one possible implementation is to interpolate pixel position.
In an exemplary manner, the first and second electrodes are,
Figure BDA0002434051960000083
the one-pixel distance may be approximately 1-pixel distance or 2-pixel distance, or 1.5-pixel distance or 1.4-pixel distance. The value of the 1.5 pixel distance or the 1.4 pixel distance needs to be interpolated. Other angles may also be split into horizontal and vertical movements according to trigonometric functions or pre-calculated ratios. The horizontal movement direction may represent the 180 ° direction by positive values for 0 ° direction negative values, and the vertical movement direction may represent the 270 ° direction by positive values for 90 ° direction negative values.
In the embodiment of the present application, one possible implementation is to use only the horizontal movement direction plus the vertical movement direction; one possible implementation is to use only the horizontal movement direction plus the vertical movement direction plus the movement directions of 45 °, 135 °, 225 °, 315 °. The moving directions of 45 degrees, 135 degrees, 225 degrees and 315 degrees can be decomposed into movements with equal numerical values in the horizontal and vertical directions, and 4 degrees can be represented by signs in the horizontal and vertical directions; one possible implementation is to use multiple angular orientations.
It should be noted that the moving direction may be related to the dividing direction of the GPM. In the case of only horizontal and vertical movements, the curved division uses the vertical movement direction if the straight line angle used by the GPM straight line division is horizontal or nearly horizontal, and the curved division uses the horizontal movement direction if the straight line angle used by the GPM straight line division is vertical or nearly vertical. More generally, some thresholds may be set, and the angle or division pattern used in the straight line angle or division uses the horizontal movement direction in a certain threshold range, and uses the vertical movement direction in another range. In the same principle, in the case of using only the horizontal movement direction plus the vertical movement direction plus the movement directions of 45 °, 135 °, 225 °, 315 ° or using a plurality of movement directions, the range of use for each movement direction is discriminated at the straight line angle or the angle of divisional use or the division pattern setting threshold range.
It should be noted that the moving distance and the length and width of the current block may have a relationship. One possible implementation is that the distance of movement is proportional to the length of the current block in the same direction as the current direction of movement. For example, if the length of the current block in the same direction as the current moving direction is 64, the distance that all points of the current block move is the value that it finds in the LUT. If the current block has a length of 32 in the same direction as the current moving direction, the distance that all points of the current block move is 1/2 which is the value it finds in the LUT. One possible implementation is that the distance moved is proportional to the shorter length of the current block.
In the embodiment of the present application, different translation amplitudes, i.e., 1/4 times, 1/2 times, 1 time, 2 times, etc., may be set. If the current block is chosen 1/4 times, then all the points of the current block have moved a distance 1/4 times the distance they have moved as found in the LUT. The translation amplitude may be 0 times, i.e. all points of the current block are moved by 0, when in fact the curve division does not play a role. A negative translation amplitude indicates that the direction of movement is performed in the reverse direction of the original direction.
That is, the translation magnitude is a multiple relation of the actual movement distance or movement vector, or an equal ratio relation.
In some embodiments of the present application, not all points to be offset may be translated in the same direction. The points on a straight line segment can be translated, the translation vectors of each point are different, the moving vectors of adjacent points are not greatly different, the continuity of the line is kept, and a curve segment can also be obtained.
For video coding and decoding, straight lines are all composed of points with pixel positions on the same straight line or on the same approximate straight line, the points are translated according to the same direction, the translation distance of each point is different, and the moving distance of adjacent points meets certain requirements, so that a curve segment can be obtained. The points are translated, the translation vectors of each point are different, and the moving distance of adjacent points meets certain requirements, so that a curve segment can be obtained.
Assuming that not all points move in the same direction, the LUT stores motion vectors for several points for a curve shape (information about one or more curve shapes may be stored in the LUT). If the divided line segment is to be translated according to a certain curve shape, each point on the line segment finds a corresponding position in the corresponding curve shape in the LUT, and moves according to the indicated movement vector. Due to the discontinuity caused by the movement, it may be necessary to supplement the points at the location of the discontinuity to maintain the continuity of the curve. If a linear mask is to be changed into a curved mask, the shift direction is determined, and then the values of different points in a certain direction on the mask are shifted according to the shift vector of the corresponding position on the LUT, so as to compensate the values of the points at the positions where the points are discontinuous. The values of the points on the mask in the same vertical direction as the above direction are shifted by the same shift vector. The values of the points are supplemented where the discontinuity is created. The values of the points beyond the desired range are discarded, or the values of the points are limited to be shifted so as not to exceed a certain boundary, and the missing values are supplemented with the original values of the edges of the desired range.
In embodiments of the present application, the LUT is used to determine the distance of translation or translation vector.
It can be understood that, by using the translation method to implement the curve geometric partitioning, the partitioned boundary can be made more flexible and more fit the edge of the object or the edges of two portions with different motion vectors, thereby improving the encoding performance, and the translation method has low complexity in implementing the curve geometric partitioning and is easy to implement.
The embodiment of the application provides an inter-frame prediction method, which is applied to a video coding device, namely an encoder. The functions implemented by the method may be implemented by a second processor in the video coding device calling the program code, although the program code may be stored in a second memory, and it is seen that the video coding device comprises at least the second processor and the second memory.
Fig. 7 is a schematic flowchart illustrating an implementation flow of an inter-frame prediction method according to an embodiment of the present application, as shown in fig. 7, the method includes:
s201, determining the prediction mode parameter of the current block.
S202, when the prediction mode parameter indicates that the inter-frame geometric partition prediction mode GPM is used for determining the inter prediction of the current block, determining the GPM mode parameter and curve partition information of the current block.
S203, determining a first reference block and a second reference block based on the GPM mode parameter.
S204, determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to the second reference block based on the GPM mode parameter and the curve partition information.
S205, determining the prediction value of the current block based on the first prediction parameter and the second prediction parameter.
In this embodiment of the present application, a video image may be divided into a plurality of image blocks, and each image Block to be currently encoded may be referred to as a Coding Block (CB), where each Coding Block may include a first image component, a second image component, and a third image component; and the current block is an encoding block of the video image which is currently subjected to prediction of a first image component, a second image component or a third image component.
Wherein, assuming that the current block performs the first image component prediction, and the first image component is a luminance component, that is, the image component to be predicted is a luminance component, then the current block may also be called a luminance block; alternatively, assuming that the current block performs the second image component prediction, and the second image component is a chroma component, that is, the image component to be predicted is a chroma component, the current block may also be referred to as a chroma block.
In some embodiments of the present application, the implementation of the encoder to determine the prediction mode parameters of the current block is: the encoder determines a component of the current block to be predicted; on the basis of the parameters of the current block, respectively carrying out predictive coding on the components of the to-be-predicted image by utilizing multiple prediction modes, and calculating a rate distortion cost result corresponding to each prediction mode in the multiple prediction modes; and selecting a minimum rate distortion cost result from the plurality of rate distortion cost results obtained by calculation, and determining a prediction mode corresponding to the minimum rate distortion cost result as a prediction mode parameter of the current block.
It should be noted that the prediction mode parameter indicates the encoding mode of the current block and the mode-related parameter. The prediction mode parameters of the current block may be determined in a Rate Distortion Optimization (RDO) manner in general.
In some embodiments of the present application, the implementation of the encoder to determine the prediction mode parameters of the current block is: the encoder determines a component of the current block to be predicted; on the basis of the parameters of the current block, respectively carrying out predictive coding on the components of the to-be-predicted image by utilizing multiple prediction modes, and calculating a rate distortion cost result corresponding to each prediction mode in the multiple prediction modes; and selecting a minimum rate distortion cost result from the plurality of rate distortion cost results obtained by calculation, and determining a prediction mode corresponding to the minimum rate distortion cost result as a prediction mode parameter of the current block.
That is, on the encoder side, a plurality of prediction modes can be employed for the current block to encode the image components to be predicted, respectively. Here, the multiple Prediction modes generally include an inter-frame Prediction mode, a conventional Intra-frame Prediction mode, and a non-conventional Intra-frame Prediction mode, where the conventional Intra-frame Prediction mode may include a Direct Current (DC) mode, a PLANAR (plan) mode, an angular mode, and the like, the non-conventional Intra-frame Prediction mode may include a MIP mode, a Cross-component Linear Model Prediction (CCLM) mode, an Intra Block Copy (IBC) mode, a plt (pattern) mode, and the like, and the inter-frame Prediction mode may include: inter-frame geometric partition prediction mode (GPM), Triangle Prediction Mode (TPM), and the like. In the embodiment of the present application, a curve division mode is further included, where in the embodiment of the present application, all curve division information of curve division is stored in the LUT.
Therefore, after the current block is respectively coded by utilizing a plurality of prediction modes, a rate distortion cost result corresponding to each prediction mode can be obtained; then selecting a minimum rate distortion cost result from the obtained multiple rate distortion cost results, and determining a prediction mode corresponding to the minimum rate distortion cost result as a prediction mode parameter of the current block; in this way, the current block can be encoded using the determined prediction mode, and in such a prediction mode, the prediction residual can be made small, enabling an improvement in encoding efficiency.
In the embodiment of the present application, since there may be a plurality of prediction modes, and there may be a plurality of specific partition modes in one prediction mode, it is necessary to traverse all prediction modes first, and then traverse the partition modes for each prediction mode. The multiple prediction modes in the embodiment of the application include a GPM mode, and the application is realized in a scene based on the GPM prediction mode.
In this embodiment of the application, when the multiple prediction modes include the GPM mode, the process of the encoder calculating the rate-distortion cost result corresponding to the GPM prediction mode may be: an encoder acquires a motion related information set corresponding to a current block; and traversing each motion related information in the motion related information set by adopting each GPM partitioning mode in the GPM partitioning modes, and traversing each GPM mode by adopting a curve partitioning mode to obtain a rate-distortion cost result corresponding to the GPM prediction mode.
It should be noted that each motion-related information may be two MVs, and the embodiment of the present application is not limited thereto. The motion related information is stored in the merge list.
In the embodiment of the present application, if the encoder uses a masking method when performing GPM partitioning, the encoder will determine whether the current block uses GPM and curve partitioning. One possible approach is to traverse all possible mv combinations (motion related information sets) for the current block, traverse all possible GPM partition modes for each mv combination, traverse all curve partition modes for each GPM partition mode, including all translation amplitudes and curve shapes. And obtaining the actual coding cost (rate distortion cost result) for each possible situation, and taking the GPM partition mode and the curve partition mode corresponding to the optimal coding cost (namely the minimum rate distortion cost result) as the GPM mode and the curve partition mode of the current block.
In the embodiment of the present application, the cost of SAD + bitcost or the cost of sat + bitcost is used as the coding cost for each of the above possible cases, where SAD is Sum of Absolute Difference, SATD is Sum of Absolute Transformed Difference, and bitcost is the cost of coding flag bit, etc.
In some embodiments of the present application, when the plurality of prediction modes include a GPM mode, the encoder may calculate a rate-distortion cost result corresponding to the GPM prediction mode by: an encoder acquires a motion related information set corresponding to a current block; traversing each piece of motion related information in the motion related information set in a GPM partitioning mode to obtain a first rate-distortion cost result corresponding to the GPM partitioning mode; and traversing the curve division mode aiming at least one target GPM division mode with the lowest rate-distortion cost result to obtain a rate-distortion cost result corresponding to the GPM prediction mode.
In the embodiment of the present application, another possible method is that the encoder traverses all possible mv combinations for the current block, traverses all possible GPM partition modes for each mv combination, and takes the cost of cost SAD + bitcost or cost sat + bitcost as the coding cost for each possible case. And traversing all curve division modes for each GPM division mode by taking the GPM division modes with the optimal coding cost, wherein all translation amplitudes and curve shapes are included. For each possible case, the cost of coding is SAD + bitcost or SATD + bitcost. And taking the GPM partition mode and the curve partition mode with the optimal coding cost as the GPM mode of the current block and the curve partition mode of the current block.
It should be noted that the implementation principle of each GPM partition mode traversing all curve partition modes is consistent with the principle of the decoding side shifting by using curve partition information, and details are not repeated here.
In the embodiment of the present application, when the encoder determines the optimal encoding cost, that is, the GPM mode parameter and the curve partition information of the current block corresponding to the rate-distortion cost result, the encoder may determine the first reference block and the second reference block corresponding to the motion-related information based on the GPM mode parameter, and may determine the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block based on the GPM mode parameter and the curve partition information. Finally, the encoder determines a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
In an embodiment of the present application, the first prediction parameter includes: a first weight value or first boundary position information; the second prediction parameters include: a second weight value or second boundary position information.
It should be noted that the first weight value and the second weight value are weight values corresponding to pixel points when GPM is divided by using a masking method, and the first boundary position information and the second boundary position information are boundary information of the first reference block and the second reference block.
In this embodiment of the present application, an encoder determines, based on a GPM mode parameter and curve partition information, that a first prediction parameter corresponding to a first reference block and a second prediction parameter corresponding to a second reference block may be divided into two ways based on the difference of the prediction parameters, as follows:
the first method is as follows: the first prediction parameters include: a first weight value; the second prediction parameters include: a second weight value; the encoder determines preset weight distribution corresponding to the current GPM mode according to the GPM mode parameters; determining size information of a current block; updating the preset weight distribution according to the size information, the GPM mode parameters and the curve dividing information to obtain curve weight distribution; and obtaining a first weight value and a second weight value according to the curve weight distribution.
It should be noted that the curve dividing information includes: translation amplitude and curve shape index; the encoder determines the offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the preset weight of each pixel position in the preset weight distribution is offset by the offset amount, the updated curve weight of each pixel position is obtained, and thus the curve weight distribution is obtained.
The second method comprises the following steps: the first prediction parameters include: first boundary position information; the second prediction parameters include: second boundary position information; an encoder acquires size information of a current block; determining partition boundary position information based on the GPM mode parameters and the size information; shifting the dividing boundary position information according to the GPM mode parameter, the size information and the curve dividing information, and determining the curve dividing boundary position information; first boundary position information and second boundary position information are determined based on the curve-divided boundary position information.
It should be noted that the curve dividing information includes: translation amplitude and curve shape index; the encoder determines the offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the offset of the position of each pixel point of the boundary dividing position information is offset, the curve dividing boundary position information is obtained.
In the first mode, the preset weight distribution refers to an original mask corresponding to the GPM in the linear division mode, and the curve weight distribution is weight distribution information corresponding to the curve division mode, and is obtained by performing translation calculation and updating on the preset weight distribution. The encoder updates preset weight distribution mainly by adopting size information, GPM mode parameters and curve division information to obtain curve weight distribution, and obtains a first weight value corresponding to a first reference block and a second weight value corresponding to a second reference block of each pixel point of a current block in the curve weight distribution.
In some embodiments of the present application, the encoder determines the offset direction according to the angle information in the GPM mode parameters, and determines the offset amount to be offset according to the size information, the translation amplitude and the curve shape index.
In the second method, the encoder may adopt the pixel value of the first reference block as the first predicted value for the part of the first reference block, adopt the pixel value of the second reference block as the second predicted value for the part of the second reference block, and at the boundary position, shift the pixel points on the respective boundary information of the first reference block and the second reference block to obtain the first boundary position information and the second boundary position information, and then predict the pixel points on the boundary based on the first boundary position information and the second boundary position information.
It should be noted that, the encoder divides the current block by using the GPM mode parameter, and based on the size information of the current block, the division boundary position information of the current block can be obtained; at this time, the encoder determines the offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the position of each pixel point of the boundary dividing position information is offset by the offset, the curve dividing boundary position information is obtained.
For the above implementation, in the embodiment of the present application, the implementation of determining the offset direction according to the GPM mode parameter by the encoder is as follows: when the angle used by the GPM mode parameter representation GPM meets the horizontal judgment condition, determining the offset direction as the horizontal direction; and when the angle used by the GPM mode parameter representation GPM meets the vertical and horizontal judgment condition, determining the offset direction as the vertical direction.
In the following, for the case of different offset modes, the encoder determines the description of the offset according to the size information, the translation amplitude and the curve shape index.
In the embodiment of the present application, the size information includes a length and a width of the current block.
When the offset direction is the horizontal direction, the encoder determines a first pixel position in a preset block in the non-offset direction of each pixel position according to the position, the length and the number of preset offset points of each pixel, wherein the non-offset direction is vertical to the offset direction; determining first curve information corresponding to the first pixel position according to the curve shape index; determining a first movement proportion based on the width and the number of preset offset points; and determining an offset according to the first curve information, the translation amplitude and the first movement proportion, wherein the offset does not exceed the width of the current block.
In some embodiments of the present application, the encoder determines, based on each pixel position, the length, and the number of preset offset points, that the implementation of the first pixel position located in the preset block in the non-offset direction at each pixel position is: determining a first scaling according to the position and length of each pixel and the number of preset offset points; determining a first sub-offset according to the length and the number of preset offset points; based on the first scaling and the first sub-offset amount, a first pixel position of each pixel position in the non-offset direction within the preset block is determined.
In some embodiments of the present application, when the offset direction is a vertical direction, the encoder determines, according to each pixel position, the width, and the number of preset offset points, a second pixel position located in a preset block in a non-offset direction at each pixel position, wherein the non-offset direction is perpendicular to the offset direction; determining second curve information corresponding to the second pixel position according to the curve shape index; determining a second movement proportion based on the length and the number of the preset offset points; and determining an offset according to the second curve information, the translation amplitude and the second movement proportion, wherein the offset does not exceed the length of the current block.
In the embodiment of the present application, the encoder multiplies the second curve information by the translation amplitude and the second movement ratio to obtain the offset.
In some embodiments of the present application, the encoder determines, based on each pixel position, the width, and the number of preset offset points, that an implementation of the second pixel position located in the preset block in the non-offset direction at each pixel position is: the encoder determines a second scaling according to the position, the width and the number of the preset offset points of each pixel, and determines a second sub-offset according to the width and the number of the preset offset points; and determining a second pixel position of each pixel position in the non-offset direction in the preset block based on the second scaling and the second sub-offset amount.
Further, after the encoder obtains the first weight value and the second weight value in the first mode, the encoder may determine the prediction value of the current block according to the first weight value, the first pixel value of the first reference block, and the second weight value in combination with the second pixel value of the second reference block.
In the embodiment of the application, the encoder weights and averages the first weight value, the first pixel value of the first reference block, the second weight value and the second pixel value of the second reference block to obtain the prediction value of the current block.
After the encoder obtains the first boundary position information and the second boundary position information in the second mode, the encoder divides the current block according to the first boundary position information and the second boundary position information to obtain a first block and a second block; the first block is predicted based on first pixel values of a first reference block, and the second block is predicted based on second pixel values of a second reference block, thereby determining a prediction value of the current block.
The method adopts a curve dividing mode during inter-frame prediction provided by the embodiment of the application.
In the embodiment of the application, the curve dividing information is a dividing mode in curve dividing; the curve division is realized by translating pixel points on a direct dividing line in the preset straight line geometric division to obtain a continuous curve dividing line.
In some embodiments of the present application, each pixel point of the linear division line is continuously translated in the same moving direction according to different moving distances to obtain a curve division line; or, each pixel point of the straight line dividing line is continuously translated according to different motion vectors to obtain a curve dividing line.
In some embodiments of the present application, the moving distance is a distance between the corresponding pixel position on the preset curve shape and the straight dividing line; the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
In some embodiments of the present application, the direction of movement is formed by a combination of a horizontal direction and a vertical direction; alternatively, the moving direction is related to the dividing direction of the GPM.
In some embodiments of the present application, when the movement distance is not a full pixel, interpolation or rounding processing is performed on the divided pixel position; or, the moving distance is positively correlated with the length of the current block; alternatively, the moving distance is positively correlated with the smallest value among the length and the width of the current block.
It should be noted that the principle of the prediction process of the current block of the encoder is consistent with that of the decoder side, and the same explanation description is not repeated here.
In some embodiments of the present application, if the encoder uses a method for partitioning a CU or a PU when performing GPM partitioning, the encoder needs to determine whether the current block uses a GPM partitioning mode (or a GPM prediction mode) and a curve partitioning mode.
In this embodiment of the present application, the encoder may traverse all the GPM partition modes and the curve partition modes, and encode the partitioned CUs or PUs separately for each possible case, which may have a process of iteratively encoding the CUs or PUs of the next layer, so as to obtain the encoding cost. The encoder tries other methods that do not use GPM and curve partitioning to determine the prediction mode selected by the current block in the mode with the least coding cost.
It can be understood that, the encoder predicts the current block by adopting a curve division mode in the GPM mode, so that the divided boundary is more attached to the edge of the object or the edges of two portions with different motion vectors, thereby improving the encoding precision.
In some embodiments of the present application, after S202, as shown in fig. 8, an inter prediction method provided by the present application further includes: S206-S207.
And S206, when the prediction mode corresponding to the minimum rate-distortion cost result is the curve division mode of the GPM prediction mode, generating a curve division use mark according to the curve division information, and encoding the curve division information.
And S207, inputting the curve division use mark and the coded curve division information into a code stream.
In the embodiment of the application, after the encoder determines the minimum rate-distortion cost result, if the prediction mode corresponding to the minimum rate-distortion cost result is the curve partition mode in the GPM prediction mode, the encoder may generate the curve partition use flag according to the curve partition information and encode the curve partition information, and finally, the encoder inputs the curve partition use flag and the encoded curve partition information into a code stream for a decoder to use when decoding. However, in the present application, only the encoded curve partition information may be written into the code stream for use by the decoder when decoding, and the embodiment of the present application is not limited.
In some embodiments of the present application, the curve partitioning information comprises: translation amplitude and curve shape index; the encoder may generate a curve division use flag according to the translation amplitude, and when the curve division use flag indicates that the curve division use flag is used, encode the translation amplitude and the curve shape index to obtain encoded curve division information. When the curve partition use flag representation is not used, encoding the translation amplitude and the curve shape index is stopped.
In some embodiments of the present application, the encoder may further encode the translation amplitude to obtain an encoded translation amplitude; when the translation amplitude representation uses curve division, the curve shape index is coded to obtain a coded curve shape index, wherein the coded translation amplitude and the coded curve shape index are coded curve division information; when the translation amplitude characterization uses curve partitioning and the characterization does not use curve partitioning, the encoding curve shape index is stopped.
It should be noted that, in the embodiment of the present application, the encoder may use the GPM use flag or derive whether the GPM is used through another flag. If the current block uses the GPM mode, information of the division mode of the selected GPM is encoded. The method of the encoder GPM mode is not limited in this application.
In the embodiment of the present application, the encoder needs to determine whether the GPM is used or derive the GPM use through other flags. If the current block uses the selected GPM mode, encoding division mode information of the selected GPM, encoding MV information used by two division parts of the current block or other GPM related information, wherein the method for encoding the GPM mode is not limited in the present application.
In this embodiment of the present application, for the curve partitioning mode, whether the curve partitioning use flag represents a curve partitioning manner is adopted or not may be determined according to the translation amplitude, when there is translation amplitude, the curve partitioning use flag is generated as a used flag, and when there is no translation amplitude or the translation amplitude is smaller than a certain value, the curve partitioning use flag is generated as an unused flag and curve partitioning information is not encoded. Wherein the translation amplitude is determined based on the distance moved and the movement vector.
Illustratively, if the translation amplitude is not 0, the encoding curve division uses a flag of 1 and encodes the translation amplitude and the curve shape index, wherein the encoding order of the indexes of the translation amplitude and the curve shape is not limited. And if the translation amplitude is not 0, the coding curve division use flag is 0, and the coding curve division information is stopped.
In some embodiments of the present application, the encoder may encode the translation amplitude first, and if the translation amplitude is not 0 (e.g., is 1), then this indicates that the curve shape index is encoded continuously using curve partitioning. And if the translation amplitude is 0, stopping encoding curve division information.
It should be noted that, the order of the information of the coding curve partition, the partition mode of the GPM, and the information of the MV used by the two partition partitions of the current block or other information related to the GPM may be various combinations, and the present application is not limited thereto. The codebook application for the partition mode of the GPM and the MV information or other information related to the GPM used by the two partitions of the current block is not limited.
That is, how to judge whether curve division is used or not on the premise that the current block is used in GPM. One possible implementation is to use a curve-dividing usage flag, in which case 0 is not included in the range of translation amplitudes. One possible implementation is to use a translation amplitude, if the translation amplitude is 0, then essentially no curve division is used.
It should be noted that in the embodiment of the present application, a variety of curve shapes may be used for curve division, and each curve shape may be represented as an array in the LUT (i.e., all curve division information is stored). If it is determined that curve partitioning is used, a curve shape index needs to be used to determine which curve shape to use. The shape of the curve that can be used for curve partitioning may vary depending on the GPM partitioning mode, and the shape of the curve indexes indices from among the available shapes. If curve division cannot be used in a certain GPM division mode, the index of a curve division use mark, translation amplitude and a curve shape and the like are not needed in the GPM mode. If only one curve shape can be used in a certain GPM partitioning mode, the curve shape index does not need to be used in the GPM mode.
It can be understood that, when the encoder adopts the curve division mode to encode the current block, the parameters related to the curve division can be written into the code stream for use in decoding, thereby improving the decoding efficiency.
The following describes the inter-frame prediction provided in the embodiment of the present application by taking the VVC draft8 as an example, and the underlined part below is an embodiment of the main improvement point.
Merge data syntax
Figure BDA0002434051960000131
Figure BDA0002434051960000141
Weighted sample prediction process for geometric partitioning mode
Inputs to this process are:
–two variables nCbW and nCbH specifying the width and the height of the current coding block,
–two(nCbW)x(nCbH)arrays predSamplesLA and predSamplesLB,
–a variable angleIdx specifying the angle index of the geometric partition,
–a variable distanceIdx specifying the distance index of the geometric partition,
–a variable cIdx specifying colour component index,
a variable curveAmplitude specifying curve amplitude,
a variable curveIdx specifying curve index.
Output of this process is the(nCbW)x(nCbH)array pbSamples of prediction sample values.
The variables nW,nH,shift1,offset1,hwRatio,displacementX,displacementY,partFlip and shiftHor arederived as follows:
nW=(cIdx==0)?nCbW:nCbW*SubWidthC (1030)
nH=(cIdx==0)?nCbH:nCbH*SubHeightC (1031)
shift1=Max(5,17-BitDepth) (1032)
offset1=1<<(shift1-1) (1033)
hwRatio=nH/nW (1034)
displacementX=angleIdx (1035)
displacementY=(angleIdx+8)%32 (1036)
partFlip=(angleIdx>=13&&angleIdx<=27)?0:1 (1037)
shiftHor=(angleIdx%16==8||(angleIdx%16!=0&&hwRatio>0))?0:1 (1038)
The variables offsetX and offsetY are derived as follows:
–If shiftHor is equal to 0,the following applies:
offsetX=(-nW)>>1 (1039)
offsetY=((-nH)>>1)+
(angleIdx<16?(distanceIdx*nH)>>3:-((distanceIdx*nH)>>3))(1040)
–Otherwise(shiftHor is equal to 1),the following applies:
offsetX=((-nW)>>1)+
(angleIdx<16?(distanceIdx*nW)>>3:-((distanceIdx*nW)>>3))(1041)
offsetY=(-nH)>>1 (1042)
The prediction samples pbSamples[x][y]with x=0..nCbW-1 and y=0..nCbH-1 are derived as follows:
–The variables xL and yL are derived as follows:
xL=(cIdx==0)?x:x*SubWidthC (1043)
yL=(cIdx==0)?y:y*SubHeightC (1044)
The variables offsetCX and offsetCY are derived as follows:
If((angleIdx>=4&&angleIdx<12)||(angleIdx>=20&&angleIdx<28)),the following applies:
offsetCX=0
offsetCY=curveFactor[curveIdx][xL*N/nW+N/2nW]*curveAmplitude*nH/N
Otherwise(shiftHor is equalto1),thefollowing applies:
offsetCX=curveFactor[curveIdx][yL*N/nH+N/2nH]*curveAmplitude*nW/N
offsetCY=0
–The variable wValue specifying the weight of the prediction sample is derived based on the array disLut specified in Table37 as follows:
weightIdx=(((xL+offsetX+offsetCX)<<1)+1)*disLut[displacementX]+
(((yL+offsetY+offsetCY)<<1)+1))*disLut[displacementY](1045)
weightIdxL=partFlip32+weightIdx:32-weightIdx (1046)
wValue=Clip3(0,8,(weightIdxL+4)>>3) (1047)
–The prediction sample values are derived as follows:
pbSamples[x][y]=Clip3(0,(1<<BitDepth)-1, (predSamplesLA[x][y]*wValue+ (1048)
predSamplesLB[x][y]*(8-wValue)+offset1)>>shift1)
Table37-Specification of the geometric partitioning distance array disLut.
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
One possible implementation is where N-64.
As shown in fig. 9, an embodiment of the present application provides a decoder 1, including:
a decoding unit 10, configured to parse the code stream and determine a predictive decoding parameter of the current block;
a first determining unit 11 for determining a GPM mode parameter and curve division information of the current block when the prediction decoding parameter indicates that the inter prediction of the current block is determined using an inter geometric division prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameters; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
a first prediction unit 12, configured to determine a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
In some embodiments of the present application, the first prediction parameter comprises: a first weight value or first boundary position information; the second prediction parameters include: a second weight value or second boundary position information.
In some embodiments of the present application, the first prediction parameter comprises: a first weight value; the second prediction parameters include: a second weight value;
the first determining unit 11 is further configured to determine, according to the GPM mode parameter, a preset weight distribution corresponding to a current GPM mode; determining size information of the current block; updating the preset weight distribution according to the size information, the GPM mode parameters and the curve dividing information to obtain curve weight distribution; and obtaining the first weight value and the second weight value according to the curve weight distribution.
In some embodiments of the present application, the curve partition information includes: translation amplitude and curve shape index; the first determining unit 11 is further configured to determine an offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, offsetting the preset weight of each pixel position in the preset weight distribution by the offset to obtain the updated curve weight of each pixel position, thereby obtaining the curve weight distribution.
In some embodiments of the present application, the first prediction unit 12 is further configured to determine the prediction value of the current block by combining the first weight value, the first pixel value of the first reference block, and the second weight value with the second pixel value of the second reference block.
In some embodiments of the present application, the first prediction parameter comprises: first boundary position information; the second prediction parameters include: second boundary position information;
the first determining unit 11 is further configured to obtain size information of the current block; determining partition boundary position information based on the GPM mode parameter and the size information; shifting the dividing boundary position information according to the GPM mode parameter, the size information and the curve dividing information, and determining the curve dividing boundary position information; determining the first boundary position information and the second boundary position information based on the curve-divided boundary position information.
In some embodiments of the present application, the first prediction unit 12 is further configured to divide the current block according to the first boundary position information and the second boundary position information to obtain a first block and a second block; the method includes predicting a first reference block based on first pixel values of the first block, and predicting a second reference block based on second pixel values of the second block, thereby determining a prediction value of the current block.
In some embodiments of the present application, the curve partition information includes: translation amplitude and curve shape index; the first determining unit 11 is further configured to determine an offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the position of each pixel point of the dividing boundary position information is offset by the offset, the curve dividing boundary position information is obtained.
In some embodiments of the present application, the first determining unit 11 is further configured to determine that the offset direction is a horizontal direction when an angle used by the GPM mode parameter to characterize GPM satisfies a horizontal determination condition; and when the angle used by the GPM mode parameter representation GPM meets a vertical and horizontal judgment condition, determining that the offset direction is a vertical direction.
In some embodiments of the present application, the size information includes a length and a width of the current block;
the first determining unit 11 is further configured to determine, when the offset direction is a horizontal direction, a first pixel position in a preset block in a non-offset direction at each pixel position according to the each pixel position, the length, and the number of preset offset points, where the non-offset direction is perpendicular to the offset direction; determining first curve information corresponding to the first pixel position according to the curve shape index; determining a first movement proportion based on the width and the number of preset offset points; and determining the offset according to the first curve information, the translation amplitude and the first movement proportion, wherein the offset does not exceed the width of the current block.
In some embodiments of the present application, the first determining unit 11 is further configured to determine a first scaling ratio according to the each pixel position, the length, and the number of the preset offset points; determining a first sub-offset according to the length and the number of the preset offset points; determining that each pixel position is located at the first pixel position in a preset block in a non-offset direction based on the first scaling and the first sub-offset amount.
In some embodiments of the present application, the size information includes a length and a width of the current block;
the first determining unit 11 is further configured to determine, when the offset direction is a vertical direction, a second pixel position located in a preset block in a non-offset direction at each pixel position according to the each pixel position, the width, and the number of preset offset points, where the non-offset direction is perpendicular to the offset direction; determining second curve information corresponding to the second pixel position according to the curve shape index; determining a second movement proportion based on the length and the number of preset offset points; and determining the offset according to the second curve information, the translation amplitude and the second movement proportion, wherein the offset does not exceed the length of the current block.
In some embodiments of the present application, the first determining unit 11 is further configured to determine a second scaling ratio according to the each pixel position, the width, and the number of the preset offset points; determining a second sub-offset according to the width and the number of the preset offset points; determining that each pixel position is located at the second pixel position in a preset block in a non-offset direction based on the second scaling and the second sub-offset amount.
In some embodiments of the present application, the curve dividing information is a dividing manner in curve dividing;
the curve division is realized by translating pixel points on a direct dividing line in the preset straight line geometric division to obtain a continuous curve dividing line.
In some embodiments of the present application, each pixel point of the linear division line is continuously translated in the same moving direction according to different moving distances, so as to obtain the curve division line; alternatively, the first and second electrodes may be,
and continuously translating each pixel point of the linear division line according to different motion vectors to obtain the curve division line.
In some embodiments of the present application, the moving distance is a distance between a corresponding pixel position on a preset curve shape and the straight dividing line;
The motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
In some embodiments of the present application, the direction of movement is formed by a combination of a horizontal direction and a vertical direction; alternatively, the first and second electrodes may be,
the moving direction is related to a dividing direction of the GPM.
In some embodiments of the present application, when the movement distance is not a full pixel, interpolation or rounding processing is performed on a divided pixel position; alternatively, the first and second electrodes may be,
the movement distance is positively correlated with the length of the current block; alternatively, the first and second electrodes may be,
the moving distance is positively correlated with the smallest value among the length and the width of the current block.
It can be understood that, the decoder predicts the current block by adopting a curve division mode in the GPM mode, so that the divided boundary is more attached to the edge of an object or the edges of two portions with different motion vectors, thereby improving the precision of encoding and decoding.
In practical applications, as shown in fig. 10, an embodiment of the present application further provides a decoder, including: a first processor 13 and a first memory 14 storing instructions executable by said first processor 13, said first memory 14 performing operations in dependence of said first processor 13 via a communication bus 15, said executable instructions when executed by said first processor 13 performing said inter prediction method at the decoder side.
The first processor may be implemented by software, hardware, firmware or a combination thereof, and may use a circuit, a single or multiple Application Specific Integrated Circuits (ASICs), a single or multiple general purpose integrated circuits, a single or multiple microprocessors, a single or multiple programmable logic devices, or a combination of the foregoing circuits or devices, or other suitable circuits or devices, so that the first processor may execute the corresponding steps of the inter-frame prediction method at the decoder side in the foregoing embodiments.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions that, when executed by one or more first processors, perform a decoder-side inter prediction method.
The components in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional module.
Based on the understanding that the technical solution of the present embodiment essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the method of the present embodiment. And the aforementioned storage medium includes: various media capable of storing program codes, such as a magnetic random access Memory (FRAM), a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read Only Memory (CD-ROM), and the embodiments of the present disclosure are not limited.
As shown in fig. 11, an embodiment of the present application further provides an encoder 2, including:
a second determining unit 20 for determining a prediction mode parameter of the current block; determining GPM mode parameters and curve partition information of the current block when the prediction mode parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameters; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
a second prediction unit 21, configured to determine a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
In some embodiments of the present application, the encoder further comprises: an encoding unit 22;
the encoding unit 22 is further configured to, after the GPM mode parameter, the curve partition information, and the motion-related information of the current block are determined, generate a curve partition use flag according to the curve partition information when the prediction mode corresponding to the minimum rate-distortion cost result is the curve partition mode of the GPM prediction mode, and encode the curve partition information; and inputting the curve division use mark and the coded curve division information into a code stream.
In some embodiments of the present application, the curve partition information includes: translation amplitude and curve shape index; the encoding unit 22 is further configured to generate the curve division use flag according to the translation amplitude; when the curve division use mark representation is used, encoding the translation amplitude and the curve shape index to obtain the encoded curve division information; when the curve partitioning usage flag representation is not used, encoding the translation amplitude and the curve shape index is stopped.
In some embodiments of the present application, the curve partition information includes: translation amplitude and curve shape index; the encoding unit 22 is further configured to encode the translation amplitude to obtain an encoded translation amplitude;
when the translation amplitude representation uses curve division, the curve shape index is coded to obtain a coded curve shape index, wherein the coded translation amplitude and the coded curve shape index are the coded curve division information; when the translation amplitude characterization uses curve partitioning and does not use curve partitioning, stopping encoding curve shape index.
In some embodiments of the present application, the first prediction parameter comprises: a first weight value or first boundary position information;
the second prediction parameters include: a second weight value or second boundary position information.
In some embodiments of the present application, the first prediction parameter comprises: a first weight value; the second prediction parameters include: a second weight value;
the second determining unit 20 is further configured to determine, according to the GPM mode parameter, a preset weight distribution corresponding to the current GPM mode; determining size information of the current block; updating the preset weight distribution according to the size information, the GPM mode parameters and the curve dividing information to obtain curve weight distribution; and obtaining the first weight value and the second weight value according to the curve weight distribution.
In some embodiments of the present application, the curve partition information includes: translation amplitude and curve shape index; the second determining unit 20 is further configured to determine an offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, offsetting the preset weight of each pixel position in the preset weight distribution by the offset to obtain the updated curve weight of each pixel position, thereby obtaining the curve weight distribution.
In some embodiments of the present application, the second prediction unit 21 is further configured to determine the prediction value of the current block by combining the first weight value, the first pixel value of the first reference block, and the second weight value with the second pixel value of the second reference block.
In some embodiments of the present application, the first prediction parameter comprises: first boundary position information; the second prediction parameters include: second boundary position information; the second determining unit 20 is further configured to obtain size information of the current block; determining partition boundary position information based on the GPM mode parameter and the size information; shifting the dividing boundary position information according to the GPM mode parameter, the size information and the curve dividing information, and determining the curve dividing boundary position information; determining the first boundary position information and the second boundary position information based on the curve-divided boundary position information.
In some embodiments of the present application, the second prediction unit 21 is further configured to divide the current block according to the first boundary position information and the second boundary position information to obtain a first block and a second block;
The method includes predicting a first reference block based on first pixel values of the first block, and predicting a second reference block based on second pixel values of the second block, thereby determining a prediction value of the current block.
In some embodiments of the present application, the curve partition information includes: translation amplitude and curve shape index; the second determining unit 20 is further configured to determine an offset direction according to the GPM mode parameter; determining an offset according to the size information, the translation amplitude and the curve shape index; and according to the offset direction, after the position of each pixel point of the dividing boundary position information is offset by the offset, the curve dividing boundary position information is obtained.
In some embodiments of the present application, the second determining unit 20 is further configured to determine that the offset direction is a horizontal direction when the angle used by the GPM mode parameter to characterize GPM satisfies a horizontal determination condition; and when the angle used by the GPM mode parameter representation GPM meets a vertical and horizontal judgment condition, determining that the offset direction is a vertical direction.
In some embodiments of the present application, the size information includes a length and a width of the current block; the second determining unit 20 is further configured to determine, when the offset direction is a horizontal direction, a first pixel position in a preset block in a non-offset direction at each pixel position according to the each pixel position, the length, and the number of preset offset points, where the non-offset direction is perpendicular to the offset direction; determining first curve information corresponding to the first pixel position according to the curve shape index; determining a first movement proportion based on the width and the number of preset offset points; and determining the offset according to the first curve information, the translation amplitude and the first movement proportion, wherein the offset does not exceed the width of the current block.
In some embodiments of the present application, the second determining unit 20 is further configured to determine a first scaling ratio according to the each pixel position, the length, and the number of the preset offset points; determining a first sub-offset according to the length and the number of the preset offset points; determining that each pixel position is located at the first pixel position in a preset block in a non-offset direction based on the first scaling and the first sub-offset amount.
In some embodiments of the present application, the size information includes a length and a width of the current block;
the second determining unit 20 is further configured to determine, when the offset direction is a vertical direction, a second pixel position located in a preset block in a non-offset direction at each pixel position according to the each pixel position, the width, and the number of preset offset points, where the non-offset direction is perpendicular to the offset direction; determining second curve information corresponding to the second pixel position according to the curve shape index; determining a second movement proportion based on the length and the number of preset offset points; and determining the offset according to the second curve information, the translation amplitude and the second movement proportion, wherein the offset does not exceed the length of the current block.
In some embodiments of the present application, the second determining unit 20 is further configured to determine a second scaling ratio according to the each pixel position, the width, and the number of the preset offset points; determining a second sub-offset according to the width and the number of the preset offset points; determining that each pixel position is located at the second pixel position in a preset block in a non-offset direction based on the second scaling and the second sub-offset amount.
In some embodiments of the present application, the curve dividing information is a dividing manner in curve dividing;
the curve division is realized by translating pixel points on a direct dividing line in the preset straight line geometric division to obtain a continuous curve dividing line.
In some embodiments of the present application, each pixel point of the linear division line is continuously translated in the same moving direction according to different moving distances, so as to obtain the curve division line; alternatively, the first and second electrodes may be,
and continuously translating each pixel point of the linear division line according to different motion vectors to obtain the curve division line.
In some embodiments of the present application, the moving distance is a distance between a corresponding pixel position on a preset curve shape and the straight dividing line;
The motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
In some embodiments of the present application, the direction of movement is formed by a combination of a horizontal direction and a vertical direction; alternatively, the first and second electrodes may be,
the moving direction is related to a dividing direction of the GPM.
In some embodiments of the present application, when the movement distance is not a full pixel, interpolation or rounding processing is performed on a divided pixel position; alternatively, the first and second electrodes may be,
the movement distance is positively correlated with the length of the current block; alternatively, the first and second electrodes may be,
the moving distance is positively correlated with the smallest value among the length and the width of the current block.
It can be understood that, the encoder predicts the current block by adopting a curve division mode in the GPM mode, so that the divided boundary is more attached to the edge of the object or the edges of two portions with different motion vectors, thereby improving the encoding precision.
In practical applications, as shown in fig. 12, an embodiment of the present application further provides an encoder, including: a second processor 23 and a second memory 24 storing instructions executable by said second processor 23, said second memory 24 being adapted to perform operations in dependence of said second processor 23 via a communication bus 25, said executable instructions, when executed by said second processor 23, performing said inter prediction method at the encoder side as described above.
The second processor may be implemented by software, hardware, firmware or a combination thereof, and may use a circuit, a single or multiple application specific integrated circuits, a single or multiple general purpose integrated circuits, a single or multiple microprocessors, a single or multiple programmable logic devices, or a combination of the aforementioned circuits or devices, or other suitable circuits or devices, so that the first processor may perform the corresponding steps of the inter-frame prediction method at the decoder side in the foregoing embodiments.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions, and when the executable instructions are executed by one or more second processors, the second processors execute the inter prediction method corresponding to the encoder.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (44)

1. An inter-frame prediction method applied to a decoder, comprising:
analyzing the code stream, and determining the predictive decoding parameter of the current block;
determining GPM mode parameters and curve partition information of the current block when the prediction decoding parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM;
determining a first reference block and a second reference block based on the GPM mode parameters;
determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
Determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
2. The method of claim 1,
the first prediction parameters include: a first weight value or first boundary position information;
the second prediction parameters include: a second weight value or second boundary position information.
3. The method according to claim 1 or 2, wherein the first prediction parameters comprise: a first weight value; the second prediction parameters include: a second weight value;
the determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information includes:
determining preset weight distribution corresponding to the current GPM mode according to the GPM mode parameters;
determining size information of the current block;
updating the preset weight distribution according to the size information, the GPM mode parameters and the curve dividing information to obtain curve weight distribution;
and obtaining the first weight value and the second weight value according to the curve weight distribution.
4. The method of claim 3, wherein the curve partitioning information comprises: translation amplitude and curve shape index; the updating the preset weight distribution according to the size information, the GPM mode parameter and the curve dividing information to obtain curve weight distribution, including:
Determining an offset direction according to the GPM mode parameter;
determining an offset according to the size information, the translation amplitude and the curve shape index;
and according to the offset direction, offsetting the preset weight of each pixel position in the preset weight distribution by the offset to obtain the updated curve weight of each pixel position, thereby obtaining the curve weight distribution.
5. The method of claim 3 or 4, wherein the determining the prediction value of the current block based on the first prediction parameter and the second prediction parameter comprises:
and determining the predicted value of the current block by combining the first weight value, the first pixel value of the first reference block and the second weight value with the second pixel value of the second reference block.
6. The method according to claim 1 or 2, wherein the first prediction parameters comprise: first boundary position information; the second prediction parameters include: second boundary position information; the determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information includes:
Acquiring size information of the current block;
determining partition boundary position information based on the GPM mode parameter and the size information;
shifting the dividing boundary position information according to the GPM mode parameter, the size information and the curve dividing information, and determining the curve dividing boundary position information;
determining the first boundary position information and the second boundary position information based on the curve-divided boundary position information.
7. The method of claim 6, wherein the determining the predictor of the current block based on the first prediction parameter and the second prediction parameter comprises:
dividing the current block according to the first boundary position information and the second boundary position information to obtain a first block and a second block;
the method includes predicting a first reference block based on first pixel values of the first block, and predicting a second reference block based on second pixel values of the second block, thereby determining a prediction value of the current block.
8. The method according to claim 6 or 7, wherein the curve partitioning information comprises: translation amplitude and curve shape index; the determining the curve partition boundary position information by offsetting the partition boundary position information according to the GPM mode parameter, the size information, and the curve partition information includes:
Determining an offset direction according to the GPM mode parameter;
determining an offset according to the size information, the translation amplitude and the curve shape index;
and according to the offset direction, after the position of each pixel point of the dividing boundary position information is offset by the offset, the curve dividing boundary position information is obtained.
9. The method of claim 4 or 8, wherein determining an offset direction according to the GPM mode parameter comprises:
when the angle used by the GPM mode parameter representation GPM meets a horizontal judgment condition, determining the offset direction as a horizontal direction;
and when the angle used by the GPM mode parameter representation GPM meets a vertical and horizontal judgment condition, determining that the offset direction is a vertical direction.
10. The method of claim 9, wherein the size information includes a length and a width of the current block; determining an offset according to the size information, the translation amplitude and the curve shape index, including:
when the offset direction is a horizontal direction, determining a first pixel position in a preset block in a non-offset direction of each pixel position according to each pixel position, the length and the number of preset offset points, wherein the non-offset direction is perpendicular to the offset direction;
Determining first curve information corresponding to the first pixel position according to the curve shape index;
determining a first movement proportion based on the width and the number of preset offset points;
and determining the offset according to the first curve information, the translation amplitude and the first movement proportion, wherein the offset does not exceed the width of the current block.
11. The method of claim 10, wherein determining the first pixel position in the non-offset direction in the predetermined block at said each pixel position according to said each pixel position, said length and the number of the predetermined offset points comprises:
determining a first scaling according to the position of each pixel, the length and the number of the preset offset points;
determining a first sub-offset according to the length and the number of the preset offset points;
determining that each pixel position is located at the first pixel position in a preset block in a non-offset direction based on the first scaling and the first sub-offset amount.
12. The method of claim 9, wherein the size information includes a length and a width of the current block; determining an offset according to the size information, the translation amplitude and the curve shape index, including:
When the offset direction is a vertical direction, determining a second pixel position, which is located in a preset block in a non-offset direction, of each pixel position according to the pixel position, the width and the number of preset offset points, wherein the non-offset direction is perpendicular to the offset direction;
determining second curve information corresponding to the second pixel position according to the curve shape index;
determining a second movement proportion based on the length and the number of preset offset points;
and determining the offset according to the second curve information, the translation amplitude and the second movement proportion, wherein the offset does not exceed the length of the current block.
13. The method of claim 12, wherein determining a second pixel position in the non-offset direction at the each pixel position in a predetermined block according to the each pixel position, the width and the number of predetermined offset points comprises:
determining a second scaling according to the position of each pixel, the width and the number of the preset offset points;
determining a second sub-offset according to the width and the number of the preset offset points;
Determining that each pixel position is located at the second pixel position in a preset block in a non-offset direction based on the second scaling and the second sub-offset amount.
14. The method according to any one of claims 1 to 13,
the curve dividing information is one dividing mode in curve dividing;
the curve division is realized by translating pixel points on a direct dividing line in the preset straight line geometric division to obtain a continuous curve dividing line.
15. The method of claim 14,
each pixel point of the straight line dividing line is continuously translated in the same moving direction according to different moving distances to obtain the curve dividing line; alternatively, the first and second electrodes may be,
and continuously translating each pixel point of the linear division line according to different motion vectors to obtain the curve division line.
16. The method of claim 15,
the moving distance is the distance between the corresponding pixel position on the preset curve shape and the straight line dividing line;
the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
17. The method according to claim 15 or 16,
the moving direction is formed by combining a horizontal direction and a vertical direction; alternatively, the first and second electrodes may be,
the moving direction is related to a dividing direction of the GPM.
18. The method of claim 17,
when the moving distance is not the integer pixel, performing interpolation or rounding processing on the position of the partial pixel; alternatively, the first and second electrodes may be,
the movement distance is positively correlated with the length of the current block; alternatively, the first and second electrodes may be,
the moving distance is positively correlated with the smallest value among the length and the width of the current block.
19. An inter-frame prediction method applied to an encoder includes:
determining a prediction mode parameter of a current block;
determining GPM mode parameters and curve partition information of the current block when the prediction mode parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM;
determining a first reference block and a second reference block based on the GPM mode parameters;
determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
20. The method of claim 19, wherein after determining the GPM mode parameters and curve partition information for the current block, the method further comprises:
when the prediction mode corresponding to the minimum rate-distortion cost result is the curve division mode of the GPM prediction mode, generating a curve division use mark according to the curve division information, and coding the curve division information;
and inputting the curve division use mark and the coded curve division information into a code stream.
21. The method of claim 20, wherein the curve partitioning information comprises: translation amplitude and curve shape index; generating the curve division use flag according to the curve division information, and encoding the curve division information, including:
generating the curve division use mark according to the translation amplitude;
when the curve division use mark representation is used, encoding the translation amplitude and the curve shape index to obtain the encoded curve division information;
when the curve partitioning usage flag representation is not used, encoding the translation amplitude and the curve shape index is stopped.
22. The method of claim 21, wherein the curve partitioning information comprises: translation amplitude and curve shape index; generating the curve division use flag according to the curve division information, and encoding the curve division information, including:
encoding the translation amplitude to obtain the encoded translation amplitude;
when the translation amplitude representation uses curve division, the curve shape index is coded to obtain a coded curve shape index, wherein the coded translation amplitude and the coded curve shape index are the coded curve division information;
when the translation amplitude characterization uses curve partitioning and does not use curve partitioning, stopping encoding curve shape index.
23. The method according to any one of claims 19 to 22,
the first prediction parameters include: a first weight value or first boundary position information;
the second prediction parameters include: a second weight value or second boundary position information.
24. The method according to any of claims 19 to 23, wherein the first prediction parameters comprise: a first weight value; the second prediction parameters include: a second weight value;
The determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information includes:
determining preset weight distribution corresponding to the current GPM mode according to the GPM mode parameters;
determining size information of the current block;
updating the preset weight distribution according to the size information, the GPM mode parameters and the curve dividing information to obtain curve weight distribution;
and obtaining the first weight value and the second weight value according to the curve weight distribution.
25. The method of claim 24, wherein the curve partitioning information comprises: translation amplitude and curve shape index; the updating the preset weight distribution according to the size information, the GPM mode parameter and the curve dividing information to obtain curve weight distribution, including:
determining an offset direction according to the GPM mode parameter;
determining an offset according to the size information, the translation amplitude and the curve shape index;
and according to the offset direction, offsetting the preset weight of each pixel position in the preset weight distribution by the offset to obtain the updated curve weight of each pixel position, thereby obtaining the curve weight distribution.
26. The method of claim 24 or 25, wherein the determining the prediction value of the current block based on the first prediction parameter and the second prediction parameter comprises:
and determining the predicted value of the current block by combining the first weight value, the first pixel value of the first reference block and the second weight value with the second pixel value of the second reference block.
27. The method according to any of claims 19 to 23, wherein the first prediction parameters comprise: first boundary position information; the second prediction parameters include: second boundary position information; the determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information includes:
acquiring size information of the current block;
determining partition boundary position information based on the GPM mode parameter and the size information;
shifting the dividing boundary position information according to the GPM mode parameter, the size information and the curve dividing information, and determining the curve dividing boundary position information;
determining the first boundary position information and the second boundary position information based on the curve-divided boundary position information.
28. The method of claim 27, wherein determining the predictor of the current block based on the first prediction parameter and the second prediction parameter comprises:
dividing the current block according to the first boundary position information and the second boundary position information to obtain a first block and a second block;
the method includes predicting a first reference block based on first pixel values of the first block, and predicting a second reference block based on second pixel values of the second block, thereby determining a prediction value of the current block.
29. The method according to claim 27 or 28, wherein the curve partitioning information comprises: translation amplitude and curve shape index; the determining the curve partition boundary position information by offsetting the partition boundary position information according to the GPM mode parameter, the size information, and the curve partition information includes:
determining an offset direction according to the GPM mode parameter;
determining an offset according to the size information, the translation amplitude and the curve shape index;
and according to the offset direction, after the position of each pixel point of the dividing boundary position information is offset by the offset, the curve dividing boundary position information is obtained.
30. The method of claim 25 or 29, wherein determining the offset direction according to the GPM mode parameter comprises:
when the angle used by the GPM mode parameter representation GPM meets a horizontal judgment condition, determining the offset direction as a horizontal direction;
and when the angle used by the GPM mode parameter representation GPM meets a vertical and horizontal judgment condition, determining that the offset direction is a vertical direction.
31. The method of claim 30, wherein the size information comprises a length and a width of the current block; determining an offset according to the size information, the translation amplitude and the curve shape index, including:
when the offset direction is a horizontal direction, determining a first pixel position in a preset block in a non-offset direction of each pixel position according to each pixel position, the length and the number of preset offset points, wherein the non-offset direction is perpendicular to the offset direction;
determining first curve information corresponding to the first pixel position according to the curve shape index;
determining a first movement proportion based on the width and the number of preset offset points;
And determining the offset according to the first curve information, the translation amplitude and the first movement proportion, wherein the offset does not exceed the width of the current block.
32. The method of claim 31, wherein determining the first pixel position in the non-offset direction in the predetermined block at said each pixel position according to said each pixel position, said length and the number of predetermined offset points comprises:
determining a first scaling according to the position of each pixel, the length and the number of the preset offset points;
determining a first sub-offset according to the length and the number of the preset offset points;
determining that each pixel position is located at the first pixel position in a preset block in a non-offset direction based on the first scaling and the first sub-offset amount.
33. The method of claim 30, wherein the size information comprises a length and a width of the current block; determining an offset according to the size information, the translation amplitude and the curve shape index, including:
when the offset direction is a vertical direction, determining a second pixel position, which is located in a preset block in a non-offset direction, of each pixel position according to the pixel position, the width and the number of preset offset points, wherein the non-offset direction is perpendicular to the offset direction;
Determining second curve information corresponding to the second pixel position according to the curve shape index;
determining a second movement proportion based on the length and the number of preset offset points;
and determining the offset according to the second curve information, the translation amplitude and the second movement proportion, wherein the offset does not exceed the length of the current block.
34. The method of claim 33, wherein determining a second pixel position in the non-offset direction at the each pixel position in a predetermined block according to the each pixel position, the width and the number of predetermined offset points comprises:
determining a second scaling according to the position of each pixel, the width and the number of the preset offset points;
determining a second sub-offset according to the width and the number of the preset offset points;
determining that each pixel position is located at the second pixel position in a preset block in a non-offset direction based on the second scaling and the second sub-offset amount.
35. The method of any one of claims 19 to 34,
the curve dividing information is one dividing mode in curve dividing;
The curve division is realized by translating pixel points on a direct dividing line in the preset straight line geometric division to obtain a continuous curve dividing line.
36. The method of claim 35,
each pixel point of the straight line dividing line is continuously translated in the same moving direction according to different moving distances to obtain the curve dividing line; alternatively, the first and second electrodes may be,
and continuously translating each pixel point of the linear division line according to different motion vectors to obtain the curve division line.
37. The method of claim 36,
the moving distance is the distance between the corresponding pixel position on the preset curve shape and the straight line dividing line;
the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
38. The method of claim 36 or 37,
the moving direction is formed by combining a horizontal direction and a vertical direction; alternatively, the first and second electrodes may be,
the moving direction is related to a dividing direction of the GPM.
39. The method of claim 38,
when the moving distance is not the integer pixel, performing interpolation or rounding processing on the position of the partial pixel; alternatively, the first and second electrodes may be,
The movement distance is positively correlated with the length of the current block; alternatively, the first and second electrodes may be,
the moving distance is positively correlated with the smallest value among the length and the width of the current block.
40. A decoder, comprising:
the decoding unit is used for analyzing the code stream and determining the predictive decoding parameter of the current block;
a first determining unit for determining a GPM mode parameter and curve partition information of the current block when the prediction decoding parameter indicates that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameters; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
a first prediction unit for determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
41. An encoder, comprising:
a second determining unit for determining a prediction mode parameter of the current block; determining GPM mode parameters and curve partition information of the current block when the prediction mode parameters indicate that the inter prediction of the current block is determined using an inter geometric partition prediction mode GPM; determining a first reference block and a second reference block based on the GPM mode parameters; determining a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve partition information;
A second prediction unit for determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
42. A decoder, comprising: a first processor and a first memory storing executable instructions for the first processor, the first memory being dependent on the first processor via a communication bus to perform operations, the executable instructions when executed by the first processor performing the inter prediction method of any of claims 1 to 18 above.
43. An encoder, comprising: a second processor and a second memory storing executable instructions for the second processor, the second memory being operable upon the second processor via a communication bus to perform operations, the executable instructions when executed by the second processor performing the inter prediction method of any of claims 19 to 39 as set forth above.
44. A computer-readable storage medium having stored thereon executable instructions that, when executed by one or more first processors, perform the inter prediction method of any of claims 1 to 18; alternatively, when the executable instructions are executed by one or more second processors, the second processors perform the inter prediction method of any of claims 19 to 39.
CN202010246244.3A 2020-03-31 2020-03-31 Inter prediction method, encoder, decoder, and computer-readable storage medium Pending CN113473141A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010246244.3A CN113473141A (en) 2020-03-31 2020-03-31 Inter prediction method, encoder, decoder, and computer-readable storage medium
PCT/CN2021/074252 WO2021196857A1 (en) 2020-03-31 2021-01-28 Inter-frame prediction method, encoder, decoder and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010246244.3A CN113473141A (en) 2020-03-31 2020-03-31 Inter prediction method, encoder, decoder, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN113473141A true CN113473141A (en) 2021-10-01

Family

ID=77865643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010246244.3A Pending CN113473141A (en) 2020-03-31 2020-03-31 Inter prediction method, encoder, decoder, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN113473141A (en)
WO (1) WO2021196857A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955565A (en) * 2023-03-15 2023-04-11 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium
WO2023061334A1 (en) * 2021-10-11 2023-04-20 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing
WO2024114652A1 (en) * 2022-11-29 2024-06-06 Douyin Vision Co., Ltd. Method, apparatus, and medium for video processing

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156133B (en) * 2023-10-27 2024-02-09 淘宝(中国)软件有限公司 Inter-frame prediction mode selection method and device for video coding

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101502119A (en) * 2006-08-02 2009-08-05 汤姆逊许可公司 Adaptive geometric partitioning for video decoding
US20170078697A1 (en) * 2014-03-11 2017-03-16 Samsung Electronics Co., Ltd. Depth image prediction mode transmission method and apparatus for encoding and decoding inter-layer video
CN108353166A (en) * 2015-11-19 2018-07-31 韩国电子通信研究院 Method and apparatus for encoding/decoding image

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012023597A (en) * 2010-07-15 2012-02-02 Sony Corp Image processing device and image processing method
CN102547290B (en) * 2012-01-20 2013-12-18 厦门大学 Video image coding/decoding method based on geometric partitioning
MX2021003854A (en) * 2018-10-01 2021-05-27 Op Solutions Llc Methods and systems of exponential partitioning.
KR20210118151A (en) * 2019-01-28 2021-09-29 오피 솔루션즈, 엘엘씨 Inter prediction in exponential partitioning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101502119A (en) * 2006-08-02 2009-08-05 汤姆逊许可公司 Adaptive geometric partitioning for video decoding
US20170078697A1 (en) * 2014-03-11 2017-03-16 Samsung Electronics Co., Ltd. Depth image prediction mode transmission method and apparatus for encoding and decoding inter-layer video
CN108353166A (en) * 2015-11-19 2018-07-31 韩国电子通信研究院 Method and apparatus for encoding/decoding image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023061334A1 (en) * 2021-10-11 2023-04-20 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing
WO2024114652A1 (en) * 2022-11-29 2024-06-06 Douyin Vision Co., Ltd. Method, apparatus, and medium for video processing
CN115955565A (en) * 2023-03-15 2023-04-11 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium

Also Published As

Publication number Publication date
WO2021196857A1 (en) 2021-10-07

Similar Documents

Publication Publication Date Title
CN113612994B (en) Method for video coding and decoding with affine motion compensation
CN113473141A (en) Inter prediction method, encoder, decoder, and computer-readable storage medium
US11533470B2 (en) Method and apparatus for encoding/decoding an image signal
US10771816B2 (en) Method for deriving a motion vector
US20190124332A1 (en) Inter-prediction mode based image processing method, and apparatus therefor
KR20180057676A (en) Video motion compensation device and method with selectable interpolation filter
WO2021196235A1 (en) Inter-frame prediction method, encoder, decoder, and storage medium
CN114845102B (en) Early termination of optical flow correction
KR20200055139A (en) Interpolation filter for inter prediction device and method for video coding
CN116320473A (en) Optical flow prediction refinement method and device
CN116233466A (en) Method and apparatus for optical flow Prediction Refinement (PROF)
CN114342378A (en) Method and apparatus relating to predictive refinement using optical flow
CN110832854B (en) Method and apparatus for intra prediction using interpolation
CN113994692A (en) Method and apparatus for predictive refinement with optical flow
CN113728639A (en) Method and apparatus for optical flow prediction refinement
KR102276265B1 (en) Apparatus and method for encoding and decoding video coding blocks of a video signal
CN109565592B (en) Video coding device and method using partition-based video coding block partitioning
US11082688B2 (en) Restricted overlapped block motion compensation
JP2024069590A (en) Inter prediction method, encoder, decoder, and storage medium
CN114009033A (en) Method and apparatus for signaling symmetric motion vector difference mode
CN113365077B (en) Inter-frame prediction method, encoder, decoder, computer-readable storage medium
CN115280778A (en) Inter-frame prediction method, encoder, decoder, and storage medium
Kim et al. Exploiting pseudo-quadtree structure for accelerating HEVC spatial resolution downscaling transcoder
KR20200134302A (en) Image processing apparatus and method
EP4391534A1 (en) Inter-frame prediction method, coder, decoder, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination