WO2021196857A1 - 帧间预测方法、编码器、解码器及计算机可读存储介质 - Google Patents

帧间预测方法、编码器、解码器及计算机可读存储介质 Download PDF

Info

Publication number
WO2021196857A1
WO2021196857A1 PCT/CN2021/074252 CN2021074252W WO2021196857A1 WO 2021196857 A1 WO2021196857 A1 WO 2021196857A1 CN 2021074252 W CN2021074252 W CN 2021074252W WO 2021196857 A1 WO2021196857 A1 WO 2021196857A1
Authority
WO
WIPO (PCT)
Prior art keywords
curve
offset
prediction
information
division
Prior art date
Application number
PCT/CN2021/074252
Other languages
English (en)
French (fr)
Inventor
杨宁
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2021196857A1 publication Critical patent/WO2021196857A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Definitions

  • the embodiments of the present application relate to video coding technology, and relate to, but are not limited to, an inter-frame prediction method, an encoder, a decoder, and a computer-readable storage medium.
  • inter-frame prediction can also be used.
  • Inter prediction can include motion estimation and motion compensation.
  • geometric partitioning prediction mode GPM, Geometric Partitioning Mode
  • GPM Geometric Partitioning Mode
  • a rectangular block is divided into two blocks by a straight line.
  • the geometric division here may be the division of coding units or the division of prediction units, which are collectively referred to herein as blocks.
  • the divided blocks are triangular or trapezoidal.
  • the straight line that divides the rectangular block into two blocks can have different angles and different positions, so that a variety of combinations of triangles and trapezoids can be divided.
  • Such geometric division can make the edge of the block closer to the edge of the object, or close to the edge of two partitions with different motion vectors, thereby improving the coding performance.
  • the embodiments of the present application provide an inter-frame prediction method, an encoder, a decoder, and a computer-readable storage medium, which can improve the accuracy of coding and decoding.
  • the embodiment of the present application provides an inter-frame prediction method, which is applied to a decoder, and includes:
  • the predictive decoding parameter indicates that the inter-frame geometric division prediction mode GPM is used to determine the inter-frame prediction of the current block, determine the GPM mode parameter and curve division information of the current block;
  • the embodiment of the present application also provides an inter-frame prediction method, which is applied to an encoder, and includes:
  • the prediction mode parameter indicates that the inter-frame geometric division prediction mode GPM is used to determine the inter-frame prediction of the current block, determining the GPM mode parameter and curve division information of the current block;
  • An embodiment of the present application provides a decoder, including:
  • the decoding unit is used to parse the code stream and determine the predictive decoding parameters of the current block
  • the first determining unit is configured to determine the GPM mode parameter and curve division information of the current block when the prediction decoding parameter indicates that the inter-frame geometric division prediction mode GPM is used to determine the inter-frame prediction of the current block; based on the GPM mode parameter, Determine a first reference block and a second reference block; determine 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;
  • the first prediction unit is configured to determine the 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:
  • the second determining unit is used to determine the prediction mode parameter of the current block; when the prediction mode parameter indicates that the inter-frame geometric division prediction mode GPM is used to determine the inter-frame prediction of the current block, determine the GPM mode parameter and curve division information of the current block Based on the GPM mode parameters, determine the first reference block and the second reference block; based on the GPM mode parameters and the curve division information, determine the first prediction parameter and the second reference block corresponding to the first reference block The corresponding second prediction parameter;
  • the second prediction unit is configured to determine the prediction value of the current block based on the first prediction parameter and the second prediction parameter.
  • An embodiment of the present application further provides a decoder, including: a first processor and a first memory storing executable instructions of the first processor, the first memory relies on the first processor through a communication bus Perform an operation.
  • a decoder including: a first processor and a first memory storing executable instructions of the first processor, the first memory relies on the first processor through a communication bus Perform an operation.
  • the executable instruction is executed by the first processor, the inter prediction method according to any one of claims 1 to 18 is executed.
  • An embodiment of the present application also provides an encoder, including: a second processor and a second memory storing executable instructions of the second processor, the second memory relies on the second processor through a communication bus Perform an operation.
  • the executable instruction is executed by the second processor, the inter-frame prediction method according to any one of claims 19 to 42 is executed.
  • the embodiment of the present application provides a computer-readable storage medium that stores executable instructions.
  • the first processor executes all operations on the decoder side.
  • FIG. 1 is a schematic diagram of a composition block diagram of a video encoding system provided by an embodiment of the application;
  • FIG. 2 is a schematic diagram of the composition of a video decoding system provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of an implementation process of an inter-frame prediction method provided by an embodiment of the application.
  • 4a to 4i are schematic diagrams of the geometrical division method adopted by the exemplary VVC provided by the embodiments of the application;
  • FIG. 5 is a schematic diagram of the division angle of an exemplary VVC geometric division provided by an embodiment of the application.
  • FIG. 6 is a schematic diagram of an exemplary transformation from a straight line dividing line to a curved dividing line provided by an embodiment of the application;
  • FIG. 7 is a schematic diagram 1 of the implementation process of another inter-frame prediction method provided by an embodiment of the application.
  • FIG. 8 is a second schematic diagram of the implementation process of another inter-frame prediction method provided by an embodiment of this application.
  • FIG. 9 is a first structural diagram of a decoder provided by an embodiment of this application.
  • FIG. 10 is a second schematic structural diagram of a decoder provided by an embodiment of this application.
  • FIG. 11 is a first structural diagram of an encoder provided by an embodiment of the application.
  • FIG. 12 is a second structural diagram of an encoder provided by an embodiment of this application.
  • the video encoding system 11 includes:
  • Transform unit 111 Transform unit 111, quantization unit 112, mode selection and encoding control logic unit 113, intra prediction unit 114, inter prediction unit 115 (including: motion compensation and motion estimation), inverse quantization unit 116, inverse transform unit 117, loop Filtering unit 118, encoding unit 119, and decoded image buffer unit 110; for the input original video signal, a video reconstruction block can be obtained through coding tree unit (CTU) division, and the mode selection and coding control logic unit 113 Determine the encoding mode, and then transform the residual pixel information obtained after intra-frame or inter-frame prediction through the transform unit 111 and the quantization unit 112 to transform the video reconstruction block, including transforming the residual information from the pixel domain to the transform domain And quantize the obtained transform coefficients to further reduce the bit rate; the intra-frame prediction unit 114 is used to perform intra-frame prediction on the video reconstruction block; wherein, the intra-frame prediction unit 114 is used to determine the maximum value of the video reconstruction block Optimal intra prediction mode (ie
  • the decoded image buffer unit 110 is used to store reconstructed video reconstruction blocks for prediction reference. As the video image encoding progresses, new reconstructed video reconstruction blocks will be continuously generated, and these reconstructed video reconstruction blocks will all be stored in the decoded image buffer unit 110.
  • FIG. 2 is a schematic diagram of the composition structure of a video encoding system according to an embodiment of the application.
  • the video encoding system 12 includes:
  • the input video signal is encoded by the video encoding system 11
  • the code stream of the video signal is output;
  • the code stream is input into the video decoding system 12, and is first passed through the decoding unit 121 to obtain the decoded transform coefficient;
  • the transform coefficient is passed through the inverse transform unit 127 and the inverse quantization unit 122 Perform processing to generate a residual block in the pixel domain;
  • the intra prediction unit 123 can be used to generate prediction data of the current video decoding block based on the determined intra prediction direction and data from the previous decoded block of the current frame or picture ;
  • the motion compensation unit 124 determines the prediction information for the video decoding block by analyzing the motion vector and other associated syntax elements, and uses the prediction information to generate the predictive block of the video decoding block being decode
  • the inter-frame prediction method provided by the embodiment of the present application mainly acts on the inter-frame prediction unit 215 of the video encoding system 11 and the inter-frame prediction unit of the video decoding system 12, that is, the motion compensation unit 124;
  • the system 11 can obtain a better prediction effect through the inter-frame prediction method provided in the embodiments of the present application, and correspondingly, at the decoding end, the video decoding restoration quality can also be improved.
  • the embodiment of the present application provides an inter-frame prediction method, which is applied to a video decoding device, that is, a decoder.
  • the function realized by this method can be realized by calling the program code by the first processor in the video decoding device.
  • the program code can be stored in the first memory.
  • the video decoding device at least includes a first processor and a first processor. Memory.
  • FIG. 3 is a schematic diagram of the implementation process of an inter-frame prediction method according to an embodiment of the application. As shown in FIG. 3, the method includes:
  • S103 Determine a first reference block and a second reference block based on the GPM mode parameter.
  • S104 Determine 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.
  • the encoding method and other information used by the encoder during encoding can be parsed from the code stream, that is, the predictive decoding parameters for the current block, which are based on the current encoding method.
  • the prediction modes decoded by the decoder may be diverse.
  • the inter-frame prediction mode provided in the embodiment of the present application is a scenario that can be realized only when the GPM prediction mode is adopted for encoding.
  • the inter-frame prediction method provided by the embodiment of the present application is adopted to parse the code stream to obtain the encoding method. GPM mode parameters and curve division information of the current block.
  • the GPM mode parameters include the GPM division mode and motion-related information.
  • the GPM mode parameters include the GPM division mode and motion-related information.
  • the decoder decodes the prediction mode of the current block. If the current block uses GPM, the GPM needs to decode the GPM division mode. If the GPM uses a mask method, then decode the motion vector (MV) information or other information related to the GPM used by the two divided parts of the current block.
  • MV motion vector
  • the decoder can decode the curve division use flag in the code stream to directly determine it. For example, if the curve division use flag is 1 (characterization is used), it means that the current block uses curve division and can decode the data transmitted in the code stream.
  • the decoder can decode the translation amplitude in the bitstream to determine indirectly, if the translation amplitude is not 0 (indicating that the curve division mode is used), it means that the curve division is used, and the curve shape continues to be decoded. index. If the translation amplitude is 0 (indicating that the curve division mode is not used), stop decoding curve division information.
  • the information of the decoding curve division, the division mode of the GPM, the information of the MV used in the two divisions of the current block, or the order of other information related to the GPM may have multiple combinations, which are not limited in the embodiment of the present application.
  • the GPM division mode, the MV information used in the two division parts of the current block, or the decoding mode of other GPM-related information is not limited in this application.
  • each image block currently to be decoded can be called a decoding block, where each decoding block can include a first image component and a second image component.
  • the second image component and the third image component; and the current block is a decoding block in the video image that is currently to be predicted for the first image component, the second image component, or the third image component.
  • the current block performs the first image component prediction, and the first image component is the brightness component, that is, the image component to be predicted is the brightness component, then the current block can also be called the brightness block; or, it is assumed that the current block performs the second image component Prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block can also be called a chrominance block.
  • the prediction mode parameter indicates the coding mode of the current block and parameters related to the mode.
  • the division mode of the GPM may include: angle index information, and may also include: step index information, target division mode, etc., which are not limited in the embodiment of the present application.
  • the current GPM geometric division can be divided into any shape that can be calculated by the geometric function.
  • the existing geometric division method is to divide a rectangular block into two by a straight line.
  • the geometric division here may be divided coding unit (CU coding unit) or divided prediction unit (PU prediction unit), which is collectively referred to as the current block here.
  • the blocks are divided into triangles, rectangles or trapezoids.
  • the straight line that divides the rectangular block into two blocks can have different angles and different positions, so that a variety of combinations of triangles, rectangles and trapezoids can be divided.
  • transitions are used for geometrically divided edge regions, such as using a weighted average method to use progressive coefficient transitions on the divided edges, so that the divided edges will not be too rigid.
  • the geometric division method currently used by VVC.
  • GPM divides the inter-frame (ie, the current block) into two non-rectangular sub-blocks for the edge part of the object in the image, and then performs weighted fusion after prediction.
  • the non-rectangular form can be as shown in Figures 4a-4i below.
  • the VVC geometric division divides the angle of a circle into 32 parts.
  • the offset of the distance between the straight line and the center of the block can have 4 different values, one of which is 0, that is, the straight line passes through the center of the block.
  • the current VVC uses some of the 32 angles, and the offset method varies with the angle, and some patterns that overlap with the existing binary tree and trinomial tree are also eliminated.
  • the decoder can determine the corresponding partitions based on the GPM division mode and motion-related information in the GPM mode parameters.
  • the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block can be determined.
  • the first prediction parameter includes: a first weight value or first boundary position information
  • the second prediction parameter includes: a second weight value or second boundary position information
  • first weight value and the second weight value are the weight values corresponding to the pixels when the mask method is used for GPM division, and the first boundary position information and the second boundary position information are the first reference block and the second Reference block boundary information.
  • the decoder determines that 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 curve division information can be divided into two based on the difference in prediction parameters. Ways, as follows:
  • the first prediction parameter includes: a first weight value; the second prediction parameter includes: a second weight value; the decoder determines the preset weight distribution corresponding to the current GPM mode according to the GPM mode parameter; determines the size information of the current block ; According to the size information, GPM mode parameters and curve division information, the preset weight distribution is updated to obtain the curve weight distribution; according to the curve weight distribution, the first weight value and the second weight value are obtained.
  • the curve division information includes: translation amplitude and curve shape index; the decoder determines the offset direction according to GPM mode parameters; determines the offset amount according to the size information, translation amplitude and curve shape index; according to the offset direction, After the preset weight of each pixel position in the preset weight distribution is shifted by the offset, the updated curve weight of each pixel position is obtained, thereby obtaining the curve weight distribution.
  • the first prediction parameter includes: the first boundary position information; the second prediction parameter includes: the second boundary position information; the decoder obtains the size information of the current block; based on the GPM mode parameters and the size information, determines the division boundary position information; According to GPM mode parameters, size information and curve division information, offset the division boundary position information to determine the curve division boundary position information; based on the curve division boundary position information, determine the first boundary position information and the second boundary position information.
  • the curve division information includes: translation amplitude and curve shape index; the decoder determines the offset direction according to the GPM mode parameters; determines the offset amount according to the size information, the translation amplitude and the curve shape index; according to the offset direction, After dividing the position offset of each pixel of the dividing boundary position information, the curve dividing boundary position information is obtained.
  • the preset weight distribution refers to the original mask when the GPM division mode is divided by a straight line.
  • the curve weight distribution is now based on the corresponding weight distribution information when the curve is divided. It is a translation calculation of the preset weight distribution and updates owned.
  • the decoder mainly uses the size information, GPM mode parameters and curve division information to update the preset weight distribution to obtain the curve weight distribution. From the curve weight distribution, the first reference block corresponding to each pixel of the current block is obtained. The first weight value, and the second weight value corresponding to the second reference block.
  • the decoder determines the offset direction according to the angle information in the GPM mode parameters, and determines the offset required to be offset according to the size information, the translation amplitude, and the curve shape index.
  • the curve division method adopted by the decoder for the current block can adopt the pixel value of the first reference block as the first predicted value for the part of the first reference block, and adopt the second reference block for the part of the second reference block.
  • the pixel value of is the second predicted value, but at the boundary position, the pixel points on the respective boundary information of the first reference block and the second reference block are offset to obtain the first boundary position information and the second boundary position information, Then, based on the first boundary position information and the second boundary position information, the pixel points on the boundary are predicted and implemented.
  • the GPM mode parameters are used to divide the current block. Based on the size information of the current block, the division boundary position information of the current block can be obtained; at this time, the decoder determines the offset direction according to the GPM mode parameters; according to the size information , The translation amplitude and the curve shape index, determine the offset; according to the offset direction, after the position of each pixel that divides the boundary position information is shifted by the offset, the curve division boundary position information is obtained.
  • the decoder decodes the block division information. If the current block uses GPM, the GPM needs to decode the GPM division mode.
  • the boundary of the division is determined according to the mode information and curve division information of the GPM. If the dividing boundary determined according to the GPM mode information is boundary, (x n , y n ) is a point on the boundary.
  • the decoder determines the boundary divided GPM mode information and division information as the curve boundary ', (x' n, y 'n) is a boundary' point on.
  • the decoder determines the offset direction according to the GPM mode parameter to achieve: when the GPM mode parameter characterizes the angle used by the GPM meets the horizontal discrimination condition, the offset direction is determined to be the horizontal direction;
  • the GPM mode parameter characterizes that when the angle used by the GPM satisfies the vertical and horizontal discrimination conditions, it is determined that the offset direction is the vertical direction.
  • the decoder determines the offset direction according to the angle information in the GPM mode parameter.
  • the vertical determination condition is that the angle is within the range of the horizontal angle; the horizontal determination condition is that the angle is within the vertical angle range, or the vertical direction is other than the horizontal determination condition.
  • the embodiment does not limit the judgment condition, as long as the method can distinguish the moving direction.
  • the offset direction is the vertical direction, otherwise the offset direction is the horizontal direction.
  • (angleIdx> 20&&angleIdx ⁇ 28)).
  • the decoder determines the description of the offset according to the size information, the translation amplitude, and the curve shape index.
  • the size information includes the length and width of the current block.
  • each pixel position is located at the first pixel position in the preset block in the non-offset direction, where , The non-offset direction is perpendicular to the offset direction; the first curve information corresponding to the first pixel position is determined according to the curve shape index; the first movement ratio is determined based on the width and the number of preset offset points; according to the first curve information , The translation amplitude and the first movement ratio, determine the offset, where the offset does not exceed the width of the current block.
  • the number of preset offset points is the number of points to be offset corresponding to different curve division modes.
  • the number of preset offset points may be 64, which is implemented in this application.
  • the example is not limited. The more preset offset points, the better the curve division.
  • the non-offset direction when the offset direction is the horizontal direction, the non-offset direction is the vertical direction; when the offset direction is the vertical horizontal direction, the non-offset direction is the horizontal direction.
  • the decoder multiplies the first curve information by the translation amplitude and the first movement ratio to obtain the offset.
  • the decoder determines that each pixel position is located at the first pixel position in the preset block in the non-offset direction according to each pixel position, length, and the number of preset offset points.
  • the realization of is: according to each pixel position, length and the number of preset offset points, determine the first zoom ratio; according to the length and the number of preset offset points, determine the first sub-offset; based on the first zoom ratio And the first sub-offset, it is determined that each pixel position is located in the first pixel position in the preset block in the non-offset direction.
  • the decoder multiplies the ordinate of each pixel position by the ratio of the number of preset offset points to the length to obtain the first scaling ratio, or the length used by the decoder and the number of preset offset points Base 2 logarithm and shift to get the first scaling ratio; the decoder then obtains the first sub-offset according to the number of preset offset points and (2*length); finally, the decoder will A zoom ratio and the first sub-offset are added to obtain the first pixel position.
  • the number of preset offset points may be 64, 32, 16, 8, etc., which is not limited in the embodiment of the present application.
  • the decoder obtains the mask P'(curve weight distribution) according to the translation amplitude and curve shape used by the curve division and the mask P (preset weight distribution), set the translation amplitude to curveAmplitude, and the curve shape index used for translation It is curveIdx, there are NUM_CURVE curves in total, and the LUT (curve information) is curveFactor[NUM_CURVE][N], where N can be 64, 32, 16, 8, etc.
  • the width of the current block is width
  • the length is height
  • the angle used by GPM is angle.
  • offsetX is the offset.
  • the offset is obtained by formula (2), as follows:
  • curveFactor[curveIdx][y N ] is the first curve information
  • curveAmplitude is the translation amplitude
  • Scale1 is the first movement ratio
  • offset1 is the first sub-offset, which is determined by formula (5), as follows:
  • Offset1 N/(2*height) (5)
  • x-offsetX will not exceed the normal range of the current block, such as 0 ⁇ width-1.
  • the decoder determines that each pixel position is in the non-offset direction according to the position, width, and number of preset offset points of each pixel, The second pixel location in the preset block, where the non-offset direction is perpendicular to the offset direction; the second curve information corresponding to the second pixel location is determined according to the curve shape index; based on the length and the number of preset offset points , Determine the second movement ratio; determine the offset according to the second curve information, the translation amplitude and the second movement ratio, where the offset does not exceed the length of the current block.
  • the decoder multiplies the second curve information by the translation amplitude and the second movement ratio to obtain the offset.
  • the decoder determines that each pixel position is located at the second pixel position in the preset block in the non-offset direction according to the position, width, and number of preset offset points of each pixel.
  • the implementation is: the decoder determines the second zoom ratio according to the position, width and the number of preset offset points for each pixel, and determines the second sub-offset according to the width and the number of preset offset points; based on the second zoom The ratio and the second sub-offset determine that each pixel position is located in the second pixel position in the preset block in the non-offset direction.
  • the decoder multiplies the abscissa of each pixel position by the ratio of the number of preset offset points to the width to obtain the second scaling ratio, or the decoder uses the width and the number of preset offset points Base 2 logarithm and shift to get the second scaling ratio; the decoder then obtains the second sub-offset according to the number of preset offset points and (2*width); finally, the decoder will The second zoom ratio and the second sub-offset are added to obtain the second pixel position.
  • the decoder obtains the mask P'(curve weight distribution) according to the translation amplitude and curve shape used by the curve division and the mask P (preset weight distribution), set the translation amplitude to curveAmplitude, and the curve shape index used for translation It is curveIdx, there are NUM_CURVE curves in total, and the LUT (curve information) is curveFactor[NUM_CURVE][N], where N can be 64, 32, 16, 8, etc.
  • the width of the current block is width
  • the length is height
  • the angle used by GPM is angle.
  • offsetY is the offset.
  • the offset is obtained by formula (7), as follows:
  • offsetX curveFactor[curveIdx][x N ]*curveAmplitude*Scale2 (7)
  • curveFactor[curveIdx][x N ] is the second curve information
  • curveAmplitude is the translation amplitude
  • Scale2 is the second movement ratio
  • offset2 is the second sub-offset, which is determined by formula (10), as follows:
  • y-offsetY will not exceed the normal range of the current block, such as 0 ⁇ height-1.
  • offsetCX curveFactor[curveIdx][yL*N/nH+N/2nH]*curveAmplitude*nW/N
  • nW is the width
  • nH is the length
  • offsetCX is offsetX
  • offsetCY is offsetY
  • angleIdx is the angle index.
  • the decoder may also first determine the position (x', y) of each pixel (x, y) of the current block on the preset weight distribution according to the translation amplitude and curve shape used for curve division. '), when calculating predSamples[x][y] for each pixel (x,y), the required P[x' is temporarily calculated based on the preset weight distribution, the offset direction and the offset amount ][y'].
  • offsetX and offsetY are the same as those obtained above.
  • the decoder may first calculate the mask P, and then calculate predSamples[x][y] for each point (x, y). It is also possible to temporarily calculate the required P[x][y] when calculating predSamples[x][y] for each point (x,y). In this case, the curve division method is used to temporarily calculate the required P[x'][y'] when calculating predSamples[x][y] for each point (x,y), which is not limited in the embodiment of the application , The final purpose is the same.
  • the decoder After the decoder obtains the first weight value and the second weight value in method 1, the decoder can combine the first weight value, the first pixel value of the first reference block, and the second weight value with the second weight value.
  • the second pixel value determines the predicted value of the current block.
  • the decoder weights and sums 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 .
  • the decoder obtains the mask P mask matrix according to the GPM division mode.
  • Each pixel position (x, y) on the mask has a value P[x][y] marking the first reference block (x , y)
  • M is the sum of the weights of the corresponding positions of the two reference blocks
  • the weight on the second reference block (x, y) is MP[x][y].
  • the decoder obtains the mask P'according to the translation amplitude and curve shape used by the curve division and the mask P.
  • predSamples[x][y] (P'[x][y]*predSamplesLA[x][y]+(M-P'[x][y])*predSamplesLB[x][y])/M ( 11)
  • predSamples[x][y] is the predicted value of one pixel (x, y) of the current block.
  • M can be a power of 2 integers, such as 4, 8, 16, etc., so that the division in the equation can be written in the form of right shift. If predSamples[x][y] exceeds the normal value range, it needs to be processed to be within the value range, and this application is not limited here.
  • the decoder After the decoder obtains the first boundary position information and the second boundary position information by using the second method, the decoder determines the prediction value of the current block based on the first prediction parameter and the second prediction parameter. Based on the boundary position information and the second boundary position information, the current block is divided to obtain the first block and the second block; the first block is predicted based on the first pixel value of the first reference block, and the second block is based on the second reference block Pixel value, the second block is predicted to determine the predicted value of the current block.
  • the decoder predicts the current block by using curve division in GPM mode, so that the divided boundary is more closely fitted to the edge of the body or the edge of the two parts with different motion vectors, thereby improving The accuracy of the encoding and decoding.
  • the decoder decodes the residual information of the current block, including the decoding coefficients, inverse quantization and inverse transformation to obtain the residual block, and the residual block is added to the prediction block to obtain the current block.
  • the decoded block of the block is the decoded block of the block.
  • the curve division information is a division method in curve division; curve division is the translation of pixels on the direct division line in the preset linear geometric division to obtain continuous curve division lines to realize the geometry Divided.
  • each pixel point of the straight line dividing line is continuously translated according to different moving distances and the same moving direction to obtain a curved dividing line; or, each pixel point of the straight line dividing line moves according to a different movement.
  • Vector perform continuous translation to obtain the curve dividing line.
  • the points on a straight line segment are translated in the same direction, and the distance of each point is not the same, and the distance between adjacent points is not much different. Keep the line Continuous, you can get a curve segment. Or translate the points on a straight line segment, the translation vectors of each point are not all the same, and the vectors of adjacent points move the same. Keep the line continuous, and you can also get a curve segment.
  • the so-called straight lines are composed of points whose pixel positions are on the same straight line or approximately on the same straight line. These points are translated in the same direction, and the translation distance of each point is not the same. Adjacent points If the moving distance meets certain requirements, a curve segment can be obtained. Translate these points, the translation vector of each point is not the same, and the distance of the adjacent points moves to meet certain requirements, and a curve segment can be obtained.
  • the points on the boundary line of the two blocks in the geometric division are translated according to the arrow method shown in the above figure, and the boundary line can be turned into a curve segment.
  • the straight line division can become the curve division.
  • the point on the transition area near the dividing line is translated according to the above-mentioned method, and the transition area of the straight line segment can become the transition area of the curve segment.
  • the value of the point on the mask is translated according to the above-mentioned method, and the mask of the geometric division of the straight line can become the mask of the geometric division of the curve.
  • the movement distance is the distance between the corresponding pixel position on the preset curve shape and the line dividing line; the movement vector is the preset vector corresponding to the pixel position on the preset curve shape.
  • a LUT look up table
  • the shape of the curve is the shape of the curve itself.
  • the curve may not have the same shape as the curve itself. If you want to translate the divided line segment according to a certain curve shape, each point on the line segment finds the corresponding position in the corresponding curve shape in the LUT, and moves according to the specified direction according to the indicated movement distance, which can limit the movement of the point Must not exceed a certain boundary.
  • the values of different points on the mask perpendicular to the translation direction are moved according to the movement distance of the corresponding position on the LUT, and the mask The value of the point in the same direction as the translation is moved by the same moving distance. It can be understood that the mask of the new curve division is obtained by referring to the mask of the straight line division.
  • the value of the point that exceeds the required range is discarded, and the value of the point may also be restricted to not exceed a certain boundary after moving.
  • the value of the missing point is supplemented with the original value of the edge of the valid range.
  • the value of the point of the mask divided by the curve is found from the mask divided by the straight line according to the direction in which it should move and the reverse of the distance. If the point is found If the effective limit is exceeded, it will be replaced by the value of the point on the limit on the same straight line as the moving direction.
  • the LUT stores the movement vectors of several points for a curve shape, and the LUT can store one or more curve shapes. If the divided line segment is to be translated according to a certain curve shape, each point on the line segment finds the corresponding position in the corresponding curve shape in the LUT, and moves according to the indicated movement vector. Due to the discontinuity caused by the movement, it may be necessary to add points at the discontinuous position to maintain the continuity of the curve.
  • the values of different points in a certain direction on the mask are moved according to the movement vector of the corresponding position on the LUT, which will cause problems. Supplement the value of points in consecutive places. The value of the point on the mask in the same vertical direction as the above direction moves according to the same movement vector. Add the value of the point where the discontinuity is caused. The value of the point beyond the required range is discarded, and the value of the point can also be restricted to not exceed a certain boundary after moving. The value of the missing point is supplemented with the original value of the edge of the required range.
  • the moving direction is formed by a combination of the horizontal direction and the vertical direction; or, the moving direction is related to the dividing direction of the GPM.
  • the moving distance when the moving distance is not a whole pixel, the sub-pixel position is interpolated or rounded; or, the moving distance is positively correlated with the length of the current block; or, the moving distance is the sum of the length of the current block. The smallest value in the width is positively correlated.
  • the moving direction may be a horizontal direction or a vertical direction, or any other direction. Assuming that the movement direction is not horizontal or vertical, it can be split into horizontal and vertical movement.
  • a distance of 2 pixels moving in a 45° direction can be split into a horizontal 0° direction movement Pixel distance plus vertical 90° movement Pixel distance.
  • one possible implementation manner is to take an approximate integer pixel position, such as a rounding operation, and one possible implementation manner is to interpolate the sub-pixel position.
  • the pixel distance may be approximately 1 pixel distance or 2 pixel distance, or 1.5 pixel distance or 1.4 pixel distance.
  • the value of 1.5 pixel distance or 1.4 pixel distance needs to be obtained by interpolation.
  • Other angles can also be split into horizontal and vertical movements based on trigonometric functions or pre-calculated ratios.
  • the horizontal movement direction can use a positive value to indicate a 0° direction and a negative value to indicate a 180° direction
  • a vertical movement direction can use a positive value to indicate a 90° direction and a negative value to indicate a 270° direction.
  • one possible implementation is to use only the horizontal movement direction plus the vertical movement direction; one possible implementation is to use only the horizontal movement direction plus the vertical movement direction plus 45°, 135°, 225°, 315° moving direction.
  • the 45°, 135°, 225°, 315° movement directions can all be decomposed into horizontal and vertical movements with equal values, and the 4 angles can be represented by the signs of the horizontal and vertical directions; a possible realization The way is to use multiple angle directions.
  • the direction of movement may be related to the division direction of the GPM.
  • the curve division uses the vertical moving direction
  • the GPM straight line division uses the straight line angle is vertical or close to Vertically
  • the curve division uses the horizontal movement direction. More generally, some thresholds can be set. The horizontal movement direction is used within a certain threshold range in the straight line angle or the angle or division mode used for division, and the vertical movement direction is used in another range.
  • the angle or division mode used in the straight angle or division Set the threshold range to distinguish the use range of each movement direction.
  • the moving distance may be related to the length and width of the current block.
  • the moving distance is proportional to the length of the current block in the same direction as the current moving direction. For example, if the length of the current block in the same direction as the current moving direction is 64, the distance moved by all points of the current block is the value found in the LUT. For example, the length of the current block in the same direction as the current moving direction is 32, and the distance moved by all points of the current block is 1/2 of the value found in the LUT.
  • the distance moved is proportional to the shorter length of the current block.
  • different translation amplitudes can be set, that is, 1/4 times, 1/2 times, 1 times, 2 times, and so on. If the current block selects 1/4 times, the distance moved by all points in the current block is 1/4 times the moving distance found in the LUT.
  • the translation amplitude can be 0 times, that is, the moving distance of all points in the current block is 0. At this time, the curve division actually has no effect.
  • a negative value of the translation amplitude means that the movement direction is executed in the opposite direction of the original direction.
  • the translation amplitude is the multiple relationship of the actual moving distance or the moving vector, or the proportional relationship.
  • not all points to be offset may be translated in the same direction. You can translate a point on a straight line segment. The translation vector of each point is not the same, and the vectors of adjacent points move little. Keep the line continuous, and you can also get a curve segment.
  • the so-called straight lines are composed of points whose pixel positions are on the same straight line or approximately on the same straight line. These points are translated in the same direction, and the translation distance of each point is not the same. Adjacent points If the moving distance meets certain requirements, a curve segment can be obtained. Translate these points, the translation vector of each point is not the same, and the distance of the adjacent points moves to meet certain requirements, and a curve segment can be obtained.
  • the LUT stores the movement vectors of several points for a curve shape (the LUT can store one or more types of information related to the curve shape). If the divided line segment is to be translated according to a certain curve shape, each point on the line segment finds the corresponding position in the corresponding curve shape in the LUT, and moves according to the indicated movement vector. Due to the discontinuity caused by the movement, it may be necessary to add points at the discontinuous position to maintain the continuity of the curve. If you want to change the mask divided by a straight line into a mask divided by curves, after determining the direction of translation, the values of different points in a certain direction on the mask are moved according to the movement vector of the corresponding position on the LUT, which will cause problems.
  • the LUT is used to determine the translation distance or the translation vector.
  • the boundary of the division can be more flexible, and more closely fit the edge of the body or the edge of the two parts with different motion vectors, thereby improving the coding performance, and the translation method is implemented
  • the geometric division of curves has low complexity and is easy to implement.
  • the embodiment of the present application provides an inter-frame prediction method, which is applied to a video encoding device, that is, an encoder.
  • the function implemented by the method can be implemented by calling the program code by the second processor in the video encoding device.
  • the program code can be stored in the second memory.
  • the video encoding device includes at least a second processor and a second memory. .
  • FIG. 7 is a schematic diagram of the implementation process of an inter-frame prediction method according to an embodiment of the application. As shown in FIG. 7, the method includes:
  • S203 Determine a first reference block and a second reference block based on the GPM mode parameter.
  • S204 Determine 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 Determine the prediction value of the current block based on the first prediction parameter and the second prediction parameter.
  • a video image can be divided into multiple image blocks, and each image block currently to be encoded can be called a coding block (Coding Block, CB), where each coding block can include a first image component, The second image component and the third image component; and the current block is a coding block in the video image for which prediction of the first image component, the second image component, or the third image component is currently to be performed.
  • CB Coding Block
  • the current block performs the first image component prediction, and the first image component is the brightness component, that is, the image component to be predicted is the brightness component, then the current block can also be called the brightness block; or, it is assumed that the current block performs the second image component Prediction, and the second image component is a chrominance component, that is, the image component to be predicted is a chrominance component, then the current block can also be called a chrominance block.
  • the encoder determines the prediction mode parameters of the current block as follows: the encoder determines the image components to be predicted for the current block; based on the parameters of the current block, multiple prediction modes are used to perform the prediction on the image components to be predicted. Predictive coding, calculate the rate-distortion cost result corresponding to each prediction mode in multiple prediction modes; select the minimum rate-distortion cost result from the calculated multiple rate-distortion cost results, and assign the minimum rate-distortion cost result to the corresponding prediction mode Determined as the prediction mode parameter of the current block.
  • the prediction mode parameter indicates the coding mode of the current block and parameters related to the mode.
  • a rate-distortion optimization (Rate Distortion Optimization, RDO) method can be used to determine the prediction mode parameters of the current block.
  • the encoder determines the prediction mode parameters of the current block as follows: the encoder determines the image components to be predicted for the current block; based on the parameters of the current block, multiple prediction modes are used to perform the prediction on the image components to be predicted. Predictive coding, calculate the rate-distortion cost result corresponding to each prediction mode in multiple prediction modes; select the minimum rate-distortion cost result from the calculated multiple rate-distortion cost results, and assign the minimum rate-distortion cost result to the corresponding prediction mode Determined as the prediction mode parameter of the current block.
  • multiple prediction modes can be used for the current block to respectively encode the image components to be predicted.
  • multiple prediction modes usually include inter prediction mode, traditional intra prediction mode, and non-traditional intra prediction mode
  • traditional intra prediction modes can include direct current (DC) mode and plane (PLANAR). Mode and angle mode, etc.
  • Non-traditional intra prediction modes can include MIP mode, Cross-component Linear Model Prediction (CCLM) mode, Intra Block Copy (IBC) mode and PLT (Palette) mode, etc.
  • the inter-frame prediction mode may include: inter-frame geometric partition prediction mode (GPM), triangle prediction mode (Triangle partition mode, TPM), and so on.
  • GPM inter-frame geometric partition prediction mode
  • TPM Triangle partition mode
  • it also includes a curve division mode, wherein, in the embodiment of the present application, all curve division information of the curve division is stored in the LUT.
  • the rate-distortion cost result corresponding to each prediction mode can be obtained; then the minimum rate-distortion cost result is selected from the obtained multiple rate-distortion cost results, and The prediction mode corresponding to the minimum rate-distortion cost result is determined as the prediction mode parameter of the current block; in this way, the determined prediction mode can be used to encode the current block, and in this prediction mode, the prediction residual can be made small , Can improve coding efficiency.
  • the multiple prediction modes in the embodiments of this application include the GPM mode, and this application is implemented in a scenario based on the GPM prediction mode.
  • the process of the encoder to calculate the rate-distortion cost result corresponding to the GPM prediction mode may be: the encoder obtains the motion-related information set corresponding to the current block; adopts the GPM division mode For each GPM division mode in, traverse each motion-related information in the motion-related information set, and then use the curve division mode to traverse each GPM mode to obtain the rate-distortion cost result corresponding to the GPM prediction mode.
  • each motion-related information may be two MVs, which is not limited in the embodiment of the present application.
  • Sports related information is stored in the merge list.
  • the encoder will determine whether the current block uses GPM and curve division.
  • One possible method is to traverse all possible mv combinations (motion-related information sets) for the current block, traverse all possible GPM division modes for each mv combination, and traverse all curve division modes for each GPM division mode, including All translation amplitudes and curve shapes.
  • the actual coding cost rate-distortion cost result
  • the GPM division mode and curve division mode corresponding to the best coding cost that is, the minimum rate-distortion cost result
  • the process of the encoder to calculate the rate-distortion cost result corresponding to the GPM prediction mode may be: the encoder obtains the motion-related information set corresponding to the current block; adopts GPM In the division mode, traverse each motion-related information in the motion-related information set to obtain the first rate-distortion cost result corresponding to the GPM division mode; for at least one target GPM division mode with the lowest first rate-distortion cost result, traverse the curve division mode , Get the rate-distortion cost result corresponding to the GPM prediction mode.
  • all the curve division modes are traversed for each GPM division mode, including all the translation amplitudes and curve shapes.
  • the encoder determines the optimal encoding cost, that is, the GPM mode parameter and curve division information of the current block corresponding to the rate-distortion cost result. Then the encoder can determine the optimal encoding cost based on the GPM mode parameters. The first reference block and the second reference block corresponding to the motion-related information. Based on the GPM mode parameter and the curve division information, the first prediction parameter corresponding to the first reference block and the second prediction parameter corresponding to the second reference block can be determined . Finally, the encoder determines the prediction value of the current block based on the first prediction parameter and the second prediction parameter.
  • the first prediction parameter includes: a first weight value or first boundary position information
  • the second prediction parameter includes: a second weight value or second boundary position information
  • first weight value and the second weight value are the weight values corresponding to the pixels when the mask method is used for GPM division, and the first boundary position information and the second boundary position information are the first reference block and the second Reference block boundary information.
  • the encoder determines that 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 curve division information can be divided into two based on the difference in prediction parameters. Ways, as follows:
  • the first prediction parameter includes: a first weight value; the second prediction parameter includes: a second weight value; the encoder determines the preset weight distribution corresponding to the current GPM mode according to the GPM mode parameter; determines the size information of the current block ; According to the size information, GPM mode parameters and curve division information, the preset weight distribution is updated to obtain the curve weight distribution; according to the curve weight distribution, the first weight value and the second weight value are obtained.
  • the curve division information includes: translation amplitude and curve shape index; the encoder determines the offset direction according to GPM mode parameters; determines the offset amount according to the size information, translation amplitude and curve shape index; according to the offset direction, After the preset weight of each pixel position in the preset weight distribution is shifted by the offset, the updated curve weight of each pixel position is obtained, thereby obtaining the curve weight distribution.
  • the first prediction parameter includes: the first boundary position information; the second prediction parameter includes: the second boundary position information; the encoder obtains the size information of the current block; based on the GPM mode parameters and the size information, the division boundary position information is determined; According to the GPM mode parameters, size information and curve division information, offset the division boundary position information to determine the curve division boundary position information; based on the curve division boundary position information, determine the first boundary position information and the second boundary position information.
  • the curve division information includes: translation amplitude and curve shape index; the encoder determines the offset direction according to GPM mode parameters; determines the offset according to the size information, translation amplitude and curve shape index; according to the offset direction, After dividing the position offset of each pixel of the dividing boundary position information, the curve dividing boundary position information is obtained.
  • the preset weight distribution refers to the original mask when the GPM division mode is divided by a straight line.
  • the curve weight distribution is now based on the corresponding weight distribution information when the curve is divided. It is a translation calculation of the preset weight distribution and updates owned.
  • the encoder mainly uses size information, GPM mode parameters, and curve division information to update the preset weight distribution to obtain the curve weight distribution. From the curve weight distribution, the first reference block corresponding to each pixel of the current block is obtained. The first weight value, and the second weight value corresponding to the second reference block.
  • the encoder determines the offset direction according to the angle information in the GPM mode parameters, and determines the offset that needs to be offset according to the size information, the translation amplitude, and the curve shape index.
  • the curve division method adopted by the encoder for the current block can adopt the pixel value of the first reference block as the first predicted value for the part of the first reference block, and adopt the second reference block for the part of the second reference block.
  • the pixel value of is the second predicted value, but at the boundary position, the pixel points on the respective boundary information of the first reference block and the second reference block are offset to obtain the first boundary position information and the second boundary position information, Then, based on the first boundary position information and the second boundary position information, the pixel points on the boundary are predicted and implemented.
  • the encoder uses GPM mode parameters to divide the current block, and based on the size information of the current block, the division boundary position information of the current block can be obtained; at this time, the encoder determines the offset direction according to the GPM mode parameters; The size information, the translation amplitude and the curve shape index are used to determine the offset; according to the offset direction, the position of each pixel that divides the boundary position information is offset by the offset to obtain the curve division boundary position information.
  • the encoder determines the offset direction according to the GPM mode parameter as follows: when the GPM mode parameter characterizes the angle used by the GPM meets the horizontal discrimination condition, the offset direction is determined to be the horizontal direction;
  • the GPM mode parameter characterizes that when the angle used by the GPM satisfies the vertical and horizontal discrimination conditions, it is determined that the offset direction is the vertical direction.
  • the encoder determines the description of the offset according to the size information, the translation amplitude, and the curve shape index.
  • the size information includes the length and width of the current block.
  • the encoder determines that each pixel position is in the non-offset direction and is located at the first pixel position in the preset block according to each pixel position, length and the number of preset offset points , Wherein the non-offset direction is perpendicular to the offset direction; the first curve information corresponding to the first pixel position is determined according to the curve shape index; the first movement ratio is determined based on the width and the number of preset offset points; according to the first The curve information, the translation amplitude and the first movement ratio determine the offset, where the offset does not exceed the width of the current block.
  • the encoder determines that each pixel position is located at the first pixel position in the preset block in the non-offset direction according to each pixel position, length, and the number of preset offset points.
  • the realization of is: according to each pixel position, length and the number of preset offset points, determine the first zoom ratio; according to the length and the number of preset offset points, determine the first sub-offset; based on the first zoom ratio And the first sub-offset, it is determined that each pixel position is located in the first pixel position in the preset block in the non-offset direction.
  • the encoder determines that each pixel position is in the non-offset direction according to the position, width, and number of preset offset points of each pixel, The second pixel location in the preset block, where the non-offset direction is perpendicular to the offset direction; the second curve information corresponding to the second pixel location is determined according to the curve shape index; based on the length and the number of preset offset points , Determine the second movement ratio; determine the offset according to the second curve information, the translation amplitude and the second movement ratio, where the offset does not exceed the length of the current block.
  • the encoder multiplies the second curve information with the translation amplitude and the second movement ratio to obtain the offset.
  • the encoder determines that each pixel position is located at the second pixel position in the preset block in the non-offset direction according to each pixel position, width, and the number of preset offset points.
  • the implementation is: the encoder determines the second zoom ratio according to each pixel position, width and the number of preset offset points, and determines the second sub-offset according to the width and the number of preset offset points; based on the second zoom The ratio and the second sub-offset determine that each pixel position is located in the second pixel position in the preset block in the non-offset direction.
  • the encoder can combine the second weight value with the first weight value, the first pixel value of the first reference block, and the second weight value. With reference to the second pixel value of the block, the predicted value of the current block is determined.
  • the encoder weights and averages the first weight value, the first pixel value of the first reference block, the second weight value, and the second pixel value of the second reference block to obtain the prediction of the current block value.
  • the encoder After the encoder obtains the first boundary location information and the second boundary location information by using the second method, the encoder divides the current block according to the first boundary location information and the second boundary location information to obtain the first block and the second block; Based on the first pixel value of the first reference block, the first block is predicted, and based on the second pixel value of the second reference block, the second block is predicted, thereby determining the predicted value of the current block.
  • the curve division information is a division method in curve division; curve division is the translation of pixels on the direct division line in the preset linear geometric division to obtain continuous curve division lines to realize the geometry Divided.
  • each pixel point of the straight line dividing line is continuously translated according to different moving distances and the same moving direction to obtain a curved dividing line; or, each pixel point of the straight line dividing line moves according to a different movement.
  • Vector perform continuous translation to obtain the curve dividing line.
  • the movement distance is the distance between the corresponding pixel position on the preset curve shape and the line dividing line; the movement vector is the preset vector corresponding to the pixel position on the preset curve shape.
  • the moving direction is formed by a combination of the horizontal direction and the vertical direction; or, the moving direction is related to the dividing direction of the GPM.
  • the moving distance when the moving distance is not a whole pixel, the sub-pixel position is interpolated or rounded; or, the moving distance is positively correlated with the length of the current block; or, the moving distance is the sum of the length of the current block. The smallest value in the width is positively correlated.
  • the encoder needs to determine whether the current block uses the GPM division mode (or GPM prediction mode) and the curve division mode.
  • the encoder can traverse all GPM division modes and curve division modes, and for each possible situation, respectively encode the divided CU or PU. This process may involve iteratively encoding the next layer. CU or PU process to get the coding cost. The encoder tries other methods that do not use GPM and curve division, and determines the prediction mode selected by the current block in the mode with the least encoding cost.
  • the encoder predicts the current block by using curve division in the GPM mode, so that the divided boundary is more closely fitted to the edge of the body or the edge of the two parts with different motion vectors, thereby improving The accuracy of the encoding.
  • an inter-frame prediction method provided by the present application further includes: S206-S207.
  • the encoder determines the minimum rate-distortion cost result
  • the encoder can divide according to the curve Information, the curve division use flag is generated, and the curve division information is encoded.
  • the encoder puts the curve division use flag and the encoded curve division information into the code stream for the decoder to use when decoding.
  • the curve division information includes: translation amplitude and curve shape index; the encoder can generate a curve division usage flag according to the translation amplitude, and when the curve division usage flag characterization is used, encode the translation amplitude and curve shape Index to get the coded curve division information.
  • the curve division use flag characterizes that it is not used, stop coding the translation amplitude and the curve shape index.
  • the encoder can also encode the translation amplitude to obtain the encoded translation amplitude; when the translation amplitude characterization uses curve division, encode the curve shape index to obtain the encoded curve shape index.
  • the translation amplitude and the encoded curve shape index are the encoded curve division information; when the translation amplitude characterizes the use of curve division to indicate that the curve division is not used, the encoding of the curve shape index is stopped.
  • the encoder can use the GPM use flag or use other flags to derive whether the GPM is used. If the current block uses the GPM mode, the information of the division mode of the selected GPM is encoded.
  • the method of encoder GPM mode is not limited in this application.
  • the encoder needs to determine whether the GPM use flag is used or the GPM is derived from other flags. If the current block uses the selected GPM mode, then encode the partition mode information of the selected GPM, encode the information about the MV used in the two partitions of the current block or other information related to GPM, where the method of encoding the GPM mode is not described in this application. Do restrictions.
  • the curve division use flag indicates whether the curve division method is used.
  • the curve division use flag here can be determined according to the translation amplitude. When there is a translation amplitude, the curve division use flag generated is used. Flag, when there is no translation amplitude or the translation amplitude is less than a certain value, the curve division use flag is generated as an unused flag, and curve division information is not encoded. Among them, the translation amplitude is determined based on the movement distance and the movement vector.
  • the coding curve division usage flag is 1, and the translation amplitude and the curve shape index are encoded, wherein the coding order of the translation amplitude and the curve shape index is not limited. If the translation amplitude is not 0, the coding curve division use flag is 0, and the coding curve division information is stopped.
  • the encoder may first encode the translation amplitude. If the translation amplitude is not 0 (for example, 1), it means that the curve division is used and the index of the curve shape is continued to be encoded. If the translation amplitude is 0, stop coding curve division information.
  • the coding curve division information and the GPM division mode, and the MV information used in the two division parts of the current block or the order of other GPM-related information may have multiple combinations, which are not limited in this application.
  • the division mode of GPM and the coding of MV information or other GPM-related information used in the two divisions of the current block are not limited in this application.
  • One possible implementation is to use a curve division to use the flag. In this method, the range of the translation amplitude does not include 0. One possible implementation is to use the translation amplitude. If the translation amplitude is 0, the curve division is not used substantially.
  • each curve shape can be expressed as an array in the LUT (that is, all curve division information is stored). If you decide to use curve division, you need to use the curve shape index to determine which curve shape to use.
  • the curve shape that can be used for curve division may be different depending on the GPM division mode.
  • the curve shape index is the index of the available shapes. If the curve division cannot be used in a certain GPM division mode, there is no need to use the curve division usage mark, the translation amplitude, and the index of the curve shape in this GPM mode. If only one curve shape can be used in a certain GPM division mode, the curve shape index may not be used in this GPM mode.
  • VVC draft 8 takes VVC draft 8 as an example to describe the inter-frame prediction part provided in the embodiment of the present application, and the underlined part below is a manifestation of the main improvement points.
  • nCbW and nCbH specifying the width and the height of the current coding block
  • Output of this process is the (nCbW)x(nCbH)array pbSamples of prediction sample values.
  • nW, nH, shift1, offset1, hwRatio, displacementX, displacementY, partFlip and shiftHor are derived as follows:
  • offsetCX curveFactor[curveIdx][yL*N/nH+N/2nH]*curveAmplitude*nW/N
  • 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 partFlip? 32+weightIdx:32-weightIdx (1046)
  • N 64.
  • an embodiment of the present application provides a decoder 1, including:
  • the decoding unit 10 is used to parse the code stream and determine the predictive decoding parameters of the current block
  • the first determining unit 11 is configured to determine the GPM mode parameter and curve division information of the current block when the prediction decoding parameter indicates that the inter-frame geometric division prediction mode GPM is used to determine the inter-frame prediction of the current block; based on the GPM mode parameter , Determine a first reference block and a second reference block; determine a first prediction parameter corresponding to the first reference block and a second prediction parameter corresponding to a second reference block based on the GPM mode parameter and the curve division information;
  • the first prediction unit 12 is configured to determine the prediction value of the current block based on the first prediction parameter and the second prediction parameter.
  • the first prediction parameter includes: a first weight value or first boundary position information
  • the second prediction parameter includes: a second weight value or second boundary position information
  • the first prediction parameter includes: a first weight value; the second prediction parameter includes: a second weight value;
  • the first determining unit 11 is further configured to determine a preset weight distribution corresponding to the current GPM mode according to the GPM mode parameters; determine the size information of the current block; according to the size information and the GPM mode parameters And the curve division information, update the preset weight distribution to obtain the curve weight distribution; obtain the first weight value and the second weight value according to the curve weight distribution.
  • the curve division 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; and according to the size information , The translation amplitude and the curve shape index determine the offset; according to the offset direction, after the preset weight of each pixel position in the preset weight distribution is offset by the offset, The updated curve weight of each pixel position is obtained, thereby obtaining the curve weight distribution.
  • the first prediction unit 12 is also used for combining the first weight value, the first pixel value of the first reference block, and the second weight value in combination with the second reference block The second pixel value of, determines the predicted value of the current block.
  • the first prediction parameter includes: 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 division boundary position information based on the GPM mode parameter and the size information; and determine the location information of the division boundary based on the GPM mode parameter, the size information, and the size information.
  • the curve division information offsets the division boundary position information to determine the curve division boundary position information; based on the curve division boundary position information, the first boundary position information and the second boundary position information are determined.
  • 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 the first block and the second block. Block; predict the first block based on the first pixel value of the first reference block, and predict the second block based on the second pixel value of the second reference block, thereby determining the current block Predictive value.
  • the curve division 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; and according to the size information , The translation amplitude and the curve shape index determine the offset; according to the offset direction, after the position of each pixel point of the division boundary position information is offset by the offset, the Curve dividing boundary position information.
  • the first determining unit 11 is further configured to determine that the offset direction is the horizontal direction when the angle used by the GPM mode parameter characterizing the GPM satisfies the horizontal discrimination condition;
  • the GPM mode parameter indicates that when the angle used by the GPM satisfies the vertical level discrimination condition, it is determined that the offset direction is the vertical direction.
  • the size information includes the length and width of the current block
  • the first determining unit 11 is further configured to determine the position of each pixel according to the position of each pixel, the length, and the number of preset offset points when the offset direction is the horizontal direction.
  • the non-offset direction it is located at the first pixel position in the preset block, wherein the non-offset direction is perpendicular to the offset direction; according to the curve shape index, the first pixel position corresponding to the first pixel position is determined First curve information; determine a first movement ratio based on the width and the number of preset offset points; determine the offset amount according to the first curve information, the translation amplitude, and the first movement ratio , Wherein the offset does not exceed the width of the current block.
  • the first determining unit 11 is further configured to determine a first zoom ratio according to the position of each pixel, the length, and the number of preset offset points; The length and the number of the preset offset points determine a first sub-offset; based on the first zoom ratio and the first sub-offset, it is determined that the position of each pixel is in a non-offset direction Above, located at the first pixel position in the preset block.
  • the size information includes the length and width of the current block
  • the first determining unit 11 is further configured to determine when the offset direction is the vertical direction, according to the position of each pixel, the width, and the number of preset offset points, The position is in the non-offset direction and is located at the second pixel position in the preset block, where the non-offset direction is perpendicular to the offset direction; according to the curve shape index, it is determined that the second pixel position corresponds to The second curve information; based on the length and the number of preset offset points, determine the second movement ratio; according to the second curve information, the translation amplitude and the second movement ratio, determine the offset Where the offset does not exceed the length of the current block.
  • the first determining unit 11 is further configured to determine a second zoom ratio according to the position of each pixel, the width, and the number of preset offset points; The width and the number of the preset offset points determine a second sub-offset; based on the second zoom ratio and the second sub-offset, it is determined that the position of each pixel is in a non-offset direction Above, located at the second pixel position in the preset block.
  • the curve division information is a division method in curve division
  • the curve division is to translate the pixel points on the direct division line in the preset linear geometric division to obtain a continuous curve division line to realize the geometric division.
  • each pixel of the straight line dividing line performs continuous translation according to different moving distances and the same moving direction to obtain the curved dividing line;
  • Each pixel of the straight dividing line performs continuous translation according to a different movement vector to obtain the curved dividing line.
  • the moving distance is the distance between the corresponding pixel position on the preset curve shape and the dividing line of the straight line;
  • the movement vector is a preset vector corresponding to the pixel position on the preset curve shape.
  • the moving direction is formed by a combination of a horizontal direction and a vertical direction; or,
  • the moving direction is related to the dividing direction of the GPM.
  • the moving distance when the moving distance is not an integer pixel, perform interpolation or rounding processing on the sub-pixel position; or,
  • the moving distance is positively correlated with the length of the current block; or,
  • the moving distance is positively correlated with the smallest value of the length and width of the current block.
  • the decoder predicts the current block by using curve division in GPM mode, so that the divided boundary is more closely fitted to the edge of the body or the edge of the two parts with different motion vectors, thereby improving The accuracy of the encoding and decoding.
  • an embodiment of the present application also provides a decoder, including: a first processor 13 and a first memory 14 storing executable instructions of the first processor 13, so The first memory 14 relies on the first processor 13 to perform operations through the communication bus 15, and when the executable instructions are executed by the first processor 13, the inter-frame prediction method described on the decoder side is executed.
  • the first processor may be implemented by software, hardware, firmware, or a combination thereof, and may use circuits, single or multiple application specific integrated circuits (application specific integrated circuits, ASIC), single or multiple general integrated circuits, single or multiple A microprocessor, 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 can perform the inter-frame prediction on the decoder side in the foregoing embodiments The corresponding steps of the method.
  • ASIC application specific integrated circuits
  • a microprocessor single or multiple programmable logic devices
  • the embodiment of the present application provides a computer-readable storage medium that stores executable instructions.
  • the executable instructions are executed by one or more first processors, the first processor executes the decoder side The inter-frame prediction method.
  • each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software function module.
  • the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this embodiment is essentially or It is said that the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can It is a personal computer, a server, or a network device, etc.) or a processor (processor) that executes all or part of the steps of the method described in this embodiment.
  • the aforementioned storage media include: magnetic random access memory (FRAM, ferromagnetic random access memory), read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), and 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, Magnetic Surface Memory, Optical Disk
  • FRAM magnetic random access memory
  • ROM read-only memory
  • PROM programmable read-only memory
  • EPROM Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • Flash Memory Magnetic Surface Memory
  • Optical Disk Various media that can store program codes, such as CD-ROM (Compact Disc Read-Only Memory), etc., are not limited in the embodiments of the present
  • an encoder 2 including:
  • the second determining unit 20 is configured to determine the prediction mode parameter of the current block; when the prediction mode parameter indicates that the inter-frame geometric division prediction mode GPM is used to determine the inter-frame prediction of the current block, determine the GPM mode parameter and curve division of the current block Information; based on the GPM mode parameter, determine a first reference block and a second reference block; based on the GPM mode parameter and the curve division information, determine the first prediction parameter and the second reference corresponding to the first reference block The second prediction parameter corresponding to the block;
  • the second prediction unit 21 is configured to determine the prediction value of the current block based on the first prediction parameter and the second prediction parameter.
  • the encoder further includes: an encoding unit 22;
  • the encoding unit 22 is also used to determine the GPM mode parameters, curve division information, and motion-related information of the current block, when the prediction mode corresponding to the minimum rate-distortion cost result is the curve division mode of the GPM prediction mode, according to the The curve division information is generated, the curve division use flag is generated, and the curve division information is encoded; the curve division use flag and the encoded curve division information are entered into a code stream.
  • 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; when the curve division is used When the mark characterization is used, encode the translation amplitude and the curve shape index to obtain the encoded curve division information; when the curve division use mark characterization is not used, stop encoding the translation amplitude and the curve shape index. Describe the index of the curve shape.
  • the curve division information includes: a translation amplitude and a curve shape index; the encoding unit 22 is also used to encode the translation amplitude to obtain the encoded translation amplitude;
  • the translation amplitude characterization uses curve division, encode the curve shape index to obtain an encoded curve shape index, where the encoded translation amplitude and the encoded curve shape index are the encoded curve shape index.
  • Curve division information when the translation amplitude characterizes the use of curve division and characterizes the unused curve division, stop coding the curve shape index.
  • the first prediction parameter includes: a first weight value or first boundary position information
  • the second prediction parameter includes: a second weight value or second boundary position information.
  • the first prediction parameter includes: a first weight value; the second prediction parameter includes: a second weight value;
  • the second determining unit 20 is further configured to determine a preset weight distribution corresponding to the current GPM mode according to the GPM mode parameter; determine the size information of the current block; according to the size information and the GPM mode parameter And the curve division information, update the preset weight distribution to obtain the curve weight distribution; obtain the first weight value and the second weight value according to the curve weight distribution.
  • the curve division 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; and according to the size information , The translation amplitude and the curve shape index determine the offset; according to the offset direction, after the preset weight of each pixel position in the preset weight distribution is offset by the offset, The updated curve weight of each pixel position is obtained, thereby obtaining the curve weight distribution.
  • the second prediction unit 21 is further configured to combine the first weight value, the first pixel value of the first reference block, and the second weight value in combination with the second reference block.
  • the second pixel value of determines the predicted value of the current block.
  • the first prediction parameter includes: first boundary position information; the second prediction parameter includes: second boundary position information; and the second determining unit 20 is further configured to obtain The size information of the current block; based on the GPM mode parameters and the size information, determine the division boundary position information; according to the GPM mode parameters, the size information, and the curve division information, bias the division boundary position information Shift, determine curve division boundary position information; based on the curve division boundary position information, determine the first boundary position information and the second boundary position information.
  • 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 the first block and the second block. Piece;
  • the curve division 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; and according to the size information , The translation amplitude and the curve shape index determine the offset; according to the offset direction, after the position of each pixel point of the division boundary position information is offset by the offset, the Curve dividing boundary position information.
  • the second determining unit 20 is further configured to determine that the offset direction is the horizontal direction when the angle used by the GPM mode parameter characterizing the GPM satisfies the horizontal discrimination condition;
  • the GPM mode parameter indicates that when the angle used by the GPM satisfies the vertical level discrimination condition, it is determined that the offset direction is the vertical direction.
  • the size information includes the length and width of the current block; the second determining unit 20 is further configured to: when the offset direction is a horizontal direction, according to the position of each pixel , The length and the number of preset offset points are determined to be the first pixel position in the preset block in the non-offset direction at each pixel position, wherein the non-offset direction is the same as the first pixel position in the preset block.
  • the offset direction is vertical; the first curve information corresponding to the first pixel position is determined according to the curve shape index; the first movement ratio is determined based on the width and the number of preset offset points; according to the first The curve information, the translation amplitude, and the first movement ratio are used to determine the offset, wherein the offset does not exceed the width of the current block.
  • the second determining unit 20 is further configured to determine a first zoom ratio according to the position of each pixel, the length, and the number of preset offset points; The length and the number of the preset offset points determine a first sub-offset; based on the first zoom ratio and the first sub-offset, it is determined that the position of each pixel is in the non-offset direction Above, located at the first pixel position in the preset block.
  • the size information includes the length and width of the current block
  • the second determining unit 20 is further configured to determine when the offset direction is the vertical direction, according to the position of each pixel, the width, and the number of preset offset points, The position is in the non-offset direction and is located at the second pixel position in the preset block, where the non-offset direction is perpendicular to the offset direction; according to the curve shape index, it is determined that the second pixel position corresponds to The second curve information; based on the length and the number of preset offset points, determine the second movement ratio; according to the second curve information, the translation amplitude and the second movement ratio, determine the offset Where the offset does not exceed the length of the current block.
  • the second determining unit 20 is further configured to determine a second zoom ratio according to the position of each pixel, the width, and the number of preset offset points; The width and the number of the preset offset points determine a second sub-offset; based on the second zoom ratio and the second sub-offset, it is determined that the position of each pixel is in a non-offset direction Above, located at the second pixel position in the preset block.
  • the curve division information is a division method in curve division
  • the curve division is to translate the pixel points on the direct division line in the preset linear geometric division to obtain a continuous curve division line to realize the geometric division.
  • each pixel of the straight line dividing line performs continuous translation according to different moving distances and the same moving direction to obtain the curved dividing line;
  • Each pixel of the straight dividing line performs continuous translation according to a different movement vector to obtain the curved dividing line.
  • the moving distance is the distance between the corresponding pixel position on the preset curve shape and the dividing line of the straight line;
  • the movement vector is a preset vector corresponding to the pixel position on the preset curve shape.
  • the moving direction is formed by a combination of a horizontal direction and a vertical direction; or,
  • the moving direction is related to the dividing direction of the GPM.
  • the moving distance when the moving distance is not an integer pixel, perform interpolation or rounding processing on the sub-pixel position; or,
  • the moving distance is positively correlated with the length of the current block; or,
  • the moving distance is positively correlated with the smallest value of the length and width of the current block.
  • the encoder predicts the current block by using curve division in the GPM mode, so that the divided boundary is more closely fitted to the edge of the body or the edge of the two parts with different motion vectors, thereby improving The accuracy of the encoding.
  • an embodiment of the present application also provides an encoder, including: a second processor 23 and a second memory 24 storing executable instructions of the second processor 23, so The second memory 24 relies on the second processor 23 to perform operations through the communication bus 25, and when the executable instructions are executed by the second processor 23, the aforementioned inter-frame prediction on the encoder side is executed. method.
  • the second processor can be implemented by software, hardware, firmware, or a combination thereof, and can use circuits, single or multiple application-specific integrated circuits, single or multiple general-purpose integrated circuits, single or multiple microprocessors, single or multiple A programmable logic device, or a combination of the foregoing circuits or devices, or other suitable circuits or devices, so that the first processor can execute the corresponding steps of the decoder-side inter prediction method in the foregoing embodiment.
  • the embodiment of the present application provides a computer-readable storage medium that stores executable instructions, and when the executable instructions are executed by one or more second processors, the second processor executes the code corresponding to the encoder The inter-frame prediction method.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program codes.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the current block is predicted by curve division in the GPM mode, so that the divided boundary is more closely fitted to the edge of the body or the edge of the two parts with different motion vectors, thereby improving the editing. Decoding accuracy.

Landscapes

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

Abstract

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

Description

帧间预测方法、编码器、解码器及计算机可读存储介质
相关申请的交叉引用
本申请基于申请号为202010246244.3、申请日为2020年3月31日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本申请实施例涉及视频编码技术,涉及但不限于一种帧间预测方法、编码器、解码器及计算机可读存储介质。
背景技术
在视频编解码,对当前块进行编解码的过程中,除了有帧内预测外,还可以采用帧间预测方式。帧间预测可以包括运动估计和运动补偿,针对运动补偿,可以采用帧间几何划分预测模式(GPM,Geometric Partitioning Mode),将帧间的当前块划分为两个非矩形的分区(或两个块)分别进行预测后进行加权融合,从而得到当前块的预测值。
目前,在GPM的预测过程中,通过一条直线把一个矩形块划分成两个块。这里几何划分可能是划分编码单元,也可能是划分预测单元,这里统称为块。这样,被划分成的块呈三角形或梯形。而把矩形块划分成两个块的直线可以有不同的角度,不同的位置,从而可以划分出多种三角形和梯形的组合。这样的几何划分可以使块的边缘更贴近物体的边缘,或者贴近两个运动矢量不同的分区的边缘,从而能提高编码性能。
然而,这样的(直线)几何划分,不可能完全贴合物体的边缘,或者两个运动矢量不同的分区的边缘,出现对几何划分出来的边缘区域会使用过渡,对某些场景,比如自然物体中大量曲线、弧线的存在的情况,这样直线划分仍然过于生硬,从而影响到编解码的性能。
发明内容
本申请实施例提供一种帧间预测方法、编码器、解码器及计算机可读存储介质,能够提高编解码的精度。
本申请的技术方案是这样实现的:
本申请实施例提供了一种帧间预测方法,该方法应用于解码器中,包括:
解析码流,确定当前块的预测解码参数;
当所述预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;
基于所述GPM模式参数,确定第一参考块和第二参考块;
基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
本申请实施例还提供了一种帧间预测方法,该方法应用于编码器中,包括:
确定当前块的预测模式参数;
当所述预测模式参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;
基于所述GPM模式参数,确定第一参考块和第二参考块;
基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
本申请实施例提供了一种解码器,包括:
解码单元,用于解析码流,确定当前块的预测解码参数;
第一确定单元,用于当所述预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于所述GPM模式参数,确定第一参考块和第二参考块;基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
第一预测单元,用于基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
本申请实施例提供了一种编码器,包括:
第二确定单元,用于确定当前块的预测模式参数;当所述预测模式参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于所述GPM模式参数,确定第一参考块和第二参考块;基于所述GPM模式参数和所述曲线划分信息,确 定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
第二预测单元,用于基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
本申请实施例还提供了一种解码器,包括:第一处理器以及存储有所述第一处理器可执行指令的第一存储器,所述第一存储器通过通信总线依赖所述第一处理器执行操作,当所述可执行指令被所述第一处理器执行时,执行上述的权利要求1至18任一项所述的帧间预测方法。
本申请实施例还提供了一种编码器,包括:第二处理器以及存储有所述第二处理器可执行指令的第二存储器,所述第二存储器通过通信总线依赖所述第二处理器执行操作,当所述可执行指令被所述第二处理器执行时,执行上述的权利要求19至42任一项所述的帧间预测方法。
本申请实施例提供了一种计算机可读存储介质,存储有可执行指令,当所述可执行指令被一个或多个第一处理器执行时,所述第一处理器执行解码器侧的所述的帧间预测方法;或者,当所述可执行指令被一个或多个第二处理器执行时,所述第二处理器执行编码器侧的所述的帧间预测方法。
附图说明
图1为本申请实施例提供的一种视频编码系统的组成框图示意图;
图2为本申请实施例提供的一种视频解码系统的组成框图示意图;
图3为本申请实施例提供的一种帧间预测方法的实现流程示意图;
图4a-图4i为本申请实施例提供的示例性的VVC所采用的几何划分方法的示意图;
图5为本申请实施例提供的示例性的VVC的几何划分的划分角度示意图;
图6为本申请实施例提供的示例性的直线划分线到曲线划分线的变换示意图;
图7为本申请实施例提供的另一种帧间预测方法的实现流程示意图一;
图8为本申请实施例提供的另一种帧间预测方法的实现流程示意图二;
图9为本申请实施例提供的一种解码器的结构示意图一;
图10为本申请实施例提供的一种解码器的结构示意图二;
图11为本申请实施例提供的一种编码器的结构示意图一;
图12为本申请实施例提供的一种编码器的结构示意图二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
本申请提供一种视频编码系统,如图1所示,该视频编码系统11包括:
变换单元111、量化单元112、模式选择和编码控制逻辑单元113、帧内预测单元114、帧间预测单元115(包括:运动补偿和运动估计)、反量化单元116、反变换单元117、环路滤波单元118、编码单元119和解码图像缓存单元110;针对输入的原始视频信号,通过编码树块(Coding Tree Unit,CTU)的划分可以得到一个视频重建块,通过模式选择和编码控制逻辑单元113确定编码模式,然后,对经过帧内或帧间预测后得到的残差像素信息,通过变换单元111、量化单元112对该视频重建块进行变换,包括将残差信息从像素域变换到变换域,并对所得的变换系数进行量化,用以进一步减少比特率;帧内预测单元114用于对该视频重建块进行帧内预测;其中,帧内预测单元114用于确定该视频重建块的最优帧内预测模式(即目标预测模式);帧间预测单元115用于执行所接收的视频重建块相对于一或多个参考帧中的一或多个块的帧间预测编码,以提供时间预测信息;其中吗,运动估计为产生运动向量的过程,所述运动向量可以估计该视频重建块的运动,然后,运动补偿基于由运动估计所确定的运动向量执行运动补偿;在确定帧间预测模式之后,帧间预测单元115还用于将所选择的帧间预测数据提供到编码单元119,而且,将所计算确定的运动向量数据也发送到编码单元119;此外,反量化单元116和反变换单元117用于该视频重建块的重构建,在像素域中重构建残差块,该重构建残差块通过环路滤波单元118去除方块效应伪影,然后,将该重构残差块添加到解码图像缓存单元110的帧中的一个预测性块,用以产生经重构建的视频重建块;编码单元119是用于编码各种编码参数及量化后的变换系数。而解码图像缓存单元110用于存放重构建的视频重建块,用于预测参考。随着视频图像编码的进行,会不断生成新的重构建的视频重建块,这些重构建的视频重建块都会被存放在解码图像缓存单元110中。
本申请实施例提供一种视频解码系统,图2为本申请实施例视频编码系统的组成结构示意图,如图2所示,该视频编码系统12包括:
解码单元121、反变换单元127,与反量化单元122、帧内预测单元123、运动补偿单元124、环路滤波单元125和解码图像缓存单元126单元;输入的视频信号经过视频编码系统11进行编码处理之后,输出该视频信号的码流;该码流输入视频解码系统12中,首先经过解码单元121,用于得到解码后的变换系数;针对该变换系数通过反变换单元127与反量化单元122进行处理,以便在像素域中产生残差块;帧内预测单元123可用于基于所确定的帧内预测方向和来自当前帧或图片的先前经解码块的数据而产生当前视频解码块的预测数据;运动补偿单元124是通过剖析运动向量和其他关联语法元素来确定用于视频解码块的预测信息,并使用该预测信息以产生正被解码的视频解码块的预测性块;通过对来自反变换单元127与反量化单元122的残差块与由帧内预测单元123或运动补偿单元124产生的对应预测性块进行求和,而形成解码的视频块;该解码的视频信号通过环路滤波单元125以便去除方块效应伪影,可以改善视频质量;然后将经解码的视频块存储于解码图像缓存单元126中,解码图像缓存单元126存储用于后续帧内预测或运动补偿的参考图像,同时也用 于视频信号的输出,得到所恢复的原始视频信号。
本申请实施例提供的一种帧间预测方法主要作用于视频编码系统11的帧间预测单元215和视频解码系统12的帧间预测单元,即运动补偿单元124;也就是说,如果在视频编码系统11能够通过本申请实施例提供的帧间预测方法得到一个较好的预测效果,那么,对应地,在解码端,也能够改善视频解码恢复质量。
基于此,下面结合附图和实施例对本申请的技术方案进一步详细阐述。在进行详细阐述之前,需要说明的是,说明书通篇中提到的“第一”、“第二”、“第三”等,仅仅是为了区分不同的特征,不具有限定优先级、先后顺序、大小关系等功能。
本申请实施例提供一种帧间预测方法,该方法应用于视频解码设备,即解码器。该方法所实现的功能可以通过视频解码设备中的第一处理器调用程序代码来实现,当然程序代码可以保存在第一存储器中,可见,该视频解编码设备至少包括第一处理器和第一存储器。
图3为本申请实施例一种帧间预测方法的实现流程示意图,如图3所示,该方法包括:
S101、解析码流,确定当前块的预测解码参数。
S102、当预测解码参数指示使用GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息。
S103、基于GPM模式参数,确定第一参考块和第二参考块。
S104、基于GPM模式参数和曲线划分信息,确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数。
S105、基于第一预测参数和第二预测参数,确定当前块的预测值。
在本申请实施例中,解码器在进行解码的过程中,从码流中可以解析出编码器在进行编码时采用的编码手段等信息,即针对当前块的预测解码参数,而基于目前编码方式的多样性,解码器解码出来的预测模式可能是多种多样的,本申请实施例提供的帧间预测方式是只有在编码采用GPM预测模式的情况下实现的场景。
当解码器解析码流获取预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测,就采用本申请实施例提供的帧间预测方式,从码流中解析出编码时采用的当前块的GPM模式参数和曲线划分信息。
其中,GPM模式参数包括GPM的划分模式和运动相关信息。这里的GPM的划分模式可以为64种。
在本申请实施例中,解码器解码当前块的预测模式,如果当前块使用了GPM,GPM需要解码GPM的划分模式。如果GPM使用的是蒙版(mask)的方法,则解码当前块的两个划分部分使用的运动矢量(motion vector,MV)的信息或GPM相关其他信息。
对于曲线划分模式,解码器可以解码码流中的曲线划分使用标志来直接确定,例如,曲线划分使用标志为1(表征被使用),则表征当前块使用曲线划分,可以解码码流中传输的平移幅度和或曲线形状的索引,其中,平移幅度和曲线形状的索引的解码顺序可以对掉,本申请实施例不作限制。如果曲线划分使用标志为0(表征未被使用),则停止解码曲线划分信息。
在本申请实施例中,对于曲线划分模式,解码器可以解码码流中平移幅度来间接确定,如果平移幅度不为0(表征曲线划分模式被使用),则表示使用曲线划分,继续解码曲线形状索引。如果平移幅度为0(表征曲线划分模式未被使用),则停止解码曲线划分信息。其中,解码曲线划分的信息、GPM的划分模式、当前块的两个划分部分使用的MV的信息或GPM相关其他信息的顺序可能有多种组合,本申请实施例不作限制。GPM的划分模式、当前块的两个划分部分使用的MV的信息或GPM相关其他信息的解码方式本申请不作限制。
需要说明的是,在本申请实施例中,视频图像可以划分为多个图像块,每个当前待解码的图像块可以称为解码块,其中,每个解码块可以包括第一图像分量、第二图像分量和第三图像分量;而当前块为视频图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的解码块。
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。
还需要说明的是,预测模式参数指示了当前块的编码模式及该模式相关的参数。
在本申请实施例中,GPM的划分模式可以包括:角度索引信息,还可以包括:步长索引信息和目标划分模式等等,本申请实施例不作限制。
需要说明的是,目前GPM几何划分可以划分出任何通过几何函数能计算出的形状,考虑到应用场景和实现复杂度,目前已有的几何划分方法都是通过一条直线把一个矩形块划分成两个块。这里几何划分可能是划分编码单元(CU coding unit),也可能是划分预测单元(PU prediction unit),这里统称为当前块。被划分成的块呈三角形,矩形或梯形。将矩形块划分成两个块的直线可以有不同的角度,不同的位置,从而可以划分出多种三角形,矩形和梯形的组合。通常对几何划分出来的边缘区域会使用过渡,如使用加权平均方法在划分边缘使用渐进的系数过渡,从而使划分的边缘不会过于生硬。目前VVC所采用的几何划分方法。需要说明的是,在本申请实施例中,GPM是针对图像中物体边缘部分,将帧间块(即,当前块)划分为两个非矩形的子块分别进行预测后进行加权融合。例如,非矩形的形式可以如下图4a-4i所示。
如图5所示,VVC的几何划分将一周的角度分成32份,直线相对于块中心距离的偏移可以有4 种不同的值,其中有一种是0,即直线过块的中心。当前VVC使用了32个角度中的部分角度,而偏移的方法随角度的不同有所不同,部分与已有的二叉树三叉树等划分重合的模式也被剔除。
在本申请实施例中,解码器在获取了当前块的GPM模式参数和曲线划分信息之后,该解码器就可以基于GPM模式参数中的GPM的划分模式和运动相关信息,确定出不同分区对应的第一参考块和第二参考块了,再基于GPM模式参数和曲线划分信息,就可以确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数。
在本申请实施例中,第一预测参数包括:第一权重值或第一边界位置信息;第二预测参数包括:第二权重值或第二边界位置信息。
需要说明的是,第一权重值和第二权重值为采用蒙版方法进行GPM划分时的像素点对应的权重值,第一边界位置信息和第二边界位置信息为第一参考块和第二参考块的边界信息。
在本申请实施例中,解码器基于GPM模式参数和曲线划分信息,确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数可以基于预测参数的不同,划分为两种方式,如下:
方式一:第一预测参数包括:第一权重值;第二预测参数包括:第二权重值;解码器根据GPM模式参数,确定与当前GPM模式对应的预设权重分布;确定当前块的尺寸信息;根据尺寸信息、GPM模式参数和曲线划分信息,对预设权重分布进行更新,得到曲线权重分布;根据曲线权重分布,得到第一权重值和第二权重值。
需要说明的是,曲线划分信息包括:平移幅度和曲线形状索引;解码器根据GPM模式参数确定偏移方向;根据尺寸信息、平移幅度和曲线形状索引,确定偏移量;按照偏移方向,将预设权重分布中的每个像素位置的预设权重偏移偏移量后,得到更新后的每个像素位置的曲线权重,从而得到曲线权重分布。
方式二:第一预测参数包括:第一边界位置信息;第二预测参数包括:第二边界位置信息;解码器获取当前块的尺寸信息;基于GPM模式参数和尺寸信息,确定划分边界位置信息;根据GPM模式参数、尺寸信息和曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息;基于曲线划分边界位置信息,确定第一边界位置信息和第二边界位置信息。
需要说明的是,曲线划分信息包括:平移幅度和曲线形状索引;解码器根据GPM模式参数确定偏移方向;根据尺寸信息、平移幅度和曲线形状索引,确定偏移量;按照偏移方向,对划分边界位置信息的每个像素点的位置偏移偏移量后,得到曲线划分边界位置信息。
在方式一中,预设权重分布指GPM的划分模式采用直线划分时对应的原始蒙版,曲线权重分布为现在基于曲线划分时对应的权重分布信息,是对预设权重分布进行平移计算,更新得到的。解码器主要采用尺寸信息、GPM模式参数和曲线划分信息,对预设权重分布进行更新,得到曲线权重分布,在从曲线权重分布中,得到当前块的每个像素点的第一参考块对应的第一权重值,以及第二参考块对应的第二权重值。
在本申请的一些实施例中,解码器是根据GPM模式参数中的角度信息来确定偏移方向的,并根据尺寸信息、平移幅度和曲线形状索引,确定出需要偏移的偏移量的。
在方式二中,解码器针对当前块采用的曲线划分方式,可以为第一参考块的部分采用第一参考块的像素值为第一预测值,第二参考块的部份采用第二参考块的像素值为第二预测值,但在边界位置,则对第一参考块和第二参考块的各自的边界信息上的像素点进行偏移得到第一边界位置信息和第二边界位置信息,再基于第一边界位置信息和第二边界位置信息对边界上的像素点进行预测实现。
需要说明的是,采用GPM模式参数,对当前块进行划分,基于当前块的尺寸信息,可以获知当前块的划分边界位置信息;这时,解码器根据GPM模式参数确定偏移方向;根据尺寸信息、平移幅度和曲线形状索引,确定偏移量;按照偏移方向,对划分边界位置信息的每个像素点的位置偏移了偏移量后,得到曲线划分边界位置信息。
在本申请实施例中,解码器解码块划分信息,如果当前块使用了GPM,GPM需要解码GPM的划分模式。
示例性的,如果GPM使用的是划分CU或PU的方法,则根据GPM的模式信息及曲线划分信息等确定划分的边界。如果根据GPM的模式信息确定的划分边界为boundary,(x n,y n)为boundary上的点。解码器根据GPM的模式信息及曲线划分信息等确定划分的边界为boundary’,(x′ n,y′ n)为boundary’上的点。
针对上述实现情况,在本申请实施例中,解码器根据GPM模式参数确定偏移方向的实现为:当GPM模式参数表征GPM使用的角度满足水平判别条件时,确定偏移方向为水平方向;当GPM模式参数表征GPM使用的角度满足竖直平判别条件时,确定偏移方向为竖直方向。
在本申请的一些实施例中,解码器是根据GPM模式参数中的角度信息来确定偏移方向的。
在本申请的一些实施例中,竖直判别条件为角度在水平角度范围内;水平平判别条件为角度在竖直角度范围内,或者除水平判别条件外的其他情况为竖直方向,本申请实施例不限制判别条件,只要能区分移动方向的方式均可。
示例性的,当GPM划分参数中的角度信息,即angle为4到12不包括12或angle为20到28不包括28时,偏移方向为竖直方向,否则偏移方向为水平方向,本申请实施例不作限制。即竖直判别条件可以为If((angleIdx>=4&&angleIdx<12)||(angleIdx>=20&&angleIdx<28))。
下面针对不同的偏移方式的情况,解码器根据尺寸信息、平移幅度和曲线形状索引,确定偏移量的描述。
在本申请实施例中,尺寸信息包括当前块的长度和宽度。
当偏移方向为水平方向时,根据每个像素位置、长度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第一像素位置,其中,非偏移方向与偏移方向垂直;根据曲线形状索引,确定第一像素位置对应的第一曲线信息;基于宽度和预设偏移点的数量,确定第一移动比例;根据第一曲线信息、平移幅度和第一移动比例,确定偏移量,其中,偏移量不超过当前块的宽度。
需要说明的是,预设偏移点的数量为不同的曲线划分模式下对应的待偏移的点的数量,在本申请实施例中,预设偏移点的数量可以为64,本申请实施例不作限制,预设偏移点的数量越多,则曲线划分的越好。
在本申请实施例中,当偏移方向为水平方向时,非偏移方向为竖直方向;当偏移方向为竖直平方向时,非偏移方向为水平方向。
在本申请实施例中,解码器将第一曲线信息与平移幅度和第一移动比例相乘,得到偏移量。
在本申请的一些实施例中,解码器根据每个像素位置、长度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第一像素位置的实现为:根据每个像素位置、长度和预设偏移点的数量,确定第一缩放比例;根据长度和预设偏移点的数量,确定第一子偏移量;基于第一缩放比例和第一子偏移量,确定每个像素位置在非偏移方向上,位于预设块中的第一像素位置。
在本申请实施例中,解码器用每个像素位置的纵坐标乘以预设偏移点的数量与长度的占比,得到第一缩放比例,或者,解码器用长度和预设偏移点的数量的以2为底的对数和移位得到第一缩放比例;解码器再根据预设偏移点的数量与(2*长度),得到第一子偏移量;最后,该解码器将第一缩放比例和第一子偏移量相加,得到第一像素位置。其中,预设偏移点的数量可能为64,32,16,8等,本申请实施例不作限制。
示例性的,假设解码器根据曲线划分使用的平移幅度和曲线形状及蒙版P(预设权重分布)得到蒙版P’(曲线权重分布),设平移幅度为curveAmplitude,平移使用的曲线形状索引为curveIdx,共有曲线形状NUM_CURVE个,LUT(曲线信息)为curveFactor[NUM_CURVE][N],其中N可以为64、32、16、8等。设当前块的宽度为width,长度为height,GPM使用的角度为angle。
如果当前块使用水平方向,每个像素点(x,y)的P’如公式(1)所示,如下:
P’[x][y]=P[x-offsetX][y]         (1)
其中,offsetX为偏移量。偏移量为公式(2)获得,如下:
offsetX=curveFactor[curveIdx][y N]*curveAmplitude*Scale1      (2)
这里,curveFactor[curveIdx][y N]为第一曲线信息,curveAmplitude为平移幅度,Scale1为第一移动比例。
这里,第一移动比例为公式(3)获得,y N为公式(4)获得如下:
Scale1=width/N         (3)
y N=y*N/height+offset1       (4)
其中,offset1为第一子偏移量,由公式(5)确定,如下:
Offset1=N/(2*height)         (5)
需要说明的是,x-offsetX不会超过正常的当前块的范围,如0~width-1。
在本申请的一些实施例中,当偏移方向为竖直方向时,解码器根据每个像素位置、宽度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第二像素位置,其中,非偏移方向与偏移方向垂直;根据曲线形状索引,确定第二像素位置对应的第二曲线信息;基于长度和预设偏移点的数量,确定第二移动比例;根据第二曲线信息、平移幅度和第二移动比例,确定偏移量,其中,偏移量不超过当前块的长度。
在本申请实施例中,解码器将第二曲线信息与平移幅度和第二移动比例相乘,得到偏移量。
在本申请的一些实施例中,解码器根据每个像素位置、宽度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第二像素位置的实现为:解码器根据每个像素位置、宽度和预设偏移点的数量,确定第二缩放比例根据宽度和预设偏移点的数量,确定第二子偏移量;基于第二缩放比例和第二子偏移量,确定每个像素位置在非偏移方向上,位于预设块中的第二像素位置。
在本申请实施例中,解码器用每个像素位置的横坐标乘以预设偏移点的数量与宽度的占比,得到第二缩放比例,或者,解码器用宽度和预设偏移点的数量的以2为底的对数和移位得到第二缩放比例;解码器再根据预设偏移点的数量与(2*宽度),得到第二子偏移量;最后,该解码器将第二缩放比例和第二子偏移量相加,得到第二像素位置。
示例性的,假设解码器根据曲线划分使用的平移幅度和曲线形状及蒙版P(预设权重分布)得到蒙版P’(曲线权重分布),设平移幅度为curveAmplitude,平移使用的曲线形状索引为curveIdx,共有曲线形状NUM_CURVE个,LUT(曲线信息)为curveFactor[NUM_CURVE][N],其中N可以为64、32、16、8等。设当前块的宽度为width,长度为height,GPM使用的角度为angle。
如果当前块使用竖直方向,每个像素点(x,y)的P’如公式(6)所示,如下:
P’[x][y]=P[x][y-offsetY]       (6)
其中,offsetY为偏移量。偏移量为公式(7)获得,如下:
offsetX=curveFactor[curveIdx][x N]*curveAmplitude*Scale2    (7)
这里,curveFactor[curveIdx][x N]为第二曲线信息,curveAmplitude为平移幅度,Scale2为第二移动比例。
这里,第二移动比例为公式(8)获得,x N为公式(9)获得如下:
Scale2=height/N         (8)
x N=x*N/width+offset2      (9)
其中,offset2为第二子偏移量,由公式(10)确定,如下:
offset2=N/(2*width)        (10)
需要说明的是,y-offsetY不会超过正常的当前块的范围,如0~height-1。
基于上述两种偏移方向,采用另一种表示方式表达偏移过程为:
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
其中,nW为宽度,nH为长度,offsetCX为offsetX,offsetCY为offsetY,angleIdx为角度索引。
在本申请的一些实施例中,解码器还可以先根据曲线划分使用的平移幅度和曲线形状确定当前块的每个像素点(x,y)在预设权重分布上的位置(x’,y’),再用对每个像素点(x,y)计算predSamples[x][y]时,基于预设权重分布、述偏移方向和偏移量在再临时计算出所需要的P[x’][y’]。
示例性的,如果当前块使用水平方向,x’=x-offsetX,y’=y
如果当前块使用竖直方向,x’=x,y’=y-offsetY
其中,offsetX和offsetY与上面得到的方式相同。
需要说明的是,在本申请实施例中,解码器可能先计算出蒙版P,再对每一个点(x,y)计算predSamples[x][y]。也可能在对每个点(x,y)计算predSamples[x][y]时临时计算出所需要的P[x][y]。在这种情况下,使用曲线划分方法在对每个点(x,y)计算predSamples[x][y]时临时计算出所需要的P[x’][y’],本申请实施例不作限制,最后的目的一致。
解码器在采用方式一得到了第一权重值和第二权重值之后,该解码器就可以根据第一权重值、第一参考块的第一像素值、第二权重值结合第二参考块的第二像素值,确定出当前块的预测值。
在本申请实施例中,解码器将第一权重值、第一参考块的第一像素值、第二权重值和第二参考块的第二像素值进行加权和,得到出当前块的预测值。
示例性的,设第一参考块在(x,y)位置的像素值为predSamplesLA[x][y],第二个参考块在(x,y)位置的像素值为predSamplesLB[x][y],解码器是根据GPM的划分模式得到蒙版P蒙版矩阵,蒙版上每一个像素位置(x,y)上都有一个值P[x][y]标志第一个参考块(x,y)上的权重,M为两个参考块对应位置的权重之和,则第二个参考块(x,y)上的权重为M-P[x][y]。解码器根据曲线划分使用的平移幅度和曲线形状及蒙版P得到蒙版P’。
这是,当前块的一个像素点(x,y)的预测值如公式(11)所示:
predSamples[x][y]=(P’[x][y]*predSamplesLA[x][y]+(M-P’[x][y])*predSamplesLB[x][y])/M            (11)
其中,predSamples[x][y]为当前块的一个像素点(x,y)的预测值。
需要说明的是,M可以是一个2整数的幂,如4,8,16等,从而可以使等式中的除法写成右移的形式。如果predSamples[x][y]超过了正常的取值范围,需要处理到取值范围以内,这里本申请不作限制。
解码器在采用方式二得到了第一边界位置信息和第二边界位置信息之后,该解码器基于第一预测参数和第二预测参数,确定当前块的预测值的实现为:解码器根据第一边界位置信息和第二边界位置信息,划分当前块,得到第一块和第二块;基于第一参考块的第一像素值,对第一块进行预测,以及基于第二参考块的第二像素值,对第二块进行预测,从而确定当前块的预测值。
可以理解的是,解码器通过采用在GPM模式下,采用曲线划分的方式对当前块进行预测,使得划分出来的边界更贴合物体的边缘或者两个运动矢量不同的部分的边缘,从而提高了编解码的精度。
需要说明的是,解码器在得到当前块的预测块后,解码器解码当前块的残差信息,包括解码系数,反量化反变换得到残差块,将残差块加到预测块上得到当前块的解码块。
在本申请实施例提供的帧间预测时采用曲线划分的方式。
在本申请实施例中,曲线划分信息为曲线划分中的一种划分方式;曲线划分是将预设直线几何划分中的直接划分线上的像素点进行平移,得到连续的曲线划分线来实现几何划分的。
在本申请的一些实施例中,直线划分线的每个像素点按照不同的移动距离,相同的移动方向进行连续平移,得到曲线划分线;或者,直线划分线的每个像素点按照不同的移动向量,进行连续平移,得到曲线划分线。
也就是说,一条直线段(这里所说的直线都是线段)上的点按同一个方向进行平移,每个点平移的距离不都相同,相邻点移动的距离差别不大,保持线的连续,就可以得到一条曲线段。或者将一条直线段上的点进行平移,每个点平移的向量不都相同,相邻点移动的向量差别不大,保持线的连续,也可以得到一条曲线段。对于视频编解码来说,所谓直线都是由像素位置在同一直线或近似 在同一直线上的点所组成,将这些点按同一个方向平移,每个点平移的距离不都相同,相邻点移动的距离符合一定的要求,就可以得到一条曲线段。将这些点进行平移,每个点平移的向量不都相同,相邻点移动的距离符合一定的要求,就可以得到一条曲线段。
示例性的,如图6所示的直线到曲线的变换示意图,将几何划分中两个块的边界线上的点按如上图中所示的箭头的方法进行平移,边界线可以变成曲线段,直线划分可以变成曲线划分。将分界线附近的过渡区域上的点按如上述的方法进行平移,直线段的过渡区域可以变成曲线段的过渡区域。对蒙版实现的几何划分的方法来说,将蒙版上的点的值按如上所述的方法进行平移,直线几何划分的蒙版可以变成曲线几何划分的蒙版。
在本申请的一些实施例中,移动距离为预设曲线形状上对应像素位置与直线划分线的距离;移动向量为预设曲线形状上对应像素位置的预设向量。
需要说明的是,本申请实施例中,可以使用LUT(look up table)存储曲线划分对应的预设向量或预设距离。
在本申请实施例中,假设所有点沿同一个方向(水平方向,或竖直方向,或其他某一种角度的方向)移动,LUT中对一种曲线形状保存若干点的移动距离,LUT中可以保存一种或多种曲线形状。其中,曲线形状是曲线本身的形状,当一条直线按某一方向按这个曲线方向进行平移后的曲线未必与曲线本身的形状相同。如是要将划分的线段按某种曲线形状进行平移,则线段上的每一个点找到LUT中对应的曲线形状中对应位置,按既定的方向按所指示的移动距离进行移动,可以限制点移动后不得超出某个边界。如是要将直线划分的蒙版变成曲线划分的蒙版,可以在确定平移的方向后,蒙版上垂直于平移方向的不同点的值分别按照LUT上相应位置的移动距离进行移动,蒙版上与平移方向相同的点的值按照相同的移动距离进行移动。可以理解为新的曲线划分的蒙版参考直线划分的蒙版得到。
在本申请的一些实施例中,超出所需范围的点的值被舍弃,也可以限制点的值移动后不得超出某个边界。而缺少的点的值按有效范围的边缘的原来的值进行补充。
在本申请的一些实施例中,曲线划分的蒙版的点的值按它所应移动的方向及距离的反向从直线划分的蒙版中找到相对应的点的值,如果要找的点超出了有效的界限,则以与移动方向同一条直线上的界限上的点的值代替。
在本申请的一些实施例中,假设不是所有的点都沿同一个方向移动,LUT中对一种曲线形状保存若干点的移动向量,LUT中可以保存一种或多种曲线形状。如是要将划分的线段按某种曲线形状进行平移,则线段上的每一个点找到LUT中对应的曲线形状中对应位置,按所指示的移动向量进行移动。由于移动导致的不连续,可能需要在不连续的位置补充点以保持曲线的连续性。如是要将直线划分的蒙版变成曲线划分的蒙版,可以在确定平移的方向后,蒙版上某一方向上的不同点的值分别按照LUT上相应位置的移动向量进行移动,对造成不连续的地方补充点的值。蒙版上与上述方向同一垂直方向上的点的值按照相同的移动向量进行移动。对造成不连续的地方补充点的值。超出所需范围的点的值被舍弃,也可以限制点的值移动后不得超出某个边界。而缺少的点的值按所需范围的边缘的原来的值进行补充。
在本申请的一些实施例中,移动方向由水平方向和竖直方向组合形成;或者,移动方向与GPM的划分方向相关。
在本申请的一些实施例中,当移动距离不是整像素时,对分像素位置进行插值或者取整处理;或者,移动距离与当前块的长度正相关;或者,移动距离与当前块的长度和宽度中最小的数值正相关。
在本申请的一些实施例中,移动方向可以是水平方向或竖直方向,也可以是其他任意方向。假设移动方向不是水平或竖直方向,则可以拆分成水平加竖直方向的移动。
示例性的,45°方向移动2个像素距离可以拆分成水平0°方向移动
Figure PCTCN2021074252-appb-000001
个像素距离加上竖直90°方向移动
Figure PCTCN2021074252-appb-000002
个像素距离。
在本申请实施例中,对于移动距离不是整像素的情况,一种可能的实现方式是取近似的整像素位置,例如取整运算,一种可能的实现方式是对分像素位置进行插值。
示例性的,
Figure PCTCN2021074252-appb-000003
个像素距离可近似为1个像素距离或2个像素距离,或1.5个像素距离或1.4个像素距离。1.5个像素距离或1.4个像素距离的值需要插值得到。其他角度也可以根据三角函数或预先算好的比值拆分成水平和竖直方向的移动。水平移动方向可以用正值表示0°方向负值表示180°方向,竖直移动方向可以用正值表示90°方向负值表示270°方向。
在本申请实施例中,一种可能的实现方式是只使用水平移动方向加竖直移动方向;一种可能的实现方式是只用用水平移动方向加竖直移动方向加45°、135°、225°、315°移动方向。其中,45°、135°、225°、315°移动方向都可以分解成水平竖直方向数值相等的移动,而4个角度可以用水平竖直方向的正负号进行表示;一种可能的实现方式是使用多种角度方向。
需要说明的是,移动的方向可以是和GPM的划分方向相关的。在只有水平方向和竖直方向移动的情况下,如果GPM直线划分使用的直线角度是水平的或者接近水平的,曲线划分使用竖直移动方向,如果GPM直线划分使用的直线角度是竖直或者接近竖直的,曲线划分使用水平移动方向。更一般地,可以设置一些阈值,在直线角度或划分使用的角度或划分模式在一定的阈值范围内使用水平移动方向,在另外的范围内使用竖直移动方向。同样的原理,在只用水平移动方向加竖直移动方向加45°、135°、225°、315°移动方向的情况下或者使用多种移动方向,在直线角度或划分使用 的角度或划分模式设置阈值范围区分每种移动方向的使用范围。
需要说明的是,移动距离和当前块的长宽可能有关系。一种可能的实现是,移动的距离与当前块在当前移动方向同方向的长度成正比。举例,如当前块在当前移动方向同方向的长度为64,当前块所有点移动的距离是其在LUT中找到的数值。如当前块在当前移动方向同方向的长度为32,当前块所有点移动的距离是其在LUT中找到的数值的1/2。一种可能的实现是,移动的距离与当前块较短长度成正比。
在本申请实施例中,可以设置不同的平移幅度,即1/4倍,1/2倍,1倍,2倍等。如果当前块选择1/4倍,则当前块所有点移动的距离是其在LUT中找到的移动距离的1/4倍。平移幅度可以是0倍,即当前块所有点的移动的距离都是0,这时,实际上曲线划分没有起作用。平移幅度是负值表示移动方向按原方向的反向执行。
也就是说,平移幅度为实际移动距离或移动向量的倍数关系,或等比关系。
在本申请的一些实施例中,可以不是所有的待偏移点都按同一个方向进行平移。可以将一条直线段上的点进行平移,每个点平移的向量不都相同,相邻点移动的向量差别不大,保持线的连续,也可以得到一条曲线段。
对于视频编解码来说,所谓直线都是由像素位置在同一直线或近似在同一直线上的点所组成,将这些点按同一个方向平移,每个点平移的距离不都相同,相邻点移动的距离符合一定的要求,就可以得到一条曲线段。将这些点进行平移,每个点平移的向量不都相同,相邻点移动的距离符合一定的要求,就可以得到一条曲线段。
假设不是所有的点都沿同一个方向移动,LUT中对一种曲线形状保存若干点的移动向量(LUT中可以保存一种或多种曲线形状相关的信息)。如是要将划分的线段按某种曲线形状进行平移,则线段上的每一个点找到LUT中对应的曲线形状中对应位置,按所指示的移动向量进行移动。由于移动导致的不连续,可能需要在不连续的位置补充点以保持曲线的连续性。如是要将直线划分的蒙版变成曲线划分的蒙版,可以在确定平移的方向后,蒙版上某一方向上的不同点的值分别按照LUT上相应位置的移动向量进行移动,对造成不连续的地方补充点的值。蒙版上与上述方向同一垂直方向上的点的值按照相同的移动向量进行移动。对造成不连续的地方补充点的值。超出所需范围的点的值被舍弃,也可以限制点的值移动后不得超出某个边界,缺少的点的值按所需范围的边缘的原来的值进行补充。
在本申请实施例中,使用LUT确定平移的距离或平移向量。
可以理解的是,通过使用平移的方法实现曲线几何划分,能够使划分的边界更灵活,更贴合物体的边缘或两个运动矢量不同的部分的边缘,从而提高编码性能,而且平移的方法实现曲线几何划分的复杂度低,易于实现。
本申请实施例提供一种帧间预测方法,该方法应用于视频编码设备,即编码器。该方法所实现的功能可以通过视频编码设备中的第二处理器调用程序代码来实现,当然程序代码可以保存在第二存储器中,可见,该视频编码设备至少包括第二处理器和第二存储器。
图7为本申请实施例一种帧间预测方法的实现流程示意图,如图7所示,该方法包括:
S201、确定当前块的预测模式参数。
S202、当预测模式参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息。
S203、基于GPM模式参数,确定第一参考块和第二参考块。
S204、基于GPM模式参数和曲线划分信息,确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数。
S205、基于第一预测参数和第二预测参数,确定当前块的预测值。
在本申请实施例中,视频图像可以划分为多个图像块,每个当前待编码的图像块可以称为编码块(Coding Block,CB),其中,每个编码块可以包括第一图像分量、第二图像分量和第三图像分量;而当前块为视频图像中当前待进行第一图像分量、第二图像分量或者第三图像分量预测的编码块。
其中,假定当前块进行第一图像分量预测,而且第一图像分量为亮度分量,即待预测图像分量为亮度分量,那么当前块也可以称为亮度块;或者,假定当前块进行第二图像分量预测,而且第二图像分量为色度分量,即待预测图像分量为色度分量,那么当前块也可以称为色度块。
在本申请的一些实施例中,编码器确定当前块的预测模式参数的实现为:编码器确定当前块的待预测图像分量;基于当前块的参数,利用多种预测模式分别对待预测图像分量进行预测编码,计算多种预测模式下每一种预测模式对应的率失真代价结果;从计算得到的多个率失真代价结果中选取最小率失真代价结果,并将最小率失真代价结果对应的预测模式确定为当前块的预测模式参数。
需要说明的是,预测模式参数指示了当前块的编码模式及该模式相关的参数。通常可以采用率失真优化(Rate Distortion Optimization,RDO)的方式确定当前块的预测模式参数。
在本申请的一些实施例中,编码器确定当前块的预测模式参数的实现为:编码器确定当前块的待预测图像分量;基于当前块的参数,利用多种预测模式分别对待预测图像分量进行预测编码,计算多种预测模式下每一种预测模式对应的率失真代价结果;从计算得到的多个率失真代价结果中选取最小率失真代价结果,并将最小率失真代价结果对应的预测模式确定为当前块的预测模式参数。
也就是说,在编码器侧,针对当前块可以采用多种预测模式分别对待预测图像分量进行编码。这里,多种预测模式通常包括有帧间预测模式、传统帧内预测模式和非传统帧内预测模式,而传统 帧内预测模式又可以包括有直流(Direct Current,DC)模式、平面(PLANAR)模式和角度模式等,非传统帧内预测模式又可以包括有MIP模式、跨分量线性模型预测(Cross-component Linear Model Prediction,CCLM)模式、帧内块复制(Intra Block Copy,IBC)模式和PLT(Palette)模式等,帧间预测模式可以包括:帧间几何划分预测模式(GPM)、三角预测模式(Triangle partition mode,TPM)等。在本申请实施例中,还包括曲线划分模式,其中,在本申请实施例中,LUT中存储有曲线划分的所有曲线划分信息。
这样,在利用多种预测模式分别对当前块进行编码之后,可以得到每一种预测模式对应的率失真代价结果;然后从所得到的多个率失真代价结果中选取最小率失真代价结果,并将该最小率失真代价结果对应的预测模式确定为当前块的预测模式参数;如此,最终可以使用所确定的预测模式对当前块进行编码,而且在这种预测模式下,可以使得预测残差小,能够提高编码效率。
在本申请实施例中,由于预测模式可以有很多种,而一种预测模式中又可以有很多种具体的划分模式,因此,需要先针对所有预测模式进行遍历,再针对每一种预测模式,再进行划分模式的遍历等。本申请实施例中的多种预测模式包含GPM模式,本申请是基于GPM预测模式的场景下实现的。
在本申请实施例中,当多种预测模式包含GPM模式时,编码器计算GPM预测模式对应的率失真代价结果的过程可以为:编码器获取当前块对应的运动相关信息集合;采用GPM划分模式中的每种GPM划分模式,遍历运动相关信息集合中的每个运动相关信息,再采用曲线划分模式对每种GPM模式进行遍历,得到GPM预测模式对应的率失真代价结果。
需要说明的是,每个运动相关信息可以为两个MV,本申请实施例不作限制。运动相关信息保存在merge列表中。
在本申请实施例中,如果编码器进行GPM划分时使用的是蒙版的方法,编码器将会判断当前块是否使用GPM及曲线划分。一种可能的方法是对当前块遍历所有可能的mv组合(运动相关信息集合),对每种mv组合遍历所有可能的GPM划分模式,对每种GPM划分模式遍历所有的曲线划分模式,其中包括所有的平移幅度和曲线形状。对每一种可能的情况都得出实际的编码代价(率失真代价结果),取最佳的编码代价(即最小率失真代价结果)对应的GPM划分模式及曲线划分模式作为当前块的GPM模式及曲线划分模式。
在本申请实施例中,对上述每一种可能的情况以cost=SAD+bitcost或cost=SATD+bitcost的cost作为编码代价,其中,SAD为Sum of Absolute Difference,SATD为Sum of Absolute Transformed Difference,bitcost为编码标志位等的代价。
在本申请的一些实施例中,当多种预测模式包含GPM模式时,编码器计算GPM预测模式对应的率失真代价结果的过程可以为:编码器获取当前块对应的运动相关信息集合;采用GPM划分模式中,遍历运动相关信息集合中的每个运动相关信息,得到GPM划分模式对应的第一率失真代价结果;针对第一率失真代价结果最低的至少一个目标GPM划分模式,遍历曲线划分模式,得到GPM预测模式对应的率失真代价结果。
在本申请实施例中,另一种可能的方法是编码器对当前块遍历所有可能的mv组合,对每种mv组合遍历所有可能的GPM划分模式,对每一种可能的情况以cost=SAD+bitcost或cost=SATD+bitcost的cost作为编码代价。取上述代价最佳的几种编码代价的GPM划分模式,对每种GPM划分模式遍历所有的曲线划分模式,其中,包括所有的平移幅度和曲线形状。对每一种可能的情况以cost=SAD+bitcost或cost=SATD+bitcost的cost作为编码代价。取最佳的编码代价的GPM划分模式及曲线划分模式作为当前块的GPM模式及当前块的曲线划分模式。
需要说明的是,每种GPM划分模式遍历所有的曲线划分模式的实现原理与解码侧采用曲线划分信息进行偏移的原理一致,此处不再赘述。
在本申请实施例中,编码器确定最佳的编码代价,即率失真代价结果时对应的当前块的GPM模式参数和曲线划分信息,就可以该编码器就可以基于GPM模式参数,确定出与运动相关信息对应的第一参考块和第二参考块了,在基于GPM模式参数和曲线划分信息,就可以确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数。最后,编码器基于第一预测参数和第二预测参数,确定当前块的预测值。
在本申请实施例中,第一预测参数包括:第一权重值或第一边界位置信息;第二预测参数包括:第二权重值或第二边界位置信息。
需要说明的是,第一权重值和第二权重值为采用蒙版方法进行GPM划分时的像素点对应的权重值,第一边界位置信息和第二边界位置信息为第一参考块和第二参考块的边界信息。
在本申请实施例中,编码器基于GPM模式参数和曲线划分信息,确定第一参考块对应的第一预测参数和第二参考块对应的第二预测参数可以基于预测参数的不同,划分为两种方式,如下:
方式一:第一预测参数包括:第一权重值;第二预测参数包括:第二权重值;编码器根据GPM模式参数,确定与当前GPM模式对应的预设权重分布;确定当前块的尺寸信息;根据尺寸信息、GPM模式参数和曲线划分信息,对预设权重分布进行更新,得到曲线权重分布;根据曲线权重分布,得到第一权重值和第二权重值。
需要说明的是,曲线划分信息包括:平移幅度和曲线形状索引;编码器根据GPM模式参数确定偏移方向;根据尺寸信息、平移幅度和曲线形状索引,确定偏移量;按照偏移方向,将预设权重分布中的每个像素位置的预设权重偏移偏移量后,得到更新后的每个像素位置的曲线权重,从而得到 曲线权重分布。
方式二:第一预测参数包括:第一边界位置信息;第二预测参数包括:第二边界位置信息;编码器获取当前块的尺寸信息;基于GPM模式参数和尺寸信息,确定划分边界位置信息;根据GPM模式参数、尺寸信息和曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息;基于曲线划分边界位置信息,确定第一边界位置信息和第二边界位置信息。
需要说明的是,曲线划分信息包括:平移幅度和曲线形状索引;编码器根据GPM模式参数确定偏移方向;根据尺寸信息、平移幅度和曲线形状索引,确定偏移量;按照偏移方向,对划分边界位置信息的每个像素点的位置偏移偏移量后,得到曲线划分边界位置信息。
在方式一中,预设权重分布指GPM的划分模式采用直线划分时对应的原始蒙版,曲线权重分布为现在基于曲线划分时对应的权重分布信息,是对预设权重分布进行平移计算,更新得到的。编码器主要采用尺寸信息、GPM模式参数和曲线划分信息,对预设权重分布进行更新,得到曲线权重分布,在从曲线权重分布中,得到当前块的每个像素点的第一参考块对应的第一权重值,以及第二参考块对应的第二权重值。
在本申请的一些实施例中,编码器是根据GPM模式参数中的角度信息来确定偏移方向的,并根据尺寸信息、平移幅度和曲线形状索引,确定出需要偏移的偏移量的。
在方式二中,编码器针对当前块采用的曲线划分方式,可以为第一参考块的部分采用第一参考块的像素值为第一预测值,第二参考块的部份采用第二参考块的像素值为第二预测值,但在边界位置,则对第一参考块和第二参考块的各自的边界信息上的像素点进行偏移得到第一边界位置信息和第二边界位置信息,再基于第一边界位置信息和第二边界位置信息对边界上的像素点进行预测实现。
需要说明的是,编码器采用GPM模式参数,对当前块进行划分,基于当前块的尺寸信息,可以获知当前块的划分边界位置信息;这时,编码器根据GPM模式参数确定偏移方向;根据尺寸信息、平移幅度和曲线形状索引,确定偏移量;按照偏移方向,对划分边界位置信息的每个像素点的位置偏移了偏移量后,得到曲线划分边界位置信息。
针对上述实现情况,在本申请实施例中,编码器根据GPM模式参数确定偏移方向的实现为:当GPM模式参数表征GPM使用的角度满足水平判别条件时,确定偏移方向为水平方向;当GPM模式参数表征GPM使用的角度满足竖直平判别条件时,确定偏移方向为竖直方向。
下面针对不同的偏移方式的情况,编码器根据尺寸信息、平移幅度和曲线形状索引,确定偏移量的描述。
在本申请实施例中,尺寸信息包括当前块的长度和宽度。
当偏移方向为水平方向时,编码器根据每个像素位置、长度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第一像素位置,其中,非偏移方向与偏移方向垂直;根据曲线形状索引,确定第一像素位置对应的第一曲线信息;基于宽度和预设偏移点的数量,确定第一移动比例;根据第一曲线信息、平移幅度和第一移动比例,确定偏移量,其中,偏移量不超过当前块的宽度。
在本申请的一些实施例中,编码器根据每个像素位置、长度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第一像素位置的实现为:根据每个像素位置、长度和预设偏移点的数量,确定第一缩放比例;根据长度和预设偏移点的数量,确定第一子偏移量;基于第一缩放比例和第一子偏移量,确定每个像素位置在非偏移方向上,位于预设块中的第一像素位置。
在本申请的一些实施例中,当偏移方向为竖直方向时,编码器根据每个像素位置、宽度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第二像素位置,其中,非偏移方向与偏移方向垂直;根据曲线形状索引,确定第二像素位置对应的第二曲线信息;基于长度和预设偏移点的数量,确定第二移动比例;根据第二曲线信息、平移幅度和第二移动比例,确定偏移量,其中,偏移量不超过当前块的长度。
在本申请实施例中,编码器将第二曲线信息与平移幅度和第二移动比例相乘,得到偏移量。
在本申请的一些实施例中,编码器根据每个像素位置、宽度和预设偏移点的数量,确定在每个像素位置在非偏移方向上,位于预设块中的第二像素位置的实现为:编码器根据每个像素位置、宽度和预设偏移点的数量,确定第二缩放比例根据宽度和预设偏移点的数量,确定第二子偏移量;基于第二缩放比例和第二子偏移量,确定每个像素位置在非偏移方向上,位于预设块中的第二像素位置。
进一步地,编码器在采用方式一得到了第一权重值和第二权重值之后,该编码器就可以根据第一权重值、第一参考块的第一像素值、第二权重值结合第二参考块的第二像素值,确定出当前块的预测值。
在本申请实施例中,编码器将第一权重值、第一参考块的第一像素值、第二权重值和第二参考块的第二像素值进行加权和平均,得到出当前块的预测值。
编码器在采用方式二得到了第一边界位置信息和第二边界位置信息之后,该编码器根据第一边界位置信息和第二边界位置信息,划分当前块,得到第一块和第二块;基于第一参考块的第一像素值,对第一块进行预测,以及基于第二参考块的第二像素值,对第二块进行预测,从而确定当前块的预测值。
在本申请实施例提供的帧间预测时采用曲线划分的方式。
在本申请实施例中,曲线划分信息为曲线划分中的一种划分方式;曲线划分是将预设直线几何 划分中的直接划分线上的像素点进行平移,得到连续的曲线划分线来实现几何划分的。
在本申请的一些实施例中,直线划分线的每个像素点按照不同的移动距离,相同的移动方向进行连续平移,得到曲线划分线;或者,直线划分线的每个像素点按照不同的移动向量,进行连续平移,得到曲线划分线。
在本申请的一些实施例中,移动距离为预设曲线形状上对应像素位置与直线划分线的距离;移动向量为预设曲线形状上对应像素位置的预设向量。
在本申请的一些实施例中,移动方向由水平方向和竖直方向组合形成;或者,移动方向与GPM的划分方向相关。
在本申请的一些实施例中,当移动距离不是整像素时,对分像素位置进行插值或者取整处理;或者,移动距离与当前块的长度正相关;或者,移动距离与当前块的长度和宽度中最小的数值正相关。
需要说明的是,编码器的当前块的预测过程的原理与解码器侧的一致,相同的解释描述此处不再赘述。
在本申请的一些实施例中,如果编码器进行GPM划分时使用的是划分CU或PU的方法,编码器需要判断当前块是否使用GPM划分模式(或GPM预测模式)及曲线划分模式。
在本申请实施例中,编码器可以遍历所有的GPM划分模式及曲线划分模式,对每一种可能的情况,分别编码所划分出来的CU或PU,这个过程可能存在迭代地编码其下一层的CU或PU的过程,得到编码代价。编码器尝试其他不使用GPM及曲线划分的方法,以编码代价最小的模式确定当前块选择的预测模式。
可以理解的是,编码器通过采用在GPM模式下,采用曲线划分的方式对当前块进行预测,使得划分出来的边界更贴合物体的边缘或者两个运动矢量不同的部分的边缘,从而提高了编码的精度。
在本申请的一些实施例中,S202之后,如图8所示,本申请提供的一种帧间预测方法还包括:S206-S207。
S206、当最小率失真代价结果对应的预测模式为GPM预测模式的曲线划分模式时,根据曲线划分信息,生成曲线划分使用标志,并编码曲线划分信息。
S207、将曲线划分使用标志和编码后的曲线划分信息入码流。
在本申请实施例中,编码器在确定了最小率失真代价结果之后,若得到该最小率失真代价结果的对应的预测模式为GPM预测模式下的曲线划分模式时,编码器就可以根据曲线划分信息,生成曲线划分使用标志,并编码曲线划分信息了,最终,编码器将曲线划分使用标志和编码后的曲线划分信息入码流中,供解码器解码时使用。但是在本申请中,也可能只将编码后的曲线划分信息写入码流,供解码器解码时使用,本申请实施例不作限制。
在本申请的一些实施例中,曲线划分信息包括:平移幅度和曲线形状索引;编码器可以根据平移幅度,生成曲线划分使用标志,当曲线划分使用标志表征被使用时,编码平移幅度和曲线形状索引,得到编码后的曲线划分信息。当曲线划分使用标志表征未被使用时,则停止编码平移幅度和曲线形状索引。
在本申请的一些实施例中,编码器还可以编码平移幅度,得到编码后的平移幅度;当平移幅度表征使用曲线划分时,编码曲线形状索引,得到编码后的曲线形状索引,其中,编码后的平移幅度和编码后的曲线形状索引为编码后的曲线划分信息;当平移幅度表征使用曲线划分表征未使用曲线划分时,则停止编码曲线形状索引。
需要说明的是,在本申请实施例中,编码器可以采用GPM使用标志或通过其他标志导出GPM是否使用。如果当前块使用GPM模式,则编码所选的GPM的划分模式的信息。编码器GPM模式的方法本申请不做限制。
在本申请实施例中,编码器需要判断GPM使用标志或通过其他标志导出GPM是否使用。如果当前块使用所选的GPM模式,则编码所选的GPM的划分模式信息,编码当前块的两个划分部分使用的MV的信息或GPM相关其他信息,其中,编码GPM模式的方法本申请不做限制。
在本申请实施例中,对于曲线划分模式,曲线划分使用标志表征是否采用曲线划分方式,这里的曲线划分使用标志可以依据平移幅度来确定,有平移幅度时,生成曲线划分使用标志为被使用的标志,没有平移幅度或平移幅度小于一定值时,生成曲线划分使用标志为不被使用的标志,且不编码曲线划分信息。其中,平移幅度是基于由移动距离和移动向量来确定的。
示例性的,如果平移幅度不为0,则编码曲线划分使用标志为1,并编码平移幅度和曲线形状索引,其中,平移幅度和曲线形状的索引的编码顺序不作限制。如果平移幅度不为0,则编码曲线划分使用标志为0,则停止编码曲线划分信息。
在本申请的一些实施例中,编码器可以先编码平移幅度,如果平移幅度不为0(如为1),则表示使用曲线划分,继续编码曲线形状的索引。如果平移幅度为0,则停止编码曲线划分信息。
需要说明的是,编码曲线划分的信息和GPM的划分模式及当前块的两个划分部分使用的MV的信息或GPM相关其他信息的顺序可能有多种组合,本申请不作限制。GPM的划分模式及当前块的两个划分部分使用的MV的信息或GPM相关其他信息的编码本申请不做限制。
也就是说,对当前块在GPM使用的前提下,如何判断曲线划分是否使用。一种可能的实现是使用一个曲线划分使用标志,这种方法下,平移幅度的范围中不包括0。一种可能的实现是使用平移幅度,如果平移幅度是0,则实质上不使用曲线划分。
需要说明的是,在本申请实施例中,曲线划分可以使用多种曲线形状,每种曲线形状可以表示为LUT中的一个数组(即保存的为所有的曲线划分信息)。如果确定使用曲线划分,需要使用曲线形状索引,确定使用哪一种曲线形状。曲线划分能使用的曲线形状根据GPM划分模式的不同可能不同,曲线形状索引可用的形状中的索引。如果某种GPM划分模式下不能使用曲线划分,则该GPM模式下不需要使用曲线划分使用标志、平移幅度和曲线形状的索引等。如果某种GPM划分模式下只能使用一种曲线形状,则该GPM模式下也可以不需要使用曲线形状索引。
可以理解的是,在编码器采用了曲线划分模式进行当前块的编码时,可以将与曲线划分相关的参数写入码流,供解码时使用,从而提高解码效率。
下面以VVC draft8为例,描述本申请实施例提供的帧间预测的部分,下面的下划线部分为主要改进点的体现。
Merge data syntax
Figure PCTCN2021074252-appb-000004
Figure PCTCN2021074252-appb-000005
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 are derived as follows:
nW=(cIdx==0)?nCbW:nCbW*SubWidthC   (1030)
nH=(cIdx==0)?nCbH:nCbH*SubHeightC    (1031)
shift1=Max(5,17-BitDepth)        (1032)
offset1=1<<(shift1-1)        (1033)
hwRatio=nH/nW        (1034)
displacementX=angleIdx       (1035)
displacementY=(angleIdx+8)%32         (1036)
partFlip=(angleIdx>=13&&angleIdx<=27)?0:1  (1037)
shiftHor=(angleIdx%16==8||(angleIdx%16!=0&&hwRatio>0))?0:1   (1038)
The variables offsetX and offsetY are derived as follows:
–If shiftHor is equal to 0,the following applies:
offsetX=(-nW)>>1           (1039)
offsetY=((-nH)>>1)+
(angleIdx<16?(distanceIdx*nH)>>3:-((distanceIdx*nH)>>3))  (1040)
–Otherwise(shiftHor is equal to 1),the following applies:
offsetX=((-nW)>>1)+
(angleIdx<16?(distanceIdx*nW)>>3:-((distanceIdx*nW)>>3))  (1041)
offsetY=(-nH)>>1         (1042)
The prediction samples pbSamples[x][y]with x=0..nCbW-1 and y=0..nCbH-1 are derived as follows:
–The variables xL and yL are derived as follows:
xL=(cIdx==0)?x:x*SubWidthC       (1043)
yL=(cIdx==0)?y:y*SubHeightC      (1044)
The variables offsetCX and offsetCY are derived as follows:
If((angleIdx>=4&&angleIdx<12)||(angleIdx>=20&&angleIdx<28)),the following applies:
offsetCX=0
offsetCY=curveFactor[curveIdx][xL*N/nW+N/2nW]*curveAmplitude*nH/N
Otherwise(shiftHor is 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=partFlip?32+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
其中,一种可能的实现方式是N=64。
如图9所示,本申请实施例提供了一种解码器1,包括:
解码单元10,用于解析码流,确定当前块的预测解码参数;
第一确定单元11,用于当所述预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于所述GPM模式参数,确定第一参考块和第二参考块;基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
第一预测单元12,用于基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
在本申请的一些实施例中,所述第一预测参数包括:第一权重值或第一边界位置信息;所述第二预测参数包括:第二权重值或第二边界位置信息。
在本申请的一些实施例中,所述第一预测参数包括:第一权重值;所述第二预测参数包括:第二权重值;
所述第一确定单元11,还用于根据所述GPM模式参数,确定与当前GPM模式对应的预设权重分布;确定所述当前块的尺寸信息;根据所述尺寸信息、所述GPM模式参数和所述曲线划分信息,对所述预设权重分布进行更新,得到曲线权重分布;根据所述曲线权重分布,得到所述第一权重值和所述第二权重值。
在本申请的一些实施例中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述第一确定单元11,还用于根据所述GPM模式参数确定偏移方向;根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;按照所述偏移方向,将所述预设权重分布中的每个像素位置的预设权重偏移所述偏移量后,得到更新后的所述每个像素位置的曲线权重,从而得到所述曲线权重分布。
在本申请的一些实施例中,所述第一预测单元12,还用于所述第一权重值、第一参考块的第一像素值、所述第二权重值结合所述第二参考块的第二像素值,确定出所述当前块的预测值。
在本申请的一些实施例中,所述第一预测参数包括:第一边界位置信息;所述第二预测参数包括:第二边界位置信息;
所述第一确定单元11,还用于获取所述当前块的尺寸信息;基于所述GPM模式参数和所述尺寸信息,确定划分边界位置信息;根据所述GPM模式参数、所述尺寸信息和所述曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息;基于所述曲线划分边界位置信息,确定所述第一边界位置信息和所述第二边界位置信息。
在本申请的一些实施例中,所述第一预测单元12,还用于根据所述第一边界位置信息和所述第二边界位置信息,划分所述当前块,得到第一块和第二块;基于第一参考块的第一像素值,对所述第一块进行预测,以及基于第二参考块的第二像素值,对所述第二块进行预测,从而确定所述当前块的预测值。
在本申请的一些实施例中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述第一确定单元11,还用于根据所述GPM模式参数确定偏移方向;根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;按照所述偏移方向,对所述划分边界位置信息的每个像素点的位置偏移所述偏移量后,得到所述曲线划分边界位置信息。
在本申请的一些实施例中,所述第一确定单元11,还用于当所述GPM模式参数表征GPM使用的角度满足水平判别条件时,确定所述偏移方向为水平方向;当所述GPM模式参数表征GPM使用的角度满足竖直平判别条件时,确定所述偏移方向为竖直方向。
在本申请的一些实施例中,所述尺寸信息包括当前块的长度和宽度;
所述第一确定单元11,还用于当所述偏移方向为水平方向时,根据所述每个像素位置、所述长度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第一像素位置,其中,所述非偏移方向与所述偏移方向垂直;根据所述曲线形状索引,确定所述第一像素位置对应的第一曲线信息;基于所述宽度和预设偏移点的数量,确定第一移动比例;根据所述第一曲线信息、所述平移幅度和所述第一移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的宽度。
在本申请的一些实施例中,所述第一确定单元11,还用于根据所述每个像素位置、所述长度和所述预设偏移点的数量,确定第一缩放比例;根据所述长度和所述预设偏移点的数量,确定第一子偏移量;基于所述第一缩放比例和所述第一子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第一像素位置。
在本申请的一些实施例中,所述尺寸信息包括当前块的长度和宽度;
所述第一确定单元11,还用于当所述偏移方向为竖直方向时,根据所述每个像素位置、所述宽度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第二像素位置,其中,所述非偏移方向与所述偏移方向垂直;根据所述曲线形状索引,确定所述第二像素位置对应的第二曲线信息;基于所述长度和预设偏移点的数量,确定第二移动比例;根据所述第二曲线信息、所述平移幅度和所述第二移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的长度。
在本申请的一些实施例中,所述第一确定单元11,还用于根据所述每个像素位置、所述宽度和所述预设偏移点的数量,确定第二缩放比例;根据所述宽度和所述预设偏移点的数量,确定第二子偏移量;基于所述第二缩放比例和所述第二子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第二像素位置。
在本申请的一些实施例中,所述曲线划分信息为曲线划分中的一种划分方式;
所述曲线划分是将预设直线几何划分中的直接划分线上的像素点进行平移,得到连续的曲线划分线来实现几何划分的。
在本申请的一些实施例中,所述直线划分线的每个像素点按照不同的移动距离,相同的移动方向进行连续平移,得到所述曲线划分线;或者,
所述直线划分线的每个像素点按照不同的移动向量,进行连续平移,得到所述曲线划分线。
在本申请的一些实施例中,所述移动距离为预设曲线形状上对应像素位置与所述直线划分线的距离;
所述移动向量为预设曲线形状上对应像素位置的预设向量。
在本申请的一些实施例中,所述移动方向由水平方向和竖直方向组合形成;或者,
所述移动方向与所述GPM的划分方向相关。
在本申请的一些实施例中,当所述移动距离不是整像素时,对分像素位置进行插值或者取整处理;或者,
所述移动距离与当前块的长度正相关;或者,
所述移动距离与当前块的长度和宽度中最小的数值正相关。
可以理解的是,解码器通过采用在GPM模式下,采用曲线划分的方式对当前块进行预测,使得划分出来的边界更贴合物体的边缘或者两个运动矢量不同的部分的边缘,从而提高了编解码的精度。
在实际应用中,如图10所示,本申请实施例还提供了一种解码器,包括:第一处理器13以及存储有所述第一处理器13可执行指令的第一存储器14,所述第一存储器14通过通信总线15依赖所述第一处理器13执行操作,当所述可执行指令被所述第一处理器13执行时,执行解码器侧所述的帧间预测方法。
其中,第一处理器可以通过软件、硬件、固件或者其组合实现,可以使用电路、单个或多个专用集成电路(application specific integrated circuits,ASIC)、单个或多个通用集成电路、单个或多个微处理器、单个或多个可编程逻辑器件、或者前述电路或器件的组合、或者其他适合的电路或器件,从而使得该第一处理器可以执行前述实施例中的解码器侧的帧间预测方法的相应步骤。
本申请实施例提供了一种计算可读机存储介质,存储有可执行指令,当所述可执行指令被一个或多个第一处理器执行的时候,所述第一处理器执行解码器侧的帧间预测方法。
在本申请实施例中的各组成部分可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例所述方法的全部或部分步骤。而前述的存储介质包括:磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory)等各种可以存储程序代码的介质,本公开实施例不作限制。
如图11所示,本申请实施例还提供了一种编码器2,包括:
第二确定单元20,用于确定当前块的预测模式参数;当所述预测模式参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于所述GPM模式参数,确定第一参考块和第二参考块;基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
第二预测单元21,用于基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
在本申请的一些实施例中,所述编码器还包括:编码单元22;
所述编码单元22,还用于所述确定当前块的GPM模式参数、曲线划分信息和运动相关信息之后,当最小率失真代价结果对应的预测模式为GPM预测模式的曲线划分模式时,根据所述曲线划 分信息,生成所述曲线划分使用标志,并编码所述曲线划分信息;将所述曲线划分使用标志和编码后的曲线划分信息入码流。
在本申请的一些实施例中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述编码单元22,还用于根据所述平移幅度,生成所述曲线划分使用标志;当曲线划分使用标志表征被使用时,编码所述平移幅度和所述曲线形状索引,得到所述编码后的曲线划分信息;当所述曲线划分使用标志表征未被使用时,则停止编码所述平移幅度和所述曲线形状索引。
在本申请的一些实施例中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述编码单元22,还用于编码所述平移幅度,得到编码后的平移幅度;
当所述平移幅度表征使用曲线划分时,编码所述曲线形状索引,得到编码后的曲线形状索引,其中,所述编码后的平移幅度和所述编码后的曲线形状索引为所述编码后的曲线划分信息;当所述平移幅度表征使用曲线划分表征未使用曲线划分时,则停止编码曲线形状索引。
在本申请的一些实施例中,所述第一预测参数包括:第一权重值或第一边界位置信息;
所述第二预测参数包括:第二权重值或第二边界位置信息。
在本申请的一些实施例中,所述第一预测参数包括:第一权重值;所述第二预测参数包括:第二权重值;
所述第二确定单元20,还用于根据所述GPM模式参数,确定与当前GPM模式对应的预设权重分布;确定所述当前块的尺寸信息;根据所述尺寸信息、所述GPM模式参数和所述曲线划分信息,对所述预设权重分布进行更新,得到曲线权重分布;根据所述曲线权重分布,得到所述第一权重值和所述第二权重值。
在本申请的一些实施例中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述第二确定单元20,还用于根据所述GPM模式参数确定偏移方向;根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;按照所述偏移方向,将所述预设权重分布中的每个像素位置的预设权重偏移所述偏移量后,得到更新后的所述每个像素位置的曲线权重,从而得到所述曲线权重分布。
在本申请的一些实施例中,所述第二预测单元21,还用于所述第一权重值、第一参考块的第一像素值、所述第二权重值结合所述第二参考块的第二像素值,确定出所述当前块的预测值。
在本申请的一些实施例中,所述第一预测参数包括:第一边界位置信息;所述第二预测参数包括:第二边界位置信息;所述第二确定单元20,还用于获取所述当前块的尺寸信息;基于所述GPM模式参数和所述尺寸信息,确定划分边界位置信息;根据所述GPM模式参数、所述尺寸信息和所述曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息;基于所述曲线划分边界位置信息,确定所述第一边界位置信息和所述第二边界位置信息。
在本申请的一些实施例中,所述第二预测单元21,还用于根据所述第一边界位置信息和所述第二边界位置信息,划分所述当前块,得到第一块和第二块;
基于第一参考块的第一像素值,对所述第一块进行预测,以及基于第二参考块的第二像素值,对所述第二块进行预测,从而确定所述当前块的预测值。
在本申请的一些实施例中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述第二确定单元20,还用于根据所述GPM模式参数确定偏移方向;根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;按照所述偏移方向,对所述划分边界位置信息的每个像素点的位置偏移所述偏移量后,得到所述曲线划分边界位置信息。
在本申请的一些实施例中,所述第二确定单元20,还用于当所述GPM模式参数表征GPM使用的角度满足水平判别条件时,确定所述偏移方向为水平方向;当所述GPM模式参数表征GPM使用的角度满足竖直平判别条件时,确定所述偏移方向为竖直方向。
在本申请的一些实施例中,所述尺寸信息包括当前块的长度和宽度;所述第二确定单元20,还用于当所述偏移方向为水平方向时,根据所述每个像素位置、所述长度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第一像素位置,其中,所述非偏移方向与所述偏移方向垂直;根据所述曲线形状索引,确定所述第一像素位置对应的第一曲线信息;基于所述宽度和预设偏移点的数量,确定第一移动比例;根据所述第一曲线信息、所述平移幅度和所述第一移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的宽度。
在本申请的一些实施例中,所述第二确定单元20,还用于根据所述每个像素位置、所述长度和所述预设偏移点的数量,确定第一缩放比例;根据所述长度和所述预设偏移点的数量,确定第一子偏移量;基于所述第一缩放比例和所述第一子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第一像素位置。
在本申请的一些实施例中,所述尺寸信息包括当前块的长度和宽度;
所述第二确定单元20,还用于当所述偏移方向为竖直方向时,根据所述每个像素位置、所述宽度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第二像素位置,其中,所述非偏移方向与所述偏移方向垂直;根据所述曲线形状索引,确定所述第二像素位置对应的第二曲线信息;基于所述长度和预设偏移点的数量,确定第二移动比例;根据所述第二曲线信息、所述平移幅度和所述第二移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的长度。
在本申请的一些实施例中,所述第二确定单元20,还用于根据所述每个像素位置、所述宽度和所述预设偏移点的数量,确定第二缩放比例;根据所述宽度和所述预设偏移点的数量,确定第二子偏移量;基于所述第二缩放比例和所述第二子偏移量,确定所述每个像素位置在非偏移方向上,位 于预设块中的所述第二像素位置。
在本申请的一些实施例中,所述曲线划分信息为曲线划分中的一种划分方式;
所述曲线划分是将预设直线几何划分中的直接划分线上的像素点进行平移,得到连续的曲线划分线来实现几何划分的。
在本申请的一些实施例中,所述直线划分线的每个像素点按照不同的移动距离,相同的移动方向进行连续平移,得到所述曲线划分线;或者,
所述直线划分线的每个像素点按照不同的移动向量,进行连续平移,得到所述曲线划分线。
在本申请的一些实施例中,所述移动距离为预设曲线形状上对应像素位置与所述直线划分线的距离;
所述移动向量为预设曲线形状上对应像素位置的预设向量。
在本申请的一些实施例中,所述移动方向由水平方向和竖直方向组合形成;或者,
所述移动方向与所述GPM的划分方向相关。
在本申请的一些实施例中,当所述移动距离不是整像素时,对分像素位置进行插值或者取整处理;或者,
所述移动距离与当前块的长度正相关;或者,
所述移动距离与当前块的长度和宽度中最小的数值正相关。
可以理解的是,编码器通过采用在GPM模式下,采用曲线划分的方式对当前块进行预测,使得划分出来的边界更贴合物体的边缘或者两个运动矢量不同的部分的边缘,从而提高了编码的精度。
在实际应用中,如图12所示,本申请实施例还提供了一种编码器,包括:第二处理器23以及存储有所述第二处理器23可执行指令的第二存储器24,所述第二存储器24通过通信总线25依赖所述第二处理器23执行操作,当所述可执行指令被所述第二处理器23执行时,执行上述的编码器侧的所述的帧间预测方法。
其中,第二处理器可以通过软件、硬件、固件或者其组合实现,可以使用电路、单个或多个专用集成电路、单个或多个通用集成电路、单个或多个微处理器、单个或多个可编程逻辑器件、或者前述电路或器件的组合、或者其他适合的电路或器件,从而使得该第一处理器可以执行前述实施例中的解码器侧的帧间预测方法的相应步骤。
本申请实施例提供了一种计算可读机存储介质,存储有可执行指令,当所述可执行指令被一个或多个第二处理器执行时,所述第二处理器执行编码器对应的所述的帧间预测方法。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
工业实用性
本申请实施例中,通过采用在GPM模式下,采用曲线划分的方式对当前块进行预测,使得划分出来的边界更贴合物体的边缘或者两个运动矢量不同的部分的边缘,从而提高了编解码的精度。

Claims (44)

  1. 一种帧间预测方法,应用于解码器,包括:
    解析码流,确定当前块的预测解码参数;
    当所述预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;
    基于所述GPM模式参数,确定第一参考块和第二参考块;
    基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
    基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
  2. 根据权利要求1所述的方法,其特征在于,
    所述第一预测参数包括:第一权重值或第一边界位置信息;
    所述第二预测参数包括:第二权重值或第二边界位置信息。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一预测参数包括:第一权重值;所述第二预测参数包括:第二权重值;
    所述基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数,包括:
    根据所述GPM模式参数,确定与当前GPM模式对应的预设权重分布;
    确定所述当前块的尺寸信息;
    根据所述尺寸信息、所述GPM模式参数和所述曲线划分信息,对所述预设权重分布进行更新,得到曲线权重分布;
    根据所述曲线权重分布,得到所述第一权重值和所述第二权重值。
  4. 根据权利要求3所述的方法,其特征在于,所述曲线划分信息包括:平移幅度和曲线形状索引;所述根据所述尺寸信息、所述GPM模式参数和所述曲线划分信息,对所述预设权重分布进行更新,得到曲线权重分布,包括:
    根据所述GPM模式参数确定偏移方向;
    根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;
    按照所述偏移方向,将所述预设权重分布中的每个像素位置的预设权重偏移所述偏移量后,得到更新后的所述每个像素位置的曲线权重,从而得到所述曲线权重分布。
  5. 根据权利要求3或4所述的方法,其中,所述基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值,包括:
    所述第一权重值、第一参考块的第一像素值、所述第二权重值结合所述第二参考块的第二像素值,确定出所述当前块的预测值。
  6. 根据权利要求1或2所述的方法,其中,所述第一预测参数包括:第一边界位置信息;所述第二预测参数包括:第二边界位置信息;所述基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数,包括:
    获取所述当前块的尺寸信息;
    基于所述GPM模式参数和所述尺寸信息,确定划分边界位置信息;
    根据所述GPM模式参数、所述尺寸信息和所述曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息;
    基于所述曲线划分边界位置信息,确定所述第一边界位置信息和所述第二边界位置信息。
  7. 根据权利要求6所述的方法,其中,所述基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值,包括:
    根据所述第一边界位置信息和所述第二边界位置信息,划分所述当前块,得到第一块和第二块;
    基于第一参考块的第一像素值,对所述第一块进行预测,以及基于第二参考块的第二像素值,对所述第二块进行预测,从而确定所述当前块的预测值。
  8. 根据权利要求6或7所述的方法,其中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述根据所述GPM模式参数、所述尺寸信息和所述曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息,包括:
    根据所述GPM模式参数确定偏移方向;
    根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;
    按照所述偏移方向,对所述划分边界位置信息的每个像素点的位置偏移所述偏移量后,得到所述曲线划分边界位置信息。
  9. 根据权利要求4或8所述的方法,其中,所述根据所述GPM模式参数确定偏移方向,包括:
    当所述GPM模式参数表征GPM使用的角度满足水平判别条件时,确定所述偏移方向为水平方 向;
    当所述GPM模式参数表征GPM使用的角度满足竖直平判别条件时,确定所述偏移方向为竖直方向。
  10. 根据权利要求9所述的方法,其中,所述尺寸信息包括当前块的长度和宽度;所述根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量,包括:
    当所述偏移方向为水平方向时,根据所述每个像素位置、所述长度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第一像素位置,其中,所述非偏移方向与所述偏移方向垂直;
    根据所述曲线形状索引,确定所述第一像素位置对应的第一曲线信息;
    基于所述宽度和预设偏移点的数量,确定第一移动比例;
    根据所述第一曲线信息、所述平移幅度和所述第一移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的宽度。
  11. 根据权利要求10所述的方法,其中,所述根据所述每个像素位置、所述长度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第一像素位置,包括:
    根据所述每个像素位置、所述长度和所述预设偏移点的数量,确定第一缩放比例;
    根据所述长度和所述预设偏移点的数量,确定第一子偏移量;
    基于所述第一缩放比例和所述第一子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第一像素位置。
  12. 根据权利要求9所述的方法,其中,所述尺寸信息包括当前块的长度和宽度;所述根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量,包括:
    当所述偏移方向为竖直方向时,根据所述每个像素位置、所述宽度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第二像素位置,其中,所述非偏移方向与所述偏移方向垂直;
    根据所述曲线形状索引,确定所述第二像素位置对应的第二曲线信息;
    基于所述长度和预设偏移点的数量,确定第二移动比例;
    根据所述第二曲线信息、所述平移幅度和所述第二移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的长度。
  13. 根据权利要求12所述的方法,其中,所述根据所述每个像素位置、所述宽度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第二像素位置,包括:
    根据所述每个像素位置、所述宽度和所述预设偏移点的数量,确定第二缩放比例;
    根据所述宽度和所述预设偏移点的数量,确定第二子偏移量;
    基于所述第二缩放比例和所述第二子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第二像素位置。
  14. 根据权利要求1至13任一项所述的方法,其中,
    所述曲线划分信息为曲线划分中的一种划分方式;
    所述曲线划分是将预设直线几何划分中的直接划分线上的像素点进行平移,得到连续的曲线划分线来实现几何划分的。
  15. 根据权利要求14所述的方法,其中,
    所述直线划分线的每个像素点按照不同的移动距离,相同的移动方向进行连续平移,得到所述曲线划分线;或者,
    所述直线划分线的每个像素点按照不同的移动向量,进行连续平移,得到所述曲线划分线。
  16. 根据权利要求15所述的方法,其中,
    所述移动距离为预设曲线形状上对应像素位置与所述直线划分线的距离;
    所述移动向量为预设曲线形状上对应像素位置的预设向量。
  17. 根据权利要求15或16所述的方法,其中,
    所述移动方向由水平方向和竖直方向组合形成;或者,
    所述移动方向与所述GPM的划分方向相关。
  18. 根据权利要求17所述的方法,其中,
    当所述移动距离不是整像素时,对分像素位置进行插值或者取整处理;或者,
    所述移动距离与当前块的长度正相关;或者,
    所述移动距离与当前块的长度和宽度中最小的数值正相关。
  19. 一种帧间预测方法,应用于编码器,包括:
    确定当前块的预测模式参数;
    当所述预测模式参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;
    基于所述GPM模式参数,确定第一参考块和第二参考块;
    基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
    基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
  20. 根据权利要求19所述的方法,其中,所述确定当前块的GPM模式参数和曲线划分信息之后,所述方法还包括:
    当最小率失真代价结果对应的预测模式为GPM预测模式的曲线划分模式时,根据所述曲线划分信息,生成所述曲线划分使用标志,并编码所述曲线划分信息;
    将所述曲线划分使用标志和编码后的曲线划分信息入码流。
  21. 根据权利要求20所述的方法,其中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述根据所述曲线划分信息,生成所述曲线划分使用标志,并编码所述曲线划分信息,包括:
    根据所述平移幅度,生成所述曲线划分使用标志;
    当曲线划分使用标志表征被使用时,编码所述平移幅度和所述曲线形状索引,得到所述编码后的曲线划分信息;
    当所述曲线划分使用标志表征未被使用时,则停止编码所述平移幅度和所述曲线形状索引。
  22. 根据权利要求21所述的方法,其中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述根据所述曲线划分信息,生成所述曲线划分使用标志,并编码所述曲线划分信息,包括:
    编码所述平移幅度,得到编码后的平移幅度;
    当所述平移幅度表征使用曲线划分时,编码所述曲线形状索引,得到编码后的曲线形状索引,其中,所述编码后的平移幅度和所述编码后的曲线形状索引为所述编码后的曲线划分信息;
    当所述平移幅度表征使用曲线划分表征未使用曲线划分时,则停止编码曲线形状索引。
  23. 根据权利要求19至22任一项所述的方法,其中,
    所述第一预测参数包括:第一权重值或第一边界位置信息;
    所述第二预测参数包括:第二权重值或第二边界位置信息。
  24. 根据权利要求19至23任一项所述的方法,其中,所述第一预测参数包括:第一权重值;所述第二预测参数包括:第二权重值;
    所述基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数,包括:
    根据所述GPM模式参数,确定与当前GPM模式对应的预设权重分布;
    确定所述当前块的尺寸信息;
    根据所述尺寸信息、所述GPM模式参数和所述曲线划分信息,对所述预设权重分布进行更新,得到曲线权重分布;
    根据所述曲线权重分布,得到所述第一权重值和所述第二权重值。
  25. 根据权利要求24所述的方法,其中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述根据所述尺寸信息、所述GPM模式参数和所述曲线划分信息,对所述预设权重分布进行更新,得到曲线权重分布,包括:
    根据所述GPM模式参数确定偏移方向;
    根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;
    按照所述偏移方向,将所述预设权重分布中的每个像素位置的预设权重偏移所述偏移量后,得到更新后的所述每个像素位置的曲线权重,从而得到所述曲线权重分布。
  26. 根据权利要求24或25所述的方法,其中,所述基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值,包括:
    所述第一权重值、第一参考块的第一像素值、所述第二权重值结合所述第二参考块的第二像素值,确定出所述当前块的预测值。
  27. 根据权利要求19至23任一项所述的方法,其中,所述第一预测参数包括:第一边界位置信息;所述第二预测参数包括:第二边界位置信息;所述基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数,包括:
    获取所述当前块的尺寸信息;
    基于所述GPM模式参数和所述尺寸信息,确定划分边界位置信息;
    根据所述GPM模式参数、所述尺寸信息和所述曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息;
    基于所述曲线划分边界位置信息,确定所述第一边界位置信息和所述第二边界位置信息。
  28. 根据权利要求27所述的方法,其中,所述基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值,包括:
    根据所述第一边界位置信息和所述第二边界位置信息,划分所述当前块,得到第一块和第二块;
    基于第一参考块的第一像素值,对所述第一块进行预测,以及基于第二参考块的第二像素值,对所述第二块进行预测,从而确定所述当前块的预测值。
  29. 根据权利要求27或28所述的方法,其中,所述曲线划分信息包括:平移幅度和曲线形状索引;所述根据所述GPM模式参数、所述尺寸信息和所述曲线划分信息,对划分边界位置信息进行偏移,确定曲线划分边界位置信息,包括:
    根据所述GPM模式参数确定偏移方向;
    根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量;
    按照所述偏移方向,对所述划分边界位置信息的每个像素点的位置偏移所述偏移量后,得到所述曲线划分边界位置信息。
  30. 根据权利要求25或29所述的方法,其中,所述根据所述GPM模式参数确定偏移方向,包括:
    当所述GPM模式参数表征GPM使用的角度满足水平判别条件时,确定所述偏移方向为水平方向;
    当所述GPM模式参数表征GPM使用的角度满足竖直平判别条件时,确定所述偏移方向为竖直方向。
  31. 根据权利要求30所述的方法,其中,所述尺寸信息包括当前块的长度和宽度;所述根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量,包括:
    当所述偏移方向为水平方向时,根据所述每个像素位置、所述长度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第一像素位置,其中,所述非偏移方向与所述偏移方向垂直;
    根据所述曲线形状索引,确定所述第一像素位置对应的第一曲线信息;
    基于所述宽度和预设偏移点的数量,确定第一移动比例;
    根据所述第一曲线信息、所述平移幅度和所述第一移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的宽度。
  32. 根据权利要求31所述的方法,其中,所述根据所述每个像素位置、所述长度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第一像素位置,包括:
    根据所述每个像素位置、所述长度和所述预设偏移点的数量,确定第一缩放比例;
    根据所述长度和所述预设偏移点的数量,确定第一子偏移量;
    基于所述第一缩放比例和所述第一子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第一像素位置。
  33. 根据权利要求30所述的方法,其中,所述尺寸信息包括当前块的长度和宽度;所述根据所述尺寸信息、所述平移幅度和所述曲线形状索引,确定偏移量,包括:
    当所述偏移方向为竖直方向时,根据所述每个像素位置、所述宽度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第二像素位置,其中,所述非偏移方向与所述偏移方向垂直;
    根据所述曲线形状索引,确定所述第二像素位置对应的第二曲线信息;
    基于所述长度和预设偏移点的数量,确定第二移动比例;
    根据所述第二曲线信息、所述平移幅度和所述第二移动比例,确定所述偏移量,其中,所述偏移量不超过所述当前块的长度。
  34. 根据权利要求33所述的方法,其中,所述根据所述每个像素位置、所述宽度和预设偏移点的数量,确定在所述每个像素位置在非偏移方向上,位于预设块中的第二像素位置,包括:
    根据所述每个像素位置、所述宽度和所述预设偏移点的数量,确定第二缩放比例;
    根据所述宽度和所述预设偏移点的数量,确定第二子偏移量;
    基于所述第二缩放比例和所述第二子偏移量,确定所述每个像素位置在非偏移方向上,位于预设块中的所述第二像素位置。
  35. 根据权利要求19至34任一项所述的方法,其中,
    所述曲线划分信息为曲线划分中的一种划分方式;
    所述曲线划分是将预设直线几何划分中的直接划分线上的像素点进行平移,得到连续的曲线划分线来实现几何划分的。
  36. 根据权利要求35所述的方法,其中,
    所述直线划分线的每个像素点按照不同的移动距离,相同的移动方向进行连续平移,得到所述曲线划分线;或者,
    所述直线划分线的每个像素点按照不同的移动向量,进行连续平移,得到所述曲线划分线。
  37. 根据权利要求36所述的方法,其中,
    所述移动距离为预设曲线形状上对应像素位置与所述直线划分线的距离;
    所述移动向量为预设曲线形状上对应像素位置的预设向量。
  38. 根据权利要求36或37所述的方法,其中,
    所述移动方向由水平方向和竖直方向组合形成;或者,
    所述移动方向与所述GPM的划分方向相关。
  39. 根据权利要求38所述的方法,其中,
    当所述移动距离不是整像素时,对分像素位置进行插值或者取整处理;或者,
    所述移动距离与当前块的长度正相关;或者,
    所述移动距离与当前块的长度和宽度中最小的数值正相关。
  40. 一种解码器,包括:
    解码单元,用于解析码流,确定当前块的预测解码参数;
    第一确定单元,用于当所述预测解码参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于所述GPM模式参数,确定第一参考块和第二参考块;基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
    第一预测单元,用于基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
  41. 一种编码器,包括:
    第二确定单元,用于确定当前块的预测模式参数;当所述预测模式参数指示使用帧间几何划分预测模式GPM确定当前块的帧间预测时,确定当前块的GPM模式参数和曲线划分信息;基于所述GPM模式参数,确定第一参考块和第二参考块;基于所述GPM模式参数和所述曲线划分信息,确定所述第一参考块对应的第一预测参数和第二参考块对应的第二预测参数;
    第二预测单元,用于基于所述第一预测参数和所述第二预测参数,确定所述当前块的预测值。
  42. 一种解码器,包括:第一处理器以及存储有所述第一处理器可执行指令的第一存储器,所述第一存储器通过通信总线依赖所述第一处理器执行操作,当所述可执行指令被所述第一处理器执行时,执行上述的权利要求1至18任一项所述的帧间预测方法。
  43. 一种编码器,包括:第二处理器以及存储有所述第二处理器可执行指令的第二存储器,所述第二存储器通过通信总线依赖所述第二处理器执行操作,当所述可执行指令被所述第二处理器执行时,执行上述的权利要求19至39任一项所述的帧间预测方法。
  44. 一种计算机可读存储介质,存储有可执行指令,当所述可执行指令被一个或多个第一处理器执行时,所述第一处理器执行所述的权利要求1至18任一项所述的帧间预测方法;或者,当所述可执行指令被一个或多个第二处理器执行时,所述第二处理器执行所述的权利要求19至39任一项所述的帧间预测方法。
PCT/CN2021/074252 2020-03-31 2021-01-28 帧间预测方法、编码器、解码器及计算机可读存储介质 WO2021196857A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010246244.3 2020-03-31
CN202010246244.3A CN113473141A (zh) 2020-03-31 2020-03-31 帧间预测方法、编码器、解码器及计算机可读存储介质

Publications (1)

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

Family

ID=77865643

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/074252 WO2021196857A1 (zh) 2020-03-31 2021-01-28 帧间预测方法、编码器、解码器及计算机可读存储介质

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156133A (zh) * 2023-10-27 2023-12-01 淘宝(中国)软件有限公司 一种视频编码的帧间预测模式选择方法及装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023061334A1 (en) * 2021-10-11 2023-04-20 Beijing Bytedance Network Technology Co., Ltd. Method, device, and medium for video processing
CN115955565B (zh) * 2023-03-15 2023-07-04 深圳传音控股股份有限公司 处理方法、处理设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101502119A (zh) * 2006-08-02 2009-08-05 汤姆逊许可公司 用于视频编码的自适应几何分割方法和设备
CN102547290A (zh) * 2012-01-20 2012-07-04 厦门大学 一种基于几何分割的视频图像解编码方法
CN103004198A (zh) * 2010-07-15 2013-03-27 索尼公司 图像处理设备和图像处理方法
US20170078697A1 (en) * 2014-03-11 2017-03-16 Samsung Electronics Co., Ltd. Depth image prediction mode transmission method and apparatus for encoding and decoding inter-layer video
WO2020072494A1 (en) * 2018-10-01 2020-04-09 Op Solutions, Llc Methods and systems of exponential partitioning
WO2020159988A1 (en) * 2019-01-28 2020-08-06 Op Solutions, Llc Inter prediction in exponential partitioning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170058838A (ko) * 2015-11-19 2017-05-29 한국전자통신연구원 화면간 예측 향상을 위한 부호화/복호화 방법 및 장치

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101502119A (zh) * 2006-08-02 2009-08-05 汤姆逊许可公司 用于视频编码的自适应几何分割方法和设备
CN101502120A (zh) * 2006-08-02 2009-08-05 汤姆逊许可公司 用于视频解码的自适应几何分割方法和设备
CN103004198A (zh) * 2010-07-15 2013-03-27 索尼公司 图像处理设备和图像处理方法
CN102547290A (zh) * 2012-01-20 2012-07-04 厦门大学 一种基于几何分割的视频图像解编码方法
US20170078697A1 (en) * 2014-03-11 2017-03-16 Samsung Electronics Co., Ltd. Depth image prediction mode transmission method and apparatus for encoding and decoding inter-layer video
WO2020072494A1 (en) * 2018-10-01 2020-04-09 Op Solutions, Llc Methods and systems of exponential partitioning
WO2020159988A1 (en) * 2019-01-28 2020-08-06 Op Solutions, Llc Inter prediction in exponential partitioning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156133A (zh) * 2023-10-27 2023-12-01 淘宝(中国)软件有限公司 一种视频编码的帧间预测模式选择方法及装置
CN117156133B (zh) * 2023-10-27 2024-02-09 淘宝(中国)软件有限公司 一种视频编码的帧间预测模式选择方法及装置

Also Published As

Publication number Publication date
CN113473141A (zh) 2021-10-01

Similar Documents

Publication Publication Date Title
WO2021196857A1 (zh) 帧间预测方法、编码器、解码器及计算机可读存储介质
JP2020039167A (ja) 計算装置及び方法
JP2019536376A5 (zh)
WO2021196235A1 (zh) 帧间预测方法、编码器、解码器及存储介质
KR102060586B1 (ko) 복호 장치
CN113632484A (zh) 用于双向光流的比特宽度控制的方法和设备
US11153572B2 (en) Encoding device, decoding device, and program
CN114868395A (zh) 采用几何分割进行帧间预测的高级语法
JP2023179747A (ja) オプティカルフローを用いた予測リファインメントに関する方法および装置
CN116233466A (zh) 光流预测细化(prof)的方法和装置
CN117294846A (zh) 色度去块滤波的量化参数
CN114342378A (zh) 关于利用光流的预测细化的方法和装置
CN110832854B (zh) 利用插值进行帧内预测的方法和装置
CN113728639A (zh) 光流预测细化的方法和装置
CN113994692A (zh) 用于利用光流的预测细化的方法和装置
KR102276265B1 (ko) 비디오 신호의 비디오 코딩 블록을 인코딩 및 디코딩하는 장치 및 방법
GB2519289A (en) Method and apparatus for displacement vector component transformation in video coding and decoding
CN114009033A (zh) 用于用信号通知对称运动矢量差模式的方法和装置
CN114503561A (zh) 用于利用光流的预测细化、双向光流和解码器侧运动矢量细化的方法和装置
WO2021196228A1 (zh) 帧间预测方法、编码器、解码器以及存储介质
CN113545090A (zh) 用于帧内子分区编解码模式的方法和设备
WO2021134627A1 (zh) 一种帧间预测方法、编码器、解码器及存储介质
KR20200134302A (ko) 이미지 처리 장치 및 방법
WO2023044916A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统
WO2023044917A1 (zh) 帧内预测的方法、编码器、解码器和编解码系统

Legal Events

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

Ref document number: 21779606

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21779606

Country of ref document: EP

Kind code of ref document: A1