Constraints on decoder-side motion vector refinement
By determining the application of motion vector refinement based on bidirectional prediction weights in video encoders and decoders, the problem of low efficiency of motion vector refinement in the prior art is solved, the encoding and decoding efficiency is improved, and the implementation process is simplified.
Patent Information
- Application Number
- CN202080016719.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-02-27
- Filing Date
- 2020-02-28
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-02-28
AI Technical Summary
Existing video coding technology has low efficiency in the motion vector refinement process. Especially under bidirectional prediction conditions, it is difficult to effectively decide whether to apply motion vector refinement, thus affecting coding efficiency and decoding performance.
By introducing a technique in the video encoder and decoder to decide whether to apply the motion vector refinement process based on the weight of the bidirectional prediction, the specific method includes disabling the refinement process when the weights are not equal, and disabling the refinement process when the prediction block difference is less than a threshold Refinement is also disabled to improve coding efficiency and simplify implementation.
It improves the efficiency of video encoding and decoding, simplifies the implementation process of motion vector refinement, reduces overhead signaling in the encoding stream, and improves encoding efficiency and performance.
Smart Images

Figure CN113678452B_ABST
Abstract
Description
[0001] This application claims priority to U.S. Patent Application No. 16 / 803,520, filed on February 27, 2020, which in turn claims priority to U.S. Provisional Application No. 62 / 812,828, filed on March 1, 2019, the entire contents of each of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to video encoding and video decoding. Background Art
[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), or extensions of such standards. By implementing such video coding techniques, video devices can more efficiently send, receive, encode, decode and / or store digital video information.
[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be divided into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial prediction relative to reference samples in neighboring blocks in the same picture or temporal prediction relative to reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention
[0005] In general, the present disclosure describes techniques for decoder-side motion vector refinement (DMVR). In particular, the present disclosure describes techniques for determining when to apply a motion vector refinement process (such as bilateral template matching) to a block of video data encoded using predictions of bidirectional prediction. In one example, when the weights of the predictions used for the bidirectional predictions are unequal, the video encoder may disable the motion vector refinement process for the bidirectional prediction blocks. In another example of the present disclosure, the video encoder may also disable the motion vector refinement process when the difference between the prediction blocks identified by the motion vectors of the bidirectional predictions is less than a threshold. The techniques of the present disclosure can be applied to extensions of any existing video codec, used with the VVC (Versatile Video Coding) standard under development, or as an effective coding tool in any future video coding standard, or become an effective coding tool in any future video coding standard.
[0006] In one example, a method includes determining a motion vector for a current block of video data encoded using prediction of bi-prediction, determining to use a motion vector refinement process on the motion vector based on a weight of the prediction of the bi-prediction for the current block, and applying the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process.
[0007] In another example, an apparatus configured to decode video data includes a memory configured to store a current block of the video data, and one or more processors implemented in circuitry and in communication with the memory, the one or more processors configured to determine a motion vector for the current block of video data encoded using prediction of bi-directional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of the prediction of the bi-directional prediction for the current block, and apply the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process.
[0008] In another example, an apparatus configured to decode video data includes means for determining a motion vector for a current block of video data encoded using a prediction of a bi-prediction, means for determining to use a motion vector refinement process on the motion vector based on a weight of the prediction of the bi-prediction for the current block, and means for applying the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process.
[0009] In another example, the present disclosure describes a non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to be configured to decode video data to determine a motion vector for a current block of video data encoded using prediction of bi-directional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of the prediction of the bi-directional prediction for the current block, and apply the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process.
[0010] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.
[0012] Figure 2 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.
[0013] Figure 3 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.
[0014] Figure 4A is a conceptual diagram illustrating spatially neighboring motion vector candidates for merge mode.
[0015] Figure 4B A conceptual diagram illustrating spatially neighboring motion vector candidates for advanced motion vector prediction (AMVP) mode.
[0016] Figure 5A It is a conceptual diagram for explaining the temporal motion vector candidates.
[0017] Figure 5B is a conceptual diagram illustrating motion vector scaling.
[0018] Fig. 6A is a conceptual diagram illustrating the merged motion vector refinement (MMVR) process.
[0019] Figure 6B is a conceptual diagram illustrating MMVR search points.
[0020] Figure 7 It is a conceptual diagram illustrating offset merge candidates.
[0021] Figure 8 is a conceptual diagram illustrating bilateral template matching.
[0022] Fig. 9 is a conceptual diagram illustrating example pipeline states of a decoder-side motion vector derivation (DMVD) technique.
[0023] Fig.10 is a conceptual diagram illustrating example optical flow trajectories.
[0024] Fig.11 is a conceptual diagram illustrating an example bidirectional optical flow (BIO) of an 8x4 block.
[0025] Fig.12is a flow chart illustrating an example encoding method.
[0026] Fig.13 is a flow chart illustrating an example decoding method.
[0027] Fig.14 is a flow chart illustrating an example decoding method for applying decoder-side motion vector refinement.
[0028] Fig.15 is a flow chart illustrating another example decoding method for applying decoder-side motion vector refinement. DETAILED DESCRIPTION
[0029] In general, the present disclosure describes techniques for decoder-side motion vector refinement (DMVR). In particular, the present disclosure describes techniques for determining when a motion vector refinement process (such as bilateral template matching) is applied to a block of video data encoded using a prediction of bidirectional prediction. According to the techniques of the present disclosure, a video encoder may be configured to determine when to apply a motion vector refinement process without explicitly encoding (e.g., encoding or decoding) a syntax element indicating whether motion vector refinement will be applied. In this way, a video encoder may selectively apply motion vector refinement without increasing overhead signaling in an encoded video bitstream. In one example, when the weights for bidirectional prediction are unequal, a video encoder (e.g., a video encoder and / or a video decoder) may disable a motion vector refinement process for a bidirectional prediction block. In another example of the present disclosure, a video encoder may also disable a motion vector refinement process when the difference between prediction blocks identified by a motion vector of a bidirectional prediction is less than a threshold.
[0030] Figure 1 1 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure for DMVR. The techniques of the present disclosure are generally directed to encoding (encoding and / or decoding) video data. In general, video data includes any data used to process video. Therefore, video data can include original, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata (such as signaling data). As will be explained in more detail below, the present disclosure describes techniques for determining when to apply a motion vector refinement process (such as bilateral template matching) for DMVR to a block of video data encoded using a prediction of bidirectional prediction. In one example, when the weights of the predictions for bidirectional prediction are unequal, the video encoder can disable the motion vector refinement process for the bidirectional prediction block. In another example of the present disclosure, the video encoder can also disable the motion vector refinement process when the difference between the prediction blocks identified by the motion vectors of the bidirectional prediction is less than a threshold. The techniques of the present disclosure can improve coding efficiency and / or simplify the implementation of the DMVR techniques.
[0031] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. In particular, source device 102 provides the video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a variety of devices, including desktop computers, notebooks (i.e., laptop computers), tablet computers, set-top boxes, handheld phones (such as smartphones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and, therefore, may be referred to as wireless communication devices.
[0032] exist Figure 1 In the example of , source device 102 includes video source 104, memory 106, video encoder 200 and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques for decoder-side motion vector refinement. Thus, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may be connected to an external display device via an interface without including an integrated display device.
[0033] like Figure 1 The system 100 shown is only an example. In general, any digital video encoding and / or decoding device can perform the technology for decoder side motion vector refinement. The source device 102 and the destination device 116 are only examples of such encoding devices, wherein the source device 102 generates the encoded video data for transmission to the destination device 116. The present disclosure refers to the "encoding" device as a device that performs data encoding (encoding and / or decoding). Thus, the video encoder 200 and the video decoder 300 represent examples of encoding devices, in particular, video encoders and video decoders, respectively. In some examples, the device 102 and the device 116 can operate in a substantially symmetrical manner so that each of the device 102 and the device 116 includes a video encoding and decoding component. Thus, the system 100 can support one-way or two-way video transmission between the video device 102 and the device 116, for example, for video streaming, video playback, video broadcasting or video telephony.
[0034] In general, the video source 104 represents a source of video data (i.e., original uncoded video data), and provides a sequential series of pictures (also referred to as "frames") of the video data to the video encoder 200, which encodes the data of the pictures. The video source 104 of the source device 102 may include a video capture device, such as a camera, a video archive of previously captured original video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, the video source 104 may generate computer graphics-based data as a source video, or a combination of live video, archived video, and computer-generated video. In each case, the video encoder 200 encodes captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange pictures from a receiving order (sometimes referred to as a "display order") to an encoding order for encoding. The video encoder 200 may generate a bitstream including the encoded video data. Then, the source device 102 may output the encoded video data to a computer-readable medium 110 via an output interface 108, and receive and / or retrieve through, for example, an input interface 122 of a destination device 116.
[0035] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 106, 120 can store original video data, such as original video from the video source 104 and original decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although the video encoder 200 and the video decoder 300 are shown separately in this example, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memories that achieve functionally similar or equivalent purposes. Further, the memories 106, 120 can store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 can be allocated as one or more video buffers, for example, to store original decoded and / or encoded video data.
[0036] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium to enable the source device 102 to directly send the encoded video data to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, the output interface 108 may modulate the transmission signal including the encoded video data, and the input interface 122 may modulate the received transmission signal. 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 part 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 equipment that may facilitate communication from the source device 102 to the destination device 116.
[0037] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 116. Similarly, destination device 116 may access the encoded data from storage device 116 via input interface 122. Storage device 116 may include any of a variety of distributed or locally accessed data storage media, such as a hard disk, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0038] In some examples, source device 102 may output the encoded video data to file server 114 or another intermediate storage device that may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or downloading. File server 114 may be any type of server device capable of storing encoded video data and sending the encoded video data to destination device 116. File server 114 may represent a network server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. Destination device 116 may access the encoded video data from file server 114 through any standard data connection including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., DSL, a cable modem, etc.), or a combination of the two suitable for accessing encoded video data stored on file server 114. File server 114 and input interface 122 may be configured to operate according to a streaming protocol, a downloading transmission protocol, or a combination thereof.
[0039] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to a cellular communication standard such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, or the like. In certain examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to other wireless standards, such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee 5G). TM ), Bluetooth TM Standards, etc., to transmit data such as encoded video data. In some examples, source device 102 and / or destination device 116 may include respective system-on-chip (SoC) devices. For example, source device 102 may include a SoC device to perform functions attributed to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device to perform functions attributed to video decoder 300 and / or input interface 122.
[0040] The techniques disclosed herein may be applied to video encoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0041] The input interface 122 of the destination device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., the storage device 112, the file server 114, etc.). The encoded video bitstream computer-readable storage medium 110 may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements having values describing characteristics and / or processing of video blocks or other encoded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0042] Although not in Figure 1, but in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams including audio and video in a common data stream.
[0043] The video encoder 200 and the video decoder 300 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 these techniques are partially implemented in software, the device can store instructions for the software in a suitable non-temporary computer-readable medium and use one or more processors to execute the instructions in hardware to perform the techniques of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, either of which can be integrated as part of a combined encoder / decoder (CODEC) in each device. The device including the video encoder 200 and / or the video decoder 300 can include an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.
[0044] The video encoder 200 and the video decoder 300 may operate in accordance with a video coding standard, such as ITU-T H.265, also known as High Efficiency Video Coding (HEVC), or an extension thereof, such as a multi-view and / or scalable video coding extension. Alternatively, the video encoder 200 and the video decoder 300 may operate in accordance with other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266 (also known as Versatile Video Coding (VVC)). Bross et al. describe a draft of the VVC standard ("Versatile Video Coding (Draft 4)," Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 13 th Meeting: Marrakech, MA, 9-18 January 2019, JVET-M1001-v5), (hereinafter referred to as “VVC Draft 4”). However, the technology of the present disclosure is not limited to any particular coding standard.
[0045] In general, the video encoder 200 and the video decoder 300 can perform block-based encoding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. In general, the video encoder 200 and the video decoder 300 can encode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can encode luminance and chrominance components, where the chrominance components may include red and blue chrominance components, instead of encoding red, green, and blue (RGB) data of samples of the picture. In some examples, the video encoder 200 converts the received RGB format data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing and post-processing unit (not shown) can perform these conversions.
[0046] The present disclosure may generally refer to the encoding (e.g., coding and decoding) of a picture to include the process of encoding or decoding picture data. Similarly, the present disclosure may relate to encoding a block of a picture to include the process of encoding or decoding the data of the block, such as prediction and / or residual coding. The encoded video bitstream generally includes syntax elements for representing coding decisions (e.g., coding modes) and a series of values for partitioning the picture into blocks. Thus, references to encoding a picture or block should generally be understood to encode the values of the syntax elements that form the picture or block.
[0047] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video encoder (such as video encoder 200) partitions a coding tree unit (CTU) into CUs according to a quadtree structure. That is, the video encoder partitions the CTU and CU into four equal non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs and / or one or more TUs. The video encoder may further partition the PU and TU. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of a TU. In HEVC, a PU represents inter-frame prediction data, and a TU represents residual data. An intra-predicted CU includes intra-frame prediction information, such as an intra-frame mode indication.
[0048] As another example, the video encoder 200 and the video decoder 300 can be configured to operate according to JEM or VCC. According to JEM or VVC, a video encoder (such as the video encoder 200) partitions a picture into multiple coding tree units (CTUs). The video encoder 200 can partition the CTU according to a tree structure such as a quadtree-binary tree (QTBT) structure or a multi-type tree (MTT) structure. The QTBT structure eliminates the concept of multiple partition types, such as the separation between CU, PU, and TU of HEVC. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0049] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also known as ternary (TT)) partitioning. Triple tree or ternary tree partitioning is a partitioning in which a block is divided into three sub-blocks. In some examples, triple tree or ternary tree partitioning divides a block into three sub-blocks without dividing the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0050] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT structure to represent each of the luma component and the chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the respective chroma components).
[0051] The video encoder 200 and the video decoder 300 can be configured to use quadtree segmentation, QTBT segmentation or other segmentation structures according to HEVC. For illustrative purposes, a description of the technology of the present disclosure is given for QTBT segmentation. However, it should be understood that the technology of the present disclosure can also be applied to video encoders configured to use quadtree segmentation or other types of segmentation.
[0052] Blocks (e.g., CTUs or CUs) can be grouped in a picture in various ways. As an example, a block may refer to a rectangular area of a CTU row within a particular tile in a picture. A tile may be a rectangular area of a CTU within a particular tile column and a particular tile row in a picture. A tile column refers to a rectangular area of a CTU whose height is equal to the picture height and whose width is specified by a syntax element (e.g., such as in a picture parameter set). A tile row refers to a rectangular area of a CTU having a height specified by a syntax element (e.g., such as in a picture parameter set) and a width equal to the picture width.
[0053] This disclosure may use "N×N" and "N by N" interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in terms of vertical and horizontal dimensions, for example, 16×16 samples or 16 by 16 samples. In general, a 16×16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may contain N×M samples, where M is not necessarily equal to N.
[0054] The video encoder 200 encodes the video data of the CU representing the prediction and / or residual information and other information. The prediction information indicates how the CU will be predicted in order to form a prediction block for the CU. The residual information generally represents the sample-by-sample difference between the samples of the CU before encoding and the prediction block.
[0055] In order to predict a CU, the video encoder 200 can generally form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction generally refers to predicting a CU from data of a previously encoded picture, while intra-frame prediction generally refers to predicting a CU from previously encoded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate a prediction block. The video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. The video encoder 200 can use the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean square difference (MSD), or other such difference calculations to calculate a difference metric to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional prediction or bidirectional prediction to predict the current CU.
[0056] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion, such as enlargement or reduction, rotation, perspective motion, or other irregular motion types.
[0057] In order to perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including modes of various directions as well as plane modes and DC modes. In general, the video encoder 200 selects an intra prediction mode that describes neighboring samples of a current block (e.g., a block of a CU) to predict samples of the current block from it. Assuming that the video encoder 200 encodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples can generally be above, on the left, or on the left of the current block in the same picture as the current block.
[0058] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction mode, the video encoder 200 can encode data indicating which of various available inter-frame prediction modes is used and motion information of the corresponding mode. For unidirectional or bidirectional inter-frame prediction, for example, the video encoder 200 can encode the motion vector using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 can use a similar mode to encode the motion vector of the affine motion compensation mode.
[0059] After prediction (such as intra-frame prediction or inter-frame prediction of a block), the video encoder 200 can calculate residual data for the block. The residual data (such as a residual block) represents the sample-by-sample difference between the block and the predicted block formed by the block using the corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to generate transform data in a transform domain rather than a sample domain. For example, the video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 can apply a secondary transform after a primary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after applying one or more transforms.
[0060] As described above, after performing any transforms to produce transform coefficients, the video encoder 200 can perform quantization on the transform coefficients. Quantization generally refers to the process of quantizing the transform coefficients to possibly reduce the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all of the coefficients. For example, the video encoder 200 can round an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bitwise right shift on the value to be quantized.
[0061] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place coefficients with higher energy (and therefore lower frequency) in front of the vector and transform coefficients with lower energy (and therefore higher frequency) in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector, for example, according to context adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy encode values for syntax elements that describe metadata associated with the encoded video data used by the video decoder 300 in decoding the video data.
[0062] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. For example, the context may relate to whether the neighboring values of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.
[0063] The video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, to the video decoder 300, for example, in a picture header, a block header, a slice header, or generate other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS). The video decoder 300 may similarly decode such syntax data to determine how to decode the corresponding video data.
[0064] In this way, the video encoder 200 can generate a bitstream including encoded video data, for example, syntax elements describing the partitioning of a picture into blocks (eg, CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0065] In general, the video decoder 300 performs the reverse process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC to decode the values of the syntax elements of the bitstream in a manner substantially similar to (although reversed from) the CABAC encoding process of the video encoder 200. The syntax elements can define partitioning information of the picture into CTUs, and partition each CTU according to a corresponding partitioning structure such as a QTBT structure to define CUs of the CTU. The syntax elements can further define prediction and residual information for a block (e.g., CU) of video data.
[0066] For example, the residual information may be represented by a quantized transform coefficient. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processes (such as performing a deblocking process) to reduce visual artifacts along block boundaries.
[0067] According to the technology of the present disclosure, the video encoder 200 and the video decoder 300 can be configured to determine a motion vector of a current video data block encoded using bidirectional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for bidirectional prediction of the current block, and apply a motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process.
[0068] The present disclosure may generally refer to "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to the communication of values of syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal the values of syntax elements in the bitstream. Generally, signaling refers to generating values in the bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 in substantially real time or in non-real time, such as may occur when storing syntax elements to the storage device 112 for later retrieval by the destination device 116.
[0069] Figure 2 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Figure 2For purposes of explanation, the present disclosure describes the video encoder 200 in the context of video coding standards such as the HEVC video coding standard and the developing H.266 video coding standard. However, the techniques of the present disclosure are not limited to these video coding standards and are generally applicable to video encoding and decoding.
[0070] exist Figure 2 In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or processing circuits. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.
[0071] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data from, for example, the video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB218 can act as a reference picture memory that stores reference video data for use when video encoder 200 predicts subsequent video data. Video data memory 230 and DPB 218 can be formed by any of a variety of storage devices such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM) or other types of storage devices). Video data memory 230 and DPB 218 can be provided by the same storage device or a separate storage device. In various examples, video data memory 230 can be on the chip with other components of video encoder 200, as shown, or off-chip relative to those components.
[0072] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory inside the video encoder 200, unless explicitly described as such, or should not be interpreted as limited to memory outside the video data memory 200, unless explicitly described as such. Instead, references to the video data memory 230 should be understood to refer to a memory that stores video data received by the video encoder 200 for encoding (e.g., video data of a current block to be encoded). Figure 1 Memory 106 also provides temporary storage for outputs from the various units of video encoder 200 .
[0073] Figure 2 Various units are described to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functions and are preset on the operations that they can perform. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality in the operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (for example, to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more units may be different circuit blocks (fixed function or programmable), and in some examples, one or more units may be integrated circuits.
[0074] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store object code for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0075] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve a picture of video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be original video data to be encoded.
[0076] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0077] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters may include partitioning of a CTU into CUs, a prediction mode of a CU, a transform type of residual data of a CU, a quantization parameter of residual data of a CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than other tested combinations.
[0078] The video encoder 200 may divide the picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may divide the CTUs of the picture according to a tree structure such as the QTBT structure described above or the quadtree structure of HEVC. As described above, the video encoder 200 may form one or more CUs by dividing the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".
[0079] Typically, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TU). For inter prediction of the current block, the motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously encoded pictures stored in the DPB 218). In particular, the motion estimation unit 222 may calculate values indicating how similar the potential reference blocks are to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 may typically perform these calculations using the sample-by-sample differences between the current block and the reference block under consideration. The motion estimation unit 222 may identify the reference block having the lowest value resulting from these calculations, which indicates the reference block that most closely matches the current block.
[0080] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction (prediction of bidirectional prediction), the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vector has fractional sampling accuracy, the motion compensation unit 224 may interpolate the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors, for example, by sample-by-sample averaging or weighted averaging, and combine the retrieved data.
[0081] According to the techniques of the present disclosure, which will be described in more detail below, the motion compensation unit 224 can be configured to encode a block of video data using a prediction of bidirectional prediction. As described above, the prediction of bidirectional prediction can use two motion vectors from two reference picture lists. In some examples, the motion compensation unit 224 may also apply a motion vector refinement process (e.g., DMVR) to one or more of the motion vectors used in the prediction of bidirectional prediction. Example DMVR techniques are discussed below and may include one or more of merged motion vector refinement, merged offset extension, bilateral template matching, parametric sub-pixel motion vector derivation, and bidirectional optical flow. The present disclosure describes techniques for determining when to use DMVR techniques (e.g., bilateral template matching) when encoding a block of video data using a prediction of bidirectional prediction.
[0082] In one example of the present disclosure, the motion compensation unit 224 may be configured to determine a motion vector of a current block of video data encoded using a prediction of a bidirectional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for the bidirectional prediction of the current block, and apply the motion vector refinement process to the motion vector based on the determination of using the motion vector refinement process. For example, when the weights of the predictions for the bidirectional prediction of the current block are not equal, the motion compensation unit 224 may determine to disable the motion vector refinement process. In other examples, the motion compensation unit 224 may be configured to determine a difference between prediction blocks identified by a motion vector, and determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for the bidirectional prediction of the current block and a determined difference between prediction blocks identified by the motion vector. For example, the motion compensation unit 224 may be configured to determine to disable the motion vector refinement process if the difference between the prediction blocks identified by the motion vector is less than a threshold.
[0083] As another example, for intra prediction or intra prediction encoding, the intra prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values of the adjacent samples and fill these calculated values across the current block in a defined direction to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average of the adjacent samples to the current block and generate a prediction block to include the resulting average for each sample of the prediction block.
[0084] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0085] In the example where the mode selection unit 202 partitions the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As described above, the size of the CU may refer to the size of the luma coding block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support PU sizes of 2N×2N or N×N for intra-frame prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N or the like for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.
[0086] In an example where the mode selection unit does not further split the CU into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As described above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2N×2N, 2N×N, or N×2N.
[0087] For other video coding techniques, such as intra-block copy mode coding, affine mode coding, and linear model (LM) mode coding as a few examples, the mode selection unit 202 generates a prediction block for the current block being encoded via various units associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 may not generate a prediction block, but instead generate a syntax element that indicates how to reconstruct the block based on the selected palette. In such a mode, the mode selection unit 202 can provide these syntax elements to the entropy coding unit 220 for encoding.
[0088] As described above, the residual generation unit 204 receives video data of a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0089] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 may apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 may perform multiple transforms on the residual block, such as a primary transform and a secondary transform such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.
[0090] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the precision of the quantized transform coefficients may be lower than the precision of the original transform coefficients produced by the transform processing unit 206.
[0091] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although it may have a certain degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the prediction block generated by the mode selection unit 202 to generate a reconstructed block.
[0092] Filter unit 216 may perform one or more filter operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of the CU. In some examples, the operations of filter unit 216 may be skipped.
[0093] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks in the DPB 218. In examples where the operation of the filter unit 216 is required, the filter unit 216 can store the filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture from the DPB 218, which is formed by the reconstructed (and possibly filtered) blocks, to perform inter-frame prediction on subsequently encoded blocks. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks in the DPB 218 of the current picture to perform intra-frame prediction on other blocks in the current picture.
[0094] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode the quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter-frame prediction or intra-mode information for intra-frame prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-encoded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable to variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential Golomb coding operation, or another type of entropy coding operation on the data. In some examples, the entropy coding unit 220 may operate in a bypass mode where the syntax elements are not entropy-encoded.
[0095] The video encoder 200 may output a bitstream including entropy encoding syntax elements required to reconstruct a block of a slice or picture. In particular, the entropy encoding unit 220 may output a bitstream.
[0096] The operations described above are for block descriptions. Such descriptions should be understood as operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are the luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are the luma and chroma components of a PU.
[0097] In some examples, the operations performed for the luma coding block do not need to be repeated for the chroma coding block. As an example, the operations of identifying the motion vector (MV) and reference picture for the luma coding block do not need to be repeated to identify the MV and reference picture for the chroma coding block. Instead, the MV for the luma coding block can be scaled to determine the MV for the chroma blocks, and the reference picture can be the same. As another example, the intra prediction process can be the same for the luma coding block and the chroma coding block.
[0098] The video encoder 200 represents an example of a device configured to encode video data, the device including a memory configured to store the video data, and one or more processing units implemented in circuits, the one or more processing units configured to determine a motion vector for a current block of the video, determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for a bi-directional prediction of the current block, and refine the motion vector based on the determination to use the motion vector refinement process.
[0099] Figure 3 1 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Figure 3 For the purpose of explanation, and not to limit the techniques widely illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes a video decoder 300 according to the techniques of JEM and HEVC. However, the techniques of this disclosure may be performed by a video encoding device configured for other video encoding standards.
[0100] exist Figure 3 In the example of , the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or processing circuits. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.
[0101] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units to perform predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0102] CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of video decoder 300. For example, the video bitstream may be obtained from computer readable medium 110 ( Figure 1 ) obtains video data stored in CPB memory 320. CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Moreover, CPB memory 320 may store video data other than syntax elements of encoded pictures, such as temporary data representing outputs from various units of video decoder 300. DPB 314 typically stores decoded pictures, which may be output by video decoder 300 and / or as reference video data when decoding subsequent data or pictures of the encoded video bitstream. CPB memory 320 and DPB 314 may be formed by any of a variety of storage devices such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of storage devices. CPB memory 320 and DPB 314 may be provided by the same storage device or a separate storage device. In various examples, CPB memory 320 may be on-chip with other components of video decoder 300, or off-chip relative to those components.
[0103] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) to retrieve the encoded video data. That is, memory 120 may store data as discussed above with respect to memory 320. Likewise, when some or all of the functionality of video decoder 300 is implemented in software to be performed by processing circuitry of video decoder 300, memory 120 may store instructions to be executed by video decoder 300.
[0104] Figure 3 The various units shown in FIG. 3 are described to help understand the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Figure 2Similarly, a fixed-function circuit refers to a circuit that provides specific functionality and is preset in the operations it can perform. A programmable circuit refers to a circuit that can be programmed to perform a variety of tasks and provides flexible functionality in the operations it can perform. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. A fixed-function circuit can execute software instructions (e.g., to receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more units may be different circuit blocks (fixed function or programmable), and in some examples, one or more units may be integrated circuits.
[0105] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on a programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0106] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0107] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where a block currently being reconstructed (ie, decoded) may be referred to as a "current block").
[0108] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information such as a quantization parameter (QP) and / or (one or more) transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a quantization degree, and likewise, determine an inverse quantization degree for application by the inverse quantization unit 306. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0109] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the coefficient block.
[0110] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax element can indicate a reference picture in DPB 314 from which the reference block is retrieved, and a motion vector that identifies the position of the reference block in the reference picture relative to the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in the same manner as described for motion compensation unit 224 ( Figure 2 ) is performed in a manner substantially similar to that described herein.
[0111] In accordance with the techniques of the present disclosure, which will be described in more detail below, the motion compensation unit 316 may be configured to decode a block of video data using a prediction for bidirectional prediction. As described above, the prediction for bidirectional prediction may use two motion vectors from two reference picture lists. In some examples, the motion compensation unit 316 may also apply a motion vector refinement process (e.g., DMVR) to one or more of the motion vectors used in the prediction for bidirectional prediction. Example DMVR techniques are discussed below and may include one or more of merged motion vector refinement, merged offset extension, bilateral template matching, parametric sub-pixel motion vector derivation, and bidirectional optical flow. The present disclosure describes techniques for determining when to use DMVR techniques (e.g., bilateral template matching) when decoding a block of video data using a prediction for bidirectional prediction.
[0112] In one example of the present disclosure, the motion compensation unit 316 may be configured to determine a motion vector of a current block of video data encoded using bidirectional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for the bidirectional prediction of the current block, and apply the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process. For example, when the weights for the bidirectional prediction of the current block are unequal, the motion compensation unit 316 may determine to disable the motion vector refinement process. In other examples, the motion compensation unit 316 may be configured to determine a difference between prediction blocks identified by the motion vector, and determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for the bidirectional prediction of the current block and a determined difference between prediction blocks identified by the motion vector. For example, the motion compensation unit 316 may be configured to determine to disable the motion vector refinement process if the difference between the prediction blocks identified by the motion vector is less than a threshold.
[0113] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 may generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 may generally generate a prediction block in the same manner as described with respect to the intra-prediction unit 226 ( Figure 2 ) The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.
[0114] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.
[0115] The filter unit 312 may perform one or more filter operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 may not necessarily be performed in all examples.
[0116] The video decoder 300 may store the reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide reference information (e.g., samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation) to the prediction processing unit 304. In addition, the video decoder 300 may output decoded pictures from the DPB for subsequent display on a display device such as a Figure 1 The image is presented on a display device 118).
[0117] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data, and one or more processing units implemented in circuits that are configured to determine a motion vector for a current block of video data encoded using prediction of bidirectional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of the prediction of the bidirectional prediction for the current block, and apply a motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process.
[0118] In the following sections, HEVC and JEM techniques relevant to the present disclosure and ongoing work in Versatile Video Coding (VVC) are described.
[0119] CU structure and motion vector prediction in HEVC
[0120] In HEVC, the largest coding unit in a slice is called a coding tree block (CTB) or coding tree unit (CTU). A CTB contains a quadtree whose nodes are coding units.
[0121] In the HEVC Main profile, the size of the CTB can be from 16×16 to 64×64 (although technically, 8×8 CTB size is supported). The size of the coding unit (CU) can be the same as the size of the CTB, or as small as 8×8. Each coding unit can be coded in one mode. When the CU is inter-coded, the CU can be further split into 2 or 4 prediction units (PUs), or when no further splitting is applied, the CU becomes just one PU. When there are two PUs in a CU, the two PUs can be rectangles of half the size, or two rectangles of 1 / 4 or 3 / 4 of the size of the CU respectively.
[0122] When a CU is inter-coded, there is a set of motion information for each PU. In addition, each PU is encoded using a unique inter-prediction mode to derive a set of motion information.
[0123] Motion Vector Prediction
[0124] In the HEVC standard, for a prediction unit (PU), there are two inter-frame prediction modes, namely merge (skipping is considered a special case of no residual merge) and advanced motion vector prediction (AMVP) mode. In AMVP or merge mode, the video encoder 200 and the video decoder 300 can build and maintain motion vector (MV) candidate lists of multiple motion vector predictors. The video encoder 200 and the video decoder 300 can generate (multiple) motion vectors of the current PU and the reference index in merge mode by obtaining the motion information of a candidate from the MV candidate list.
[0125] In HEVC, the MV candidate list includes up to 5 candidates for merge mode and only two candidates for AMVP mode. The merge candidate may contain a set of motion information, for example, a motion vector corresponding to both a reference picture list (list 0 and list 1) and a reference index. If the merge candidate is identified by the merge index, the video encoder 200 and the video decoder 300 are configured to use the reference picture for prediction of the current block. In addition, the video encoder 200 and the video decoder 300 are configured to determine the motion vector associated with the merge index. However, in AMVP mode, for each potential prediction direction from list 0 or list 1, since the AMVP candidate only contains motion vectors, the reference index can be explicitly signaled together with the MV predictor (MVP) index to the MV candidate list. In AMVP mode, the predicted motion vector can be further refined.
[0126] As seen above, the merge candidate corresponds to a complete set of motion information, while the AMVP candidate contains only one motion vector for a specific prediction direction and reference index. Candidates for both modes are similarly derived from the same spatial and temporal neighboring blocks.
[0127] Spatial neighbor candidates
[0128] In HEVC, for a specific PU (PU 0 ), the video encoder 200 and the video decoder 300 may derive spatial MV candidates from neighboring blocks, such as Figure 4A and Figure 4B As shown, although the technique for generating candidates from blocks is different for merge and AMVP modes.
[0129] Figure 4A is a conceptual diagram illustrating spatial neighboring candidates of a block 500 for a merge mode. Figure 4B 5 is a conceptual diagram showing spatial neighboring candidates for block 502 in AMVP mode. In merge mode, the video encoder 200 and the video decoder 300 may Figure 4A The order shown derives up to four spatial MV candidates. The order is as follows: left block (0, A1), upper block (1, B1), upper right block (2, B0), lower left block (3, A0), and upper right block (4, B2).
[0130] In AMVP mode, the video encoder 200 and the video decoder 300 may divide neighboring blocks into two groups: the left group includes blocks 0 and 1, and the upper group includes blocks 2, 3, and 4. Figure 4B As shown. For each group, potential candidates in neighboring blocks that refer to the same reference picture as the reference picture indicated by the signaled reference index have the highest priority to be selected to form the final candidate for the group. It is possible that all neighboring blocks do not contain motion vectors pointing to the same reference picture. Therefore, if such a candidate cannot be found, the video encoder 200 and the video decoder 300 can scale the first available candidate to form the final candidate. Therefore, it is possible to compensate for the temporal distance difference.
[0131] Temporal Motion Vector Prediction in HEVC
[0132] Temporal motion vector prediction in HEVC will now be discussed. The video encoder 200 and the video decoder 300 may be configured to add a temporal motion vector predictor (TMVP) candidate (if enabled and available) to the MV candidate list after the spatial motion vector candidate. The motion vector derivation process for the TMVP candidate is the same for merge and AMVP modes. However, in HEVC, the target reference index of the TMVP candidate in merge mode is set to 0.
[0133] Figure 5A An example TMVP candidate for block 604 (PU0) is shown, and Figure 5BThe motion vector scaling process 606 is shown. The primary block position for TMVP candidate derivation is the lower right block outside the collocated PU. The candidate is shown in Figure 5A ” is shown as block “T” in . The position of block T is used to compensate for the deviation of the upper and left blocks used to generate spatial neighboring candidates. However, if the block is located outside the current CTB row or motion information is not available, the block will be replaced by the center block of the PU.
[0134] The motion vector of the TMVP candidate is derived from the collocated PU of the collocated picture indicated in the slice level. The motion vector located at the collocated PU is called the collocated MV. Similar to the temporal direct mode in AVC, in order to derive the TMVP candidate motion vector, the collocated MV can be scaled to compensate for the temporal distance difference, such as Figure 5B shown.
[0135] Merge Motion Vector Refinement
[0136] S. Jeong et al., “CE4 Ultimate Motion Vector Expression (Test 4.5.4), Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11,12 th Meeting, Macao, CN, 3-12, October 2018, JVET-L0054, Merge Motion Vector Refinement (MMVR, aka Ultimate Motion Vector Expression, UMVE)" proposes a technique to refine the motion vector of a merge candidate based on the signaled motion vector difference. UMVE provides an alternative motion vector expression with simplified signaling, including the starting point, motion magnitude, and motion direction. The merge motion can be used in a cross-shaped pattern centered at the position pointed to by the unrefined merge motion vector. Fig. 6A and Figure 6B In addition, the MV offset (eg, the refined MV minus the original MV) pointing to the reference picture in list L0 is scaled to the reference picture in list L1.
[0137] Fig. 6A is a conceptual diagram illustrating an example UMVE search process. Fig. 6AAs shown, the motion vector 708 of the current block 706 in the current frame 702 can be modified in terms of both the magnitude of the motion and the direction of the motion. Different changes in the magnitude of the motion and the direction of the motion can produce different motion vectors (e.g., motion vector 710 or motion vector 712). The motion vectors 710 and 712 can be referred to as merge candidates (in this case, motion vector 708) with a UMVE (or simply UMVE candidates). That is, the motion vectors 710 and 712 are created by changing the motion vector 708 with the UMVE.
[0138] The motion vector 708 may also have different prediction directions. The prediction direction information indicates the prediction direction in L0 (frame 700), L1 (frame 704), L0 and L1 prediction. For B slices, using the proposed UMVE technique, the video encoder 200 and the video decoder 300 can generate dual prediction candidates from merge candidates with single prediction by using a mirroring technique, such as Fig. 6A and Figure 6B shown. Figure 6B is a conceptual diagram illustrating an example UMVE search point. For example, if the merge candidate is a uni-prediction candidate with reference list L1, the video encoder 200 and the video decoder 300 may determine the reference index of reference list L0 by searching the reference picture in list 0, which is mirrored with the reference picture of list 1. If there is no corresponding picture, the video encoder 200 and the video decoder 300 use the reference picture closest to the current picture. The video encoder 200 and the video decoder 300 may derive the motion vector of L0 (frame 700) by scaling the motion vector of L1 (frame 704). The video encoder 200 and the video decoder 300 may calculate the scaling factor using the picture order count (POC) distance.
[0139] Merge offset extension
[0140] X. Chen et al., “CE 4: Merge Offset Extension (Test 4.4.8), Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11,12 th Meeting, Macao, CN, 3-12, October 2018, JVET-L0176" describes a technique for constructing a new extended MV offset candidate based only on the first candidate in the merge candidate list. The new extended MV offset candidate only includes the MV offset of the current MV of the first candidate. The other prediction information is the same as the first candidate. The newly added candidate is pushed into the merge candidate list after the temporal candidate. The supported motion vector offsets are Figure 7, including a point 802 having an offset (0 or ±1, 0 or ±1) relative to the current sample 800 and a point 804 having an offset (0 or ±2, 0 or ±2) relative to the current sample 800.
[0141] For bidirectional prediction of one MV (e.g., MV0) of a reference picture from the past (e.g., list 0) and another (e.g., MV1) of a reference picture from the future (e.g., list 1), the video encoder 200 and the video decoder 300 may add the selected MV offset to the first candidate MV0 and add the inverse MV offset to the first candidate MV1. Other bidirectional prediction cases include adding the same MV offset to the first candidate MV0 and MV1, respectively.
[0142] History-based Motion Vector Prediction
[0143] History-based motion vector prediction (HMVP) (e.g., as described in L. Zhang et al., “CE4-related: History-based Motion Vector Prediction,” Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 11th Meeting, Ljubljana, SI, 10-18, July 2018 [JVET-K0104]) is a history-based technique that allows each block to find its MV predictor from a list of past decoded MVs in addition to those in the directly adjacent causal neighboring motion fields. A table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is cleared when a new slice is encountered. Whenever there is an inter-coded block, the related motion information is inserted into the table as a new HMVP candidate in a first-in-first-out (FIFO) manner. Then, a constrained FIFO rule can be applied. When inserting an HMVP into the table, a redundancy check is first applied to find if the same HMVP exists in the table. If the same HMVP is found, that specific HMVP is removed from the table, and then all HMVP candidates are removed.
[0144] HMVP candidates can also be used in the merge candidate list construction process. All HMVP candidates from the last entry to the first entry in the table are inserted after the TMVP candidate. Pruning is applied to HMVP candidates. Once the total number of available merge candidates reaches the maximum allowed merge candidate number signaled, the merge candidate list construction process terminates.
[0145] Similarly, HMVP candidates can also be used in the AMVP candidate list construction process. The motion vectors of the last K HMVP candidates in the table are inserted after the TMVP candidates. Only HMVP candidates with the same reference picture as the AMVP target reference picture are used to construct the AMVP candidate list. Pruning is applied to HMVP candidates.
[0146] Other aspects of motion prediction in HEVC
[0147] Several aspects of the merger and AMVP model are worth mentioning as follows.
[0148] Motion vector scaling: Assume that the value of a motion vector is proportional to the distance between pictures in presentation time. A motion vector relates two pictures, a reference picture and a picture containing the motion vector (i.e., the containing picture). When a motion vector is used to predict another motion vector, the distance between the containing picture and the reference picture can be calculated based on the picture order count (POC) value.
[0149] For a motion vector to be predicted, its associated containing picture and reference picture may be different. Therefore, a new distance (based on POC) can be calculated. And the motion vector can be scaled based on these two POC distances. For spatial neighboring candidates, the containing pictures for the two motion vectors are the same, while the reference pictures may be different. In HEVC, motion vector scaling applies to both spatial and temporal neighboring candidates for TMVP and AMVP.
[0150] Artificial motion vector candidate generation: If the motion vector candidate list is incomplete (eg, has fewer candidates than a predetermined maximum), artificial motion vector candidates are generated and inserted at the end of the list until the list is full.
[0151] In merge mode, there are two types of artificial MV candidates: combined candidates derived only for B slices and zero candidates used only for AMVP if the first type does not provide enough artificial candidates.
[0152] For each pair of candidates that are already in the candidate lists and have the necessary motion information, a bidirectional combined motion vector candidate is derived by combining the motion vector of the first candidate of the picture in reference list 0 with the motion vector of the second candidate of the picture in reference list 1.
[0153] Pruning process for candidate insertion: Candidates from different blocks may happen to be the same, which reduces the efficiency of merging / AMVP candidate lists. A pruning process can be applied to solve this problem. The pruning process compares one candidate in the current candidate list with other candidates to avoid inserting the same candidate to a certain extent. To reduce complexity, only a limited number of pruning processes are applied instead of comparing each potential candidate with all other existing candidates.
[0154] Bilateral template matching
[0155] Figure 8 900 is a conceptual diagram illustrating bilateral template matching. Bilateral matching is a variant of the decoder-side motion vector refinement (DMVR) technique that is used to avoid the template-based refinement process. Bilateral template matching of the current block 900 includes directly calculating the initial bidirectional prediction MV (e.g., Figure 8 v 0 and v 1 ) points to the bilateral matching cost (denoted as I 0 (x+v 0 ) and I 1 (x+v 1 ), x is the pixel in the current block 900).
[0156] The video encoder 200 and the video decoder 300 may perform a local search based on bilateral matching within a predefined search range around an initial bidirectional prediction MV. Specifically, assuming that the initial MV is v 0 (0) and v 1 (0) , in the first search iteration, several MV pairs (such as v 0 (0) +Δ and v 1 (0) -Δ, where Δ∈{(0,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1),(-1,0) etc.}) is tested to determine the best value of Δ* that results in the lowest bilateral matching cost. In the present disclosure, the cost function is defined as I 0 (x+v 0 (0) +Δ) and I 1 (x+v 1 (0) -Δ) plus the motion cost. The distortion function can be the mean removed sum of absolute differences (MRSAD) or the sum of absolute differences (SAD). Figure 8 Example search blocks 906 and 908 are shown as indicated by one of the MV pairs being tested in a first search iteration.
[0157] After finding the optimal Δ*, the iterative process performed by the video encoder 200 and the video decoder 300 updates the initial MV (v 0 (0) and v 1 (0) ) value. Specifically, v 0(1) =v 0 (0) +Δ* and v 1 (1) =v 1 (0) -Δ*). Then, after advancing all the superscripts in the above description by 1, the same iterative process is repeated until Δ* equals (0,0). The output MV pair (denoted as v 0 (n) and v 1 (n) ,n≥1) can then be refined again with sub-pixel accuracy. The resulting MV pair is then used to replace the original MV of the merged block (v 0 (0) and v 1 (0) ). Motion compensation is then performed based on the refined MV.
[0158] Parametric sub-pixel motion vector derivation
[0159] In "Decoder Side MV Refinement / Derivation with CTB-level concurrency and other normative complexity reduction techniques, Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 11th Meeting, Ljubljana, SI, 10-18, July 2018, JVET-K0041" by S. Sethurman et al., a quadratic parameter function is used to form a prediction error surface for each possible fractional pixel MV. Basically, the quadratic parameter function is an interpolation function that interpolates the value of the prediction error as an estimator. Based on the accurate prediction error value of the integer search, the parameters of the quadratic parameter function are derived, so that the best motion sampling position for this error search can be found. Then, the original MV is adjusted to this accurate motion sampling position instead of actually performing sub-pixel motion vector estimation. The parameter function forms an error surface with reference to the cost values of the five points, and finds the best position with the lowest cost value on this surface. These five points form a cross, with a gap of 2 pixels between each two adjacent points, where the center / left / right / upper / lower point coordinates are (0,0) / (-1,0) / (1,0) / (0,-1) / (0,1). The parametric error surface function is a two-dimensional parabolic error surface equation:
[0160] E x,y =A(x-Δx)2 +B(y-Δy) 2 +C,
[0161] Among them, (Δx, Δy) corresponds to the location with the lowest cost, and C corresponds to the location with the smallest cost value. By solving the 5 equations in the 5 unknowns (Δx, Δy), the calculation is as follows:
[0162] Δx=floor((α(E -1,0 –E 1,0 )) / (2(E -1,0 +E 1,0 –2E 0,0 ))),
[0163] Δy=floor((α(E 0,-1 –E 0,1 )) / (2(E 0,-1 +E 0,1 –2E 0,0 ))),
[0164] Where α is an integer scaling factor used to represent (Δx, Δy) in some sub-pixel precision, for example, 16 represents 1 / 16 precision and 4 represents 1 / 4 precision.
[0165] Motion vector prediction using motion vectors derived at the decoder side
[0166] Although decoder-side motion vector derivation (DMVD) is effective in reducing motion overhead, existing DMVD designs (such as DMVR) may encounter decoding delay issues due to the interdependencies between the encodings of spatially neighboring CUs. If the MV of a CU is predicted from its spatial neighbors encoded using DMVR, the decoding process must wait until the refined MVs of neighboring CUs become available. During the development of the versatile video coding standard, several techniques were studied that could enable low-latency designs for certain decoder-side MV derivation (DMVD) methods. Some of these techniques are described in detail below.
[0167] There is no spatial MV prediction from the immediately preceding DMVD block
[0168] For a block encoded by using the DMVD technique, the decoding process can be explained in three steps:
[0169] 1. Reconstruction of the initial motion field and pre-fetching of reference blocks;
[0170] 2. The refinement process of the block motion to obtain the final MV; and
[0171] 3. Use the final MV for motion compensation.
[0172] After the refinement process in step 2, the final MV is written back to the picture motion field, so the refined MV can be used for spatial MV prediction, temporal MV prediction and boundary strength calculation. Fig. 9 A certain implementation of the pipeline stages of a DMVD technique such as DMVR is shown. Fig. 9 In FIG. 1 , the three main modules reconstruction and pre-fetching 1000, MV refinement 1002, and motion compensation 1004 represent the three decoding steps of the DMVD technique. Modules 1000, 1002, and 1004 may be part of the motion compensation unit 316 of the video decoder 300 (see FIG. 1 ). Figure 3 ). As shown in Figure 9, at time T0, CU0 with original motion vector V0 is reconstructed and pre-fetched. At time T1, the original motion vector V0 is refined to create a refined motion vector V0. At time T3, the refined motion vector V0 is used for reconstruction and pre-fetching of CU1. Also at time T3, motion compensation is performed on CU0 using the refined motion vector V0. This cascade process will continue for future CUs.
[0173] Generally speaking, CU prev Is in the current CU (CU cur ) before the previously encoded CU. cur If the MV predictor comes from CU prev , while CU prev If it happens to be a DMVD coded block, the predictor is marked as unavailable for CUcur. cur The reconstruction of the initial MV no longer depends on the CU prev The refined MV can be optimized and the interdependence between MV refinement and MV prediction can be eliminated to some extent.
[0174] There is no spatial MV prediction from the DMVD block in the current frame
[0175] This technique does not use refined MVs, but uses the original MV of each DMVR CU to derive a spatial MV predictor. For temporal MV prediction, refined MVs can be used without decoding delay issues because the collocated pictures have been fully reconstructed. Accordingly, since the coding dependency between spatially adjacent CUs no longer exists, the decoding delay issue of DMVR can be completely resolved. However, a decrease in coding performance can be expected.
[0176] There is no spatial MV prediction from the DMVD block in the current CTU row
[0177] If these neighboring blocks fall into the same CTU row as the current block, the technique uses the unrefined MV as a reference from the direct neighboring blocks to perform spatial MV prediction. (Note that some other techniques may mark the MV predictor from such neighboring blocks as unavailable.) Instead, the refined MV is available for spatial MV prediction only when their associated blocks fall within the adjacent causal CTUs located immediately above and above the left CTU. Thus, the technique breaks the interdependency between MV refinement and spatial MV prediction within a CTU row.
[0178] Bidirectional Optical Flow in JEM
[0179] Bidirectional Optical Flow (BIO) is a pixel-by-pixel motion refinement that is performed on top of block-by-block motion compensation in the case of bidirectional prediction. Since BIO compensates for fine motion within a block, enabling BIO results in an increase in the block size for motion compensation. Sample-level motion refinement does not require exhaustive search or signaling, since there is an explicit equation that gives the fine motion vector for each sample. Fig.10 1100 is a conceptual diagram illustrating an optical flow trajectory 1100 .
[0180] I (k) is the luminance value of reference k (k=0,1) after compensating for block motion, and I (k) The horizontal and vertical components of the gradient. Assuming that the optical flow is valid, the motion vector field (v x ,v y ) is given by the following equation:
[0181]
[0182] The optical flow equation is combined with the Hermite interpolation of the motion trajectory of each sample, and finally a unique third-order polynomial is obtained, which is consistent with the function value I (k) and derivatives The value of this polynomial at t=0 is the BIO prediction:
[0183]
[0184] Here τ 0 and τ 1 represents the distance to the reference frame, such as Fig.10 As shown. POC calculation distance τ based on Ref0 and Ref1 0 and τ 1 :
[0185] τ 0 =POC(current)-POC(Ref0),τ 1=POC(Ref1)-POC(current). If both predictions are from the same time direction (both from the past or both from the future), then the signs are different. 0 ·τ 1 < 0. In this case, only when the predictions are not from the same moment (τ 0 ≠τ 1 ), both reference regions have non-zero motion:
[0186] (MVx 0 MVy 0 ,MVx 1 MVy 1 ≠0),
[0187] And the block motion vector is proportional to the temporal distance:
[0188] (MVx 0 / MVx 1 =MVy 0 / MVy 1 =-τ 0 / τ 1 ).
[0189] Motion vector field (v x ,v y ) is obtained by minimizing the points A and B ( Fig.10 The model uses only the first linear term of the local Taylor expansion of Δ:
[0190]
[0191] All values in equation (1) depend on the sample position (i′, j′), which has been omitted so far. Assuming that the motion is consistent in the local surrounding samples, Δ within a (2M+1)×(2M+1) square window Ω centered at the current prediction point (i, j) can be minimized as follows:
[0192]
[0193] For this optimization problem, a simplified solution can be used of first minimizing in the vertical direction and then minimizing in the horizontal direction, which leads to:
[0194]
[0195]
[0196] in,
[0197]
[0198]
[0199]
[0200] In order to avoid division by zero or by a very small value, regularization parameters r and m can be introduced in equations (2) and (3), for example as follows:
[0201] r=500·4 d-8 (8)
[0202] m=700·4 d-8 (9)
[0203] Here d is the internal bit depth of the input video.
[0204] In some cases, the MV blob of BIO may be unreliable due to noise or irregular motion. Therefore, in BIO, the size of the MV blob is clipped to a certain threshold thBIO. The threshold is determined based on whether all the reference images of the current image are from one direction. If all the reference images of the current image are from one direction, the threshold is set to 12×2 14-d ; Otherwise, the threshold is set to 12×2 13-d .
[0205] The gradient of the BIO is calculated simultaneously with the motion compensated interpolation, using an operation consistent with the HEVC motion compensation process (2D separable FIR). The input to this 2D separable FIR is the same reference frame samples as the motion compensation process and the fractional positions (fracX, fracY) according to the fractional part of the block motion vector. In the case of horizontal gradients, the BIOfilterS is first used to interpolate vertically. signal, this BIOfilterS corresponds to the fractional position fracY with a descaling displacement of d-8; then the gradient filter BIOfilterG is applied in the horizontal direction, corresponding to the fractional position fracX with a descaling displacement of 18-d. In the case of , a first gradient filter is applied vertically using BIOfilterG, which corresponds to fractional position fracY with a descaling displacement of d-8; then a signal shift is performed in the horizontal direction using BIOfilterS, which corresponds to fractional position fracX with a descaling displacement of 18-d. The length of the interpolation filters for the gradient calculation BIOfilterG and the signal shift BIOfilterF is short (6 taps) to keep the implementation complexity low while achieving the desired bit rate and / or distortion.
[0206] Fig.11is a conceptual diagram illustrating bidirectional optical flow (BIO) of an 8x4 current block 1200. Fig.11 In particular, an example of gradient calculation for the current block 1200 is shown. For an 8x4 current block 1200, the video encoder obtains the motion compensated predictor and calculates the HOR / VER gradients of all pixels within the current block and the two outer rows of pixels. This is because solving vx and vy for each pixel requires the HOR / VER gradient value and the motion compensated prediction value of the pixels within the window Ω centered on each pixel, as shown in equation (4). In JEM, the size of this window is set to 5x5. Therefore, the video encoder obtains the motion compensated predictor and calculates the gradients of the two outer rows of pixels.
[0207] In JEM, BIO is applied to all bidirectional prediction blocks when the two predictions come from different reference pictures. BIO is disabled when LIC is enabled for a CU.
[0208] Generalized Bidirectional Prediction (GBi)
[0209] GBi was proposed by C. Chen (“Generalized bi-prediction for inter coding,” Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SG 29 / WG 11,3 rd Meeting: Geneva, CH, 26 May–1 June 2016, JVET-C0047. In Y.Su, et.al., “CE4.4.1: Generalized bi-prediction for inter coding,” Joint Video Experts Team (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 11th Meeting, Ljubljana, SI, 10-18, July 2018, JVET-K0248), the proposal improves the gain-complexity tradeoff of GBi and is adopted by VVC's Benchmark Set 2.1 (BMS2.1). BMS2.1 GBi applies unequal weights to predictors from L0 and L1 in bidirectional prediction mode. In inter prediction mode, multiple weight pairs, including equal weight pairs (1 / 2, 1 / 2), are evaluated based on rate distortion optimization (RDO), and the GBi index of the selected weight pair is signaled to the video decoder 300. In merge mode, the GBi index is inherited from the neighboring CU. In BMS2.1 GBi, the predictor generation in bidirectional prediction mode is as follows.
[0210] P GBi =(w 0 *P L0 +w 1 *P L1 +RoundingOffset GBi )>>shiftNum GBi , (10)
[0211] Where P GBi is the final predictor of GBi. Weights w0 and w1 are the selected pair of GBi weights applied to the predictors of list 0 (L0) and list 1 (L1), respectively. RoundingOffset GBi and shiftNum GBi Used to normalize the final predictor in GBi. The supported w1 weight sets are {-1 / 4, 3 / 8, 1 / 2, 5 / 8, 5 / 4}, where the five weights correspond to one equal weight pair and four unequal weight pairs. The hybrid gain, which is the sum of w1 and w0, is fixed to 1.0. Therefore, the corresponding w0 weight set is {5 / 4, 5 / 8, 1 / 2, 3 / 8, -1 / 4}. The weight pairs are selected at the CU level.
[0212] For non-low-latency images, the weight set size is reduced from 5 to 3, where the w1 weight set is {3 / 8, 1 / 2, 5 / 8} and the w0 weight set is {5 / 8, 1 / 2, 3 / 8}. The weight set size reduction for non-low-latency images is applied to all GBi tests in BMS2.1 GBi and JVET-K0248.
[0213] This disclosure describes the following techniques for decoder-side motion vector refinement.
[0214] 1.1 Constrained decoder-side motion vector refinement
[0215] The present disclosure proposes that if the two weights for bidirectional prediction are not equal, the decoder side motion refinement is disabled. That is, for the bidirectional prediction block of video data encoded using two motion vectors, the video encoder 200 and the video decoder 300 can be configured to determine whether the weights for bidirectional prediction are equal. The video encoder 200 and the video decoder 300 can determine the weights to be used for bidirectional prediction. If the weights are not equal, the video encoder 200 and the video decoder 300 may not apply (e.g., disable) a motion vector refinement process (e.g., bilateral template matching) to the motion vectors for the prediction of bidirectional prediction. That is, the video encoder 200 and the video decoder 300 can encode the video data block using the prediction of bidirectional prediction without motion vector refinement. If the weights are equal, the video encoder 200 and the video decoder 300 can apply (e.g., enable) a motion vector refinement process (e.g., bilateral template matching) to the motion vectors for bidirectional prediction. That is, the video encoder 200 and the video decoder 300 can encode the video data block using bidirectional prediction.
[0216] For example, if GBi is applied as a prediction for bidirectional prediction and weights w0 and w1 are not equal, the video encoder 200 and the video decoder 300 may disable the decoder-side motion vector refinement process. In another example, if a prediction for weighted bidirectional prediction is used to encode the current block and weights w0 and w1 are not equal, the video encoder 200 and the video decoder 300 may disable the decoder-side motion vector refinement process. In the above examples, bilateral template matching may be used as a motion vector refinement (e.g., DMVR) process. However, the techniques of the present disclosure may be used with any motion vector refinement process.
[0217] Therefore, in one example of the present disclosure, the video encoder 200 and the video decoder 300 may be configured to determine a motion vector of a current block of video data encoded using a prediction of bidirectional prediction, determine to use a motion vector refinement process for the motion vector based on a weight for the bidirectional prediction prediction of the current block, and apply the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process. In one example, the weights for the bidirectional prediction of the current block are not equal. In this example, the video encoder 200 and the video decoder 300 may be configured to determine to disable the motion vector refinement process.
[0218] 1.2 Adaptive on / off of motion vector refinement at the decoder side
[0219] The techniques of Section 1.2 may be applied together with the techniques of Section 1.1 or may be applied independently. The two motion vectors (e.g., from List 0 and List 1) used for bidirectional prediction prediction of the current block point to two different blocks in one or more reference pictures. In another example of the present disclosure, if the difference between the two predicted blocks using the two original motion vectors (i.e., before any motion vector refinement) is less than a threshold, the video encoder 200 and the video decoder 300 may not apply (e.g., disable) a motion vector refinement process (e.g., DMVR) for the current coding block.
[0220] The video encoder 200 and the video decoder 300 may be configured to measure the "difference" between the prediction blocks using the sum of absolute differences (SAD) or the sum of squared errors (SSE) of the two prediction blocks. Of course, other techniques may be used. In some examples, the video encoder 200 and the video decoder 300 may use some simplification techniques to skip some samples in the prediction block to calculate the difference. For example, the video encoder 200 and the video decoder 300 may use samples of every other row of the prediction block to calculate the SAD / SSE of the prediction block.
[0221] The video encoder 200 and the video decoder 300 may determine a "threshold" for determining whether to apply motion vector refinement based on the number of samples in the prediction block and the bit depth of the samples. For example, the video encoder 200 and the video decoder 300 may calculate the threshold as: (N<<(BD–8))*W*H. W and H are the width and height of the block, respectively. BD is the bit depth of the sample. N is a predefined value, such as 1, 2, 4, 8, etc. N may also be signaled using high-level syntax. The operator << is a bitwise right shift.
[0222] In another technique, the video encoder 200 and the video decoder 300 may determine the threshold value based on the number of samples in the prediction block and the bit depth of the samples used to calculate the SAD / SSE. For example, if the SAD / SSE is calculated every other row, the threshold value is: (N<<(BD-8))*W*H / 2.
[0223] Therefore, in another example of the present disclosure, the video encoder 200 and the video decoder 300 may be configured to determine the difference between the prediction blocks identified by the motion vector. In order to determine the use of the motion vector refinement process on the motion vector based on the weights used for the bi-directional prediction prediction of the current block, the video encoder 200 and the video decoder 300 may be configured to determine the use of the motion vector refinement process on the motion vector based on the vector of weights used for the bi-directional prediction of the current block and the determined difference between the prediction blocks identified by the motion vector.
[0224] In another example, in order to determine whether to use a motion vector refinement process for a motion vector based on a weight for a bidirectional prediction prediction of a current block and a determined difference between a prediction block identified by a motion vector, the video encoder 200 and the video decoder 300 may be configured to determine to disable the motion vector refinement process if the difference between the prediction blocks identified by the motion vector is less than a threshold value.
[0225] In another example, to determine the difference between prediction blocks identified by motion vectors, the video encoder 200 and the video decoder 300 may be configured to determine the difference between prediction blocks identified by motion vectors using the sum of absolute differences between prediction blocks or the sum of square differences between prediction blocks.
[0226] In another example of the present disclosure, the video encoder 200 and the video decoder 300 may be configured to determine the threshold based on the number of samples in the prediction block and the bit depth of the samples in the prediction block.
[0227] 1.3 Motion Compensation with Bilateral Template Matching
[0228] In bilateral template matching, as described above, the video encoder 200 and the video decoder 300 obtain two prediction blocks. In the case of non-integer motion vectors, the video encoder 200 and the video decoder 300 obtain the prediction block by interpolation. In some examples where interpolation is required, such as in HEVC, the video encoder 200 and the video decoder 300 obtain the prediction block by first performing horizontal interpolation and then performing vertical interpolation. The output of the horizontal interpolation is the input of the vertical interpolation. The video encoder 200 and the video decoder 300 can perform interpolation by weighted averaging a certain number of samples, that is, multiplying the interpolation coefficients by the corresponding samples and then normalizing by dividing by the sum of the weights.
[0229] The intermediate data obtained after horizontal interpolation can be stored in a higher bit depth to reduce rounding errors. The internal bit depth used for encoding is bitDepthI, and the bit depth of the intermediate data obtained during interpolation (e.g., after horizontal interpolation) is bitDepthIF. In some examples, the video encoder 200 and the video decoder 300 shift the result of horizontal interpolation (the weighted sum of samples) to achieve an internal interpolation bit depth bitDepthIF. In some examples, the video encoder 200 and the video decoder 300 may apply some offsets before shifting. This shift value may be referred to as shift1. The result of vertical interpolation may also be shifted to achieve an internal bitDepth bitDepthI. This shift value may be referred to as shift2. The number of variables precIF is selected so that the sum of the weights is less than or equal to 2 to the power of precIF.
[0230] Technology 1
[0231] In the first technology of the present disclosure, the bit depth of the prediction block in bilateral template matching is fixed and is not necessarily the same as the internal bit depth of the video encoding. Then, the video encoder 200 and the video decoder 300 can determine the "threshold" described in Section 1.2 by the fixed bit depth of the prediction block. For example, the bit depth is 10, and the threshold is (1<<2)*W*H / 2, that is, 4*W*H / 2. Therefore, the threshold is independent of the internal bit depth used to encode the video. The video encoder 200 and the video decoder 300 can shift the result of the vertical interpolation to achieve an internal interpolation bit depth bitDepthIF instead of an internal bit depth bitDepthI.
[0232] In one example, the value shift1 is set to precIF-min(precIF,bitDepthIF-bitDepthI), and the value shift2 is set to precIF. If the number of shifts is greater than 0, the video encoder 200 and the video decoder 300 may apply an offset before right shifting. For shift1, if shift1 is greater than 0, the offset is 1<<(shift1-1). For shift2, if shift2 is greater than 0, the offset 1<<(shift2-1). If interpolation is not applied, that is, the motion vector is not a fraction, the video encoder 200 and the video decoder 300 may apply a shift to achieve the same intermediate bit depth and output bit depth. In one example, when bilinear interpolation is used, precIF is 4 and bitDepthIF is 10. The number shift1 is 4-min(4,10-bitDepthI), and shift2 is 4. If the x component of the motion vector is zero, ie, no horizontal interpolation is performed, shift2 is reset to precIF–min(precIF,bitDepthIF–bitDepthI).
[0233] In another example, the value shift1 is set to precIF-min(precIF-1, bitDepthIF-bitDepthI), and the value shift2 is set to precIF. If the x component of the motion vector is zero, that is, no horizontal interpolation is performed, shift2 is reset to precIF-min(precIF, bitDepthIF-bitDepthI).
[0234] In yet another example, the value shift1 is set to precIF-(bitDepthIF-bitDepthI), and the value shift2 is set to precIF. This is because bitDepthIF-bitDepthI is usually smaller than precF.
[0235] The interpolation filter of the prediction block in bilateral template matching can be different from the interpolation filter of normal motion compensation. Therefore, the precIF and bitDepthIF of bilateral template matching may be different from those of normal motion compensation.
[0236] In view of the foregoing, in order to apply bilateral template matching to the motion vector, the video encoder 200 and the video decoder 300 may be configured to determine two prediction blocks of the current block using bilateral template matching, wherein a first prediction block of the two prediction blocks is determined based on the motion vector of the current block, and wherein the motion vector includes a non-integer motion vector. To determine the first prediction block, the video encoder 200 and the video decoder 300 may be configured to perform horizontal interpolation based on the non-integer motion vector, store the output of the horizontal interpolation at a higher bit depth than the internal bit depth, and use the output of the horizontal interpolation stored at the higher bit depth to perform vertical interpolation. The technology of the present disclosure may improve coding efficiency and / or simplify the implementation of the DMVR technology.
[0237] Technique 2
[0238] In the second technique, the bit depth of the prediction block is set to be the same as the internal bit depth used for the encoded video. Therefore, the bit depth of the prediction block depends on the internal bit depth used for the encoded video. The "threshold" described in Section 1.2 is determined by the internal bit depth used for the encoded video. In one example, the precIF and bitDepthIF for bilateral template matching may be different from those for normal motion compensation.
[0239] In another example, the interpolation process of bilateral template matching and normal motion compensation is unified. In this example, the precIF and bitDepthIF of bilateral template matching are the same as those in normal motion compensation.
[0240] Fig.12 2 is a flowchart illustrating an example method for encoding a current block. The current block may include a current CU. Although with respect to the video encoder 200 ( Figure 1 and Figure 2 ), but it should be understood that other devices may also be configured to perform similar Fig.12 method of method of method.
[0241] In this example, the video encoder 200 initially predicts a current block (350). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate the difference between the original unencoded block and the prediction block for the current block. The video encoder 200 may then transform and quantize the coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the coefficients (358). For example, the video encoder 200 may encode the coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy encoded data for the block (360).
[0242] Fig.13 1 is a flowchart illustrating an example method for decoding a current block of video data. The current block may include a current CU. Although with respect to the video decoder 300 ( Figure 1 and Figure 3 ), but it should be understood that other device pages can be configured to perform similar Fig.13 method of method of method.
[0243] The video decoder 300 may receive entropy coded data for a current block, such as entropy coded prediction information and entropy coded data for coefficients of a residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy coded data to determine prediction information for the current block and reproduce coefficients of the residual block (372). The video decoder 300 may predict the current block (374), for example, by calculating a prediction block for the current block using an intra-frame or inter-frame prediction mode indicated by the prediction information for the current block. The disclosed method for determining whether to perform, for example, the following Fig.14 and Fig.15 The motion vector refinement technique described in Fig.13 The process 374 may be performed by the video decoder 300 before and / or during the process 374. The video decoder 300 may then inverse scan the reproduced coefficients (376) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize and inverse transform the coefficients to produce a residual block (378). The video decoder 300 may ultimately decode the current block (380) by combining the prediction block and the residual block.
[0244] Fig.14 is a flowchart illustrating an example of an example decoding method for applying decoder-side motion vector refinement. The video decoder 300 including the motion compensation unit 316 will be described. Fig.14 However, it should be understood that the video encoder 200 including the motion compensation unit 224 may also perform the same operation in the opposite manner. Fig.14technology.
[0245] In one example of the present disclosure, the video decoder 300 may be configured to receive a current block of video data encoded using a prediction of bidirectional prediction (1500). The video decoder 300 may then determine whether the prediction weights of the bidirectional prediction are equal (1502). If the prediction weights of the bidirectional prediction are not equal, the video decoder 300 may disable the motion vector refinement process (1504) and decode the current block using a prediction of the bidirectional prediction without motion vector refinement (1506). If the video decoder 300 determines that the prediction weights of the bidirectional prediction are equal, the video decoder 300 may enable the motion vector refinement process (1508) and decode the current block using a prediction of the bidirectional prediction with motion vector refinement (1510).
[0246] Thus, in view of the above example, the video decoder 300 may be configured to determine a motion vector for a current block of video data encoded using a prediction of bi-directional prediction, determine to use a motion vector refinement process for the motion vector based on a weight of a prediction for the bi-directional prediction of the current block, and apply the motion vector refinement process to the motion vector based on the determination to use the motion vector refinement process. In one example, when the weights of the predictions for the bi-directional prediction of the current block are unequal, the video decoder 300 may be configured to determine to disable the motion vector refinement process. In one example, the motion vector refinement process is bilateral template matching.
[0247] In one example, the bidirectional prediction is weighted bidirectional prediction. In another example, the bidirectional prediction is generalized bidirectional prediction.
[0248] In another example, the video decoder 300 may be configured to determine the weights for prediction of bidirectional prediction of the current block at the picture level. In another example, the video decoder 300 may be configured to determine the weights for prediction of bidirectional prediction of the current block at the block level.
[0249] Fig.15 is a flowchart illustrating another example decoding method for applying decoder-side motion vector refinement. The video decoder 300 including the motion compensation unit 316 will be described. Fig.15 However, it should be understood that the video encoder 200 including the motion compensation unit 224 may also perform the same operation in the opposite manner. Fig.15 process.
[0250] In one example of the present disclosure, the video decoder 300 may be configured to receive a current block of video data encoded using prediction of bi-directional prediction (1600). The video decoder 300 may then determine whether the prediction weights of the bi-directional prediction are equal (1602). If the prediction weights of the bi-directional prediction are not equal, the video decoder 300 may disable the motion vector refinement process (1604) and decode the current block using prediction of bi-directional prediction without motion vector refinement (1606).
[0251] If the video decoder 300 determines that the prediction weights of the bidirectional prediction are equal, the video decoder 300 may further determine whether the difference between the prediction blocks identified by the motion vectors of the bidirectional prediction blocks is less than a threshold value (1608). If yes, the video decoder 300 may disable the motion vector refinement process (1604) and decode the current block using the bidirectional prediction without motion vector refinement (1606). If no, the video decoder 300 may enable the motion vector refinement process (1610) and decode the current block using the prediction of the bidirectional prediction with motion vector refinement (1612).
[0252] Thus, in view of the above examples, the video decoder 300 may be configured to determine a motion vector for a current block of video data encoded using bidirectional prediction, determine a difference between prediction blocks identified by the motion vector, determine to use a motion vector refinement process on the motion vector based on a weight of a prediction for bidirectional prediction of the current block and the determined difference between the prediction blocks identified by the motion vector, and apply a motion vector refinement process on the motion vector based on the determination to use the motion vector refinement process.
[0253] Illustrative examples of the present disclosure include the following:
[0254] Example 1: A method for encoding video data, the method comprising determining a motion vector of a current block of the video data, determining to use a motion vector refinement process on the motion vector based on a weight of a prediction for bidirectional prediction of the current block, and refining the motion vector based on the determination.
[0255] Example 2: The method of Example 1, wherein the prediction of the bidirectional prediction is a weighted bidirectional prediction.
[0256] Example 3: The method of Example 1, wherein the prediction of the bidirectional prediction is a generalized bidirectional prediction.
[0257] Example 4: The method of Example 1, wherein determining the motion vector of the current block of video data comprises determining the motion vector using bilateral template matching.
[0258] Example 5: A method for encoding video data, the method comprising determining a motion vector for a current block of the video data, determining to use a motion vector refinement process on the motion vector based on a difference between two prediction blocks, and refining the motion vector based on the determination.
[0259] Example 6: A method of encoding video data, the method comprising receiving a current block of video data to be encoded using bilateral template matching, determining two prediction blocks for the current block using bilateral template matching, wherein a first block of the two prediction blocks is determined based on a non-integer motion vector, wherein determining the first block comprises performing horizontal interpolation based on the non-integer motion vector, storing an output of the horizontal interpolation at a higher bit depth than an internal bit depth, and performing vertical interpolation using the output of the horizontal interpolation stored at the higher bit depth.
[0260] Example 7: The method of any of Examples 1-6, wherein encoding includes decoding.
[0261] Example 8: The method of any of Examples 1-6, wherein encoding comprises encoding.
[0262] Example 9: A device for encoding video data, the device comprising one or more components for performing the method of any of Examples 1-8.
[0263] Example 10: The device of Example 9, wherein the one or more components include one or more processors implemented in circuitry.
[0264] Example 11: The device of any of Examples 9 and 10, further comprising a memory for storing video data.
[0265] Example 12: The device of any of Examples 9-11, further comprising a display configured to display the decoded video data.
[0266] Example 13: The device of any of Examples 9-12, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0267] Example 14: The apparatus of any of Examples 9-13, wherein the apparatus comprises a video decoder.
[0268] Example 15: The apparatus of any of Examples 9-14, wherein the apparatus comprises a video encoder.
[0269] Example 16: A computer-readable storage medium having instructions stored thereon, which when executed cause one or more processors to perform the method of any of Examples 1-8.
[0270] It should be appreciated that, according to examples, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or omitted entirely (e.g., not all described actions or events are required to implement the technique). In addition, in some examples, actions or events may be performed concurrently rather than sequentially, such as through multithreading, interrupt handling, or multiple processors.
[0271] In one or more examples, the described functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or sent through a computer-readable medium as one or more instructions or codes and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media such as data storage media, or communication media, including, for example, any media that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this manner, computer-readable media may generally correspond to (1) non-transitory tangible computer-readable storage media, or (2) communication media such as signals or carrier waves. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures to implement the techniques described in the present disclosure. A computer program product may include a computer-readable medium.
[0272] As an example and not limitation, such computer-readable storage media may include one or more of RAM, ROM, EEPROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage device, flash memory or any other medium that can be used to store the required program code in the form of instructions or data structures and can be accessed by a computer. Moreover, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology such as infrared, radio and microwave is used to send instructions from a website, server or other remote source, the definition of the medium includes coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave. However, it should be understood that computer-readable storage media and data storage media do not include connections, carriers, signals or other transient media, but are directed to non-transient tangible storage media. The disks and optical disks used herein include compact disks (CDs), laser optical disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein the disks usually copy data magnetically, while the optical disks copy data optically by lasers. The above combination should also be included in the scope of computer-readable media.
[0273] Instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Therefore, as used herein, the term "processor" may refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Moreover, the technology may be fully implemented in one or more circuits or logic elements.
[0274] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses including a wireless handset, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units, including one or more processors as described above in combination with appropriate software and / or firmware.
[0275] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for decoding video data, the method include: determining a motion vector for a current block of video data encoded using bi-predictive prediction; determining that weights of predictors from two reference picture lists used for prediction of the bidirectional prediction of the current block are unequal; determining to disable a motion vector refinement process for the motion vector based on determining that the weights of the predictors from the two reference picture lists used for the bi-directionally predicted prediction of the current block are unequal; as well as The current block of video data is decoded using the bi-predictive prediction without the motion vector refinement process.
2. The method according to claim 1, in, The bi-directional prediction is a weighted bi-directional prediction.
3. The method according to claim 1, in, The prediction of the bidirectional prediction is a generalized bidirectional prediction.
4. The method according to claim 1, further comprising: include: Weights of predictors from two reference picture lists for predicting the current block for the bidirectional prediction at a picture level are determined.
5. The method according to claim 1, further comprising: include: Weights of predictors from two reference picture lists for predicting the current block for the bi-directional prediction at a block level are determined.
6. The method according to claim 1, in, The motion vector refinement process is bilateral template matching.
7. The method of claim 1, further comprising: include: determining a motion vector for a second block of video data encoded using bi-predictive prediction; determining equal weights of predictors from two reference picture lists for prediction of the bidirectional prediction of the second block; determining a difference between prediction blocks identified by the motion vector of the second block; Applying the motion vector refinement process to the motion vector of the second block is determined based on the weights of the predictors from the two reference picture lists for the bi-predicted prediction of the second block and the determined difference between the prediction block identified by the motion vector of the second block.
8. The method of claim 1, determining the difference between the prediction blocks identified by the motion vectors, in, determining to disable the motion vector refinement process for the motion vector based on the weights of the predictors from the two reference picture lists for the bi-predicted prediction of the current block is also based on the determined difference between the prediction blocks identified by the motion vector, and further comprising: In case the difference between the prediction blocks identified by the motion vectors is less than a threshold, it is determined to disable the motion vector refinement process.
9. The method according to claim 7, in, Determining a difference between the prediction blocks identified by the motion vector of the second block comprises: The difference between the prediction blocks identified by the motion vector of the second block is determined using a sum of absolute differences between the prediction blocks or a sum of square errors between the prediction blocks.
10. The method according to claim 8, further comprising: include: The threshold is determined based on the number of samples in the prediction block and the bit depth of the samples in the prediction block.
11. The method according to claim 7, in, The motion vector refinement process is bilateral template matching.
12. The method according to claim 11, in, Applying the bilateral template matching to the motion vector of the second block comprises: determining two prediction blocks for the second block using the bilateral template matching, wherein a first prediction block of the two prediction blocks is determined based on the motion vector of the second block, wherein the motion vector of the second block comprises a non-integer motion vector, and wherein determining the first prediction block comprises: performing horizontal interpolation based on non-integer motion vectors; storing the horizontally interpolated output at a higher bit depth than the internal bit depth; and Vertical interpolation is performed using the output of the horizontal interpolation stored at a higher bit depth.
13. A device configured to decode video data, the device include: a memory configured to store a current block of video data; as well as one or more processors implemented in circuitry and in communication with the memory, wherein the one or more processors are configured to: determining a motion vector for a current block of video data encoded using bi-predictive prediction; determining that weights of predictors from two reference picture lists used for prediction of the bidirectional prediction of the current block are unequal; determining to disable a motion vector refinement process for the motion vector based on determining that the weights of the predictors from the two reference picture lists used for the bi-predicted prediction of the current block are not equal; and The current block of video data is decoded using the bi-predictive prediction without the motion vector refinement process.
14. The device according to claim 13, in, The bi-directional prediction is a weighted bi-directional prediction.
15. The device according to claim 13, in, The prediction of the bidirectional prediction is a generalized bidirectional prediction.
16. The device according to claim 13, in, The one or more processors are further configured to: Weights of predictors from two reference picture lists for predicting the current block for the bidirectional prediction at a picture level are determined.
17. The device according to claim 13, in, The one or more processors are further configured to: Weights of predictors from two reference picture lists for predicting the current block for the bi-directional prediction at a block level are determined.
18. The device according to claim 13, in, The motion vector refinement process is bilateral template matching.
19. The device according to claim 13, in, The one or more processors are further configured to: determining a motion vector for a second block of video data encoded using bi-predictive prediction; determining equal weights of predictors from two reference picture lists for prediction of the bidirectional prediction of the second block; determining a difference between prediction blocks identified by the motion vector of the second block; Applying the motion vector refinement process to the motion vector of the second block is determined based on the weights of the predictors from the two reference picture lists for the bi-predictive prediction of the second block and the determined difference between the prediction block identified by the motion vector.
20. The device according to claim 13, in, The one or more processors are further configured to determine a difference between prediction blocks identified by the motion vector, wherein disabling the motion vector refinement process for the motion vector is determined based on the weights of the predictors from the two reference picture lists for the prediction of the bidirectional prediction of the current block is further based on the determined difference between the prediction blocks identified by the motion vector, the one or more processors are further configured to: In case the difference between the prediction blocks identified by the motion vectors is less than a threshold, it is determined to disable the motion vector refinement process.
21. The apparatus of claim 19, wherein to determine a difference between prediction blocks identified by the motion vector of the second block, the one or more processors are further configured to: The difference between the prediction blocks identified by the motion vector of the second block is determined using a sum of absolute differences between the prediction blocks or a sum of square errors between the prediction blocks.
22. The device according to claim 20, in, The one or more processors are further configured to: The threshold is determined based on the number of samples in the prediction block and the bit depth of the samples in the prediction block.
23. The device according to claim 19, in, The motion vector refinement process is bilateral template matching.
24. The device according to claim 23, in, To apply the bilateral template matching to the motion vector of the second block, the one or more processors are further configured to: determining two prediction blocks for the second block using the bilateral template matching, wherein a first prediction block of the two prediction blocks is determined based on the motion vector of the second block, wherein the motion vector of the second block comprises a non-integer motion vector, and wherein, to determine the first prediction block, the one or more processors are further configured to: performing horizontal interpolation based on non-integer motion vectors; storing the horizontally interpolated output at a higher bit depth than the internal bit depth; and Vertical interpolation is performed using the output of the horizontal interpolation stored at a higher bit depth.
25. The device of claim 13, in, The apparatus is a wireless communication device.
26. A non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more processors to be configured to decode video data to: determining a motion vector for a current block of video data encoded using bi-predictive prediction; determining that weights of predictors from two reference picture lists used for prediction of the bidirectional prediction of the current block are unequal; determining to disable a motion vector refinement process for the motion vector based on determining that the weights of the predictors from the two reference picture lists used for the bi-directionally predicted prediction of the current block are unequal; as well as The current block of video data is decoded using the bi-predictive prediction without the motion vector refinement process.
27. A device configured to decode video data, the device include: means for determining a motion vector for a current block of video data encoded using bi-predictive prediction; means for determining that the weights of predictors from two reference picture lists used for the prediction of the bidirectional prediction of the current block are unequal; means for determining to disable a motion vector refinement process for the motion vector based on determining that the weights of the predictors from the two reference picture lists used for the prediction of the bi-directional prediction of the current block are unequal; as well as Means for decoding the current block of video data using the bi-predictive prediction without the motion vector refinement process.
