Motion compensation in video coding in consideration of out-of-boundary conditions

By deriving motion vectors from multiple reference images during video encoding and decoding, and identifying and replacing out-of-boundary predicted value samples, the problem of low efficiency in processing out-of-boundary predicted value samples in existing technologies is solved, thereby improving the quality of video encoding and decoding.

CN118575478APending Publication Date: 2024-08-30BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380017539.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-01-18
Filing Date
2023-01-18
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies suffer from inefficiency and quality loss when processing inter-frame prediction, especially in the processing of out-of-bounds prediction samples. In particular, existing technologies have failed to effectively solve this problem when out-of-bounds prediction samples need to be replaced.

Method used

By deriving the motion vectors of multiple reference images of the current coding block during video encoding and decoding, determining whether the predicted value sample points are outside the boundary, and replacing them with alternative predicted value samples when they are determined to be outside the boundary, the final predicted value sample points are generated by averaging the values, thus achieving effective processing of predicted value sample points outside the boundary.

Benefits of technology

It improves the processing efficiency and quality of out-of-bounds predicted value samples during video encoding and decoding, reduces video data loss, and enhances encoding efficiency and decoding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118575478A
    Figure CN118575478A
Patent Text Reader

Abstract

A method, an apparatus, and a non-transitory computer-readable storage medium for video encoding and decoding are provided. In one method, a decoder derives a first reference picture and a second reference picture for a current coding block; the decoder derives a first predictor sample and a second predictor sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; the decoder determines whether the first prediction value sample point and the second prediction value sample point are out of boundary (OOB), and in response to determining that the first prediction value sample point or the second prediction value sample point is OOB, determines whether the first prediction value sample point or the second prediction value sample point is OOB. The decoder replaces the first predicted value sample point or the second predicted value sample point serving as the OOB with a first replacement predicted value sample point or a second replacement predicted value sample point; and the decoder generates a final prediction sample point by averaging sample point values of the first prediction value sample point and the second prediction value sample point.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based upon and claims priority to provisional application No. 63 / 300,631 filed on January 18, 2022, the entire contents of which are incorporated herein by reference for all purposes. Technical Field

[0003] The present disclosure relates to video coding and compression. More specifically, the present disclosure relates to a method and apparatus for inter-frame prediction in video coding. Background Art

[0004] Various electronic devices such as digital televisions, laptops or desktop computers, tablet computers, digital cameras, digital recording devices, digital media players, video game consoles, smart phones, video teleconferencing devices, video streaming devices, etc. support digital video. Electronic devices transmit and receive or otherwise transmit digital video data and / or store digital video data on storage devices through communication networks. Due to the limited bandwidth capacity of communication networks and the limited memory resources of storage devices, before transmitting or storing video data, video codecs can be used to compress video data according to one or more video codec standards. For example, video codec standards include general video codecs (VVC), joint exploration test models (JEM), high-efficiency video codecs (HEVC / H.265), advanced video codecs (AVC / H.264), motion picture experts group (MPEG) codecs, etc. Video codecs are usually performed using prediction methods (e.g., inter-frame prediction, intra-frame prediction, etc.), which utilize the inherent redundancy in video data. Video codecs are intended to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation. Summary of the invention

[0005] Examples of the present disclosure provide methods and apparatus for inter-frame prediction in video coding.

[0006] According to a first aspect of the present disclosure, a method for decoding a bidirectional prediction coding block is provided. The method may include: deriving a first reference picture for a current coding block by a decoder; deriving a first prediction value sample from the first reference picture by the decoder based on a motion vector associated with the first reference picture using a motion compensation process; determining by the decoder whether the first prediction value sample is out of bounds (OOB), and in response to determining that the first prediction value sample is OOB, replacing the first prediction value sample as OOB with a first replacement prediction value sample by the decoder; deriving a second reference picture for the current coding block by the decoder; deriving a second prediction value sample from the second reference picture by the decoder based on a motion vector associated with the second reference picture using a motion compensation process; determining by the decoder whether the second prediction value sample is out of bounds (OOB), and in response to determining that the second prediction value sample is OOB, replacing the second prediction value sample as OOB with a second replacement prediction value sample by the decoder; and generating a final prediction sample by averaging the sample values ​​of the first prediction value sample and the second prediction value sample.

[0007] According to a second aspect of the present disclosure, a method for encoding a bidirectional prediction coding block is provided. The method may include: deriving a first reference picture for a current coding block by an encoder; deriving a first prediction value sample from the first reference picture by the encoder based on a motion vector associated with the first reference picture using a motion compensation process; determining by the encoder whether the first prediction value sample is out of bounds (OOB); and in response to determining that the first prediction value sample is OOB, replacing the prediction value sample as OOB with a first replacement prediction value sample by the encoder; deriving a second reference picture for the current coding block by the encoder; deriving a second prediction value sample from the second reference picture by the encoder based on a motion vector associated with the second reference picture using a motion compensation process; determining by the encoder whether the second prediction value sample is out of bounds (OOB); and in response to determining that the second prediction value sample is OOB, replacing the second prediction value sample as OOB with a second replacement prediction value sample by the decoder; and generating a final prediction sample by averaging the sample values ​​of the first prediction value sample and the second prediction value sample.

[0008] According to a third aspect of the present disclosure, a method for decoding a unidirectionally predicted coded block is provided. The method may include: deriving, by a decoder, a first reference picture for a current coded block; deriving, by the decoder, a prediction value sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; determining, by the decoder, whether the prediction value sample is out-of-bounds (OOB); and in response to determining that the prediction value sample is OOB, replacing, by the decoder, the prediction value sample that is OOB with an alternative prediction value sample.

[0009] According to a fourth aspect of the present disclosure, a method for encoding a unidirectional prediction coding block is provided. The method may include: deriving, by an encoder, a first reference picture for a current coding block; deriving, by the encoder, a prediction value sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; determining, by the encoder, whether the prediction value sample is out-of-bounds (OOB); and in response to determining that the prediction value sample is OOB, replacing, by the encoder, the prediction value sample that is OOB with an alternative prediction value sample.

[0010] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to restrict the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate examples consistent with the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0012] Figure 1 is a block diagram illustrating an exemplary system for encoding and decoding video blocks according to some embodiments of the present disclosure.

[0013] Figure 2 is a block diagram illustrating an exemplary video encoder according to some embodiments of the present disclosure.

[0014] Figure 3 is a block diagram illustrating an exemplary video decoder according to some embodiments of the present disclosure.

[0015] FIG. 4A to FIG. 4E is a block diagram illustrating how a frame may be recursively partitioned into multiple video blocks of different sizes and shapes according to some embodiments of the present disclosure.

[0016] Figure 5 Examples of positions of spatial merging candidates according to some embodiments of the present disclosure are illustrated.

[0017] Figure 6Illustrated are examples of candidate pairs considered for redundancy checking of spatial merging candidates according to some embodiments of the present disclosure.

[0018] Figure 7 Example motion vector scaling for temporal merging candidates according to some embodiments of the present disclosure is illustrated.

[0019] Figure 8 Candidate positions of temporal merging candidates according to some embodiments of the present disclosure are illustrated.

[0020] Fig.9A An example of an MMVD search point according to some embodiments of the present disclosure is illustrated.

[0021] Fig. 9B An example of an MMVD search point according to some embodiments of the present disclosure is illustrated.

[0022] Fig. 10A An example of a control point based affine motion model according to some embodiments of the present disclosure is illustrated.

[0023] Fig. 10B An example of a control point based affine motion model according to some embodiments of the present disclosure is illustrated.

[0024] Fig.11 An example of an affine MVF for each sub-block according to some embodiments of the present disclosure is illustrated.

[0025] Fig.12 The locations of inherited affine motion prediction values ​​are illustrated in accordance with some embodiments of the present disclosure.

[0026] Fig.13 The positioning of candidate positions for constructing an affine merge pattern according to some embodiments of the present disclosure is illustrated.

[0027] Fig.14 Examples of sub-blocks MVs and pixels according to some embodiments of the present disclosure are illustrated.

[0028] Fig.15A An example of spatially neighboring blocks used by ATVMP according to some embodiments of the present disclosure is illustrated.

[0029] Fig. 15B An example of a SbTMVP process according to some embodiments of the present disclosure is illustrated.

[0030] Fig.16 An example of an extended CU region used in BDOF according to some embodiments of the present disclosure is illustrated.

[0031] Fig.17An example of decoding-side motion vector refinement according to some embodiments of the present disclosure is illustrated.

[0032] Fig.18 An example of GPM segmentation grouped by the same angle according to some embodiments of the present disclosure is illustrated.

[0033] Fig.19 An example of unidirectional prediction MV selection for geometric partition mode according to some embodiments of the present disclosure is illustrated.

[0034] Fig. 20 An example of a top neighboring block and a left neighboring block used in CIIP weight derivation according to some embodiments of the present disclosure is illustrated.

[0035] Fig.21 An example of spatially neighboring blocks for deriving spatial merging candidates according to some embodiments of the present disclosure is illustrated.

[0036] Fig. 22 An example of template matching performed on a search area around an initial MV according to some embodiments of the present disclosure is illustrated.

[0037] Fig.23 An example of a diamond-shaped area in a search area according to some embodiments of the present disclosure is illustrated.

[0038] Fig.24 The frequency responses of the interpolation filter and the VVC interpolation filter at half-pixel phase according to some embodiments of the present disclosure are illustrated.

[0039] Fig.25 An example of a template and reference samples of the template in a reference picture according to some embodiments of the present disclosure is illustrated.

[0040] Fig.26 An example of using a template of motion information of a sub-block of a current block and a reference sample of the template for a block having sub-block motion according to some embodiments of the present disclosure is illustrated.

[0041] Fig. 27 An example of a padded reference picture for motion compensation according to some embodiments of the present disclosure is illustrated.

[0042] Fig.28 An example of fractional interpolation according to some embodiments of the present disclosure is illustrated.

[0043] Fig.29 is a block diagram illustrating a computing environment coupled with a user interface according to some implementations of the present disclosure.

[0044] Fig.30is a block diagram illustrating a video encoding and decoding process according to some embodiments of the present disclosure.

[0045] Fig.32 An example of a picture divided into CTUs according to some embodiments of the present disclosure is illustrated.

[0046] Fig.32 Illustrated are examples of pictures partitioned into tiles and raster scan strips according to some embodiments of the present disclosure.

[0047] Fig.33 Illustrated are examples of pictures partitioned into tiles and rectangular strips according to some embodiments of the present disclosure.

[0048] Fig.34 An example of a picture partitioned into 4 tiles and 4 rectangular strips according to some embodiments of the present disclosure is illustrated.

[0049] Fig.35 An example of a picture partitioned into 28 sub-pictures according to some embodiments of the present disclosure is illustrated.

[0050] Fig.36 An example of horizontal surround motion compensation in VVC according to some embodiments of the present disclosure is illustrated.

[0051] Fig.37 is a flowchart illustrating a video encoding and decoding method according to some embodiments of the present disclosure.

[0052] Fig.38 is a flowchart illustrating a method for decoding a bidirectionally predictive coded block according to some embodiments of the present disclosure.

[0053] Fig.39 is a flowchart illustrating a method for encoding a bidirectionally predictive coded block according to some embodiments of the present disclosure.

[0054] Fig.40 is a flowchart illustrating a method for decoding a unidirectionally predictive coded block according to some embodiments of the present disclosure.

[0055] Fig.41 is a flowchart illustrating a method for encoding a unidirectionally predictive coded block according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0056] Reference will now be made in detail to example embodiments, examples of which are illustrated in the accompanying drawings. The following descriptions all refer to the accompanying drawings, in which, unless otherwise specified, the same reference numerals in different drawings represent the same or similar elements. The embodiments set forth in the following descriptions of example embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with aspects related to the present disclosure recited in the appended claims.

[0057] The terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein is intended to represent and include any or all possible combinations of one or more items in the associated enumerated items.

[0058] It should be understood that although the terms "first", "second", "third", etc. may be used herein to describe various information, such information should not be limited by these terms. These terms are merely used to distinguish one type of information from another type of information. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information; and similarly, the second information may also be referred to as the first information. As used herein, the term "if" may be understood to mean "when" or "at" or "in response to a judgment", depending on the context.

[0059] Various video codec techniques can be used to compress video data. Video coding is performed according to one or more video codec standards. For example, today, some well-known video codec standards include Versatile Video Codec (VVC), High Efficiency Video Codec (HEVC, also known as H.265 or MPEG-H Part 2) and Advanced Video Codec (AVC, also known as H.264 or MPEG-4 Part 10), which are jointly developed by ISO / IEC MPEG and ITU-T VECG. AO Media Video 1 (AV1) was developed by the Alliance for Open Media (AOM) as a successor to its previous standard VP9. Audio and Video Codec (AVS) (which refers to digital audio and digital video compression standards) is another video compression series standard developed by the Audio and Video Coding Standard Workgroup of China. Most existing video coding standards are based on the well-known hybrid video coding framework, that is, using block-based prediction methods (e.g., inter-frame prediction, intra-frame prediction) to reduce the redundancy present in video images or sequences, and using transform coding to compress the energy of prediction errors. An important goal of video coding technology is to compress video data into a form that uses a lower bit rate while avoiding or minimizing video quality degradation.

[0060] The first generation of AVS standards includes the Chinese national standards "Information Technology Advanced Audio and Video Codec Part 2: Video" (referred to as AVS1) and "Information Technology Advanced Audio and Video Codec Part 16: Broadcasting and Television Video" (referred to as AVS+). Compared with the MPEG-2 standard, the first generation of AVS standards can provide about 50% bit rate savings at the same perceived quality. The video part of the AVS1 standard was promulgated as a Chinese national standard in February 2006. The second generation of AVS standards includes the Chinese national standard "Information Technology High Efficiency Multimedia Codec" (referred to as AVS2) series, which is mainly aimed at the transmission of additional HD TV programs. The codec efficiency of AVS2 is twice that of AVS+. In May 2016, AVS2 was promulgated as a Chinese national standard. At the same time, the video part of the AVS2 standard was submitted by the Institute of Electrical and Electronics Engineers (IEEE) as an international application standard. The AVS3 standard is a new generation of video codec standards for UHD video applications, aiming to surpass the codec efficiency of the latest international standard HEVC. In March 2019, at the 68th AVS meeting, the AVS3-P2 baseline was completed, which provides about 30% bit rate savings over the HEVC standard. Currently, there is a reference software called High Performance Model (HPM) maintained by the AVS Working Group to demonstrate a reference implementation of the AVS3 standard.

[0061] Figure 1 is a block diagram illustrating an exemplary system 10 for encoding and decoding video blocks in parallel according to some embodiments of the present disclosure. Figure 1 As shown, system 10 includes a source device 12 that generates and encodes video data to be decoded at a later time by a target device 14. Source device 12 and target device 14 may include any of a variety of electronic devices, including a desktop or laptop computer, a tablet computer, a smart phone, a set-top box, a digital television, a camera, a display device, a digital media player, a video game console, a video streaming device, etc. In some implementations, source device 12 and target device 14 are equipped with wireless communication capabilities.

[0062] In some embodiments, the target device 14 may receive the encoded video data to be decoded via the link 16. The link 16 may include any type of communication medium or device capable of moving the encoded video data from the source device 12 to the target device 14. In one example, the link 16 may include a communication medium for enabling the source device 12 to transmit the encoded video data directly to the target device 14 in real time. The encoded video data may be modulated and transmitted to the target device 14 according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form a portion of a packet-based network such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that may be used to facilitate communication from the source device 12 to the target device 14.

[0063] In some other embodiments, the encoded video data may be transferred from the output interface 22 to a storage device 32. Subsequently, the encoded video data in the storage device 32 may be accessed by the target device 14 via the input interface 28. The storage device 32 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a digital versatile disc (DVD), a compact disc read-only memory (CD-ROM), a flash memory, a volatile memory or a non-volatile memory, or any other suitable digital storage medium for storing encoded video data. In a further example, the storage device 32 may correspond to a file server or another intermediate storage device that can hold the encoded video data generated by the source device 12. The target device 14 may access the stored video data from the storage device 32 via streaming or downloading. The file server may be any type of computer capable of storing encoded video data and transmitting the encoded video data to the target device 14. Exemplary file servers include a web server (e.g., for a website), a file transfer protocol (FTP) server, a network attached storage (NAS) device, or a local disk drive. The target device 14 can access the encoded video data through any standard data connection, including a wireless channel suitable for accessing the encoded video data stored on the file server (e.g., a wireless fidelity (Wi-Fi) connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both. The transmission of the encoded video data from the storage device 32 can be a streaming transmission, a download transmission, or a combination of both.

[0064] like Figure 1 As shown in , source device 12 includes video source 18, video encoder 20 and output interface 22. Video source 18 may include sources such as video capture devices, such as cameras, video archives containing previously captured videos, video feed interfaces for receiving videos from video content providers, and / or computer graphics systems for generating computer graphics data as source video, or a combination of these sources. As an example, if video source 18 is a camera of a security monitoring system, source device 12 and target device 14 may form a camera phone or a video phone. However, the embodiments described in the present application may be generally applicable to video encoding and decoding and may be applied to wireless and / or wired applications.

[0065] Captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video data may be transmitted directly to target device 14 via output interface 22 of source device 12. The encoded video data may also (or alternatively) be stored on storage device 32 for later access by target device 14 or other devices for decoding and / or playback. Output interface 22 may further include a modem and / or a transmitter.

[0066] Target device 14 includes input interface 28, video decoder 30, and display device 34. Input interface 28 may include a receiver and / or a modem and receives encoded video data via link 16. The encoded video data transmitted via link 16 or provided on storage device 32 may include various syntax elements generated by video encoder 20 for use in decoding the video data by video decoder 30. Such syntax elements may be included within the encoded video data transmitted over a communication medium, stored on a storage medium, or stored on a file server.

[0067] In some implementations, the target device 14 may include a display device 34, which may be an integrated display device or an external display device configured to communicate with the target device 14. The display device 34 displays the decoded video data to a user and may include any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0068] The video encoder 20 and the video decoder 30 can operate according to a proprietary or industry standard (such as VVC, HEVC, MPEG-4 Part 10, AVC, or an extension of such a standard). It should be understood that the present application is not limited to a specific video encoding / decoding standard and can be applied to other video encoding / decoding standards. It is generally envisioned that the video encoder 20 of the source device 12 can be configured to encode the video data according to any of these current or future standards. Similarly, it is also generally envisioned that the video decoder 30 of the target device 14 can be configured to decode the video data according to any of these current or future standards.

[0069] The video encoder 20 and the video decoder 30 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When implemented partially in software, the electronic device can store instructions for the software in a suitable non-transitory computer-readable medium and use one or more processors to execute the instructions in hardware to perform the video encoding / decoding operations disclosed in the present disclosure. Each of the video encoder 20 and the video decoder 30 can be included in one or more encoders or decoders, any of which can be integrated as part of a combined encoder / decoder (CODEC) in the corresponding device.

[0070] Figure 2is a block diagram illustrating an exemplary video encoder 20 according to some embodiments described in the present application. The video encoder 20 can perform intra-frame prediction coding and inter-frame prediction coding of video blocks within a video frame. Intra-frame prediction coding relies on spatial prediction to reduce or remove spatial redundancy of video data within a given video frame or picture. Inter-frame prediction coding relies on temporal prediction to reduce or remove temporal redundancy of video data within adjacent video frames or pictures of a video sequence. It should be noted that in the field of video coding, the term "frame" can be used as a synonym for the term "image" or "picture".

[0071] like Figure 2 As shown in , the video encoder 20 includes a video data memory 40, a prediction processing unit 41, a decoded picture buffer (DPB) 64, an adder 50, a transform processing unit 52, a quantization unit 54, and an entropy coding unit 56. The prediction processing unit 41 further includes a motion estimation unit 42, a motion compensation unit 44, a partition unit 45, an intra-frame prediction processing unit 46, and an intra-frame block copy (BC) unit 48. In some embodiments, the video encoder 20 also includes an inverse quantization unit 58, an inverse transform processing unit 60, and an adder 62 for video block reconstruction. A loop filter 63 such as a deblocking filter can be located between the adder 62 and the DPB 64 to filter the block boundaries to remove blocking artifacts from the reconstructed video. In addition to the deblocking filter, another loop filter (such as a sample adaptive offset (SAO) filter and / or an adaptive loop filter (ALF)) can also be used to filter the output of the adder 62. In some examples, the loop filter may be omitted and the decoded video blocks may be provided directly by adder 62 to DPB 64. Video encoder 20 may take the form of fixed or programmable hardware units, or may be partitioned among one or more of the illustrated fixed or programmable hardware units.

[0072] Video data memory 40 may store video data to be encoded by components of video encoder 20. For example, video data may be stored in memory 40. Figure 1 The video source 18 shown obtains video data in the video data memory 40. The DPB 64 is a buffer that stores reference video data (e.g., reference frames or pictures) for encoding the video data by the video encoder 20 (e.g., in an intra-frame prediction codec mode or an inter-frame prediction codec mode). The video data memory 40 and the DPB 64 can be formed by any of a variety of memory devices. In various examples, the video data memory 40 can be on-chip with other components of the video encoder 20, or off-chip relative to those components.

[0073] like Figure 2As shown in , after receiving the video data, the partition unit 45 within the prediction processing unit 41 partitions the video data into video blocks. The partitioning may also include partitioning the video frame into strips, tiles (e.g., video block sets), or other larger codec units (CUs) according to a predefined partitioning structure (e.g., a quadtree (QT) structure associated with the video data). A video frame is or may be viewed as a two-dimensional array or matrix of samples having sample values. The samples in the array may also be referred to as pixels (pixels or pels). Many samples in the horizontal and vertical directions (or axes) of the array or picture define the size and / or resolution of the video frame. For example, a video frame may be divided into a plurality of video blocks by using QT partitioning. A video block is again or may be viewed as a two-dimensional array or matrix of samples having sample values, but its dimension is smaller than a video frame. Many samples in the horizontal and vertical directions (or axes) of a video block define the size of the video block. The video block can be further divided into one or more block partitions or sub-blocks (which can again form blocks) by, for example, iteratively using QT partitioning, binary tree (BT) partitioning or ternary tree (TT) partitioning or any combination thereof. It should be noted that the term "block" or "video block" used herein can be a part of a frame or picture, in particular a rectangular (square or non-square) part. For example, with reference to HEVC and VVC, a block or video block can be or correspond to a coding tree unit (CTU), a CU, a prediction unit (PU) or a transform unit (TU), and / or can be or correspond to a corresponding block (e.g., a coding tree block (CTB), a coding block (CB), a prediction block (PB) or a transform block (TB)) and / or corresponds to a sub-block.

[0074] Prediction processing unit 41 may select one of a plurality of possible prediction coding modes for the current video block based on the error results (e.g., coding rate and distortion level), such as one of a plurality of intra-frame prediction coding modes or one of a plurality of inter-frame prediction coding modes. Prediction processing unit 41 may provide the resulting intra-frame prediction coding block or inter-frame prediction coding block to adder 50 to generate a residual block, and to adder 62 to reconstruct the coded block for subsequent use as part of a reference frame. Prediction processing unit 41 also provides syntax elements such as motion vectors, intra-frame mode indicators, partition information, and other such syntax information to entropy coding unit 56.

[0075] In order to select an appropriate intra-frame prediction coding mode for the current video block, the intra-frame prediction processing unit 46 within the prediction processing unit 41 can perform intra-frame prediction coding on the current video block relative to one or more neighboring blocks in the same frame as the current block to be encoded to provide spatial prediction. The motion estimation unit 42 and the motion compensation unit 44 within the prediction processing unit 41 perform inter-frame prediction coding on the current video block relative to one or more prediction blocks in one or more reference frames to provide temporal prediction. The video encoder 20 can perform multiple codec passes, for example, to select an appropriate codec mode for each block of video data.

[0076] In some embodiments, the motion estimation unit 42 determines the inter-frame prediction mode of the current video frame by generating a motion vector according to a predetermined pattern within the sequence of video frames, wherein the motion vector indicates the displacement of a video block within the current video frame relative to a prediction block within a reference video frame. Motion estimation performed by the motion estimation unit 42 is the process of generating motion vectors, which estimates the motion of video blocks. The motion vector may, for example, indicate the displacement of a video block within the current video frame or picture relative to a prediction block within a reference frame, wherein the prediction block is relative to the current block encoded and decoded within the current frame. The predetermined pattern may designate the video frames in the sequence as P frames or B frames. The intra BC unit 48 may determine a vector (e.g., a block vector) for intra BC encoding in a manner similar to the manner in which the motion estimation unit 42 determines the motion vector for inter-frame prediction, or the motion estimation unit 42 may be utilized to determine the block vector.

[0077] The prediction block of the video block may be or may correspond to a block or reference block of a reference frame, which is considered to closely match the video block to be encoded in terms of pixel difference values, which may be determined by the sum of absolute differences (SAD), the sum of squared differences (SSD), or other difference metrics. In some embodiments, the video encoder 20 may calculate the value of the sub-integer pixel position of the reference frame stored in the DPB 64. For example, the video encoder 20 may insert the value of a quarter pixel position, an eighth pixel position, or other fractional pixel position of the reference frame. Therefore, the motion estimation unit 42 may perform a motion search relative to the full pixel position and the fractional pixel position and output a motion vector with fractional pixel accuracy.

[0078] Motion estimation unit 42 calculates a motion vector for a video block in an inter-prediction coded frame by comparing the position of the video block to the position of a prediction block of a reference frame selected from a first reference frame list (List 0) or a second reference frame list (List 1), each of which identifies one or more reference frames stored in DPB 64. Motion estimation unit 42 sends the calculated motion vector to motion compensation unit 44 and then to entropy encoding unit 56.

[0079] The motion compensation performed by the motion compensation unit 44 may involve obtaining or generating a prediction block based on the motion vector determined by the motion estimation unit 42. After receiving the motion vector of the current video block, the motion compensation unit 44 may locate the prediction block pointed to by the motion vector in one of the reference frame lists, obtain the prediction block from the DPB 64 and forward the prediction block to the adder 50. The adder 50 then forms a residual video block with pixel difference values ​​by subtracting the pixel values ​​of the prediction block provided by the motion compensation unit 44 from the pixel values ​​of the current video block being encoded. The pixel difference values ​​forming the residual video block may include a luminance difference component or a chrominance difference component or both. The motion compensation unit 44 may also generate syntax elements associated with the video block of the video frame for use by the video decoder 30 when decoding the video block of the video frame. The syntax elements may include, for example, syntax elements defining a motion vector for identifying the prediction block, any flag indicating a prediction mode, or any other syntax information described herein. Note that the motion estimation unit 42 and the motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes.

[0080] In some embodiments, the intra BC unit 48 may generate a vector and obtain a prediction block in a manner similar to that described above in conjunction with the motion estimation unit 42 and the motion compensation unit 44, but wherein the prediction block is in the same frame as the current block being encoded, and wherein the vector is referred to as a block vector relative to the motion vector. Specifically, the intra BC unit 48 may determine an intra prediction mode for encoding the current block. In some examples, the intra BC unit 48 may encode the current block using various intra prediction modes, for example, during separate encoding passes, and test its performance through rate-distortion analysis. Next, the intra BC unit 48 may select an appropriate intra prediction mode to use among the various tested intra prediction modes and generate an intra mode indicator accordingly. For example, the intra BC unit 48 may calculate a rate-distortion value using rate-distortion analysis for various tested intra prediction modes and select an intra prediction mode with the best rate-distortion characteristic among the tested modes as the appropriate intra prediction mode to be used. The rate-distortion analysis generally determines the amount of distortion (or error) between a coded block and the original, uncoded block (coded to produce the coded block) and the bit rate (i.e., the number of bits) used to produce the coded block. Intra BC unit 48 may calculate a ratio based on the distortion and rate for each coded block to determine which intra-prediction mode exhibits the best rate-distortion value for the block.

[0081] In other examples, intra BC unit 48 may use motion estimation unit 42 and motion compensation unit 44 in whole or in part to perform such functions for intra BC prediction in accordance with embodiments described herein. In either case, for intra block copying, the prediction block may be a block that is considered to closely match the block to be encoded in terms of pixel differences, which may be determined by SAD, SSD, or other difference metrics, and identification of the prediction block may include calculating values ​​for sub-integer pixel positions.

[0082] Regardless of whether the prediction block is from the same frame according to intra-frame prediction or from different frames according to inter-frame prediction, the video encoder 20 can form a residual video block by subtracting the pixel values ​​of the prediction block from the pixel values ​​of the current video block being encoded and decoded to form pixel difference values. The pixel difference values ​​forming the residual video block may include luminance component differences and chrominance component differences.

[0083] As described above, the intra-prediction processing unit 46 may perform intra-prediction on the current video block as an alternative to the inter-prediction performed by the motion estimation unit 42 and the motion compensation unit 44, or the intra-block copy prediction performed by the intra BC unit 48. Specifically, the intra-prediction processing unit 46 may determine an intra-prediction mode for encoding the current block. To this end, the intra-prediction processing unit 46 may encode the current block using various intra-prediction modes, for example, during a separate encoding pass, and the intra-prediction processing unit 46 (or a mode selection unit in some examples) may select an appropriate intra-prediction mode from the tested intra-prediction modes to use. The intra-prediction processing unit 46 may provide information indicating the selected intra-prediction mode of the block to the entropy encoding unit 56. The entropy encoding unit 56 may encode the information indicating the selected intra-prediction mode in the bitstream.

[0084] After prediction processing unit 41 determines a prediction block for the current video block via inter-prediction or intra-prediction, adder 50 forms a residual video block by subtracting the prediction block from the current video block. The residual video data in the residual block may be included in one or more TUs and provided to transform processing unit 52. Transform processing unit 52 transforms the residual video data into residual transform coefficients using a transform such as a discrete cosine transform (DCT) or a conceptually similar transform.

[0085] Transform processing unit 52 may send the resulting transform coefficients to quantization unit 54. Quantization unit 54 quantizes the transform coefficients to further reduce the bit rate. The quantization process may also reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, quantization unit 54 may then perform a scan of the matrix including the quantized transform coefficients. Alternatively, entropy encoding unit 56 may perform the scan.

[0086] After quantization, entropy coding unit 56 entropy encodes the quantized transform coefficients into a video bitstream using, for example, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), syntax-based context adaptive binary arithmetic coding (SBAC), probability interval partitioned entropy (PIPE) coding, or other entropy coding methods or techniques. The encoded bitstream may then be transmitted to a video bitstream such as Figure 1 The video decoder 30 shown, or archive it to Figure 1 The data is stored in the storage device 32 as shown for later transmission to or retrieval by the video decoder 30. The entropy coding unit 56 may also entropy encode the motion vectors and other syntax elements of the current video frame being encoded.

[0087] Inverse quantization unit 58 and inverse transform processing unit 60 apply inverse quantization and inverse transform, respectively, to reconstruct the residual video block in the pixel domain to generate a reference block for predicting other video blocks. As described above, motion compensation unit 44 may generate a motion compensated prediction block from one or more reference blocks of a frame stored in DPB 64. Motion compensation unit 44 may also apply one or more interpolation filters to the prediction block to calculate sub-integer pixel values ​​for use in motion estimation.

[0088] Adder 62 adds the reconstructed residual block to the motion compensated prediction block produced by motion compensation unit 44 to produce a reference block for storage in DPB 64. The reference block may then be used as a prediction block by intra BC unit 48, motion estimation unit 42, and motion compensation unit 44 to inter-predict another video block in a subsequent video frame.

[0089] Figure 3 1 is a block diagram illustrating an exemplary video decoder 30 according to some embodiments of the present application. The video decoder 30 includes a video data memory 79, an entropy decoding unit 80, a prediction processing unit 81, an inverse quantization unit 86, an inverse transform processing unit 88, an adder 90, and a DPB 92. The prediction processing unit 81 further includes a motion compensation unit 82, an intra-frame prediction unit 84, and an intra-frame BC unit 85. The video decoder 30 may perform the above-mentioned Figure 2 The decoding process is the reverse of the encoding process described with respect to video encoder 20. For example, motion compensation unit 82 may generate prediction data based on motion vectors received from entropy decoding unit 80, and intra-prediction unit 84 may generate prediction data based on intra-prediction mode indicators received from entropy decoding unit 80.

[0090] In some examples, units of the video decoder 30 may be assigned to perform embodiments of the present application. Likewise, in some examples, embodiments of the present disclosure may be divided between one or more units of the video decoder 30. For example, the intra BC unit 85 may perform embodiments of the present application alone or in combination with other units of the video decoder 30 (such as the motion compensation unit 82, the intra prediction unit 84, and the entropy decoding unit 80). In some examples, the video decoder 30 may not include the intra BC unit 85, and the functions of the intra BC unit 85 may be performed by other components of the prediction processing unit 81 (such as the motion compensation unit 82).

[0091] The video data memory 79 may store video data to be decoded by other components of the video decoder 30, such as an encoded video bitstream. For example, the video data stored in the video data memory 79 may be obtained from a storage device 32, a local video source (such as a camera) via a wired or wireless network transmission of the video data or by accessing a physical data storage medium (e.g., a flash drive or a hard disk). The video data memory 79 may include a coded picture buffer (CPB) that stores encoded video data from an encoded video bitstream. The DPB 92 of the video decoder 30 stores reference video data for use in decoding the video data by the video decoder 30 (e.g., in an intra-frame prediction codec mode or an inter-frame prediction codec mode). The video data memory 79 and the DPB 92 may be formed by any of a variety of memory devices, such as a dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. For illustrative purposes, the video data memory 79 and the DPB 92 are shown in FIG. 1 . Figure 3 92 are depicted as two different components of the video decoder 30. However, it will be apparent to those skilled in the art that the video data memory 79 and the DPB 92 may be provided by the same memory device or by separate memory devices. In some examples, the video data memory 79 may be on-chip with other components of the video decoder 30, or off-chip relative to those components.

[0092] During the decoding process, the video decoder 30 receives an encoded video bitstream representing a video block of an encoded video frame and associated syntax elements. The video decoder 30 may receive syntax elements at the video frame level and / or the video block level. The entropy decoding unit 80 of the video decoder 30 entropy decodes the bitstream to generate quantized coefficients, motion vectors or intra-frame prediction mode indicators, and other syntax elements. The entropy decoding unit 80 then forwards the motion vectors or intra-frame prediction mode indicators and other syntax elements to the prediction processing unit 81.

[0093] When a video frame is encoded as an intra-frame prediction coded (I) frame or for intra-frame coded prediction blocks in other types of frames, the intra-frame prediction unit 84 of the prediction processing unit 81 can generate prediction data for a video block of the current video frame based on the signaled intra-frame prediction mode and reference data from a previously decoded block of the current frame.

[0094] When the video frame is encoded as an inter-frame prediction codec (i.e., B or P) frame, the motion compensation unit 82 of the prediction processing unit 81 generates one or more prediction blocks of the video block of the current video frame based on the motion vectors and other syntax elements received from the entropy decoding unit 80. Each prediction block can be generated from a reference frame in one of the reference frame lists. The video decoder 30 can construct the reference frame lists: List 0 and List 1 based on the reference frames stored in the DPB 92 using a default construction technique.

[0095] In some examples, when a video block is encoded or decoded according to the intra BC mode described herein, intra BC unit 85 of prediction processing unit 81 generates a prediction block for the current video block based on the block vector and other syntax elements received from entropy decoding unit 80. The prediction block may be within a reconstructed region of the same picture as the current video block defined by video encoder 20.

[0096] The motion compensation unit 82 and / or the intra BC unit 85 determine the prediction information of the video block of the current video frame by parsing the motion vector and other syntax elements, and then use the prediction information to generate the prediction block of the decoded current video block. For example, the motion compensation unit 82 uses some of the received syntax elements to determine the prediction mode (e.g., intra prediction or inter prediction) used to encode the video block of the video frame, the inter prediction frame type (e.g., B or P), the construction information of one or more reference frame lists in the reference frame list of the frame, the motion vector of each inter prediction encoded video block of the frame, the inter prediction state of each inter prediction encoded video block of the frame, and other information for decoding the video block in the current video frame.

[0097] Similarly, the intra BC unit 85 may use some of the received syntax elements (e.g., flags) to determine that the current video block is predicted using the intra BC mode, construction information that video blocks of the frame are within the reconstructed region and should be stored in the DPB 92, block vectors for each intra BC predicted video block of the frame, intra BC prediction status for each intra BC predicted video block of the frame, and other information for decoding the video blocks in the current video frame.

[0098] Motion compensation unit 82 may also perform interpolation using interpolation filters to calculate interpolated values ​​for sub-integer pixels of a reference block, as used by video encoder 20 during encoding of the video block. In this case, motion compensation unit 82 may determine the interpolation filters used by video encoder 20 from the received syntax elements and use the interpolation filters to produce a prediction block.

[0099] Inverse quantization unit 86 inverse quantizes the quantized transform coefficients provided in the bitstream and entropy decoded by entropy decoding unit 80, using the same quantization parameters calculated by video encoder 20 for each video block in the video frame to determine the degree of quantization. Inverse transform processing unit 88 applies an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients to reconstruct the residual block in the pixel domain.

[0100] After the motion compensation unit 82 or the intra BC unit 85 generates a prediction block for the current video block based on the vector and other syntax elements, the adder 90 reconstructs the decoded video block of the current video block by summing the residual block from the inverse transform processing unit 88 and the corresponding prediction block generated by the motion compensation unit 82 and the intra BC unit 85. A loop filter 91 (such as a deblocking filter, an SAO filter, and / or an ALF) can be positioned between the adder 90 and the DPB 92 to further process the decoded video block. In some examples, the loop filter 91 can be omitted and the decoded video block can be provided directly to the DPB 92 by the adder 90. The decoded video blocks in a given frame are then stored in the DPB 92, which stores reference frames for subsequent motion compensation of the next video block. The DPB 92 or a memory device separate from the DPB 92 can also store the decoded video for later presentation on a display such as a video player. Figure 1 On a display device such as a display device 34.

[0101] In a typical video encoding and decoding process, a video sequence typically includes an ordered set of frames or pictures. Each frame may include three sample arrays, denoted as SL, SCb, and SCr. SL is a two-dimensional array of luma samples. SCb is a two-dimensional array of Cb chroma samples. SCr is a two-dimensional array of Cr chroma samples. In other instances, a frame may be monochrome and therefore include only a two-dimensional array of luma samples.

[0102] like Figure 4AAs shown, the video encoder 20 (or more specifically, the partition unit 45) generates an encoded representation of a frame by first partitioning the frame into a set of CTUs. A video frame may include an integer number of CTUs sequentially ordered from left to right and from top to bottom in a raster scan order. Each CTU is the largest logical coding unit, and the width and height of the CTU are signaled by the video encoder 20 in a sequence parameter set so that all CTUs in a video sequence have the same size, i.e., one of 128×128, 64×64, 32×32, and 16×16. However, it should be noted that the present application is not necessarily limited to a particular size. As Figure 4B As shown, each CTU may include one CTB for luma samples, two corresponding coding tree blocks for chroma samples, and syntax elements for encoding and decoding samples of the coding tree blocks. The syntax elements describe the properties of different types of units of the coding and decoding blocks of pixels and how the video sequence can be reconstructed at the video decoder 30, and the syntax elements include inter-frame prediction or intra-frame prediction, intra-frame prediction mode, motion vector and other parameters. In a monochrome picture or a picture with three separate color planes, a CTU may include a single coding tree block and syntax elements for encoding and decoding samples of the coding tree block. The coding tree block may be an N×N sample block.

[0103] To achieve better performance, the video encoder 20 may recursively perform tree partitioning (such as binary tree partitioning, ternary tree partitioning, quadtree partitioning, or a combination thereof) on the coding tree block of the CTU and divide the CTU into smaller CUs. Figure 4C As shown, a 64×64 CTU 400 is first divided into four smaller CUs, each with a block size of 32×32. Among the four smaller CUs, CU 410 and CU 420 are each divided into four 16×16 CUs by block size. Two 16×16 CUs 430 and 440 are each further divided into four 8×8 CUs by block size. Figure 4D Depicted diagram Figure 4C The quadtree data structure of the final result of the partitioning process of the CTU 400 depicted in FIG. 4 is shown in FIG. 4 , with each leaf node of the quadtree corresponding to a CU with a corresponding size ranging from 32×32 to 8×8. Figure 4B For a CTU depicted in Figure 1, each CU may include a CB of luma samples and two corresponding coding blocks of chroma samples of the same size frame, as well as syntax elements for encoding and decoding the samples of the coding blocks. In a monochrome picture or a picture with three separate color planes, a CU may include a single coding block and syntax structures for encoding and decoding the samples of the coding block. It should be noted that Figure 4C and Figure 4DThe quadtree partitioning depicted in FIG is for illustration purposes only, and a CTU can be partitioned into multiple CUs to accommodate different local characteristics based on quadtree / ternary tree / binary tree partitioning. In the multi-type tree structure, a CTU is partitioned by a quadtree structure, and each quadtree leaf CU can be further partitioned by a binary tree structure or a ternary tree structure. Figure 4E As shown, there are five possible partition types for a coding block with width W and height H, namely, quadrifugal partition, horizontal binary partition, vertical binary partition, horizontal trifugal partition and vertical trifugal partition.

[0104] In some embodiments, the video encoder 20 may further partition the coding block of the CU into one or more M×N PBs. A PB is a rectangular (square or non-square) block of samples to which the same prediction (inter or intra) is applied. The PU of a CU may include a PB of luma samples, two corresponding PBs of chroma samples, and syntax elements for predicting the PBs. In a monochrome picture or a picture with three separate color planes, a PU may include a single PB and a syntax structure for predicting the PB. The video encoder 20 may generate predicted luma, Cb, and Cr blocks for the luma, Cb, and Cr PBs of each PU of the CU.

[0105] Video encoder 20 may use intra prediction or inter prediction to generate a prediction block for a PU. If video encoder 20 uses intra prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of a frame associated with the PU. If video encoder 20 uses inter prediction to generate a prediction block for a PU, video encoder 20 may generate the prediction block for the PU based on decoded samples of one or more frames other than the frame associated with the PU.

[0106] After the video encoder 20 generates the predicted luma, Cb, and Cr blocks of one or more PUs of a CU, the video encoder 20 may generate a luma residual block of the CU by subtracting the predicted luma block of the CU from its original luma coding block, so that each sample in the luma residual block of the CU indicates the difference between a luma sample in one of the predicted luma blocks of the CU and a corresponding sample in the original luma coding block of the CU. Similarly, the video encoder 20 may generate a Cb residual block and a Cr residual block of the CU, respectively, so that each sample in the Cb residual block of the CU indicates the difference between a Cb sample in one of the predicted Cb blocks of the CU and a corresponding sample in the original Cb coding block of the CU, and each sample in the Cr residual block of the CU may indicate the difference between a Cr sample in one of the predicted Cr blocks of the CU and a corresponding sample in the original Cr coding block of the CU.

[0107] In addition, if Figure 4CAs illustrated, the video encoder 20 may use quadtree partitioning to decompose the luma, Cb, and Cr residual blocks of a CU into one or more luma, Cb, and Cr transform blocks, respectively. A transform block is a rectangular (square or non-square) block of samples to which the same transform is applied. A TU of a CU may include a transform block of luma samples, two corresponding transform blocks of chroma samples, and syntax elements for transforming the transform block samples. Thus, each TU of a CU may be associated with a luma transform block, a Cb transform block, and a Cr transform block. In some examples, the luma transform block associated with a TU may be a sub-block of the luma residual block of the CU. The Cb transform block may be a sub-block of the Cb residual block of the CU. The Cr transform block may be a sub-block of the Cr residual block of the CU. In a monochrome picture or a picture with three separate color planes, a TU may include a single transform block and a syntax structure for transforming the samples of the transform block.

[0108] The video encoder 20 may apply one or more transforms to the luma transform block of the TU to generate a luma coefficient block of the TU. The coefficient block may be a two-dimensional array of transform coefficients. The transform coefficient may be a scalar. The video encoder 20 may apply one or more transforms to the Cb transform block of the TU to generate a Cb coefficient block of the TU. The video encoder 20 may apply one or more transforms to the Cr transform block of the TU to generate a Cr coefficient block of the TU.

[0109] After generating a coefficient block (e.g., a luma coefficient block, a Cb coefficient block, or a Cr coefficient block), the video encoder 20 may quantize the coefficient block. Quantization generally refers to the process of quantizing transform coefficients to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. After the video encoder 20 quantizes the coefficient block, the video encoder 20 may entropy encode the syntax elements indicating the quantized transform coefficients. For example, the video encoder 20 may perform CABAC on the syntax elements indicating the quantized transform coefficients. Ultimately, the video encoder 20 may output a bitstream including a sequence of bits forming a representation of a coded frame and associated data, which is stored in the storage device 32 or transmitted to the target device 14.

[0110] After receiving the bitstream generated by the video encoder 20, the video decoder 30 may parse the bitstream to obtain syntax elements from the bitstream. The video decoder 30 may reconstruct a frame of video data based at least in part on the syntax elements obtained from the bitstream. The process of reconstructing video data is generally the opposite of the encoding process performed by the video encoder 20. For example, the video decoder 30 may perform an inverse transform on a coefficient block associated with a TU of the current CU to reconstruct a residual block associated with the TU of the current CU. The video decoder 30 also reconstructs the coding block of the current CU by adding the samples of the prediction block of the PU of the current CU to the corresponding samples of the transform block of the TU of the current CU. After reconstructing the coding block of each CU of the frame, the video decoder 30 may reconstruct the frame.

[0111] As mentioned above, video codecs mainly use two modes, i.e., intra-frame prediction (or intra-prediction) and inter-frame prediction (or inter-prediction) to achieve video compression. It should be noted that IBC can be considered as intra-frame prediction or a third mode. Between these two modes, inter-frame prediction contributes more to coding efficiency than intra-frame prediction due to the use of motion vectors for predicting the current video block from the reference video block.

[0112] However, with the continuous improvement of video data capture technology and finer video block sizes for retaining details in video data, the amount of data required to represent the motion vector of the current frame has also increased significantly. One way to overcome this challenge is to benefit from the fact that not only a group of neighboring CUs in the spatial and temporal domains have similar video data for prediction purposes, but also the motion vectors between these neighboring CUs are similar. Therefore, by exploring the spatial and temporal correlation of CUs, the motion information of spatially neighboring CUs and / or temporally juxtaposed CUs can be used as an approximation of the motion information (e.g., motion vector) of the current CU, which is also called the "motion vector predictor" (MVP) of the current CU.

[0113] Instead, it will be combined as above Figure 2 The actual motion vector of the current CU determined by the motion estimation unit 42 is encoded into the video bitstream, and the motion vector prediction value of the current CU is subtracted from the actual motion vector of the current CU to generate the motion vector difference (MVD) of the current CU. In this way, the motion vector determined by the motion estimation unit 42 for each CU of the frame does not need to be encoded into the video bitstream, and the amount of data used to represent the motion information in the video bitstream can be significantly reduced.

[0114] Like the process of selecting a prediction block in a reference frame during inter-frame prediction of a coding block, a set of rules need to be adopted by both the video encoder 20 and the video decoder 30 for constructing a motion vector candidate list (also referred to as a "merge list") of the current CU using those potential candidate motion vectors associated with spatially neighboring CUs and / or temporally collocated CUs of the current CU, and then selecting a member from the motion vector candidate list as the motion vector prediction value of the current CU. In doing so, the motion vector candidate list itself does not need to be transmitted from the video encoder 20 to the video decoder 30, and the index of the selected motion vector prediction value within the motion vector candidate list is sufficient for the video encoder 20 and the video decoder 30 to use the same motion vector prediction value within the motion vector candidate list to encode and decode the current CU.

[0115] For each inter-predicted CU, the motion parameters consist of a motion vector, a reference picture index, and a reference picture list usage index, as well as additional information required by the new codec features of VVC for sample generation for inter-prediction. The motion parameters can be signaled explicitly or implicitly. When a CU is encoded and decoded in skip mode, the CU is associated with one PU and has no significant residual coefficients, no encoded motion vector Δ or reference picture index. A merge mode is specified to obtain the motion parameters of the current CU from neighboring CUs (including spatial and temporal candidates) and additional scheduling introduced in VVC. The merge mode can be applied to any inter-predicted CU, not just for skip mode. An alternative to the merge mode is explicit transmission of motion parameters, where the motion vector, the corresponding reference picture index for each reference picture list and the reference picture list usage flag, as well as other required information, are explicitly signaled per CU.

[0116] In addition, ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) are studying the potential need for standardization of future video codec technologies with compression capabilities that significantly exceed those of the current VVC standard. Such future standardization actions could take the form of (multiple) additional extensions to VVC or entirely new standards. A group known as the Joint Video Exploration Team (JVET) is jointly conducting this exploratory activity in a joint collaborative effort to evaluate the compression technology designs proposed by its experts in this area. The first Exploration Experiment (EE) was established at the JVET meetings between January 6 and 15, 2021, and the Exploration software model was named Enhanced Compression Model (ECM), and ECM version 2 (ECM2) was released in August 2021. The newly developed inter-frame prediction scheme in ECM2 will be described in detail in the following sections.

[0117] The following sections provide details about the inter prediction methods specified in VVC and the ECM model under development.

[0118] Extended Merge Prediction in VVC

[0119] In VVC, the merge candidate list is constructed by including the following five types of candidates in order:

[0120] 1). Spatial MVP from spatially adjacent CUs

[0121] 2). Time MVP from the same CU

[0122] 3). History-based MVP from FIFO table

[0123] 4). Average MVP in pairs

[0124] 5). Zero MV.

[0125] The size of the merge list is signaled in the sequence parameter set header, and the maximum allowed size of the merge list is 6. For each CU codec in merge mode, the index of the best merge candidate is encoded using truncated unary binarization (TU). The first binary bit of the merge index is coded using context, and the other binary bits are coded using bypass.

[0126] This section provides the derivation process for each type of merge candidate. As done in HEVC, VVC also supports parallel derivation of merge candidate lists for all CUs in a region of a certain size.

[0127] Spatial Candidate Derivation in VVC

[0128] The derivation of spatial merge candidates in VVC is the same as that in HEVC, except that the positions of the first two merge candidates are swapped. Figure 5 Up to four merge candidates are selected from the candidates at the positions depicted in . The derivation order is B0, A0, B1, A1 and B2. Position B2 is only considered when one or more CUs at positions B0, A0, B1, A1 are not available (for example, because it belongs to another slice or tile) or is intra-coded. After the candidate at position A1 is added, a redundancy check is performed on the addition of the remaining candidates, which ensures that candidates with the same motion information are excluded from the list, thereby improving the encoding and decoding efficiency. In order to reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead, only the pairs with the same motion information are considered. Figure 6 The arrows in are linked to each other, and a candidate is added to the list only if the corresponding candidate for redundancy check does not have the same motion information.

[0129] Temporal Candidate Derivation in VVC

[0130] In this step, only one candidate is added to the list. In particular, in the derivation of this temporal merge candidate, the scaled motion vector is derived based on the co-located CU belonging to the co-located reference picture. The reference picture list and reference index used to derive the co-located CU are explicitly signaled in the slice header. Figure 7 As shown by the dotted line in , the scaled motion vector of the temporal merge candidate is obtained, which is scaled from the motion vector of the co-located CU using the POC distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero.

[0131] like Figure 8 As depicted, the position of the temporal candidate is selected between candidates C0 and C1. If the CU at position C0 is not available, is intra-coded, or is outside the current row of the CTU, then position C1 is used. Otherwise, position C0 is used to derive the temporal merge candidate.

[0132] History-based Merge Candidate Derivation in VVC

[0133] The history-based MVP (HMVP) merge candidate is added to the merge list after the spatial MVP and TMVP. In this method, the motion information of the previously coded block is stored in the table and used as the MVP of the current CU. A table with multiple HMVP candidates is maintained during the encoding / decoding process. When a new CTU row is encountered, the table is reset (cleared). Whenever there is a non-sub-block inter-coded CU, the associated motion information is added as the last entry of the table as a new HMVP candidate.

[0134] The HMVP table size S is set to 6, which means that at most 5 history-based MVP (HMVP) candidates can be added to the table. When a new motion candidate is inserted into the table, a constrained first-in-first-out (FIFO) rule is used, in which a redundancy check is first applied to find if there is an identical HMVP in the table. If found, the identical HMVP is removed from the table, and then all HMVP candidates are moved forward and the identical HMVP is inserted into the last entry of the table.

[0135] HMVP candidates can be used in the merge candidate list construction process. Check the latest HMVP candidates in the table in order and insert them into the candidate list after the TMVP candidate. Apply redundancy check to the HMVP candidates to obtain spatial or temporal merge candidates.

[0136] To reduce the number of redundant checking operations, the following simplifications are introduced:

[0137] 1. The last two entries in the table are checked for redundancy with respect to the A1 and B1 spatial candidates, respectively.

[0138] 2. Once the total number of available merge candidates reaches the maximum allowed merge candidates minus 1, the merge candidate list construction process from HMVP is terminated.

[0139] Pairwise average merging candidate derivation in VVC

[0140] A pairwise average candidate is generated by averaging the predefined candidate pairs in the existing merge candidate list using the first two merge candidates. Accordingly, the first merge candidate is defined as p0Cand and the second merge candidate can be defined as p1Cand. For each reference list, the average motion vector is calculated separately according to the availability of the motion vectors of p0Cand and p1Cand. If two motion vectors are available in one list, the two motion vectors are averaged even when they point to different reference pictures, and their reference pictures are set to one of p0Cand; if only one motion vector is available, the motion vector is used directly; if no motion vector is available, the list is kept invalid. In addition, if the half-pixel interpolation filter index of p0Cand and p1Cand is different, it is set to 0.

[0141] When the merge list is not full after adding pairwise average merge candidates, zero MVPs are inserted at the end until the maximum number of merge candidates is encountered.

[0142] High-precision (1 / 16 pixel) motion compensation and motion vector storage in VVC

[0143] VVC improves MV accuracy to 1 / 16 luma sample to improve prediction efficiency for slow-motion video. This higher motion accuracy is particularly helpful for video content with local changes and non-translational motion, such as in the case of affine mode. For fractional position sample generation with higher MV accuracy, HEVC's 8-tap luma interpolation filter and 4-tap chroma interpolation filter are extended to 16 phases for luma and 32 phases for chroma. This extended filter set is applied to the MC process of inter-coded CUs except CUs in affine mode. For affine mode, a set of 6-tap luma interpolation filters with 16 phases is used to reduce computational complexity and save memory bandwidth.

[0144] In VVC, the highest precision of the explicitly signaled motion vectors for non-affine CUs is one-quarter luma sample. In some inter prediction modes such as affine mode, motion vectors can be signaled with 1 / 16 luma sample precision. In all inter-coded CUs with implicitly inferred MVs, the MVs are derived with 1 / 16 luma sample precision, and motion compensated prediction is performed with 1 / 16 sample precision. In terms of intra motion field storage, all motion vectors are stored with 1 / 16 luma sample precision.

[0145] For the temporal motion field storage used by TMVP and SbTVMP, motion field compression is performed at an 8×8 granularity compared to 16×16 in HEVC.

[0146] Merge Mode Using MVD in VVC (MMVD)

[0147] In addition to the merge mode in which implicitly derived motion information is directly used for prediction sample generation of the current CU, a merge mode using motion vector difference (MMVD) is introduced in VVC. The MMVD flag is signaled immediately after the regular merge flag is sent to specify whether the MMVD mode is used for the CU.

[0148] Under MMVD, after a merge candidate is selected, the selected merge candidate is further refined by signaling MVD information. The further information includes a merge candidate flag, an index for specifying the magnitude of motion, and an index for indicating the direction of motion. In MMVD mode, one of the first two candidates in the merge list is selected as the MV basis. The mmvd candidate flag is signaled to specify which one to use between the first and second merge candidates.

[0149] The distance index specifies the motion magnitude information and indicates a predefined offset from the starting point. Fig.9A and Fig. 9B As shown, the offset is added to the horizontal component or the vertical component of the starting MV. The relationship between the distance index and the predefined offset is specified in Table 1.

[0150] Table 1: Relationship between distance index and predefined offset

[0151]

[0152] The direction index indicates the direction of the MVD relative to the starting point. The direction index can indicate the four directions shown in Table 2. It should be noted that the meaning of the MVD symbol can change according to the information of the starting MV. When the starting MV is a unidirectional prediction MV or a bidirectional prediction MV and both lists point to the same side of the current picture (i.e., the POCs of both references are greater than the POC of the current picture, or are less than the POC of the current picture), the symbol in Table 2 specifies the sign of the MV offset added to the starting MV. When the starting MV is a bidirectional prediction MV and the two MVs point to different sides of the current picture (i.e., the POC of one reference is greater than the POC of the current picture and the POC of the other reference is less than the POC of the current picture) and the difference in POC in List 0 is greater than the difference in List 1, the symbol in Table 2 specifies the sign of the MV offset added to the List 0 MV component of the starting MV, and the sign of the List 1 MV has the opposite value. Otherwise, if the difference in POC in List 1 is greater than the difference in List 0, the symbol in Table 2 specifies the sign of the MV offset added to the List 1 MV component of the starting MV, and the sign of the List 0 MV has the opposite value.

[0153] The MVD is scaled according to the difference in POC in each direction. If the difference in POC is the same in both lists, no scaling is required. Otherwise, if the difference in POC in list 0 is greater than that in list 1, the MVD of list 1 is scaled by defining the POC difference of L0 as td and the POC difference of L1 as tb, as Figure 7 If the POC difference of L1 is greater than the POC difference of L0, the MVD of list 0 is scaled in the same way. If the starting MV is unidirectionally predicted, the MVD is added to the available MVs.

[0154] Table 2: Sign of MV offset specified by direction index

[0155] Directions to IDX 00 01 10 11 x-axis + - not applicable not applicable y-axis not applicable not applicable + -

[0156] Symmetric MVD encoding and decoding in VVC

[0157] In VVC, in addition to the standard unidirectional prediction and bidirectional prediction mode MVD signaling, a symmetric MVD mode for bidirectional prediction MVD signaling is also applied. In the symmetric MVD mode, the motion information including the reference picture index of both list 0 and list 1 and the MVD of list 1 is not transmitted by signal, but derived.

[0158] The decoding process of the symmetric MVD mode is as follows:

[0159] 1. At the stripe level, the variables BiDirPredFlag, RefIdxSymL0, and RefIdxSymL1 are derived as follows:

[0160] – If mvd_l1_zero_flag is 1, set BiDirPredFlag equal to 0.

[0161] – Otherwise, if the nearest reference picture in list 0 and the nearest reference picture in list 1 form a forward and backward reference picture pair or a backward and forward reference picture pair, then BiDirPredFlag is set to 1, and both list 0 and list 1 reference pictures are short-term reference pictures. Otherwise, BiDirPredFlag is set to 0.

[0162] 2. At the CU level, if the CU is bidirectionally predicted and BiDirPredFlag is equal to 1, the symmetric mode flag indicating whether the symmetric mode is used is explicitly signaled.

[0163] When the symmetric mode flag is true, only mvp_l0_flag, mvp_l1_flag and MVD0 are explicitly signaled. Set the reference index of list0 and list1 equal to the reference picture pair respectively. Set MVD1 equal to (-MVD0). The final motion vector is shown in the following formula.

[0164]

[0165] In the encoder, symmetric MVD motion estimation starts with initial MV evaluation. A set of initial MV candidates includes MVs obtained from unidirectional prediction search, MVs obtained from bidirectional prediction search, and MVs from the AMVP list. One MV with the lowest rate-distortion cost is selected as the initial MV for symmetric MVD motion search.

[0166] Affine Motion Compensated Prediction in VVC

[0167] In HEVC, only the translational motion model is applied to motion compensation prediction (MCP). However, in the real world, there are many kinds of motion, such as zooming in / out, rotation, perspective motion, and other irregular motions. In VVC, block-based affine transformation motion compensation prediction is applied. Fig. 10A and Fig. 10B As shown, the affine motion field of the block is given by Fig. 10A The two control point motion vectors (4 parameters) shown or Fig. 10B The motion information of the three control point motion vectors (6 parameters) shown is described.

[0168] For the 4-parameter affine motion model, the motion vector at the sample point position (x, y) in the derived block is:

[0169]

[0170] For the 6-parameter affine motion model, the motion vector at the sample point position (x, y) in the derived block is:

[0171]

[0172] Among them, (mv 0x ,mv 0y ) is the motion vector of the upper left control point, (mv 1x ,mv 1y ) is the motion vector of the upper right control point, and (mv 2x ,mv 2y ) is the motion vector of the lower left control point.

[0173] In order to simplify motion compensated prediction, block-based affine transformation prediction is applied. Fig.11 As shown, to derive the motion vector for each 4×4 luminance subblock, the motion vector of the center sample of each subblock is calculated according to the equation above and rounded to 1 / 16 fractional precision. Then, a motion compensated interpolation filter is applied to generate a prediction for each subblock using the derived motion vector. The subblock size of the chrominance component is also set to 4×4. The MV of the 4×4 chrominance subblock is calculated as the average of the MVs of the upper left and lower right luminance subblocks in the same 8×8 luminance region.

[0174] Similar to translational motion inter prediction, there are also two affine motion inter prediction modes: affine merge mode and affine AMVP mode.

[0175] Affine Merge Predictions

[0176] AF_MERGE mode can be applied to CUs whose width and height are both greater than or equal to 8. In this mode, the CPMV of the current CU is generated based on the motion information of the spatially neighboring CUs. There can be at most five CPMVP candidates, and a signal transmission index is used to indicate a CPMVP candidate to be used for the current CU. The following three types of CPVM candidates are used to form the affine merge candidate list:

[0177] – Inherited affine merge candidates extrapolated from the CPMV of neighboring CUs

[0178] – Affine merge candidate CPMVP constructed using the translation MV of the adjacent CU

[0179] –Zero MV

[0180] 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 one from the above neighboring CU. Fig.12The candidate blocks are shown in . For the prediction value on the left, the scanning order is A0->A1, and for the prediction value above, the scanning order is B0->B1->B2. Only the first inherited candidate on each side is selected. No pruning check is performed between two inherited candidates. When a neighboring affine CU is identified, its control point motion vector is used to derive the CPMVP candidate in the affine merge list of the current CU. If the adjacent lower left block A is encoded and decoded in affine mode, the motion vectors v_2, v_3 and v_4 of the upper left, upper right and lower left corners of the CU containing block A are obtained. When block A is encoded and decoded using a 4-parameter affine model, the two CPMVs of the current CU are calculated based on v_2 and v_3. In the case where block A is encoded and decoded using a 6-parameter affine model, the three CPMVs of the current CU are calculated based on v_2, v_3 and v_4.

[0181] The constructed affine candidate means that the candidate is constructed by combining the neighboring translational motion information of each control point. The motion information of the control point is obtained from Fig.13 CPMVk (k=1, 2, 3, 4) represents the kth control point. For CPMV1, check B2->B3->A2 blocks, and use the MV of the first available block. For CPMV2, check B1->B0 blocks, and for CPMV3, check A1->A0 blocks. If TMVP is available, use it as CPMV4.

[0182] After obtaining the MVs of the four control points, an affine merge candidate is constructed based on the motion information. The following combinations of control point MVs are used to construct in sequence:

[0183] {CPMV1,CPMV2,CPMV3}, {CPMV1,CPMV2,CPMV4}, {CPMV1,CPMV3,CPMV4}, {CPMV2,CPMV3,CPMV4}, {CPMV1,CPMV2}, {CPMV1,CPMV3}

[0184] The combination of 3 CPMVs constructs a 6-parameter affine merge candidate, and the combination of 2 CPMVs constructs a 4-parameter affine merge candidate. To avoid the motion scaling process, if the reference index of the control points is different, the related control point MV combination is discarded.

[0185] After checking the inherited affine merge candidates and the constructed affine merge candidates, if the list is still not full, a zero MV is inserted at the end of the list.

[0186] Affine AMVP prediction in VVC

[0187] Affine AMVP mode can be applied to CUs whose width and height are both greater than or equal to 16. A CU-level affine flag is signaled in the bitstream to indicate whether the affine AMVP mode is used, and then another flag is signaled to indicate whether it is 4-parameter affine or 6-parameter affine. In this mode, the difference between the CPMV of the current CU and its predicted value CPMVP is signaled in the bitstream. The affine AVMP candidate list size is 2, and it is generated by using the following four types of CPVM candidates in order:

[0188] – Inherited affine AMVP candidates extrapolated from the CPMV of neighboring CUs

[0189] – Affine AMVP candidate CPMVP constructed using the translation MV of the adjacent CU

[0190] –Translated MV from neighboring CU

[0191] –Zero MV

[0192] The order in which inherited affine AMVP candidates are checked 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 picture as the reference picture in the current block are considered. When the inherited affine motion prediction value is inserted into the candidate list, the pruning process is not applied.

[0193] The AMVP candidates are constructed from Fig.13 Derived from the specified spatial neighboring blocks shown. Use the same check order as in the affine merge candidate construction. In addition, the reference picture index of the neighboring blocks is also checked. Use the first block in the check order, which is inter-coded and has the same reference picture as the reference picture in the current CU. There is only one, when the current CU is encoded and decoded using a 4-parameter affine mode and both mv0 and mv1 are available, add them as a candidate in the affine AMVP list. When the current CU is encoded and decoded using a 6-parameter affine mode and all three CPMVs are available, add them as a candidate in the affine AMVP list. Otherwise, the constructed AMVP candidate will be set to unavailable.

[0194] If after inserting valid inherited affine AMVP candidates and constructed AMVP candidates, the number of affine AMVP list candidates is still less than 2, then mv0, mv1, and mv2 will be added in sequence as translation MVs to predict all control point MVs of the current CU (if available). Finally, if the affine AMVP list is still not full, the list is filled with zero MVs.

[0195] Prediction refinement using optical flow for affine mode in VVC

[0196] Compared with pixel-based motion compensation, sub-block-based affine motion compensation can save memory access bandwidth and reduce computational complexity, but at the expense of prediction accuracy loss. In order to achieve finer motion compensation granularity, prediction refinement using optical flow (PROF) is used to refine sub-block-based affine motion compensation prediction without increasing the memory access bandwidth for motion compensation. In VVC, after performing sub-block-based affine motion compensation, the brightness prediction samples are refined by adding the difference derived from the optical flow equation. PROF is described as the following four steps:

[0197] Step 1) Perform sub-block based affine motion compensation to generate sub-block prediction I(i,j).

[0198] Step 2) Use a 3-tap filter [-1, 0, 1] to calculate the spatial gradient g of the sub-block prediction at each sample point position x (i,j) and g y (i,j). The gradient calculation is exactly the same as that in BDOF.

[0199] g x (i,j)=(I(i+1,j)>>shift1)-(I(i-1,j)>>shift1) (4)

[0200] g y (i,j)=(I(i,j+1)>>shift1)-(I(i,j-1)>>shift1) (5)

[0201] Shift1 is used to control the accuracy of the gradient. The sub-block (i.e., 4×4) prediction is extended by one sample on each side for gradient calculation. To avoid additional memory bandwidth and additional interpolation calculations, those extended samples on the extended boundary are copied from the nearest integer pixel position in the reference picture.

[0202] Step 3) Calculate the brightness prediction refinement by following the optical flow equation.

[0203] ΔI(i,j)=g x (i,j)*Δv x (i,j)+g y (i,j)*Δv y (i,j) (6)

[0204] Wherein, Δv(i,j) is the difference between the sample point MV (represented by v(i,j)) calculated for the sample point position (i,j) and the sub-block MV of the sub-block to which the sample point (i,j) belongs, as Fig.14 As shown in Figure 2, Δv(i,j) is quantized with 1 / 32 brightness sample accuracy.

[0205] Since the affine model parameters and the sample position relative to the sub-block center do not change from sub-block to sub-block, Δv(i,j) can be calculated for the first sub-block and reused for other sub-blocks in the same CU. Let dx(i,j) and dy(i,j) be the distance from the sample position (i,j) to the sub-block (x SB ,y SB ), the horizontal and vertical offset of the center of ), Δv(x,y) can be derived by the following equation,

[0206]

[0207] In order to maintain accuracy, the sub-block (x SB ,y SB ) is calculated as ((W SB -1) / 2,(H SB -1) / 2), where W SB and H SB are the sub-block width and height respectively.

[0208] For the 4-parameter affine model,

[0209]

[0210] For the 6-parameter affine model,

[0211]

[0212] Among them, (v 0x ,v 0y )、(v 1x ,v 1y ) and (v 2x ,v 2y ) are the upper left, upper right and lower left control point motion vectors, w and h are the width and height of the CU.

[0213] Step 4) Finally, the luma prediction refinement ΔI(i,j) is added to the sub-block prediction I(i,j). The final prediction I' is generated as the following equation.

[0214] I′(i,j)=I(i,j)+ΔI(i,j)

[0215] For affine-coded CUs, PROF is not applied in the following two cases: 1) all control point MVs are the same, which indicates that the CU has only translational motion; 2) the affine motion parameters are greater than the specified limit, because the sub-block based affine MC is downgraded to CU based MC to avoid large memory access bandwidth requirements.

[0216] A fast coding method is applied to reduce the coding complexity of affine motion estimation using PROF. PROF is not applied in the affine motion estimation stage in the following two cases: a) If the CU is not a root block and its parent block does not select the affine mode as its best mode, PROF is not applied because the possibility that the current CU selects the affine mode as the best mode is low; b) If the magnitudes of the four affine parameters (C, D, E, F) are all less than a predefined threshold and the current picture is not a low-latency picture, PROF is not applied because the improvement introduced by PROF in this case is small. In this way, affine motion estimation using PROF can be accelerated.

[0217] Sub-block based temporal motion vector prediction (SbTMVP) in VVC

[0218] VVC supports the sub-block-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the co-located picture to improve the motion vector prediction and merge mode of the CU in the current picture. The same co-located picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP in two main aspects:

[0219] – TMVP predicts motion at CU level, but SbTMVP predicts motion at sub-CU level;

[0220] –TMVP obtains the temporal motion vector from the co-located block in the co-located picture (the co-located block is the bottom-right or center block relative to the current CU), while SbTMVP applies motion shifting before obtaining the temporal motion information from the co-located picture, where the motion shifting is obtained from the motion vector of one of the spatial neighboring blocks of the current CU.

[0221] Fig.15A and Fig. 15B The SbTMVP process is illustrated in Figure 1. SbTMVP predicts the motion vector of a sub-CU within the current CU in two steps. In the first step, check Fig.15A The spatial neighboring block A1 in . If A1 has a motion vector that uses the co-located picture as its reference picture, this motion vector is selected as the motion shift to be applied. If no such motion is identified, the motion shift is set to (0,0).

[0222] In the second step, if Fig. 15B As shown, the motion shift identified in step 1 is applied (ie, added to the coordinates of the current block) to obtain sub-CU level motion information (motion vector and reference index) from the co-located picture. Fig. 15BThe example in assumes that the motion shift is set to prevent the motion of A1. Then, for each sub-CU, the motion information of its corresponding block in the co-located picture (the minimum motion grid covering the center sample) is used to derive the motion information of the sub-CU. After the motion information of the co-located sub-CU is identified, the motion information is converted into a motion vector and reference index of the current sub-CU in a manner similar to the TMVP process of HEVC, where temporal motion scaling is applied to align the reference picture of the temporal motion vector with the reference picture of the current CU.

[0223] In VVC, a sub-block based merge list containing a combination of SbTVMP candidates and affine merge candidates is used for signaling of sub-block based merge mode. SbTVMP mode is enabled / disabled by a sequence parameter set (SPS) flag. If SbTMVP mode is enabled, the SbTMVP prediction value is added as the first entry of the sub-block based merge candidate list, and then the affine merge candidate. The size of the sub-block based merge list is signaled in the SPS, and the maximum allowed size of the sub-block based merge list in VVC is 5.

[0224] The sub-CU size used in SbTMVP is fixed to 8×8, and similar to the affine merge mode, the SbTMVP mode is only applicable to CUs whose width and height are both greater than or equal to 8.

[0225] The encoding logic for the additional SbTMVP merge candidate is the same as that for other merge candidates, ie, for each CU in a P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate.

[0226] Adaptive Motion Vector Resolution (AMVR) in VVC

[0227] In HEVC, when use_integer_mv_flag is equal to 0 in the slice header, the motion vector difference (MVD) (between the CU's motion vector and the predicted motion vector) is signaled in units of quarter-luminance samples. In VVC, a CU-level adaptive motion vector resolution (AMVR) scheme is introduced. AMVR allows the MVD of a CU to be encoded and decoded with different precisions. Depending on the mode of the current CU (standard AMVP mode or affine AVMP mode), the MVD of the current CU can be adaptively selected as follows:

[0228] – Standard AMVP modes: quarter-brightness samples, half-brightness samples, integer-brightness samples, or quad-brightness samples.

[0229] – Affine AMVP mode: quarter-luminance samples, integer-luminance samples, or 1 / 16-luminance samples.

[0230] If the current CU has at least one non-zero MVD component, the CU-level MVD resolution indication is conditionally signaled.If all MVD components (that is, both horizontal and vertical MVD for reference list L0 and reference list L1) are zero, a quarter luma sample MVD resolution is inferred.

[0231] For a CU with at least one non-zero MVD component, a first flag is signaled to indicate whether quarter luma sample MVD precision is used for the CU. If the first flag is 0, no further signaling is required and quarter luma sample MVD precision is used for the current CU. Otherwise, a second flag is signaled to indicate that half luma samples or other MVD precision (integer or quad luma samples) are used for the standard AMVP CU. In the case of half luma samples, a 6-tap interpolation filter is used for the half luma sample position instead of the default 8-tap interpolation filter. Otherwise, a third flag is signaled to indicate whether integer luma samples or quad luma sample MVD precision is used for the standard AMVP CU. In the case of an affine AMVP CU, a second flag is used to indicate whether integer luma samples or 1 / 16 luma sample MVD precision is used. To ensure that the reconstructed MV has the expected precision (quarter luma samples, half luma samples, integer luma samples, or quad luma samples), the motion vector prediction value of the CU can be rounded to the same precision as the MVD before being added with the MVD. The motion vector prediction value is rounded towards zero (i.e., negative motion vector prediction values ​​are rounded towards positive infinity, and positive motion vector prediction values ​​are rounded towards negative infinity).

[0232] The encoder uses RD check to determine the motion vector resolution of the current CU. In order to avoid always performing four CU-level RD checks for each MVD resolution, in VTM14, only the RD check of MVD precision other than quarter luma samples is conditionally called. For the standard AVMP mode, the RD cost of quarter luma sample MVD precision and integer luma sample MV precision is first calculated. Then, the RD cost of integer luma sample MVD precision is compared with the RD cost of quarter luma sample MVD precision to determine whether the RD cost of four luma sample MVD precision needs to be further checked. When the RD cost of quarter luma sample MVD precision is much smaller than the RD cost of integer luma sample MVD precision, the RD check of four luma sample MVD precision is skipped. Then, if the RD cost of integer luma sample MVD precision is significantly greater than the best RD cost of the previously tested MVD precision, the check of half luma sample MVD precision is skipped. For affine AMVP mode, if affine inter mode is not selected after checking the rate-distortion cost of affine merge / skip mode, merge / skip mode, quarter luma sample MVD precision standard AMVP mode, and quarter luma sample MVD precision affine AMVP mode, 1 / 16 luma sample MV precision and 1 pixel MV precision affine inter mode are not checked. In addition, in 1 / 16 luma sample and quarter luma sample MV precision affine inter mode, the affine parameters obtained in quarter luma sample MV precision affine inter mode are used as the start search point.

[0233] Bidirectional Prediction with CU-Level Weights (BCW) in VVC

[0234] In HEVC, a bidirectional prediction signal is generated by averaging two prediction signals obtained from two different reference pictures and / or using two different motion vectors. In VVC, the bidirectional prediction mode goes beyond simple averaging and allows a weighted average of the two prediction signals.

[0235] P bi-pred =((8-w)*P0+w*P1+4)>>3 (11)

[0236] Five weights are allowed in weighted average bidirectional prediction, w∈{-2,3,4,5,10}. For each bidirectional prediction 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 only applicable 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 pictures, all 5 weights are used. For non-low-latency pictures, only 3 weights (w∈{3,4,5}) are used.

[0237] – At the encoder, fast search algorithms are applied to find the weight index without significantly increasing the encoder complexity. These algorithms are summarized below. For more details, refer to the VTM software and document JVET-L0646. When combined with AMVR, unequal weights are only conditionally checked for 1-pixel and 4-pixel motion vector precision if the current picture is a low-latency picture.

[0238] – When combined with affine, affine ME can be performed on unequal weights if and only if the affine mode is selected as the current best mode.

[0239] – When the two reference pictures in bidirectional prediction are the same, unequal weights are only checked conditionally.

[0240] – Do not search for unequal weights when certain conditions are met, which depend on the POC distance between the current picture and its reference pictures, the coding QP, and the temporal level.

[0241] The BCW weight index is encoded using one context coded bit and then a bypass coded bit. The first context coded bit indicates whether equal weights are used; and if unequal weights are used, an additional bit is signaled using bypass coding to indicate which unequal weights are used.

[0242] Weighted prediction (WP) is a codec tool supported by the H.264 / AVC and HEVC standards to efficiently encode and decode video content in the presence of attenuation. Support for WP has also been added to the VVC standard. WP allows weighting parameters (weights and offsets) to be signaled for each reference picture in each of the reference picture lists L0 and L1. Then, during motion compensation, the (multiple) weights and (multiple) offsets of the (multiple) corresponding reference pictures are applied. WP and BCW are designed for different types of video content. In order to avoid the interaction between WP and BCW (which may complicate the VVC decoder design), if the CU uses WP, the BCW weight index is not signaled, and w is inferred to be 4 (ie, equal weights are applied). For the merged CU, the weight index is inferred from the adjacent blocks based on the merge candidate index. This can be applied to both the standard merge mode and the inherited affine merge mode. For the constructed affine merge mode, affine motion information is constructed based on the motion information of up to 3 blocks. Simply set the BCW index of the CU using the constructed affine merge mode to be equal to the BCW index of the first control point MV.

[0243] In VVC, CIIP and BCW cannot be applied jointly to a CU. When a CU is encoded and decoded using CIIP mode, the BCW index of the current CU is set to 2, for example, equal weight.

[0244] Bidirectional Optical Flow (BDOF) in VVC

[0245] The Bidirectional Optical Flow (BDOF) tool is included in VVC. BDOF, previously known as BIO, is included in JEM. BDOF in VVC is a simpler version that requires much less computation than the JEM version, especially in terms of the number of multiplications and multiplier size.

[0246] BDOF is used to refine the bidirectional prediction signal of a CU at the 4×4 sub-block level. BDOF is applied to a CU if it meets all of the following conditions:

[0247] – The CU is encoded and decoded using the “true” bi-directional prediction mode, i.e., one of the two reference pictures precedes the current picture in display order and the other follows the current picture in display order

[0248] – The distances from the two reference pictures to the current picture (i.e., POC difference) are the same

[0249] – Both reference images are short-term reference images.

[0250] –CU is not encoded or decoded using affine mode or SbTMVP merge mode

[0251] –CU has more than 64 luminance samples

[0252] –CU height and CU width are both greater than or equal to 8 luminance samples

[0253] –BCW weight index indicates equal weights

[0254] – WP is not enabled for the current CU

[0255] – CIIP mode is not used for the current CU

[0256] BDOF is only applicable to the luma component. As its name indicates, the BDOF mode is based on the concept of optical flow, which assumes that the motion of objects is smooth. For each 4×4 sub-block, the motion refinement (v x ,v y ). Motion refinement is then used to adjust the bidirectional prediction sample values ​​in the 4×4 sub-block. The following steps are applied to the BDOF process.

[0257] First, the horizontal and vertical gradients of the two prediction signals are calculated by directly calculating the difference between two adjacent samples. and Right now,

[0258]

[0259] Among them, I (k) (i, j) is the sample value at coordinate (i, j) of the prediction signal in list k, k=0,1, and shift1 is calculated based on the brightness bit depth bitDepth, such as shift1=max(6,bitDepth-6).

[0260] Then, the autocorrelation and cross-correlation of the gradients S1, S2, S3, S5 and S6 are calculated as follows

[0261]

[0262] in,

[0263]

[0264] where Ω is a 6×6 window around the 4×4 sub-block, and n a and n b The values ​​of are set equal to min(1,bitDepth-11) and min(4,bitDepth-8) respectively.

[0265] Then, the motion refinement (v) is derived using the cross-correlation term and the autocorrelation term using the following formula: x ,v y ):

[0266]

[0267] in th′ BIO =2 max(5,BD-7) . is the floor function, and

[0268] Based on the motion refinement and gradients, the following adjustments are calculated for each sample in the 4×4 sub-block:

[0269]

[0270] Finally, the BDOF samples of the CU are calculated by adjusting the bidirectional prediction samples as follows:

[0271] pred BDOF (x,y)=(I (0) (x,y)+I (1) (x,y)+b(x,y)+o offst )>>shift (17)

[0272] These values ​​are chosen so that the multipliers in the BDOF process do not exceed 15 bits and the maximum bit width of the intermediate parameters of the BDOF process remains within 32 bits.

[0273] In order to derive the gradient value, it is necessary to generate some predicted sample points I outside the current CU boundary and in list k (k = 0, 1) (k) (i,j). Fig.16 As depicted in , BDOF in VVC uses an extended row / column around the boundary of the CU. In order to control the computational complexity of generating prediction samples outside the boundary, the prediction samples in the extended area (white positions) are generated by directly taking the reference samples at nearby integer positions (using floor() operation on the coordinates) without interpolation, and the prediction samples within the CU (gray positions) are generated using a standard 8-tap motion compensated interpolation filter. These extended sample values ​​are only used for gradient calculations. For the remaining steps in the BDOF process, if any samples and gradient values ​​outside the CU boundary are needed, they are filled (i.e. repeated) from their nearest neighboring blocks.

[0274] When the width and / or height of the CU is greater than 16 luma samples, the CU can be partitioned into sub-blocks with a width and / or height equal to 16 luma samples, and the sub-block boundaries are regarded as CU boundaries in the BDOF process. The maximum unit size of the BDOF process is limited to 16×16. For each sub-block, the BDOF process can be skipped. When the SAD between the initial L0 and L1 prediction samples is less than a threshold, the BDOF process is not applied to the sub-block. The threshold is set to be equal to (8*W*(H>>1), where W represents the sub-block width and H represents the sub-block height. To avoid the additional complexity of SAD calculation, the SAD between the initial L0 and L1 prediction samples calculated in the DVMR process is reused here.

[0275] If BCW is enabled for the current block, i.e., the BCW weight index indicates unequal weights, bidirectional optical flow is disabled. Similarly, if WP is enabled for the current block, i.e., luma_weight_lx_flag is 1 for either of the two reference pictures, BDOF is also disabled. BDOF is also disabled when the CU is encoded or decoded in symmetric MVD mode or CIIP mode.

[0276] Decoder-side motion vector refinement (DMVR) in VVC

[0277] To improve the accuracy of MV in merge mode, decoder-side motion vector refinement based on bilateral matching (BM) is applied in VVC. In bidirectional prediction operation, the refined MV is searched around the initial MV in reference picture list L0 and reference picture list L1. The BM method calculates the distortion between two candidate blocks in reference picture list L0 and list L1. Fig.17As illustrated in , the SAD between red blocks is calculated based on each MV candidate around the initial MV. The MV candidate with the lowest SAD becomes the refined MV and is used to generate a bidirectional prediction signal.

[0278] In VVC, the application of DMVR is restricted and only applies to CUs encoded and decoded with the following modes and features:

[0279] – CU-level merge mode with bi-predictive MV

[0280] – Relative to the current picture, one reference picture is in the past and the other reference picture is in the future

[0281] – The distances from the two reference pictures to the current picture (i.e., POC difference) are the same

[0282] – Both reference images are short-term reference images

[0283] –CU has more than 64 luminance samples

[0284] –CU height and CU width are both greater than or equal to 8 luminance samples

[0285] –BCW weight index indicates equal weights

[0286] – WP is not enabled for the current block

[0287] – CIIP mode is not used for the current block

[0288] The refined MV derived by the DMVR process is used to generate inter-frame prediction samples and is also used in temporal motion vector prediction for future picture encoding and decoding. The original MV is used in the deblocking process and is also used in spatial motion vector prediction for future CU encoding and decoding.

[0289] Additional features of DMVR are mentioned in the following sub-clauses.

[0290] Search Solutions

[0291] In DVMR, the search point is around the initial MV, and the MV offset follows the MV difference mirror rule. In other words, any point represented by the candidate MV pair (MV0, MV1) and examined by DMVR follows the following two equations:

[0292] MV0′=MV0+MV_offset (18)

[0293] MV1′=MV1-MV_offset (19)

[0294] Where MV_offset represents the refinement offset between the initial MV and the refined MV in one of the reference pictures. The refinement search range is two integer luma samples from the initial MV. The search includes an integer sample offset search phase and a fractional sample refinement phase.

[0295] A 25-point full search is applied to the integer sample offset search. The SAD of the initial MV pair is first calculated. If the SAD of the initial MV pair is less than the threshold, the integer sample stage of DMVR is terminated. Otherwise, the SAD of the remaining 24 points is calculated and checked in raster scan order. The point with the smallest SAD is selected as the output of the integer sample offset search stage. In order to reduce the penalty for uncertainty in DMVR refinement, it is proposed to support the original MV during the DMVR process. The SAD between the reference blocks referenced by the initial MV candidates is reduced by 1 / 4 of the SAD value.

[0296] The integer sample search is followed by fractional sample refinement. To reduce computational complexity, fractional sample refinement is derived by performing additional searches using parameter error surface equations instead of using SAD comparisons. Fractional sample refinement is conditionally called based on the output of the integer sample search stage. When the integer sample search stage terminates with the center having the minimum SAD in the first or second iteration search, fractional sample refinement is further applied.

[0297] In the parametric error surface based sub-pixel offset estimation, the center position cost and the costs at four neighboring positions from the center are used to fit a 2-D parabolic error surface equation of the following form:

[0298] E(x,y)=A(x min ) 2 +B(yy min ) 2 +C (20)

[0299] Among them, (x min ,y min ) corresponds to the fractional position with the lowest cost, and C corresponds to the minimum cost value. By solving the above equation using the cost values ​​of the five search points, (x min ,y min ) is calculated as:

[0300] x min =(E(-1,0)-E(1,0)) / (2(E(-1,0)+E(1,0)-2E(0,0))) (21)

[0301] y min =(E(0,-1)-E(0,1)) / (2((E(0,-1)+E(0,1)-2E(0,0))) (22)

[0302] x min and min The value of is automatically clamped between -8 and 8, since all cost values ​​are positive and the minimum is E(0,0). This corresponds to a half-loudness offset with 1 / 16 pixel MV accuracy in VVC. The calculated score (x min ,y min ) is added to the integer distance refinement MV to obtain the sub-pixel accurate refinement ΔMV.

[0303] Bilinear interpolation and sample filling

[0304] In VVC, the resolution of MV is 1 / 16 luma sample. An 8-tap interpolation filter is used to interpolate samples at fractional positions. In DMVR, the search points are around the initial fractional pixel MV with integer sample offsets, so the samples at these fractional positions need to be interpolated for the DMVR search process. In order to reduce computational complexity, a bilinear interpolation filter is used to generate fractional samples during the search process in DMVR. Another important impact caused by the use of a bilinear filter is that DVMR cannot access more reference samples than the standard motion compensation process within the 2-sample search range. After the refined MV is obtained through the DMVR search process, a standard 8-tap interpolation filter is applied to generate the final prediction. In order not to access more reference samples relative to the standard MC process, samples that are not required by the interpolation process based on the original MV but are required by the interpolation process based on the refined MV are filled from those available samples.

[0305] Geometric Partition Mode (GPM) in VVC

[0306] In VVC, geometric partitioning mode is supported for inter prediction. The geometric partitioning mode is signaled using a CU-level flag as a merge mode. Other merge modes include normal merge mode, MMVD mode, CIIP mode, and sub-block merge mode. For each possible CU size w×h=2 m ×2 n (where m,n∈{3…6}, excluding 8×64 and 64×8), the geometric partitioning mode supports a total of 64 partitions.

[0307] When this mode is used, the CU is split into two parts by a geometrically positioned straight line ( Fig.18). The position of the partitioning line is derived mathematically from the angle and offset parameters for the specific partition. Each part of the geometric partition in the CU is inter-predicted using its own motion; only unidirectional prediction is allowed for each partition, i.e., each part has one motion vector and one reference index. Unidirectional prediction motion constraints are applied to ensure that only two motion compensated predictions are required for each CU, as with traditional bidirectional prediction. The unidirectional prediction motion for each partition is derived using the process described in 3.4.11.1.

[0308] If geometric partition mode is used for the current CU, a geometric partition index and two merge indexes (one for each partition) indicating the partition mode (angle and offset) of the geometric partition are further signaled. The number of maximum GPM candidate sizes is explicitly signaled in the SPS, and the number specifies the syntax binarization for the GPM merge index. After predicting each part of the geometric partition, the sample values ​​along the edges of the geometric partitions are adjusted using a hybrid process with adaptive weights as in 3.4.11.2. This is the prediction signal for the entire CU, and the transform and quantization process can be applied to the entire CU as in other prediction modes. Finally, the motion field of the CU predicted using the geometric partition mode is stored as in 3.4.11.3.

[0309] One-way prediction candidate list construction

[0310] The unidirectional prediction candidate list is derived directly from the merge candidate list constructed according to the extended merge prediction process in 3.4.1. Denote n as the index of the unidirectional prediction motion in the geometric unidirectional prediction candidate list. Use the LX motion vector (x equals parity of n) of the nth extended merge candidate as the nth unidirectional prediction motion vector of the geometric partition mode. These motion vectors are in Fig.19 In the case where the corresponding LX motion vector of the n-th extended merge candidate does not exist, the L(1-X) motion vector of the same candidate is used as the unidirectional prediction motion vector of the geometric partition mode.

[0311] Combined Inter and Intra Prediction (CIIP) in VVC

[0312] In VVC, when a CU is encoded and decoded in merge mode, if the CU contains at least 64 luma samples (i.e., the CU width multiplied by the CU height is equal to or greater than 64) and if both the CU width and the CU height are less than 128 luma samples, an additional flag is signaled to indicate whether the combined inter / intra prediction (CIIP) mode is applied to the current CU. As its name indicates, CIIP prediction combines the inter prediction signal with the intra prediction signal. The inter prediction signal P in CIIP mode is derived using the same inter prediction process applied to the regular merge mode. inter; and derive the intra prediction signal P after the conventional intra prediction process using the planar mode intra Then, the intra prediction signal and the inter prediction signal are combined using weighted averaging, where ( Fig. 20 The weight values ​​are calculated based on the encoding and decoding modes of the top adjacent block and the left adjacent block as depicted in the figure:

[0313] – If the top neighboring block is available and intra-coded, isIntraTop is set to 1, otherwise isIntraTop is set to 0;

[0314] – If the left neighboring block is available and intra-coded, isIntraLeft is set to 1, otherwise isIntraLeft is set to 0;

[0315] – If (isIntraLeft + isIntraTop) is equal to 2, set wt to 3;

[0316] – Otherwise, if (isIntraLeft + isIntraTop) is equal to 1, set wt to 2;

[0317] – Otherwise, set wt to 1.

[0318] The CIIP forecast is formed as follows:

[0319] P CIIP =((4-wt)*P inter +wt*P intra +2)>>2 (23)

[0320] Intra-block copy (IBC) in VVC

[0321] Intra-block copying (IBC) is a tool adopted in the HEVC extension on SCC. It is well known that it significantly improves the coding efficiency of screen content materials. Since the IBC mode is implemented as a block-level coding mode, block matching (BM) is performed at the encoder to find the best block vector (or motion vector) for each CU. Here, the block vector is used to indicate the displacement from the current block to the reference block, which has been reconstructed within the current picture. The luminance block vector of the IBC codec CU has integer precision. The chrominance block vector is also rounded to integer precision. When combined with AMVR, the IBC mode can switch between 1-pixel motion vector precision and 4-pixel motion vector precision. The IBC codec CU is regarded as a third prediction mode different from the intra prediction mode or the inter prediction mode. The IBC mode is applicable to CUs with a width and height that are less than or equal to 64 luminance samples.

[0322] On the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD checks on blocks with a width or height no greater than 16 luma samples. For non-merge mode, a block vector search is first performed using a hash-based search. If the hash search does not return a valid candidate, a local search based on block matching is performed.

[0323] In hash-based search, hash key matching (32-bit CRC) between the current block and reference blocks is extended to all allowed block sizes. The hash key calculation for each position in the current picture is based on 4×4 sub-blocks. For larger-sized current blocks, a hash key is determined to match the hash key of a reference block when all hash keys of all 4×4 sub-blocks match the hash keys in the corresponding reference positions. If multiple reference blocks are found to match the hash key of the current block, the block vector cost of each matching reference is calculated and the reference with the minimum cost is selected.

[0324] In block matching search, the search range is set to cover both the previous CTU and the current CTU. At the CU level, the IBC mode is signaled using a flag, and it can be signaled as IBC AMVP mode or IBC skip / merge mode as follows:

[0325] IBC skip / merge mode: The merge candidate index is used to indicate which block vectors from the list of neighboring candidate IBC codec blocks are used to predict the current block. The merge list consists of spatial candidates, HMVP candidates, and pairwise candidates.

[0326] IBC AMVP mode: Block vector differences are encoded in the same way as motion vector differences. The block vector prediction method uses two candidates as predictors, one from the left neighboring block and one from the top neighboring block (if IBC is used). When either neighboring block is not available, a default block vector can be used as the predictor. A flag is signaled to indicate the block vector predictor index.

[0327] IBC Reference Area

[0328] To reduce memory consumption and decoder complexity, IBC in VVC only allows reconstruction of a predefined area including the area of ​​the current CTU and a certain area of ​​the left CTU. Depending on the location of the current coded CU position within the current CTU, the following apply:

[0329] If the current block falls into the upper left 64×64 block of the current CTU, in addition to the samples already reconstructed in the current CTU, using the CPR mode, the current block can also refer to the reference samples in the lower right 64×64 block of the left CTU. Using the CPR mode, the current block can also refer to the reference samples in the lower left 64×64 block of the left CTU and the reference samples in the upper right 64×64 block of the left CTU.

[0330] If the current block falls into the upper right 64×64 block of the current CTU, in addition to the samples already reconstructed in the current CTU, when the luminance position (0,64) has not been reconstructed relative to the current CTU, the current block can also refer to the reference samples in the lower left 64×64 block and the lower right 64×64 block of the left CTU using the CPR mode; otherwise, the current block can also refer to the reference samples in the lower right 64×64 block of the left CTU.

[0331] If the current block falls into the lower left 64×64 block of the current CTU, in addition to the samples that have been reconstructed in the current CTU, when the luma position (64,0) has not been reconstructed relative to the current CTU, the current block can also refer to the reference samples in the upper right 64×64 block and the lower right 64×64 block of the left CTU using the CPR mode. Otherwise, using the CPR mode, the current block can also refer to the reference samples in the lower right 64×64 block of the left CTU.

[0332] If the current block falls into the lower right 64×64 block of the current CTU, the CPR mode is used, and the current block can only refer to the samples that have been reconstructed in the current CTU.

[0333] This restriction allows the IBC mode to be implemented using local on-chip memory for hardware implementations.

[0334] Local Illumination Compensation (LIC) in ECM

[0335] LIC is an inter-frame prediction technique for modeling the local illumination change between the current block and its prediction block as a function of the local illumination change between the current block template and the reference block template. The parameters of the function can be expressed in terms of a scale α and an offset β, which form a linear equation for compensating for illumination changes (i.e., α*p[x]+β), where p[x] is the reference sample pointed to by the MV at position x on the reference picture. Since α and β can be derived based on the current block template and the reference block template, they do not require signaling overhead except for the LIC flag that is signaled for AMVP mode to indicate the use of LIC.

[0336] The local illumination compensation proposed in JVET-O0066 is used for unidirectionally predicted inter CUs with the following modifications.

[0337] – Neighboring block samples within the frame can be used for LIC parameter derivation;

[0338] – disable LIC for blocks with less than 32 luma samples;

[0339] – For both non-subblock mode and affine mode, LIC parameter derivation is performed based on the template block samples corresponding to the current CU, rather than based on the partial template block samples corresponding to the first top-left 16×16 unit;

[0340] – Generate samples of the reference block template by using MC and block MV without rounding them to integer pixel precision.

[0341] Non-adjacent spatial candidates in ECM

[0342] Insert non-adjacent spatial merge candidates as in JVET-L0399 after TMVP in the regular merge candidate list. Fig.21 The pattern of spatial merge candidates is shown in . The distance between non-adjacent spatial candidates and the current coding block is based on the width and height of the current coding block. No line buffer limit is applied.

[0343] Template Matching(TM) in ECM

[0344] Template matching (TM) is a decoder-side MV derivation method for refining the motion information of the current CU by finding the closest match between the template in the current picture (i.e., the top neighboring block and / or the left neighboring block of the current CU) and the blocks in the reference picture (i.e., the same size as the template). Fig. 22 As shown, a better MV is searched around the initial motion of the current CU in the [–8, +8] pixel search range. The template matching method in JVET-J0021 is used with the following modifications: the search step size is determined based on the AMVR mode and can be cascaded with the bilateral matching process in the merge mode TM.

[0345] In AMVP mode, MVP candidates are determined based on template matching error to select the one that achieves the minimum difference between the current block template and the reference block template, and then TM is performed only on this specific MVP candidate for MV refinement. TM refines this MVP candidate by using an iterative diamond search starting from full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode) within the [-8, +8] pixel search range. The AMVP candidate can be further refined according to the AMVR mode by using a cross search with full-pixel MVD accuracy (or 4 pixels for 4-pixel AMVR mode), followed by half-pixel and quarter-pixel accuracy in sequence, as specified in Table 3. This search process ensures that the MVP candidate still maintains the same MV accuracy as indicated by the AMVR mode after the TM process.

[0346] Table 3: Search patterns of AMVR and merge patterns using AMVR.

[0347]

[0348] In merge mode, a similar search method is applied to the merge candidates indicated by the merge index. As shown in Table 3, depending on whether an alternative interpolation filter is used based on the merged motion information (used when AMVR adopts half-pixel mode), TM can be performed all the way to 1 / 8 pixel MVD accuracy or skip those exceeding half-pixel MVD accuracy. In addition, when TM mode is enabled, template matching can work as an independent process between block-based and sub-block-based bilateral matching (BM) methods or as an additional MV refinement process, depending on whether BM can be enabled according to its enabling condition check.

[0349] Multi-pass decoder-side motion vector refinement in ECM

[0350] Multiple passes of decoder-side motion vector refinement are applied. In the first pass, bilateral matching (BM) is applied to the coding block. In the second pass, BM is applied to each 16×16 sub-block within the coding block. In the third pass, the MVs in each 8×8 sub-block are refined by applying bidirectional optical flow (BDOF). The refined MVs are stored for spatial and temporal motion vector prediction.

[0351] First pass – Block-based bilateral matching MV refinement

[0352] In the first pass, a refined MV is derived by applying BM to the coding block. Similar to decoder-side motion vector refinement (DMVR), in bidirectional prediction operation, the refined MV is searched around the two initial MVs (MV0 and MV1) in the reference picture lists L0 and L1. The refined MVs (MV0_pass1 and MV1_pass1) are derived around the initial MVs based on the minimum bilateral matching cost between the two reference blocks in L0 and L1.

[0353] BM performs a local search to derive integer sample precision intDeltaMV. The local search applies a 3×3 square search pattern to loop through the search range [–sHor, sHor] in the horizontal direction and the search range [–sVer, sVer] in the vertical direction, where the values ​​of sHor and sVer are determined by the block size and the maximum values ​​of sHor and sVer are 8.

[0354] The bilateral matching cost is calculated as: bilCost = mvDistanceCost + sadCost. When the block size cbW*cbH is greater than 64, the MRSAD cost function is applied to remove the DC effect of the distortion between the reference blocks. When the bilCost at the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV local search is terminated. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern and continues to search for the minimum cost until it reaches the end of the search range.

[0355] The existing fractional sample refinement is further applied to derive the final deltaMV. Then, the refined MV after the first pass is derived as:

[0356] –MV0_pass1=MV0+deltaMV

[0357] –MV1_pass1=MV1–deltaMV

[0358] Second pass – Sub-block based bilateral matching MV refinement

[0359] In the second pass, refined MVs are derived by applying BM to 16×16 grid sub-blocks. For each sub-block, the refined MVs are searched around the two MVs (MV0_pass1 and MV1_pass1) obtained on the first pass in the reference picture lists L0 and L1. The refined MVs (MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2)) are derived based on the minimum bilateral matching cost between the two reference sub-blocks in L0 and L1.

[0360] For each subblock, BM performs a full search to derive integer sample precision intDeltaMV. The full search has a search range of [–sHor, sHor] in the horizontal direction and a search range of [–sVer, sVer] in the vertical direction, where the values ​​of sHor and sVer are determined by the block size and the maximum values ​​of sHor and sVer are 8.

[0361] The bilateral matching cost is calculated by applying the cost factor to the SATD cost between two reference sub-blocks as follows: bilCost = satdCost * costFactor. The search area (2*sHor+1)*(2*sVer+1) is divided into Fig.23There are up to 5 diamond search areas shown. Each search area is assigned a costFactor, which is determined by the distance (intDeltaMV) between each search point and the starting MV, and each diamond area is processed in order starting from the center of the search area. In each area, the search points are processed in a raster scan order starting from the upper left corner of the area to the lower right corner. When the minimum bilCost in the current search area is less than a threshold (the threshold is equal to sbW*sbH), the integer pixel complete search is terminated, otherwise, the integer pixel complete search continues to the next search area until all search points are checked.

[0362] The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV (sbIdx2). Then, the refined MV in the second pass is derived as:

[0363] –MV0_pass2(sbIdx2)=MV0_pass1+deltaMV(sbIdx2)

[0364] –MV1_pass2(sbIdx2)=MV1_pass1–deltaMV(sbIdx2)

[0365] Third pass – Sub-block based bidirectional optical flow MV refinement

[0366] In the third pass, a refined MV is derived by applying BDOF to the 8×8 grid sub-blocks. For each 8×8 sub-block, BDOF refinement is applied to derive scaled Vx and Vy without clipping from the refined MV of the parent sub-block of the second pass. The derived bioMv(Vx,Vy) is rounded to 1 / 16 sample precision and clipped between -32 and 32.

[0367] The refined MVs (MV0_pass3(sbIdx3) and MV1_pass3(sbIdx3)) of the third pass are derived as follows:

[0368] –MV0_pass3(sbIdx3)=MV0_pass2(sbIdx2)+bioMv

[0369] –MV1_pass3(sbIdx3)=MV0_pass2(sbIdx2)–bioMv

[0370] OBMC in ECM

[0371] When OBMC is applied, as described in JVET-L0101, weighted prediction is used to refine the top and left boundary pixels of the CU using motion information of neighboring blocks.

[0372] The conditions under which OBMC should not be applied are as follows:

[0373] – When OBMC is disabled in SPS level

[0374] – When the current block has intra mode or IBC mode

[0375] – When the current block applies LIC

[0376] – When the current luminance block area is less than or equal to 32

[0377] Sub-block boundary OBMC is performed by applying the same blending to top, left, bottom and right sub-block boundary pixels using the motion information of neighboring sub-blocks. It is enabled for the following sub-block based codecs:

[0378] – Affine AMVP mode;

[0379] – Affine merge mode and sub-block based temporal motion vector prediction (SbTMVP);

[0380] – Sub-block based bilateral matching.

[0381] Sample-based BDOF in ECM

[0382] In sample-based BDOF, motion refinement (Vx, Vy) is performed on a sample-by-sample basis instead of being derived on a block-by-block basis.

[0383] The coding block is divided into 8×8 sub-blocks. For each sub-block, determine whether to apply BDOF by checking the SAD between the two reference sub-blocks against a threshold. If it is decided to apply BDOF to the sub-block, for each sample in the sub-block, a sliding 5×5 window is used and the existing BDOF process is applied to each sliding window to derive Vx and Vy. The derived motion refinement (Vx, Vy) is applied to adjust the bidirectional prediction sample value of the center sample of the window.

[0384] Interpolation in ECM

[0385] The 8-tap interpolation filter used in VVC is replaced with a 12-tap filter. The interpolation filter is derived from a sinc function whose frequency response is truncated at the Nyquist frequency and clipped by a cosine window function. Table 4 gives the filter coefficients for all 16 phases. Fig.24 The frequency response of the interpolation filter is compared with that of the VVC interpolation filter (all at half-pixel phase).

[0386] Table 4: Filter coefficients for 12-tap interpolation filter

[0387]

[0388] Multiple Hypothesis Prediction (MHP) in ECM

[0389] In the multi-hypothesis inter-frame prediction mode (JVET-M0425), in addition to the traditional bidirectional prediction signal, one or more additional motion compensated prediction signals are signaled. The resulting overall prediction signal is obtained by weighted superposition on a sample-by-sample basis. bi and the first additional inter prediction signal / hypothesis h3, the resulting prediction signal p3 is obtained as follows:

[0390] p3=(1-α)p bi +αh3

[0391] The weighting factor α is specified by a new syntax element add_hyp_weight_idx according to the following mapping:

[0392] add_hyp_weight_idx α 0 1 / 4 1 -1 / 8

[0393] Similar to above, more than one additional prediction signal may be used.The resulting overall prediction signal is iteratively accumulated with each additional prediction signal.

[0394] p n+1 =(1-α n+1 ) n +α n+1 h n+1

[0395] The resulting overall prediction signal is obtained as the final p n (i.e., the n Within this EE, at most two additional prediction signals may be used (ie, n is limited to 2).

[0396] The motion parameters for each additional prediction hypothesis can be signaled explicitly by specifying the reference index, motion vector predictor index and motion vector difference, or can be signaled implicitly by specifying the merge index. A separate multi-hypothesis merge flag can distinguish between these two signaling modes.

[0397] For inter-AMVP mode, MHP is applied only when unequal weights in BCW are selected in bi-prediction mode.

[0398] A combination of MHP and BDOF is possible, however BDOF is only applied to the bidirectional prediction signal part of the prediction signal (ie the ordinary first two hypotheses).

[0399] Adaptive Re-ranking of Merge Candidates Using Template Matching in ECM (ARMC-TM)

[0400] Adaptive re-ranking of merge candidates using template matching (TM). The re-ranking method is applied to regular merge mode, template matching (TM) merge mode, and affine merge mode (excluding SbTMVP candidates). For TM merge mode, merge candidates are re-ranked before the refinement process.

[0401] After building the merge candidate list, the merge candidates are divided into several subgroups. For the normal merge mode and the TM merge mode, the subgroup size is set to 5. For the affine merge mode, the subgroup size is set to 3. The merge candidates in each subgroup are reordered in ascending order according to the cost value based on template matching. For simplicity, the merge candidates in the last subgroup instead of the first subgroup are not reordered.

[0402] The template matching cost of the merged candidate is measured by the sum of absolute differences (SAD) between the samples of the template of the current block and its corresponding reference samples. The template includes a set of reconstructed samples adjacent to the current block. The reference samples of the template are located by merging the motion information of the candidate.

[0403] When the merge candidate uses bidirectional prediction, the reference sample points of the template of the merge candidate are also generated by bidirectional prediction, such as Fig.25 shown.

[0404] For a sub-block based merge candidate with a sub-block size equal to Wsub×Hsub, the upper template includes several sub-templates with a size of Wsub×1, and the left template includes several sub-templates with a size of 1×Hsub. Fig.26 As shown, the motion information of the sub-blocks in the first row and the first column of the current block is used to derive the reference sample points of each sub-template.

[0405] Geometric Partition Mode (GPM) using Merged Motion Vector Difference (MMVD) in ECM

[0406] GPM in VVC is extended by applying motion vector refinement on top of the existing GPM unidirectional MV. A flag for the GPM CU is first signaled to specify whether this mode is used. If the mode is used, each geometric partition of the GPM CU can further decide whether to signal MVD. If MVD is signaled for a geometric partition, after selecting a GPM merge candidate, the motion of the partition is further refined by the signaled MVD information. All other procedures remain the same as in GPM.

[0407] Similar to MMVD, MVD is signaled as a pair of distance and direction. In GPM with MMVD (GPM-MMVD), nine candidate distances (1 / 4 pixel, 1 / 2 pixel, 1 pixel, 2 pixels, 3 pixels, 4 pixels, 6 pixels, 8 pixels, 16 pixels) and eight candidate directions (four horizontal / vertical directions and four diagonal directions) are involved. In addition, when pic_fpel_mmvd_enabled_flag is equal to 1, MVD is shifted left by 2 bits as in MMVD.

[0408] Geometric Partitioning Pattern (GPM) using Template Matching (TM) in ECM

[0409] Template matching is applied to GPM. When GPM mode is enabled for a CU, a CU-level flag is signaled to indicate whether TM is applied to two geometric partitions. Motion information for each geometric partition is refined using TM. When TM is selected, a template is constructed using left neighboring samples, top neighboring samples, or left and top neighboring samples according to the partition angle as shown in Table 5. The motion is then refined by minimizing the difference between the current template and the template in the reference picture using the same search pattern with the merge mode of the half-pixel interpolation filter disabled.

[0410] Table 5: Templates for the 1st and 2nd geometric partitions, where A means using the top sample, L means using the left sample, and L+A means using both the left and top samples.

[0411]

[0412] The GPM candidate list is constructed as follows:

[0413] 1. Derive interleaved list 0 MV candidates and list 1 MV candidates directly from the regular merge candidate list, where list 0 MV candidates have higher priority than list 1 MV candidates. Apply a pruning method where the adaptive threshold is based on the current CU size to remove redundant MV candidates.

[0414] 2. Further derive interleaved list 1 MV candidates and list 0 MV candidates directly from the regular merge candidate list, where list 1 MV candidates have a higher priority than list 0 MV candidates. The same pruning method using adaptive thresholds is also applied to remove redundant MV candidates.

[0415] 3. Fill in zero MV candidates until the GPM candidate list is full.

[0416] GPM-MMVD and GPM-TM are enabled for only one GPM CU. This is achieved by first signaling the GPM-MMVD syntax. When both GPM-MMVD control flags are equal to false (i.e., GPM-MMVD is disabled for both GPM partitions), a GPM-TM flag is signaled to indicate whether template matching is applied to both GPM partitions. Otherwise (at least one GPM-MMVD flag is equal to true), the value of the GPM-TM flag is inferred to be false.

[0417] Partition the image into CTUs

[0418] The picture is divided into a series of coding tree units (CTUs). The concept of CTU is the same as that of HEVC [6] [7]. For a picture with three sample arrays, a CTU consists of an N×N luma sample block together with two corresponding chroma sample blocks. Fig.31 An example of a picture divided into CTUs is shown.

[0419] The maximum luma block size allowed in a CTU is specified as 128x128 (although the maximum size of a luma transform block is 64x64).

[0420] Partition the image into sub-images, strips, tiles

[0421] The picture is divided into one or more tile rows and one or more tile columns. A tile is a series of CTUs covering a rectangular area of ​​the picture.

[0422] A slice consists of an integer number of complete tiles or an integer number of consecutive complete CTU rows within a tile in a picture.

[0423] Two strip modes are supported, namely raster scan strip mode and rectangular strip mode. In raster scan strip mode, a strip contains a series of complete tiles in a tile raster scan of a picture. In rectangular strip mode, a strip contains multiple complete tiles that together form a rectangular area of ​​a picture or multiple consecutive complete CTU rows that together form a tile of a rectangular area of ​​a picture. Tiles within a rectangular strip are scanned in tile raster scan order within the rectangular area corresponding to the strip.

[0424] A sub-picture consists of one or more strips that together cover a rectangular area of ​​the picture.

[0425] Fig.32 An example of raster scan strip partitioning of a picture is shown, where the picture is divided into 12 tiles and 3 raster scan strips.

[0426] Fig.33 An example of rectangular strip partitioning of a picture is shown, where the picture is divided into 24 tiles (6 tile columns and 4 tile rows) and 9 rectangular strips.

[0427] Fig.34 An example of a picture partitioned into tiles and rectangular strips is shown, where the picture is divided into 4 tiles (2 tile columns and 2 tile rows) and 4 rectangular strips.

[0428] Fig.35 An example of sub-picture partitioning of a picture is shown, where the picture is partitioned into 18 tiles, with the 12 tiles on the left each covering one slice of 4 by 4 CTUs, and the 6 tiles on the right each covering 2 vertically stacked slices of 2 by 2 CTUs, resulting in a total of 24 slices and 24 sub-pictures of different sizes (each slice is a sub-picture).

[0429] 360-degree video encoding and decoding tool

[0430] Horizontal surround motion compensation

[0431] Horizontal surround motion compensation in VTM10 is a 360-degree specific codec tool designed to improve the visual quality of reconstructed 360-degree videos in the equirectangular (ERP) projection format [5]. In traditional motion compensation, when a motion vector references a sample beyond the picture boundary of a reference picture, repeated padding is applied to derive the value of the out-of-bounds sample by copying from the nearest neighboring blocks on the corresponding picture boundary. For 360-degree video, this repeated padding method is inappropriate and may cause visual artifacts known as "seam artifacts" in the reconstructed viewport video. Because 360-degree video is captured on a sphere and inherently has no "borders", reference samples outside the boundaries of the reference picture in the projection domain can always be obtained from neighboring samples in the spherical domain. For general projection formats, it may be difficult to derive the corresponding neighboring samples in the spherical domain because it involves 2D to 3D and 3D to 2D coordinate conversions [5] and sample interpolation of fractional sample positions. For the left and right boundaries of the ERP projection format, this problem is much simpler, because the spherical neighboring blocks outside the left image boundary can be obtained from the samples within the right image boundary, and vice versa. Given the widespread use and relative ease of implementation of the ERP projection format, horizontal surround motion compensation is used in VVC to improve the visual quality of 360 videos encoded and decoded in the ERP projection format.

[0432] The horizontal surround motion compensation process is as follows Fig.36 When a part of the reference block is outside the left (or right) boundary of the reference picture in the projection domain, the "outside boundary" part is not repeated and padded, but is intercepted from the corresponding spherical neighboring block in the reference picture to the right (or left) boundary in the projection domain. Repeated padding is only used for the top and bottom boundaries of the picture. Fig.36As described in [5], horizontal surround motion compensation can be combined with the non-canonical padding method frequently used in 360-degree video codecs (see padded ERP in [5]). In VVC, this is achieved by signaling a high-level syntax element to indicate a surround offset, which should be set to the ERP picture width before padding; the syntax is used to adjust the position of the horizontal surround accordingly. The syntax is not affected by the specific amount of padding on the left and right picture boundaries, and thus naturally supports asymmetric padding of ERP pictures (i.e., when the left and right padding are different). Horizontal surround motion compensation provides more meaningful information for motion compensation when the reference samples are outside the left and right boundaries of the reference picture. Under 360 video CTC [4], this tool improves compression performance not only in terms of rate-distortion performance, but also in terms of reducing seam artifacts and improving the subjective quality of the reconstructed 360-degree video. Horizontal surround motion compensation can also be used for other single-plane projection formats with constant sampling density in the horizontal direction, such as the adjusted equal-area projection in 360Lib [5].

[0433] Table 6: Luma integer sample acquisition process in VVC.

[0434]

[0435] In existing video codecs (such as HEVC and VVC), the reference block of an inter-mode coded CU (hereinafter referred to as inter-CU) may be partially or completely outside the reference picture. This is because a repeated padding process is applied to the reference picture to generate reference pixels around each reference picture.

[0436] In the VVC specification, the padding process is implemented by changing the integer reference sample acquisition process (as illustrated in Table 6). Whenever the integer reference sample to be acquired is outside the reference picture, the nearest integer reference sample within the reference picture is used instead.

[0437] Since the reference image is already filled, e.g. Fig. 27 As illustrated in , it is effective that the reference block of the inter CU is partially or completely located outside the reference picture. Fig. 27 In , bidirectional motion compensation is performed to generate an inter-frame prediction block for the current block. In this example, the list 0 reference block is partially out-of-boundary (OOB), while the list 1 reference block is completely within the reference picture.

[0438] When bidirectional prediction or even multi-directional prediction is performed on an inter-frame block, the final prediction value is just the average of two or more motion compensated prediction blocks; when BWC is further applied, different weights are applied to the list 0 and list 1 MC prediction values ​​respectively to generate the final prediction value. However, the prediction effect of the out-of-boundary (OOB) part of the motion compensated block is poor because the OOB part is just a repeated pattern generated by the boundary pixels within the reference picture. However, in existing video codecs, the less effective OOB part of the MC block is not specially considered in inter-frame prediction. Similarly, in VVC, surround motion compensation can also be used. The same problem can be observed in the surround MC scheme.

[0439] In the present disclosure, several methods are proposed for improving inter-frame prediction by considering the less effective OOB part of the MC block. In addition, "block" is used to describe the concepts of the present disclosure, and "block" can be easily replaced by any specific definition used in existing codecs. For example, "block" can be a coding unit (CU), prediction unit (PU), transform unit (TU), coding tree unit (CTU), coding block (CB), prediction block (PB), transform block (TB), coding tree block (CTB), sub-CU, sub-PU or any other well-defined term in existing codecs.

[0440] The following methods can be applied alone or in combination.

[0441] In one embodiment according to the present disclosure, when combining two or more prediction blocks generated by a motion compensation process, additional weights are applied to the prediction values; the additional weights are derived based on whether the prediction value samples are OOB. The basic concept is that when performing a weighted average of two prediction value blocks, the OOB prediction value samples are given less weight due to their lower effectiveness.

[0442] In one approach, the final prediction samples for a bidirectional inter-coded block are generated by taking a weighted average of the predictions using the following equation:

[0443]

[0444] in, and are the prediction value samples derived from the reference pictures in list 0 and list 1 according to the motion compensation process; and is the weight associated with the corresponding predicted value derived from the OOB condition; shift is the averaging factor and is set to 1 when it is the average of two predicted values. offset is the rounding offset, which is usually set to 1<<(shift-1).

[0445] like Fig.28 As illustrated in , the predicted value samples of the block are derived by performing motion compensation from the reference picture. The motion vector of the current block is used to locate the reference block. It should be noted that when the reference block is located at a fractional position between integer reference samples, the fractional sample interpolation process is further applied to derive the prediction samples. As described in subclause 8.5.6.3.2 "Lumence sample interpolation filter process" in VVC, fractional sample interpolation first performs a vertical one-dimensional interpolation of accessing the vertically adjacent 8 integer samples, and then performs a horizontal one-dimensional interpolation of accessing the horizontally adjacent 8 vertical interpolation samples. In ECM, the 8-tap interpolation filter used in VVC is further replaced with a 12-tap filter.

[0446] Based on the motion compensation scheme described above, when at least one of the integer reference samples used to generate the prediction value sample (through the interpolation process) is located outside the reference picture, the prediction value sample Defined as OOB.

[0447] The weights can be derived using the following method.

[0448] if Determined to be OOB and Determined to be non-OOB

[0449] Then Set to 0

[0450] Will Set to 2

[0451] (Its same)

[0452] Otherwise, if Determined to be non-OOB and Determined as OOB

[0453] Then Set to 2

[0454] Will Set to 0

[0455] (Its same)

[0456] Otherwise, if Determined to be OOB and Determined as OOB

[0457] Then Set to 1

[0458] Will Set to 1

[0459] (Its same)

[0460] Otherwise, if Determined to be non-OOB and Determined to be non-OOB

[0461] Then Set to 1

[0462] Will Set to 1

[0463] (Its same)

[0464] Fig.30 An example of a coding method according to the present disclosure is shown. In step 3001, the decoder derives a first reference picture and a second reference picture for a current coding block. In step 3002, the decoder derives a first prediction value sample from the first reference picture based on a first motion vector associated with the first reference picture using a motion compensation process. In step 3003, the decoder derives a second prediction value sample from the second reference picture based on a second motion vector associated with the second reference picture using a motion compensation process. In step 3004, the decoder obtains a final prediction value sample in the current coding block based on at least one of the first prediction value sample or the second prediction value sample and an out-of-boundary (OOB) condition. The example method may also be performed by an encoder.

[0465] In another embodiment of the present disclosure, when a block is encoded in BCW mode that combines two prediction blocks generated by a motion compensation process by BCW weighted averaging, additional weights are applied to the prediction values; the additional weights are derived based on whether the prediction values ​​are OOB. In one approach, the final prediction value samples for the BCW encoded block are generated by weighted averaging the prediction values ​​using the following equation:

[0466]

[0467] Where w is the BCW weight, and are the prediction value samples derived from the reference pictures in list 0 and list 1 according to the motion compensation process; and is the weight associated with the corresponding predicted value derived from the OOB condition; shift is the averaging factor and is set to 3 to normalize the BCW weight, o offset is the rounding offset, which is usually set to 1<<(shift-1).

[0468] if Determined to be OOB and Determined to be non-OOB

[0469] Then Set to 0

[0470] Will Set to 8 / w

[0471] (Its same)

[0472] Otherwise, if Determined to be non-OOB and Determined as OOB

[0473] Then Set to 8 / (8–w)

[0474] Will Set to 0

[0475] (Its same)

[0476] Otherwise, if Determined to be OOB and Determined as OOB

[0477] Then Set to 1

[0478] Will Set to 1

[0479] (Its same)

[0480] Otherwise, if Determined to be non-OOB and Determined to be non-OOB

[0481] Then Set to 1

[0482] Will Set to 1

[0483] (Its same)

[0484] In another embodiment of the present disclosure, when BDOF is enabled for a block, additional weights are applied to the prediction values; the additional weights are derived based on whether the prediction value is OOB. In one approach, the final prediction value samples for a BDOF-enabled block are generated by weighted averaging the prediction values ​​using the following equation:

[0485]

[0486] Among them, B i,j is the BDOF offset of each prediction value sample, and are the prediction value samples derived from the reference pictures in list 0 and list 1 according to the motion compensation process; and is the weight associated with the corresponding predicted value derived from the OOB condition; shift is the averaging factor and is set to 1 when it is the average of two predicted values. offset is the rounding offset, which is usually set to 1<<(shift-1).

[0487] if Determined to be OOB and Determined to be non-OOB

[0488] Then Set to 0

[0489] Will Set to 1< <shift

[0490] (Its same)

[0491] Otherwise, if Determined to be non-OOB and Determined as OOB

[0492] Then Set to 1< <shift

[0493] Will Set to 0

[0494] (Its same)

[0495] Otherwise, if Determined to be OOB and Determined as OOB

[0496] Then Set to 1

[0497] Will Set to 1

[0498] (Its same)

[0499] Otherwise, if Determined to be non-OOB and Determined to be non-OOB

[0500] Then Set to 1

[0501] Will Set to 1

[0502] (Its same)

[0503] In another embodiment of the present disclosure, when BDOF is enabled for a block, additional weights are applied to the prediction values; the additional weights are derived based on whether the prediction value is OOB. In one approach, the final prediction value samples for a BDOF-enabled block are generated by weighted averaging the prediction values ​​using the following equation:

[0504]

[0505] Among them, B i,j is the BDOF offset of each prediction value sample, and are the prediction value samples derived from the reference pictures in list 0 and list 1 according to the motion compensation process; and is the weight associated with the corresponding predicted value derived from the OOB condition; shift is the averaging factor and is set to 1 when it is the average of two predicted values. offset is the rounding offset, which is usually set to 1<<(shift-1).

[0506] if Determined to be OOB and Determined to be non-OOB

[0507] Then Set to 0

[0508] Will Set to 1< <shift

[0509] B i,j Set to 0

[0510] (Its same)

[0511] Otherwise, if Determined to be non-OOB and Determined as OOB

[0512] Then Set to 1< <shift

[0513] Will Set to 0

[0514] B i,j Set to 0

[0515] (Its same)

[0516] Otherwise, if Determined to be OOB and Determined as OOB

[0517] Then Set to 1

[0518] Will Set to 1

[0519] (Its same)

[0520] Otherwise, if Determined to be non-OOB and Determined to be non-OOB

[0521] Then Set to 1

[0522] Will Set to 1

[0523] (Its same)

[0524] Based on the motion compensation scheme described above, when at least one of the integer reference samples used to generate the prediction sample (through the interpolation process) is located outside the reference picture, the prediction sample is defined as OOB.

[0525] However, sometimes only a few OOB reference integer samples are used to generate prediction value samples through the interpolation process. In this case, the prediction value samples can still provide efficient prediction (for example, only 2 out of 8 reference integer samples are OOB). Therefore, in order to provide a margin for OOB determination, different schemes are proposed to determine whether the prediction value sample is OOB.

[0526] In another embodiment of the present disclosure, when at least one of the vertically nearest integer reference samples is OOB or at least one of the horizontally nearest integer reference samples is OOB, the prediction value sample is determined to be OOB. Fig.28 As shown in FIG, the nearest integer reference samples to the level of the predicted value P_0,0^Lx are samples d and e.

[0527] In another embodiment of the present disclosure, when at least N of the integer samples used to generate the predicted value samples are OOB, the predicted value samples are determined to be OOB, where N is any integer.

[0528] In another embodiment of the present disclosure, when performing weighted averaging of two or more prediction value blocks, prediction value samples interpolated using OOB integer reference samples are given less weight. In addition, the weight is inversely proportional to the number of OOB integer reference samples.

[0529] In another embodiment of the present disclosure, when performing a weighted average of two or more prediction value blocks, weights are given to prediction value samples interpolated using OOB integer reference samples. The weights are signaled in the bitstream at different levels, such as sequence level (sequence parameter set), picture level (picture parameter set), slice level (slice header), or block level.

[0530] However, in the present disclosure, in order to provide flexible OOB determination, the following scheme is proposed to determine whether a prediction value sample is OOB. In one or more embodiments, the prediction value sample is determined to be OOB based on whether the prediction value sample is outside the reference picture and the fractional position of the prediction value sample. Specifically, the position of the prediction pixel in the current block is represented as Pos i,j ; The horizontal position index and vertical position index are further represented as Pos_x i,j and Pos_y i,j ; List 0MV and list 1MV of the current block are represented as and The horizontal and vertical components of MV are further expressed as and (Lx can be L0 or L1, which represents list 0 and list 1 respectively.) Since fractional MV is supported in many existing video codec standards, such as 1 / 16 sample MV (also expressed as 1 / 16 pixel MV) used in VVC and 1 / 4 sample MV used in HEVC, and Expressed in fractional samples (e.g. 1 / 16 samples), Pos′_x i,j and Pos′_y i,j Pos′ is the position index of the predicted pixel position in the current block expressed in fractional samples. LeftBdry , Pos′ RightBdry , Pos′ TopBdry , Pos′ BottomBdry is the position index of the picture boundary in fractional samples.

[0531] Please note that in this disclosure, it is assumed that the position index starts from the top left of the picture, for example, the position index of the top left sample of the picture is represented as (0,0); and the position index increases from top to bottom and from left to right. In an exemplary scheme, a predicted value sample is determined as OOB using the following conditional check:

[0532] In one exemplary approach, a predicted value sample is determined to be OOB using the following conditional check (M, N, O, P are arbitrary integers):

[0533] When at least one of the following conditions is met, the predicted value sample point Treated as OOB:

[0534]

[0535] or

[0536] Otherwise, when the above conditions are not met, the predicted value sample point Considered non-OOB.

[0537] Fig.37 A flowchart of a video encoding and decoding process according to an example of the present disclosure is illustrated. In step 3701, an encoder or decoder may derive a reference picture for a current coding block. In step 3702, an encoder or decoder may derive a prediction value sample from a reference picture based on a motion vector associated with the reference picture using a motion compensation process. In step 3703, an encoder or decoder may determine whether the prediction value sample is located at a certain margin outside the reference picture. In step 3704, an encoder or decoder may determine that the prediction value sample is OOB in response to determining that the prediction value sample is located at a certain margin outside the reference picture.

[0538] In yet another embodiment, the OOB determination of the prediction value samples may be performed based on a set of prediction value samples. In one example, according to the previously described OOB determination process (but not limited to the proposed scheme), a block of M×N prediction value samples (where M is the block width and N is the block height) shares the same OOB state (determined as OOB or non-OOB).

[0539] DMVR considering OOB conditions

[0540] To improve the accuracy of MV in merge mode, decoder-side motion vector refinement based on bilateral matching (BM) is applied in VVC. In bidirectional prediction operation, the refined MV is searched around the initial MV in reference picture list L0 and reference picture list L1. The BM method calculates the distortion between two candidate blocks in reference picture list L0 and list L1. Fig.17 As illustrated in FIG, the SAD between the red blocks is calculated based on each MV candidate around the initial MV. The MV candidate with the lowest SAD becomes the refined MV and is used to generate the bidirectional prediction signal. In another embodiment, when a sample of a candidate block in the reference picture list L0 or list L1 is determined to be OOB, the sample and its related samples of other corresponding candidate blocks are not used to calculate the matching cost (e.g., the absolute sample difference sum or the sample difference square sum).

[0541] Template matching considering OOB conditions

[0542] Template matching (TM) is a decoder-side MV derivation method for refining the motion information of the current CU by finding the closest match between the template in the current picture (i.e., the top neighboring block and / or the left neighboring block of the current CU) and the reference block in the reference picture (i.e., the same size as the template). In another embodiment, when a sample of the reference block in the reference picture is determined to be OOB, the sample of the template in the current picture and its related samples are not used to calculate the matching cost (e.g., the absolute sample difference or the squared sample difference).

[0543] MHP considering OOB conditions

[0544] In the multi-hypothesis inter-frame prediction mode (JVET-M0425), in addition to the traditional bidirectional prediction signal, one or more additional motion compensated prediction signals are signaled. The resulting overall prediction signal is obtained by weighted superposition on a sample-by-sample basis. bi and the first additional inter prediction signal / hypothesis h3, the resulting prediction signal p3 is obtained as follows:

[0545] p3=(1-α)p bi +αh3

[0546] In another embodiment, when samples of the additional motion compensated prediction are determined to be OOB, the samples are not used to generate the resulting overall prediction signal for the MHP mode.

[0547] LIC considering OOB conditions

[0548] LIC is an inter-frame prediction technique for modeling local illumination changes between a current block and its predicted block as a function derived from pixels between the current block template and the reference block of the current block template. The parameters of the function can be expressed in terms of a scale α and an offset β, which form a linear equation for compensating for illumination changes (i.e., α*p[x]+β), where p[x] is the reference sample pointed to by the MV at position x on the reference picture. Since α and β can be derived based on the current block template and the reference block of the current block template, they do not require signaling overhead except for signaling a LIC flag indicating the use of LIC. In another embodiment, when a sample of the reference block of the current block template is determined to be OOB, the sample of the current block template and its related samples are not used to derive LIC parameters.

[0549] Affine PROF

[0550] In another embodiment, when performing PROF, the PROF offset is set to zero when the samples used to derive the horizontal / vertical gradient values ​​include OOB reference samples.

[0551] In another embodiment, when PROF is performed, the horizontal / vertical gradient values ​​are set to zero when the samples used to derive the horizontal / vertical gradient values ​​include OOB reference samples.

[0552] One-way prediction considering OOB conditions

[0553] The unidirectional prediction method is similar to the inter-frame prediction block predicted using a single motion vector. In one or more examples of the present disclosure, for the unidirectional prediction block, the OOB prediction value samples are replaced with alternative prediction values. In one scheme, the alternative prediction value is derived by scaling the prediction value in other reference pictures pointed to by the mv of the current block according to the temporal distance between the current picture, the reference picture, and the target reference picture using a similar scaling method used in the derivation of the temporal MV prediction (TMVP) in VVC or HEVC.

[0554] like Fig.38 As shown, according to an example of the present disclosure, a method for decoding a bidirectional prediction coding block is provided. In step 3801, the decoder derives a first reference picture for the current coding block. In step 3802, the decoder derives a first prediction value sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process. In step 3803, the decoder determines whether the first prediction value sample is out of bounds (OOB), and in response to determining that the first prediction value sample is OOB, the decoder replaces the first prediction value sample as OOB with a first replacement prediction value sample. In step 3804, the decoder derives a second reference picture for the current coding block. In step 3805, the decoder derives a second prediction value sample from the second reference picture based on a motion vector associated with the second reference picture using a motion compensation process. In step 3806, the decoder determines whether the second prediction value sample is out of bounds (OOB), and in response to determining that the second prediction value sample is OOB, the decoder replaces the second prediction value sample as OOB with a second replacement prediction value sample. In step 3807, the decoder generates a final prediction sample by averaging the sample values ​​of the first prediction value sample and the second prediction value sample.

[0555] Fig.393901 is a block diagram illustrating a method for encoding a bidirectional prediction coding block according to an example of the present disclosure. In step 3902, the encoder uses a motion compensation process to derive a first prediction value sample from the first reference picture based on a motion vector associated with the first reference picture. In step 3903, the encoder determines whether the first prediction value sample is out of bounds (OOB), and in response to determining that the first prediction value sample is OOB, the encoder replaces the first prediction value sample as OOB with a first replacement prediction value sample. In step 3904, the encoder derives a second reference picture for the current coding block. In step 3905, the encoder uses a motion compensation process to derive a second prediction value sample from the second reference picture based on a motion vector associated with the second reference picture. In step 3906, the encoder determines whether the second prediction value sample is out of bounds (OOB), and in response to determining that the second prediction value sample is OOB, the encoder replaces the second prediction value sample as OOB with a second replacement prediction value sample. In step 3907, the encoder generates a final prediction sample by averaging the sample values ​​of the first prediction value sample and the second prediction value sample.

[0556] like Fig.40 As shown, according to an example of the present disclosure, a method for decoding a unidirectional prediction coding block is provided. In step 4001, the decoder derives a first reference picture for the current coding block. In step 4002, the decoder derives a first prediction value sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process. In step 4003, the decoder determines whether the first prediction value sample is out of bounds (OOB), and in response to determining that the first prediction value sample is OOB, the decoder replaces the first prediction value sample as OOB with an alternative prediction value sample. The decoder can derive an alternative prediction value sample based on a second prediction value sample in a second reference picture. For example, the decoder can derive a second prediction value sample in a second reference picture by scaling the motion vector of the current coding block according to the distance between the current picture, the first reference picture, and the second reference picture.

[0557] Fig.41 4101, the encoder derives a first reference picture for the current coding block. In step 4102, the encoder derives a first prediction value sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process. In step 4103, the encoder determines whether the first prediction value sample is out of bounds (OOB), and in response to determining that the first prediction value sample is OOB, the encoder replaces the first prediction value sample as OOB with an alternative prediction value sample.

[0558] Implementation of the proposed method

[0559] In an alternative way to achieve the same motivation of the proposed method, in a fourteenth embodiment, the OOB prediction values ​​in one reference list LX (X can be 0 or 1) can be replaced by the corresponding non-OOB prediction values ​​in another reference list L(1-X). After the replacement, the original averaging process of the bidirectional MC can remain unchanged. An example is given below to have the same result as that shown in the first embodiment.

[0560] if Determined to be OOB and Determined to be non-OOB

[0561] Then its same

[0562] (and it also same)

[0563] Otherwise, if Determined to be non-OOB and Determined as OOB

[0564] Then its same

[0565] (Its same)

[0566] Otherwise, if Determined to be OOB and Determined as OOB

[0567] Then its same

[0568] Otherwise, if Determined to be non-OOB and Determined to be non-OOB

[0569] Then its same

[0570] Advanced Syntax Signaling

[0571] In another embodiment, one or more syntax elements may be signaled in the bitstream to indicate the enablement / disablement of the proposed MC considering the OOB condition. In addition, one or more syntax elements may be signaled in the bitstream to indicate the parameters or thresholds used in the MC considering the OOB. The proposed syntax elements may be signaled at the sequence level (e.g., sequence parameter set), picture level (e.g., picture parameter set), slice level (e.g., slice header), CTU / CTB level, CU / CB level, PU / PB level. In addition, the enable / disable control may adopt a hierarchical scheme. For example, one syntax element is signaled at the sequence level to indicate the enablement / disablement of the proposed OOB scheme. When the syntax element indicates that the OOB scheme is disabled, no more syntax elements are signaled in the bitstream; when the syntax element indicates that the OOB scheme is enabled, more syntax elements may be signaled at a lower level to indicate the enablement / disablement of OOB at a lower level. For example, when the sequence level syntax element indicates that OOB is enabled, one slice level syntax element is signaled to indicate the enablement / disablement of the OOB scheme at the slice level.

[0572] In a motion compensation (MC) scheme of an existing video codec standard, when a reference sample indicated by a motion vector is outside a predefined boundary, boundary sample padding or horizontal / vertical wrapping is used to enable an MC process using reference samples located outside the boundary. The predefined boundary includes, but is not limited to, a coded picture boundary, a sub-picture boundary, a slice boundary, and / or a tile boundary. In another embodiment, when motion compensation can be performed based on reference samples located outside the boundary as described above, the proposed MC scheme can be applied to any scheme. It should also be noted that the proposed scheme can be applied when reference picture resampling (RPR) is used.

[0573] It should be noted that the proposed motion compensation (MC) scheme taking into account the OOB condition is not limited to being applied to the coding method in the proposed embodiment, but can also be applied to all inter-frame tools that perform MC to generate prediction value samples as described in the previous section, such as sub-block MC (such as sub-block TMVP, affine mode), OBMC, IBC, SMVD, DMVR, etc.

[0574] The above method can be implemented using a device including one or more circuits, which include an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components. The device can use these circuits in combination with other hardware or software components for performing the above method. Each module, submodule, unit, or subunit disclosed above can be implemented at least in part using these one or more circuits.

[0575] Fig.29 A computing environment 1610 is shown coupled to a user interface 1650. The computing environment 1610 may be part of a data processing server. The computing environment 1610 includes a processor 1620, a memory 1630, and an input / output (I / O) interface 1640.

[0576] The processor 1620 generally controls the overall operation of the computing environment 1610, such as operations associated with display, data acquisition, data communication, and image processing. The processor 1620 may include one or more processors that execute instructions to perform all or some of the steps in the method described above. In addition, the processor 1620 may include one or more modules that facilitate interaction between the processor 1620 and other components. The processor may be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, a graphics processing unit (GPU), etc.

[0577] The memory 1630 is configured to store various types of data to support the operation of the computing environment 1610. The memory 1630 may include predetermined software 1632. Examples of such data include instructions for any application or method operating on the computing environment 1610, video data sets, image data, etc. The memory 1630 may be implemented by using any type of volatile or non-volatile memory device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0578] I / O interface 1640 provides an interface between processor 1620 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). Buttons may include but are not limited to a home button, a start scan button, and a stop scan button. I / O interface 1640 may be coupled to an encoder and a decoder.

[0579] In an embodiment, a non-transitory computer-readable storage medium is also provided, the non-transitory computer-readable storage medium, for example, in the memory 1630, includes a plurality of programs, the plurality of programs can be executed by the processor 1620 in the computing environment 1610, for performing the above method. In one example, the plurality of programs can be executed by the processor 1620 in the computing environment 1610 to receive (for example, from Figure 2The video encoder 20 in the computing environment 1610 includes a bit stream or data stream of encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.), and can also be executed by the processor 1620 in the computing environment 1610 to perform the above decoding method according to the received bit stream or data stream. In another example, the multiple programs can be executed by the processor 1620 in the computing environment 1610 to perform the above encoding method to encode the video information (e.g., video blocks representing video frames and / or one or more associated syntax elements, etc.) into a bit stream or data stream, and can also be executed by the processor 1620 in the computing environment 1610 to transmit the bit stream or data stream (e.g., to Figure 3 Alternatively, a non-transitory computer-readable storage medium may have stored therein a bitstream or data stream including a video decoder 30 in the encoder (e.g., Figure 2 The video encoder 20 in the embodiment uses the encoded video information (e.g., video blocks representing encoded video frames and / or one or more associated syntax elements, etc.) generated by the encoding method described above for use by a decoder (e.g., Figure 3 The video decoder 30 in the video decodes the video data. The non-transitory computer-readable storage medium may be, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0580] In an embodiment, a computing device is also provided, comprising: one or more processors (e.g., processor 1620); and a non-transitory computer-readable storage medium or memory 1630, wherein the non-transitory computer-readable storage medium or memory stores a plurality of programs executable by the one or more processors, wherein the one or more processors are configured to perform the above-mentioned method when executing the plurality of programs.

[0581] In an embodiment, a computer program product is also provided, the computer program product, for example, includes multiple programs in the memory 1630, the multiple programs can be executed by the processor 1620 in the computing environment 1610, for performing the above method. For example, the computer program product may include a non-transitory computer-readable storage medium.

[0582] In an embodiment, the computing environment 1610 may be implemented with one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0583] The description of the present disclosure has been presented for illustrative purposes and is not intended to be exhaustive or limited to the present disclosure. Many modifications, variations, and alternative embodiments will be apparent to one of ordinary skill in the art having the benefit of the teachings presented in the foregoing description and the associated drawings.

[0584] Unless otherwise specifically stated, the order of steps of the method according to the present disclosure is intended to be illustrative only, and the steps of the method according to the present disclosure are not limited to the order specifically described above, but can be changed according to actual conditions. In addition, at least one step of the method according to the present disclosure can be adjusted, combined or deleted according to actual needs.

[0585] Examples are chosen and described in order to explain the principles of the present disclosure and to enable other persons skilled in the art to understand the various embodiments of the present disclosure and to best utilize the basic principles and various embodiments with various modifications suitable for the specific use contemplated. Therefore, it should be understood that the scope of the present disclosure should not be limited to the specific examples of the disclosed embodiments, and modifications and other embodiments are intended to be included within the scope of the present disclosure.

Claims

1. A method for decoding a bidirectionally predictive coded block, the method comprising: Derivation by the decoder of a first reference picture for a current coding block; deriving, by the decoder, a first prediction value sample from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; determining, by the decoder, whether the first prediction value sample is out-of-bounds (OOB), and in response to determining that the first prediction value sample is OOB, replacing, by the decoder, the first prediction value sample that is OOB with a first substitute prediction value sample; deriving, by the decoder, a second reference picture for the current coding block; deriving, by the decoder, second prediction value samples from the second reference picture based on a motion vector associated with the second reference picture using a motion compensation process; determining, by the decoder, whether the second prediction value sample is out-of-bounds (OOB), and in response to determining that the second prediction value sample is OOB, replacing, by the decoder, the second prediction value sample that is OOB with a second substitute prediction value sample; as well as A final prediction sample is generated by averaging the sample values ​​of the first prediction value sample and the second prediction value sample.

2. The method for video decoding according to claim 1, wherein: Replacing the first prediction value sample as OOB with the first substitute prediction value sample further comprises: The first replacement prediction value sample point is set as the second prediction value sample point.

3. The method for video decoding according to claim 1, wherein: Replacing the second predicted value sample as OOB with the second substitute predicted value sample further comprises: The second replacement prediction value sample point is set as the first prediction value sample point.

4. A method for encoding a bidirectional predictive coding block, the method comprising: A first reference picture for a current coding block is derived by an encoder; deriving, by the encoder, first prediction value samples from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; determining, by the encoder, whether the first prediction value sample is out-of-bounds (OOB); and in response to determining that the first prediction value sample is OOB, replacing, by the encoder, the prediction value sample that is OOB with a first substitute prediction value sample; deriving, by the encoder, a second reference picture for the current coding block; deriving, by the encoder, second prediction value samples from the second reference picture based on a motion vector associated with the second reference picture using a motion compensation process; determining, by the encoder, whether the second prediction value sample is out-of-bounds (OOB); and in response to determining that the second prediction value sample is OOB, replacing, by the decoder, the second prediction value sample that is OOB with a second substitute prediction value sample; as well as A final prediction sample is generated by averaging the sample values ​​of the first prediction value sample and the second prediction value sample.

5. The method for video encoding as claimed in claim 4, wherein: Replacing the first prediction value sample as OOB with the first substitute prediction value sample further comprises: The first replacement prediction value sample point is set as the second prediction value sample point.

6. The method for video encoding as claimed in claim 4, wherein: Replacing the second predicted value sample as OOB with the second substitute predicted value sample further comprises: The second replacement prediction value sample point is set as the first prediction value sample point.

7. A method for decoding a unidirectionally predictive coded block, the method comprising: Derivation by the decoder of a first reference picture for a current coding block; deriving, by the decoder, predictor samples from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; determining, by the decoder, whether the predicted value sample is out-of-bounds (OOB); And in response to determining that the prediction value sample is OOB, replacing the prediction value sample that is OOB with a substitute prediction value sample by the decoder.

8. The method for decoding a unidirectionally predictive coded block according to claim 7, wherein: Replacing the predicted value sample as OOB with the substitute predicted value sample further comprises: The replacement prediction value samples are derived based on second prediction value samples in a second reference picture.

9. The method for decoding a unidirectionally predictive coded block according to claim 8, wherein: Derivation of the replacement prediction value sample based on the second prediction value sample in the second reference picture includes: The second prediction value samples in the second reference picture are derived by scaling the motion vector of the current coding block according to the distance between the current picture, the first reference picture, and the second reference picture.

10. A method for encoding a unidirectional predictive coding block, the method comprising: A first reference picture for a current coding block is derived by an encoder; deriving, by the encoder, predictor samples from the first reference picture based on a motion vector associated with the first reference picture using a motion compensation process; determining, by the encoder, whether the predicted value sample is out-of-bounds (OOB); And in response to determining that the prediction value sample is OOB, replacing the prediction value sample that is OOB with a substitute prediction value sample by the encoder.

11. The method for video encoding according to claim 10, wherein: Replacing the predicted value sample as OOB with the substitute predicted value sample further comprises: The replacement prediction value samples are derived based on second prediction value samples in a second reference picture.

12. The method for video encoding according to claim 11, wherein: Derivation of the replacement prediction value samples based on the second prediction value samples in the second reference picture: The second prediction value samples in the second reference picture are derived by scaling the motion vector of the current coding block according to the distance between the current picture, the first reference picture, and the second reference picture.

13. An apparatus comprising: one or more processors; as well as A memory configured to store instructions executable by the one or more processors; wherein the one or more processors are configured to perform the method according to any one of claims 1 to 12 when executing the instructions.

14. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to receive a bit stream and perform the method of any one of claims 1 to 3 or 7 to 9 based on the bit stream.

15. A non-transitory computer-readable storage medium for storing computer-executable instructions, which, when executed by one or more computer processors, cause the one or more computer processors to perform the method of any one of claims 4 to 6 or 10 to 12 to encode a current video block into a bitstream and transmit the bitstream.