Interaction Between Reference Picture Resampling and Template-Based Inter Prediction Techniques in Video Coding
Patent Information
- Application Number
- JP2024535280
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-11-21
- Filing Date
- 2022-11-22
- Publication Date
- 2025-12-02
AI Technical Summary
Existing video coding processes that combine template-based inter-prediction techniques with reference picture resampling (RPR) and/or weighted prediction (WP) become complex and inefficient due to undefined interactions, leading to increased computational complexity and sub-optimal coding efficiency.
Disabling template-based inter-prediction techniques when RPR or WP is enabled, allowing video data to be encoded and decoded using inter-prediction alone, thereby reducing computational complexity and improving coding efficiency.
This approach reduces the complexity of implementing template-based inter-prediction techniques while enhancing coding efficiency in environments where RPR or WP is employed, ensuring optimal video encoding and decoding performance.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] This application claims priority to U.S. Patent Application No. 18 / 057,500, filed November 21, 2022, and U.S. Provisional Patent Application No. 63 / 265,555, filed December 16, 2021, the entire contents of which are incorporated herein by reference. U.S. Patent Application No. 18 / 057,500, filed November 21, 2022, claims the benefit of U.S. Provisional Patent Application No. 63 / 265,555, filed December 16, 2021.
[0002] TECHNICAL FIELD This disclosure relates to video encoding and decoding. [Background technology]
[0003] Digital video capabilities may be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite wireless telephones, so-called "smartphones," video teleconferencing devices, video streaming devices, and the like. Digital video devices implement video coding techniques such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4, Part 10, Advanced Video Coding (AVC), ITU-T H.265 / High Efficiency Video Coding (HEVC), ITU-T H.266 / Versatile Video Coding (VVC), and extensions to such standards, as well as proprietary video codecs / formats such as AOMedia Video1 (AV1) developed by the Alliance for Open Media. Video devices may implement such video coding techniques to more efficiently transmit, receive, encode, decode, and / or store digital video information.
[0004] 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, video slices (e.g., video pictures or portions of video pictures) may be divided into video blocks, which may also be referred to as coding tree units (CTUs), coding units (CUs), and / or coding nodes. Video blocks in intra-coded (I) slices of a picture are encoded using spatial prediction with respect to reference samples in neighboring blocks in the same picture. Video blocks in inter-coded (P or B) slices of a picture may use spatial prediction with respect to reference samples in neighboring blocks in the same picture or temporal prediction with respect to reference samples in other reference pictures. A picture may be referred to as a frame, and a reference picture may be referred to as a reference frame. Summary of the Invention
[0005] In general, this disclosure describes techniques for coding video data. In particular, this disclosure describes techniques related to handling interactions between reference picture resampling (RPR) and / or weighted prediction (WP) and template-based inter prediction techniques. The template-based inter prediction techniques may include local illumination compensation (LIC) and / or template matching (TM) inter prediction. In particular, this disclosure describes techniques including disabling the use of template-based inter prediction techniques in certain environments where RPR or WP are enabled for coding video data. The techniques of this disclosure may reduce the computational complexity of implementing template-based inter prediction techniques together with RPR or WP. In addition, the techniques of this disclosure may improve coding efficiency in situations where RPR or WP are enabled.
[0006] The techniques of the present disclosure may be applied as an extension to any existing video codec, such as High Efficiency Video Coding (HEVC), Versatile Video Coding (VVC), and Essential Video Coding (EVC), or may become an efficient coding tool in future video coding standards.
[0007] In one example, this disclosure describes a method for decoding video data, the method including determining that an RPR mode is enabled, determining not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and decoding the video data using inter prediction without applying the template-based inter prediction technique.
[0008] In another example, the disclosure describes an apparatus configured to decode video data, the apparatus comprising: a memory configured to store the video data; and one or more processors implemented in a circuit and in communication with the memory, the one or more processors configured to determine that an RPR mode is enabled, determine not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction technique.
[0009] In another example, this disclosure describes an apparatus configured to decode video data, the apparatus comprising: means for determining that an RPR mode is enabled; means for determining, based on the RPR mode being enabled, not to apply a template-based inter prediction technique to the video data; and means for decoding the video data using inter prediction without applying the template-based inter prediction technique.
[0010] In another example, this disclosure describes a non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more devices configured to decode video data to determine that RPR mode is enabled, determine not to apply template-based inter prediction techniques to the video data based on the RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction techniques.
[0011] In another example, this disclosure describes a method for encoding video data, the method including determining that an RPR mode is enabled, determining not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and encoding the video data using inter prediction without applying the template-based inter prediction technique.
[0012] In another example, the disclosure describes an apparatus configured to encode video data, the apparatus comprising: a memory configured to store the video data; and one or more processors implemented in circuitry and in communication with the memory, the one or more processors configured to determine that an RPR mode is enabled, determine not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and encode the video data using inter prediction without applying the template-based inter prediction technique.
[0013] In another example, the disclosure describes an apparatus configured to encode video data, the apparatus comprising: means for determining that an RPR mode is enabled; means for determining, based on the RPR mode being enabled, not to apply a template-based inter prediction technique to the video data; and means for encoding the video data using inter prediction without applying the template-based inter prediction technique.
[0014] In another example, this disclosure describes a non-transitory computer-readable storage medium storing instructions that, when executed, cause one or more devices configured to encode video data to determine that RPR mode is enabled, determine not to apply template-based inter prediction techniques to the video data based on the RPR mode being enabled, and encode the video data using inter prediction without applying the template-based inter prediction techniques.
[0015] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will become apparent from the description, drawings, and claims. [Brief description of the drawings]
[0016] [Figure 1]FIG. 1 is a block diagram illustrating an example video encoding and decoding system that may implement the techniques of this disclosure. [Diagram 2] FIG. 13 illustrates spatially neighboring motion vector candidates for example merge and advanced motion vector prediction modes. [Diagram 3] FIG. 13 is a diagram illustrating examples of temporal motion vector predictor candidates and motion vector scaling. [Figure 4] FIG. 13 illustrates example adjacent samples for an illumination compensation model. [Diagram 5] FIG. 13 illustrates another example of adjacent samples for the illumination compensation model. [Figure 6] FIG. 13 is a diagram illustrating an example of template matching. [Figure 7] 1 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure. [Figure 8] 1 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure. [Figure 9] 1 is a flowchart illustrating an example method for encoding a current block, in accordance with techniques of this disclosure. [Figure 10] 5 is a flowchart illustrating an example method for decoding a current block, in accordance with techniques of this disclosure. [Figure 11] 10 is a flowchart illustrating another example method for video data in accordance with techniques of this disclosure. [Figure 12] 5 is a flowchart illustrating another example method for decoding video data in accordance with techniques of this disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] Video coders (e.g., encoders and decoders) may be configured to code video data using various inter-prediction modes that may interact with other coding modes in negative or unexpected ways. For example, certain template-based inter-prediction techniques may be more complex to implement or may lose coding efficiency when applied with coding techniques that involve a scaling process on a reference picture. Exemplary template-based coding techniques may include local illumination compensation (LIC) and / or template matching (TM) inter-prediction. Exemplary video coding techniques that involve scaling of reference pictures may include reference picture resampling (RPR) and / or weighted prediction (WP).
[0018] In some exemplary video codecs, when RPR and / or WP are used, the respective processes of template-based inter prediction techniques (e.g., LIC and TM inter prediction) are not fully defined. Thus, a video coding process that uses both template-based inter prediction techniques and RPR / WP may be more complex to implement and / or provide suboptimal coding efficiency.
[0019] This disclosure describes techniques for coding video data. In particular, this disclosure describes techniques related to handling interactions between RPR and / or WP and template-based inter prediction techniques. In particular, this disclosure describes techniques that include disabling the use of template-based inter prediction techniques in certain environments where RPR or WP are enabled for coding video data. The techniques of this disclosure may reduce the computational complexity of implementing template-based inter prediction techniques together with RPR or WP. In addition, the techniques of this disclosure may improve coding efficiency in situations where RPR or WP are enabled.
[0020] 1 is a block diagram illustrating an example video encoding and decoding system 100 that may perform the techniques of this disclosure. The techniques of this disclosure are generally directed to coding (encoding and / or decoding) video data. In general, video data includes any data for processing video. Thus, video data may include raw uncoded video, coded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0021] 1, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides the video data to destination device 116 via a computer-readable medium 110. Source device 102 and destination device 116 may comprise any of a wide range of devices, including desktop computers, notebook (i.e., laptop) computers, mobile devices, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming devices, broadcast receiver devices, and the like. In some cases, source device 102 and destination device 116 may be capable of wireless communication and thus may be referred to as wireless communication devices.
[0022] In the example of FIG. 1, source device 102 includes a video source 104, memory 106, video encoder 200, and output interface 108. Destination device 116 includes an input interface 122, a video decoder 300, memory 120, and a display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 may be configured to apply techniques for coding video data using reference picture resampling and template-based inter prediction techniques. 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, the source device and destination device may include other components or configurations. For example, source device 102 may receive video data from an external video source, such as an external camera. Similarly, destination device 116 may interface with an external display device rather than including an integrated display device.
[0023] The system 100 as shown in FIG. 1 is only an example. In general, any digital video encoding and / or decoding device may perform techniques for using reference picture resampling and template-based inter prediction techniques. The source device 102 and the destination device 116 are only examples of coding devices, such that the source device 102 generates coded video data for transmission to the destination device 116. This disclosure refers to devices that perform coding (encoding and / or decoding) of data as "coding" devices. Thus, the video encoder 200 and the video decoder 300 represent examples of coding devices, specifically, video encoders and video decoders, respectively. In some examples, the source device 102 and the destination device 116 may operate in a substantially symmetrical manner, such that each of the source device 102 and the destination device 116 includes video encoding and decoding components. Thus, the system 100 may support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, video streaming, video playback, video broadcasting, or video telephony.
[0024] In general, video source 104 represents a source of video data (i.e., raw, unencoded video data) and provides a continuous series of pictures (also called “frames”) of the video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include a video capture device, such as a video camera, a video archive containing previously captured raw video, and / or a video feed interface for receiving video from a video content provider. As a further alternative, video source 104 may generate computer graphics-based data as source video, or a combination of live video, archived video, and computer-generated video. In each case, video encoder 200 encodes the captured video data, pre-captured video data, or computer-generated video data. Video encoder 200 may reorder the pictures from the order in which they were received (sometimes called “display order”) to a coding order for coding. Video encoder 200 may generate a bitstream including the encoded video data. The source device 102 may then output the encoded video data via the output interface 108 to a computer-readable medium 110, for receipt and / or retrieval by, for example, an input interface 122 of the destination device 116.
[0025] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 106, 120 may store raw video data, e.g., raw video from the video source 104 and raw decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 may store software instructions executable by, e.g., the video encoder 200 and the video decoder 300, respectively. Although the memories 106 and 120 are shown in this example separately from the video encoder 200 and the video decoder 300, it should be understood that the video encoder 200 and the video decoder 300 may also include internal memories for functionally similar or equivalent purposes. Additionally, the memories 106, 120 may store encoded video data, e.g., output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 may be allocated as one or more video buffers, for example, for storing raw decoded video data and / or encoded video data.
[0026] The computer-readable medium 110 may represent any type of medium or device capable of transferring encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium for enabling the source device 102 to transmit the encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal including the encoded video data, and the input interface 122 may demodulate a received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include routers, switches, base stations, or any other equipment that may be useful for facilitating communication from the source device 102 to the destination device 116.
[0027] In some examples, source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0028] In some examples, source device 102 may output the encoded video data to a file server 114 or another intermediate storage device, which may store the encoded video data generated by source device 102. Destination device 116 may access the stored video data from file server 114 via streaming or download.
[0029] The file server 114 may be any type of server device capable of storing encoded video data and transmitting the encoded video data to a destination device 116. The file server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or File Delivery over Unidirectional Transport (FLUTE) protocol), a content delivery network (CDN) device, a hypertext transfer protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or Enhanced MBMS (eMBMS) server, and / or a network attached storage (NAS) device. The file server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), Real Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.
[0030] The destination device 116 may access the encoded video data from the file server 114 through any standard data connection, including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both suitable for accessing the encoded video data stored on the file server 114. The input interface 122 may be configured to operate according to any one or more of the various protocols discussed above for retrieving or receiving media data from the file server 114, or other such protocols for retrieving media data.
[0031] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components operating according to any of the various IEEE 802.11 standards, or other physical components. In examples in which output interface 108 and input interface 122 comprise wireless components, output interface 108 and input interface 122 may be configured to transfer data, such as encoded video data, according to cellular communication standards, such as 4G, 4G-LTE (Long-Term Evolution), LTE Advanced, 5G, etc. In some examples in which output interface 108 comprises a wireless transmitter, output interface 108 and input interface 122 may be configured to transfer data, such as encoded video data, according to other wireless standards, such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee™), the Bluetooth™ standard, etc. In some examples, the source device 102 and / or the destination device 116 may include respective system-on-a-chip (SoC) devices. For example, the source device 102 may include a SoC device for performing functions attributed to the video encoder 200 and / or the output interface 108, and the destination device 116 may include a SoC device for performing functions attributed to the video decoder 300 and / or the input interface 122.
[0032] The techniques of this disclosure may be applied to video coding to support any of a variety of multimedia applications, such as over-the-air television broadcast, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.
[0033] An input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 that is also used by the video decoder 300, such as syntax elements having values that describe characteristics and / or processing of video blocks or other coded units (e.g., slices, pictures, groups of pictures, sequences, etc.). The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.
[0034] Although not shown in FIG. 1, in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or audio decoder and may include appropriate MUX-DEMUX units, or other hardware and / or software, to handle multiplexed streams containing both audio and video in a common data stream.
[0035] The video encoder 200 and the video decoder 300 may each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When the techniques are implemented partially in software, a device may store instructions for the software on a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, any of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. The device including the video encoder 200 and / or the video decoder 300 may comprise an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.
[0036] The video encoder 200 and the video decoder 300 may operate according to a video coding standard, such as ITU-T H.265, also referred to as High Efficiency Video Coding (HEVC), or extensions thereof, such as multiview and / or scalable video coding extensions. Alternatively, the video encoder 200 and the video decoder 300 may operate according to other proprietary or industry standards, such as ITU-T H.266, also referred to as Versatile Video Coding (VVC). In other examples, the video encoder 200 and the video decoder 300 may operate according to a proprietary video codec / format, such as AOMedia Video1 (AV1), an extension of AV1, and / or a successor version of AV1 (e.g., AV2). In other examples, the video encoder 200 and the video decoder 300 may operate according to other proprietary formats or industry standards. However, the techniques of this disclosure are not limited to any particular coding standard or format. In general, video encoder 200 and video decoder 300 may be configured to perform the techniques of this disclosure in combination with any video coding technique that uses reference picture resampling and template-based inter prediction techniques.
[0037] In general, the video encoder 200 and the video decoder 300 may perform block-based coding of pictures. The term “block” generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in the encoding and / or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. In general, the video encoder 200 and the video decoder 300 may code video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, rather than coding red, green, and blue (RGB) data for samples of a picture, the video encoder 200 and the video decoder 300 may code luminance and chrominance components, where the chrominance components may include both red and blue chrominance components. In some examples, the video encoder 200 converts received RGB formatted data to a YUV representation before encoding, and the video decoder 300 converts the YUV representation to the RGB format. Alternatively, pre-processing and post-processing units (not shown) may perform these conversions.
[0038] This disclosure may generally refer to coding (e.g., encoding and decoding) a picture as including a process of encoding or decoding data for a picture. Similarly, this disclosure may refer to coding a block of a picture as including a process of encoding or decoding data for the block, e.g., predictive and / or residual coding. An encoded video bitstream generally includes a set of values for syntax elements that represent coding decisions (e.g., coding modes) and division of a picture into blocks. Thus, references to coding a picture or a block should generally be understood as coding values for the syntax elements that form the picture or block.
[0039] HEVC defines various blocks, including coding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video coder (such as the video encoder 200) divides coding tree units (CTUs) into CUs according to a quadtree structure. That is, the video coder divides CTUs and CUs into four equal non-overlapping squares, and each node of the quadtree has either zero or four child nodes. A node with no child nodes may be called a "leaf node", and a CU of such a leaf node may include one or more PUs and / or one or more TUs. The video coder may further divide the PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the division of a TU. In HEVC, a PU represents inter-predicted data, and a TU represents residual data. An intra-predicted CU includes intra-prediction information, such as an intra-mode indication.
[0040] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to VVC. According to VVC, a video coder (such as the video encoder 200) divides a picture into multiple coding tree units (CTUs). The video encoder 200 may divide the CTUs according to a tree structure, such as a quadtree-binary tree (QTBT) structure or a Multi-Type Tree (MTT) structure. The QTBT structure eliminates the concept of multiple division types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels, namely, a first level divided according to a quadtree division and a second level divided according to a binary tree division. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to coding units (CUs).
[0041] In the MTT partitioning structure, blocks may be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of triple tree (TT) (also called ternary tree (TT)) partitioning. A triple tree partitioning or ternary tree partitioning is a partitioning in which a block is divided into three subblocks. In some examples, a triple tree partitioning or ternary tree partitioning divides a block into three subblocks without splitting the original block through the center. The partitioning types in MTT (e.g., QT, BT, and TT) may be symmetric or asymmetric.
[0042] When operating according to the AV1 codec, the video encoder 200 and the video decoder 300 may be configured to code the video data in blocks. In AV1, the largest coding block that may be processed is called a superblock. In AV1, a superblock may be either 128×128 luma samples or 64×64 luma samples. However, in successor video coding formats (e.g., AV2), a superblock may be defined by a different (e.g., larger) luma sample size. In some examples, a superblock is the top level of a block quadtree. The video encoder 200 may further divide the superblock into smaller coding blocks. The video encoder 200 may divide the superblock and other coding blocks into smaller blocks using square or non-square partitioning. The non-square blocks may include N / 2×N, N×N / 2, N / 4×N, and N×N / 4 blocks. The video encoder 200 and the video decoder 300 may perform separate prediction and transform processes for each of the coding blocks.
[0043] AV1 also defines tiles of video data. A tile is a rectangular array of superblocks that may be coded independently of other tiles. That is, video encoder 200 and video decoder 300 may encode and decode coding blocks within a tile, respectively, without using video data from other tiles. However, video encoder 200 and video decoder 300 may perform filtering across tile boundaries. Tiles may be uniform or non-uniform in size. Tile-based coding may enable parallel processing and / or multithreading for encoder and decoder implementations.
[0044] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luminance and chrominance components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luminance component and another QTBT / MTT structure for both chrominance components (or two QTBT / MTT structures for each chrominance component).
[0045] Video encoder 200 and video decoder 300 may be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning, or other partitioning structures.
[0046] In some examples, the CTU includes a coding tree block (CTB) of luma samples, two corresponding CTBs of chroma samples for a picture with three sample arrays, or a CTB of samples for a picture coded using three separate color planes and syntax structures used to code a monochrome picture or sample. The CTB may be an N×N block of samples for some value of N that divides the 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 picture in 4:2:0, 4:2:2, or 4:4:4 color format, or an array or a single sample of an array that makes up a picture in monochrome format. In some examples, the coding block is an M×N block of samples for some value of M and N that divides the CTB into coding blocks.
[0047] Blocks (e.g., CTUs or CUs) may be grouped in various ways within a picture. As an example, a brick may refer to a rectangular region of a CTU row within a particular tile within a picture. A tile may be a rectangular region of CTUs within a particular tile column and a particular tile row within a picture. A tile column refers to a rectangular region of CTUs with a height equal to the height of the picture and a width specified by a syntax element (e.g., in a picture parameter set). A tile row refers to a rectangular region of CTUs with a height specified by a syntax element (e.g., in a picture parameter set) and a width equal to the width of the picture.
[0048] In some examples, a tile may be divided into multiple bricks, each of which may include one or more CTU rows within the tile. A tile that is not divided into multiple bricks may also be referred to as a brick. However, a brick that is a true subset of a tile may not be referred to as a tile. Bricks in a picture may also be arranged as slices. A slice may be an integer number of bricks of a picture that may be contained exclusively within a single network abstraction layer (NAL) unit. In some examples, a slice includes either several complete tiles or only a series of contiguous complete bricks of a tile.
[0049] This disclosure may use "NxN" and "N by N", e.g., 16x16 samples or 16 by 16 samples, interchangeably to refer to the sample dimensions of a block (such as a CU or other video block) in the vertical and horizontal dimensions. In general, a 16x16 CU has 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxN CU generally has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. Samples in a CU may be arranged in rows and columns. Moreover, a CU does not necessarily have to have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may comprise NxM samples, where M is not necessarily equal to N.
[0050] The video encoder 200 encodes video data for a CU that represents prediction and / or residual information as well as other information. The prediction information indicates how the CU will be predicted to form a predictive block for the CU. The residual information generally represents sample-by-sample differences between samples of the CU before encoding and the predictive block.
[0051] To predict a CU, the video encoder 200 may generally form a predictive block for the CU through inter prediction or intra prediction. Inter prediction generally refers to predicting a CU from data of a previously coded picture, and intra prediction generally refers to predicting a CU from previously coded data of the same picture. To perform inter prediction, the video encoder 200 may generate a predictive block using one or more motion vectors. The video encoder 200 may generally perform a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using a sum of absolute difference (SAD), sum of squared differences (SSD), mean absolute difference (MAD), mean squared differences (MSD), or other such difference calculation to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may predict the current CU using unidirectional prediction or bidirectional prediction.
[0052] Some examples of VVC also provide an affine motion compensation mode, which may be considered an inter-prediction mode. In an affine motion compensation mode, video encoder 200 may determine two or more motion vectors that represent non-translational motion, such as zooming in or out, rotation, perspective movement, or other irregular motion types.
[0053] To perform intra prediction, the video encoder 200 may select an intra prediction mode to generate a prediction block. Some examples of VVC provide 67 intra prediction modes, including various orientation modes, as well as a planar mode and a DC mode. In general, the video encoder 200 selects an intra prediction mode that describes neighboring samples for a current block (e.g., a block of a CU) and predicts samples of the current block therefrom. Assuming that the video encoder 200 codes the CTUs and CUs in raster scan order (left to right, top to bottom), such samples may generally be above, above and to the left, or to the left of the current block in the same picture as the current block.
[0054] The video encoder 200 encodes data representing a prediction mode for the current block. For example, in the case of an inter prediction mode, the video encoder 200 may encode data representing which of various available inter prediction modes is used as well as motion information for the corresponding mode. In the case of unidirectional or bidirectional inter prediction, for example, the video encoder 200 may encode motion vectors using an advanced motion vector prediction (AMVP) mode or a merge mode. The video encoder 200 may use a similar mode to encode motion vectors for an affine motion compensation mode.
[0055] AV1 includes two general techniques for encoding and decoding coding blocks of video data. The two general techniques are intra prediction (e.g., intra-frame prediction or spatial prediction) and inter prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when predicting a block of a current frame of video data using an intra prediction mode, the video encoder 200 and the video decoder 300 do not use video data from other frames of the video data. In most intra prediction modes, the video encoder 200 encodes a block of the current frame based on a difference between a sample value in the current block and a predicted value generated from a reference sample in the same frame. The video encoder 200 determines a predicted value generated from a reference sample based on the intra prediction mode.
[0056] Following prediction, such as intra- or inter-prediction, of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents sample-by-sample differences between a block and a prediction block for that block formed using a corresponding prediction mode. The video encoder 200 may apply one or more transforms to the residual block to generate transform data in a transform domain rather than the sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a secondary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhunen-Loeve transform (KLT), etc., following the initial transform. The video encoder 200 generates transform coefficients following application of the one or more transforms.
[0057] As mentioned above, following any transformation to generate transform coefficients, the video encoder 200 may perform quantization of the transform coefficients. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the transform coefficients, providing further compression. By performing a quantization process, the video encoder 200 may reduce the bit depth associated with some or all of the transform coefficients. For example, the video encoder 200 may truncate an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 may perform a bitwise right shift of the value to be quantized.
[0058] Following quantization, the video encoder 200 may scan the transform coefficients, generating a one-dimensional vector from the two-dimensional matrix including the quantized transform coefficients. The scan may be designed to place transform coefficients of higher energy (and therefore lower frequency) at the front of the vector and transform coefficients of lower energy (and therefore higher frequency) at the back of the vector. In some examples, the video encoder 200 may use a predefined scan order for scanning the quantized transform coefficients to generate a serialized vector and then entropy code the quantized transform coefficients of the vector. In other examples, the video encoder 200 may perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 may entropy code the one-dimensional vector, for example, according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 may also entropy code values for syntax elements that describe metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.
[0059] To perform CABAC, the video encoder 200 may assign a context in a context model to a symbol to be transmitted. The context may relate, for example, to whether neighboring values of the symbol are zeroed out or not. The probability decision may be based on the context assigned to the symbol.
[0060] Video encoder 200 may further generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data, for example in a picture header, a block header, a slice header, or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS), to video decoder 300. Video decoder 300 may similarly decode such syntax data to determine how to decode corresponding video data.
[0061] In this manner, video encoder 200 may generate a bitstream including encoded video data, e.g., syntax elements that describe division of a picture into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, video decoder 300 may receive the bitstream and may decode the encoded video data.
[0062] In general, the video decoder 300 performs a reciprocal process to that performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 may decode values for syntax elements of the bitstream using CABAC in a manner substantially similar to, but reciprocal to, the CABAC encoding process of the video encoder 200. The syntax elements may define partition information for partitioning a picture into CTUs and partitioning each CTU according to a corresponding partition structure, such as a QTBT structure, to define the CUs of the CTU. The syntax elements may further define prediction and residual information for blocks of video data (e.g., CUs).
[0063] The residual information may be represented, for example, by quantized transform coefficients. The video decoder 300 may dequantize and inverse transform the quantized transform coefficients of the block to reconstruct a residual block for the block. The video decoder 300 forms a predictive block for the block using the signaled prediction mode (intra-prediction or inter-prediction) and associated prediction information (e.g., motion information for inter-prediction). The video decoder 300 may then combine (sample by sample) the predictive block and the residual block to reconstruct the original block. The video decoder 300 may perform additional processing, such as performing a deblocking process to reduce visual artifacts along block boundaries.
[0064] This disclosure may generally refer to "signaling" some information, such as a syntax element. The term "signaling" may generally refer to communication of values for syntax elements and / or other data used to decode encoded video data. That is, video encoder 200 may signal values for syntax elements in a bitstream. In general, signaling refers to generating values in a bitstream. As noted above, source device 102 may transfer the bitstream to destination device 116 in substantially real-time or non-real-time, which may occur, such as when storing syntax elements in storage device 112 for later retrieval by destination device 116.
[0065] As described in more detail below, the techniques of this disclosure relate to handling interactions between reference picture resampling (RPR) and template-based inter prediction techniques (e.g., template matching and local illumination compensation (LIC)). The techniques of this disclosure may be applied as extensions to any of the existing video codecs, such as High Efficiency Video Coding (HEVC), Versatile Video Coding (VVC), Essential Video Coding (EVC), or may be efficient coding tools in future video coding standards. In a general example, the video encoder 200 and the video decoder may be configured to determine that an RPR mode is enabled, determine not to apply template-based inter prediction techniques to the video data based on the RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction techniques.
[0066] CU Structure and Motion Vector Prediction In some video coding processes (e.g., HEVC), the largest coding unit (LCU) in a slice is called a coding tree block (CTB) or coding tree unit (CTU). The CTB contains a quadtree, whose nodes are called coding units (CUs).
[0067] The size of the CTB can range from 16x16 samples to 64x64 samples in the HEVC Main Profile (although technically a CTB size of 8x8 can be supported). The CU can be the same size as the CTB to as small as 8x8 samples. Each CU is coded using a coding mode (e.g., inter, intra, or another coding mode). If the CU is inter-coded, it can be further split into two or four prediction units (PUs), or only one PU if no further splitting is applied. If there are two PUs in one CU, the two PUs can be 1 / 2 sized rectangles, or two rectangles with a size of 1 / 4 or 3 / 4 of the size of the CU.
[0068] If a CU is inter-coded, each PU has one set of motion information that video decoder 300 may derive using a specific inter-prediction mode.
[0069] Motion Vector Prediction In some video coding processes (e.g., the HEVC standard), there are two inter-prediction modes for a PU, named merge mode (skip is considered to be a special case of merge) and advanced motion vector prediction (AMVP) mode, respectively.
[0070] In either AMVP mode or merge mode, a motion vector (MV) candidate list is maintained for multiple motion vector predictors. The motion vector of the current PU as well as the reference index in merge mode are generated by taking one candidate from the MV candidate list.
[0071] The MV candidate list includes up to five candidates for merge mode and only two candidates for AMVP mode. A merge candidate may include a set of motion information, e.g., a motion vector corresponding to both the reference picture list (list 0 and list 1) and a reference index. When a merge candidate is identified by a merge index, the reference picture used for predicting the current block as well as the associated motion vector are determined. On the other hand, under AMVP mode, since the AMVP candidate includes only motion vectors, for each possible prediction direction from either list 0 or list 1, the reference index is explicitly signaled along with the MV predictor (MVP) index to the MV candidate list. In AMVP mode, the predicted motion vector may be further refined.
[0072] Candidates for both merge and AMVP modes may be similarly derived from the same spatial and temporal neighboring blocks.
[0073] Spatial Adjacent Candidates As shown in FIG. 2, spatial MV candidates are derived from neighboring blocks for a particular PU (PU0), but the methods for generating candidates from blocks differ between merge mode and AMVP mode.
[0074] In merge mode, up to four spatial MV candidates may be derived for PU0 400 using the order shown in Figure 2. As shown in Figure 2, the order is: left neighboring block (0, A1), above neighboring block (1, B1), above right neighboring block (2, B0), below left neighboring block (3, A0), and above left neighboring block (4, B2).
[0075] In AVMP mode, the neighboring blocks of PU0 402 are divided into two groups: a left group including neighboring blocks 0 and 1, and an upper group including neighboring blocks 2, 3, and 4. For each group, the possible candidate among the neighboring blocks that references the same reference picture as indicated by the signaled reference index has the highest priority to be chosen to form the final candidate of the group. It may be possible that all the neighboring blocks do not contain motion vectors pointing to the same reference picture. Therefore, if such a candidate cannot be found, the first available candidate may be scaled to form the final candidate, thus compensating for the difference in temporal distance.
[0076] Temporal motion vector prediction Temporal motion vector predictor (TMVP) candidates are added to the MV candidate list after spatial motion vector candidates if they are valid and available. The process of motion vector derivation for TMVP candidates is the same for both merge mode and AMVP mode. However, the target reference index for TMVP candidates in merge mode is always set to 0.
[0077] The location of the primary block for TMVP candidate derivation is the outer bottom-right block of the co-located PU, shown as block 410 ("T") in Figure 3, to compensate for the bias towards the top and left blocks used to generate spatially neighboring candidates. However, if the block is located outside the current CTB row or no motion information is available, the block is replaced with the center block 412 of the PU.
[0078] The motion vectors for the TMVP candidates are derived from the co-located PUs of the co-located pictures, which are indicated at the slice level. The motion vectors for the co-located PUs are called co-located MVs.
[0079] Similar to the temporal direct mode in AVC, to derive TMVP candidate motion vectors, the co-located MVs may be scaled to compensate for the temporal distance difference, as shown in process 450 of FIG.
[0080] Other Aspects of Motion Estimation Some other aspects of merge mode and AMVP mode are described below.
[0081] Motion Vector Scaling: It is assumed that the value of a motion vector is proportional to the distance of pictures in display time. A motion vector relates two pictures, namely a reference picture and a picture that contains the motion vector (i.e., a containing picture). When a motion vector is used to predict another motion vector, the distance between the containing picture and the reference picture is calculated based on the Picture Order Count (POC) value.
[0082] For a motion vector to be predicted, both its associated retained and reference pictures may be different. Therefore, a new distance (based on POC) is calculated. The motion vector is scaled based on these two POC distances. For spatial neighbor candidates, the retained pictures for the two motion vectors are the same, but the reference pictures are different. In HEVC, the motion vector scaling is applied to both TMVP and AMVP for spatial and temporal neighbor candidates.
[0083] Generation of pseudo motion vector candidates: If the motion vector candidate list is not complete (e.g., contains less than a predetermined maximum number of candidates), pseudo motion vector candidates are generated and inserted at the end of the list until the list has the maximum number of candidates.
[0084] In merge mode, there are two types of pseudo MV candidates: a combined candidate derived only for B slices, and a zero candidate that is used only for AMVP if the first type does not provide enough pseudo candidates.
[0085] For each pair of candidates that are already in the candidate list and have the necessary motion information, a bidirectional combined motion vector candidate is derived by combining the motion vector of the first candidate that references a picture in list 0 and the motion vector of the second candidate that references a picture in list 1.
[0086] Pruning process for candidate insertion: Candidates from different blocks may happen to be the same, which reduces the efficiency of the merge / AMVP candidate list. To address this issue, a pruning process is applied. The pruning process compares one candidate with other candidates in the current candidate list to avoid inserting the same candidate. To reduce complexity, instead of comparing each possible candidate with all other existing candidates, only a limited number of pruning processes are applied.
[0087] Reference Picture Resampling In some video coding processes (e.g., HEVC), the spatial resolution of a picture cannot change unless a new sequence using a new sequence parameter set (SPS) starts with an intra random access point (IRAP) picture. VVC allows picture resolution change in a sequence at some positions without encoding an IRAP picture, which is always intra-coded. This feature is sometimes called reference picture resampling (RPR) because RPR involves resampling of a reference picture used for inter prediction when the reference picture has a different resolution than the current picture being decoded. To avoid additional processing steps, the RPR process in VVC is designed to be performed at the block level, embedded in the motion compensation process. In the motion compensation stage, a scaling ratio is used together with the motion information to identify the location of reference samples in the reference picture used in the interpolation process.
[0088] In VVC, the scaling ratio is restricted to be greater than or equal to 1 / 2 (2x downsampling from reference picture to current picture) and less than or equal to 8 (8x upsampling). Three sets of resampling filters with different frequency cutoffs are specified to handle various scaling ratios between the reference picture and the current picture. The three sets of resampling filters apply to scaling ratios ranging from 1 / 2 to 1 / 1.75, 1 / 1.75 to 1 / 1.25, and 1 / 1.25 to 8, respectively.
[0089] Each set of resampling filters has 16 phases for the luma component and 32 phases for the chroma components, which is the same as for the motion compensated interpolation filters. The filter set for normal motion compensated interpolation is used when the scaling ratio is in the range of 1 / 1.25 to 8. In practice, the normal motion compensated interpolation process can be considered as a special case of the resampling process with scaling ratios in the range of 1 / 1.25 to 8. In addition to the conventional translational block motion, the affine mode has three sets of 6-tap interpolation filters used for the luma component to cover different scaling ratios in the RPR. The horizontal and vertical scaling ratios are derived based on the picture width and height, as well as the left, right, top, and bottom scaling offsets specified for the reference picture and the current picture.
[0090] To support this feature, the picture resolution and the corresponding adaptation window are signaled in the Picture Parameter Set (PPS) rather than in the SPS, while the maximum picture resolution is signaled in the SPS.
[0091] Weighted Prediction In some video coding processes (e.g., HEVC), weighted prediction (WP) is supported, in which a scaling factor (denoted by a), a shift number (denoted by s), and an offset (denoted by b) are used in the motion compensation process. If a pixel value at a position (x, y) of a reference picture is p(x, y), the function p'(x, y) = ((a * p(x,y)+(1<<(s-1)))>>s)+b is used.
[0092] When WP is enabled, for each reference picture of the current slice, video encoder 200 signals a flag indicating whether WP is applied to the reference picture. If WP is applied to one reference picture, a set of WP parameters (e.g., a, s, and b) is sent to video decoder 300 to be used for motion compensation from the reference picture. To flexibly turn on / off WP for luma and chroma components, the WP flag and WP parameters are signaled separately for luma and chroma components.
[0093] In one example of WP, one and the same set of WP parameters is used for all pixels in one reference picture.
[0094] Local Illumination Compensation (IC) in HEVC In one exemplary process, partition-based illumination compensation (PBIC) is used. Unlike weighted prediction (WP), which is enabled / disabled for use and whose parameters are signaled at the slice level, PIBC is enabled / disabled and its model parameters are signaled at the PU level to handle local illumination variations.
[0095] Similar to WP, illumination compensation also has a scaling factor (also denoted by a) and an offset (also denoted by b), and the shift number is fixed at 6. An IC flag is coded for each PU to indicate whether IC is applied to the current PU. If IC is applied to the PU, a set of IC parameters (e.g., a and b) is signaled to the video decoder 300 to be used for motion compensation. For bi-prediction, two scaling factors (one for each prediction direction) and one offset are signaled.
[0096] In one example, to save bits spent on IC parameters, the chroma components share scaling factors with the luma component and a fixed offset of 128 is used.
[0097] Local illumination compensation in 3D-HEVC In 3D-HEVC, IC is enabled for inter-view prediction. Unlike WP and PBIC, which explicitly signal IC parameters, 3D-HEVC involves deriving IC parameters based on neighboring samples of the current CU and neighboring samples of the reference block.
[0098] IC is applied only to 2Nx2N partition mode. For AMVP mode, one IC flag is signaled for each CU predicted from inter-view reference pictures. For merge mode, to save bits, IC flag is signaled only if the merge index of the PU is not equal to 0. In one example, IC is not applied to CUs predicted only from temporal reference pictures.
[0099] The linear IC model used in inter-view prediction is shown in Equation (1) below: p(i,j)=a * r(i+dv x ,j+dv y +b),where(i,j)∈PU c (1)
[0100] Here, P.U. c is the current PU, and (i,j) is the c are the coordinates of the pixel in (dv x ,dv y ) is PU c p(i,j) is the disparity vector of PU c where r is the PU's reference picture from the neighboring view, and a and b are the parameters of the linear IC model.
[0101] To estimate the parameters a and b for a PU, two sets of pixels are used, as shown in FIG. 4. The first set of pixels is the available reconstructed neighboring pixels (Rec neig) 460. The second set of pixels is the corresponding neighboring pixels (Rec refneig ) 462. The reference block of the current CU is found by using the disparity vector of the current PU.
[0102] Rec neig and Rec refneig Let n denote the neighbor pixel sets of the current CU and its reference block, respectively, and 2N denote Rec neig and Rec refneig Let a denote the pixel number in . Thus, a and b can be calculated as follows:
[0103]
number
[0104] In some cases, only a is used in the linear model and b is always set equal to 0, or only b is used and a is always set equal to 1.
[0105] Local illumination compensation in JVET Local illumination compensation (LIC) is based on a linear model of illumination changes with a scaling factor a (with a fixed shift number of 6) and an offset b. In one example, LIC is adaptively enabled or disabled for each inter-mode coded CU.
[0106] When LIC is applied to a CU, a least square error method is adopted to derive parameters a and b by using neighboring samples of the current CU and their corresponding reference samples. More specifically, as shown in Figure 5, subsampled (2:1 subsampled) neighboring samples 500 of the CU and corresponding pixels 502 (identified by motion information of the current CU or sub-CU) in the reference picture are used. IC parameters are derived and applied separately for each prediction direction.
[0107] If the CU is coded in merge mode, the LIC flag is copied from the neighboring block in a manner similar to the motion information copy in merge mode, otherwise the LIC flag is signaled to the CU to indicate whether LIC is applied or not.
[0108] Template Matching Prediction Template Matching (TM) prediction is a special merge mode based on Frame-Rate Up Conversion (FRUC) technique. In this mode, the motion information of the block is not signaled but is derived in the video decoder 300. TM may be applied to both AMVP mode and regular merge mode. In AMVP mode, the selection of the MVP candidate is determined based on template matching to choose the MVP candidate that minimizes the difference between the current block template and the reference block template. In regular merge mode, a TM mode flag is signaled to indicate the use of TM, and then TM is applied to the merge candidate indicated by the merge index for MV refinement.
[0109] As shown in FIG. 6, template matching is used to derive the motion information of the current CU by finding the closest match between the current template 520 (the current CU's top and / or left neighboring blocks) in the current picture and a block in the reference picture (e.g., a reference template 525 of the same size as the current template 520). Using an AMVP candidate selected based on the initial matching error, the MVP is refined by template matching. Using a merge candidate indicated by the signaled merge index, the merged MVs corresponding to L0 and L1 are independently refined by template matching, and then the less accurate MVs are further re-refined with the better MVs in priority.
[0110] Cost function: If the motion vector points to a fractional sample position, motion compensated interpolation is used. To reduce complexity, bilinear interpolation is used instead of the standard 8-tap DCT-IF interpolation for template matching to generate the template on the reference picture. The matching cost C of template matching is calculated as follows:
[0111]
number
[0112] When TM is used, the motion is refined by using only luma samples. The derived motion will be used for both luma and chroma for motion compensated inter prediction. After the MV is derived, the final motion compensation is performed using an 8-tap interpolation filter for luma and a 4-tap interpolation filter for chroma.
[0113] Search method: MV refinement is a pattern-based MV search using a criterion of template matching cost and a hierarchical structure. Two search patterns are supported for MV refinement: diamond search and cross search. The hierarchical structure specifies an iterative process for refining MVs, starting at a coarse MVD precision (e.g., 1 / 4 pel) and ending at a fine MVD precision (e.g., 1 / 8 pel). MVs are directly searched at 1 / 4 luma sample MVD precision using the diamond pattern, and then at 1 / 4 luma sample MVD precision using the cross pattern. This is followed by 1 / 8 luma sample MVD refinement using the cross pattern. The search range of MV refinement is set equal to (-8, +8) luma samples around the initial MV. If the current block is bi-predictive, both MVs are improved independently, and then the best of them (in terms of matching cost) is set in priority for further refining the other MV with the BCW weight value.
[0114] assignment When RPR and / or WP are used, the process of each of the above-mentioned template-based inter prediction techniques (e.g., LIC and TM inter prediction) is not fully defined. Thus, a video coding process that uses both template-based inter prediction techniques and RPR / WP may be more complicated to implement and / or provide suboptimal coding efficiency. EXAMPLES
[0115] In general, the following techniques of this disclosure can be applied to any template-based inter-prediction technique. Without loss of generality, this disclosure shows examples of LIC and TM to specify how RPR and WP can interact with LIC and TM.
[0116] Section 1 - Enabling conditions for template-based inter prediction The examples listed below explain the RPR restrictions on LIC to determine whether LIC can be applied based on the picture sizes of the current picture and the reference picture(s), respectively.
[0117] In one example, when the coding mode of the inter-predicted block is an AMVP mode or a merge mode (e.g., either a regular AMVP / merge mode or an affine AMVP / merge mode), LIC is not applied (e.g., disabled) to the inter-prediction hypothesis of the block if the corresponding reference picture used in generating the inter-prediction hypothesis is smaller or larger than the current picture (e.g., the reference picture is a different size than the current picture). RPR is typically enabled when the corresponding reference picture is a different size than the current picture. Thus, in one example of this disclosure, the video encoder 200 and the video decoder 300 may be configured to not apply LIC when RPR is enabled. In other words, the video encoder 200 and the video decoder 300 may be configured to not apply LIC if the corresponding reference picture used for LIC is a different size (e.g., larger or smaller) than the current picture that contains the block of video data being coded.
[0118] Thus, in one example of this disclosure, the video encoder 200 and the video decoder may be configured to determine that RPR mode is enabled, determine not to apply template-based inter prediction techniques to the video data based on RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction techniques.
[0119] In one example of bidirectional prediction, the video encoder 200 and the video decoder 300 may form two prediction hypotheses based on motion vectors from two different reference picture lists. In some examples, a motion vector from a first reference picture list may point to a reference picture having a different size than the current picture, and another motion vector from a second reference picture list may point to a reference picture having the same size as the current picture. As described above, the video encoder 200 and the video decoder 300 may disable LIC for a prediction hypothesis based on a reference picture having a different size than the current picture. However, in another example of this disclosure, the video encoder 200 and the video decoder 300 may apply LIC to the other inter-prediction hypothesis if that reference picture corresponding to the other reference picture list is the same picture size as the current picture. That is, LIC may be performed on a prediction hypothesis for a motion vector associated with one of the reference picture lists if the reference picture pointed to by the motion vector is the same size as the current picture. Thus, in one example, LIC may be performed on one prediction hypothesis for bidirectional prediction but not on the other prediction hypothesis.
[0120] In (regular or affine) AMVP mode, if all reference pictures of an inter-predicted block have a different picture size than the current picture, the video encoder 200 may be configured to not signal a block-level (or CU-level) LIC flag in the coded video bitstream. Instead, in this situation, the video decoder 300 is configured to infer the value of the LIC flag to be 0 (e.g., LIC is not applied). For example, if the reference picture of a unidirectionally predicted block is smaller or larger than the current picture, the LIC flag is not signaled, and if none of the reference pictures of a bidirectionally predicted block are the same size as the current picture, the LIC flag is not signaled. In general, the video decoder 300 may be configured to infer the value of the LIC flag based on which RPR is used for the reference picture of the current block.
[0121] In another example, in the case of bidirectional prediction, the video encoder 200 and the video decoder 300 are configured to not apply LIC to inter blocks if at least one of the reference pictures used in the bidirectional prediction has a different picture size than the current picture. In this case, the CU level LIC flag is also not signaled, and instead the video decoder infers that the value of the LIC flag is 0 (e.g., meaning that LIC is not applied).
[0122] In another example, if none of the reference pictures in any reference picture list is the same picture size as the current picture, the slice-level LIC flag may not be signaled and may be inferred to have a value of 0.
[0123] The following examples extend the above examples relating to the interaction of LIC and RPR modes to WP mode. The following examples are referred to as WP restrictions for LIC.
[0124] In one example, if the coding mode of the inter-predicted block is AMVP or merge mode (e.g., either regular AMVP / merge mode or affine AMVP / merge mode), LIC is not applied to the inter-prediction hypothesis if WP is applied to the corresponding reference picture. In addition, in the case of bi-prediction, LIC may be applied to the inter-prediction hypothesis if WP is not applied to the reference picture corresponding to the reference picture list corresponding to the inter-prediction hypothesis.
[0125] In (regular or affine) AMVP mode, if WP is applied to all reference pictures of an inter-predicted block, the block-level (or CU-level) LIC flag is not signaled in the bitstream and is inferred as 0 in video decoder 300. For example, if WP is applied to a reference picture of a unidirectionally predicted block, the LIC flag is not signaled, and if WP is applied to both reference pictures of a bidirectionally predicted block, the LIC flag is not signaled.
[0126] In another example, in the case of bidirectional prediction, the video encoder 200 and the video decoder 300 do not apply LIC to an inter block if WP is applied to at least one of the reference pictures. The corresponding CU level LIC flag is not signaled and is inferred as 0.
[0127] In another example, if the WP applies to all reference pictures in both reference picture lists, the slice-level LIC flag may not be signaled and may be inferred as 0.
[0128] The examples listed below explain RPR restrictions on template matching (TM) prediction to determine whether TM can be applied based on the respective picture sizes of the current picture and the reference picture(s).
[0129] In one example, when the coding mode of an inter-predicted block is an AMVP mode (e.g., either a regular AMVP mode or an affine AMVP mode), video encoder 200 and video decoder 300 may bypass TM (e.g., disable or not apply TM), and none of the MV predictors for the current block are refined using TM if the corresponding reference picture is smaller or larger than the current picture (e.g., when RPR is enabled). TM being bypassed means that no AMVP candidate index can be determined by TM, and the MV and MV predictors of the current block are no longer refined. When TM is bypassed, the AMVP index may be signaled in the bitstream by video encoder 200 and parsed by video decoder 300 to indicate which of the MV predictors in the AMVP candidate list is used.
[0130] In a further example, in the case of bidirectional prediction, depending on the reference picture size relative to the current picture size, TM can be applied only to the MV predictor corresponding to one reference picture and bypassed for the other MV predictor. For example, if the reference picture of the unidirectionally predicted block is smaller or larger than the current picture, TM is bypassed and an AMVP index is signaled. If none of the reference pictures of the bidirectionally predicted block has the same picture size as the current picture, TM is bypassed for the MV predictors of both reference pictures and their respective AMVP indexes are signaled. If only one of the reference pictures of the bidirectionally predicted block is the same picture size as the current picture (while the other reference picture is not the same picture size), only the MV predictor associated with the reference picture that is the same size as the current picture is refined by TM (hence its AMVP index is determined by TM and does not need to be signaled), while TM is bypassed for the other MV predictor associated with the reference picture that is not the same size as the current picture and its AMVP index is signaled.
[0131] In another example, in the case of bidirectional prediction, the video encoder 200 and the video decoder 300 are configured to not apply TM to inter blocks (in both regular and affine AMVP modes) if at least one of the reference pictures has a different picture size than the current picture.
[0132] In another example, if the TM is bypassed due to the reference picture size being different from the size of the current picture, video decoder 300 may be configured to infer that the value of the AMVP index is 0. Video encoder 200 will not signal the AMVP index in this situation.
[0133] In another example, when the coding mode of the inter-predicted block is a merge mode (e.g., either a regular merge mode or an affine merge mode), the video encoder 200 and the video decoder 300 may be configured to bypass the TM, and none of the motion vectors of the current block are refined if the corresponding reference picture is smaller or larger than the current picture. In addition, in the case of bidirectional prediction, the TM may be applied only to the MV corresponding to one reference picture and bypassed for the other MV, all depending on the reference picture size relative to the current picture size. For example, if the reference picture of the unidirectionally predicted block is smaller or larger than the current picture, the TM is bypassed. If none of the reference pictures of the bidirectionally predicted block are the same picture size as the current picture, the TM is bypassed for the motion vectors of both reference pictures. If only one of the reference pictures of the bidirectionally predicted block is the same picture size as the current picture (while the other reference picture is not the same picture size), only the motion vector associated with the reference picture is refined by the TM, while the TM is bypassed for the other motion vector.
[0134] In another example, in the case of bidirectional prediction, the video encoder 200 and the video decoder 300 do not apply TM to inter blocks, for both regular and affine merge modes, if at least one of the reference pictures is a different picture size than the current picture.
[0135] In another example, a motion vector for a geometric (GEO) partition may not be refined by the TM if its corresponding reference picture size is different from the current picture size.
[0136] In another example, merge mode with motion vector difference (MMVD) candidates are not sorted based on TM cost if the reference picture size is different from the current picture, instead a default order (e.g., from smaller MVD to larger MVD) is assigned to all MMVD candidates.
[0137] In another example, the video encoder and video decoder 300 may be configured to completely disable TM at the slice level if none of the reference pictures in both reference picture lists is the same picture size as the current picture, and thus the CU-level TM flag for merge mode is not signaled and is inferred to be 0 (e.g., TM mode is not applied).
[0138] The following example extends the above example to TM, hereafter referred to as WP restriction to TM.
[0139] In one example, if the coding mode of an inter-predicted block is an AMVP mode (e.g., either regular AMVP mode or affine AMVP mode), the TM may be bypassed and none of the current block MV predictors are refined when WP is applied to the corresponding reference picture. In particular, if the TM is bypassed (which implies that the AMVP candidate index cannot be determined by the TM and the MV and MV predictors of the current block are no longer refined), the AMVP index is signaled in the bitstream at the video encoder 200 and parsed by the video decoder 300 to indicate which MV predictor in the AMVP candidate list is used.
[0140] In another example of bidirectional prediction, depending on whether WP is applied to the reference picture, TM can be applied only to the MV predictor corresponding to one reference picture and bypassed for the other MV predictor. For example, when WP is applied to the reference picture of a unidirectionally predicted block, TM is bypassed and an AMVP index is signaled. If none of the reference pictures of a bidirectionally predicted block has WP applied, TM is bypassed for the MV predictors of both reference pictures and the respective AMVP index is signaled. If only one of the reference pictures of a bidirectionally predicted block has WP applied (while the other reference picture has not), only the MV predictor associated with the reference picture that does not have WP applied is refined by TM (hence its AMVP index is determined by TM and does not need to be signaled), while TM is bypassed for the other MV predictor for which WP is applied to the reference picture and its AMVP index is signaled.
[0141] In another example, in the case of bidirectional prediction, the video encoder 200 and the video decoder 300 do not apply TM to inter-block (both regular and affine) AMVP modes if WP is applied to at least one of the reference pictures.
[0142] In another example, if TM is bypassed due to WP being applied to a reference picture, the AMVP index may be inferred as 0 in the video decoder 300 and does not need to be signaled by the video encoder 200.
[0143] If the coding mode of the inter-predicted block is a merge mode (e.g., either a regular merge or an affine merge mode), the TM may be bypassed, and none of the motion vectors of the current block are refined if the WP is applied to the corresponding reference picture. In addition, in the case of bidirectional prediction, depending on whether the WP is applied to the reference picture, the TM may be applied only to the motion vector corresponding to one reference picture and bypassed for the other motion vector. For example, if the reference picture of the unidirectionally predicted block has the WP applied, the TM is bypassed. If none of the reference pictures of the bidirectionally predicted block has the WP applied, the TM is bypassed for the motion vectors of both reference pictures. If only one of the reference pictures of the bidirectionally predicted block has the WP applied (while the other reference picture has the WP applied), only the motion vector associated with the reference picture is refined by the TM, while the TM is bypassed for the other MV.
[0144] In another example, a MV of a GEO partition may not be refined by the TM if its corresponding reference picture has WP applied to it.
[0145] In another example, MMVD candidates are not sorted based on TM cost if the reference picture has WP applied, instead a default order (e.g., from smaller MVD to larger MVD) is used for all MMVD candidates.
[0146] In another example, if all reference pictures in both reference picture lists have WP applied, TM may be completely disabled at the slice level, and thus the CU-level TM flag for merge mode does not need to be signaled and is inferred to have a value of 0 (e.g., TM is bypassed and not applied).
[0147] Section 2 - Merge mode candidate list configuration The limitations as disclosed in Section 1 may be avoided for a merge mode using template-based inter prediction if the merge candidate list of the merge mode (e.g., regular merge mode, affine merge mode, TM merge mode, GEO merge mode, MMVD mode) does not include any candidate with scaled (e.g., scaled by RPR) reference picture size(s) and / or weight predicted reference picture(s). In other words, a merge candidate may be pruned before being inserted into the merge candidate list if such a candidate triggers the limitations as disclosed in Section 1.
[0148] In one example, video encoder 200 and video decoder 300 may be configured to apply a pruning process to a merge candidate list (e.g., either a regular merge, a TM merge, or an affine merge) based on a size of a reference picture associated with a particular merge candidate. For example, video encoder 200 and video decoder 300 may be configured to prune (e.g., remove) from the merge candidate list motion vector candidates associated with at least one reference picture having a different size than the current picture.
[0149] In this example, video encoder 200 and video decoder 300 may be configured to construct a merge candidate list for a block of the video data. The merge candidate list may be for any inter-prediction mode, including a regular merge mode, a TM merge mode, and an affine merge mode. Video encoder 200 and video decoder 300 may prune the merge candidate list to create a pruned merge candidate list. In this context, pruning the merge candidate list includes removing merge candidates that have at least one reference picture that is a different size than a current picture of the video data. Video encoder 200 and video decoder 300 may then code the block of the video data using the pruned merge candidate list.
[0150] In another example, the video encoder 200 and the video decoder 300 may be configured to apply a pruning method to a merge candidate list (e.g., either a regular merge, a TM merge, or an affine merge) to prune motion vector candidates that have all reference pictures that are a different picture size than the current picture.
[0151] In another example, if a merge candidate is bidirectionally predicted using only one reference picture of a picture size different from the current picture (and other reference pictures of the same size as the current picture), the video encoder 200 and the video decoder 300 may be configured to reduce the bidirectional prediction candidate to a unidirectional prediction candidate by removing motion vectors associated with the reference pictures of unequal sizes relative to the current picture.
[0152] In another example, the video encoder 200 and the video decoder 300 may be configured to apply a pruning method to a merge candidate list (e.g., either a regular merge, a TM merge, or an affine merge) to prune motion vector candidates that have at least one reference picture to which WP is applied.
[0153] In another example, the video encoder 200 and the video decoder 300 may be configured to apply a pruning method to a merge candidate list (e.g., either a regular merge, a TM merge, or an affine merge) to prune motion vector candidates that have all reference pictures to which WP is applied.
[0154] In another example, if a merge candidate is bidirectionally predicted using only one reference picture that has WP applied (and the other reference picture does not have WP applied), the video encoder 200 and the video decoder 300 may be configured to reduce the bidirectional prediction candidate to a unidirectional prediction candidate by removing the motion vector associated with the reference picture that has WP applied.
[0155] In another example, if all candidates in the merge candidate list have been pruned, the merge candidate construction process starts again and the aforementioned pruning process is not applied. If any one of such merge candidates is used, the respective limitations disclosed in Section 1 apply.
[0156] In another example, the resulting candidate list generated using the above modifications applied to the regular merge list construction process may be directly used for other merge modes such as GEO and MMVD to generate GEO candidate movements and MMVD candidate movements.
[0157] Alternatively, some example video techniques may keep the merge candidate list construction process of a merge mode (e.g., regular merge) unchanged. However, the video encoder 200 may be configured to not select a candidate from a merge candidate list associated with a reference picture that is a different size than the current picture and / or a reference picture to which WP has been applied.
[0158] In one example, when performing the GEO candidate list construction process, the video encoder 200 and the video decoder 300 may skip sampling motion vector candidates that point to reference pictures with a size larger or smaller than the current picture. For example, if a candidate is coded with unidirectional predictive motion that points to a scaled reference picture size, the candidate is skipped. In another example, if a candidate is coded with bidirectional predictive motion, there are three different cases to be considered: (1) if both motion vectors of a candidate point to a scaled reference picture, the candidate is skipped; (2) if only one motion vector of a candidate points to a scaled reference picture, the other motion vector of the candidate is inserted into the GEO candidate list; (3) if both motion vectors of a candidate are associated with a non-scaled reference picture, the same parity-based selection as in the VVC Test Model (VTM) is applied.
[0159] In another example, for an MMVD-based candidate list (e.g., the first one or two candidates in a regular merge candidate list), the video encoder 200 and the video decoder 300 may skip sampling motion vector candidates pointing to reference pictures having a size larger or smaller than the current picture. For example, if a candidate is coded with unidirectional predictive motion pointing to a scaled reference picture size, the candidate is skipped. In another example, if a candidate is coded with bidirectional predictive motion, there are three different cases to be considered: (1) if both motion vectors of a candidate are associated with a scaled reference picture, the candidate is skipped. (2) if only one motion vector of a candidate is associated with a scaled reference picture, the candidate is degenerated to a unidirectional predictive candidate by removing the motion vector associated with the scaled reference picture. (3) if both motion vectors of a candidate are associated with a non-scaled reference picture, the candidate may be used directly for MMVD without modification. In another example, the MMVD process may include checking more candidates beyond the first one and two candidates in the regular merge candidate list if at least one of the first two candidates in the regular merge candidate list is completely pruned.
[0160] In another example, for the GEO candidate list construction process, the video encoder 200 and the video decoder 300 may skip sampling motion vector candidates that point to a reference picture with WP applied. For example, if a candidate is coded with unidirectional predictive motion that points to a reference picture with WP applied, the candidate is skipped. In another example, if a candidate is coded with bidirectional predictive motion, there are three different cases to be considered: (1) if both motion vectors of a candidate point to a reference picture with WP applied, the candidate is skipped. (2) if only one motion vector of a candidate points to a reference picture with WP applied, the other motion vector of the candidate is inserted into the GEO candidate list. (3) if none of the motion vectors of a candidate points to a reference picture with WP applied, the same parity-based selection as VTM is applied.
[0161] In another example, for an MMVD-based candidate list (e.g., the first one or two candidates in the regular merge candidate list), the video encoder 200 and the video decoder 300 may skip sampling motion vector candidates that point to a reference picture with WP applied. For example, if a candidate is coded with unidirectional predictive motion that points to a reference picture with WP applied, the candidate is skipped. In another example, if a candidate is coded with bidirectional predictive motion, there are three different cases to be considered: (1) if both motion vectors of a candidate point to a reference picture with WP applied, the candidate is skipped. (2) if only one motion vector of a candidate points to a reference picture with WP applied, the candidate is degenerated to a unidirectional predictive candidate by removing the motion vector with WP applied. (3) if both motion vectors of a candidate point to a reference picture without WP applied, the candidate may be used directly for MMVD without modification. In another example, the MMVD process may include checking more candidates beyond the first one and two candidates in the regular merge candidate list if at least one of the first two candidates in the regular merge candidate list is completely pruned.
[0162] Section 2 Exception handling for template-based inter prediction Unlike Section 1, the video encoder 200 and the video decoder 300 are configured not to disable or bypass the template-based inter prediction techniques, regardless of whether the aforementioned restrictions are triggered. In other words, the video encoder 200 and the video decoder 300 are configured to perform the template-based inter prediction techniques, code syntax elements, and / or sort candidates as necessary.
[0163] In one example, if the current picture size is different from the reference picture size, the video encoder 200 and the video decoder 300 still perform motion compensation on the reference template block using the respective interpolation filters of the RPR. Thus, the reference template block size matches the current template block, and thus the template-based inter-prediction technique can still be performed.
[0164] In another example, if WP is applied to a reference picture of an inter block, the video encoder 200 and the video decoder 300 may still perform motion compensation on a reference template block using the WP parameters, and then the template-based inter prediction technique may still be performed.
[0165] Alternatively, in another example, video encoder 200 and video decoder 300 do not use the WP parameter if the reference template block is motion compensated.
[0166] 7 is a block diagram illustrating an example video encoder 200 that may perform techniques of this disclosure. FIG. 7 is provided for illustrative purposes and should not be considered as limiting the techniques broadly illustrated and described in this disclosure. For illustrative purposes, this disclosure describes a video encoder 200 according to VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be implemented by video encoding devices configured for other video coding standards and video coding formats, such as AV1 and successor video coding formats to AV1.
[0167] 7, the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a DPB 218, and an entropy coding unit 220 may be implemented in one or more processors or processing circuits. For example, the units of the video encoder 200 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, an ASIC, or an FPGA. Moreover, video encoder 200 may include additional or alternative processors or processing circuitry for performing these and other functions.
[0168] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive the video data stored in the video data memory 230 from, for example, the video source 104 (FIG. 1). The DPB 218 may function as a reference picture memory that stores reference video data for use in predicting subsequent video data by the video encoder 200. The video data memory 230 and the DPB 218 may be formed by any of a variety of memory devices, such as DRAM, including synchronous dynamic random access memory (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and the DPB 218 may be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 may be on-chip with other components of the video encoder 200 as shown, or may be off-chip relative to those components.
[0169] In this disclosure, references to video data memory 230 should not be construed as limited to memory internal to video encoder 200 unless specifically stated as such, or to memory external to video encoder 200 unless specifically stated as such. Rather, references to video data memory 230 should be understood as a reference memory that stores video data that video encoder 200 receives for encoding (e.g., video data for a current block to be encoded). Memory 106 of FIG. 1 may also provide temporary storage of outputs from various units of video encoder 200.
[0170] The various units in FIG. 7 are shown to aid in understanding the operations performed by the video encoder 200. The units may be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide a particular function, and the operations that may be performed are predefined. Programmable circuits refer to circuits that may be programmed to perform various tasks, and provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed-function circuit may execute software instructions (e.g., to receive parameters or to output parameters), the types of operations that the fixed-function circuit performs are generally invariant. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be integrated circuits.
[0171] Video encoder 200 may include arithmetic logic units (ALUs), elementary function units (EFUs), digital circuits, analog circuits, and / or a programmable core formed from programmable circuits. In examples in which the operations of video encoder 200 are performed using software executed by programmable circuits, memory 106 (FIG. 1) may store software instructions (e.g., object code) that video encoder 200 receives and executes, or another memory (not shown) within video encoder 200 may store such instructions.
[0172] The video data memory 230 is configured to store the received video data. The video encoder 200 may retrieve pictures of the video data from the video data memory 230 and may provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be raw video data to be encoded.
[0173] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes. By way of example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.
[0174] The mode selection unit 202 typically coordinates multiple encoding passes to test combinations of encoding parameters and the resulting rate-distortion values for such combinations. The encoding parameters may include division of CTUs into CUs, prediction modes for CUs, transform types for residual data of CUs, quantization parameters for residual data of CUs, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters that has a better rate-distortion value than the other tested combinations.
[0175] Video encoder 200 may divide a picture retrieved from video data memory 230 into a series of CTUs and may encapsulate one or more CTUs within a slice. Mode selection unit 202 may divide the CTUs of a picture according to a tree structure, such as the MTT structure, QTBT structure, superblock structure, or quadtree structure described above. As described above, video encoder 200 may form one or more CUs from dividing the CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks."
[0176] In general, the mode selection unit 202 also controls its components (e.g., motion estimation unit 222, motion compensation unit 224, and intra prediction unit 226) to generate a prediction block for a current block (e.g., a current CU, or in HEVC, an overlapping portion of a PU and a TU). In the case of inter prediction of the current block, the motion estimation unit 222 may perform motion search to identify one or more closely matching reference blocks 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 may calculate values representing how similar a potential reference block is to the current block, for example, according to a sum of absolute differences (SAD), a sum of squared differences (SSD), a mean absolute difference (MAD), a mean squared difference (MSD), etc. The motion estimation unit 222 may generally perform these calculations using a sample-by-sample difference between the current block and the reference block under consideration. The motion estimation unit 222 may identify a reference block having the lowest value resulting from these calculations, which indicates a reference block that best matches the current block.
[0177] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of the current block in the current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, in the case of unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, while in the case of bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then generate a predictive block using the motion vectors. For example, the motion compensation unit 224 may use the motion vectors to retrieve data of the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate values for the predictive block according to one or more interpolation filters. Moreover, in the case of bidirectional inter prediction, the motion compensation unit 224 may retrieve data for the two reference blocks identified by the respective motion vectors and combine the retrieved data, for example, through a sample-wise average or weighted average.
[0178] The motion estimation unit 222 and the motion compensation unit 224 may be configured to perform one or more template-based inter prediction techniques, such as LIC and TM inter prediction, as described above. The motion estimation unit 222 and the motion compensation unit 224 may be configured to perform any of the above techniques that define which template-based inter prediction technique is used with RPR and / or WP.
[0179] When operating according to the AV1 video coding format, the motion estimation unit 222 and the motion compensation unit 224 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, overlapped block motion compensation (OBMC), and / or synthetic inter-intra prediction.
[0180] As another example, in the case of intra prediction or intra predictive coding, the intra prediction unit 226 may generate a predictive block from neighboring samples to the current block. For example, in the case of a directional mode, the intra prediction unit 226 may generally mathematically combine values of neighboring samples and populate these calculated values in a defined direction across the current block to produce a predictive block. As another example, in the case of a DC mode, the intra prediction unit 226 may calculate an average of neighboring samples to the current block and generate a predictive block to include this resulting average for each sample of the predictive block.
[0181] When operating according to the AV1 video coding format, the intra prediction unit 226 may be configured to encode coding blocks of video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, chroma-from-luma (CFL) prediction, intra block copy (IBC), and / or color palette modes. The mode selection unit 202 may include additional functional units for performing video prediction according to other prediction modes.
[0182] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives a raw uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates sample-by-sample differences between the current block and the prediction block. The resulting sample-by-sample differences define a residual block for the current block. In some examples, the residual generation unit 204 may also determine differences between sample values in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.
[0183] In an example where the mode selection unit 202 splits a CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs having various sizes. As mentioned above, the size of a CU may refer to the size of the luma coding block of the CU, and the size of a PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support a PU size of 2N×2N or N×N for intra prediction, and a symmetric PU size of 2N×2N, 2N×N, N×2N, N×N, or similar for inter prediction. The video encoder 200 and the video decoder 300 may also support asymmetric splitting for PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter prediction.
[0184] In examples where the mode select unit 202 does not further divide the CUs into PUs, each CU may be associated with a luma coding block and a corresponding chroma coding block. As noted above, the size of a CU may refer to the size of the luma coding block of the CU. The video encoder 200 and the video decoder 300 may support CU sizes of 2N×2N, 2N×N, or N×2N.
[0185] 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 predictive block for the current block being coded via a respective unit associated with the coding technique. In some examples, such as palette mode coding, the mode selection unit 202 may not generate a predictive block, but instead generate syntax elements that indicate a scheme for reconstructing the block based on a selected palette. In such modes, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 to be coded.
[0186] As described above, the residual generation unit 204 receives video data for a current block and a corresponding predictive block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates a sample-by-sample difference between the predictive block and the current block.
[0187] Transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), a directional transform, a Karhunen-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, transform processing unit 206 may perform multiple transforms on the residual block, e.g., a linear transform and a secondary transform, such as a rotation transform. In some examples, transform processing unit 206 does not apply a transform to the residual block.
[0188] When transform processing unit 206 operates according to AV1, it may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a horizontal / vertical transform combination that may include a discrete cosine transform (DCT), an asymmetric discrete sine transform (ADST), an inverse ADST (e.g., ADST in reverse order), and an identity transform (IDTX). When using an identity transform, the transform is skipped in one of the vertical or horizontal directions. In some examples, the transform processing may be skipped.
[0189] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may result in loss of information, and thus the quantized transform coefficients may be less accurate than the original transform coefficients generated by transform processing unit 206.
[0190] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block that corresponds to the current block (possibly with some distortion) based on the reconstructed residual block and the predictive block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples from the predictive block generated by the mode selection unit 202 to generate the reconstructed block.
[0191] Filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. The operations of filter unit 216 may be skipped in some examples.
[0192] When operating according to AV1, filter unit 216 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 216 may perform a deblocking operation to reduce blockiness artifacts along the edges of a CU. In other examples, filter unit 216 may apply a constrained directional enhancement filter (CDEF), which may be applied after deblocking and may include application of a non-separable, nonlinear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop restoration filter, which may be applied after CDEF and may include a separable symmetric normalized Wiener filter or a dual autoinduction filter.
[0193] Video encoder 200 stores reconstructed blocks in DPB 218. For example, in examples where the operations of filter unit 216 are not performed, reconstruction unit 214 may store reconstructed blocks in DPB 218. In examples where the operations of filter unit 216 are performed, filter unit 216 may store filtered reconstructed blocks in DPB 218. Motion estimation unit 222 and motion compensation unit 224 may retrieve reference pictures formed from reconstructed (and possibly filtered) blocks from DPB 218 to inter predict blocks of a later-encoded picture. In addition, intra prediction unit 226 may use reconstructed blocks of the current picture in DPB 218 to intra predict other blocks in the current picture.
[0194] In general, the entropy encoding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy encoding unit 220 may entropy encode quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy encoding unit 220 may entropy encode predictive syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from the mode selection unit 202. The entropy encoding unit 220 may perform one or more entropy encoding operations on syntax elements, which are another example of video data, to generate entropy encoded data. For example, entropy encoding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable-to-variable (V2V) coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a Probability Interval Partitioning Entropy (PIPE) coding operation, an Exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode in which syntax elements are not entropy coded.
[0195] The video encoder 200 may output a bitstream that includes entropy coding syntax elements needed to reconstruct blocks of a slice or picture. Specifically, the entropy coding unit 220 may output the bitstream.
[0196] The entropy encoding unit 220 may be configured as a symbol-to-symbol adaptive multi-symbol arithmetic coder in accordance with AV1. A syntax element in AV1 includes an alphabet of N elements, and a context (e.g., a probability model) includes a set of N probabilities. The entropy encoding unit 220 may store the probabilities as n-bit (e.g., 15-bit) cumulative distribution functions (CDFs). The entropy encoding unit 22 may perform recursive scaling with an update factor based on the alphabet size to update the context.
[0197] The operations described above are described with respect to blocks. Such descriptions should be understood as being operations for luma coding blocks and / or chroma coding blocks. As described above, in some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a CU. In some examples, the luma coding blocks and chroma coding blocks are luma and chroma components of a PU.
[0198] In some examples, operations performed with respect to luma coding blocks do not need to be repeated for chroma coding blocks. As an example, operations to identify motion vectors (MVs) and reference pictures for luma coding blocks do not need to be repeated to identify MVs and reference pictures for chroma blocks. Rather, MVs for luma coding blocks may be scaled to determine MVs for chroma blocks, and the reference pictures may also be the same. As another example, the intra prediction process may be the same for luma coding blocks and chroma coding blocks.
[0199] Video encoder 200 represents an example of a device configured to encode video data including a memory configured to store the video data and one or more processing units implemented in circuitry and configured to perform the reference picture resampling and template-based inter prediction techniques of this disclosure. For example, video encoder 200 may be configured to determine that an RPR mode is enabled, determine not to apply template-based inter prediction techniques to the video data based on the RPR mode being enabled, and encode the video data using inter prediction without applying the template-based inter prediction techniques.
[0200] 8 is a block diagram illustrating an example video decoder 300 that may perform techniques of this disclosure. FIG. 8 is provided for purposes of illustration and is not intended to limit the techniques broadly illustrated and described in this disclosure. For purposes of illustration, this disclosure describes a video decoder 300 according to VVC (ITU-T H.266 under development) and HEVC (ITU-T H.265) techniques. However, the techniques of this disclosure may be performed by video coding devices configured according to other video coding standards.
[0201] In the example of FIG. 8, the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or in processing circuits. For example, the units of the video decoder 300 may be implemented as one or more circuits or logic elements as part of a hardware circuit, or as part of a processor, ASIC, or FPGA. Moreover, the video decoder 300 may include additional or alternative processors or processing circuits for performing these and other functions.
[0202] 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 for performing prediction according to other prediction modes. By way of example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0203] The motion compensation unit 316 may be configured to perform one or more template-based inter prediction techniques, such as LIC and TM inter prediction, as described above. The motion compensation unit 316 may be configured to perform any of the above techniques that define which template-based inter prediction technique is used with RPR and / or WP.
[0204] When operating according to AV1, the compensation unit 316 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using translational motion compensation, affine motion compensation, OBMC, and / or synthetic inter-intra prediction, as described above. The intra prediction unit 318 may be configured to decode coding blocks of the video data (e.g., both luma coding blocks and chroma coding blocks) using directional intra prediction, non-directional intra prediction, recursive filter intra prediction, CFL, intra block copy (IBC), and / or color palette mode, as described above.
[0205] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be obtained, for example, from the computer-readable medium 110 (FIG. 1). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. The CPB memory 320 may also store video data other than syntax elements of a coded picture, such as temporary data representing output from various units of the video decoder 300. The DPB 314 generally stores decoded pictures that the video decoder 300 may output and / or use as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may be formed by any of a variety of memory devices, such as DRAM, including SDRAM, MRAM, RRAM, or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or separate memory devices. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300 or off-chip relative to those components.
[0206] Additionally or alternatively, in some examples, video decoder 300 may retrieve coded video data from memory 120 (FIG. 1). That is, memory 120 may store data such as those described above for CPB memory 320. Similarly, memory 120 may store instructions to be executed by video decoder 300 when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300.
[0207] The various units shown in FIG. 8 are shown to aid in understanding the operations performed by the video decoder 300. The units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. As with FIG. 7, fixed function circuits refer to circuits that provide a particular function and are predefined in the operations that may be performed. Programmable circuits refer to circuits that may be programmed to perform various tasks and provide flexible functionality in the operations that may be performed. For example, a programmable circuit may execute software or firmware that causes the programmable circuit to operate in a manner defined by the software or firmware instructions. Although a fixed function circuit may execute software instructions (e.g., to receive parameters or to output parameters), the types of operations that the fixed function circuit performs are generally immutable. In some examples, one or more of the units may be different circuit blocks (fixed function or programmable), and in some examples, one or more of the units may be an integrated circuit.
[0208] The video decoder 300 may include a programmable core formed from ALUs, EFUs, digital circuits, analog circuits, and / or programmable circuits. In examples in which the operations of the video decoder 300 are performed by software executing on programmable circuits, on-chip or off-chip memory may store instructions (e.g., object code) of the software that the video decoder 300 receives and executes.
[0209] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to recover the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.
[0210] In general, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (the block currently being reconstructed, i.e., the block being decoded, may be referred to as the “current block”).
[0211] The entropy decoding unit 302 may entropy decode syntax elements that specify the quantized transform coefficients of the quantized transform coefficient block as well as transform information, such as a quantization parameter (QP) and / or a transform mode indication. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine the degree of quantization, and likewise the degree of inverse quantization that the inverse quantization unit 306 should apply. The inverse quantization unit 306 may perform a bitwise left shift operation, for example, to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.
[0212] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse transform, or another inverse transform to the transform coefficient block.
[0213] Further, prediction processing unit 304 generates a prediction block according to the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter predicted, motion compensation unit 316 may generate a prediction block. In this case, the prediction information syntax element may indicate a reference picture in DPB 314 from which to retrieve a reference block, as well as a motion vector that specifies the location of the reference block in the reference picture relative to the location of the current block in the current picture. Motion compensation unit 316 may generally perform an inter prediction process in a manner substantially similar to that described with respect to motion compensation unit 224 (FIG. 7).
[0214] As another example, if the prediction information syntax element indicates that the current block is intra predicted, the intra prediction unit 318 may generate a prediction block according to the intra prediction mode indicated by the prediction information syntax element. Again, the intra prediction unit 318 may generally perform an intra prediction process in a manner substantially similar to that described with respect to the intra prediction unit 226 (FIG. 7). The intra prediction unit 318 may retrieve data of samples neighboring the current block from the DPB 314.
[0215] The reconstruction unit 310 may reconstruct the current block using the predictive block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the predictive block to reconstruct the current block.
[0216] Filter unit 312 may perform one or more filter operations on the reconstructed blocks. For example, filter unit 312 may perform a deblocking operation to reduce blockiness artifacts along edges of the reconstructed blocks. The operations of filter unit 312 need not be performed in all instances.
[0217] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in examples where the operations of the filter unit 312 are not performed, the reconstruction unit 310 may store the reconstructed block in the DPB 314. In examples where the operations of the filter unit 312 are performed, the filter unit 312 may store the filtered reconstructed block in the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra prediction and previously decoded pictures for subsequent motion compensation. Additionally, the video decoder 300 may output the decoded picture (e.g., decoded video) from the DPB 314 for later display on a display device, such as the display device 118 of FIG. 1.
[0218] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data and one or more processing units implemented in circuitry and configured to perform the reference picture resampling and template-based inter prediction techniques of this disclosure. For example, the video decoder 300 may be configured to determine that an RPR mode is enabled, determine not to apply template-based inter prediction techniques to the video data based on the RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction techniques.
[0219] 9 is a flowchart illustrating an example method for encoding a current block according to the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video encoder 200 (FIGS. 1 and 7), it should be understood that other devices can be configured to perform a method similar to that of FIG.
[0220] In this example, the video encoder 200 may first predict a current block (350). For example, the video encoder 200 may form a predictive block for the current block. The video encoder 200 may then calculate a residual block for the current block (352). To calculate the residual block, the video encoder 200 may calculate a difference between an original uncoded block and a predictive block for the current block. The video encoder 200 may then transform the residual block and quantize transform coefficients of the residual block (354). The video encoder 200 may then scan the quantized transform coefficients of the residual block (356). During or following the scan, the video encoder 200 may entropy code the transform coefficients (358). For example, the video encoder 200 may code the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output entropy coded data for the block (360).
[0221] 10 is a flowchart illustrating an example method for decoding a current block of video data in accordance with the techniques of this disclosure. The current block may comprise a current CU. Although described with respect to video decoder 300 (FIGS. 1 and 8), it should be understood that other devices may be configured to perform a method similar to that of FIG.
[0222] The video decoder 300 may receive entropy coded data for the current block, such as the entropy coded prediction information and the entropy coded data of the transform coefficients of the residual block corresponding to the current block (370). The video decoder 300 may entropy decode the entropy coded data to determine prediction information for the current block and reconstruct the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, e.g., using an intra prediction mode or an inter prediction mode as indicated by the prediction information for the current block, to compute a predictive block for the current block (374). The video decoder 300 may then inverse scan the reconstructed transform coefficients to create a block of quantized transform coefficients (376). The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to generate a residual block (378). The video decoder 300 may finally decode the current block by combining the predictive block and the residual block (380).
[0223] 11 is a flowchart illustrating another example method for decoding video data according to the techniques of this disclosure. The technique of FIG. 11 may be performed by one or more structural components of the video encoder 200, including the motion estimation unit 222 and / or the motion compensation unit 224.
[0224] In one example of this disclosure, the video encoder 200 may be configured to determine (1100) that a reference picture resampling (RPR) mode is enabled. In one example, the video encoder 200 may be configured to determine that the RPR mode is enabled based on a reference picture of the video data being a different size than a current picture of the video data. In another example, the video encoder 200 is configured to code the video data using bidirectional prediction. In this example, the RPR mode is enabled based on at least one reference picture of the multiple reference pictures being a different size than a current picture of the video data.
[0225] The video encoder 200 may be further configured to determine (1102) not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled. In one example, the template-based inter prediction technique is local illumination compensation (LIC). In another example, the template-based inter prediction technique is template matching (TM) prediction. The inter prediction may be one of a regular merge mode, a regular advanced motion vector prediction (AMVP) mode, an affine merge mode, or an affine AMVP mode.
[0226] The video encoder 200 may be further configured to encode the video data using inter prediction without applying template-based inter prediction techniques (1104). For example, the video encoder 200 may not apply LIC to inter prediction hypotheses of the video data.
[0227] 12 is a flowchart illustrating another example method for decoding video data in accordance with the techniques of this disclosure. The technique of FIG. 12 may be performed by one or more structural components of the video decoder 300, including the motion compensation unit 316.
[0228] In one example of this disclosure, the video decoder 300 may be configured to determine (1200) that a reference picture resampling (RPR) mode is enabled. In one example, the video decoder 300 may be configured to determine that the RPR mode is enabled based on a reference picture of the video data being a different size than a current picture of the video data. In another example, the video decoder 300 is configured to code the video data using bidirectional prediction. In this example, the RPR mode is enabled based on at least one reference picture of the multiple reference pictures being a different size than a current picture of the video data.
[0229] The video decoder 300 may be further configured to determine (1202) not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled. In one example, the template-based inter prediction technique is local illumination compensation (LIC). In another example, the template-based inter prediction technique is template matching (TM) prediction. The inter prediction may be one of a regular merge mode, a regular advanced motion vector prediction (AMVP) mode, an affine merge mode, or an affine AMVP mode.
[0230] The video decoder 300 may be further configured to decode the video data using inter prediction without applying template-based inter prediction techniques (1204). For example, the video decoder 300 may not apply LIC to inter prediction hypotheses of the video data.
[0231] In another example, the video decoder 300 may be configured to infer a value of a local lighting compensation (LIC) flag based on which RPR is used for the reference picture of the current block.
[0232] In another example, when inter prediction is the merge mode, the video decoder 300 may be configured to construct a merge candidate list for the block of the video data, pruning the merge candidate list to create a pruned merge candidate list, where pruning the merge candidate list includes removing merge candidates that have at least one reference picture that is a different size than the current picture of the video data, and decoding the block of the video data using the pruned merge candidate list.
[0233] In another example, when inter prediction is the merge mode, the video decoder 300 may be configured to construct a merge candidate list for the block of the video data, pruning the merge candidate list to create a pruned merge candidate list, where pruning the merge candidate list includes removing all merge candidates having reference pictures that are a different size than the current picture of the video data, and decoding the block of the video data using the pruned merge candidate list.
[0234] Other exemplary aspects of the present disclosure are described below.
[0235] Aspect 1A - A method for coding video data, comprising: determining whether to apply a local illumination compensation (LIC) mode to the video data based on whether a reference picture resampling (RPR) mode is enabled; and coding the video data using the LIC mode and / or the RPR mode based on the determining.
[0236] Aspect 2A - A method for coding video data, comprising: determining whether to apply a local illumination compensation (LIC) mode to the video data based on whether a weighted prediction (WP) mode is enabled; and coding the video data using the LIC mode and / or the WP mode based on the determination.
[0237] Aspect 3A - A method for coding video data, comprising: determining whether to apply a template matching (TM) mode to the video data based on whether a reference picture resampling (RPR) mode is enabled; and coding the video data using the TM mode and / or the RPR mode based on the determination.
[0238] Aspect 4A - A method for coding video data, comprising: determining whether to apply a template matching (TM) mode to the video data based on whether a weighted prediction (WP) mode is enabled; and coding the video data using the TM mode and / or the WP mode based on the determination.
[0239] Embodiment 5A - The method of any combination of Embodiments 1A-4A.
[0240] Embodiment 6A - The method of any one of claims 1A to 5A, wherein coding includes decoding.
[0241] Embodiment 7A - The method of any of embodiments 1A-5A, wherein the coding comprises encoding.
[0242] Example 8A - A device for coding video data, comprising one or more means for performing the method described in any of Examples 1A-7A.
[0243] Embodiment 9A-The device of embodiment 8A, wherein the one or more means comprise one or more processors implemented in circuit configuration.
[0244] Example 10A - The device of example 8A or 9A, further comprising a memory for storing video data.
[0245] Example 11A - The device of any of examples 8A-10A, further comprising a display configured to display the decoded video data.
[0246] Example 12A - A device according to any of Examples 8A-11A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0247] Example 13A - The device of any of examples 8A-12A, wherein the device comprises a video decoder.
[0248] Example 14A - The device of any of examples 8A to 13A, wherein the device comprises a video encoder.
[0249] Aspect 15A - A computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors to perform a method according to any of aspects 1A-7A.
[0250] Aspect 1B - A method for decoding video data, comprising: determining that a reference picture resampling (RPR) mode is enabled; determining not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled; and decoding the video data using inter prediction without applying the template-based inter prediction technique.
[0251] The method of embodiment 1B, wherein the template-based inter-prediction technique is local illumination compensation (LIC).
[0252] Example 3B - The method of example 2B, wherein decoding the video data without applying template-based inter-prediction techniques includes not applying LIC to inter-prediction hypotheses of the video data.
[0253] The method of aspect 1B, wherein the RPR mode is enabled based on a reference picture of the video data being a different size than a current picture of the video data.
[0254] Embodiment 5B - The method of embodiment 1B, wherein the inter prediction is one of a regular merge mode, a regular advanced motion vector prediction (AMVP) mode, an affine merge mode, or an affine AMVP mode.
[0255] The method of embodiment 5B, further comprising: estimating a value of a local illumination compensation (LIC) flag based on which the RPR is used for the reference picture of the current block.
[0256] Aspect 7B - The method of aspect 5B, wherein inter prediction is a merge mode, and the method further includes: configuring a merge candidate list for the block of the video data; pruning the merge candidate list to create a pruned merge candidate list, the pruning including removing merge candidates having at least one reference picture that is a different size than the current picture of the video data; and decoding the block of the video data using the pruned merge candidate list.
[0257] Aspect 8B - The method of aspect 5B, wherein inter prediction is a merge mode, and the method further includes: configuring a merge candidate list for the block of the video data; pruning the merge candidate list to create a pruned merge candidate list, the pruning including removing all merge candidates having a different size than the current picture of the video data; and decoding the block of the video data using the pruned merge candidate list.
[0258] Aspect 9B - The method of aspect 1B, wherein the inter prediction is bidirectional prediction and the RPR mode is enabled based on at least one reference picture of the multiple reference pictures being a different size than a current picture of the video data.
[0259] Embodiment 10B - The method according to embodiment 1B, wherein the template-based inter-prediction technique is template matching (TM) prediction.
[0260] Example 11B - The method of example 1B further comprising displaying a picture of the video data.
[0261] Aspect 12B - An apparatus configured to decode video data, comprising: a memory configured to store the video data; and one or more processors implemented in a circuit and in communication with the memory, wherein the one or more processors are configured to determine that a reference picture resampling (RPR) mode is enabled, determine not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction technique.
[0262] Example 13B - The apparatus of example 12B, wherein the template-based inter-prediction technique is local illumination compensation (LIC).
[0263]
[0046] Example 14B - The apparatus of example 13B, further configured such that, to decode the video data without applying a template-based inter-prediction technique, the one or more processors do not apply LIC to inter-prediction hypotheses of the video data.
[0264]
[0041] Example 15B - The apparatus of example 12B, wherein the RPR mode is enabled based on a reference picture of the video data being a different size than a current picture of the video data.
[0265] Example 16B - The apparatus of example 12B, wherein inter prediction is one of a regular merge mode, a regular advanced motion vector prediction (AMVP) mode, an affine merge mode, or an affine AMVP mode.
[0266]
[0043] Example 17B - The apparatus of example 16B, wherein the one or more processors are further configured to infer a value of a local illumination compensation (LIC) flag based on the RPR being used for the reference picture of the current block.
[0267]
[0046] Aspect 18B - The apparatus of aspect 16B, wherein inter prediction is a merge mode, and the one or more processors are further configured to: configure a merge candidate list for the block of the video data; prune the merge candidate list to create a pruned merge candidate list, where pruning the merge candidate list includes removing merge candidates having at least one reference picture that is a different size than the current picture of the video data; and decode the block of the video data using the pruned merge candidate list.
[0268]
[0046] Aspect 19B - The apparatus of aspect 16B, wherein inter prediction is a merge mode, and the one or more processors are further configured to: configure a merge candidate list for the block of video data; prune the merge candidate list to create a pruned merge candidate list, where pruning the merge candidate list includes removing all merge candidates having reference pictures that are a different size than the current picture of the video data; and decode the block of video data using the pruned merge candidate list.
[0269]
[0041] Example 20B - The apparatus of example 12B, wherein the inter prediction is bidirectional prediction and the RPR mode is enabled based on at least one reference picture of the multiple reference pictures being a different size than a current picture of the video data.
[0270] Example 21B - The apparatus of example 12B, wherein the template-based inter-prediction technique is template matching (TM) prediction.
[0271] Example 22B - The apparatus of example 12B, further comprising: a display configured to display pictures of the video data.
[0272] Aspect 23B - A method for encoding video data, comprising: determining that a reference picture resampling (RPR) mode is enabled; determining not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled; and encoding the video data using inter prediction without applying the template-based inter prediction technique.
[0273] Aspect 24B - An apparatus configured to encode video data, comprising: a memory configured to store the video data; and one or more processors implemented in a circuit and in communication with the memory, wherein the one or more processors are configured to determine that a reference picture resampling (RPR) mode is enabled, determine not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and encode the video data using inter prediction without applying the template-based inter prediction technique.
[0274] Aspect 25B - A method for decoding video data, comprising: determining that a reference picture resampling (RPR) mode is enabled; and applying a template-based inter-prediction technique to the video data based on the RPR mode being enabled.
[0275] The method described in aspect 25B, wherein applying a template-based inter prediction technique to video data based on RPR mode being enabled includes applying an interpolation filter to a reference template block of the template-based inter prediction technique, wherein the interpolation filter is the same as that used for the RPR mode.
[0276] Embodiment 27B - The method according to embodiment 25B, wherein the template-based inter-prediction technique is template matching (TM) prediction.
[0277] Aspect 28B - An apparatus configured to decode video data, comprising: a memory configured to store the video data; and one or more processors implemented in a circuit and in communication with the memory, wherein the one or more processors are configured to determine that a reference picture resampling (RPR) mode is enabled, and to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled.
[0278] Aspect 29B - The apparatus of aspect 28B, further configured to: apply an interpolation filter to a reference template block of the template-based inter prediction technique to apply a template-based inter prediction technique to video data based on the RPR mode being enabled, the interpolation filter being the same as that used for the RPR mode.
[0279]
[0041] Embodiment 30B - the apparatus of embodiment 28B, wherein the template-based inter-prediction technique is template matching (TM) prediction.
[0280] Aspect 1C - A method for decoding video data, comprising: determining that a reference picture resampling (RPR) mode is enabled; determining not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled; and decoding the video data using inter prediction without applying the template-based inter prediction technique.
[0281] The method of embodiment 1C, wherein the template-based inter-prediction technique is local illumination compensation (LIC).
[0282]
[0033] Aspect 3C - the method of aspect 2C, wherein decoding the video data without applying template-based inter-prediction techniques includes not applying LIC to inter-prediction hypotheses of the video data.
[0283] Example 4 - The method of any of examples 1C to 3C, wherein the C-RPR mode is enabled based on a reference picture of the video data being a different size than a current picture of the video data.
[0284] Example 5C - The method of any of examples 1C-4C, wherein the inter prediction is one of a regular merge mode, a regular advanced motion vector prediction (AMVP) mode, an affine merge mode, or an affine AMVP mode.
[0285] The method of embodiment 5C, further comprising: estimating a value of a local illumination compensation (LIC) flag based on which the RPR is used for the reference picture of the current block.
[0286] Aspect 7C - The method of aspect 5C, wherein inter prediction is a merge mode, and the method further includes: configuring a merge candidate list for a block of the video data; pruning the merge candidate list to create a pruned merge candidate list, the pruning including removing merge candidates having at least one reference picture that is a different size than the current picture of the video data; and decoding the block of the video data using the pruned merge candidate list.
[0287] Aspect 8C - The method of aspect 5C, wherein inter prediction is a merge mode, and the method further includes: configuring a merge candidate list for the block of the video data; pruning the merge candidate list to create a pruned merge candidate list, the pruning including removing all merge candidates having a different size than the current picture of the video data; and decoding the block of the video data using the pruned merge candidate list.
[0288] Example 9C - A method as described in any of examples 1C to 8C, wherein the inter prediction is bidirectional prediction and the RPR mode is enabled based on at least one reference picture of the multiple reference pictures being a different size than the current picture of the video data.
[0289] Embodiment 10C - A method according to any of embodiments 1C to 9C, wherein the template-based inter-prediction technique is template matching (TM) prediction.
[0290] Embodiment 11C - The method of any of embodiments 1C to 10C, further comprising displaying a picture of the video data.
[0291] Aspect 12C - An apparatus configured to decode video data, comprising: a memory configured to store the video data; and one or more processors implemented in a circuit and in communication with the memory, wherein the one or more processors are configured to determine that a reference picture resampling (RPR) mode is enabled, determine not to apply a template-based inter prediction technique to the video data based on the RPR mode being enabled, and decode the video data using inter prediction without applying the template-based inter prediction technique.
[0292] Example 13C - the apparatus of example 12C, wherein the template-based inter-prediction technique is local illumination compensation (LIC).
[0293]
[0046] Example 14C - The apparatus of example 13C, further configured such that, to decode the video data without applying a template-based inter-prediction technique, the one or more processors do not apply LIC to inter-prediction hypotheses of the video data.
[0294]
[0041] Example 15C - The apparatus of any of examples 12C to 14C, wherein the RPR mode is enabled based on a reference picture of the video data being a different size than a current picture of the video data.
[0295] Example 16C - The apparatus of any of examples 12C to 15C, wherein inter prediction is one of a regular merge mode, a regular advanced motion vector prediction (AMVP) mode, an affine merge mode, or an affine AMVP mode.
[0296]
[0043] Example 17C - The apparatus of example 16C, wherein the one or more processors are further configured to infer a value of a local illumination compensation (LIC) flag based on the RPR being used for the reference picture of the current block.
[0297]
[0046] Example 18C - The apparatus of example 16C, wherein inter prediction is a merge mode, and the one or more processors are further configured to: configure a merge candidate list for the block of the video data; prune the merge candidate list to create a pruned merge candidate list, where pruning the merge candidate list includes removing merge candidates having at least one reference picture that is a different size than the current picture of the video data; and decode the block of the video data using the pruned merge candidate list.
[0298]
[0046] Aspect 19C - The apparatus of aspect 16C, wherein inter prediction is a merge mode, and the one or more processors are further configured to: configure a merge candidate list for the block of video data; prune the merge candidate list to create a pruned merge candidate list, where pruning the merge candidate list includes removing all merge candidates having reference pictures that are a different size than the current picture of the video data; and decode the block of video data using the pruned merge candidate list.
[0299]
[0046] Example 20C - The apparatus of any one of examples 12C to 19C, wherein the inter prediction is bidirectional prediction and the RPR mode is enabled based on at least one reference picture of the multiple reference pictures being a different size than the current picture of the video data.
[0300] Example 21C - An apparatus according to any one of examples 12C to 20C, wherein the template-based inter-prediction technique is template matching (TM) prediction.
[0301] Example 22C - The apparatus of any of examples 12C to 21C, further comprising a display configured to display pictures of the video data.
[0302] It should be appreciated that, depending on the example, some acts or events of any of the techniques described herein may be performed in a different order, or may be added, combined, or omitted entirely (e.g., not all acts or events described are required to practice the techniques). Moreover, in some examples, acts or events may be performed in parallel rather than sequentially, for example, through multi-threaded processing, interrupt processing, or multiple processors.
[0303] In one or more examples, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code and executed by a hardware-based processing unit. The computer-readable medium may include a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or a communication medium, which includes any medium that facilitates transfer of a computer program from one place to another, for example, according to a communication protocol. As such, a computer-readable medium may generally correspond to (1) a tangible computer-readable storage medium that is non-transitory, or (2) a communication medium, such as a signal or carrier wave. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0304] By way of example and not limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included within the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but instead cover non-transitory tangible storage media. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks typically reproduce data magnetically, while discs reproduce data optically using a laser. Combinations of the above should also be included within the scope of computer readable media.
[0305] The instructions may be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Thus, the terms "processor" and "processing circuitry" as used herein may refer to any of the above structures or any other structures suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or may be incorporated into a combined codec. The techniques may also be fully implemented in one or more circuits or logic elements.
[0306] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs), or sets of ICs (e.g., chipsets). Various components, modules, or units have been described in this disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, but they do not necessarily require realization by different hardware units. Rather, as described above, the various units may be combined in a codec hardware unit or may be provided by a collection of interoperable hardware units including one or more processors as described above in conjunction with suitable software and / or firmware.
[0307] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. 1. A method for decoding video data, comprising: determining that a reference picture resampling (RPR) mode is enabled for a current block of video data belonging to a current picture of the video data; determining, based on the RPR mode being enabled, not to apply local illumination compensation (LIC) or template matching (TM) prediction to the current block of video data; and decoding the current block of video data using an inter-prediction merge mode, wherein decoding the current block of video data using the merge mode comprises: constructing a merge candidate list for the current block of the video data, the merge candidate list comprising pruning the merge candidate list, the pruning comprising removing merge candidates that have at least one reference picture of a different size than the current picture of the video data or removing merge candidates that have all reference pictures of a different size than the current picture of the video data, based on the RPR mode being enabled and the determination not to apply LIC or TM prediction to the current block of the video data; and decoding the current block of the video data using the pruned merge candidate list. method.
2. The method of claim 1 , wherein the RPR mode is enabled based on a reference picture for a current block of the video data being a different size than the current picture of the video data.
3. The method of claim 1 , wherein the inter-prediction merge mode is one of a regular merge mode or an affine merge mode.
4. inferring a value of a LIC flag indicating whether LIC should be applied to the current block based on whether an RPR is used as a reference picture for the current block of video data; The method of claim 3 further comprising:
5. 2. The method of claim 1, wherein the inter prediction is bidirectional prediction and the RPR mode is enabled based on at least one reference picture of a plurality of reference pictures being a different size than the current picture of the video data.
6. displaying the current picture of the video data; The method of claim 1 further comprising:
7. A computer-readable storage medium storing instructions that, when executed by one or more processors of one or more devices, cause the one or more devices to perform a method according to any one of claims 1 to 6.
8. 1. An apparatus configured to decode video data, comprising: a memory configured to store the video data; one or more processors implemented in circuitry and in communication with the memory; wherein the one or more processors: determining that a reference picture resampling (RPR) mode is enabled for a current block of video data belonging to a current picture of the video data; determining, based on the RPR mode being enabled, not to apply local illumination compensation (LIC) or template matching (TM) prediction to the current block of video data; configured to decode the current block of video data using an inter-prediction merge mode, wherein decoding the current block of video data using the merge mode comprises: configuring a merge candidate list for the current block of the video data, the merge candidate list including pruning the merge candidate list, wherein pruning the merge candidate list includes eliminating merge candidates that have at least one reference picture of a different size than the current picture of the video data or eliminating merge candidates that have all reference pictures of a different size than the current picture of the video data, based on the RPR mode being enabled and the determination not to apply LIC or TM prediction to the current block of the video data; and decoding the current block of the video data using the pruned merge candidate list. Device.
9. The apparatus of claim 8 , wherein the RPR mode is enabled based on a reference picture for a current block of the video data being a different size than the current picture of the video data.
10. The apparatus of claim 8 , wherein the inter-prediction merge mode is one of a regular merge mode or an affine merge mode.
11. the one or more processors: Inferring the value of a LIC flag indicating whether LIC should be applied to the current block based on whether an RPR is used as a reference picture for the current block. The apparatus of claim 10 further configured to:
12. 9. The apparatus of claim 8, wherein the inter prediction is bidirectional prediction and the RPR mode is enabled based on at least one reference picture of a plurality of reference pictures being a different size than the current picture of the video data.
13. a display configured to display pictures of said video data The apparatus of claim 8 further comprising:
14. 1. A method for encoding video data, comprising: determining that a reference picture resampling (RPR) mode is enabled for a current block of video data belonging to a current picture of the video data; determining, based on the RPR mode being enabled, not to apply local illumination compensation (LIC) or template matching (TM) prediction to the current block of video data; and encoding the current block of video data using an inter-prediction merge mode, wherein encoding the current block of video data using the merge mode comprises: constructing a merge candidate list for the current block of the video data, the merge candidate list comprising pruning the merge candidate list, the pruning comprising removing merge candidates that have at least one reference picture of a different size than the current picture of the video data or removing merge candidates that have all reference pictures of a different size than the current picture of the video data, based on the RPR mode being enabled and the determination not to apply LIC or TM prediction to the current block of the video data; encoding the block of video data using the pruned merge candidate list. method.
15. 1. An apparatus configured to encode video data, comprising: a memory configured to store the video data; one or more processors implemented in circuitry and in communication with the memory; wherein the one or more processors: determining that a reference picture resampling (RPR) mode is enabled for a current block of video data belonging to a current picture of the video data; determining, based on the RPR mode being enabled, not to apply local illumination compensation (LIC) or template matching (TM) prediction to the current block of video data; and encoding the current block of video data using an inter-prediction merge mode, wherein encoding the block of video data using the merge mode comprises: constructing a merge candidate list for the current block of the video data, the merge candidate list including pruning the merge candidate list, wherein pruning the merge candidate list includes removing merge candidates that have at least one reference picture of a different size than the current picture of the video data or removing merge candidates that have all reference pictures of a different size than the current picture of the video data, based on the RPR mode being enabled and the determination not to apply LIC or TM prediction to the current block of the video data; encoding the current block of the video data using the pruned merge candidate list. Device.