Adaptive cost function selection in merge mode in video coding
By adaptively selecting the cost function, the problem of insufficient candidate diversity in existing video decoding is solved, thus improving decoding efficiency and quality and achieving better decoding results.
Patent Information
- Application Number
- CN202580026885.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-04-09
- Filing Date
- 2025-04-10
- Publication Date
- 2026-11-20
AI Technical Summary
In existing video decoding technologies, manually selecting the cost function leads to a lack of diversity in merging candidates, affecting decoding efficiency and quality.
An adaptive cost function selection technique is adopted to dynamically select the optimal cost function based on factors such as the candidate index of the current block's signal notification, the block size, and the prediction mode, in order to improve the diversity of merge candidates.
By adaptively selecting the cost function, the efficiency and quality of video decoding are improved, the diversity of merging candidates is enhanced, and the decoding results are optimized.
Smart Images

Figure CN123147143A_ABST
Abstract
Description
[0001] This application claims priority to U.S. Patent Application No. 19 / 174,146, filed April 9, 2025, and U.S. Provisional Patent Application No. 63 / 635,263, filed April 17, 2024, the entire contents of each of which are incorporated herein by reference. U.S. Patent Application No. 19 / 174,146, filed April 9, 2025, claims the benefit of U.S. Provisional Patent Application No. 63 / 635,263, filed April 17, 2024. Technical Field
[0002] This disclosure relates to video encoding and video decoding. Background Technology
[0003] Digital video capabilities can be incorporated into a wide variety of devices, including digital televisions, digital live broadcast systems, wireless broadcasting systems, personal digital assistants (PDAs), laptops or desktop computers, tablets, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless phones (so-called "smartphones"), video conferencing equipment, video streaming devices, and more. Digital video devices implement video decoding technologies, such as those defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 (Part 10, Advanced Video Decoding (AVC)), ITU-T H.265 / High Efficiency Video Decoding (HEVC), ITU-T H.266 / Variety Video Decoding (VVC) and extensions to these standards, as well as proprietary video codecs / formats such as AOMedia Video1 (AV1) developed by the Open Media Alliance. By implementing such video decoding technologies, video devices can more efficiently send, receive, encode, decode, and / or store digital video information.
[0004] Video decoding 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 decoding, video slices (e.g., video pictures or portions of video pictures) can be divided into video blocks, which may also be referred to as decoding tree units (CTUs), decoding units (CUs), and / or decoding nodes. Video blocks in a slice after intra-frame decoding (I) of a picture are encoded using spatial prediction relative to reference samples in adjacent blocks within the same picture. Video blocks in a slice after inter-frame decoding (P or B) of a picture can use spatial prediction relative to reference samples in adjacent blocks within the same picture or temporal prediction relative 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] Generally, this disclosure describes techniques for inter-frame prediction, decoder-side motion vector derivation techniques (e.g., template matching, bilateral matching, decoder-side motion vector (MV) refinement), and / or other techniques for video decoding. More specifically, this disclosure describes techniques for adaptive selection of one or more cost functions. Many video decoders and video decoding standards use manually selected cost functions for specific decoding tools or stages of decoding tools. For example, the drafters of a particular video decoding standard may enforce a specific cost function for a specific decoding tool or stage, and implementers may implement such a specific cost function for a specific decoding tool. However, a cost function enforced by a video standard may not always provide the highest decoding efficiency and / or quality compared to another cost function. Therefore, it may be necessary to provide adaptive selection of cost functions, which can improve video decoding efficiency and / or quality relative to manually selected cost functions.
[0006] In one example, a method includes: determining to decode the current block of video data using an inter-frame mode; determining the value of an index of a prediction candidate in a candidate list; determining a prediction candidate and a first cost function among a plurality of cost functions based on the index value; and decoding the current block based on the prediction candidate and the first cost function.
[0007] In another example, a device includes: one or more memories for storing video data; and one or more processors operatively coupled to the one or more memories, the one or more processors being configured to: the one or more memories for storing video data; and the one or more processors implemented in circuitry and operatively coupled to the one or more memories, the one or more processors being configured to: determine a current block of video data to be decoded using an inter-frame mode; determine the value of an index of a prediction candidate in a candidate list; determine a prediction candidate and a first cost function among a plurality of cost functions based on the index value; and decode the current block based on the prediction candidate and the first cost function.
[0008] In another example, an apparatus includes: components for determining a current block of video data to be decoded using an inter-frame mode; components for determining the value of an index of a prediction candidate in a candidate list; components for determining a prediction candidate and a first cost function among a plurality of cost functions based on the index value; and components for decoding the current block based on the prediction candidate and the first cost function.
[0009] In another example, a method for encoding video data includes: determining to encode the current block of video data using an inter-frame mode; determining the value of an index of a prediction candidate in a candidate list; determining a prediction candidate and a first cost function among a plurality of cost functions based on the index value; and encoding the current block according to the prediction candidate and the first cost function.
[0010] Details of one or more examples are set forth in the accompanying drawings and the following description. Other features, objects, and advantages will be apparent from the description, drawings, and claims. Attached Figure Description
[0011] Figure 1 This is a block diagram illustrating an example video encoding and decoding system that can perform the techniques of this disclosure.
[0012] Figures 2A to 2B This is a conceptual diagram illustrating example space neighboring MV candidates for merging mode and advanced motion vector prediction (AMVP) mode, respectively.
[0013] Figure 3A This is a conceptual diagram illustrating an example of a time motion vector predictor.
[0014] Figure 3B This is a conceptual diagram illustrating an example of motion vector scaling.
[0015] Figure 4 This is a conceptual diagram illustrating examples of MVD0 and MVD1 scaled based on time distance.
[0016] Figure 5 This is a conceptual diagram illustrating that MVD0 and MVD1 are mirror images regardless of time distance.
[0017] Figure 6 This is a conceptual diagram illustrating an example of a 3×3 square search pattern within the search range [-8, 8].
[0018] Figure 7 This is a conceptual diagram illustrating an example of template matching performed on the search area surrounding the initial MV.
[0019] Figure 8 This is a conceptual diagram illustrating an example of decoder-side motion vector refinement (DMVR).
[0020] Figure 9 This is a conceptual diagram illustrating an example diamond-shaped region within the search area.
[0021] Figure 10 This is a conceptual diagram illustrating an example spatially adjacent block used to derive spatial merging candidates.
[0022] Figure 11This is a conceptual diagram illustrating the example template and the reference sample in the reference image.
[0023] Figure 12 This is a conceptual diagram of an example template and a reference sample template of a block that uses the motion information of the child blocks of the current block for its motion.
[0024] Figure 13A This is a flowchart illustrating an example of adaptive cost function selection according to one or more aspects of this disclosure.
[0025] Figure 13B This is a flowchart illustrating another example of adaptive cost function selection according to one or more aspects of this disclosure.
[0026] Figure 14 This is a block diagram illustrating an example video encoder that can perform the techniques of this disclosure.
[0027] Figure 15 This is a block diagram illustrating an example video decoder that can perform the techniques of this disclosure.
[0028] Figure 16 This is a flowchart illustrating an example method for encoding the current block according to the technology of this disclosure.
[0029] Figure 17 This is a flowchart illustrating an example method for decoding the current block according to the technology of this disclosure. Detailed Implementation
[0030] In some video decoding standards, drafts, and implementations, different cost functions are primarily selected (e.g., pre-selected) for various decoding tools or at different decoding stages to quantify the cost of the decoding tools. However, when the same cost function is applied to refine merging candidates, different merging candidates may produce very similar refinement results. A lack of diversity among merging candidates can potentially impact video decoding performance, leading to suboptimal refinement results such as lower decoding efficiency and / or lower quality decoded video.
[0031] This disclosure describes techniques for adaptive selection of cost functions. For example, a video decoder may use candidate indices (e.g., merge indices) of signaling notifications for the current block, the block size of the current block, the prediction mode of the current block, and / or individual signaling flags to determine a specific cost function from a plurality of cost functions to apply to the current block. By adaptively selecting the cost function, the techniques of this disclosure can increase the diversity of merge candidates and thereby improve video decoding efficiency and / or quality.
[0032] Figure 1This is a block diagram illustrating an example video encoding and decoding system 100 capable of performing the techniques of this disclosure. The techniques of this disclosure generally relate to decoding (encoding and / or decoding) video data. Generally speaking, video data includes any data used for processing video. Thus, video data may include unencoded raw video, encoded video, decoded (e.g., reconstructed) video, and video metadata, such as signaling data.
[0033] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 can be or may include any of a wide range of devices, such as desktop computers, laptop computers, mobile devices, tablet computers, set-top boxes, mobile phones (such as smartphones), televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, broadcast receiver devices, etc. In some cases, source device 102 and destination device 116 may be configured for wireless communication and are therefore referred to as wireless communication devices.
[0034] exist Figure 1 In the example, 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, video decoder 300, memory 120, and display device 118. According to this disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply techniques for adaptive selection of a cost function. 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 arrangements. For example, source device 102 may receive video data from an external video source such as an external camera. Similarly, destination device 116 may interface with an external display device instead of including an integrated display device.
[0035] like Figure 1The system 100 shown is merely an example. Typically, any digital video encoding and / or decoding device can perform techniques for adaptive selection of the cost function. Source device 102 and destination device 116 are merely examples of such decoding devices, where source device 102 generates decoded video data for transmission to destination device 116. This disclosure refers to a “decoding” device as a device that performs the decoding (e.g., encoding and / or decoding) of data. Thus, video encoder 200 and video decoder 300 represent examples of decoding devices, specifically, a video encoder and a video decoder, respectively. In some examples, source device 102 and destination device 116 may operate in a substantially symmetrical manner, such that each of source device 102 and destination device 116 includes video encoding and decoding components. Therefore, system 100 may support one-way or two-way video transmission between source device 102 and destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.
[0036] Generally, video source 104 represents the source of video data (i.e., unencoded raw video data) and provides a sequential series of pictures (also referred to as "frames") of video data to video encoder 200, which encodes the data for the pictures. Video source 104 of source device 102 may include video capture devices such as cameras, video archives containing previously captured raw video, and / or video feed interfaces for receiving video from video content providers. Alternatively, 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, pre-captured, or computer-generated video data. Video encoder 200 may rearrange the pictures from the received order (sometimes referred to as "display order") to a decoding order for decoding. Video encoder 200 may generate a bitstream comprising the encoded video data. Then, the source device 102 can output the encoded video data to the computer-readable medium 110 via the output interface 108 for reception and / or retrieval by, for example, the input interface 122 of the destination device 116.
[0037] The memory 106 of source device 102 and the memory 120 of destination device 116 represent general-purpose memory. In some examples, memories 106 and 120 may store raw video data, such as raw video from video source 104 and raw decoded video data from video decoder 300. Additionally or alternatively, memories 106 and 120 may store software instructions executable by, for example, video encoder 200 and video decoder 300. Although memories 106 and 120 are shown separately from video encoder 200 and video decoder 300 in this example, it should be understood that video encoder 200 and video decoder 300 may also include internal memory for functionally similar or equivalent purposes. Furthermore, memories 106 and 120 may store encoded video data, such as output from video encoder 200 and input to video decoder 300. In some examples, portions of memories 106 and 120 may be allocated as one or more video buffers, for example, to store raw decoded and / or encoded video data.
[0038] Computer-readable medium 110 may represent any type of medium or device capable of transmitting encoded video data from source device 102 to destination device 116. In one example, computer-readable medium 110 represents a communication medium that enables source device 102 to directly transmit encoded video data to destination device 116 in real time, for example, via a radio frequency network or a computer-based network. According to a communication standard such as a wireless communication protocol, output interface 108 may modulate the transmitted signal including the encoded video data, and input interface 122 may demodulate the received transmitted signal. The communication medium may include any wireless or wired communication medium, such as radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network such as a local area network, a wide area network, or a global network (such as the Internet). The communication medium may include a router, switch, base station, or any other equipment that may be useful for facilitating communication from source device 102 to destination device 116.
[0039] In some examples, source device 102 can output encoded data from output interface 108 to storage device 112. Similarly, destination device 116 can access encoded data from storage device 112 via input interface 122. Storage device 112 may include any data storage medium of various distributed or locally accessed data storage media, such as hard disk drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.
[0040] In some examples, source device 102 can output encoded video data to file server 114 or another intermediate storage device that can store the encoded video data generated by source device 102. Destination device 116 can access the stored video data from file server 114 via streaming or download.
[0041] File server 114 can be any type of server device capable of storing encoded video data and sending the encoded video data to destination device 116. File server 114 may represent a web server (e.g., for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or FLUTE-based file delivery protocol), a Content Delivery Network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Service (MBMS) or Enhanced MBMS (eMBMS) server, and / or a Network Attached Storage (NAS) device. File server 114 may additionally or alternatively implement one or more HTTP streaming protocols, such as HTTP-based Dynamic Adaptive Streaming (DASH), HTTP Live Streaming (HLS), Real-Time Streaming Protocol (RTSP), HTTP Dynamic Streaming, etc.
[0042] Destination device 116 can access encoded video data from file server 114 via any standard data connection, including an internet connection. This may include a wireless channel (e.g., Wi-Fi connection), a wired connection (e.g., digital subscriber line (DSL), cable modem, etc.), or a combination of both, suitable for accessing encoded video data stored on file server 114. Input interface 122 can be configured to operate according to any or more of the various protocols discussed above for retrieving or receiving media data from file server 114, or other such protocols for retrieving media data.
[0043] Output interface 108 and input interface 122 can represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 can be configured to transmit data, such as encoded video data, according to cellular communication standards such as 4G, 4G-LTE (Long Term Evolution), Advanced LTE, 5G, etc. In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 can be configured to comply with other wireless standards such as the IEEE 802.11 specification, the IEEE 802.15 specification (e.g., ZigBee), etc.™ ),Bluetooth ™ Standards are used to transmit data, such as encoded video data. In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include an SoC device for performing functions belonging to video encoder 200 and / or output interface 108, and destination device 116 may include an SoC device for performing functions belonging to video decoder 300 and / or input interface 122.
[0044] The technology disclosed herein can be applied to video decoding to support any multimedia application in a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission (such as HTTP-based Dynamic Adaptive Streaming (DASH)), digital video encoded onto data storage media, decoding of digital video stored on data storage media, or other applications.
[0045] The input interface 122 of the destination device 116 receives an encoded video bitstream from a computer-readable medium 110 (e.g., a communication medium, storage device 112, file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 and also used by the video decoder 300, such as syntax elements having values describing the characteristics and / or processing of video blocks or other decoded units (e.g., slices, pictures, picture groups, sequences, etc.). The display device 118 displays a decoded picture of the decoded video data to the 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.
[0046] Despite Figure 1Not shown, but in some examples, both the video encoder 200 and the video decoder 300 may be integrated with the audio encoder and / or audio decoder (e.g., audio codec), and may include appropriate MUX-DEMUX units or other hardware and / or software to process multiplexed streams that include both audio and video in a common data stream. Example audio codecs may include AAC, AC-3, AC-4, ALAC, ALS, AMBE, AMR, AMR-WB (G.722.2), AMR-WB+, aptX (various versions), ATRAC, BroadVoice (BV16, BV32), CELT, Enhanced AC-3 (E-AC-3), EVS, FLAC, G.711, G.722, G.722.1, G.722.2 (AMR-WB), G.723.1, G.726, G.728, G.729, G.729.1, GSM-FR, HE-AAC, iLBC, iSAC, LA Lyra, Monkey's Audio, MP1, MP2 (MPEG-1, 2 Audio Layer II), MP3, Musepack, Nellymoser Asao, OptimFROG, Opus, Sac, Satin, SBC, SILK, Siren 7, Speex, SVOPC, True Audio (TTA), TwinVQ, USAC, Vorbis (Ogg), WavPack and Windows Media Aud.
[0047] Both the video encoder 200 and the video decoder 300 can be implemented as any of a variety of suitable encoder and / or decoder circuits comprising a processing system, 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 technology is implemented in part in software, the device may store instructions for the software in a suitable non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the technology of this disclosure. Each of the video encoder 200 and the video decoder 300 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder / decoder (CODEC) in the respective device. Devices including the video encoder 200 and / or the video decoder 300 may implement the video encoder 200 and / or the video decoder 300 in processing circuitry such as integrated circuits and / or microprocessors. Such devices may be wireless communication devices (such as cellular phones) or any other type of device described herein.
[0048] The video encoder 200 and video decoder 300 may operate according to a video decoding standard such as ITU-T H.265 (also known as High Efficiency Video Decoding (HEVC)) or its extensions (such as Multi-View and / or Scalable Video Decoding Extensions)). Alternatively, the video encoder 200 and video decoder 300 may operate according to other proprietary or industry standards such as ITU-T H.266 (also known as Multi-Functional Video Decoding (VVC)). In other examples, the video encoder 200 and video decoder 300 may operate according to proprietary video codecs / formats such as AOMedia Video 1 (AV1), extensions to AV1, and / or subsequent versions of AV1 (e.g., AV2)). In other examples, the video encoder 200 and video decoder 300 may operate according to other proprietary formats or industry standards. However, the technology disclosed herein is not limited to any particular decoding standard or format. Typically, the video encoder 200 and the video decoder 300 can be configured to perform the techniques of this disclosure in combination with any video decoding technique that uses an adaptive selection technique with a cost function.
[0049] Generally, the video encoder 200 and video decoder 300 perform block-based decoding of images. The term "block" typically refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used during encoding and / or decoding). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Generally, the video encoder 200 and video decoder 300 decode video data represented in YUV (e.g., Y, Cb, Cr) format. That is, instead of decoding the red, green, and blue (RGB) data used for images, the video encoder 200 and video decoder 300 decode both the luminance and chrominance components, where the chrominance components may include both red and blue hue chrominance components. In some examples, the video encoder 200 converts the received RGB format data to a YUV representation before encoding, and the video decoder 300 converts that YUV representation to RGB format. Alternatively, preprocessing and postprocessing units (not shown) may perform these conversions.
[0050] This disclosure generally relates to the decoding (e.g., encoding and decoding) of images to include processes of encoding or decoding data of the image. Similarly, this disclosure may relate to the decoding of blocks of images to include processes of encoding or decoding data used for the blocks (e.g., prediction and / or residual decoding). Encoded video bitstreams typically include a series of values for syntax elements representing decoding decisions (e.g., decoding modes) and the partitioning of images into blocks. Therefore, references to the decoding of images or blocks should generally be understood as the decoded values of the syntax elements that form the images or blocks.
[0051] HEVC defines various blocks, including decoding units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video decoder (such as a video encoder 200) divides the decoding tree unit (CTU) into CUs based on a quadtree structure. That is, the video decoder divides the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. Nodes without child nodes are called "leaf nodes," and the CU of such leaf nodes may include one or more PUs and / or one or more TUs. The video decoder may further divide the PUs and TUs. For example, in HEVC, a residual quadtree (RQT) represents the partitioning of the TU. In HEVC, the PU represents inter-frame prediction data, while the TU represents residual data. The CU after intra-frame prediction includes intra-frame prediction information, such as intra-frame mode indication.
[0052] As another example, video encoder 200 and video decoder 300 can be configured to operate according to VVC. According to VVC, the video decoder (such as video encoder 200) partitions the image into multiple CTUs. Video encoder 200 can partition 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 removes the concept of multiple partition types, such as the separation between CUs, PUs, and TUs in HEVC. The QTBT structure includes two levels: a first level partitioned according to quadtree partitioning, and a second level partitioned according to binary tree partitioning. The root node of the QTBT structure corresponds to a CTU. The leaf nodes of the binary tree correspond to CUs.
[0053] In the MTT partitioning structure, blocks can be divided using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning (also known as triplet tree (TT)). A ternary tree or triplet tree partition is a partition in which a block is divided into three sub-blocks. In some examples, a ternary tree or triplet tree partition divides a block into three sub-blocks without dividing the original block through the center. Partition types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.
[0054] When operating according to the AV1 codec, the video encoder 200 and video decoder 300 can be configured to decode video data in blocks. In AV1, the largest decoded block that can be processed is called a superblock. In AV1, a superblock can be 128x128 luminance samples or 64x64 luminance samples. However, in subsequent video decoding formats (e.g., AV2), superblocks can be defined by different (e.g., larger) luminance sample sizes. In some examples, the superblock is the top level of a block quadtree. The video encoder 200 can further divide the superblock into smaller decoded blocks. The video encoder 200 can use square or non-square partitions to divide the superblock and other decoded blocks into smaller blocks. Non-square blocks can include N / 2xN blocks, NxN / 2 blocks, N / 4xN blocks, and NxN / 4 blocks. The video encoder 200 and video decoder 300 can perform separate prediction and transform processing on each decoded block within the decoded block.
[0055] AV1 also defines video data tiles. A tile is a rectangular array of superblocks that can be decoded independently of other tiles. That is, the video encoder 200 and video decoder 300 can encode and decode the decoding blocks within a tile separately without using video data from other tiles. However, the video encoder 200 and video decoder 300 can perform filtering across tile boundaries. The tile size can be uniform or non-uniform. Tile-based decoding enables parallel processing and / or multithreading in the encoder and decoder implementations.
[0056] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the respective chroma components).
[0057] The video encoder 200 and the video decoder 300 can be configured to use quadtree partitioning, QTBT partitioning, MTT partitioning, superblock partitioning or other partitioning structures.
[0058] In some examples, a CTU includes a decoded tree block (CTB) of luminance samples, two corresponding CTBs of chrominance samples of an image with three sample arrays, or a CTB of samples of an image decoded using three separate color planes and a syntax structure for decoding the samples. A CTB can be an NxN sample block of some value N, such that a partitioning method divides the components into CTBs. A component is an array or a single sample from one of the three arrays (luminance and two chrominance) constituting a 4:2:0, 4:2:2, or 4:4:4 color format image, or an array or a single sample constituting an array or array constituting a monochrome format image. In some examples, a decoded block is an MxN sample block of values M and N, such that a partitioning method divides the CTB into decoded blocks.
[0059] Blocks (e.g., CTUs or CUs) can be grouped in various ways within an image. As an example, a brick can refer to a rectangular area of a row of CTUs within a specific tile in an image. A tile can be a rectangular area of CTUs within a specific tile column and a specific tile row in an image. A tile column refers to a rectangular area of a CTU having a height equal to the height of the image and a width specified by syntax elements (e.g., such as in an image parameter set). A tile row refers to a rectangular area of a CTU having a height specified by syntax elements (e.g., such as in an image parameter set) and a width equal to the width of the image.
[0060] In some examples, a tile can 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 can also be called a brick. However, bricks that are a true subset of a tile cannot be called a tile. Bricks in an image can also be arranged in slices. A slice can be an integer number of bricks in an image that can be uniquely contained within a single Network Abstraction Layer (NAL) unit. In some examples, a slice includes multiple complete tiles or a continuous sequence of complete bricks that include only one tile.
[0061] This disclosure uses "NxN" and "N by N" interchangeably to refer to the sample size of a block (such as a CU or other video block) in the vertical and horizontal dimensions, for example, 16x16 samples or 16 by 16 samples. Generally, a 16x16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an NxNCU typically 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 can be arranged in rows and columns. Furthermore, a CU does not necessarily need to have the same number of samples in the horizontal direction as it does in the vertical direction. For example, a CU may include NxM samples, where M is not necessarily equal to N.
[0062] The video encoder 200 encodes video data representing prediction and / or residual information, as well as other information, for use in the control unit (CU). The prediction information indicates how the CU should be predicted to form a prediction block for the CU. The residual information typically represents the sample-by-sample difference between a sample of the CU before encoding and the prediction block.
[0063] To predict the Cubic Frame (CU), the video encoder 200 typically forms prediction blocks for the CU through inter-frame prediction or intra-frame prediction. Inter-frame prediction typically refers to predicting the CU from data in a previously decoded image, while intra-frame prediction typically refers to predicting the CU from data in a previously decoded image within the same frame. To perform inter-frame prediction, the video encoder 200 can use one or more motion vectors to generate prediction blocks. The video encoder 200 can typically perform a motion search to identify reference blocks that closely match the CU, for example, based on the differences between the CU and a reference block. The video encoder 200 can use sum of absolute differences (SAD), sum of squared errors (SSE), mean absolute difference (MAD), mean squared error (MSD), or other such difference calculations to compute difference metrics to determine whether a reference block closely matches the current CU. In some examples, the video encoder 200 can use unidirectional or bidirectional prediction to predict the current CU.
[0064] Some examples of VVC also provide an affine motion compensation mode, which can be viewed as an inter-frame prediction mode. In affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion, such as zooming in or out, rotation, perspective motion, or other irregular motion types.
[0065] To perform intra-frame prediction, the video encoder 200 can select an intra-frame prediction mode to generate prediction blocks. Some examples of VVC provide sixty-seven intra-frame prediction modes, including various directional modes, as well as planar and DC modes. Generally, the video encoder 200 selects an intra-frame prediction mode that describes the neighboring samples of the current block (e.g., the block of the CU) and predicts samples of the current block from them. Assuming the video encoder 200 decodes the CTU and CU in raster scan order (from left to right, from top to bottom), such samples can typically be located above, to the upper left, or to the left of the current block in the same image as the current block.
[0066] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction modes, the video encoder 200 may encode data indicating which of the various available inter-frame prediction modes is used, as well as the motion information for the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode motion vectors using Advanced Motion Vector Prediction (AMVP) or merging modes. The video encoder 200 may use similar modes to encode motion vectors used for affine motion compensation modes.
[0067] AV1 includes two common techniques for encoding and decoding blocks of video data. These two common techniques are intra-frame prediction (e.g., intra-frame prediction or spatial prediction) and inter-frame prediction (e.g., inter-frame prediction or temporal prediction). In the context of AV1, when using intra-frame prediction modes to predict blocks of video data for the current frame, the video encoder 200 and video decoder 300 do not use video data from other frames of the video data. For most intra-frame prediction modes, the video encoder 200 encodes blocks of the current frame based on the difference between sample values in the current block and predicted values generated from reference samples in the same frame. The video encoder 200 determines the predicted values generated from the reference samples based on the intra-frame prediction mode.
[0068] After prediction (such as intra-frame or inter-frame prediction for a block), the video encoder 200 can compute residual data for the block. The residual data (such as a residual block) represents the sample-wise difference between the block and the prediction block used to form the block, which is formed using the corresponding prediction mode. The video encoder 200 can apply one or more transforms to the residual block to produce transformed data in the transform domain rather than the sample domain. For example, the video encoder 200 can apply a Discrete Cosine Transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. Additionally, the video encoder 200 can apply a secondary transform after the first transform, such as a Mode Correlated Inseparable Secondary Transform (MDNSST), a Signal Correlation Transform, a Karhunen-Loeve Transform (KLT), etc. The video encoder 200 produces transform coefficients after applying one or more transforms.
[0069] As noted above, after any transformation that produces the transform coefficients, the video encoder 200 may perform quantization on the transform coefficients. Quantization generally refers to the process in which the transform coefficients are quantized to reduce the amount of data used to represent them, thereby providing further compression. By performing the 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 quantize the transform coefficients during quantization. n The place value is rounded down to m Bit value, where n Greater than m In some examples, in order to perform quantization, the video encoder 200 may perform a bit-by-bit right shift of the value to be quantized.
[0070] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix containing the quantized transform coefficients. The scan can be designed to place higher-energy (and therefore lower-frequency) transform coefficients before the vector and lower-energy (and therefore higher-frequency) transform coefficients after the vector. In some examples, the video encoder 200 can utilize a predefined scan order to scan the quantized transform coefficients to produce a serialized vector, and then entropy-encode the quantized transform coefficients of that vector. In other examples, the video encoder 200 can perform an adaptive scan. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy-encode the one-dimensional vector, for example, according to context-adaptive binary arithmetic decoding (CABAC). The video encoder 200 can also entropy-encode the values of syntax elements describing metadata associated with the encoded video data, which is used by the video decoder 300 when decoding the video data.
[0071] To perform CABAC, the video encoder 200 can assign context within a context model to the symbols to be transmitted. Context may involve, for example, whether the neighboring values of a symbol are zero. Probability determination can be based on the context assigned to the symbols.
[0072] The video encoder 200 may further generate syntax data for the video decoder 300, such as block-based syntax data, image-based syntax data, and sequence-based syntax data, for example, in image headers, block headers, and slice headers, or generate other syntax data such as sequence parameter sets (SPS), image parameter sets (PPS), or video parameter sets (VPS). The video decoder 300 may also decode such syntax data to determine how to decode the corresponding video data.
[0073] In this way, the video encoder 200 can generate a bitstream that includes encoded video data, such as syntax elements describing the partitioning of images into blocks (e.g., CUs) and prediction and / or residual information for the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.
[0074] Generally, the video decoder 300 performs the reverse process of the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can use CABAC to decode the values of syntax elements used for the bitstream in a manner substantially similar to but reversed by the CABAC encoding process of the video encoder 200. Syntax elements can define partitioning information for dividing a picture into CTUs and defining the CUs of each CTU according to a corresponding partitioning structure such as a QTBT structure. Syntax elements can further define prediction and residual information for video data blocks (e.g., CUs).
[0075] The residual information can be represented, for example, by quantized transform coefficients. The video decoder 300 can inversely quantize and inverse transform the quantized transform coefficients of the block to reconstruct the residual block for the block. The video decoder 300 uses a signaling prediction mode (intra-frame prediction or inter-frame prediction) and associated prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 can then combine the prediction block and the residual block (on a sample-by-sample basis) to reconstruct the original block. The video decoder 300 can perform additional processing, such as performing a deblocking process to reduce visual artifacts along the block boundaries.
[0076] This disclosure may generally relate to "signaling" certain information (such as syntax elements). The term "signaling" can generally refer to the communication of values and / or other data of syntax elements used to decode encoded video data. That is, video encoder 200 may signal the values of syntax elements in the bitstream. Generally speaking, signaling refers to generating values in the bitstream. As noted above, source device 102 may transmit the bitstream to destination device 116 substantially in real time or not in real time (such as when syntax elements are stored in storage device 112 for later retrieval by destination device 116).
[0077] According to the technology disclosed herein, a method includes: determining to decode a current block of video data using an inter-frame mode; determining the value of an index of a prediction candidate in a candidate list; determining a prediction candidate and a first cost function among a plurality of cost functions based on the index value; and decoding the current block based on the prediction candidate and the first cost function.
[0078] The techniques disclosed herein include inter-frame prediction, decoder-side motion vector derivation techniques (e.g., template matching, bilateral matching, decoder-side MV refinement), and / or other techniques. Such techniques can be applied to any existing video codec, such as HEVC (High Efficiency Video Decoding), VVC (Multi-Functional Video Decoding), Basic Video Decoding (EVC), or can be efficient decoding tools in future video decoding standards. Work on HEVC, Joint Exploratory Model (JEM) techniques, and Multi-Functional Video Decoding (VVC) related to the techniques described herein is described in the following sections.
[0079] Video decoding standards include ITU-T H.261, ISO / IEC MPEG-1 Visual, ITU-T H.262 or ISO / IEC MPEG-2 Visual, ITU-T H.263, ISO / IEC MPEG-4 Visual, and ITU-T H.264 (also known as ISO / IEC MPEG-4 AVC), including its Scalable Video Decoding (SVC) and Multi-View Video Decoding (MVC) extensions.
[0080] In addition, a new video decoding standard, namely High Efficiency Video Decoding (HEVC) or ITU-T H.265, including its Range Extension, Multi-View Extension (MV-HEVC) and Scalable Extension (SHVC), has recently been developed by the Joint Collaborative Team for Video Decoding (JCT-VC) and the Joint Collaborative Team for the Development of 3D Video Decoding Extensions of the ITU-T Video Decoding Expert Group (VCEG) and the ISO / IEC Animation Expert Group (MPEG).
[0081] The latest HEVC draft specification (and referred to below as HEVC WD) is available from phenix.int-evry.fr / jct / doc_end_user / documents / 14_Vienna / wg11 / JCTVC-N1003-v1.
[0082] ITU-T VCEG (Q6 / 16) and ISO / IEC MPEG (JTC 1 / SC 29 / WG 11) have studied the potential need for standardization of future video decoding technologies with compression capabilities significantly exceeding those of the current HEVC standard, including its current and recent extensions for screen content decoding and high dynamic range decoding. The groups are collaborating on this exploration in a joint project called the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by experts in the field. Reference software versions (e.g., VVC Test Model 10 (VTM 10.0)) are available for download at vcgit.hhi.fraunhofer.de / jvet / VVCSoftware_VTM.
[0083] The draft specification for Multifunctional Video Decoder (VVC) can be found in JVET-T2001. The algorithm description for Multifunctional Video Decoder and Test Model 10 (VTM 10.0) can be found in JVET-T2002.
[0084] The CU structure and motion vector prediction in VVC are now described. In VVC, the largest decoding unit in a slice is called a decoding tree block (CTB) or decoding tree unit (CTU). A CTB contains a quadtree, binary tree, or ternary tree whose nodes are decoding units.
[0085] In the VVC master configuration file, the size of the CTB can range from 4x4 to 128x128. Decoding Units (CUs) can have the same size as the CTB, as small as 4x4. Each decoding unit uses one mode (e.g., inter-frame or intra-frame decoding). When a CU is inter-frame decoded, it can be further divided into 2, 3, or 4 prediction units (PUs), or become a single PU without further division. When there are two PUs in a CU, the two PUs are divided into rectangles of equal size. When there are three PUs in a CU, there are three rectangles of ¼, ½, and ¼ the size of the CU.
[0086] When the CU is inter-frame decoded, each PU has a set of motion information derived using a unique inter-frame prediction mode.
[0087] Motion vector prediction in VVC is now described. Video decoders (such as video encoder 200 or video decoder 300) implement VVC. In the VVC standard, there are two inter-frame prediction modes, named merging (skipping special cases considered as merging) and Advanced Motion Vector Prediction (AMVP) mode for prediction units (PUs).
[0088] In AMVP mode, a candidate list of motion vectors (MVs) is maintained for multiple motion vector predictors. The motion vector of the current PU and the reference index in AMVP mode are generated by selecting a candidate from the MV candidate list.
[0089] The MV candidate list contains at most two candidates for AMVP mode. In AMVP mode, for each potential prediction direction from list 0 or list 1, since the AMVP candidates only contain motion vectors, the reference index needs to be explicitly signaled along with the MV predictor (MVP) index pointing to the MV candidate list (e.g., by a video encoder such as video encoder 200). In AMVP mode, the predicted motion vectors can be further refined.
[0090] Candidates for the AMVP pattern are derived from spatially adjacent blocks, temporally adjacent blocks, or historical motion information tables.
[0091] Now we describe spatially adjacent candidates. Figures 2A to 2B These are conceptual diagrams illustrating example spatially adjacent MV candidates used in merge mode and AMVP mode, respectively. For example, video encoder 200 or video decoder 300 can target a specific PU (PU0) from... Figures 2A to 2B The adjacent block-derived spatial MV candidates are shown, but the techniques that the video encoder 200 or video decoder 300 can use to generate candidates from blocks are different for merge mode and AMVP mode.
[0092] In merge mode, you can use Figure 2A The following order derives up to four spatial MV candidates for PU0 130: left (0, A1), top (1, B1), top right (2, B0), bottom left (3, A0), and top left (4, B2).
[0093] In AMVP mode, the adjacent blocks of PU0 132 are divided into two groups: the left group, which includes blocks 0 and 1, and the upper group, which includes blocks 2, 3, and 4, as follows: Figure 2B As shown. For each group, potential candidates in adjacent blocks that point to the same reference image as the reference image indicated by the signaled reference index have the highest priority to be selected to form the final candidate of that group for PU0 132. All adjacent blocks may not contain motion vectors pointing to the same reference image. Therefore, if no such candidate can be found, the first available candidate will be scaled to form the final candidate, thus compensating for the temporal distance difference. For example, video encoder 200 or video decoder 300 may select the first available candidate and scale it to form the final candidate to compensate for the temporal distance difference.
[0094] Temporal motion vector prediction in HEVC is now described. HEVC is implemented using a video decoder (such as a video encoder 200 or a video decoder 300). Temporal motion vector predictor (TMVP) candidates (if enabled and available) are added to the MV candidate list after the spatial motion vector candidates. The motion vector derivation process for TMVP candidates is the same for both merge mode and AMVP mode; however, in merge mode, the target reference index of the TMVP candidate is always set to 0.
[0095] Figure 3A This is a conceptual diagram illustrating an example of a time motion vector predictor. Figure 3A Example TMVP candidates for block 156 (PU0) are shown, and Figure 3B The motion vector scaling process is illustrated. The principal block position derived for the TMVP candidate is the lower right block outside the co-located PU. This candidate is... Figure 3A The block is considered to be block "T" 154. The position of block T 154 is used to compensate for the deviation of the upper and left blocks used to generate spatially adjacent candidates. However, if the block is located outside the current CTB row (shown as block T 152) or motion information is unavailable (shown as block T 150), the block is replaced by the center block of the PU.
[0096] Figure 3BThis is a conceptual diagram illustrating an example of motion vector scaling. Similar to the direct temporal mode in AVC, in order to derive TMVP candidate motion vectors, co-located MVs can be scaled to compensate for temporal distance differences, such as... Figure 3B As shown. The video encoder 200 and video decoder 300 can derive motion vectors for TMVP candidates from the co-location PUs of the co-location images indicated in the slice level. The motion vectors of the co-location PUs are called co-location MVs. Similar to the temporal direct mode in AVC, in order to derive the TMVP candidate motion vectors 157, the co-location MVs 158 can be scaled to compensate for the temporal distance difference, as shown. Figure 3B As shown.
[0097] Now we will describe other aspects of motion prediction in HEVC.
[0098] Several aspects of the merge and AMVP pattern are worth mentioning below.
[0099] Motion vector scaling: This assumes that the value of a motion vector is proportional to the distance of the image during rendering. A motion vector is associated with a reference image and the image containing the motion vector (i.e., the containing image). When predicting another motion vector using one motion vector, the distance between the containing and reference images is calculated based on the Picture Order Count (POC) value.
[0100] For a motion vector to be predicted, its associated containing image and reference image can be different. Therefore, a new distance (based on POC) is calculated. The motion vector is then scaled based on these two POC distances. For spatially adjacent candidates, the containing images of two motion vectors are the same, while the reference images are different. In HEVC, motion vector scaling is applied to both TMVP and AMVP candidates for spatial and temporal adjacency.
[0101] Artificial motion vector candidate generation: If the list of motion vector candidates is incomplete, artificial motion vector candidates are generated and inserted at the end of the list until it has all candidates.
[0102] In the merge mode, there are two types of artificial MV candidates: combined candidates derived only for B slices, and zero candidates used only for AMVP if the first type does not provide enough artificial candidates.
[0103] For each pair of candidates that is already in the candidate list and has the necessary motion information, a bidirectional combined motion vector candidate is derived by combining the motion vector of the first candidate in the image in reference list 0 and the motion vector of the second candidate in the image in reference list 1.
[0104] Pruning procedures for candidate insertion: Candidates from different blocks may happen to be the same, which reduces the efficiency of merging / AMVP candidate lists. A pruning procedure can be applied to address this problem. The pruning procedure compares one candidate in the current candidate list with other candidates to avoid inserting the same candidate to some extent. To reduce complexity, only a limited number of pruning procedures are applied, rather than comparing every potential pruning procedure with all other existing pruning procedures.
[0105] Now we discuss bilateral matching prediction. Video encoder 200 and video decoder 300 can be configured to perform bilateral matching prediction. Bilateral matching (also known as bilateral merging) prediction is another merging mode based on frame rate upconversion (FRUC) technology. When the BM mode is applied to a block, video encoder 200 and video decoder 300 can use signaled merge candidate indices to derive two initial motion vectors MV0 and MV1 to select merge candidates from a constructed merge list. When bilateral matching is performed, video encoder 200 and video decoder 300 search around for MV0 and MV1 and derive the final MV0' and MV1' based on the minimum bilateral matching cost.
[0106] The motion vector difference (MVD) MVD0 (denoted by MV0' – MV0) and MVD1 (denoted by MV1' – MV1) pointing to two reference blocks can be proportional to the temporal distance (TD) between the current image and the two reference images (e.g., TD0 and TD1). Figure 4 Examples of MVD0 and MVD1 are shown, where the distance (TD1) between the current image 170 and the reference image 172 is 4 times the distance (TD0) between the current image 170 and the reference image 174. Figure 4 Examples of MVD0 and MVD1 based on time distance are shown.
[0107] However, there exists an optional design in which MVD0 and MVD1 are mirror images regardless of the time distance between TD0 and TD1. Figure 5 An example is shown where MVD0 and MVD1 are mirrored regardless of the time distance (TD1) between the current image 176 and the reference image 178, and the time distance (TD0) between the current image 176 and the reference image 180. Figure 5 An example of mirrored MVD0 and MVD1 is shown, where TD1 is 4 times that of TD0.
[0108] Figure 6 This is a conceptual diagram illustrating an example of a 3×3 square search pattern within the search range [-8, 8]. Figure 6An example of a 3×3 square search pattern within a search range of [-8, 8] is shown for implementing bilateral matching. When implementing bilateral matching, the video encoder 200 and video decoder 300 can be configured to perform a local search around the initial MV0 and MV1 to derive the final MV0' and MV1'. Figure 7 In the example, the initial MV points to sample 182, and the final MV points to sample 184. The local search applies a 3×3 square search pattern to iterate through the search range [-8, 8]. Sample 186 represents an example of a sample within the search range surrounding samples 182, 184, and 188. Sample 188 represents an example of a sample corresponding to the MV determined during an intermediate iteration of the search process. In each search iteration, the bilateral matching costs of the eight surrounding MVs in the search pattern are calculated and compared to the bilateral matching costs of the central MV. The MV with the minimum bilateral matching cost becomes the new central MV in the next search iteration. The local search ends when the current central MV has the minimum cost within the 3×3 square search pattern or when the local search reaches a predefined maximum number of search iterations.
[0109] Template matching prediction is now described. A video decoder (such as a video encoder 200 or a video decoder 300) can implement template matching prediction. Template matching (TM) prediction is a special merging mode based on frame rate upconversion (FRUC) technology. Using this mode, motion information of the blocks is derived at the decoder side without signaling. TM can be applied to both AMVP mode and regular merging mode. In AMVP mode, MVP candidate selection is determined based on template matching to select candidates that achieve the minimum difference between the current block template and the reference block template. In regular merging mode, a TM mode flag is signaled to indicate the use of TM, and then TM is applied to the merging candidates indicated by the merging index for MV refinement.
[0110] Figure 7 This is a conceptual diagram illustrating an example of template matching performed on the search area surrounding the initial MV. (e.g.) Figure 7As shown, template matching is used to derive the motion information of the current CU 160 by finding the closest match between the current template 162 in the current image and the reference template 164 in the reference image (which may be the same size as the current template 162). Both the current template 162 and the reference template 164 may include corresponding upper and left portions, as shown. Using AMVP candidates selected based on the initial matching error, the video encoder 200 and video decoder 300 can use template matching to refine the MVP. Utilizing the merging candidates indicated by the signaled merging index, the video encoder 200 and video decoder 300 can be configured to independently refine the MV corresponding to L0 and L1 via template matching, and then further refine the less accurate MV based on the more accurate MV.
[0111] The video encoder 200 and video decoder 300 can be configured to implement the cost function. Motion-compensated interpolation is required when the motion vector points to fractional sample localization. To reduce complexity, bilinear interpolation is used instead of conventional 8-tap DCT-IF interpolation for template matching to generate a template on the reference image. The matching cost C for template matching is calculated as follows: in It is a weighting factor set to 4 based on experience. and These indicate the current test MV and the initial MV (i.e., the MVP candidate in AMVP mode or the merge motion in merge mode), respectively. SAD is used as the matching cost for template matching.
[0112] When using TM, motion is refined by using only luma samples. The derived motion is used for both luma and chroma predictions for MC inter-frame prediction. After determining MV, the final MC is performed using an 8-tap interpolation filter for luma and a 4-tap interpolation filter for chroma.
[0113] Video encoder 200 and video decoder 300 can be configured to implement the search process. MV refinement is a pattern-based MV search based on template matching cost. Two search modes are supported—diamond search and cross search for MV refinement. The MV is searched directly in diamond mode with MVD accuracy of one-quarter luminance samples, followed by cross mode with MVD accuracy of one-quarter luminance samples, and then in cross mode with MVD accuracy of one-eighth luminance samples. The search range for MV refinement is set to be equal to (-8, +8) luminance samples around the initial MV. When the current block has bidirectional prediction, the two MVs are refined independently, and then the best of the two MVs (in terms of matching cost) is set as the prior value to further refine the other MV using bidirectional prediction with CU-based weighted (BCW) weight values.
[0114] Decoder-side motion vector refinement (DMVR) is now discussed. To improve the accuracy of the MV in the merged mode, decoder-side motion vector refinement (DMVR) is applied in VVC. In the bidirectional prediction operation, a refined MV is searched around the initial MV in reference image lists L0 and L1. The DMVR method calculates the distortion between two candidate blocks in reference image lists L0 and L1. Figure 8 As illustrated, the SAD between blocks 190 and 192 is calculated based on each MV candidate surrounding the initial MV. The MV candidate with the lowest SAD becomes the refined MV and is used to generate the bidirectional prediction signal.
[0115] The refined motion vector (MV) derived from the DMVR process is used to generate inter-frame prediction samples and is also used in temporal motion vector prediction for future image decoding. The original MV is used in the deblocking process and also in spatial motion vector prediction for future CU decoding.
[0116] DMVR is a sub-block-based merging mode with a predefined maximum processing unit of 16×16 luminance samples. When the width and / or height of a CU is greater than 16 luminance samples, the CU will be further divided into sub-blocks with a width and / or height equal to 16 luminance samples.
[0117] Now let's discuss the search scheme. In DMVR, the search point is offset around the initial MV and MV according to the MV difference mirroring rule. In other words, any point examined by DMVR, represented by the candidate MV pair (MV0, MV1), follows two equations: in This represents the refinement offset between the initial MV and the refined MV in the reference image. The refinement search range is two integer brightness samples from the initial MV. The search includes an integer sample offset search phase and a fractional sample refinement phase.
[0118] A 25-point full search is applied to the integer sample offset search. First, the SAD of the initial MV pair is calculated. If the SAD of the initial MV pair is less than a threshold, the integer sample phase of DMVR is terminated. Otherwise, the SAD of the remaining 24 points is calculated and checked according to the raster scan order. The point with the smallest SAD is selected as the output of the integer sample offset search phase. To reduce the adverse consequences of the uncertainty in DMVR refinement, bias can be applied towards the original MV during the DMVR process. The SAD between reference blocks referenced by the initial MV candidate references is reduced by 1 / 4 of the SAD value.
[0119] The integer sample search is followed by fractional sample refinement. To reduce computational complexity, fractional sample refinement is derived using the parametric error surface equation instead of an additional search via SAD comparison. Fractional sample refinement is conditionally invoked based on the output of the integer sample search phase. Fractional sample refinement is further applied when the integer sample search phase terminates at a center with the minimum SAD in either the first or second iteration.
[0120] In subpixel offset estimation based on parametric error surfaces, the following 2-D parabolic error surface equation is fitted using the center localization cost and the cost at four adjacent localization points from the center: in( This corresponds to the fractional location with the minimum cost, and C corresponds to the minimum cost value. The above equation is solved by using the cost values of the five search points. The calculation is as follows:
[0121] and The value is automatically constrained between -8 and 8 because all cost values are positive and the minimum value is 8. This corresponds to a half-peak offset with 1 / 16 pixel MV accuracy in VVC. The calculated score ( Added to integer distance refinement MV to obtain subpixel accurate refinement increment MV.
[0122] Bilinear interpolation and sample padding are now described. The video decoder 300 implements bilinear interpolation and / or sample padding. An 8-tap interpolation filter is used to interpolate samples at fractional localizations. In DMVR, the search point is around an initial fractional pixel MV with an integer sample offset, therefore, samples at those fractional localizations need to be interpolated for the DMVR search process. To reduce computational complexity, a bilinear interpolation filter is used to generate fractional samples for the search process in DMVR. Another important effect of using a bilinear filter is that, for a 2-sample search range, DMVR does not access more reference samples compared to the normal motion compensation process. After obtaining a refined MV using the DMVR search process, a standard 8-tap interpolation filter is applied to generate the final prediction. To avoid accessing more reference samples in the standard MC process, samples that are not needed by the original MV-based interpolation process but are needed by the refined MV-based interpolation process are padded from those available samples.
[0123] The conditions for enabling DMVR are now discussed. DMVR is enabled if all of the following conditions are met: 1) CU-level merging mode with bidirectional prediction MV; 2) one reference image is in the past and the other is in the future relative to the current image; 3) the distances (i.e., POC differences) from the two reference images to the current image are the same; 4) the CU has more than 64 luma samples; 5) both the CU height and CU width are greater than or equal to 8 luma samples; 6) bidirectional prediction indicators with equal weights are used with CU-based weighted (BCW) weight index; 7) weighted prediction (WP) is not enabled for the current block; and 8) combined intra-inter-prediction (CIIP) mode is not used for the current block.
[0124] We now discuss multi-pass decoder-side motion vector refinement in the Enhanced Compression Model (ECM). Multi-pass decoder-side motion vector refinement can be applied. In the first pass, bilateral matching (BM) is applied to the decoded block. In the second pass, BM is applied to each 16x16 sub-block within the decoded block. In the third pass, the motion vectors (MVs) in each 8x8 sub-block are refined by applying bidirectional optical flow (BDOF). The refined MVs are stored for spatial motion vector prediction and temporal motion vector prediction.
[0125] Now we will discuss the first pass—block-based bilateral matching MV refinement. In the first pass, the refined MV is derived by applying BM to the decoded block. Similar to decoder-side motion vector refinement (DMVR), in the bidirectional prediction operation, a refined MV is searched around the two initial MVs (MV0 and MV1) in the reference picture lists L0 and L1. Based on the minimum bilateral matching cost between the two reference blocks in L0 and L1, the refined MVs (MV0_pass1 and MV1_pass1) are derived around the initial MVs.
[0126] Implement the BM video encoder 200 or video decoder 300 to perform a local search to derive integer sample precision intDeltaMV. The local search applies a 3×3 square search pattern to cycle through the horizontal search range [–sHor, sHor] and the vertical search range [–sVer, sVer], where the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.
[0127] The bilateral matching cost can be calculated as follows: bilCost = mvDistanceCost + sadCost. When the block size cbW*cbH is greater than 64, the mean-reduced sum of average differences (MRSAD) cost function is applied to remove the DC effect of distortion between reference blocks. When bilCost at the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV local search is terminated. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern, and the video encoder 200 or video decoder 300 can continue searching for the minimum cost until the video encoder 200 or video decoder 300 reaches the end of the search range.
[0128] Further refinement using existing score samples yields the final deltaMV. The refined MV after the first pass is then exported as follows: MV0_pass1 = MV0 + deltaMV MV1_pass1 = MV1 – deltaMV
[0129] We now discuss second-pass—sub-block-based bilateral matching MV refinement. In the second pass, the refined MV is derived by applying the BM to 16×16 grid sub-blocks. For each sub-block, a refined MV is searched around the two MVs (MV0_pass1 and MV1_pass1) obtained in the first pass, in the reference image lists L0 and L1. The refined MV (MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2)) is derived based on the minimum bilateral matching cost between the two reference sub-blocks in L0 and L1.
[0130] For each subblock, the video encoder 200 or video decoder 300 implementing BM performs a full search to derive integer sample precision intDeltaMV. The full search has a search range of [-sHor, sHor] in the horizontal direction and a search range of [-sVer, sVer] in the vertical direction, where the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8.
[0131] Figure 9 This is a conceptual diagram illustrating an example diamond-shaped region within the search area. The bidirectional matching cost is calculated by applying a cost factor to the sum of transformed absolute differences (SATD) cost between two reference sub-blocks, as follows: bilCost = satdCost * costFactor. The search area (2*sHor + 1) * (2*sVer + 1) is divided into 5 diamond-shaped search regions within search area 196, as shown below. Figure 9As shown, a cost factor is assigned to each search region, determined by the distance (intDeltaMV) between each search point and the starting MV. Each diamond-shaped region is processed in order starting from the center of the search region. Within each region, search points are processed in raster scan order from the top left corner to the bottom right corner. If the minimum bilCost within the current search region is less than or equal to the threshold sbW * sbH, the integer pixel full search terminates; otherwise, the integer pixel full search continues to the next search region until all search points have been checked.
[0132] Further refinement using existing VVC DMVR score samples yields the final deltaMV(sbIdx2). The second round of refined MV output is then as follows: MV0_pass2(sbIdx2) = MV0_pass1 + deltaMV(sbIdx2) MV1_pass2(sbIdx2) = MV1_pass1 – deltaMV(sbIdx2)
[0133] The third pass—sub-block-based bidirectional optical flow (MV) refinement—is now described. In the third pass, the refined MV is derived by applying BDOF to 8×8 grid sub-blocks. For each 8×8 sub-block, BDOF refinement is applied to derive scaled Vx and Vy, without truncation from the refined MV of the parent-sub-blocks in the second pass. The derived bioMv(Vx, Vy) is rounded to 1 / 16 sample precision and truncated to between -32 and 32.
[0134] The refined MVs (MV0_pass3(sbIdx3) and MV1_pass3(sbIdx3)) from the third pass can be derived as follows: MV0_pass3(sbIdx3) = MV0_pass2(sbIdx2) + bioMv MV1_pass3(sbIdx3) = MV0_pass2(sbIdx2) – bioMv
[0135] The non-adjacent space candidates in the ECM are now described. The video encoder 200 or video decoder 300 may use non-adjacent space candidates. Non-adjacent space merging candidates, such as those in JVET-L0399, are inserted after the TMVP in the regular merge candidate list. Figure 10 This is a conceptual diagram illustrating an example spatially adjacent block used to derive spatial merging candidates. Figure 10Pattern 1000 of potential space merge candidates for the current block 1002 is shown. These potential space merge candidates are labeled 1 to 23. The distance between a non-adjacent space candidate and the current decoded block is based on the width and height of the current decoded block (e.g., current block 1002). No line buffer constraints are applied.
[0136] Adaptive decoder-side motion vector refinement in ECM is now described. The video decoder 300 implements adaptive decoder-side motion vector refinement. The adaptive decoder-side motion vector refinement method is an extension of multi-pass DMVR, which includes two new merging modes to refine the MV only in one direction (L0 or L1) of the bidirectional prediction of the merging candidates that satisfy the DMVR conditions. The multi-pass DMVR process is applied to the selected merging candidates to refine the motion vectors; however, in the first pass (i.e., PU level) of DMVR, MVD0 or MVD1 is set to zero.
[0137] Similar to the regular merging mode, the merge candidates in the new merging mode are derived from spatially adjacent decoded blocks, TMVPs, non-adjacent blocks, history-based motion vector predictors (HMVPs), and paired candidates. The difference is that only those merge candidates that satisfy the DMVR condition are added to the candidate list. Both new merging modes use the same merge candidate list. The decoding method for the merge index is the same as in the regular merging mode.
[0138] This section describes adaptive reordering of merge candidates using template matching in ECM (ARMC-TM). Video decoders (such as video encoder 200 or video decoder 300) can adaptively reorder merge candidates using template matching. Merge candidates can be adaptively reordered using template matching (TM). The reordering method is applied to regular merge mode, template matching (TM) merge mode, and affine merge mode (excluding SbTMVP candidates). For TM merge mode, merge candidates are reordered before the TM refinement process.
[0139] After constructing the merge candidate list, the merge candidates are divided into several subgroups. For the regular merge mode and the TM merge mode, the subgroup size is set to 5. For the affine merge mode, the subgroup size is set to 3. The merge candidates in each subgroup are reordered incrementally based on the cost value of template matching. For simplicity, the merge candidates in the last subgroup, but not the first subgroup, are not reordered.
[0140] The template matching cost of merging candidates can be measured by the sum of absolute differences (SAD) between the samples of the template in the current block and their corresponding reference samples. The template includes a set of reconstructed samples adjacent to the current block. The reference samples of the template are located by merging the motion information of the candidates.
[0141] Figure 11This is a conceptual diagram illustrating template matching. When merging candidates utilize bidirectional prediction, reference samples of the merged candidate templates can also be generated through bidirectional prediction, such as... Figure 11 As shown. For example, Figure 11 An example is shown of a current image 1100 having a current block 1102 and a template 1103, the template including samples above and to the left of the current block 1102. A first motion vector points to a reference block 1104 defining a first reference template 1108, the first reference template including samples above and to the left of the reference block 1104. A second motion vector points to a reference block 1106 defining a second reference template 1110, the second reference template including samples above and to the left of the reference block 1106.
[0142] For a sub-block-based merge candidate with a sub-block size equal to Wsub×Hsub, the above template includes several sub-templates of size Wsub×1, and the left template includes several sub-templates of size 1×Hsub.
[0143] Figure 12 This is a conceptual diagram illustrating an example of template matching based on sub-blocks. For example... Figure 12 As shown, the motion information of the sub-blocks in the first row and first column of the current block 1202 of the current image 1200 is used to derive the reference sample for each sub-template.
[0144] For example, in Figure 12 In the middle, the corresponding block 1204 can be Figure 11 Examples of reference blocks 1104 or 1106. For example... Figure 12 exemplified, Figure 11 The reference template 1108 or 1110 may include the sample above and to the left of the co-position block 1204.
[0145] The cost function in ECM is now described. Video decoders (such as video encoder 200 or video decoder 300) implement the cost function of ECM. In ECM, multiple cost functions are defined and employed in different tools to quantify the distortion of the decoding tool. Some commonly used cost functions in different tools are described below.
[0146] SAD (Sum of Absolute Differences): The video encoder 200 or video decoder 300 implementing SAD measures the absolute pixel intensity differences. The video encoder 200 or video decoder 300 implementing SAD sums the absolute values of these differences.
[0147] SATD (Sum of Absolute Differences After Transformation): The video encoder 200 or video decoder 300 that implements SATD measures the sum of absolute differences after applying a transform (e.g., Hadamard transform).
[0148] SSE (Sum of Squared Errors): SSE is used in rate distortion to measure distortion in order to maximize the peak signal-to-noise ratio (PSNR) of the reconstructed video sequence.
[0149] Weighted SAD (Weighted Sum of Absolute Differences): Weighted SAD is commonly used in template matching tools. Video encoders 200 or video decoders 300 that implement weighted SAD assign different weights to different rows of the template to achieve more efficient template matching.
[0150] MR-SAD (Mean Removed Sum of Absolute Differences): The video encoder 200 or video decoder 300 implementing MR-SAD first calculates the mean of the original blocks. The video encoder 200 or video decoder 300 implementing MR-SAD subtracts the mean from the original blocks and then calculates the SAD.
[0151] MR-SATD (Mean Sum Removed by Transformed Absolute Difference): Similar to MR-SAD, the video encoder 200 or video decoder 300 implementing MR-SATD derives the mean from the original blocks. The video encoder 200 or video decoder 300 implementing MR-SATD then removes the mean from the original image blocks and follows the same steps to calculate SATD.
[0152] MS-SATD (Mean Scaling of Transformed Absolute Difference): The video encoder 200 or video decoder 300 implementing MS-SATD follows similar steps to SATD calculation. The only difference is that, after the transformation process, weights are applied to the absolute values of the DC coefficients. In ECM, this weight is set to one-quarter (shifted right by 2 bits).
[0153] In the draft of ECM, different cost functions are mostly manually selected for different decoding tools or at different decoding stages to quantify the cost of the decoding tool. In other words, the cost function used for a given decoding tool or a given stage is determined by the drafters of the ECM standard and is typically implemented in a video codec chosen by the drafters (e.g., manually). For example, during a multi-pass decoder-side motion vector refinement search process, the PU-level search uses SAD as the cost function, while the sub-PU-level search uses SATD. However, when the same cost function is applied to refine merge candidates, different merge candidates can produce very similar refinement results. The lack of diversity among merge candidates can potentially impact performance, leading to suboptimal refinement results such as lower decoding efficiency and / or lower quality of the decoded video.
[0154] This disclosure describes techniques for inter-frame prediction using adaptive cost function selection (e.g., adaptive selection of cost functions). In some examples, the disclosed techniques can be applied to motion vector refinement processes, such as decoder-side motion vector derivation techniques, such as bilateral matching, template matching-based merged candidate refinement, etc. The adaptive cost function selection techniques of this disclosure can also be applied to motion vector predictor (MVP) reordering processes, such as template matching cost-based MVP reordering, bilateral matching cost-based MVP reordering, etc. Video encoder 200 and / or video decoder 300 can apply the techniques of this disclosure. For example, video decoder 300 can refine at least one motion vector associated with a prediction candidate based on a first cost function among a plurality of cost functions and / or video decoder 300 can reorder motion vector predictors in a list of motion vector predictors based on the first cost function.
[0155] According to the technology disclosed herein, the cost function can be one of the cost functions listed above. However, the technology disclosed herein is not limited to the listed cost functions: SAD, SATD, MR-SAD, MR-SATD, MS-SAD, MS-SATD. Any cost function may be used, and any use of any cost function (including those not described herein) should be considered within the scope of this disclosure. For example, the video encoder 200 or the video decoder 300 may apply any of the listed cost functions or any other cost function.
[0156] The technology disclosed herein is applied to one or more inter-frame prediction modes, such as conventional merging mode, template matching merging mode, bilateral matching merging mode, geometric partitioning merging mode, AMVP merging mode, affine mode, etc.
[0157] The techniques disclosed herein can be applied to certain types of slices or pictures. In one example, these techniques are applied only to one or more of random access (RA), low latency B (LDB), or low latency P (LDP) slices or pictures. For example, before applying the techniques of this disclosure to determine the first cost function to be applied to the current block, the video decoder 300 may determine that the current block is a block of RA slice, RA picture, LDB slice, LDB picture, LDP slice, or LDP picture.
[0158] Cost function selection based on merge indexes is now described. Video encoder 200 and / or video decoder 300 may use one or more of these cost function selection techniques based on merge indexes. In this example, when using a list of motion candidates (e.g., a merge list of merge candidates) to predict a block, a candidate index (e.g., a merge index) may be used to indicate not only a specific candidate in the candidate list but also the cost function. In this example, the candidate index may indicate the candidate used for motion prediction and the cost function that will be used to derive the inter-frame block predictor. For example, if the current block is an inter-frame merge mode prediction block, the merge index, signaled in the bitstream, is used to indicate the cost function for the current block. For example, the value of the merge index may indicate a specific candidate in the merge list and the cost function used for the current block. In one example, the determined cost function is used for a motion vector refinement process, such as template matching-based MV refinement, bilateral matching-based MV refinement, etc. In one example, the block is a sub-block of the prediction block. For example, the current block may be the current sub-block.
[0159] For example, video encoder 200 may determine to encode the current block of video data using an inter-frame mode. Video encoder 200 may determine prediction candidates and a cost function for the current block. Video encoder 200 may signal in the bitstream a single syntax element having values indicating both the prediction candidates and the cost function. Video encoder 200 may encode the current block based on the prediction candidates and a first cost function.
[0160] For example, video decoder 300 can determine to decode the current block of video data using an inter-frame mode. Video decoder 300 can determine the value of the index of a prediction candidate in a candidate list. Video decoder 300 can determine the prediction candidate and a first cost function among multiple cost functions based on the index value. Video decoder 300 can decode the current block based on the prediction candidate and the first cost function.
[0161] For example, there are in the merged list N There are 10 candidates, and there are 100 candidates. M Given several different cost functions, a candidate merging index can be used to indicate which cost function to use to refine a particular candidate. The merging index, for example, signals in the bitstream known to the decoder (e.g., video decoder 300) that the same cost function is selected at both the encoder (e.g., video encoder 200) and decoder (e.g., video decoder 300) sides based on the merging index, without any additional signaling. The merging index is denoted as mrgIdx and ranges from 0 to... N – 1 The cost function index is denoted as costFuncIdx, ranging from 0 to... M – 1 In one example, the mapping between mrgIdx and costFuncIdx is predefined.
[0162] For example, video decoder 300 may determine to decode a second current block of video data using an inter-frame mode. Video decoder 300 may determine the value of the index of a second prediction candidate in a second candidate list. Video decoder 300 may determine that the second prediction candidate is located in the second part of the second candidate list. Video decoder 300 may determine a second cost function based on the fact that the second prediction candidate is located in the second part of the second candidate list. Video decoder 300 may decode the current block based on the second cost function.
[0163] The technology disclosed herein can be applied to all merged lists. N There are one candidate or a subset of candidates. In one example, only the top candidates in the list are merged. X The cost function for each candidate is selected using the technique described in this paper. The cost function selection for the remaining candidates remains unchanged. The number of cost functions... M It can be all applicable cost functions or only a subset of available cost functions.
[0164] In one example, alternatively, two cost functions can be selected for every two candidates. M = 2 For example, the video encoder 200 or video decoder 300 may optionally select two cost functions for every two candidates. For example, if the merge index is odd, a first cost function is selected; otherwise (e.g., if the merge index is even), a second cost function is selected. For example, the first cost function is determined based on the parity of the index value, choosing between the first and second cost functions; if the index value is odd, the first cost function is selected, and if the index value is even, the second cost function is selected.
[0165] Cost function selection can be indicated by a cost function index, allowing selection from a list of defined cost functions. For example, M = 2 The cost function can be SAD (e.g., a cost function with an index equal to 0, costFuncIdx=0) and SATD (costFuncIdx=1). When the candidate index mrgIdx is even, for example, divisible by 2, SAD is determined to be used with the merge candidate determined by mrgIdx. In this example, when mrgIdx is odd, SATD is determined to be used with the merge candidate determined by mrgIdx. In one example, the cost function can be further determined or replaced by the block size; for example, when the block size is greater than a threshold, another cost function is used. For example, the mean removal cost function is used for blocks, and in one case, when the block size is greater than a threshold, M=2 The cost functions are MR-SAD and MR-SATD. In another case, when the block size is greater than a threshold, M=2The cost functions are MR-SAD and SATD. In another case, when the block size is greater than a threshold, M=2 The cost functions are MR-SAD and MS-SATD.
[0166] For example, the index value can be odd or even. Odd numbers indicate a first cost function and even numbers indicate a second cost function. For example, the video decoder 300 can further determine the cost function based on the block size of the current block. For example, the first cost function can be further determined based on a selection between a first cost function and a second cost function according to the block size of the current block; if the block size of the current block is a first size, the first cost function is selected, and if the index value is a second size, the second cost function is selected.
[0167] In another example, if the number of candidates N The number greater than the cost function M ,but N Candidates can be divided into subgroups. In some examples, such as when N yes M When the value is an integer multiple of the number of subgroups, each subgroup can have M There are 10 candidates. Each candidate in the subgroup uses 10 candidates. M One of the cost functions can be used for refinement. For example, the corresponding cost function can be used to refine each candidate so that each candidate in the subgroup uses... M Different cost functions are used to refine the cost. For example, if the value of the merge index indicates the first candidate in any subgroup of the subgroup, then the first cost function is used. If the value of the merge index indicates the second candidate in any subgroup of the subgroup, then the second cost function is used, and so on. It should be understood that when N no M When it is an integer multiple of, one or more subgroups may have M There are 10 candidates, while other subgroups may have different numbers of candidates, such as M -1 candidate.
[0168] For example, video decoder 300 can determine multiple subgroups of candidates in a candidate list, each subgroup having a number of candidates equal to the number of cost functions in a plurality of cost functions. For example, if there are five cost functions, there may be five candidates in the subgroups. Video decoder 300 can determine that the value of an index is associated with the first candidate in one of the subgroups, and the first candidate in each subgroup is associated with a first cost function.
[0169] In another example, a mapping table can be created between the merge index and the cost function selection. A merge index is mapped to a specific cost function. This mapping can be generated by any rule defined above or any hand-drawn mapping rule. Both the video encoder 200 and the video decoder 300 are aware of this mapping table to select the corresponding cost function based on the merge index.
[0170] For example, the video decoder 300 can look up the value of an index in a mapping table that maps the corresponding merge index to the corresponding cost function in multiple cost functions.
[0171] In another example, a merge candidate from the merge list can be used separately. M Different cost functions can be used for refinement. For example, the video encoder 200 or the video decoder 300 can be refined using different functions. M A different cost function is used to refine a merger candidate. Then, a merge can be generated. M There are several distinct refinement candidates, and these additional refined candidates can be appended to the merged candidate list. The list size can therefore be expanded to... N*M Then, any reordering technique can be used to sort the merge candidates (e.g., adaptive reordering of merge candidates using template matching, ARMC TM, etc.), and the previous... N The candidates will be retained as the final refined merged candidates. In another example, the candidate index (mrgIdx) before the candidate sorting (e.g., ARMC TM) is used to determine cost function A, and then the index mrgIdx after the sorting is used to determine cost function B.
[0172] The block size-based cost function selection is now described. The video encoder 200 and / or video decoder 300 may use one or more of these block size-based cost function selection techniques. In one example, cost function A is selected and used in all MVP reordering and MV refinement processes when the block width is less than a threshold T. In another example, cost function A is selected and used in all MVP reordering and MV refinement processes when the block height is less than a threshold T. In yet another example, cost function A is selected and used in all MVP reordering and MV refinement processes when the block width is greater than a threshold T. In yet another example, cost function A is selected and used in all MVP reordering and MV refinement processes when the block height is greater than a threshold T. In these examples, cost function A may be one of SAD, SATD, MR-SAD, MR-SATD, MS-SAD, MS-SATD, or any other cost function.
[0173] The selection of cost functions based on prediction patterns is now described. Video encoder 200 and / or video decoder 300 may use one or more of these prediction pattern-based cost function selection techniques. For example, video encoder 200 or video decoder 300 may determine which cost function will be used for motion vector refinement and / or motion vector predictor reordering based on the prediction pattern used for the current block (such as template match merging, bilateral match merging, AMVP merging, affine bilateral match merging, or affine template match merging).
[0174] In one example, when a block is determined to be a template-matching merge pattern prediction block, cost function A is selected and used in all MVP reordering and MV refinement processes, for example, indicated by a flag signaled in the bitstream. In another example, when a block is determined to be a bilateral matching merge pattern prediction block, cost function A is selected and used in all MVP reordering and MV refinement processes, for example, indicated by a flag signaled in the bitstream (e.g., by video encoder 200). In yet another example, when a block is determined to be an AMVP merge pattern prediction block, cost function A is selected and used in all MVP reordering and MV refinement processes, for example, indicated by a flag signaled in the bitstream (e.g., by video encoder 200). In yet another example, when a block is determined to be an affine bilateral matching merge pattern prediction block, cost function A is selected and used in all MVP reordering and MV refinement processes, for example, indicated by a flag signaled in the bitstream (e.g., by video encoder 200). In one example, when the block is determined to be an affine template matching merged pattern prediction block, cost function A is selected and used in all MVP reordering and MV refinement processes. In these examples, cost function A can be one of SAD, SATD, MR-SAD, MR-SATD, MS-SAD, MS-SATD, or any other cost function.
[0175] The selection of a cost function using signaling is now described. In this example, flags are signaled in the bit stream to indicate the decision on the cost function selection. For example, a video encoder 200 may signal such flags. These flags may be signaled in one or more VPS, SPS, PPS, picture headers, slice headers, or per block to indicate the cost function used.
[0176] In one example, there are M distinct cost functions, and candidates in the merging list can be refined using each of these cost functions. The cost function decision with optimal rate-distortion performance can be signaled as a flag to the bitstream of each block. For example, video encoder 200 can signal this flag. At the decoder, the cost function decision flag is decoded, and the corresponding cost function is selected to perform the same refinement process. For example, video decoder 300 can parse the flag to determine the cost function decision with optimal rate-distortion performance.
[0177] In one example, two cost functions (M = 2) can be selected and tested to refine each candidate in the merging list. These two cost functions can be SAD (cost function index equal to 0, costFuncIdx = 0) and SATD (costFuncIdx = 1). The final decision regarding the cost function index (costFuncIdx = 0 or 1) can be signaled to the bitstream (e.g., by the video encoder 200).
[0178] In another example, different cost functions can be selected and signaled concurrently at different stages of decoding. For example, before candidate reordering (e.g., ARMC TM), cost functions A and B can be selected to refine the candidates, and the cost function index can be signaled, for example, by the video encoder 200. After candidate reordering, cost functions C and D can be selected to refine the candidates, and the cost function index can be signaled, for example, by the video encoder 200. In these examples, cost function A can be one of SAD, SATD, MR-SAD, MR-SATD, MS-SAD, MS-SATD, or any other cost function.
[0179] In another example, cost function selection using signaling, along with any techniques described in this disclosure, can be combined and applied in combination. In one example, during the multi-pass decoder-side motion vector refinement search process, the PU-level search uses SAD or SATD as the cost function, and the cost function index (0 or 1) is signaled in the bit stream. Sub-PU-level refinement is performed based on the merge index using SATD or MR-SATD, as described above in the discussion of cost function selection based on the merge index.
[0180] Figure 13AThis is a flowchart illustrating an example of adaptive cost function selection according to one or more aspects of this disclosure. Video decoder 300 may determine that an inter-frame mode is used to decode the current block of video data (1300). For example, video encoder 200 may determine that the optimal (e.g., most accurate and / or most efficient) encoding mode for the current block is an inter-frame mode. Video encoder 200 may signal in the bitstream the encoded data representing the current block, and a syntax element whose value indicates the inter-frame mode used to encode the current block. Video decoder 300 may obtain the syntax element in the bitstream, whose value indicates the current block being encoded using the inter-frame mode. Video decoder 300 may parse the syntax element to determine its value, and thereby determine that the inter-frame mode indicated by the syntax element should be used to decode the current block.
[0181] The video decoder 300 can determine the value (1302) of the index of a prediction candidate in the candidate list. For example, the video encoder 200 can signal the index of the prediction candidate in the candidate list in the bitstream to indicate to the video decoder 300 which prediction candidate should be used to predict the current block. The video decoder 300 can then parse the index to determine the value of that index.
[0182] The video decoder 300 can determine a prediction candidate and a first cost function among multiple cost functions based on the value of an index (1304). For example, the index can indicate both a prediction candidate in the candidate list and a specific cost function among multiple cost functions. By parsing the index, the video decoder 300 can thereby determine both the prediction candidate and the first cost function for decoding the current block. Thus, a specific cost function can be associated with the value of the index.
[0183] The video decoder 300 may decode the current block based on prediction candidates and a first cost function (1306). For example, the video decoder 300 may apply the first cost function to refine the motion vectors associated with the prediction candidates and / or reorder the motion vectors in the motion vector predictor list. The video decoder 300 may use one or more motion vectors from the motion vectors to predict the current block.
[0184] For example, as part of decoding the current block based on prediction candidates and a first cost function, the video decoder 300 may apply the cost function between samples of different blocks identified based on motion vectors associated with prediction candidates to determine the total difference between the different blocks and use the total difference to refine the motion vectors associated with prediction candidates and / or reorder the motion vectors in the motion vector predictor list.
[0185] In some examples, the first cost function is determined based on the parity of the index value, choosing between a first cost function and a second cost function. If the index value is odd, the first cost function is selected, and if the index value is even, the second cost function is selected. For example, the index value is either odd or even, where odd indicates the first cost function and even indicates the second cost function.
[0186] In some examples, as part of decoding the current block, the video decoder 300 may refine at least one motion vector associated with a prediction candidate based on a first cost function. In some examples, as part of decoding the current block, the video decoder 300 may reorder motion vector predictors in the list of motion vector predictors based on the first cost function.
[0187] In some examples, inter-frame modes include regular merge mode, template match merge mode, bilateral match merge mode, geometric partition merge mode, AMVP merge mode, or affine mode. In some examples, the video decoder 300 can be configured to further determine a first cost function based on the type of inter-frame mode. For example, different cost functions can be used for different types of inter-frame modes. For example, a first cost function can be used when the inter-frame mode is regular merge mode, and a second cost function can be used when the inter-frame mode is template match merge mode.
[0188] In some examples, as part of decoding the current block, the video decoder 300 may apply a first cost function to at least one candidate in the candidate list. In some examples, the first cost function includes Sum of Absolute Differences (SAD), Sum of Transformed Absolute Differences (SATD), Sum of Squared Errors (SSE), Weighted SAD, Mean Removal (MR) SAD, MR-SATD, or Mean Scaling SATD. In some examples, the current block includes a block of random access (RA) slices, RA pictures, low-latency B (LDB) slices, LDB pictures, low-latency P (LDP) slices, or LDP pictures.
[0189] In some examples, as part of determining a first cost function, the video decoder 300 may determine multiple subgroups of candidates in a candidate list, each subgroup having a number of candidates equal to the number of cost functions in the multiple cost functions. The video decoder 300 may determine that an index value is associated with a first candidate in one of the multiple subgroups, and the first candidate in each of the multiple subgroups is associated with a first cost function.
[0190] In some examples, as part of determining the first cost function, the video decoder 300 may look up the value of an index in a mapping table that maps the corresponding merge index to a corresponding cost function among multiple cost functions. In some examples, the video decoder 300 may further determine the first cost function based on the block size of the current block. In some examples, the current block includes (or) the current sub-block. For example, the first cost function may be further determined based on a selection between a first cost function and a second cost function according to the block size of the current block; if the block size of the current block is a first size, the first cost function is selected, and if the value of the index is a second size, the second cost function is selected.
[0191] In some examples, the prediction candidate is a first prediction candidate, the candidate list is a first candidate list, the first prediction candidate is located in the first part of the first candidate list, and the current block is a first current block. In some examples, the video decoder 300 may determine to decode a second current block of video data using an inter-frame mode. The video decoder 300 may determine the value of the index of the second prediction candidate in the second candidate list. The video decoder 300 may determine that the second prediction candidate is located in the second part of the second candidate list. The video decoder 300 may determine a second cost function based on the fact that the second prediction candidate is located in the second part of the second candidate list. The video decoder 300 may decode the current block based on the second cost function.
[0192] Figure 13B This is a flowchart illustrating another example of adaptive cost function selection according to one or more aspects of this disclosure. The video encoder 200 may determine how to encode the current block of video data using an inter-frame mode (1310). For example, the video encoder 200 may determine that using an inter-frame mode is the most efficient and / or most accurate way to encode the current block.
[0193] The video encoder 200 can determine the prediction candidates and cost function for the current block (1312). For example, the video encoder 200 can determine the prediction candidates and cost function that will be used to predict the current block.
[0194] The video encoder 200 can signal in the bitstream a single syntax element (1314) that has values indicating both prediction candidates and the cost function. For example, the video encoder 200 can signal an index of the candidate list that indicates both prediction candidates and the cost function.
[0195] The video encoder 200 may encode the current block based on a prediction candidate and a first cost function (1316). For example, as part of decoding the current block, the video encoder 200 may apply the cost function among samples of different blocks identified based on motion vectors associated with the prediction candidate to determine the total difference between the different blocks and use the total difference to refine the motion vectors associated with the prediction candidate and / or reorder the motion vectors in the motion vector predictor list.
[0196] Figure 14 This is a block diagram illustrating an example video encoder 200 that can perform the techniques of this disclosure. Figure 14 This disclosure is provided for illustrative purposes and should not be construed as a limitation on the techniques extensively illustrated and described herein. For illustrative purposes, this disclosure describes the video encoder 200 in accordance with the techniques of VVC and HEVC. However, the techniques of this disclosure can be performed by video encoding devices configured for other video decoding standards and video decoding formats, such as AV1 and subsequent formats of AV1 video decoding.
[0197] exist Figure 14 In the example, 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, mode selection unit 202, residual generation unit 204, transform processing unit 206, quantization unit 208, inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, filter unit 216, DPB 218, and entropy coding unit 220 may be implemented in one or more processors or in processing circuitry. For example, the units of the video encoder 200 may be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video encoder 200 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0198] Video data storage 230 is an example of a storage system capable of storing video data to be encoded by components of video encoder 200. Video encoder 200 can receive data from, for example, video source 104 (…). Figure 1The video data memory 230 receives video data stored in the video data memory 230. The DPB 218 is an example of a memory system that can act as a reference picture memory, storing reference video data for use when the video encoder 200 predicts subsequent video data. The video data memory 230 and DPB 218 can each be formed from any of one or more memory devices or memory cells, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM)), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. The video data memory 230 and DPB 218 can be provided by the same memory device or separate memory devices. In various examples, the video data memory 230 can be on-chip (as illustrated) with other components of the video encoder 200, or off-chip relative to those components.
[0199] In this disclosure, references to video data memory 230 should not be construed as limited to memory inside video encoder 200 (unless specifically described) or memory outside video encoder 200 (unless specifically described). Rather, references to video data memory 230 should be understood as a reference memory that stores video data received by video encoder 200 for encoding (e.g., video data for the current block to be encoded). Figure 1 The memory 106 can also provide temporary storage for the outputs from various units of the video encoder 200.
[0200] Examples Figure 14 Various units help understand the operations performed by the video encoder 200. Units can be implemented as fixed-function circuits, programmable circuits, or combinations thereof. Fixed-function circuits are circuits that provide specific functionality and are pre-defined for the operations that can be performed. Programmable circuits are circuits that can be programmed to perform various tasks and provide flexible functionality for the operations that can be performed. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is generally immutable. In some examples, one or more units in the unit may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units in the unit may be integrated circuits.
[0201] The video encoder 200 may include an arithmetic logic unit (ALU), an essential function unit (EFU), digital circuitry, analog circuitry, and / or a programmable core, all formed by programmable circuitry. In an example where the operation of the video encoder 200 is performed using software executed by programmable circuitry, memory 106 ( Figure 1 The video encoder 200 may store instructions (e.g., target code) of the software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.
[0202] The video data storage unit 230 is configured to store received video data. The video encoder 200 can retrieve images of the video data from the video data storage unit 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data storage unit 230 can be the raw video data to be encoded.
[0203] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra-frame prediction unit 226. The mode selection unit 202 may include additional functional units for performing video prediction based on other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra-frame block copying 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.
[0204] Mode selection unit 202 typically coordinates multiple coding channels to test combinations of coding parameters and the resulting rate-distortion values for such combinations. Coding parameters may include the CTU-CU partitioning, the prediction mode for the CU, the transformation type of the residual data for the CU, the quantization parameters of the residual data for the CU, etc. Mode selection unit 202 can ultimately select a combination of coding parameters that has a better rate-distortion value compared to other tested combinations.
[0205] The video encoder 200 can divide an image retrieved from the video data storage 230 into a series of CTUs and encapsulate one or more CTUs within a slice. The mode selection unit 202 can divide the image's CTUs according to the tree structure described above (such as an MTT structure, QTBT structure, superblock structure, or the quadtree structure described above). As described above, the video encoder 200 can form one or more CUs by dividing the CTUs according to the tree structure. Such CUs are also commonly referred to as "video blocks" or "blocks".
[0206] Generally, 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 prediction blocks for the current block (e.g., the current CU, or, in HEVC, the overlapping portion of PU and TU). To perform inter-frame prediction for the current block, motion estimation unit 222 may perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously decoded pictures stored in DPB 218). Specifically, motion estimation unit 222 may calculate values representing the similarity between a potential reference block and the current block, for example, based on sum of absolute differences (SAD), sum of squared errors (SSE), mean absolute difference (MAD), mean squared error (MSD), etc. Motion estimation unit 222 may typically perform these calculations using sample-by-sample differences between the current block and the reference blocks under consideration. Motion estimation unit 222 may identify reference blocks with the lowest values produced by these calculations to indicate the reference block that best matches the current block.
[0207] Motion estimation unit 222 can generate one or more motion vectors (MVs) that define the location of a reference block in a reference image relative to the location of the current block in the current image. Motion estimation unit 222 can then provide the motion vectors to motion compensation unit 224. For example, for unidirectional inter-frame prediction, motion estimation unit 222 can provide a single motion vector, while for bidirectional inter-frame prediction, motion estimation unit 222 can provide two motion vectors. Motion compensation unit 224 can then use the motion vectors to generate a prediction block. For example, motion compensation unit 224 can use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample accuracy, motion compensation unit 224 can interpolate the prediction block according to one or more interpolation filters. Furthermore, for bidirectional inter-frame prediction, motion compensation unit 224 can retrieve data for two reference blocks identified by corresponding motion vectors and combine the retrieved data, for example, by per-sample averaging or weighted averaging.
[0208] When operating according to the AV1 video decoding format, the motion estimation unit 222 and the motion compensation unit 224 can be configured to encode the decoded blocks of video data (e.g., both luma and chroma decoded blocks) using translational motion compensation, affine motion compensation, overlap block motion compensation (OBMC), and / or composite inter-intra-frame prediction.
[0209] As another example, for intra-prediction or intra-prediction decoding, intra-prediction unit 226 may generate a prediction block from samples adjacent to the current block. For example, for directional mode, intra-prediction unit 226 may typically mathematically combine the values of adjacent samples and fill these calculated values across the current block in a defined direction to produce a prediction block. As another example, for DC mode, intra-prediction unit 226 may calculate the average of the adjacent samples of the current block and generate a prediction block to include the resulting average for each sample of the prediction block.
[0210] When operating according to the AV1 video decoding format, the intra-frame prediction unit 226 can be configured to encode decoded blocks of video data (e.g., both luma and chroma decoded blocks) using directional intra-frame prediction, non-directional intra-frame prediction, recursive filter intra-frame prediction, luma-chroma (CFL) prediction, intra-block copying (IBC), and / or palette modes. The mode selection unit 202 may include additional functional units for performing video prediction based on other prediction modes.
[0211] Mode selection unit 202 provides a prediction block to residual generation unit 204. Residual generation unit 204 receives an uncoded raw version of the current block from video data memory 230 and a prediction block from mode selection unit 202. Residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines the residual block for the current block. In some examples, residual generation unit 204 may also determine the differences between sample values in the residual block to generate the residual block using residual differential pulse decoding modulation (RDPCM). In some examples, residual generation unit 204 may be formed using one or more subtractor circuits performing binary subtraction.
[0212] In the example where mode selection unit 202 divides a CU into PUs, each PU can be associated with a luma prediction unit and a corresponding chroma prediction unit. Video encoder 200 and video decoder 300 can support PUs of various sizes. As noted above, the size of a CU can refer to the size of the luma decoding block of the CU, while the size of a PU can refer to the size of the luma prediction unit of the PU. Assuming a particular CU size is 2Nx2N, video encoder 200 can support PU sizes of 2Nx2N or NxN for intra-frame prediction, and symmetric PU sizes of 2Nx2N, 2NxN, Nx2N, NxN, or similar for inter-frame prediction. Video encoder 200 and video decoder 300 can also support asymmetric partitioning for PU sizes of 2NxnU, 2NxnD, nLx2N, and nRx2N for inter-frame prediction.
[0213] In an example where mode selection unit 202 does not further divide the CU into PUs, each CU can be associated with a luminance decoding block and a corresponding chrominance decoding block. As mentioned above, the size of the CU can refer to the size of the luminance decoding block of the CU. The video encoder 200 and the video decoder 300 can support CU sizes of 2Nx2N, 2NxN, or Nx2N.
[0214] For other video decoding techniques, such as intra-block copy mode decoding, affine mode decoding, and linear model (LM) mode decoding, as some examples, mode selection unit 202 generates a prediction block for the current block being encoded via a corresponding unit associated with the decoding technique. In some examples (such as palette mode decoding), mode selection unit 202 may not generate a prediction block, but instead generate syntax elements indicating how the block is reconstructed based on a selected palette. In such modes, mode selection unit 202 may provide these syntax elements to entropy coding unit 220 for encoding.
[0215] As described above, the residual generation unit 204 receives video data for the current block and the corresponding prediction block. Then, the residual generation unit 204 generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.
[0216] Transform processing unit 206 applies one or more transformations 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 transformations to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a discrete cosine transform (DCT), direction transform, Karhunen-Loeve transform (KLT), or conceptually similar transformations to the residual block. In some examples, transform processing unit 206 may perform multiple transformations on the residual block, such as primary and secondary transformations (e.g., rotation transformations). In some examples, transform processing unit 206 does not apply any transformations to the residual block.
[0217] When operating according to AV1, transform processing unit 206 may apply one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). Transform processing unit 206 may apply various transforms to the residual block to form the transform coefficient block. For example, transform processing unit 206 may apply a combination of horizontal / vertical transforms, which may include the Discrete Cosine Transform (DCT), the Asymmetric Discrete Sine Transform (ADST), the Reversed ADST (e.g., ADST in reverse order), and the Identity Transform (IDTX). When using the Identity Transform, the transform is skipped in either the vertical or horizontal direction. In some examples, transform processing may be skipped entirely.
[0218] Quantization unit 208 quantizes the transform coefficients in a transform coefficient block to produce a quantized transform coefficient block. Quantization unit 208 quantizes the transform coefficients of the transform coefficient block according to the quantization parameter (QP) value associated with the current block. Video encoder 200 (e.g., via mode selection unit 202) can adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may cause information loss, and therefore, the quantized transform coefficients may have lower accuracy compared to the original transform coefficients produced by transform processing unit 206.
[0219] The inverse quantization unit 210 and the inverse transform processing unit 212 can apply inverse quantization and inverse transform, respectively, to the quantized transform coefficient block to reconstruct the residual block based on the transform coefficient block. The reconstruction unit 214 can generate a reconstructed block corresponding to the current block (although potentially with some degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 can add samples of the reconstructed residual block to corresponding samples of the prediction block generated by the mode selection unit 202 to generate the reconstructed block.
[0220] Filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce block artifacts along the edges of the CU. In some examples, the operation of filter unit 216 may be skipped.
[0221] When operating according to AV1, filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce block artifacts along the edges of the CU. In other examples, filter unit 216 may apply a constrained direction enhancement filter (CDEF) after deblocking and may include the application of a non-separable, nonlinear, low-pass directional filter based on the estimated edge direction. Filter unit 216 may also include a loop recovery filter applied after CDEF and may include a separable symmetric normalized Wiener filter or a dual-guided filter.
[0222] The video encoder 200 stores reconstructed blocks in the DPB 218. For example, in an example where the filter unit 216 is not operated, the reconstruction unit 214 may store reconstructed blocks in the DPB 218. In an example where the filter unit 216 is operated, the filter unit 216 may store filtered reconstructed blocks in the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 may retrieve reference images formed by the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter-frame prediction for blocks of subsequent encoded images. Additionally, the intra-frame prediction unit 226 may use the reconstructed blocks of the current image in the DPB 218 to perform intra-frame prediction for other blocks in the current image.
[0223] Generally, entropy coding unit 220 can entropy code syntax elements received from other functional components of video encoder 200. For example, entropy coding unit 220 can entropy code quantized transform coefficient blocks from quantization unit 208. As another example, entropy coding unit 220 can entropy code predictive syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from mode selection unit 202. Entropy coding unit 220 can perform one or more entropy coding operations on syntax elements (another example of video data) to generate entropy-coded data. For example, entropy coding unit 220 can perform context-adaptive variable-length decoding (CAVLC), CABAC, variable-to-variable (V2V) length decoding, syntax-based context-adaptive binary arithmetic decoding (SBAC), probability interval partitioning entropy (PIPE) decoding, exponential Golomb coding, or another type of entropy coding operation on the data. In some examples, entropy coding unit 220 can operate in a bypass mode where syntax elements are not entropy-coded.
[0224] The video encoder 200 can output a bitstream that includes the entropy coding syntax elements required to reconstruct slices or blocks of images. Specifically, the entropy coding unit 220 can output a bitstream.
[0225] According to AV1, entropy coding unit 220 can be configured as a symbol-to-symbol adaptive multi-symbol arithmetic decoder. The syntax elements in AV1 consist of an N-element alphabet, and the context (e.g., a probability model) consists of a set of N probabilities. Entropy coding unit 220 can store the probabilities as an n-bit (e.g., 15-bit) cumulative distribution function (CDF). Entropy coding unit 220 can perform recursive scaling using an update factor based on the alphabet size to update the context.
[0226] The operations described above are relative to blocks. This description should be understood as operations applied to luma decoding blocks and / or chroma decoding blocks. As described above, in some examples, the luma decoding block and chroma decoding block are the luma and chroma components of the CU. In some examples, the luma decoding block and chroma decoding block are the luma and chroma components of the PU.
[0227] In some examples, it is not necessary to repeat the operations performed relative to the luma decoder for the chroma decoder block. As an example, the operations for identifying the motion vector (MV) and reference image of the luma decoder block do not need to repeat the MV and reference image used to identify the chroma block. Instead, the MV used for the luma decoder block can be scaled to determine the MV used for the chroma block, and the reference image can be the same. As another example, the intra-frame prediction process can be the same for both the luma and chroma decoders.
[0228] Video encoder 200 represents an example of a device configured to encode video data, the device including: a memory configured to store video data; and one or more processing units implemented in circuitry and configured to: adaptively determine a cost function; and encode the video data based on the determined cost function.
[0229] Figure 15 This is a block diagram illustrating an example video decoder 300 that can perform the techniques of this disclosure. Figure 15 This disclosure is provided for illustrative purposes and not for limiting the techniques extensively illustrated and described herein. For illustrative purposes, the video decoder 300 is described in accordance with VVC and HEVC techniques. However, the techniques of this disclosure can be implemented by video decoding devices configured for other video decoding standards.
[0230] exist Figure 15 In the example, the video decoder 300 includes a decoded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a DPB 314. Any or all of the CPB memory 320, entropy decoding unit 302, prediction processing unit 304, inverse quantization unit 306, inverse transform processing unit 308, reconstruction unit 310, filter unit 312, and DPB 314 can be implemented in one or more processors or in processing circuitry. For example, the units of the video decoder 300 can be implemented as one or more circuit or logic elements as part of hardware circuitry, or as part of a processor, ASIC, or FPGA. Furthermore, the video decoder 300 may include additional or alternative processors or processing circuitry to perform these and other functions.
[0231] The prediction processing unit 304 includes a motion compensation unit 316 and an intra-prediction unit 318. The prediction processing unit 304 may include additional units that perform predictions based on other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra-block copying unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.
[0232] When operating according to AV1, motion compensation unit 316 can be configured to decode video data blocks (e.g., both luma and chroma blocks) using translational motion compensation, affine motion compensation, OBMC, and / or composite inter-intra-frame prediction, as described above. Intra-frame prediction unit 318 can be configured to decode video data blocks (e.g., both luma and chroma blocks) using directional intra-frame prediction, non-directional intra-frame prediction, recursive filter intra-frame prediction, CFL, IBC, and / or palette mode, as described above.
[0233] CPB memory 320 is an example of a memory system capable of storing video data (such as encoded video bitstreams) to be decoded by components of video decoder 300. For example, it can be stored from computer-readable medium 110 ( Figure 1 The video data stored in the CPB memory 320 is obtained. The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from the encoded video bitstream. Furthermore, the CPB memory 320 may store video data other than the syntax elements of the decoded picture, such as temporary data representing the output from various units of the video decoder 300. The DPB 314 is an example of a memory system that typically stores decoded pictures, which the video decoder 300 may output, and / or uses as reference video data when decoding subsequent data or pictures from the encoded video bitstream. The CPB memory 320 and the DPB 314 may each be formed from any of various memory devices or memory cells, 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.
[0234] Additionally or alternatively, in some examples, the video decoder 300 may be from the memory 120 ( Figure 1The decoded video data can be retrieved from the memory. In other words, memory 120 can utilize CPB memory 320 to store data as discussed above. Similarly, when some or all of the functionality of video decoder 300 is implemented in software to be executed by the processing circuitry of video decoder 300, memory 120 can store instructions to be executed by video decoder 300.
[0235] Examples Figure 15 The various units shown help to understand the operations performed by the video decoder 300. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Similar to... Figure 14 Fixed-function circuits are circuits that provide specific functionality and are pre-defined for the operations they can perform. Programmable circuits are circuits that can be programmed to perform various tasks and provide flexible functionality for the operations they can perform. For example, a programmable circuit can execute software or firmware that causes the programmable circuit to operate in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., to receive or output parameters), but the type of operation performed by a fixed-function circuit is typically immutable. In some examples, one or more units in a cell may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units in a cell may be integrated circuits.
[0236] The video decoder 300 may include an ALU, EFU, digital circuitry, analog circuitry, and / or a programmable core formed by programmable circuitry. In an example where the operation of the video decoder 300 is performed by software executed on programmable circuitry, on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.
[0237] The entropy decoding unit 302 can receive encoded video data from the CPB and perform entropy decoding on the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 can generate decoded video data based on the syntax elements extracted from the bitstream.
[0238] Generally speaking, the video decoder 300 reconstructs the image block by block. The video decoder 300 can perform the reconstruction operation on each block individually (where the block currently being reconstructed (i.e., decoded) can be referred to as the "current block").
[0239] Entropy decoding unit 302 can entropy decode the syntax elements of the quantized transform coefficients defining the quantized transform coefficient block, as well as transform information (such as quantization parameters (QP) and / or transform mode indications). Inverse quantization unit 306 can use the QP associated with the quantized transform coefficient block to determine the degree of quantization, and similarly, determine the degree of inverse quantization to be applied by inverse quantization unit 306. Inverse quantization unit 306 can, for example, perform a bit-by-bit left shift operation to inverse quantize the quantized transform coefficients. Inverse quantization unit 306 can thereby form a transform coefficient block including the transform coefficients.
[0240] 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 rotation transform, an inverse direction transform, or another inverse transform to the transform coefficient block.
[0241] Furthermore, the prediction processing unit 304 generates a prediction block based on the prediction information syntax elements entropy decoded by the entropy decoding unit 302. For example, if the prediction information syntax elements indicate that the current block is an inter-frame prediction, the motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax elements may indicate the reference picture from which the reference block is to be retrieved in the DPB 314, and a motion vector identifying the position of the reference block in the reference picture relative to the position of the current block in the current picture. The motion compensation unit 316 may generally follow the same procedure as relative to the motion compensation unit 224 ( Figure 14 The method described is essentially the same as the method used to perform the inter-frame prediction process.
[0242] As another example, when the prediction information syntax element indicates that the current block is intra-predictive, intra-predictive unit 318 may generate a prediction block according to the intra-predictive mode indicated by the prediction information syntax element. Similarly, intra-predictive unit 318 may generally follow the same procedure as relative to intra-predictive unit 226 ( Figure 14 The intra-prediction process is performed in a manner substantially similar to that described above. The intra-prediction unit 318 can retrieve data of neighboring samples of the current block from the DPB 314.
[0243] Reconstruction unit 310 can use the prediction block and the residual block to reconstruct the current block. For example, reconstruction unit 310 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the current block.
[0244] Filter unit 312 can perform one or more filtering operations on the reconstructed block. For example, filter unit 312 can perform a deblocking operation to reduce block artifacts along the edges of the reconstructed block. The operation of filter unit 312 is not necessarily performed in all examples.
[0245] The video decoder 300 can store reconstructed blocks in the DPB 314. For example, in an example where the operation of the filter unit 312 is not performed, the reconstruction unit 310 can store the reconstructed blocks in the DPB 314. In an example where the operation of the filter unit 312 is performed, the filter unit 312 can store the filtered reconstructed blocks in the DPB 314. As discussed above, the DPB 314 can provide reference information (such as samples of the current image for intra-frame prediction and samples of previously decoded images for subsequent motion compensation) to the prediction processing unit 304. Furthermore, the video decoder 300 can output decoded images (e.g., decoded video) from the DPB 314 for use in applications such as... Figure 1 The subsequent presentation on display devices such as display device 118.
[0246] In this way, video decoder 300 represents an example of a video decoding device, which includes: a memory configured to store video data; and one or more processing units implemented in a circuit and configured to: adaptively determine a cost function; and decode the video data based on the determined cost function.
[0247] The video decoder 300 also represents an example of a video decoding device, which includes: a memory configured to store video data; and one or more processing units implemented in a circuit and configured to: determine a current block of video data to be decoded using an inter-frame mode; determine the value of an index of a prediction candidate in a candidate list; determine a prediction candidate and a first cost function among a plurality of cost functions based on the index value; and decode the current block based on the prediction candidate and the first cost function.
[0248] Figure 16 This is a flowchart illustrating an example method for encoding the current block according to the technology of this disclosure. The current block may be or may include the current CU. Although this relates to video encoder 200 ( Figure 1 and Figure 14 This is a description, but it should be understood that other devices can be configured to perform the same actions as described above. Figure 16 Similar to the method.
[0249] In this example, the video encoder 200 initially predicts the current block (400). For example, the video encoder 200 may form a prediction block for the current block. The video encoder 200 may then compute a residual block for the current block (402). To compute the residual block, the video encoder 200 may compute the difference between the unencoded original block for the current block and the prediction block. The video encoder 200 may then transform the residual block and quantize the transform coefficients of the residual block (404). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (406). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (408). For example, the video encoder 200 may use CAVLC or CABAC to encode the transform coefficients. The video encoder 200 may then output the entropy-encoded data of the block (410).
[0250] Figure 17 This is a flowchart illustrating an example method for decoding a current block of video data according to the technology of this disclosure. The current block may be or may include the current CU. Although this relates to video decoder 300 ( Figure 1 and Figure 15 This description is provided, but it should be understood that other devices can be configured to perform similar actions. Figure 17 Similar to the method.
[0251] The video decoder 300 may receive entropy-coded data of the current block, such as entropy-coded prediction information and entropy-coded data for the transform coefficients of the residual block corresponding to the current block (500). The video decoder 300 may entropy decode the entropy-coded data to determine the prediction information for the current block and reproduce the transform coefficients of the residual block (502). The video decoder 300 may predict the current block, for example, using an intra-frame prediction mode or inter-frame prediction mode indicated by the prediction information of the current block (504), to compute a prediction block for the current block. The video decoder 300 may then inverse scan the reproduced transform coefficients (506) to create a block of quantized transform coefficients. The video decoder 300 may then inverse quantize the transform coefficients and apply an inverse transform to the transform coefficients to produce a residual block (508). The video decoder 300 may finally decode the current block by combining the prediction block and the residual block (510).
[0252] The following numbered clauses illustrate one or more aspects of the devices and technologies described in this disclosure.
[0253] Aspect 1A. A method for decoding video data, the method comprising: adaptively determining a cost function; and decoding the video data based on the determined cost function.
[0254] Aspect 2A. The method according to aspect 1A, wherein decoding the video data includes one of: refining at least one motion vector based on a determined cost function or reordering the motion vector predictor based on a determined cost function.
[0255] Aspect 3A. The method according to aspect 1A or aspect 2A, wherein the determined cost function includes sum of absolute differences (SAD), transformed sum of absolute differences (SATD), sum of squared errors (SSE), weighted SAD, mean removal (MR) SAD, MR-SATD, or mean scaling SATD.
[0256] Aspect 4A. The method according to any one of Aspects 1A to 3A, wherein decoding the video data includes using an inter-frame prediction mode to decode the video data.
[0257] Aspect 5A. The method according to any one of Aspects 1A to 4A, wherein the video data includes random access (RA) slices, RA pictures, low latency B (LDB) slices, LDB pictures, low latency P (LDP) slices, or LDP pictures.
[0258] Aspect 6A. The method according to any one of Aspects 1A to 5A, wherein adaptively determining the cost function comprises determining the cost function based on candidate indices.
[0259] Aspect 7A. The method according to aspect 6A, wherein decoding the video data includes applying the determined cost function to at least one candidate in the candidate list.
[0260] Aspect 8A. The method according to any one of Aspects 6A to 7A, wherein the candidate index is odd or even, wherein determining the cost function based on the candidate index includes determining whether the candidate index is odd or even, the odd number indicating a first cost function and the even number indicating a second cost function.
[0261] Aspect 9A. The method according to any one of Aspects 6A to 7A, wherein adaptively determining the cost function comprises: determining a plurality of subgroups of candidates in a candidate list; and determining the cost function based on the plurality of subgroups.
[0262] Aspect 10A. The method according to any one of Aspects 6A to 7A, wherein the cost function is adaptively determined based on a mapping table that maps corresponding merge indices to corresponding cost functions.
[0263] Aspect 11A. The method according to any one of Aspects 6A to 7A, wherein adaptively determining the cost function comprises: applying a plurality of cost functions to a first candidate; appending candidates obtained by applying the plurality of cost functions to a candidate list to generate an additional candidate list; and sorting the additional candidate list.
[0264] Aspect 12A. The method according to any one of Aspects 1A to 5A, wherein adaptively determining the cost function comprises adaptively determining the cost function based on the block size.
[0265] Aspect 13A. The method according to aspect 12A, wherein decoding the video data includes applying a determined cost function during motion vector predictor reordering and during motion vector refinement.
[0266] Aspect 14A. The method according to any one of Aspects 1A to 5A, wherein adaptively determining the cost function comprises adaptively determining the cost function based on a prediction pattern.
[0267] Aspect 15A. The method according to aspect 14A, wherein decoding the video data includes applying a determined cost function during motion vector predictor reordering and during motion vector refinement.
[0268] Aspect 16A. The method according to any one of Aspects 1A to 5A, wherein adaptively determining the cost function includes a flag in the parsed bit stream indicating the determined cost function.
[0269] Aspect 17A. The method according to any one of Aspects 1A to 5A, wherein adaptively determining the cost function comprises determining a cost function having optimal rate-distortion performance from a set of cost functions.
[0270] Aspect 18A. The method according to any one of aspects 1A to 16A, wherein decoding includes decoding.
[0271] Aspect 19A. The method according to any one of aspects 1 to 15A or 17A, wherein decoding includes encoding.
[0272] Aspect 20A. An apparatus for decoding video data, the apparatus comprising one or more components for performing the method according to any one of aspects 1A to 19A.
[0273] Aspect 21A. The device according to aspect 20A, wherein the one or more components include one or more processors implemented in a circuit.
[0274] Aspect 22A. The device according to any one of aspects 20A or 21A, the device further includes a memory for storing the video data.
[0275] Aspect 23A. The device according to any one of aspects 20A to 22A, the device further comprising a display configured to display decoded video data.
[0276] Aspect 24A. The device according to any one of aspects 20A to 23A, wherein the device includes one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.
[0277] Aspect 25A. The device according to any one of aspects 20A to 24A, wherein the device includes a video decoder.
[0278] Aspect 26A. The device according to any one of aspects 20A to 25A, wherein the device includes a video encoder.
[0279] Aspect 27A. A computer-readable storage medium having instructions stored thereon, which, when executed, cause one or more processors to perform the method according to any one of aspects 1A to 19A.
[0280] Aspect 1B. A method for decoding video data, the method comprising: determining to decode a current block of the video data using an inter-frame mode; determining a value of an index of a prediction candidate in a candidate list; determining the prediction candidate and a first cost function among a plurality of cost functions based on the value of the index; and decoding the current block based on the prediction candidate and the first cost function.
[0281] Aspect 2B. The method according to aspect 1B, wherein the first cost function is determined based on the parity of the value of the index between the first cost function and the second cost function, wherein if the value of the index is odd, the first cost function is selected, and if the value of the index is even, the second cost function is selected.
[0282] Aspect 3B. The method according to aspect 1B or aspect 2B, wherein decoding the current block includes refining at least one motion vector associated with the prediction candidate based on the first cost function.
[0283] Aspect 4B. The method according to any one of Aspects 1B to 3B, wherein decoding the current block includes reordering the motion vector predictors in the motion vector predictor list based on the first cost function.
[0284] Aspect 5B. The method according to any one of Aspects 1B to 4B, wherein the inter-frame mode includes a regular merging mode, a template matching merging mode, a bilateral matching merging mode, a geometric partitioning merging mode, an AMVP merging mode, or an affine mode.
[0285] Aspect 6B. The method according to aspect 5B, wherein determining the first cost function is further based on the type of the inter-frame mode.
[0286] Aspect 7B. The method according to any one of Aspects 1B to 6B, wherein decoding the current block includes applying the first cost function to at least one candidate in the candidate list.
[0287] Aspect 8B. The method according to any one of Aspects 1B to 7B, wherein the first cost function comprises Sum of Absolute Differences (SAD), Sum of Transformed Absolute Differences (SATD), Sum of Squared Errors (SSE), Weighted SAD, Mean Removal (MR) SAD, MR-SATD, or Mean Scaling SATD.
[0288] Aspect 9B. The method according to any one of Aspects 1B to 8B, wherein the current block comprises a block of random access (RA) slices, RA pictures, low latency B (LDB) slices, LDB pictures, low latency P (LDP) slices, or LDP pictures.
[0289] Aspect 10B. The method according to any one of Aspects 1B to 9B, wherein determining the first cost function comprises: determining a plurality of subgroups of candidates in the candidate list, each of the plurality of subgroups having a number of candidates equal to the number of cost functions in the plurality of cost functions; and determining that the value of the index is associated with a first candidate in one of the plurality of subgroups, the first candidate in each of the plurality of subgroups being associated with the first cost function.
[0290] Aspect 11B. The method according to aspect 1B, wherein determining the first cost function includes looking up the value of the index in a mapping table, the mapping table mapping the corresponding merged index to the corresponding cost function among the plurality of cost functions.
[0291] Aspect 12B. The method according to any one of Aspects 1B to 11B, wherein the first cost function is further determined based on a selection between the first cost function and a second cost function according to the block size of the current block, wherein the first cost function is selected if the block size of the current block is a first size, and the second cost function is selected if the value of the index is a second size.
[0292] Aspect 13B. The method according to any one of aspects 1B to 12B, wherein the current block includes the current sub-block.
[0293] Aspect 14B. The method according to any one of Aspects 1B to 13B, wherein the prediction candidate is a first prediction candidate, wherein the candidate list is a first candidate list, wherein the first prediction candidate is located in a first portion of the first candidate list, and wherein the current block is a first current block, the method further comprising: determining a second current block of video data to be decoded using the inter-frame mode; determining a value of an index of a second prediction candidate in the second candidate list; determining that the second prediction candidate is located in a second portion of the second candidate list; determining a second cost function based on the second prediction candidate being located in the second portion of the second candidate list; and decoding the current block based on the second cost function.
[0294] Aspect 15B. An apparatus for decoding video data, the apparatus comprising: one or more memories configured to store the video data; and one or more processors implemented in circuitry and operatively coupled to the one or more memories, the one or more processors being configured to: determine a current block of the video data to be decoded using an inter-frame mode; determine a value of an index of a prediction candidate in a candidate list; determine the prediction candidate and a first cost function among a plurality of cost functions based on the value of the index; and decode the current block based on the prediction candidate and the first cost function.
[0295] Aspect 16B. The device according to aspect 15B, wherein the first cost function is determined based on the parity of the value of the index between the first cost function and the second cost function, wherein if the value of the index is odd, the first cost function is selected, and if the value of the index is even, the second cost function is selected.
[0296] Aspect 17B. The apparatus according to aspect 15B or aspect 16B, wherein, as part of decoding the current block, the one or more processors are configured to refine at least one motion vector associated with the prediction candidate based on the first cost function.
[0297] Aspect 18B. The apparatus according to any one of Aspects 15B to 17B, wherein, as part of decoding the current block, the one or more processors are configured to reorder motion vector predictors in the motion vector predictor list based on the first cost function.
[0298] Aspect 19B. The apparatus according to any one of Aspects 15B to 18B, wherein the inter-frame mode includes a regular merging mode, a template matching merging mode, a bilateral matching merging mode, a geometric partitioning merging mode, an AMVP merging mode, or an affine mode.
[0299] Aspect 20B. The apparatus according to aspect 19B, wherein one or more processors are configured to further determine the first cost function based on the type of the inter-frame mode.
[0300] Aspect 21B. The apparatus according to any one of Aspects 15B to 20B, wherein, as part of decoding the current block, the one or more processors are configured to apply the first cost function to at least one candidate in the candidate list.
[0301] Aspect 22B. The device according to any one of Aspects 15B to 21B, wherein the first cost function comprises Sum of Absolute Differences (SAD), Sum of Transformed Absolute Differences (SATD), Sum of Squared Errors (SSE), Weighted SAD, Mean Removal (MR) SAD, MR-SATD, or Mean Scaling SATD.
[0302] Aspect 23B. The device according to any one of Aspects 15B to 22B, wherein the current block comprises a block of random access (RA) slices, RA pictures, low latency B (LDB) slices, LDB pictures, low latency P (LDP) slices or LDP pictures.
[0303] Aspect 24B. The apparatus according to any one of Aspects 15B to 23B, wherein, as part of determining the first cost function, the one or more processors are configured to: determine a plurality of subgroups of candidates in the candidate list, each of the plurality of subgroups having a number of candidates equal to the number of cost functions in the plurality of cost functions; and determine that the value of the index is associated with a first candidate in one of the plurality of subgroups, the first candidate in each of the plurality of subgroups being associated with the first cost function.
[0304] Aspect 25B. The device according to any one of aspects 15B to 24B, wherein, as part of determining the first cost function, the one or more processors are configured to look up the value of the index in a mapping table that maps a corresponding merged index to a corresponding cost function among the plurality of cost functions.
[0305] Aspect 26B. The device according to any one of Aspects 15B to 25B, wherein the first cost function is further determined based on a selection between the first cost function and a second cost function according to the block size of the current block, wherein the first cost function is selected if the block size of the current block is a first size, and the second cost function is selected if the value of the index is a second size.
[0306] Aspect 27B. The device according to any one of aspects 15B to 26B, wherein the current block includes the current sub-block.
[0307] Aspect 28B. The apparatus according to any one of Aspects 15B to 27B, wherein the prediction candidate is a first prediction candidate, wherein the candidate list is a first candidate list, wherein the first prediction candidate is located in a first portion of the first candidate list, wherein the current block is a first current block, and wherein the one or more processors are further configured to: determine a second current block of video data to be decoded using the inter-frame mode; determine the value of the index of a second prediction candidate in the second candidate list; determine that the second prediction candidate is located in a second portion of the second candidate list; determine a second cost function based on the second prediction candidate being located in the second portion of the second candidate list; and decode the current block based on the second cost function.
[0308] Aspect 29B. The device according to any one of aspects 15B to 28B, the device further comprising a display configured to display decoded video data.
[0309] Aspect 30B. A method for encoding video data, the method comprising: determining to encode a current block of the video data using an inter-frame mode; determining a value of an index of a prediction candidate in a candidate list; determining the prediction candidate and a first cost function among a plurality of cost functions based on the value of the index; and encoding the current block according to the prediction candidate and the first cost function.
[0310] Aspect 31B. A computer-readable storage medium storing instructions that, when executed, cause one or more processors to: determine to decode a current block of video data using an inter-frame mode; determine a value of an index of a prediction candidate in a candidate list; determine, based on the value of the index, the prediction candidate and a first cost function among a plurality of cost functions; and decode the current block based on the prediction candidate and the first cost function.
[0311] Aspect 32B. An apparatus for decoding video data, the apparatus comprising: means for determining a current block of the video data to be decoded using an inter-frame mode; means for determining a value of an index of a prediction candidate in a candidate list; means for determining the prediction candidate and a first cost function among a plurality of cost functions based on the value of the index; and means for decoding the current block based on the prediction candidate and the first cost function.
[0312] It should be recognized that, based on the examples, certain actions or events of any technique described herein may be performed in a different sequence, and may be added, combined, or omitted entirely (e.g., not all actions or events described are necessary for implementing the technique). Furthermore, in some examples, actions or events may be performed concurrently (e.g., through multithreading, interrupt handling, or multiple processors) rather than sequentially.
[0313] In one or more examples, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored as one or more instructions or code on a computer-readable medium or transmitted via a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium (which corresponds to a tangible medium such as a data storage medium) or a communication medium, including, for example, any medium that facilitates the transfer of a computer program from one place to another according to a communication protocol. In this way, a computer-readable medium may generally correspond to (1) a non-transitory tangible computer-readable storage medium, 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. Computer program products may include computer-readable media.
[0314] By way of example, and not limitation, such computer-readable storage media may include one or more of RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Furthermore, any connection is appropriately 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 technology (such as infrared, radio, and microwave), then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technology (such as infrared, radio, and microwave) is included in the definition of medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but instead refer to non-transient tangible storage media. As used herein, disks and optical discs include compact optical discs (CDs), laser optical discs, optical discs, digital versatile optical discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs use lasers to reproduce data optically. Combinations of these should also be included within the scope of computer-readable media.
[0315] Instructions can be executed by one or more processors, such as one or more DSPs, general-purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuits. Therefore, the terms "processor" and "processing circuit" as used herein can refer to any of the foregoing structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Furthermore, these techniques can be fully implemented in one or more circuit or logic elements.
[0316] The techniques disclosed herein can be implemented in a wide variety of devices or apparatuses, including wireless mobile phones, integrated circuits (ICs), or a set of ICs (e.g., chipsets). Various components, modules, or units are described in this disclosure to emphasize functional aspects of a device configured to perform the disclosed techniques, but implementation by different hardware units is not necessarily required. Rather, as described above, various units may be combined in a codec hardware unit, or various units may be provided by a collection of interoperable hardware units (including one or more processors as described above) combined with appropriate software and / or firmware.
[0317] Various examples have been described. These and other examples are within the scope of the following claims.
Claims
1. A method for decoding video data, the method comprising: Determine to use inter-frame mode to decode the current block of the video data; Determine the index value of the predicted candidate in the candidate list; The prediction candidate and a first cost function among a plurality of cost functions are determined based on the value of the index; as well as The current block is decoded based on the predicted candidates and the first cost function.
2. The method according to claim 1, wherein, The first cost function is determined based on the parity of the value of the index between the first cost function and the second cost function. If the value of the index is odd, the first cost function is selected, and if the value of the index is even, the second cost function is selected.
3. The method according to claim 1, wherein, Decoding the current block includes refining at least one motion vector associated with the prediction candidate based on the first cost function.
4. The method according to claim 1, wherein, Decoding the current block includes: reordering the motion vector predictors in the motion vector predictor list based on the first cost function.
5. The method according to claim 1, wherein, The inter-frame modes include regular merging mode, template matching merging mode, bilateral matching merging mode, geometric partitioning merging mode, AMVP merging mode, or affine mode.
6. The method according to claim 5, wherein, The first cost function is further determined based on the type of the inter-frame mode.
7. The method according to claim 1, wherein, Decoding the current block includes applying the first cost function to at least one candidate in the candidate list.
8. The method according to claim 1, wherein, The first cost function includes Sum of Absolute Differences (SAD), Sum of Absolute Differences Transformed (SATD), Sum of Squared Errors (SSE), Weighted SAD, Mean Removal (MR) SAD, MR-SATD, or Mean Scaling SATD.
9. The method according to claim 1, wherein, The current block includes blocks of random access (RA) slices, RA images, low latency B (LDB) slices, LDB images, low latency P (LDP) slices, or LDP images.
10. The method according to claim 1, wherein, Determining the first cost function includes: Determine multiple subgroups of candidates in the candidate list, wherein each subgroup has a number of candidates equal to the number of cost functions in the multiple cost functions; and The value of the index is determined to be associated with a first candidate in one of the plurality of subgroups, and the first candidate in each of the plurality of subgroups is associated with the first cost function.
11. The method according to claim 1, wherein, Determining the first cost function includes: looking up the value of the index in a mapping table, wherein the mapping table maps the corresponding merged index to the corresponding cost function among the plurality of cost functions.
12. The method according to claim 1, wherein, The first cost function is further determined based on the selection between the first cost function and the second cost function according to the block size of the current block. If the block size of the current block is a first size, the first cost function is selected, and if the value of the index is a second size, the second cost function is selected.
13. The method according to claim 1, wherein, The current block includes the current sub-block.
14. The method according to claim 1, wherein, The predicted candidate is a first predicted candidate, wherein the candidate list is a first candidate list, wherein the first predicted candidate is located in a first part of the first candidate list, and wherein the current block is a first current block, the method further includes: Determine to use the inter-frame mode to decode the second current block of the video data; Determine the index value of the second predicted candidate in the second candidate list; Determine that the second predicted candidate is located in the second part of the second candidate list; The second cost function is determined based on the fact that the second predicted candidate is located in the second part of the second candidate list; and The current block is decoded based on the second cost function.
15. An apparatus for decoding video data, the apparatus comprising: One or more memories, the one or more memories being configured to store the video data; and One or more processors, implemented in a circuit and operatively coupled to the one or more memories, the one or more processors being configured to: Determine to use inter-frame mode to decode the current block of the video data; Determine the index value of the predicted candidate in the candidate list; The prediction candidate and a first cost function among a plurality of cost functions are determined based on the value of the index; as well as The current block is decoded based on the predicted candidates and the first cost function.
16. The device according to claim 15, wherein, The first cost function is determined based on the parity of the value of the index between the first cost function and the second cost function. If the value of the index is odd, the first cost function is selected, and if the value of the index is even, the second cost function is selected.
17. The device according to claim 15, wherein, As part of decoding the current block, the one or more processors are configured to refine at least one motion vector associated with the prediction candidate based on the first cost function.
18. The device according to claim 15, wherein, As part of decoding the current block, the one or more processors are configured to reorder the motion vector predictors in the motion vector predictor list based on the first cost function.
19. The device according to claim 15, wherein, The inter-frame modes include regular merging mode, template matching merging mode, bilateral matching merging mode, geometric partitioning merging mode, AMVP merging mode, or affine mode.
20. The device according to claim 19, wherein, The one or more processors are configured to further determine the first cost function based on the type of the inter-frame mode.
21. The device according to claim 15, wherein, As part of decoding the current block, the one or more processors are configured to apply the first cost function to at least one candidate in the candidate list.
22. The device according to claim 15, wherein, The first cost function includes Sum of Absolute Differences (SAD), Sum of Absolute Differences Transformed (SATD), Sum of Squared Errors (SSE), Weighted SAD, Mean Removal (MR) SAD, MR-SATD, or Mean Scaling SATD.
23. The device according to claim 15, wherein, The current block includes blocks of random access (RA) slices, RA images, low latency B (LDB) slices, LDB images, low latency P (LDP) slices, or LDP images.
24. The device according to claim 15, wherein, As part of determining the first cost function, the one or more processors are configured to: Determine multiple subgroups of candidates in the candidate list, wherein each subgroup has a number of candidates equal to the number of cost functions in the multiple cost functions; as well as The value of the index is determined to be associated with a first candidate in one of the plurality of subgroups, and the first candidate in each of the plurality of subgroups is associated with the first cost function.
25. The device according to claim 15, wherein, As part of determining the first cost function, the one or more processors are configured to: look up the value of the index in a mapping table that maps the corresponding merged index to the corresponding cost function among the plurality of cost functions.
26. The device according to claim 15, wherein, The first cost function is further determined based on the selection between the first cost function and the second cost function according to the block size of the current block. If the block size of the current block is a first size, the first cost function is selected, and if the value of the index is a second size, the second cost function is selected.
27. The device according to claim 15, wherein, The current block includes the current sub-block.
28. The device according to claim 15, wherein, The predicted candidate is a first predicted candidate, wherein the candidate list is a first candidate list, wherein the first predicted candidate is located in a first portion of the first candidate list, wherein the current block is a first current block, and wherein the one or more processors are further configured to: Determine to use the inter-frame mode to decode the second current block of the video data; Determine the index value of the second predicted candidate in the second candidate list; Determine that the second predicted candidate is located in the second part of the second candidate list; The second cost function is determined based on the fact that the second predicted candidate is located in the second part of the second candidate list; and The current block is decoded based on the second cost function.
29. The device of claim 15, further comprising a display configured to display decoded video data.
30. A method for encoding video data, the method comprising: Determine to use inter-frame mode to encode the current block of the video data; Determine the index value of the predicted candidate in the candidate list; The prediction candidate and a first cost function among a plurality of cost functions are determined based on the value of the index; as well as The current block is encoded based on the predicted candidate and the first cost function.
31. An apparatus for decoding video data, the apparatus comprising: Components used to determine the current block of video data to be decoded using inter-frame mode; A component used to determine the value of the index of a predicted candidate in the candidate list; Components for determining the prediction candidates and a first cost function among a plurality of cost functions based on the value of the index; and A component for decoding the current block based on the predicted candidate and the first cost function.
