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

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

Info

Publication number
CN113473141B
CN113473141B CN202010246244.3A CN202010246244A CN113473141B CN 113473141 B CN113473141 B CN 113473141B CN 202010246244 A CN202010246244 A CN 202010246244A CN 113473141 B CN113473141 B CN 113473141B
Authority
CN
China
Prior art keywords
curve
determining
information
offset
prediction
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.)
Active
Application number
CN202010246244.3A
Other languages
Chinese (zh)
Other versions
CN113473141A (en
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 CN202411692245.5A priority Critical patent/CN119544999B/en
Priority to CN202010246244.3A priority patent/CN113473141B/en
Priority to CN202411695305.9A priority patent/CN119520798B/en
Priority to PCT/CN2021/074252 priority patent/WO2021196857A1/en
Publication of CN113473141A publication Critical patent/CN113473141A/en
Application granted granted Critical
Publication of CN113473141B publication Critical patent/CN113473141B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102—Methods 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/119—Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169—Methods 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/17—Methods 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/176—Methods 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
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51—Motion estimation or motion compensation
    • H04N19/513—Processing of motion vectors
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51—Motion estimation or motion compensation
    • H04N19/513—Processing of motion vectors
    • H04N19/517—Processing of motion vectors by encoding
    • H04N19/52—Processing 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

本申请实施例公开了一种帧间预测方法、编码器、解码器及计算机可读存储介质,包括:解析码流,确定当前块的预测解码参数;当预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于GPM模式参数,确定第一参考块和第二参考块;基于GPM模式参数和曲线划分信息,确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;基于第一预测参数和第二预测参数,确定当前块的预测值。

The embodiments of the present application disclose an inter-frame prediction method, an encoder, a decoder and a computer-readable storage medium, including: parsing a bit stream to determine prediction decoding parameters of a current block; when the prediction decoding parameters indicate the use of an inter-frame geometric partitioning prediction mode GPM to determine the inter-frame prediction of the current block, determining the GPM mode parameters and curve partitioning information of the current block; based on the GPM mode parameters, determining a first reference block and a second reference block; based on the GPM mode parameters and the curve partitioning information, 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 first prediction parameter and the second prediction parameter, determining a prediction value of the current block.

Description

Inter prediction method, encoder, decoder, and computer-readable storage medium
Technical Field
Embodiments of the present application relate to video encoding techniques, and are related to, but not limited to, an inter prediction method, an encoder, a decoder, and a computer readable storage medium.
Background
In the process of encoding and decoding the current block in video encoding and decoding, besides intra-frame prediction, an inter-frame prediction mode can be adopted. Inter prediction may include motion estimation and motion compensation, and for the motion compensation, an inter geometric partition prediction mode (GPM, geometric Partitioning Mode) may be used to partition a current block between frames into two non-rectangular partitions (or two blocks) for prediction, and then perform weighted fusion, so as to obtain a predicted value of the current block.
Currently, in the prediction process of GPM, one rectangular block is divided into two blocks by one straight line. The geometric partitioning may be a partition coding unit or a partition prediction unit, collectively referred to herein 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 triangle and trapezoid combinations can be divided. Such geometric partitioning can bring the edges of the block closer to the edges of the object, or to the edges of the partitions where the two motion vectors are different, thus improving coding performance.
However, such (straight) geometric division cannot completely fit the edge of the object, or the edge of the partition with different motion vectors, and transition is used for the edge area where the geometric division is performed, and for some scenes, such as the existence of a large number of curves and arcs in a natural object, the straight division is still too hard, so that the performance of encoding and decoding is affected.
Disclosure of Invention
The embodiment of the application provides an inter-frame prediction method, an encoder, a decoder and a computer readable storage medium, which can improve the accuracy of encoding and decoding.
The technical scheme of the application is realized as follows:
The embodiment of the application provides an inter prediction method, which is applied to a decoder and comprises the following steps:
Analyzing the code stream and determining the predictive decoding parameters of the current block;
determining a GPM mode parameter and curve division information of the current block when the prediction decoding parameter indicates that 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 the second reference block based on the GPM mode parameter and the curve division information;
a prediction value of the current block is determined based on the first prediction parameter and the second prediction parameter.
The embodiment of the application also provides an inter-frame prediction method, which is applied to an encoder and comprises the following steps:
Determining a prediction mode parameter of the current block;
determining a GPM mode parameter and curve division information of the current block when the prediction mode parameter indicates that 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 the second reference block based on the GPM mode parameter and the curve division information;
a prediction value of the current block is determined 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 parameters of the current block;
A first determining unit for determining a GPM mode parameter and curve division information of a current block when the predictive decoding parameter indicates that inter prediction of the current block is determined using an inter geometric division prediction mode GPM; 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 dividing information;
And a first prediction unit configured to determine 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 a GPM mode parameter and curve division information of the current block when the prediction mode parameter indicates that inter prediction of the current block is determined using an inter geometric division prediction mode GPM; 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 dividing information;
and a second prediction unit configured to determine a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
The embodiment of the application also provides a decoder comprising a first processor and a first memory storing executable instructions of the first processor, the first memory being dependent on the first processor for performing operations via a communication bus, when the executable instructions are executed by the first processor, the inter prediction method of any one of claims 1 to 18.
An embodiment of the present application further provides an encoder comprising a second processor and a second memory storing executable instructions for the second processor, the second memory performing operations in dependence on the second processor via a communication bus, the executable instructions, when executed by the second processor, performing the inter prediction method of any of claims 19 to 42.
Embodiments of the present application provide a computer-readable storage medium storing executable instructions that, when executed by one or more first processors, perform the inter-prediction method at the decoder side, or that, when executed by one or more second processors, perform the inter-prediction method at the encoder side.
The embodiment of the application provides an inter-frame prediction method, an encoder, a decoder and a computer readable storage medium, which comprise the steps of analyzing a code stream, determining a prediction decoding parameter of a current block, determining GPM mode parameters and curve division information of the current block when the prediction decoding parameter indicates that inter-frame prediction of the current block is determined by using an inter-frame 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 the second reference block based on the GPM mode parameters and the curve division information, and determining a predicted value of the current block based on the first prediction parameter and the second prediction parameter. That is, in the embodiment of the present application, by adopting a curve division manner to predict the current block in the GPM mode, the divided boundary is more attached to the edge of the object or the edge of the portion with different motion vectors, thereby improving the accuracy of encoding and decoding.
Drawings
Fig. 1 is a schematic block diagram of a video coding system according to an embodiment of the present application;
fig. 2 is a schematic block diagram of a video decoding system according to an embodiment of the present application;
Fig. 3 is a schematic implementation flow chart of an inter prediction method according to an embodiment of the present application;
FIGS. 4a-4i are schematic diagrams illustrating a geometric partitioning method employed by an exemplary VVC according to embodiments of the present application;
FIG. 5 is a schematic diagram of the division angles of the geometric division of an exemplary VVC according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating the transformation of an exemplary straight line division line to a curved division line provided by an embodiment of the present application;
Fig. 7 is a schematic diagram of an implementation flow of another inter prediction method according to an embodiment of the present application;
fig. 8 is a second schematic implementation flow chart of another inter prediction method according to an embodiment of the present application;
fig. 9 is a schematic diagram of a decoder according to an embodiment of the present application;
fig. 10 is a schematic diagram of a decoder according to a second embodiment of the present application;
FIG. 11 is a schematic diagram of an encoder according to an embodiment of the present application;
fig. 12 is a schematic diagram of a second 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 accompanying 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, a Coding Unit 119, and a decoded image buffer Unit 110; for an input original video signal, a video reconstruction block may be obtained by partitioning a Coding Tree Unit (CTU), a Coding mode is determined by a mode selection and Coding control logic 113, and residual pixel information obtained after intra-or inter-prediction is then transformed by a transform Unit 111, a quantization Unit 112, comprising transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients for further reducing the bit rate, an intra prediction Unit 114 for intra-prediction of the video reconstruction block, wherein the intra prediction Unit 114 is adapted to determine an optimal intra prediction mode (i.e. a target prediction mode) for the video reconstruction block, an inter prediction Unit 115 is adapted to perform inter-prediction Coding of the received video reconstruction block with respect to one or more blocks of one or more reference frames to provide temporal prediction information, wherein the motion estimation is a process for generating motion vectors, which may estimate the motion of the video reconstruction block, and then the motion compensation is based on the motion vectors determined by the motion vectors, and an inter prediction Unit is further adapted to transmit the motion vector determined by the motion vector estimation Unit to the inter prediction Unit 119, and the inter prediction Unit is further adapted to determine the inter prediction mode for the inter prediction Unit 119, the inverse quantization unit 116 and the inverse transform unit 117 are used for reconstruction of the video reconstruction block, reconstructing a residual block in the pixel domain, the reconstructed residual block removing blocking artifacts by the loop filtering unit 118, and then adding the reconstructed residual block to a predictive block in the frame of the decoded image buffer unit 110 to generate a reconstructed video reconstruction block, and the encoding unit 119 is used for encoding various encoding parameters and quantized transform coefficients. And the decoded image buffer unit 110 is used for storing reconstructed video reconstruction blocks for prediction reference. As video image encoding proceeds, new reconstructed video reconstruction blocks are generated, and these reconstructed video reconstruction blocks are stored in the decoded image buffer unit 110.
An embodiment of the present application provides a video decoding system, fig. 2 is a schematic diagram of a composition structure of a video encoding system according to an embodiment of the present application, and as shown in fig. 2, the video encoding system 12 includes:
The decoding unit 121, the inverse transform unit 127 and the inverse quantization unit 122, the intra prediction unit 123, the motion compensation unit 124, the loop filtering unit 125 and the decoding image buffer unit 126 are used for generating prediction data of a current video decoding block based on the determined intra prediction direction and data of a previously decoded block from a current frame or picture, the motion compensation unit 124 is used for determining prediction information for the video decoding block by parsing motion vectors and other associated syntax elements and using the prediction information to generate a predictive block of the video decoding block being decoded, the code stream is input into the video decoding system 12 and is first passed through the decoding unit 121 for obtaining decoded transform coefficients, the transform coefficients are processed by the inverse transform unit 127 and the inverse quantization unit 122 to generate residual blocks in the pixel domain, the intra prediction unit 123 is used for generating prediction data of the current video decoding block based on the determined intra prediction direction and data of the previously decoded block from the current frame or picture, the motion compensation unit 124 is used for generating a predictive block of the video decoding block being decoded by parsing motion vectors and other associated syntax elements, the residual blocks from the inverse transform unit 127 and the inverse quantization unit 122 are summed with corresponding prediction blocks generated by the intra prediction unit 122 to generate a corresponding block of the video decoding block, and the motion compensation unit 125 is used for simultaneously recovering the video signal of the decoded image block from the reference frame or picture, the motion compensation unit is used for storing the decoded image signal, and the video signal is decoded by the motion compensation unit 126 is used for recovering the video block.
The inter-frame prediction method provided by the embodiment of the application is mainly applied to the inter-frame prediction unit 215 of the video coding system 11 and the inter-frame prediction unit of the video decoding system 12, namely the motion compensation unit 124, that is, if the video coding system 11 can obtain a better prediction effect through the inter-frame prediction method provided by the embodiment of the application, the video decoding recovery quality can be improved correspondingly at the decoding end.
Based on this, the technical scheme of the present application will be further described in detail below with reference to the accompanying drawings and examples. Before describing in detail, it should be observed that the references to "first", "second", "third", etc. throughout the specification are merely for distinguishing different features, and do not have the functions of defining priority, sequencing, size relationship, etc.
The embodiment of the application provides an inter prediction method, which is applied to video decoding equipment, namely a decoder. The functions performed by the method may be performed by a first processor in the video decoding device invoking program code, which of course may be stored in a first memory, as can be seen in the video decoding device comprising at least the first processor and the first memory.
Fig. 3 is a schematic flow chart of an implementation of an inter 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 parameters of the current block.
S102, when the prediction decoding parameter indicates that the inter prediction of the current block is determined by using the GPM, the GPM mode parameter and curve division information of the current block are determined.
S103, determining a first reference block and a second reference block based on the GPM mode parameter.
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 division information.
S105, determining a predicted value of the current block based on the first predicted parameter and the second predicted parameter.
In the embodiment of the application, in the process of decoding, the decoder can analyze the information such as the coding means adopted by the encoder in the process of coding, namely the predictive decoding parameters aiming at the current block, and the predictive mode decoded by the decoder can be various based on the diversity of the current coding mode.
When the decoder analyzes the code stream to obtain a prediction decoding parameter to indicate that the inter-frame geometric partition prediction mode GPM is used for determining the inter-frame prediction of the current block, the inter-frame prediction mode provided by the embodiment of the application is adopted to analyze the GPM mode parameter and curve partition information of the current block adopted in the encoding process from the code stream.
The GPM mode parameters include a division mode of the GPM and motion-related information. The division pattern of the GPM here may be 64 kinds.
In the embodiment of the 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 divided portions of the current block or other information related to the GPM is decoded.
For the curve division mode, the decoder may decode the curve division use flag in the code stream to directly determine, for example, the curve division use flag is 1 (the token is used), then the current block is represented by the curve division, and the translation amplitude and or the index of the curve shape transmitted in the code stream may be decoded, where the decoding order of the translation amplitude and the index of the curve shape may be omitted. If the curve partition use flag is 0 (the token is not used), decoding the curve partition information is stopped.
In the embodiment of the application, for the curve division mode, the decoder can decode the translation amplitude in the code stream to indirectly determine, if the translation amplitude is not 0 (representing that the curve division mode is used), the curve division is used, and the curve shape index is continuously decoded. If the translation amplitude is 0 (the characterization curve division mode is not used), the decoding curve division information is stopped. The decoding curve dividing information, the GPM dividing mode, the MV information used by the two dividing portions of the current block, or the GPM related other information may be combined in various ways, which is not limited by the embodiment of the present application. The decoding mode of the GPM, the information of the MVs used by the two divided parts of the current block, or other information related to the GPM is not limited in the present 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 of the image blocks to be decoded currently 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 in the video image that is currently to be predicted by the first image component, the second image component, or the third image component.
The current block may also be referred to as a luma block, assuming that the current block performs a first image component prediction and the first image component is a luma component, i.e., the image component to be predicted is a luma component, or a chroma block, assuming that the current block performs a second image component prediction and the second image component is a chroma component, i.e., the image component to be predicted is a chroma component.
It should be noted that the prediction mode parameter indicates the coding mode of the current block and the mode related parameter.
In the embodiment of the application, the dividing mode of the GPM can comprise angle index information, step index information, target dividing mode and the like, and the embodiment of the application is not limited.
It should be noted that, at present, GPM geometric division may divide any shape that can be calculated by a geometric function, and considering an application scenario and implementation complexity, an existing geometric division method divides a rectangular block into two blocks by a straight line. The geometric partition may be a partition coding unit (CU coding unit) or a partition prediction unit (PU prediction unit), collectively referred to herein 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 triangle, rectangle and trapezoid combinations can be divided. Typically, transitions are used for geometrically partitioned edge regions, such as using a weighted average method to use progressive coefficient transitions at the partitioned edges, so that the partitioned edges are not overly stiff. The geometric partitioning method adopted by the VVC at present. In the embodiment of the present application, the GPM divides an inter block (i.e., a current block) into two non-rectangular sub-blocks for prediction, and performs weighted fusion for the sub-blocks with respect to an edge portion of an object in an image. For example, a non-rectangular form may be as shown in FIGS. 4a-4i below.
As shown in fig. 5, the geometric division of VVC divides the angle of a circle into 32 parts, and the offset of the straight line from the center distance of the block can have 4 different values, one of which is 0, i.e., the straight line passes through the center of the block. The current VVC uses a part of angles in 32 angles, and the offset method is different according to the different angles, so that the mode that the part coincides with the existing binary tree such as the three-tree is also eliminated.
In the embodiment of the application, after the decoder acquires the GPM mode parameter and the curve dividing information of the current block, the decoder can determine the first reference block and the second reference block corresponding to different partitions based on the dividing mode and the motion related information of the GPM in the GPM mode parameter, and can 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 dividing information.
In the embodiment of the application, the first prediction parameter comprises a first weight value or first boundary position information, and the second prediction parameter comprises a second weight value or second boundary position information.
The first weight value and the second weight value are weight values corresponding to pixel points when GPM division is performed 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 the embodiment of the present application, the decoder determines, based on the GPM mode parameter and the curve dividing information, the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block, which may be divided into two modes based on the difference of the prediction parameters, as follows:
The first prediction parameter comprises a first weight value, the second prediction parameter comprises a second weight value, a decoder determines preset weight distribution corresponding to a current GPM mode according to GPM mode parameters, size information of the current block is determined, the preset weight distribution is updated according to the size information, the GPM mode parameters and curve dividing information to obtain curve weight distribution, and the first weight value and the second weight value are obtained according to the curve weight distribution.
The curve dividing information comprises translation amplitude and curve shape index, a decoder determines an offset direction according to GPM mode parameters, determines an offset according to size information, translation amplitude and curve shape index, and obtains updated curve weight of each pixel position after offset of preset weight of each pixel position in preset weight distribution according to the offset direction, so that curve weight distribution is obtained.
The second mode is that the first prediction parameters comprise first boundary position information, the second prediction parameters comprise second boundary position information, a decoder acquires size information of a current block, dividing boundary position information is determined based on GPM mode parameters and the size information, dividing boundary position information is shifted according to the GPM mode parameters, the size information and curve dividing information, curve dividing boundary position information is determined, and the first boundary position information and the second boundary position information are determined based on the curve dividing boundary position information.
The curve dividing information comprises translation amplitude and curve shape index, a decoder determines an offset direction according to GPM mode parameters, determines offset according to size information, translation amplitude and curve shape index, and obtains curve dividing boundary position information after offset of the position of each pixel point of dividing boundary position information according to the offset direction.
In the first mode, the preset weight distribution refers to an original mask corresponding to the GPM when the division mode adopts straight line division, the curve weight distribution is now based on weight distribution information corresponding to the curve division, and the translation calculation and update are performed on the preset weight distribution. The decoder mainly adopts size information, GPM mode parameters and curve dividing information to update preset weight distribution to obtain curve weight distribution, and in the curve weight distribution, 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 the current block are obtained.
In some embodiments of the present application, the decoder determines the offset direction based on the angle information in the GPM mode parameters, and determines the offset to be offset based on the size information, the translation magnitude, and the curve shape index.
In the second mode, the decoder may adopt a curve division mode for the current block, where the pixel value of the first reference block is a first prediction value, and the pixel value of the second reference block is a second prediction value for the portion of the first reference block, but in the boundary position, offset the pixel point on the respective boundary information of the first reference block and the second reference block to obtain first boundary position information and second boundary position information, and predict the pixel point on the boundary based on the first boundary position information and the second boundary position information.
It should be noted that, dividing the current block by using a GPM mode parameter, and obtaining dividing boundary position information of the current block based on the size information of the current block, at this time, the decoder determines an offset direction according to the GPM mode parameter, determines an offset according to the size information, the translation amplitude and the curve shape index, and obtains curve dividing boundary position information after shifting the position of each pixel point of the dividing boundary position information by the offset according to the offset direction.
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.
Illustratively, if the GPM uses a method of partitioning a CU or PU, a boundary of the partitioning is determined according to mode information and curve partition information of the GPM, etc. If the partition boundary determined from the mode information of the GPM is boundary, (x n,yn) is a point on boundary. The decoder determines the boundary of division as boundary ' and (x ' n,y′n) as a point on boundary ' based on the mode information, curve division information, etc. of the GPM.
Aiming at the implementation situation, in the embodiment of the application, the decoder determines the offset direction according to the GPM mode parameter, wherein the offset direction is determined to be the horizontal direction when the angle used by the GPM mode parameter for representing the GPM meets the horizontal judging condition, and the offset direction is determined to be the vertical direction when the angle used by the GPM mode parameter for representing the GPM meets the vertical flat judging condition.
In some embodiments of the application, the decoder determines the direction of the offset 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 the horizontal angle range, the horizontal discrimination condition is that the angle is within the vertical angle range, or other conditions than the horizontal discrimination condition are the vertical direction, and the embodiments of the present application do not limit the discrimination condition as long as the moving direction can be discriminated.
Illustratively, when the angle information in the GPM partitioning parameters, i.e., angle 4 to 12 does not include 12 or angle 20 to 28 does not include 28, the offset direction is a vertical direction, otherwise the offset direction is a horizontal direction, which is not limited by the embodiments of the present application. I.e. the vertical discrimination condition may be If ((angleIdx > = 4& & angleIdx < 12) | (angleIdx > = 20& & angleIdx < 28)).
The decoder determines a description of the offset based on the size information, the translation amplitude, and the curve shape index for the case of different offset approaches.
In an 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 a non-offset direction 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 curve shape indexes, 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 preset offset points is the number of points to be offset corresponding to different curve dividing modes, in the embodiment of the present application, the number of preset offset points may be 64, and the embodiment of the present application is not limited, and the greater the number of preset offset points, the better the curve dividing.
In the embodiment of the application, when the offset direction is a horizontal direction, the non-offset direction is a vertical direction, and when the offset direction is a vertical flat direction, the non-offset direction is a horizontal direction.
In an 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 application, the decoder determines, based on each pixel location, the length, and the number of preset offset points, that the first pixel location in the preset block is in the non-offset direction at each pixel location by determining a first scaling based on each pixel location, the length, and the number of preset offset points, determining a first sub-offset based on the length and the number of preset offset points, and determining the first pixel location in the preset block at each pixel location in the non-offset direction based on the first scaling and the first sub-offset.
In the embodiment of the application, the decoder multiplies the ordinate of each pixel position by the ratio of the number of preset offset points to the length to obtain a first scaling, or the decoder obtains the first scaling by using the logarithm based on 2 and shifting the number of the preset offset points and the length, the decoder obtains a first sub-offset according to the number of the preset offset points and the length (2), and 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., which is not limited in the embodiment of the present application.
For example, assume that the decoder obtains mask P' (CURVE weight distribution) according to the translation amplitude and CURVE shape used by CURVE division and mask P (preset weight distribution), let the translation amplitude be curveAmplitude, index curveIdx for CURVE shape used by translation, sum up the CURVE shapes num_curve, LUT (CURVE information) be curveFactor [ num_curve ] [ N ], where N, etc. Let the width of the current block be width, length be height, and angle used by the GPM.
If the current block uses the horizontal direction, P' for each pixel (x, y) is shown in equation (1) as follows:
P’[x][y]= P[x-offsetX][y] (1)
Wherein offsetX is the offset. The offset is obtained for equation (2) as follows:
offsetX= curveFactor[curveIdx][yN]* curveAmplitude *Scale1 (2)
Here curveFactor [ curveIdx ] [ y N ] is the first curve information, curveAmplitude is the translation amplitude, and Scale1 is the first movement Scale.
Here, the first movement ratio is obtained as formula (3), and y N is obtained as formula (4) as follows:
Scale1=width/N (3)
yN=y*N/height+offset1 (4)
Wherein offset1 is a first sub-offset, determined by equation (5), as follows:
Offset1=N/(2*height) (5)
It should be noted that x-offsetX does not exceed the normal current block range, such as 0-width-1.
In some embodiments of the present application, when the offset direction is a vertical direction, the decoder determines a second pixel position located in the preset block in a non-offset direction at each pixel position according to each pixel position, a width, and a number of preset offset points, wherein the non-offset direction is perpendicular to the offset direction, determines second curve information corresponding to the second pixel position according to the curve shape index, determines a second movement ratio based on the length and the number of preset offset points, and determines an offset according to the second curve information, the translation amplitude, and the second movement ratio, wherein the offset does not exceed the length of the current block.
In the embodiment of the application, the decoder multiplies the second curve information by the translation amplitude and the second movement proportion to obtain the offset.
In some embodiments of the application, the decoder determines, based on each pixel location, the width, and the number of preset offset points, that the second pixel location in the preset block is in the non-offset direction at each pixel location, by determining, based on each pixel location, the width, and the number of preset offset points, a second scaling, determining, based on the width and the number of preset offset points, a second sub-offset, and determining, based on the second scaling and the second sub-offset, the second pixel location in the preset block at each pixel location in the non-offset direction.
In the embodiment of the application, the decoder multiplies the abscissa of each pixel position by the ratio of the number of preset offset points to the width to obtain a second scaling, or the decoder obtains the second scaling by using the logarithm based on 2 and shifting the number of the preset offset points and the number of the preset offset points, the decoder obtains a second sub-offset according to the number of the preset offset points and the (2 x width), and finally, the decoder adds the second scaling and the second sub-offset to obtain the second pixel position.
For example, assume that the decoder obtains mask P' (CURVE weight distribution) according to the translation amplitude and CURVE shape used by CURVE division and mask P (preset weight distribution), let the translation amplitude be curveAmplitude, index curveIdx for CURVE shape used by translation, sum up the CURVE shapes num_curve, LUT (CURVE information) be curveFactor [ num_curve ] [ N ], where N, etc. Let the width of the current block be width, length be height, and angle used by the GPM.
If the current block uses the vertical direction, P' for each pixel (x, y) is shown in equation (6) as follows:
P’[x][y]= P[x][y-offsetY] (6)
wherein offsetY is the offset. The offset is obtained for equation (7) as follows:
offsetX= curveFactor[curveIdx][xN]* curveAmplitude *Scale2 (7)
Here curveFactor [ curveIdx ] [ x N ] is the second curve information, curveAmplitude is the translation amplitude, and Scale2 is the second movement Scale.
Here, the second movement ratio is obtained for equation (8), and x N is obtained for equation (9) as follows:
Scale2= height /N (8)
xN=x*N/ width +offset2 (9)
wherein offset2 is the second sub-offset, determined by equation (10), as follows:
offset2=N/(2* width) (10)
it should be noted that y-offsetY does not exceed the normal current block range, e.g., 0-height-1.
Based on the two offset directions, the offset process is expressed in another expression mode:
If((angleIdx>=4&&angleIdx<12)||(angleIdx>=20&&angleIdx<28))
offsetCX=0
offsetCY=curveFactor[curveIdx][xL*N/nW+N/2nW]*curveAmplitude*nH/N
Otherwise(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, angleIdx is the angular index.
In some embodiments of the present application, the decoder may further determine a position (x ', y') of each pixel (x, y) of the current block on a preset weight distribution according to a translation amplitude and a curve shape used by the curve division, and calculate predSamples [ x ] [ y ] for each pixel (x, y) based on the preset weight distribution, the offset direction and the offset amount when calculating the required P [ x '] [ y' ] in the re-time.
Exemplary, if the current block uses a horizontal direction, x '=x-offsetX, y' =y
If the current block uses the vertical direction, x '=x, y' =y-offsetY
Wherein offsetX and offsetY are the same as obtained 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 Px y at the time of 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 the curve dividing method, the embodiment of the present application is not limited, and the final object is consistent.
After the decoder obtains the first weight value and the second weight value in the 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 combined with the second pixel value of the second reference block.
In the embodiment of the application, the decoder performs weighted summation 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 predicted 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 dividing mode of GPM, each pixel position (x, y) on the mask has a value P [ x ] [ y ] to mark the weight on the first reference block (x, y), M is the sum of the weights of the corresponding positions of the two reference blocks, and then the weight on the second reference block (x, y) is M-P [ x ] [ y ]. The decoder obtains mask P' based on the translation magnitude and curve shape used by the curve division and mask P.
This is that the predicted value of one pixel point (x, y) of the current block is as shown in formula (11):
predSamples[x][y]=(P’[x][y]*predSamplesLA[x][y]+(M-P’[x][y])*predSamplesLB
[x][y])/M(11)
Wherein predSamples [ x ] [ y ] is the predicted value of one pixel (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 may be written in a right-shifted form. If predSamples x y exceeds the normal range, processing to within the range is required, and the application is not limited in this regard.
After obtaining the first boundary position information and the second boundary position information in the second mode, the decoder determines the predicted value of the current block based on the first predicted parameter and the second predicted parameter by dividing the current block according to the first boundary position information and the second boundary position information to obtain the first block and the second block, predicting the first block based on the first pixel value of the first reference block, and predicting the second block based on the second pixel value of the second reference block, thereby determining the predicted value of the current block.
It can be understood that the decoder predicts the current block by adopting a curve division manner in the GPM mode, so that the divided boundary is more attached to the edge of the object or the edge of the part with different motion vectors, thereby improving the coding and decoding precision.
After obtaining the predicted block of the current block, the decoder decodes the residual information of the current block, including decoding coefficients, inverse-quantizes the residual block to obtain the residual block, and adds the residual block to the predicted block to obtain the decoded block of the current block.
The inter prediction provided by the embodiment of the application adopts a curve division mode.
In the embodiment of the application, the curve dividing information is one dividing mode in curve dividing, and the curve dividing is to translate pixel points on a direct dividing line in the preset straight line geometric dividing to obtain continuous curve dividing lines to realize geometric dividing.
In some embodiments of the present application, each pixel of the linear dividing line is translated continuously according to different movement distances and the same movement direction to obtain a curved dividing line, or each pixel of the linear dividing line is translated continuously according to different movement vectors to obtain a curved dividing line.
That is, points on a straight line segment (the straight line is a line segment) translate in the same direction, the translation distance of each point is not the same, the distance between adjacent points is not different, and a curve segment can be obtained by keeping the line continuous. Or translating the points on a straight line segment, wherein the translation vectors of each point are not identical, the vector difference of the movement of the adjacent points is not large, the continuity of the line is maintained, and a curve segment can be obtained. For video encoding and decoding, the straight line is composed of points with pixel positions on the same straight line or approximately on the same straight line, the points are translated in the same direction, the translation distance of each point is not the same, and the distance of the adjacent points accords with a certain requirement, so that a curve segment can be obtained. And translating the points, wherein the translation vectors of each point are not identical, and the moving distance of the adjacent points meets a certain requirement, so that a curve segment can be obtained.
Illustratively, as shown in the schematic diagram of the transformation from a straight line to a curve in fig. 6, the points on the boundary lines of two blocks in the geometric division are translated according to the arrow method shown in the above diagram, the boundary lines may become curve segments, and the straight line division may become curve division. The transition region of the straight line segment may become the transition region of the curved line segment by translating the point on the transition region near the parting line as described above. For the method of geometric division implemented by the mask, the values of points on the mask are translated according to the method, and the mask with linear geometric division can be changed into the mask with curve geometric division.
In some embodiments of the present application, the moving distance is a distance between a corresponding pixel position on a preset curve shape and a straight dividing line, and the moving 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, LUT (look up table) storage curves may be used to divide the corresponding preset vectors or preset distances.
In the embodiment of the present application, it is assumed that all points move in the same direction (horizontal direction, vertical direction, or some other direction), the moving distances of a plurality of points are saved for one curve shape in the LUT, and one or more curve shapes can be saved in the LUT. The curve shape is the shape of the curve itself, and the curve after a straight line is translated in a certain direction along the curve direction is not necessarily the same as the shape of the curve itself. If the divided line segments are to be translated according to a certain curve shape, each point on the line segments finds the corresponding position in the corresponding curve shape in the LUT, and moves according to the indicated moving distance in the set direction, so that the point can be limited not to exceed a certain boundary after moving. If the mask divided by the straight line is changed into the mask divided by the curve, after the translation direction is determined, the values of different points perpendicular to the translation direction on the mask are respectively moved according to the moving distance of the corresponding position on the LUT, and the values of the points on the mask which are the same with the translation direction are respectively moved according to the same moving distance. It is understood that the new curve divided mask is obtained with reference to a straight divided mask.
In some embodiments of the application, points outside the desired range may be discarded, or the point may be restricted from moving beyond a certain boundary. Whereas the missing dot values are complemented by the original values of the edges of the valid range.
In some embodiments of the application, the values of points of the curved mask find the corresponding values of points from the straight mask in the opposite direction and distance it should move, and if the points to be found exceed the effective limit, the values of points on the limit on the same straight line as the direction of movement are substituted.
In some embodiments of the application, one or more curve shapes may be stored in the LUT, provided that not all points move in the same direction, and that the motion vectors of several points are stored for one curve shape in the LUT. If the divided line segments are to be translated according to a certain curve shape, each point on the line segments finds the corresponding position in the corresponding curve shape in the LUT and moves according to the indicated movement vector. Because of the discontinuities caused by movement, it may be desirable to supplement points at the location of the discontinuities to maintain the continuity of the curve. If the mask divided by the straight line is changed into the mask divided by the curve, after the translation direction is determined, the values of different points in a certain direction on the mask can be respectively moved according to the movement vectors of the corresponding positions on the LUT, and the values of the points are complemented at the places causing discontinuity. The values of points on the mask in the same vertical direction as the above direction are moved according to the same movement vector. The values of the points are supplemented where the discontinuities are caused. Values for points outside the desired range are discarded, and the values for points may be limited to move beyond a certain boundary. Whereas the missing dot values are complemented with the original values of the edges of the desired range.
In some embodiments of the application, the direction of movement is formed by a combination of horizontal and vertical directions, or the direction of movement is related to the dividing direction of the GPM.
In some embodiments of the present application, interpolation or rounding of the sub-pixel positions is performed when the movement distance is not a whole pixel, or the movement distance is positively correlated with the length of the current block, or the movement distance is positively correlated with the smallest value among the length and width of the current block.
In some embodiments of the present application, the direction of movement may be horizontal or vertical, or any other direction. Assuming that the direction of movement is not horizontal or vertical, it is possible to split movement in both horizontal and vertical directions.
Exemplary, a 45 direction shift of 2 pixel distances can be split into a horizontal 0 direction shiftA pixel distance plus a vertical 90 degree movementA pixel distance.
In the embodiment of the present application, for the case that the moving distance is not a whole pixel, one possible implementation is to take an approximate whole pixel position, such as a rounding operation, and one possible implementation is to interpolate the fractional pixel position.
By way of example only, and not by way of limitation,The pixel distance may be approximately 1 pixel distance or 2 pixel distances, or 1.5 pixel distances or 1.4 pixel distances. Values of 1.5 pixel distances or 1.4 pixel distances need to be interpolated. Other angles can be split into horizontal and vertical movements according to trigonometric functions or pre-calculated ratios. The horizontal movement direction may represent a 0 ° direction negative value representing a 180 ° direction, and the vertical movement direction may represent a 90 ° direction negative value representing a 270 ° direction.
In the embodiment of the application, one possible implementation way is to use only the horizontal moving direction plus the vertical moving direction, and one possible implementation way is to use only the horizontal moving direction plus the vertical moving direction plus 45 degrees, 135 degrees, 225 degrees and 315 degrees moving directions. Wherein, the movement directions of 45 DEG, 135 DEG, 225 DEG and 315 DEG can be decomposed into the movement with equal values in the horizontal vertical direction, and the 4 angles can be represented by signs in the horizontal vertical direction, and one possible implementation way is to use various angle directions.
It should be noted that the direction of movement may be related to the dividing direction of the GPM. In the case of movement in only the horizontal direction and the vertical direction, if the straight angle used for the GPM straight line division is horizontal or nearly horizontal, the curve division uses the vertical movement direction, and if the straight angle used for the GPM straight line division is vertical or nearly vertical, the curve division uses the horizontal movement direction. More generally, some thresholds may be set, with horizontal movement directions being used within a certain threshold range at straight angles or division patterns used for division, and vertical movement directions being used within another range. The same principle is that in the case of using only the horizontal moving direction plus the vertical moving direction plus the moving direction of 45 °, 135 °, 225 °, 315 °, or a plurality of moving directions, a threshold range is set at a straight angle or a divided-use mode to distinguish the use range of each moving direction.
It should be noted that the movement distance may be related to the length and width of the current block. One possible implementation is that the distance moved is proportional to the length of the current block in the same direction as the current movement direction. For example, if the current block has a length of 64 in the same direction as the current moving direction, the distance that all points of the current block move is the value that it finds in the LUT. If the length of the current block in the same direction as the current moving direction is 32, the distance that all points of the current block move is 1/2 of the value that 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 application, different translation amplitudes can be set, namely 1/4 times, 1/2 times, 1 times, 2 times and the like. If the current block selects 1/4 times, then all points of the current block move 1/4 times the distance they have found in the LUT. The translation amplitude may be 0 times, i.e. the distance of movement of all points of the current block is 0, at which point the curve division does not actually work. The translation amplitude being negative indicates that the direction of movement is performed in the opposite direction to the original direction.
That is, the translation amplitude is a multiple relationship of the actual movement distance or movement vector, or an equal ratio relationship.
In some embodiments of the 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 not identical, the difference of the motion vectors of adjacent points is not large, the continuity of the line is maintained, and a curve segment can be obtained.
For video encoding and decoding, the straight line is composed of points with pixel positions on the same straight line or approximately on the same straight line, the points are translated in the same direction, the translation distance of each point is not the same, and the distance of the adjacent points accords with a certain requirement, so that a curve segment can be obtained. And translating the points, wherein the translation vectors of each point are not identical, and the moving distance of the adjacent points meets a certain requirement, so that a curve segment can be obtained.
Assuming that not all points move in the same direction, the LUT stores the motion vectors of several points for one curve shape (one or more curve shape related information may be stored in the LUT). If the divided line segments are to be translated according to a certain curve shape, each point on the line segments finds the corresponding position in the corresponding curve shape in the LUT and moves according to the indicated movement vector. Because of the discontinuities caused by movement, it may be desirable to supplement points at the location of the discontinuities to maintain the continuity of the curve. If the mask divided by the straight line is changed into the mask divided by the curve, after the translation direction is determined, the values of different points in a certain direction on the mask can be respectively moved according to the movement vectors of the corresponding positions on the LUT, and the values of the points are complemented at the places causing discontinuity. The values of points on the mask in the same vertical direction as the above direction are moved according to the same movement vector. The values of the points are supplemented where the discontinuities are caused. The value of the point beyond the required range is discarded, or the value of the point can be limited to be beyond a certain boundary after being moved, and the missing value of the point can be complemented according to the original value of the edge of the required range.
In an embodiment of the application, the distance of translation or translation vector is determined using a LUT.
It can be understood that the curve geometric division is realized by using the translation method, so that the boundary of the division is more flexible and is more fit with the edge of the object or the edge of the part with different motion vectors, thereby improving the coding performance, and the translation method has low complexity for realizing the curve geometric division and is easy to realize.
The embodiment of the application provides an inter prediction method, which is applied to video coding equipment, namely an encoder. The functions performed by the method may be performed by a second processor in the video encoding device invoking program code, which of course may be stored in a second memory, as can be seen in the video encoding device comprising at least the second processor and the second memory.
Fig. 7 is a schematic flow chart of an implementation of an inter prediction method according to an embodiment of the present application, as shown in fig. 7, the method includes:
s201, determining a prediction mode parameter of the current block.
S202, when the prediction mode parameter indicates that inter prediction of the current block is determined by using the inter geometric partition prediction mode GPM, the GPM mode parameter and curve partition information of the current block are determined.
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 division information.
S205, determining a predicted value of the current block based on the first predicted parameter and the second predicted parameter.
In the embodiment of the application, a video image can be divided into a plurality of image blocks, each image Block to be coded currently can be called a Coding Block (CB), wherein each Coding Block can comprise a first image component, a second image component and a third image component, and the current Block is the Coding Block to be predicted currently in the video image for the first image component, the second image component or the third image component.
The current block may also be referred to as a luma block, assuming that the current block performs a first image component prediction and the first image component is a luma component, i.e., the image component to be predicted is a luma component, or a chroma block, assuming that the current block performs a second image component prediction and the second image component is a chroma component, i.e., the image component to be predicted is a chroma component.
In some embodiments of the application, the encoder determines the prediction mode parameters of the current block by determining the image component to be predicted of the current block, performing predictive coding on the image component to be predicted by utilizing a plurality of prediction modes based on the parameters of the current block, calculating a rate distortion cost result corresponding to each prediction mode in the plurality of prediction modes, selecting a minimum rate distortion cost result from the plurality of calculated rate distortion cost results, and determining the prediction mode corresponding to the minimum rate distortion cost result as the prediction mode parameters of the current block.
The prediction mode parameter indicates the coding mode of the current block and the parameter related to the mode. The prediction mode parameters of the current block may be generally determined in a rate-distortion optimized (Rate Distortion Optimization, RDO) manner.
In some embodiments of the application, the encoder determines the prediction mode parameters of the current block by determining the image component to be predicted of the current block, performing predictive coding on the image component to be predicted by utilizing a plurality of prediction modes based on the parameters of the current block, calculating a rate distortion cost result corresponding to each prediction mode in the plurality of prediction modes, selecting a minimum rate distortion cost result from the plurality of calculated rate distortion cost results, and determining the prediction mode corresponding to the minimum rate distortion cost result as the prediction mode parameters of the current block.
That is, on the encoder side, the image component to be predicted may be encoded separately for the current block using a plurality of prediction modes. Here, the plurality of prediction modes generally include an inter prediction mode, a conventional Intra prediction mode, and a non-conventional Intra prediction mode, and the conventional Intra prediction mode may include a Direct Current (DC) mode, a PLANAR (PLANAR) mode, an angle mode, and the like, and the non-conventional Intra prediction mode may include a MIP mode, a Cross-component linear model prediction (Cross-component Linear Model Prediction, CCLM) mode, an Intra Block Copy (IBC) mode, a PLT (Palette) mode, and the like, and the inter prediction mode may include an inter geometric partition prediction mode (GPM), a triangular prediction mode (Triangle partition mode, TPM), and the like. In the embodiment of the application, the method further comprises a curve division mode, wherein in the embodiment of the application, all curve division information of curve division is stored in the LUT.
The method comprises the steps of obtaining a rate distortion cost result corresponding to each prediction mode after the current block is coded by utilizing a plurality of prediction modes, selecting a minimum rate distortion cost result from the obtained plurality of rate distortion cost results, determining the prediction mode corresponding to the minimum rate distortion cost result as a prediction mode parameter of the current block, and finally coding the current block by utilizing the determined prediction mode.
In the embodiment of the application, since a plurality of prediction modes can be provided, and a plurality of specific division modes can be provided in one prediction mode, it is necessary to traverse all prediction modes first, then traverse each prediction mode, and then traverse the division modes. The multiple prediction modes in the embodiment of the application comprise GPM modes, and the application is realized under the scene based on the GPM prediction modes.
In the embodiment of the application, when a plurality of prediction modes comprise GPM modes, the process of calculating the rate distortion cost result corresponding to the GPM prediction modes by the encoder can be that the encoder acquires a motion related information set corresponding to the current block, traverses each piece of motion related information in the motion related information set by adopting each GPM division mode in the GPM division modes, and traverses each GPM mode by adopting the curve division mode to obtain the rate distortion cost result corresponding to the GPM prediction modes.
It should be noted that each motion related information may be two MVs, and embodiments of the present application are not limited. The motion related information is stored in a merge list.
In the embodiment of the 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, all possible GPM partitioning patterns for each mv combination, and all curve partitioning patterns for each GPM partitioning pattern, including all translation magnitudes and curve shapes. And obtaining actual coding cost (rate distortion cost result) for each possible case, and taking the GPM dividing mode and the curve dividing mode corresponding to the optimal coding cost (namely the minimum rate distortion cost result) as the GPM mode and the curve dividing mode of the current block.
In the embodiment of the present application, the cost of the cost=sad+ bitcost or the cost=satd+ bitcost is used as the encoding cost for each possible case, where SAD is Sum of Absolute Difference, SATD is Sum of Absolute Transformed Difference, bitcost is the cost of encoding the flag bit, etc.
In some embodiments of the present application, when the multiple prediction modes include a GPM mode, the process of calculating the rate-distortion cost result corresponding to the GPM prediction mode by the encoder may include the encoder obtaining a motion-related information set corresponding to the current block, traversing each motion-related information in the motion-related information set in the GPM partition mode to obtain a first rate-distortion cost result corresponding to the GPM partition mode, and traversing the curve partition mode for at least one target GPM partition mode with the lowest first 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 partitioning modes for each mv combination, and takes the cost of cost=sad+ bitcost or cost=satd+ bitcost for each possible case as the encoding cost. And traversing all curve dividing modes for each GPM dividing mode by taking the GPM dividing modes with the optimal coding cost, wherein the GPM dividing modes comprise all translation amplitudes and curve shapes. The cost of cost=sad+ bitcost or cost=satd+ bitcost is used as the coding cost for each possible case. And taking the GPM dividing mode and the curve dividing mode of the optimal coding cost as the GPM mode of the current block and the curve dividing 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 that the decoding side adopts curve partition information to perform offset, and will not be repeated here.
In the embodiment of the application, the encoder determines the optimal coding cost, namely the GPM mode parameter and curve dividing information of the current block corresponding to the rate distortion cost result, so that the encoder can determine the first reference block and the second reference block corresponding to the motion related information based on the GPM mode parameter, and can determine the first prediction parameter and the second prediction parameter corresponding to the first reference block based on the GPM mode parameter and the curve dividing information. Finally, the encoder determines a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
In the embodiment of the application, the first prediction parameter comprises a first weight value or first boundary position information, and the second prediction parameter comprises a second weight value or second boundary position information.
The first weight value and the second weight value are weight values corresponding to pixel points when GPM division is performed 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 the embodiment of the present application, the encoder determines, based on the GPM mode parameter and the curve dividing information, the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block, which may be divided into two modes based on the difference of the prediction parameters, as follows:
The first prediction parameter comprises a first weight value, the second prediction parameter comprises a second weight value, an encoder determines preset weight distribution corresponding to a current GPM mode according to a GPM mode parameter, size information of the current block is determined, the preset weight distribution is updated according to the size information, the GPM mode parameter and curve dividing information to obtain curve weight distribution, and the first weight value and the second weight value are obtained according to the curve weight distribution.
The curve dividing information comprises translation amplitude and curve shape index, an encoder determines an offset direction according to GPM mode parameters, determines an offset according to size information, translation amplitude and curve shape index, and obtains updated curve weight of each pixel position after offset of preset weight of each pixel position in preset weight distribution according to the offset direction, so that curve weight distribution is obtained.
The second mode is that the first prediction parameters comprise first boundary position information, the second prediction parameters comprise second boundary position information, an encoder acquires size information of a current block, dividing boundary position information is determined based on GPM mode parameters and the size information, dividing boundary position information is shifted according to the GPM mode parameters, the size information and curve dividing information, curve dividing boundary position information is determined, and the first boundary position information and the second boundary position information are determined based on the curve dividing boundary position information.
The curve dividing information comprises translation amplitude and curve shape index, an encoder determines an offset direction according to GPM mode parameters, determines offset according to size information, translation amplitude and curve shape index, and obtains curve dividing boundary position information after offset of the position of each pixel point of dividing boundary position information according to the offset direction.
In the first mode, the preset weight distribution refers to an original mask corresponding to the GPM when the division mode adopts straight line division, the curve weight distribution is now based on weight distribution information corresponding to the curve division, and the translation calculation and update are performed on the preset weight distribution. The encoder mainly adopts size information, GPM mode parameters and curve dividing information to update preset weight distribution to obtain curve weight distribution, and 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 the current block are obtained from the curve weight distribution.
In some embodiments of the present application, the encoder determines the offset direction based on the angle information in the GPM mode parameters and determines the offset to be offset based on the size information, the translation magnitude, and the curve shape index.
In the second mode, the encoder may adopt a curve division mode for the current block, where the pixel value of the first reference block is a first prediction value, and the pixel value of the second reference block is a second prediction value for the portion of the first reference block, but in the boundary position, offset the pixel point on the respective boundary information of the first reference block and the second reference block to obtain first boundary position information and second boundary position information, and predict the pixel point on the boundary based on the first boundary position information and the second boundary position information.
The encoder adopts GPM mode parameters to divide the current block, and can obtain dividing boundary position information of the current block based on the size information of the current block, at the moment, the encoder determines an offset direction according to the GPM mode parameters, determines offset according to the size information, the translation amplitude and the curve shape index, and obtains curve dividing boundary position information after offset of the position of each pixel point of the dividing boundary position information according to the offset direction.
Aiming at the implementation situation, in the embodiment of the application, the encoder determines the offset direction according to the GPM mode parameter by determining the offset direction to be the horizontal direction when the angle used by the GPM mode parameter for representing the GPM meets the horizontal judging condition, and determining the offset direction to be the vertical direction when the angle used by the GPM mode parameter for representing the GPM meets the vertical flat judging condition.
The encoder determines a description of the offset based on the size information, the translational amplitude, and the curve shape index for different offset scenarios.
In an 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 the preset block in the non-offset direction at 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, determines first curve information corresponding to the first pixel position according to the curve shape index, determines a first movement proportion based on the width and the number of preset offset points, and determines 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 location, the length, and the number of preset offset points, that the first pixel location in the preset block is in the non-offset direction at each pixel location by determining a first scaling based on each pixel location, the length, and the number of preset offset points, determining a first sub-offset based on the length and the number of preset offset points, and determining the first pixel location in the preset block at each pixel location in the non-offset direction based on the first scaling and the first sub-offset.
In some embodiments of the present application, when the offset direction is a vertical direction, the encoder determines a second pixel position located in the preset block in a non-offset direction at each pixel position according to each pixel position, a width, and a number of preset offset points, wherein the non-offset direction is perpendicular to the offset direction, determines second curve information corresponding to the second pixel position according to the curve shape index, determines a second movement ratio based on the length and the number of preset offset points, and determines an offset according to the second curve information, the translation amplitude, and the second movement ratio, wherein the offset does not exceed the length of the current block.
In an embodiment of the application, the encoder multiplies the second curve information by the translation amplitude and the second movement proportion to obtain the offset.
In some embodiments of the application, the encoder determines that the second pixel position in the preset block is in the non-offset direction at each pixel position according to the number of the preset offset points, the width and the number of the width, the encoder determines the second sub-offset amount according to the number of the preset offset points and the width according to the second scaling, and determines the second pixel position in the preset block at each pixel position in the non-offset direction based on the second scaling and the second sub-offset amount.
Further, 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 as soon as the encoder obtains the first weight value and the second weight value.
In the embodiment of the application, the encoder performs weighted sum average 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 predicted 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, predicts the first block based on a first pixel value of a first reference block, and predicts the second block based on a second pixel value of a second reference block, thereby determining a predicted value of the current block.
The inter prediction provided by the embodiment of the application adopts a curve division mode.
In the embodiment of the application, the curve dividing information is one dividing mode in curve dividing, and the curve dividing is to translate pixel points on a direct dividing line in the preset straight line geometric dividing to obtain continuous curve dividing lines to realize geometric dividing.
In some embodiments of the present application, each pixel of the linear dividing line is translated continuously according to different movement distances and the same movement direction to obtain a curved dividing line, or each pixel of the linear dividing line is translated continuously according to different movement vectors to obtain a curved dividing 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 a straight dividing line, and the moving vector is a preset vector corresponding to the pixel position on the preset curve shape.
In some embodiments of the application, the direction of movement is formed by a combination of horizontal and vertical directions, or the direction of movement is related to the dividing direction of the GPM.
In some embodiments of the present application, interpolation or rounding of the sub-pixel positions is performed when the movement distance is not a whole pixel, or the movement distance is positively correlated with the length of the current block, or the movement distance is positively correlated with the smallest value among the length and 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, and the same explanation will not be repeated here.
In some embodiments of the present application, if the method of dividing the CU or PU is used when the encoder performs the GPM division, the encoder needs to determine whether the current block uses the GPM division mode (or the GPM prediction mode) and the curve division mode.
In the embodiment of the present application, the encoder may traverse all the GPM partition modes and the curve partition modes, and for each possible case, separately encode the partitioned CU or PU, where there may be a process of iteratively encoding the CU or PU of the next layer, 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 appreciated that the encoder predicts the current block by adopting a curve division manner in the GPM mode, so that the divided boundary is more attached to the edge of the object or the edge of the part 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.
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.
S207, the curve division using mark and the encoded curve division information are input into the code stream.
In the embodiment of the application, after determining the minimum rate-distortion cost result, if the corresponding prediction mode of the minimum rate-distortion cost result is the curve division mode in the GPM prediction mode, the encoder can generate the curve division use flag according to the curve division information and encode the curve division information, and finally, the encoder inputs the curve division use flag and the encoded curve division information into a code stream for use in decoding of a decoder. However, in the present application, it is also possible to write only the encoded curve division information into the code stream for decoding by the decoder, and the embodiment of the present application is not limited.
In some embodiments of the present application, the curve division information includes a translation amplitude and a curve shape index, and the encoder may generate a curve division use flag according to the translation amplitude, encode the translation amplitude and the curve shape index when the curve division use flag is used, and obtain encoded curve division information. When the curve partition use flag representation is not used, then the encoding translation amplitude and curve shape index are stopped.
In some embodiments of the present application, the encoder may further encode the translation amplitude to obtain an encoded translation amplitude, encode the curve shape index to obtain an encoded curve shape index when the translation amplitude is characterized by using curve partitioning, wherein the encoded translation amplitude and the encoded curve shape index are encoded curve partitioning information, and stop encoding the curve shape index when the translation amplitude is characterized by using curve partitioning and not using curve partitioning.
It should be noted that, in the embodiment of the present application, the encoder may use the GPM usage flag or derive whether the GPM is used through other flags. If the current block uses the GPM mode, information of the partition mode of the selected GPM is encoded. Method of encoder GPM mode the present application is not limited.
In the embodiment of the application, the encoder needs to judge whether the GPM is used or not according to other marks. If the current block uses the selected GPM mode, coding the partition mode information of the selected GPM, and coding the information of MVs used by two partition parts of the current block or other information related to the GPM, wherein the method for coding the GPM mode is not limited by the application.
In the embodiment of the application, for the curve division mode, whether a curve division use mark represents a curve division mode is adopted or not, wherein the curve division use mark can be determined according to the translation amplitude, when the translation amplitude exists, the curve division use mark is generated as a used mark, when the translation amplitude does not exist or is smaller than a certain value, the curve division use mark is generated as a unused mark, and curve division information is not coded. Wherein the translation amplitude is determined based on the movement distance and the movement vector.
Illustratively, if the translation amplitude is not 0, the code curve division use flag is 1, and the translation amplitude and the curve shape index are coded, wherein the coding order of the translation amplitude and the curve shape index is not limited. If the translation amplitude is not 0, the code curve division use flag is 0, and the code curve division information is stopped.
In some embodiments of the present application, the encoder may first encode the translational amplitude, and if the translational amplitude is not 0 (e.g., 1), then continue encoding the index of the curve shape using curve partitioning. If the translation amplitude is 0, the coding curve division information is stopped.
It should be noted that, there may be various combinations of the information of the coding curve partition, the partition mode of the GPM, and the order of the information of the MVs used by the two partition portions of the current block or other information related to the GPM, which is not limited by the present application. Coding of the information of the MVs used by the two divided portions of the current block or other information related to the GPM is not limited by the division mode of the GPM.
That is, on the premise that the current block is used by the GPM, how to judge whether curve division is used or not. One possible implementation is to use a curve division use flag, in which the range of translation amplitudes does not include 0. 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, multiple curve shapes may be used for curve division, and each curve shape may be represented as an array in the LUT (i.e., all the curve division information is stored). If it is determined that curve partitioning is to be used, a curve shape index needs to be used to determine which curve shape to use. The curve shapes that can be used for curve division may be different according to the GPM division mode, and the curve shapes index the indexes among the available shapes. If curve division cannot be used in a certain GPM division mode, the use of a curve division use flag, a shift amplitude, an index of a curve shape, and the like are not required in the GPM mode. If only one curve shape can be used in a certain GPM partitioning mode, the curve shape index may not be used in the GPM mode.
It can be understood that when the encoder adopts the curve division mode to encode the current block, parameters related to curve division can be written into the code stream for use in decoding, so that the decoding efficiency is improved.
The following describes the inter prediction part provided by the embodiment of the present application, taking VVC draft8 as an example, and the following underlined part is a main improvement point.
Merge data syntax
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 followingapplies:
offsetCX=0
offsetCY=curveFactor[curveIdx][xL*N/nW+N/2nW]* curveAmplitude*nH/N
-Otherwise (shiftHor is equal to 1), the following 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
Wherein, one possible implementation is 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 a current block when the predictive decoding parameter indicates that inter prediction of the current block is determined using an inter geometric division prediction mode GPM; 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 dividing information;
a first prediction unit 12 for determining a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
In some embodiments of the application, the first prediction parameter comprises a first weight value or first boundary position information and the second prediction parameter comprises 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, and the second prediction parameter comprises a second weight value;
The first determining unit 11 is further configured to determine a preset weight distribution corresponding to a current GPM mode according to the GPM mode parameter, determine size information of the current block, update the preset weight distribution according to the size information, the GPM mode parameter and the curve dividing information to obtain a curve weight distribution, and obtain the first weight value and the second weight value according to the curve weight distribution.
In some embodiments of the present application, the curve dividing information includes a translation amplitude and a curve shape index, the first determining unit 11 is further configured to determine an offset direction according to the GPM mode parameter, determine an offset according to the size information, the translation amplitude and the curve shape index, and obtain an updated curve weight of each pixel position after shifting a preset weight of each pixel position in the preset weight distribution by the offset according to the offset direction, thereby obtaining the curve weight distribution.
In some embodiments of the present application, the first prediction unit 12 is further configured to determine a prediction value of the current block by using 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 some embodiments of the application, the first prediction parameter comprises first boundary position information; the second prediction parameter includes second boundary position information;
The first determining unit 11 is further configured to obtain size information of the current block, determine partition boundary position information based on the GPM mode parameter and the size information, offset the partition boundary position information according to the GPM mode parameter, the size information, and the curve partition information, determine curve partition boundary position information, and determine the first boundary position information and the second boundary position information based on the curve partition 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, predict the first block based on a first pixel value of a first reference block, and predict the second block based on a second pixel value of a second reference block, thereby determining a predicted value of the current block.
In some embodiments of the present application, the curve dividing information includes a translation amplitude and a curve shape index, the first determining unit 11 is further configured to determine an offset direction according to the GPM mode parameter, determine an offset according to the size information, the translation amplitude and the curve shape index, and obtain the curve dividing boundary position information after shifting a position of each pixel point of the dividing boundary position information by the offset according to the offset direction.
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 the angle used by the GPM mode parameter for characterizing the GPM meets a horizontal criterion, and determine that the offset direction is a vertical direction when the angle used by the GPM mode parameter for characterizing the GPM meets a vertical flat criterion.
In some embodiments of the 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 located in a preset block in a non-offset direction of each pixel position according to the pixel position, the length, and the number of preset offset points, where the non-offset direction is perpendicular to the offset direction, determine first curve information corresponding to the first pixel position according to the curve shape index, determine a first movement ratio based on the width and the number of preset offset points, and determine the offset amount according to the first curve information, the translation amplitude, and the first movement ratio, where the offset amount 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 according to the each pixel position, the length, and the number of preset offset points, determine a first sub-offset according to the length and the number of preset offset points, and determine the first pixel position in the preset block in the non-offset direction of the each pixel position based on the first scaling and the first sub-offset.
In some embodiments of the 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 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, determine second curve information corresponding to the second pixel position according to the curve shape index, determine a second movement ratio based on the length and the number of preset offset points, and determine the offset amount according to the second curve information, the translation amplitude, and the second movement ratio, wherein the offset amount 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 according to the each pixel position, the width, and the number of preset offset points, determine a second sub-offset according to the width and the number of preset offset points, and determine the second pixel position in the preset block for each pixel position in a non-offset direction based on the second scaling and the second sub-offset.
In some embodiments of the present application, the curve division information is one of the curve divisions;
And the curve division is to translate pixel points on a direct division line in the preset straight line geometric division to obtain a continuous curve division line to realize geometric division.
In some embodiments of the present application, each pixel of the linear dividing line is translated continuously in the same direction according to different movement distances to obtain the curved dividing line, or
And continuously translating each pixel point of the linear dividing line according to different motion vectors to obtain the curve dividing 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 linear dividing line;
the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
In some embodiments of the application, the direction of movement is formed by a combination of horizontal and vertical directions, or
The moving direction is related to a dividing direction of the GPM.
In some embodiments of the application, the interpolation or rounding of the fractional pixel positions is performed when the distance of movement is not integer, or
The distance of movement is positively correlated with the length of the current block, or
The moving distance is positively correlated with the smallest value among the length and width of the current block.
It can be understood that the decoder predicts the current block by adopting a curve division manner in the GPM mode, so that the divided boundary is more attached to the edge of the object or the edge of the part with different motion vectors, thereby improving the coding and decoding precision.
In practical application, as shown in fig. 10, the embodiment of the present application further provides a decoder, which includes a first processor 13 and a first memory 14 storing executable instructions of the first processor 13, where the first memory 14 performs operations depending on the first processor 13 through a communication bus 15, and when the executable instructions are executed by the first processor 13, the inter-frame prediction method described in the decoder side is performed.
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 perform the respective steps of the decoder-side inter prediction method in the foregoing embodiments.
Embodiments of the present application provide a computer-readable machine storage medium storing executable instructions that, when executed by one or more first processors, perform an inter prediction method at a decoder side.
The components in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional modules.
The integrated units, if implemented in the form of software functional modules, may be stored in a computer-readable storage medium, if not sold or used as separate products, and based on such understanding, the technical solution of the present embodiment may be embodied essentially or partly in the form of a software product, which is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform all or part of the steps of the method described in the present embodiment. The storage medium includes, but is not limited to, various media capable of storing program codes, such as magnetic random access Memory (FRAM, ferromagnetic random access Memory), read Only Memory (ROM), programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read Only Memory (EEPROM, ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk-Only Memory (CD-ROM, compact Disc Read-Only Memory).
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 a GPM mode parameter and curve division information of the current block when the prediction mode parameter indicates that inter prediction of the current block is determined using an inter geometric division prediction mode GPM; 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 dividing information;
a second prediction unit 21 for determining 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 generate the curve division use flag according to the curve division information and encode the curve division information when the prediction mode corresponding to the minimum rate distortion cost result is the curve division mode of the GPM prediction mode after the GPM mode parameter, the curve division information and the motion related information of the current block are determined, and enter the curve division use flag and the encoded curve division information into a code stream.
In some embodiments of the present application, the curve division information includes a translation amplitude and a curve shape index, the encoding unit 22 is further configured to generate the curve division use flag according to the translation amplitude, encode the translation amplitude and the curve shape index when the curve division use flag is used to obtain the encoded curve division information, and stop encoding the translation amplitude and the curve shape index when the curve division use flag is not used.
In some embodiments of the present application, the curve dividing information includes a translation amplitude and a 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 characterization uses curve division, encoding the curve shape index to obtain an encoded curve shape index, wherein the encoded translation amplitude and the encoded curve shape index are the encoded curve division information; and when the translation amplitude characterization uses curve division to characterize unused curve division, stopping coding the curve shape index.
In some embodiments of the application, the first prediction parameter comprises a first weight value or first boundary position information;
The second prediction parameter includes 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, and the second prediction parameter comprises a second weight value;
The second determining unit 20 is further configured to determine a preset weight distribution corresponding to a current GPM mode according to the GPM mode parameter, determine size information of the current block, update the preset weight distribution according to the size information, the GPM mode parameter and the curve dividing information to obtain a curve weight distribution, and obtain the first weight value and the second weight value according to the curve weight distribution.
In some embodiments of the present application, the curve dividing information includes a translation amplitude and a curve shape index, the second determining unit 20 is further configured to determine an offset direction according to the GPM mode parameter, determine an offset according to the size information, the translation amplitude and the curve shape index, and obtain an updated curve weight of each pixel position after shifting a preset weight of each pixel position in the preset weight distribution by the offset according to the offset direction, 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 using 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 some embodiments of the present application, the first prediction parameter includes first boundary position information, the second prediction parameter includes second boundary position information, the second determining unit 20 is further configured to obtain size information of the current block, determine partition boundary position information based on the GPM mode parameter and the size information, offset partition boundary position information according to the GPM mode parameter, the size information and the curve partition information, determine curve partition boundary position information, and determine the first boundary position information and the second boundary position information based on the curve partition 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 block based on a first pixel value of the first reference block, and predicting a second block based on a second pixel value of the second reference block, thereby determining a predicted value of the current block.
In some embodiments of the present application, the curve dividing information includes a translation amplitude and a curve shape index, the second determining unit 20 is further configured to determine an offset direction according to the GPM mode parameter, determine an offset according to the size information, the translation amplitude and the curve shape index, and obtain the curve dividing boundary position information after shifting a position of each pixel point of the dividing boundary position information by the offset according to the offset direction.
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 for characterizing the GPM meets a horizontal criterion, and determine that the offset direction is a vertical direction when the angle used by the GPM mode parameter for characterizing the GPM meets a vertical flat criterion.
In some embodiments of the present application, the size information includes a length and a width of a current block, the second determining unit 20 is further configured to determine, when the offset direction is a horizontal direction, a first pixel position located in a preset block in a non-offset direction according to the each pixel position, the length, and a number of preset offset points, where the non-offset direction is perpendicular to the offset direction, determine first curve information corresponding to the first pixel position according to the curve shape index, determine a first movement ratio based on the width and the number of preset offset points, and determine the offset amount according to the first curve information, the translation amplitude, and the first movement ratio, where the offset amount 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 according to the each pixel position, the length, and the number of preset offset points, determine a first sub-offset according to the length and the number of preset offset points, and determine the first pixel position in the preset block for the each pixel position in a non-offset direction based on the first scaling and the first sub-offset.
In some embodiments of the 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 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, determine second curve information corresponding to the second pixel position according to the curve shape index, determine a second movement ratio based on the length and the number of preset offset points, and determine the offset amount according to the second curve information, the translation amplitude, and the second movement ratio, wherein the offset amount 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 according to the each pixel position, the width, and the number of preset offset points, determine a second sub-offset according to the width and the number of preset offset points, and determine the second pixel position in the preset block for each pixel position in a non-offset direction based on the second scaling and the second sub-offset.
In some embodiments of the present application, the curve division information is one of the curve divisions;
And the curve division is to translate pixel points on a direct division line in the preset straight line geometric division to obtain a continuous curve division line to realize geometric division.
In some embodiments of the present application, each pixel of the linear dividing line is translated continuously in the same direction according to different movement distances to obtain the curved dividing line, or
And continuously translating each pixel point of the linear dividing line according to different motion vectors to obtain the curve dividing 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 linear dividing line;
the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
In some embodiments of the application, the direction of movement is formed by a combination of horizontal and vertical directions, or
The moving direction is related to a dividing direction of the GPM.
In some embodiments of the application, the interpolation or rounding of the fractional pixel positions is performed when the distance of movement is not integer, or
The distance of movement is positively correlated with the length of the current block, or
The moving distance is positively correlated with the smallest value among the length and width of the current block.
It can be appreciated that the encoder predicts the current block by adopting a curve division manner in the GPM mode, so that the divided boundary is more attached to the edge of the object or the edge of the part with different motion vectors, thereby improving the encoding precision.
In practical application, as shown in fig. 12, the embodiment of the present application further provides an encoder, which includes a second processor 23 and a second memory 24 storing executable instructions of the second processor 23, where the second memory 24 depends on the second processor 23 to perform operations through a communication bus 25, and when the executable instructions are executed by the second processor 23, the inter-frame prediction method on the encoder side is performed.
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 foregoing circuits or devices, or other suitable circuits or devices, so that the first processor may perform the corresponding steps of the decoder-side inter prediction method in the foregoing embodiments.
The embodiment of the application provides a computer-readable storage medium, which stores executable instructions, and when the executable instructions are executed by one or more second processors, the second processors execute the inter-frame prediction method corresponding to an encoder.
It will be appreciated by those skilled in the art that 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, magnetic 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the present application.

Claims (40)

1. An inter prediction method, applied to a decoder, comprising:
Analyzing the code stream and determining the predictive decoding parameters of the current block;
Determining a GPM mode parameter and curve division information of the current block when the prediction decoding parameter indicates that 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 the second reference block based on the GPM mode parameter and the curve division information;
determining a predicted value of the current block based on the first predicted parameter and the second predicted parameter;
The first prediction parameter comprises a first weight value, and the second prediction parameter comprises a second weight value;
the determining, based on the GPM mode parameter and the curve division information, a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to the second reference block 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.
2. The method of claim 1, wherein the curve partitioning information includes a translation magnitude and a curve shape index, and wherein updating the preset weight distribution according to the size information, the GPM mode parameter, and the curve partitioning information to obtain a curve weight distribution 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 shifting the preset weight of each pixel position in the preset weight distribution by the offset according to the offset direction to obtain updated curve weight of each pixel position, thereby obtaining the curve weight distribution.
3. The method according to claim 1 or 2, wherein said determining a 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.
4. The method of claim 1, wherein the first prediction parameters include first boundary position information, wherein the second prediction parameters include second boundary position information, wherein the determining the first prediction parameters corresponding to the first reference block and the second prediction parameters corresponding to the second reference block based on the GPM mode parameters 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 to determine curve dividing boundary position information;
And determining the first boundary position information and the second boundary position information based on the curve division boundary position information.
5. The method of claim 4, wherein the determining the prediction value 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 further includes predicting the first block based on a first pixel value of the first reference block and predicting the second block based on a second pixel value of the second reference block, thereby determining a predicted value of the current block.
6. The method of claim 5, wherein the curve partitioning information includes a translation magnitude and a curve shape index, wherein the shifting partitioning boundary position information based on the GPM mode parameter, the size information, and the curve partitioning information, determining curve partitioning boundary position 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 shifting the position of each pixel point of the dividing boundary position information by the offset amount according to the offset direction to obtain the curve dividing boundary position information.
7. The method of claim 2 or 6, wherein the determining an offset direction from the GPM mode parameters comprises:
When the GPM mode parameter represents that the angle used by the GPM meets the horizontal judging condition, determining that the offset direction is the horizontal direction;
And when the GPM mode parameter characterizes that the angle used by the GPM meets a vertical flat discrimination condition, determining that the offset direction is a vertical direction.
8. The method of claim 7, wherein the size information includes a length and a width of the current block, and wherein determining the offset based on the size information, the translation magnitude, and the curve shape index comprises:
When the offset direction is the horizontal direction, determining a first pixel position in a preset block in a non-offset direction of each pixel position according to the 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.
9. The method of claim 8, wherein determining a first pixel location in the preset block in the non-offset direction at each pixel location based on the each pixel location, the length, and the number of preset offset points comprises:
Determining a first scaling according to the 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;
And determining that each pixel position is positioned at the first pixel position in a preset block in a non-offset direction based on the first scaling and the first sub-offset.
10. The method of claim 7, wherein the size information includes a length and a width of the current block, and wherein determining the offset based on the size information, the translation magnitude, and the curve shape index comprises:
when the offset direction is the vertical direction, determining a second pixel position 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.
11. The method of claim 10, wherein determining a second pixel location in the preset block in the non-offset direction at each pixel location based on the each pixel location, the width, and the number of preset offset points, comprises:
determining a second scaling according to the 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;
And determining that each pixel position is positioned at the second pixel position in a preset block in a non-offset direction based on the second scaling and the second sub-offset.
12. A method according to claim 1 or 2, characterized in that,
The curve dividing information is one dividing mode in curve dividing;
And the curve division is to translate the pixel points on the straight line division line in the preset straight line geometric division to obtain continuous curve division lines to realize geometric division.
13. The method of claim 12, wherein the step of determining the position of the probe is performed,
Each pixel point of the linear dividing line is continuously translated in the same moving direction according to different moving distances to obtain the curve dividing line, or
And continuously translating each pixel point of the linear dividing line according to different motion vectors to obtain the curve dividing line.
14. The method of claim 13, wherein the step of determining the position of the probe is performed,
The moving distance is the distance between the corresponding pixel position on the preset curve shape and the linear dividing line;
the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
15. The method according to claim 13 or 14, wherein,
The moving direction is formed by combining a horizontal direction and a vertical direction, or
The moving direction is related to a dividing direction of the GPM.
16. The method of claim 15, wherein the step of determining the position of the probe is performed,
When the moving distance is not the whole pixel, interpolating or rounding the position of the divided pixel, or
The distance of movement is positively correlated with the length of the current block, or
The moving distance is positively correlated with the smallest value among the length and width of the current block.
17. An inter prediction method, applied to an encoder, comprising:
Determining a prediction mode parameter of the current block;
determining a GPM mode parameter and curve division information of the current block when the prediction mode parameter indicates that 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 the second reference block based on the GPM mode parameter and the curve division information;
determining a predicted value of the current block based on the first predicted parameter and the second predicted parameter;
The first prediction parameter comprises a first weight value, and the second prediction parameter comprises a second weight value;
the determining, based on the GPM mode parameter and the curve division information, a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to the second reference block 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.
18. The method of claim 17, wherein after the determining the GPM mode parameters and the curve partitioning information for the current block, the method further comprises:
When the prediction mode corresponding to the minimum rate distortion cost result is a curve division mode of the GPM prediction mode, generating the curve division use mark according to the curve division information, and encoding the curve division information;
and inputting the curve division using mark and the encoded curve division information into a code stream.
19. The method of claim 18, wherein the curve partition information includes a translation magnitude and a curve shape index, wherein the generating the curve partition use flag from the curve partition information and encoding the curve partition information includes:
Generating the curve dividing use mark according to the translation amplitude;
When curve division using mark representation is used, encoding the translation amplitude and the curve shape index to obtain encoded curve division information;
When the curve partition use flag representation is not used, then encoding the translation amplitude and the curve shape index is stopped.
20. The method of claim 19, wherein the curve partition information includes a translation magnitude and a curve shape index, wherein the generating the curve partition use flag from the curve partition information and encoding the curve partition information includes:
Encoding the translation amplitude to obtain an encoded translation amplitude;
when the translation amplitude characterization uses curve division, encoding the curve shape index to obtain an encoded curve shape index, wherein the encoded translation amplitude and the encoded curve shape index are the encoded curve division information;
and when the translation amplitude characterization uses curve division to characterize unused curve division, stopping coding the curve shape index.
21. The method of claim 17, wherein the curve partitioning information includes a translation magnitude and a curve shape index, and wherein updating the preset weight distribution according to the size information, the GPM mode parameter, and the curve partitioning information to obtain a curve weight distribution comprises:
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 shifting the preset weight of each pixel position in the preset weight distribution by the offset according to the offset direction to obtain updated curve weight of each pixel position, thereby obtaining the curve weight distribution.
22. The method according to claim 17 or 21, wherein said determining a 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.
23. The method of any one of claims 17 to 20, wherein the first prediction parameters include first boundary position information, wherein the second prediction parameters include second boundary position information, wherein the determining the first prediction parameters corresponding to the first reference block and the second prediction parameters corresponding to the second reference block based on the GPM mode parameters 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 to determine curve dividing boundary position information;
And determining the first boundary position information and the second boundary position information based on the curve division boundary position information.
24. The method of claim 23, wherein the determining the prediction value 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 further includes predicting the first block based on a first pixel value of the first reference block and predicting the second block based on a second pixel value of the second reference block, thereby determining a predicted value of the current block.
25. The method of claim 23, wherein the curve partitioning information includes a translation magnitude and a curve shape index, wherein the shifting partitioning boundary position information based on the GPM mode parameter, the size information, and the curve partitioning information, determining curve partitioning boundary position 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 shifting the position of each pixel point of the dividing boundary position information by the offset amount according to the offset direction to obtain the curve dividing boundary position information.
26. The method of claim 21 or 25, wherein the determining an offset direction from the GPM mode parameters comprises:
When the GPM mode parameter represents that the angle used by the GPM meets the horizontal judging condition, determining that the offset direction is the horizontal direction;
And when the GPM mode parameter characterizes that the angle used by the GPM meets a vertical flat discrimination condition, determining that the offset direction is a vertical direction.
27. The method of claim 26, wherein the size information includes a length and a width of the current block, wherein the determining an offset based on the size information, the translation magnitude, and the curve shape index comprises:
When the offset direction is the horizontal direction, determining a first pixel position in a preset block in a non-offset direction of each pixel position according to the 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.
28. The method of claim 27, wherein determining a first pixel location in the preset block in the non-offset direction at each pixel location based on the each pixel location, the length, and the number of preset offset points comprises:
Determining a first scaling according to the 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;
And determining that each pixel position is positioned at the first pixel position in a preset block in a non-offset direction based on the first scaling and the first sub-offset.
29. The method of claim 26, wherein the size information includes a length and a width of the current block, wherein the determining an offset based on the size information, the translation magnitude, and the curve shape index comprises:
when the offset direction is the vertical direction, determining a second pixel position 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.
30. The method of claim 29, wherein determining a second pixel location in the preset block in the non-offset direction at each pixel location based on the each pixel location, the width, and the number of preset offset points, comprises:
determining a second scaling according to the 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;
And determining that each pixel position is positioned at the second pixel position in a preset block in a non-offset direction based on the second scaling and the second sub-offset.
31. The method according to any one of claims 17 to 21, wherein,
The curve dividing information is one dividing mode in curve dividing;
And the curve division is to translate the pixel points on the straight line division line in the preset straight line geometric division to obtain continuous curve division lines to realize geometric division.
32. The method of claim 31, wherein the step of determining the position of the probe is performed,
Each pixel point of the linear dividing line is continuously translated in the same moving direction according to different moving distances to obtain the curve dividing line, or
And continuously translating each pixel point of the linear dividing line according to different motion vectors to obtain the curve dividing line.
33. The method of claim 32, wherein the step of determining the position of the probe is performed,
The moving distance is the distance between the corresponding pixel position on the preset curve shape and the linear dividing line;
the motion vector is a preset vector corresponding to the pixel position on the preset curve shape.
34. The method according to claim 32 or 33, wherein,
The moving direction is formed by combining a horizontal direction and a vertical direction, or
The moving direction is related to a dividing direction of the GPM.
35. The method of claim 34, wherein the step of determining the position of the probe is performed,
When the moving distance is not the whole pixel, interpolating or rounding the position of the divided pixel, or
The distance of movement is positively correlated with the length of the current block, or
The moving distance is positively correlated with the smallest value among the length and width of the current block.
36. A method for decoding a picture of a picture, characterized by comprising the following steps:
The decoding unit is used for analyzing the code stream and determining the predictive decoding parameters of the current block;
A first determining unit for determining a GPM mode parameter and curve division information of the current block when the predictive decoding parameter indicates that inter prediction of the current block is determined using an inter geometric division prediction mode GPM; 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 dividing information;
The first prediction parameter comprises a first weight value, the second prediction parameter comprises a second weight value, the first determination unit is further used for determining preset weight distribution corresponding to a current GPM mode according to the GPM mode parameter, determining size information of the current block, updating the preset weight distribution according to the size information, the GPM mode parameter 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;
And a first prediction unit configured to determine a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
37. An encoder is provided, which is used for encoding a data signal, characterized by comprising the following steps:
A second determining unit for determining a prediction mode parameter of the current block; determining a GPM mode parameter and curve division information of the current block when the prediction mode parameter indicates that inter prediction of the current block is determined using an inter geometric division prediction mode GPM; 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 dividing information;
The first prediction parameter comprises a first weight value, the second prediction parameter comprises a second weight value, the second determination unit is further used for determining preset weight distribution corresponding to a current GPM mode according to the GPM mode parameter, determining size information of the current block, updating the preset weight distribution according to the size information, the GPM mode parameter 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;
and a second prediction unit configured to determine a prediction value of the current block based on the first prediction parameter and the second prediction parameter.
38. A decoder comprising a first processor and a first memory storing instructions executable by the first processor, the first memory performing operations in dependence on the first processor via a communication bus, the executable instructions, when executed by the first processor, performing the inter prediction method of any of claims 1 to 16.
39. An encoder comprising a second processor and a second memory storing instructions executable by the second processor, the second memory performing operations in dependence on the second processor via a communication bus, the executable instructions, when executed by the second processor, performing the inter prediction method of any of claims 17 to 35.
40. A computer readable storage medium storing executable instructions which, when executed by one or more first processors, perform the inter prediction method of any of claims 1 to 16, or which, when executed by one or more second processors, perform the inter prediction method of any of claims 17 to 35.
CN202010246244.3A 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium Active CN113473141B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202411692245.5A CN119544999B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium
CN202010246244.3A CN113473141B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium
CN202411695305.9A CN119520798B (en) 2020-03-31 2020-03-31 Inter-frame 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 CN113473141B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN202411695305.9A Division CN119520798B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium
CN202411692245.5A Division CN119544999B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium

Publications (2)

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

Family

ID=77865643

Family Applications (3)

Application Number Title Priority Date Filing Date
CN202010246244.3A Active CN113473141B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium
CN202411695305.9A Active CN119520798B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium
CN202411692245.5A Active CN119544999B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN202411695305.9A Active CN119520798B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium
CN202411692245.5A Active CN119544999B (en) 2020-03-31 2020-03-31 Inter-frame prediction method, encoder, decoder and computer-readable storage medium

Country Status (2)

Country Link
CN (3) CN113473141B (en)
WO (1) WO2021196857A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118339834A (en) 2021-09-29 2024-07-12 抖音视界有限公司 Video processing method, device and medium
WO2023061334A1 (en) * 2021-10-11 2023-04-20 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing
CN115086679B (en) * 2022-06-08 2025-07-04 北京达佳互联信息技术有限公司 Intra-frame prediction method, device, electronic device and storage medium
CN115834902A (en) * 2022-09-28 2023-03-21 浙江大华技术股份有限公司 Prediction method, encoding method, decoding method and device of coding unit
CN120283404A (en) * 2022-11-29 2025-07-08 抖音视界有限公司 Method, apparatus and medium for video processing
CN115955565B (en) * 2023-03-15 2023-07-04 深圳传音控股股份有限公司 Processing method, processing apparatus, and storage medium
CN117156133B (en) * 2023-10-27 2024-02-09 淘宝(中国)软件有限公司 Inter-frame prediction mode selection method and device for video coding
WO2025098525A2 (en) * 2025-01-07 2025-05-15 深圳传音控股股份有限公司 Processing method, processing device and storage medium
WO2026158707A1 (en) * 2026-01-29 2026-07-30 深圳传音控股股份有限公司 Image processing method, processing device and storage medium

Citations (1)

* 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

Family Cites Families (6)

* 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
WO2015137736A1 (en) * 2014-03-11 2015-09-17 삼성전자 주식회사 Depth image prediction mode transmission method and apparatus for encoding and decoding inter-layer video
KR20170058838A (en) * 2015-11-19 2017-05-29 한국전자통신연구원 Method and apparatus for encoding/decoding of improved inter prediction
WO2020072494A1 (en) * 2018-10-01 2020-04-09 Op Solutions, Llc Methods and systems of exponential partitioning
BR112021014667A2 (en) * 2019-01-28 2021-09-28 Op Solutions, Llc INTERPREVATION IN EXPONENTIAL PARTITIONING

Patent Citations (1)

* 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

Also Published As

Publication number Publication date
CN119520798A (en) 2025-02-25
CN119544999B (en) 2025-10-10
CN113473141A (en) 2021-10-01
CN119520798B (en) 2025-10-10
WO2021196857A1 (en) 2021-10-07
CN119544999A (en) 2025-02-28

Similar Documents

Publication Publication Date Title
CN119520798B (en) Inter-frame prediction method, encoder, decoder and computer-readable storage medium
US20250088622A1 (en) Method and apparatus for encoding/decoding an image signal
CN114586366B (en) Inter-frame prediction method, encoder, decoder and storage medium
US12088843B2 (en) Method for deriving a motion vector
US11095898B2 (en) Inter-prediction mode based image processing method, and apparatus therefor
CN114868395A (en) High level syntax for inter prediction with geometric partitioning
JP7693884B2 (en) Inter prediction method, encoder, decoder, and storage medium
CN116506640B (en) Method and apparatus for encoding and decoding video data through sub-pixel motion vector refinement
KR20190062587A (en) Apparatus and method for encoding and decoding video coding blocks of video signals
CN116711304A (en) Prediction method, encoder, decoder and storage medium
EP4736408A2 (en) Intra affine prediction in video coding
HK1228622A1 (en) Method for decoding video using buffer compression for motion vector competition
HK1228622A (en) Method for decoding video using buffer compression for motion vector competition

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
GR01 Patent grant
GR01 Patent grant