Video coding method and apparatus using neighboring skip mode and regression-derived weights in overlapped block motion compensation
By optimizing OBMC processing and using different OBMC settings for neighboring blocks in skip mode and non-skip mode, the problems of high OBMC computational complexity and memory bandwidth are solved, thereby improving the efficiency and quality of video encoding and decoding.
Patent Information
- Application Number
- CN202580027576.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-06-28
- Filing Date
- 2025-03-21
- Publication Date
- 2026-11-20
AI Technical Summary
In existing video encoding and decoding technologies, the computational complexity and memory bandwidth requirements during Overlap Block Motion Compensation (OBMC) are relatively high. Especially when applying BIO and OBMC, it increases unnecessary computation and storage requirements, affecting encoding and decoding efficiency.
By optimizing OBMC processing, different OBMC settings are applied to neighboring blocks in skip mode and non-skip mode, including OBMC mixing rules, weights, and mixing lines. Combined with cost measurement and adaptive weight adjustment, the application of OBMC in video encoding and decoding is optimized.
It reduces the computational complexity and memory bandwidth requirements of OBMC processing, and improves the efficiency and quality of video encoding and decoding, especially when processing adjacent blocks in skip mode and non-skip mode, reducing redundant operations.
Smart Images

Figure CN123147147A_ABST
Abstract
Description
Cross-reference to related applications
[0001] This invention is a non-provisional application of U.S. Provisional Patent Application No. 63 / 632,565 (filed April 11, 2024) and U.S. Provisional Patent Application No. 63 / 665,519 (filed June 28, 2024), and claims priority thereto. The entire contents of the aforementioned U.S. Provisional Patent Applications are incorporated herein by reference. Technical Field
[0002] This invention relates to a video encoding and decoding system using Overlapped Block Motion Compensation (OBMC). Specifically, this invention relates to different OBMC settings for blocks having neighboring blocks encoded in skip mode and neighboring blocks encoded in non-skip mode. Background Technology
[0003] Versatile Video Coding (VVC) is the latest international video coding standard developed by the ITU-T Video Coding Experts Group (VCEG) and the Joint Video Experts Team (JVET) of the ISO / IEC Moving Picture Experts Group (MPEG). This standard has been published as an ISO standard: ISO / IEC 23090-3:2021, Information technology—Coded representation of immersive media—Part 3: Versatile video coding, published in February 2021. VVC was developed based on its predecessor, High Efficiency Video Coding (HEVC), by adding more coding and decoding tools to improve coding and decoding efficiency and enabling it to handle various types of video sources, including 3D video signals.
[0004] Figure 1AAn example adaptive inter-frame / intra-frame video coding system incorporating loop processing is illustrated. For intra-frame prediction 110, the prediction data is derived from previously encoded / decoded video data in the current image. For inter-frame prediction 112, motion estimation (ME) is performed at the encoder, and motion compensation (MC) is performed based on the results of ME to provide prediction data derived from other images and motion data. Switch 114 selects either intra-frame prediction 110 or inter-frame prediction 112, and the selected prediction data is provided to adder 116 to form a prediction error, also known as a residual. The prediction error is then processed by transform (T) 118, followed by quantization (Q) 120. The transformed and quantized residual is then encoded / decoded by entropy encoder 122 to be included in the video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packaged with side information, such as motion and encoding / decoding modes associated with intra-frame and inter-frame prediction, and other information such as parameters associated with loop filters applied to the underlying image regions. Side information related to intra-frame prediction 110, inter-frame prediction 112, and loop filter 130, such as Figure 1A The reference image is provided to the entropy encoder 122. When using inter-frame prediction mode, the reference image must also be reconstructed at the encoder. Therefore, the transformed and quantized residuals are processed by inverse quantization (IQ) 124 and inverse transformation (IT) 126 to recover the residuals. The residuals are then added back to the prediction data 136 at reconstruction (REC) 128 to reconstruct the video data. The reconstructed video data can be stored in the reference image buffer 134 and used for prediction of other frames.
[0005] like Figure 1A As shown, the input video data undergoes a series of processes in the encoding system. The reconstructed video data from REC128 may be subject to various impairments due to these processes. Therefore, a loop filter 130 is typically applied to improve video quality before the reconstructed video data is stored in the reference image buffer 134. For example, a deblocking filter (DF), sample adaptive offset (SAO), and adaptive loop filter (ALF) may be used. Loop filter information may need to be incorporated into the bitstream so that the decoder can correctly recover the required information. Therefore, loop filter information is also provided to the entropy encoder 122 for incorporation into the bitstream. Figure 1AIn the process, the loop filter 130 is applied to the reconstructed video before the reconstructed samples are stored in the reference image buffer 134. Figure 1A The system described here is intended to demonstrate an example architecture of a typical video encoder. It may correspond to a High Efficiency Video Codec (HEVC) system, VP8, VP9, H.264, or VVC.
[0006] like Figure 1B As shown, the decoder can use functional modules similar to or partially the same as the encoder, except for transform 118 and quantization 120, since the decoder only needs to perform inverse quantization 124 and inverse transform 126. The decoder uses entropy decoder 140 instead of entropy encoder 122 to decode the video bitstream into quantized transform coefficients and the necessary encoding / decoding information (e.g., ILPF information, intra-frame prediction information, and inter-frame prediction information). Intra-frame prediction 150 at the decoder end does not require mode search. Instead, the decoder only needs to generate intra-frame predictions based on the intra-frame prediction information received from entropy decoder 140. Furthermore, for inter-frame prediction, the decoder only needs to perform motion compensation (MC 152) based on the inter-frame prediction information received from entropy decoder 140, without performing motion estimation.
[0007] Overlapped Block Motion Compensation (OBMC) Overlapping Block Motion Compensation (OBMC) aims to find the linear minimum mean square error (LMMSE) estimate of pixel intensity values based on motion compensation signals derived from the motion vectors (MVs) of its neighboring blocks. From an estimation theory perspective, these motion vectors are considered as different reasonable assumptions about their true motion, and their weights should minimize the mean square prediction error under unity gain constraints to maximize encoding and decoding efficiency.
[0008] During the development of High-Efficiency Video Codec (HEVC), several schemes were proposed to use OBMC to provide encoding and decoding gain. Some of these schemes are described below.
[0009] In JCTVC-C251 (Peisong Chen et al., “Overlapping Block Motion Compensation in TMUC”, Joint Video Coding Team (JCT-VC) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11, Third Meeting: Guangzhou, China, October 7-15, 2010, Document: JCTVC-C251), OBMC is applied to geometric segmentation. In geometric segmentation, transform blocks are likely to contain pixels belonging to different segments. In geometric segmentation, since motion compensation uses two different motion vectors, pixels at the segmentation boundaries may have large discontinuities, producing visual artifacts similar to block effects. This, in turn, reduces transform efficiency. Let the two regions generated by geometric segmentation be denoted as Region 1 and Region 2, respectively. If any one of the four connected neighbors (left, top, right, bottom) of a pixel in Region 1 (2) belongs to Region 2 (1), then the pixel is defined as a boundary pixel. Figure 2 An example is shown where gray dots belong to the boundary of region 1 (gray region) and white dots belong to the boundary of region 2 (white region). If a pixel is a boundary pixel, motion compensation is performed using a weighted sum of the motion predictions of the two motion vectors. The weight is 3 / 4 for the motion vector prediction of the region containing the boundary pixel and 1 / 4 for the motion vector prediction of the other region. Overlapping boundaries improve the visual quality of the reconstructed video and also contribute to BD-rate gain.
[0010] In JCTVC-F299 (Liwei Guo et al., “CE2: Overlapped Block Motion Compensation for 2NxN and Nx2N Motion Partitions,” Joint Collaborative Team on Video Coding (JCT-VC), 6th Meeting: Turin, July 14-22, 2011, Document: JCTVC-F299), Overlapped Block Motion Compensation (OBMC) is applied to symmetrical motion partitions. If a coding unit (CU) is divided into two 2NxN or Nx2N prediction units (PUs), OBMC is applied to the horizontal boundaries of the two 2NxN prediction blocks and the vertical boundaries of the two Nx2N prediction blocks. Because these partitions may have different motion vectors, pixels at partition boundaries may exhibit significant discontinuities, which can produce visual artifacts and reduce transform / encoding / decoding efficiency. In JCTVC-F299, OBMC was introduced to smooth the boundaries of motion partitions.
[0011] Figure 3A and Figure 3B It shows 2NxN ( Figure 3A ) and Nx2N blocks ( Figure 3B Example of OBMC. Gray pixels belong to partition 0, and white pixels belong to partition 1. The overlapping area in the luminance component is defined as 2 rows (columns) of pixels on each side of the horizontal (vertical) boundary. For pixels 1 row (column) away from the partition boundary, i.e. Figure 3A and Figure 3B The pixel marked A has an OBMC weight factor of (3 / 4, 1 / 4). For pixels located 2 rows (columns) from the partition boundary, i.e. Figure 3A and Figure 3B For pixels marked B, the OBMC weight factor is (7 / 8, 1 / 8). For the chroma component, the overlapping area is defined as 1 row (column) of pixels on each side of the horizontal (vertical) boundary, with a weight factor of (3 / 4, 1 / 4).
[0012] Currently, OBMC is performed after regular motion compensation (MC), and BIO (Bi-Directional Optical Flow) is also applied to both MC processes. That is, the MC results for the overlapping region between two CUs or PUs are generated through a separate process, not within the regular MC process. Subsequently, BIO is applied to optimize these two MC results. This helps skip redundant OBMC and BIO processes when two adjacent motion vectors are identical. However, compared to integrating the OBMC process into the regular MC process, the bandwidth required for the overlapping region and the number of MC operations increase. For example, the current PU size is 16x8, the overlapping region is 16x2, and the interpolation filter in the MC has 8 taps. If OBMC were performed after the regular MC, we would need (16+7)x(8+7) + (16+7)x(2+7) = 552 reference pixels for each reference list for the current PU and the associated OBMC. If the OBMC operation is combined with the regular MC into a single stage, only (16+7)x(8+2+7) = 391 reference pixels are needed for each reference list of the current PU and the associated OBMC. Therefore, several methods are proposed below to reduce the computational complexity or memory bandwidth of BIO when both BIO and OBMC are enabled.
[0013] OBMC is also applied in JEM (Joint Exploration Model). Unlike H.263, OBMC in JEM can be switched on and off at the CU level via syntax. When using OBMC in JEM, it is applied to all motion compensation (MC) block boundaries, except for the right and bottom boundaries of the CU. Furthermore, it is applied to the luma and chroma components. In JEM, MC blocks correspond to codec blocks. When a CU is encoded / decoded in subCU modes (including subCU merging, affine, and FRUC modes), each sub-block of the CU is an MC block. To handle CU boundaries uniformly, OBMC is performed at the sub-block level at all MC block boundaries, with the sub-block size set to 4×4, such as... Figure 4A and Figure 4B As shown.
[0014] When OBMC is applied to the current sub-block, in addition to the current motion vector, the motion vectors of four connected neighboring sub-blocks (if available and different from the current motion vector) are used to derive the prediction block for the current sub-block. These multiple prediction blocks based on multiple motion vectors are combined to generate the final prediction signal for the current sub-block. The prediction block generated based on the neighboring sub-block motion vectors is denoted as PNn, where n represents the index of the adjacent upper, lower, left, and right sub-blocks, and the prediction block generated based on the current sub-block motion vector is denoted as PC. Figure 4A This demonstrates an OBMC example where the current CU 410's sub-blocks use the adjacent upper sub-block (PN1), the left adjacent sub-block (PN2), and the upper left sub-block (PN3). Figure 4B An example of OBMC in ATMVP mode is shown, where the current CU 420 block PN performs OBMC using the motion vectors of its four neighboring sub-blocks. OBMC is not performed on PN when it is based on the motion information of neighboring sub-blocks containing the same motion information as the current sub-block. Otherwise, each sample of PN is added to the same position sample of PC, i.e., four rows / columns of PN are added to PC. The weighting factors for PN are {1 / 4, 1 / 8, 1 / 16, 1 / 32}, and the weighting factors for PC are {3 / 4, 7 / 8, 15 / 16, 31 / 32}. An exception is small MC blocks (i.e., the height or width of the codec block is equal to 4, or the CU is encoded / decoded in sub-CU mode), in which case only two rows / columns of PN are added to PC. In this case, the weighting factors for PN are {1 / 4, 1 / 8}, and the weighting factors for PC are {3 / 4, 7 / 8}. For PN generated based on the motion vectors of vertical (horizontal) neighboring sub-blocks, samples in the same row (column) of PN are added to PC with the same weight factor.
[0015] In JEM, for CUs with 256 or fewer luminance samples, a flag is passed at the CU level to indicate whether the current CU applies OBMC. For CUs with more than 256 luminance samples or CUs not encoded / decoded in AMVP mode, OBMC is applied by default. At the encoder end, when a CU applies OBMC, its impact is considered during the motion estimation stage. The predicted signal formed by OBMC using motion information from the top and left neighboring blocks is used to compensate for the top and left boundaries of the original signal of the current CU, and then the regular motion estimation process is performed.
[0016] In JEM (Joint Exploration Model, used for VVC development), OBMC (Overlapped Block Motion Compensation) is applied. For example, ... Figure 5 As shown, for the current block 510, if the upper block and the left block are encoded and decoded in inter-frame mode, the MV (Motion Vector) of the upper block is used to generate OBMC block A, and the MV of the left block is used to generate OBMC block L. The predicted values of OBMC block A and OBMC block L are mixed with the current predicted value. To reduce the memory bandwidth of OBMC, the above-mentioned 4-row motion compensation and 4-column motion compensation on the left are proposed with neighboring blocks. For example, when performing motion compensation for the upper block, 4 additional rows are obtained to generate a (upper block + OBMC block A) block. The predicted value of OBMC block A is stored in a buffer for encoding and decoding the current block. When performing motion compensation for the left block, 4 additional columns are obtained to generate a (left block + OBMC block L) block. The predicted value of OBMC block L is stored in a buffer for encoding and decoding the current block. Therefore, when performing motion compensation for the current block, four additional rows and four additional columns of reference pixels are obtained to generate the predicted values of the current block, OBMC block B, and OBMC block R, as shown. Figure 6A As shown (OBMC block BR can also be generated, such as) Figure 6B (As shown). OBMC block B and OBMC block R are stored in a buffer for OBMC processing of the bottom neighbor block and the right neighbor block.
[0017] For an MxN block, if MV is not an integer and an 8-tap interpolation filter is applied, the reference block size for motion compensation is (M+7)x(N+7). However, if BIO and OBMC are applied, additional reference pixels are required, which increases the worst-case memory bandwidth.
[0018] OBMC based on template matching Recently, a template-matching-based OBMC scheme (JVET-Y0076) was proposed for use with emerging international codec standards. For example... Figure 7 As shown, for each 4×4 top block located at the top CU (Coding Unit) boundary, the upper template size is equal to 4×1. Figure 7In the diagram, box 710 corresponds to a CU. If N neighboring blocks have the same motion information, the upper template size is increased to 4N×1 because motion compensation operations can be processed in one go, which is the same as the ECM-OBMC (Enhanced Coding Model OBMC) approach. For each 4×4 left block located at the left CU boundary, the left template size is equal to 1×4 or 1×4N.
[0019] For each 4×4 top block (or N groups of 4×4 blocks), the predicted value of the boundary sample is derived according to the following steps: - Taking block A as the current block and its upper neighbor block AboveNeighbour_A as an example. The operation method for the left block is the same.
[0020] First, the cost of matching three templates is measured using SAD (Sum of Absolute Differences). , , That is, the SAD between the reconstructed sample of the template and the corresponding reference sample obtained through the motion compensation process, which corresponds to the following three types of motion information: Calculated based on the motion information of A.
[0021] Calculated based on the motion information of AboveNeighbour_A.
[0022] Based on the weighted prediction calculation using the motion information of A and AboveNeighbour_A, the weighting factors are 3 / 4 and 4 / 4, respectively. .
[0023] - Secondly, by comparing Cost1, Cost2 and Cost3, one of the three methods is selected to calculate the final prediction result of the boundary sample.
[0024] The original motion compensation result using the current block motion information is denoted as... The motion compensation result using neighboring block motion information is denoted as The final prediction result is denoted as .
[0025] -If Cost1 is the minimum, then .
[0026] - If (Cost2 + (Cost2>>2) + (Cost2>>3))<= Cost1, then use mixed mode 1.
[0027] For the luminance block, the number of mixed pixel rows is 4.
[0028] - ; - ; - ; - ; For chroma blocks, the number of mixed pixel rows is 1.
[0029] - ; - If Cost1 <= Cost2, then use Mixed Mode 2.
[0030] For a luminance block, the number of mixed pixel rows is 2.
[0031] - ; - ; For chroma blocks, the number of mixed pixel rows / columns is 1.
[0032] - ; - Otherwise, use mixed mode 3.
[0033] For a luminance block, the number of mixed pixel rows is 4.
[0034] - ; - ; - ; For chroma blocks, the number of mixed pixel rows is 1.
[0035] - .
[0036] VVC Inter-Frame Prediction For each inter-frame prediction coding unit (CU), motion parameters include motion vectors, reference image indices, and reference image list usage indices, as well as additional information required for generating inter-frame prediction samples for new VVC coding features. Motion parameters can be passed explicitly or implicitly. When a CU is encoded in skip mode, it is associated with a prediction unit (PU) and has no significant residual coefficients, uncoded motion vector increments, or reference image indices. A merging mode is specified where the motion parameters of the current CU are obtained from neighboring CUs, including spatial and temporal candidates, as well as additional scheduling introduced in VVC. The merging mode can be applied to any inter-frame prediction CU, not just skip mode. An alternative to the merging mode is explicit passing of motion parameters, where the motion vectors for each CU, the reference image indices for each reference image list, the reference image list usage flags, and other required information are all explicitly passed.
[0037] Affine Motion Compensation Prediction In HEVC, only the translational motion model is applied to motion compensation prediction (MCP). However, in the real world, there are various types of motion, such as scaling, rotation, perspective motion, and other irregular motions. In VVC, block-based affine transformation motion compensation prediction is applied. Figure 8A and Figure 8B As shown, the affine motion field of block 810 is composed of Figure 8A Motion information of two control points (4 parameters) or Figure 8B The motion vectors (6 parameters) of the three control points are described.
[0038] For the 4-parameter affine motion model, the motion vector at the sample position (x, y) in the block is derived as follows: (1) For the 6-parameter affine motion model, the motion vector at the sample position (x, y) in the block is derived as follows: (2) Among them (mv) 0x ,mv 0y (mv) is the motion vector of the top left control point. 1x ,mv 1y (mv) is the motion vector of the upper right control point. 2x ,mv 2y ) is the motion vector of the lower left control point.
[0039] To simplify motion compensation prediction, a block-based affine transformation prediction method is used. To derive the motion vector for each 4×4 lumen sub-block, as follows... Figure 9As shown, the motion vector of the center sample of each sub-block is calculated according to the above formula and rounded to 1 / 16 fractional precision. Then, a motion-compensated interpolation filter is applied to generate the prediction for each sub-block using the derived motion vector. The sub-block size for the chroma component is also set to 4×4. The motion vector of the 4×4 chroma sub-block is calculated by taking the average of the motion vectors of the upper left and lower right luminance sub-blocks within the corresponding 8×8 luminance region.
[0040] Similar to translational motion inter-frame prediction, there are also two affine motion inter-frame prediction modes: affine merging mode and affine AMVP mode.
[0041] Affine Merging Prediction The AF_MERGE mode can be applied to codec units (CUs) with a width and height greater than or equal to 8. In this mode, the current CU's CPMV (Control Point Motion Vector) is generated based on the motion information of spatially adjacent CUs. There can be a maximum of five CPMVP (Control Point Motion Vector Prediction) candidates, indicated by an index, representing the candidate currently used by the CU. The following three types of CPMV candidates are used to form the affine merging candidate list: - Inheritance affine merge candidates obtained by extrapolating the CPMV of neighboring CUs; - Construct affine merging candidate CPMVPs by deriving the translational motion vectors of neighboring CUs; -Zero motion vector.
[0042] In VVC, there are at most two inherited affine candidates, derived from the affine motion models of neighboring blocks, one from the left neighboring CU and the other from the upper neighboring CU. The candidate block for the current CU 1010 is... Figure 10 The same applies. For left-side prediction, the scan order is A0->A1; for top-side prediction, the scan order is B0->B1->B2. Only the first successor candidate is selected for each side. No pruning check is performed between two successor candidates. When a neighboring affine CU is identified, its control point motion vector is used to derive CPMVP candidates in the affine merging list of the current CU. Figure 11 As shown, if the lower left neighboring block A of the current block 1110 is encoded and decoded in affine mode, then the motion vectors of the upper left, upper right, and lower left corners of CU 1120 containing block A are... , and Acquired. When block A is encoded and decoded using a 4-parameter affine model, the two CPMVs of the current CU (i.e. and )according to and Perform calculations. If block A is encoded and decoded using a 6-parameter affine model, then the three CPMVs of the current CU are calculated according to... , and Perform the calculation.
[0043] Constructing affine candidates involves building candidates by combining the translational motion information of each control point's neighbors. The motion information of the control points is derived from the spatial and temporal neighbors specified in the current block 1210, such as... Figure 12 As shown. CPMVk (k=1, 2, 3, 4) represents the k-th control point. For CPMV1, check the B2->B3->A2 block and use the motion vector of the first available block. For CPMV2, check the B1->B0 block; for CPMV3, check the A1->A0 block. If TMVP is available, it is used as CPMV4.
[0044] After obtaining the motion vectors of the four control points, affine merging candidates are constructed based on the motion information. The following combinations of control point motion vectors are used in sequence for construction: {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}.
[0045] Combining three sets of CPMVs constructs a 6-parameter affine merging candidate, while combining two sets of CPMVs constructs a 4-parameter affine merging candidate. To avoid issues during motion scaling, if the reference indices of the control points are different, the combination of motion vectors of the relevant control points is discarded.
[0046] After checking the inherited affine merge candidates and constructing the affine merge candidates, if the list is still not full, insert a zero motion vector at the end of the list.
[0047] Affine AMVP Prediction The affine AMVP mode can be applied to CUs with a width and height greater than or equal to 16. An affine flag is passed in the CU-level bitstream indicating whether the affine AMVP mode is used, followed by another flag indicating whether to use a 4-parameter affine or a 6-parameter affine. In this mode, the difference between the current CU's CPVM and its predicted CPMVP is passed in the bitstream. The affine AVMP candidate list is 2 in size and is generated in the following order of the four CPVM candidate types: - Inherited affine AMVP candidates obtained by extrapolating the CPMV from neighboring CUs; - Construct affine AMVP candidate CPMVP by deriving the translational motion vector of neighboring CUs; - Translational motion vector from the neighboring CU; -Zero motion vector.
[0048] The checking order for inherited affine AMVP candidates is the same as that for inherited affine merge candidates. The only difference is that for AVMP candidates, only affine CUs with the same reference image as the current block are considered. No pruning is performed when inserting inherited affine motion predictions into the candidate list.
[0049] Constructing AMVP candidates by Figure 10 The specified spatial neighbor derivation is shown. Its checking order is the same as during affine merge candidate construction. Additionally, the reference image index of neighboring blocks is checked. In the checking order, the first block encoded / decoded in inter-frame mode with the same reference image as the current CU is used. When the current CU is encoded / decoded in 4-parameter affine mode, and... and If all three CPMVs are available, add it as a candidate to the affine AMVP list. If the current CU is encoding / decoding in 6-parameter affine mode and all three CPMVs are available, add it as a candidate to the affine AMVP list. Otherwise, the constructed AMVP candidate is set to unavailable.
[0050] After inserting valid inherited affine AMVP candidates and constructing AMVP candidates, if the number of candidates in the affine AMVP list is still less than 2, then add them in order as they become available. , and As translational motion vectors, these are used to predict the motion vectors of all control points in the current CU. Finally, if the list is still not full, the affine AMVP list is filled with zero motion vectors.
[0051] JVET-AC0164 Non-EE2: Improvements to Local Illumination Compensation in ECM 7.0 In ECM-7.0, local illumination compensation (LIC) is an inter-frame coding and decoding technique designed to address illumination variations between a block and its predicted block. LIC is based on a linear model, where the scaling factor... and offset The LIC parameters are derived from the template samples of the neighboring current block and their corresponding predicted samples. The derived LIC parameters are then used to adjust the predicted samples for that block, as follows: .
[0052] Currently, LIC is only applicable to uni-predictive inter-CUs containing no fewer than 32 luminance samples.
[0053] In addition, overlapped block motion compensation (OBMC) is another inter-frame tool in ECM 7.0. It mitigates discontinuities between inter-frame block prediction samples by adjusting the boundary prediction samples of an inter-frame block / sub-block using the motion vectors (MV) of neighboring blocks. According to the existing ECM design, OBMC is always disabled when LIC is applied to an inter-frame block. Furthermore, when LIC is applied to a neighboring block of the current inter-frame codec unit (CU), only its motion vectors are used to generate the corresponding prediction samples for OBMC processing of the current CU.
[0054] To further improve the encoding and decoding efficiency of the LIC tool, the following modifications are proposed.
[0055] Bidirectional prediction LIC This paper proposes extending the existing LIC design to bi-predicted inter-frame coding and decoding units (bi-predicted CUs). Specifically, when the proposed method is applied to a bi-predicted block, two different linear models are derived to compensate for the illumination variations between the current block and its two prediction blocks. Then, the final bi-predicted result of the current block is calculated by combining the two uni-predicted blocks adjusted by the LIC, i.e.: ,as well as , , in and ,as well as and These represent the scaling factor and offset in L0 and L1, respectively; This indicates the weights applied when combining two unidirectional prediction blocks (indicated by the CU-level BCW index).
[0056] Similar to the current LIC design, a control flag is set for AMVP bidirectional prediction CUs to indicate whether the LIC is enabled or disabled, while for merged inter-frame CUs (including AMVP-merged mode), this flag is inherited from a neighboring block. Furthermore, the LIC is disabled when decoder-side motion vector refinement (DMVR, including multiple DMVR, adaptive DMVR, and affine DMVR) and bidirectional optical flow (BDOF) are applied.
[0057] To reuse the existing linear model derivation of LIC, an iterative method is used to alternately derive the linear models of L0 and L1. Specifically, given the two motion vectors of the current block, assume... and It is the current block template The method first derives the L0 linear model ( ). and ), to make and Minimize the difference between them; then calculate the L1 linear model ( and ), to minimize The differences between the updated template and the current one are then analyzed. Finally, the L0 linear model is refined in the same way.
[0058] LIC and OBMC To better handle the interaction between LIC and OBMC, the following two changes are applied: 1) It is proposed to enable OBMC on inter-frame blocks where LIC is applied. In addition, to achieve a better complexity / performance tradeoff, OBMC is only used to refine the prediction samples on the top and left boundaries of a LIC inter-frame codec unit, while OBMC on the boundaries of internal sub-blocks is always disabled.
[0059] 2) In addition to motion vectors, it is proposed that when generating corresponding prediction samples for the OBMC of the current CU, the LIC parameter of a neighboring block should also be considered (when the neighboring block is encoded and decoded by LIC).
[0060] Multi-hypothesis prediction (MHP) In the multi-hypothesis inter-frame prediction mode (JVET-M0425), one or more additional motion-compensated prediction signals are transmitted in addition to the traditional bidirectional prediction signal. The final overall prediction signal is obtained by weighted summation of samples. For bidirectional / unidirectional prediction signals... and the first additional inter-frame prediction signal / hypothesis Final prediction signal Obtain it as follows: ; The weighting factor α is specified by the new syntax element add_hyp_weight_idx, with the following mapping: add_hyp_weight_idx = 0, α => 1 / 4; add_hyp_weight_idx = 1, α = -1 / 8.
[0061] Similar to the method described above, multiple additional prediction signals can be used. The final overall prediction signal is obtained by iteratively summing it with each additional prediction signal.
[0062] .
[0063] The final overall prediction signal is the last Obtain (i.e., have the largest index) A maximum of two additional prediction signals can be used (i.e., (Limited to 2).
[0064] Motion parameters for each additional prediction hypothesis can be passed either by explicitly specifying the reference index, motion vector predictor index, and motion vector difference, or by implicitly specifying the merge index. A separate multi-hypothesis merge flag distinguishes between these two passing modes.
[0065] For inter-frame AMVP mode, MHP is only applied when unequal weights are selected in BCW in bidirectional prediction mode.
[0066] Combining MHP with BDOF is possible, but BDOF is only applied to the bidirectional prediction portion of the predicted signal (i.e., the ordinary first two assumptions).
[0067] Bi-prediction with CU-level weight (BCW) In HEVC, bidirectional prediction signals Two prediction signals are obtained by combining two different reference images and / or using two different motion vectors. and The average is generated. In VVC, the dual prediction mode is not limited to simple averaging; it also allows for weighted averaging of the two prediction signals.
[0068] .
[0069] Five weights are allowed in weighted average two-way forecasting. For each bidirectional predictive codec unit (CU), the weight w is determined in one of two ways: 1) for non-merged CUs, the weight index is signaled after the motion vector difference; 2) for merged CUs, the weight index is inferred from neighboring blocks based on the merge candidate index. BCW is applied only to CUs with 256 or more luma samples (i.e., CU width multiplied by CU height is greater than or equal to 256). For low-latency images, all five weights are used. For non-low-latency images, only three weights are used (w ∈ {3,4,5}).
[0070] At the encoder end, a fast search algorithm is employed to find the weight index without significantly increasing encoder complexity. These algorithms are summarized below. Details are disclosed in the VTM software and document JVET-L0646 (Yu-Chi Su et al., “CE4 Related: Generalized Dual Prediction Improvement from the Merger of JVET-L0197 and JVET-L0296,” ITU-T SG 16 WP 3 and ISO / IEC JTC1 / SC 29 Joint Video Experts Group (JVET), 12th Meeting: Macau, China, October 3-12, 2018, document: JVET-L0646).
[0071] - When combined with AMVR (Adaptive Motion Vector Resolution), unequal weights are conditionally checked for 1-pixel and 4-pixel motion vector resolution only when the current image is a low-latency image.
[0072] - When combined with an affine mode, affine motion estimation is performed on unequal weights only if the affine mode is selected as the current best mode.
[0073] - When the two reference images in a dual prediction are the same, unequal weights are checked only conditionally.
[0074] -Unequal weights are not searched when certain conditions are met, depending on the POC distance between the current image and its reference image, the encoding / decoding QP, and the temporal level.
[0075] The BCW weight index is encoded using a context codec bit followed by a bypass codec bit. The first context codec bit indicates whether equal weights are used; if unequal weights are used, additional bits in the bypass codec signaling indicate the unequal weights used.
[0076] Weighted prediction (WP) is a codec tool supported by the H.264 / AVC and HEVC standards for efficient encoding and decoding of video content with fade-in and fade-out. WP support has also been added to the VVC standard. WP allows signaling weighting parameters (weights and offsets) in each reference image list L0 and L1 for each reference image. Then, during motion compensation, the weights and offsets of the corresponding reference images are applied. WP and BCW are designed for different types of video content. To avoid interaction between WP and BCW, which would complicate the VVC decoder design, if the CU uses WP, the BCW weight index is not signaled, and the weight w is inferred to be 4 (i.e., equal weights are applied). For merging CUs, the weight index is inferred from neighboring blocks based on the merge candidate index. This can be applied to both normal merge patterns and inherited affine merge patterns. For constructed affine merge patterns, the affine motion information is constructed based on the motion information of up to 3 blocks. The BCW index of the CU constructing the affine merge pattern is simply set to the BCW index of the motion vector of the first control point.
[0077] In VVC, CIIP (composite intra / inter prediction) and BCW cannot be jointly applied to the same CU. When a CU is encoded and decoded in CIIP mode, the BCW index of the current CU is set to 2 (i.e., w=4, indicating equal weight). Equal weight implies the default value of the BCW index.
[0078] Regression-based GPM mixture The regression-based GPM (Generalized Prediction Merging) merging pattern is designed as an additional implicit GPM pattern, where two integer merging matrices ( W 0 and W 1) This is derived from the template (top row, left column). The mixing matrix is modeled as an affine linear function of the sample position (x, y) in the current CU: W0(x,y) = ax + by + c and W1(x,y) = 1 - W0(x,y).
[0079] The parameters (a, b, c) are derived from the reference template using the same solver (MSE minimization) as CCCM (context-based color component merging). The candidate pair list is constructed from regular GPM candidates and reordered according to template cost.
[0080] GPM implicit mode uses a CU-level flag (gpm_implicit_flag) for signaling. If gpm_implicit_flag is true, the merge-idx is encoded to use GPM candidate pairs for signaling. If gpm_implicit_flag is false, the signaling uses regular GPM syntax elements.
[0081] In current template-matching-based OBMC (overlapped block motion compensation) designs, both neighboring motions and the current motion are used to generate the template predictor. The cost between the template predictor and neighboring reconstructed samples is compared. When neighboring blocks are encoded / decoded in skip mode, template matching may favor the template predictor of the neighboring motion because there are no residuals in the neighboring blocks. In this case, template matching may fail to determine the optimal mixing line and mixing weights in the OBMC. Therefore, this invention discloses several novel methods for neighboring blocks encoded / decoded in skip mode. Summary of the Invention
[0082] A method and apparatus for video encoding and decoding using OBMC (Overlapped Block Motion Compensation) are disclosed. According to the method, input data containing a current block, a current sub-block, a neighboring block, or a neighboring sub-block is received. One or more OBMC settings related to OBMC processing are determined. Depending on whether one or more corresponding neighboring blocks of the current block are in skip mode or non-skip mode, one or more target OBMC settings are selected from the one or more OBMC settings. Using the one or more target OBMC settings, the OBMC processing is applied to at least one boundary of the current block, the current sub-block, the neighboring block, and the neighboring sub-block.
[0083] In one embodiment, the one or more OBMC settings include one or more OBMC mixing rules, one or more OBMC mixing weights and mixing lines, one or more cost-based metrics, adaptive weight decisions, or combinations thereof. In one embodiment, when one or more corresponding neighboring blocks of the current block are encoded and decoded in the skip mode, the one or more cost-based metrics correspond to boundary matching or bilateral matching. In one embodiment, when one or more corresponding neighboring blocks of the current block are encoded and decoded in the skip mode, the one or more OBMC settings further include one or more prediction generation settings. In one embodiment, the one or more prediction generation settings correspond to template prediction generation settings, and when one or more corresponding neighboring blocks of the current block are encoded and decoded in the skip mode, the template prediction generation settings are set to the same settings as the neighbor prediction generation settings. In one embodiment, the template prediction generation settings include BCW index settings, DMVR flag settings, or BDOF settings.
[0084] In one embodiment, when template matching is enabled for the current block, the one or more OBMC settings further include one or more template matching-based OBMC decision rules. In one embodiment, only a subset of the one or more template matching-based OBMC decision rules, a subset of the rules, or other different types of template matching-based OBMC decision rules are allowed for the skip mode or the non-skip mode. In one embodiment, different or partially different OBMC blend rules are used for the skip mode or the non-skip mode. In one embodiment, 2-line OBMC is used when one or more corresponding neighboring blocks of the current block are encoded or decoded in the skip mode. In one embodiment, the one or more template matching-based OBMC decision rules are the same rules in both the skip mode and the non-skip mode, except that some different thresholds are used in cost calculation. In one embodiment, the one or more template-matching-based OBMC decision rules in the TM-based OBMC include the number of OBMC lines selected, and the number of OBMC lines selected is determined by the neighbor motion cost multiplied by one or more respective thresholds, wherein when one or more corresponding neighboring blocks of the current block are encoded and decoded in the skip mode, the one or more respective thresholds correspond to one or more first thresholds; when one or more corresponding neighboring blocks of the current block are encoded and decoded in the non-skip mode, the one or more respective thresholds correspond to one or more second thresholds, and the one or more first thresholds are different from the one or more second thresholds.
[0085] In one embodiment, one or more OBMC settings for the skip mode differ from those for the non-skip mode. Attached Figure Description
[0086] Figure 1AAn adaptive inter-frame / intra-frame video coding system incorporating loop processing is illustrated as an example.
[0087] Figure 1B Explanation Figure 1A The corresponding decoder for the encoder.
[0088] Figure 2 An example illustrating overlapping motion compensation for geometric segmentation is given.
[0089] Figure 3A and Figure 3B This explains 2NxN ( Figure 3A ) and Nx2N blocks ( Figure 3B OBMC example.
[0090] Figure 4A An example of a sub-block applying OBMC is illustrated, where the example includes a sub-block located at the CU / PU boundary.
[0091] Figure 4B An example of applying OBMC to a sub-block is provided, which includes a sub-block encoded and decoded in AMVP mode.
[0092] Figure 5 This example illustrates OBMC processing of the current block using the blocks above and to the left of the current block.
[0093] Figure 6A This example illustrates how OBMC processing is applied to the right and bottom portions of the current block using neighboring blocks from the right and bottom.
[0094] Figure 6B This example illustrates how OBMC processing is applied to the right and bottom portions of the current block using neighboring blocks from the right, bottom, and lower right.
[0095] Figure 7 This illustrates an example of an OBMC based on template matching, where for each top block with a size of 4×4 located at the top CU boundary, the upper template size is equal to 4×1.
[0096] Figure 8A An example of an affine motion field for a block described by motion information from two control points (4 parameters) is illustrated.
[0097] Figure 8B An example of an affine motion field for a block described by motion vectors (6 parameters) of three control points is illustrated.
[0098] Figure 9 An example of block-based affine transformation prediction is illustrated, where the motion vector of each 4×4 luma subblock is derived from the control point MV.
[0099] Figure 10 Examples of neighboring blocks used to derive VVC space merge candidates are provided.
[0100] Figure 11 An example of deriving inheritance affine candidates based on neighboring block control point MV is provided.
[0101] Figure 12 An example is illustrated by constructing an affine candidate by combining translational motion information from each control point from spatial and temporal neighbors.
[0102] Figure 13 An example of a reasonable model checking method is provided, in which model differences are checked at predefined locations.
[0103] Figure 14 An example of a reasonable model checking method is illustrated, in which regression weights are checked at position (x,y).
[0104] Figure 15 illustrates three interval examples for TM-based OBMC decision-making, where the adjacent motion cost is in skip mode ( Figure 15A ) and non-skip mode ( Figure 15B Multiply by A and B respectively.
[0105] Figure 16 illustrates five interval examples for TM-based OBMC decision-making, where adjacent motion costs are in skip mode ( Figure 16A ) and non-skip mode ( Figure 16B Multiply by A and B respectively.
[0106] Figure 17 A flowchart illustrating an exemplary video codec system is provided, wherein one or more OBMC settings in the skip mode differ from those in the non-skip mode, according to an embodiment of the present invention. Detailed Implementation
[0107] It will be readily understood that the components of the present invention, as generally described and illustrated in the figures, can be arranged and designed in various different configurations. Therefore, the following more detailed description of embodiments of the system and method of the present invention, as shown in the figures, is not intended to limit the scope of the invention as described in the claims, but only represents selected embodiments of the invention. References to “an embodiment,” “one embodiment,” or similar language throughout the specification mean that a particular feature, structure, or characteristic described in relation to that embodiment may be included in at least one embodiment of the invention. Therefore, “in one embodiment” or “in one embodiment” appearing throughout the specification do not necessarily refer to the same embodiment.
[0108] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. However, those skilled in the art will recognize that the invention can be practiced without one or more specific details, or using other methods, components, etc. In other examples, well-known structures or operations have not been shown or described in detail to avoid obscuring certain aspects of the invention. Illustrative embodiments of the invention will be best understood by referring to the accompanying drawings, in which like parts are designated with the same numerals throughout the drawings. The following description is merely illustrative and illustrates only certain selected device and method embodiments consistent with the claims of the invention.
[0109] OBMC's neighbor skip mode In current template-matching-based OBMC (Overlapping Block Motion Compensation) designs, both neighboring motions and the current motion are used to generate template predictions, and the cost between the template predictions and neighboring reconstructed samples is compared. When neighboring blocks are encoded and decoded in skip mode, template matching may favor the template predictions of neighboring motions because there are no residuals in the neighboring blocks. In this case, template matching may fail to determine the optimal mixing line and mixing weights in the OBMC. Therefore, several novel methods are disclosed for neighbor-skip mode encoding and decoding blocks.
[0110] When neighboring blocks are encoded and decoded in skip mode, template matching-based OBMC can follow different decision rules, OBMC mixing rules can be different, or prediction generation settings in motion compensation can be different.
[0111] Example 1. Template matching-based OBMC decision rules when neighboring blocks are encoded and decoded in skip mode and template matching is enabled. In one embodiment, if template matching is enabled and neighboring blocks are encoded in skip mode, the template matching-based OBMC decision rules for these sub-blocks differ from those for other sub-blocks whose corresponding neighboring blocks are not encoded in skip mode. For example, only certain decision rules may be allowed, a subset of template matching-based decision rules may be allowed, or other different types of template matching-based decision rules may be allowed. Other examples include allowing only 2-line or 3-line OBMC in template matching decisions, always using N-line OBMC in template matching decisions, or always using fixed OBMC weights in template matching decisions.
[0112] Example 2. OBMC mixing rules when neighboring blocks are encoded and decoded in skip mode and template matching is enabled. In one embodiment, if template matching is enabled and neighboring blocks are encoded in skip mode, the OBMC mixing rules for these sub-blocks differ from those for other sub-blocks whose corresponding neighboring blocks are not encoded in skip mode. For example, different or partially different OBMC mixing rules may be used. For instance, 2-line OBMC may always be used when neighboring blocks are encoded in skip mode. Alternatively, the TM base rules may be almost identical, except for some different thresholds used in cost calculations. For example, decision rules may be employed, such as more mixing lines or stronger weights than the original OBMC mixing rules. Yet another example is employing decision rules, such as fewer mixing lines or weaker weights than the original OBMC mixing rules.
[0113] Example 3. OBMC blending weights and OBMC blending lines when neighboring blocks are encoded and decoded in skip mode and template matching is enabled. In one embodiment, if template matching is enabled and neighboring blocks are encoded in skip mode, the OBMC blending weights or OBMC blending lines of these sub-blocks differ from those of other sub-blocks, where the corresponding neighboring blocks are not encoded in skip mode. For example, stronger weights or more blending lines are used. Alternatively, weaker weights or fewer blending lines are used.
[0114] Example 4. Cost-based metrics when neighboring blocks are encoded and decoded in skip mode and template matching is enabled. In one embodiment, if template matching is enabled and neighboring blocks are encoded in skip mode, a cost-based metric is used for these sub-blocks. For example, boundary matching is used for these sub-blocks encoded in skip mode. Alternatively, if these sub-blocks are encoded in bidirectional prediction mode, bilateral matching is used for these sub-blocks encoded in skip mode.
[0115] Example 5. Adaptive weight decision when neighboring blocks are encoded and decoded in skip mode and template matching is enabled. In another embodiment, if template matching is enabled and neighboring blocks are encoded / decoded in skip mode, a cost-based metric is used for these sub-blocks. For example, an adaptive weight decision rule similar to that used in template matching-based OBMC is employed.
[0116] Example 6. OBMC mixing rules when neighboring blocks are encoded and decoded in skip mode and template matching is disabled. In one embodiment, if template matching is disabled and neighboring blocks are encoded in skip mode, the OBMC mixing rules for these sub-blocks differ from those for other sub-blocks where the corresponding neighboring blocks are not encoded in skip mode. For example, different or partially different OBMC mixing rules may be used. Another example is always using 2-line OBMC when neighboring blocks are encoded in skip mode. Yet another example is that the TM base rules are almost identical, except for using some different thresholds in cost calculation. Yet another example is employing decision rules, such as more mixing lines or stronger weights than the original OBMC mixing rules.
[0117] Example 7. OBMC blending weights and OBMC blending lines when neighboring blocks are encoded and decoded in skip mode and template matching is disabled. In one embodiment, if template matching is disabled and neighboring blocks are encoded in skip mode, the OBMC blending weights or OBMC blending lines of these sub-blocks differ from those of other sub-blocks whose corresponding neighboring blocks are not encoded in skip mode. For example, stronger weights or more blending lines are used. Alternatively, weaker weights or fewer blending lines are used.
[0118] Example 8. Cost-based metrics when neighboring blocks are encoded and decoded in skip mode and template matching is disabled. In one embodiment, if template matching is disabled and neighboring blocks are encoded in skip mode, a cost-based metric is used for these sub-blocks. For example, boundary matching is used for these sub-blocks encoded in skip mode. Alternatively, if these sub-blocks are encoded in bidirectional prediction mode, bilateral matching is used for these sub-blocks encoded in skip mode.
[0119] Example 9. Adaptive weight decision when neighboring blocks are encoded and decoded in skip mode and template matching is disabled. In another embodiment, if template matching is disabled and neighboring blocks are encoded / decoded in skip mode, a cost-based metric is used for these sub-blocks. For example, an adaptive weight decision rule similar to that used in template matching-based OBMC is employed.
[0120] Example 10. Prediction generation settings when encoding and decoding neighboring blocks in skip mode In one embodiment, when neighboring blocks are encoded and decoded in skip mode, the template prediction generation settings are set to the same settings as the neighbor prediction generation settings. For example, the template prediction generation settings may correspond to BCW index settings, DMVR flag settings, or BDOF settings.
[0121] In another embodiment, when neighboring blocks are encoded and decoded in skip mode, the OBMC (Overlapping Block Motion Compensation, or OBMC for short) overlap prediction generation settings are set to the same settings as the neighbor prediction generation settings. For example, the OBMC overlap prediction generation settings may correspond to the BCW index settings, DMVR flag settings, or BDOF settings.
[0122] Example 11. Template prediction storage when prediction is encoded and decoded in skip mode for OBMC In one embodiment, when a block is encoded / decoded in skip mode, predictions are stored for use by OBMC. Unlike regenerating predictions for OBMC processing, predictions are stored in advance. For subsequent blocks where OBMC will be performed, the stored predictions are used to perform OBMC mixing in those subsequent blocks.
[0123] Example 12. Hybrid rules, hybrid weights, or template-matching-based decision rules are applied only to scenarios where the current block is encoded / decoded in non-skip mode and neighboring blocks are encoded / decoded in skip mode. In one embodiment, different mixing rules, different mixing weights, or different template matching-based decision rules are used only when the neighboring block is encoded in skip mode and the current block is encoded in non-skip mode.
[0124] Regression-based weights in template-matching OBMC In current template-matching-based OBMC designs, three motions are evaluated to determine the optimal match between the template predictor and neighboring reconstructed samples. However, due to the variety of video content and objects, the limited motion options may not achieve the optimal match between the template predictor and neighboring reconstructed samples. A regression-based weighting approach for template-matching-based OBMC is proposed.
[0125] Derivation based on regression weights In template-matching-based OBMC, three costs are calculated as follows: , , .
[0126] These three terms correspond to the costs of the current motion template predictor and neighboring reconstructed samples, the costs of the neighboring motion template predictor and neighboring reconstructed samples, and the costs of the hybrid motion template predictor and neighboring reconstructed samples, respectively.
[0127] It is suggested to consider a general form, where the objective function can be written as: .
[0128] In the above formula, A and B represent the weights of the current motion and the neighboring motion, respectively.
[0129] By taking the derivatives of A and B and setting the derivatives to zero, we can obtain: .
[0130] By solving the matrix, the corresponding weights A and B of the current motion and the neighboring motion can be obtained.
[0131] In one embodiment, regression-based weights are used for one or more sub-blocks in an OBMC based on template matching.
[0132] In another embodiment, regression-based weights are applied to one or more current sub-blocks encoded and decoded in a template-matching OBMC using a specific prediction mode. For example, the specific prediction mode could be a skip mode, merge mode, affine mode, DMVR mode, or AMVP mode.
[0133] In another embodiment, regression-based weights are used for a subset of neighboring blocks encoded and decoded with a specific prediction pattern in a template-matching OBMC. For example, the specific prediction pattern could be a skip pattern, merge pattern, affine pattern, DMVR pattern, or AMVP pattern.
[0134] In another embodiment, regression-based weights are used for the portions of the blocks that satisfy the block size constraint. For example, the block size constraint could be block area, block aspect ratio, block width, or block height.
[0135] OBMC based on regression Several novel methods for regression-based OBMC are proposed. During training sample collection, some samples may be irrelevant to the training process and can be omitted. For example, samples encoded in skip mode are not collected because the predictions of skip-mode encoded samples may be identical to those of reconstructed samples, resulting in no residuals. Furthermore, to ensure sufficient training samples, constraints on the number of training samples, the number of neighboring samples, or the current block size can be imposed. Additionally, during template prediction generation in the regression model process, certain parameters, flags, or indices can be inherited from the current block, current sub-block, neighboring blocks, or neighboring sub-blocks.
[0136] The training process may generate unreasonable models, such as models that always output constant weights. Therefore, it has been proposed to exclude unreasonable models after training and retain only effective models. Another proposed approach is to prune the regression weights of the model.
[0137] Training Sample Collection in Regression-Based OBMC In one embodiment, one or more types of samples, such as skip mode codec samples or intra-frame mode codec samples, are omitted during the training sample collection process.
[0138] In another embodiment, all samples are collected during the training sample collection process; however, certain types, such as skip mode codec samples or intra-frame mode codec samples, are not used or considered during training.
[0139] In another embodiment, a training sample quantity constraint is considered during the training sample collection process. For example, if the number of training samples is less than N, the training process will be terminated, where N is an integer greater than or equal to 0.
[0140] In another embodiment, a neighbor number constraint is considered during the training sample collection process. For example, if the number of training samples is less than N, the training process will be terminated, where N is an integer greater than or equal to 0.
[0141] In another embodiment, the current block size constraint is considered during the training sample collection process. For example, if the number of training samples is less than N samples, the training process will be terminated, where N is an integer greater than or equal to 0.
[0142] In another embodiment, the training process is performed when all neighboring samples are inter-frame prediction codecs.
[0143] In another embodiment, the training process is performed when all neighboring samples are either inter-frame prediction codecs or IBC codecs.
[0144] Template prediction generation during regression model training In one embodiment, during template prediction generation in the regression model training process, certain parameters, flags, or indices are inherited or inferred from neighboring sub-blocks or neighboring blocks.
[0145] In another embodiment, during template prediction generation in the regression model training process, some parameters, flags, or indices are inherited or inferred from the current sub-block or the current block.
[0146] In another embodiment, during template prediction generation in the regression model training process, some parameters, flags, or indices are adaptively determined from the current sub-block or block, or neighboring sub-blocks or blocks.
[0147] In another embodiment, during template prediction generation in the regression model training process, template predictions for neighboring motions are generated using neighbor parameters, flags, or indices.
[0148] In another embodiment, during template prediction generation in the regression model training process, template prediction for the current motion is generated using the current parameters, flags, or indexes.
[0149] Validation of the reasonable regression model In one embodiment, the regression model is examined to determine its validity. Several predefined methods are used to examine the model. For example, ... Figure 13 As shown, some differences in the regression weights are calculated as follows: Diff[0] = W0(w-1, 0) - W0(0, 0); Diff[1] = W0( , 0) - W0(0, 0); Diff[2] = W0( -1, 0) - W0( , 0); Diff[3] = W0( , 0) - W0( , 0).
[0150] In the above formula, w corresponds to the width of the block.
[0151] If all four differences are greater than or equal to 0, the model is deemed unreasonable and the regression model is not used.
[0152] In another embodiment, the regression model is examined to determine its validity. The regression weights are derived from W0(x,y) = ax + by + c, as follows: Figure 14 As shown, two distinct (x, y) positions (1410 and 1420) are displayed. To derive decreasing weights, the model parameters should be less than or equal to 0. To derive increasing weights, the model parameters should be greater than or equal to 0. Regression models that do not meet these conditions are deemed unreasonable.
[0153] In another embodiment, the regression weights are trimmed to fit within a numerical range.
[0154] Neighbor skip mode codec blocks and neighbor non-skip mode codec blocks in template matching-based OBMC In one embodiment, as shown in Figure 15, the TM-based OBMC decision has three intervals. When neighboring blocks are encoded / decoded in skip mode (e.g.) Figure 15A When (as shown), the decision rule in the TM-based OBMC is determined by multiplying the neighbor movement cost (i.e., Cost1) by the thresholds A_skip and B_skip. When neighboring blocks are encoded and decoded in a non-skip mode (such as...), the decision rule is determined by multiplying the neighbor movement cost (i.e., Cost1) by the thresholds A_skip and B_skip. Figure 15B As shown, the decision rule in the TM-based OBMC is determined by multiplying the neighbor movement cost (i.e., Cost1) by other thresholds A_nonskip and B_nonskip. In one example, A_skip is greater than or equal to A_nonskip, and B_skip is greater than or equal to B_nonskip.
[0155] In another embodiment, such as Figure 16A and Figure 16B As shown, the TM-based OBMC decision has five intervals. When neighboring blocks are encoded / decoded in skip mode (such as...) Figure 16A When (as shown), the decision rule in the TM-based OBMC is determined by multiplying the neighbor movement cost (i.e., Cost1) by a certain threshold skip_threshold. When neighboring blocks are encoded and decoded in a non-skip mode (such as...), the decision rule is determined by multiplying the neighbor movement cost (i.e., Cost1) by a certain threshold skip_threshold. Figure 16B As shown, the decision rule in the TM-based OBMC is determined by multiplying the neighbor movement cost (i.e., Cost1) by a certain threshold nonskip_threshold. In one example, the threshold skip_threshold is greater than or equal to the threshold nonskip_threshold.
[0156] In another embodiment, the skip mode flag is also considered when examining adjacent continuous motions. Specifically, if two adjacent motions are identical, but one is encoded in skip mode and the other in non-skip mode, they should be considered discontinuous motions.
[0157] In another embodiment, the threshold skip_threshold or nonskip_threshold can be passed in the bitstream or indicated by at least one syntax element, such as a CTU-level flag, a slice-level flag, an image-level flag, or a sequence-level flag.
[0158] Any of the suggested methods described above for different OMBC settings for skip mode and non-skip mode can be implemented in the encoder and / or decoder. For example, any suggested method can be implemented in the prediction derivation module of the encoder and / or the prediction derivation module of the decoder. Alternatively, any suggested method can be implemented as circuitry coupled to the prediction derivation module of the encoder and / or the prediction derivation module of the decoder to provide the required information to the prediction derivation module.
[0159] refer to Figure 1A Example encoders and Figure 1B The example decoder in the example can be implemented in the encoder's prediction derivation module and / or the decoder's prediction derivation module. Alternatively, any proposed method can be implemented as a circuit coupled to the encoder's prediction derivation module and / or the decoder's prediction derivation module to provide the required information to the prediction derivation module. For example, OBMC processing can be implemented at the encoder end or the decoder end, such as the intra / inter-frame codec module in the decoder (e.g., Figure 1B Intra-frame prediction 150 / MC 152 in the encoder, or intra-frame / inter-frame codec modules in the encoder (e.g. Figure 1A Intra-frame prediction 110 / Inter-frame prediction 112 (in the frame prediction 110 / inter-frame prediction 112).
[0160] Figure 17A flowchart of an exemplary video codec system is shown, wherein one or more OBMC (Overlapped Block Motion Compensation) settings in skip mode differ from those in non-skip mode, according to an embodiment of the invention. The steps shown in the flowchart can be executed as program code at the encoder end of one or more processors (e.g., one or more central processing units (CPUs)). The steps shown in the flowchart can also be implemented in hardware, such as one or more electronic devices or processors arranged to execute the steps in the flowchart. According to the method, in step 1710, input data containing the current block, current sub-block, neighboring block, or neighboring sub-block is received. In step 1720, one or more OBMC settings associated with OBMC processing are determined. In step 1730, one or more target OBMC settings are selected from the one or more OBMC settings based on whether one or more corresponding neighboring blocks of the current block are in skip mode or non-skip mode. In step 1740, the OBMC processing is applied to at least one boundary of the current block, the current sub-block, the neighboring block, and the neighboring block using the one or more target OBMC settings.
[0161] The flowchart shown is intended to illustrate an example of video encoding and decoding according to the present invention. Those skilled in the art can modify each step, rearrange the steps, split a step, or combine steps to implement the invention without departing from its spirit. Specific syntax and semantics are used in this specification to illustrate examples of implementing embodiments of the invention. Those skilled in the art can implement the invention by replacing these syntax and semantics with equivalent syntax and semantics without departing from its spirit.
[0162] The foregoing description is intended to enable those skilled in the art to practice the invention in the context of specific applications and their requirements. Various modifications to the described embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments. Therefore, the invention is not intended to be limited to the specific embodiments shown and described, but should be given the maximum scope consistent with the principles and novel features disclosed herein. In the foregoing detailed description, various specific details have been shown to provide a full understanding of the invention. However, those skilled in the art will understand that the invention can be practiced.
[0163] The embodiments of the present invention described above can be implemented in various hardware, software code, or combinations thereof. For example, one embodiment of the invention may be one or more circuits integrated into a video compression chip, or program code integrated into video compression software, for performing the processes described herein. Another embodiment of the invention may be program code executable on a digital signal processor (DSP) for performing the processes described herein. The invention may also relate to multiple functions performed by a computer processor, digital signal processor, microprocessor, or field-programmable gate array (FPGA). These processors can be configured to perform the specific methods embodied in the invention by executing machine-readable software code or firmware code. The software code or firmware code can be developed in different programming languages and different formats or styles. The software code can also be compiled for different target platforms. However, different software code formats, styles, and languages, as well as other configuration codes, in order to perform tasks according to the invention, do not depart from the spirit and scope of the invention.
[0164] This invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The examples described are for illustrative purposes only and not for limitation. Therefore, the scope of this invention is defined by the appended claims rather than the foregoing description. All variations within the meaning and equivalence of the claims should be included within their scope.
Claims
1. A video encoding / decoding method, comprising: Receives input data containing the current block, current sub-block, neighboring block, or neighboring sub-block; Determine one or more OBMC settings associated with the Overlapping Block Motion Compensation (OBMC) process; Based on whether one or more corresponding neighboring blocks of the current block are in skip mode or non-skip mode, select one or more target OBMC settings from the one or more OBMC settings; as well as Using the one or more target OBMC settings, the OBMC processing is applied to at least one boundary of the current block, the current sub-block, the neighboring block, and the neighboring sub-block.
2. The video encoding / decoding method according to claim 1, wherein the one or more OBMC settings include one or more OBMC mixing rules, one or more OBMC mixing weights and mixing lines, one or more cost-based metrics, adaptive weight decisions, or combinations thereof.
3. The video encoding / decoding method of claim 2, wherein when the one or more corresponding neighboring blocks of the current block are encoded / decoded in the skip mode, the one or more cost-based metrics correspond to boundary matching or bilateral matching.
4. The video encoding / decoding method according to claim 2, wherein when the one or more corresponding neighboring blocks of the current block are encoded / decoded in the skip mode, the one or more OBMC settings further include one or more prediction generation settings.
5. The video encoding / decoding method according to claim 4, wherein the one or more prediction generation settings correspond to template prediction generation settings, and when the one or more corresponding neighboring blocks of the current block are encoded / decoded in the skip mode, the template prediction generation settings are set to the same settings as the neighbor prediction generation settings.
6. The video encoding and decoding method according to claim 5, wherein the template prediction generation settings include encoding and decoding unit-level weighted bidirectional prediction (BCW) index settings, decoder-side motion vector refinement (DMVR) flag settings, or bidirectional optical flow (BDOF) settings.
7. The video encoding / decoding method according to claim 2, wherein when template matching is enabled for the current block, the one or more OBMC settings further include one or more OBMC decision rules based on template matching.
8. The video encoding / decoding method according to claim 7, wherein only a subset of the rules in the one or more template-matching OBMC decision rules, a subset of the rules in the one or more template-matching OBMC decision rules, or other different types of template-matching OBMC decision rules are allowed to be used in the skip mode or the non-skip mode.
9. The video encoding / decoding method according to claim 7, wherein different OBMC mixing rules or partially different OBMC mixing rules are used for the skip mode or the non-skip mode.
10. The video encoding / decoding method of claim 7, wherein a 2-line OBMC is used when the one or more corresponding neighboring blocks of the current block are encoded / decoded in the skip mode.
11. The video encoding / decoding method of claim 7, wherein the one or more template-matching OBMC decision rules are the same rules in the skip mode and the non-skip mode, except that some different thresholds are used in the cost calculation.
12. The video encoding / decoding method of claim 7, wherein the one or more template-matching-based OBMC decision rules in the TM-based OBMC include the selection of a number of OBMC lines, and the selection of the number of OBMC lines is determined by the neighbor motion cost multiplied by one or more respective thresholds, wherein when the one or more corresponding neighbor blocks of the current block are encoded / decoded in the skip mode, the one or more respective thresholds correspond to one or more first thresholds, and when the one or more corresponding neighbor blocks of the current block are encoded / decoded in the non-skip mode, the one or more respective thresholds correspond to one or more second thresholds, and the one or more first thresholds are different from the one or more second thresholds.
13. The video encoding / decoding method according to claim 1, wherein the one or more OBMC settings of the skip mode are different from those of the non-skip mode.
14. A video encoding / decoding apparatus, comprising one or more electronic devices or processors, configured to: Receives input data containing the current block, current sub-block, neighboring block, or neighboring sub-block; Determine one or more OBMC settings associated with the OBMC (Overlap Block Motion Compensation) process; Based on whether one or more corresponding neighboring blocks of the current block are in skip mode or non-skip mode, select one or more target OBMC settings from the one or more OBMC settings; and Using the one or more target OBMC settings, the OBMC processing is applied to at least one boundary of the current block, the current sub-block, the neighboring block, and the neighboring sub-block.
