Alternative merge mode by motion vector difference using template matching - Patents.com
Patent Information
- Application Number
- JP2023551656
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-09-16
- Filing Date
- 2022-09-21
- Publication Date
- 2025-02-19
- Estimated Expiration
- 2042-09-21
Smart Images

Figure 0007632810000010 
Figure 0007632810000011 
Figure 0007632810000012
Abstract
Description
[Technical field]
[0001] [Related Applications] This application claims the benefit of priority to U.S. Provisional Patent Application No. 63 / 252,579, entitled "Alternative Merge Mode with MVD (MMVD) By Using Template-Matching," filed October 5, 2021, which claims the benefit of priority to U.S. Patent Application No. 17 / 946,498, entitled "ALTERNATIVE MERGE MODE WITH MOTION VECTOR DIFFERENCE BY USING TEMPLATE-MATCHING," filed September 16, 2022. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
[0002] [Technical field] This disclosure describes embodiments generally related to video coding. [Background technology]
[0003] The background description provided herein is to provide an overview of the context of the present disclosure. The work of the presently named inventors is not admitted explicitly or implicitly as prior art to the present disclosure, to the extent that the work described in this background section, as well as aspects of the description that may not be considered prior art at the time of filing, are not admitted explicitly or implicitly as prior art to the present disclosure.
[0004] Uncompressed digital images and / or videos 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 known informally as frame rate), for example, 60 pictures per second or 60Hz. Uncompressed images and / or videos have specific bitrate requirements. For example, 1080p60 4:2:0 video (1920x1080 luminance sample resolution at 60Hz frame rate) with 8 bits per sample requires a bandwidth close to 1.5Gbit / s. One hour of such video requires more than 600GByte of storage space.
[0005] One objective of image and / or video coding and decoding may be the reduction of redundancy in an input image and / or video signal through compression. Compression may help reduce the aforementioned bandwidth and / or storage space requirements, in some cases by more than two orders of magnitude. The description herein uses video encoding / decoding as an illustrative example, but the same techniques may be applied to image encoding / decoding in a similar manner without departing from the spirit of the present disclosure. Both lossless compression and lossy compression, and combinations thereof, may be utilized. Lossless compression refers to techniques where an exact copy of the original signal can be reconstructed from the compressed original signal. With lossy compression, the reconstructed signal is not identical to the original signal, but the distortion between the original signal and the reconstructed signal is small enough to produce a reconstructed signal that is useful for the intended application. In the case of video, lossy compression is widely used. The amount of tolerable distortion depends on the application, and users of certain consumer streaming applications may tolerate higher distortion than users of television distribution applications. The achievable compression ratio may reflect that the higher the tolerable / tolerable distortion, the higher the compression ratio that may result.
[0006] Video encoders and decoders can utilize techniques from several 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 subdivided into blocks of samples. When a whole block of samples is 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 therefore can be used as the first picture in a coding video bitstream and video session or as a still image. Samples of an intra block can be transformed 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 after transformation and the smaller the AC coefficients, the fewer bits are needed for a given quantization step size to represent the block after entropy coding.
[0008] For example, traditional intra-coding, used in MPEG-2 generation coding techniques, does not use intra-prediction. However, some new video compression techniques attempt to perform prediction based on surrounding sample data and / or metadata obtained during encoding and / or decoding of a data block, for example. Such techniques are hereafter referred to as "intra-prediction" techniques. In at least some cases, intra-prediction uses only reference data from the current picture being reconstructed, and not from reference pictures.
[0009] There may be many different forms of intra prediction. When more than one such technique can be used in a given video coding technique, the particular technique used may be coded as a particular intra prediction mode that uses the particular technique. In certain cases, the 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 being used. Which codeword to use for a given mode, sub-mode, and / or parameter combination may affect the improvement of coding efficiency through intra prediction, and therefore entropy coding techniques may be used to convert the codewords into a bitstream.
[0010] Certain intra prediction modes were introduced by H.264 and improved in H.265 and in more recent coding techniques such as the joint exploration model (JEM), versatile video coding (VVC), and benchmark set (BMS). A prediction block can be formed using neighboring sample values of already available samples. The sample values of the neighboring samples are copied to the prediction block according to a direction. The reference of the direction in use can be coded in the bitstream or may itself be predicted.
[0011] Referring to FIG. 1A, a subset of nine prediction directions, shown at the bottom right, are shown that can be seen from the 33 possible prediction directions defined in H.265 (corresponding to the 33 angle modes of the 35 intra modes). The point where the arrows converge (101) represents the sample being predicted. The arrows represent the direction in which the sample is predicted. For example, arrow (102) indicates that sample (101) is predicted from one or more samples to the upper right at an angle of 45 degrees from the horizontal. Similarly, arrow (103) indicates that sample (101) is predicted from one or more samples to the lower left of sample (101) at an angle of 22.5 degrees from the horizontal.
[0012] 1A, a square block (104) of 4×4 samples (indicated by a thick dashed line) is shown at the top left. The square block (104) contains 16 samples, each labeled with "S", 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. When the block is of size 4×4 samples, S44 is at the bottom right. Also shown are reference samples that follow a similar numbering scheme. The reference samples are labeled by R, their 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 in the neighborhood of the block being reconstructed, and therefore negative values do not need to be used.
[0013] Intra-picture prediction can operate by copying reference sample values from neighboring samples as indicated by the signaled prediction direction. For example, the coding video bitstream includes signaling for this block indicating a prediction direction consistent with arrow (102). That is, the samples are predicted to the upper right at an angle of 45 degrees from the horizontal. In this case, samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Sample S44 is then predicted from reference sample R08.
[0014] In certain cases, values of multiple reference samples may be combined, for example through interpolation, to calculate a reference sample, particularly when the direction is not evenly divisible by 45 degrees.
[0015] The number of possible directions has increased as video coding techniques have developed. In H.264 (2003), 9 different directions could be presented. It increased to 33 in H.265 (2003). Currently, JEM / VVC / BMS can support up to 65 directions. Experiments have been performed to identify the most likely directions, and certain techniques are used in entropy coding to represent these likely directions with a small number of bits while accepting certain penalties for the less likely directions. Furthermore, the direction itself can be predicted from neighboring directions in neighboring already decoded blocks.
[0016] FIG. 1B shows a diagram (110) showing 65 intra prediction directions according to JEM to illustrate the growth in the number of prediction directions over time.
[0017] The mapping of intra-prediction direction bits representing directions in a coded video bitstream may vary between video coding techniques. Such mappings may range, for example, from simple direct mappings to codewords, complex adaptation schemes involving most possible 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 certain other directions. Since the goal of video compression is to reduce redundancy, these less likely directions will be represented by more bits than more likely directions in a well-performing video coding technique.
[0018] Image and / or video coding and decoding can be performed using inter-picture prediction with motion compensation. Motion compensation is a lossy compression technique and may refer to a technique in which blocks of sample data from a previously reconstructed picture or part thereof (reference picture) are used for the prediction of a newly reconstructed picture or part of a picture after being spatially shifted in a direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions X and Y, or three dimensions, with the third dimension being an indication of the reference picture in use (the latter may indirectly be a temporal dimension).
[0019] In some video compression techniques, the MV applicable to a particular region of sample data can be predicted from other MVs, e.g., from MVs associated with another region of sample data that is spatially adjacent to the region being reconstructed and that precedes it in the decoding order. Doing so can result in a reduction in the amount of data required to encode the MV, thereby removing redundancy and improving compression. MV prediction, for example, when encoding an input video signal (known as natural video) obtained from a camera, is a statistical possibility that regions larger than the region to which a single MV is applicable move in a similar direction and are therefore predictable, in some cases, using similar motion vectors derived from the MVs of neighboring regions. This results in the MV found for a given region being similar or the same as the MV predicted from the surrounding MVs. This can also be presented after entropy coding with a smaller number of bits than would be used when coding the MV directly. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, MV prediction itself can be lossy, e.g., due to rounding off errors when computing a 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, a technique called "spatial merge" will be described below with reference to FIG. 2.
[0021] Referring to Figure 2, the 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 as the one that is spatially shifted. Instead of coding the MV directly, 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 the MV associated with any one of the five surrounding samples A0, A1, and B0, B1, B2 (202-206, respectively). In H.265, the MV prediction can use predictors from the same reference picture as the neighboring blocks use. Summary of the Invention
[0022] Aspects of the disclosure provide a method and apparatus for video encoding and / or 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 coded bitstream. The prediction information may indicate a merge mode with motion vector difference (MMVD) with template matching (TM) mode, and motion vector difference (MVD) information of the current block. The processing circuit may determine one or more MVD candidates based on the MVD information. The processing circuit may perform the TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates. The processing circuit reconstructs the current block based on a motion vector (MV), which is a sum of a motion vector predictor (MVP) and a matching MVD.
[0023] In an embodiment, the one or more MVD candidates are one MVD candidate. The MVD information includes distance information indicating a size of the one MVD candidate and direction information indicating a direction of the one MVD candidate. The processing circuit determines the one MVD candidate based on the size of the one MVD candidate and the direction of the one MVD candidate, and performs TM around the one MVD candidate. For example, the coded bitstream further includes a TM flag, and the TM flag indicates that TM is enabled for the current block. The distance information includes a distance index pointing to one of the multiple distances, the distance being the size of the one MVD candidate. The multiple distances are based on a search range of the TM. For example, the search range of the TM is in the range of [-L, +L] in the horizontal and vertical directions, where L is a positive integer. The minimum distance of the multiple distances may be equal to L or L / 2.
[0024] In the example, the distance information includes a distance index that points to one of a number of distances, where the distance is the magnitude of one MVD candidate. The number of distances is in an arithmetic progression.
[0025] In an embodiment, the one or more MVD candidates include multiple MVD candidates having the same direction. The MVD information includes direction information indicating the direction of the multiple MVD candidates. The processing circuitry determines the multiple MVD candidates based on the direction of the multiple MVD candidates and the multiple distances. The multiple MVD candidates can be ordered based on the multiple distances. For each of the multiple MVD candidates, the processing circuitry can apply the TM to each MVD candidate to obtain a TM cost and a corresponding updated MVD candidate corresponding to each MVD candidate. The processing circuitry can determine a matching MVD based on the TM cost and the corresponding updated MVD candidate.
[0026] In an example, the MVD information includes a distance index, and the processing circuit is configured to sort the multiple MVD candidates according to the TM costs of the multiple MVD candidates, and determine the matched MVD to be an updated MVD candidate corresponding to the MVD candidate indicated by the distance index of the sorted multiple MVD candidates.
[0027] In an example, the processing circuit determines the matched MVD to be the updated MVD candidate that corresponds to the minimum TM cost of the TM costs of the multiple MVD candidates.
[0028] In an embodiment, the one or more MVD candidates include multiple MVD candidates having the same size, and the MVD information includes distance information indicating the size of the multiple MVD candidates. The processing circuitry determines the multiple MVD candidates based on the size of the multiple MVD candidates and the multiple orientations. The multiple MVD candidates are ordered according to the multiple orientations. For each of the multiple MVD candidates, the processing circuitry may apply the TM to each MVD candidate to obtain a TM cost and a corresponding updated MVD candidate corresponding to each MVD candidate. The processing circuitry may determine a matching MVD based on the TM cost and the corresponding updated MVD candidate.
[0029] In an example, the MVD information includes a directional index, and the processing circuit is configured to sort the multiple MVD candidates according to the TM costs of the multiple MVD candidates, and determine the matched MVD to be an updated MVD candidate corresponding to the MVD candidate indicated by the directional index of the sorted multiple MVD candidates.
[0030] In an example, the processing circuit determines the matched MVD to be the updated MVD candidate that corresponds to the minimum TM cost of the TM costs of the multiple MVD candidates.
[0031] 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 of video decoding. [Brief description of the drawings]
[0032] Further features, characteristics, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and the accompanying drawings. [Figure 1A] 2 is a schematic diagram of an example subset of intra-prediction modes. [Figure 1B] FIG. 2 is a diagram of an example intra-prediction direction.
[0033] [Diagram 2] An example of a current block (201) and surrounding samples is shown.
[0034] [Diagram 3] FIG. 3 is a schematic diagram of an example block diagram of a communication system (300).
[0035] [Figure 4] FIG. 4 is a schematic diagram of an example block diagram of a communication system (400).
[0036] [Diagram 5] FIG. 2 is a schematic diagram of an example block diagram of a decoder.
[0037] [Figure 6] FIG. 2 is a schematic diagram of an example block diagram of an encoder;
[0038] [Figure 7] 1 shows a block diagram of an exemplary encoder.
[0039] [Figure 8] 1 shows a block diagram of an exemplary decoder.
[0040] [Figure 9] 1 illustrates the locations of exemplary spatial merge candidates.
[0041] [Figure 10] 1 illustrates an example candidate pair considered for redundancy check of spatial merge candidates.
[0042] [Figure 11] 13 illustrates an example motion vector scaling for temporal merging candidates.
[0043] [Figure 12]13 illustrates exemplary candidate positions for temporal merge candidates.
[0044] [Figure 13] Here is an example of template matching:
[0045] [Figure 14] 1 shows a flow chart outlining an exemplary encoding process.
[0046] [Figure 15] 1 shows a flow chart outlining an exemplary decoding process.
[0047] [Figure 16] 1 is a schematic diagram of a computer system, according to one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0048] 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 unidirectional transmission of data. For example, the terminal device (310) encodes video data (a stream of video pictures captured by the terminal device (310)) for transmission to another terminal device (320) via the network (350). The encoded video data can be transmitted in the form of one or more coded video bitstreams. The terminal device (320) can receive the coded video data from the network (350), decode the coded video data to reconstruct the video pictures, and display the video pictures according to the reconstructed video data. Unidirectional data transmission can be common in media serving applications, etc.
[0049] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) performing bidirectional transmission of encoded video data, such as during a video conference. In the bidirectional transmission of data, the terminal devices (330) and (340) may encode video data (e.g., a stream of video pictures captured by the terminal devices) for transmission to the terminal devices (330) and (340) over the network (350). Each of the terminal devices (330) and (340) may receive coded video data transmitted by the other of the terminal devices (330) and (340), may decode the coded video data to recover the video pictures, and may display the video pictures on an accessible display device in accordance with the recovered video data.
[0050] 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 are not so limited. Embodiments of the present disclosure may be applied with laptop computers, tablet computers, media players, and / or dedicated video conferencing equipment. Network (350) represents any number of networks that carry encoded video data between terminal devices (310), (320), (330), and (340), including, for example, wired and / or wireless communication networks. Communication network (350) may exchange data over circuit-switched and / or packet-switched channels. Exemplary networks include electronic communication networks, local area networks, wide area networks, and / or the Internet. For purposes of the present discussion, the architecture and topology of network (350) may not be important to the operation of the present disclosure, unless otherwise noted below.
[0051] 4 shows a video encoder and a video decoder in a streaming environment, as an example of an application of the disclosed subject matter, which is equally applicable to, for example, video conferencing, digital TV, streaming services, storage of compressed video on digital media including CDs, DVDs, memory sticks, etc., other video-enabled applications, etc.
[0052] The streaming system may include a capture subsystem (413), which may include, for example, a video source (401) that generates an uncompressed video picture stream (402). In one example, the video picture stream (402) includes samples captured by a digital camera. The video picture stream (402) may be processed by an electronic device (420) that includes a video encoder (403) coupled to the video source (401), shown in bold to emphasize its high data volume when compared to the encoded video data (404) (or coded video bitstream). 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 coded video bitstream), shown in thin to emphasize its low data volume when compared to the video picture stream (402), may be stored on 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) may include a video decoder (410), for example in an electronic device (430). The video decoder (410) decodes an input copy (407) of the encoded video data and generates an output video picture stream (411) 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) may be encoded according to a particular video coding / compression standard. Examples of these standards include ITU-T Recommendation H.265. In one example, the video coding standard under development is known informally as Versatile Video Coding (VVC). The disclosed subject matter may be used in the context of a VVC.
[0053] 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).
[0054] 5 shows an example block diagram of a video decoder (510). The video decoder (510) may be included in an electronic device (530). The electronic device (530) may include a receiver (531) (e.g., a receiving circuit). The video decoder (510) may be used in place of the video decoder (410) in the example of FIG. 4.
[0055] The receiver (531) may receive one or more coded video sequences to be decoded by the video decoder (510). In an embodiment, 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 along 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 eliminate network jitter, a buffer memory (515) may be coupled between the receiver (531) and the entropy decoder / parser (520) (hereinafter "parser (520)"). In certain applications, the buffer memory (515) is part of the video decoder (510). Alternatively, it may be external to the video decoder (510) (not shown). In still other cases, there may be a buffer memory (not shown) external to the video decoder (510), e.g., to remove network jitter, in addition to another buffer memory (515) internal to the video decoder (510), e.g., to handle playout timing. When the receiver (531) is receiving data controllably from a store / forward device of sufficient bandwidth or from an isosynchronous 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 needed, 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).
[0056] The video decoder (510) may include a parser (520) to reconstruct symbols (521) from the coded video sequence. These symbol categories include information used to manage the operation of the video decoder (510) and information for controlling a rendering device such as a render device (512) (e.g., a display screen) that 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 may be in the form of a Supplemental Enhancement Information (SEI) message or a Video Usability Information (VUI) parameter set fragment (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 dependency, etc. The parser (520) may 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 subgroup. The subgroups may include Groups of Pictures (GOPs), pictures, tiles, slices, macroblocks, coding units (CUs), blocks, transform units (TUs), prediction units (PUs), etc. The parser (520) may also extract information such as transform coefficients, quantization parameter values, motion vectors, etc. from the coded video sequence.
[0057] The parser (520) may perform an entropy decoding / parsing operation on the video sequence received from the buffer memory (515) to generate symbols (521).
[0058] The reconstruction of the symbols (521) may include several different units, depending on the type of coded video picture or portion thereof (e.g., inter and intra pictures, inter and intra blocks) and other factors. Which units are included and how can be controlled by group 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 shown for clarity.
[0059] Beyond the functional blocks already mentioned, the video decoder (510) may be conceptually subdivided into a number of functional units, as described below. In an actual implementation operating under commercial constraints, many of these units may 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.
[0060] The first unit is a scalar / inverse transform unit 551. The scalar / inverse transform unit (551) receives quantized transform coefficients and control information including which transform to use, block size, quantization coefficients, quantization scaling matrices, etc. as symbols (521) from the parser (520). The scalar / inverse transform unit (551) can output blocks containing sample values that can be input to an aggregator (555).
[0061] In some cases, the output samples of the scaler / inverse transform unit (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 can be provided by the 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 fetched from the current picture buffer (558). The current picture buffer (558), for example, buffers the reconstructed current picture partially and / or completely. The aggregator (555) adds the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551), in some cases on a sample-by-sample basis.
[0062] In other cases, the output samples of the scaler / inverse transform unit (551) may relate to an inter-coded, possibly motion-compensated, block. In such cases, the motion compensated prediction unit (553) may access the reference picture memory (557) to fetch samples used for prediction. After motion compensating the fetched samples according to the symbols (521) associated with the block, these samples may be added by the aggregator (555) to the output of the scaler / inverse transform unit (551) to generate output sample information (in this case referred to as residual samples or residual signals). The addresses in the reference picture memory (557) from which the motion compensated prediction unit (553) fetches prediction samples may be controlled by the available motion vectors of the motion compensated prediction unit (553), e.g., in the form of symbols (521) that may have X, Y, and reference picture components. Motion compensation may include interpolation of sample values fetched from the reference picture memory (557) when sub-sample accurate motion vectors are in use, motion vector prediction mechanisms, etc.
[0063] 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 not only be responsive to previously reconstructed loop filtered sample values, but may also be responsive to meta information obtained during the decoding of previous portions (in decoding order) of the coded picture or coded video sequence.
[0064] The output of the loop filter unit (556) may be a sample stream that can be output to a render device (512) and stored in a reference picture memory (557) for use in future inter-picture prediction.
[0065] Once a particular 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 beginning reconstruction of a subsequent coded picture.
[0066] The video decoder (510) may perform decoding operations according to a standard or a given video compression technique, such as ITU-T Rec. H.265. The coding video sequence may conform to a syntax specified by the video compression technique or standard in use, in the sense that the coding video sequence conforms to both the video compression technique or standard and a profile documented in the video compression technique or standard. In particular, a profile may select certain tools from the full set of tools available in the video compression technique or standard as tools that are only available under the profile. Also, a requirement for compliance may be that the complexity of the coding video sequence is within the limits defined by the level of the video compression technique or standard. In some cases, the level limits the maximum picture size, maximum frame rate, maximum reconstruction sample rate (e.g., measured in megasamples / second), maximum reference picture size, etc. The limits set by the level may in some cases be further restricted through a Hypothetical Reference Decoder (HRD) specification and metadata for HRD buffer management signaled in the coding video sequence.
[0067] In an embodiment, the receiver (531) may receive additional (redundant) data along with the coded video. The additional data may be included as part of the coded video sequence. The additional data may be used by the video decoder (510) to correctly 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.
[0068] 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.
[0069] The video encoder (603) may receive video samples from a video source (601) (which, in the example of FIG. 6, is not part of the electronic device (620)) that may capture video images to be coded by the video encoder (603). In another example, the video source (601) is part of the electronic device (620).
[0070] The video source (601) may provide a source video sequence to be coded by the video encoder (603) in the form of a digital video sample stream of any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb 4:4:4). In a media presentation system, the video source (601) may be a storage device that stores previously prepared video. In a video conferencing system, the video source (601) may be a camera that captures local image information as a video sequence. The video data may be provided as multiple individual pictures that give motion when viewed in succession. The pictures themselves may be organized as a spatial array of pixels. Each pixel may contain one or more samples, depending on the sampling structure, color space, etc. in use. Those skilled in the art will readily appreciate the relationship between pixels and samples. The following description focuses on samples.
[0071] According to an embodiment, the video encoder (603) may code and compress pictures of a source video sequence into a coded video sequence (643) in real time or under any other time constraint required. Enforcing an appropriate coding rate is one function of the controller (650). In some embodiments, the controller (650) controls and is operatively coupled to other functional units described below, which are not shown for clarity. Parameters set by the controller (650) may include rate control related parameters (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) may be configured to have other appropriate functions associated with the video encoder (603) optimized for a particular system design.
[0072] In some embodiments, the video encoder (603) is configured to operate in a coding loop. As a very simplified description, in one example, the coding loop may include a source coder (630) (e.g., responsible for generating symbols, such as a symbol stream, based on an input picture to be coded and a reference picture) and a (local) decoder (633) built into the video encoder (603). The decoder (633) reconstructs the symbols to create sample data in a similar manner as the (remote) decoder would create them. The reconstructed sample stream (sample data) is input to a reference picture memory (634). When the decoding of the symbol stream produces bit-exact results independent 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 predictive part of the encoder "sees" exactly the same sample values as the decoder "sees" when using prediction during decoding, as reference picture samples. This basic principle of reference picture synchrony (and the resulting drift if synchrony cannot be maintained, for example due to channel errors) is used in several related techniques as well.
[0073] The operation of the "local" decoder (633) may be the same as that of a "remote" decoder, such as the video decoder (510) detailed above in connection with Figure 5. Referring briefly also to Figure 5, however, because symbols are available and the encoding / decoding of symbols into a coded video sequence by the entropy coder (645) and parser (520) may be lossless, the entropy decoding portion of the video decoder (510), including the buffer memory (515), and the parser (520), may not be fully implemented in the local decoder (633).
[0074] In an embodiment, the decoder techniques, except for analysis / entropy decoding, present in the decoder are present in the corresponding encoder in the same or substantially the same functional form. Therefore, the subject matter of the described disclosure focuses on the decoder operation. A description of the encoder techniques can be omitted since they are the inverse of the decoder techniques, which are described generically. In certain areas, more detailed descriptions are provided below.
[0075] In operation, in some examples, the source coder (630) may perform motion-compensated predictive coding, which predictively codes an input picture with reference to one or more previously coded pictures from a video sequence designated as "reference pictures." In this method, the coding engine (632) codes differences between pixel blocks of the input picture and pixel blocks of reference pictures that may be selected as prediction references for the input picture.
[0076] The local video decoder (633) may decode the coded video data of pictures that may be designated as reference pictures based on the symbols generated by the source coder (630). The operation of the coding engine (632) may advantageously be lossy. When the coded video data may be decoded in a video decoder (not shown in FIG. 6), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (633) may replicate the decoding process that may be performed by the video decoder on the reference pictures, resulting in reconstructed reference pictures to be stored in the reference picture memory (634). In this way, the video encoder (603) may store copies of reconstructed reference pictures that have common content with the reconstructed reference pictures obtained by the far-end video decoder (in the absence of transmission errors).
[0077] The predictor (635) may perform a prediction search for the coding engine (632). That is, for a new picture to be encoded, the predictor (635) may search the reference picture memory (634) for sample data (such 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-pixel block basis to find a suitable prediction reference. In some examples, the input picture may have prediction references derived from multiple reference pictures stored in the reference picture memory (634), as determined by the search results obtained by the predictor (635).
[0078] The control unit (650) may manage the coding operations of the source coder (630), including, for example, setting parameters and subgroup parameters used for encoding the video data.
[0079] The output of all the aforementioned 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.
[0080] The transmitter (640) may buffer the coded video sequence generated by the entropy coder (645) to prepare it for transmission over a communication channel (660), which may be a hardware / software link to a storage device that may store the coded video data. The transmitter (640) may merge the coded video data from the video encoder (603) with other data to be transmitted, such as coded audio data and / or auxiliary data streams (sources not shown).
[0081] A controller (650) may manage the operation of the video encoder (603). During coding, the controller (650) may assign a particular coding picture type to each coding picture, which 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:
[0082] An intra picture (I-picture) may be a picture that can be coded and decoded without using any other picture in a sequence as a source of prediction. Some video codecs allow different kinds of intra pictures, including, for example, Independent Decoder Refresh (IDR) pictures. Those skilled in the art will recognize the variations of I-pictures and their respective applications and characteristics.
[0083] A predictive picture (P-picture) may be a picture that can be coded and decoded using intra- or inter-prediction, in most cases using one motion vector and reference index to predict the sample values of each block.
[0084] A Bi-directionally Predictive Picture (B Picture) may be a picture that can be coded and decoded using intra- or inter-prediction, using up to two motion vectors and reference indices to predict the sample values of each block. Similarly, a multi-predictive picture can use more than two reference pictures and associated metadata for the reconstruction of a single block.
[0085] A source picture may generally be spatially subdivided into multiple sample blocks (e.g., blocks of 4x4, 8x8, 4x8, or 16x16 samples each) and coded block by block. Blocks may be predictively coded with reference to other (already coded) blocks determined by the coding assignment applied to each picture of the block. For example, blocks of I pictures may be non-predictively coded, or they may be predictively coded with reference to already coded blocks of the same picture (spatial or intra prediction). Pixel blocks of P pictures may be predictively coded via spatial prediction or via temporal prediction with reference to one previously coded reference picture. Blocks of B pictures may be predictively coded via spatial prediction or via temporal prediction with reference to one or two previously coded reference pictures.
[0086] The video encoder (603) may perform coding operations according to a given video coding technique or standard, such as ITU-T Rec. H.265. In doing so, the video encoder (603) may perform various compression operations, including predictive coding operations that exploit temporal and spatial redundancy in the input video sequence. The coding video data may therefore conform to a syntax specified by the video coding technique or standard being used.
[0087] In one embodiment, the transmitter (640) may transmit additional data along with the encoded video. The source coder (630) may include such data as part of the coded video sequence. The additional data may include temporal / spatial / SNR enhancement layers, other types of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0088] A video may be captured as multiple source pictures (video pictures) in a time sequence. Intra-picture prediction (sometimes abbreviated as intra-prediction) exploits spatial correlation within a given picture, while inter-picture prediction exploits correlation (temporal or other) between pictures. In one example, a particular picture being coded / decoded is called a current picture and is partitioned into blocks. When a block in the current picture is similar to a reference block in a previously coded and still buffered reference picture in the video, the 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 in use.
[0089] 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 are before the current picture in the video in decoding order (but may be in the past and future, respectively, in display order). A block in the current picture can be coded with 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.
[0090] Furthermore, to improve coding efficiency, merge mode techniques can be used in inter-picture prediction.
[0091] According to some embodiments of the present disclosure, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, pictures in a video picture sequence are partitioned into coding tree units (CTUs) for compression. The CTUs in a picture have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. Typically, a CTU includes three coding tree blocks (CTBs), i.e., one luma CTB and two chroma CTBs. Each CTU can be recursively quad-tree 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 of the 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. Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In one embodiment, prediction operations in coding (encoding / decoding) are performed in units of prediction blocks. Using 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, and so on.
[0092] 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 video picture sequence and to encode the processed block into a coding picture that is part of the coding video sequence. In one example, the video encoder (703) is used in place of the video encoder (403) in the example of FIG. 4.
[0093] In an HEVC example, the video encoder (703) receives a matrix of sample values for a processing block, such as a prediction 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-prediction mode, for example using rate-distortion optimization. When the processing block is coded in intra mode, the video encoder (703) may use intra prediction techniques to code the processing block into a coding picture. When the processing block is coded in inter mode or bi-prediction mode, the video encoder (703) may use inter prediction or bi-prediction techniques, respectively, to code the processing block into a coding picture. In certain video coding techniques, the merge mode may be an inter-picture prediction sub-mode in which motion vectors are derived from one or more motion vector predictors without the benefit of coding 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), to determine the mode of the processing block.
[0094] 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 control unit (721), and an entropy encoder (725) coupled together as shown in FIG.
[0095] The inter-encoder (730) is configured to receive samples of a current block (e.g., a block being processed), compare the block to one or more reference blocks in a reference picture (e.g., blocks in previous and subsequent pictures), generate inter-prediction information (e.g., an account of redundant information due to inter-coding techniques, motion vectors, merge mode information), and calculate an inter-prediction result (e.g., a prediction 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 encoded video information.
[0096] The intra encoder (722) is configured to receive samples of a current block (e.g., a block being processed), in some cases compare the block to already coded blocks in a sample picture, generate quantized coefficients after transformation, and in some cases 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 intra prediction results (e.g., predicted blocks) based on the intra prediction information and reference blocks in the same picture.
[0097] The general control unit (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 control unit (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, when the mode is an intra mode, the general control unit (721) controls the switch (726) to select an intra mode result 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, and when the mode is an inter mode, the general control unit (721) controls the switch (726) to select an inter prediction result 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.
[0098] The residual calculator (723) is configured to calculate a difference (residual data) between the received block and a selected prediction result from the intra-encoder (722) or the inter-encoder (730). The residual encoder (724) is configured to operate on the residual data to encode the residual data and generate transform coefficients. In one example, the residual encoder (724) is configured to transform the residual data from the spatial domain to the frequency domain and 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 and generate decoded residual data. The decoded residual data can be used by the intra-encoder (722) and the inter-encoder (730) as appropriate. 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 appropriately processed to generate a decoded picture, which in some examples may be buffered in a memory circuit (not shown) and used as a reference picture.
[0099] The entropy encoder (725) is configured to format the bitstream to include the coded blocks. The entropy encoder (725) is configured to include various information in the bitstream according to an appropriate standard, such as the HEVC standard. In one example, the entropy encoder (725) is configured to include in the bitstream general control data, selected prediction information (e.g., intra-prediction information or inter-prediction information), residual information, and other appropriate information. It is noted that, according to the disclosed subject matter, when coding a block in a merged sub-mode of either an inter mode or a bi-prediction mode, the residual information is not present.
[0100] 8 shows an example diagram of a video decoder (810). The video decoder (810) is configured to receive coded pictures that are part of a coded video sequence and decode the coded 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.
[0101] 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.
[0102] The entropy decoder (871) may be configured to reconstruct, from the coding picture, certain symbols that represent generated syntax elements of the coding picture. Such symbols may include prediction information (e.g., intra-prediction information or inter-prediction information) that may, for example, identify the coded mode of the block (e.g., intra-mode, inter-mode, bi-directional mode, merged sub-mode, or the latter two of another sub-mode), certain samples or metadata used for prediction by the intra-decoder (872) or inter-decoder (880), respectively. The symbols may also include residual information, for example in the form of quantized transform coefficients. In one example, when the prediction mode is an inter- or bi-directional prediction mode, the inter-prediction information is provided to the inter-decoder (880), and when the prediction type is an intra-prediction type, the intra-prediction information is provided to the intra-decoder (872). The residual information is dequantized and provided to the residual decoder (873).
[0103] The inter decoder (880) is configured to receive the inter prediction information and to generate inter prediction results based on the inter prediction information.
[0104] The intra decoder (872) is configured to receive the intra prediction information and to generate a prediction result based on the intra prediction information.
[0105] The residual decoder (873) is configured to perform inverse quantization to extract inverse quantized transform coefficients and to process the inverse quantized transform coefficients to transform the residual information from frequency domain information to the spatial domain. The residual decoder (873) may also require certain control information (to include Quantizer Parameters (QP)). This information may be provided by the entropy decoder (871) (data path not shown since this is only low capacity control information).
[0106] The reconstruction module (874) is configured to combine, in the spatial domain, the residual information as output by the residual decoder (873) and the prediction result (possibly as output by an inter- or intra-prediction module) to form a reconstructed block, which may be part of a reconstructed picture, which in turn may be part of the reconstructed video. Other suitable operations, such as a deblocking operation, may be performed to improve visual quality.
[0107] It is noted that the video encoders (403), (603), and (703) and the video decoders (410), (510), and (810) may be implemented using any suitable technology. In one embodiment, the video encoders (403), (603), and (703) and the video decoders (410), (510), and (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (403), (603), and (603) and the video decoders (410), (510), and (810) may be implemented using one or more processors executing software instructions.
[0108] In VVC, various inter prediction modes can be used. For inter predicted CUs, the motion parameters can include MV, one or more reference picture indexes, reference picture list usage index, and additional information of the specific coding function used to generate the inter predicted samples. The motion parameters can be signaled explicitly or implicitly. If the CU is coded in skip mode, the CU can be associated with a PU and can have no significant residual coefficients, coded motion vector delta or MV difference (e.g., MVD), or reference picture index. Merge mode can be specified when 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. Merge mode can be applied not only to skip mode but also to inter predicted CUs. In an example, an alternative to merge mode is explicit transmission of motion parameters, where the MV, the corresponding reference picture index of each reference picture list, and the reference picture list usage flag and other information are explicitly signaled for each CU.
[0109] In an embodiment such as VVC, the VVC Test model (VTM) reference software includes enhanced merge prediction, merge motion vector difference (MMVD) mode, adaptive motion vector prediction (AMVP) mode using 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, and The present invention includes one or more sophisticated inter-prediction coding tools, including inter-prediction coding (CIIP), geometric partitioning mode (GPM), etc. Inter-prediction and related methods are described in detail below.
[0110] In some cases, enhanced merge prediction can be used. For example, in VTM4, such a merge candidate list is constructed by including five types of candidates, in order: spatial MVPs from spatially neighboring CUs, temporal MVPs from co-located CUs, history-based MVPs from a first-in-first-out (FIFO) table, pairwise average MVPs, and zero MVPs.
[0111] The size of the merge candidate list can be signaled in the slice header. In the example, the maximum allowed size of the merge candidate list is 6 in VTM4. For each CU coded in merge mode, an 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.
[0112] Some examples of the generation process for each category of merge candidates are given below. In an embodiment, spatial candidates are derived as follows: The derivation of spatial merge candidates in VVC can be the same as that in HEVC. In an 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 an embodiment of the present disclosure. With reference to FIG. 9, the derivation order is B1, A1, B0, A0, B2. Position B2 is considered only if the CUs at positions A0, B0, B1, and A1 are unavailable (e.g., because the CUs belong to another slice or another tile) or are 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, thus improving coding efficiency.
[0113] In order to reduce the amount of calculations, not all possible candidate pairs are considered in the aforementioned 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 a spatial merge candidate redundancy check according to one embodiment of the present disclosure. With reference to FIG. 10, the pairs linked to each arrow include A1 and B1, A1 and A0, A1 and B2, B1 and B0, and B1 and B2. This allows comparing candidates at positions B1, A0, and / or B2 with candidates at position A1, and candidates at positions B0 and / or B2 with candidates at position B1.
[0114] In an embodiment, the temporal candidates are derived as follows: In the example, only one temporal merge candidate is added to the candidate list. Figure 11 shows an example motion vector scaling for temporal merge candidates. To derive a temporal merge candidate for a current CU (1111) in a current picture (1101), a scaled MV (1121) (e.g., shown by the dotted line in Figure 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 the dotted line in Figure 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.
[0115] FIG. 12 shows exemplary candidate positions (e.g., C0 and C1) for a temporal merge candidate of a current CU. The position of the temporal merge candidate can be selected between candidate positions C0 and 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 (1210) of the co-located CU (1210) of the current CU (1210). If the CU at candidate position C0 is unavailable, intra-coded, or outside the current row of the CTU, then candidate position C1 is used to derive the temporal merge candidate. Otherwise, for example, if the CU at candidate position C0 is available, intra-coded, and in the current row of the CTU, then candidate position C0 is used to derive the temporal merge candidate.
[0116] Merge mode with MVD (MMVD) can be used in video / image coding such as VVC. In MMVD mode, samples of a CU can be predicted using implicitly derived motion information. For example, after signaling a skip flag or a merge flag, an MMVD merge flag can be signaled to specify whether to use the MMVD mode for a CU.
[0117] In addition to the merge mode, the MMVD mode allows coding the MV difference (MVD) so that the MV is refined, which is the sum of the MVP and the MVD (or motion offset). The MMVD mode allows combining the concepts of the merge and AMVP modes by providing a predefined MVD as the derived merged motion information. In the MMVD mode, the first candidate in the merge candidate list is of One of the two candidates can be selected as the base (also called the MV base or MV start point). For example, the merge candidate flag (e.g., signaled) indicates that the first candidate in the candidate merge list is the of One of two candidates is shown.
[0118] After the MV base is selected, the MV base can be refined by additional information, such as signaled MVD information indicating the MVD relative to the MV base. The MVD, expressed in terms of direction and distance, can be coded (e.g., encoded) as a refinement of the MV base. The additional information can include a distance index, used to specify the distance (also called magnitude) of the MVD, and a direction index, used to indicate the direction of the MVD.
[0119] In MVD, multiple distances (also called offsets) can be designed (e.g., 8 distance entries for each distance set in Table 1). Table 1 shows examples of two distance sets, including a first distance set and a second distance set, and shows examples of the relationship between distance indexes and multiple distances in each distance set. The first distance set can be used when full-pel MMVD is off, and the offsets predefined by MMVD can range from 1 / 4 luma sample to 32 luma samples. When integer-pel MMVD is off, the predefined offsets can have non-integer values, such as a percentage of a luma sample (e.g., 1 / 4 pixel or 1 / 2 pixel). The second distance set can be used when full-pel MMVD is off, and the offsets predefined by MMVD can range from 1 / 4 luma sample to 32 luma samples. When full-pel MMVD is off, the predefined offsets can have non-integer values, such as a percentage of a luma sample (e.g., 1 / 4 pixel or 1 / 2 pixel). Adjustment Available when full-pel MMVD is on, the offset predefined by the MMVD can range from 1 luma sample to 128 luma samples. In an example, when integer-pel MMVD is on, the predefined offset has only integer values, such as 1 or more luma samples.
[0120] An encoder can, for example, at the picture level, select a distance set from Table 1. A distance index can be signaled to the MVD to indicate which of the distances in the selected distance set applies. [Table 1] Example of the relationship between distance index and multiple distances (in luma samples) in MMVD mode [Table 1]
[0121] In an example, multiple orientations are allowed for the MVD (e.g., four orientations such as 0 degrees, 90 degrees, 180 degrees, and 270 degrees). A direction index can be signaled to indicate which of the multiple orientations (e.g., four orientations) is selected as the orientation for the MVD.
[0122] Table 2 shows an example of the relationship between the four directions and the direction index. Referring to Table 2, a direction index of 00 indicates the positive direction of the x-axis, a direction index of 01 indicates the negative direction of the x-axis, a direction index of 10 indicates the positive direction of the y-axis, and a direction index of 11 indicates the negative direction of the y-axis. [Table 2] shows an example of the relationship between MMVD directions and direction indexes. [Table 2]
[0123] 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 the MV. In an example, TM is used at the decoder side. In the TM mode, the MV can be refined by constructing a template (e.g., a current template) for a block (e.g., a current block) in a current picture to be reconstructed, and determining the closest match between the template for the block in the current picture and multiple templates (e.g., multiple reference templates) in a reference picture. In an embodiment, the template for the block in the current picture can include a reconstructed sample of the block's left neighbor and a reconstructed sample of the block's upper neighbor. TM can be used in video / image coding beyond VVC.
[0124] 13 shows an example of template matching (1300). Using the TM, motion information for the current CU (1301) can be derived by determining the closest match between a template (1321) of a current CU (1301) in a current picture (1310) and one template (e.g., one of the multiple templates is template (1325)) in a reference picture (1311). The template (1321) of the current CU (1301) can have any suitable shape and suitable size.
[0125] In an 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.
[0126] The top template (1322) may include samples in one or more top neighboring blocks of the current CU (1301). In an example, the top template (1322) may include 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 an example, the left template (1323) may include four columns of samples in one or more left neighboring blocks of the current CU (1301).
[0127] Each of the multiple templates (e.g., template (1325)) of the reference picture (1311) corresponds to the template (1321) of the current picture (1310). In an embodiment, the initial MV (1302) points from the current CU (1301) to the reference block (1303) of the reference picture (1311). Each of the multiple templates (e.g., template (1325)) of the reference picture (1311) and the template (1321) of the current picture (1310) may have the same shape and size. For example, the template (1325) includes a top template (1326) of the reference picture (1311) and a left template (1327) of the reference picture (1311). The top template (1326) may include samples in one or more upper 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).
[0128] The TM cost can be determined based on the template (1321) and the template (1325). The TM cost can indicate a match between the template (1321) and the template (1325). The optimized MV can be determined based on a search around the initial MV (1302) of the current CU (1301) in the search range (1315). The search range (1315) can have any suitable shape and any suitable number of reference samples. In an example, the search range (1315) of 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,11]) 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]). Based on the intermediate MV, an intermediate reference block and a corresponding template in the reference picture (1311) can be determined. The TM cost can be determined based on the intermediate template (1311) of the template (1321) and 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). For example, the difference corresponding to the minimum TM cost is selected, and the difference corresponding to the minimum TM cost is added to the initial MV (1302) to become the optimized MV.
[0129] The TM can be modified accordingly. In an example, the search step size is determined by the AMVR mode. In an example, the TM can be cascaded (e.g., used together) with other coding methods, such as a bilateral matching process.
[0130] In an example, the TM is used to refine the motion information of MVP candidates in AMVP mode and / or merge candidates in merge mode.
[0131] The disclosure includes aspects related to MMVD mode in which TM is used to improve MMVD mode. TM can be utilized to refine MV information of MVD candidates in MMVD mode. TM can be utilized to derive direction information (e.g., direction index) and / or distance information (e.g., distance index) in MMVD mode.
[0132] In an example, a current block of a current picture is coded in an MMVD mode. An MVP of an MV of the current block may be determined based on a candidate list (e.g., a merge candidate list) and information (e.g., an index or a flag) indicating which candidate (e.g., a merge candidate) in the candidate list is used as an MVP. For example, the flag may be a merge candidate flag as described above. The analyzed one or more MVD candidates may be determined using an MMVD mode, for example, based on the MVD information of the current block.
[0133] According to the disclosed embodiment, TM is applied together with the MMVD mode to determine the MVD of the MV of the current block (also called TM matched MVD). To determine the TM matched MVD, a TM search procedure can be performed around one or more parsed MVD candidates determined in the MMVD mode. In an example, the current template of the current block of the current picture and the reference template of the reference block of the reference picture corresponding to the TM matched MVD have the smallest TM cost (or the closest match) among the template pairs between the current picture and the reference picture (e.g., the current template of the current block of the current picture and the reference template of each reference block of the reference picture). The MV of the current block can be determined based on the MVP and the TM matched MVD, for example, by adding the MVP and the TM matched MVD.
[0134] In an embodiment, a single MVD candidate is determined using the MMVD mode. TM is performed around the MVD candidate to determine the TM-matched MVD. The single MVD candidate can be determined based on the MVD information of the current block. The MVD information can indicate a distance index and / or a direction index. Any suitable distance set and / or any suitable direction set can be used in the MMVD mode. Which distance set and / or which direction set is used to determine the single MVD candidate can be predefined or can be indicated in the prediction information including the MVD information. In an example, the MVD information indicates that the first distance set in Table 1 is used, the distance index is 1, and the direction index is 00. Thus, the MVD candidate has a magnitude of 1 / 2 luma samples and the same direction as the positive x-axis.
[0135] In an embodiment, multiple MVD candidates are determined using the MMVD mode. A TM can be performed around each of the multiple MVD candidates to obtain a TM cost and a corresponding updated MVD candidate. A TM-matching MVD can be determined based on the TM cost and the corresponding updated MVD candidate.
[0136] In an embodiment, a TM flag is signaled to indicate whether the TM procedure is enabled when the MMVD mode is used. The TM flag is signaled at the sequence parameter set (SPS) level, the picture parameter set (PPS) level, the picture level (e.g., in the picture header (PH)), the slice level, the block level, etc. If the TM flag indicates that TM is enabled in the MMVD mode, then TM can be applied to determine the TM-matched MVD. Otherwise, if the TM flag indicates that TM is not enabled in the MMVD mode, then TM is not applied to determine the TM-matched MVD.
[0137] In an embodiment, the distance set used in the MMVD mode depends on whether TM is enabled for the current block. For example, if the TM flag indicates that the TM procedure is enabled, a different distance set is used in the MMVD mode than the first and second distance sets shown in Table 1.
[0138] In the example, if TM is enabled for MMVD mode, the distance sets available for MVD candidates in MMVD mode are 4 luma samples instead of 1 / 4 luma sample in the first distance set, or 1 luma sample in the second distance set. N For example, the search range of the TM mode is in the range of [-L, +L] in the horizontal and vertical directions, where L is a positive number. Returning to FIG. 13, when L is 8, the search range is [-8, 8]. The minimum distance of the distance set can depend on the search range of the TM procedure in the MMVD mode. In the example, the minimum distance of the distance set corresponds to a distance index of 0. When the distance value of distance index 0 (e.g., the shortest distance) is changed, the distance set is changed accordingly. Table 3 shows an example of the relationship between the distance index and multiple distances (in luma samples) in the MMVD mode. [Table 3] Example of the relationship between distance index and multiple distances (in luma samples) in MMVD mode [Table 3]
[0139] As an example, the distance value corresponding to distance index 0 (e.g., the smallest distance in the distance set) is equal to L, where the search range of the TM procedure in MMVD mode is in the range of [-L, +L]. For example, if the TM search range is in the range of [-8, +8,]-pel, the distance value will be 8 luma samples.
[0140] As an example, the distance value corresponding to distance index 0 (e.g., the smallest distance in the distance set) is a fraction of L, such as L / 2, where the search range of the TM procedure in MMVD mode is in the range [-L, +L]. For example, if the TM search range is in the range [-8, 4,]-pel, the distance value will be 8 luma samples.
[0141] In an example, the distance values in the distance set follow an arithmetic progression. For example, the distance values are 8, 16, 24, 32, 40, 48, 56, and 64, which correspond to distance indexes 0 through 7, respectively. In another example, the distance values are 4, 12, 20, 28, 36, 44, 52, and 60, which correspond to distance indexes 0 through 7, respectively.
[0142] As discussed above, any suitable distance set may be used in the MMVD mode. The distance set used in the MMVD mode may include any suitable number of distances and / or any suitable distance values.
[0143] As described above, multiple MVD candidates can be determined using the MMVD mode. A TM can be performed around each of the multiple MVD candidates to obtain a TM cost and a corresponding updated MVD candidate. A TM-matching MVD can be determined based on the TM cost and the corresponding updated MVD candidate.
[0144] In an embodiment, one or more direction indexes, distance steps, and / or one or more distance indexes may be derived or ranked (eg, sorted) based on TM cost.
[0145] In an embodiment, the multiple MVD candidates have the same direction. The directions of the multiple MVD candidates can be parsed in the MMVD mode. For example, the MVD information indicates the directions of the multiple MVD candidates (e.g., by a direction index). The magnitudes (or distances) of the multiple MVD candidates can be determined based on a distance set, as shown in Tables 1 and 3. In one example, the magnitudes of the multiple MVD candidates are distances in the distance set. After parsing the direction, a TM procedure can be applied to the multiple MVD candidates along the parsed direction to determine a corresponding TM cost and an updated MVD candidate for each. The search range of the TM procedure can be any suitable search range, such as within the range of [-L, L] as described above. The search step size can be any suitable step size. In an example, the search range is limited to a particular direction, such as the parsed direction. The multiple MVD candidates can be ranked (e.g., sorted) based on TM cost, such as sorted in ascending order of TM cost. In an example, the MVD information indicates distance information, such as a distance index. In an example, the distance index is signaled. The TM matched MVD can be determined to be the updated MVD candidate corresponding to the MVD candidate indicated by the distance index of the multiple sorted MVD candidates. In an example, the distance index is not signaled, and the TM matched MVD is determined to be the updated MVD candidate corresponding to the smallest TM cost among the multiple sorted MVD candidates.
[0146] For example, the direction of the multiple MVD candidates is the positive x-axis, indicated by direction index 00. The number of multiple MVD candidates is 8. The multiple MVD candidates have magnitudes of 4, 8, 16, 32, 64, 128, 256, and 512 luma samples, respectively, as shown in Table 3. Before TM, the relationship between the distance index and the corresponding distance is shown in Table 3, for example, distance index 0 corresponds to a distance value of 4 luma samples. We apply the TM procedure to each of the multiple MVD candidates and determine the TM cost and each updated MVD candidate, as shown in Table 4. Table 4: Exemplary relationships between multiple MVD candidates, TM costs, and corresponding updated MVD candidates [Table 4]
[0147] The first column of Table 4 shows multiple MVD candidates. The multiple MVD candidates (e.g., MVD candidates 0-7) have the same direction, which is the positive x-axis. The magnitudes or distances of MVD candidates 0-7 are 4, 8, 16, 32, 64, 128, 256, and 512 luma samples, respectively. The TM costs of MVD candidates 0-7 are TM costs 0-7, respectively. The updated MVD candidates of the corresponding MVD candidates 0-7 are updated MVD candidates 0-7, respectively. The magnitude of the updated MVD candidate (e.g., updated MVD candidate 0) may be different or the same as the magnitude of the corresponding MVD candidate (e.g., updated MVD candidate 0). The orientation of the updated MVD candidate (e.g., updated MVD candidate 0) may be different or the same as the orientation of the corresponding MVD candidate (e.g., updated MVD candidate 0).
[0148] For example, the TM costs in Table 4 are sorted in ascending order as follows: TM cost 3, TM cost 4, TM cost 6, TM cost 0, TM cost 1, TM cost 2, TM cost 7, and TM cost 5. TM cost 3 is the smallest of the TM costs. Table 5 shows the relationship between the MVD candidates, updated MVD candidates, and TM costs shown in Table 4. The rows in Figure 5 are different from those in Figure 4. In Table 5, the rows are sorted based on the TM cost. [Table 5] Sorted MVD candidates and updated MVD candidates [Table 5]
[0149] The multiple MVD candidates can be ranked (e.g., sorted) based on TM cost, such as sorted in ascending order of TM cost. Table 6 shows the MVD candidates ranked (e.g., sorted) based on TM cost and corresponding distance index. [Table 6] Sorted MVD candidates [Table 6]
[0150] When the distance index is 0, the MVD candidate indicated by the distance index 0 is a candidate with magnitude 32 luma samples and direction of +x-axis, such as the first candidate in Table 6. Based on the relationship between the multiple MVD candidates, the TM cost, and the corresponding updated MVD candidate, as shown in Table 4 or Table 5, an updated MVD candidate (e.g., magnitude: 32, direction: +x-axis) corresponding to the MVD candidate is derived as updated MVD candidate 3. Thus, the TM match MVD is determined as updated MVD candidate 3. Both the MVD candidate (e.g., magnitude: 32, direction: +x-axis) and the updated MVD candidate 3 correspond to the TM cost 3.
[0151] In an embodiment, the distance index is not signaled. The direction information (e.g., the direction index) and the distance step information (e.g., indicating the distance set used in the MMVD mode) are signaled. In an example, the TM matched MVD is determined to be the updated MVD candidate (e.g., the updated MVD candidate 3) corresponding to the minimum TM cost (e.g., the TM cost 3) among the TM costs of the multiple MVD candidates. As an example, the multiple MVD candidates along the parsed direction are ranked (e.g., sorted) based on the corresponding TM costs as described above. With reference to Table 6, the distance index is not signaled. The minimum TM cost is the TM cost 3. Since the TM cost 3 corresponds to the updated MVD candidate 3, the TM matched MVD is the updated MVD candidate 3.
[0152] In an embodiment, the multiple MVD candidates have the same distance (or magnitude). The distance of the multiple MVD candidates can be parsed in MMVD mode. For example, the MVD information indicates the distance of the multiple MVD candidates (e.g., by a distance index). The orientation of the multiple MVD candidates can be determined based on the orientation set, as shown in Table 2. In an example, the orientation of the multiple MVD candidates is four orientations, as shown in Table 2. A TM procedure can be applied to the multiple MVD candidates to determine a corresponding TM cost and an updated MVD candidate for each. The search range of the TM procedure can be any suitable search range, such as within the range of [-L, L] as described above. The search step size can be any suitable step size. The multiple MVD candidates can be ranked (e.g., sorted) based on TM cost, such as sorted in ascending order of TM cost. In an example, the MVD information indicates orientation information, such as a direction index. In an example, the direction index is signaled. The TM matching MVD can be determined to be the updated MVD candidate corresponding to the MVD candidate indicated by the direction index of the multiple sorted MVD candidates.
[0153] For example, the distance of the multiple MVD candidates is 8 luma samples, as indicated by distance index 5 pointing to the first distance set in Table 1. The number of multiple MVD candidates is 4. The multiple MVD candidates have directions of +x-axis, -x-axis, +y-axis, and -y-axis, respectively, as shown in Table 2. Before TM, the relationship between the direction index and the corresponding direction is shown in Table 2, for example, direction index 00 corresponds to the direction of +x-axis of 4 luma samples. Apply the TM procedure to each of the multiple MVD candidates to determine the TM cost and each updated MVD candidate, as shown in Table 7. Table 7: Exemplary relationships between multiple MVD candidates, TM costs, and corresponding updated MVD candidates [Table 7]
[0154] The first column of Table 7 shows multiple MVD candidates. The multiple MVD candidates (e.g., MVD candidates A-D) have the same distance of 8 luma samples. The orientations of the MVD candidates A-D are +x-axis, -x-axis, +y-axis, and -y-axis, respectively. The TM costs of the MVD candidates A-D are TM costs A-D, respectively. The updated MVD candidates of the corresponding MVD candidates A-D are updated MVD candidates A-D, respectively. The size of the updated MVD candidate (e.g., updated MVD candidate A) may be different or the same as the size of the corresponding MVD candidate (e.g., updated MVD candidate A). The orientation of the updated MVD candidate (e.g., updated MVD candidate A) may be different or the same as the orientation of the corresponding MVD candidate (e.g., updated MVD candidate A).
[0155] For example, the TM costs in Table 7 are sorted in ascending order as TM cost B, TM cost C, TM cost D, and TM cost A. TM cost B is the smallest of the TM costs. Table 8 shows the relationship between the MVD candidates, updated MVD candidates, and TM costs shown in Table 7. The rows in Figure 8 are different from those in Figure 7. In Table 8, the rows are sorted based on the TM costs. [Table 8] Sorted MVD candidates and updated MVD candidates [Table 8]
[0156] The multiple MVD candidates can be ranked (e.g., sorted) based on TM cost, such as by ascending TM cost. Table 9 shows the TM cost and corresponding direction 1 shows MVD candidates ranked (e.g., sorted) based on the index. [Table 9] Sorted MVD candidates [Table 9]
[0157] When the direction index is 0, the MVD candidate indicated by the direction index 0 is a candidate with magnitude 8 luma samples and direction of -x-axis, such as the first candidate in Table 9. Based on the relationship between the multiple MVD candidates, the TM cost, and the corresponding updated MVD candidate, as shown in Table 7 or Table 8, an updated MVD candidate (e.g., magnitude: 8, direction: -x-axis) corresponding to the MVD candidate is derived as the updated MVD candidate B. Thus, the TM match MVD is determined to be the updated MVD candidate B. Both the MVD candidate (e.g., magnitude: 8, direction: -x-axis) and the updated MVD candidate B correspond to the TM cost B.
[0158] In an embodiment, the direction index is not signaled. In an example, the TM-matching MVD is determined to be the updated MVD candidate (e.g., updated MVD candidate B) corresponding to the minimum TM cost (e.g., TM cost B) among the TM costs of the multiple MVD candidates. As an example, multiple MVD candidates with the same direction are ranked (e.g., sorted) based on the corresponding TM costs as described above. The minimum TM cost is TM cost B. Since TM cost B corresponds to the updated MVD candidate B, the TM-matching MVD is the updated MVD candidate B.
[0159] FIG. 14 shows a flow chart outlining an encoding process (1400) according to one embodiment of the present disclosure. In various embodiments, the process (1400) is performed by processing circuitry, such as processing circuitry within terminal devices (310), (320), (330), and (340), such as processing circuitry that performs the functions of a video encoder (e.g., (403), (603), (703)). In some embodiments, the process (1400) is implemented with software instructions, such that the processing circuitry performs the process (1400) when it executes the software instructions. The process begins at (S1401) and proceeds to (S1410).
[0160] At (S1410), one or more motion vector difference (MVD) candidates for the current block may be determined using a merge mode by motion vector difference (MMVD). The MMVD mode and template matching (TM) mode are used together to encode the current block.
[0161] At (S1420), the MVD of the current block may be determined by applying TM to one or more MVD candidates.
[0162] In an embodiment, the one or more MVD candidates are a single MVD candidate. The MVD may be determined by applying TM to the single MVD candidate, as described in the disclosure.
[0163] In an embodiment, the one or more MVD candidates include multiple MVD candidates having the same direction. The multiple MVD candidates can each have multiple distances. In an example, the multiple MVD candidates are ordered based on the multiple distances. TM can be applied to each of the multiple MVD candidates to obtain a TM cost and each updated MVD candidate. The MVD can be determined based on the TM cost and the corresponding updated MVD candidate.
[0164] In the example, the multiple MVD candidates are ranked (e.g., sorted) according to the TM costs of the multiple MVD candidates. The MVDs are determined to be updated MVD candidates based on the corresponding TM costs.
[0165] In the example, the MVD is determined to be the updated MVD candidate corresponding to the minimum TM cost among the TM costs of the multiple MVD candidates.
[0166] In an embodiment, the one or more MVD candidates include multiple MVD candidates having the same size. The multiple MVD candidates can each have multiple directions. In an example, the multiple MVD candidates are ordered according to the multiple directions. A TM can be applied to each of the multiple MVD candidates to obtain a TM cost and a corresponding updated MVD candidate. The MVD can be determined based on the TM cost and the corresponding updated MVD candidate.
[0167] In the example, the MVD is determined to be the updated MVD candidate corresponding to the minimum TM cost among the TM costs of the multiple MVD candidates.
[0168] At (S1430), the current block is reconstructed based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the determined MVD.
[0169] In step S1440, prediction information of the current block may be coded into a bitstream. The prediction information may indicate that the MMVD and TM modes are applied to the current block together. The prediction information may indicate MVD information of the current block.
[0170] In the example, the encoded current block and the encoded prediction information are transmitted in the bitstream.
[0171] The process (1400) proceeds to (S1499) and ends.
[0172] The process (1400) may be adapted to various scenarios as appropriate, and the steps of the process (1400) may be adjusted accordingly. One or more steps of the process (1400) may be adapted, omitted, repeated, and / or combined. Any suitable order may be used to implement the process (1400). Additional steps may be added.
[0173] In the example, a TM flag is encoded to indicate that TM is valid for the current block. The encoded bitstream may include the TM flag.
[0174] In an embodiment, the multiple distances are a set of distances listed in Tables 1 and 3, or a subset of the set of distances listed in Tables 1 and 3. The values of the multiple distances or the set of distances can be based on a search range of the TM. For example, the search range of the TM is in the range [-L, +L] in the horizontal and vertical directions, where L is a positive integer. The smallest distance of the multiple distances is equal to L or L / 2. In an example, the multiple distances are in an arithmetic progression.
[0175] In the embodiment described in (S1420), the multiple MVD candidates may have the same direction or the same magnitude. In some examples, the multiple MVD candidates may have different directions and different magnitudes. TM may be applied to each of the multiple MVD candidates to obtain a TM cost and a corresponding updated MVD candidate. The MVD may be determined based on the TM cost and the corresponding updated MVD candidate. In an embodiment, the updated MVD candidates are ranked based on the corresponding TM cost. In an example, the MVD is determined to be the updated MVD candidate corresponding to the minimum TM cost among the TM costs of the multiple MVD candidates.
[0176] As described above, the MVD can be determined based on the TM cost and the corresponding updated MVD candidate. In an example, the multiple MVD candidates are ranked (e.g., sorted) according to the TM costs of the multiple MVD candidates. The MVD is determined to be the updated MVD candidate based on the corresponding TM cost. An index (e.g., a distance index or a direction index) can be coded into the bitstream to indicate the MVD candidate corresponding to the updated MVD candidate, which is the determined MVD.
[0177] FIG. 15 shows a flow chart outlining a decoding process (1500) according to one embodiment of the present disclosure. In various embodiments, the process (1500) is performed by processing circuitry such as processing circuitry within 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 (1500) is implemented with software instructions, and thus the processing circuitry performs the process (1500) as the processing circuitry executes the software instructions. The process begins at (S1501) and proceeds to (S1510).
[0178] In step S1510, prediction information of a current block in a coded bitstream may be decoded. The prediction information may indicate that a merge mode based on motion vector difference (MMVD) with template matching (TM) mode is applied to the current block. The prediction information may indicate motion vector difference (MVD) information of the current block.
[0179] For example, the coded bitstream further includes a TM flag, which indicates that TM is valid for the current block.
[0180] At (S1520), one or more MVD candidates can be determined based on the MVD information.
[0181] At (S1530), an MVD (e.g., a TM matching MVD) for the current block may be determined by applying TM to the one or more MVD candidates. In an embodiment, the TM is performed to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates. In an example, the one or more MVD candidates are MVD candidates, and the TM is performed to search around the MVD candidate for a matching MVD. In an example, the one or more MVD candidates are multiple MVD candidates, and the TM is performed to search among the multiple MVD candidates for a matching MVD. For example, the TM is performed to search around each of the multiple MVD candidates for a matching MVD.
[0182] In an embodiment, the one or more MVD candidates are a single MVD candidate. The MVD information includes distance information indicating a size of the single MVD candidate and direction information indicating a direction of the single MVD candidate. The single MVD candidate is determined based on the size of the single MVD candidate and the direction of the single MVD candidate using an MMVD mode. The MVD can be determined by applying TM to the single MVD candidate as described in the disclosure. For example, a matching MVD can be determined by performing TM around the single MVD candidate.
[0183] In an embodiment, the one or more MVD candidates include multiple MVD candidates having the same direction. The MVD information includes direction information indicating the direction of the multiple MVD candidates. The multiple MVD candidates can be determined based on the direction of the multiple MVD candidates and the multiple distances. In an example, the multiple MVD candidates are ordered based on the multiple distances. TM can be applied for each of the multiple MVD candidates to obtain a TM cost and each updated MVD candidate. A matching MVD can be determined based on the TM cost and the corresponding updated MVD candidate.
[0184] In an example, the MVD information includes a distance index. The multiple MVD candidates can be ranked (e.g., sorted) according to the TM costs of the multiple MVD candidates. The matching MVD can be determined to be an updated MVD candidate that corresponds to the MVD candidate indicated by the distance index of the multiple sorted MVD candidates.
[0185] In the example, the distance index is not signaled. The matching MVD is determined to be the updated MVD candidate that corresponds to the minimum TM cost among the TM costs of the multiple MVD candidates.
[0186] In an embodiment, the one or more MVD candidates include multiple MVD candidates having the same size. The MVD information includes distance information indicating the size of the multiple MVD candidates. The multiple MVD candidates can be determined based on the size and the multiple directions of the multiple MVD candidates. In an example, the multiple MVD candidates are ordered according to the multiple directions. TM can be applied to each of the multiple MVD candidates to obtain a TM cost and a corresponding updated MVD candidate. A matching MVD can be determined based on the TM cost and the corresponding updated MVD candidate.
[0187] In an example, the MVD information includes a direction index. The multiple MVD candidates can be sorted according to the TM costs of the multiple MVD candidates. The matching MVD can be determined to be an updated MVD candidate corresponding to the MVD candidate indicated by the direction index of the multiple sorted MVD candidates.
[0188] In the example, the direction index is not signaled. The matching MVD is determined to be the updated MVD candidate that corresponds to the minimum TM cost among the TM costs of the multiple MVD candidates.
[0189] Alternatively, when the one or more MVD candidates include multiple MVD candidates, TM can be applied to the multiple MVD candidates to obtain the TM cost of each. For example, TM is performed among the multiple MVD candidates. A matching MVD can be determined based on the TM cost and the corresponding MVD candidate. In an example, the matching MVD is determined to be the MVD candidate indicated by the distance index among the multiple sorted MVD candidates. In an example, the distance index is not signaled, and the matching MVD is determined to be the MVD candidate corresponding to the smallest TM cost among the TM matching MVD costs of the multiple MVD candidates.
[0190] At (S1540), the current block is reconstructed based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and a determined MVD (eg, a matched MVD).
[0191] The process (1500) proceeds to (S1599) and ends.
[0192] The process (1500) may be adapted to various scenarios as appropriate, and the steps of the process (1500) may be adjusted accordingly. One or more steps of the process (1500) may be adapted, omitted, repeated, and / or combined. Any suitable order may be used to implement the process (1500). Additional steps may be added.
[0193] In an embodiment, the distance information includes a distance index that points to a distance among the multiple distances. For example, the multiple distances are a distance set listed in Tables 1 and 3, or a subset of the distance set listed in Tables 1 and 3. A distance is a size of one MVD candidate. The multiple distance values can be based on a search range of the TM. For example, the search range of the TM is in the range of [-L, +L] in the horizontal and vertical directions, where L is a positive integer. The minimum distance among the multiple distances is equal to L or L / 2. In an example, the multiple distances are in an arithmetic progression.
[0194] In the embodiment described in (S1530), the multiple MVD candidates can have the same direction or the same magnitude. In some examples, the multiple MVD candidates can have different directions and different magnitudes. In the examples, the multiple MVD candidates are determined based on the MVD information, for example, using the MMVD mode. TM can be applied to each of the multiple MVD candidates to obtain a TM cost and a corresponding updated MVD candidate. A matching MVD can be determined based on the TM cost and the corresponding updated MVD candidate. In the embodiments, the updated MVD candidates are ranked based on the corresponding TM cost. In the examples, an index is signaled, and the matching MVD is determined to be the updated MVD candidate corresponding to the MVD candidate pointed to by the index among the multiple ranked (e.g., sorted) MVD candidates. In the examples, the matching MVD is determined to be the updated MVD candidate corresponding to the minimum TM cost among the TM costs of the multiple MVD candidates.
[0195] The embodiments of the present disclosure may be used separately or combined in any order. Furthermore, each of the methods (or embodiments), the encoder, and the decoder may be implemented by processing circuitry (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.
[0196] The techniques described above may be implemented as computer software using computer readable instructions and physically stored on one or more computer readable media. For example, Figure 16 illustrates a computer system (1600) suitable for implementing certain embodiments of the subject matter of this disclosure.
[0197] The computer software can be coded using any suitable machine code or computer language that can be processed by mechanisms such as assembly, compilation, linking, etc. to generate code including instructions that can be executed by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., directly or through interpretation, microcode execution, etc.
[0198] The instructions may be executed in a variety of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, Internet of Things devices, and the like.
[0199] 16 of the computer system (1600) 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. Furthermore, the arrangement of components should not be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the exemplary embodiment of the computer system (1600).
[0200] The computer system (1600) may include certain human interface input devices. Such human interface input devices may be responsive to input by one or more human users, for example, through sensory input (e.g., keystrokes, swipes, data grabbing actions), audio input (e.g., voice, clapping), visual input (e.g., gestures), 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 sound (e.g., speech, music, ambient sounds), images (e.g., scanned images, photographic images obtained from a digital camera), and video (including, for example, two-dimensional video, three-dimensional video, stereoscopic video).
[0201] The input human interface devices may include one or more of a keyboard (1601), a mouse (1602), a trackpad (1603), a touch screen (1610), a data glove (not shown), a joystick (1605), a microphone (1606), a scanner (1607), and a camera (1608) (only one of which is shown).
[0202] The computer system (1600) 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 sensory output, sound, light, and smell / taste. Such human interface output devices may include sensory output devices (e.g., sensory feedback via a touch screen (1610), data glove (not shown), or joystick (1605 (although there may also be sensory feedback devices that do not function as input devices)), audio output devices (e.g., speakers (1609), headphones (not shown), visual output devices (e.g., screens (1610), including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capability, each with or without sensory feedback capability, some of which may be capable of outputting two-dimensional visual output or three-dimensional or higher output through such means as stereoscopic output, virtual reality glasses (not shown), holographic displays, and smoke tanks (not shown), and printers (not shown)).
[0203] The computer system (1600) may also include human accessible storage and associated media such as optical media including CD / DVD ROM / RW (1620) with media such as CDs / DVDs (1621), thumb drives (1622), removable hard drives or solid state drives (1623), legacy magnetic media such as tape and floppy disks (not shown), dedicated ROM / ASIC / PLD based devices such as security dongles (not shown), etc.
[0204] Those skilled in the art should also understand that the term "computer-readable medium" as used in connection with the subject matter of this disclosure does not encompass transmission media, carrier waves, or other transitory signals.
[0205] The computer system (1600) may also include an interface (1654) to one or more communication networks (1655). The networks may be, for example, wireless, wired, or optical. The networks may further be local, wide area, metropolitan area, vehicular and industrial, real-time, delay tolerant, etc. Examples of networks include local area networks such as Ethernet, wireless LAN, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., TV wired or wireless wide area digital networks including cable TV, satellite TV, terrestrial broadcast TV, vehicular and industrial including CANBus, etc. Certain networks generally require an external network interface that is attached to a specific general purpose data port or peripheral bus (1649) (e.g., a USB port on the computer system (1600)). Others are generally integrated into the core of the computer system (1600) 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 these networks, the computer system (1600) can communicate with other entities. Such communications may be one-way receive only (e.g., broadcast TV), one-way transmit only (e.g., CANbus to a specific CANbus device), or bidirectional to other computer systems, for example, using local or wide area digital networks. Specific protocols and protocol stacks may be used with each of the above-mentioned networks and network interfaces.
[0206] The aforementioned human interface devices, human accessible storage devices, and network interfaces may be attached to a core (1640) of the computer system (1600).
[0207] The core (1640) may include one or more central processing units (CPUs) (1641), graphics processing units (GPUs) (1642), dedicated programmable processing units (1643) in the form of FPGAs, hardware accelerators (1644) for specific tasks, graphics adapters (1650), etc. These devices may be connected through a system bus (1648), along with read-only memory (ROM) (1645), random access memory (1646), internal mass storage devices (1647) such as internal non-user-accessible hard drives, SSDs, etc. In some computer systems, the system bus (1648) is 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 (1648) or through a peripheral bus (1649). In an example, a screen (1610) may be connected to the graphics adapter (1650). Peripheral bus architectures include PCI, USB, and the like.
[0208] The CPU (1641), GPU (1642), FPGA (1643), and accelerator (1644) may execute certain instructions that may be combined to generate the aforementioned computer code. The computer code may be stored in a ROM (1645) or a RAM (1646). Temporary data may be stored in the RAM (1646), while permanent data may be stored, for example, in an internal mass storage device (1647). Rapid storage and retrieval from any of the memory devices may be made possible through the use of a cache memory that may be closely associated with one or more of the CPU (1641), GPU (1642), mass storage device (1647), ROM (1645), RAM (1646), etc.
[0209] The computer-readable medium may bear computer code 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 skilled in the computer software arts.
[0210] As an example and not by way of limitation, the computer system (1600) having the architecture, and specifically the core (1640), 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 specific storage of the core (1640) of a non-transitory nature, such as the core's internal mass storage (1647) or ROM (1645), and media associated with user-accessible mass storage as described above. Software implementing various embodiments of the present disclosure can be stored in such devices and executed by the core (1640). The computer-readable media can include one or more memory devices or chips, depending on the particular needs. The software can cause the core (1640) and specifically the processor therein (including CPU, GPU, FPGA, etc.) to perform certain operations or certain portions of certain operations described herein, including defining and modifying data structures stored in RAM (1646) according to software-defined operations. Additionally or alternatively, the computer system may provide functionality as a result of implementation in hardwired or other circuitry (e.g., accelerator (1644)) that can operate in conjunction with or in place of software to perform certain processes or certain portions of certain processes described herein. Reference to software includes logic, and vice versa, where appropriate. Reference to computer-readable medium may include circuitry (such as an integrated circuit (IC)) that stores software for execution, circuitry that implements logic for execution, or both, where appropriate. The present disclosure includes any appropriate combination of hardware and software. Appendix A: Glossary 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 GOPs:Groups of Pictures TUs:Transform Units, PUs:Prediction Units CTUs:Coding Tree Units CTBs:Coding Tree Blocks PBs:Prediction Blocks HRD:Hypothetical Reference Decoder SNR:Signal Noise Ratio CPUs:Central Processing Units GPUs:Graphics Processing Units 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
[0211] While this disclosure has described several exemplary embodiments, there are alterations, permutations, and various substitute equivalents, which are encompassed within the scope of this disclosure. It will be apparent to those skilled in the art that numerous systems and methods can be devised that, although not explicitly shown or described herein, embody the principles of the disclosure and thus are encompassed within the spirit and scope of the disclosure.
Claims
1. 1. A method of video decoding in a video decoder, comprising: decoding prediction information of a current block in a coded bitstream, the prediction information indicating that template matching (TM) is applied with merge mode with motion vector difference (MMVD) and motion vector difference (MVD) information of the current block; determining one or more MVD candidates based on the MVD information; running a TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates; reconstructing the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the matching MVD; Including, the one or more MVD candidates include a plurality of MVD candidates having the same orientation; The MVD information includes direction information indicating directions of the plurality of MVD candidates, determining the one or more MVD candidates includes determining the MVD candidates based on directions of the MVD candidates and a plurality of distances, the MVD candidates being ordered based on the plurality of distances; The step of executing the TM includes: for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining the matching MVD based on the TM cost and the corresponding updated MVD candidates; A method comprising:
2. The method of claim 1 , wherein the coded bitstream further comprises a TM flag, the TM flag indicating that the TM is valid for the current block.
3. The method described in claim 2, wherein the MVD information includes distance information, the distance information includes a distance index indicating a distance among a plurality of distances, the distance being a size of the MVD candidate, and the plurality of distances being based on a search range of the TM.
4. 4. The method of claim 3, wherein the search range of the TM is in the range of [-L, +L] in the horizontal and vertical directions, where L is a positive integer, and the minimum distance among the plurality of distances is equal to L or L / 2.
5. The method described in claim 2, wherein the MVD information includes distance information, the distance information includes a distance index indicating a distance among a plurality of distances, the distance being a magnitude of the MVD candidate, and the plurality of distances being in an arithmetic progression.
6. the MVD information includes a distance index; The step of executing the TM includes: sorting the plurality of MVD candidates according to the TM costs of the plurality of MVD candidates; determining the matched MVD to be an updated MVD candidate corresponding to the MVD candidate indicated by the distance index of the sorted plurality of MVD candidates; The method of claim 1 , comprising:
7. The method of claim 1 , wherein the step of performing the TM includes determining the matched MVD to be the updated MVD candidate corresponding to a minimum TM cost of the TM costs of the multiple MVD candidates.
8. A method of video decoding in a video decoder, comprising: decoding prediction information of a current block in a coded bitstream, the prediction information indicating that template matching (TM) is applied with merge mode with motion vector difference (MMVD) and motion vector difference (MVD) information of the current block; determining one or more MVD candidates based on the MVD information; running a TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates; reconstructing the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the matching MVD; Including, the one or more MVD candidates include a plurality of MVD candidates having the same size; the MVD information includes distance information indicating sizes of the plurality of MVD candidates; determining the one or more MVD candidates includes determining the MVD candidates based on magnitudes and directions of the MVD candidates, the MVD candidates being ordered according to the directions; The step of executing the TM includes: for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining the matching MVD based on the TM cost and the corresponding updated MVD candidates; The method includes:
9. the MVD information includes a direction index; The step of executing the TM includes: sorting the plurality of MVD candidates according to the TM costs of the plurality of MVD candidates; determining the matched MVD to be an updated MVD candidate corresponding to the MVD candidate indicated by the direction index of the reordered plurality of MVD candidates; The method of claim 8 , comprising:
10. 9. The method of claim 8, wherein performing the TM comprises determining the matched MVD to be the updated MVD candidate corresponding to a minimum TM cost among the TM costs of the multiple MVD candidates.
11. 1. An apparatus for video decoding, comprising: a processing circuit, the processing circuit comprising: Decoding prediction information of a current block in a coded bitstream, the prediction information indicating that template matching (TM) is applied with merge mode with motion vector difference (MMVD) and motion vector difference (MVD) information of the current block; determining one or more MVD candidates based on the MVD information; running a TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates; reconstructing the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the matching MVD; It is configured as follows: the one or more MVD candidates include a plurality of MVD candidates having the same orientation; The MVD information includes direction information indicating directions of the plurality of MVD candidates, The processing circuitry includes: determining the plurality of MVD candidates based on the orientations of the plurality of MVD candidates and a plurality of distances, the plurality of MVD candidates being ordered based on the plurality of distances; for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining the matching MVD based on the TM cost and the corresponding updated MVD candidate; The device is configured to:
12. The apparatus of claim 11 , wherein the coded bitstream further includes a TM flag, the TM flag indicating that the TM is valid for the current block.
13. the MVD information includes a distance index; The processing circuitry includes: sorting the MVD candidates according to the TM costs of the MVD candidates; determining the matched MVD to be an updated MVD candidate corresponding to the MVD candidate indicated by the distance index of the sorted plurality of MVD candidates; The device of claim 11 configured to:
14. An apparatus for video decoding, comprising: a processing circuit, the processing circuit comprising: Decoding prediction information of a current block in a coded bitstream, the prediction information indicating that template matching (TM) is applied with merge mode with motion vector difference (MMVD) and motion vector difference (MVD) information of the current block; determining one or more MVD candidates based on the MVD information; running a TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates; reconstructing the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the matching MVD; It is configured as follows: the one or more MVD candidates include a plurality of MVD candidates having the same size; the MVD information includes distance information indicating sizes of the plurality of MVD candidates; The processing circuitry includes: determining the plurality of MVD candidates based on the magnitudes and the plurality of orientations of the plurality of MVD candidates, the plurality of MVD candidates being ordered according to the plurality of orientations; for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining the matching MVD based on the TM cost and the corresponding updated MVD candidate; The device is configured to:
15. the MVD information includes a direction index; The processing circuitry includes: sorting the MVD candidates according to the TM costs of the MVD candidates; determining the matched MVD to be an updated MVD candidate corresponding to the MVD candidate indicated by the direction index of the reordered plurality of MVD candidates; 15. The apparatus of claim 14 configured to:
16. A non-transitory computer-readable storage medium storing a program, the program comprising: decoding prediction information of a current block in a coded bitstream, the prediction information indicating that template matching (TM) is applied with merge mode with motion vector difference (MMVD) and motion vector difference (MVD) information of the current block; determining one or more MVD candidates based on the MVD information; running a TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates; reconstructing the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the matching MVD; and a program executable by at least one processor to execute the program; the one or more MVD candidates include a plurality of MVD candidates having the same orientation; The MVD information includes direction information indicating directions of the plurality of MVD candidates, determining the one or more MVD candidates includes determining the MVD candidates based on directions of the MVD candidates and a plurality of distances, the MVD candidates being ordered based on the plurality of distances; The step of executing the TM includes: for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining the matching MVD based on the TM cost and the corresponding updated MVD candidates; A non-transitory computer readable storage medium comprising:
17. A non-transitory computer-readable storage medium storing a program, the program comprising: decoding prediction information of a current block in a coded bitstream, the prediction information indicating that template matching (TM) is applied with merge mode with motion vector difference (MMVD) and motion vector difference (MVD) information of the current block; determining one or more MVD candidates based on the MVD information; running a TM to search for a matching MVD between a current template of the current block and a reference template of a reference block of the current block based on the one or more MVD candidates; reconstructing the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the matching MVD; and a program executable by at least one processor to execute the program; the one or more MVD candidates include a plurality of MVD candidates having the same size; the MVD information includes distance information indicating sizes of the plurality of MVD candidates; determining the one or more MVD candidates includes determining the MVD candidates based on magnitudes and directions of the MVD candidates, the MVD candidates being ordered according to the directions; The step of executing the TM includes: for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining the matching MVD based on the TM cost and the corresponding updated MVD candidates; A non-transitory computer readable storage medium comprising:
18. 1. A method of video encoding in a video encoder, comprising: determining one or more motion vector difference (MVD) candidates for a current block using a merge mode by motion vector difference (MMVD), where the MMVD mode and a template matching (TM) mode are used to encode the current block; determining a MVD for the current block by applying a TM to one or more candidate MVDs; encoding the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the determined MVD; encoding prediction information of the current block into a bitstream, the prediction information indicating that a TM mode with MMVD is applied for the current block and MVD information; Including, the one or more MVD candidates include a plurality of MVD candidates having the same orientation; The MVD information includes direction information indicating directions of the plurality of MVD candidates, determining the one or more MVD candidates includes determining the MVD candidates based on directions of the MVD candidates and a plurality of distances, the MVD candidates being ordered based on the plurality of distances; The step of applying the TM comprises: for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining a matching MVD based on the TM cost and the corresponding updated MVD candidates; A method comprising:
19. 1. A method of video encoding in a video encoder, comprising: determining one or more motion vector difference (MVD) candidates for a current block using a merge mode by motion vector difference (MMVD), where the MMVD mode and a template matching (TM) mode are used to encode the current block; determining a MVD for the current block by applying a TM to one or more candidate MVDs; encoding the current block based on a motion vector (MV), which is the sum of a motion vector predictor (MVP) and the determined MVD; encoding prediction information of the current block into a bitstream, the prediction information indicating that a TM mode with MMVD is applied for the current block and MVD information; Including, the one or more MVD candidates include a plurality of MVD candidates having the same size; the MVD information includes distance information indicating sizes of the plurality of MVD candidates; determining the one or more MVD candidates includes determining the MVD candidates based on magnitudes and directions of the MVD candidates, the MVD candidates being ordered according to the directions; The step of applying the TM comprises: for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining a matching MVD based on the TM cost and the corresponding updated MVD candidates; A method comprising:
20. 1. An apparatus for video encoding, comprising a processing circuit, the processing circuit comprising: determining one or more motion vector difference (MVD) candidates for the current block using a merge mode by motion vector difference (MMVD), and the MMVD mode and a template matching (TM) mode are used to encode the current block; determining an MVD for the current block by applying TM to one or more MVD candidates; encoding the current block based on a motion vector (MV), the motion vector predictor (MVP) being the sum of the determined MVD; Encoding prediction information of the current block into a bitstream, the prediction information indicating that a TM mode is applied with an MMVD for the current block and MVD information. It is configured as follows: the one or more MVD candidates include a plurality of MVD candidates having the same orientation; The MVD information includes direction information indicating directions of the plurality of MVD candidates, The processing circuitry includes: determining the plurality of MVD candidates based on the orientations of the plurality of MVD candidates and a plurality of distances, the plurality of MVD candidates being ordered based on the plurality of distances; for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining a matching MVD based on the TM cost and the corresponding updated MVD candidate; The device is configured to:
21. 1. An apparatus for video encoding, comprising a processing circuit, the processing circuit comprising: determining one or more motion vector difference (MVD) candidates for the current block using a merge mode by motion vector difference (MMVD), and the MMVD mode and a template matching (TM) mode are used to encode the current block; determining an MVD for the current block by applying TM to one or more MVD candidates; encoding the current block based on a motion vector (MV), the motion vector predictor (MVP) being the sum of the determined MVD; Encoding prediction information of the current block into a bitstream, the prediction information indicating that a TM mode is applied with an MMVD for the current block and MVD information. It is configured as follows: the one or more MVD candidates include a plurality of MVD candidates having the same size; the MVD information includes distance information indicating sizes of the plurality of MVD candidates; The processing circuitry includes: determining the plurality of MVD candidates based on the magnitudes and the plurality of orientations of the plurality of MVD candidates, the plurality of MVD candidates being ordered according to the plurality of orientations; for each of the plurality of MVD candidates, applying the TM to each MVD candidate to obtain a TM cost and an updated MVD candidate corresponding to each MVD candidate; determining a matching MVD based on the TM cost and the corresponding updated MVD candidate; The device is configured to:
Citation Information
Patent Citations
Method, apparatus, and non-transitory computer-readable storage medium for motion vector refinement for geometric partition mode (GPM) - Patents.com
JP2024516076A