Adaptive bidirectional matching for decoder-side motion vector refinement for video coding

By implementing early termination techniques for iterative search processes based on cost comparisons, the method addresses the challenge of high computational complexity in decoder-side motion vector refinement, achieving efficient video encoding and decoding with minimal distortion.

JP2024534354APending Publication Date: 2024-09-20QUALCOMM INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024515628
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-09-06
Filing Date
2022-09-07
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing video coding techniques face challenges in reducing computational complexity while maintaining low distortion during decoder-side motion vector refinement, particularly in iterative search processes for motion vectors.

Method used

Implement early termination techniques for the iterative search process by comparing the minimum cost through previous and current search iterations, allowing the process to terminate early when slight improvements are observed, thereby reducing computational complexity without significantly increasing distortion.

Benefits of technology

The proposed early termination method effectively reduces computational complexity in decoder-side motion vector derivation without substantially increasing distortion, enhancing efficiency in video encoding and decoding processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024534354000001
    Figure 2024534354000001
Patent Text Reader

Abstract

An exemplary method for encoding or decoding video data includes determining a motion vector for a block of the video data using a decoder-side motion vector derivation process that includes performing an iterative search process, the performing the iterative search process including determining a minimum cost through previous search iterations, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iterations and the total minimum cost through the current search iteration, determining the motion vector, and encoding or decoding the block of the video data using the motion vector.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] (CROSS REFERENCE TO RELATED APPLICATIONS)

[0001] This application claims priority to U.S. Patent Application No. 17 / 929,891, filed September 6, 2022, and U.S. Provisional Patent Application No. 63 / 245,577, filed September 17, 2021, the entire contents of both of which are incorporated herein by reference. U.S. Patent Application No. 17 / 929,891, filed September 6, 2022, claims the benefit of U.S. Provisional Patent Application No. 63 / 245,577, filed September 17, 2021.

[0002]

[0002] This disclosure relates to video encoding and decoding. [Background technology]

[0003] Digital video capabilities may 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 gaming devices, video game consoles, cellular or satellite radio telephones, so-called "smartphones," video teleconferencing devices, video streaming devices, etc. Digital video devices implement video coding techniques such as those described in 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), ITU-T H.266 / Generic Video Coding (VVC), and extensions to such standards, as well as proprietary video codecs / formats such as AOMedia Video1 (AV1) developed by the Alliance for Open Media. Video devices may implement such video coding techniques to more efficiently transmit, receive, encode, decode, and / or store digital video information.

[0004]

[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 partitioned 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 with respect 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 with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention

[0005]

[0005] In general, this disclosure describes techniques related to inter prediction in video codecs. More specifically, this disclosure describes devices and techniques related to decoder-side motion vector refinement and early termination of an iterative search process for determining and / or refining motion vectors. A video encoder / decoder may be configured to determine a minimum cost through a previous search iteration and update a total minimum cost through a current search iteration. The iterative search process may then be terminated early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration. In this manner, the iterative search process may be terminated early when a slight improvement is observed between successive search iterations. Thus, the techniques of this disclosure may reduce computational complexity without substantially increasing distortion.

[0006]

[0006] In one example, the present disclosure describes a method for decoding video data, the method including determining a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, the iterative search process including determining a minimum cost through previous search iterations, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, determining the motion vector, and decoding the block of the video data using the motion vector.

[0007]

[0007] In another example, the present disclosure describes a method for encoding video data, the method including determining a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, the iterative search process including determining a minimum cost through previous search iterations, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through previous search iterations and the total minimum cost through the current search iteration, determining the motion vector, and encoding the block of the video data using the motion vector.

[0008]

[0008] In another example, a device for decoding video data includes a memory configured to store the video data and a processing circuit, the processing circuit configured to determine a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process including determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to decode the block of the video data using the motion vector.

[0009]

[0009] In another example, a device for encoding video data includes a memory configured to store the video data and a processing circuit, the processing circuit configured to determine a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process including determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to encode the block of the video data using the motion vector.

[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 become apparent from the description, drawings, and claims. [Brief description of the drawings]

[0011] [Figure 1]

[0011] FIG. 1 is a block diagram illustrating an example video encoding and decoding system in which techniques of this disclosure may be implemented. [Diagram 2]

[0012] 13 shows an example of spatial merge candidate locations. [Diagram 3]

[0013] 1 illustrates an example of motion vector scaling for temporal merge candidates. [Figure 4]

[0014] 13 illustrates exemplary candidate positions for temporal merge candidates. [Diagram 5]

[0015] Here is an example of bilateral matching: [Figure 6]

[0016] 1 shows an example of an extended coding unit region used in bidirectional optical flow. [Figure 7]

[0017] 1 illustrates an exemplary diamond search region for multi-pass decoder-side motion refinement. [Figure 8]

[0018] 1 shows an example of template matching performed on a search area around an initial motion vector. [Figure 9]

[0019] 1 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure. [Figure 10]

[0020] 1 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure. [Figure 11]

[0021] 1 is a flowchart illustrating an example method for encoding a current block, in accordance with techniques of this disclosure. [Figure 12]

[0022] 5 is a flowchart illustrating an example method for decoding a current block, in accordance with techniques of this disclosure. [Figure 13]

[0023] 4 is a flowchart illustrating an exemplary method for early termination of an iterative search process according to an example of the present disclosure. [Figure 14]

[0024] 11 is a flowchart illustrating another example method for decoding a current block, in accordance with techniques of this disclosure. [Figure 15]

[0025] 11 is a flowchart illustrating another example method for encoding a current block, in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012]

[0026] In some exemplary inter-prediction techniques, a video decoder may be configured to perform an iterative search process to determine and / or refine motion vectors. Some exemplary techniques include bidirectional matching decoder-side motion vector refinement (DMVR) and template matching. In an exemplary decoder-side motion search process, for either bidirectional matching-based DMVR or template matching, a cost criterion is defined and used to calculate a cost for a candidate position within a predefined search area. The motion information associated with the candidate position having the smallest cost may be the output of the iterative search process. The search process may be performed for multiple iterations. In each iteration, a subset of candidate positions within the search area is evaluated. In general, the distance between the initial position and the candidate position increases after each iteration. In other words, the candidate position in the current search iteration may be further away from the initial point than the position in the previous iteration.

[0013]

[0027] The variable minCost may represent the minimum cost calculated during the iterative search process, and minCost may represent the minimum cost of the iterative search process determined so far during the iterative search process. Several early termination methods may be applied to terminate the search process. In some examples, the search process may be terminated if minCost is less than a threshold, or if the best candidate location with the minimum cost has not changed from one subset to the next subset (e.g., from one iteration to the next).

[0014]

[0028] However, in some instances, the minCost calculated during the iterative search process may remain greater than the threshold but not decrease at a rate that would timely decrease it below the threshold. Thus, simply comparing minCost to a threshold may have slight improvements in picture distortion but may lead to instances of longer decoding times and greater computational complexity in decoder-side motion vector derivation.

[0015]

[0029] To further reduce computational complexity and improve efficiency in decoder-side motion vector derivation, the video encoder / decoder may be configured to determine a minimum cost through a previous search iteration and update a total minimum cost through a current search iteration. In other words, the video encoder / decoder may determine a minimum cost through a previous search iteration and determine a total minimum cost through a current search iteration. The iterative search process may then be terminated early based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration. In some examples, determining the minimum cost through previous search iterations may include determining the minimum cost of all previous search iterations. In some examples, terminating the iterative search process early may mean that the iterative search process disclosed herein may have the ability to be terminated earlier than a normal termination of the iterative search process (i.e., the iterative search process is terminated based on a comparison of the minimum cost through the previous search iteration (e.g., minCost described above) to a threshold). Terminating the iterative search process by comparing the minimum cost through the previous search iteration and the total minimum cost through the current search iteration may reduce computational complexity without substantially increasing distortion.

[0016]

[0030] In some examples, the iterative search process may be terminated early based on a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration relative to a difference threshold. In some examples, the search process terminates if the difference is less than the difference threshold. In some examples, the iterative search process may be terminated early based on a ratio of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration relative to a ratio threshold. In some examples, the iterative search process may be terminated early based on a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration relative to a ratio threshold. In some examples, the threshold may be based on a characteristic of the block being coded, such as the size of the block being coded.

[0017]

[0031] In this way, the iterative search process may be terminated early when only slight improvements between successive search iterations are observed. By terminating the iterative search process early using the early termination techniques described above, the computational complexity in the decoder-side motion vector derivation may be reduced without substantially increasing distortion.

[0018]

[0032] The above-described early termination technique may be used with any of the decoder-side motion vector derivation techniques involving a search process having three or more iterations. In one example, the above-described early termination technique may be applied in either bidirectional matching or template matching of DMVR. In other examples, the above-described early termination technique may be used with other early termination methods.

[0019]

[0033] 1 is a block diagram illustrating an example video encoding and decoding system 100 that may implement techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. In general, video data includes any data for processing video. Thus, video data may include raw uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.

[0020]

[0034] 1, 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. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide range of devices, including desktop computers, notebook (e.g., laptop) computers, mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, broadcast receiver devices, and the like. In some cases, source device 102 and destination device 116 may be capable of wireless communication and thus may be referred to as wireless communication devices.

[0021]

[0035] In the example of FIG. 1, 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 this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 may be configured to apply techniques for decoder-side motion vector derivation. Thus, source device 102 represents an example of a video encoding device, while destination device 116 represents an example of a video decoding device. In other examples, source device and destination device may include other components or configurations. For example, source device 102 may receive video data from an external video source, such as an external camera. Similarly, destination device 116 may interface with an external display device rather than including an integrated display device.

[0022]

[0036] System 100 as shown in FIG. 1 is merely an example. In general, any digital video encoding and / or decoding device may perform the techniques for decoder-side motion vector derivation. Source device 102 and destination device 116 are merely examples of coding devices, such that source device 102 generates coded video data for transmission to destination device 116. This disclosure refers to devices that perform coding (encoding and / or decoding) of data as "coding" devices. Thus, video encoder 200 and video decoder 300 represent examples of coding devices, specifically, video encoders and video decoders, respectively. In some examples, source device 102 and destination device 116 may operate substantially symmetrically, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Thus, system 100 may support unidirectional or bidirectional video transmission between source device 102 and destination device 116, for example, video streaming, video playback, video broadcasting, or video telephony.

[0023]

[0037] In general, video source 104 represents a source of video data (e.g., raw, unencoded video data) and provides a continuous series of pictures (also called "frames") of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes the captured video data, pre-captured video data, or computer-generated video data. Video encoder 200 may reorder the pictures from the order in which they are received (sometimes called "display order") to a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. The source device 102 may then output the encoded video data via the output interface 108 to a computer-readable medium 110 for receipt and / or retrieval, for example, by an input interface 122 of the destination device 116 .

[0024]

[0038] 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 may store raw video data, e.g., raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 may store software instructions executable by, e.g., the video encoder 200 and the video decoder 300, respectively. Although the memories 106 and 120 are shown in this example separately from the video encoder 200 and the video decoder 300, it should be understood that the video encoder 200 and the video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Additionally, the memories 106, 120 may store encoded video data, e.g., output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 may be allocated as one or more video buffers, for example, for storing raw decoded video data and / or encoded video data.

[0025]

[0039] The computer-readable medium 110 may represent any type of medium or device capable of transferring 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 for enabling the source device 102 to transmit the encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal including the encoded video data, and the input interface 122 may demodulate a received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may comprise 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 routers, switches, base stations, or any other equipment that may be useful for facilitating communication from the source device 102 to the destination device 116.

[0026]

[0040] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray® disc, a DVD, a CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0027]

[0041] In some examples, source device 102 may output the encoded video data to a file server 114 or another intermediate storage device, which 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 download.

[0028]

[0042] The file server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) protocol), a content delivery network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or Enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The file server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.

[0029]

[0043] The destination device 116 may access the encoded video data from the 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., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both suitable for accessing the encoded video data stored on the file server 114. The input interface 122 may be configured to operate according to any one or more of the various protocols discussed above for retrieving or receiving media data from the file server 114, or other such protocols for retrieving media data.

[0030]

[0044] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components operating according to any of the various IEEE 802.11 standards, or other physical components. In examples in which output interface 108 and input interface 122 comprise wireless components, output interface 108 and input interface 122 may be configured to transfer data, such as encoded video data, according to cellular communication standards, such as 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, etc. In some examples in which output interface 108 comprises a wireless transmitter, output interface 108 and input interface 122 may be configured to transfer 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™), the Bluetooth standard, etc. 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 an SoC device for performing functions attributed to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing functions attributed to video decoder 300 and / or input interface 122.

[0031]

[0045] The techniques of this disclosure may be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcast, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video being encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0032]

[0046] An input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 that is also used by the video decoder 300, such as syntax elements having values ​​that describe characteristics and / or processing of video blocks or other coded 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 liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0033]

[0047] Although not shown in FIG. 1, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or audio decoder and may include appropriate MUX-DEMUX units or other hardware and / or software to handle multiplexed streams that include both audio and video in a common data stream.

[0034]

[0048] The video encoder 200 and the video decoder 300 may 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 the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (codec) within the respective device. The device including the video encoder 200 and / or the video decoder 300 may comprise an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.

[0035]

[0049] The video encoder 200 and the video decoder 300 may operate according to a video coding standard, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC), or extensions thereof, such as multiview and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also referred to as Versatile Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format, such as AOMedia Video1 (AV1), an extension of AV1, and / or a successor version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques of this disclosure are not limited to any particular coding standard or format. In general, video encoder 200 and video decoder 300 may be configured to perform the techniques of this disclosure with any video coding technique that uses decoder-side motion vector derivation techniques.

[0036]

[0050] In general, the video encoder 200 and the video decoder 300 may perform block-based coding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in an encoding and / or decoding process). For example, a block may include a two-dimensional matrix of luma and / or chroma data samples. In general, the video encoder 200 and the video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for a sample of a picture, the video encoder 200 and the video decoder 300 may code a luma component and a chroma component, which may include both red and blue chroma components. In some examples, the video encoder 200 converts the received RGB formatted data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to an RGB format. Alternatively, pre-processing and post-processing units (not shown) may perform these conversions.

[0037]

[0051] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture as including a process of encoding or decoding data for a picture. Similarly, this disclosure may refer to coding a block of a picture as including a process of encoding or decoding data for the block, such as predictive and / or residual coding. A coded video bitstream generally includes a set of values ​​for syntax elements that represent coding decisions (e.g., coding modes) and partitioning of a picture into blocks. Thus, references to coding a picture or a block should generally be understood as coding values ​​for the syntax elements that form the picture or block.

[0038]

[0052] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as video encoder 200) partitions coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder partitions CTUs and CUs into four equal non-overlapping squares, and each node of the quadtree has either zero or four child nodes. A node with no child nodes may be called a "leaf node", and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further partition PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents a partition of TUs. In HEVC, a PU represents inter-predicted data, and a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.

[0039]

[0053] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as the video encoder 200) partitions a picture into multiple coding tree units (CTUs). The video encoder 200 may partition the CTUs according to a tree structure, such as a quad-tree 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 CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels, a first level partitioned according to a quad-tree partition, and a second level partitioned according to a binary tree partition. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).

[0040]

[0054] In the MTT partitioning structure, blocks may be partitioned using quad tree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. A triple tree partitioning or ternary tree partitioning is a partitioning in which a block is divided into three sub-blocks. In some examples, a triple tree partitioning or ternary tree partitioning divides a block into three sub-blocks without splitting the original block through the center. The partition types in MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.

[0041]

[0055] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to code the video data in blocks. In AV1, the largest coding block that may be processed is called a superblock. In AV1, a superblock may be either 128×128 luma samples or 64×64 luma samples. However, in successor video coding formats (e.g., AV2), a superblock may be defined by a different (e.g., larger) luma sample size. In some examples, a superblock is the top level of a block quadtree. The video encoder 200 may further partition the superblock into smaller coding blocks. The video encoder 200 may partition the superblock and other coding blocks into smaller blocks using square or non-square partitions. The non-rectangular blocks may include N / 2×N, N×N / 2, N / 4×N, and N×N / 4 blocks. The video encoder 200 and the video decoder 300 may perform a separate prediction and transformation process for each of the coding blocks.

[0042]

[0056] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that may be coded independently of other tiles. That is, video encoder 200 and video decoder 300 may encode and decode coding blocks within a tile, respectively, without using video data from other tiles. However, video encoder 200 and video decoder 300 may perform filtering across tile boundaries. Tiles may be uniform or non-uniform in size. Tile-based coding may enable parallel processing and / or multi-threading for encoder and decoder implementations.

[0043]

[0057] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and 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 both chroma components (or two QTBT / MTT structures for each chroma component).

[0044]

[0058] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partitioning structures.

[0045]

[0059] In some examples, the CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture having three sample arrays, or a CTB of samples for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or sample. The CTB may be an N×N block of samples for some value of N such that the division of the components into the CTB is partitioned. A component is an array or a single sample from one of the three arrays (luma and two chroma) that make up a picture in 4:2:0, 4:2:2, or 4:4:4 color format, or a single sample of an array or arrays that make up a picture in monochrome format. In some examples, the coding block is an M×N block of samples for some value of M and N such that the division of the CTB into the coding block is partitioned.

[0046]

[0060] Blocks (e.g., CTUs or CUs) may be grouped in various ways within a picture. As an example, a brick may refer to a rectangular region of a CTU row within a particular tile within a picture. A tile may be a rectangular region of CTUs within a particular tile column and a particular tile row within a picture. A tile column refers to a rectangular region of CTUs with a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set). A tile row refers to a rectangular region of CTUs with a height specified by a syntax element (e.g., in a picture parameter set) and a width equal to the width of the picture.

[0047]

[0061] In some examples, a tile may be partitioned into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile. Bricks in a picture may also be arranged as slices. A slice may be an integer number of bricks of a picture that may be contained exclusively within a single Network Abstraction Layer (NAL) Unit. In some examples, a slice includes either several complete tiles or only a series of contiguous complete bricks of a tile.

[0048]

[0062] This disclosure may use "NxN" and "N by N", e.g., 16x16 samples or 16 by 16 samples, 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. In general, a 16x16 CU has 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples in a CU may be arranged in rows and columns. Moreover, a CU does not necessarily have to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may comprise NxM samples, where M is not necessarily equal to N.

[0049]

[0063] Video encoder 200 encodes video data for a CU that represents prediction and / or residual information, as well as other information. The prediction information indicates how the CU will be predicted to form a predictive block for the CU. The residual information generally represents sample-by-sample differences between samples of the CU before encoding and samples of the predictive block.

[0050]

[0064] To predict a CU, the video encoder 200 may generally form a predictive block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting a CU from data of a previously coded picture, and intra prediction generally refers to predicting a CU from previously coded data of the same picture. To implement inter prediction, the video encoder 200 may generate a predictive block using one or more motion vectors. The video encoder 200 may generally perform a motion search to identify a reference block that matches the CU well, for example, in terms of the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using a sum of absolute differences (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculation to determine whether the reference block matches the current CU well. In some examples, the video encoder 200 may predict the current CU using unidirectional prediction or bidirectional prediction.

[0051]

[0065] Some examples of VVC also provide an affine motion compensation mode, which may be considered an inter-prediction mode. In an affine motion compensation mode, video encoder 200 may determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, viewpoint shifting, or other irregular motion types.

[0052]

[0066] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of VVC provide 67 intra prediction modes, including various directional modes, as well as a planar mode and a DC mode. In general, the video encoder 200 selects an intra prediction mode that describes neighboring samples for a current block (e.g., a block of a CU) from which samples of the current block should be predicted. Such samples may generally be above, above and to the left, or to the left of the current block, in the same picture as the current block, assuming that the video encoder 200 codes CTUs and CUs in raster scan order (left to right, top to bottom).

[0053]

[0067] The video encoder 200 encodes data representing a prediction mode for the current block. For example, in the case of an inter prediction mode, the video encoder 200 may encode data representing which of various available inter prediction modes is used as well as motion information for the corresponding mode. In the case of unidirectional or bidirectional inter prediction, for example, the video encoder 200 may encode a motion vector using an advanced motion vector prediction (AMVP) mode or a merge mode. The video encoder 200 may use a similar mode to encode a motion vector for an affine motion compensation mode.

[0054]

[0068] AV1 includes two general techniques for encoding and decoding coding blocks of video data. The two general techniques are intra prediction (e.g., intra-frame prediction or spatial prediction) and inter prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when predicting a block of a current frame of video data using an intra prediction mode, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. In most intra prediction modes, the video encoder 200 encodes a block of the current frame based on the difference between a sample value in the current block and a prediction value generated from a reference sample in the same frame. The video encoder 200 determines the prediction value generated from the reference sample based on the intra prediction mode.

[0055]

[0069] Following prediction, such as intra- or inter-prediction, of a block, the video encoder 200 may compute residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a predictive block for that block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to generate transform data in a transform domain rather than the sample domain. For example, the video encoder 200 may 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 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc., following the initial transform. The video encoder 200 generates transform coefficients following application of the one or more transforms.

[0056]

[0070] As described above, following any transformation to generate transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. By performing a quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may truncate 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 may perform a bitwise right shift of the value to be quantized.

[0057]

[0071] Following quantization, the video encoder 200 may scan the transform coefficients to generate a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place transform coefficients with higher energy (and therefore lower frequency) at the front of the vector and transform coefficients with lower energy (and therefore higher frequency) at the rear of the vector. In some examples, the video encoder 200 may use a predefined scan order for scanning the quantized transform coefficients to generate a serialized vector and then entropy code the quantized transform coefficients of the vector. In other examples, the video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form the one-dimensional vector, the video encoder 200 may entropy code the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy code values ​​for syntax elements that describe metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.

[0058]

[0072] To perform CABAC, the video encoder 200 may assign a context in a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values ​​of the symbol are zeroed out or not. The probability decision may be based on the context assigned to the symbol.

[0059]

[0073] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for example in a picture header, block header, slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS), to video decoder 300. Video decoder 300 may similarly decode such syntax data to determine how to decode the corresponding video data.

[0060]

[0074] In this manner, video encoder 200 may generate a bitstream including encoded video data, e.g., syntax elements that describe partitions of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and may decode the encoded video data.

[0061]

[0075] In general, video decoder 300 performs a reciprocal process to that performed by video encoder 200 to decode encoded video data of a bitstream. For example, video decoder 300 may decode values ​​for syntax elements of a bitstream using CABAC in a manner substantially similar to, but reciprocal to, the CABAC encoding process of video encoder 200. The syntax elements may specify partition information for the partitioning of a picture into CTUs and the partitioning of each CTU according to a corresponding partitioning structure, such as a QTBT structure, to specify CUs of the CTUs. The syntax elements may further specify prediction and residual information for blocks (e.g., CUs) of video data.

[0062]

[0076] The residual information may be represented, for example, by quantized transform coefficients. The video decoder 300 may dequantize and inverse transform the quantized transform coefficients of the block to reconstruct a residual block for the block. The video decoder 300 may use the signaled prediction mode (intra-prediction or inter-prediction) and associated prediction information (e.g., motion information for inter-prediction) to form a predictive block for the block. The video decoder 300 may then combine (sample by sample) the predictive block and the residual block to reconstruct the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along block boundaries.

[0063]

[0077] This disclosure may generally refer to "signaling" some information, such as a syntax element. The term "signaling" may generally refer to communication of values ​​for syntax elements and / or other data used to decode the encoded video data. That is, video encoder 200 may signal values ​​for syntax elements in a bitstream. In general, signaling refers to generating values ​​in a bitstream. As noted above, source device 102 may transfer the bitstream to destination device 116 in substantially real-time or non-real-time, which may occur, such as when storing syntax elements in storage device 112 for later retrieval by destination device 116.

[0064]

[0078] The techniques of this disclosure relate to inter prediction in video codecs. More specifically, this disclosure describes devices and techniques related to decoder-side motion vector refinement using bidirectional matching. According to the techniques of this disclosure, as described in more detail below, a video decoder 300 may include a memory configured to store video data and a processing circuit, and the processing circuit may be configured to determine a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, the iterative search process including determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and terminating the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to decode the block of the video data using the motion vector.

[0065]

[0079] In accordance with the techniques of this disclosure, as described in more detail below, video encoder 200 may include a memory configured to store video data and a processing circuit configured to determine a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process including determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to encode the block of the video data using the motion vector.

[0066]

[0080] Two-way matching

[0081] Bidirectional matching (BM) is a technique to refine paired initial motion vectors MV0 and MV1. In general, BM involves searching around the MV0 and MV1 motion vectors to derive refined MVs MV0' and MV1' that minimize the block matching cost. The block matching cost measures the similarity between two motion compensated predictors generated using two MVs (some typical criteria are Sum of Absolute Differences (SAD), Sum of Absolute Transform Differences (SATD), Sum of Squared Errors (SSE), etc.). The block matching cost may also include a regularization term derived based on the MV difference between the current MV pair and the initial MV pair. Some constraints may also be applied to the MV difference between MVD0 (MV0'-MV0) and MVD1 (MV1'-MV1). Usually, video coders are configured with the assumption that MVD0 and MVD1 are proportional to the temporal distance (TD) between the current picture and the reference picture pointed to by the two MVs. However, in some applications, the BM process may be designed assuming that MVD0 is equal to -MVD1.

[0067]

[0082] Inter-prediction in general-purpose video coding standards

[0083] For inter-predicted CUs in VVC, the motion parameters include motion vectors, reference picture indexes, and reference picture list usage indexes, as well as any additional information required for the new coding features of VVC. The motion parameters are used for inter-prediction sample generation. The motion parameters may be signaled in an explicit or implicit manner. If a CU is coded in skip mode, it is associated with one PU and has no significant residual coefficients, coded motion vector deltas, or reference picture indexes. A merge mode is specified, whereby the motion parameters of the current CU are obtained from neighboring CUs, including spatial and temporal candidates, as well as additional schedules introduced in VVC. The merge mode can be applied to any inter-predicted CU, not just skip mode. Some other prediction modes other than the merge mode include explicit transmission of motion parameters, where the motion vectors (e.g., motion vector differentials), the corresponding reference picture indexes of each reference picture list, as well as the reference picture list usage flag and other necessary information are explicitly signaled for each CU.

[0068]

[0084] Beyond the inter-coding features in HEVC, VVC includes several new and improved inter-prediction coding tools, which are listed as follows: - Enhanced merge prediction -Merge mode with MVD (MMVD) -Symmetric MVD (SMVD) signaling -Affine motion compensation prediction -Sub-block based temporal motion vector prediction (SbTMVP) -Adaptive Motion Vector Resolution (AMVR) -Motion field storage: 1 / 16 luma sample MV storage and 8x8 motion field compression -Bi-prediction using CU level weights (BCW) -Bidirectional Optical Flow (BDOF) - Decoder-side motion vector improvement (DMVR) -Geometric Partitioning Mode (GPM) - Combined Inter and Intra Prediction (CIIP)

[0069]

[0085] Enhanced Merge Prediction

[0086] In VVC regular merge mode, a merge candidate list is constructed that contains the following five types of candidates, in order: 1) Spatial motion vector predictor (MVP) from spatially adjacent CUs 2) Time MVP from collocated CU 3) History-based MVP from a First-In-First-Out (FIFO) Table 4) Pairwise average MVP 5) 0 Motion Vector (MV)

[0070]

[0087] The size of the merge list is signaled in the sequence parameter set (SPS) header. In one example, the maximum allowed size of the merge list is six candidates. For each CU coded in merge mode, the index of the selected merge candidate is coded using a truncated unary binarization.

[0071]

[0088] The derivation process for each category of merge candidates is provided in this section. As is done in HEVC, VVC also supports parallel derivation of merge candidate lists for all CUs within a region of a certain size.

[0072]

[0089] Spatial candidate derivation

[0090] The derivation of spatial merge candidates in VVC is the same as that in HEVC, except that the positions of the first two merge candidates are swapped. Figure 2 shows an example of the positions of spatial merge candidates. Up to four merge candidates are selected from among the candidates at the positions shown in Figure 2 for the current CU 400. The order of derivation is B0, A0, B1, A1, and B2. Position B2 is considered only when one or more CUs at positions B0, A0, B1, A1 are not available (e.g., because the CU belongs to another slice or tile) or when the CU is intra-coded. After the candidate at position A1 is added, the addition of the remaining candidates is subject to a redundancy check that ensures that candidates with the same motion information are removed from the list so that coding efficiency improves.

[0073]

[0091] Temporal candidate derivation

[0092] In this technique, only one candidate is added to the list. In particular, in this derivation of the temporal merge candidate, a scaled motion vector is derived based on the co-located CU belonging to the co-located reference picture. Figure 3 shows an example of motion vector scaling for a temporal merge candidate. The reference picture list to be used for the derivation of the co-located CU is explicitly signaled in the slice header. The scaled motion vector 412 for the temporal merge candidate is obtained as shown by the dotted line in Figure 3, which is scaled from the motion vector of the co-located CU 416 using picture order count (POC) distances tb and td. The motion vector 414 is the motion vector between the current CU 400 and the co-located CU 416. The distance tb is defined to be the POC difference between the reference picture 404 of the current picture and the current picture 406. The distance td is defined to be the POC difference between the reference picture 402 of the co-located picture and the co-located picture 408. The reference picture index of the temporal merge candidate is set equal to 0.

[0074]

[0093] Figure 4 shows exemplary candidate positions for temporal merge candidates. The position of the temporal candidate for the current CU 400 is selected between candidates C0 and C1 as shown in Figure 4. If the CU at position C0 is not available (e.g., is intra-coded or is outside the current row of the CTU), position C1 is used. Otherwise, position C0 is used in the derivation of the temporal merge candidate.

[0075]

[0094] History-Based Merge Candidate Derivation

[0095] History-based MVP (HMVP) merge candidates are added to the merge list after spatial merge candidates (e.g., spatial MVP) and temporal merge candidates (e.g., temporal MVP or TMVP). In HMVP, motion information of previously coded blocks is stored in a table and used as the MVP of the current CU. During the encoding / decoding process, a table with multiple HMVP candidates is maintained. When a new CTU row is encountered, the table is reset (e.g., emptied). Whenever there is a non-subblock inter-coded CU, the associated motion information is added to the last entry of the table as a new HMVP candidate.

[0076]

[0096] The HMVP table size S is set to 6, which indicates that up to six HMVP candidates can be added to the table. When inserting a new motion candidate into the table, a redundancy check is first applied to find whether there is an identical HMVP in the table, utilizing a constrained first-in-first-out (FIFO) rule. If found, the identical HMVP is removed from the table, and then all HMVP candidates are moved forward.

[0077]

[0097] The merge candidate list construction process may use HMVP candidates. The latest few HMVP candidates in the table are checked in order and inserted into the candidate list after the TMVP candidate. A redundancy check is applied to the HMVP candidates to compare their motion information with the spatial or temporal merge candidates.

[0078]

[0098] To reduce the number of redundant check operations, the following simplifications may be introduced. a. The number of HMVP candidates used for merge list generation is set as (N<=4)?M:(8-N), where N denotes the number of existing candidates in the merge list and M denotes the number of available HMVP candidates in the table. b. When the total number of available merge candidates reaches the maximum allowed number of merge candidates minus 1, the merge candidate list construction process from HMVP ends.

[0079]

[0099] Pairwise average merging candidate derivation

[0100] The pairwise average candidate is generated by averaging predefined pairs of candidates in the existing merge candidate list. In one example, the predefined pairs are defined as {(0,1), (0,2), (1,2), (0,3), (1,3), (2,3)}, where the numbers indicate the merge index into the merge candidate list. The averaged motion vector is calculated separately for each reference list. If both motion vectors are available in one list, these two motion vectors are averaged even when they point to different reference pictures. If only one motion vector is available, use that one directly. If no motion vector is available, keep this list invalid.

[0080]

[0101] After the pairwise average merge candidates are added, if the merge list is not full, 0 MVPs are inserted at the end of the list until the maximum number of merge candidates is reached.

[0081]

[0102] Bi-prediction using CU-level weights (BCW)

[0103] In HEVC, a bi-predictive signal is generated by averaging two prediction signals obtained from two different reference pictures and / or by using two different motion vectors. In VVC, the bi-predictive mode is extended beyond a simple average to allow for a weighted averaging of the two prediction signals. Pbi-pred =((8-w) * P0+w * P1+4)≫3

[0082]

[0104] Weighted average bi-prediction allows five weights, w∈{-2,3,4,5,10}. For each bi-predictive CU, the weight w is determined in one of two ways: 1) for non-merged CUs, the weight index is signaled after the motion vector differential; 2) for merged CUs, the weight index is inferred from neighboring blocks based on the merge candidate index; BCW is only applied to CUs with 256 or more luma samples (e.g., CU width × CU height is 256 or more); for low latency pictures, all five weights are used; for non-low latency pictures, only three weights (w∈{3,4,5}) are used. - In the encoder, fast search algorithms are applied to find the weight indices without significantly increasing the encoder complexity. These algorithms are summarized as follows. Further details can be found in the VVC Test Model (VTM) software and in Yu-Chi Su et al., "CE4-related: Generalized bi-prediction improvements combined from JVET-L0197 and JVET-L0296," ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, No. 12. 回 Conference: Joint Video Experts Team (JVET), Macau, China, October 3-12, 2018 (hereinafter "JVET-L0646"). When combined with AMVR, unequal weights are only conditionally checked for 1-pel and 4-pel motion vector accuracy if the current picture is a low-latency picture. - When combined with affine motion estimation (ME), affine ME is performed for unequal weights only if the affine mode is selected as the current best mode. - When two reference pictures in bi-prediction are the same, unequal weights are only conditionally checked. Depending on the POC distance between the current picture and its reference pictures, the coding QP, and the temporal level, unequal weights are not explored when certain conditions are met.

[0083]

[0105] The BCW weight index is coded using one context-coded bin followed by a bypass-coded bin: the first context-coded bin indicates whether equal weights are used or not, and if unequal weights are used, an additional bin is signaled using bypass coding to indicate which unequal weights are used.

[0084]

[0106] Weighted Prediction (WP) is a coding tool supported by H.264 / AVC and HEVC standards to efficiently code video content with fading. Support for WP has also been added to the VVC standard. WP allows weighting parameters (weight and offset) to be signaled for each reference picture in each of the reference picture lists L0 and L1. Then, during motion compensation, the weight and offset of the corresponding reference picture are applied. WP and BCW are designed for different types of video content. To avoid interactions between WP and BCW that complicate VVC decoder design, when a CU uses WP, the BCW weight index is not signaled and w is inferred to be 4 (e.g., equal weights are added). For merge CU, the weight index is inferred from neighboring blocks based on the merge candidate index. This can be applied to both normal merge mode and inherited affine merge mode. For constructed affine merge mode, affine motion information is constructed based on the motion information of up to three blocks. The BCW index for a CU that uses the constructed affine merge mode is simply set equal to the BCW index of the first control point MV.

[0085]

[0107] In VVC, CIIP and BCW cannot be applied together to a CU. When a CU is coded in CIIP mode, the BCW index of the current CU is set to 2, e.g., equal weight.

[0086]

[0108] Decoder-side motion vector improvement in VVC.

[0109] In VVC, BM-based decoder-side motion vector refinement (DMVR) may be applied to improve the accuracy of the MV of bi-predictive merge candidates. The BM method calculates the sum of absolute differences (SAD) between two candidate blocks in reference picture list L0 and list L1. Figure 5 shows an example of bilateral matching. As shown in Figure 5, the SAD between blocks 500 and 502 based on each MV candidate around the initial MV is calculated. The MV candidate with the lowest SAD becomes the refined MV and is used to generate the bi-predicted signal. The SAD of the initial MV is subtracted by 1 / 4 of the SAD value to act as a regularization term. The temporal distance (e.g., Picture Order Count (POC) difference) from the two reference pictures to the current picture shall be the same, and therefore MVD0 is just the opposite sign of MVD1.

[0087]

[0110] The refinement search range is two integer luma samples from the initial MV. The search includes an integer sample offset search stage and a fractional sample refinement stage. A 25-point full search is applied for the integer sample offset search. The SAD of the initial MV pair is calculated first. If the SAD of the initial MV pair is less than a threshold, the integer sample stage of the DMVR ends. Otherwise, the SAD of the remaining 24 points is calculated and checked in raster scan order. The point with the smallest SAD is selected as the output of the integer sample offset search stage.

[0088]

[0111] The integer sample search is followed by a fractional sample refinement. To reduce computational complexity, instead of an additional search using SAD comparison, the fractional sample refinement is derived by using a parametric error surface equation. The fractional sample refinement is conditionally invoked based on the output of the integer sample search stage. If the integer sample search stage ends with the center having the smallest SAD in either the first or second iteration search, the fractional sample refinement is further applied.

[0089]

[0112] In parametric error surface based sub-pixel offset estimation, the center position cost and the costs at the four adjacent positions from the center are used to fit a 2D parabolic error surface equation of the following form: E(x,y)=A(xx min ) 2 +B(yy min ) 2 +C (1) However, (x min , y min ) corresponds to the minimum cost decimal position, and C corresponds to the minimum cost value. By solving the above equation using the cost values ​​of the five search points, (x min ,y min )but, x min =(E(-1,0)-E(1,0)) / (2(E(-1,0)+E(1,0)-2E(0,0))) (2) y min =(E(0,-1)-E(0,1)) / (2((E(0,-1)+E(0,1)-2E(0,0))) (3)

[0090]

[0113] Since all the cost values ​​are positive and the minimum value is E(0,0), x min and y min The value of is automatically constrained to be between -8 and 8. This corresponds to a 1 / 2 pel offset with 1 / 16 pel MV precision in VVC. The calculated fraction (x min ,y min) is added to the integer distance refinement MV to obtain the sub-pixel accurate refinement delta MV.

[0091]

[0114] In VVC, the resolution of the MV is 1 / 16 luma sample. The samples at fractional positions are interpolated using an 8-tap interpolation filter. In DMVR, the search points surround the initial fractional pel MV with an offset of integer samples. Thus, the samples at those fractional positions are interpolated for the DMVR search process. To reduce the computational complexity, a bilinear interpolation filter is used to generate fractional samples for the search process in DMVR. Another effect is that by using a bilinear filter with a search range of 2 samples, DVMR does not access more reference samples compared to the normal motion compensation process. After the improved MV is obtained using the DMVR search process, a normal 8-tap interpolation filter is applied to generate the final prediction. To avoid accessing more reference samples than the normal motion compensation process, samples that are not required for the original MV-based interpolation process but are required for the improved MV-based interpolation process are padded from the available samples.

[0092]

[0115] When the width and / or height of a CU is greater than 16 luma samples, the CU may be further divided into sub-blocks with width and / or height equal to 16 luma samples for the DMVR process.

[0093]

[0116] In VVC, DMVR can be applied to CUs coded with the following modes and features: -CU level merge mode with bi-predictive MV -For a current picture, one reference picture is in the past and another is in the future - The distance from the two reference pictures to the current picture (e.g., the POC difference) is the same - Both reference pictures are short-term reference pictures. -CU has more than 64 luma samples - Both CU Height and CU Width are greater than or equal to 8 luma samples -BCW weight index indicates equal weights -WP is not currently enabled for blocks -CIIP mode is not currently used for blocks

[0094]

[0117] Bidirectional Optical Flow (BDOF)

[0118] Bidirectional Optical Flow (BDOF) is used to refine the bi-predictive signal of luma samples in a CU at the 4x4 sub-block level. As the name suggests, the BDOF mode is based on the concept of optical flow, which assumes that object motion is smooth. For each 4x4 sub-block, motion refinement (v x ,v y ) is calculated. The motion refinement is then used to adjust the bi-predicted sample values ​​in the 4x4 sub-block. The following steps are applied in the BDOF process:

[0095]

[0119] First, the horizontal and vertical gradients of the two prediction signals,

[0096]

number

[0097] k=0,1 is calculated by directly computing the difference between two adjacent samples, for example:

[0098]

number

[0099] and Here, I (k)(i,j) is the sample value at coordinate (i,j) of the prediction signal in list k, where k,k=0,1, and shift1 is calculated based on the luma bit depth bitDepth since shift1 is set equal to 6.

[0100]

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

[0101]

number

[0102] where Ω is a 6×6 window around the 4×4 sub-block, the value of shift2 is set equal to 4, and the value of shift3 is set equal to 1.

[0103]

[0121] Movement Improvement (v x ,v y ) is then derived using the cross-correlation and autocorrelation terms using:

[0104]

number

[0105] and However, th' BIO =1≪4.

[0106]

number

[0107] is the floor function.

[0108]

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

[0109]

number

[0110]

[0123] Finally, the BDOF samples of the CU are calculated by adjusting the bi-predictive samples as follows: pred BDOF (x,y)=(I (0) (x,y)+I (1) (x,y)+b(x,y)+ο offset )≫shift5 (1-6-6) and where shift5 is set equal to Max(3,15-BitDepth) and the variable ο offset is set equal to (1<<(shift5-1)).

[0111]

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

[0112]

[0125] To derive the gradient value, we select some predicted samples I in list k (k=0,1) outside the current CU boundary. (k) (i,j). Figure 6 shows an example of an extended coding unit region used in bidirectional optical flow. As shown in Figure 6, BDOF uses one extended row / column around the boundary of CU 600. To control the computational complexity of generating prediction samples outside the boundary, the prediction samples in the extended area (white positions) are generated by directly taking reference samples of nearby integer positions without interpolation (by using floor() operation on the coordinates), and a normal 8-tap motion compensation interpolation filter is used to generate prediction samples within the CU (gray positions). These extended sample values ​​are only used for gradient calculation. In the remaining steps of the BDOF process, when samples and gradient values ​​outside the CU boundary are needed, they are padded (e.g., repeated) from their nearest neighbors.

[0113]

[0126] BDOF is used to refine the bi-predictive signal of a CU at the 4x4 sub-block level. BDOF is applied to a CU if all of the following conditions are met: - The CU is coded using a "true" bi-prediction mode, e.g., one of the two reference pictures is before the current picture in display order and the other is after the current picture in display order - The CU is not coded using affine mode or SbTMVP merge mode -CU has more than 64 luma samples - Both CU Height and CU Width are greater than or equal to 8 luma samples -BCW weight index indicates equal weights -WP is not enabled for the current CU -CIIP mode is not used for the current CU

[0114]

[0127] Improved multi-path decoder behavior

[0128] In the JVET-V meeting, the Enhanced Compression Model (ECM, https: / / vcgit.hhi.fraunhofer.de / ecm / VVCSoftware_VTM / - / tree / ECM) was established to study compression techniques beyond VVC. The ECM is a paper entitled "Compression efficiency beyond VVC" (Yao-Jen Chang et al., ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 21st session). 回A multi-pass decoder-side motion refinement technique described in the Joint Video Experts Team (JVET) Conference, January 6-15, 2021, by remote conference (hereinafter "JVET_U0100") is adopted to replace DMVR in VVC. In the first pass, a BM (similar to that of DMVR in VVC) is applied to the coding block. In the second pass, a BM is applied to each 16x16 sub-block in the coding block, and the first-pass refined MV is applied as the initial MV. In the third pass, the MV in each 8x8 sub-block is further refined by applying bidirectional optical flow (BDOF).

[0115]

[0129] First pass-block based bidirectional matching MV refinement

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

[0116]

[0131] The BM involves performing a local search to derive the integer sample precision intDeltaMV. The local search applies a 3x3 square search pattern to loop horizontally through the search range [-sHor,sHor] and vertically through [-sVer,sVer], where the values ​​of sHor and sVer are determined by the block size, and the maximum value of sHor and sVer is 8.

[0117]

[0132] The bidirectional matching cost is calculated as bilCost = mvDistanceCost + sadCost. Block size cbW *When cbH is greater than 64, a mean removed SAD (MRSAD) cost function is applied to remove the DC effect of inter-reference block distortion. If the bilCost of the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV local search ends. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern, and the video coder continues to search for the minimum cost until the end of the search range is reached.

[0118]

[0133] The existing fractional sample refinement is further applied to derive the final delta MV. Then, the refined MV after the first pass is derived as follows: -MV0_pass1=MV0+deltaMV -MV1_pass1=MV1-deltaMV

[0119]

[0134] Second Pass-Subblock Based Bidirectional Matching MV Improvement

[0135] In the second pass, improved MVs are derived by applying BM to 16x16 grid sub-blocks. For each sub-block, an improved MV is searched around two MVs (MV0_pass1 and MV1_pass1) obtained in the first pass in the reference picture lists L0 and L1. The improved MVs (MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2)), where sbIdx2=0,...,N-1 are the sub-block indices, are derived based on the minimum bidirectional matching cost between the two reference sub-blocks in L0 and L1.

[0120]

[0136] For each subblock, the BM includes performing a full search to derive the integer sample precision intDeltaMV. The full search has a search range of [-sHor,sHor] horizontally and [-sVer,sVer] vertically, where the values ​​of sHor and sVer are determined by the block size, and the maximum value of sHor and sVer is 8.

[0121]

[0137] The two-way matching cost is bilCost=satdCost * The costFactor is calculated by applying the cost factor to the sum of absolute transform difference (SATD) cost between two reference sub-blocks. FIG. 7 shows an example diamond search area 700 for multi-pass decoder-side motion refinement. * sHor+1) * (2 * sVer+1) is divided into five diamond-shaped search regions as shown in Figure 7. Each search region is assigned a costFactor determined by the distance between each search point and the starting MV (intDeltaMV). Each diamond region is processed in order starting from the center of the search region. In each region, the search points are processed in raster scan order starting from the top left corner of the region and proceeding to the bottom right corner. The minimum bilCost within the current search region is called sbW. * If it is less than a threshold equal to sbH, the int-pel exhaustive search is terminated, otherwise the int-pel exhaustive search continues for the next search area until all search points have been examined.

[0122]

[0138] The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV(sbIdx2).The refined MV in the second pass is then derived as follows: -MV0_pass2(sbIdx2)=MV0_pass1+deltaMV(sbIdx2) -MV1_pass2(sbIdx2)=MV1_pass1-deltaMV(sbIdx2)

[0123]

[0139] Third pass-subblock based bidirectional optical flow MV refinement

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

[0124]

[0141] The refined MVs in the third pass (MV0_pass3(sbIdx3) and MV1_pass3(sbIdx3)) are derived as follows: ·MV0_pass3(sbIdx3)=MV0_pass2(sbIdx2)+bioMv ·MV1_pass3(sbIdx3)=MV0_pass2(sbIdx2)-bioMv

[0125] Further details of multipath DMVRs can be found in co-pending U.S. Provisional Patent Application No. 63 / 129221, filed December 22, 2020.

[0126]

[0142] Template Matching

[0143] Template matching (TM) is a decoder-side MV derivation method that refines the motion information of a current CU by finding the closest match between a template in a current picture (e.g., a neighboring block above and / or to the left of the current CU) and a block in a reference picture (e.g., the same size as the template). Figure 8 shows an example of template matching performed on a search area around an initial motion vector. As shown in Figure 8, a better MV should be searched around the initial motion 800 of a current CU 802 in a [-8, +8] pel search range 806 in a reference frame 808. Once an AMVP candidate is selected based on the initial matching error, the AMVP MVP is refined by template matching. For a merge candidate indicated by a signaled merge index, its merged MVs corresponding to L0 and L1 are refined independently by template matching, and then the less accurate motion vector is further refined again using the better motion vector as the initial motion vector (e.g., the previous motion vector).

[0127]

[0144] Cost function: When the motion vector points to a fractional sample position, motion compensated interpolation may be used. To reduce the complexity, bilinear interpolation is used instead of the usual 8-tap DCT-IF interpolation for template matching to generate a template on the reference picture. The matching cost C of template matching is calculated as follows: C=SAD+w * (|MVx-MV s x|+|MVy-MV s y|), where w is a weighting factor that can be set to an integer such as 0, 1, 2, 3, or 4, and MV and MVs respectively indicate the currently tested MV and the initial MV (e.g., MVP candidate in AMVP mode, or merged motion in merge mode). SAD is used as the matching cost of template matching.

[0128]

[0145] When TM is used, the motion information is refined by using only luma samples. The derived motion information is used for both luma and chroma for motion compensated inter prediction. After the MV is determined, the final motion compensation is performed using an 8-tap interpolation filter for the luma component and a 4-tap interpolation filter for the chroma component.

[0129]

[0146] Search method: MV refinement is a pattern-based MV search using the criteria of template matching cost and hierarchical structure. Two search patterns are supported for MV refinement: diamond search and cross search. The hierarchical structure specifies an iterative process for refining MVs, starting at a coarse MVD precision (e.g., 1 / 4-pel) and ending at a finer precision (e.g., 1 / 8-pel). MVs are directly searched at 1 / 4 luma sample MVD precision with diamond pattern, and then at 1 / 4 luma sample MVD precision with cross pattern. This is followed by 1 / 8 luma sample MVD refinement with cross pattern. The search range of MV refinement is set equal to (-8, +8) luma samples around the initial MV. If the current block is coded using bi-prediction, both MVs are refined independently, and then the best one (in terms of matching cost) is set as the leading MV to further refine the other MV with BCW weight values.

[0130]

[0147] Specifically, the template matching proposed in "Description of SDR, HDR and 360° video coding technology proposed by Qualcomm and Technicolor-low and high complexity versions" (YW Chen et al., Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 10th Meeting: San Diego, USA, April 10-20, 2018 (hereinafter referred to as "JVET-J0021")), JVET-U0100 is applied to AMVP mode and merge mode in some exemplary proposals.

[0131]

[0148] The canonical merge candidate list is constructed from the following candidate order: Spatial MVP from spatially adjacent CUs: The first four available candidates are selected in the following order: top-neighboring CU (A), left-neighboring CU (L), top-right-neighboring CU (AR), bottom-left-neighboring CU (LB), top-left-neighboring CU (LA). · Temporal MVP from collocated CU: Only one candidate is added. · History-based MVP: The motion information of previously coded blocks is stored in a table and used as the MVP for the current CU. Pairwise Average MVP: Pairwise average candidates are generated by averaging predefined pairs of candidates in the existing canonical merge candidate list. 0MV.

[0132]

[0149] When TM is applied to a block coded using merge mode, a separate TM merge candidate list is constructed by refining the MVP of regular merge candidates based on template matching.

[0133]

[0150] In the decoder-side motion search process, for either bidirectional matching-based DMVR or template matching, a cost criterion may be defined and used to calculate the cost for a candidate position within a predefined search area. The motion information associated with the candidate position with the minimum cost is the output of the iterative search process. The search process may be performed for multiple iterations. In each iteration, a subset of candidate positions within the search area may be evaluated. A specific pattern for selecting a candidate position for each subset may be applied. For example, a square search, a diamond search, and the diamond area in FIG. 7. In general, the distance between the initial position and the candidate position increases after each iteration. In other words, the candidate position in the current search iteration may be further away from the initial point than the position in the previous iteration.

[0134]

[0151] A variable minCost may be defined to track the minimum cost. The variable minCost may represent the minimum value calculated during the iterative search process. In this disclosure, minCost may be referred to as the minimum cost of the iterative search process determined so far. Several early termination methods may be applied to terminate the search process. For example, the process is terminated if minCost is less than a threshold value, or if the best candidate location with the minimum cost has not changed from one subset to the next subset (e.g., from one iteration to the next).

[0135]

[0152] This disclosure describes techniques for early termination of a search process for decoder-side motion vector derivation techniques to reduce the computational complexity of the search process. The techniques of this disclosure may be used with any of the decoder-side motion vector derivation techniques that involve a search process. In one example, the techniques of this disclosure may be applied in either bidirectional matching or template matching of DMVR. In other examples, the techniques of this disclosure may also be used with other early termination methods, for example, as described above.

[0136]

[0153] In one example of this disclosure, the video encoder 200 and the video decoder 300 may calculate a value of a second variable, minCostPrev, to track the minimum cost in the previous search iteration. In one example, the maximum number of iterations, if this example applies, shall be greater than 2. In one example, the video encoder 200 and the video decoder 300 may initialize the value of minCostPrev to a predetermined value, for example, 0.

[0137]

[0154] The video decoder 300 may determine a minimum cost through a previous search iteration and a total minimum cost through a current search iteration. In some examples, the previous search iteration may be immediately before the current search iteration. For example, if the current search iteration is the fourth search iteration, the previous search iteration is the third search iteration. In this example, the minimum cost through the previous search iteration is the minimum cost through the third search iteration, and the total minimum cost through the current search iteration is the minimum cost through the fourth search iteration.

[0138]

[0155] The video encoder 200 may determine a minimum cost through a previous search iteration and a total minimum cost through a current search iteration. In some examples, the previous search iteration may be immediately before the current search iteration. For example, if the current search iteration is the fourth search iteration, the previous search iteration will be the third search iteration. In this example, the minimum cost through the previous search iteration is the minimum cost through the third search iteration, and the total minimum cost through the current search iteration is the minimum cost through the fourth search iteration.

[0139]

[0156] In another example, the minimum cost of the previous search iteration itself may be used instead of the minimum cost through the previous search iteration. For example, if the current search iteration is the fourth search iteration, the previous search iteration is the third search iteration. In this example, the minimum cost of the third search iteration itself may be used instead of the minimum cost through the third search iteration.

[0140]

[0157] In some examples, to determine a motion vector for a block of video data using a decoder-side motion vector derivation process, the video decoder 300 and / or the video encoder 200 may be configured to terminate the iterative search process early in accordance with the techniques described in this disclosure.

[0141]

[0158] In the disclosed termination technique, the video encoder 200 and the video decoder 300 may be configured to take into account minCost and minCostPrev to make a decision of whether the iterative search process is terminated. In one example, the video encoder 200 and the video decoder 300 are configured to compare the difference of minCostPrev-minCost or abs(minCostPrev-minCost) with a threshold, and if the difference is less than the threshold, the video encoder 200 and the video decoder 300 terminate the iterative search process. When the video encoder 200 and the video decoder 300 decide to terminate the iterative search process, the video encoder 200 and the video decoder 300 may be configured to return the motion vector with the minimum cost up to that point in the search process.

[0142]

[0159] Thus, in one example, the video encoder 200 and the video decoder 300 may be configured to terminate the iterative search process early based on the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration relative to a difference threshold. For example, if the current search iteration is the fourth search iteration and the previous search iteration is the third search iteration, the iterative search process terminates if the difference between the minimum cost through the fourth search iteration and the minimum cost through the third search iteration is less than the difference threshold. In some examples, the difference threshold may be fixed or based on the size of the block of video data. In some examples, the threshold may be set equal to S times the area of ​​the block of video data, where S is a scaling factor that may be predefined or signaled in the bitstream.

[0143]

[0160] In some examples, the video encoder 200 and the video decoder 300 may be configured to terminate the iterative search process early based on comparing the absolute value of the difference between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration to a difference threshold.

[0144]

[0161] In other examples, the video encoder 200 and the video decoder 300 may reduce computational complexity without substantially increasing distortion by early terminating the iterative search process when the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration falls below a difference threshold.

[0145]

[0162] Thus, in one example of this disclosure, the video decoder 300 may be configured to determine a motion vector for a block of video data using a decoder-side motion vector derivation process that includes an iterative search process, the iterative search process including calculating a minimum cost of a previous search iteration and terminating the iterative search process early based on the minimum cost through the previous search iteration. The video decoder 300 may then code the block of video data using the motion vector. In a further example, the video decoder 300 may update the minimum cost determined for the iterative search process. To terminate the iterative search process early based on the minimum cost through the previous search iteration, the video decoder 300 may further calculate a difference or ratio of the cost through the previous search iteration to the minimum cost determined for the iterative search process and terminate the iterative search process early based on the difference or ratio to a threshold value.

[0146]

[0163] In one example, the disclosed technique can be described as follows: Video encoder 200 and video decoder 300 may initialize minCostPrev and minCost, for example, to have the same value. In another example, the initialization value may be input from a previous process or set equal to a predefined large value. While the iterative search process has not ended and the maximum iteration has not been reached, video encoder 200 and video decoder 300 may perform the following iterations. 1) Set minCostPrev equal to minCost. 2) Evaluate the current subset of candidate locations and determine (e.g., update) minCost. 3) Decide whether to quit based on the values ​​of both minCost and minCostPrev.

[0147]

[0164] Note that some other early termination techniques may be applied after step 2), for example, before or after step 3).

[0148]

[0165] In one example, step 3) above includes evaluating the difference between minCost and minCostPrev. The video encoder 200 and the video decoder 300 may decide to end the search process if minCostPrev-minCost is less than a threshold.

[0149]

[0166] In the above example, the threshold may be a predefined value, fixed, or signaled in the bitstream. In another example, the threshold may be adaptive based on the size of the input block. For example, the threshold may be set equal to S times the area of ​​the input block, where S is a scaling factor, which may be predefined or signaled in the bitstream.

[0150]

[0167] In another example, the difference between the two costs used above may be replaced by a cost ratio. For example, step 3) is performed by evaluating the relationship between minCost and minCostPrev. A value R is set equal to (minCostPrev-minCost) / minCostPrev. The video encoder 200 and the video decoder 300 may decide to terminate the search process if R is less than a predefined threshold.

[0151]

[0168] Thus, in one example, the video encoder 200 and the video decoder 300 may be configured to terminate the iterative search process early based on a ratio of the minimum cost through the previous search iteration to the total minimum cost through the current search iteration relative to a ratio threshold. For example, if the current search iteration is the fourth search iteration and the previous search iteration is the third search iteration, the iterative search process is terminated if the ratio of the minimum cost through the fourth search iteration to the minimum cost through the third search iteration is below the ratio threshold. In some examples, the ratio threshold may be fixed or may be based on the size of a block of video data.

[0152]

[0169] In some examples, terminating the search process early when the ratio of the total minimum cost through the current search iteration to the minimum cost through the previous search iteration falls below a ratio threshold may reduce computational complexity without substantially increasing distortion.

[0153]

[0170] In some examples, the iterative search process may be terminated early based on a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration to a ratio threshold. In some examples, the absolute value of the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration may be used in the ratio. For example, if the current search iteration is the fourth search iteration and the previous search iteration is the third search iteration, the difference between the minimum cost through the fourth search iteration and the minimum cost through the third search iteration is determined, and the ratio of the difference to the minimum cost through the third search iteration is determined. In some examples, if the ratio is below the ratio threshold, the iterative search process is terminated. In some examples, the ratio threshold may be fixed or may be based on the size of a block of video data.

[0154]

[0171] In some examples, if the iterative search process does not end early and another iteration is performed, the minimum cost through the current iteration becomes the minimum cost through the previous iteration for the next iteration. For example, if the current iteration is the fourth iteration and the previous iteration is the third iteration, and the iterative search process does not end early, the fifth iteration is performed. In the fifth iteration, the minimum cost through the fourth iteration becomes the minimum cost through the previous iteration, and the total minimum cost through the current iteration is updated to the minimum cost through the fifth iteration. Thus, the total minimum cost through the current iteration and the minimum cost through the previous iteration can be updated for each iteration.

[0155]

[0172] In another example, step 3) is applied only if the number of previous iterations exceeds some predefined threshold.

[0156]

[0173] In another example, the cost of the current search position, denoted as currCost, can be further considered along with minCost and minCostPrev to make the decision whether to terminate the iterative search process. For example, abs(currCost-minCostPrev) can be evaluated, for example by comparing it to a threshold, and the search can be terminated if the current cost, currCost, is not significantly different from minCostPrev. In another example, an additional condition can be added where abs(minCostPrev-minCost) is compared to a threshold, and if it is less than the threshold and abs(currCost-minCostPrev) is less than another threshold, the iterative search process is terminated.

[0157]

[0174] For example, if the current search iteration is the fourth search iteration and the previous search iteration is the third search iteration, then the cost of the current search position is the cost of the fourth search iteration itself, the minimum cost through the previous search iteration is the minimum cost through the third search iteration, and the total minimum cost through the current search iteration is the minimum cost through the fourth search iteration.

[0158]

[0175] In some examples, the video encoder 200 and the video decoder 300 may be configured to compare the difference between the cost of the current search position and the minimum cost through previous search iterations to a difference threshold. In some examples, the video encoder 200 and the video decoder 300 may be configured to terminate the iterative search process early if the difference between the cost of the current search position and the minimum cost through previous search iterations falls below a difference threshold.

[0159]

[0176] In some examples, the video encoder 200 and the video decoder 300 may be configured to determine a difference between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, as described above, and compare the difference to a difference threshold. In addition, the video encoder 200 and the video decoder 300 may be configured to compare the difference between the cost of the current search position and the minimum cost through a previous search iteration to a difference threshold. In some examples, the video encoder 200 and the video decoder 300 may be configured to terminate the iterative search process early when both differences fall below the respective difference thresholds. In some examples, the respective difference thresholds may be equal. In some examples, the respective difference thresholds may be different and / or independent.

[0160]

[0177] In some examples, each difference threshold may be fixed or based on the size of the block of video data, hi some examples, each difference threshold may be set to be equal to S times the area of ​​the block of video data, where S is a scaling factor that may be predefined or signaled in the bitstream.

[0161]

[0178] In some examples, the video encoder 200 and the video decoder 300 that terminate the iterative search process early, according to one or more of the examples described above, may reduce computational complexity without substantially increasing distortion.

[0162]

[0179] 9 is a block diagram illustrating an example video encoder 200 that may perform techniques of this disclosure. FIG. 9 is provided for purposes of illustration and should not be considered a limitation of the techniques as broadly illustrated and described in this disclosure. For purposes of illustration, this disclosure describes a video encoder 200 according to VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video encoding devices configured for other video coding standards and video coding formats, such as AV1 and successors of the AV1 video coding format.

[0163]

[0180] 9, 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, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a DPB 218, and an entropy coding unit 220 may be implemented in one or more processors or in processing circuits. For example, the units of the video encoder 200 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, an ASIC, or an FPGA. Moreover, video encoder 200 may include additional or alternative processors or processing circuitry for performing these and other functions.

[0164]

[0181] 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 the video data stored in the video data memory 230 from, for example, the video source 104 (FIG. 1). The DPB 218 may act as a reference picture memory, storing reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip with other components of the video encoder 200, as shown, or may be off-chip relative to those components.

[0165]

[0182] In this disclosure, references to video data memory 230 should not be construed as limited to memory internal to video encoder 200, unless specifically stated as such, or to memory external to video encoder 200, unless specifically stated as such. Rather, references to video data memory 230 should be understood as a reference memory that stores video data that video encoder 200 receives for encoding (e.g., video data for a current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of video encoder 200.

[0166]

[0183] The various units in FIG. 9 are shown to aid in understanding the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. A fixed-function circuit refers to a circuit that provides a specific function, and the operations that may be performed are predefined. A programmable circuit refers to a circuit that may be programmed to perform various tasks, and provides flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed-function circuit may execute software instructions (e.g., to receive parameters or output parameters), the type of operations that the fixed-function circuit performs is generally invariant. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.

[0167]

[0184] The video encoder 200 may include an arithmetic logic unit (ALU), a primitive functional unit (EFU), digital circuits, analog circuits, and / or a programmable core formed from programmable circuits. In examples in which the operations of the video encoder 200 are implemented using software executed by programmable circuits, the memory 106 (FIG. 1) may store instructions for the software (e.g., object code) that the video encoder 200 receives and executes, or another memory (not shown) within the video encoder 200 may store such instructions.

[0168]

[0185] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve pictures of the 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 raw video data to be encoded.

[0169]

[0186] 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 for performing video prediction according to other prediction modes. By way of 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.

[0170]

[0187] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and the rate-distortion values ​​obtained for such combinations. The encoding parameters may include partitioning of the CTUs into CUs, prediction modes for the CUs, transform types for residual data of the CUs, quantization parameters for residual data of the CUs, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than the other tested combinations.

[0171]

[0188] Video encoder 200 may partition a picture retrieved from video data memory 230 into a series of CTUs and may encapsulate one or more CTUs within a slice. Mode selection unit 202 may partition the CTUs of a picture according to a tree structure, such as the MTT structure, the QTBT structure, the superblock structure, or the quadtree structure described above. As described above, video encoder 200 may form one or more CUs from partitioning the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks."

[0172]

[0189] In general, 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 a current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TU). In the case of inter prediction of the current block, the motion estimation unit 222 may perform motion search to identify one or more closely matching reference blocks among one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 may calculate a value representing how similar a potential reference block is to the current block according to, for example, a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), etc. The motion estimation unit 222 may generally perform these calculations using a sample-by-sample difference between the current block and the reference block under consideration. Motion estimation unit 222 may identify the reference block having the lowest value resulting from these calculations, which indicates the reference block that best matches the current block.

[0173]

[0190] The motion estimation unit 222 may form one or more motion vectors (MVs) that define a position of a reference block in a reference picture relative to a position of a current block in a current picture. The motion estimation unit 222 may form the motion vectors using any of the techniques for determining motion vectors, as described above. For example, the motion estimation unit 222 may be configured to determine a motion vector for a block of video data using a decoder-side motion vector derivation process that includes an iterative search process. The iterative search process includes determining a minimum cost through previous search iterations, updating a total minimum cost through a current search iteration, and terminating the iterative search process early based on a comparison of the minimum cost through previous search iterations and the total minimum cost through the current search iteration. The motion estimation unit 222 may further be configured to encode the block of video data using the motion vectors.

[0174]

[0191] The motion estimation unit 222 may then provide the motion vector to the motion compensation unit 224. For example, in the case of unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in the case of bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vector to generate a predictive block. For example, the motion compensation unit 224 may use the motion vector to retrieve data of a reference block. As another example, if the motion vector has fractional sample precision, the motion compensation unit 224 may interpolate values ​​for the predictive block according to one or more interpolation filters. Moreover, in the case of bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, through sample-wise averaging or weighted averaging.

[0175]

[0192] When operating according to the AV1 video coding format, the motion estimation unit 222 and the motion compensation unit 224 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or synthetic inter-intra prediction.

[0176]

[0193] As another example, in the case of intra prediction or intra predictive coding, the intra prediction unit 226 may generate a predictive block from samples neighboring the current block. For example, in the case of a directional mode, the intra prediction unit 226 may generally mathematically combine values ​​of neighboring samples to populate these calculated values ​​in a defined direction across the current block to generate a predictive block. As another example, in the case of a DC mode, the intra prediction unit 226 may calculate an average of samples neighboring the current block and generate a predictive block to include this resulting average for each sample of the predictive block.

[0177]

[0194] When operating according to the AV1 video coding format, intra prediction unit 226 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, chroma-from-luma (CFL) prediction, intra block copy (IBC), and / or color palette modes. Mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes.

[0178]

[0195] The mode select unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives a raw, uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode select unit 202. The residual generation unit 204 calculates sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between 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.

[0179]

[0196] In an example where the mode select unit 202 partitions a 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 having various sizes. As indicated above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a 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 a PU size of 2N×2N or N×N for intra prediction, and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or similar for inter 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 prediction.

[0180]

[0197] In examples where the mode select unit 202 does not further partition the CUs into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As 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 CU sizes of 2N×2N, 2N×N, or N×2N.

[0181]

[0198] For other video coding techniques, such as intra block copy mode coding, affine mode coding, and linear model (LM) mode coding, as some examples, the mode select unit 202 generates a predictive block for the current block being coded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, the mode select unit 202 may not generate a predictive block, but instead generate syntax elements that indicate a scheme for reconstructing the block based on a selected palette. In such modes, the mode select unit 202 may provide these syntax elements to the entropy coding unit 220 to be coded.

[0182]

[0199] As described above, the residual generation unit 204 receives video data for a current block and a corresponding predictive 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 predictive block and the current block.

[0183]

[0200] 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"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, 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, transform processing unit 206 may perform multiple transforms, e.g., a linear transform and a secondary transform, such as a rotation transform, on the residual block. In some examples, transform processing unit 206 does not apply a transform to the residual block.

[0184]

[0201] When operating according to AV1, transform processing unit 206 may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a horizontal / vertical transform combination that may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), an inverse ADST (e.g., ADST in reverse order), and an identity transform (IDTX). When using an identity transform, the transform is skipped in one of the vertical or horizontal directions. In some examples, the transform process may be skipped.

[0185]

[0202] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate 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 transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may result in loss of information, and thus the quantized transform coefficients may be less accurate than the original transform coefficients generated by the transform processing unit 206.

[0186]

[0203] Inverse quantization unit 210 and 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. Reconstruction unit 214 may generate a reconstructed block that corresponds to the current block (possibly with some distortion) based on the reconstructed residual block and the predictive block generated by mode selection unit 202. For example, reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the predictive block generated by mode selection unit 202 to generate the reconstructed block.

[0187]

[0204] Filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. The operations of filter unit 216 may be skipped in some examples.

[0188]

[0205] When operating according to AV1, filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along edges of a CU. In other examples, filter unit 216 may apply a constrained directional enhancement filter (CDEF), which may be applied after deblocking and may include application of a non-separable, nonlinear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop restoration filter, which may be applied after CDEF and may include a separable symmetric normalized Wiener filter or a dual autoinduction filter.

[0189]

[0206] Video encoder 200 stores the reconstructed blocks in DPB 218. For example, in examples where the operations of filter unit 216 are not performed, reconstruction unit 214 may store the reconstructed blocks in DPB 218. In examples where the operations of filter unit 216 are performed, filter unit 216 may store the filtered reconstructed blocks in DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve reference pictures formed from the reconstructed (and potentially filtered) blocks from DPB 218 to inter predict blocks of a later-encoded picture. In addition, intra prediction unit 226 may use reconstructed blocks in DPB 218 of the current picture to intra predict other blocks in the current picture.

[0190]

[0207] In general, the entropy encoding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy encoding unit 220 may entropy encode quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy encoding unit 220 may entropy encode predictive syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from the mode selection unit 202. The entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which are another example of video data, to generate entropy encoded data. For example, entropy encoding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-length-to-variable-length (V2V) coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioned entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy coded.

[0191]

[0208] The video encoder 200 may output a bitstream that includes entropy coding syntax elements needed to reconstruct blocks of a slice or picture. In particular, the entropy coding unit 220 may output the bitstream.

[0192]

[0209] According to AV1, the entropy encoding unit 220 may be configured as a symbol-to-symbol adaptive multi-symbol arithmetic coder. A syntax element in AV1 includes an alphabet of N elements, and a context (e.g., a probability model) includes a set of N probabilities. The entropy encoding unit 220 may store the probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). The entropy encoding unit 22 may perform recursive scaling with an update factor based on the alphabet size to update the context.

[0193]

[0210] The operations described above are described with respect to blocks. Such descriptions should be understood as being operations for a luma coding block and / or a chroma coding block. As described above, in some examples, the luma coding block and the chroma coding block are the luma component and the chroma component of a CU. In some examples, the luma coding block and the chroma coding block are the luma component and the chroma component of a PU.

[0194]

[0211] In some examples, operations performed with respect to luma coding blocks need not be repeated for chroma coding blocks. As one example, operations to identify motion vectors (MVs) and reference pictures for luma coding blocks need not be repeated to identify MVs and reference pictures for chroma blocks. Rather, MVs for luma coding blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.

[0195]

[0212] Video encoder 200 represents an example of a device configured to encode video data, including a memory configured to store the video data and one or more processing units configured to determine motion vectors for blocks of the video data using a decoder-side motion vector derivation process implemented in a circuit and including an iterative search process, the iterative search process including calculating a minimum cost of previous search iterations and early terminating the iterative search process based on the minimum cost of the previous search iterations, and to code the blocks of the video data using the motion vectors.

[0196]

[0213] 10 is a block diagram illustrating an example video decoder 300 that may perform techniques of this disclosure. FIG. 10 is provided for purposes of illustration and not to limit the techniques as broadly illustrated and described in this disclosure. For purposes of illustration, this disclosure describes a video decoder 300 according to VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video coding devices configured according to other video coding standards.

[0197]

[0214] In the example of FIG. 10, the video decoder 300 includes a coding 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. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Moreover, the video decoder 300 may include additional or alternative processors or processing circuits for performing these and other functions.

[0198]

[0215] Prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. Prediction processing unit 304 may include additional units for performing prediction according to other prediction modes. By way of example, prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, video decoder 300 may include more, fewer, or different functional components.

[0199]

[0216] When operating according to AV1, the motion compensation unit 316 may be configured to decode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or synthetic inter-intra prediction, as described above. The intra prediction unit 318 may be configured to decode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL, intra block copy (IBC), and / or color palette mode, as described above.

[0200]

[0217] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be obtained, for example, from the computer-readable medium 110 (FIG. 1). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. The CPB memory 320 may also store video data other than syntax elements of a coded picture, such as temporary data representing output from various units of the video decoder 300. The DPB 314 generally stores decoded pictures that the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or by separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or may be off-chip relative to those components.

[0201]

[0218] Additionally or alternatively, in some examples, video decoder 300 may retrieve coded video data from memory 120 (FIG. 1). That is, memory 120 may store data such as those discussed above for CPB memory 320. Similarly, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300.

[0202]

[0219] The various units shown in FIG. 10 are presented to aid in understanding the operations performed by the video decoder 300. The units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. As with FIG. 9, fixed function circuits refer to circuits that provide a particular function and are predefined in the operations that may be performed. Programmable circuits refer to circuits that may be programmed to perform various tasks and provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed function circuit may execute software instructions (e.g., to receive a parameter or output a parameter), the type of operation that the fixed function circuit performs is generally unchanged. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.

[0203]

[0220] The video decoder 300 may include a programmable core formed from ALUs, EFUs, digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video decoder 300 are performed by software executing on programmable circuits, on-chip or off-chip memory may store instructions (e.g., object code) of the software that the video decoder 300 receives and executes.

[0204]

[0221] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to recover 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.

[0205]

[0222] In general, 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 (wherein the block currently being reconstructed, e.g., decoded, may be referred to as the “current block”).

[0206]

[0223] The entropy decoding unit 302 may entropy decode syntax elements that specify the quantized transform coefficients of the quantized transform coefficient block as well as transform information, such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization, and similarly the degree of inverse quantization that the inverse quantization unit 306 should apply. 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.

[0207]

[0224] 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 transform, or another inverse transform to the transform coefficient block.

[0208] Further, prediction processing unit 304 generates a prediction block according to 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 may generate a prediction block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 from which to retrieve a reference block, as well as a motion vector that specifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. Motion compensation unit 316 may generally perform an inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (FIG. 9).

[0209]

[0225] The motion compensation unit 316 may form the motion vector using any of the techniques for determining motion vectors, as described above. For example, the motion compensation unit 316 may be configured to determine the motion vector for the block of video data using a decoder-side motion vector derivation process that includes an iterative search process that includes determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and terminating the iterative search process early based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration. The motion compensation unit 316 may be further configured to decode the block of video data using the motion vector.

[0210]

[0226] 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 perform an intra prediction process in a manner substantially similar to that described with respect to the intra prediction unit 226 (FIG. 9). The intra prediction unit 318 may retrieve data of samples neighboring the current block from the DPB 314.

[0211]

[0227] The reconstruction unit 310 may reconstruct the current block using the predictive block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the predictive block to reconstruct the current block.

[0212]

[0228] Filter unit 312 may perform one or more filter operations on the reconstructed block. For example, filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along edges of the reconstructed block. In all examples, the operations of filter unit 312 may not necessarily be performed.

[0213]

[0229] The video decoder 300 may store the reconstructed blocks in the DPB 314. For example, in examples where the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed blocks in the DPB 314. In examples where the operations of the filter unit 312 are performed, the filter unit 312 may store the filtered reconstructed blocks in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation. Additionally, the video decoder 300 may output the decoded pictures (e.g., decoded video) from the DPB 314 for later presentation on a display device, such as the display device 118 of FIG. 1.

[0214]

[0230] In this manner, the video decoder 300 represents one example of a video decoding device that includes a memory configured to store video data and one or more processing units configured to determine motion vectors for blocks of the video data using a decoder-side motion vector derivation process implemented in a circuit and including an iterative search process, the iterative search process including calculating a minimum cost of previous search iterations and early terminating the iterative search process based on the minimum cost of the previous search iterations, and to code the blocks of the video data using the motion vectors.

[0215]

[0231] 11 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video encoder 200 (FIGS. 1 and 9), it should be understood that other devices may be configured to perform a method similar to that of FIG.

[0216]

[0232] In this example, video encoder 200 may first predict the current block (350). For example, video encoder 200 may form a predictive block for the current block. Video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, video encoder 200 may calculate a difference between the original uncoded block and the predictive block for the current block. Video encoder 200 may then transform the residual block and quantize transform coefficients of the residual block (354). Video encoder 200 may then scan the quantized transform coefficients of the residual block (356). During or following the scan, video encoder 200 may entropy code the transform coefficients (358). For example, video encoder 200 may code the transform coefficients using CAVLC or CABAC. Video encoder 200 may then output entropy coded data for the block (360).

[0217]

[0233] 12 is a flowchart illustrating an example method for decoding a current block of video data in accordance with the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video decoder 300 (FIGS. 1 and 10), it should be understood that other devices may be configured to perform a method similar to that of FIG.

[0218]

[0234] The video decoder 300 may receive entropy coded data for the current block, such as the entropy coded prediction information and the entropy coded data of the transform coefficients of the 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 reconstruct the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, e.g., using an intra prediction mode or an inter prediction mode as indicated by the prediction information for the current block, to calculate a predictive block for the current block (374). The video decoder 300 may then inverse scan the reconstructed transform coefficients to create a block of quantized transform coefficients (376). The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (378). The video decoder 300 may finally decode the current block by combining the predictive block and the residual block (380).

[0219]

[0235] 13 is a flowchart illustrating an example of a method for early termination of an iterative search process in accordance with techniques of this disclosure. The current block may comprise a current CU. The iterative search process will be described with reference to being performed by video encoder 200 and / or video decoder 300.

[0220]

[0236] The video encoder 200 / decoder 300 may determine motion vectors for blocks of video data using a decoder-side motion vector derivation process that includes an iterative search process. In one example, in the iterative search process, the video encoder 200 / decoder 300 may be configured to perform a first search iteration and set a minimum cost through the previous search iteration to zero (1300). The video encoder 200 / decoder 300 may be further configured to determine a cost through the first search iteration and set a total minimum cost through the current search iteration as an overall cost through the first search iteration (1302). The video encoder 200 / decoder 300 may be further configured to determine whether to terminate the iterative search process based on comparing the minimum cost through the previous search iteration to the total minimum cost through the current search iteration (1304). If the video encoder 200 / decoder 300 determines to terminate the iterative search process early, the video encoder 200 / decoder 300 is further configured to encode / decode (1305), respectively, the block of video data using the motion vector that has the minimum cost up to that point in the search process.

[0221]

[0237] If the video encoder 200 / decoder 300 determines not to terminate the iterative search process early, the video encoder 200 / decoder 300 is further configured to perform a second search iteration and set the minimum cost through the previous search iteration as the minimum cost through the first search iteration (1306). The video encoder 200 / decoder 300 may be further configured to update the total minimum cost through the current search iteration as the overall cost through the second search iteration (1308). The video encoder 200 / decoder 300 may be further configured to determine whether to terminate the iterative search process (1310) based on comparing the minimum cost through the previous search iteration to the total minimum cost through the current search iteration. If the video encoder 200 / decoder 300 determines to terminate the iterative search process early, the video encoder 200 / decoder 300 is further configured to respectively encode / decode (1305) the block of video data using the motion vector having the minimum cost up to that point in the search process.

[0222]

[0238] If the video encoder 200 / decoder 300 determines not to terminate the iterative search process early, the video encoder 200 / decoder 300 is further configured to perform a third search iteration and set the minimum cost through the previous search iteration as the minimum cost through the second search iteration (1312). The video encoder 200 / decoder 300 may be further configured to update the total minimum cost through the current search iteration as the overall cost through the third search iteration (1314). The video encoder 200 / decoder 300 may be further configured to determine whether to terminate the iterative search process (1316) based on comparing the minimum cost through the previous search iteration to the total minimum cost through the current search iteration. If the video encoder 200 / decoder 300 determines to terminate the iterative search process early, the video encoder 200 / decoder 300 is further configured to respectively encode / decode (1305) the block of video data using the motion vector having the minimum cost up to that point in the search process.

[0223]

[0239] If the video encoder 200 / decoder 300 determines not to terminate the iterative search process early, the video encoder 200 / decoder 300 is further configured to perform (1318) the next search iteration according to the previous search iteration until the video encoder 200 / decoder 300 terminates the iterative search process.

[0224]

[0240] In some examples, early termination of the iterative search process based on a comparison of the minimum cost through a previous search iteration to the total minimum cost through a current search iteration may be performed based on multiple comparisons.

[0225]

[0241] 14 is a flowchart illustrating another example method for decoding a block of video data in accordance with the techniques of this disclosure. The technique of FIG. 14 may be performed by one or more structural components of a video decoder 300, including a motion compensation unit 316.

[0226]

[0242] In one example of this disclosure, the video decoder 300 may be configured to determine (1400) a motion vector for a block of video data using a decoder-side motion vector derivation process that includes an iterative search process. In the iterative search process, the video decoder 300 may be further configured to determine (1402) a minimum cost through a previous search iteration, update a total minimum cost through a current search iteration (1404), and terminate (1406) the iterative search process early based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration. The video decoder 300 may then decode (1408) the block of video data using the motion vector.

[0227]

[0243] In one example, the video decoder 300 may be configured to calculate a total minimum cost over a current search iteration based on at least a current subset of the candidate positions.

[0228]

[0244] In another example, to terminate the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, the video decoder 300 may be configured to calculate a difference between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, and to terminate the iterative search process early based on the difference relative to a difference threshold.

[0229]

[0245] In another example, to terminate the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, the video decoder 300 may be configured to calculate a ratio between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, and to terminate the iterative search process early based on the ratio to a ratio threshold.

[0230]

[0246] In another example, to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, the video decoder 300 may be configured to calculate a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, calculate a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminate the iterative search process early based on the ratio to a ratio threshold.

[0231]

[0247] In another example, the video decoder 300 may be configured to terminate the iterative search process early based on a minimum cost through a previous search iteration, a total minimum cost through a current search iteration, and a minimum cost of the current search iteration. For example, the video decoder 300 may be configured to terminate the iterative search process early based on a comparison of the minimum cost through a previous search iteration to the total minimum cost through a current search iteration, and a comparison of the minimum cost through a previous search iteration to the minimum cost of the current search iteration.

[0232]

[0248] 15 is a flowchart illustrating another example method for encoding a block of video data in accordance with the techniques of this disclosure. The technique of FIG. 15 may be performed by one or more structural components of video encoder 200, including motion estimation unit 222 and / or motion compensation unit 224.

[0233]

[0249] In one example of this disclosure, the video encoder 200 may be configured to determine (1500) a motion vector for a block of video data using a decoder-side motion vector derivation process that includes an iterative search process. In the iterative search process, the video decoder 300 may be further configured to determine (1502) a minimum cost through a previous search iteration, update a total minimum cost through a current search iteration (1504), and terminate (1506) the iterative search process early based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration. The video encoder 200 may then encode (1508) the block of video data using the motion vector.

[0234]

[0250] In one example, the video encoder 200 may be configured to calculate a total minimum cost over a current search iteration based on at least a current subset of the candidate positions.

[0235]

[0251] In another example, to terminate the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, the video encoder 200 may be configured to calculate a difference between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, and to terminate the iterative search process early based on the difference relative to a difference threshold.

[0236]

[0252] In another example, to terminate the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, the video encoder 200 may be configured to calculate a ratio between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, and to terminate the iterative search process early based on the ratio to a ratio threshold.

[0237]

[0253] In another example, to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, the video encoder 200 may be configured to calculate a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, calculate a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminate the iterative search process early based on the ratio to a ratio threshold.

[0238]

[0254] In another example, the video encoder 200 may be configured to terminate the iterative search process early based on a minimum cost through a previous search iteration, a total minimum cost through a current search iteration, and a minimum cost of the current search iteration. For example, the video decoder 200 may be configured to terminate the iterative search process early based on a comparison of the minimum cost through a previous search iteration to the total minimum cost through a current search iteration, and a comparison of the minimum cost through a previous search iteration to the minimum cost of the current search iteration.

[0239]

[0255] Additional methods and devices of the present disclosure are described in the following aspects.

[0240]

[0256] Aspect 1A - A method of coding video data, comprising: determining a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, the iterative search process including calculating a minimum cost of a previous search iteration and early terminating the iterative search process based on the minimum cost of the previous search iteration; determining the motion vector; and coding the block of the video data using the motion vector.

[0241]

[0257] The method of embodiment 1A, further comprising updating the determined minimum cost for the iterative search process.

[0242]

[0258] Aspect 3A - The method of aspect 2A, wherein terminating the iterative search process early based on a minimum cost of a previous search iteration includes calculating a difference or ratio between the minimum cost of the previous search iteration and a minimum cost determined for the iterative search process, and terminating the iterative search process early based on the difference or ratio to a threshold value.

[0243]

[0259] Aspect 4A - The method of aspect 2A, wherein terminating the iterative search process early based on a minimum cost of a previous search iteration includes terminating the iterative search process early based on a minimum cost of a previous search iteration, a minimum cost determined for the iterative search process, and a minimum cost of a current iteration.

[0244]

[0260] Embodiment 5A - The method of embodiment 1A, wherein the iterative search process comprises three or more iterations.

[0245]

[0261] Embodiment 6A - The method of embodiment 1A, wherein the iterative search process comprises bidirectional matching or template matching.

[0246]

[0262] Embodiment 7A - The method of any of embodiments 1A to 6A, wherein the coding includes decoding.

[0247]

[0263] Embodiment 8A - The method of any of embodiments 1A to 6A, wherein the coding comprises encoding.

[0248]

[0264] Example 9A - A device for coding video data, comprising one or more means for performing the method described in any of examples 1A to 8A.

[0249]

[0265] Embodiment 10A-The device of embodiment 9A, wherein the one or more means comprise one or more processors implemented in circuitry.

[0250]

[0266] Example 11A - A device as described in any of examples 9A and 10A, further comprising a memory for storing video data.

[0251]

[0267] Example 12A - The device of any of examples 9A-11A, further comprising a display configured to display the decoded video data.

[0252]

[0268]

[0041] Example 13A - The device of any of Examples 9A-12A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0253]

[0269] Example 14A - The device of any of examples 9A-13A, wherein the device comprises a video decoder.

[0254]

[0270] Example 15A - The device of any of examples 9A to 14A, wherein the device comprises a video encoder.

[0255]

[0271] Aspect 16A - A computer-readable storage medium storing instructions that, when executed, cause one or more processors to perform the method of any of aspects 1A to 8A.

[0256]

[0272] Aspect 17A - A device for coding video data, comprising: means for determining a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, the iterative search process including calculating a minimum cost of previous search iterations and early terminating the iterative search process based on the minimum cost of the previous search iteration; and means for determining the motion vector; and means for coding the block of the video data using the motion vector.

[0257]

[0273] Aspect 18A - A method of coding video data, comprising: determining a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, the iterative search process including calculating a minimum cost of a previous search iteration and early terminating the iterative search process based on the minimum cost of the previous search iteration; determining the motion vector; and coding the block of the video data using the motion vector.

[0258]

[0274]

[0041] Example 19A - The method of example 18A, further comprising updating the determined minimum cost for the iterative search process.

[0259]

[0275] Aspect 20A - The method of aspect 19A, wherein terminating the iterative search process early based on a minimum cost of a previous search iteration includes calculating a difference or ratio between the minimum cost of the previous search iteration and a minimum cost determined for the iterative search process, and terminating the iterative search process early based on the difference or ratio to a threshold value.

[0260]

[0276] Example 21A - The method of example 19A, wherein terminating the iterative search process early based on a minimum cost of a previous search iteration includes terminating the iterative search process early based on a minimum cost of a previous search iteration, a minimum cost determined for the iterative search process, and a minimum cost of a current iteration.

[0261]

[0277] Embodiment 22A - The method of any of embodiments 18A to 21A, wherein the iterative search process comprises three or more iterations.

[0262]

[0278]

[0041] Example 23A - The method of any of examples 18A to 22A, wherein the iterative search process includes bidirectional matching or template matching.

[0263]

[0279] Example 24A - A device for coding video data, comprising one or more means for performing the methods of any of examples 18A to 23A.

[0264]

[0280] Aspect 1B - A method of encoding or decoding video data includes determining a motion vector for a block of video data using a decoder-side motion vector derivation process that includes performing an iterative search process, where performing the iterative search process includes determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, determining the motion vector, and encoding or decoding the block of video data using the motion vector.

[0265]

[0281] Embodiment 2B - The method of embodiment 1B, wherein the previous search iteration immediately precedes the current search iteration in the iterative search process.

[0266]

[0282] Embodiment 3B - The method of embodiment 1B, further comprising: calculating a total minimum cost through the current search iteration based on at least the current subset of candidate locations.

[0267]

[0283] Aspect 4B - The method of aspect 1B, wherein terminating the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration includes calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminating the iterative search process early based on the difference relative to a difference threshold.

[0268]

[0284] Embodiment 5B - The method of embodiment 4B, wherein the difference threshold is based on a size of the block.

[0269]

[0285] Embodiment 6B - The method of embodiment 1B, wherein terminating the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration includes calculating a ratio between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, and terminating the iterative search process early based on the ratio to a ratio threshold.

[0270]

[0286] Embodiment 7B - The method of embodiment 6B, wherein the ratio threshold is fixed or based on the size of the block.

[0271]

[0287] Embodiment 8B - The method of embodiment 1B, wherein terminating the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration includes calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, calculating a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminating the iterative search process early based on the ratio to a ratio threshold.

[0272]

[0288] Example 9B - The method of example 8B, wherein the ratio threshold is fixed or based on the size of the block.

[0273]

[0289] Aspect 10B - The method of aspect 1B, wherein terminating the iterative search process early based on a comparison of the minimum cost through a previous search iteration to the total minimum cost through a current search iteration includes terminating the iterative search process early based on a comparison of the minimum cost through a previous search iteration to the total minimum cost through a current search iteration, and a comparison of the minimum cost through a previous search iteration to the minimum cost of the current search iteration.

[0274]

[0290] Embodiment 11B - The method of embodiment 1B, wherein the iterative search process comprises three or more iterations.

[0275]

[0291] Example 12B - The method of example 1B, wherein performing the iterative search process includes performing bidirectional matching or template matching.

[0276]

[0292] Aspect 13B - A device for processing video data includes a memory configured to store the video data and a processing circuit, wherein the processing circuit is configured to determine a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, where to perform the iterative search process, the processing circuit is further configured to determine a minimum cost through a previous search iteration, update a total minimum cost through a current search iteration, and terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and is configured to encode or decode the block of the video data using the motion vector.

[0277]

[0293] Embodiment 14B - The device of embodiment 13B, wherein the previous search iteration immediately precedes the current search iteration.

[0278]

[0294] Example 15B - The device of Example 13B, wherein to perform the iterative search process, the processing circuitry is further configured to calculate a total minimum cost over a current search iteration based on at least a current subset of candidate locations.

[0279]

[0295] Example 16B - The device described in Example 13B, wherein the processing circuitry is further configured to calculate a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to terminate the iterative search process early based on the difference relative to a difference threshold.

[0280]

[0296]

[0041] Example 17B - The device of example 16B, wherein the difference threshold is based on a size of the block.

[0281]

[0297] Example 18B - The device described in Example 13B, wherein the processing circuitry is further configured to calculate a ratio between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to terminate the iterative search process early based on the ratio to a ratio threshold.

[0282]

[0298] Example 19B - The device of example 18B, wherein the ratio threshold is fixed or based on the size of the block.

[0283]

[0299] Aspect 20B - The device of aspect 13B, further configured to: terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculate a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculate a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; and terminate the iterative search process early based on the ratio to a ratio threshold.

[0284]

[0300] Embodiment 21B - The device of embodiment 20B, wherein the ratio threshold is fixed or based on the size of the block.

[0285]

[0301] Aspect 22B - The device of aspect 13B, wherein the processing circuitry is further configured to terminate the iterative search process early based on a comparison of the minimum cost through the previous search iteration to the total minimum cost through the current search iteration, and a comparison of the minimum cost through the previous search iteration to the minimum cost of the current search iteration, in order to terminate the iterative search process early based on a comparison of the minimum cost through the previous search iteration to the total minimum cost through the current search iteration, and a comparison of the minimum cost through the previous search iteration to the minimum cost of the current search iteration.

[0286]

[0302] Embodiment 23B - The device of embodiment 13B, wherein the iterative search process includes three or more iterations.

[0287]

[0303] Example 24B - The device of Example 13B, wherein to perform the iterative search process, the processing circuitry is configured to perform bidirectional matching or template matching.

[0288]

[0304] Example 25B - The device of example 13B, further comprising a display configured to display video data.

[0289]

[0305] Aspect 26B - The device of aspect 13B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0290]

[0306] Example 27B - A device as described in example 13, wherein the device comprises a camera configured to capture video data.

[0291]

[0307] Aspect 1C - A method of encoding or decoding video data includes determining a motion vector for a block of video data using a decoder-side motion vector derivation process that includes performing an iterative search process, where performing the iterative search process includes determining a minimum cost through a previous search iteration, updating a total minimum cost through a current search iteration, and early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, determining the motion vector, and encoding or decoding the block of video data using the motion vector.

[0292]

[0308] Embodiment 2C - The method of embodiment 1C, wherein the previous search iteration immediately precedes the current search iteration in the iterative search process.

[0293]

[0309] Embodiment 3C - The method of embodiment 1C and 2C, further comprising: calculating a total minimum cost through the current search iteration based on at least the current subset of candidate locations.

[0294]

[0310] Embodiment 4C - The method of any of embodiments 1C to 3C, wherein terminating the iterative search process early based on a comparison between a minimum cost through a previous search iteration and a total minimum cost through a current search iteration comprises calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminating the iterative search process early based on the difference relative to a difference threshold.

[0295]

[0311] Embodiment 5C - The method of embodiment 4C, wherein the difference threshold is based on a size of the block.

[0296]

[0312] Embodiment 6C - The method of any of embodiments 1C to 5C, wherein terminating the iterative search process early based on a comparison between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration comprises calculating a ratio between the minimum cost through a previous search iteration and the total minimum cost through a current search iteration, and terminating the iterative search process early based on the ratio to a ratio threshold.

[0297]

[0313] Embodiment 7C - The method of embodiment 6C, wherein the ratio threshold is fixed or based on the size of the block.

[0298]

[0314] Embodiment 8C - A method as described in any of embodiments 1C to 7C, wherein terminating the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration includes calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, calculating a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminating the iterative search process early based on the ratio to a ratio threshold.

[0299]

[0315] Embodiment 9C - The method of embodiment 8C, wherein the ratio threshold is fixed or based on the size of the block.

[0300]

[0316] Embodiment 10C - The method of any of embodiments 1C to 9C, wherein terminating the iterative search process early based on a comparison of the minimum cost through the previous search iteration to the total minimum cost through the current search iteration comprises terminating the iterative search process early based on a comparison of the minimum cost through the previous search iteration to the total minimum cost through the current search iteration, and a comparison of the minimum cost through the previous search iteration to the minimum cost of the current search iteration.

[0301]

[0317] Embodiment 11C - The method of any of embodiments 1C to 10C, wherein the iterative search process comprises three or more iterations.

[0302]

[0318]

[0041] Example 12C - The method of any of examples 1C to 11C, wherein performing an iterative search process includes performing bidirectional matching or template matching.

[0303]

[0319] Aspect 13C - A device for processing video data includes a memory configured to store the video data and a processing circuit, wherein the processing circuit is configured to determine a motion vector for a block of the video data using a decoder-side motion vector derivation process including an iterative search process, where to perform the iterative search process, the processing circuit is further configured to determine a minimum cost through a previous search iteration, update a total minimum cost through a current search iteration, and terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and is configured to encode or decode the block of the video data using the motion vector.

[0304]

[0320] Embodiment 14C - The device of embodiment 13C, wherein the previous search iteration immediately precedes the current search iteration.

[0305]

[0321] Example 15C - A device described in any of Examples 13C and 14C, wherein to perform the iterative search process, the processing circuitry is further configured to calculate a total minimum cost over a current search iteration based on at least a current subset of candidate locations.

[0306]

[0322] Embodiment 16C - A device described in any of embodiments 13C to 15C, wherein the processing circuitry is further configured to calculate a difference between the minimum cost from the previous search iteration and the total minimum cost from the current search iteration, and to terminate the iterative search process early based on a comparison between the minimum cost from the previous search iteration and the total minimum cost from the current search iteration, and to terminate the iterative search process early based on the difference relative to a difference threshold.

[0307]

[0323]

[0041] Example 17C - The device of example 16C, wherein the difference threshold is based on a size of the block.

[0308]

[0324] Embodiment 18C - A device described in any of embodiments 13C to 17C, wherein the processing circuitry is further configured to calculate a ratio between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and to terminate the iterative search process early based on the ratio to a ratio threshold.

[0309]

[0325] Embodiment 19C - The device of embodiment 18C, wherein the ratio threshold is fixed or based on the size of the block.

[0310]

[0326] Embodiment 20C - A device as described in any of embodiments 13C to 19C, wherein the processing circuitry is further configured to calculate a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, calculate a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and terminate the iterative search process early based on the ratio to a ratio threshold.

[0311]

[0327] Embodiment 21C - A device according to embodiment 20C, wherein the ratio threshold is fixed or based on the size of the block.

[0312]

[0328] A device as described in any of aspects 13C to 21C, wherein the processing circuitry is further configured to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and a comparison between the minimum cost through the previous search iteration and the minimum cost of the current search iteration, to terminate the iterative search process early based on a comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and a comparison between the minimum cost through the previous search iteration and the minimum cost of the current search iteration.

[0313]

[0329] Embodiment 23C - A device of any one of embodiments 13C to 22C, wherein the iterative search process comprises three or more iterations.

[0314]

[0330] Embodiment 24C - A device of any of embodiments 13C to 23C, wherein to perform the iterative search process, the processing circuitry is configured to perform bidirectional matching or template matching.

[0315]

[0331] Embodiment 25C - A device as described in any of embodiments 13C to 24C, further comprising a display configured to display video data.

[0316]

[0332] Aspect 26C - A device according to any of aspects 13C to 25C, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0317]

[0333] Embodiment 27C - A device described in any of embodiments 13C to 26C, wherein the device comprises a camera configured to capture video data.

[0318]

[0334] It should be appreciated that, depending on the example, some acts or events of any of the techniques described herein may be performed in a different order, or may be added, combined, or omitted entirely (e.g., not all acts or events described are necessary to the practice of the techniques). Moreover, in some examples, acts or events may be performed in parallel rather than sequentially, for example, through multi-threaded processing, interrupt processing, or multiple processors.

[0319]

[0335] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or a communication medium, which includes any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. As such, a computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementation of the techniques described in this disclosure. A computer program product may include a computer-readable medium.

[0320]

[0336] By way of example, and not limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included within the definition of media. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically and discs reproduce data optically using lasers. Combinations of the above should also be included within the scope of computer readable media.

[0321]

[0337] The 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 circuitry. Thus, the terms "processor" and "processing circuitry" as used herein may refer to any of the above structures or any other structures suitable for implementing the techniques described herein. In addition, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. The techniques may also be fully implemented in one or more circuits or logic elements.

[0322]

[0338] The techniques of the present disclosure may be implemented in a wide 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 have been described in this disclosure to highlight functional aspects of devices configured to implement the disclosed techniques, but they do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or may be provided by a collection of interoperable hardware units, including one or more processors as described above, in conjunction with suitable software and / or firmware.

[0323]

[0339] Various examples have been described. These and other examples are within the scope of the following claims.

Claims

1. 1. A method for encoding or decoding video data, comprising the steps of: determining a motion vector for a block of video data using a decoder-side motion vector derivation process that includes performing an iterative search process, the performing of the iterative search process comprising: determining a minimum cost through a previous search iteration; Updating the total minimum cost through the current search iteration; and determining a motion vector including early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; encoding or decoding said block of video data using said motion vectors; A method comprising:

2. The method of claim 1 , wherein the previous search iteration immediately precedes the current search iteration in the iterative search process.

3. calculating the total minimum cost through the current search iteration based on at least a current subset of candidate locations; The method of claim 1 further comprising:

4. early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; early terminating the iterative search process based on the difference relative to a difference threshold; The method of claim 1 , comprising:

5. The method of claim 4 , wherein the difference threshold is based on a size of the block.

6. early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a ratio between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; early terminating the iterative search process based on the ratio relative to a ratio threshold. The method of claim 1 , comprising:

7. The method of claim 6 , wherein the ratio threshold is fixed or based on the size of the block.

8. early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a ratio of the minimum cost through the previous search iteration to a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; early terminating the iterative search process based on the ratio relative to a ratio threshold. The method of claim 1 , comprising:

9. The method of claim 8 , wherein the ratio threshold is fixed or based on the size of the block.

10. early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and based on a comparison between the minimum cost through the previous search iteration and a minimum cost of the current search iteration. The method of claim 1 , comprising:

11. The method of claim 1 , wherein the iterative search process comprises three or more iterations.

12. The method of claim 1 , wherein performing the iterative search process comprises performing bidirectional matching or template matching.

13. 1. A device for processing video data, comprising: a memory configured to store the video data; and a processing circuit, the processing circuit comprising: and configured to determine motion vectors for blocks of the video data using a decoder-side motion vector derivation process including an iterative search process, wherein to perform the iterative search process, the processing circuitry: Determine the minimum cost through the previous search iteration, Update the total minimum cost through the current search iteration, Early terminating the iterative search process based on a comparison of the minimum cost through the previous search iteration and the total minimum cost through the current search iteration. The method further comprises: Encoding or decoding the block of video data using the motion vector. The device is configured to:

14. The device of claim 13 , wherein the previous search iteration immediately precedes the current search iteration.

15. The device of claim 13 , wherein to perform the iterative search process, the processing circuitry is further configured to calculate the total minimum cost through the current search iteration based on at least a current subset of candidate locations.

16. the processing circuitry for early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; Early terminating the iterative search process based on the difference relative to a difference threshold. The device of claim 13 further configured to:

17. The device of claim 16 , wherein the difference threshold is based on a size of the block.

18. the processing circuitry for early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a ratio of the minimum cost through the current search iteration to the total minimum cost through the current search iteration; Early terminating the iterative search process based on the ratio relative to a ratio threshold. The device of claim 13 further configured to:

19. The device of claim 18 , wherein the ratio threshold is fixed or based on a size of the block.

20. the processing circuitry for early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; calculating a ratio of the minimum cost through the previous search iteration to the difference between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; The device of claim 13 , further configured to terminate the iterative search process early based on the ratio relative to a ratio threshold.

21. The device of claim 20 , wherein the ratio threshold is fixed or based on a size of the block.

22. the processing circuitry for early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration; early terminating the iterative search process based on the comparison between the minimum cost through the previous search iteration and the total minimum cost through the current search iteration, and based on a comparison between the minimum cost through the previous search iteration and a minimum cost of the current search iteration. The device of claim 13 further configured to:

23. The device of claim 13 , wherein the iterative search process comprises three or more iterations.

24. The device of claim 13 , wherein to perform the iterative search process, the processing circuitry is configured to perform bidirectional matching or template matching.

25. The device of claim 13 , further comprising a display configured to display the video data.

26. The device of claim 13 , wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

27. The device of claim 13 , wherein the device comprises a camera configured to capture the video data.

Citation Information

Patent Citations

  • Frame rate conversion method, frame rate conversion device and frame rate conversion program

    JP2011049633A

  • Image decoding device, image decoding method, and program

    JP6914462B2

  • Methods and apparatuses for decoder-side motion vector refinement in video coding

    WO2020257365A1