Block vector storage and tool reconciliation for block vector related video coding

By storing block vectors in IntraTMP mode and exporting candidate lists in the video decoder, the problem of low storage and prediction efficiency in the prior art is solved, achieving more efficient video decoding and memory usage, and improving image quality.

CN121399951APending Publication Date: 2026-01-23QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480042020.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2024-06-27
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing block vector storage and prediction techniques are inefficient in video decoding, resulting in reduced decoding gain and low memory utilization, which affects image quality.

Method used

By storing the block vector (BV) of the current block encoded or decoded in IntraTMP mode in the video decoder into a historical BV list, and deriving a candidate BV list for subsequent blocks based on this list, the storage requirements are reduced by using pruning or rounding techniques, while limiting the search range of the start vector to improve the accuracy of the predicted signal.

Benefits of technology

It improves the efficiency of video decoding, reduces bandwidth usage and storage requirements, while maintaining or improving image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121399951A_ABST
    Figure CN121399951A_ABST
Patent Text Reader

Abstract

A method of encoding or decoding video data includes: storing a block vector (BV) of a current block in a historical BV list for encoding or decoding a subsequent block, where the current block is encoded or decoded in an intra temporal motion vector prediction (IntraTMP) mode, and where the historical BV list includes BVs of blocks not adjacent to the subsequent block; deriving a candidate list of BVs of a subsequent block based on BVs from a historical BV list including the BVs of the current block; and encoding or decoding a subsequent block based on the candidate list of BVs.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to U.S. Patent Application No. 18 / 755,330, filed June 26, 2024, and U.S. Provisional Application No. 63 / 511,471, filed June 30, 2023, the entire contents of which are hereby incorporated by reference. U.S. Patent Application No. 18 / 755,330, filed June 26, 2024, claims the benefit of U.S. Provisional Application No. 63 / 511,471, filed June 30, 2023. TECHNICAL FIELD

[0002] The present disclosure relates to video encoding and video decoding. BACKGROUND

[0003] Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, so-called “smart phones,” video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video coding techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC), and extensions of such standards, as well as proprietary video codecs / formats such as AOMedia Video 1 (AV1) developed by the Alliance for Open Media. By implementing such video coding techniques, video devices can more efficiently send, receive, encode, decode, and / or store digital video information.

[0004] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) can be partitioned into video blocks, which can also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial prediction relative to other video blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture can use either spatial or temporal prediction relative to other video blocks in the same picture or other reference pictures. SUMMARY

[0005] In general, this disclosure describes techniques for block vector (BV) related tools, including IBC (intra block copy) and IntraTMP (intra template matching prediction), as well as tools such as BV storage processes and pruning processes, including harmonization with other tools. Example techniques can improve coding efficiency for BV related tools. As described in more detail, if a current block is encoded or decoded using an IntraTMP mode, a BV for the current block can be obtained in a history BV list used for encoding or decoding a subsequent block. The history BV list includes BVs for blocks that can not be adjacent to the subsequent block. With example techniques, improvements for BV related tools can result in reduced bandwidth usage and / or improved storage efficiency. Thus, example techniques can improve overall operation of a video encoder and / or a video decoder and improve performance of a video coding system.

[0006] In one example, this disclosure describes a method of encoding or decoding video data, the method comprising: storing a block vector (BV) of a current block in a history BV list used for encoding or decoding a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (IntraTMP) mode, and wherein the history BV list includes BVs for blocks that are not adjacent to the subsequent block; deriving a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encoding or decoding the subsequent block based on the candidate list of BVs.

[0007] In one example, this disclosure describes an apparatus for encoding or decoding video data, the apparatus comprising: one or more memories configured to store the video data; and processing circuitry coupled to the one or more memories, wherein the processing circuitry is configured to: store a block vector (BV) of a current block in a history BV list used for encoding or decoding a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (IntraTMP) mode, and wherein the history BV list includes BVs for blocks that are not adjacent to the subsequent block; derive a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encode or decode the subsequent block based on the candidate list of BVs.

[0008] In one example, the disclosure describes a computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to: store a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (Intra TMP) mode, and wherein the history BV list includes BVs of blocks that are not adjacent to the subsequent block; derive a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encode or decode the subsequent block based on the candidate list of BVs.

[0009] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings, and claims. BRIEF DESCRIPTION OF DRAWINGS

[0010] FIG. 1 is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of this disclosure.

[0011] FIG. 2 is a block diagram illustrating an example video encoder that can perform the techniques of this disclosure.

[0012] FIG. 3 is a block diagram illustrating an example video decoder that can perform the techniques of this disclosure.

[0013] FIG. 4 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure.

[0014] FIG. 5 is a flowchart illustrating an example method for decoding a current block according to the techniques of this disclosure.

[0015] FIG. 6 is a conceptual diagram illustrating an example of an intra template matching search region.

[0016] FIG. 7 is a conceptual diagram illustrating an example of a padding candidate used to replace zero vectors in an intra block copy (IBC) list.

[0017] FIG. 8A to FIG. 8D is a conceptual diagram illustrating an IBC reference region positioned depending on a current coding unit (CU).

[0018] FIG. 9 is a conceptual diagram illustrating an example of a luma block used to drive a direct block vector.

[0019] FIG. 10A and FIG. 10Bis a conceptual diagram illustrating an example for storing block vector (BV) information and deriving a candidate list of BVs.

[0020] FIG. 11 is a flowchart illustrating an operational method according to one or more examples described in this disclosure. DETAILED DESCRIPTION

[0021] Block vector (BV) based video coding is a video coding tool in which a video coder (e.g., a video encoder or a video decoder) uses a block vector to identify a block in the same picture as a current block being coded or decoded. There can be various uses of block vectors, such as for intra block copy (IBC) (e.g., IBC mode), in which the block identified by the block vector is used to generate a prediction block for the current block. However, block vectors can also be used for other video coding tools, such as intra template matching prediction (IntraTMP) mode. In IntraTMP mode, the BV identifies a block in the same picture and is determined based on template matching of a template of a reference block in the same picture and a template of the current block.

[0022] The way in which block vectors are stored and / or utilized can be inefficient, resulting in reduced coding gain, inefficient memory usage, or reduced image quality. The example techniques described in this disclosure relate to BV storage processes, pruning processes, or harmonization with other tools and methods, which can improve coding efficiency of BV related tools including IBC and IntraTMP.

[0023] For example, to determine a BV for a block, a video coder can derive a candidate list of BVs, where the candidate list of BVs includes BVs from previously coded or decoded blocks. A video encoder can signal and a video decoder can receive an index into the candidate list of BVs, and the video decoder can determine the BV based on the index.

[0024] This disclosure describes example techniques in which a BV of a current block coded or decoded in IntraTMP mode is stored in a history BV list. For example, in video coding, there can be spatial motion vector prediction (SMVP), temporal motion vector prediction (TMVP), and history-based motion vector prediction (HMVP). Block vectors can not indicate motion, and thus are referred to as BVs rather than MVs (motion vectors). However, the convention of SMVP, TMVP, and HMVP is still sometimes used with BVs. To avoid confusion, this disclosure describes spatial BVs, temporal BVs, and history BVs, which can be analogous to SMVP, TMVP, and HMVP, respectively.

[0025] For example, there can be a spatial BV list that includes BVs from neighboring blocks in the same picture (i.e., spatial BVs). The BVs in the spatial BV list can be stored according to positioning information (e.g., above, left, top-left, etc. or equivalent information such as coordinates). There can be a temporal BV list for the block that includes BVs from co-located blocks in other pictures (i.e., temporal BVs). There can be a history BV list for the block that includes BVs from blocks in the same picture that are not necessarily neighboring blocks (i.e., history BVs). The BVs in the history BV list can be stored in coding order (e.g., if the history BV list is full, the oldest history BV is removed and the newest history BV is added). In some examples, the candidate list of BVs can include BVs from one or more of the spatial BV list, the temporal BV list, and the history BV list.

[0026] There can be various ways in which a video coder can store BVs in the spatial BV list, the temporal BV list, and the history BV list. As one example, the video coder or some other circuitry can reserve memory locations for each of the spatial BV list, the temporal BV list, and the history BV list. As another example, the video coder or some other circuitry can mark a picture as part of the spatial BV list, the temporal BV list, and the history BV list. There can be other ways in which a video coder can store BVs in the spatial BV list, the temporal BV list, and the history BV list, and the techniques are not limited to any particular technique for storing BVs in the spatial BV list, the temporal BV list, or the history BV list. Moreover, the spatial BV list, the temporal BV list, and the history BV list are not necessarily present in all examples.

[0027] In certain techniques, if a current block is coded or decoded in Intra TMP mode, the BVs of the current block are not available as history BVs for a subsequent block coded or decoded in IBC mode or Intra TMP mode. In other words, the BVs of a current block coded or decoded in Intra TMP mode are not stored in the history BV list and thus are not available for coding or decoding a subsequent block in such techniques.

[0028] Excluding BVs from blocks coded or decoded in IntraTMP mode can be inefficient. For example, a BV of a current block coded or decoded in IntraTMP mode can identify a block of a subsequent block that forms a better prediction signal for the subsequent block than other blocks. According to one or more examples described in this disclosure, by storing the BV of the current block in a history BV list, where the current block is coded or decoded in IntraTMP mode, the BV of the current block can be used to code or decode the subsequent block when a video encoder or video decoder derives a candidate list of BVs for the subsequent block. This can result in a better prediction signal for the subsequent block and reduced signaling compared to other techniques.

[0029] In some examples, to store the BV of the current block, rather than storing the actual BV of the current block, the video encoder or video decoder can one of clip or round the actual BV of the current block. The video encoder or video decoder can store the clipped or rounded BV of the current block. Clipping can include maintaining the integer portion of the actual BV and discarding the fractional portion of the actual BV, resulting in a BV having integer precision. Rounding can include rounding the actual BV up or down to integer precision.

[0030] By clipping or rounding the actual BV of the current block prior to storing, memory usage can be reduced because less information needs to be stored. Moreover, if the actual BV of the current block is clipped or rounded prior to storing, there can be little to no impact on video quality.

[0031] By utilizing the techniques described in this disclosure, there can be various other video coding gains that can be achieved but are not needed in all cases. For example, a video encoder or video decoder can perform a template matching technique for determining a prediction signal for a subsequent block. For a template matching technique, there are starting vectors that are utilized, and the video encoder and video decoder search blocks within a search range relative to the starting vectors that have templates that best match a template of the subsequent block. The number of starting vectors selected can be relatively large (e.g., any vector can be a starting vector). Moreover, by having too many starting vectors, and evaluating a search range for each of the starting vectors, such techniques can increase computation time by an undesirable amount.

[0032] In one or more examples, a video encoder and video decoder can utilize one or more of the BVs in the candidate list, including the history BVs, as starting vectors, and search blocks within a search range relative to each of the starting vectors. In this way, the number of starting vectors is limited, while also increasing the likelihood that a search range of one of the starting vectors will result in identifying a best block for generating a prediction signal.

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

[0034] As FIG. 1 shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. In particular, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 can be or can include any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, hand-held phones 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 can be equipped for wireless communication, and thus can be referred to as wireless communication devices.

[0035] In FIG. 1 the example of FIG. 1, source device 102 includes a video source 104, a memory 106, a video encoder 200, and an output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, a memory 120, and a display device 118. In accordance with this disclosure, video encoder 200 of source device 102 and video decoder 300 of destination device 116 can be configured to apply the techniques for block vector storage and reconciliation. 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, a source device and a destination device can include other components or arrangements. For example, source device 102 can receive video data from an external video source, such as an external camera. Likewise, destination device 116 can interface with an external display device, rather than include an integrated display device.

[0036] As FIG. 1The illustrated system 100 is merely one example. In general, any digital video encoding and / or decoding device can perform the techniques for block vector storage and reconciliation. Source device 102 and destination device 116 are merely examples of such coding devices in which source device 102 generates coded video data for transmission to destination device 116. This disclosure refers to a "coding" device as a device that performs coding (e.g., encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of coding devices, in particular, a video encoder and a video decoder, respectively. In some examples, source device 102 and destination device 116 can operate in a substantially symmetrical manner such that each of source device 102 and destination device 116 includes video encoding and decoding components. Hence, system 100 can support one-way or two-way video transmission between source device 102 and destination device 116, e.g., for video streaming, video playback, video broadcasting, or video telephony.

[0037] In general, video source 104 represents a source of video data (i.e., uncoded, raw video data) and provides a sequential series of pictures (also referred to as "frames") of the video data to video encoder 200, which encodes data for the pictures. Video source 104 of source device 102 can include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface to receive video from a video content provider. As a further alternative, video source 104 can generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes the captured, pre-captured, or computer-generated video data. Video encoder 200 can rearrange the pictures from the received order (sometimes referred to as "display order") into the coding order for coding. Video encoder 200 can generate a bitstream including encoded video data. Source device 102 can then output the encoded video data via output interface 108 onto computer-readable medium 110 for reception and / or retrieval by, e.g., input interface 122 of destination device 116.

[0038] Memory 106 of source device 102 and memory 120 of destination device 116 represent general purpose storage spaces. In some examples, memories 106, 120 can store raw video data, e.g., raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106, 120 can store software instructions capable of being executed by, e.g., video encoder 200 and video decoder 300, respectively. Although memories 106 and 120 are shown as separate from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 can also include internal memories for similar or equivalent purposes. Furthermore, memories 106, 120 can store encoded video data, e.g., output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106, 120 can be allocated as one or more video buffers, e.g., to store raw decoded and / or encoded video data.

[0039] Computer-readable medium 110 can represent any type of medium or device capable of transporting encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium to enable source device 102 to transmit encoded video data directly to destination device 116 in real-time, e.g., via a radio frequency network or computer-based network. Output interface 108 can modulate a transmission signal including the encoded video data, and input interface 122 can demodulate received transmission signals, according to a communication standard, such as a wireless communication protocol. Communication media can include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication media can 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 media can include routers, switches, base stations, or any other equipment that can be useful to facilitate communication from source device 102 to destination device 116.

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

[0041] In some examples, source device 102 can output coded video data to a file server 114 or another intermediate storage device from which destination device 116 can access the stored video data. Destination device 116 can access the stored video data from file server 114 via streaming or download.

[0042] File server 114 can be any type of server device capable of storing encoded video data and transmitting that encoded video data to destination device 116. File server 114 can represent a web server (e.g., for a website), a server configured to provide file delivery protocol services (such as the File Delivery Protocol (FTP) or the 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. File server 114 can 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, and the like.

[0043] Destination device 116 can access encoded video data from file server 114 through any standard data connection, including an Internet connection. This can include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), a cable modem, etc.), or a combination of both that is suitable for accessing encoded video data stored on file server 114. Input interface 122 can be configured to operate according to any one or more of various protocols discussed above for retrieving or receiving media data from file server 114 or other such protocols for retrieving media data.

[0044] Output interface 108 and input interface 122 can represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components operating according to any of a variety of IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 comprise wireless components, output interface 108 and input interface 122 can be configured to transfer data, such as encoded video data, according to a cellular communication standard, such as 4G, 4G-LTE (Long-Term Evolution), LTE Advanced, 5G, or the like. In some examples where output interface 108 comprises a wireless transmitter, output interface 108 and input interface 122 can be configured to transfer data, such as encoded video data, according to other wireless standards, such as an IEEE 802.11 specification, an IEEE 802.15 specification (e.g., ZigBee), a Bluetooth standard, or the like. In some examples, output interface 108 and input interface 122 can be configured to transfer data, such as encoded video data, according to a physical connection standard, such as an XHCI or EHCI standard, a USB standard (for wired transmission), an RS-232 standard, a RS-422 standard, a RS-485 standard, or the like. It will be appreciated that input interface 122 can be configured to receive data, such as data streams, according to any of the aforementioned standards, or according to other standards.™ Bluetooth ™ standards, etc. to communicate data such as encoded video data. In some examples, source device 102 and / or destination device 116 can include respective system on a chip (SoC) devices. For example, source device 102 can include SoC devices to perform functionalities belonging to video encoder 200 and / or output interface 108, and destination device 116 can include SoC devices to perform functionalities belonging to video decoder 300 and / or input interface 122.

[0045] The techniques of this disclosure can be applied to video coding in support of any of a variety of multimedia applications, such as over-the-air television broadcasts, cable television transmissions, satellite television transmissions, Internet streaming video transmissions, digital video that is encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0046] Input interface 122 of destination device 116 receives an encoded video bitstream from computer-readable medium 110 (e.g., a communication medium, storage device 112, file server 114, or the like). The encoded video bitstream can include signaling information defined by video encoder 200 and also used by video decoder 300, such as syntax elements having values

[0047] Although the following examples are described in the context of encoding and decoding video data according to HEVC, the examples described herein can be applicable to video coding in general, including the coding of other video coding standards, such as ITU-T FIG. 1Although not shown, in some examples, video encoder 200 and video decoder 300 can each be integrated with an audio encoder and / or audio decoder (e.g., an audio CODEC), and can include appropriate MUX-DEMUX units or other hardware and / or software to handle multiplexed streams including both audio and video in a common data stream. Example audio CODECs can include AAC, AC-3, AC-4, ALAC, ALS, AMBE, AMR, AMR-WB (G.722.2), AMR-WB+, aptx (various versions), ATRAC, BroadVoice (BV16, BV32), CELT, Enhanced AC-3 (E-AC-3), EVS, FLAC, G.711, G.722, G.722.1, G.722.2 (AMR-WB), G.723.1, G.726, G.728, G.729, G.729.1, GSM-FR, HE-AAC, iLBC, iSAC, LA Lyra, Monkey's Audio, MP1, MP2 (MPEG-1, 2 Audio Layer II), MP3, Musepack, Nellymoser Asao, OptimFROG, Opus, Sac, Satin, SBC, SILK, Siren 7, Speex, SVOPC, True Audio (TTA), TwinVQ, USAC, Vorbis (Ogg), WavPack, and Windows Media Audio.

[0048] Video encoder 200 and video decoder 300 each can be implemented as any of a variety of suitable encoder and / or decoder circuitry, including 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 combinations thereof. When the techniques are implemented partially in software, a device can store instructions for the software in 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 video encoder 200 and video decoder 300 can be included in one or more encoders or decoders, any of which alone can be a part of a combined encoder / decoder (CODEC) in a respective device. A device including video encoder 200 and / or video decoder 300 can implement video encoder 200 and / or video decoder 300 in a processing circuitry such as an integrated circuit and / or a microprocessor. Such a device can be a wireless communication device such as a cellular phone or any other type of device described herein.

[0049] Video encoder 200 and video decoder 300 can operate according to video coding standards, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC), or extensions thereto, such as the multi-view and / or scalable video coding extensions. Alternatively, video encoder 200 and video decoder 300 can 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, video encoder 200 and video decoder 300 can operate according to proprietary video codecs / formats, such as AOMedia Video 1 (AV1), extensions to AV1, and / or subsequent versions of AV1 (e.g., AV2). In other examples, video encoder 200 and video decoder 300 can operate according to other proprietary formats or industry standards. The techniques of this disclosure, however, are not limited to any particular coding standard or format. Generally, video encoder 200 and video decoder 300 can be configured to perform the techniques of this disclosure in conjunction with any video coding techniques that use block vectors, such as IBC or Intra TMP.

[0050] Generally, video encoder 200 and video decoder 300 can perform block-based coding of pictures. The term “block” generally refers to a structure containing data to be processed (e.g., encoded, decoded, or otherwise used) during the encoding and / or decoding process. For example, a block can include a two-dimensional matrix of samples of luma and / or chroma data. Generally, video encoder 200 and video decoder 300 can 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 samples of a picture, video encoder 200 and video decoder 300 can code luminance components and chrominance components, where the chrominance components can include both red hue chrominance components and blue hue chrominance components. In some examples, video encoder 200 converts received RGB format data to a YUV representation prior to encoding, and video decoder 300 converts the YUV representation to the RGB format. Alternatively, pre- and post-processing units (not shown) can perform these conversions.

[0051] This disclosure can generally relate to coding (e.g., encoding and decoding) of pictures to include processes of encoding or decoding data of pictures. Similarly, this disclosure can relate to coding of blocks of pictures to include processes of encoding or decoding (e.g., prediction and / or residual coding) data for blocks. A coded video bitstream generally includes a series of values for syntax elements representing coding decisions (e.g., coding modes) as well as partitioning of pictures into blocks. Accordingly, references to coding of pictures or blocks generally should be understood to refer to coding values of syntax elements forming the pictures or blocks.

[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 a coding tree unit (CTU) into CUs according to a quad tree structure. That is, the video coder partitions a CTU and CUs into four equal, non overlapping squares, and each node of the quad tree has either zero or four child nodes. Nodes with zero child nodes can be referred to as“leaf nodes,” and the CUs of such leaf nodes can include one or more PUs and / or one or more TUs. The video coder can further partition PUs and TUs. For example, in HEVC, a residual quad tree (RQT) represents partitioning of TUs. In HEVC, PUs represent inter prediction data, while TUs represent residual data. Intra predicted CUs include intra prediction information, such as an intra mode indication.

[0053] As another example, video encoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, a video coder (such as video encoder 200) partitions a picture into CTUs. Video encoder 200 can partition a CTU according to a tree structure, such as a quad-tree binary tree (QTBT) structure or Multi-Type Tree (MTT) structure. The QTBT structure removes the concepts of multiple partition types, such as the separation between CUs, PUs, and TUs of HEVC. The QTBT structure includes two levels: a first level partitioned according to quad tree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. Leaf nodes of the binary tree correspond to CUs.

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

[0055] When operating according to the AV1 codec, video encoder 200 and video decoder 300 can be configured to code video data in units of blocks. In AV1, the largest coding block that can be processed is referred to as a superblock. In AV1, a superblock can be 128x128 luma samples or 64x64 luma samples. However, in subsequent video coding formats (e.g., AV2), superblocks can be defined by different (e.g., larger) luma sample sizes. In some examples, a superblock is the top level of a block quad tree. Video encoder 200 can further partition a superblock into smaller coding blocks. Video encoder 200 can partition superblocks and other coding blocks into smaller blocks using square or non-square partitions. Non-square blocks can include N / 2xN blocks, NxN / 2 blocks, N / 4xN blocks, and NxN / 4 blocks. Video encoder 200 and video decoder 300 can perform separate prediction and transform processing for each coding block.

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

[0057] In some examples, video encoder 200 and video decoder 300 can use a single QTBT or MTT structure to represent each of luma and chroma components, while in other examples, video encoder 200 and video decoder 300 can use two or more QTBT or MTT structures, such as one QTBT / MTT structure for luma components and another QTBT / MTT structure for two chroma components (or two QTBT / MTT structures for respective chroma components).

[0058] Video encoder 200 and video decoder 300 can be configured to use quad tree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partition structures.

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

[0060] Blocks (e.g., CTUs or CUs) can be grouped in pictures in various ways. As one example, a tile can refer to a rectangular region of CTU rows within a particular tile in a picture. A tile column can refer to a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile row can refer to a rectangular region of CTUs having a height equal to a height of the picture and a width specified by a syntax element (e.g., such as in a picture parameter set) and a tile column can refer to a rectangular region of CTUs having a width equal to a width of the picture and a height specified by a syntax element (e.g., such as in a picture parameter set).

[0061] In some examples, a tile can be divided into multiple bricks, each of which can include one or more CTU rows within the tile. A tile that is not divided into multiple bricks can also be referred to as a brick. However, a brick that is a true subset of a tile can not be referred to as a tile. Bricks in a picture can also be arranged in slices. A slice can be an integer number of tiles of a picture, which can be uniquely contained in a single network abstraction layer (NAL) unit. In some examples, a slice includes multiple complete tiles or only a contiguous sequence of complete bricks of a single tile.

[0062] The present disclosure can use “NxN” and “N by N” interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in the vertical and horizontal dimensions, e.g., 16x16 samples or 16 by 16 samples. In general, a 16x16 CU will have 16 samples in the vertical direction (y = 16) and 16 samples in the horizontal direction (x = 16). Likewise, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a nonnegative integer value. The samples in a CU can be arranged in rows and columns. Moreover, a CU need not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU can comprise NxM samples, where M need not necessarily equal N.

[0063] Video encoder 200 encodes video data representing prediction and / or residual information for a CU, as well as other information. Prediction information indicates how to predict the CU in order to form a prediction block for the CU. Residual information generally represents sample-by-sample differences between the CU prior to encoding and the prediction block.

[0064] To predict a CU, video encoder 200 generally forms a prediction block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting the CU from data of a previously coded picture, whereas intra prediction generally refers to predicting the CU from previously coded data of the same picture. To perform inter prediction, video encoder 200 can use one or more motion vectors to generate the prediction block. Video encoder 200 can generally perform a motion search to identify a reference block that closely matches the CU, e.g., according to a difference between the CU and the reference block. Video encoder 200 can calculate the difference metric using a sum of absolute difference (SAD), sum of squared difference (SSD), mean absolute difference (MAD), mean squared difference (MSD), or other such difference calculations to determine whether a reference block closely matches the current CU. In some examples, video encoder 200 can use uni -prediction or bi-prediction to predict the current CU.

[0065] Some examples of VVC also provide an affine motion compensation mode, which can be considered an inter prediction mode. Under the affine motion compensation mode, video encoder 200 can determine two or more motion vectors that represent non-translational motion, such as scaling or zooming, rotation, perspective motion, or other irregular types of motion.

[0066] To perform intra prediction, video encoder 200 can select an intra prediction mode to generate the prediction block. Some examples of VVC provide sixty-seven intra prediction modes, including various directional modes, as well as a planar mode and a DC mode. Generally, video encoder 200 selects an intra prediction mode that describes neighboring samples of the current block (e.g., of a CU) from which to predict samples of the current block. Assuming video encoder 200 is coding CTUs and CUs in a raster scan order (from left to right, top to bottom), such samples can generally be located above, above and to the left, or to the left of the current block in the same picture.

[0067] Video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter prediction modes, video encoder 200 can encode data indicating which of the various available inter prediction modes to use, as well as motion information for the corresponding mode. For example, for uni - or bi-prediction, video encoder 200 can encode motion vectors using advanced motion vector prediction (AMVP) or merge mode. Video encoder 200 can use similar modes to encode motion vectors for the affine motion compensation mode.

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

[0069] After prediction, such as intra prediction or inter prediction of a block, video encoder 200 can calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between the block and a prediction block formed using the corresponding prediction mode. Video encoder 200 can apply one or more transforms to the residual block to produce transformed data in a transform domain rather than in the sample domain. For example, video encoder 200 can apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform. In addition, video encoder 200 can apply a secondary transform after the first transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), or the like. Video encoder 200 produces transform coefficients after applying the one or more transforms.

[0070] As noted above, after any transforms that produce transform coefficients, video encoder 200 can 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 the quantization process, video encoder 200 can reduce the bit depth of some or all of the transform coefficients. For example, video encoder 200 can round n-bit values down to m-bit values during quantization, where n is greater than m. In some examples, to perform quantization, video encoder 200 can perform a bit shift to the right on values to be quantized.

[0071] After quantization, video encoder 200 can scan the transform coefficients, producing a one-dimensional vector from the two-dimensional matrix comprising the quantized transform coefficients. The scan can be designed to place higher energy (and hence less frequent) transform coefficients earlier in the vector and lower energy (and hence more frequent) transform coefficients later in the vector. In some examples, video encoder 200 can utilize a pre-defined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, video encoder 200 can perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, video encoder 200 can entropy encode the one-dimensional vector, e.g., according to context adaptive binary arithmetic coding (CABAC). Video encoder 200 can also entropy encode values for syntax elements that describe metadata associated with encoded video data used by video decoder 300 in decoding the video data.

[0072] To perform CABAC, video encoder 200 can assign a context within a context model to a symbol to be transmitted. The context can relate to, for example, whether neighboring values of the symbol are zero-valued or not. The probability determination can be based on the context assigned to the symbol.

[0073] Video encoder 200 can further generate syntax data, such as block-based, picture-based, and sequence-based syntax data, or other syntax data such as a sequence parameter set (SPS), picture parameter set (PPS), or video parameter set (VPS), to video decoder 300, e.g., in picture headers, block headers, slice headers. Video decoder 300 can likewise decode such syntax data to determine how to decode corresponding video data.

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

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

[0076] The residual information can be represented by, for example, quantized transform coefficients. Video decoder 300 can inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. Video decoder 300 uses the signaled prediction mode (intra prediction or inter prediction) and related prediction information (e.g., motion information for inter prediction) to form a prediction block for the block. Video decoder 300 can then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. Video decoder 300 can perform additional processing such as performing a deblocking process to reduce visual artifacts along boundaries of the blocks.

[0077] This disclosure can generally relate to “signaling” certain information, such as syntax elements. The term “signaling” can generally refer to the communication of values for syntax elements and / or other data used for decoding encoded video data. That is, video encoder 200 can signal values for syntax elements in a bitstream. Typically, signaling refers to generating the values in the bitstream. As noted above, source device 102 can transmit the bitstream to destination device 116 in real time or not in real time, such as can occur when syntax elements are stored to storage device 112 for later retrieval by destination device 116.

[0078] This disclosure generally relates to defining different methods (e.g., template types, blending) and syntax used in template matching (TM) related tools, such as with BV (block vector). The disclosed techniques can be applied to any of the existing video codecs, such as HEVC (High Efficiency Video Coding), VVC (Versatile Video Coding), Essential Video Coding (EVC), or high efficiency coding tools of future video coding standards (e.g., ECM (Enhanced Compression Model)). The following describes HEVC, JEM techniques, and work in Versatile Video Coding (VVC).

[0079] Video coding standards include ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual and ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) and Multiview Video Coding (MVC) extensions. In addition, High Efficiency Video Coding (HEVC) or ITU-T H.265, including its extensions, Multiview Extension (MV-HEVC) and Scalable Extension (SHVC), have been developed by the Joint Collaboration Team on Video Coding (JCT-VC) as well as the 3D Video Coding Extensions Development Joint Collaborative Team (JCT-3V) of ITU-T Video Coding Experts Group (VCEG) and ISO / IEC Motion Picture Experts Group (MPEG). The latest HEVC draft specification (hereinafter referred to as HEVC WD) is available from http: / / phenix.int- evry.fr / jct / doc_end_user / documents / 14_Vienna / wg11 / JCTVC-N1003-vl.zip.

[0080] ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) are studying the potential need for a future video coding technology standard with compression capability significantly beyond that of the HEVC standard, including its current extensions as well as the recent extensions for screen content coding and high dynamic range coding. These groups are conducting this study in a joint collaborative effort known as the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by the field. The latest version of the reference software, namely VVC Test Model 10 (VTM 10), is available for download from https: / / vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM. The Versatile Video Coding (VVC) draft specification can be found in JVET-T2001 . The algorithm description of Versatile Video Coding and Test Model 10 (VTM 10.0) can be found in JVET- T2002 .

[0081] Intra template matching prediction (Intra TMP) is an intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, video encoder 200 searches for the template in the reconstructed part of the current frame that is most similar to the current template and uses the corresponding block as the prediction block. Video encoder 200 then signals the use of the mode and performs the same prediction operation at the decoder side with video decoder 300. In some examples, the predefined search range can be relative to the starting block vector. In one or more examples described in this disclosure, the BV of a current block coded or decoded in Intra TMP mode can be used as the starting block vector for a subsequent block coded or decoded in Intra TMP mode.

[0082] A prediction signal is generated by matching the L-shaped causal neighbor of block 600 with another block in a predefined search region in FIG. 6 R1: the current CTU; R2: the top-left CTU; R3: the top CTU; R4: the left CTU. Sum of absolute difference (SAD) is used as the cost function.

[0083] Within each zone, video decoder 300 searches for the template with the smallest SAD relative to the current template and uses its corresponding block as the prediction block. The dimensions of all zones (SearchRange_w, SearchRange_h) can be set to be proportional to the block dimensions (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is:

[0084] SearchRange_w = a BlkW

[0085] SearchRange_h = a BlkH

[0086] where “a” is a constant that controls the gain / complexity trade-off. In practice, “a” is equal to 5.

[0087] The Intra template matching tool is enabled for CUs with width and height size smaller than or equal to 64. The maximum CU size for Intra template matching is configurable. When DIMD (decoder-side intra mode derivation) is not used for the current CU, the Intra template matching prediction mode is signaled at the CU level by a dedicated flag.

[0088] ​​Intra block copy (IBC) is described below. Intra block copy (IBC) is a tool employed in the HEVC extension on screen content coding (SCC). IBC can improve coding efficiency for screen content material. Since IBC mode is implemented as a block-level coding mode, block matching (BM) is performed at the video encoder 200 to find the best block vector (or motion vector) for each CU. The block vector is used to indicate the displacement from the current block to the reference block, which has already been reconstructed within the current picture. The luma block vector of an IBC coded CU is integer precision. The chroma block vector is also rounded to integer precision. When combined with AMVR (adaptive motion vector resolution), the IBC mode can switch between 1-pel and 4-pel motion vector precision. An IBC coded CU is considered as the third prediction mode in addition to the intra or inter prediction modes. The IBC mode is applicable to a CU whose width and height are both less than or equal to 64 luma samples.

[0089] At the encoder side, hash-based motion estimation is performed for IBC. The video encoder 200 performs RD (rate-distortion) check for blocks whose width or height is not larger than 16 luma samples. For non-merge mode, a block vector search is first performed using hash-based search. If the hash search does not return a valid candidate, a local search based on block matching can be performed.

[0090] In the hash-based search, the hash key match (32-bit CRC) between the current block and the reference block is extended to all allowed block sizes. The hash key computation for each location in the current picture is based on 4x4 sub-blocks. For a current block of larger size, the hash key is determined to match the hash key of a reference block if all hash keys of all 4x4 sub-blocks match the hash keys in the corresponding reference location. If multiple reference blocks' hash keys are found to match the hash key of the current block, the block vector cost of each matching reference is computed, and the block vector cost with the smallest cost is selected. In the block matching search, the search range is set to cover both the previous CTU and the current CTU.

[0091] At the CU level, the IBC mode is signaled with a flag, and the flag can be signaled as IBC AMVP mode or IBC skip / merge mode, as follows:

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

[0093] b. IBC AMVP mode: The block vector difference is coded in the same way as the motion vector difference. The block vector prediction method uses two candidates as predictors, one from the left neighbor and one from the top neighbor (if coded with IBC). When either neighbor is not available, a default block vector is used as predictor. A flag is signaled to indicate the block vector predictor index.

[0094] IBC merge / AMVP (advanced motion vector prediction) list construction is described below. IBC merge / AMVP list construction is modified as follows:

[0095] a. IBC merge / AMVP candidates are inserted into the IBC merge / AMVP candidate list only if they are valid.

[0096] b. The top-right, bottom-left, and top-left spatial candidates, as well as one pair- wise average candidate, can be added to the IBC merge / AMVP candidate list.

[0097] c. Template-based adaptive reordering (ARMC-TM) is applied to the IBC merge list.

[0098] The HMVP (history-based motion vector prediction) table size for IBC is increased to 25. Again, as noted above, while a BV does not necessarily indicate "motion" similar to a motion vector (MV), the term "HMVP" can still be applied to a BV as a naming convention. To avoid confusion, in this disclosure, the HMVP applied to a BV is referred to as a history BV.

[0099] After at most 20 IBC merge candidates are derived with full pruning, the merge candidates are reordered together. After reordering, the first 6 candidates with the lowest template matching cost are selected as the final candidates in the IBC merge list.

[0100] The zero vector candidate used to fill in the IBC merge / AMVP list is replaced by a set of BVP candidates located in the IBC reference region. The zero vector is invalid as a block vector in the IBC merge mode, and thus can be discarded as a BVP in the IBC candidate list.

[0101] Three candidates are located at the nearest corners of the reference region, and three additional candidates are determined in the middle of the three sub-regions (A, B, and C) (their coordinates are determined by the width and height of the current block and the AX and AY parameters), as depicted in FIG. 7 for block 700 and IBC buffer 702. FIG. 7

[0102] IBC with template matching is described below. Template matching is used in IBC for both the IBC merge mode and the IBC AMVP mode.

[0103] ​The IBC-TM merge list is modified compared to the merge list used in regular IBC merge mode such that candidates are selected according to a pruning method with motion distance between candidates as in regular TM merge mode. The end zero motion implementation is replaced by motion vectors to the left (-W, 0), up (0, -H) and top-left (-W, -H), where W is the width and H is the height of the current CU.

[0104] In IBC-TM merge mode, the selected candidates are refined using a template matching method before the RDO or the decoding process. The IBC-TM merge mode has been competing with regular IBC merge mode and a TM merge flag is signaled.

[0105] In IBC-TM AMVP mode, up to 3 candidates can be selected from the IBC-TM merge list. Each of the 3 selected candidates is refined using a template matching method and ranked according to its resulting template matching cost. Only the top two can then be considered in the motion estimation process as usual.

[0106] The template matching optimization for both IBC-TM merge and AMVP modes can be based on the following conditions: the IBC motion vector is constrained (i) to be integer and (ii) to be within the reference region, as in FIG. 8A to FIG. 8D shown in blocks 800A-800D in FIG. 8A. In IBC-TM merge mode, all optimizations can be performed at integer precision, while in IBC-TM AMVP mode, all optimizations can be performed at integer or 4-pel precision, depending on the AMVR value. In some examples, this optimization only accesses samples without using interpolation. In one or more examples, the optimized motion vector and the template used in each optimization step can be according to the constraints of the reference region.

[0107] Direct BV in intra chroma coding is described below. Direct block vector is used for chroma blocks in dual tree slices. When chroma dual tree is activated, a flag is signaled to indicate whether the chroma block is coded using IBC mode or not. If one of the five positions shown in FIG. 9A for the luma block used for the luma component 900 is coded in IBC or intra TMP mode, the block vector of the luma block is scaled and used as the block vector for the chroma block of the chroma component 902. Template matching can be used to perform the block vector scaling. FIG. 9

[0108] To improve the coding efficiency of block vector (BV) related tools including IBC and Intra TMP, a BV storage process, a pruning process, or a reconciliation with other tool methods are described in this disclosure.

[0109] Examples of spatial BV buffer storage mechanisms for BV related tools are described below. The examples below are described as being combinable or implemented separately.​

[0110] In one example, if the current block uses IntraTMP, the BV of the current block is stored to the spatial BV buffer along with the positioning information of the current block. The BV information can be referenced by later coded blocks to derive spatial BV candidates. In other words, video encoder 200 and video decoder 300 can store the BV of the current block in a spatial BV list used to encode or decode a subsequent block, where the current block is encoded or decoded in IntraTMP mode. For example, for the subsequent block, the BV of a block neighboring the subsequent block can be available in the spatial BV list, such as in the case where the current block is a neighboring block of the subsequent block. In one or more examples, the spatial BV list can include BVs used to form a candidate list of BVs for encoding or decoding the subsequent block. The subsequent block can be encoded or decoded in IntraTMP mode or IBC mode.

[0111] In one example, if the current block uses IBC, the BV of the current block is stored to the spatial BV buffer along with the positioning information of the current block. The BV information can be referenced by later coded blocks to derive spatial BV candidates. In other words, video encoder 200 and video decoder 300 can store the BV of the current block in a spatial BV list used to encode or decode a subsequent block, where the current block is encoded or decoded in IntraTMP mode. For example, for the subsequent block, the BV of a block neighboring the subsequent block can be available in the spatial BV list, such as in the case where the current block is a neighboring block of the subsequent block. In one or more examples, the spatial BV list can include BVs used to form a candidate list of BVs for encoding or decoding the subsequent block. The subsequent block can be encoded or decoded in IntraTMP mode or IBC mode.

[0112] In one example, when storing BVs to the spatial BV buffer, if the current block uses IntraTMP mode, only the integer part of the BV is stored to the buffer, the fractional part is discarded. In one example, when storing BVs to the spatial BV buffer, if the current block uses IBC mode, only the integer part of the BV is stored to the buffer, the fractional part is discarded. In one example, a rounding function is applied to convert the real BV to integer precision.

[0113] In one example, the stored BV information can be referenced by coded blocks in other frames or pictures to derive temporal BV candidates or temporal BV predictors. That is, the subsequent block can be a block in another picture, and the current block in the current picture can be co-located with the subsequent block in the other picture. In this example, the BV of the current block can be a temporal BV of the subsequent block, and video encoder 200 and video decoder 300 can use the BV (e.g., temporal BV) of the current block to determine the BV of the subsequent block.

[0114] In one example, if the horizontal or vertical fractional BV is -0.5 or +0.5, the fractional BV can be rounded to zero before storing the BV to a second BV buffer (which is different from the BV buffer described above). In one example, if the horizontal or vertical fractional BV is -0.5 or 0.5, the exception can be to round the BV to the value -1 or 1, and this -1 or +1 is stored to the second BV buffer.

[0115] The following describes a history BV list storage mechanism for a BV-related tool. The following is described in examples that can be implemented in combination or separately.

[0116] In one example, if the current block is coded using IntraTMPl, the BV of the current block is stored in a history BV list, the order of the list depends on the decoding order of the blocks. The BV information can be referenced by a later coded block to derive a history BV candidate.

[0117] In other words, video encoder 200 and video decoder 300 can store the BV of the current block in a history BV list for encoding or decoding of a subsequent block. In this example, the current block is coded or decoded in IntraTMPl mode. As described above, there can be various examples of BV lists. For example, a spatial BV list can store the BVs of neighboring blocks. A history BV list can include the BVs of blocks that are not neighboring the subsequent block. For example, the current block can not be a neighboring block of the subsequent block, and thus, the BV of the current block is in the history BV list of the subsequent block.

[0118] The order of the BVs in the history BV list can be based on the coding order of the blocks that include the current block. For example, the history BV list can be a first-in-first-out (FIFO) list. Video encoder 200 and video decoder 300 can store the BV of the current block in the spatial BV list and the history BV list after or during video encoder 200 encoding the current block and video decoder 300 decoding the current block. If the history BV list is full, video encoder 200 and video decoder 300 can remove the earliest stored BV in the history BV list and add the BV of the current block.

[0119] Assume that the subsequent block is a plurality of blocks that are later in coding order than the current block coded or decoded in IntraTMPl mode, such that the current block is not neighboring the subsequent block, and one of the neighboring blocks of the subsequent block is coded or decoded in IntraTMPl mode or IBC mode. When video encoder 200 and video decoder 300 are to encode or decode the subsequent block, the BV of the current block can not be available in the spatial BV list of the subsequent block, but can be available in the history BV list of the subsequent block.

[0120] In one or more examples, video encoder 200 and video decoder 300 can derive a candidate list of BVs for a subsequent block based on BVs from a history BV list that includes BVs of the current block. For example, video encoder 200 and video decoder 300 can add BVs from blocks neighboring the subsequent block (e.g., from a spatial BV list for the subsequent block) to an initial candidate list. Video encoder 200 and video decoder 300 can add BVs from the history BV list to the initial candidate list.

[0121] In some examples, this initial candidate list can be the candidate list. However, in some other examples, video encoder 200 and video decoder 300 can reorder and / or prune the initial candidate list to derive the candidate list. For example, video encoder 200 and video decoder 300 can determine template matching costs for the BVs in the initial candidate list, and derive the candidate list of BVs based on the template matching costs for the BVs in the initial candidate list.

[0122] For example, as described above, the size of the history BV list (e.g., the HMVP table mentioned above) can be 25 BV entries. Video encoder 200 and video decoder 300 can add 20 BVs from the spatial BV list and the history BV list to the initial candidate list with pruning and reordering (e.g., without two instances of the same BV in the initial candidate list, and reordering the initial candidate list based on various factors). To derive the candidate list for the subsequent block, video encoder 200 and video decoder 300 can select the top 6 candidates with the lowest template matching costs. The above is one example way in which the candidate list of BVs for the subsequent block is derived based on BVs from the history BV list, but the example techniques are not limited to the example described above.

[0123] Video encoder 200 and video decoder 300 can encode or decode the subsequent block based on the candidate list. The subsequent block can be encoded or decoded in Intra TMP mode or IBC mode. In one or more examples, video encoder 200 and video decoder 300 can utilize each of the BVs in the candidate list of BVs as a starting BV for a template matching process associated with each of the BVs. Video encoder 200 and video decoder 300 can determine a prediction signal for the subsequent block based on the template matching processes associated with each of the BVs. In this example, video encoder 200 and video decoder 300 can encode or decode the subsequent block based on the prediction signal, as applicable.

[0124] In some examples, to decode a subsequent block, video decoder 300 can determine a prediction signal based on at least one BV of the candidate list of BVs. Video decoder 300 can receive residual information that indicates a difference between the prediction signal and the subsequent block, and reconstruct the subsequent block based on the prediction signal and the residual information.

[0125] In some examples, to encode a subsequent block, video encoder 300 can determine a prediction signal. At least one BV of the candidate list of BVs identifies or is used to identify a block used to derive the prediction signal. Video encoder 300 can determine residual information that indicates a difference between the prediction signal and the subsequent block, and signal the residual information.

[0126] In one example, if the current block uses IBC, the BV of the current block is stored into the history BV list, the order of the list depends on the decoding order of the blocks. The BV information can be referenced by later coded blocks to derive the history BV candidates. In other words, video encoder 200 and video decoder 300 can store a BV of a current block in a history BV list used to encode or decode a subsequent block, where the current block is encoded or decoded in an IBC mode. For example, for the subsequent block, the BV of a block that is not adjacent to the subsequent block can be available in the history BV list, such as in a case where the current block is not adjacent to the subsequent block. In one or more examples, the history BV list can include BVs used to form a candidate list of BVs used to encode or decode the subsequent block. The subsequent block can be encoded or decoded in an IntraTMP mode or an IBC mode.

[0127] In one example, when storing the BV into the history BV list, if the current block uses the IntraTMP mode, only the integer part of the BV is stored into the list, the fractional part will be discarded. In one example, when storing the BV into the history BV list, if the current block uses the IBC mode, only the integer part of the BV is stored into the list, the fractional part will be discarded. In one example, a rounding function is applied to convert the real BV to integer precision.

[0128] In other words, as described above, video encoder 200 and video decoder 300 can store a BV of a current block (e.g., in a history BV list or a spatial BV list). To store the BV of the current block, video encoder 200 and video decoder 300 can clip or round one of the actual BV of the current block to generate a clipped or rounded BV of the current block, and store the clipped or rounded BV of the current block. Clipping can include maintaining an integer part of the BV and discarding a fractional part. Rounding can include increasing or decreasing a value of the BV to the nearest integer value.

[0129] The following describes derivation of BV candidates from the spatial BV buffer and the history BV list. The following is described in examples that can be implemented in combination or alone.

[0130] In one example, the BV candidate derivation process is applied in IntraTMP to derive the starting point of the template matching process. In one example, the BV candidate derivation process is applied in IBC to derive the starting point of the IBC template matching process.

[0131] That is, video encoder 200 and video decoder 300 can utilize each of the BVs in the candidate list of BVs as a starting BV for a template matching process associated with each of the BVs. Video encoder 200 and video decoder 300 can determine a prediction signal for a subsequent block based on the template matching process associated with each of the BVs. Video encoder 200 can encode the subsequent block based on the prediction signal and video decoder 300 can decode the subsequent block based on the prediction signal.

[0132] In one example, in the derivation process, spatial candidates can be derived first, and then if the number of candidates is less than a predefined value N, history candidates can be derived later (e.g., in the history BV list). In one example, for IntraTMP, only spatial candidates can be derived. In one example, if at least one available candidate is derived, the search range of the template matching process is limited to a smaller region. If no available candidate is found, a larger search range is used.

[0133] In one example, the BV candidate derivation process is applied in IBC to derive MVP candidates or merge candidates, in which process, spatial candidates can be derived first, and then if the number of candidates is less than a predefined value N, history candidates can be derived later. In one example, when deriving BV candidates, if a new candidate is less than a threshold TH from a previously inserted candidate, the new candidate can be pruned and not inserted into the candidate list.

[0134] In one example, the threshold TH is an integer pixel. In one example, the threshold depends on the block size, the width of the coding block, or the height of the coding block.

[0135] The following describes BV derivation for direct BV mode in intra chroma coding. The following is described in examples that can be implemented in combination or alone.

[0136] When video encoder 200 or video decoder 300 stores BVs for IntraTMP coding with finer BV precision, some errors can occur when a chroma block reuses the BVs of a corresponding luma block. In one example, when direct BV mode is applied to a current chroma block, the corresponding luma BVs can be rounded to integer values, and the rounded values can be used to derive the chroma BVs.

[0137] In one example, if a neighboring block is coded with direct BV and the BV of the neighboring block is zero BV or a BV with horizontal and vertical shifts smaller than the CU width and CU height (which indicates that the reference chroma block will overlap with the current chroma block), the intra chroma mode is derived as PLANAR mode instead of direct BV mode. In one example, in DBV (direct block vector) mode, when the luma BV is in fractional BV, video encoder 200 and video decoder 300 can round the fractional BV to an integer BV for the corresponding chroma block.

[0138] In some examples, there are two precisions in the same block region. Fractional precision is used for luma and integer precision is used for chroma. In one example, fractional BVs are stored in the block region, while in another example, integer BVs are stored in the block region. If integer BVs are stored in the block region, this integer BV can be scaled to the luma picture size based on the chroma picture size.

[0139] The interaction of overlapping block motion compensation (OBMC) with IBC and IntraTMP is described below. The following is described in examples that can be implemented in combination or separately.

[0140] In one example, there is a high-level flag (e.g., PPS, SPS, or slice header) to indicate whether to apply OBMC when IntraTMP is used in the current block. In one example, there is a high-level flag (e.g., PPS, SPS, or slice header) to indicate whether to apply OBMC when IBC is used in the current block. In one example, there is a high-level flag (e.g., PPS, SPS, or slice header) to indicate whether to apply OBMC when IntraTMP is used in the neighboring block or the current block. In one example, there is a high-level flag (e.g., PPS, SPS, or slice header) to indicate whether to apply OBMC when IBC is used in the neighboring block or the current block.

[0141] FIG. 2 FIG. 1 is a block diagram illustrating an example video encoder 200 that can perform the techniques of this disclosure. FIG. 2 FIG. 1 is provided for purposes of explanation and should not be considered limiting of the techniques as broadly exemplified and described in this disclosure. For purposes of explanation, this disclosure is described in terms of techniques of VVC and HEVC. However, the techniques of this disclosure can be performed by video encoding devices configured to other video coding standards and video coding formats, such as AV1 and subsequent formats of the AV1 video coding format.

[0142] In FIG. 2In the example of FIG. 2, video encoder 200 includes video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, decoded picture buffer (DPB) 218, and entropy encoding unit 220. Any or all of video data memory 230, mode select unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy encoding unit 220 can be implemented in one or more processors or in processing circuitry. For instance, the units of video encoder 200 can be implemented as one or more circuits or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Also, video encoder 200 can include additional or alternative processors or processing circuitry to perform these and other functions.

[0143] Video data memory 230 is an example of a memory storage that can store video data to be encoded by the components of video encoder 200. Video encoder 200 can receive the video data stored in video data memory 230 from, for example, video source 104 FIG. 1 DPB 218 is an example of a memory storage that can act as a reference picture memory that stores reference video data to be used in prediction of subsequent video data by video encoder 200. Video data memory 230 and DPB 218 can each be formed by any of a variety of one or more memory devices or memory units, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magneto resistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 230 and DPB 218 can be provided by the same memory devices or separate memory devices. In various examples, video data memory 230 can be on-chip with other components of video encoder 200, as illustrated, or off-chip relative to those components.

[0144] In this disclosure, reference to video data memory 230 should not be interpreted as being limited to memory internal to video encoder 200 (unless specifically described as such) or memory external to video encoder 200 (unless specifically described as such). Rather, reference 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). FIG. 1 Memory 106 of video encoder 200 can also provide temporary storage of the outputs from the various units of video encoder 200.

[0145] The various units of FIG. 2 are illustrated to assist with understanding the operations performed by video encoder 200. The units can be implemented as fixed- function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide particular functionality, and are preset on the operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functionality over the operations that can be performed. For instance, programmable circuits can execute software or firmware that causes the programmable circuits to operate in the manner defined by instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive parameters or output parameters), but the types of operations that the fixed-function circuits perform are generally immutable. In some examples, one or more of the units can be distinct circuit blocks (fixed-function or programmable), and in some examples, one or more of the units can be integrated circuits.

[0146] Video encoder 200 can include arithmetic logic units (ALUs), elementary function units (EFUs), digital circuits, analog circuits, and / or programmable cores formed from programmable circuitry. In examples where operations of video encoder 200 are performed using software executed by the programmable circuitry, memory 106 FIG. 1 may store instructions (e.g., object code) of the software that video encoder 200 receives and executes, or another memory within video encoder 200 (not shown) can store such instructions.

[0147] Video data memory 230 is configured to store received video data. Video encoder 200 can retrieve pictures of the video data from video data memory 230 and provide the video data to residual generation unit 204 and mode selection unit 202. Video data in video data memory 230 can be raw video data that is to be encoded.

[0148] Mode selection unit 202 includes motion estimation unit 222, motion compensation unit 224, and intra-prediction unit 226. Mode selection unit 202 can include additional functional units that perform video prediction according to other prediction modes. As examples, mode selection unit 202 can include a palette unit, an intra-block copy unit (which can be part of motion estimation unit 222 and / or motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.

[0149] The mode select unit 202 generally coordinates the multiple encoding passes to test combinations of encoding parameters and resulting rate-distortion values for such combinations. The encoding parameters can include partitioning of CTUs into CUs, prediction modes for CUs, transform types for residual data of CUs, quantization parameters for residual data of CUs, and so on. The mode select unit 202 can ultimately select the combination of encoding parameters that has a better rate-distortion value compared to other tested combinations.

[0150] The video encoder 200 can partition a picture retrieved from the video data memory 230 into a series of CTUs, and encapsulate one or more CTUs within a slice. The mode select unit 202 can partition the CTUs of the picture according to a tree structure such as the MTT structure, the QTBT structure, a superblock structure, or the quad-tree structure described above. As described above, the video encoder 200 can form one or more CUs by partitioning a CTU according to the tree structure. Such CUs can also be referred to as “video blocks” or “blocks” generally.

[0151] In general, the mode select 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 prediction blocks for a current block (e.g., a current CU, or in HEVC, an overlapping portion of a PU and a TU). To perform inter prediction for the current block, the motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously coded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate a value that represents how similar a potential reference block is to the current block, e.g., according to the sum of absolute difference (SAD), sum of squared difference (SSD), mean absolute difference (MAD), mean squared difference (MSD), and so on. The motion estimation unit 222 can generally perform these calculations using the sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 can identify the reference block with the lowest value resulting from these calculations, to indicate the reference block that is most matched to the current block.

[0152] Motion estimation unit 222 can form one or more motion vectors (MVs) that define a position of a reference block in a reference picture relative to a position of the current block in the current picture. Motion estimation unit 222 can then provide the motion vector(s) to motion compensation unit 224. For example, for uni-directional inter prediction, motion estimation unit 222 can provide a single motion vector, while for bi-directional inter prediction, motion estimation unit 222 can provide two motion vectors. Motion compensation unit 224 can then generate a prediction block using the motion vector(s). For example, motion compensation unit 224 can use the motion vector(s) to retrieve data of the reference block. As another example, in cases where the motion vector has fractional sample precision, motion compensation unit 224 can interpolate values of the prediction block according to one or more interpolation filters. Moreover, for bi-directional inter prediction, motion compensation unit 224 can retrieve data of two reference blocks identified by the respective motion vectors and combine the retrieved data, e.g., by sample-wise averaging or weighted averaging.

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

[0154] As another example, for intra prediction or intra prediction coding, intra prediction unit 226 can generate a prediction block from neighboring samples of the current block. For example, for directional modes, intra prediction unit 226 can generally mathematically combine values of the neighboring samples and fill these computed values across the current block in a defined direction to produce the prediction block. As another example, for a DC mode, intra prediction unit 226 can compute an average of neighboring samples of the current block and generate the prediction block to include the resulting average for each sample of the prediction block.

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

[0156] The mode selection unit 202 provides the prediction block to a residual generation unit 204. The residual generation unit 204 receives an uncoded original version of the current block from the video data memory 230 and the prediction block from the mode selection unit 202. The residual generation unit 204 computes the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 can also determine the difference 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 can use one or more subtractor circuits that perform binary subtraction to form.

[0157] In examples in which the mode selection unit 202 partitions the CU into PUs, each PU can be associated with a luma prediction unit and corresponding chroma prediction units. Video encoder 200 and video decoder 300 can support PUs having various sizes. As noted above, a size of a CU can refer to a size of the luma coding block of the CU, while a size of a PU can refer to a size of the luma prediction unit of the PU. Assuming that a particular CU has a size of 2Nx2N, video encoder 200 can support PU sizes of 2Nx2N or NxN for intra-prediction, and 2Nx2N, 2NxN, Nx2N, NxN, or similar symmetric PU sizes for inter-prediction. Video encoder 200 and video decoder 300 can also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-prediction.

[0158] In examples in which the mode selection unit 202 does not further partition the CU into PUs, each CU can be associated with a luma coding block and corresponding chroma coding blocks. As above, a size of a CU can refer to a size of the luma coding block of the CU. Video encoder 200 and video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.

[0159] 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 selection unit 202 generates a prediction block for the current block being encoded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 can not generate a prediction block, but instead generate syntax elements that indicate the manner in which the block is to be reconstructed based on a selected palette. In such modes, the mode selection unit 202 can provide these syntax elements to the entropy encoding unit 220 for encoding.

[0160] As described above, the residual generation unit 204 receives video data for a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.

[0161] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a “transform coefficient block”). The transform processing unit 206 can apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 can perform multiple transforms on the residual block, e.g., a primary transform and a secondary transform such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.

[0162] When operating according to AV1, the transform processing unit 206 can apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a “transform coefficient block”). The transform processing unit 206 can apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 can apply a horizontal / vertical transform combination, which can include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), a flipped ADST (e.g., ADST in reverse order), and an identity transform (IDTX). When the identity transform is used, the transform is skipped in one of the vertical or horizontal directions. In some examples, the transform processing can be skipped.

[0163] The quantization unit 208 can quantize the transform coefficients in the transform coefficient block to produce a quantized transform coefficient block. The quantization unit 208 can 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) can 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 can introduce loss of information, and thus, quantized transform coefficients can have lower precision than the original transform coefficients produced by the transform processing unit 206.

[0164] Inverse quantization unit 210 and inverse transform processing unit 212 can 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 can produce a reconstructed block corresponding to the current block (albeit potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by mode selection unit 202. For example, reconstruction unit 214 can add samples of the reconstructed residual block to corresponding samples from the prediction block generated by mode selection unit 202 to produce the reconstructed block.

[0165] Filter unit 216 can perform one or more filtering operations on the reconstructed block. For example, filter unit 216 can perform a deblocking operation to reduce blocking artifacts along edges of the CU. In some examples, the operations of filter unit 216 can be skipped.

[0166] When operating according to AV1, filter unit 216 can perform one or more filtering operations on the reconstructed block. For example, filter unit 216 can perform a deblocking operation to reduce blocking artifacts along edges of the CU. In other examples, filter unit 216 can apply a constrained direction enhancement filter (CDEF), which can be applied after deblocking and can include application of a non-separable, non-linear, low-pass directional filter based on an estimated edge direction. Filter unit 216 can also include a loop restoration filter applied after CDEF, and can include a separable, symmetric, normalized Wiener filter or a double- self-guided filter.

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

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

[0169] Video encoder 200 can output a bitstream that includes the entropy encoded syntax elements needed to reconstruct blocks of a slice or picture. Specifically, entropy encoding unit 220 can output the bitstream.

[0170] According to AV1, entropy encoding unit 220 can be configured as a symbol-to-symbol adaptive multi-symbol arithmetic coder. Syntax elements in AV1 include an alphabet of N elements, and a context (e.g., a probability model) includes a set of N probabilities. Entropy encoding unit 220 can store the probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). Entropy encoding unit 220 can perform recursive scaling using an update factor based on the alphabet size to update the context.

[0171] The operations described above are described with respect to a block. Such description should be understood as 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 luma and chroma components of a CU. In some examples, the luma coding block and the chroma coding block are luma and chroma components of a PU.

[0172] In some examples, operations performed with respect to a luma coding block do not need to be repeated for a chroma coding block. As one example, operations to identify a motion vector (MV) and a reference picture for a luma coding block do not need to be repeated for identifying an MV and a reference picture for a chroma block. Instead, the MV for the luma coding block can be scaled to determine the MV for the chroma block, and the reference picture can be the same. As another example, an intra-prediction process can be the same for luma coding blocks and chroma coding blocks.

[0173] Video encoder 200 represents an example of a device configured to encode video data, the device including a memory configured to store the video data and one or more processing units implemented in a circuit and configured to perform the example techniques described in this disclosure.

[0174] FIG. 3 This is a block diagram illustrating an example video decoder 300 that can perform the techniques of this disclosure. FIG. 3 This disclosure is provided for illustrative purposes and not for limiting the techniques extensively illustrated and described herein. For illustrative purposes, the video decoder 300 is described in accordance with VVC and HEVC techniques. However, the techniques of this disclosure can be implemented by video decoding devices configured for other video decoding standards.

[0175] exist FIG. 3 In the example, the video decoder 300 includes a decoded 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 DPB 314. Any or all of the CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. For example, the units of the video decoder 300 can be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuitry to perform these and other functions.

[0176] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-prediction unit 318. The prediction processing unit 304 may include additional units that perform predictions based on other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copying unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.

[0177] When operating according to AV1, motion compensation unit 316 can be configured to use translational motion compensation, affine motion compensation, OBMC, and / or compound inter-intra prediction to decode coding blocks (e.g., both luma coding blocks and chroma coding blocks) of video data, as described above. Intra prediction unit 318 can be configured to use directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL, IBC, and / or palette mode to decode coding blocks (e.g., both luma coding blocks and chroma coding blocks) of video data, as described above.

[0178] CPB memory 320 is an example of a memory system that can store video data, such as an encoded video bitstream, to be decoded by the components of video decoder 300. The video data stored in CPB memory 320 can be obtained, for example, from computer-readable medium 110 FIG. 1 ). CPB memory 320 can include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. Also, CPB memory 320 can store video data other than syntax elements of a coded picture, such as temporary data representing outputs from the various units of video decoder 300. DPB 314 is an example of a memory system that generally stores decoded pictures that video decoder 300 can output, and / or use as reference video data when decoding subsequent data or pictures of an encoded video bitstream. CPB memory 320 and DPB 314 can each be formed by any of a variety of memory devices or memory

[0179] Additionally or alternatively, in some examples, video decoder 300 can retrieve coded video data from memory 120 FIG. 1 ). That is, memory 120 can store data with CPB memory 320 as discussed above. Likewise, 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, memory 120 can store the instructions to be executed by video decoder 300.

[0180] The various units shown in FIG. 3 FIG. 3 are illustrated to help understand the operations performed by video decoder 300. The units can be implemented as fixed- function circuits, programmable circuits, or a combination thereof. Similar to FIG. 2, FIG. 3 is merely one example of a video decoder that can implement the techniques described in this disclosure. Other examples of video decoders that can implement the techniques described in this disclosure can have a different configuration and use different architectures, protocols, formats, and standards. FIG. 2Fixed function circuitry refers to circuitry that provides specific functionality and is preset for operations that can be performed. Programmable circuitry refers to circuitry that can be programmed to perform various tasks and provide flexible functionality in terms of operations that can be performed. For example, programmable circuitry can execute software or firmware that causes the programmable circuitry to operate in a manner defined by instructions of the software or firmware. Fixed function circuitry can execute software instructions (e.g., to receive parameters or output parameters), but the type of operations that the fixed function circuitry performs is generally immutable. In some examples, one or more of the units can be distinct circuit blocks (fixed function or programmable), and in some examples one or more of the units can be integrated circuitry.

[0181] Video decoder 300 can include ALUs, EFUs, digital circuits, analog circuits, and / or programmable cores formed from programmable circuitry. In examples where the operations of video decoder 300 are performed by software executing on the programmable circuitry, on-chip or off-chip memory can store instructions of the software that video decoder 300 receives and executes.

[0182] Entropy decoding unit 302 can receive encoded video data from the CPB and entropy decode the video data to reconstruct syntax elements. Prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, and filter unit 312 can generate decoded video data based on the syntax elements extracted from the bitstream.

[0183] In general, video decoder 300 reconstructs a picture on a block-by-block basis. Video decoder 300 can perform reconstruction operations individually for each block (where the block that is currently being reconstructed (i.e., decoded) can be referred to as the “current block”).

[0184] Entropy decoding unit 302 can entropy decode syntax elements defining quantized transform coefficient blocks, as well as transform information such as quantization parameters (QPs) and / or transform mode indications. Inverse quantization unit 306 can use a QP associated with a quantized transform coefficient block to determine a degree of quantization and, likewise, a degree of inverse quantization for inverse quantization unit 306 to apply. Inverse quantization unit 306 may, for example, perform a bitwise left-shift operation to inverse quantize a quantized transform coefficient. Inverse quantization unit 306 may

[0185] After inverse quantization unit 306 forms a transform coefficient block, inverse transform processing unit 308 can apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, inverse transform processing unit 308 can apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block.

[0186] Furthermore, prediction processing unit 304 generates the prediction block from the prediction information syntax elements entropy decoded by entropy decoding unit 302. For example, in the case that the prediction information syntax elements indicate that the current block is inter predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements can indicate a reference picture in DPB 314 from which to retrieve a reference block, and a motion vector that identifies a location of the reference block in the reference picture relative to a location of the current block in the current picture. Motion compensation unit 316 can generally perform the inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 FIG. 2 ) described above.

[0187] As another example, in the case that the prediction information syntax elements indicate that the current block is intra predicted, intra prediction unit 318 can generate the prediction block according to an intra prediction mode indicated by the prediction information syntax elements. Again, intra prediction unit 318 can generally perform the intra prediction process in a manner substantially similar to that described with respect to intra prediction unit 226 FIG. 2 ) described above. Intra prediction unit 318 can retrieve data for neighboring samples of the current block from DPB 314.

[0188] Reconstruction unit 310 can reconstruct the current block using the prediction block and the residual block. For example, reconstruction unit 310 can add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.

[0189] Filter unit 312 can perform one or more filtering operations on the reconstructed block. For example, filter unit 312 can perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of filter unit 312 are not necessarily performed in all examples.

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

[0191] In this way, video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units that are implemented in circuitry and are configured to perform the example techniques described in this disclosure.

[0192] FIG. 4 is a flowchart illustrating an example method for encoding a current block in accordance with the techniques of this disclosure. The current block can be or can include a current CU. Although described with respect to video encoder 200 FIG. 1 and FIG. 2 ), it should be understood that other devices can be configured to perform methods similar to the methods of FIG. 4

[0193] In this example, video encoder 200 initially predicts a current block (400). For example, video encoder 200 can form a prediction block for the current block (e.g., using the techniques described in this disclosure). Video encoder 200 can then calculate a residual block for the current block (402). To calculate the residual block, video encoder 200 can calculate a difference between an unencoded original block for the current block and the prediction block. Video encoder 200 can then transform the residual block and quantize transform coefficients of the residual block (404). Next, video encoder 200 can scan the quantized transform coefficients of the residual block (406). During or after the scan, video encoder 200 can entropy encode the transform coefficients (408). For example, video encoder 200 can encode the transform coefficients using CAVLC or CABAC. Video encoder 200 can then output the entropy encoded data for the block (410).

[0194] FIG. 5 ​​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 can be or include a current CU. Although described with respect to video decoder 300 FIG. 1 and FIG. 3 ) it should be understood that other devices can be configured to perform methods similar to those of FIG. 5

[0195] Video decoder 300 can receive entropy encoded data for the current block, such as entropy encoded prediction information and entropy encoded data for transform coefficients of a residual block corresponding to the current block (500). Video decoder 300 can entropy decode the entropy encoded data to determine prediction information for the current block and to reproduce transform coefficients of the residual block (502). Video decoder 300 can predict the current block, e.g., using intra or inter prediction modes as indicated by the prediction information for the current block, to calculate a prediction block for the current block (504), e.g., using the techniques described in this disclosure. Video decoder 300 can then inverse scan the reproduced transform coefficients to create a block of quantized transform coefficients (506). Video decoder 300 can then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to produce a residual block (508). Video decoder 300 can finally decode the current block by combining the prediction block and the residual block (510).

[0196] FIG. 10A and FIG. 10B is a conceptual diagram illustrating an example of storing block vector (BV) information and deriving a candidate list of BVs. FIG. 10A A current block 1000 and a subsequent block 1002 are illustrated. The current block 1000 can not be adjacent to the subsequent block 1002. In FIG. 10A adjacent blocks 1004A-1004E can be adjacent to the subsequent block 1002. The current block 1000 can be encoded or decoded in IntraTMP mode and the subsequent block 1002 can be encoded or decoded in IntraTMP mode or IBC mode. In other examples, the current block 1000 can be encoded or decoded in IBC mode. The subsequent block 1002 is after the current block 1000 in coding order and the subsequent block 1002 and the current block 1000 can be in the same picture.

[0197] FIG. 10B A history BV list 1006, a spatial BV list 1008, and a candidate list 1010 of BVs are illustrated. In FIG. 10B and FIG. 10B ​In the illustrated example, video encoder 200 and video decoder 300 may store the BV of the current block 1000 in a historical BV list 1006 for encoding or decoding subsequent blocks 1002. In some examples, to store the BV of the current block 1000, video encoder 200 and video decoder 300 may trim or round the actual BV of the current block 1000 to generate a trimmed or rounded BV for the current block 1000. Video encoder 200 and video decoder 300 may store the trimmed or rounded BV of the current block 1000.

[0198] For example, such as FIG. 10B As illustrated, the video encoder 200 and video decoder 300 can store the BV of the current block 1000 at index 0 of the historical BV list 1006. Typically, the order of the BVs in the historical BV list 1006 can be based on the decoding order of the blocks including the current block 1000. For example, the current block 1000 can be stored as index 0 in the historical BV list 1006 because the BV of the current block 1000 is the most recent BV of the block that is not adjacent to the subsequent block 1002. The historical BV list 1006 is an example, and other ways of generating the historical BV list 1006 are possible, such as based on marked blocks. That is, it may not be necessary to provide a dedicated separate memory for the historical BV list 1006 in every example, but a dedicated separate memory for the historical BV list 1006 is possible.

[0199] like FIG. 10B As illustrated, the video encoder 200 and video decoder 300 can store the BVs of adjacent blocks 1004A to 1004E in a spatial BV list 1008. For example, in FIG. 10B In this example, it is assumed that neighboring blocks 1004D and 1004B are encoded and decoded in IntraTMP mode or IBC mode. Therefore, for neighboring blocks 1004D and 1004B, the video encoder 200 and video decoder 300 can store the corresponding BVs at indices 0 and 1, respectively, in the spatial BV list 1008. The spatial BV list 1008 can also store the location information of neighboring blocks 1004D and 1004B. In this example, other neighboring blocks 1004A, 1004C, and 1004E may not be encoded or decoded in IntraTMP mode or IBC mode, and therefore may not have associated BVs.

[0200] The video encoder 200 and video decoder 300 can derive a candidate list 1010 of BVs for subsequent blocks 1002 based on BVs from a historical BV list 1006 that includes the BVs of the current block 1000. For example, as FIG. 10BAs illustrated, video encoder 200 and video decoder 300 can add BVs from blocks neighboring subsequent block 1002 to an initial candidate list (e.g., for candidate list of BVs 1010, the BV of block 1004D is in index 0, and the BV of block 1004B is in index 1). Video encoder 200 and video decoder 300 can add BVs from history BV list 1006 to the initial candidate list. For example, index 0 of candidate list of BVs 1010 includes the BV of current block 1000. In some examples, the initial candidate list can be set to candidate list of BVs 1010. However, in some examples, the initial candidate list can be pruned and / or reordered to generate candidate list of BVs 1010. For example, video encoder 200 and video decoder 300 can determine the template matching cost of the BVs in the initial candidate list, and based on the template matching cost of the BVs in the initial candidate list, derive candidate list of BVs 1010.

[0201] FIG. 11 is a flowchart illustrating a method of operation in accordance with one or more examples described in this disclosure. At FIG. 11 In examples of the disclosure, one or more memories can be configured to store video data. Examples of the one or more memories include memory 106, memory 120, video data memory 230, decoded picture buffer 218, CPB memory 320, DPB 314, or other memory of video encoder 200 or video decoder 300. A processing circuitry can be coupled to the one or more memories. Examples of the processing circuitry include processing circuitry of video encoder 200 or video decoder 300. For convenience, reference is made to FIG. 10.

[0202] The processing circuitry of video encoder 200 or video decoder 300 can store the BV of current block 1000 in history BV list 1006 for encoding or decoding subsequent block 1002 (1100). In one or more examples, current block 1000 can be encoded or decoded in Intra TMP mode. History BV list 1006 can include BVs of blocks that are not adjacent to subsequent block 1002, and in some examples, the order of the BVs in history BV list 1006 is based on a coding order of the blocks including current block 1000. Current block 1000 can not be an adjacent block of subsequent block 1002.

[0203] In some examples, to store the BV of current block 1000, the processing circuitry of video encoder 200 or video decoder 300 can one of crop or round the actual BV of current block 1000 to generate a cropped or rounded BV of current block 1000. The processing circuitry of video encoder 200 or video decoder 300 can store the cropped or rounded BV of current block 1000.

[0204] The processing circuitry of the video encoder 200 or the video decoder 300 can derive the candidate list 1010 of BVs for the subsequent block 1002 based on the BVs from the history BV list 1006 including the BV of the current block 1000 (1102). For example, the processing circuitry of the video encoder 200 or the video decoder 300 can add the BVs from blocks neighboring the subsequent block 1002 (e.g., such as those of the spatial BV list 1008) to an initial candidate list, and add the BVs from the history BV list 1006 to the initial candidate list. In some examples, the initial candidate list can be the candidate list 1010 of BVs. However, in some examples, there can be additional pruning and / or reordering. For example, the processing circuitry of the video encoder 200 or the video decoder 300 can determine the template matching cost of the BVs in the initial candidate list, and derive the candidate list 1010 of BVs based on the template matching cost of the BVs in the initial candidate list.

[0205] The processing circuitry of the video encoder 200 or the video decoder 300 can encode or decode the subsequent block 1002 based on the candidate list 1010 of BVs (1104). As an example, the processing circuitry of the video encoder 200 or the video decoder 300 can utilize each of the BVs in the candidate list 1010 of BVs as a starting BV for a template matching process associated with each of the BVs. The processing circuitry of the video encoder 200 or the video decoder 300 can determine a prediction signal for the subsequent block 1002 based on the template matching process associated with each of the BVs. To encode or decode the subsequent block 1002, the processing circuitry of the video encoder 200 or the video decoder 300 (as applicable) can be configured to encode or decode the subsequent block 1002 based on the prediction signal.

[0206] As one example, to encode or decode the subsequent block, the processing circuitry of the video decoder 300 can be configured to decode the subsequent block 1002. To decode the subsequent block 1002, the processing circuitry of the video decoder 300 can be configured to determine a prediction signal based on at least one BV in the candidate list 1010 of BVs. The processing circuitry of the video decoder 300 can receive residual information indicating a difference between the prediction signal and the subsequent block 1002, and reconstruct the subsequent block 1002 based on the prediction signal and the residual information.

[0207] As one example, to encode or decode a subsequent block, the processing circuitry of video encoder 200 can be configured to encode a subsequent block 1002. To encode the subsequent block 1002, the processing circuitry of video encoder 200 can be configured to determine a prediction signal. At least one of the candidate list 1010 of BVs identifies or is used to identify a block used to derive the prediction signal. The processing circuitry of video encoder 200 can determine residual information that indicates a difference between the prediction signal and the subsequent block 1002. The processing circuitry of video encoder 200 can signal the residual information.

[0208] The following numbered clauses set forth one or more aspects of the devices and techniques described in this disclosure.

[0209] Clause 1A. A method of encoding or decoding video data, the method comprising: determining that at least one of Intra Template Matching Prediction (Intra TMP) or Intra Block Copy (IBC) is enabled for a current block; in response to the current block being encoded or decoded with Intra TMP or IBC enabled, storing a block vector (BV) of the current block in a BV buffer with positioning information of the current block; deriving at least one of a spatial BV candidate or a temporal BV candidate for a subsequent block based on the stored BV; and encoding or decoding the subsequent block based on the spatial BV candidate or the temporal BV candidate.

[0210] Clause 2A. The method of clause 1A, wherein storing comprises storing an integer portion of the BV and discarding a fractional portion of the BV.

[0211] Clause 3A. The method of any of clauses 1 and 2, wherein storing comprises rounding the BV.

[0212] Clause 4A. The method of any of clauses 1A-3A, wherein deriving comprises: deriving the spatial BV candidate if the subsequent block and the current block are in the same picture; or deriving the temporal BV candidate if the subsequent block and the current block are in different pictures.

[0213] Clause 5A. The method of any of clauses 1A-4A, wherein the BV comprises a first BV, the BV buffer comprises a first BV buffer, and the current block comprises a first block, the method further comprising: determining that a vertical portion or a horizontal portion of a second BV is between -0.5 and 0.5; one of: rounding the second BV to zero to generate a rounded second BV; or rounding the second BV to a value of -1 or 1 to generate the rounded second BV; and storing the rounded second BV in a second buffer.

[0214] Clause 6A. A method of encoding or decoding video data, the method comprising: determining that at least one of Intra Template Matching Prediction (Intra TMP) or Intra Block Copy (IBC) is enabled for a current block; in response to the current block being encoded or decoded with Intra TMP or IBC enabled, storing a block vector (BV) of the current block in a history BV list, wherein an order of the history BV list is based on a coding order of blocks including the current block; deriving a history BV candidate for a subsequent block based on the stored BVs; and encoding or decoding the subsequent block based on the history BV candidate.

[0215] Clause 7A. The method of clause 6A, wherein storing comprises storing an integer portion of the BV and discarding a fractional portion of the BV.

[0216] Clause 8A. The method of any of clauses 6A and 7A, wherein storing comprises rounding a BV.

[0217] Clause 9A. A method of encoding or decoding video data, the method comprising: deriving a starting point for Intra Template Matching Prediction (Intra TMP) or Intra Block Copy (IBC) as part of a block vector (BV) candidate derivation process to generate a plurality of BV candidates; encoding or decoding a current block based on the plurality of BV candidates.

[0218] Clause 10A. The method of clause 9A, wherein, in the BV candidate derivation process, a spatial candidate is derived and then a history candidate is derived.

[0219] Clause 11A. The method of clause 9A, wherein, in the BV candidate derivation process, only a spatial candidate for Intra TMP is derived.

[0220] Clause 12A. The method of any of clauses 9A-11A, wherein a search range of a template matching process is based on a number of available candidates.

[0221] Clause 13A. The method of any of clauses 9A-12A, the method further comprising: in a case where a distance between a new candidate and one of the plurality of BV candidates is greater than a threshold, skipping adding the new candidate to the plurality of BV candidates.

[0222] Clause 14A. A method of encoding or decoding video data, the method comprising: in a case where a direct block vector (BV) mode is applied to a current chroma block, rounding a corresponding luma BV of a current luma block to an integer value to generate a rounded luma BV; deriving a chroma BV based on the rounded luma BV; and encoding or decoding the current chroma block based on the chroma BV.

[0223] Clause 15A. A method for processing video data, the method comprising: signaling or parsing advanced flags to indicate whether to apply Overlapping Block Motion Compensation (OBMC) to a current block using Intra-Time Matching Prediction (IntraTMP) or Intra-Block Copying (IBC).

[0224] Clause 16A. A method for processing video data, the method comprising: signaling or resolving advanced flags to indicate whether Overlapping Block Motion Compensation (OBMC) is applied when adjacent blocks or the current block uses Intra-Temporal Matching Prediction (IntraTMP) or Intra-Block Copying (IBC).

[0225] Clause 17A. The method according to any one of Clauses 15A and 16A, wherein the advanced flag is one of the following: Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Slice Header.

[0226] Clause 18A. A method comprising any one of Clauses 1A to 17A or a combination thereof.

[0227] Clause 19A. An apparatus for encoding or decoding video data, the apparatus comprising: a memory configured to store video data; and processing circuitry coupled to the memory and configured to perform a method according to any one of Clauses 1A to 18A.

[0228] Clause 20A. The device as described in Clause 19A further includes a display configured to display decoded video data.

[0229] Clause 21A. The device pursuant to any one of Clauses 19A and 20A, wherein the device comprises one or more of a camera, computer, mobile device, broadcast receiver device or set-top box.

[0230] Clause 22A. The device pursuant to any one of Clauses 19A to 21A, wherein the device includes a video decoder.

[0231] Clause 23A. The device pursuant to any one of Clauses 19A to 22A, wherein the device includes a video encoder.

[0232] Clause 24A. A computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to perform the method according to any one of Clauses 1A to 18A.

[0233] Clause 25A. A device for encoding or decoding video data, the device comprising means for performing the method of any of clauses 1A-18A.

[0234] Clause 1. A method of encoding or decoding video data, the method comprising: storing a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (Intra TMP) mode, and wherein the history BV list comprises BVs of blocks that are not adjacent to the subsequent block; deriving a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encoding or decoding the subsequent block based on the candidate list of BVs.

[0235] Clause 2. The method of clause 1, wherein deriving the candidate list of BVs for the subsequent block comprises: adding BVs from blocks adjacent to the subsequent block to an initial candidate list; adding BVs from the history BV list to the initial candidate list; determining template matching costs for the BVs in the initial candidate list; and deriving the candidate list of BVs based on the template matching costs for the BVs in the initial candidate list.

[0236] Clause 3. The method of any of clauses 1 and 2, wherein storing the BV of the current block comprises: one of clipping or rounding an actual BV of the current block to generate a clipped or rounded BV of the current block; and storing the clipped or rounded BV of the current block.

[0237] Clause 4. The method of any of clauses 1-3, wherein the current block is not an adjacent block to the subsequent block.

[0238] Clause 5. The method of any of clauses 1-4, wherein the subsequent block is encoded or decoded in an Intra TMP mode or an intra block copy (IBC) mode.

[0239] Clause 6. The method of any of clauses 1-5, the method further comprising: utilizing each of the BVs in the candidate list of BVs as a starting BV for a template matching process associated with each of the BVs; and determining a prediction signal for the subsequent block based on the template matching process associated with each of the BVs, wherein encoding or decoding the subsequent block comprises encoding or decoding the subsequent block based on the prediction signal.

[0240] Clause 7. The method of any of clauses 1 to 6, wherein an order of BVs in the history BV list is based on a coding order of the block including the current block.

[0241] Clause 8. The method of any of clauses 1 to 7, wherein encoding or decoding the subsequent block comprises decoding the subsequent block, wherein decoding the subsequent block comprises determining a prediction signal based on at least one BV in the candidate list of BVs, receiving residual information indicating a difference between the prediction signal and the subsequent block, and reconstructing the subsequent block based on the prediction signal and the residual information.

[0242] Clause 9. The method of any of clauses 1 to 7, wherein encoding or decoding the subsequent block comprises encoding the subsequent block, wherein encoding the subsequent block comprises determining a prediction signal, wherein at least one BV in the candidate list of BVs identifies or is used to identify a block used to derive the prediction signal, determining residual information indicating a difference between the prediction signal and the subsequent block, and signaling the residual information.

[0243] Clause 10. A device for encoding or decoding video data, the device comprising: one or more memories configured to store the video data; and processing circuitry coupled to the one or more memories, wherein the processing circuitry is configured to: store a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an Intra Temporal Motion Vector Prediction (Intra TMP) mode, and wherein the history BV list includes BVs of blocks that are not adjacent to the subsequent block; derive a candidate list of BVs for the subsequent block based on BVs from the history BV list including the BV of the current block; and encode or decode the subsequent block based on the candidate list of BVs.

[0244] Clause 11. The device of clause 10, wherein to derive the candidate list of BVs for the subsequent block, the processing circuitry is configured to: add BVs from blocks adjacent to the subsequent block to an initial candidate list; add BVs from the history BV list to the initial candidate list; determine template matching costs for BVs in the initial candidate list; and derive the candidate list of BVs based on the template matching costs for the BVs in the initial candidate list.

[0245] Clause 12. The device of any of clauses 10 and 11, wherein to store the BVs for the current block, the processing circuitry is configured to: one of clip or round actual BVs for the current block to generate clipped or rounded BVs for the current block; and store the clipped or rounded BVs for the current block.

[0246] Clause 13. The device of any of clauses 10 to 12, wherein the current block is not a neighboring block of the subsequent block.

[0247] Clause 14. The device of any of clauses 10 to 13, wherein the subsequent block is coded or decoded in an Intra TMP mode or an intra block copy (IBC) mode.

[0248] Clause 15. The device of any of clauses 10 to 14, wherein the processing circuitry is configured to: utilize each of the BVs in the candidate list of BVs as a starting BV for a template matching process associated with each of the BVs; and determine a prediction signal for the subsequent block based on the template matching process associated with each of the BVs, wherein to code or decode the subsequent block, the processing circuitry is configured to code or decode the subsequent block based on the prediction signal.

[0249] Clause 16. The device of any of clauses 10 to 15, wherein an order of the BVs in the history BV list is based on a coding order of the blocks including the current block.

[0250] Clause 17. The device of any of clauses 10 to 16, wherein to code or decode the subsequent block comprises the processing circuitry is configured to decode the subsequent block, wherein to decode the subsequent block, the processing circuitry is configured to: determine a prediction signal based on at least one BV in the candidate list of BVs; receive residual information indicating a difference between the prediction signal and the subsequent block; and reconstruct the subsequent block based on the prediction signal and the residual information.

[0251] Clause 18. The device of any of clauses 10 to 16, wherein to code or decode the subsequent block comprises the processing circuitry is configured to code the subsequent block, wherein to code the subsequent block, the processing circuitry is configured to: determine a prediction signal, wherein at least one BV in the candidate list of BVs identifies or is used to identify a block used to derive the prediction signal; determine residual information indicating a difference between the prediction signal and the subsequent block; and signal the residual information.

[0252] Clause 19. The device of any of clauses 10-18, 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] Clause 20. A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to: store a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (Intra TMP) mode, and wherein the history BV list includes BVs of blocks that are not adjacent to the subsequent block; derive a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encode or decode the subsequent block based on the candidate list of BVs.

[0254] It is recognized that, in accordance with examples, certain acts or events that are described can be performed in a different sequence, may

[0255] In one or more examples, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media can include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media including any medium that facilitates transfer of a computer program from one place to another, e.g., according to a communication protocol. In this manner, computer- readable media generally can correspond to (1) tangible computer-readable storage media which is non-transitory or (2) a communication medium such as a signal or carrier wave. Data storage media can be any available media 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 can include a computer-readable medium.

[0256] By way of example, and not limitation, such computer-readable storage media can include one or more of RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other storage 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

[0257] Instructions can 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. Accordingly, the terms "processor" and "processing circuitry," as used herein can refer to any of the foregoing structures or any other structure suitable for implementation of the techniques described herein. In addition, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated in a combined codec. Also, the techniques could be fully implemented in one or more circuits or logic elements.

[0258] The techniques of this disclosure can 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 chip set). Various components, modules, or units are described in this disclosure to emphasize functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require

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

Claims

1. A method of encoding or decoding video data, the method comprising: storing a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (Intra TMP) mode, and wherein the history BV list includes BVs of blocks that are not adjacent to the subsequent block; deriving a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encoding or decoding the subsequent block based on the candidate list of BVs.

2. The method of claim 1, wherein deriving the candidate list of BVs for the subsequent block comprises: adding BVs from blocks adjacent to the subsequent block to an initial candidate list; adding BVs from the history BV list to the initial candidate list; determining template matching costs for the BVs in the initial candidate list; and deriving the candidate list of BVs based on the template matching costs for the BVs in the initial candidate list.

3. The method of claim 1, wherein storing the BV of the current block comprises: one of clipping or rounding an actual BV of the current block to generate a clipped or rounded BV of the current block; and storing the clipped or rounded BV of the current block.

4. The method of claim 1, wherein the current block is not an adjacent block to the subsequent block.

5. The method of claim 1, wherein the subsequent block is encoded or decoded in an Intra TMP mode or an intra block copy (IBC) mode.

6. The method of claim 1, the method further comprising: utilizing each of the BVs in the candidate list of BVs as a starting BV for a template matching process associated with each of the BVs; and determining a prediction signal for the subsequent block based on the template matching process associated with each of the BVs, wherein encoding or decoding the subsequent block comprises encoding or decoding the subsequent block based on the prediction signal.

7. The method of claim 1, wherein an order of BVs in the history BV list is based on a coding order of the blocks that include the current block.

8. The method of claim 1, wherein encoding or decoding the subsequent block comprises decoding the subsequent block, wherein decoding the subsequent block comprises: determining a prediction signal based on at least one BV in the candidate list of BVs; receiving residual information indicating a difference between the prediction signal and the subsequent block; and reconstructing the subsequent block based on the prediction signal and the residual information.

9. The method of claim 1, wherein encoding or decoding the subsequent block comprises encoding the subsequent block, wherein encoding the subsequent block comprises: determining a prediction signal, wherein at least one BV in the candidate list of BVs identifies or is used to identify blocks used to derive the prediction signal; ​ ​ ​ determining residual information indicative of a difference between the prediction signal and the subsequent block; and signaling the residual information.

10. A device for encoding or decoding video data, the device comprising: one or more memories configured to store the video data; and processing circuitry coupled to the one or more memories, wherein the processing circuitry is configured to: store a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an intra temporal motion vector prediction (Intra TMP) mode, and wherein the history BV list comprises BVs of blocks that are not adjacent to the subsequent block; derive a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encode or decode the subsequent block based on the candidate list of BVs.

11. The device of claim 10, wherein to derive the candidate list of BVs for the subsequent block, the processing circuitry is configured to: add BVs from blocks adjacent to the subsequent block to an initial candidate list; add BVs from the history BV list to the initial candidate list; determine template matching costs for the BVs in the initial candidate list; and derive the candidate list of BVs based on the template matching costs for the BVs in the initial candidate list.

12. The device of claim 10, wherein to store the BV of the current block, the processing circuitry is configured to: one of clip or round an actual BV of the current block to generate a clipped or rounded BV of the current block; and store the clipped or rounded BV of the current block.

13. The device of claim 10, wherein the current block is not an adjacent block to the subsequent block.

14. The device of claim 10, wherein the subsequent block is encoded or decoded in an Intra TMP mode or an intra block copy (IBC) mode.

15. The device of claim 10, wherein the processing circuitry is configured to: utilize each of the BVs in the candidate list of BVs as a start BV for a template matching process associated with each of the BVs; and determine a prediction signal for the subsequent block based on the template matching process associated with each of the BVs, wherein to encode or decode the subsequent block, the processing circuitry is configured to encode or decode the subsequent block based on the prediction signal.

16. The device of claim 10, wherein an order of BVs in the history BV list is based on a coding order of the blocks that include the current block.

17. The device of claim 10, wherein to encode or decode the subsequent block comprises the processing circuitry is configured to decode the subsequent block, wherein to decode the subsequent block, the processing circuitry is configured to: ​ determine a prediction signal based on at least one BV of the candidate list of BVs; receive residual information indicative of a difference between the prediction signal and the subsequent block; and reconstruct the subsequent block based on the prediction signal and the residual information.

18. The device of claim 10, wherein to encode or decode the subsequent block, the processing circuitry is configured to encode the subsequent block, wherein to encode the subsequent block, the processing circuitry is configured to: determine a prediction signal, wherein at least one BV of the candidate list of BVs identifies or is used to identify a block used to derive the prediction signal; determine residual information indicative of a difference between the prediction signal and the subsequent block; and signal the residual information.

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

20. A computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors to: store a block vector (BV) of a current block in a history BV list used to encode or decode a subsequent block, wherein the current block is encoded or decoded in an Intra Temporal Motion Vector Prediction (Intra TMP) mode, and wherein the history BV list comprises BVs of blocks that are not adjacent to the subsequent block; derive a candidate list of BVs for the subsequent block based on BVs from the history BV list that include the BV of the current block; and encode or decode the subsequent block based on the candidate list of BVs.