Method and apparatus for prediction refinement using optical flow for affine coded blocks - Patents.com
Prediction refinement using optical flow for affine-coded blocks addresses the accuracy-complexity trade-off in video coding, improving compression performance by conditionally applying optical flow processes.
Patent Information
- Application Number
- JP2021556816
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-04-28
- Filing Date
- 2020-03-20
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-03-20
AI Technical Summary
Existing video coding methods using sub-block-based affine motion compensation suffer from a loss of prediction accuracy due to complexity, necessitating a better trade-off between coding complexity and prediction accuracy.
Implementing prediction refinement using optical flow (PROF) for affine-coded blocks to refine sub-block-based motion compensation, applying optical flow processes conditionally to improve prediction accuracy while minimizing computational overhead.
Achieves a better trade-off between coding complexity and prediction accuracy, enhancing overall compression performance by refining sub-block-based affine motion compensation.
Smart Images

Figure 0007590337000029 
Figure 0007590337000030 
Figure 0007590337000031
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This patent application claims priority to U.S. Provisional Patent Application No. 62 / 821,440, filed March 20, 2019, and to U.S. Provisional Patent Application No. 62 / 839,765, filed April 28, 2019. The disclosures of the aforementioned patent applications are incorporated herein by reference in their entireties.
[0002] FIELD OF THE DISCLOSURE Embodiments of the present disclosure relate generally to the field of picture processing, and more specifically to a method for refining sub-block-based affine motion compensated prediction using optical flow when one or more constraints are required. [Background technology]
[0003] Video coding (video encoding and decoding) is used in a wide range of digital video applications, such as digital TV broadcasting, video transmission over the Internet and mobile networks, real-time conversation applications such as video chat, video conferencing, DVDs and Blu-ray discs, video content acquisition and editing systems, and camcorders for security applications.
[0004] The amount of video data required to render even a relatively short video can be significant, which can pose difficulties when the data is to be streamed or otherwise communicated over a communication network with limited bandwidth capacity. Thus, video data is typically compressed before being communicated over modern telecommunication networks. Since memory resources may be limited, the size of the video can also be an issue when the video is stored on a storage device. Video compression devices often use software and / or hardware at the source to code the video data before transmission or storage, thereby reducing the amount of data required to represent a digital video image. The compressed data is then received at the destination by a video decompression device, which decodes the video data. As network resources are limited and the demand for higher video quality continues to grow, improved compression and decompression techniques are desired that improve compression ratios with little or no sacrifice in picture quality.
[0005] Recently, affine tools have been introduced into Versatile Video Coding, and in theory, affine motion model parameters can be used to derive motion vectors for each sample in a coding block. However, since it is very complicated to generate sample-based affine motion compensated predictions, a sub-block-based affine motion compensation method is used. In this method, a coding block is divided into sub-blocks, and each of the sub-blocks is assigned a motion vector (MV) derived from the affine motion model parameters. However, it loses prediction accuracy due to sub-block-based prediction. Therefore, it is necessary to achieve a good trade-off between coding complexity and prediction accuracy. Summary of the Invention [Means for solving the problem]
[0006] The embodiments of the present application provide an apparatus and a method for encoding and decoding according to the independent claims. The embodiments of the present application provide an apparatus and a method for prediction refinement using optical flow (PROF) for affine coded blocks, such that a good trade-off can be achieved between the complexity and accuracy of sub-block based affine prediction.
[0007] Embodiments are defined by the features of the independent claims and by further advantageous implementations of the embodiments by the features of the dependent claims.
[0008] Particular embodiments are outlined in the accompanying independent claims, while other embodiments are outlined in the dependent claims.
[0009] These and other objects are achieved by the subject matter of the independent claims. Further implementation forms are evident from the dependent claims, the description and the drawings.
[0010] According to a first aspect, the invention relates to a method for prediction refinement with optical flow (PROF) for affine coded blocks (i.e. blocks encoded or decoded using an affine tool). To The method is applied to a sub-block of samples within an affine coded block. The method may be performed by an encoding device or a decoding device. The method comprises: The current subblock of the affine coded block (each B performing a PROF process on a current sub-block of the affine coded block to obtain refined predicted sample values (i.e., final predicted sample values) of the current sub-block of the affine coded block (e.g., block), where a number of constraints for applying PROF are not met or satisfied for the affine coded block; The step of performing the PROF process on the current sub-block of the affine coded block includes: performing an optical flow process on the current sub-block to obtain a delta predicted value of the current sample of the current sub-block, and obtaining a refined predicted sample value of the current sample based on the delta predicted value of the current sample and the predicted sample value of the current sample of the current sub-block (performing an optical flow process on the current sub-block to obtain a delta predicted value of the current sub-block, and obtaining a refined predicted sample value of the current sub-block based on the delta predicted value of the current sub-block and the predicted sample value of the current sub-block). It can be understood that when the refined predicted sample value of each sub-block of the affine coded block is generated, the refined predicted sample value of the affine coded block is naturally generated.
[0011] Thus, an improved method is provided that allows for a better trade-off between coding complexity and prediction accuracy to be achieved. A prediction refinement using optical flow (PROF) process is conditionally performed to refine the sub-block-based affine motion compensated prediction using optical flow at pixel / sample level granularity. These conditions ensure that the calculations involved in PROF occur only when the prediction accuracy can be improved, thereby reducing unnecessary increase in computational complexity. Thus, the beneficial effect achieved by the techniques disclosed herein is to increase the overall compression performance of the coding method.
[0012] It should be noted that the terms "block", "coding block", or "image block" used in this disclosure may include transform units (TUs), prediction units (PUs), coding units (CUs), etc. In VVC, transform units and coding units are largely aligned, except for a few scenarios where TU gradient or sub-block transforms (SBTs) are used. The terms "block", "image block", "coding block", and "picture block" are used interchangeably. may be used interchangeably herein. It may be understood that the terms "affine block," "affine picture block," "affine coded block," and "affine motion block" may be used interchangeably herein. The terms "sample" and "pixel" may be used interchangeably in this disclosure. The terms "predicted sample value" and "predicted pixel value" may be used interchangeably in this disclosure. The terms "sample location" and "pixel location" may be used interchangeably in this disclosure.
[0013] In a possible implementation form of the method according to the first aspect itself, before performing a PROF process on a current sub-block of the affine coded block, the method further comprises a step of determining that a number of constraints for applying PROF are not satisfied for the affine coded block.
[0014] In a possible implementation form of the method according to the first aspect itself, the constraints for applying PROF include that the first indication indicates that PROF is disabled for the picture including the affine coded block, or that the first indication indicates that PROF is disabled for the slice associated with the picture including the affine coded block, and that the second indication indicates no partitioning of the affine coded block, i.e. the variable fallbackModeTriggered is set to 1. It can be understood that when the variable fallbackModeTriggered is set to 1, no partitioning of the affine coded block is required, i.e. each sub-block of the affine coded block has the same motion vector. This indicates that the affine coded block has only translational motion. When the variable fallbackModeTriggered is set to 0, partitioning of the affine coded block is required, i.e. each sub-block of the affine coded block has a respective motion vector. This indicates that the affine coded block has non-translational motion.
[0015] In the present disclosure, it is allowed that PROF is not applied in some cases or situations for affine coded blocks. These cases or situations are determined according to the constraints for applying PROF. In this way, a better trade-off can be achieved between coding complexity and prediction accuracy.
[0016] In any preceding implementation of the first aspect or a possible implementation form of the method according to the first aspect itself, the step of performing optical flow processing on the current sub-block to obtain a delta prediction value of a current sample of the current sub-block includes: obtaining a second prediction matrix (in an example, the second prediction matrix is generated based on a first prediction matrix corresponding to a predicted sample value of a current subblock, where the predicted sample value of the current subblock may be obtained by performing subblock-based affine motion compensation for the current subblock); the size of the second prediction matrix is larger than the size of the first prediction matrix (e.g., the first prediction matrix has a size of sbWidth*sbHeight, the second prediction matrix has a size of (sbWidth+2)*(sbHeight+2), where the variables sbWidth and sbHeight represent the width and height of the current subblock, respectively); i.e., obtaining the second prediction matrix generates the first prediction matrix based on motion information of the current subblock, where elements of the first prediction matrix correspond to the predicted sample value of the current subblock; obtaining the second prediction matrix further includes generating the second prediction matrix based on the first prediction matrix, or generating the second prediction matrix based on the motion information of the current subblock; generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, the size of the second prediction matrix being equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix (e.g., the horizontal prediction gradient matrix or the vertical prediction gradient matrix has a size of sbWidth*sbHeight, and the second prediction matrix has a size of (sbWidth+2)*(sbHeight+2); and calculating a delta prediction value (ΔI(i,j)) of a current sample of a current sub-block based on a horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix, a vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and a difference (MVD) between a motion vector of the current sample of the current sub-block and a motion vector of a center sample of the sub-block. It can be understood that the MVD has a horizontal component and a vertical component. The horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix corresponds to the horizontal component of the MVD, and the vertical prediction gradient value of the current sample in the vertical prediction gradient matrix corresponds to the vertical component of the MVD.
[0017] It should be noted that an affine block may be a coding or decoding block of a picture of a video signal. The current sub-block of an affine coded block is, for example, a 4x4 block. The luma position (xCb, yCb) denotes the position of the top-left sample of the affine coded block relative to the top-left sample of the current picture. The samples of the current sub-block may be referenced using their absolute position with respect to (or relative to) the top-left sample of the picture, e.g. (x, y), or their relative position with respect to the top-left sample of the sub-block (in combination with other coordinates), e.g. (xSb+i, ySb+j), where (xSb, ySb) denotes the top-left sample of the picture. sample Top left of the subblock sample are the coordinates of .
[0018] The first prediction matrix may be a two-dimensional array including rows and columns, and elements of the array may be referenced using (i,j), where i is the horizontal / row index and j is the vertical / column index. The range of i and j may be, for example, i=0..sbwidth-1, and j=0..sbHeight-1, where sbWidth indicates the width of the subblock and sbHeight indicates the height of the subblock. In some examples, the size of the first prediction matrix is the same as the size of the current block. For example, the size of the first prediction matrix may be 4×4, and the current block has a size of 4×4.
[0019] The second prediction matrix may be a two-dimensional array including rows and columns, and elements of the array may be referenced using (i,j), where i is the horizontal / row index and j is the vertical / column index. The range of i and j may be, for example, i=-1..sbwidth, and j=-1..sbHeight, where sbWidth indicates the width of the subblock and sbHeight indicates the height of the subblock. In some examples, the size of the second prediction matrix is larger than the size of the first prediction matrix. That is, the size of the second prediction matrix may be larger than the size of the current block. For example, the size of the second prediction matrix may be (sbWidth+2)*(sbHeight+2), while the current block has a size of sbWidth*sbHeight. For example, the size of the second prediction matrix may be 6×6, while the current block has a size of 4×4.
[0020] The horizontal and vertical predicted gradient matrices may be any two-dimensional arrays including rows and columns, and elements of the arrays may be referenced using (i,j), where x is the horizontal / row index and y is the vertical / column index. The range of i and j may be, for example, i=0..sbWidth-1 and j=0..sbHeight-1. sbWidth indicates the width of the sub-block, and sbHeight indicates the height of the sub-block. In some examples, the size of the horizontal and vertical predicted gradient matrices is the same as the size of the current block. For example, the size of the horizontal and vertical predicted gradient matrices may be 4×4, and the current block has a size of 4×4.
[0021] An element of the horizontal predicted gradient matrix corresponds to an element of the vertical predicted gradient matrix if the position (x,y) of the element in the horizontal predicted gradient matrix is the same as the position (p,q) of the element in the vertical predicted gradient matrix, i.e. (x,y)=(p,q).
[0022] Thus, the PROF process is able to refine the sub-block-based affine motion compensated prediction using optical flow at sample-level granularity without increasing memory access bandwidth (by basing the second prediction matrix on the first prediction matrix or the (original) predicted sample values of the current sub-block), thereby achieving a higher granularity of motion compensation.
[0023] In any of the preceding implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, a motion vector difference between the motion vector of the current sample unit (e.g., 2×2 sample block) including the current sample and the motion vector of the central sample of the subblock is used as the difference between the motion vector of the current sample of the current subblock and the motion vector of the central sample of the subblock. Here, the motion vector of the central sample of the subblock can be understood as the MV of the subblock to which the current sample (i,j) belongs (i.e., the subblock MV). By using a sample unit such as a 2×2 sample block to calculate the motion vector difference, it is possible to balance the processing overhead and the prediction accuracy. In any of the preceding implementations of the first aspect or in a possible implementation form of the method according to the first aspect itself, the elements of the second prediction matrix are I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. The elements of the horizontal prediction gradient matrix are denoted by X(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; The elements of the vertical prediction gradient matrix are denoted by Y(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; sbW represents the width of the current sub-block in the affine coded block, and sbH represents the height of the current sub-block in the affine coded block. In another representation, the elements of the second predictor matrix are I 1 It is represented by (p,q), where p has a value range of [0,subW+1] and q has a value range of [0,subH+1]. The elements of the horizontal prediction gradient matrix are denoted by X(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [1,sbW] and j in the range [1,sbH]; The elements of the vertical prediction gradient matrix are denoted by Y(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [1,sbW] and j in the range [1,sbH]; sbW represents the width of the current sub-block in the affine coded block, and sbH represents the height of the current sub-block in the affine coded block. It can be seen that since p has values from [0,subW+1] and q has values from [0,subH+1], the top left sample (or origin of the coordinate system) is located at (1,1), while since p has values from [-1,subW] and q has values from [-1,subH], the top left sample (or origin of the coordinate system) is located at (0,0).
[0024] In any preceding implementation form of the first aspect or a possible implementation form of the method according to the first aspect itself, before performing a PROF process on a current sub-block of the affine coded block, the method further includes a step of performing sub-block-based affine motion compensation on the current sub-block of the affine coded block to obtain a predicted sample value (original or to be refined) of the current sub-block.
[0025] No. According to the second aspect, The present inventionA method for prediction refinement using optical flow (PROF) for affine coded blocks. Regarding. This method is performing a PROF process on a current sub-block of the affine coded block to obtain refined predicted sample values (i.e., final predicted sample values) of the current sub-block of the affine coded block, where a number of optical flow decision conditions are satisfied for the affine coded block, where satisfaction of the number of optical flow decision conditions means that all constraints for applying PROF are not satisfied; The step of performing a PROF process for a current sub-block of an affine coded block includes the steps of performing an optical flow process on the current sub-block to obtain a delta predicted value of a current sample of the current sub-block, and obtaining a refined predicted sample value of the current sample based on the delta predicted value of the current sample and the predicted sample value (original or to-be-refined) of the current sample of the current sub-block.
[0026] Thus, an improved method is provided that allows achieving a good trade-off between coding complexity and prediction accuracy. A prediction refinement using optical flow (PROF) process is conditionally performed to refine the sub-block-based affine motion compensated prediction using optical flow at pixel / sample level granularity. These conditions ensure that the calculations involved in PROF occur only when the prediction accuracy can be improved, thereby reducing unnecessary increase in computational complexity. Thus, the beneficial effect achieved by the techniques disclosed herein is to increase the overall compression performance of the coding method.
[0027] In a possible implementation form of the method according to the second aspect itself, before performing the PROF process on a current sub-block of the affine coded block, the method further comprises a step of determining that a number of optical flow decision conditions are satisfied for the affine coded block.
[0028] In a possible implementation form of the method according to the second aspect itself, the optical flow determination conditions include: the first indication indicates that PROF is enabled for the picture including the affine coded block, or the first indication indicates that PROF is enabled for a slice associated with the picture including the affine coded block, and the second indication indicates partitioning of the affine coded block, such as a variable fallbackModeTriggered being set equal to 0. It can be understood that when the variable fallbackModeTriggered is set equal to 0, partitioning of the affine coded block is required, i.e. each sub-block of the affine coded block has a respective motion vector, which indicates that the affine coded block has a non-translational motion.
[0029] It is allowed that PROF may be applied when all constraints for applying PROF are not satisfied according to the design of the constraints for applying PROF, thus allowing a trade-off between coding complexity and prediction accuracy.
[0030] In any preceding implementation of the second aspect or a possible implementation form of the method according to the second aspect itself, the step of performing optical flow processing on the current sub-block to obtain a delta prediction value of a current sample of the current sub-block includes: obtaining a second prediction matrix, elements of the second prediction matrix being based on predicted sample values of a current sub-block, and in some examples, obtaining the second prediction matrix includes generating a first prediction matrix based on motion information of the current sub-block, elements of the first prediction matrix corresponding to predicted sample values of the current sub-block, and generating the second prediction matrix based on the first prediction matrix or generating the second prediction matrix based on the motion information of the current sub-block; generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, the size of the second prediction matrix being equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix; and calculating a delta prediction value (ΔI(i,j)) of the current sample of the current sub-block based on a horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix, a vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and a difference between a motion vector of the current sample of the current sub-block and a motion vector of a center sample of the sub-block.
[0031] In any preceding implementation of the second aspect or a possible implementation of the method according to the second aspect itself, The method is: The method further includes performing sub-block-based affine motion compensation on the current sub-block of the affine coded block to obtain the (original) predicted sample value of the current sub-block of the affine coded block.
[0032] In any preceding implementation form of the second aspect or a possible implementation form of the method according to the second aspect itself, the motion vector difference between the motion vector of the current sample unit (e.g., a 2x2 sample block) to which the current sample belongs and the motion vector of the central sample of the subblock is used as the difference between the motion vector of the current sample of the current subblock and the motion vector of the central sample of the subblock.
[0033] In any preceding implementation of the second aspect or a possible implementation of the method according to the second aspect itself, The elements of the second predictor matrix are I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. The elements of the horizontal prediction gradient matrix are denoted by X(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; The elements of the vertical prediction gradient matrix are denoted by Y(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; sbW represents the width of the current sub-block in the affine coded block, and sbH represents the height of the current sub-block in the affine coded block.
[0034] According to a third aspect, the present invention provides an apparatus for prediction refinement using optical flow (PROF) for affine coded blocks (i.e. blocks encoded or decoded using an affine tool). do. The device corresponds to an encoding device or a decoding device. a decision unit configured to decide that a number of constraints for applying PROF are not satisfied for an affine coded block; The current subblock of the affine coded block (each B and a prediction processing unit configured to perform a PROF process on a current sub-block of the affine coded block to obtain refined predicted sample values (i.e., final predicted sample values) of the current sub-block of the affine coded block (e.g., a current sub-block of the affine coded block), where a number of constraints for applying the PROF are not met or satisfied for the affine coded block; The prediction processing unit performs an optical flow process on the current sub-block to obtain a delta predicted value of the current sample of the current sub-block, and obtains a refined predicted sample value of the current sample based on the delta predicted value of the current sample and the predicted sample value of the current sample of the current sub-block (performing an optical flow process on the current sub-block to obtain a delta predicted value of the current sub-block, and obtaining a refined predicted sample value of the current sub-block based on the delta predicted value of the current sub-block and the predicted sample value of the current sub-block). and) It can be understood that when the refined predicted sample values of each sub-block of the affine coded block are generated, the refined predicted sample values of the affine coded block are generated naturally.
[0035] In a possible implementation form of the device according to the third aspect itself, the constraints for applying PROF include: the first indication indicates that PROF is disabled for the picture including the affine coded block, or the first indication indicates that PROF is disabled for the slice associated with the picture including the affine coded block, and the second indication indicates no partitioning of the affine coded block, i.e., the variable fallbackModeTriggered is set to 1. It can be understood that when the variable fallbackModeTriggered is set to 1, partitioning of the affine coded block is not required, i.e., each sub-block of the affine coded block has the same motion vector. This indicates that the affine coded block has only translational motion. When the variable fallbackModeTriggered is set to 0, partitioning of the affine coded block is required, i.e., each sub-block of the affine coded block has a respective motion vector. This indicates that the affine coded block has non-translational motion.
[0036] In any preceding implementation form of the third aspect or a possible implementation form of the device according to the third aspect itself, the prediction processing unit is configured to obtain a second prediction matrix (in an example, the second prediction matrix is generated based on a first prediction matrix corresponding to a predicted sample value of a current sub-block, where the predicted sample value of the current sub-block may be obtained by performing sub-block-based affine motion compensation on the current sub-block), and the size of the second prediction matrix is larger than the size of the first prediction matrix (e.g., the first prediction matrix has a size of sbWidth*sbHeight). and the second prediction matrix has a size of (sbWidth+2)*(sbHeight+2), where variables sbWidth and sbHeight respectively represent the width and height of the current sub-block, i.e., the step of obtaining the second prediction matrix comprises: generating a first prediction matrix based on motion information of the current sub-block, where elements of the first prediction matrix correspond to predicted sample values of the current sub-block; and the step of obtaining the second prediction matrix further comprises: generating a second prediction matrix based on the first prediction matrix; or generating a second prediction matrix based on motion information of the current sub-block; generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, the size of the second prediction matrix being equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix (e.g., the horizontal prediction gradient matrix or the vertical prediction gradient matrix has a size of sbWidth*sbHeight, and the second prediction matrix has a size of (sbWidth+2)*(sbHeight+2); and calculating a delta prediction value (ΔI(i,j)) of the current sample of the current sub-block based on a horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix, a vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and a difference between a motion vector of the current sample of the current sub-block and a motion vector of a center sample of the sub-block.
[0037] In any of the preceding implementations of the third aspect or in a possible implementation form of the device according to the third aspect itself, the motion vector difference between the motion vector of the current sample unit (e.g., 2×2 sample block) including the current sample and the motion vector of the center sample of the subblock is used as the difference between the motion vector of the current sample of the current subblock and the motion vector of the center sample of the subblock. Here, the motion vector of the center sample of the subblock can be understood as the MV of the subblock to which the current sample (i,j) belongs (i.e., the subblock MV). By using a sample unit such as a 2×2 sample block to calculate the motion vector difference, it is possible to balance the processing overhead and the prediction accuracy. In any of the preceding implementations of the third aspect or in a possible implementation form of the device according to the third aspect itself, the elements of the second prediction matrix are I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. The elements of the horizontal prediction gradient matrix are denoted by X(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; The elements of the vertical prediction gradient matrix are denoted by Y(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; sbW represents the width of the current sub-block in the affine coded block, and sbH represents the height of the current sub-block in the affine coded block.
[0038] In any preceding implementation form of the third aspect or a possible implementation form of an apparatus according to the third aspect itself, the prediction processing unit 1503 is configured to perform sub-block-based affine motion compensation on a current sub-block of an affine coded block to obtain a predicted sample value (original or to be refined) of the current sub-block.
[0039] No. According to the fourth aspect, The present invention An apparatus for prediction refinement using optical flow (PROF) for affine coded blocks. Regarding. This device is a decision unit configured to decide that a number of optical flow decision conditions are satisfied for an affine coded block, where the satisfaction of the number of optical flow decision conditions means that all constraints for applying PROF are not satisfied; and and a prediction processing unit configured to perform a PROF process on a current sub-block of the affine coded block to obtain a refined predicted sample value (i.e., a final predicted sample value) of the current sub-block of the affine coded block, where a number of optical flow decision conditions are satisfied for the affine coded block, and the prediction processing unit is configured for performing optical flow processing on the current sub-block to obtain a delta predicted value of the current sample of the current sub-block, and for obtaining a refined predicted sample value of the current sample based on the delta predicted value of the current sample and the predicted sample value (original or to-be-refined) of the current sample of the current sub-block.
[0040] In a possible implementation form of the device according to the fourth aspect itself, the plurality of optical flow determination conditions include: a first indication indicating that PROF is enabled for a picture including the affine coded block, or a first indication indicating that PROF is enabled for a slice associated with the picture including the affine coded block, and a second indication indicating partitioning of the affine coded block, such as a variable fallbackModeTriggered being set equal to 0. It can be understood that when the variable fallbackModeTriggered is set equal to 0, partitioning of the affine coded block is required, i.e., each sub-block of the affine coded block has a respective motion vector, which indicates that the affine coded block has a non-translational motion.
[0041] In a possible implementation of the apparatus according to any preceding implementation of the fourth aspect or the fourth aspect itself, the prediction processing unit comprises: obtaining a second prediction matrix, elements of the second prediction matrix being based on predicted sample values of a current sub-block, and in some examples, obtaining the second prediction matrix includes generating a first prediction matrix based on motion information of the current sub-block, elements of the first prediction matrix corresponding to predicted sample values of the current sub-block, and generating the second prediction matrix based on the first prediction matrix or generating the second prediction matrix based on the motion information of the current sub-block; generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, the size of the second prediction matrix being equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix; and calculating a delta prediction value (ΔI(i,j)) of the current sample of the current sub-block based on the horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix, the vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and a difference between the motion vector of the current sample of the current sub-block and the motion vector of a center sample of the sub-block.
[0042] In any preceding implementation form of the fourth aspect or a possible implementation form of the device according to the fourth aspect itself, the prediction processing unit is configured to perform sub-block-based affine motion compensation on a current sub-block of the affine coded block to obtain an (original) predicted sample value of the current sub-block of the affine coded block.
[0043] In any preceding implementation form of the fourth aspect or a possible implementation form of an apparatus according to the fourth aspect itself, the motion vector difference between the motion vector of the current sample unit (e.g., a 2x2 sample block) to which the current sample belongs and the motion vector of the central sample of the subblock is used as the difference between the motion vector of the current sample of the current subblock and the motion vector of the central sample of the subblock.
[0044] In any of the preceding implementations of the fourth aspect or in a possible implementation form of the device according to the fourth aspect itself, the elements of the second prediction matrix are I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. The elements of the horizontal prediction gradient matrix are denoted by X(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; The elements of the vertical prediction gradient matrix are denoted by Y(i,j) and correspond to sample (i,j) of the current sub-block in the affine coded block, with i in the range [0,sbW-1] and j in the range [0,sbH-1]; sbW represents the width of the current sub-block in the affine coded block, and sbH represents the height of the current sub-block in the affine coded block.
[0045] The method according to the first aspect of the invention may be performed by an apparatus according to the third aspect of the invention. Further features and implementation forms of the apparatus according to the third aspect of the invention correspond to the features and implementation forms of the method according to the first aspect of the invention.
[0046] The method according to the second aspect of the invention may be performed by an apparatus according to the fourth aspect of the invention. Further features and implementation forms of the apparatus according to the fourth aspect of the invention correspond to the features and implementation forms of the method according to the second aspect of the invention.
[0047] According to a fifth aspect, the invention relates to an encoder (20) comprising processing circuitry for performing the method according to the first or second aspect per se or in an implementation form thereof.
[0048] According to a sixth aspect, the invention relates to a decoder (30) comprising processing circuitry for performing the method according to the first or second aspect per se or in an implementation form thereof.
[0049] According to a seventh aspect, the present invention relates to a decoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform the first aspect itself or a method according to an implementation form thereof.
[0050] According to an eighth aspect, the present invention relates to an encoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the encoder to perform the first aspect itself or a method according to an implementation form thereof.
[0051] According to a ninth aspect, the present invention relates to an apparatus for encoding a video stream comprising a processor and a memory, the memory storing instructions for causing the processor to carry out the method according to the second aspect.
[0052] According to a tenth aspect, the present invention provides , P Includes processor and memory , DEVICE FOR DECODING A VIDEO STREAM - Patent application The memory stores instructions for causing a processor to perform a method according to the first aspect.
[0053] According to an eleventh aspect, the present invention relates to a computer program comprising a program code for performing the method according to the first or second aspect or any possible embodiment of the first or second aspect, when the computer program is executed on a computer.
[0054] According to a twelfth aspect, The present invention relates to When executed 、1 One or more processors The present invention relates to a computer-readable storage medium having stored thereon instructions for causing a computer to code video data. The instructions cause one or more processors to perform a method according to the first aspect or the second aspect or any possible embodiment of the first aspect or the second aspect.
[0055] According to a further aspect, there is provided a video picture encoding method comprising the steps of determining indication information, the indication information being used to indicate whether a picture block to be encoded is to be encoded according to a target inter prediction method, the target inter prediction method comprising an inter prediction method according to the first aspect or the second aspect or any possible embodiment of the first aspect or the second aspect, and encoding the indication information into a bitstream.
[0056] According to a further aspect, a video picture decoding method is provided, comprising the steps of parsing a bitstream to obtain instruction information, the instruction information being used to indicate whether a picture block to be decoded is to be processed according to a target inter prediction method, the target inter prediction method comprising an inter prediction method according to the first aspect or the second aspect or any possible embodiment of the first aspect or the second aspect, and processing the picture block to be decoded according to the target inter prediction method when the instruction information indicates that processing is performed according to the target inter prediction method.
[0057] The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims.
[0058] The following embodiments of the present invention will be described in more detail with reference to the accompanying drawings and drawings. [Brief description of the drawings]
[0059] [Figure 1A] 1 is a block diagram illustrating an example of a video coding system configured to implement embodiments of the present invention. [Figure 1B] 2 is a block diagram illustrating another example of a video coding system configured to implement embodiments of the present invention. [Diagram 2] 1 is a block diagram illustrating an example of a video encoder configured to implement embodiments of the present invention. [Diagram 3] 2 is a block diagram illustrating an exemplary structure of a video decoder configured to implement embodiments of the present invention. [Figure 4] FIG. 2 is a block diagram showing an example of an encoding device or a decoding device. [Diagram 5] FIG. 13 is a block diagram showing another example of an encoding device or a decoding device. [Figure 6]FIG. 2 illustrates candidate spatial and temporal motion information for a current block. [Figure 7] FIG. 2 shows a current affine coded block and the neighboring affine coded block in which A1 is located. [Figure 8A] FIG. 13 is a diagram illustrating an example for explaining a constructed control point motion vector prediction method. [Figure 8B] FIG. 13 is a diagram illustrating an example for explaining a constructed control point motion vector prediction method. [Figure 9A] 1 is a flowchart illustrating a process of a decoding method according to an embodiment of the present application. [Figure 9B] FIG. 13 is a diagram showing a constructed control point motion vector prediction method. [Figure 9C] FIG. 2 shows samples or pixels of a current affine coded block and motion vectors for the top-left and top-right control points. [Figure 9D] FIG. 13 illustrates a 6×6 prediction signal window for calculating or generating horizontal and vertical prediction gradient matrices and 4×4 sub-blocks. [Figure 9E] FIG. 2 illustrates a horizontal and vertical predicted gradient matrix and an 18×18 predicted signal window for calculating or generating a 16×16 block. [Figure 10] FIG. 13 shows the difference Δv(i,j) (red arrow) between the sample MV calculated for sample position (i,j) denoted by v(i,j) and the sub-block MV (VSB) of the sub-block to which sample (i,j) belongs. [Figure 11A] FIG. 2 illustrates a method for prediction refinement using optical flow (PROF) for affine coded blocks according to one embodiment of the present disclosure. [Figure 11B] FIG. 13 illustrates another method for prediction refinement using optical flow (PROF) for affine-coded blocks according to another embodiment of the present disclosure. [Figure 12]FIG. 2 illustrates a PROF process according to an embodiment of the present disclosure. [Figure 13] A diagram showing the surrounding and inner regions of an (M+2)*(N+2) predicted block according to an embodiment of the present disclosure. [Figure 14] FIG. 13 is a diagram illustrating the surrounding and inner regions of an (M+2)*(N+2) predicted block according to another embodiment of the present disclosure. [Figure 15] 1 is a block diagram illustrating an example structure of an apparatus for prediction refinement using optical flow (PROF) for affine coded blocks of a video signal, in accordance with some embodiments of the present disclosure. [Figure 16] 1 is a block diagram showing an exemplary structure of a content supply system for implementing a content distribution service. [Figure 17] FIG. 2 is a block diagram illustrating the structure of an example terminal device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0060] In the following, identical reference signs refer to identical or at least functionally equivalent features, unless expressly specified otherwise.
[0061] In the following description, reference is made to the accompanying drawings, which form a part of this disclosure and which show, by way of example, certain aspects of embodiments of the invention or in which embodiments of the invention may be used. It is understood that embodiments of the invention may be used in other ways and may include structural or logical changes not shown in the drawings. Therefore, the following detailed description should not be taken in a limiting sense, and the scope of the present invention is defined by the appended claims.
[0062] For example, it is understood that disclosure related to a described method may also apply to a corresponding device or system configured to perform the method, and vice versa. For example, when one or more particular method steps are described, the corresponding device may include one or more units, e.g., functional units (e.g., one unit performing one or more steps, or multiple units performing one or more of the multiple steps, respectively), for performing the described one or more method steps, even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, when a particular apparatus is described based on one or more units, e.g., functional units, the corresponding method may include one step for performing the function of the one or more units (e.g., one step for performing the function of the one or more units, or multiple steps for performing one or more of the multiple units, respectively), even if such one or more steps are not explicitly described or illustrated in the drawings. Furthermore, it is understood that the features of various exemplary embodiments and / or aspects described herein may be combined with each other, unless specifically stated otherwise.
[0063] Video coding usually refers to the processing of a sequence of pictures forming a video or a video sequence. Instead of the term "picture", the terms "frame" or "image" may be used synonymously in the field of video coding. Video coding (or coding in general) includes two parts: video encoding and video decoding. Video encoding is performed at the source side and usually involves processing (e.g., by compression) an original video picture to reduce the amount of data required to represent the video picture (for more efficient storage and / or transmission). Video decoding is performed at the destination side and usually involves the reverse processing compared to the encoder to reconstruct the video picture. The embodiments referring to "coding" of a video picture (or pictures in general) should be understood to relate to "encoding" or "decoding" of the video picture or the respective video sequence. The combination of the encoding and decoding parts is also called a CODEC (Coding and Decoding).
[0064] In the case of lossless video coding, the original video picture can be reconstructed, i.e., the reconstructed video picture has the same quality as the original video picture (assuming there is no transmission loss or other data loss during storage or transmission). In the case of lossy video coding, further compression, e.g., by quantization, is performed to reduce the amount of data representing the video picture, which cannot be completely reconstructed at the decoder, i.e., the quality of the reconstructed video picture is lower or worse compared to the quality of the original video picture.
[0065] Some video coding standards belong to the group of "lossy hybrid video codecs" (i.e., they combine spatial and temporal prediction in the sample domain with 2D transform coding to apply quantization in the transform domain). Each picture of a video sequence is usually partitioned into a set of non-overlapping blocks, and coding is usually performed at the block level. In other words, in an encoder, a video is usually processed, i.e., encoded, at the block (video block) level, for example, by using spatial (intra-picture) and / or temporal (inter-picture) prediction to generate a predictive block, subtracting the predictive block from a current block (the block currently being / to be processed) to obtain a residual block, transforming the residual block to reduce (compress) the amount of data to be transmitted, and quantizing the residual block in the transform domain, while in a decoder, a reverse process compared to the encoder is applied to the coded or compressed block to reconstruct the current block for representation. Furthermore, the encoder replicates the decoder's processing loop so that both the encoder and the decoder generate the same prediction (e.g., intra-prediction and inter-prediction) and / or reconstruction for processing, i.e., coding, of a subsequent block.
[0066] In the following, embodiments of a video coding system 10, a video encoder 20 and a video decoder 30 are described based on FIGS.
[0067] 1A is a schematic block diagram illustrating an example coding system 10, e.g., video coding system 10 (or coding system 10 for short), that may utilize techniques of the present application. A video encoder 20 (or encoder 20 for short) and a video decoder 30 (or decoder 30 for short) of video coding system 10 represent examples of devices that may be configured to perform techniques according to various examples described in the present application.
[0068] As shown in FIG. 1A, the coding system 10 may, for example, receive encoded picture data. 21 The system comprises a source device 12 configured to provide encoded picture data 21 to a destination device 14 for decoding.
[0069] The source device 12 comprises an encoder 20, and may additionally, i.e. optionally, comprise a picture source 16, a pre-processor (or pre-processing unit) 18, such as a picture pre-processor 18, and a communication interface or unit 22.
[0070] Picture source 16 may comprise or be any kind of picture capture device, e.g., a camera for capturing real-world pictures, and / or any kind of picture generation device, e.g., a computer graphics processor for generating computer-animated pictures, or any kind of other device for obtaining and / or providing real-world pictures, computer-generated pictures (e.g., screen content, virtual reality (VR) pictures), and / or any combination thereof (e.g., augmented reality (AR) pictures). Picture source may also be any kind of memory or storage that stores any of the aforementioned pictures.
[0071] In distinction from the pre-processor 18 and the processing performed by the pre-processing unit 18 , the picture or picture data 17 may also be referred to as a raw picture or raw picture data 17 .
[0072] The pre-processor 18 is configured to receive (raw) picture data 17 and perform pre-processing on the picture data 17 to obtain a pre-processed picture 19 or pre-processed picture data 19. The pre-processing performed by the pre-processor 18 may comprise, for example, cropping, color format conversion (e.g., from RGB to YCbCr), color correction, or noise removal. It may be understood that the pre-processing unit 18 may be an optional component.
[0073] Video encoder 20 is configured to receive pre-processed picture data 19 and to provide encoded picture data 21 (further details are described below, eg, with reference to FIG. 2).
[0074] The communications interface 22 of the source device 12 may be configured to receive the encoded picture data 21 and transmit the encoded picture data 21 (or any further processed version thereof) via the communications channel 13 to another device, such as the destination device 14 or any other device, for storage or direct reconstruction.
[0075] Destination device 14 comprises a decoder 30 (e.g., a video decoder 30), and may additionally, i.e. optionally, comprise a communications interface or unit 28, a post-processor 32 (or post-processing unit 32), and a display device 34.
[0076] The communications interface 28 of the destination device 14 is configured to receive the encoded picture data 21 (or any further processed version thereof), e.g. directly from the source device 12 or any other source, e.g. a storage device, e.g. a coded picture data storage device, and to provide the encoded picture data 21 to a decoder 30.
[0077] The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded picture data 21 or the encoded data 13 via a direct communication link between the source device 12 and the destination device 14, such as a direct wired or wireless connection, or via any type of network, such as a wired or wireless network or any combination thereof, or any type of private and public network, or any type of combination thereof.
[0078] The communications interface 22 may be configured, for example, to package the encoded picture data 21 into a suitable format, e.g., packets, and / or process the encoded picture data using any type of transmission encoding or processing, for transmission over a communications link or network.
[0079] Communications interface 28, which is the counterpart of communications interface 22, may be configured, for example, to receive transmitted data and process the transmitted data using any type of corresponding transmission decoding or processing and / or depackaging to obtain encoded picture data 21.
[0080] Both communication interface 22 and communication interface 28 may be configured as unidirectional communication interfaces, as indicated by the arrow for communication channel 13 in FIG. 1A pointing from source device 12 to destination device 14, or as bidirectional communication interfaces, and may be configured, for example, to send and receive messages, e.g., to set up and acknowledge connections, and to exchange any other information related to the communication link and / or data transmission, e.g., the transmission of encoded picture data.
[0081] The decoder 30 is configured to receive the encoded picture data 21 and provide decoded picture data 31 or decoded pictures 31 (further details are described below, e.g. based on Figure 3 or Figure 5).
[0082] The post-processor 32 of the destination device 14 is configured to post-process the decoded picture data 31 (also referred to as reconstructed picture data), e.g., the decoded picture 31, to obtain post-processed picture data 33, e.g., a post-processed picture 33. The post-processing performed by the post-processing unit 32 may comprise, for example, color format conversion (e.g., from YCbCr to RGB), color correction, cropping, or resampling, or any other processing, e.g., to prepare the decoded picture data 31, e.g., for display by a display device 34.
[0083] A display device 34 of destination device 14 is configured to receive the post-processed picture data 33, e.g., for displaying the picture to a user or viewer. The display device 34 may be or comprise any type of display for presenting the reconstructed picture, e.g., an integrated or external display or monitor. The display may comprise, for example, a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any type of other display.
[0084] 1A illustrates source device 12 and destination device 14 as separate devices, an embodiment of the devices may also comprise both or both of these functions, i.e., source device 12 or corresponding functions and destination device 14 or corresponding functions. In such an embodiment, source device 12 or corresponding functions and destination device 14 or corresponding functions may be implemented using the same hardware and / or software, or by separate hardware and / or software, or any combination thereof.
[0085] As will be apparent to one of ordinary skill in the art based on the description, the functionality of the various units or the presence and (exact) division of functionality within source device 12 and / or destination device 14 as shown in FIG. 1A may vary depending on the actual device and application.
[0086] The encoder 20 (e.g., video encoder 20) or the decoder 30 (e.g., video decoder 30), or both the encoder 20 and the decoder 30, may be implemented via processing circuitry as shown in FIG. 1B, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic circuits, hardware, dedicated to video coding, or any combination thereof. The encoder 20 may be implemented via processing circuitry 46 to embody various modules as discussed with respect to the encoder 20 of FIG. 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented via processing circuitry 46 to embody various modules as discussed with respect to the decoder 30 of FIG. 3 and / or any other decoder system or subsystem described herein. The processing circuitry may be configured to perform various operations as discussed later. 5, where the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Either video encoder 20 or video decoder 30 may be integrated as part of a combined encoder / decoder (codec) in a single device, such as that shown in FIG. 1B.
[0087] Source device 12 and destination device 14 may comprise any of a wide range of devices, including any type of handheld or stationary device, e.g., a notebook or laptop computer, a mobile phone, a smartphone, a tablet or tablet computer, a camera, a desktop computer, a set-top box, a television, a display device, a digital media player, a video game console, a video streaming device (such as a content service server or a content delivery server), a broadcast receiver device, a broadcast transmitter device, etc., and may use no operating system or any type of operating system. In some cases, source device 12 and destination device 14 may be capable of wireless communication. Thus, source device 12 and destination device 14 may be wireless communication devices.
[0088] In some cases, the video coding system 10 shown in FIG. 1A is merely an example, and the techniques of the present application may be applied to video coding settings (e.g., video encoding or video decoding) that do not necessarily include any data communication between the encoding device and the decoding device. In other examples, data is retrieved from local memory, streamed over a network, etc. A video encoding device may encode data and store it in memory, and / or a video decoding device may retrieve data from memory and decode it. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but simply encode data into memory and / or retrieve data from memory and decode it.
[0089] For ease of explanation, embodiments of the present invention are described herein with reference to, for example, High-Efficiency Video Coding (HEVC) or with reference to reference software for Versatile Video coding (VVC), a next-generation video coding standard being developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG). Those skilled in the art will appreciate that embodiments of the present invention are not limited to HEVC or VVC.
[0090] Encoder and encoding method FIG. 2 shows a schematic block diagram of an exemplary video encoder 20 configured to implement the techniques of the present application. In the example of FIG. 2, the video encoder 20 includes an input 201 (or an input interface 201), a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, an entropy coding unit 270, and an output 272 (or an output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partition unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). The video encoder 20 as shown in FIG. 2 may also be referred to as a hybrid video encoder or a video encoder according to a hybrid video codec.
[0091] The residual calculation unit 204, the transform processing unit 206, the quantization unit 208, and the mode selection unit 260 may be referred to as forming a forward signal path of the encoder 20, while the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may be referred to as forming a backward signal path of the video encoder 20, which corresponds to the signal path of the decoder (see the video decoder 30 in FIG. 3). The inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244, and the intra prediction unit 254 may also be referred to as forming a “built-in decoder” of the video encoder 20.
[0092] Pictures and Picture Segmentation (Pictures and Blocks) The encoder 20 may be configured to receive, for example, via an input 201, a picture 17 (or picture data 17), e.g., a picture of a sequence of pictures forming a video or a video sequence. The received picture or picture data may also be a preprocessed picture 19 (or preprocessed picture data 19). For brevity, the following description refers to the picture 17. The picture 17 may also be referred to as a current picture or a picture to be coded (specifically, in video coding, to distinguish the current picture from other pictures, e.g., previously encoded and / or decoded pictures of the same video sequence, i.e., a video sequence that also includes the current picture).
[0093] A (digital) picture is, or may be considered as, a two-dimensional array or matrix of samples with intensity values. The samples in the array may also be called pixels (short for picture element) or pels. The number of samples in the horizontal and vertical directions (or axes) of the array or picture determines the size and / or resolution of the picture. For color representation, three color components are usually utilized, i.e. a picture may be represented by or contain three sample arrays. RGB In a format or color space, a picture includes corresponding red, green, and blue sample arrays. However, in video coding, each pixel is usually represented in a luminance and chrominance format or color space, for example, YCbCr, which includes a luminance component denoted by Y (sometimes L is used instead) and two chrominance components denoted by Cb and Cr. The luminance (or luma for short) component Y represents brightness or gray level intensity (e.g., as in a grayscale picture), while the two chrominance (or chroma for short) components Cb and Cr represent chromaticity or color information components. Thus, a picture in YCbCr format includes a luminance sample array of luminance sample values (Y) and two chrominance sample arrays of chrominance values (Cb and Cr). A picture in RGB format may be converted or translated to YCbCr format or vice versa, a process also known as color conversion or color transformation. If the picture is monochrome, it may comprise only an array of luma samples. Thus, a picture may be, for example, an array of luma samples in a monochrome format, or an array of luma samples and two corresponding arrays of chroma samples in the 4:2:0, 4:2:2, and 4:4:4 color formats.
[0094] An embodiment of video encoder 20 may comprise a picture partitioning unit (not shown in FIG. 2) configured to partition picture 17 into multiple (usually non-overlapping) picture blocks 203. These blocks may also be called root blocks, macroblocks (H.264 / AVC), or coding tree blocks (CTBs) or coding tree units (CTUs) (H.265 / HEVC and VVC). The picture partitioning unit may be configured to use the same block size for all pictures of a video sequence and a corresponding grid that defines the block size, or to vary the block size between pictures or subsets or groups of pictures, and partition each picture into corresponding blocks.
[0095] In further embodiments, the video encoder may be configured to directly receive block 203 of picture 17, such as one, some, or all of the blocks that form picture 17. Picture block 203 may also be referred to as a current picture block or a picture block to be coded.
[0096] Like the picture 17, the picture block 203 is also a two-dimensional array or matrix of samples with intensity values (sample values), but with smaller dimensions than the picture 17, or may be considered as such. In other words, the block 203 may comprise, for example, one sample array (e.g., a luma array for a monochrome picture 17, or a luma array or a chroma array for a color picture) or three sample arrays (e.g., a luma array and two chroma arrays for a color picture 17) or any other number and / or type of arrays depending on the color format applied. The number of samples in the horizontal and vertical directions (or axes) of the block 203 determines the size of the block 203. Thus, the block may be, for example, an M×N (M columns by N rows) array of samples, or an M×N array of transform coefficients.
[0097] An embodiment of video encoder 20 as shown in FIG. 2 may be configured to encode picture 17 on a block-by-block basis, eg, encoding and prediction are performed on each block 203 .
[0098] An embodiment of video encoder 20 as shown in FIG. 2 may further be configured to partition and / or encode a picture by using slices (also referred to as video slices), where a picture may be partitioned into or encoded using one or more slices (typically non-overlapping), each of which may comprise one or more blocks (e.g., CTUs).
[0099] Embodiments of video encoder 20 as shown in FIG. 2 may further be configured to partition and / or encode a picture by using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or encoded using one or more tile groups (typically non-overlapping), where each tile group may comprise, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be, for example, rectangular in shape and may comprise one or more blocks (e.g., CTUs), e.g., complete blocks or partial blocks.
[0100] Residual calculation The residual calculation unit 204 may be configured to calculate the residual block 205 (also referred to as residual 205) based on the picture block 203 and the prediction block 265, for example, by subtracting sample values of the prediction block 265 (further details of the prediction block 265 are given later) sample by sample (pixel by pixel) from the sample values of the picture block 203 to obtain the residual block 205 in the sample domain.
[0101] conversion The transform processing unit 206 may be configured to apply a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 may also be referred to as transform residual coefficients and may represent the residual block 205 in the transform domain.
[0102] The transform processing unit 206 may be configured to apply an integer approximation of a DCT / DST, such as the transform specified for H.265 / AVC. Compared to an orthogonal DCT transform, such an integer approximation is usually scaled by a factor. In order to preserve the norm of the residual block processed by the forward transform and the inverse transform, an additional scaling factor is applied as part of the transform process. The scaling factor is usually chosen based on some constraints, such as the scaling factor being a power of two due to shift operations, the bit depth of the transform coefficients, a trade-off between accuracy and implementation cost, etc. For example, a specific scaling factor may be specified for the inverse transform, e.g., by the inverse transform processing unit 212 (and the corresponding inverse transform, e.g., by the inverse transform processing unit 312 in the video decoder 30), and the corresponding scaling factor for the forward transform, e.g., by the transform processing unit 206 in the encoder 20, may be specified accordingly.
[0103] An embodiment of video encoder 20 (respectively transform processing unit 206) may be configured to output transform parameters, e.g., one or more types of transform, e.g., directly or in an encoded or compressed state via entropy coding unit 270, so that, for example, video decoder 30 may receive and use the transform parameters for decoding.
[0104] Quantization The quantization unit 208 may be configured to quantize the transform coefficients 207, for example by applying scalar quantization or vector quantization, to obtain quantized coefficients 209. The quantized coefficients 209 may also be referred to as quantized transform coefficients 209 or quantized residual coefficients 209.
[0105] The quantization process may reduce the bit depth associated with some or all of the transform coefficients 207. For example, an n-bit transform coefficient may be rounded to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, in scalar quantization, different scaling may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to a finer quantization, while a larger quantization step size corresponds to a coarser quantization. The applicable quantization step sizes may be indicated by a quantization parameter (QP). The quantization parameter may be, for example, an index to a predefined set of applicable quantization step sizes. For example, a small quantization parameter may correspond to fine quantization (small quantization step size) and a large quantization parameter may correspond to coarse quantization (large quantization step size), or vice versa. Quantization may include a division by the quantization step size, and corresponding and / or dequantization, e.g., by the inverse quantization unit 210, may include a multiplication by the quantization step size. Some standards, e.g., HEVC, embodiments may be configured to use a quantization parameter to determine the quantization step size. In general, the quantization step size may be calculated based on the quantization parameter using a fixed-point approximation of an equation that includes a division. To restore the norm of the residual block, an additional scaling factor may be introduced for quantization and dequantization, which may be modified by the scaling used in the fixed-point approximation of the equation for the quantization step size and the quantization parameter. In one exemplary implementation, the scaling of the inverse transform and dequantization may be combined. Alternatively, customized quantization tables may be used and signaled from the encoder to the decoder, e.g., in the bitstream. Quantization is a lossy operation, and the loss increases with increasing quantization step size.
[0106] An embodiment of video encoder 20 (respectively quantization unit 208) may be configured to output a quantization parameter (QP), e.g., directly or in an encoded state via entropy encoding unit 270, so that video decoder 30, for example, may receive and apply the quantization parameter for decoding.
[0107] inverse quantization The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain dequantized coefficients 211, e.g., by applying the inverse of the quantization scheme applied by the quantization unit 208, based on or using the same quantization step size as the quantization unit 208. The dequantized coefficients 211 may also be referred to as dequantized residual coefficients 211, and may correspond to the transform coefficients 207, although they are not usually identical to the transform coefficients due to losses due to quantization.
[0108] Inverse transformation The inverse transform processing unit 212 is configured to apply an inverse transform of the transform applied by the transform processing unit 206, e.g., an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) or other inverse transform, to obtain a reconstructed residual block 213 (or corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 213.
[0109] Rebuild The reconstruction unit 214 (e.g., an adder or summer 214) is configured to add the transform block 213 (i.e., the reconstructed residual block 213) to the prediction block 265 to obtain a reconstructed block 215 in the sample domain, for example by adding sample values of the reconstructed residual block 213 and the prediction block 265 sample by sample.
[0110] filtering The loop filter unit 220 (or “loop filter” 220 for short) is configured to filter the reconstructed block 215 to obtain a filtered block 221, or in general, to filter reconstructed samples to obtain filtered samples. The loop filter unit is configured, for example, to smooth pixel transitions or otherwise improve video quality. The loop filter unit 220 may comprise one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, for example, a bilateral filter, an adaptive loop filter (ALF), a sharpening filter, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 220 is illustrated in FIG. 2 as being a loop filter, in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as a filtered reconstructed block 221.
[0111] An embodiment of video encoder 20 (respectively loop filter unit 220) may be configured to output loop filter parameters (e.g., sample adaptive offset information), e.g., directly or in an encoded state via entropy encoding unit 270, so that decoder 30, for example, may receive and apply the same loop filter parameters or the respective loop filters for decoding.
[0112] Decoded Picture Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference pictures, or in general reference picture data, for encoding video data by the video encoder 20. The DPB 230 may be formed by any of a variety of memory devices, such as a dynamic random access memory (DRAM), including a synchronous DRAM (SDRAM), a magnetoresistive RAM (MRAM), a resistive RAM (RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may further be configured to store other previously filtered blocks, e.g., previously reconstructed and filtered blocks 221, of the same current picture, or of a different picture, e.g., a previously reconstructed picture, and may provide a complete previously reconstructed, i.e., decoded picture (and corresponding reference blocks and samples) and / or a partially reconstructed current picture (and corresponding reference blocks and samples), e.g., for inter prediction. The decoded picture buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215, or unfiltered reconstructed samples in general, for example if the reconstructed blocks 215 have not been filtered by the loop filter unit 220, or to store any other further processed version of the reconstructed blocks or samples.
[0113] Mode Selection (Segmentation and Prediction) The mode selection unit 260 comprises a partitioning unit 262, an inter prediction unit 244, and an intra prediction unit 254, and is configured to receive or obtain original picture data, e.g., original block 203 (current block 203 of current picture 17), and reconstructed picture data, e.g., filtered and / or unfiltered reconstructed samples or blocks of the same (current) picture, and / or from one or more previously decoded pictures, e.g., from a decoded picture buffer 230 or other buffer (e.g., a line buffer, not shown). The reconstructed picture data is used as reference picture data for prediction, e.g., inter prediction or intra prediction, to obtain a prediction block 265 or a predictor 265.
[0114] The mode selection unit 260 may be configured to determine or select a partitioning (including no partitioning) and a prediction mode (e.g., intra-prediction mode or inter-prediction mode) for the current block prediction mode and generate a corresponding prediction block 265, which is used for calculation of the residual block 205 and for reconstruction of the reconstructed block 215.
[0115] An embodiment of the mode selection unit 260 may be configured to select a partitioning and prediction mode (e.g., from those supported by or available to the mode selection unit 260) that results in the best match, or in other words, the smallest residual (smallest residual means better compression for transmission or storage), or the smallest signaling overhead (smallest signaling overhead means better compression for transmission or storage), or that considers or balances both. The mode selection unit 260 may be configured to determine the partitioning and prediction mode based on rate-distortion optimization (RDO), i.e., to select the prediction mode that results in the smallest rate distortion. Terms such as "best," "minimum," "optimum," etc. in this context do not necessarily refer to an overall "best," "minimum," "optimum," etc., but may also refer to the satisfaction of a termination or selection criterion, such as a value above or below a certain threshold, or other constraints that may lead to a "non-optimal selection" but reduce complexity and processing time.
[0116] In other words, the partitioning unit 262 may be configured to partition the block 203 into smaller block partitions or sub-blocks (which still form blocks), e.g., using quadtree partitioning (QT), binary tree partitioning (BT), ternary tree partitioning (TT) or any combination thereof repeatedly, and to perform prediction for each of the block partitions or sub-blocks, e.g., where the mode selection comprises selecting a tree structure of the partitioned block 203, and a prediction mode is applied to each of the block partitions or sub-blocks.
[0117] Below, the partitioning (eg, by partition unit 260) and prediction processes (by inter prediction unit 244 and intra prediction unit 254) performed by the exemplary video encoder 20 are described in more detail.
[0118] compartmentalization The partitioning unit 262 may partition (or split) the current block 203 into smaller partitions, e.g., smaller blocks of square or rectangular size. These smaller blocks (which may also be called sub-blocks) may be further divided into smaller partitions. This is also called tree partitioning or hierarchical tree partitioning, where e.g., a root block at root tree level 0 (hierarchical level 0, depth 0) may be recursively partitioned, e.g., into two or more blocks at the next lower tree level, e.g., a node at tree level 1 (hierarchical level 1, depth 1), which may be partitioned again into two or more blocks at the next lower level, e.g., tree level 2 (hierarchical level 2, depth 2), and so on, until the partitioning is terminated, e.g., due to a termination criterion being met, e.g., a maximum tree depth or a minimum block size being reached. Blocks that are not further partitioned are also called leaf blocks or leaf nodes of the tree. A tree that uses a partitioning into two partitions is called a binary tree (BT), a tree that uses a partitioning into three partitions is called a ternary tree (TT), and a tree that uses a partitioning into four partitions is called a quad tree (QT).
[0119] As mentioned before, the term "block" used in this specification may be a portion of a picture, particularly a square or rectangular portion. For example, with reference to HEVC and VVC, a block may be or correspond to a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), and a transform unit (TU), and / or a corresponding block, such as a coding tree block (CTB), a coding block (CB), a transform block (TB), or a prediction block (PB).
[0120] For example, the coding tree unit (CTU) may be or comprise a CTB of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples of a monochrome picture or a picture coded using three separate color planes and syntax structures used to code the samples. Correspondingly, the coding tree block (CTB) may be an N×N block of samples for some value of N such that the division of the components into CTBs is a partition. The coding unit (CU) may be or comprise a coding block of luma samples, two corresponding coding blocks of chroma samples for a picture with three sample arrays, or a coding block of samples of a monochrome picture or a picture coded using three separate color planes and syntax structures used to code the samples. Correspondingly, the coding block (CB) may be an M×N block of samples for some value of M and N such that the division of the CTB into coding blocks is a partition.
[0121] In an embodiment, for example, according to HEVC, a coding tree unit (CTU) may be divided into CUs by using a quadtree structure denoted as a coding tree. The decision of whether to code a picture area using inter-picture (temporal) prediction or intra-picture (spatial) prediction is made at the CU level. Each CU may be further divided into one, two, or four PUs according to a PU partition type. Within one PU, the same prediction process is applied, and related information is sent to the decoder for each PU. After obtaining the residual block by applying a prediction process based on the PU partition type, the CU may be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree for CUs.
[0122] In an embodiment, according to the latest video coding standard currently under development, for example called Versatile Video Coding (VVC), a composite quad-tree and binary tree (QTBT) partitioning is used to partition the coding block. In the QTBT block structure, a CU may have either a square or rectangular shape. For example, a coding tree unit (CTU) is first partitioned by a quad-tree structure. The quad-tree leaf node is further partitioned by a binary tree or a ternary (or triple) tree structure. The partitioning tree leaf node is called a coding unit (CU), and its segmentation is used for prediction and transformation processing without further partitioning. This means that CU, PU, and TU have the same block size in the QTBT coding block structure. In parallel, multiple partitions, for example triple tree partitioning, may be used with the QTBT block structure.
[0123] In one example, mode selection unit 260 of video encoder 20 may be configured to perform any combination of the partitioning techniques described herein.
[0124] As described above, video encoder 20 is configured to determine or select a best or optimal prediction mode from a (e.g., predetermined) set of prediction modes. The set of prediction modes may comprise, for example, intra-prediction modes and / or inter-prediction modes.
[0125] Intra prediction The set of intra prediction modes may comprise 35 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes, e.g., as defined in HEVC, or may comprise 67 different intra prediction modes, e.g., non-directional modes such as DC (or average) mode and planar mode, or directional modes, e.g., as defined for VVC.
[0126] The intra prediction unit 254 is configured to use reconstructed samples of neighboring blocks of the same current picture to generate an intra prediction block 265 according to an intra prediction mode of a set of intra prediction modes.
[0127] The intra prediction unit 254 (or generally, the mode selection unit 260) is further configured to output intra prediction parameters (or generally, information indicating the selected intra prediction mode for the block) in the form of syntax element 266 to the entropy encoding unit 270 for inclusion in the encoded picture data 21, so that, for example, the video decoder 30 may receive and use the prediction parameters for decoding.
[0128] Inter Prediction The set of inter prediction modes (or possible inter prediction modes) is determined based on the available reference pictures (i.e., e.g. DPB 230), and other inter prediction parameters, such as whether the entire reference picture is used to look for the best matching reference block or only a part of the reference picture, such as a search window area around the area of the current block, is used, and / or whether pixel interpolation is applied, such as whether half-pel and / or quarter-pel interpolation is applied.
[0129] In addition to the above prediction modes, skip mode and / or direct mode may be applied.
[0130] The inter prediction unit 244 may include a motion estimation (ME) unit and a motion compensation (MC) unit (both not shown in FIG. 2). The motion estimation unit may be configured to receive or obtain the picture block 203 (current picture block 203 of current picture 17) and the decoded picture 231, or at least one or more previously reconstructed blocks, e.g., reconstructed blocks of one or more other / different previously decoded pictures 231, for motion estimation. For example, a video sequence may comprise the current picture and the previously decoded picture 231, or in other words, the current picture and the previously decoded picture 231 may be part of or form a sequence of pictures that form a video sequence.
[0131] The encoder 20 may be configured to, for example, select a reference block from multiple reference blocks of the same picture or different pictures of multiple other pictures, and provide the reference picture (or reference picture index) and / or an offset (spatial offset) between the position (x, y coordinates) of the reference block and the position of the current block as an inter-prediction parameter to the motion estimation unit, where the offset is also called a motion vector (MV).
[0132] The motion compensation unit is configured to obtain, e.g., receive, inter prediction parameters, and perform inter prediction based on or using the inter prediction parameters to obtain inter prediction block 265. The motion compensation performed by the motion compensation unit may involve fetching or generating a predictive block based on a motion / block vector determined by motion estimation, possibly performing interpolation to sub-sample accuracy. Interpolation filtering may generate additional samples from known samples, so that the number of predictive block candidates that can be used to code the picture block may increase. Upon receiving a motion vector for the PU of the current picture block, the motion compensation unit may find the predictive block to which the motion vector points in one of the reference picture lists.
[0133] The motion compensation unit may also generate syntax elements associated with the blocks and video slices for use by video decoder 30 in decoding picture blocks of the video slices. In addition to, or as an alternative to, slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be generated or used.
[0134] Entropy Coding The entropy encoding unit 270 is configured to, for example, apply an entropy encoding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context-adaptive VLC scheme (CAVLC), an arithmetic coding scheme, binarization, context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioned entropy (PIPE) coding, or another entropy encoding method or technique) or bypass (no compression) to the quantized coefficients 209, inter-prediction parameters, intra-prediction parameters, loop filter parameters, and / or other syntax elements to obtain encoded picture data 21, which may be output via output 272, for example, in the form of an encoded bitstream 21, so that, for example, the video decoder 30 may receive and use the parameters for decoding. The encoded bitstream 21 may be transmitted to the video decoder 30 or stored in a memory for later transmission or retrieval by the video decoder 30.
[0135] Other structural variations of the video encoder 20 may be used to encode the video stream. For example, a non-transform-based encoder 20 may quantize the residual signal directly, for some blocks or frames, without the transform processing unit 206. In another implementation, the encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit.
[0136] Decoder and decoding method 3 shows an example of a video decoder 30 configured to implement the techniques of the present application. The video decoder 30 is configured to receive encoded picture data 21 (e.g., encoded bitstream 21), e.g., encoded by encoder 20, to obtain a decoded picture 331. The encoded picture data or bitstream includes information for decoding the encoded picture data, e.g., data representing picture blocks and associated syntax elements of an encoded video slice (and / or tile group or tile).
[0137] In the example of FIG. 3 , the decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., an adder 314), a loop filter 320, and a decoded picture buffer ( DPB 2.) 330, a mode application unit 360, an inter prediction unit 344, and an intra prediction unit 354. The inter prediction unit 344 may be or include a motion compensation unit. The video decoder 30 may, in some examples, perform a decoding path that is generally inverse to the encoding path described with respect to the video encoder 100 from FIG.
[0138] As described with respect to encoder 20, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, loop filter 220, decoded picture buffer (DPB) 230, inter prediction unit 344, and intra prediction unit 354 are also referred to as forming a “built-in decoder” of video encoder 20. Thus, inverse quantization unit 310 may be functionally identical to inverse quantization unit 110, inverse transform processing unit 312 may be functionally identical to inverse transform processing unit 212, reconstruction unit 314 may be functionally identical to reconstruction unit 214, loop filter 320 may be functionally identical to root block 220, and decoded picture buffer 330 may be functionally identical to decoded picture buffer 230. Thus, the descriptions given for the respective units and functions of video encoder 20 apply correspondingly to the respective units and functions of video decoder 30.
[0139] Entropy Decoding The entropy decoding unit 304 is configured to parse the bitstream 21 (or the coded picture data 21 in general) and, for example, perform entropy decoding on the coded picture data 21 to obtain, for example, any or all of the quantized coefficients 309 and / or decoded coding parameters (not shown in FIG. 3), for example, inter prediction parameters (e.g., reference picture indexes and motion vectors), intra prediction parameters (e.g., intra prediction modes or indices), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply a decoding algorithm or scheme corresponding to an encoding scheme such as described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 may further be configured to provide the inter prediction parameters, intra prediction parameters, and / or other syntax elements to the mode application unit 360 and provide other parameters to other units of the decoder 30. The video decoder 30 may receive syntax elements at a video slice level and / or a video block level. In addition to or as an alternative to slices and their respective syntax elements, tile groups and / or tiles and their respective syntax elements may be received and / or used.
[0140] inverse quantization Inverse quantization unit 310 may be configured to receive a quantization parameter (QP) (or, in general, information regarding inverse quantization) and quantized coefficients from encoded picture data 21 (e.g., by parsing and / or decoding, e.g., by entropy decoding unit 304) and apply inverse quantization to the decoded quantized coefficients 309 based on the quantization parameter to obtain dequantized coefficients 311, which may also be referred to as transform coefficients 311. The inverse quantization process may involve use of the quantization parameter determined by video encoder 20 for each video block in a video slice (or tile or tile group) to determine the degree of quantization to be applied, and similarly the degree of inverse quantization.
[0141] Inverse transformation The inverse transform processing unit 312 may be configured to receive the dequantized coefficients 311, also referred to as transform coefficients 311, and apply a transform to the dequantized coefficients 311 to obtain a reconstructed residual block 213 in the sample domain. The reconstructed residual block 213 may also be referred to as a transform block 313. The transform may be an inverse transform, e.g., an inverse DCT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may further be configured to receive transform parameters or corresponding information from the coded picture data 21 (e.g., by analysis and / or decoding, e.g., by the entropy decoding unit 304) to determine a transform to be applied to the dequantized coefficients 311.
[0142] Rebuild The reconstruction unit 314 (e.g., an adder or summer 314) may be configured to add the reconstructed residual block 313 to the prediction block 365 to obtain a reconstructed block 315 in the sample domain, for example, by adding sample values of the reconstructed residual block 313 and sample values of the prediction block 365.
[0143] filtering A loop filter unit 320 (either in the coding loop or after the coding loop) is configured to filter the reconstructed block 315, e.g., to smooth pixel transitions or otherwise improve video quality, to obtain a filtered block 321. The loop filter unit 320 may comprise one or more loop filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, or one or more other filters, e.g., a bilateral filter, an adaptive loop filter (ALF), a sharpening filter, a smoothing filter, or a collaborative filter, or any combination thereof. Although the loop filter unit 320 is shown in FIG. 3 as being a loop filter, in other configurations, the loop filter unit 320 may be implemented as a post-loop filter.
[0144] Decoded Picture Buffer The decoded video blocks 321 of the picture are then stored in a decoded picture buffer 330, which stores the decoded picture 331 as a reference picture for subsequent motion compensation relative to other pictures and / or display at the output, respectively.
[0145] The decoder 30 is arranged to output the decoded pictures 311, for example via an output 312, for presentation to or viewing by a user.
[0146] prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (specifically a motion compensation unit), and the intra prediction unit 354 may be functionally identical to the inter prediction unit 254, and performs the partitioning or partitioning decision and prediction based on the partition and / or prediction parameters or respective information received from the encoded picture data 21 (e.g. by analysis and / or decoding, e.g. by the entropy decoding unit 304). The mode application unit 360 may be configured to perform prediction (intra prediction or inter prediction) for each block based on the reconstructed picture, block, or respective samples (filtered or unfiltered) to obtain a prediction block 365.
[0147] When a video slice is coded as an intra-coded (I) slice, the intra prediction unit 354 of the mode application unit 360 is configured to generate a predictive block 365 for a picture block of the current video slice based on the signaled intra prediction mode and data from a previously decoded block of the current picture. When a video picture is coded as an inter-coded (i.e., B or P) slice, the inter prediction unit 344 (e.g., a motion compensation unit) of the mode application unit 360 is configured to generate a predictive block 365 for a video block of the current video slice based on the motion vector and other syntax elements received from the entropy decoding unit 304. For inter prediction, the predictive block may be generated from one of the reference pictures in one of the reference picture lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using a default construction technique based on the reference pictures stored in the DPB 330. The same or similar may apply to, or by embodiments that use, tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.
[0148] Mode application unit 360 is configured to determine prediction information for video blocks of the current video slice by parsing motion vectors or related information and other syntax elements, and uses the prediction information to generate predictive blocks for the current video block being decoded. For example, mode application unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra prediction or inter prediction) used to code the video blocks of the video slice, an inter prediction slice type (e.g., B slice, P slice, or GPB slice), construction information for one or more of the reference picture lists for the slice, motion vectors for each inter coded video block of the slice, inter prediction status for each inter coded video block of the slice, and other information for decoding video blocks in the current video slice. The same or similar may apply to or by embodiments that use tile groups (e.g., video tile groups) and / or tiles (e.g., video tiles) in addition to or instead of slices (e.g., video slices), e.g., video may be coded using I, P, or B tile groups and / or tiles.
[0149] An embodiment of video decoder 30 as shown in FIG. 3 may be configured to partition and / or decode pictures by using slices (also referred to as video slices), where a picture may be partitioned into or decoded using one or more slices (which typically do not overlap), and each slice may include one or more blocks (e.g., CTUs).
[0150] An embodiment of video decoder 30 as shown in FIG. 3 may be configured to partition and / or decode a picture by using tile groups (also referred to as video tile groups) and / or tiles (also referred to as video tiles), where a picture may be partitioned into or decoded using one or more tile groups (typically non-overlapping), where each tile group may comprise, for example, one or more blocks (e.g., CTUs) or one or more tiles, where each tile may be, for example, rectangular in shape and may comprise one or more blocks (e.g., CTUs), e.g., complete blocks or partial blocks.
[0151] Other variations of the video decoder 30 may be used to decode the encoded picture data 21. For example, the decoder 30 may generate an output video stream without the loop filtering unit 320. For example, the non-transform-based decoder 30 may directly inverse quantize the residual signal for some blocks or frames without the inverse transform processing unit 312. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transform processing unit 312 combined into a single unit.
[0152] It should be understood that in the encoder 20 and the decoder 30, the processing result of the current step may be further processed and then output to the next step. For example, after the interpolation filtering, the motion vector derivation, or the loop filtering, further operations such as cropping or shifting may be performed on the processing result of the interpolation filtering, the motion vector derivation, or the loop filtering.
[0153] Further operations may be applied to the derived motion vector of the current block (including but not limited to control point motion vectors in affine mode, sub-block motion vectors in affine mode, planar mode, ATMVP mode, temporal motion vectors, etc.). For example, the value of the motion vector is constrained to a predetermined range according to the bits representing it. If the bits representing the motion vector are bitDepth, the range is -2^(bitDepth-1) to 2^(bitDepth-1)-1, where "^" means exponent. For example, if bitDepth is set equal to 16, the range is -32768 to 32767, and if bitDepth is set equal to 18, the range is -131072 to 131071. For example, the value of the derived motion vector (e.g., MVs of four 4x4 sub-blocks in one 8x8 block) is constrained such that the maximum difference between the integer parts of the four 4x4 sub-block MVs is not greater than N samples, such as not greater than one sample.
[0154] 4 is a schematic diagram of a video coding device 400 according to an embodiment of the present disclosure. The video coding device 400 is suitable for implementing the disclosed embodiments as described herein. In an embodiment, the video coding device 400 may be a decoder, such as the video decoder 30 of FIG. 1A, or an encoder, such as the video encoder 20 of FIG. 1A.
[0155] Video coding device 400 comprises an ingress port 410 (or input port 410) and a receiver unit (Rx) 420 for receiving data, a processor, logic unit, or central processing unit (CPU) 430 for processing data, a transmitter unit (Tx) 440 and an egress port 450 (or output port 450) for transmitting data, and a memory 460 for storing data. Video coding device 400 may also comprise optical-electrical (OE) and electrical-optical (EO) components coupled to the ingress port 410, receiver unit 420, transmitter unit 440, and egress port 450 for the entry and exit of optical or electrical signals.
[0156] The processor 430 is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multi-core processor), FPGA, ASIC, and DSP. The processor 430 is in communication with the ingress port 410, the receiver unit 420, the transmitter unit 440, the egress port 450, and the memory 460. The processor 430 comprises a coding module 470. The coding module 470 implements the disclosed embodiments described above. For example, the coding module 470 performs, processes, prepares, or provides various coding operations. Thus, the inclusion of the coding module 470 brings about a significant improvement in the functionality of the video coding device 400 and causes the transformation of the video coding device 400 into a different state. Alternatively, the coding module 470 is implemented as instructions stored in the memory 460 and executed by the processor 430.
[0157] The memory 460 may comprise one or more disks, tape drives, and solid state drives, and may be used as an overflow data storage device for storing programs when such programs are selected for execution, and for storing instructions and data read during program execution. The memory 460 may be, for example, volatile and / or non-volatile, and may be read only memory (ROM), random access memory (RAM), ternary content addressable memory (TCAM), and / or static random access memory (SRAM).
[0158] FIG. 5 is a diagram of a 3D printer according to an exemplary embodiment. 1A 5 is a simplified block diagram of an apparatus 500 that may be used as either or both of the source device 12 and the destination device 14 from
[0159] The processor 502 in the device 500 may be a central processing unit. Alternatively, the processor 502 may be any other type of device, or devices, now existing or later developed, capable of manipulating or processing information. Although the disclosed implementations may be practiced with a single processor, such as the processor 502, as shown, benefits in speed and efficiency may be obtained using more than one processor.
[0160] In some implementations, the memory 504 of the apparatus 500 may be a read-only memory (ROM) device or a random access memory (RAM) device. Any other suitable type of storage device may be used as the memory 504. The memory 504 may include code and data 506 that is accessed by the processor 502 using a bus 512. The memory 504 may further include an operating system 508 and application programs 510, which include at least one program that enables the processor 502 to perform the methods described herein. For example, the application programs 510 may include applications 1 through N, which further include a video coding application that performs the methods described herein.
[0161] The apparatus 500 may also include one or more output devices, such as a display 518. The display 518, in one example, may be a touch-sensitive display that combines a display with touch-sensing elements operable to sense touch input. The display 518 may be coupled to the processor 502 via the bus 512.
[0162] Although illustrated here as a single bus, bus 512 of device 500 may be comprised of multiple buses. Additionally, secondary storage 514 may be directly coupled to the other components of device 500 or may be accessed over a network, and may comprise a single integrated unit such as a memory card or multiple units such as multiple memory cards. Thus, device 500 may be implemented in a wide variety of configurations.
[0163] The following first describes the concept of this application.
[0164] 1. Inter prediction mode In HEVC, two inter prediction modes are used: advanced motion vector prediction (AMVP) mode and merge mode.
[0165] In AMVP mode, the coded blocks (denoted as neighboring blocks) that are spatially or temporally adjacent to the current block are scanned first. A motion vector candidate list (which can also be called motion information candidate list) is constructed based on the motion information of the neighboring blocks, and then an optimal motion vector is determined from the motion vector candidate list based on the rate-distortion cost. The motion information candidate with the smallest rate-distortion cost is used as the motion vector predictor (MVP) of the current block. Both the location of the neighboring block and its scanning order are predefined. The rate-distortion cost is calculated according to formula (1), where J represents the rate-distortion cost (RD cost), SAD is the sum of absolute difference (SAD) between the original sample value and the predicted sample value obtained through motion estimation by using the motion vector candidate predictor, R represents the bit rate, and λ represents the Lagrange multiplier. The encoder side conveys the index value of the selected motion vector predictor in the motion vector candidate list and the reference frame index value to the decoder side. Furthermore, a motion search is performed in the neighborhood in the MVP to obtain the actual motion vector of the current block. The encoder transfers the difference between the MVP and the actual motion vector (motion vector differential) to the decoder. J = SAD + λR (1)
[0166] In merge mode, a motion vector candidate list is first constructed based on the motion information of the spatially or temporally neighboring coded blocks of the current block. Then, the best motion information is determined from the motion vector candidate list as the motion information of the current block based on the rate-distortion cost. The index value of the position of the best motion information in the motion vector candidate list (hereinafter denoted as merge index) is conveyed to the decoder side. The spatial and temporal motion information candidates of the current block are shown in FIG. 6. The spatial motion information candidates are from five spatially neighboring blocks (A0, A1, B0, B1, and B2). If a neighboring block is unavailable (the neighboring block does not exist, or the neighboring block is not coded, or the prediction mode used for the neighboring block is not an inter prediction mode), the motion information of this neighboring block is not added to the motion vector candidate list. The temporal motion information candidates of the current block are obtained by scaling the MV of the block at the corresponding position in the reference frame based on the picture order count (POC) of the reference frame and the current frame. It is first determined whether a block at position T in the reference frame is available, and if the block is not available, a block at position C is selected.
[0167] Similar to the AMVP mode, in the merge mode, both the location of the neighboring blocks and their traversal order are also predefined. In addition, the location of the neighboring blocks and their traversal order can be different in different modes.
[0168] It can be seen that a motion vector candidate list (also called a list of candidates, which may be called a candidate list for short) needs to be maintained in both AMVP mode and merge mode. Every time before new motion information is added to the candidate list, it is first checked whether the same motion information is already present in the list. If the same motion information is already present, the motion information is not added to the list. This checking process is called pruning of the motion vector candidate list. Pruning the list is to avoid including the same motion information in the list, thereby avoiding redundant rate distortion cost calculations.
[0169] In inter prediction in HEVC, the same motion information is used for all samples in a coding block, and motion compensation is performed based on the motion information to obtain a predictor for the samples of the coding block. However, not all samples in a coding block have the same motion characteristics. Using the same motion information for a coding block may result in inaccurate motion compensation prediction and more residual information.
[0170] In existing video coding standards, block matching motion estimation based on translational motion model is applied, and the motion of all samples in a block is assumed to be consistent. However, in the real world, there are various motions. Many objects, such as rotating objects, roller coasters rotating in various directions, fireworks, and some stunts in movies, especially moving objects in User Generated Content (UGC) scenarios, have non-translational motion. For these moving objects, if block motion compensation techniques based on translational motion model in existing coding standards are used for coding, the coding efficiency may be greatly affected. Therefore, a non-translational motion model, such as an affine motion model, is introduced to further improve the coding efficiency.
[0171] Based on this, according to different motion models, the AMVP modes may be classified into translational model-based AMVP modes and non-translational model-based AMVP modes (e.g., affine model-based AMVP modes), and the merge modes may be classified into translational model-based merge modes and non-translational model-based merge modes (e.g., affine model-based merge modes).
[0172] 2. Non-translational motion model Prediction based on a non-translational motion model refers to the fact that the same motion model is used for both the encoder side and the decoder side to derive the motion information of each sub-block in the current block (also called sub-motion compensation unit or basic motion compensation unit), and motion compensation is performed based on the motion information of the sub-block to obtain a prediction block, thereby improving prediction efficiency. Common non-translational motion models include a four-parameter affine motion model and a six-parameter affine motion model.
[0173] A sub-motion compensation unit (also called a sub-block) in this embodiment of the present application is a set of samples or N 1 ×N 2 The sample block may be N 1 and N 2 are positive integers, and N 1 is N 2 or N 2 It does not have to be equal to .
[0174] The four-parameter affine motion model is expressed as equation (2).
[0175]
number
[0176] A four-parameter affine motion model can be represented by a motion vector of two samples and their coordinates relative to the top-left sample of the current block. The samples used to represent the motion model parameters are called control points. sample (0,0) and the top right sample If (W,0) is used as the control point, the left of the current block Above Control point and right Above The motion vectors (vx0, vy0) and (vx1, vy1) of each of the control points are first determined. Then, the motion information of each sub-motion compensation unit of the current block is obtained according to formula (3), where (x, y) is the coordinate of the sub-motion compensation unit relative to the top-left sample of the current block (such as the coordinate of the top-left sample), and W represents the width of the current block. It should be understood that other control points may be used instead. For example, samples at positions (2, 2) and (W+2, 2), or (-2, -2) and (W-2, -2) may be used as control points. The selection of the control points is not limited by the examples listed in this specification.
[0177]
number
[0178] The six-parameter affine motion model is expressed as Equation (4).
[0179]
number
[0180] A six-parameter affine motion model can be represented by motion vectors of three samples and their coordinates relative to the top-left sample of the current block. If the top-left sample (0,0), the top-right sample (W,0), and the bottom-left sample (0,H) of the current block are used as control points, then the left Above Control point, right Above Control point, and left BelowThe motion vectors (vx0, vy0), (vx1, vy1), and (vx2, vy2) of each of the control points are first determined. Then, the motion information of each sub-motion compensation unit of the current block is obtained according to equation (5), where (x, y) is the coordinate of the sub-motion compensation unit relative to the top-left sample of the current block, and W and H respectively represent the width and height of the current block. It should be understood that other control points may be used instead. For example, samples at positions (2, 2), (W+2, 2), and (2, H+2), or (-2, -2), (W-2, -2), and (-2, H-2) may be used as control points. These examples are not limiting.
[0181]
number
[0182] A coding block that is predicted by using an affine motion model is called an affine-coded block.
[0183] In general, motion information of control points of an affine coded block may be obtained by using an affine motion model based advanced motion vector prediction (AMVP) mode or an affine motion model based merge mode.
[0184] The motion information of the control points of the current coding block may be obtained by using an inherited control point motion vector prediction method or a constructed control point motion vector prediction method.
[0185] 3. Inherited control point motion vector prediction method The inherited control point motion vector prediction method refers to using the motion models of neighboring coded affine coded blocks to determine the control point motion vector candidates of the current block.
[0186] The current block shown in FIG. 7 is used as an example. To find the affine coded block in which the block in the neighboring position of the current block is located and obtain the control point motion information of the affine coded block, the blocks in the neighboring positions around the current block are scanned in a specified order, for example, in the order of A1→B1→B0→A0→B2. Furthermore, the control point motion vector (for merge mode) or the control point motion vector predictor (for AMVP mode) of the current block is derived by using a motion model that is constructed based on the control point motion information of the affine coded block. The order A1→B1→B0→A0→B2 mentioned above is only used as an example and should not be construed as limiting. Another order may also be used. In addition, the blocks in the neighboring positions are not limited to A1, B1, B0, A0, and B2, and various blocks in the neighboring positions may be used.
[0187] The blocks at adjacent locations are samples or sample blocks of a predefined size that are obtained based on a particular partitioning method. It is possible For example, the sample blocks may be 4×4 sample blocks, 4×2 sample blocks, or sample blocks of another size. These block sizes are for illustration purposes and should not be construed as limiting.
[0188] The following describes the decision process by using A1 as an example, and similar processes can be used for other cases.
[0189] As shown in FIG. 7, if the coding block in which A1 is located is a four-parameter affine coded block, the upper left sample (x4,y4) motion vector (vx4,vy4) and upper right sample A motion vector (vx5,vy5) is obtained for (x5,y5). The upper left corner of the current affine coded block sampleThe motion vector (vx0,vy0) for (x0,y0) is calculated according to equation (6) and is located to the upper right of the current affine coded block. sample The motion vector (vx1, vy1) for (x1, y1) is calculated according to equation (7).
[0190]
number
[0191] The top left corner of the current block obtained based on the affine coded block in which A1 is located. sample Motion vector (vx0,vy0) at (x0,y0) and upper right sample The combination of (x1,y1) and the motion vector (vx1,vy1) is the control point motion vector candidate for the current block.
[0192] If the coding block in which A1 is located is a 6-parameter affine coded block, the upper left corner of the affine coded block sample Motion vector (vx4,vy4) for (x4,y4), top right sample Motion vector (vx5,vy5) at (x5,y5) and bottom left sample The motion vector (vx6,vy6) for (x6,y6) is obtained. sample The motion vector (vx0,vy0) for (x0,y0) is calculated according to equation (8). sample The motion vector (vx1,vy1) for (x1,y1) is calculated according to equation (9). sample The motion vector (vx2, vy2) for (x2, y2) is calculated according to equation (10).
[0193]
number
[0194] The top left corner of the current block obtained based on the affine coded block in which A1 is located. sampleMotion vector (vx0,vy0) for (x0,y0), top right sample (x1,y1) motion vector (vx1,vy1), and the bottom left sample The combination of (x2, y2) motion vector (vx2, vy2) is the control point motion vector candidate for the current block.
[0195] It should be noted that other motion models, location candidates, and search and scan orders are also applicable to the present application, and details will not be described in this embodiment of the present application.
[0196] It should be noted that other methods in which control points are used to represent the motion models of the neighboring coding blocks and the current coding block are also applicable to the present application, and will not be described in detail herein.
[0197] 4. Constructed control point motion vector prediction method 1 The constructed control point motion vector prediction method refers to combining the motion vectors of neighboring coded blocks around the control points of the current block as the control point motion vector of the current affine coded block, without considering whether those neighboring coded blocks are affine coded blocks or not.
[0198] Top left of the current block sample and top right sample The motion vector of is determined by using the motion information of the neighboring coded blocks around the current coding block. Figure 8A is used as an example to explain the constructed control point motion vector prediction method. Please note that Figure 8A is only an example and should not be construed as limiting.
[0199] As shown in FIG. 8A, the upper left sample The motion vectors of the neighboring coded blocks A2, B2, and B3 are sample The motion vectors in the upper right corner are used as candidate motion vectors for sampleThe motion vectors of the neighboring coded blocks B1 and B0 are sample The vectors are used as candidate motion vectors for the sample and top right sample The motion vector candidates of are combined to form a number of 2-tuples. The motion vectors of the two coded blocks included in the 2-tuples can be used as control point motion vector candidates of the current block, as shown in the following equation (11A). {vA2,vB1},{vA2,vB0},{vB2,vB1},{vB2,vB0},{vB3,vB1},{vB3,vB0} (11A) Here, vA2 represents the motion vector of A2, vB1 represents the motion vector of B1, vB0 represents the motion vector of B0, vB2 represents the motion vector of B2, and vB3 represents the motion vector of B3.
[0200] As shown in FIG. 8A, the upper left sample The motion vectors of the neighboring coded blocks A2, B2, and B3 are sample The motion vectors in the upper right corner are used as candidate motion vectors for sample The motion vectors of the neighboring coded blocks B1 and B0 are sample The motion vectors of the bottom left are used as candidate motion vectors for sample The motion vectors of the neighboring coded blocks A0 and A1 are sample The vectors are used as candidate motion vectors for the sample , top right sample , and bottom left sample The motion vector candidates of are combined to form a 3-tuple. The motion vectors of the three coded blocks included in the 3-tuple can be used as control point motion vector candidates of the current block, as shown in the following equations (11B) and (11C). {vA2,vB1,vA0},{vA2,vB0,vA0},{vB2,vB1,vA0},{vB2,vB0,vA0},{vB3,vB1,vA0},{vB3,vB0,vA0} (11B) {vA2,vB1,vA1},{vA2,vB0,vA1},{vB2,vB1,vA1},{vB2,vB0,vA1},{vB3,vB1,vA1},{vB3,vB0,vA1} (11C) Here, vA2 represents the motion vector of A2, vB1 represents the motion vector of B1, vB0 represents the motion vector of B0, vB2 represents the motion vector of B2, vB3 represents the motion vector of B3, vA0 represents the motion vector of A0, and vA1 represents the motion vector of A1.
[0201] It should be noted that other methods for combining control point motion vectors are also applicable to this application, and will not be described in detail here.
[0202] It should be noted that other methods in which control points are used to represent the motion models of the neighboring coding blocks and the current coding block are also applicable to the present application, and will not be described in detail herein.
[0203] 5. Constructed control points motion vector prediction method 2 as shown in FIG. 8B: Step 501: Obtain the motion information of the control points of the current block.
[0204] For example, in FIG. k (k=1,2,3,4) represents the kth control point. A0, A1, A2, B0, B1, B2, and B3 are spatially adjacent positions of the current block and are used to predict CP1, CP2, or CP3, and T is a temporally adjacent position of the current block and is used to predict CP4.
[0205] The coordinates of CP1, CP2, CP3, and CP4 are assumed to be (0,0), (W,0), (H,0), and (W,H), respectively, where W and H represent the width and height of the current block.
[0206] For each control point, its motion information is obtained in the following order:
[0207] (1) For CP1, the checking order is B2→A2→B3. If B2 is available, the motion information of B2 is used for CP1; otherwise, A2 and B3 are checked in order. If the motion information of all three positions is unavailable, the motion information of CP1 cannot be obtained.
[0208] (2) For CP2, the checking order is B0→B1. If B0 is available, the motion information of B0 is used for CP2; otherwise, B1 is checked. If the motion information of both positions is unavailable, the motion information of CP2 cannot be obtained.
[0209] (3) For CP3, the checking order is A0→A1. If A0 is available, the motion information of A0 is used for CP3; otherwise, A1 is checked. If the motion information of both positions is unavailable, the motion information of CP3 cannot be obtained.
[0210] (4) For CP4, the motion information of T is used.
[0211] In this specification, X is available means that block X (e.g., A0, A1, A2, B0, B1, B2, B3, or T) has already been coded and an inter prediction mode is used. Otherwise, X is unavailable.
[0212] It should be noted that other methods for obtaining the motion information of the control points are also applicable to the present application, and will not be described in detail herein.
[0213] Step 502: Combine the motion information of the control points to obtain constructed control point motion information.
[0214] To construct a four-parameter affine motion model, the motion information of two control points is combined to form a 2-tuple. The combinations of motion information of two control points can be {CP1,CP4}, {CP2,CP3}, {CP1,CP2}, {CP2,CP4}, {CP1,CP3}, and {CP3,CP4}. For example, a four-parameter affine motion model constructed by using a 2-tuple including the motion information of control points CP1 and CP2 can be denoted as Affine(CP1,CP2).
[0215] To construct a six-parameter affine motion model, the motion information of three control points is combined to form a 3-tuple. The combinations of the motion information of three control points may be {CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, and {CP1, CP3, CP4}. For example, a six-parameter affine motion model constructed by using a 3-tuple including the motion information of control points CP1, CP2, and CP3 may be denoted as Affine(CP1, CP2, CP3).
[0216] To construct an 8-parameter bilinear motion model, the motion information of the four control points is combined to form a 4-tuple. The 8-parameter bilinear motion model constructed by using a 4-tuple including the motion information of the control points CP1, CP2, CP3, and CP4 can be denoted as Bilinear(CP1,CP2,CP3,CP4).
[0217] In this embodiment of the application, for simplicity of explanation, a combination of motion information for two control points (or two coded blocks) is simply referred to as a 2-tuple, a combination of motion information for three control points (or three coded blocks) is simply referred to as a 3-tuple, and a combination of motion information for four control points (or four coded blocks) is simply referred to as a 4-tuple.
[0218] These models are scanned in a preset order. If the motion information of the control points corresponding to the combined model is unavailable, the model is considered unavailable. Otherwise, the reference frame index of the model is determined and the control point motion vectors are scaled. If the motion information of all the control points after scaling is consistent, the model is invalid. If the motion information of all the control points that control the model is available and the model is valid, the motion information of the control points that construct the model is added to the motion information candidate list.
[0219] The control point motion vector scaling method is shown in equation (12).
[0220]
number
[0221] where CurPoc represents the POC number of the current frame, DesPoc represents the POC number of the reference frame of the current block, SrcPoc represents the POC number of the reference frame of the control point, and MV s represents the motion vector obtained after scaling, and MV represents the motion vector of the control point.
[0222] Note that a combination of different control points can be transformed into a control point at the same location.
[0223] For example, a four-parameter affine motion model obtained through combinations {CP1,CP4}, {CP2,CP3}, {CP2,CP4}, {CP1,CP3}, or {CP3,CP4} is converted into a representation by {CP1,CP2} or {CP1,CP2,CP3}. The conversion method includes substituting the motion vector and coordinate information of the control points {CP1,CP4}, {CP2,CP3}, {CP2,CP4}, {CP1,CP3}, or {CP3,CP4} into equation (2) to obtain model parameters, and substituting the coordinate information of {CP1,CP2} into equation (3) to obtain the motion vector of the control point {CP1,CP2}.
[0224] More directly, the transformation may be performed according to the following equations (13) to (21), where W represents the width of the current block and H represents the height of the current block. In equations (13) to (21), (vx 0 ,vy 0 ) represents the motion vector of CP1, and (vx 1 ,vy 1 ) represents the motion vector of CP2, and (vx 2 ,vy 2 ) represents the motion vector of CP3, and (vx 3 ,vy 3 ) represents the motion vector of CP4.
[0225] {CP1, CP2} can be transformed into {CP1, CP2, CP3} by using the following equation (13): In other words, the motion vector of CP3 in {CP1, CP2, CP3} can be determined by using equation (13).
[0226]
number
[0227] {CP1,CP3} can be converted to {CP1,CP2} or {CP1,CP2,CP3} by using the following equation (14):
[0228]
number
[0229] {CP2,CP3} can be converted to {CP1,CP2} or {CP1,CP2,CP3} by using the following equation (15):
[0230]
number
[0231] {CP1,CP4} can be converted to {CP1,CP2} or {CP1,CP2,CP3} by using the following equations (16) or (17):
[0232]
number
[0233] {CP2, CP4} may be converted to {CP1, CP2} by using equation (18) below, and {CP2, CP4} may be converted to {CP1, CP2, CP3} by using equations (18) and (19) below.
[0234]
number
[0235] {CP3,CP4} may be converted to {CP1,CP2} by using the following equation (20), and {CP3,CP4} may be converted to {CP1,CP2,CP3} by using the following equations (20) and (21).
[0236]
number
[0237] For example, a six-parameter affine motion model obtained through combinations {CP1, CP2, CP4}, {CP2, CP3, CP4}, or {CP1, CP3, CP4} can be converted to a representation by {CP1, CP2, CP3}. The conversion method includes substituting the motion vectors and coordinate information of the control points {CP1, CP2, CP4}, {CP2, CP3, CP4}, or {CP1, CP3, CP4} into equation (4) to obtain model parameters, and substituting the coordinate information of {CP1, CP2, CP3} into equation (5) to obtain the motion vectors of {CP1, CP2, CP3}.
[0238] More directly, the transformation may be performed according to the following equations (22) to (24), where W represents the width of the current block and H represents the height of the current block. 0 ,vy 0 ) represents the motion vector of CP1, and (vx 1 ,vy 1 ) represents the motion vector of CP2, and (vx 2 ,vy 2 ) represents the motion vector of CP3, and (vx 3 ,vy 3 ) represents the motion vector of CP4.
[0239] {CP1,CP2,CP4} can be converted to {CP1,CP2,CP3} by using the following equation (22):
[0240]
number
[0241] {CP2,CP3,CP4} can be converted to {CP1,CP2,CP3} by using the following equation (23):
[0242]
number
[0243] {CP1,CP3,CP4} can be converted to {CP1,CP2,CP3} by using the following equation (24):
[0244]
number
[0245] 6. Affine motion model based advanced motion vector prediction mode (Affine AMVP mode) (1) Building a list of motion vector candidates The motion vector candidate list for the affine motion model-based AMVP mode is constructed by using the inherited control point motion vector prediction method and / or constructed control point motion vector prediction method described above. In this embodiment of the present application, the motion vector candidate list for the affine motion model-based AMVP mode may be referred to as a control point motion vector predictor candidate list. The motion vector predictor of each control point includes two (four-parameter affine motion model) control point motion vectors or three (six-parameter affine motion model) control point motion vectors.
[0246] Optionally, the control point motion vector predictor candidate list may be pruned and sorted according to certain rules and truncated or padded to contain a certain amount of control point motion vector predictor candidates.
[0247] (2) Determining the optimal control point motion vector predictor candidate At the encoder side, the motion vector of each sub-motion compensation unit in the current coding block is obtained based on each control point motion vector predictor candidate (e.g., X-tuple candidate) in the control point motion vector predictor candidate list by using formula (3) or (5). The obtained motion vector can be used to obtain a sample value at a corresponding position in a reference frame pointed to by the motion vector of the sub-motion compensation unit. The sample value is used as a predictor for performing motion compensation using an affine motion model. The average difference between the original value and the predicted value of each sample in the current coding block is calculated. The control point motion vector predictor candidate corresponding to the smallest average difference is selected as the optimal control point motion vector predictor candidate and is used as the motion vector predictor of two or three control points of the current coding block. An index number representing the position of the optimal control point motion vector predictor candidate (e.g., X-tuple candidate) in the control point motion vector predictor candidate list is coded into a bitstream and transmitted to a decoder.
[0248] At the decoder side, the index number is analyzed, and a control point motion vector predictor (CPMVP) (eg, an X-tuple candidate) is determined from the control point motion vector predictor candidate list based on the index number.
[0249] (3) Determination of control point motion vectors At the encoder side, the control point motion vector predictor is used as a search starting point for motion search within a certain search range to obtain a control point motion vector (CPMV). The difference between each control point motion vector and the control point motion vector predictor (control point motion vector differential, CPMVD) is transmitted to the decoder side.
[0250] At the decoder side, the control point motion vector differentials are obtained by parsing the bitstream and added to the respective control point motion vector predictors to obtain the respective control point motion vectors.
[0251] 7. Affine Merge Mode The control point motion vector merging candidate list is constructed by using the inherited control point motion vector prediction method and / or the constructed control point motion vector prediction method described above.
[0252] Optionally, the control point motion vector merge candidate list may be pruned and sorted according to certain rules, truncated or padded to a certain amount.
[0253] At the encoder side, each sub-motion compensation unit (samples or N samples obtained based on a specific partitioning method) in the current coding block is 1 ×N 2 A motion vector of a sample block (a sample block) is obtained based on each control point motion vector candidate (e.g., X-tuple candidate) in the merge candidate list by using equation (3) or (5). The obtained motion vector may be used to obtain sample values at the positions in the reference frame pointed to by the motion vector of each sub-motion compensation unit. These sample values are used as predicted sample values to perform affine motion compensation. An average difference between the original value and the predicted value of each sample in the current coding block is calculated. The control point motion vector (CPMV) candidate (e.g., 2-tuple candidate or 3-tuple candidate) corresponding to the smallest average difference is selected as the motion vector of two or three control points of the current coding block. An index number representing the position of the control point motion vector in the candidate list is coded into a video bitstream and transmitted to a decoder.
[0254] At the decoder side, the index number is analyzed, and a control point motion vector (CPMV) is determined from the control point motion vector merge candidate list based on the index number.
[0255] In addition, it should be noted that in this application, "at least one" means one or more, and "multiple" means at least two. The term "and / or" describes a correlation for describing related entities and represents that three relationships may exist. For example, A and / or B may represent the following cases: only A is present, both A and B are present, and only B is present, where A and B may be singular or plural. The character " / " generally indicates an "or" relationship between related entities. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or multiple items. For example, at least one of a, b, or c may represent a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c may be singular or plural.
[0256] In the present application, when an inter prediction mode is used to decode the current block, a syntax element may be used to signal the inter prediction mode.
[0257] For some currently used syntax structures of inter prediction modes used to parse the current block, see Table 1, in which some syntax for inter prediction modes is listed. Alternatively, syntax elements in the syntax structures may be represented by other identifiers.
[0258] [Table 1A]
[0259] [Table 1B]
[0260] In Table 1, inter_affine_flag[x0][y0] equal to 1 specifies that, for the current coding unit, affine model-based motion compensation is used to generate predicted samples for the current coding unit when decoding a P or B tile group. inter_affine_flag[x0][y0] equal to 0 specifies that the coding unit is not predicted by affine model-based motion compensation. When inter_affine_flag[x0][y0] is not present, it is inferred to be equal to 0.
[0261] inter_pred_idc[x0][y0] specifies whether list0, list1, or bi-prediction is used for the current coding unit according to Table 2. The array indexes x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.
[0262] When inter_pred_idc[x0][y0] is not present, it is inferred to be equal to PRED_L0.
[0263] [Table 2]
[0264] sps_affine_enabled_flag specifies whether affine model-based motion compensation may be used for inter prediction. If sps_affine_enabled_flag is equal to 0, the syntax shall be constrained such that affine model-based motion compensation is not used in the CVS and inter_affine_flag and cu_affine_type_flag are not present in the coding unit syntax of the CVS. Otherwise (sps_affine_enabled_flag is equal to 1), affine model-based motion compensation may be used in the CVS.
[0265] The syntax element inter_affine_flag[x0][y0] (or affine_inter_flag[x0][y0]) may be used to indicate whether an affine motion model-based AMVP mode is used for the current block when the slice in which the current block is located is a P type slice or a B type slice. When this syntax element does not appear in the bitstream, the syntax element is 0 by default. For example, inter_affine_flag[x0][y0]=1 indicates that an affine motion model-based AMVP mode is used for the current block, and inter_affine_flag[x0][y0]=0 indicates that an affine motion model-based AMVP mode is not used for the current block, and a translational motion model-based AMVP mode may be used. That is, inter_affine_flag[x0][y0] equal to 1 specifies that, for the current coding unit, affine model-based motion compensation is used to generate a prediction sample of the current coding unit when decoding a P or B tile group. inter_affine_flag[x0][y0] equal to 0 specifies that the coding unit is not predicted by affine model-based motion compensation. When inter_affine_flag[x0][y0] is not present, it is inferred to be equal to 0.
[0266] The syntax element cu_affine_type_flag[x0][y0] may be used to indicate whether a 6-parameter affine motion model is used to perform motion compensation for the current block when the slice in which the current block is located is a P type slice or a B type slice. cu_affine_type_flag[x0][y0]=0 indicates that a 6-parameter affine motion model is not used to perform motion compensation for the current block, and only a 4-parameter affine motion model may be used to perform motion compensation, and cu_affine_type_flag[x0][y0]=1 indicates that a 6-parameter affine motion model is used to perform motion compensation for the current block. That is, cu_affine_type_flag[x0][y0] equal to 1 specifies that, for a current coding unit, a 6-parameter affine model-based motion compensation is used to generate a prediction sample of the current coding unit when decoding a P or B tile group. cu_affine_type_flag[x0][y0] equal to 0 specifies that a four-parameter affine model-based motion compensation is used to generate the prediction samples for the current coding unit.
[0267] As shown in Table 3, MotionModelIdc[x0][y0]=1 indicates that a four-parameter affine motion model is used, MotionModelIdc[x0][y0]=2 indicates that a six-parameter affine motion model is used, and MotionModelIdc[x0][y0]=0 indicates that a translational motion model is used.
[0268] [Table 3]
[0269] The variables MaxNumMergeCand and MaxAffineNumMrgCand are used to represent the maximum list length and indicate the maximum length of the constructed motion vector candidate list. inter_pred_idc[x0][y0] is used to indicate the prediction direction. PRED_L1 is used to indicate backward prediction. num_ref_idx_l0_active_minus1 indicates the number of reference frames in the forward reference frame list and ref_idx_l0[x0][y0] indicates the forward reference frame index value of the current block. mvd_coding(x0, y0, 0, 0) indicates the first motion vector differential. mvp_l0_flag[x0][y0] indicates the forward MVP candidate list index value. PRED_L0 indicates forward prediction. num_ref_idx_l1_active_minus1 indicates the number of reference frames in the backward reference frame list. ref_idx_l1[x0][y0] indicates the backward reference frame index value of the current block, and mvp_l1_flag[x0][y0] indicates the backward MVP candidate list index value.
[0270] In Table 1, ae(v) represents a syntax element that is encoded by using context-based adaptive binary arithmetic coding (cabac).
[0271] FIG. 9A is a flow chart illustrating a process of a decoding method according to an embodiment of the present application. The process may be performed by an inter-prediction unit 344 of a video decoder 30. The process is described as a series of steps or operations. It should be understood that the process may be performed in various orders and / or simultaneously, and is not limited to the order of execution shown in FIG. 9A. It is assumed that the video decoder is utilized to decode a video data stream having multiple video frames by using a process including the inter-prediction process shown in FIG. 9A.
[0272] Step 601: Parse the bitstream based on the syntax structure shown in Table 1 to determine the inter prediction mode of the current block.
[0273] If it is determined that the inter prediction mode of the current block is an affine motion model based AMVP mode, perform step 602a.
[0274] For example, the syntax elements merge_flag=0 and inter_affine_flag=1 indicate that the inter prediction mode of the current block is the affine motion model based AMVP mode.
[0275] If it is determined that the inter prediction mode of the current block is the affine motion model based merge mode, perform step 602b.
[0276] For example, the syntax elements merge_flag=1 and inter_affine_flag=1 indicate that the inter prediction mode of the current block is the affine motion model based merge mode.
[0277] Step 602a: Construct a motion vector candidate list corresponding to the affine motion model based AMVP mode.
[0278] One or more control point motion vector candidates (e.g., one or more X-tuple candidates) for the current block may be derived by using the inherited control point motion vector prediction method and / or the constructed control point motion vector prediction method. These control point motion vector candidates may be added to a motion vector candidate list.
[0279] The motion vector candidate list may include a 2-tuple list (a 4-parameter affine motion model is used for the current coding block) or a 3-tuple list. The 2-tuple list includes one or more 2-tuples used to build a 4-parameter affine motion model. The 3-tuple list includes one or more 3-tuples used to build a 6-parameter affine motion model. It can be understood that each 2-tuple candidate includes two control point motion vector candidates for the current block.
[0280] Optionally, the 2-tuple / 3-tuple list of candidate motion vectors may be pruned and sorted according to certain rules, and truncated or padded to contain a certain amount of 2-tuples or 3-tuples.
[0281] A1: A process of building a motion vector candidate list by using an inherited control point motion vector prediction method is described.
[0282] FIG. 7 is used as an example. In this example, an affine-coded block including a block in the neighboring position of the current block is found, and the control of the affine-coded block is calculated. point To obtain the motion information, the blocks in the neighboring positions around the current block are scanned in the order of A1→B1→B0→A0→B2. The control point motion information of the affine coded blocks can be utilized to build a motion model and derive control point motion information candidates for the current block. Details of this process are given above in the description of the inherited control point motion vector prediction method in 3.
[0283] In one example, the affine motion model used for the current block is a four-parameter affine motion model (i.e., MotionModelIdc=1). In this example, if the four-parameter affine motion model is used for an adjacent affine-decoded block, the motion vectors of two control points of the affine-decoded block are obtained: the motion vector (vx4,vy4) of the upper-left control point (x4,y4) and the motion vector (vx5,vy5) of the upper-right control point (x5,y5). The affine-decoded block is an affine-coded block that is predicted in the encoding stage by using the affine motion model.
[0284] The motion vectors of the two control points of the current block, i.e., the top-left and top-right control points, are derived according to equations (6) and (7) of the four-parameter affine motion model, respectively, by using a four-parameter affine motion model that includes the two control points of the adjacent affine-decoded blocks.
[0285] When a six-parameter affine motion model is used for adjacent affine decoded blocks, motion vectors of three control points of the adjacent affine decoded blocks are obtained, for example, the motion vector (vx4, vy4) of the upper left control point (x4, y4), the motion vector (vx5, vy5) of the upper right control point (x5, y5), and the motion vector (vx6, vy6) of the lower left control point (x6, y6) in Figure 7.
[0286] The motion vectors of the two control points of the current block, i.e., the top-left and top-right control points, are derived according to equations (8) and (9) of the six-parameter affine motion model, respectively, by using a six-parameter affine motion model that includes the three control points of the adjacent affine-decoded blocks.
[0287] In another example, the affine motion model used for the current decoded block is a six-parameter affine motion model (ie, MotionModelIdc=2).
[0288] When the affine motion model used for the adjacent affine decoding block is a six-parameter affine motion model, the motion vectors of three control points of the adjacent affine decoding block are obtained, for example, the motion vector (vx4, vy4) of the upper left control point (x4, y4), the motion vector (vx5, vy5) of the upper right control point (x5, y6), and the motion vector (vx6, vy6) of the lower left control point (x6, y6) in Figure 7.
[0289] The motion vectors of the three control points of the current block, i.e., the top-left, top-right, and bottom-left control points, are derived according to equations (8), (9), and (10), respectively, which correspond to the six-parameter affine motion model, by using a six-parameter affine motion model that includes the three control points of the adjacent affine-decoded blocks.
[0290] If the affine motion model used for the adjacent affine decoded blocks is a four-parameter affine motion model, the motion vectors of two control points of the adjacent affine decoded blocks may be obtained, which may be, for example, the motion vector (vx4,vy4) of the top-left control point (x4,y4) and the motion vector (vx5,vy5) of the top-right control point (x5,y5).
[0291] Motion vectors of three control points, such as the top-left, top-right, and bottom-left control points of the current block, may be derived. For example, these motion vectors may be derived according to equations (6) and (7) of the four-parameter affine motion model by using a four-parameter affine motion model represented based on two control points of adjacent affine-decoded blocks.
[0292] It should be noted that other motion models, position candidates, and search orders may also be utilized herein. Furthermore, methods for expressing the motion models of neighboring coding blocks and the current coding block based on other control points may also be used.
[0293] A2: A process of constructing a motion vector candidate list by using the constructed control point motion vector prediction method is described.
[0294] In one example, the affine motion model used for the current decoded block is a four-parameter affine motion model (i.e., MotionModelIdc=1). sample and top right sample The motion vector of is determined based on the motion information of the neighboring coded blocks of the current coding block. Specifically, the motion vector candidate list may be constructed by using the constructed control point motion vector prediction method 1 described above with respect to item 4, or the constructed control point motion vector prediction method 2 described above with respect to item 5.
[0295] In another example, the affine motion model used for the current decoded block is a 6-parameter affine motion model (i.e., MotionModelIdc=2). sample , top right sample , and bottom left sample The motion vector of is determined by using the motion information of the neighboring coded blocks of the current coding block. Specifically, the motion vector candidate list is determined by the constructed control point motion vector prediction method 1 described above with respect to item 4, or the motion vector of 5 The control point motion vector prediction method 2 may be constructed by using the constructed control point motion vector prediction method 2 described above with respect to the control point motion vector prediction method 2.
[0296] It should be noted that other combinations of control point motion information may also be utilized.
[0297] Step 603a: Analyze the bitstream and determine the best control point motion vector predictors (ie, best multi-tuple candidates).
[0298] B1: If the affine motion model used for the current decoded block is a four-parameter affine motion model (MotionModelIdc=1), the index number is parsed from the bitstream, and the optimal motion vector predictor for the two control points is determined from the motion vector candidate list based on the index number.
[0299] For example, the index number is mvp_l0_flag or mvp_l1_flag.
[0300] B2: If the affine motion model used for the current decoded block is a 6-parameter affine motion model (MotionModelIdc=2), the index number is parsed from the bitstream, and the optimal motion vector predictor for the three control points is determined from the motion vector candidate list based on the index number.
[0301] Step 604a: Analyze the bitstream to determine control point motion vectors.
[0302] C1: If the affine motion model used for the current decoded block is a four-parameter affine motion model (MotionModelIdc=1), the motion vector differentials of the two control points of the current block are obtained by decoding the bitstream respectively. Then, the motion vector values of the two control points are obtained based on the motion vector differentials of the control points and the corresponding motion vector predictors. Using forward prediction as an example, the motion vector differentials of the two control points are mvd_coding(x0,y0,0,0) and mvd_coding(x0,y0,0,1) respectively.
[0303] For example, the motion vector differentials for the top-left and top-right control points are obtained by decoding the bitstream and added to the respective motion vector predictors to obtain the motion vectors for the top-left and top-right control points of the current block.
[0304] C2: The affine motion model used for the current decoded block is a 6-parameter affine motion model (MotionModelIdc=2).
[0305] The motion vector differentials of three control points of the current block are obtained by decoding the bitstream. The motion vector values of these control points are obtained based on the motion vector differentials of the control points and their respective motion vector predictors. Taking forward prediction (i.e., list 0) as an example, the motion vector differentials of the three control points are mvd_coding(x0,y0,0,0), mvd_coding(x0,y0,0,1), and mvd_coding(x0,y0,0,2), respectively.
[0306] For example, motion vector differentials for the top-left, top-right, and bottom-left control points are obtained by decoding the bitstream, and are added to the respective motion vector predictors to obtain motion vectors for the top-left, top-right, and bottom-left control points of the current block.
[0307] Step 605a: Obtain a motion vector for each sub-block in the current block according to the control point motion information and the affine motion model used for the current decoded block.
[0308] A subblock in the current affine decoding block may be equivalent to one motion compensation unit, and the width and height of the subblock are less than the width and height of the current block. The motion information of a sample at a preset position in the subblock or motion compensation unit may be used to represent the motion information of all samples in the subblock or motion compensation unit. Assuming that the size of the motion compensation unit is M×N, the sample at the preset position may be the center sample (M / 2, N / 2), the top-left sample (0, 0), the top-right sample (M-1, 0), or a sample at another position in the motion compensation unit. The following description uses the center sample of the motion compensation unit as an example for explanation. Referring to FIG. 9C, V0 represents the motion vector of the top-left control point, and V1 represents the motion vector of the top-right control point. Each small box represents one motion compensation unit.
[0309] Left in the current affine decoding block Top The coordinates of the center sample of the (i,j)th motion compensation unit relative to the current affine decoding block sample are calculated according to equation (25), where i denotes the ith motion compensation unit in the horizontal direction (from left to right), j denotes the jth motion compensation unit in the vertical direction (from top to bottom), and (x(i,j), y(i,j)) denotes the coordinates of the center sample of the (i,j)th motion compensation unit relative to the top-left control point sample in the current affine decoding block.
[0310] If the affine motion model used for the current affine decoded block is a six-parameter affine motion model, then each motion compensation unit (vx (i,j) ,vy (i,j) To get the motion vector of the center sample of (x (i,j) ,y (i,j) ) is replaced by the six-parameter affine motion model equation (26). As discussed above, the motion vector of the center pixel of the motion compensation unit is used as the motion vector of all samples in the motion compensation unit.
[0311] If the affine motion model used for the current affine decoded block is a 4-affine motion model, then each motion compensation unit (vx (i,j) ,vy (i,j) To get the motion vector of the center sample of (x (i,j) , y (i,j) ) is substituted into the four-parameter affine motion model Eq. (27).
[0312]
number
[0313] Step 606a: Perform motion compensation for each sub-block based on the determined motion vector of the sub-block to obtain a predicted sample value of the sub-block.
[0314] As discussed above, if in step 601 it is determined that the inter prediction mode of the current block is the affine motion model based merge mode, step 602b is executed.
[0315] Step 602b: Construct a motion information candidate list corresponding to the affine motion model based merging mode.
[0316] Specifically, a motion information candidate list corresponding to an affine motion model based merge mode may be constructed by using an inherited control point motion vector prediction method and / or a constructed control point motion vector prediction method.
[0317] Optionally, the motion information candidate list may be pruned and sorted according to certain rules, and truncated or padded to contain a certain amount of motion information.
[0318] D1: The process of building a motion vector candidate list by using the inherited control point motion vector prediction method is described.
[0319] The control point motion information candidates of the current block are derived by using the inherited control point motion vector prediction method and added to the motion information candidate list.
[0320] In the example shown in Figure 8A, the blocks in the neighboring positions around the current block are scanned according to the order of A1 → B1 → B0 → A0 → B2 to find the affine coded block where the neighboring block is located and obtain the control point motion information of the affine coded block. Furthermore, the control point motion information candidates of the current block are derived by using the motion model of the current block.
[0321] If the motion vector candidate list is empty, the control point motion information candidate obtained above is added to the candidate list. Otherwise, the motion information in the motion vector candidate list is sequentially scanned to check whether the same motion information as the control point motion information candidate exists in the motion vector candidate list. If the same motion information as the control point motion information candidate does not exist in the motion vector candidate list, the control point motion information candidate is added to the motion vector candidate list.
[0322] Determining whether two motion information candidates are the same may be performed by determining whether the forward (list 0) and backward (list 1) reference frames of the motion information candidates and the horizontal and vertical components of their respective forward and backward motion vectors are the same. Two motion information candidates are considered to be different only when all these elements are different.
[0323] When the amount of motion information in the motion vector candidate list reaches the maximum list length MaxAffineNumMrgCand (MaxAffineNumMrgCand is a positive integer such as 1, 2, 3, 4, or 5, where 5 is used as an example in the following description), the construction of the candidate list is completed. Otherwise, the next neighboring block is scanned.
[0324] D2: The control point motion information candidate of the current block is derived by using the constructed control point motion vector prediction method, and added to the motion information candidate list. Figure 9B shows an example of a flow chart of the constructed control point motion vector prediction method.
[0325] Step 601c: Obtain the motion information of the control points of the current block. This step is similar to step 501 in "5. Constructed control point motion vector prediction method 2". The details are not repeated here.
[0326] Step 602c: Combine the motion information of the control points to obtain constructed control point motion information. This step is similar to step 501 in Fig. 8B, and the details of this step will not be described again here.
[0327] Step 603c: Add the constructed control point motion information to a motion vector candidate list.
[0328] If the length of the candidate list is less than the maximum list length MaxAffineNumMrgCand, the combinations of motion information of the control points are scanned in a preset order, and the obtained valid combinations are used as control point motion information candidates. In this case, if the motion vector candidate list is empty, the control point motion information candidate is added to the motion vector candidate list. Otherwise, the motion information in the motion vector candidate list is sequentially scanned to check whether the same motion information as the control point motion information candidate exists in the motion vector candidate list. If the same motion information as the control point motion information candidate does not exist in the motion vector candidate list, the control point motion information candidate is added to the motion vector candidate list.
[0329] For example, the pre-defined order is: Affine(CP1,CP2,CP3) → Affine(CP1,CP2,CP4) → Affine(CP1,CP3,CP4) → Affine(CP2,CP3,CP4) → Affine(CP1,CP2) → Affine(CP1,CP3) → Affine(CP2,CP3) → Affine(CP1,CP4) → Affine(CP2,CP4) → Affine(CP3,CP4) There are 10 combinations in total.
[0330] If the control point motion information corresponding to a combination is unavailable, the combination is considered unavailable. If the combination is available, the reference frame index of the combination is determined. For two control points, the minimum reference frame index is selected as the reference frame index of the combination. For more than two control points, the reference frame index with the highest occurrence frequency is selected as the reference frame index of the combination. If multiple reference frame indexes have the same occurrence frequency, the minimum reference frame index is selected as the reference frame index. The control point motion vectors are further scaled. If the motion information of all control points after scaling is consistent, the combination is invalid.
[0331] Optionally, in this embodiment of the present application, the motion vector candidate list may be padded. For example, after the above-mentioned scanning process, if the length of the motion vector candidate list is less than the maximum list length MaxAffineNumMrgCand, the motion vector candidate list may be padded until the list length is equal to MaxAffineNumMrgCand.
[0332] The padding can be performed by using a zero motion vector padding method or by combining (e.g., weighted averaging) existing motion information candidates in the existing list. It should be noted that other methods for padding the motion vector candidate list are also applicable to this application.
[0333] Step 603b: Analyze the bitstream to determine optimal control point motion information.
[0334] The index number is analyzed, and the optimal control point motion information is determined from the motion vector candidate list based on the index number.
[0335] Step 604b: Obtain a motion vector for each sub-block in the current block based on the optimal control point motion information and the affine motion model used for the current decoded block.
[0336] This step is similar to step 605a.
[0337] Step 605b: Perform motion compensation for each sub-block based on the determined motion vector of the sub-block to obtain a predicted sample value of the sub-block.
[0338] As described before, after the motion vector of each sub-block is obtained in steps 605a and 604b, the motion compensation for the sub-block is performed in steps 606a and 605b, respectively. That is, the details of performing sub-block-based affine motion compensation for the current sub-block of the affine coded block to obtain the predicted sample value of the current sub-block of the affine coded block are described above. In the conventional design, the size of the sub-block is set to 4×4, that is, the motion compensation is performed for each 4×4 unit by using the respective / different motion vector. In general, the size of the smaller sub-block leads to higher motion compensation calculation complexity and better prediction effect. In order to consider both the motion compensation calculation complexity and the prediction accuracy, a process for prediction signal refinement (PROF) using optical flow is provided after the sub-block level motion compensation. The exemplary steps of the process are as follows:
[0339] (1) After the motion vector of each sub-block is obtained by using steps 605a and 604b, perform motion compensation for the sub-block by using steps 606a and 605b to obtain the prediction signal I(i,j) of the sub-block. It can be noted that step (1) is not included in the PROF process.
[0340] (2) The horizontal gradient value g of the predicted signal of the subblock x (i,j) and the vertical gradient value g y Calculate (i,j) as follows: g x (i,j) = I(i+1,j) - I(i-1,j) g y (i,j)=I(i,j+1)-I(i,j-1)
[0341] It can be seen from the formula that a 6x6 prediction signal window 900 is required to obtain gradient values for a 4x4 block (4x4 gradient values), as shown in FIG. 9D.
[0342] This can be done by using different methods: a) After the prediction matrix of the subblock is obtained based on the motion information (e.g., motion vector) of the subblock, obtain the horizontal gradient matrix and the vertical gradient matrix of the subblock. In other words, through the interpolation based on the motion vector of the M×N subblock, obtain the (M+2)*(N+2) prediction block. For example, obtain a 6×6 prediction signal, and directly perform the interpolation based on the motion vector of the subblock to calculate a 4×4 gradient value (i.e., a 4×4 gradient matrix). b) performing interpolation based on the motion vectors of the sub-blocks to obtain a 4×4 prediction signal (i.e., a first prediction matrix), and then performing edge extension on the prediction signal to obtain a 6×6 prediction signal (i.e., a second prediction matrix) and calculate a 4×4 gradient value (i.e., a 4×4 gradient matrix). c) Obtain each 4×4 prediction signal (i.e., a first prediction matrix), and perform interpolation based on the motion vector of each subblock to obtain a w*h prediction signal through combination. Then, perform edge extension on the w*h prediction signal to obtain a (w+2)*(h+2) prediction signal, and calculate w*h gradient values (i.e., a w*h gradient matrix) to obtain each 4×4 gradient value (i.e., a 4×4 gradient matrix).
[0343] It should be noted that directly obtaining an (M+2)*(N+2) prediction block through interpolation based on the motion vectors of M×N sub-blocks includes the following implementations.
[0344] a1) The upper left corner of the position where the motion vector points to, relative to the surrounding area (the white sample in Figure 13) sample Integer samples of are taken. For the inner regions (gray samples in Fig. 13), samples are taken at the positions pointed to by the motion vectors. If the samples are fractional samples, they are obtained through interpolation by using an interpolation filter.
[0345] As shown in FIG. 14, A, B, C, and D are integer samples, and the motion vector of an M×N subblock is 1 / 16 sample precision, and dx / 16 is the upper left sample where dy / 16 is the horizontal distance between the fractional and integer samples of the top-left sample, and dy / 16 is the vertical distance between the fractional and integer samples of the top-left sample. For the surrounding area, the sample value of A is used as the predicted sample value of the sample position. For the inner area, the predicted sample value of the sample position is obtained through interpolation by using an interpolation filter.
[0346] a2) For the surrounding area (white samples in Fig. 13), the integer sample closest to the location where the motion vector points is taken. For the inner area (gray samples in Fig. 13), the sample where the motion vector points is taken. If the sample is a fractional sample, the sample is obtained through interpolation by using an interpolation filter.
[0347] As shown in FIG. 14, the integer sample closest to the location to which the motion vector points, relative to the surrounding region, is selected based on dx and dy.
[0348] a3) For both the surrounding area and the inner area, samples are obtained at the positions indicated by the motion vectors. If the samples are fractional samples, the samples are obtained through interpolation by using an interpolation filter.
[0349] It should be understood that a), b), and c) are three different implementations.
[0350] (3) Calculate the delta forecast value, and the calculation method is as follows: ΔI(i,j)=g x (i,j)*Δv x (i,j)+g y (i,j)*Δv y (i,j)
[0351] (i,j) represents the current sample of the subblock, Δv(i,j) is the difference between the motion vector of the current sample of the current subblock and the motion vector of the center sample of the subblock (as shown in FIG. 10), which may be calculated according to the above formula, and Δv x (i,j) and Δv y(i,j) is the horizontal offset value and vertical offset value of the difference between the motion vector of the current sample of the current subblock and the motion vector of the sample at the center of the subblock. Alternatively, in a simplified manner, the motion vector difference between the motion vector of each 2×2 sample block to which the current sample belongs and the motion vector of the sample at the center of the subblock can be calculated. In comparison, Δv(i,j): the motion vector difference needs to be calculated for each pixel or sample (e.g., for a 4×4 subblock, the calculation needs to be performed 16 times). However, in the simplified manner, the motion vector difference is calculated for each 2×2 subblock (e.g., for a 4×4 subblock, the calculation is performed 4 times). Note that the subblock here can be a 4×4 subblock or an M×N subblock. For example, m here is 4 or more, or n here is 4 or more.
[0352]
number
[0353] For a four-parameter affine model:
[0354]
number
[0355] For a 6-parameter affine model:
[0356]
number
[0357] Here, (v 0 x,v 0 y), (v 1 x,v 1 y), and (v 2 x,v 2y) are the motion vectors of the top-left, top-right, and bottom-left control points, and w and h are the width and height of the affine coded block (CU).
[0358] (4) Run prediction refinement: I'(i,j) = I(i,j) + ΔI(i,j) where I(i,j) is the predicted value of subblock sample (i,j) (i.e., the predicted sample value at position (i,j) in the subblock), ΔI(i,j) is the delta predicted value of subblock sample (i,j), and I'(ij) is the refined predicted sample value of subblock sample (i,j). In order to refine sub-block-based affine motion compensated prediction using optical flow according to an embodiment of the present disclosure, a prediction refinement using optical flow (PROF) process is conditionally performed, which is described as follows.
[0359] EMBODIMENT 1 The method for obtaining a delta predicted value of a sub-block using optical flow (specifically, the delta predicted value of each sample of the sub-block) may be applied to a unidirectional affine coded block or a bidirectional affine coded block. If the method is applied to a bidirectional affine predicted block, the above-described steps (1) to (4) need to be performed twice, which results in relatively high computational complexity. In order to reduce the complexity of the method, the present invention provides a constraint for applying PROF. Specifically, the predicted sample value is refined by using the method only when the affine coded block is a unidirectional affine coded block.
[0360] At the decoder side, a syntax element obtained by parsing the bitstream indicates uni-prediction or bi-prediction, which can be used to determine whether an affine-coded block is a unidirectional affine-coded block.
[0361] At the encoder side, the structure of B and P frames is determined by different use cases, and whether uni-prediction or bi-prediction is used in B frames is determined by RDO.In other words, for B frames, the encoder side may determine whether uni-prediction or bi-prediction is used for the current affine picture block based on the RDO cost.For example, the encoder side tries to select the mechanism that minimizes RDO from among forward prediction, backward prediction, and bi-directional prediction.
[0362] EMBODIMENT 2 In order to reduce the complexity of the prediction signal refinement using optical flow, the method for obtaining the prediction offset value of the sub-block using optical flow may be used only when the size of the sub-block is relatively large. For example, the sub-block size of the unidirectional affine coded block may be set to 4×4, and the sub-block size of the bidirectional affine coded block may be set to 8×8, 8×4, or 4×8. In this example, the method is used only when the sub-block size is larger than 4×4. In another example, the sub-block size may be adaptively selected based on information such as the motion vector of the control point of the affine coded block, the width and height of the affine coded block, etc. The method is used only when the sub-block size is larger than 4×4.
[0363] In addition, in step (2), both methods a) and b) can ensure that the prediction of each 4×4 sub-block of the affine-coded block has no dependency and can be performed simultaneously. However, method a) increases the complexity of the interpolation calculation. Method b) does not increase the complexity, but the boundary gradient value is obtained through the calculation by using extended samples, and the accuracy is not high. Method c) can improve the accuracy of the gradient calculation, but each 4×4 sub-block has a dependency, that is, the refinement based on the optical flow can be performed only when the interpolation of the entire CU is completed.
[0364] As shown in FIG. 9E, in order to consider both concurrency and accuracy of gradient calculation, the present disclosure proposes gradient value calculation based on 16×16 granularity. Assuming that size_w=min(w,16) and size_h=min(h,16), for each size_w*size_h in the affine coded block, a predictor (prediction sample value) of each 4×4 sub-block in the affine coded block is calculated, and a size_w*size_h predicted signal is obtained through combination. Then, edge extension is performed on the size_w*size_h predicted signal (e.g., extended outward by 2 samples by padding, etc.) to obtain a (size_w+2)*(size_h+2) predicted signal. To obtain each 4×4 gradient value, a size_w*size_h gradient value is calculated. It should be understood that the amount of samples extended outward in the present application is not limited to 2 samples, but is related to gradient calculation. If the resolution of the gradient is 3 taps, it is extended outward by 2 samples. In other words, this concerns the filter for gradient calculation: assuming the amount of taps in the filter is T, the area added or supported surrounding area is T / 2 (divisible)*2.
[0365] 11A illustrates a method for prediction refinement using optical flow (PROF) for affine coded blocks according to one embodiment, which may be performed by a coding device (such as a decoding device or decoder). The method includes the following steps:
[0366] S1101. Determine that a plurality of optical flow determination conditions are satisfied.
[0367] Here, the optical flow decision conditions may also be referred to as conditions for allowing application of PROF. If all of the optical flow decision conditions are satisfied, PROF is applied for the current sub-block of the affine coded block. Examples of optical flow decision conditions are described below. In some examples, the optical flow decision conditions may be replaced or rephrased as constraint conditions for applying PROF. If the constraint conditions for applying PROF are satisfied, PROF is not applied to the current sub-block of the affine coded block. In those examples, step S1101 is modified to determining that none of the multiple constraint conditions for applying PROF are satisfied.
[0368] S1102. Perform a PROF process on the current sub-block of the affine coded block to obtain a refined predicted sample value of the current sub-block of the affine coded block, and a number of optical flow decision conditions are all satisfied for the affine coded block. Here, the refined predicted sample value of the current sub-block can be understood as the final predicted sample value of the current sub-block after prediction refinement is applied.
[0369] In step S1102, an optical flow (prediction refinement using optical flow, PROF) process is performed on one or more sub-blocks (e.g., the current sub-block or each sub-block) in the current affine picture block to obtain a delta prediction value (e.g., ΔI(i,j)) for one or more sub-blocks (e.g., the current sub-block or each sub-block) in the current affine picture block.
[0370] Step S1102 involves obtaining a refined predicted sample value of the sub-block (e.g., predicted signal I'(i,j)) based on the delta predicted value of the sub-block (e.g., ΔI(i,j)) and the predicted sample value of the sub-block (e.g., predicted signal ΔI(i,j)).
[0371] Specifically, step S1102 involves obtaining a refined predictor of the current sample in the sub-block (e.g., predicted signal I'(i,j)) based on a delta predicted value of the current sample in the sub-block (e.g., ΔI(i,j)) and a predictor of the current sample in the sub-block (e.g., predicted signal I(i,j)).
[0372] In one possible design, the multiple optical flow determination conditions include one or more of the following:
[0373] (a) The indication information (e.g., sps_prof_enabled_flag or sps_bdof_enabled_flag) obtained through analysis or derivation indicates that PROF is enabled for the current sequence, picture, slice, or tile group. For example, sps_prof_enabled_flag or sps_bdof_enabled_flag=1. It can be understood that if a constraint condition for applying PROF is used in S1101 instead of the optical flow determination condition, this condition can be converted into a constraint condition for applying PROF as follows: (a) The indication information indicates that PROF is disabled for the current sequence, picture, slice, or tile group. For example, sps_prof_disabled_flag or sps_bdof_disabled_flag=1.
[0374] The indication information obtained by parsing a parameter set such as an SPS, a PPS, a slice header, or a tile group header indicates whether PROF is valid for the current sequence, picture, slice, or tile group.
[0375] Specifically, sps_prof_enabled_flag may be used for control, and the syntax and semantics of sps_prof_enabled_flag are as follows:
[0376] [Table 4]
[0377] sps_prof_enabled_flag equal to 0 specifies that prediction refinement optical flow for affine-based motion compensation is disabled. sps_prof_enabled_flag equal to 1 specifies that prediction refinement optical flow for affine-based motion compensation is enabled.
[0378] Alternatively, the sps_bdof_enabled_flag is reused for control.
[0379] It should be understood that in this embodiment, on the premise that the above-mentioned condition is satisfied (e.g., the main switch determines to enable PROF), another condition is further derived. In other words, if PROF is valid for the current sequence, picture, slice, or tile group, it is further determined whether the current affine picture block satisfies another optical flow determination condition described below. If PROF is not valid for the current sequence, picture, slice, or tile group, it is not necessary to determine whether the current affine picture block satisfies another optical flow determination condition provided below.
[0380] (b) The derived indication information (e.g., variable fallbackModeTriggered) indicates that the current affine coded block should be partitioned. For example, fallbackModeTriggered=0. If a constraint for applying PROF is used in S1101 instead of an optical flow determination condition, it can be understood that condition (b) can be converted to a constraint for applying PROF as follows: (b) The derived indication information indicates that the current affine coded block is not partitioned. For example, fallbackModeTriggered=1.
[0381] The variable fallbackModeTriggered is derived based on the affine parameters, and whether to use PROF depends on fallbackModeTriggered. When fallbackModeTriggered is 1, it indicates that the current affine coded block should not be partitioned. When fallbackModeTriggered is 0, it indicates that the affine coded block should be partitioned (e.g., the affine coded block is partitioned into sub-blocks, e.g., 4x4 sub-blocks). When the current affine coded block should be partitioned, PROF will be used.
[0382] Specifically, the variable fallbackModeTriggered may be derived by using the following process:
[0383] The variable fallbackModeTriggered is initially set to 1 and is further derived as follows: - Variable bxWX 4 , bxHX 4 , bxWX h , bxHX h , bxWX v and bxHX v is derived as follows: maxW 4 =Max(0,Max(4*(2048+dHorX),Max(4*dHorY,4*(2048+dHorX)+4*dHorY))) (8-775) minW 4 =Min(0,Min(4*(2048+dHorX),Min(4*dHorY,4*(2048+dHorX)+4*dHorY))) (8-775) maxH 4 =Max(0,Max(4*dVerX,Max(4*(2048+dVerY),4*dVerX+4*(2048+dVerY)))) (8-775) minH 4=Min(0,Min(4*dVerX,Min(4*(2048+dVerY),4*dVerX+4*(2048+dVerY)))) (8-775) bxWX 4 =((maxW 4 -minW 4 )>>11)+9 (8-775) bxHX 4 =((maxH 4 -minH 4 )>>11)+9 (8-775) bxWX h =((Max(0,4*(2048+dHorX))-Min(0,4*(2048+dHorX)))>>11)+9 (8-775) bxHX h =((Max(0,4*dVerX)-Min(0,4*dVerX))>>11)+9 (8-775) bxWX v =((Max(0,4*dVerY)-Min(0,4*dVerY))>>11)+9 (8-775) bxHX v =((Max(0,4*(2048+dHorY))-Min(0,4*(2048+dHorY)))>>11)+9 (8-775) - inter_pred_idc[xCb][yCb] is equal to PRED_BI, bxWX 4 *bxHX 4 If is less than or equal to 225, then fallbackModeTriggered is set equal to 0. - No, bxWX h *bxHX h is 165 or less, and bxWX v *bxHX v If is less than or equal to 165, then fallbackModeTriggered is set equal to 0.
[0384] (c) The current affine picture block is a uni-predictive affine picture block.
[0385] (d) The size of the sub-blocks in the affine picture block is greater than N×N, where N=4.
[0386] (e) The current affine picture block is a uni-predictive affine picture block, and the size of the sub-blocks in the affine picture block is equal to N×N, where N=4.
[0387] (f) The current affine picture block is a bi-predictive affine picture block, and the size of a sub-block in the affine picture block is greater than N×N, where N=4.
[0388] The current affine picture block is the current affine encoding The fact that the current affine picture block is a uni-predictive affine picture block and that the current affine picture block is a uni-predictive affine picture block is determined by using the following method. At the encoder side, based on the rate-distortion criterion RDO, it is decided that uni-prediction is used for the current affine picture block.
[0389] The current affine picture block is the current affine decoded block, and whether the current affine picture block is a uni-predictive affine picture block is determined by using the following method. At the decoder side, in the AMVP mode, the prediction direction indication information is used to indicate a single prediction direction (e.g., forward prediction only or backward prediction only), and the prediction direction indication information is obtained by analyzing the bitstream or through derivation, or On the decoder side, in merge mode, a motion information candidate corresponding to a candidate index in the candidate list includes first motion information corresponding to a first reference frame list, or a motion information candidate corresponding to a candidate index in the candidate list includes second motion information corresponding to a second reference frame list.
[0390] In one possible design, the prediction direction indication information may include a syntax element inter_pred_idc[x0][y0], inter_pred_idc[x0][y0]=PRED_L0, which is used to indicate forward prediction, inter_pred_idc[x0][y0]=PRED_L1, which is used to indicate backward prediction, or The prediction direction indication information includes predFlagL0 and / or predFlagL1, predFlagL0=1, predFlagL1=0, which is used to indicate forward prediction; predFlagL1=1, predFlagL0=0, which is used to indicate backward prediction.
[0391] It should be noted that the optical flow decision conditions (or constraint conditions for applying PROF) are not limited to the above examples, and additional or different optical flow decision conditions (or constraint conditions for applying PROF) may be set based on different application scenarios. For example, the above conditions (c) to (f) may be replaced with other conditions, such as optical flow decision conditions. PROF may be applied to an affine coded block when all control points MV of the affine coded block are different from each other or different from the constraint conditions for applying PROF. PROF is not applied to an affine coded block when all control points MV of the affine coded block are the same. Optical flow decision conditions, etc.: PROF may be applied to an affine coded block when the resolution of the current picture and the resolution of the reference picture of the affine coded block are the same, for example, when RprConstraintsActive[X][refIdxLX] is equal to 0 or the constraint conditions for applying PROF. PROF is not applied for an affine-coded block when the resolution of the current picture and the resolution of the reference picture of the affine-coded block are different from each other, e.g., when RprConstraintsActive[X][refIdxLX] is equal to 1.
[0392] In one possible design, in step S1102, performing optical flow (prediction refinement using optical flow, PROF) processing on one or more sub-blocks (e.g., each sub-block or the current sub-block) in the current affine picture block to obtain a delta prediction value (e.g., ΔI(i,j)) for one or more sub-blocks (e.g., each sub-block or the current sub-block) in the current affine picture block may include the following steps:
[0393] Step 1. Obtain a second prediction matrix based on the motion information (eg, motion vector) of a current sub-block in a current affine picture block.
[0394] For example, through interpolation based on the motion vectors of M×N sub-blocks, an (M+2)*(N+2) prediction block (ie, the second prediction matrix) is obtained. Various implementations are given above.
[0395] Step 2. Calculate a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, where the size of the second prediction matrix is equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix.
[0396] Step 3. Calculate a delta prediction value (ΔI(i,j)) of the current sample in the subblock based on the horizontal prediction gradient value of the current sample in the subblock in the horizontal prediction gradient matrix, the vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and the difference between the motion vector of the current sample of the current subblock and the motion vector of the center sample of the subblock.
[0397] Correspondingly, in step S1102, obtaining a refined predicted sample value (e.g., predicted signal I′(i,j)) of a sub-block based on a delta predicted value (e.g., ΔI(i,j)) of the sub-block and a predicted sample value (e.g., predicted signal I(i,j)) of the sub-block includes: The method may include obtaining a refined predicted sample value of the current sample (e.g., predicted signal I'(i,j)) based on a delta predicted value of the current sample in the sub-block (e.g., ΔI(i,j)) and a predicted sample value of the current sample (e.g., predicted signal I(i,j)).
[0398] It should be understood that the predicted sample value of a sub-block (eg, predicted signal I(i,j)) may be an M×N prediction block among (M+2)*(N+2) prediction blocks.
[0399] Regarding step 3, in one implementation, the motion vector difference between the motion vector of different samples in the current subblock and the motion vector of the center sample of the subblock are different. In another implementation, the motion vector difference between the motion vector of the current sample unit (e.g., 2×2 sample block) containing the current sample and the motion vector of the center sample of the subblock is used as the motion vector difference between the motion vector of the current sample of the current subblock and the motion vector of the center sample of the subblock. In other words, to balance the processing overhead and the accuracy of prediction, assuming that both samples A and B are included in the current sample unit, the motion vector difference between the motion vector of the current sample unit (e.g., 2×2 sample block) and the motion vector of the center sample of the subblock can be used as the motion vector difference between the motion vector of sample A in the subblock and the motion vector of the center sample of the subblock. Also, the motion vector difference between the motion vector of the current sample unit and the motion vector of the center sample of the subblock can be used as the motion vector difference between the motion vector of sample B in the subblock and the motion vector of the center sample of the subblock.
[0400] In one implementation, the second prediction matrix in step 1 above is I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. The horizontal prediction gradient matrix is represented by X(i,j), where i has a value range of [0,sbW-1] and j has a value range of [0,sbH-1]. The vertical prediction gradient matrix is represented by Y(i,j), where i has a value range of [0,sbW-1] and j has a value range of [0,sbH-1]; sbW represents the width of the current sub-block in the current affine picture block, sbH represents the height of the current sub-block in the current affine picture block, and (x, y) represents the position coordinates of each sample (also called a sample) in the current sub-block in the current affine picture block, and the element located at (x, y) may correspond to the element located at (i, j).
[0401] Another possible design is the step 1102 In the above, performing an optical flow (prediction refinement using optical flow, PROF) process on one or more sub-blocks (e.g., each sub-block) in the current affine picture block to obtain a delta prediction value (also referred to as a predictor offset value, e.g., ΔI(i,j)) for the one or more sub-blocks (e.g., each sub-block) in the current affine picture block includes, as shown in FIG. 12 , the following: S1202. Obtain or generate a second prediction matrix based on the first prediction matrix, and the first prediction matrix (e.g., the first prediction signal I(i,j) or 4×4 prediction) of a subblock (e.g., each subblock) corresponds to a prediction sample value of the current subblock. As shown in Figure 9A, a subblock-based affine motion compensation for the current subblock of the affine coded block is performed to obtain a prediction sample value of the current subblock of the affine coded block. S1203. Calculate a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, and the size of the second prediction matrix is equal to or larger than the size of the first prediction matrix. , 1st The size of the prediction matrix 2 is equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix.
[0402] S1204. Calculate a delta prediction value matrix (e.g., ΔI(i,j) of the prediction signal) of the sub-block based on the horizontal prediction gradient matrix, the vertical prediction gradient matrix, and the motion vector difference between the motion vector of the current sample unit (e.g., the current sample or the current sample block, such as a 2×2 sample block) of the sub-block and the motion vector of the center sample of the sub-block. The step of obtaining a refined predicted sample value of the sub-block (e.g., predicted signal I'(i,j)) based on the delta predicted value of the sub-block (e.g., ΔI(i,j)) and the predicted sample value of the sub-block (e.g., predicted signal I(i,j)) includes: S1205. Obtain a refined third prediction matrix (e.g., predicted signal I'(i,j)) of the sub-block based on the delta prediction value matrix (e.g., ΔI(i,j)) and the first prediction matrix (e.g., predicted signal I(i,j)).
[0403] It should be understood that I(i,j) in this specification represents a predicted sample value (e.g., an original prediction obtained through motion compensation) of a current sample in a current sub-block, ΔI(i,j) represents a delta predicted value of a current sample in a current sub-block, and I′(i,j) represents a refined predicted sample value of a current sample in a current sub-block. For example, original predicted sample value+delta predicted value=refined predicted sample value. It should be understood that obtaining refined predicted sample values of multiple samples (e.g., all samples) in a current sub-block is equivalent to obtaining refined predicted sample values of the current sub-block.
[0404] In different possible implementations, the gradient value may be calculated for each sample, and the delta predicted value may be calculated for each sample. Alternatively, a gradient value matrix may be obtained, and then the delta predicted value may be calculated. This is not limited in this application. In one alternative implementation, the first prediction matrix and the second prediction matrix represent the same prediction matrix.
[0405] When the size of the second prediction matrix is equal to the size of the first prediction matrix and the size of the second prediction matrix is equal to the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix, in one possible implementation, a (w-2)*(h-2) gradient matrix is calculated by using a w*h prediction matrix, and the gradient matrix is padded to obtain a size of w*h, where w*h represents the size of the current sub-block. For example, both the first prediction matrix and the second prediction matrix are prediction matrices whose size is w*h, or the first prediction matrix and the second prediction matrix represent the same prediction matrix.
[0406] As shown in FIG. 11B, another embodiment of the present application provides another method for prediction refinement using optical flow (PROF) for affine-coded blocks, which includes the following steps.
[0407] S1110. It is determined whether a plurality of optical flow determination conditions are met or satisfied, where the optical flow determination conditions refer to conditions for allowing the application of PROF.
[0408] S1111. If multiple optical flow decision conditions are satisfied, a first indicator (e.g., applyProfFlag) is set equal to true, and a prediction refinement using optical flow (PROF) process is performed on the current sub-block of the affine coded block to obtain refined prediction sample values of the current sub-block of the affine coded block. In step S1111, an optical flow (prediction refinement using optical flow, PROF) process is performed on one or more sub-blocks (e.g., each sub-block) in the current affine picture block to obtain delta prediction values (also called predictor offset values, e.g., ΔI(i,j)) of the one or more sub-blocks (e.g., each sub-block) in the current affine picture block.
[0409] In step S1111, a refined predicted sample value of the sub-block (e.g., predicted signal I'(i,j)) is obtained based on the delta predicted value of the sub-block (e.g., ΔI(i,j)) and the predicted sample value of the sub-block (e.g., predicted signal I(i,j)).
[0410] It should be understood that I(i,j) in this specification represents a predicted sample value of a current sample in a current sub-block (e.g., an original predicted sample value obtained through motion compensation), ΔI(i,j) represents a delta predicted value of a current sample in a current sub-block, and I′(i,j) represents a refined predicted sample value of a current sample in a current sub-block. For example, original predicted sample value+delta predicted value=refined predicted sample value. It should be understood that obtaining refined predicted sample values of multiple samples (e.g., all samples) in a current sub-block is equivalent to obtaining refined predicted sample values of the current sub-block.
[0411] It can be understood that when the refined predicted sample values of each sub-block of the affine coded block are generated, the refined predicted sample values of the affine coded block are naturally generated. S1113, when at least one of the plurality of optical flow determination conditions is not met or is not satisfied, a first indicator (e.g., applyProfFlag) is set equal to false, and the PROF process is skipped.
[0412] It can be understood that if a constraint for applying PROF is used to determine whether to apply PROF, step S1110 is modified to determine whether any of the constraints for applying PROF are not met. In this case, step S1111 is modified to: if any of the constraints for applying PROF are not met or are not satisfied, a first indicator (e.g., applyProfFlag) is set equal to true, and a prediction refinement using optical flow (PROF) process is performed on the current sub-block of the affine coded block to obtain a refined prediction sample value of the current sub-block of the affine coded block. Thus, step S1113 is modified to: if at least one of the constraints for applying PROF is met, a first indicator (e.g., applyProfFlag) is set equal to false, and the PROF process is skipped.
[0413] In one implementation, if a first indicator (e.g., applyProfFlag) is a first value (e.g., 1), perform an optical flow (e.g., PROF) process on one or more sub-blocks (e.g., each sub-block) in the current affine picture block; or Otherwise, if the first indicator (e.g., applyProfFlag) is a second value (e.g., 0), skip performing optical flow (e.g., PROF) processing on one or more sub-blocks (e.g., each sub-block) in the current affine picture block.
[0414] In one implementation, the value of the first indicator depends on whether optical flow decision conditions are met, where the optical flow decision conditions include one or more of the following: The first indication information (e.g., sps_prof_enabled_flag or sps_bdof_enabled_flag) is used to indicate that PROF is enabled for the current picture unit. Note that in this specification, the current picture unit may be, for example, the current sequence, the current picture, the current slice, or the current tile group. These examples of the current picture unit are not limiting. A second indication information (eg, fallbackModeTriggered) is used to indicate partitioning of the current affine picture block. The current affine picture block is a uni-predictive affine picture block. The size of the sub-blocks in the affine picture block is greater than N×N, where N=4. The current affine picture block is a uni-predictive affine picture block, and the size of a sub-block in the affine picture block is equal to N×N, where N=4; or The current affine picture block is a bi-predictive affine picture block, and the size of a sub-block in the affine picture block is greater than N×N, where N=4.
[0415] It should be noted that the present application includes, but is not limited to, the above optical flow determination conditions, and additional or different optical flow determination conditions may be set based on different application scenarios.
[0416] In this embodiment of the present application, for example, applyProfFlag is set to 1 when all of the following conditions are met: - sps_prof_enabled_flag==1 - fallbackModeTriggered==0 - inter_pred_idc[x0][y0]=PRED_L0 or PRED_L1 (or predFlagL0=1, predFlagL1=0; or predFlagL1=1, predFlagL0=0) - Other conditions
[0417] In another embodiment, for example, applyProfFlag is set to 1 when all of the following conditions are met: - sps_prof_enabled_flag==1 - fallbackModeTriggered==0 - Other conditions
[0418] It can be understood that if the constraints for applying PROF are used in S1110 instead of the optical flow determination conditions, applyProfFlag is set to 1 when none of the following constraints are met. - sps_prof_disabled_flag==1 - fallbackModeTriggered==1 - Other conditions
[0419] It should be understood that for details of the execution entities of steps in the prediction method provided in this embodiment of the present application, as well as the extensions and modifications of these steps, please refer to the above description of the corresponding method. For the sake of brevity, the details will not be described again in this specification.
[0420] Another embodiment of the present application further comprises: Obtaining a first prediction matrix for an M*N block based on motion information (e.g., motion vectors) of a plurality of sub-blocks in a current affine picture block, where the M*N block is, for example, 16*16 as shown in FIG. 9E, and a 16*16 block (or a 16*16 window) includes, for example, sixteen 4*4 sub-blocks; calculating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, the size of the second prediction matrix being equal to or greater than the size of the first prediction matrix, and the size of the second prediction matrix being equal to or greater than the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix; Calculating a delta prediction value matrix (e.g., ΔI(i,j) of the prediction signal) of the M*N block based on a horizontal prediction gradient matrix, a vertical prediction gradient matrix, and a motion vector difference between a motion vector of a current pixel unit (e.g., a current pixel or a current pixel block, such as a 2×2 pixel block) in the M*N block and a motion vector of a pixel at the center of the M*N block; and obtaining a refined third prediction matrix (e.g., predicted signal I'(i,j)) for the M*N blocks based on the delta prediction value matrix (e.g., ΔI(i,j)) and the first prediction matrix (e.g., predicted signal I(i,j)).
[0421] In another possible design, the first prediction matrix is I 1 It is represented by (i,j), where the range of values for i is [0,size_w-1] and the range of values for j is [0,size_h-1], The second predictor matrix is I 2 (i,j), where the range of values for i is [-1,size_w], the range of values for j is [-1,size_h], size_w = min(W,m), size_h = min(H,m), and m = 16; The horizontal prediction gradient matrix is represented by X(i,j), where i has a range of values of [0, size_w-1] and j has a range of values of [0, size_h-1]. The vertical prediction gradient matrix is represented by Y(i,j), where i has a value range of [0, size_w-1] and j has a value range of [0, size_h-1]. W represents the width of the current affine picture block, H represents the height of the current affine picture block, and (x, y) represent the position coordinates of each sample in the current affine picture block.
[0422] It should be appreciated that, in some examples, the affine picture block is implicitly partitioned into 16×16 blocks, and a gradient matrix is calculated for each 16×16 block, as shown in FIG. 9E. Correspondingly, the second prediction matrix is 2The horizontal prediction gradient matrix is represented by X(i,j), where the range of values for i is [-1,size_w], the range of values for j is [-1,size_h], and size_w=min(w,m), size_h=min(h,m), and m=16. The horizontal prediction gradient matrix is represented by X(i,j), where the range of values for i is [0,size_w-1], and the range of values for j is [0,size_h-1]. The vertical prediction gradient matrix is represented by Y(i,j), where the range of values for i is [0,size_w-1], and the range of values for j is [0,size_h-1].
[0423] In another possible design, computing the horizontal and vertical prediction gradient matrices (e.g., size_w*size_h gradient values) based on the second prediction matrix (e.g., a (size_w+2)*(size_h+2) prediction signal) may include calculating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on a second prediction matrix, the horizontal prediction gradient matrix and the vertical prediction gradient matrix respectively including a horizontal prediction gradient matrix and a vertical prediction gradient matrix of a sub-block; The second predictor matrix is I 2 (i,j), where the range of values for i is [-1,size_w], the range of values for j is [-1,size_h], size_w = min(W,m), size_h = min(H,m), and m = 16; The horizontal prediction gradient matrix is represented by X(i,j), where i has a range of values of [0, size_w-1] and j has a range of values of [0, size_h-1]. The vertical prediction gradient matrix is represented by Y(i,j), where i has a value range of [0, size_w-1] and j has a value range of [0, size_h-1]. W represents the width of the current affine picture block, H represents the height of the current affine picture block, and (i,j) represents the position coordinates of each sample in the current affine picture block.
[0424] It can be seen from the above description that the current affine picture block is implicitly partitioned into 16×16 blocks, and a gradient matrix is calculated for each 16×16 block. It should be understood that m=16 is used herein only as an example and should not be construed as limiting. Various other values of m, such as m=32, can be used.
[0425] In one possible design, the method is used for uni-prediction, and the motion information includes first motion information corresponding to a first reference frame list or second motion information corresponding to a second reference frame list; The first prediction matrix includes a first initial prediction matrix or a second initial prediction matrix, the first initial prediction matrix is obtained based on the first motion information, and the second initial prediction matrix is obtained based on the second motion information; The horizontal prediction gradient matrix includes a first horizontal prediction gradient matrix or a second horizontal prediction gradient matrix, the first horizontal prediction gradient matrix being obtained through calculation based on an extended first initial prediction matrix, and the second horizontal prediction gradient matrix being obtained through calculation based on an extended second initial prediction matrix; The vertical prediction gradient matrix includes a first vertical prediction gradient matrix or a second vertical prediction gradient matrix, the first vertical prediction gradient matrix being obtained through calculation based on an extended first initial prediction matrix, and the second vertical prediction gradient matrix being obtained through calculation based on an extended second initial prediction matrix; The delta prediction value matrix includes a first delta prediction value matrix corresponding to the first reference frame list or a second delta prediction value matrix corresponding to the second reference frame list, where the first delta prediction value matrix is obtained through a calculation based on a first horizontal prediction gradient matrix, a first vertical prediction gradient matrix, and a first motion vector differential (e.g., forward motion vector differential) of each sample unit in the sub-block relative to a center sample of the sub-block, and the second delta prediction value matrix is obtained through a calculation based on a second horizontal prediction gradient matrix, a second vertical prediction gradient matrix, and a second motion vector differential (e.g., backward motion vector differential) of each sample unit in the sub-block relative to a center sample of the sub-block.
[0426] In one possible design, the method is used for bi-prediction, and the motion information includes first motion information corresponding to a first reference frame list and second motion information corresponding to a second reference frame list; and The first prediction matrix includes a first initial prediction matrix and a second initial prediction matrix, the first initial prediction matrix is obtained based on the first motion information, and the second initial prediction matrix is obtained based on the second motion information; The horizontal prediction gradient matrix includes a first horizontal prediction gradient matrix and a second horizontal prediction gradient matrix, the first horizontal prediction gradient matrix is obtained through calculation based on an extended first initial prediction matrix, and the second horizontal prediction gradient matrix is obtained through calculation based on an extended second initial prediction matrix; The vertical prediction gradient matrix includes a first vertical prediction gradient matrix and a second vertical prediction gradient matrix, the first vertical prediction gradient matrix is obtained through calculation based on an extended first initial prediction matrix, and the second vertical prediction gradient matrix is obtained through calculation based on an extended second initial prediction matrix; The delta prediction value matrix includes a first delta prediction value matrix corresponding to the first reference frame list and a second delta prediction value matrix corresponding to the second reference frame list, where the first delta prediction value matrix is obtained through calculations based on a first horizontal prediction gradient matrix, a first vertical prediction gradient matrix, and a first motion vector differential (e.g., forward motion vector differential) of each sample unit in the sub-block relative to a center sample of the sub-block, and the second delta prediction value matrix is obtained through calculations based on a second horizontal prediction gradient matrix, a second vertical prediction gradient matrix, and a second motion vector differential (e.g., backward motion vector differential) of each sample unit in the sub-block relative to a center sample of the sub-block.
[0427] In one possible design, the method is used for uni-prediction. the motion information includes first motion information corresponding to the first reference frame list or second motion information corresponding to the second reference frame list; The first prediction matrix includes a first initial prediction matrix or a second initial prediction matrix, where the first initial prediction matrix is obtained based on the first motion information, and the second initial prediction matrix is obtained based on the second motion information.
[0428] In one possible design, the method is used for bi-prediction. the motion information includes first motion information corresponding to the first reference frame list and second motion information corresponding to the second reference frame list; The first prediction matrix includes a first initial prediction matrix and a second initial prediction matrix, the first initial prediction matrix is obtained based on the first motion information, and the second initial prediction matrix is obtained based on the second motion information; The step of obtaining a prediction matrix of the sub-block based on the motion information of the sub-block includes: The method includes performing weighted summation on sample values at the same position in the first initial prediction matrix and the second initial prediction matrix to obtain a prediction matrix of the sub-block. It should be understood that before the weighted summation is performed here, the sample values in the first initial prediction matrix and the second initial prediction matrix may be refined separately.
[0429] In another possible design, the PROF process is described as four steps:
[0430] Step 1) Subblock-based affine motion compensation is performed to generate subblock prediction I(i,j). For example, i has a value from [0,subW+1] or [-1,subW], and j has a value from [0,subH+1] or [-1,subH]. It can be understood that since i has a value from [0,subW+1] and j has a value from [0,subH+1], the top-left sample (or the origin of coordinates) is located at (1,1), while since i has a value from [-1,subW] and j has a value from [-1,subH], the top-left sample is located at (0,0).
[0431] Step 2) The spatial gradient of the subblock prediction, g x (i,j) and g y (i,j) is computed at each sample location using a 3-tap filter [-1,0,1]. g x (i,j) = I(i+1,j) - I(i-1,j) g y (i,j)=I(i,j+1)-I(i,j-1)
[0432] Subblock predictions are extended by one sample on each side for gradient computation. To lower memory bandwidth and complexity, samples on the extended boundaries are copied from the nearest integer sample positions in the reference picture. Thus, additional interpolation for padding regions is avoided.
[0433] Step 3) The luma prediction refinement is calculated according to the optical flow formula. ΔI(i,j)=g x (i,j)*Δv x (i,j)+g y (i,j)*Δv y (i,j) Here, as shown in FIG. 10, Δv(i,j) is the difference between the sample MV calculated for sample position (i,j) denoted by v(i,j) and the sub-block MV of the sub-block to which sample (i,j) belongs.
[0434] In other words, the MV of each 4×4 central sample is calculated, and then the MV of each sample of the subblock is calculated. The difference Δv(i,j) between the MV of each sample and the MV of the central sample can be obtained.
[0435] Since the affine model parameters and the sample position relative to the subblock center do not change for each subblock, Δv(i,j) can be calculated for the first subblock and reused for other subblocks in the same CU. Let x and y be the horizontal and vertical offsets from the sample position relative to the subblock center, Δv(x,y) can be derived by the following equation:
[0436]
number
[0437] For a four-parameter affine model,
[0438]
number
[0439] For a six-parameter affine model,
[0440]
number
[0441] Here, (v 0 x,v 0 y), (v 1 x,v 1 y), (v 2 x,v 2 y) are the motion vectors of the top-left, top-right, and bottom-left control points, and w and h are the width and height of the CU.
[0442] Step 4) Finally, the luma prediction refinement is added to the sub-block prediction I(i,j). The final prediction I' is generated as shown in the following equation: I'(i,j) = I(i,j) + ΔI(i,j)
[0443] FIG. 15 illustrates an apparatus 1500 for prediction refinement using optical flow (PROF) for affine coded blocks according to another aspect of the present disclosure. In one example, Device 1500 is A determining unit 1501 configured to determine that any of a plurality of constraints for applying PROF is not satisfied; and a prediction processing unit 1503 configured to perform prediction refinement using optical flow, a PROF process on the current sub-block of the affine coded block to obtain a refined predicted sample value of the current sub-block of the affine coded block. It can be understood that when the refined predicted sample value of each sub-block of the affine coded block is generated, the refined predicted sample value of the affine coded block is generated naturally.
[0444] In another example, Device 1500 is A determining unit 1501 configured to determine that a plurality of optical flow determination conditions are satisfied, where the plurality of optical flow determination conditions refer to conditions that allow the application of PROF; and a prediction processing unit 1503 configured to perform a PROF process on the current sub-block of the affine coded block to obtain a refined predicted sample value of the current sub-block of the affine coded block. It can be understood that when the refined predicted sample value of each sub-block of the affine coded block is generated, the refined predicted sample value of the affine coded block is generated naturally.
[0445] Correspondingly, in one example, the exemplary structure of the device 1500 may correspond to the encoder 20 of Figure 2. In another example, the exemplary structure of the device 1500 may correspond to the decoder 30 of Figure 3.
[0446] In another example, the exemplary structure of the apparatus 1500 may correspond to the inter prediction unit 244 of FIG. 2. In another example, the exemplary structure of the apparatus 1500 may correspond to the inter prediction unit 344 of FIG.
[0447] It can be understood that the decision unit and prediction processing unit (corresponding to the inter-prediction module) in the encoder 20 or the decoder 30 provided in this embodiment of the present application are functional entities for implementing various execution steps included in the above corresponding method, that is, they have functional entities for fully implementing the steps of the method of the present application and the extensions and variations of these steps.For details, please refer to the above description of the corresponding method.For the sake of brevity, details will not be described again in this specification.
[0448] The following is a description of the application of the encoding and decoding methods as illustrated in the above mentioned embodiments and systems using them.
[0449] 16 is a block diagram showing a content supply system 3100 for realizing a content distribution service. The content supply system 3100 includes a capture device 3102, a terminal device 3106, and optionally includes a display 3126. The capture device 3102 communicates with the terminal device 3106 via a communication link 3104. The communication link may include the communication channel 13 described above. The communication link 3104 includes, but is not limited to, WIFI, Ethernet, cable, wireless (3G / 4G / 5G), USB, or any type of combination thereof, etc.
[0450] The capture device 3102 may generate data and encode the data by the encoding method as shown in the above embodiment. Alternatively, the capture device 3102 may deliver the data to a streaming server (not shown in the figure), which encodes the data and transmits the encoded data to the terminal device 3106. The capture device 3102 includes, but is not limited to, a camera, a smartphone or pad, a computer or laptop, a video conferencing system, a PDA, an in-vehicle device, or any combination thereof. For example, the capture device 3102 may include a source device 12 as described above. When the data includes video, the video encoder 20 included in the capture device 3102 may actually perform a video encoding process. When the data includes audio (i.e., voice), the audio encoder included in the capture device 3102 may actually perform an audio encoding process. In some practical scenarios, the capture device 3102 delivers the encoded video data and audio data by multiplexing them together. In other practical scenarios, for example in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 delivers the encoded audio data and the encoded video data separately to the terminal device 3106 .
[0451] In the content supply system 3100, the terminal device 310 receives and plays the encoded data. The terminal device 3106 can be a device capable of receiving and recovering data, such as a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a set-top box (STB) 3116, a video conferencing system 3118, a video surveillance system 3120, a personal digital assistant (PDA) 3122, an in-vehicle device 3124, or any combination thereof capable of decoding the encoded data mentioned above. For example, the terminal device 3106 can include the destination device 14 as described above. When the encoded data includes video, the video decoder 30 included in the terminal device performs video decoding preferentially. When the encoded data includes audio, the audio decoder included in the terminal device performs audio decoding preferentially.
[0452] In a terminal device with a display, for example a smartphone or pad 3108, a computer or laptop 3110, a network video recorder (NVR) / digital video recorder (DVR) 3112, a TV 3114, a personal digital assistant (PDA) 3122, or an in-vehicle device 3124, the terminal device can provide the decoded data to its display. In a terminal device without a display, for example an STB 3116, a video conferencing system 3118, or a video surveillance system 3120, an external display 3126 is connected to receive and show the decoded data.
[0453] When each device in the system performs encoding or decoding, a picture encoding device or a picture decoding device as shown in the above-mentioned embodiments may be used.
[0454] 17 is a diagram showing an example structure of a terminal device 3106. After the terminal device 3106 receives a stream from the capture device 3102, a protocol progression unit 3202 analyzes the transmission protocol of the stream. The protocol includes, but is not limited to, Real Time Streaming Protocol (RTSP), HyperText Transfer Protocol (HTTP), HTTP Live Streaming Protocol (HLS), MPEG-DASH, Real Time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof, etc.
[0455] After the protocol proceeding unit 3202 processes the stream, a stream file is generated. This file is output to the demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As described above, in some practical scenarios, for example in a video conferencing system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is sent to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204.
[0456] Through the demultiplexing process, a video elementary stream (ES), an audio ES, and optionally subtitles are generated. The video decoder 3206, including the video decoder 30 as described in the above-mentioned embodiment, decodes the video ES by the decoding method as shown in the above-mentioned embodiment to generate video frames, and supplies this data to the synchronization unit 3212. The audio decoder 3208 decodes the audio ES to generate audio frames, and supplies this data to the synchronization unit 3212. Alternatively, the video frame may be stored in a buffer (not shown in Figure Y) before supplying it to the synchronization unit 3212. Similarly, the audio frame may be stored in a buffer (not shown in Figure Y) before supplying it to the synchronization unit 3212.
[0457] The synchronization unit 3212 synchronizes video and audio frames and provides the video / audio to a video / audio display 3214. For example, the synchronization unit 3212 synchronizes the presentation of video and audio information, which may be coded in a syntax using timestamps for the presentation of the coded audio and visual data and timestamps for the delivery of the data stream itself.
[0458] If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes it with the video and audio frames, and provides the video / audio / subtitles to the video / audio / subtitle display 3216.
[0459] The present invention is not limited to the above-mentioned system, and either the picture encoding device or the picture decoding device in the above-mentioned embodiments may be incorporated into other systems, for example a car system.
[0460] The mathematical operators used in this application are similar to those used in the C programming language, however the results of integer division and arithmetic shift operations are more precisely defined, and additional operations, such as exponential and division of real values, are defined.
[0461] For the description of the relevant contents, implementation forms of the relevant steps, beneficial effects, etc. in this embodiment, please refer to the corresponding parts above, or simple modifications may be made based on the corresponding parts above. Details will not be described again here.
[0462] It should be noted that, where no contradiction occurs, some features in any two or more of the above-mentioned embodiments may be combined to form a new embodiment. In addition, some features in any one of the above-mentioned embodiments may be used independently as an embodiment.
[0463] The above mainly describes the solutions provided in the embodiments of the present application in terms of methods. To implement the aforementioned functions, corresponding hardware structures and / or software modules for performing the functions are included. In combination with the examples described in the embodiments disclosed herein, those skilled in the art should easily recognize that the units and algorithm steps can be implemented by hardware or a combination of hardware and computer software in the present application. Whether the functions are performed by hardware or by hardware driven by computer software depends on the specific application and design constraints of the technical solutions. For each specific application, those skilled in the art may use different methods to implement the functions described, but the implementation should not be considered as being outside the scope of the present application.
[0464] The division of the encoder / decoder into functional modules in the embodiment of the present application may be performed based on the above-mentioned method example. For example, each functional module may be obtained through a division corresponding to each function, or at least two functions may be integrated into one processing module. The integrated module may be implemented in the form of hardware, or may be implemented in the form of a software functional module. It should be noted that in the embodiment of the present application, the division of modules is an example, and is merely a logical division of functions. In the actual implementation, another division scheme may be used.
[0465] Although embodiments of the present invention have been described primarily in terms of video coding, it should be noted that coding system 10, encoder 20, and decoder 30 (and correspondingly system 10), as well as other embodiments described herein, may also be configured for processing or coding of still pictures, i.e., processing or coding of individual pictures independent of previous or successive pictures as in video coding. In general, when picture processing coding is limited to a single picture 17, only inter prediction units 244 (encoder) and 344 (decoder) may not be available. All other functions (also called tools or techniques) of the video encoder 20 and the video decoder 30 may be equally used for still picture processing, e.g., residual calculation 204 / 304, transform 206, quantization 208, inverse quantization 210 / 310, (inverse) transform 212 / 312, partitioning 262 / 362, intra prediction 254 / 354, and / or loop filtering 220, 320, as well as entropy coding 270 and entropy decoding 304.
[0466] The embodiments of, for example, the encoder 20 and the decoder 30, and the functions described herein with reference to, for example, the encoder 20 and the decoder 30, may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on a computer-readable medium or transmitted over a communication medium as one or more instructions or codes and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium including any medium that facilitates the transfer of a computer program from one place to another, for example according to a communication protocol. In this manner, the computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal wave or carrier wave. The data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0467] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact discs (CDs), laser discs, optical disks, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically and discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer readable media.
[0468] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor" as used herein may refer to any of the foregoing structures or any other structures suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding or incorporated into a composite codec. Also, the techniques may be fully implemented in one or more circuits or logic elements.
[0469] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). To highlight functional aspects of devices configured to perform the disclosed techniques, various components, modules, or units are described in the present disclosure, but they do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, or may be provided by a collection of interoperable hardware units including one or more processors as described above, in conjunction with appropriate software and / or firmware. [Explanation of symbols]
[0470] 10. Video Coding System 12 Source Device 13 Communication Channels 14 Destination Device 16 Picture Source 17 Picture Data 18 Preprocessors 19 Preprocessed Picture Data 20 Encoder 21 Encoded Picture Data 22 Communication Interface 28 Communication Interface 30 Decoder 31 Decoded picture data 32 Post Processor 33 Post-Processed Picture Data 34 Display Devices 40 Video Coding System 41 Imaging Devices 42 Antenna 43 Processors 44 Memory Store 45 Display Devices 46 Processing Circuit 201 Input 203 Picture Block 204 Residual Calculation Unit 205 Residual Blocks 206 Conversion Processing Unit 207 Conversion Factors 208 Quantization Units 209 Quantized Coefficients 210 Inverse Quantization Unit 211 Dequantized Coefficients 212 Inverse Transformation Processing Unit 213 Reconstructed Residual Blocks 214 Reconstruction Unit 215 reconstructed blocks 220 Loop Filter Unit 221 Filtered Blocks 230 Decoded Picture Buffer 231 Decoded Pictures 244 Inter Prediction Units 254 intra prediction units 260 Mode Selection Unit 262 Division Unit 265 predicted blocks 266 Syntax Elements 270 Entropy Coding Unit 272 Output 304 Entropy Decoding Unit 309 Quantized Coefficients 310 Inverse Quantization Unit 311 Dequantized Coefficients 312 Inverse Transformation Processing Unit 313 Reconstructed Residual Blocks 314 Reconstruction Unit 315 Reconstructed Blocks 320 Loop Filter 321 Filtered Blocks 330 Decoded Picture Buffer 331 Decoded Pictures 332 Output 344 Inter Prediction Units 354 intra prediction units 360 mode application unit 365 predicted blocks 366 Syntax Elements 400 Video Coding Device 410 Input Port 420 Receiver Unit 430 Processor 440 Transmitter Unit 450 output ports 460 Memory 470 Coding Module 500 devices 502 processor 504 Memory 506 Data 508 Operating Systems 510 Application Program 512 Bus 518 Display 900 Prediction Signal Window 1500 equipment 1501 Decision Unit 1503 Prediction Processing Unit 3100 Contents Supply System 3102 Capture Device 3104 Communication Links 3106 Terminal Device 3108 Smartphone / Pad 3110 Computer / Laptop 3112 Network Video Recorder (NVR) / Digital Video Recorder (DVR) 3114 TV 3116 Set-top box (STB) 3118 Video Conference System 3120 Video Surveillance System 3122 Personal digital assistant (PDA) 3124 In-vehicle devices 3126 Display 3202 Protocol Progression Unit 3204 Demultiplexing Unit 3206 Video Decoder 3208 Audio Decoder 3210 Subtitle Decoder 3212 Synchronous Unit 3214 Video / Audio Display 3216 Video / Audio / Subtitle Display
Claims
1. 1. A method for prediction refinement using optical flow (PROF) for affine coded blocks, comprising: performing a PROF process on the current sub-block of the affine coded block to obtain refined predicted sample values of the current sub-block of the affine coded block, wherein a number of constraints for applying PROF are not satisfied for the affine coded block; said step of performing a PROF process on a current sub-block of said affine coded block further comprising: performing optical flow processing on the current sub-block to obtain a delta prediction value of a current sample of the current sub-block; obtaining a refined predicted sample value of the current sample based on the delta predicted value of the current sample and a predicted sample value of the current sample of the current sub-block; Including, The plurality of constraints for applying PROF are: A first indication indicates that PROF is invalid for a picture including the affine coded block, or a first indication indicates that PROF is invalid for a slice associated with a picture including the affine coded block; and a second indication indicating no partition of the affine-coded block; said step of performing optical flow processing on said current sub-block to obtain delta predictions of current samples of said current sub-block, obtaining a second prediction matrix, the second prediction matrix being generated based on motion information of the current sub-block; generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on the second prediction matrix, the horizontal prediction gradient matrix and the vertical prediction gradient matrix having the same size, and the size of the second prediction matrix is greater than or equal to the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix; calculating a delta prediction value of the current sample of the current sub-block based on a horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix, a vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and a difference between a motion vector of the current sample of the current sub-block and a motion vector of a center sample of the current sub-block; method.
2. prior to the step of performing a PROF process on a current sub-block of the affine coded block, The method of claim 1 , further comprising determining that the plurality of constraints for applying PROF are not satisfied for the affine coded block.
3. A method as described in claim 1 or 2, wherein the second instruction information is a variable fallbackModeTriggered, and setting the variable fallbackModeTriggered to 1 indicates no division of the affine coded block.
4. The step of obtaining a second prediction matrix comprises: generating a first prediction matrix based on motion information of the current sub-block, elements of the first prediction matrix corresponding to predicted sample values of the current sub-block; and generating the second prediction matrix based on the first prediction matrix; or The method of claim 1 , comprising generating the second prediction matrix based on the motion information of the current sub-block.
5. The elements of the second prediction matrix are I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. the elements of the horizontal prediction gradient matrix are represented by X(i,j) and correspond to samples (i,j) of the current sub-block in the affine coded block, with i in the range of [0,sbW-1] and j in the range of [0,sbH-1]; The elements of the vertical prediction gradient matrix are represented by Y(i,j) and correspond to samples (i,j) of the current sub-block in the affine coded block, with i in the range of [0,sbW-1] and j in the range of [0,sbH-1]; 5. The method according to claim 1, wherein sbW represents the width of the current sub-block within the affine coded block and sbH represents the height of the current sub-block within the affine coded block.
6. prior to the step of performing a PROF process on a current sub-block of the affine coded block, 6. The method of claim 1, further comprising performing sub-block-based affine motion compensation on the current sub-block of the affine coded block to obtain a predicted sample value of the current sub-block.
7. 1. A method for prediction refinement using optical flow (PROF) for affine coded blocks, comprising: performing a PROF process on the current sub-block of the affine coded block to obtain refined predicted sample values of the current sub-block of the affine coded block, where a number of optical flow decision conditions are satisfied for the affine coded block; said step of performing a PROF process on a current sub-block of said affine coded block further comprising: performing optical flow processing on the current sub-block to obtain a delta prediction value of a current sample of the current sub-block; obtaining a refined predicted sample value of the current sample based on the delta predicted value of the current sample and a predicted sample value of the current sample of the current sub-block; Including, The plurality of optical flow determination conditions include: A first indication indicates that PROF is valid for a picture including the affine coded block, or a first indication indicates that PROF is valid for a slice associated with a picture including the affine coded block; and second indication information indicating that partitioning is applied to the affine coded block; said step of performing optical flow processing on said current sub-block to obtain delta predictions of current samples of said current sub-block, obtaining a second prediction matrix, the second prediction matrix being generated based on motion information of the current sub-block; generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on the second prediction matrix, the horizontal prediction gradient matrix and the vertical prediction gradient matrix having the same size, and the size of the second prediction matrix is greater than or equal to the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix; calculating a delta prediction value of the current sample of the current sub-block based on a horizontal prediction gradient value of the current sample in the horizontal prediction gradient matrix, a vertical prediction gradient value of the current sample in the vertical prediction gradient matrix, and a difference between a motion vector of the current sample of the current sub-block and a motion vector of a center sample of the sub-block; method.
8. prior to the step of performing a PROF process on a current sub-block of the affine coded block, The method of claim 7 , further comprising determining that the plurality of optical flow decision conditions are satisfied for the affine coded block.
9. The method according to claim 7 or 8, wherein the second indication information is a variable fallbackModeTriggered, the variable fallbackModeTriggered being set to 0 indicates that the affine coded block should be partitioned.
10. The step of obtaining a second prediction matrix comprises: generating a first prediction matrix based on motion information of the current sub-block, elements of the first prediction matrix corresponding to predicted sample values of the current sub-block; and generating the second prediction matrix based on the first prediction matrix; or The method of claim 7, comprising generating the second prediction matrix based on the motion information of the current sub-block.
11. The elements of the second prediction matrix are I 1 It is represented by (p,q), where p is in the range of [-1,sbW] and q is in the range of [-1,sbH]. the elements of the horizontal prediction gradient matrix are represented by X(i,j) and correspond to samples (i,j) of the current sub-block in the affine coded block, with i in the range of [0,sbW-1] and j in the range of [0,sbH-1]; The elements of the vertical prediction gradient matrix are represented by Y(i,j) and correspond to samples (i,j) of the current sub-block in the affine coded block, with i in the range of [0,sbW-1] and j in the range of [0,sbH-1]; 11. The method according to claim 7, wherein sbW represents the width of the current sub-block within the affine coded block and sbH represents the height of the current sub-block within the affine coded block.
12. prior to the step of performing a PROF process on a current sub-block of the affine coded block, 12. The method of claim 7, further comprising performing sub-block-based affine motion compensation on the current sub-block of the affine coded block to obtain a predicted sample value of the current sub-block.
13. An encoder (20) comprising processing circuitry for performing the method according to any one of claims 1 to 12.
14. A decoder (30) comprising processing circuitry for performing the method according to any one of claims 1 to 12.
15. A computer program for causing a computer to carry out the method according to any one of claims 1 to 12.
16. A decoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the decoder to perform the method of any one of claims 1 to 12.
17. 1. An encoder comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processor and storing programming for execution by the processor, the programming, when executed by the processor, configuring the encoder to perform the method of any one of claims 1 to 12.
18. A non-transitory computer readable medium carrying program code that, when executed by a computing device, causes the computing device to perform the method of any one of claims 1 to 12.
