Template Matching Based Adaptive Motion Vector Resolution (AMVR)
Adaptive motion vector resolution in video encoding optimizes motion vector selection through template matching, addressing inefficiencies in fixed resolution methods and reducing bandwidth and storage requirements.
Patent Information
- Application Number
- JP2023548557
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-09-30
- Filing Date
- 2022-10-04
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2042-10-04
AI Technical Summary
Existing video encoding techniques face challenges in optimizing motion vector resolution, leading to inefficient compression and increased bandwidth and storage requirements due to the use of fixed motion vector resolutions that do not account for varying motion patterns in video content.
Adaptive motion vector resolution (AMVR) is employed, where multiple motion vector resolutions are applied and evaluated using template matching to determine the optimal resolution for each block, reducing redundancy and improving compression efficiency.
AMVR enhances video encoding by minimizing bit usage while maintaining video quality, thus reducing bandwidth and storage needs, and improving overall compression efficiency.
Smart Images

Figure 0007597444000005 
Figure 0007597444000006 
Figure 0007597444000007
Abstract
Description
[Technical field]
[0001] [Incorporated by reference] This application claims the benefit of priority to U.S. Patent Application No. 17 / 958,161, entitled "TEMPLATE-MATCHING BASED ADAPTIVE MOTION VECTOR RESOLUTION (AMVR)," filed September 30, 2022, which claims the benefit of priority to U.S. Provisional Application No. 63 / 273,070, entitled "TEMPLATE-MATCHING BASED ADAPTIVE MOTION VECTOR RESOLUTION (AMVR)," filed October 28, 2021, and U.S. Provisional Application No. 63 / 289,128, entitled "TEMPLATE-MATCHING BASED ADAPTIVE MOTION VECTOR RESOLUTION (AMVR)," filed December 13, 2021. The entire disclosure of the prior application is incorporated by reference.
[0002] [Technical field] This disclosure describes embodiments generally related to video coding. [Background technology]
[0003] The background discussion provided herein is intended to generally present the context of the present disclosure. Work of the inventors named in this application, to the extent that their work is described in this background section, and aspects of this description that may not otherwise qualify as prior art at the time of filing, are not admitted, either explicitly or implicitly, as prior art to the present disclosure.
[0004] An uncompressed digital image and / or video may include a sequence of pictures, each having spatial dimensions of, for example, 1920x1080 luminance samples and associated chrominance samples. The sequence of pictures may have a fixed or variable picture rate (also informally known as frame rate), for example, 60 pictures per second or a picture rate of 60 Hz. Uncompressed images and / or videos have specific bitrate requirements. For example, 1080p60 4:2:0 video (1920x1080 luminance sample resolution at a frame rate of 60 Hz) with 8 bits per sample requires a bandwidth approaching 1.5 Gbit / s. One hour of such video requires more than 600 Gbytes of storage space.
[0005] One objective of image and / or video encoding and decoding may be the reduction of redundancy in the input image and / or video signal through compression. Compression may help to reduce the aforementioned bandwidth and / or storage space requirements, in some cases by more than one order of magnitude. Although the description herein uses video encoding / decoding as an illustrative example, the same techniques may be equally applicable to image encoding / decoding without departing from the spirit of this disclosure. Both lossless and lossy compression, as well as combinations thereof, may be used. Lossless compression refers to techniques whereby an exact copy of the original signal can be reconstructed from the compressed original signal. When using lossy compression, the reconstructed signal may not be identical to the original signal, but the distortion between the original and reconstructed signals is small enough to make the reconstructed signal useful for the intended application. For video, lossy compression is widely used. The amount of acceptable distortion depends on the application, e.g., users of a particular consumer streaming application may tolerate higher distortion than users of a television distribution application. The achievable compression ratio may reflect that a higher tolerable / acceptable distortion can result in a higher compression ratio.
[0006] Video encoders and decoders can utilize techniques from a number of broad categories, including, for example, motion compensation, transform processing, quantization, and entropy coding.
[0007] Video codec techniques can include a technique known as intra-coding. In intra-coding, sample values are represented without reference to samples or other data from previously reconstructed reference pictures. In some video codecs, a picture is spatially divided into blocks of samples. If all blocks of samples are coded in intra mode, the picture may be an intra picture. Intra pictures and their derivatives, such as independent decoder refresh pictures, can be used to reset the decoder state and thus can be used as the first picture in a coded video bitstream and video session or as a still image. Samples of an intra block can be subjected to a transform, and the transform coefficients can be quantized before entropy coding. Intra prediction can be a technique that minimizes sample values in the pre-transform domain. In some cases, the smaller the DC value and the smaller the AC coefficients after the transform, the fewer bits are needed for a given quantization step size to represent the block after entropy coding.
[0008] Traditional intra-coding, e.g., as used in MPEG-2 generation coding techniques, does not use intra-prediction. However, some newer video compression techniques include techniques that attempt to perform prediction based on, e.g., surrounding sample data and / or metadata obtained during the encoding / decoding of a block of data. Such techniques are referred to below as "intra-prediction" techniques. Note that, at least in some cases, intra-prediction uses only reference data from the current picture being reconstructed, and not from reference pictures.
[0009] There may be various forms of intra prediction. If more than one such technique is available for a given video coding technique, the particular technique used may be coded as a particular intra prediction mode using the particular technique. In certain cases, an intra prediction mode may have sub-modes and / or parameters that may be coded separately or may be included in a mode codeword that defines the prediction mode. Which codeword is used for a given mode, sub-mode and / or parameter combination may affect the coding efficiency gain through intra prediction, as well as the entropy coding technique used to convert the codeword into a bitstream.
[0010] Certain modes of intra prediction were introduced in H.264, refined in H.265, and further refined in newer coding techniques such as the Joint Exploration Model (JEM), Versatile Video Coding (VVC), and Benchmark Set (BMS). A predictor block can be formed using neighboring sample values of already available samples. The sample values of the neighboring samples are copied to the predictor block according to a certain direction. The reference to the direction used can be coded in the bitstream or it may be predicted itself.
[0011] Referring to FIG. 1A, at the bottom right, a subset of 9 known predictor directions is depicted from the 33 possible predictor directions defined in H.265 (corresponding to the 33 angle modes out of the 35 intra modes). The point (101) where the arrows converge represents the sample to be predicted. The arrows represent the direction in which the sample is predicted. For example, arrow (102) indicates that sample (101) is predicted from the sample(s) to the top right and at an angle of 45 degrees from the horizontal. Similarly, arrow (103) indicates that sample (101) is predicted from the sample(s) to the bottom left of sample (101), at an angle of 22.5 degrees from the horizontal.
[0012] 1A, at the top left, a square block (104) of 4×4 samples is depicted (indicated by a thick dashed line). The square block (104) contains 16 samples, each labeled with an “S” and its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample (from the top) in the Y dimension and the first sample (from the left) in the X dimension. Similarly, sample S44 is the fourth sample in the block (104) in both the Y and X dimensions. Since the block is 4×4 samples in size, S44 is at the bottom right. Additionally, a reference sample is shown that follows a similar numbering scheme. The reference sample is labeled R and its Y position (e.g., row index) and X position (column index) relative to the block (104). In both H.264 and H.265, the predicted samples are neighbors of the block being reconstructed, so there is no need to use negative values.
[0013] Intra-picture prediction can work by copying reference sample values from neighboring samples indicated by a signaled prediction direction. For example, assume that the coded video bitstream includes signaling for this block indicating a prediction direction that is consistent with the arrow (102). That is, the sample is predicted from the top right sample at an angle of 45 degrees from the horizontal. Then samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Then sample S44 is predicted from reference sample R08.
[0014] In certain cases, especially when the direction is not divisible by 45 degrees, the values of multiple reference samples may be combined, for example by interpolation, to calculate the reference sample.
[0015] As video coding techniques have developed, the number of possible directions has increased. In H.264 (2003), nine different directions could be represented. This increased to 33 in H.265 (2013). Currently, JEM / VVC / BMS can support up to 65 directions. Experiments are performed to identify the most likely directions, and specific techniques in entropy coding are used to represent those more likely directions with a small number of bits, while accepting some penalty for the less likely directions. Furthermore, the direction itself can sometimes be predicted from nearby directions used in nearby already decoded blocks.
[0016] FIG. 1B shows a schematic diagram (110) depicting 65 intra prediction directions with JEM to illustrate the increasing number of prediction directions over time.
[0017] The mapping of intra-prediction direction bits in the coded video bitstream to represent directions can vary from one video coding technique to another. Such mappings can range, for example, from simple direct mappings to complex adaptation schemes involving codewords, most probable modes, and similar techniques. However, in most cases, there may be certain directions that are statistically less likely to occur in the video content than other certain directions. Since the goal of video compression is to reduce redundancy, in a well-performing video coding technique, such less likely ways are represented by a larger number of bits than more probable directions.
[0018] Image and / or video encoding and decoding can be performed using inter-picture prediction with motion compensation. Motion compensation can be a lossy compression technique and can refer to a technique in which blocks of sample data from a previously reconstructed picture or part thereof (reference picture) are used for prediction of a newly reconstructed picture or part thereof after being spatially shifted in a direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture can be the same as the picture currently being reconstructed. The MV can have two dimensions, X and Y, or three dimensions, with the third dimension being an indication of the reference picture used (which can indirectly be the temporal dimension).
[0019] In some video compression techniques, the MV applicable to a region of sample data can be predicted from other MVs, e.g., from an MV associated with another region of sample data that is spatially adjacent to the region being reconstructed and precedes it in decoding order. Doing so can significantly reduce the amount of data required to encode the MV, thereby removing redundancy and increasing compression. MV prediction can work effectively because, for example, when encoding an input video signal derived from a camera (known as natural video), there is a statistical probability that regions larger than the region to which a single MV is applicable move in a similar direction and can therefore be predicted, in certain cases, using similar motion vectors derived from the MVs of nearby regions. As a result, the MV found for a given region will be similar or identical to the MV predicted from the surrounding MVs, which, after entropy encoding, can be represented with fewer bits than would be used if encoding the MVs directly. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., an MV) derived from the original signal (i.e., a sample stream). In other cases, the MV prediction itself may be lossy, for example due to rounding errors in computing the predictor from several surrounding MVs.
[0020] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T Rec. H.265, "High Efficiency Video Coding", December 2016). Among the many MV prediction mechanisms provided by H.265, one that will be described with reference to FIG. 2 is a technique hereafter referred to as "spatial merge".
[0021] Referring to Figure 2, a current block (201) contains samples that the encoder found during the motion search process to be predictable from a previous block of the same size but spatially shifted. Instead of directly encoding its MV, the MV can be derived from metadata associated with one or more reference pictures, for example from the most recent reference picture (in decoding order) using MVs associated with any of the five surrounding samples, denoted A0, A1, and B0, B1, B2 (202-206, respectively). In H.265, MV prediction can use predictors from the same reference picture that neighboring blocks use. Summary of the Invention
[0022] Aspects of the present disclosure provide methods and apparatus for video encoding and decoding. In some examples, the apparatus for video decoding includes a processing circuit. The processing circuit is configured to decode prediction information of a current block in a current picture from a coded video bitstream. The prediction information indicates (i) that an adaptive motion vector prediction (AMVP) mode with an adaptive motion vector resolution (AMVR) mode is applied to the current block, and (ii) motion information. A set of motion vector (MV) resolutions in the AMVR mode are available for the current block. The processing circuit performs template matching (TM) on multiple MV resolutions in the set of MV resolutions by (i) determining a respective TM cost corresponding to each of the multiple MV resolutions based on the multiple MV resolutions and the motion information, and (ii) sorting the multiple MV resolutions based on the determined TM cost corresponding to each of the multiple MV resolutions, and selecting an MV resolution from the sorted multiple MV resolutions. The processing circuit reconstructs the current block based on the selected MV resolution.
[0023] In one embodiment, for each of a plurality of MV resolutions in the set of MV resolutions, the processing circuit determines a first reference block in a first reference picture based on a current block in a current picture, the motion information and the respective MV resolution, and determines a TM cost based on a first reference template of the first reference block in the first reference picture and a current template of the current block in the current picture.
[0024] In one example, the plurality of MV resolutions is a set of MV resolutions. The prediction information indicates whether or not a first MV resolution is applied to the current block, and the first MV resolution corresponds to a minimum TM cost among the determined TM costs. In response to an indication that the first MV resolution is applied to the current block, the processing circuit selects the first MV resolution as the MV resolution and reconstructs the current block based on the first MV resolution. In response to an indication that the first MV resolution is not applied to the current block, the processing circuit selects an MV resolution from the remaining MV resolutions in the reordered plurality of MV resolutions. The remaining MV resolutions exclude the first MV resolution. The processing circuit reconstructs the current block based on the selected MV resolution.
[0025] In one example, the multiple MV resolutions include ¼ luma sample, ½ luma sample, 1 luma sample, and 4 luma sample.
[0026] In one example, the first MV resolution is not applied to the current block. The processing circuit decodes an index in the coded video bitstream. The processing circuit selects a second MV resolution from the remaining MV resolutions in the reordered multiple MV resolutions based on the index. The remaining MV resolutions exclude the first MV resolution. The processing circuit reconstructs the current block based on the second MV resolution.
[0027] In one embodiment, the set of MV resolutions includes a third MV resolution that is not in the plurality of MV resolutions. The prediction information indicates that the third MV resolution is not applied to the current block. The processing circuit decodes an index in the coded video bitstream and selects a fourth MV resolution from the reordered plurality of MV resolutions based on the index. The processing circuit reconstructs the current block based on the fourth MV resolution.
[0028] In one example, the set of MV resolutions consists of ¼ luma samples, ½ luma samples, 1 luma sample, and 4 luma samples. The third MV resolution is ¼ luma samples, and the multiple MV resolutions consist of ½ luma samples, 1 luma sample, and 4 luma samples.
[0029] In one example, the prediction information indicates that the current block is coded with bidirectional prediction. For each of the multiple MV resolutions in the set of MV resolutions, the processing circuit determines a TM cost based on a first TM cost and a second TM cost. The first TM cost is determined based on a first reference template of a first reference block in a first reference picture and a current template of a current block in a current picture. The second TM cost is determined based on a second reference template of a second reference block in a second reference picture and a current template of a current block in a current picture. In one example, for each of the multiple MV resolutions in the set of MV resolutions, the TM cost is a weighted sum of the first TM cost and the second first TM cost. In one example, for each of the multiple MV resolutions in the set of MV resolutions, the TM cost is a minimum or maximum value of the first TM cost and the second TM cost.
[0030] Aspects of the present disclosure also provide a non-transitory computer-readable storage medium storing a program executable by at least one processor to perform a method for video decoding. [Brief description of the drawings]
[0031] Further features, nature and various advantages of the disclosed subject matter will become more apparent from the following detailed description and the accompanying drawings. [Figure 1A] FIG. 2 is a schematic diagram of an example subset of intra-prediction modes. [Figure 1B] FIG. 2 is an illustration of an exemplary intra-prediction direction. [Diagram 2] An example of a current block (201) and its surrounding samples in one example is shown. [Diagram 3] FIG. 3 is a schematic diagram of an example block diagram of a communication system (300). [Figure 4] FIG. 4 is a schematic diagram of a simplified block diagram of a communication system (400) according to an embodiment. [Diagram 5] FIG. 2 is a schematic diagram of an example block diagram of a decoder. [Figure 6] FIG. 2 is a schematic diagram of an example block diagram of an encoder; [Figure 7] 1 shows a block diagram of an exemplary encoder. [Figure 8] 1 shows a block diagram of an exemplary decoder. [Figure 9] 1 illustrates locations of spatial merge candidates according to one embodiment of the present disclosure. [Figure 10] 1 illustrates candidate pairs considered for redundancy checking of spatial merge candidates according to one embodiment of the present disclosure. [Figure 11] 13 illustrates an example motion vector scaling for temporal merge candidates. [Figure 12] 13 illustrates example candidate positions for temporal merge candidates for the current coding unit. [Figure 13] An example of template matching (1300) is shown. [Figure 14] An example of template matching (1400) applied to a set of motion vector resolutions (MVRs) is shown. [Figure 15] 15 shows an example of template matching (1500) applied to multiple MVRs when the current block is predicted using bi-prediction. [Figure 16] 1 shows a flowchart outlining an encoding process according to one embodiment of the present disclosure. [Figure 17] 1 shows a flowchart outlining a decoding process according to one embodiment of the present disclosure. [Figure 18] FIG. 1 is a schematic diagram of a computer system according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0032] FIG. 3 illustrates an example block diagram of a communication system (300). The communication system (300) includes a plurality of terminal devices that can communicate with each other, for example, via a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). In the example of FIG. 3, the first pair of terminal devices (310) and (320) perform a unidirectional transmission of data. For example, the terminal device (310) may encode video data (e.g., a stream of video pictures captured by the terminal device (310)) for transmission to the other terminal device (320) via the network (350). The encoded video data may be transmitted in the form of one or more encoded video bitstreams. The terminal device (320) may receive the encoded video data from the network (350), decode the encoded video data to reconstruct the video pictures, and display the video pictures according to the reconstructed video data. One-way data transmission may be common, such as in media service applications.
[0033] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) performing bidirectional transmission of encoded video data, for example during a video conference. For the bidirectional transmission of data, in one example, each of the terminal devices (330) and (340) may encode video data (e.g., a stream of video pictures captured by the terminal device) for transmission to the other of the terminal devices (330) and (340) over the network (350). Each of the terminal devices (330) and (340) may receive the encoded video data transmitted by the other of the terminal devices (330) and (340), decode the encoded video data to reconstruct the video pictures, and display the video pictures on an accessible display device in accordance with the reconstructed video data.
[0034] In the example of FIG. 3, terminal devices (310), (320), (330), and (340) are shown as a server, a personal computer, and a smartphone, respectively, although the principles of the present disclosure may not be so limited. Embodiments of the present disclosure find application in laptop computers, tablet computers, media players, and / or dedicated video conferencing equipment. Network (350) represents any number of networks that convey encoded video data between terminal devices (310), (320), (330), and (340), including, for example, wired (wired) and / or wireless communication networks. Communications network (350) may exchange data in circuit-switched and / or packet-switched channels. Exemplary networks include telecommunications networks, local area networks, wide area networks, and / or the Internet. For purposes of discussion herein, the architecture and topology of network (350) may not be important to the operation of the present disclosure, unless otherwise described below.
[0035] 4 shows a video encoder and a video decoder in a streaming environment as an example of an application for the disclosed subject matter. The disclosed subject matter may be equally applicable to other video-enabled applications including, for example, video conferencing, digital TV, streaming services, storage of compressed video on digital media including CDs, DVDs, memory sticks, etc.
[0036] The streaming system may include a video source (401), e.g., a digital camera, and may include a capture subsystem (413) that generates, e.g., a stream of uncompressed video pictures (402). In one example, the stream of video pictures (402) includes samples captured by a digital camera. The stream of video pictures (402), depicted as a thick line to emphasize its high data volume compared to the encoded video data (404) (or encoded video bitstream), may be processed by an electronic device (420) that includes a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination thereof to enable or implement aspects of the disclosed subject matter, as described in more detail below. The encoded video data (404) (or encoded video bitstream), depicted as a thin line to emphasize its lower data volume compared to the stream of video pictures (402), may be stored in a streaming server (405) for future use. One or more streaming client subsystems, such as the client subsystems (406) and (408) of FIG. 4, can access the streaming server (405) to retrieve copies (407) and (409) of the encoded video data (404). The client subsystem (406) can include a video decoder (410), for example within an electronic device (430). The video decoder (410) decodes an input copy (407) of the encoded video data and generates an output stream (411) of video pictures that can be rendered on a display (412) (e.g., a display screen) or other rendering device (not shown). In some streaming systems, the encoded video data (404), (407), and (409) (e.g., a video bitstream) can be encoded according to a particular video encoding / compression standard. Examples of these standards include ITU-T Recommendation H.265.In one example, the developing video coding standard is informally known as Versatile Video Coding (VVC), and the disclosed subject matter may be used in the context of VVC.
[0037] It is noted that electronic devices 420 and 430 may include other components (not shown). For example, electronic device 420 may include a video decoder (not shown), and electronic device 430 may also include a video encoder (not shown).
[0038] 5 shows an example block diagram of a video decoder (510). The video decoder (510) can be included in an electronic device (530). The electronic device (530) can include a receiver (531) (e.g., a receiving circuit). The video decoder (510) can be used in place of the video decoder (310) in the example of FIG. 4.
[0039] The receiver (531) may receive one or more coded video sequences to be decoded by the video decoder (510). In some embodiments, one coded video sequence is received at a time, and the decoding of each coded video sequence is independent of the decoding of the other coded video sequences. The coded video sequences may be received from a channel (501), which may be a hardware / software link to a storage device that stores the coded video data. The receiver (531) may receive the coded video data together with other data, such as coded audio data and / or auxiliary data streams, which may be forwarded to respective usage entities (not shown). The receiver (531) may separate the coded video sequences from the other data. To combat network jitter, a buffer memory (515) may be coupled between the receiver (531) and the entropy decoder / parser (520) (hereinafter the "parser"). In certain applications, the buffer memory (515) is part of the video decoder (510). In other applications, it may be external to the video decoder (510) (not shown). In still other applications, there may be a buffer memory (not shown) external to the video decoder (510), e.g., to combat network jitter, and yet another buffer memory (515) internal to the video decoder (510), e.g., to handle playback timing. If the receiver (531) is receiving data from a store / forward device of sufficient bandwidth and controllability, or from an isochronous network, the buffer memory (515) may not be needed or may be small. For use with best-effort packet networks such as the Internet, the buffer memory (515) may be required and may be relatively large, advantageously of adaptive size, and may be implemented at least in part in an operating system or similar element (not shown) external to the video decoder (510).
[0040] The video decoder (510) may include a parser (520) for reconstructing symbols (521) from the coded video sequence. These categories of symbols include information used to manage the operation of the video decoder (510) and potentially information for controlling a rendering device such as a render device (512) (e.g., a display screen). The rendering device may not be an integral part of the electronic device (530) as shown in FIG. 5, but may be coupled to the electronic device (530). The control information for the rendering device(s) may be in the form of Supplementary Enhancement Information (SEI messages) or Video Usability Information (VUI) parameter set fragments (not shown). The parser (520) may parse / entropy decode the received coded video sequence. The coding of the coded video sequence may follow a video coding technique or standard and may follow various principles including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, etc. The parser (520) can extract from the coded video sequence a set of subgroup parameters for at least one of the subgroups of pixels in the video decoder based on at least one parameter corresponding to the group. The subgroups can include Groups of Pictures (GOPs), pictures, tiles, slices, macroblocks, Coding Units (CUs), blocks, Transform Units (TUs), Prediction Units (PUs), etc. The parser (520) can also extract information from the coded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, etc.
[0041] The parser (520) can perform an entropy decoding / parsing operation on the video sequence received from the buffer memory (515) to generate symbols (521).
[0042] The reconstruction of symbols (521) can involve several different units, depending on the type of coded video picture or portions thereof (e.g., inter and intra pictures, inter and intra blocks) and other factors. Which units are involved and how can be controlled by subgroup control information parsed by the parser (520) from the coded video sequence. The flow of such subgroup control information between the parser (520) and the following units is not depicted for clarity.
[0043] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually divided into a number of functional units, as described below. In a practical implementation operating under commercial constraints, many of these units will interact closely with each other and may be at least partially integrated with each other. However, for purposes of describing the disclosed subject matter, the following conceptual subdivision into functional units is adequate.
[0044] The first unit is a scalar / inverse transform unit (551). The scalar / inverse transform unit (551) receives quantized transform coefficients and control information as symbol(s) (521) from the parser (520). The control information includes which transform to use, block size, quantization factor, quantization scaling matrix, etc. The scalar / inverse transform unit (551) can output blocks containing sample values that can be input to an aggregator (555).
[0045] In some cases, the output samples of the scaler / inverse transform (551) may relate to intra-coded blocks, which are blocks that do not use prediction information from a previously reconstructed picture, but can use prediction information from a previously reconstructed portion of the current picture. Such prediction information may be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) generates a block of the same size and shape as the block being reconstructed using surrounding already reconstructed information taken from a current picture buffer (558). The current picture buffer (558) buffers, for example, a partially reconstructed current picture and / or a fully reconstructed current picture. The aggregator (555) optionally adds, on a sample-by-sample basis, the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551).
[0046] In other cases, the output samples of the scalar / inverse transform unit (551) may relate to an inter-coded, potentially motion-compensated block. In such cases, the motion compensation prediction unit (553) may access a reference picture memory (557) to fetch samples used for prediction. After motion compensating the fetched samples according to the symbols (521) for the block, these samples may be added by an aggregator (555) to the output of the scalar / inverse transform unit (in this case referred to as residual samples or residual signals) to generate output sample information. The addresses in the reference picture memory (557) from which the motion compensation unit (553) fetches prediction samples may be controlled by motion vectors available to the motion compensation unit (553) in the form of symbols (521). The symbols may have, for example, X, Y, and reference picture components. Motion compensation may include interpolation of sample values fetched from the reference picture memory (557) when subsample accurate motion vectors are used, motion vector prediction mechanisms, and the like.
[0047] The output samples of the aggregator (555) may be subjected to various loop filtering techniques in a loop filter unit (556). Video compression techniques may include in-loop filter techniques controlled by parameters contained in the coded video sequence (also called the coded video bitstream) and made available to the loop filter unit (556) as symbols (521) from the parser (520). Video compression may also be responsive to meta-information obtained during decoding of previous portions (in decoding order) of the coded picture or coded video sequence, as well as to previously reconstructed loop filtered sample values.
[0048] The output of the loop filter unit (556) can be a sample stream, which can be output to a render device (512) or stored in a reference picture memory (557) for use in future inter-picture prediction.
[0049] Once a coded picture is fully reconstructed, it can be used as a reference picture for future prediction. For example, once a coded picture corresponding to a current picture is fully reconstructed and the coded picture is identified as a reference picture (e.g., by the parser (520)), the current picture buffer (558) can become part of the reference picture memory (557), and a fresh current picture buffer can be reallocated before starting the reconstruction of a subsequent coded picture.
[0050] The video decoder (510) may perform decoding operations according to a given video compression technique or standard, such as ITU-T Recommendation H.265. The encoded video sequence may be compliant with the syntax prescribed by the video compression technique or standard being used, in the sense that the encoded video sequence follows the syntax of the video compression technique or standard and a profile documented in the video compression technique or standard. In particular, a profile may select a particular tool from all tools available in the video compression technique or standard as the only tool available for use under that profile. Compliance may also require that the complexity of the encoded video sequence be within a range defined by a level of the video compression technique or standard. In some cases, the level constrains the maximum picture size, maximum frame rate, maximum reconstruction sample rate (e.g., measured in units of megasamples per second), maximum reference picture size, etc. The limits set by the level may be further constrained through a Hypothetical Reference Decoder (HRD) specification and metadata for HRD buffer management, possibly signaled in the encoded video sequence.
[0051] In some embodiments, the receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence(s). The additional data may be used by the video decoder (510) to properly decode the data and / or to more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial, or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0052] 6 shows an example block diagram of a video encoder (603). The video encoder (603) is included in an electronic device (620). The electronic device (620) includes a transmitter (640) (e.g., a transmission circuit). The video encoder (603) can be used in place of the video encoder (403) in the example of FIG. 4.
[0053] The video encoder (603) can receive video samples from a video source (601) (which is not part of the electronic device (620) in the example of FIG. 6) that can capture video images to be encoded by the video encoder (603). In another example, the video source (601) is part of the electronic device (620).
[0054] The video source (601) may provide a source video sequence to be encoded by the video encoder (603) in the form of a digital video sample stream that may be of any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 YCrCB, RGB, ...) and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb 4:4:4). In a media service system, the video source (601) may be a storage device that stores pre-prepared video. In a video conferencing system, the video source (601) may be a camera that captures image information locally as a video sequence. The video data may be provided as a number of individual pictures that impart motion when viewed in sequence. The pictures themselves may be organized as a spatial array of pixels, each of which may contain one or more samples, depending on the sampling structure, color space, etc., in use. Those skilled in the art can easily understand the relationship between pixels and samples. The following description focuses on samples.
[0055] According to an embodiment, the video encoder (603) can encode and compress pictures of a source video sequence into an encoded video sequence (643) in real time or under any other required time constraint. Enforcing an appropriate encoding rate is one function of the controller (650). In some embodiments, the controller (650) controls and is operatively coupled to other functional units, such as those described below. Such couplings are not depicted for clarity. Parameters set by the controller (650) can include parameters related to rate control (picture skip, quantizer, lambda value for rate-distortion optimization techniques, ...), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (650) can be configured to have other suitable functions for the video encoder (603) optimized for a particular system design.
[0056] In some embodiments, the video encoder (603) is configured to operate in an encoding loop. As a simplistic description, in one example, the encoding loop can include a source encoder (630) (e.g., responsible for generating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture(s)) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to generate sample data in a similar manner that a (remote) decoder would also generate. The reconstructed sample stream (sample data) is input to a reference picture memory (634). Since the decoding of the symbol stream results in bit-exact results regardless of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-exact between the local and remote encoders. In other words, the prediction part of the encoder "sees" exactly the same sample values as the decoder "sees" when using the prediction during decoding as reference picture samples. This basic principle of reference picture synchrony (and the resulting drift when synchrony cannot be maintained, for example due to channel errors) is also used in several related techniques.
[0057] The operation of the "local" decoder (633) may be the same as the operation of a "remote" decoder, e.g., the video decoder (410), already described in detail above in connection with Figure 5. However, referring also briefly to Figure 5, because symbols are available and the encoding / decoding of the symbols into a coded video sequence by the entropy coder (645) and parser (420) may be lossless, the entropy decoding portion of the video decoder (410), including the buffer memory (415) and the parser (420), may not be fully implemented in the local decoder (633).
[0058] In some embodiments, the decoder techniques, except for parsing / entropy decoding, present in the decoder are present in the same or substantially the same functional form in the corresponding encoder. Thus, the disclosed subject matter focuses on the decoder operation. A description of the encoder techniques can be omitted, since they are the inverse of the decoder techniques described generically. In certain areas, more detailed descriptions are provided below.
[0059] During operation, in some examples, the source encoder (630) may perform motion-compensated predictive encoding, which predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence, designated as “reference pictures.” In this manner, the encoding engine (632) encodes differences between pixel blocks of the input picture and pixel blocks of a reference picture(s) that may be selected as predictive references for the input picture.
[0060] The local video decoder (633) can decode the encoded video data of the pictures that may be designated as reference pictures based on the symbols generated by the source encoder (630). The operation of the encoding engine (632) can advantageously be a lossy process. When the encoded video data can be decoded in a video decoder (not shown in FIG. 6), the reconstructed video sequence can be a copy of the source video sequence, typically with some errors. The local video decoder (633) can replicate the decoding process that may be performed on the reference pictures by the video decoder and store the reconstructed reference pictures in the reference picture memory (634). In this way, the video encoder (603) can locally store copies of reconstructed reference pictures that have common content (in the absence of transmission errors) as the reconstructed reference pictures that would be obtained by the far-end video decoder.
[0061] The predictor (635) may perform a prediction search for the coding engine (632). That is, for a new picture to be coded, the predictor (635) may search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or specific metadata, such as reference picture motion vectors, block shapes, etc., that may serve as suitable prediction references for the new picture. The predictor (635) may operate on a sample block-by-pixel block basis to find suitable prediction references. In some cases, as determined by the search results obtained by the predictor (635), the input picture may have prediction references drawn from multiple reference pictures stored in the reference picture memory (634).
[0062] The controller (650) may manage the encoding operations of the source encoder (630), including, for example, setting the parameters and subgroup parameters used to encode the video data.
[0063] The output of all of the above functional units may undergo entropy coding in an entropy coder (645), which converts the symbols produced by the various functional units into a coded video sequence by applying lossless compression to the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc.
[0064] The transmitter (640) can buffer the encoded video sequence generated by the entropy encoder (645) and prepare it for transmission over a communication channel (660), which may be a hardware / software link to a storage device that stores the encoded video data. The transmitter (640) can merge the encoded video data from the video encoder (630) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (sources not shown).
[0065] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a certain coding picture type to each coded picture. The coding picture type may affect the coding technique that may be applied to each picture. For example, pictures may often be assigned as one of the following picture types:
[0066] An intra picture (I-picture) may be one that can be coded and decoded without using other pictures in a sequence as a source of prediction. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art will recognize these variations of I-pictures and their respective uses and characteristics.
[0067] A predictive picture (P-picture) may be one that can be encoded and decoded using intra- or inter-prediction, which uses at most one motion vector and reference index to predict the sample values of each block.
[0068] Bidirectionally predicted pictures (B-pictures) may be those that can be coded and decoded using intra- or inter-prediction, which uses up to two motion vectors and reference indices to predict the sample values of each block. Similarly, multi-predictive pictures can use more than two reference pictures and associated metadata for the reconstruction of a single block.
[0069] A source picture is usually spatially divided into multiple sample blocks (e.g., blocks of 4x4, 8x8, 4x8, or 16x16 samples each) and may be coded block by block. Blocks may be predictively coded with reference to other (already coded) blocks, as determined by the coding assignment applied to the respective picture of the block. For example, blocks of an I-picture may be non-predictively coded or may be predictively coded with reference to already coded blocks of the same picture (spatial or intra prediction). Pixel blocks of a P-picture may be predictively coded via spatial prediction or via temporal prediction with reference to one previously coded reference picture. Blocks of a B-picture may be predictively coded via spatial prediction or via temporal prediction with reference to one or two previously coded reference pictures.
[0070] The video encoder (603) may perform encoding operations according to a given video encoding technique or standard, such as ITU-T Recommendation H.265. In its operations, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in the input video sequence. Thus, the encoded video data may conform to a syntax specified by the video encoding technique or standard used.
[0071] In some embodiments, the transmitter (640) may transmit additional data along with the encoded video. The source encoder (630) may include such data as part of the encoded video sequence. The additional data may include temporal / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0072] A video may be captured as multiple source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often abbreviated as intra-prediction) exploits spatial correlation in a given picture, while inter-picture prediction exploits correlation (temporal or other) between pictures. In one example, a particular picture to be coded / decoded, called a current picture, is divided into blocks. If a block in the current picture is similar to a reference block in a previously coded and still buffered reference picture in the video, that block in the current picture can be coded by a vector called a motion vector. A motion vector points to a reference block in a reference picture, and may have a third dimension that identifies the reference picture if multiple reference pictures are used.
[0073] In some embodiments, bi-prediction techniques can be used in inter-picture prediction. According to bi-prediction techniques, two reference pictures are used, such as a first reference picture and a second reference picture, both of which precede the current picture in decoding order (but may also be past and future, respectively, in display order) in the video. A block in the current picture can be coded by a first motion vector that points to a first reference block in the first reference picture and a second motion vector that points to a second reference block in the second reference picture. A block can be predicted by a combination of the first and second reference blocks.
[0074] Furthermore, to improve coding efficiency, merge mode techniques can be used in inter-picture prediction.
[0075] According to some embodiments of the present disclosure, predictions such as inter-picture prediction and intra-picture prediction are performed on a block-by-block basis. For example, according to the HEVC standard, pictures in a sequence of video pictures are divided into coding tree units (CTUs) for compression, and the CTUs in a picture have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), one luma CTB and two chroma CTBs. Each CTU can be recursively quadtree partitioned into one or more coding units (CUs). For example, a CTU of 64×64 pixels can be partitioned into one CU of 64×64 pixels, or four CUs of 32×32 pixels, or 16 CUs of 16×16 pixels. In one example, each CU is analyzed to determine a prediction type for that CU, such as an inter prediction type or an intra prediction type. A CU is divided into one or more prediction units (PUs) depending on temporal and / or spatial predictability. In general, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, prediction operations in coding (encoding / decoding) are performed in units of prediction blocks. Taking a luma prediction block as an example of a prediction block, the prediction block includes a matrix of values (e.g., luma values) for pixels, such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, etc.
[0076] 7 shows an example diagram of a video encoder (703). The video encoder (703) is configured to receive a processed block of sample values (e.g., a predictive block) in a current video picture in a sequence of video pictures and to encode the processed block into a coded picture that is part of a coded video sequence. In one example, the video encoder (703) is used in place of the video encoder (403) in the example of FIG. 4.
[0077] In an HEVC example, the video encoder (703) receives a matrix of sample values for a processing block, such as a predictive block, such as 8×8 samples. The video encoder (703) determines whether the processing block is best coded using intra mode, inter mode, or bi-predictive mode, e.g., using rate-distortion optimization. If the processing block is coded in intra mode, the video encoder (703) may use intra prediction techniques to code the processing block into a coded picture. If the processing block is coded in inter mode or bi-predictive mode, the video encoder (703) may use inter prediction techniques or bi-predictive techniques, respectively, to code the processing block into a coded picture. In certain video coding techniques, a merge mode may be an inter-picture prediction sub-mode in which motion vectors are derived from one or more motion vector predictors but without the benefit of coded motion vector components outside the predictors. In certain other video coding techniques, there may be motion vector components applicable to the current block. In one example, the video encoder (703) includes other components, such as a mode decision module (not shown) for determining the mode of the processing blocks.
[0078] In the example of FIG. 7, the video encoder (703) includes an inter-encoder (730), an intra-encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a general controller (721), and an entropy coder (725), coupled together as shown in FIG.
[0079] The inter-encoder (730) is configured to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in previous and subsequent pictures), generate inter-prediction information (e.g., a description of redundant information due to inter-coding techniques, motion vectors, merge mode information), and calculate an inter-prediction result (e.g., a predicted block) based on the inter-prediction information using any suitable technique. In some examples, the reference picture is a decoded reference picture that is decoded based on the coded video information.
[0080] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), possibly compare the block with blocks already encoded in the same picture, generate transformed and quantized coefficients, and possibly also generate intra prediction information (e.g., intra prediction direction information according to one or more intra encoding techniques). In one example, the intra encoder (722) also calculates an intra prediction result (e.g., a predicted block) based on the intra prediction information and a reference block in the same picture.
[0081] The general controller (721) is configured to determine general control data and control other components of the video encoder (703) based on the general control data. In one example, the general controller (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, if the mode is an intra mode, the general controller (721) controls the switch (726) to select the result of the intra mode for use by the residual calculator (723), and controls the entropy encoder (725) to select intra prediction information and include the intra prediction information in the bitstream. If the mode is an inter mode, the general controller (721) controls the switch (726) to select the result of inter prediction for use by the residual calculator (723), and controls the entropy encoder (725) to select inter prediction information and include the inter prediction information in the bitstream.
[0082] The residual calculator (723) is configured to calculate a difference (residual data) between the received block and a prediction result selected from the intra-encoder (722) or the inter-encoder (730). The residual encoder (724) is configured to encode the residual data to generate transform coefficients based on the residual data. In one example, the residual encoder (724) is configured to transform the residual data from the spatial domain to the frequency domain to generate transform coefficients. The transform coefficients are then subjected to a quantization process to obtain quantized transform coefficients. In various embodiments, the video encoder (703) also includes a residual decoder (728). The residual decoder (728) is configured to perform an inverse transform to generate decoded residual data. The decoded residual data can be suitably used by the intra-encoder (722) and the inter-encoder (730). For example, the inter-encoder (730) can generate decoded blocks based on the decoded residual data and the inter-prediction information, and the intra-encoder (722) can generate decoded blocks based on the decoded residual data and the intra-prediction information. The decoded blocks are suitably processed to generate decoded pictures, which can be buffered in a memory circuit (not shown) and used as reference pictures in some examples.
[0083] The entropy encoder (725) is configured to format a bitstream to include the encoded block. The entropy encoder (725) is configured to include various information in the bitstream according to a suitable standard, such as the HEVC standard. In one example, the entropy encoder (725) is configured to include general control data, selected prediction information (e.g., intra-prediction information or inter-prediction information), residual information, and other suitable information in the bitstream. Note that in accordance with the disclosed subject matter, when encoding a block in a merged sub-mode of either the inter mode or the bi-prediction mode, the residual information is not present.
[0084] 8 shows an example diagram of a video decoder (810). The video decoder (810) is configured to receive encoded pictures that are part of an encoded video sequence and decode the encoded pictures to generate reconstructed pictures. In one example, the video decoder (810) is used in place of the video decoder (410) in the example of FIG. 4.
[0085] In the example of FIG. 8, the video decoder (810) includes an entropy decoder (871), an inter decoder (880), a residual decoder (873), a reconstruction module (874), and an intra decoder (872) coupled together as shown in FIG. 8.
[0086] The entropy decoder (871) may be configured to reconstruct from the coded picture certain symbols representing the syntax elements of which the coded picture is composed. Such symbols may include, for example, prediction information (e.g., intra- or inter-prediction information, etc.) that may identify the mode in which the block is coded (e.g., intra- or inter-prediction mode, merged submode, or the latter two in another submode), and the specific samples or metadata used for prediction by the intra-decoder (872) or the inter-decoder (880), respectively. The symbols may also include residual information, for example in the form of quantized transform coefficients, etc. In one example, if the prediction mode is an inter- or bi-prediction mode, the inter-prediction information is provided to the inter-decoder (880). If the prediction type is an intra-prediction type, the intra-prediction information is provided to the intra-decoder (872). The residual information may undergo inverse quantization and is provided to the residual decoder (873).
[0087] The inter decoder (880) is configured to receive inter prediction information and to generate inter prediction results based on the inter prediction information.
[0088] The intra decoder (872) is configured to receive intra prediction information and generate a prediction result based on the intra prediction information.
[0089] The residual decoder (873) is configured to perform inverse quantization to extract dequantized transform coefficients, and to process the dequantized transform coefficients to transform the residual information from the frequency domain to the spatial domain. The residual decoder (873) may also require certain control information (including quantizer parameters (QP)), which may be provided by the entropy decoder (871) (data path not depicted since this is only low volume control information).
[0090] The reconstruction module (874) is configured to combine, in the spatial domain, the residual information output by the residual decoder (873) and the prediction result (output by the intra- or inter-prediction module, as the case may be) to form a reconstructed block, which may be part of a reconstructed picture, which may be part of a reconstructed video. It is noted that other suitable operations, such as a deblocking operation, may be performed to improve visual quality.
[0091] It should be noted that the video encoders (403), (603), (703) and the video decoders (410), (510), (810) may be implemented using any suitable technology. In some embodiments, the video encoders (403), (603), (703) and the video decoders (410), (510), (810) may be implemented using one or more integrated circuits. In other embodiments, the video encoders (403), (603), (703) and the video decoders (410), (510), (810) may be implemented using one or more processors executing software instructions.
[0092] Various inter prediction modes can be used in VVC. For an inter predicted CU, the motion parameters can include MV, one or more reference picture indexes, reference picture list usage index, and additional information for the specific coding features used for inter prediction sample generation. The motion parameters can be signaled explicitly or implicitly. If the CU is coded in skip mode, it can be associated with a PU and may not have significant residual coefficients, coded motion vector delta or MV difference (e.g., MVD) or reference picture index. A merge mode can be specified in which the motion parameters of the current CU are obtained from neighboring CUs, including spatial and / or temporal candidates, and optionally additional information as introduced in VVC. The merge mode can be applied not only to skip mode but also to inter predicted CUs. In one example, the selection for the merge mode is an explicit signaling of the motion parameters, and the MV, the corresponding reference picture index and reference picture list usage flag of each reference picture list, as well as other information, are explicitly signaled for each CU.
[0093] In a VVC-like embodiment, the VVC Test model (VTM) reference software supports a number of motion vector prediction modes, including enhanced merge prediction, merge motion vector difference (MMVD) mode, adaptive motion vector prediction (AMVP) mode with symmetric MVD signaling, affine motion compensation prediction, subblock-based temporal motion vector prediction (SbTMVP), adaptive motion vector resolution (AMVR), motion field storage (1 / 16 luma sample MV storage and 8x8 motion field compression), bi-prediction with CU-level weights (BCW), bi-directional optical flow (BDOF), prediction refinement using optical flow (PROF), decoder side motion vector refinement (DMVR), combined inter and intra prediction (CIIP), geometric partitioning mode (GPM), and motion vector compression (CMC). The present invention includes one or more sophisticated inter-prediction coding tools, including a multi-level coding (M-C) coding mode, etc. Inter-prediction and related methods are described in detail below.
[0094] In some cases, enhanced merge prediction can be used. In cases such as VTM4, the merge candidate list is constructed by including, in order, five types of candidates: spatial motion vector predictor (MVP) from spatially neighboring CUs, temporal MVP from co-located CUs, history-based MVP from a first-in-first-out (FIFO) table, pair-wise average MVP, and zero MV.
[0095] The size of the merge candidate list can be signaled in the slice header. In one example, the maximum allowed size of the merge candidate list is 6 in VTM4. For each CU coded in merge mode, the index of the best merge candidate (e.g., merge index) can be coded using truncated unary binarization (TU). The first bin of the merge index can be coded with context (e.g., context-adaptive binary arithmetic coding (CABAC)) and bypass coding can be used for the other bins.
[0096] Some examples of the generation process of each category of merge candidates are provided below. In one embodiment, spatial candidates are derived as follows: The derivation of spatial merge candidates in VVC can be the same as that in HEVC. In one example, up to four merge candidates are selected from the candidates at the positions shown in FIG. 9. FIG. 9 illustrates the positions of spatial merge candidates according to one embodiment of the present disclosure. With reference to FIG. 9, the derivation order is B1, A1, B0, A0, and B2. Position B2 is considered only if any CU at positions A0, B0, B1, and A1 is unavailable (e.g., because the CU belongs to another slice or another tile) or is intra-coded. After the candidate at position A1 is added, the addition of the remaining candidates is subject to a redundancy check, which ensures that candidates with the same motion information are removed from the candidate list, thereby improving the coding efficiency.
[0097] In order to reduce computational complexity, not all possible candidate pairs are considered in the above redundancy check. Instead, only pairs linked by arrows in FIG. 10 are considered, and a candidate is added to the candidate list only if the corresponding candidates used in the redundancy check do not have the same motion information. FIG. 10 illustrates candidate pairs considered for spatial merge candidate redundancy check according to one embodiment of the present disclosure. Referring to FIG. 10, each arrow-linked pair includes A1 and B1, A1 and A0, A1 and B2, B1 and B0, and B1 and B2. Thus, candidates at positions B1, A0, and / or B2 can be compared with candidates at positions A1, and candidates at positions B0 and / or B2 can be compared with candidates at positions B1.
[0098] In one embodiment, the temporal candidates are derived as follows: In one example, only one temporal merge candidate is added to the candidate list. FIG. 11 shows an example of motion vector scaling for a temporal merge candidate. To derive a temporal merge candidate for a current CU (1111) in a current picture (1101), a scaled MV (1121) (e.g., shown by dotted lines in FIG. 11) can be derived based on a co-located CU (1112) belonging to a co-located reference picture (1104). The reference picture list used to derive the co-located CU (1112) can be explicitly signaled in the slice header. The scaled MV (1121) for the temporal merge candidate can be obtained as shown by dotted lines in FIG. 11. The scaled MV (1121) can be scaled from the MV of the co-located CU (1112) using picture order count (POC) distances tb and td. The POC distance tb may be defined as the POC difference between the current reference picture (1102) of the current picture (1101) and the current picture (1101). The POC distance td may be defined as the POC difference between the co-located reference picture (1104) of the co-located picture (1103) and the co-located picture (1103). The reference picture index of the temporal merge candidate may be set to 0.
[0099] FIG. 12 shows exemplary candidate positions (e.g., C0 and C1) of temporal merge candidates for the current CU. The position of the temporal merge candidate can be selected between candidate position C0 and candidate position C1. Candidate position C0 is located at the bottom right corner of the co-located CU (1210) of the current CU. Candidate position C1 is located at the center of the co-located CU (1210) of the current CU (1210). If the CU at candidate position C0 is not available, is intra-coded, or is outside the current row of the CTU, candidate position C1 is used to derive the temporal merge candidate. Otherwise, for example, if the CU at candidate position C0 is available, is intra-coded, and is in the current row of the CTU, candidate position C0 is used to derive the temporal merge candidate.
[0100] Adaptive motion vector resolution (AMVR) modes can be used in video / image coding such as VVC. In some technologies such as video coding standards HEVC and AVC / H.264, a fixed motion vector resolution (MVR) of 1 / 4 luma sample (or 1 / 4 pel) is used. Typically, an optimal trade-off between displacement vector rate and prediction error rate is selected to optimize rate-distortion. In related technologies such as VVC, AMVR mode is enabled when the MVR can be selected from multiple MVRs, e.g., at the coding block level, thus trading off bit rate against fidelity in signaling motion parameters. AMVR mode can be signaled, e.g., at the coding block level, when at least one component of the MVD is not equal to 0. The motion vector predictor (MVP) can be rounded to a given MVR such that the resulting MV (e.g., the sum of the MVP and MVD) can fit into the grid of the given MVR.
[0101] In some examples, a flag such as an AMVR flag (e.g., amvr_flag) specifies the resolution (e.g., MVR) of the MVD. In one example, an AMVR flag (e.g., amvr_flag) equal to 0 specifies that the MVR of the MVD is ¼ luma sample (¼ pel). An AMVR flag (e.g., amvr_flag) equal to 1 specifies that the MVR of the MVD is further specified by additional information such as an index (e.g., AMVR precision index). For example, the coding block is predicted in AMVP mode and the AMVR flag (e.g., amvr_flag) is 1, thus the MVR is ½ luma sample (½ pel), 1 luma sample (1 pel) or 4 luma samples (4 pels) if the AMVR precision index is 0, 1 or 2, respectively.
[0102] Template matching (TM) techniques can be used in video / image coding. To further improve the compression efficiency of the VVC standard, for example, TM can be used to refine MV. In one example, TM is used at the decoder side. With the TM mode, MV can be refined by constructing a template (e.g., a current template) of a block (e.g., a current block) in a current picture and determining the closest match between the template of the block in the current picture and multiple possible templates (e.g., multiple possible reference templates) in a reference picture. In one embodiment, the template of the block in the current picture can include the left neighboring reconstructed sample of the block and the top neighboring reconstructed sample of the block. TM can be used in video / image coding beyond VVC.
[0103] 13 shows an example of template matching (1300). The TM can be used to derive motion information for the current CU (1301) (e.g., derive final motion information from initial motion information such as initial MV 1302) by determining the closest match between a template (1321) of a current CU (1301) in a current picture (1310) and a template of multiple possible templates (e.g., one of the multiple possible templates is template (1325)) in a reference picture (1311). The template (1321) of the current CU (1301) can have any suitable shape and any suitable size.
[0104] In one embodiment, the template (1321) of the current CU (1301) includes a top template (1322) and a left template (1323). Each of the top template (1322) and the left template (1323) may have any suitable shape and any suitable size.
[0105] The top template (1322) may include samples in one or more top neighboring blocks of the current CU (1301). In one example, the top template (1322) includes four rows of samples in one or more top neighboring blocks of the current CU (1301). The left template (1323) may include samples in one or more left neighboring blocks of the current CU (1301). In one example, the left template (1323) includes four columns of samples in one or more left neighboring blocks of the current CU (1301).
[0106] Each of the multiple possible templates (e.g., template (1325)) in the reference picture (1311) corresponds to a template (1321) in the current picture (1310). In one embodiment, the initial MV (1302) points from the current CU (1301) to a reference block (1303) in the reference picture (1311). Each of the multiple possible templates (e.g., template (1325)) in the reference picture (1311) and the template (1321) in the current picture (1310) may have the same shape and size. For example, the template (1325) of the reference block (1303) includes a top template (1326) in the reference picture (1311) and a left template (1327) in the reference picture (1311). The top template (1326) may include samples in one or more top neighboring blocks of the reference block (1303). The left template (1327) may include samples in one or more left neighboring blocks of the reference block (1303).
[0107] The TM cost can be determined based on a pair of templates, such as template (1321) and template (1325). The TM cost can indicate a match between the template (1321) and the template (1325). An optimized MV (or final MV) can be determined based on a search around the initial MV (1302) of the current CU (1301) within a search range (1315). The search range (1315) can have any suitable shape and any suitable number of reference samples. In one example, the search range (1315) in the reference picture (1311) includes a [-L,L] pel range, where L is a positive integer, such as 8 (e.g., 8 samples). For example, a difference (e.g., [0,1]) is determined based on the search range (1315), and an intermediate MV is determined by adding the initial MV (1302) and the difference (e.g., [0,1]). An intermediate reference block and a corresponding template in the reference picture (1311) can be determined based on the intermediate MV. The TM cost can be determined based on the template (1321) and the intermediate template in the reference picture (1311). The TM cost can correspond to a difference (e.g., [0,0], [0,1], etc., corresponding to the initial MV (1302)) determined based on a search range (1315). In one example, the difference corresponding to the smallest TM cost is selected, and the optimized MV is the sum of the difference corresponding to the smallest TM cost and the initial MV (1302). As described above, the TM can derive final motion information (e.g., optimized MV) from the initial motion information (e.g., initial MV 1302).
[0108] The TM can be modified appropriately. In one example, the search step size is determined by the AMVR mode. In one example, the TM can be cascaded (e.g., used together) with other coding methods such as a bilateral matching process.
[0109] In the related art, TM is adopted to refine the motion information of MVP candidates in AMVP mode and merge candidates in merge mode. TM can be used to sort MVP candidates in AMVP mode. MVR indexes (e.g., AMVR precision indexes) in AMVR mode are coded according to a fixed order, e.g., the relationship between MVR indexes and corresponding MVRs is fixed. For example, when the AMVR precision index is 0, 1, or 2, respectively, the MVR is 1 / 2 luma sample, 1 luma sample, or 4 luma sample.
[0110] A set of MVRs in AMVP mode (also referred to as a set of MV precisions) is available for coding the current block. According to an aspect of the present disclosure, template matching (TM) can be performed using the multiple MVRs in the set of MVRs. The TM can be performed by (i) determining a TM cost corresponding to each of the multiple MVRs based on motion information (e.g., motion information shared by the multiple MVRs) and each of the multiple MVRs, (ii) sorting the multiple MVRs based on the determined TM cost corresponding to each of the multiple MVRs, and (iii) selecting an MVR from the sorted multiple MVRs. The motion information can indicate MVP information used to determine MVP candidates and MVD information. In one example, the motion information shared by the multiple MVRs includes a candidate index that points to an MVP candidate in a candidate list. Based on the MVP candidates and the multiple MVRs indicated by the motion information, the MVPs of the multiple MVRs can be determined and thus can be different for the multiple MVRs. The MVs of the multiple MVRs used to determine the TM cost in TM can be determined based on the respective MVPs.
[0111] For each of a plurality of MVRs, such as 1 / 2 pel, a MV or MVP associated with the MVR (e.g., 1 / 2 pel) can be determined based on the MVR and motion information (e.g., a candidate index pointing to an MVP candidate in a candidate list). The MV / MVP associated with the MVR is determined based on the motion information and the MVR. The MV / MVP associated with the MVR can indicate a reference block associated with the MVR (e.g., 1 / 2 pel) in the reference picture. For example, the determined MV associated with the MVR (e.g., 1 / 2 pel) points from a current block in a current picture to a reference block associated with the MVR (e.g., 1 / 2 pel) in the reference picture. A cost (e.g., TM cost) corresponding to the MVR (e.g., 1 / 2 pel) can be determined based on a template of a current block in a current picture and a reference template of a reference block associated with the MVR (e.g., 1 / 2 pel) in the reference picture. The plurality of MVRs can be ranked (e.g., sorted) based on their respective determined TM costs. In one example, if a flag (eg, sps_amvr_enabled_flag) is true, multiple MVRs are ranked (eg, sorted) in ascending order of TM cost.
[0112] In one example, the set of MVRs in AMVP mode includes 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel. In one example, the plurality of MVRs is a set of MVRs. In another example, the plurality of MVRs is a subset of the set of MVRs excluding the highest resolution (e.g., 1 / 4 pel). For example, the plurality of MVRs includes 1 / 2 pel, 1 pel, and 4 pel, and excludes 1 / 4 pel.
[0113] In one embodiment, the set of MVRs includes 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel. FIG. 14 shows an example of template matching (1400) applied to the set of MVRs. Template matching can be performed on a current template (1421) for a current block (1401) in a current picture (1410) and reference templates (1451)-(1454) for respective reference blocks (1431)-(1434) in a reference picture (1411). The current template (1421) can have any suitable shape and any suitable size. The shape and size of the reference templates (1451)-(1454) can be matched to the shape and size of the current template (1421), respectively. In one embodiment, the current template (1421) includes a top template and a left template.
[0114] The MV (1441) corresponding to 1 / 4-pel resolution points from the current block (1401) to the reference block (1431) in the reference picture (1411). The MV (1442) corresponding to 1 / 2-pel resolution points from the current block (1401) to the reference block (1432) in the reference picture (1411). The MV (1443) corresponding to 1-pel resolution points from the current block (1401) to the reference block (1433) in the reference picture (1411). The MV (1444) corresponding to 4-pel resolution points from the current block (1401) to the reference block (1434) in the reference picture (1411).
[0115] Template matching between the current template (1421) of the current block (1401) and each of the reference templates (1451) to (1454) in the reference picture (1411) can be performed as follows: A TM cost (TM0) is calculated based on the reference template (1451) and the current template (1421). A TM cost (TM1) is calculated based on the reference template (1452) and the current template (1421). A TM cost (TM2) is calculated based on the reference template (1453) and the current template (1421). A TM cost (TM4) is calculated based on the reference template (1454) and the current template (1421). The TM costs can be determined based on the sum of absolute differences (SAD) between the current template (1421) and each of the reference templates (e.g., (1451)). Other functions such as the sum of squared errors (SSE), variance, partial SAD, etc. can also be used to determine the TM cost.
[0116] The MVRs can then be ranked (e.g., sorted) based on TM cost, for example, in ascending order of corresponding TM costs between the current template (1421) and the reference templates (1451)-(1454) corresponding to the set of MVRs. In one example, the set of MVRs includes 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel, with ascending TM costs TM2, TM1, TM3, and TM0. TM2 is the smallest among TM0-TM3. The set of MVRs can be ranked (e.g., sorted) as 1 pel, 1 / 2 pel, 4 pel, and 1 / 4 pel.
[0117] A flag such as a TM-AMVR flag (e.g., tm_amvr_flag) can be used to indicate which MVR is currently selected for the block (1401). In one example, a TM-AMVR flag (e.g., tm_amvr_flag) being negative indicates that the first MVR (e.g., 1-pel) corresponding to the smallest TM cost (e.g., TM2) among the TM costs (e.g., TM0-TM3) is selected. If the TM-AMVR flag (e.g., tm_amvr_flag) is true, an index such as a TM-AMVR precision index (e.g., tm_amvr_precision_idx) can be further signaled to indicate, for example, which MVR is currently selected for the block (1401). The MVR can be selected from the remaining MVRs (e.g., TM0, TM1, and TM3) in the set of MVRs excluding the first MVR (e.g., 1-pel). For example, the remaining ranked MVRs are TM1, TM3, and TM0. An AMVR precision index (e.g., tm_amvr_precision_idx) of 0, 1 or 2 indicates that the MVR is TM1, TM3 or TM0, respectively.
[0118] An exemplary pseudo syntax is shown in Table 1 below. If certain conditions are met, such as AMVR mode is enabled (e.g., sps_amvr_enabled_flag is true), affine mode is not enabled (e.g., inter_affine_flag is false), and at least one component of the MVD of the current block (1401) is not equal to 0, then the TM-AMVR flag (e.g., tm_amvr_flag) is signaled. If the TM-AMVR flag (e.g., tm_amvr_flag) is false, then the first MVR corresponding to the smallest TM cost among the TM costs is selected, and the TM-AMVR precision index (e.g., tm_amvr_precision_idx) is not signaled. Otherwise, if the TM-AMVR flag (e.g., tm_amvr_flag) is true, then the TM-AMVR precision index (e.g., tm_amvr_precision_idx) is signaled. [Table 1]
[0119] In one embodiment, TM is applied to all or a portion of the MVRs in a set of MVRs. For example, the set of MVRs includes ¼ pel, ½ pel, 1 pel, and 4 pel, and the MVRs to which TM is applied include ½ pel, 1 pel, and 4 pel, but exclude ¼ pel. In this case, if a flag, such as the AMVR flag, is false, ¼ pel is used to code the current block (1401).
[0120] Template matching can be performed for multiple MVRs (e.g., 1 / 2 pel, 1 pel, and 4 pel) as a variation of FIG. 14. For example, TM costs TM1, TM2, and TM3 corresponding to 1 / 2 pel, 1 pel, and 4 pel, respectively, are calculated as described in FIG. 14, and TM0 is not calculated. Then, the multiple MVRs (e.g., 1 / 2 pel, 1 pel, and 4 pel) are sorted in ascending order of corresponding TM costs (e.g., TM2, TM1, and TM3, with TM2 being the smallest among TM1, TM2, and TM3) between the current template (1421) in the current picture (1410) and the reference blocks (e.g., (1432) to (1434)) in the reference picture (1411). The multiple MVRs can be ranked (e.g., sorted) as 1 pel, 1 / 2 pel, and 4 pel. An index such as a TM-AMVR precision index (e.g., tm_amvr_precision_idx) is signaled to indicate, for example, which MVR is currently selected for the block. The MVR can be selected from multiple MVRs (e.g., TM1-TM3). A TM-AMVR precision index (e.g., tm_amvr_precision_idx) of 0, 1 or 2 indicates that the MVR is TM2, TM1 or TM3, respectively.
[0121] An exemplary pseudo syntax is shown in Table 2 below. If certain conditions are met, such as AMVR mode is enabled (e.g., sps_amvr_enabled_flag is true), affine mode is not enabled (e.g., inter_affine_flag is false), and at least one component of the MVD of the current block (1401) is not equal to 0, then the AMVR flag (e.g., amvr_flag) is signaled. If the AMVR flag (e.g., amvr_flag) is false, then 1 / 4 pel is selected and the TM-AMVR precision index (e.g., tm_amvr_precision_idx) is not signaled. Otherwise, if the AMVR flag (e.g., amvr_flag) is true, then the TM-AMVR precision index (e.g., tm_amvr_precision_idx) is signaled. [Table 2]
[0122] In one embodiment, TM is applied to a set of MVRs. For example, the set of MVRs includes ¼ pel, ½ pel, 1 pel, and 4 pel. Template matching can be performed on the set of MVRs. For example, TM costs TM0-TM3 corresponding to ¼ pel, ½ pel, 1 pel, and 4 pel, respectively, are calculated as shown in FIG. 14. Then, the set of MVRs is sorted in ascending order of corresponding TM costs (e.g., TM2, TM1, TM3, and TM0, with TM2 being the smallest among TM0-TM3) between the current template (1421) in the current picture (1410) and the reference templates (e.g., (1451)-(1454)) in the reference picture (1411). The set of MVRs can be ranked (e.g., sorted) as 1 pel, ½ pel, 4 pel, and ¼ pel.
[0123] The TM-AMVR flag (e.g., tm_amvr_flag) can be set as true if the MVR (e.g., 1 pel) with the smallest TM cost (e.g., TM2) is selected. Otherwise, the TM-AMVR flag (e.g., tm_amvr_flag) can be set as false and normal AMVR signaling is used. In normal AMVR signaling, the AMVR flag is signaled. When the AMVR flag is false, 1 / 4 pel is used to code the current block. When the AMVR flag is true, an AMVR precision index (e.g., amvr_precision_idx) is signaled to indicate, for example, which MVR among multiple MVRs (e.g., TM1-TM3) is selected for the current block. The MVR can be selected from multiple MVRs (e.g., TM1-TM3). An AMVR precision index (e.g., amvr_precision_idx) of 0, 1, or 2 indicates that the MVR is TM1, TM2, or TM3, respectively.
[0124] An exemplary pseudo syntax is shown in Table 3 below. If certain conditions are met, such as AMVR mode is enabled (e.g., sps_amvr_enabled_flag is true), affine mode is not enabled (e.g., inter_affine_flag is false), and at least one component of the MVD of the current block is not equal to 0, then the TM-AMVR flag (e.g., tm_amvr_flag) is signaled. If the TM-AMVR flag (e.g., tm_amvr_flag) is false, then the following is performed. For example, the AMVR flag (e.g., amvr_flag) is signaled. If the AMVR flag (e.g., amvr_flag) is false, then 1 / 4 pel is selected and the AMVR precision index (e.g., amvr_precision_idx) is not signaled. Otherwise, if the AMVR flag (e.g., amvr_flag) is true, then the AMVR precision index (e.g., amvr_precision_idx) is signaled. [Table 3]
[0125] In one embodiment, an AMVR flag (eg, amvr_flag) is signaled to indicate whether AMVR mode is enabled.
[0126] If AMVR mode is not enabled (eg, the AMVR flag is false), 1 / 4 pel can be selected.
[0127] If the AMVR mode is enabled (eg, the AMVR flag is true), a TM-AMVR flag (eg, tm_amvr_flag) is signaled to indicate whether the MVR with the smallest TM cost is selected.
[0128] If the TM-AMVR flag (e.g., tm_amvr_flag) is true, template matching is applied to the multiple MVRs (e.g., 1 / 2 pel, 1 pel, and 4 pel) excluding 1 / 4 pel. For example, TM costs TM1, TM2, and TM3 corresponding to 1 / 2 pel, 1 pel, and 4 pel, respectively, are calculated as described in FIG. 14, and TM0 is not calculated. Then, the multiple MVRs (e.g., 1 / 2 pel, 1 pel, and 4 pel) are sorted in ascending order of corresponding TM costs (e.g., TM2, TM1, and TM3, with TM2 being the smallest among TM1 to TM3) between the current template (1421) in the current picture (1410) and the reference templates (e.g., (1452) to (1454)) in the reference picture (1411). The multiple MVRs can be ranked (e.g., sorted) as 1 pel, 1 / 2 pel, and 4 pel. An MVR (eg, 1-pel) is selected corresponding to the smallest TM cost (eg, TM2) among multiple MVRs (eg, 1 / 2-pel, 1-pel, and 4-pel), excluding 1 / 4-pel.
[0129] If the TM-AMVR flag (e.g., tm_amvr_flag) is set to false, the AMVR precision index is signaled and the MVR is selected based on the AMVR precision index without reordering the MVRs. For example, if the AMVR precision index is 0, 1, or 2, respectively, the MVR is 1 / 2 pel, 1 pel, or 4 pel. [Table 4]
[0130] An exemplary pseudo syntax is shown in Table 4 below. If certain conditions are met, such as AMVR mode is enabled (e.g., sps_amvr_enabled_flag is true), affine mode is not enabled (e.g., inter_affine_flag is false), and at least one component of the MVD of the current block is not equal to 0, then the AMVR flag (e.g., amvr_flag) is signaled. If the AMVR flag (e.g., amvr_flag) is true, then the following is performed. For example, the TM-AMVR flag (e.g., tm_amvr_flag) is signaled. If the TM-AMVR flag (e.g., tm_amvr_flag) is false, then the AMVR precision index (e.g., amvr_precision_idx) is signaled. Otherwise, if the TM-AMVR flag (e.g., tm_amvr_flag) is true, then the AMVR precision index (e.g., amvr_precision_idx) is not signaled.
[0131] The above description is applicable to blocks coded with unidirectional prediction. The above description is applicable to scenarios where blocks are coded with bidirectional prediction.
[0132] In one example, when a bi-prediction mode is used, a current block in a current picture can be coded using a first reference picture in reference list 0 (L0) and a second reference picture in reference list 1 (L1). According to an embodiment of the present disclosure, template matching can be applied to calculate a TM cost associated with bi-prediction and rank (e.g., sort) MVRs associated with bi-prediction based on the calculated TM cost. For each MVR among the multiple MVRs in the set of MVRs for the current block, two TM costs for L0 and L1 can be calculated respectively. Alternatively, a combination formula can be used to calculate a single TM cost for each MVR based on L0 and L1. In one example, the multiple MVRs is a set of MVRs and includes 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel. In one example, the multiple MVRs include 1 / 2 pel, 1 pel, and 4 pel, and exclude 1 / 4 pel.
[0133] Figure 15 shows an example of template matching (1500) applied to multiple MVRs when a current block (1401) is predicted using bidirectional prediction mode. The current block (1401), current picture (1410), current template (1421), MVs (1441)-(1444), reference templates (1451)-(1454), reference blocks (1431)-(1434), and reference picture (1411) in Figure 15 are described in Figure 14.
[0134] Referring to FIG. 15, the MVs (1441)-(1444), the reference templates (1451)-(1454), the reference blocks (1431)-(1434), and the reference picture (1411) are called the first MVs (1441)-(1444), the first reference templates (1451)-(1454), the first reference blocks (1431)-(1434), and the first reference picture (1411), respectively. The current block (1401) is predicted based on the first reference picture (1411) from L0 and the second reference picture (1511) from L1. The second MVs (1541)-(1544) correspond to sets of MVRs such as 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel, respectively. The second MVs (1541) to (1544) respectively point to the second reference blocks (1531) to (1534) in the second reference picture (1511) from the current block (1401). The second reference templates (1551) to (1554) are associated with the second reference blocks (1531) to (1534), respectively.
[0135] In one embodiment, the reordering of MVRs of each reference list is applied by using the TM costs of all possible MVRs of each reference list, respectively. Referring to FIG. 15, as described in FIG. 14, a first TM cost (e.g., TM10-TM13) is calculated for each of the multiple MVRs based on the current template (1421) of the current picture (1410) and the first reference templates (1451)-(1454) of the first reference picture (1411). For example, TM10-TM13 are equal to TM0-TM3, respectively. As described in FIG. 14, a second TM cost (e.g., TM20-TM23) is calculated for each of the multiple MVRs based on the current template (1421) of the current picture (1410) and the second reference templates (1551)-(1554) of the second reference picture (1511).
[0136] The multiple MVRs of L0 can be ranked (e.g., sorted) based on the first TM cost, such as ascending order of first TM cost. In one example, the ascending order of first TM cost (e.g., TM10-TM13) is TM12, TM11, TM13, and TM10. In this example, TM12 has the smallest TM cost among TM10-TM13. The multiple MVRs of L0 can be ranked (e.g., sorted) as 1-pel, 1 / 2-pel, 4-pel, and 1 / 4-pel for L0.
[0137] The multiple MVRs of L1 can be ranked (e.g., sorted) based on the second TM cost, such as ascending order of second TM cost. In one example, the ascending order of second TM cost is TM23, TM20, TM21, and TM23. In this example, TM23 has the smallest TM cost among TM20 to TM23. The multiple MVRs of L1 can be ranked (e.g., sorted) as 4-pel, 1 / 4-pel, 1 / 2-pel, and 1-pel.
[0138] A common MV precision index can be signaled for both reference list 0 and reference list 1 to indicate which reordered MVR is used, respectively. In one example, the ordering of MVRs for L0 and L1 is different, as described above. For example, the MVRs for L0 are ranked (e.g., reordered) as 1-pel, 1 / 2-pel, 4-pel, and 1 / 4-pel for L0, and the MVRs for L1 are ranked (e.g., reordered) as 4-pel, 1 / 4-pel, 1 / 2-pel, and 1-pel. A common MV precision index of 0, 1, 2, or 3 indicates that 1-pel, 1 / 2-pel, 4-pel, or 1 / 4-pel is selected for L0, and 4-pel, 1 / 4-pel, 1 / 2-pel, or 1-pel is selected for L1. For example, a common MV precision index of 1 indicates that the second best MVR for L0 (e.g., 1 / 2-pel) is selected for L0, and the second best MVR for L1 (e.g., 1 / 4-pel) is selected for L1.
[0139] In one embodiment, as described above with reference to FIG. 15, the MVR order of the two lists L0 and L1 are independently refined based on template matching. Two MV precision indexes can be signaled for the two lists L0 and L1, respectively. For example, the MVRs of L0 are ranked (e.g., reordered) as 1 pel, ½ pel, 4 pel, and ¼ pel for L0, and the MVRs of L1 are ranked (e.g., reordered) as 4 pel, ¼ pel, ½ pel, and 1 pel. A first MV precision index of 0, 1, 2, or 3 indicates that 1 pel, ½ pel, 4 pel, or ¼ pel is selected for L0. A second MV precision index of 0, 1, 2, or 3 indicates that 4 pel, ¼ pel, ½ pel, or 1 pel is selected for L1. For example, a first MV precision index of 1 indicates that ½ pel is selected for L0, and a second MV precision index of 2 indicates that 4 pels are selected for L1.
[0140] In one embodiment, the sorting of the multiple MVRs is derived using the TM costs of the multiple MVRs in ascending order of TM cost. The TM cost of each MVR can be calculated by using a combination formula of the first TM cost from reference list 0 and the second TM cost from reference list 1. The combination formula can be implemented as a weighted sum of the TM costs from the two reference lists L0 and L1, or the minimum or maximum cost between the first TM cost from reference list 0 and the second TM cost from reference list 1. The order of the multiple MVRs in the two lists L0 and L1 is the same.
[0141] The first TM cost of L0 (e.g., TM10-TM13) and the second TM cost of L1 (e.g., TM20-TM23) are calculated as shown in FIG. 15. In one example, the combined formula of MVR is the weighted sum of the first TM cost of MVR of L0 and the corresponding second TM cost of MVR of L1. Thus, the combined TM cost of L0 and L1 (e.g., TM c 0~TM c3) corresponds to the first TM cost of L0 (e.g., TM10 to TM13) and the second TM cost of L1 (e.g., TM20 to TM23). For example, the combined TM cost TM c 0 is the weighted sum of TM10 and TM20.
[0142] In one example, the combined formula for the MVR is the minimum of the first TM cost of the MVR of L0 and the corresponding second TM cost of the MVR of L1. For example, the combined TM cost TM c0 TM 10 and T.M. 20 is the minimum cost.
[0143] In one example, the combined formula for the MVR is the maximum cost of the first TM cost of the MVR of L0 and the corresponding second TM cost of the MVR of L1. For example, the combined TM cost TM c0 TM 10 and T.M. 20 is the maximum cost.
[0144] The above description of the MVR combination formula indicates that the first TM cost of the first MVR in L0 and the corresponding second TM cost of the second MVR in L1 are combined into a combination TM cost TM c (i,j) and can accommodate when the first MVR and the second MVR are different. In one example, i is an integer 0, 1, 2, or 3, and j is an integer 0, 1, 2, or 3. The combined TM cost can have 16 different combinations of the first TM cost of the first MVR in L0 and the corresponding second TM cost of the second MVR in L1.
[0145] The embodiments related to bi-prediction are described with respect to a number of MVRs including 1 / 4-pel, 1 / 2-pel, 1-pel, and 4-pel. The description using bi-prediction can be applied when the number of MVRs includes fewer MVRs or more MVRs, for example, when the number of MVRs includes 1 / 2-pel, 1-pel, and 4-pel, and excludes 1 / 4-pel. The pseudo syntax described in Tables 1-4 can also be applied to bi-prediction.
[0146] FIG. 16 shows a flow chart outlining an encoding process (1600) according to an embodiment of the present disclosure. In various embodiments, the process (1600) is performed by processing circuitry, such as processing circuitry in terminal devices (310), (320), (330), and (340), processing circuitry that performs the functions of a video encoder (e.g., (403), (603), (703)). In some embodiments, the process (1600) is implemented with software instructions, and thus the processing circuitry performs the process (1600) when the processing circuitry executes the software instructions. The process begins at (S1601) and proceeds to (S1610).
[0147] At (S1610), for a current block in a current picture, (i) determine a TM cost corresponding to each of a plurality of motion vector (MV) resolutions (MVRs) based on a plurality of MV resolutions and motion information (e.g., motion information shared by a plurality of MVRs), and (ii) perform template matching (TM) on a plurality of MVRs in a set of MV resolutions by ranking (e.g., sorting) the plurality of MV resolutions based on the respective determined TM costs and selecting an MVR from the ranked plurality of MVRs. The set of MV resolutions is available for the current block. The set of MV resolutions may include ¼-pel, ½-pel, 1-pel, and 4-pel.
[0148] 14 or 15, for each of the multiple MVRs (e.g., 1 / 2 pel) in the set of MVRs, a first reference block (e.g., (1432)) in a first reference picture (e.g., (1411)) can be determined based on a current block (e.g., (1401)) in a current picture (e.g., (1410)), motion information, and the respective MV resolution (e.g., 1 / 2 pel). For example, the motion information and the respective MV resolution (e.g., 1 / 2 pel) indicate an MV (1442) associated with the MVR (e.g., 1 / 2 pel), and the MV (1442) points from the current block (1401) to the first reference block (e.g., 1432). The TM cost (e.g., TM1 in FIG. 14 or TM 01 ) can be determined based on a first reference template (e.g., (1452)) of a first reference block (e.g., 1432) in a first reference picture (e.g., 1411) and a current template (e.g., (1421)) of a current block (e.g., (1401)) in a current picture (e.g., (1410)). Thus, TM costs corresponding to multiple MVRs can be determined.
[0149] In one example, the multiple MVRs for which the TM costs are determined are a set of MV resolutions, and thus, TM costs (e.g., TM0-TM3) corresponding to a set of MV resolutions (e.g., 1 / 4-pel, 1 / 2-pel, 1-pel, and 4-pel) can be determined.
[0150] In another example, the multiple MVRs for which the TM costs are determined include 1 / 2-pel, 1-pel, and 4-pel, and exclude 1 / 4-pel. Thus, TM costs (e.g., TM1-TM3) corresponding to 1 / 2-pel, 1-pel, and 4-pel, respectively, can be determined.
[0151] In one embodiment, the plurality of MVRs is a set of MVRs (e.g., 1 / 4-pel, 1 / 2-pel, 1-pel, and 4-pel). For example, the TM costs in ascending order are TM2, TM1, TM3, and TM0. TM2 has the smallest TM cost among TM0-TM3. The set of MVRs can be ranked (e.g., sorted) as 1-pel, 1 / 2-pel, 4-pel, and 1 / 4-pel, corresponding to the ascending order of TM costs.
[0152] In one example, the first MVR (eg, 1 pel) corresponding to the smallest TM cost (eg, TM2) among the determined TM costs is selected as the MVR used to encode the current block.
[0153] In one example, the first MVR (e.g., 1 pel) is not selected as the MVR used to encode the current block. The MVR used to encode the current block is selected from the remaining MVRs (e.g., 1 / 2 pel, 4 pel, and 1 / 4 pel) in the ranked plurality of MVRs. The remaining MVRs exclude the first MVR (e.g., 1 pel).
[0154] In one embodiment, the current block is coded with bi-prediction. The TM costs corresponding to the multiple MVRs can be determined based on the embodiment described in Figure 15 or the variation of the embodiment. With reference to Figure 15, for each of the multiple MVRs (e.g., 1 / 2 pel) in the set of MVRs, the TM cost corresponding to the MVR (e.g., 1 / 2 pel) can be determined based on a first TM cost and a second TM cost. The first TM cost can be determined based on a first reference template (e.g., 1452) of a first reference block (e.g., 1432) in a first reference picture (e.g., 1411) and a current template (e.g., 1421) of a current block (e.g., 1401) in a current picture (e.g., 1410). The second TM cost can be determined based on a second reference template (e.g., 1552) of a second reference block (e.g., 1532) in a second reference picture (e.g., 1511) and a current template (e.g., 1421) of a current block (e.g., 1401) in a current picture (e.g., 1410).
[0155] In one example, for each of a plurality of MVRs in the set of MVRs, the TM cost is a weighted sum of the first TM cost and the second TM cost.
[0156] In one example, for each of the multiple MVRs in the set of MVRs, the TM cost is the minimum or maximum of the first TM cost and the second TM cost.
[0157] At (S1620), the current block may be encoded based on the selected MVR using an adaptive motion vector prediction (AMVP) mode. Prediction information indicating (i) that the current block is to be in AMVP mode with adaptive motion vector resolution (AMVR) mode and (ii) motion information may be encoded.
[0158] In one example, the prediction information indicates whether to apply a first MVR (eg, 1 pel) corresponding to the smallest TM cost (eg, TM2) to the current block.
[0159] In one example, if the current block is coded with bidirectional prediction, the prediction information indicates that the current block is coded with bidirectional prediction.
[0160] At (S1630), the encoded current block and / or prediction information may be included in the video bitstream.
[0161] The process (1600) then proceeds to (S1699) and ends.
[0162] The process 1600 may be adapted to various scenarios and the steps in the process 1600 may be adjusted accordingly. One or more steps in the process 1600 may be adapted, omitted, repeated, and / or combined. Any suitable order may be used to implement the process 1600. Additional steps may be added.
[0163] In one example, the first MVR (e.g., 1 pel) corresponding to the smallest TM cost is not applied to the current block. The second MVR is selected based on the remaining MVRs (e.g., 1 / 2 pel, 4 pel, and 1 / 4 pel) in the ranked MVRs. The remaining MVRs exclude the first MVR corresponding to the smallest TM cost. An index indicating the second MVR, such as a TM-AMVR precision index (e.g., tm_amvr_precision_idx), can be encoded into the video bitstream at (S1630). For example, a TM-AMVR precision index of 0, 1, or 2 indicates that the second MVR is 1 / 2 pel, 4 pel, or 1 / 4 pel.
[0164] In one embodiment, the set of MVRs (e.g., 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel) includes an MVR (e.g., 1 / 4 pel) that is not in the plurality of MVRs (e.g., 1 / 2 pel, 1 pel, and 4 pel) for which the TM cost is determined. The MVR (e.g., 1 / 4 pel) is not applied to the current block. The prediction information may indicate that the MVR (e.g., 1 / 4 pel) is not applied to the current block. The other MVR may be selected based on the ranked plurality of MVRs (e.g., 1 pel, 1 / 2 pel, and 4 pel). An index indicating the other MV resolution, such as a TM-AMVR precision index (e.g., tm_amvr_precision_idx), is encoded into the video bitstream. For example, a TM-AMVR precision index of 0, 1, or 2 indicates that the other MVR is 1 pel, 1 / 2 pel, or 4 pel.
[0165] 17 is a flow chart outlining a decoding process (1700) according to one embodiment of the present disclosure. In various embodiments, the process (1700) is performed by processing circuitry such as processing circuitry in the terminal devices (310), (320), (330), and (340), processing circuitry performing the functions of the video encoder (403), processing circuitry performing the functions of the video decoder (410), processing circuitry performing the functions of the video decoder (510), processing circuitry performing the functions of the video encoder (603), etc. In some embodiments, the process (1700) is implemented with software instructions, and thus the processing circuitry performs the process (1700) as the processing circuitry executes the software instructions. The process begins at (S1701) and proceeds to (S1710).
[0166] At (S1710), prediction information for a current block in a current picture can be decoded from the coded video bitstream. The prediction information can indicate (i) that an adaptive motion vector prediction (AMVP) mode with an adaptive motion vector resolution (AMVR) mode is applied to the current block, and (ii) motion information. A set of motion vector (MV) resolutions (MVR, MV resolution) in the AMVR mode are available for the current block.
[0167] The MVR set can include 1 / 4 pel, 1 / 2 pel, 1 pel and 4 pel.
[0168] At (S1720), template matching (TM) can be performed on multiple MVRs in the set of MVRs.
[0169] The TM may be performed by (i) determining a respective TM cost corresponding to each of the multiple MVRs based on the multiple MVRs and the motion information, (ii) ranking (e.g., sorting) the multiple MVRs based on the determined TM costs corresponding to each of the multiple MVRs, and (iii) selecting an MV resolution from the ranked multiple MVRs. In one example, the selected MVR is used to decode the current block.
[0170] 14 or 15, for each of the multiple MVRs (e.g., 1 / 2 pel) in the set of MVRs, a first reference block (e.g., 1432) in a first reference picture (e.g., 1411) can be determined based on a current block (e.g., 1401) in a current picture (e.g., 1410), motion information, and the respective MVR. For example, the motion information and the respective MVR (e.g., 1 / 2 pel) indicate a MV (1442) associated with the MVR (e.g., 1 / 2 pel), and the MV 1442 points from the current block (1401) to the first reference block (e.g., 1432). The TM cost (e.g., TM1 in FIG. 14 or TM2 in FIG. 15) can be calculated based on the current block (e.g., 1401) in the current picture (e.g., 1410), motion information, and the respective MVR. 11 ) can be determined based on the first reference template (e.g., (1452)) of the first reference block (e.g., 1432) in the first reference picture (e.g., 1411) and the current template (e.g., 1421) of the current block (e.g., 1401) in the current picture (e.g., 1410). Therefore, the TM cost (e.g., TM0 to TM3 in FIG. 14 or TM1 in FIG. 15) corresponding to multiple MVRs can be determined based on the first reference template (e.g., (1452)) of the first reference block (e.g., 1432) in the first reference picture (e.g., 1411) and the current template (e.g., 1421) of the current block (e.g., 1401) in the current picture (e.g., 1410). 10 ~TM 13 ) can be determined.
[0171] In one example, the multiple MVRs for which the TM cost is determined are a set of MVRs, and thus, TM costs (e.g., TM0-TM3) corresponding to the set of MVRs (e.g., 1 / 4-pel, 1 / 2-pel, 1-pel, and 4-pel) can be determined.
[0172] In another example, the multiple MVRs for which the TM costs are determined include 1 / 2-pel, 1-pel, and 4-pel, and exclude 1 / 4-pel. Thus, TM costs (e.g., TM1-TM3) corresponding to 1 / 2-pel, 1-pel, and 4-pel, respectively, can be determined.
[0173] In one embodiment, the multiple MVRs for which TM cost is determined are a set of MVRs (e.g., 1 / 4-pel, 1 / 2-pel, 1-pel, and 4-pel). For example, the TM costs in ascending order are TM2, TM1, TM3, and TM0. TM2 has the smallest TM cost among TM0-TM3. The set of MVRs can be ranked (e.g., sorted) as 1-pel, 1 / 2-pel, 4-pel, and 1 / 4-pel.
[0174] The prediction information indicates whether the first MVR is applied to the current block. The first MVR corresponds to the smallest TM cost (e.g., TM2) among the determined TM costs. If it is indicated that the first MVR (e.g., 1 pel) is applied to the current block, the first MVR is selected as the MVR used to decode the current block.
[0175] If the first MVR (e.g., 1 pel) is indicated not to apply to the current block, the MVR used to decode the current block is selected from the remaining MVRs (e.g., 1 / 2 pel, 4 pel, and 1 / 4 pel) in the ranked plurality of MVRs, the remaining MVRs excluding the first MVR (e.g., 1 pel).
[0176] In one example, the first MVR (e.g., 1-pel) is not applied to the current block. In the coded video bitstream, an index such as a TM-AMVR precision index (e.g., tm_amvr_precision_idx) is decoded. Based on the index (e.g., tm_amvr_precision_idx), a second MVR is selected from the remaining MVRs (e.g., 1 / 2-pel, 4-pel, and 1 / 4-pel) in the ranked multiple MVRs, which exclude the first MVR. For example, a TM-AMVR precision index of 0, 1, or 2 indicates that the second MVR is 1 / 2-pel, 4-pel, or 1 / 4-pel.
[0177] In one embodiment, the set of MVRs (e.g., 1 / 4 pel, 1 / 2 pel, 1 pel, and 4 pel) includes MVRs (e.g., 1 / 4 pel) that are not in the plurality of MVRs (e.g., 1 / 2 pel, 1 pel, and 4 pel) for which the TM cost is determined. The prediction information indicates that the excluded MVR (e.g., 1 / 4 pel) is not applied to the current block. An index such as a TM-AMVR precision index (e.g., tm_amvr_precision_idx) in the coded video bitstream is decoded. Based on the ranked plurality of MVRs (e.g., 1 pel, 1 / 2 pel, and 4 pel) and the index (e.g., tm_amvr_precision_idx), the other MVR can be selected. For example, a TM-AMVR precision index that is 0, 1, or 2 indicates that the other MVR is 1 pel, 1 / 2 pel, or 4 pel. The other MVR can be used to decode the current block.
[0178] In one embodiment, the prediction information indicates that the current block is coded with bi-prediction. The TM costs corresponding to the multiple MVRs can be determined based on the embodiment described in Figure 15 or the variation of Figure 15. Referring to Figure 15, for each of the multiple MVRs (e.g., 1 / 2 pel) in the set of MVRs, the TM cost corresponding to the MVR (e.g., 1 / 2 pel) can be determined based on a first TM cost and a second TM cost. The first TM cost can be determined based on a first reference template (e.g., 1452) of a first reference block (e.g., 1432) in a first reference picture (e.g., 1411) and a current template (e.g., 1421) of a current block (e.g., 1401) in a current picture (e.g., 1410). The second TM cost can be determined based on a second reference template (e.g., 1552) of a second reference block (e.g., 1532) in a second reference picture (e.g., 1511) and a current template (e.g., 1421) of a current block (e.g., 1401) in a current picture (e.g., 1410).
[0179] In one example, for each of a plurality of MVRs in the set of MVRs, the TM cost is a weighted sum of the first TM cost and the second TM cost.
[0180] In one example, for each of the multiple MVRs in the set of MVRs, the TM cost is the minimum or maximum of the first TM cost and the second TM cost.
[0181] At (S1730), the current block can be reconstructed based on the selected MVR. The process (1700) proceeds to (S1799) and ends.
[0182] The process 1700 may be adapted to various scenarios as appropriate, and the steps in the process 1700 may be adjusted accordingly. One or more steps in the process 1700 may be adapted, omitted, repeated, and / or combined. Any suitable order may be used to implement the process 1700. Additional steps may be added.
[0183] The embodiments in this disclosure may be used individually or combined in any order. Furthermore, each of the methods (or embodiments), the encoder, and the decoder may be implemented by a processing circuit (e.g., one or more processors or one or more integrated circuits). In one example, the one or more processors execute a program stored on a non-transitory computer-readable medium.
[0184] The techniques described above can be implemented as computer software using computer-readable instructions and can be physically stored on one or more computer-readable media. For example, Figure 18 illustrates a computer system (1800) suitable for implementing certain embodiments of the disclosed subject matter.
[0185] Computer software can be coded using any suitable machine code or computer language and can be subject to assembly, compilation, linking, or similar mechanisms to produce code containing instructions that can be executed by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., either directly, or through interpretation, microcode execution, etc.
[0186] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, Internet of Things devices, etc.
[0187] 18 for computer system (1800) are exemplary in nature and are not intended to suggest any limitation as to the scope of use or functionality of the computer software implementing the embodiments of the present disclosure, nor should the arrangement of components be interpreted as having any dependency or requirement regarding any one or combination of components illustrated in the exemplary embodiment of computer system (1800).
[0188] The computer system (1800) may include certain human interface input devices that may be responsive to input by one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), and olfactory input (not shown). Human interface devices may also be used to capture certain media that are not necessarily directly related to conscious human input, such as audio (e.g., speech, music, ambient sounds), images (e.g., scanned images, photographic images obtained from still image cameras), and video (e.g., two-dimensional video, three-dimensional video including stereoscopic video).
[0189] The input human interface devices may include one or more (only one of each is shown) of a keyboard (1801), a mouse (1802), a trackpad (1803), a touch screen (1810), a data glove (not shown), a joystick (1805), a microphone (1806), a scanner (1807), and a camera (1808).
[0190] The computer system (1800) may also include certain human interface output devices. Such human interface output devices may stimulate one or more of the human user's senses, for example, through haptic output, sound, light, and smell / taste. Such human interface output devices may include haptic output devices (e.g., haptic feedback via a touch screen (1810), data gloves (not shown), or joystick (1805); although there may be haptic feedback devices that do not act as input devices), audio output devices (e.g., speakers (1809), headphones (not shown)), visual output devices (e.g., screens (1810) including CRT screens, LCD screens, plasma screens, OLED screens; each may or may not have touch screen input capability, each may or may not have haptic feedback capability, some of which may output two-dimensional visual output or higher than three-dimensional output through such means as stereoscopic output; virtual reality glasses (not shown), holographic displays, and smoke tanks (not shown)), and printers (not shown).
[0191] The computer system (1800) may also include human accessible storage devices and associated media, such as optical media including CD / DVD ROM / RW (1820) along with CD / DVD or similar media (1821), thumb drives (1822), removable hard drives or solid state drives (1823), legacy magnetic media such as tapes and floppy disks (not shown), specialized ROM / ASIC / PLD based devices (not shown) such as security dongles, etc.
[0192] Those skilled in the art should also understand that the term "computer-readable medium" as used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transitory signals.
[0193] The computer system (1800) may also include an interface (1854) to one or more communication networks (1855). The networks may be, for example, wireless, wired, optical. The networks may further be local, wide area, metropolitan, in-vehicle and industrial, real-time, delay tolerant, etc. Examples of networks include Ethernet, WLAN, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., TV wired or wireless wide area digital networks including cable television, satellite television, terrestrial broadcast television, in-vehicle and industrial including CANBus, etc. Certain networks usually require an external network interface adapter that is attached to a particular general-purpose data port or peripheral bus (1849) (e.g., a USB port of the computer system (1800)). Others are usually integrated into the core of the computer system (1800) by attachment to a system bus as described below (e.g., an Ethernet interface to a PC computer system or a cellular network interface to a smartphone computer system). Using any of these networks, computer system 1800 can communicate with other entities. Such communications may be unidirectional, receive only (e.g., broadcast television), unidirectional transmit only (e.g., CANbus to a specific CANbus device), or bidirectional, for example, to other computer systems using local or wide area digital networks. Specific protocols and protocol stacks may be used with each of these networks and network interfaces as described above.
[0194] The aforementioned human interface devices, human accessible storage devices, and network interfaces may be attached to a core (1840) of the computer system (1800).
[0195] The cores (1840) may include one or more central processing units (CPUs) (1841), graphics processing units (GPUs) (1842), specialized programmable processing units in the form of field programmable gate arrays (FPGAs) (1843), hardware accelerators for specific tasks (1844), graphics adapters (1850), etc. These devices may be connected through a system bus (1848), along with read only memory (ROM) (1845), random access memory (1846), internal mass storage devices (1847), such as internal non-user accessible hard drives, solid state drives (SSDs), etc. In some computer systems, the system bus (1848) may be accessible in the form of one or more physical plugs to allow expansion with additional CPUs, GPUs, etc. Peripheral devices may be attached directly to the core's system bus (1848) or through a peripheral bus (1849). In one example, a screen (1810) may be connected to the graphics adapter (1850). Architectures for peripheral buses include PCI, USB, and the like.
[0196] The CPU (1841), GPU (1842), FPGA (1843), and accelerator (1844) can execute certain instructions that, in combination, may constitute the above-mentioned computer code. The computer code may be stored in a ROM (1845) or a RAM (1846). Temporary data may be stored in the RAM (1846), while persistent data may be stored, for example, in an internal mass storage device (1847). Rapid storage and retrieval from any of the memory devices may be enabled through the use of a cache memory that may be closely associated with one or more of the CPU (1841), GPU (1842), mass storage device (1847), ROM (1845), RAM (1846), etc.
[0197] The computer-readable medium can have computer code thereon for performing various computer-implemented operations. The medium and computer code may be those specially designed and constructed for the purposes of the present disclosure, or they may be of the kind well known and available to those having skill in the computer software arts.
[0198] By way of example and not limitation, a computer system having the architecture (1800), and in particular the core (1840), can provide functionality as a result of the processor (including CPU, GPU, FPGA, accelerator, etc.) executing software embodied in one or more tangible computer readable media. Such computer readable media can be user accessible mass storage as introduced above as well as media associated with the specific storage of the core (1840) of a non-transitory nature such as the mass storage device (1847) internal to the core or ROM (1845). Software implementing various embodiments of the present disclosure can be stored in such devices and executed by the core (1840). The computer readable media can include one or more memory devices or chips depending on the particular needs. The software can cause the core (1840) and in particular the processor therein (including CPU, GPU, FPGA, etc.) to perform certain processes or certain specific portions thereof described herein, including defining data structures stored in RAM (1846) and modifying such data structures according to the processes defined by the software. Additionally or alternatively, the computer system may provide functionality as a result of logic hardwired or otherwise embodied in circuitry (e.g., accelerator (1844)), which may operate in place of or together with software to perform particular processes or portions of particular processes described herein. Reference to software includes logic, and vice versa, as appropriate. Reference to a computer-readable medium may include circuitry (e.g., an integrated circuit (IC)) that stores software for execution, circuitry that embodies logic for execution, or both, as appropriate. The present disclosure encompasses any suitable combination of hardware and software.
[0199] Appendix A: Acronyms JEM: joint exploration model VVC: versatile video coding BMS: benchmark set MV: Motion Vector HEVC: High Efficiency Video Coding SEI: Supplementary Enhancement Information VUI: Video Usability Information GOP: Group of Pictures TU: Transform Unit PU: Prediction Unit CTU: Coding Tree Unit CTB: Coding Tree Block PB: Prediction Block HRD: Hypothetical Reference Decoder SNR: Signal Noise Ratio CPU: Central Processing Unit GPU: Graphics Processing Unit CRT: Cathode Ray Tube LCD: Liquid-Crystal Display OLED: Organic Light-Emitting Diode CD: Compact Disc DVD: Digital Video Disc ROM: Read-Only Memory RAM: Random Access Memory ASIC: Application-Specific Integrated Circuit PLD: Programmable Logic Device LAN: Local Area Network GSM: Global System for Mobile communications LTE: Long-Term Evolution CANBus: Controller Area Network Bus USB: Universal Serial Bus PCI: Peripheral Component Interconnect FPGA: Field Programmable Gate Areas SSD: solid-state drive IC: Integrated Circuit CU: Coding Unit RD: Rate-Distortion
[0200] While this disclosure has described several exemplary embodiments, there are alterations, substitutions, and various substitute equivalents, which fall within the scope of this disclosure. Thus, it will be appreciated that those skilled in the art will be able to devise many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and are thus within the spirit and scope of the present disclosure.
Claims
1. 1. A method for video decoding in a video decoder, comprising: decoding prediction information for a current block in a current picture from a coded video bitstream, the prediction information indicating (i) that an Adaptive Motion Vector Prediction (AMVP) mode with Adaptive Motion Vector Resolution (AMVR) mode is applied to the current block, and (ii) motion information, a set of motion vector (MV) resolutions in the AMVR mode are available for the current block; performing template matching (TM) on the multiple MV resolutions by: determining a respective TM cost corresponding to each of the multiple MV resolutions based on the multiple MV resolutions in the set of MV resolutions and the motion information; sorting the multiple MV resolutions based on the determined TM costs corresponding to each of the multiple MV resolutions; and selecting an MV resolution from the sorted multiple MV resolutions; reconstructing the current block based on the selected MV resolution; The method includes:
2. The step of determining the TM cost includes: For each of the plurality of MV resolutions in the set of MV resolutions, determining a first reference block in a first reference picture based on the current block in the current picture, the motion information and a respective MV resolution; determining a TM cost based on a first reference template of the first reference block in the first reference picture and a current template of the current block in the current picture; The method of claim 1 , comprising:
3. the plurality of MV resolutions is the set of MV resolutions, The prediction information indicates whether a first MV resolution is applied to the current block, and the first MV resolution corresponds to a minimum TM cost among the determined TM costs; In response to an indication that the first MV resolution is to be applied to the current block, The step of selecting the MV resolution includes the step of selecting the first MV resolution as the MV resolution; reconstructing the current block includes reconstructing the current block based on the first MV resolution; In response to an indication that the first MV resolution does not apply to the current block, The step of selecting an MV resolution includes the step of selecting an MV resolution from remaining MV resolutions in the reordered plurality of MV resolutions, the remaining MV resolutions excluding the first MV resolution; The method of claim 1 , wherein reconstructing the current block comprises reconstructing the current block based on the selected MV resolution.
4. The method of claim 3 , wherein the multiple MV resolutions include ¼ luma sample, ½ luma sample, 1 luma sample, and 4 luma sample.
5. The first MV resolution is not applied to the current block; and decoding the prediction information comprises decoding an index within the coded video bitstream; The step of selecting the MV resolution includes the step of selecting a second MV resolution from the remaining MV resolutions in the sorted plurality of MV resolutions based on the index, the remaining MV resolutions excluding the first MV resolution; The method of claim 3 , wherein reconstructing the current block comprises reconstructing the current block based on the second MV resolution.
6. the set of MV resolutions includes a third MV resolution not in the plurality of MV resolutions; the prediction information indicates that the third MV resolution is not applied to the current block; and decoding the prediction information comprises decoding an index within the coded video bitstream; selecting the MV resolution includes selecting a fourth MV resolution from the sorted plurality of MV resolutions based on the index; The method of claim 1 , wherein reconstructing the current block comprises reconstructing the current block based on the fourth MV resolution.
7. the set of MV resolutions consists of ¼ luma samples, ½ luma samples, 1 luma samples and 4 luma samples; the third MV resolution is ¼ luma samples; The method of claim 6 , wherein the multiple MV resolutions consist of ½ luma samples, 1 luma sample, and 4 luma samples.
8. the prediction information indicates that the current block is coded using bi-directional prediction; 2. The method of claim 1, wherein determining the TM costs corresponding to the plurality of MV resolutions comprises determining, for each of the plurality of MV resolutions in the set of MV resolutions, a TM cost based on a first TM cost and a second TM cost, wherein the first TM cost is determined based on a first reference template of a first reference block in a first reference picture and a current template of the current block in the current picture, and the second TM cost is determined based on a second reference template of a second reference block in a second reference picture and the current template of the current block in the current picture.
9. The method of claim 8 , wherein for each of the plurality of MV resolutions in the set of MV resolutions, the TM cost is a weighted sum of the first TM cost and the second TM cost.
10. The method of claim 8 , wherein for each of the multiple MV resolutions in the set of MV resolutions, the TM cost is a minimum or maximum of the first TM cost and the second TM cost.
11. 1. An apparatus for video decoding including a processing circuit, comprising: Apparatus, wherein the processing circuitry is configured to perform a method according to any one of claims 1 to 10.
12. A computer program product causing at least one processor to carry out a method according to any one of claims 1 to 10.
13. 1. A method for video encoding in a video encoder, comprising: performing template matching (TM) on a plurality of motion vector (MV) resolutions by: determining a respective TM cost corresponding to each of the plurality of MV resolutions based on a plurality of MV resolutions and motion information in a set of MV resolutions available for a current block; sorting the plurality of MV resolutions based on the determined TM cost corresponding to each of the plurality of MV resolutions; and selecting an MV resolution from the sorted plurality of MV resolutions; encoding the current block based on the selected MV resolution using an adaptive motion vector prediction (AMVP) mode, and encoding prediction information indicating (i) that an AMVP mode according to an adaptive motion vector resolution (AMVR) mode is applied to the current block, and (ii) the motion information; including said current block and / or said prediction information in a video bitstream. The method includes:
Citation Information
Patent Citations
DMVR and BDOF-based inter-prediction method and apparatus
JP2021518996A
Video signal processing method and apparatus using adaptive motion vector resolution
JP2021526340A
Adaptive motion vector resolution for affine motion model in video coding
US20210092434A1
