Bitwidth Control for Bidirectional Optical Flow

The method improves BDOF by controlling bit width through additional shifts and clipping, addressing precision issues and optimizing hardware utilization, resulting in more accurate motion compensation for video encoding.

JP7554249B2Active Publication Date: 2024-09-19BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2022201624
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-01-06
Filing Date
2022-12-16
Publication Date
2024-09-19
Estimated Expiration
2040-01-06

AI Technical Summary

Technical Problem

Existing bidirectional optical flow (BDOF) designs in video encoding, such as those used in VVC, face issues with suboptimal bit width control for intermediate parameters, leading to potential precision loss and inefficiencies in motion compensation due to high-pass gradient calculations and excessive bit width usage.

Method used

A method is introduced to control the bit width of BDOF parameters by applying additional right shifts to gradient values and introducing clipping operations to ensure all calculations fit within a 32-bit implementation, thereby optimizing precision and utilizing hardware dynamic range effectively.

Benefits of technology

The proposed bit width control method enhances the accuracy and efficiency of BDOF by reducing gradient estimation errors and maximizing the effective bit range, ensuring precise motion compensation without exceeding 32-bit limitations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007554249000040
    Figure 0007554249000040
  • Figure 0007554249000043
    Figure 0007554249000043
  • Figure 0007554249000042
    Figure 0007554249000042
Patent Text Reader

Abstract

A method, apparatus, and non-transitory computer-readable storage medium for controlling bitwidth for bidirectional optical flow (BDOF) for video coding are provided. A method includes decoding a first reference picture and a second reference picture, the first reference picture being displayed before a current picture, and the second reference picture being different from the first reference picture and being displayed after the current picture. The method calculates motion compensation for a coding unit (CU) by minimizing a difference between a first prediction L0 and a second prediction L1, calculates a first gradient value for the first prediction L0 and a second gradient value for the second prediction L1, and calculates a final bidirectional prediction for the CU.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of U.S. Provisional Patent Application No. 62 / 788,898, filed January 6, 2019, the entire disclosure of which is hereby incorporated by reference in its entirety.

[0002] The present disclosure generally relates to encoding (e.g., coding and decoding) video data. More particularly, the present disclosure relates to a method and apparatus for improving a bidirectional optical flow (BDOF) processing method for video encoding. In a particular exemplary embodiment, a method is described in which a block is bidirectionally predicted from reference pictures occurring in opposite directions relative to a current picture (e.g., a first reference picture having a display order before the current picture and a second reference picture having a display order after the current picture) using BDOF. [Background technology]

[0003] This section provides background information related to the present disclosure. Information contained in this section should not necessarily be construed as prior art.

[0004] Various video coding techniques can be used to compress video data. Video coding is performed according to one or more video coding standards. For example, video coding standards include Versatile Video Coding (VVC), Joint Exploration Model Coding (JEM), High Efficiency Video Coding (H.265 / HEVC), Advanced Video Coding (H.264 / AVC), Moving Picture Experts Group Coding (MPEG), and others. Video coding generally utilizes prediction methods (e.g., inter-prediction, intra-prediction, etc.) that exploit redundancy present in a video image or sequence. An important goal of video coding techniques is to compress video data into a format that uses a lower bit rate while avoiding or minimizing degradation of video quality.

[0005] The first version of the HEVC standard was finalized in October 2013 and provides approximately 50% bitrate savings or equivalent perceptual quality compared to the previous generation video coding standard H.264 / MPEG AVC. Although the HEVC standard provides significant coding improvements over its predecessor, it has been proven that additional coding tools can achieve better coding efficiency than HEVC. Based on that, both VCEG and MPEG have started the exploration work of new coding techniques for future video coding standardization. In October 2015, one Joint Video Exploration Team (JVET) was formed by ITU-T VECG and ISO / IEC MPEG to start a significant study of advanced techniques that may enable substantial enhancement of coding efficiency. JVET developed a reference software called Joint Exploration Model (JEM) by integrating some additional coding tools in addition to the HEVC Test Model (HM).

[0006] In October 2017, ITU-T and ISO / IEC issued a joint Call for Proposals (CfP) on video compression with capabilities beyond HEVC. In April 2018, 23 CfP responses were accepted and evaluated at the 10th JVET meeting, demonstrating approximately 40% compression efficiency improvement over HEVC. Based on such evaluation results, JVET embarked on a new project to develop a new generation of video coding standard called Versatile Video Coding (VVC). In the same month, one reference software code base called VVC Test Model (VTM) was established to demonstrate a reference implementation of the VVC standard. Summary of the Invention

[0007] This section provides an overview of the disclosure and is not a complete scope or comprehensive disclosure of all features of the disclosure.

[0008] According to a first aspect of the present disclosure, a method for controlling a bit width for bidirectional optical flow (BDOF) for video coding, executed on a computing device having one or more processors and a memory storing a plurality of programs to be executed by the one or more processors, includes decoding a first reference picture and a second reference picture. The second reference picture is different from the first reference picture, the first reference picture is displayed before a current picture, and the second reference picture is displayed after the current picture. A first prediction L of the first reference picture from a current block of the current picture is decoded. 0 The first motion vector (MV 0 ) is determined. A second prediction L 1 The second motion vector (MV 1 A first temporal distance (τ 0 ) is determined, and a second temporal distance (τ 1 ) is determined. The first prediction L 0 and the second prediction L 1 A motion compensation is calculated by minimizing the difference between the first predicted sample L and the second predicted sample L. A first gradient value and a second gradient value are calculated, and an additional right shift is introduced to reduce the internal bit width of the first gradient value and the second gradient value. A sum of the first gradient value and the second gradient value is calculated, and an additional right shift is introduced to the sum to reduce its bit width. 0 and the second prediction sample L 1 The difference between the first predicted sample L and the second predicted sample L is calculated, and in order to reduce the internal bit width of this difference, 0 and the second prediction sample L 1 An additional right shift is introduced.

[0009] According to a second aspect of the present disclosure, a computing device includes one or more processors, a non-transitory storage coupled to the one or more processors, and a plurality of programs stored in the non-transitory storage. When the plurality of programs are executed by the one or more processors, the computing device decodes a first reference picture and a second reference picture. The second reference picture is different from the first reference picture, and the first reference picture is displayed before the current picture and the second reference picture is displayed after the current picture. A first prediction L of the first reference picture from a current block of the current picture is decoded. 0 The first motion vector (MV 0 ) is determined. A second prediction L 1 The second motion vector (MV 1 A first temporal distance (τ 0 ) is determined, and a second temporal distance (τ 1 ) is determined. The first prediction L 0 and the second prediction L 1 A motion compensation is calculated by minimizing the difference between the first predicted sample L and the second predicted sample L. A first gradient value and a second gradient value are calculated, and an additional right shift is introduced to reduce the internal bit width of the first gradient value and the second gradient value. A sum of the first gradient value and the second gradient value is calculated, and an additional right shift is introduced to the sum to reduce its bit width. 0 and the second prediction sample L 1 The difference between the first predicted sample L and the second predicted sample L is calculated, and in order to reduce the internal bit width of this difference, 0 and the second prediction sample L 1 An additional right shift is introduced.

[0010] According to a third aspect of the present disclosure, a non-transitory computer-readable storage medium stores a number of programs for execution by a computing device having one or more processors. The programs, when executed by the one or more processors, cause the computing device to decode a first reference picture and a second reference picture. The second reference picture is different from the first reference picture, the first reference picture being displayed before the current picture and the second reference picture being displayed after the current picture. A first prediction L of the first reference picture from a current block of the current picture is generated. 0 The first motion vector (MV 0 ) is determined. A second prediction L 1 The second motion vector (MV 1 A first temporal distance (τ 0 ) is determined, and a second temporal distance (τ 1 ) is determined. The first prediction L 0 and the second prediction L 1 A motion compensation is calculated by minimizing the difference between the first predicted sample L and the second predicted sample L. A first gradient value and a second gradient value are calculated, and an additional right shift is introduced to reduce the internal bit width of the first gradient value and the second gradient value. A sum of the first gradient value and the second gradient value is calculated, and an additional right shift is introduced to the sum to reduce its bit width. 0 and the second prediction sample L 1 The difference between the first predicted sample L and the second predicted sample L is calculated, and in order to reduce the internal bit width of this difference, 0 and the second prediction sample L 1 An additional right shift is introduced.

[0011] Hereinafter, several sets of exemplary non-limiting embodiments of the present disclosure will be described with the accompanying drawings. Those skilled in the art of the relevant technology can make modifications of structure, method, or function based on the examples presented herein, and all such modifications are included within the scope of the present disclosure. If there is no contradiction, the teachings of different embodiments can also be combined with each other, but not necessarily. [Brief description of the drawings]

[0012] [Figure 1] FIG. 1 is a block diagram of an exemplary block-based hybrid video coding system according to an exemplary embodiment including an exemplary encoder suitable for use with a bidirectional optical flow (BDOF) method. [Diagram 2] FIG. 2 is a block diagram of an exemplary decoder according to an exemplary embodiment suitable for use with a bidirectional optical flow (BDOF) method. [Diagram 3] FIG. 3A is a diagram showing an exemplary distribution type according to an exemplary embodiment, namely, a 4-way split; FIG. 3B is a diagram showing an exemplary distribution type according to an exemplary embodiment, namely, a horizontal 2-way split; FIG. 3C is a diagram showing an exemplary distribution type according to an exemplary embodiment, namely, a vertical 2-way split; FIG. 3D is a diagram showing an exemplary distribution type according to an exemplary embodiment, namely, a horizontal 3-way split; and FIG. 3E is a diagram showing an exemplary distribution type according to an exemplary embodiment, namely, a vertical 3-way split. [Figure 4] FIG. 4 is a diagram illustrating an exemplary bidirectional optical flow (BDOF) model. [Diagram 5] FIG. 5 is a flowchart of an example method for predicting a block of video data according to an example embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] The terms used in this disclosure are intended to indicate specific examples, not to limit the disclosure. Unless otherwise clearly implied by the context, the singular forms "a", "an" and "the" used in this disclosure and the appended claims also refer to the plural. It should be understood that the term "and / or" as used herein refers to all possible combinations of one or more of the associated items listed.

[0014] In this specification, terms such as "first," "second," and "third" may be used to describe various pieces of information, but it should be understood that the information is not limited by these terms. These terms are used only to distinguish one information category from another. For example, the first information may be referred to as the second information, and similarly, the second information may be referred to as the first information, without departing from the scope of this disclosure. As used herein, the term "if" may be understood to mean "when" or "upon" or "in response to," depending on the context.

[0015] Throughout this specification, references to "one embodiment," "an embodiment," "another embodiment," or the like mean that one or more particular features, structures, or characteristics described in connection with one embodiment are included in at least one embodiment of the disclosure. Thus, the appearances of phrases such as "in one embodiment," "in an embodiment," or "in another embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, particular features, structures, or characteristics in one or more embodiments may be combined in any suitable manner.

[0016] The present disclosure generally relates to encoding (e.g., coding and decoding) video data. More particularly, the present disclosure relates to a method and apparatus for improving a bidirectional optical flow (BDOF) processing method for video encoding. In a particular exemplary embodiment, a method is described in which a block is bidirectionally predicted from reference pictures occurring in opposite directions relative to a current picture (e.g., a first reference picture having a display order before the current picture and a second reference picture having a display order after the current picture) using BDOF.

[0017] The methods described herein relate to improving or enhancing BDOF. BDOF may be applied during motion compensation, where BDOF is used to modify a motion vector for each pixel relative to a current block, and the pixels of the current block are predicted using the corresponding offset value applied to the motion vector. In an exemplary embodiment, BDOF is used when inter-predicting a block of video data of a current picture relative to a reference block in a reference picture in an opposite prediction direction relative to the current block using a motion vector. Video coding methods include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video frame or a portion of a video frame) may be divided into video blocks, which may also be referred to as tree blocks, coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture may be coded using spatial prediction relative to reference samples of neighboring blocks in the same picture. Video blocks of an inter-coded (P or B) slice of a picture may use spatial prediction with respect to reference samples of neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame.

[0018] The spatial or temporal prediction results in a predictive block for encoding the block. The residual data represents the pixel difference between the original block to be encoded and the predictive block. An inter-coded block is coded according to a motion vector pointing to a block of reference samples forming the predictive block and the residual data indicating the difference between the coded block and the predictive block. An intra-coded block is coded according to an intra-coding mode and the residual data. For further compression, the residual data can be transformed from the pixel domain to a transform domain, resulting in residual transform coefficients, which can then be quantized. The quantized transform coefficients, initially arranged in a two-dimensional array, can be scanned to produce a one-dimensional vector of transform coefficients, and entropy coding can be applied to achieve further compression.

[0019] For each inter-predicted block, a set of motion information may be available. The set of motion information may include motion information for forward and backward prediction directions. In this specification, the forward or first prediction direction and the backward or second prediction direction are two prediction directions of a bidirectional prediction mode, and the terms "forward", "first", "backward", and "second" do not necessarily have a geometric meaning. On the contrary, these terms generally correspond to whether a reference picture is displayed before the current picture ("backward") or after the current picture ("forward"). In an exemplary embodiment, the forward prediction direction may correspond to reference picture list 0 (RefPicList0) of the current picture, and the backward prediction direction may correspond to reference picture list 1 (RefPicList1).

[0020] For each prediction direction, the motion information includes a reference index and a motion vector. In an exemplary embodiment, the reference index can be used to identify a reference picture in a current reference picture list (RefPicList0 or RefPicList1). The motion vector has a horizontal component (x) and a vertical component (y). In general, the horizontal component indicates the horizontal displacement in the reference picture relative to the position of the current block in the current picture to identify the x coordinate of the reference block, and the vertical component indicates the vertical displacement in the reference picture relative to the position of the current block to identify the y coordinate of the reference block.

[0021] In video coding standards, picture order count (POC) values ​​are widely used to identify the display order of pictures. In some situations, two pictures in one coded video sequence may have the same POC value, but this typically does not occur within a coded video sequence. Thus, the POC values ​​of pictures are generally unique and can therefore uniquely identify corresponding pictures. When there are multiple coded video sequences in one bitstream, pictures with the same POC value may be close to each other in terms of decoding order. The POC values ​​of pictures are typically used in the construction of reference picture lists, the derivation of reference picture sets similar to HEVC, and the scaling of motion vectors.

[0022] Conceptually, many video coding standards are similar, including those already mentioned in the background section, for example, virtually all video coding standards use block-based processing to achieve video compression and share similar video coding block diagrams.

[0023] Similar to HEVC, VVC is structured in a block-based hybrid video coding framework. FIG. 1 is a block diagram of a block-based hybrid video coding system including an exemplary encoder 100 that can use a method for bidirectional optical flow according to an exemplary embodiment. An input video signal is processed per block (CU). In VTM-1.0, a CU can be up to 128×128 pixels. However, unlike HEVC, which divides blocks based only on quadtrees, in VVC, one coding tree unit (CTU) is divided into multiple CUs to adapt to varying local features based on quadtrees / binary trees / tertile trees. In addition, the concept of multiple division unit types in HEVC is removed, i.e., the separation of CUs, prediction units (PUs), and transform units (TUs) no longer exists in VVC, and instead each CU is always used as a basic unit for both prediction and transformation without further division. In the multiple types of tree structure, one CTU is divided by a quadtree structure, and then the leaf nodes of each quadtree can be further divided by binary and tertile structures.

[0024] Referring to Figure 1, in an encoder 100, a video frame is divided into multiple video blocks for processing. For each given video block, a prediction is formed based on an inter-prediction or intra-prediction technique. In inter-prediction, one or more predictors are formed based on pixels from a previously reconstructed frame by motion estimation and motion compensation. In intra-prediction, a predictor is formed based on reconstructed pixels in a current frame. A mode decision may select the best predictor to predict the current block.

[0025] A prediction residual, which represents the difference between the current video block and its predictor, is sent to a transform circuit 102. As used herein, the term "circuit" includes hardware and software for operating the hardware. The transform circuit 102 applies a transform, such as a discrete cosine transform (DCT) or a conceptually similar transform, to the residual block, producing a video block including transform coefficient values. Instead of the DCT, a wavelet transform, an integer transform, a subband transform, a discrete sine transform (DST), or other types of transforms may be used. The transform circuit 102 applies a transform to the residual block, producing a set of transform coefficients. The transform may transform the residual information from the pixel domain to a transform domain, such as the frequency domain.

[0026] The resulting transform coefficients are then sent from the transform circuit 102 to a quantization circuit 104 for entropy reduction. The quantization circuit 104 quantizes the transform coefficients to further reduce the bit rate. The quantization process may reduce the bit depth associated with some or all of these coefficients. The degree of quantization may be modified by adjusting a quantization parameter. The quantized coefficients are then sent to an entropy coding circuit 106 to generate a compressed video bitstream. The entropy coding circuit 106 entropy codes the quantized transform coefficients. For example, the entropy coding circuit 106 may perform context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding technique. In the case of context-based entropy coding, the context may be based on neighboring blocks. Following entropy encoding by the entropy encoding circuit 106, the coded bitstream may be transmitted to another device (e.g., a video decoder) or stored for later transmission or retrieval. As shown in Figure 1, prediction-related information 110 from the inter-prediction and / or intra-prediction circuit 112, such as video block partition information, motion vectors, reference picture indexes, and intra-prediction modes, is also sent through the entropy encoding circuit 106 and stored in the compressed video bitstream 114.

[0027] In the encoder 100, decoder-related circuitry is also required to reconstruct pixels for prediction purposes. First, a prediction residual is reconstructed by the inverse quantization circuit 116 and the inverse transform circuit 118. This reconstructed prediction residual is combined with a block predictor 120 to generate unfiltered reconstructed pixels for the current video block. The inverse quantization circuit 116 and the inverse transform circuit 118 apply inverse quantization and inverse transform, respectively, to reconstruct a residual block in the pixel domain. In a particular embodiment, an adder adds the reconstructed residual block to a motion compensated prediction block previously produced by the motion compensation circuit 122 or the intra prediction circuit 112 to produce a reconstructed video block for storage in a reference picture memory. The reconstructed video block can be used as a reference block by the motion estimation circuit 124 and the motion compensation circuit 122 to inter-code a block in a next video frame.

[0028] In-loop filters are commonly used to improve coding efficiency and visual quality. For example, deblocking filters are available in AVC and HEVC, as well as the current version of VVC. In HEVC, an additional in-loop filter called SAO (Sample Adaptive Offset) is defined to further improve coding efficiency. In the current version of the VVC standard, yet another in-loop filter called ALF (Adaptive Loop Filter) is actively investigated for incorporation into the final standard. These in-loop filter operations are optional. Performing these operations helps improve coding efficiency and visual quality. These operations can also be turned off as a decision made by the encoder 100 to save computational complexity. It should be noted that if these filter options are turned on by the encoder 100, intra prediction is typically based on unfiltered reconstructed pixels, whereas inter prediction is based on filtered reconstructed pixels.

[0029] FIG. 2 is a block diagram of an exemplary decoder 200 that can use the method for bidirectional optical flow. In the exemplary embodiment, the decoder 200 is similar to the reconstruction-related portion residing in the encoder 100 of FIG. 1. Referring to FIG. 2, in the decoder 200, first, the incoming video bitstream 201 is decoded by an entropy decoding circuit 202 to derive quantized coefficient levels and prediction-related information. The quantized coefficient levels are then processed by an inverse quantization circuit 204 and an inverse transform circuit 206 to obtain a reconstructed prediction residual. The inverse quantization circuit 204 inverse quantizes, i.e., dequantizes, the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding circuit 202. The inverse quantization process can include using a quantization parameter QPy calculated by the decoder 200 for each video block in a video slice to determine the degree of quantization to be applied, and similarly the degree of inverse quantization. Inverse transform circuit 206 applies an inverse transform, eg, an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process, to the transform coefficients to produce residual blocks in the pixel domain.

[0030] The block predictor mechanism that may be implemented in the intra / inter mode selector circuit 208 includes an intra prediction circuit 210 configured to perform an intra prediction process, and / or a motion compensation circuit 212 configured to perform a motion compensation process based on the decoded prediction information. A set of unfiltered reconstructed pixels is obtained by adding the reconstructed prediction residual from the inverse transform circuit 206 and the prediction output generated by the block predictor mechanism using an adder 214. In a situation where an in-loop filter 216 is turned on, a filtering operation is performed on these reconstructed pixels to derive a final reconstructed video for output.

[0031] When a video slice is coded as an intra-coded (I) slice, an intra prediction circuit 210 may generate predictive data for video blocks of the current video slice based on a signaled intra prediction mode and data from previously decoded blocks of the current frame or picture. When a video frame is coded as an inter-coded (i.e., B, P, or GPB) slice, a motion compensation circuit 212 generates predictive blocks for video blocks of the current video slice based on motion vectors and other syntax elements received from the entropy decoding circuit 202. The predictive blocks may be generated from one of the reference pictures in one of the reference picture lists. The decoder 200 may use a default configuration method to construct the reference frame lists List0 and List1 based on reference pictures stored in the reference picture memory.

[0032] The motion compensation circuit 212 determines prediction information for the video blocks of the current video slice by parsing the motion vectors and other syntax elements, and uses the prediction information to produce a predictive block for the current video block being decoded. For example, the motion compensation circuit 212 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) used to encode the video blocks of the video slice, the inter prediction slice type (e.g., B slice, P slice, or GPB slice), configuration information for one or more of the reference picture lists for the slice, the motion vectors for each inter coded video block of the slice, the inter prediction state for each inter coded video block of the slice, and other information to decode the video blocks in the current video slice.

[0033] The motion compensation circuit 212 may also perform the interpolation based on an interpolation filter for sub-pixel accuracy. The motion compensation circuit 212 may use an interpolation filter used by the encoder 100 during coding of the video block to calculate the interpolated values ​​for the sub-integer pixels of the reference block. In an exemplary embodiment, the motion compensation circuit 212 determines the interpolation filter used by the encoder 100 from the received syntax element and uses the interpolation filter to produce the prediction block. The motion compensation circuit 212 may be configured to perform any or all of the methods described in this disclosure (alone or in any combination). For example, the motion compensation circuit 212 may be configured to perform the exemplary BDOF methods discussed herein.

[0034] In an example embodiment, the motion compensation circuit 212 is configured to apply BDOF to a block having a first reference picture (e.g., in reference picture list 0) that is temporally earlier than the current picture and a second reference picture (e.g., in reference picture list 1) that is temporally later than the current picture. In response to determining to apply BDOF to the block, the motion compensation circuit 212 may apply the methods discussed herein (e.g., with respect to the mathematical formulas set forth herein) to predict the block according to the BDOF.

[0035] 3A-3E show five exemplary partition types: 4-way (FIG. 3A), 2-way horizontal (FIG. 3B), 2-way vertical (FIG. 3C), 3-way horizontal (FIG. 3D), and 3-way vertical (FIG. 3E).

[0036] Referring again to FIG. 1, spatial prediction and / or temporal prediction can be performed. Spatial prediction (or "intra prediction") predicts a current video block using pixels from samples (called reference samples) of already coded neighboring blocks in the same video picture or slice. Spatial prediction reduces spatial redundancy inherent in video signals. Temporal prediction (also called "inter prediction" or "motion compensated prediction") predicts a current video block using reconstructed pixels from already coded video pictures. Temporal prediction reduces temporal redundancy inherent in video signals. A temporal prediction signal for a given CU is typically signaled by one or more motion vectors (MVs) that indicate the amount and direction of motion between the current CU and the current CU's temporal references. Also, in the case of multiple reference pictures, one reference picture index is further sent and used to identify which reference picture in the reference picture store the temporal prediction signal comes from. After spatial and / or temporal prediction, a mode decision block in the encoder chooses the best prediction mode, for example based on a rate-distortion optimization method. The prediction block is then subtracted from the current video block, and a transform is used to decorrelate and quantize the prediction residual. The quantized residual coefficients are inverse quantized and inverse transformed to form a reconstructed residual, which is then added back to the prediction block to form a reconstructed signal for the CU. Further in-loop filtering can be applied to the reconstructed CU, for example using a sample adaptive offset (SAO) and an adaptive in-loop filter (ALF), which is then placed in a reference picture store and used to encode future video blocks. To form an output video bitstream, the coding mode (inter or intra), prediction mode information, motion information, and the quantized residual coefficients are all sent to an entropy coding circuit 106 for further compression and packing to form a bitstream.

[0037] FIG. 4 illustrates an exemplary bidirectional optical flow (BDOF) model. As shown in FIG. 4, a first reference block I 0 The first prediction in L0 is the first time distance τ from the current block CurBlk on which the prediction is being performed. 0 The motion vector components (V x ,V y ) is a motion vector A having a first reference block I 0 Similarly, the second reference block I 1 The second prediction in L 1 is the second time distance τ from the current block. 1 The motion vector component (-V x ,-V y ) is a second motion vector B having a second reference block I 1 Identified within.

[0038] Bidirectional Optical Flow: Traditional bidirectional prediction in video coding is a simple combination of two temporal prediction blocks obtained from an already reconstructed reference picture. However, due to the limitations of block-based motion compensation, there may remain a small amount of motion that can be observed between the samples of the two prediction blocks, thus reducing the efficiency of the motion compensation prediction. To solve this problem, in VVC, bidirectional optical flow (BDOF) is applied to reduce the effect of such motion on all samples in one block. More specifically, as shown in Figure 4, BDOF is a sample-by-sample motion compensation performed in addition to block-based motion compensation prediction when bidirectional prediction is used. The motion compensation for each 4 × 4 subblock (v x ,v y ) is the sum of L after BDOF is applied within one 6 × 6 window Ω around the subblock. 0 Prediction sample and L 1 It is calculated by minimizing the difference between the predicted sample and the x ,v y ) is derived as follows:

[0039]

number

[0040] In this formula,

number

number

[0041] S 1 , S 2 , S 3 , S 5 , and S 6 The value of is calculated as follows:

number

[0042] In this formula, Ω is the predicted L 0 and L 1 , and is a set of neighboring predicted samples around one sub-block of

number

[0043] In this formula, I (k) (i,j) is the predicted sample at sample position (i,j) of the predicted signal in list k, k=0,1, generated with medium-high precision (i.e., 16 bits);

number

number

[0044] Based on the motion correction derived in Eq. (1), L is calculated along the motion trajectory based on the optical flow model. 0 Prediction and L 1 By interpolating the prediction, the final bidirectional predicted samples of the CU are calculated as shown in Equation (5) below.

number

[0045] In this formula, shift and ο offset For bidirectional prediction, L 0 Prediction signal and L 1 are the right shift and offset values ​​applied to combine the prediction signals, which are equal to 15-BD and 1<<(14-BD)+2·(1<<13), respectively. Table 1 shows the specific bit-widths of the intermediate parameters involved in the BDOF process. As shown in Table 1, the internal bit-width of the entire BDOF process does not exceed 32 bits. In addition, in equation (1), the multiplication with the worst possible input is x S 2,m The input bit width is S 2,m and v x , and 4 bits for , respectively. Therefore, a 15-bit multiplier is sufficient for BDOF.

[0046] [Table 1] [Table 2]

[0047] Although BDOF can enhance the efficiency of bi-prediction, there is an opportunity to further improve the design of BDOF. More specifically, the following problems of the existing BDOF design in VVC for controlling the bit width of intermediate parameters are identified in this disclosure.

[0048] First, as shown in Table 1, the parameter θ(i,j) (i.e., L 0 Prediction and L 1 prediction), as well as the parameter ψ x (i,j) and ψ y (i,j) (i.e., L 0 and L 1 In the proposed method, the horizontal and vertical gradient values ​​for each pixel (sum of horizontal and vertical gradient values ​​for each pixel) are represented with the same bit width of 11 bits. Although such a method can facilitate the overall control of the internal bit width for BDOF, the method may not be optimal in terms of the accuracy of the derived motion compensation. This is because these gradient values ​​are calculated as the difference between adjacent predictions, as shown in equation (4). The high-pass nature of such a process makes the derived gradients unreliable in the presence of noise, e.g., noise captured in the original video and coding noise generated during the coding process. This means that the method may not always be useful to represent gradient values ​​with a high bit width.

[0049] In addition, as shown in Table 1, the maximum bit width usage of the entire BDOF process is limited to the vertical motion compensation v y First, S 6 (27 bits) is shifted left by 3 bits, then ((v x S 2,m )<<12+v x S 2,s) / 2 (30 bits) is subtracted. Thus, the maximum bit width of the current design is equal to 31 bits. In practical hardware implementations, the encoding process with a maximum internal bit width larger than 16 bits is usually performed by a 32-bit implementation. Thus, the existing design does not fully utilize the available dynamic range of the 32-bit implementation. This may result in unnecessary precision loss of the BDOF-derived motion compensation.

[0050] In an exemplary embodiment, such as the exemplary method illustrated in FIG. 5, an exemplary bit-width control method addresses the above-mentioned problems of bit-width control methods for conventional BDOF designs.

[0051] First, to overcome the negative impact of gradient estimation error, in an exemplary embodiment, the next gradient value in equation (4) is

number

number

number

number

[0052] Furthermore, in order to control the entire BDOF process so that it operates at an appropriate internal bit width, the variable ψ x (i,j), ψ y (i,j), and an additional bit shift n is added to the calculation of θ(i,j). adjis introduced as follows:

number

[0053] Table 2 below shows the corresponding bit-width of each intermediate parameter when the exemplary bit-width control method is applied to BDOF. Table 2 shows the changes applied with the exemplary bit-width control method compared to the conventional BDOF design in VVC. As can be seen in Table 2, with the exemplary bit-width control method, the internal bit-width of the entire BDOF process does not exceed 32 bits. In addition, with this exemplary method, the maximum bit-width is just 32 bits, which can fully utilize the available dynamic range of the 32-bit hardware implementation. Furthermore, as shown in Table 2, the multiplication with the worst possible input is v x S 2,m The input S 2,m is 14 bits, and the input v x is 6 bits. Therefore, as in the conventional BDOF method, one 16-bit multiplier is large enough when the exemplary method is applied.

[0054] Referring to Table 2, the modification to the number of bits to be right-shifted applied in equations (6) and (7) reduces the parameter ψ x (i,j), ψ y The dynamic ranges of θ(i,j), θ(i,j), and θ(i,j) are different, and the three parameters are represented with the same dynamic range (i.e., 21 bits). Such a change is due to the internal parameter S 1 , S 2 , S 3 , S 5 , and S 6 The bit width of S can be increased, and thus the maximum bit width of the internal BDOF process can be increased to more than 32 bits in some cases. Therefore, to ensure a 32-bit implementation, 2 and S 6Two additional clipping operations are introduced in calculating the value of . More specifically, in the exemplary method, the values ​​of the two parameters are calculated as follows:

number

[0055] In this formula, B 2 and B. 6 are S 2 and S 6 is a parameter for controlling the output dynamic range of . Note that unlike the gradient calculation, the clipping operation in equation (8) is applied only once to calculate the motion compensation of each 4 × 4 sub-block in a CU of one BDOF, i.e., it is called on a 4 × 4 basis. Therefore, the corresponding complexity increase due to the clipping operation introduced in the proposed method is very small.

[0056] In an exemplary embodiment, the final bi-directional prediction of a CU is based on the first prediction L 0 and the second prediction L 1 , motion compensation (v x ,v y ), as well as the first gradient value

number

number

[0057] [Table 3] [Table 4]

[0058] Figure 5 is a flow chart for an example method 300 of predicting a block of video data according to an example embodiment. The method illustrated in Figure 5 will be described with respect to the encoder 100 of Figure 1 and / or the decoder 200 of Figure 2. However, in other examples, other devices may be configured to perform the method illustrated in Figure 5.

[0059] In an exemplary embodiment, the encoder 100 first codes and then decodes a picture stored in a reference picture memory for use as a reference picture, although these steps are not shown in the exemplary method of FIG. 5. The encoder 100 then receives a block of video data. The block may be, for example, a prediction unit (PU) of a coding unit (CU) of a current picture (or slice of a picture) of video data. The encoder 100 may determine which of various prediction modes, such as intra prediction or inter prediction, to use to predict the block, and if inter prediction is determined, may determine whether to use unidirectional inter prediction or bidirectional inter prediction. In the exemplary method of FIG. 5, the encoder 100 determines to predict the block using bidirectional prediction. For example, the encoder 100 may calculate rate-distortion metrics for various possible prediction modes (e.g., one or more intra prediction modes and unidirectional or bidirectional prediction from various decoded reference pictures stored in a reference picture memory) and determine that bidirectional prediction provides the best rate-distortion metric for the block.

[0060] The encoder 100, e.g., the motion estimation circuit 124, may further calculate a motion vector for the block by bidirectional prediction. Such a motion vector may point to a first reference picture to be displayed before the current picture and a second reference picture to be displayed after the current picture. For example, the first reference picture may occur in reference picture list 0 (RefPicList0), and the second reference picture may occur in reference picture list 1 (RefPicList1).

[0061] In one embodiment, the encoder 100 generates a first motion vector (MV 0 ) is the first time distance τ 0 a first POC difference between the POC value for the current picture and the POC value for the first reference picture, and a second motion vector (MV 1 ) is the second time distance τ 1 and a second POC difference between the POC value for the current picture and the POC value for the second reference picture referenced by MV 0 and M.V. 1 can contain respective x and y components. For example, MV 0 MV x0 and M.V. y0 In one embodiment, the MV x0 indicates a horizontal offset relative to the position of the block in the current picture to determine a position to identify a reference block in the first reference picture, and MV y0 indicates the vertical offset. Similarly, MV 1 MV x1 and M.V. y1 In one embodiment, the MV x1 indicates a horizontal offset relative to the position of the block in the current picture to determine a position to identify a reference block in the second reference picture, and MV y1 indicates the vertical offset.

[0062] In an exemplary embodiment, a first reference picture and a second reference picture are decoded (302). The second reference picture is different from the first reference picture, where the first reference picture is displayed before the current picture and the second reference picture is displayed after the current picture. In an exemplary embodiment, a first prediction L of the first reference picture from a current block of the current picture is decoded (303). 0 The first motion vector (MV 0 ) is determined (304), and a second prediction L 1 The second motion vector (MV 1 ) is determined (306). In a particular exemplary embodiment, a first temporal distance (τ 0 ) from the current block of the current picture to the first reference picture L 0 The first motion vector (MV 0 ) is determined, and a second temporal distance (τ 1 ) from the current block in the second reference picture L 1 The second motion vector (MV 1 ) is determined.

[0063] The encoder 100 then uses these values ​​to generate a first prediction L 0 and the second prediction L 1 The motion compensation (v x ,v y ) is calculated (308). In an exemplary embodiment, the first prediction L 0 The first gradient value for

number

number

[0064] In an exemplary embodiment, (v x ,v y The value of S is calculated using equation (1) and, as shown in equation (7), 1 , S 2 , S 3 , S 5 , and S 6 To calculate the value of adj However, there are multiple variables ψ x (i,j), ψ y (i,j), and θ(i,j). For example, S 2 and S 6 The value of is calculated using equation (8). In an exemplary embodiment, S 2 and S 6 The value is calculated by introducing a first clipping operation and a second clipping operation as shown in equation (8), where B 2 is S 2 is a parameter that controls the output dynamic range of B 6 is S 6 The parameter for controlling the output dynamic range of the first prediction L 0 and the second prediction L 1 , motion compensation (v x , v y ), the first gradient value

number

number

[0065] The exemplary method illustrated in FIG. 5 represents one example of a method for coding video data, the method including the steps of decoding a first reference picture and a second reference picture, where the second reference picture is different from the first reference picture such that the first reference picture is displayed before a current picture and the second reference picture is displayed after the current picture; and decoding a first motion vector (MV) from a current block of the current picture to a first reference block of the first reference picture. 0 ), and determining a second motion vector (MV 1 ) and coding the current block according to the bidirectional optical flow (BDOF).

[0066] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted through a computer-readable medium as one or more instructions or codes and executed by a hardware-based processing unit. A 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, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium such as a signal or carrier wave. A 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 implementations described in this application. A computer program product may include a computer-readable medium.

[0067] Furthermore, the above methods may be implemented using an apparatus including one or more circuits, such as application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components. The apparatus may use these circuits in combination with other hardware or software components to perform the above-described methods. Each module, sub-module, unit, or sub-unit disclosed above may be implemented at least in part using one or more circuits.

[0068] Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed above. This application is intended to cover any modifications, uses, or applications of the invention which conform to the general principles of the invention, including departures from the present disclosure which come within known or customary practice in the art. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.

[0069] It will be understood that the invention is not limited to the precise examples described above and illustrated in the accompanying drawings, but various modifications and changes can be made thereto without departing from the scope of the invention, which is intended to be limited only by the scope of the appended claims.

Claims

1. 1. A method for encoding video, comprising the steps of: obtaining a first reference picture and a second reference picture for a current picture, the second reference picture being different from the first reference picture, the first reference picture being displayed before the current picture, and the second reference picture being displayed after the current picture; For the current block of the current picture, a first prediction L corresponding to the first reference picture is 0 determining For the current block, a second prediction L corresponding to the second reference picture 1 determining The first prediction L 0 and the second prediction L 1 , v ... x , v y ), where the first prediction L 0 and the second prediction L 1 are right-shifted by a first right shift with a fixed right shift amount of 4 for the calculation of the difference; I (0) (i, j) is the first prediction L 0 is the predicted sample at sample position (i, j) of I (1) (i, j) is the second prediction L 1 When the predicted sample at the sample position (i, j) of 0 First gradient value for [0010] And the second prediction L 1 The second gradient value for [0025] and calculating The first prediction L 0 , the second prediction L 1 , the motion correction (v x , v y ), the first gradient value [0030] , and the second gradient value [0045] and calculating a final bi-prediction of the current block based on Including, a sum of the first prediction L0, the second prediction L1, the offset value and the respective values ​​is calculated, and the sum of the first prediction L0, the second prediction L1, the offset value and the respective values ​​is right-shifted by a second right shift according to the bit depth of the video for the calculation of the final bidirectional prediction of the current block; Each of the above values ​​is The second gradient value [0050] and the first gradient value [006] multiplied by the motion compensation v x ; The second gradient value [0070] and the first gradient value [0080] and the difference between them multiplied by the motion correction v y . The method is calculated based on

2. (v x , v y ) is calculated as follows: [0090] In the above formula, S 1 The value of the first prediction L 0 and the second prediction L 1 For a set of prediction samples around each subblock in each of x is the sum computed over (i,j), S 2 The value of ψ for the set of predicted samples x (i, j) and ψ y is the sum computed over (i,j), S 3 The values ​​of θ(i,j) and ψ x is the sum computed over (i,j), S 5 The value of ψ for the set of predicted samples y is the sum computed over (i,j), S 6 The values ​​of θ(i,j) and ψ y is the sum computed over (i,j), ψ x (i, j), ψ y (i,j) and θ(i,j) are correlation parameters, ψ x (i, j) is the first prediction L 0 and the second predicted horizontal gradient value L 1 based on a second horizontal gradient value of ψ y (i, j) is the first prediction L 0 and the second predicted vertical gradient value L 1 based on a second vertical gradient value of θ(i,j) is the first prediction L 0 and the second prediction L 1 The method of claim 1 , wherein the calculated value is based on:

3. n c The method of claim 2 , wherein the value of is set equal to two.

4. ψ x (i, j) and ψ y An additional bit shift n is added to the calculation of (i,j). adj The method further comprises the step of introducing [0089] The method according to claim 2, wherein

5. n adj The method of claim 4 , wherein the value of is set equal to two.

6. The S 2 The value of ψ for the set of predicted samples x (i, j) · ψ y (i, j), and 6 The value of θ(i,j)·ψ for the set of predicted samples is y The method of claim 4 , wherein the ith ith ith ith ith the ...

7. Gradient Value ##EQU00011## and the gradient value ##EQU00012## The step of calculating the first prediction L 0 and the second predicted position L 1 The method of claim 1 further comprising the step of calculating horizontal and vertical gradients at each of the second predicted locations.

8. the horizontal gradient at each of the first predicted location and the second predicted location is ##EQU00013## It is calculated as follows: the vertical gradient at each of the first predicted location and the second predicted location is ##EQU00014## It is calculated as follows: grad 8. The method of claim 7, wherein: is an additional right shift.

9. The step of calculating the final bidirectional prediction of the current block further comprises: 0 and the second prediction L 1 The offset value for combining offset 2. The method of claim 1, comprising calculating the final bi-prediction of the current block based on:

10. The first prediction L 0 is a first motion vector (MV 0 ) and the second prediction L 1 is a second motion vector (MV 1 The method of claim 1 , wherein the difference is determined based on the difference between the first and second vertices.

11. 1. A computing device for encoding video, comprising: one or more processors; a non-transitory storage device coupled to the one or more processors; a plurality of programs stored in the non-transitory storage device; A computing device, wherein the plurality of programs, when executed by the one or more processors, cause the computing device to perform the method of any one of claims 1 to 10.

12. A non-transitory computer-readable storage medium storing a plurality of programs for execution by a computing device having one or more processors, the plurality of programs, when executed by the one or more processors, causing the computing device to perform a method according to any one of claims 1 to 10.

13. A computer program comprising instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 10.