Intra template matching prediction based on multiple templates
By adopting a multi-template-based intra-frame template matching prediction method in video coding and using multiple template types for intra-frame prediction, the problem of insufficient intra-frame prediction efficiency and accuracy in the existing technology is solved, and more efficient video decoding is achieved. .
Patent Information
- Application Number
- CN202480001091.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-17
- Filing Date
- 2024-01-18
- Publication Date
- 2024-09-20
AI Technical Summary
Existing video coding techniques struggle to effectively utilize multiple template types in intra prediction, resulting in insufficient coding efficiency and accuracy, especially when the shape and size of blocks change.
A multi-template based intra-frame template matching prediction method is used to search for multiple candidate template types (such as L-shaped template, top template, left template) in the reconstructed part of the current frame, and select the optimal one based on a cost function (such as SAD) The template is predicted and combined with the weighted combination to reconstruct the current block.
It improves the accuracy and coding performance of intra-frame template matching, adapts to changes in different block shapes and sizes, and improves the efficiency and quality of video decoding.
Smart Images

Figure CN118679740A_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of priority to U.S. Patent Application No. 18 / 414,997, filed on January 17, 2024, entitled “MULTI-TEMPLATE BASED INTRA-FRAME TEMPLATE MATCHING PREDICTION,” which claims the benefit of priority to U.S. Provisional Application No. 63 / 439,842, filed on January 18, 2023, entitled “Multi-Template Based Intra-frame Template Matching Prediction.” The entire contents of the prior application are incorporated herein by reference. Technical Field
[0002] This disclosure describes embodiments that generally relate to video encoding. Background Art
[0003] The background description provided herein is for the purpose of presenting the content of the present disclosure in general. Certain works of the inventors named herein (i.e., works described in this background section) and the contents in the specification concerning certain prior art that has not become the prior art before the filing date are not considered to be prior art with respect to the present disclosure, either explicitly or implicitly.
[0004] Image / video compression helps to transmit image / video data between different devices, storage devices and networks with minimal quality degradation. In some examples, video codec technology can compress video based on spatial and temporal redundancy. In one example, the video codec can use a technique called intra-frame prediction, which can compress images based on spatial redundancy. For example, intra-frame prediction can use reference data from the current picture being reconstructed for sample prediction. In another example, the video codec can use a technique called inter-frame prediction, which can compress images based on temporal redundancy. For example, inter-frame prediction can predict samples in the current picture based on previously reconstructed pictures through motion compensation. Motion compensation can be represented by a motion vector (MV). Summary of the invention
[0005] Aspects of the present disclosure include methods and apparatus for video encoding / decoding.In some examples, an apparatus for video decoding includes processing circuitry.
[0006] According to one aspect of the present disclosure, a method for video decoding is provided, which is performed in a video decoder. In the method, a video code stream including encoding information of a current block in a current picture is received, wherein the encoding information indicates that the current block is encoded in an intra-frame template matching prediction mode. At least one template for predicting the current block is determined. Each of the at least one template is a corresponding candidate template of a plurality of template types available in the intra-frame template matching prediction mode. The candidate template is associated with the shape of the current block, the size of the current block, the intra-frame prediction mode of the current block, and one of the distances between the current block and a plurality of candidate templates of the plurality of template types. The candidate template includes different combinations of adjacent reconstructed samples. Based on the determined at least one template, the current block is reconstructed using template matching in the intra-frame template matching prediction mode.
[0007] In one example, the multiple template types include at least one of an L-shaped template, a top template, or a left template. The L-shaped template includes neighboring samples of the current block above the top of the current block and neighboring samples of the current block to the left of the current block. The top template includes neighboring samples of the current block above the top of the current block. The left template includes neighboring samples of the current block to the left of the current block.
[0008] In one example, the width of the top template is equal to the width of the current block, and the height of the top template is equal to a first positive integer. In one example, the width of the left template is equal to a second positive integer, and the height of the left template is equal to the height of the current block.
[0009] In one example, the intra prediction mode of the current block is determined based on decoder-side intra mode derivation (DIMD), wherein the intra prediction mode of the current block is determined based on neighboring samples of the current block reconstructed according to texture gradient analysis. Based on the determined intra prediction mode, the at least one template of the current block is determined from the multiple template types.
[0010] In one example, based on the ratio between the width of the current block and the height of the current block being less than a first threshold, the at least one template of the current block is determined to be one of the following: (i) the L-shaped template and the left template and (ii) the left template. In one example, based on the ratio between the width of the current block and the height of the current block being greater than a second threshold, the at least one template of the current block is determined to be one of the following: (i) the L-shaped template and the top template and (ii) the top template.
[0011] In one example, the plurality of template types include a first template at a first distance from the current block and a second template at a second distance from the current block, the first distance being different from the second distance.
[0012] In one example, based on encoding the current block with a first template determined from the plurality of template types, a plurality of candidate reference blocks of the current block are determined based on the first template. A difference between the first template of the current block and a template region of each of the plurality of candidate reference blocks corresponding to the first template is determined. The current block is reconstructed based on a weighted combination of subsets of the plurality of candidate reference blocks, the subset corresponding to K minimum differences among the differences between the first template of the current block and the template regions of the plurality of candidate reference blocks.
[0013] In one example, based on encoding the current block with two or more templates determined from a plurality of template types, a plurality of candidate reference blocks corresponding to the two or more templates of the current block are determined. A difference between each of the two or more templates of the current block and a template region of each of the plurality of candidate reference blocks corresponding to a corresponding one of the two or more templates is determined. The current block is reconstructed based on a weighted combination of subsets of the plurality of candidate reference blocks, the subset corresponding to K minimum differences among the differences between the two or more templates of the current block and the template regions of the plurality of candidate reference blocks corresponding to the two or more templates of the current block.
[0014] In one example, a context model for entropy encoding first signal information contained in the encoding information is determined based on the size of the current block, wherein the first signal information indicates which of the multiple template types is selected as at least one template for the current block.
[0015] In an example, the encoding information further includes second signal information indicating that the current block is predicted based on the at least one template determined from the plurality of template types.
[0016] According to another aspect of the present disclosure, a device is provided. The device includes a processing circuit. The processing circuit can be configured to perform any of the methods described for video decoding / encoding.
[0017] Some aspects of the present disclosure also provide a non-transitory computer-readable medium storing instructions which, when executed by a computer, cause the computer to perform a method for video decoding / encoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Further features, nature and various advantages of the disclosed subject matter will become more apparent from the following detailed description and the accompanying drawings, in which:
[0019] Figure 1 is a schematic diagram of an exemplary block diagram of a communication system (100).
[0020] Figure 2 is a schematic diagram of an exemplary block diagram of a decoder.
[0021] Figure 3 is a schematic diagram of an exemplary block diagram of an encoder.
[0022] Figure 4 It is a schematic diagram of the intra-frame template matching process.
[0023] Figure 5A is a first exemplary template type according to some embodiments of the present disclosure.
[0024] Figure 5B is a second exemplary template type according to some embodiments of the present disclosure.
[0025] Figure 5C is a third exemplary template type according to some embodiments of the present disclosure.
[0026] Figure 6 A flow chart outlining a decoding process according to some embodiments of the present disclosure is shown.
[0027] Figure 7 A flow chart outlining an encoding process according to some embodiments of the present disclosure is shown.
[0028] Figure 8 is a schematic diagram of an exemplary computer system according to one embodiment. DETAILED DESCRIPTION
[0029] Figure 1 A block diagram of a video processing system (100) in some examples is shown. The video processing system (100) is an example of an application for the disclosed subject matter, video encoders, and video decoders in a streaming environment. The disclosed subject matter is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV, streaming services, storing compressed video on digital media including CDs, DVDs, memory sticks, etc., and the like.
[0030] The video processing system (100) includes an acquisition subsystem (113), which may include a video source (101) such as a digital camera, which, for example, creates an uncompressed video picture stream (102). In one example, the video picture stream (102) includes samples captured by the digital camera. Compared to the encoded video data (104) (or the encoded video bitstream), the video picture stream (102) is depicted as a thick line to emphasize the high data volume of the video picture stream, and the video picture stream (302) can be processed by an electronic device (120), which includes a video encoder (103) coupled to the video source (101). The video encoder (103) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. Compared to the video picture stream (102), the encoded video data (104) (or the encoded video bitstream) is depicted as a thin line to emphasize the lower amount of data of the encoded video data (or the encoded video bitstream), which can be stored on the streaming server (105) for future use. One or more streaming client subsystems, such as Figure 1 A client subsystem (106) and a client subsystem (108) in a streaming server (105) can access a copy (107) and a copy (109) of the encoded video data (104). The client subsystem (106) may include, for example, a video decoder (110) in an electronic device (130). The video decoder (110) decodes the incoming copy (107) of the encoded video data and generates an output video picture stream (111) that can be presented on a display (112) (e.g., a display screen) or another presentation device (not shown). In some streaming transmission systems, the encoded video data (104), the video data (107), and the video data (109) (e.g., a video bitstream) may be encoded according to certain video encoding / compression standards. Examples of such standards include ITU-T Recommendation H.265. In one example, the video coding standard under development is informally referred to as Versatile Video Coding (VVC). The disclosed subject matter may be used in the context of VVC.
[0031] It should be noted that the electronic device (120) and the electronic device (130) may include other components (not shown). For example, the electronic device (120) may include a video decoder (not shown), and the electronic device (130) may also include a video encoder (not shown).
[0032] Figure 2An exemplary block diagram of a video decoder (210) is shown. The video decoder (210) may be disposed in an electronic device (230). The electronic device (230) may include a receiver (231) (e.g., a receiving circuit). The video decoder (210) may be used to replace Figure 1 A video decoder (110) of an embodiment.
[0033] The receiver (231) may receive one or more encoded video sequences (e.g., included in a bitstream) to be decoded by the video decoder (210). In an embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (201), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (231) may receive the encoded video data as well as other data, such as encoded audio data and / or auxiliary data streams that may be forwarded to their respective use entities (not shown). The receiver (231) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (215) may be coupled between the receiver (231) and the entropy decoder / parser (220) (hereinafter referred to as "parser (220)"). In some applications, the buffer memory (215) is part of the video decoder (210). In other cases, the buffer memory (415) may be provided outside the video decoder (210) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (210) to prevent network jitter, for example, and another buffer memory (215) may be configured inside the video decoder (210) to handle broadcast timing, for example. When the receiver (231) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (215), or the buffer memory may be made smaller. For use on a best-effort packet network such as the Internet, a buffer memory (215) may also be required, which may be relatively large and have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (210).
[0034] The video decoder (210) may include a parser (220) to reconstruct symbols (221) from the encoded video sequence. The categories of these symbols include information for managing the operation of the video decoder (210) and potential information for controlling a presentation device such as a presentation device (212) (e.g., a display screen) that is not part of the electronic device (230) but can be coupled to the electronic device (230), such as Figure 2As shown. The control information for the rendering device may be a parameter set fragment (not shown) of a Supplemental Enhancement Information (SEI) message or a Video Usability Information (VUI). The parser (220) may parse / entropy decode the received coded video sequence. The coding of the coded video sequence may be performed according to a video coding technique or standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and the like. The parser (220) may extract a subgroup parameter set for at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (220) may also extract information such as transform coefficients, quantizer parameter values, motion vectors, and the like from the coded video sequence.
[0035] The parser (220) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (215), thereby creating symbols (221).
[0036] Depending on the type of coded video picture or part of coded video picture (e.g., inter-picture and intra-picture, inter-block and intra-block) and other factors, the reconstruction of symbol (221) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by parser (220) from the coded video sequence. For the sake of brevity, such subgroup control information flow between parser (220) and the multiple units below is not described.
[0037] In addition to the functional blocks already mentioned, the video decoder (210) can be conceptually subdivided into several functional units as described below. In actual implementations operating under commercial constraints, many of these units interact closely with each other and may be (at least partially) integrated with each other. However, for the purposes of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.
[0038] The first unit is a scaler / inverse transform unit (251). The scaler / inverse transform unit (251) receives quantized transform coefficients as symbols (221) from the parser (220) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The scaler / inverse transform unit (251) can output a block including sample values, which can be input into an aggregator (255).
[0039] In some cases, the output samples of the sealer / inverse transform unit 251 may belong to an intra-coded block. An intra-coded block is a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-picture prediction unit (252). In some cases, the intra-picture prediction unit (252) generates a block of the same size and shape as the block being reconstructed using surrounding reconstructed information extracted from the current picture buffer (258). For example, the current picture buffer (258) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (255) adds the prediction information generated by the intra-prediction unit (252) to the output sample information provided by the sealer / inverse transform unit (251) on a per-sample basis.
[0040] In other cases, the output samples of the scaler / inverse transform unit 251 may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (253) may access the reference picture memory (257) to extract samples for prediction. After the extracted samples are motion compensated according to the block-related symbols (221), these samples may be added to the output of the scaler / inverse transform unit (251) (in this case referred to as residual samples or residual signals) by the aggregator (255) to generate output sample information. The motion compensated prediction unit (253) obtains the predicted samples from the address in the reference picture memory (257) under the control of a motion vector, and the motion vector is provided to the motion compensated prediction unit (253) in the form of the symbol (221), which symbol (421) includes, for example, X, Y and reference picture components. Motion compensation may also include interpolation of sample values extracted from the reference picture memory (257) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.
[0041] The output samples of the aggregator (255) may be used by various loop filtering techniques in a loop filter unit (256). The video compression techniques may include in-loop filter techniques controlled by parameters included in the coded video sequence (also referred to as the coded video bitstream) and available to the loop filter unit (256) as symbols (221) from the parser (220). The video compression may also be responsive to meta-information obtained during decoding of a coded picture or a previous (in decoding order) portion of the coded video sequence, and to previously reconstructed and loop filtered sample values.
[0042] The output of the loop filter unit (256) may be a sample stream that may be output to a rendering device (212) and stored in a reference picture memory (257) for subsequent inter-picture prediction.
[0043] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (220)), the current picture buffer (258) may become part of the reference picture memory (257), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.
[0044] The video decoder (210) may perform decoding operations according to a predetermined video compression technology or standard such as ITU-T Recommendation H.265. The encoded video sequence may conform to the syntax specified by the video compression technology or standard used in the sense that the encoded video sequence follows the syntax of the video compression technology or standard and the profile recorded in the video compression technology or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technology or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technology or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.
[0045] In an embodiment, the receiver (231) may receive additional (redundant) data along with the encoded video. The additional data may be part of the encoded video sequence. The additional data may be used by the video decoder (210) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0046] Figure 3 An exemplary block diagram of a video encoder (303) is shown. The video encoder (303) is disposed in an electronic device (320). The electronic device (320) includes a transmitter (340) (e.g., a transmission circuit). The video encoder (303) can be used to replace Figure 1 A video encoder (103) in an example.
[0047] The video encoder (303) can be used to obtain the video source (301) (not Figure 3 In another embodiment, the video source (301) is a part of the electronic device (320) in the example, and receives the video samples. The video source can collect video images to be encoded by the video encoder (303). In another embodiment, the video source (301) is a part of the electronic device (320).
[0048] The video source (301) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (303), which may have 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., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (301) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (301) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, where each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The following description focuses on the samples.
[0049] According to an embodiment, the video encoder (303) may encode and compress pictures of a source video sequence into an encoded video sequence (343) in real time or under any other time constraints as required. Implementing an appropriate encoding speed is a function of the controller (350). In some embodiments, the controller (350) controls other functional units as described below and is functionally coupled to these units. For the sake of simplicity, couplings are not shown in the figure. The parameters set by the controller (350) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, group of pictures (group of pictures, GOP) layout, maximum motion vector search range, etc. The controller (350) can be used to have other suitable functions that are related to the video encoder (303) optimized for a certain system design.
[0050] In some embodiments, the video encoder (303) operates in an encoding loop. As a simple description, in one example, the encoding loop may include a source encoder (330) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (333) embedded in the video encoder (303). The decoder (333) reconstructs the symbols to create sample data in a manner similar to how the (remote) decoder creates sample data. The reconstructed sample stream (sample data) is input to a reference picture memory (334). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference picture memory (334) are also bit-accurate between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, such as due to channel errors) is also used in some related technologies.
[0051] The operation of the "local" decoder (333) may be combined with, for example, Figure 2 The "remote" decoder described in detail for the video decoder (210) is identical. However, additional brief reference is made to Figure 2 , when symbols are available and the entropy encoder (345) and parser (220) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (210) including the buffer memory (215) and the parser (220) may not be fully implemented in the local decoder (333).
[0052] In one embodiment, any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. Therefore, the present application focuses on decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. In some areas, a more detailed description is provided below.
[0053] During operation, in some examples, the source encoder (330) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this manner, the encoding engine (332) encodes the difference between a pixel block of the input picture and a pixel block of a reference picture that may be selected as a prediction reference for the input picture.
[0054] The local video decoder (333) may decode the encoded video data of the picture that may be designated as the reference picture based on the symbol created by the source encoder (330). The operation of the encoding engine (332) may be a lossy process. When the encoded video data may be decoded at the video decoder ( Figure 3 When the video sequence is decoded at a remote video decoder (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (333) replicates the decoding process that can be performed by the video decoder on the reference picture and can cause the reconstructed reference picture to be stored in the reference picture memory (334). In this way, the video encoder (303) can store a copy of the reconstructed reference picture locally that has common content (absent transmission errors) with the reconstructed reference picture that will be obtained by the remote video decoder.
[0055] The predictor (335) may perform a prediction search for the encoding engine (332). That is, for a new picture to be encoded, the predictor (335) may search the reference picture memory (334) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (335) may operate pixel-by-pixel based on sample blocks to find a suitable prediction reference. In some cases, based on the search results obtained by the predictor (335), it may be determined that the input picture may have prediction references taken from a plurality of reference pictures stored in the reference picture memory (334).
[0056] The controller (350) may manage encoding operations of the source encoder (330), including, for example, setting parameters and subgroup parameters for encoding video data.
[0057] The outputs of all the above functional units may be entropy encoded in an entropy encoder (345). The entropy encoder (345) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby converting the symbols into a coded video sequence.
[0058] The transmitter (340) may buffer the encoded video sequence created by the entropy encoder (345) in preparation for transmission over a communication channel (360), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (340) may combine the encoded video data from the video encoder (303) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).
[0059] The controller (350) may manage the operation of the video encoder (303). During encoding, the controller (350) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:
[0060] Intra pictures (I pictures) can be encoded and decoded without using any other pictures in the sequence as a prediction source.Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures.
[0061] Predictive pictures (P pictures) can be encoded and decoded using intra prediction or inter prediction, which uses a motion vector and a reference index to predict the sample values of each block.
[0062] Bidirectional predictive pictures (B pictures) can be encoded and decoded using intra prediction or inter prediction, which uses two motion vectors and reference indices to predict the sample values of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstructing a single block.
[0063] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined according to the coding allocation applied to the block's corresponding picture. For example, a block of an I picture may be non-predictively coded, or the block may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. A block of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. A block of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.
[0064] The video encoder (303) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (303) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.
[0065] In an embodiment, the transmitter (340) may transmit additional data when transmitting the encoded video. The source encoder (330) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0066] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an embodiment, a particular picture being encoded / decoded is divided into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.
[0067] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and in the future respectively in display order). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. The block may be predicted by a combination of the first reference block and the second reference block.
[0068] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.
[0069] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, a picture in a video picture sequence is divided into coding tree units (CTUs) for compression, and the CTUs in the picture have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), which are a luminance CTB and two chrominance CTBs. Each CTU can be recursively split into one or more coding units (CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In an embodiment, each CU is analyzed to determine a prediction type for the CU, such as an inter-prediction type or an intra-prediction type. In addition, depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luma prediction block as an example, the prediction block includes a matrix of pixel values (e.g., luma values), such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, etc.
[0070] It should be noted that the video encoder (103) and the video encoder (303) and the video decoder (110) and the video decoder (210) may be implemented using any suitable technology. In an embodiment, the video encoder (103) and the video encoder (303) and the video decoder (110) and the video decoder (210) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (103) and the video encoder (303) and the video decoder (110) and the video decoder (210) may be implemented using one or more processors that execute software instructions.
[0071] The present disclosure includes aspects related to intra-frame template matching prediction based on multiple templates. For example, one or more template types can be applied in the template matching process. Introducing multiple types of templates for template matching can help improve the accuracy of template matching and encoding performance.
[0072] In some examples, such as ECM software, intra template matching prediction (IntraTMP) can be a special intra prediction mode for the current block. intraTMP can copy the best prediction block (e.g., the prediction block with the smallest difference from the current block) from the reconstructed part of the current frame, where the L-shaped template of the reconstructed part matches the current template of the current block. For a predefined search range, the encoder can search for the template most similar to the current template in the reconstructed part of the current frame, and use the corresponding block as the prediction block of the current block. The encoder can then write the use of the intraTMP mode, and the same prediction operation can be performed on the decoder side.
[0073] The prediction signal can be generated by matching the L-shaped causal neighbors of the current block with other blocks in a predefined search area. An exemplary intraTMP process can be performed in Figure 4 As shown in Figure 4 As shown, the current block (402) in the current frame (404) may include an L-shaped template (406) adjacent to the current block (402). The search area for determining the reference block of the current block (402) may include (1) R1: current CTU, (2) R2: upper left CTU, (3) R3: upper CTU, (4) R4: left CTU. During the search process, a cost function such as the sum of absolute differences (SAD) may be used. Within each area (e.g., R1, R2, R3, and R4), the decoder may search for a template (e.g., (410)) having the minimum SAD relative to the current template (e.g., template (406)). A block (e.g., (408)) corresponding to the template (e.g., (410)) may be used as a prediction block. The dimensions of all regions (e.g., SearchRange_w, SearchRange_h) can be set to be proportional to the block dimensions (e.g., BlkW, BlkH) of the current block (402) so that there is a fixed number of SAD comparisons per pixel. For example, the dimensions of the search region can be defined in equations (1) and (2) as follows: SearchRange_w = a*BlkW Equation (1) SearchRange_h = a*BlkH Equation (2) Where a can be a constant that controls the gain / complexity tradeoff. In one example, a is equal to 5.
[0074] The intra template matching tool can be enabled for CUs with width and / or height less than or equal to 64. The maximum CU size for intra template matching can be configured.
[0075] When decoder-side intra mode derivation (DIMD) is not available for the current CU, the intra template matching prediction mode can be written at the CU level through a dedicated flag.
[0076] Although the IntraTMP mode allows template matching with an L-shaped template, as mentioned above, introducing multiple types of templates for template matching can help improve the accuracy of template matching, thereby improving encoding performance.
[0077] In the present disclosure, a multi-template based intra-frame template matching prediction is provided. According to the multi-template based intra-frame template matching prediction, one or more template types can be selected from a plurality of candidate template types of a current block. For example, the plurality of candidate template types can be fixed or based on predefined conditions. Each of the selected one or more template types can correspond to a corresponding template area of the current block. The predefined conditions can be associated with the shape of the current block, the size of the current block, the intra-frame prediction mode of the current block, and the distance between the current block and the plurality of candidate template types.
[0078] Based on the one or more template types, a plurality of candidate reference blocks corresponding to each of the one or more template types may be determined. A template matching cost (or template matching difference) between each of the one or more template regions of the current block and a template region of each of the plurality of candidate reference blocks corresponding to a corresponding one of the one or more template regions may be determined. The current block may be reconstructed based on at least one or a weighted combination of subsets of the plurality of candidate reference blocks, the subset corresponding to K smallest template matching differences among the template matching differences.
[0079] On one hand, it is proposed to find the best prediction block from the reconstructed part of the current frame, and various types of templates can be used.
[0080] In the present disclosure, in order to find the best prediction block (eg, the prediction block having the smallest difference with the current block) from the reconstructed portion of the current frame, various types of templates may be applied in the IntraTMP mode.
[0081] In one aspect, the following template types can be used: L-shaped template, top template and left template. As shown in the figure below, let the template contain MxK1 samples above the current block, NxK2 samples on the left, and K2xK1 samples in the upper left corner, and the distance between the template and the current block is D.
[0082] In one embodiment, one or more template types may be selected from a plurality of candidate template types. The candidate template types may include an L-shaped template, a top template, a left side template, and / or any other suitable template. Exemplary embodiments of the L-shaped template, the top template, and the left side template are shown in FIG. Figure 5A , Figure 5B and Figure 5C In. Figure 5B As shown, the top template (502) may include M×K1 samples above the current block (504). Figure 5C As shown, the left template (506) may include N×K2 samples on the left side of the current block (508). Figure 5A As shown, the L-shaped template (510) may include M×K1 samples above the current block (512) and N×K2 samples to the left of the current block (512). In one embodiment, the L-shaped template (510) may also include K2×K1 samples at the upper left corner (514) of the current block (512). In one embodiment, the distance between the template (e.g., the top template (502), the left template (506), or the L-shaped template (510)) and the current block (e.g., (508)) is D. D may be an integer or a decimal.
[0083] In one aspect, the selection of the L-shaped template or the horizontal / vertical template can be based on an analysis of neighboring reconstructed samples. In one example, a proposed intra prediction mode is derived using the DIMD method and mapped to one of the available template shapes using the intra prediction mode.
[0084] In one embodiment, a template type (or template) can be selected from a plurality of candidate template types such as an L-shaped template, a horizontal template (or a top template), or a vertical template (or a left template) based on an analysis of adjacent reconstructed samples. In one example, a suitable method can be used to derive an intra-frame prediction mode, such as a decoder-side intra-frame mode derivation (DIMD) method. The derived intra-frame prediction mode (e.g., an angular direction) can be mapped to one of the available template shapes. For example, if the derived intra-frame prediction mode indicates a horizontal angular direction, a horizontal template (or a top template) can be selected.
[0085] In one aspect, the templates can have different sizes, for example: M=b_w(Q3:block width?yes),N=b_h,K1=K2=1 M=b_w,N=b_h,K1=K2=2 M=b_w / 2,N=b_h / 2,(close to top left)K1=K2=1
[0086] In one embodiment, Figure 5A , Figure 5B and Figure 5C Each template type shown can have different sizes. For example, the parameters of M, N, K1, and K2 can be defined as follows: (1)M=b_w,N=b_h,K1=K2=1 (2)M=b_w, N=b_h, K1=K2=2 (3)M=b_w / 2, N=b_h / 2, K1=K2=1 Where b_w represents the width of the current block, b_h represents the height of the current block, b_w / 2 represents half of the width of the current block, and b_h / 2 represents half of the height of the current block.
[0087] In one aspect, the distance D between the template and the current block can be different, for example, allowing templates with D>1.
[0088] In one example, the distance between the template type (e.g., L-shaped template) and the current block may be within a range, such as between 1 and 3. In one example, the distance between the template type and the current block may be greater than a threshold, such as 1. In one example, a first template (e.g., top template) may have a first distance between the first template and the current block, and a second template (e.g., left template) may have a second distance between the second template and the current block. The first distance may be different from the second distance. Therefore, a template type may be selected from a plurality of candidate template types based on a requirement for a distance D between the selected template and the current block.
[0089] In one aspect, the list of template matching patterns may include single template matching patterns and compound template matching patterns.
[0090] In one aspect, the single template matching mode uses only one type of template for template matching.
[0091] For example, a single template matching mode can use only one type of template for template matching. For example, an L-shaped template can be selected. The L-shaped template can correspond to the L-shaped template area of the current block. In addition, one or more reference blocks can be determined in the reconstruction area. Each of the one or more reference blocks may include an L-shaped template area corresponding to the L-shaped template. The template matching difference (or template matching cost) between the L-shaped template area of the current block and each L-shaped template area of one or more reference blocks can be determined based on a cost function (e.g., a SAD cost function). A reference block corresponding to a predetermined template matching difference (e.g., a minimum template matching difference) can be selected. The current block can be further predicted based on the selected reference block.
[0092] In one aspect, the composite template matching mode may use templates of the same type for template matching and combine the prediction blocks derived from the top K candidates with the lowest SAD cost to obtain a final prediction block.
[0093] In one example, the composite template matching mode may use the same type of template to derive multiple prediction blocks (or reference blocks) for template matching, and combine (e.g., average or weighted combination) the prediction blocks derived from the top K candidates with the lowest cost (e.g., SAD cost) to obtain a final prediction block.
[0094] For example, based on encoding the current block with a first template type (or first template) such as an L-shaped template determined from a plurality of candidate template types, a plurality of candidate reference blocks (or candidate prediction blocks) of the current block may be determined based on the first template type. Each candidate reference block may have a corresponding template region having the first template type. The difference between the template region corresponding to the first template type of the current block and the template region of each of the plurality of candidate reference blocks corresponding to the first template type may be determined based on a cost function (e.g., a SAD cost function). The current block may be predicted based on a weighted combination of a subset of the plurality of candidate reference blocks, the subset corresponding to the K smallest differences among the differences between the template region of the current block and the template regions of the plurality of candidate reference blocks.
[0095] In one aspect, the composite template matching mode may use different templates for template matching, weight and combine the prediction blocks derived from the top K candidates of different templates to obtain the final prediction block.
[0096] In one embodiment, the composite template matching mode can use different templates for template matching. The prediction blocks derived from the top K candidates of different templates can be combined and weighted to obtain the final prediction block.
[0097] For example, two or more template types (e.g., L-shaped template and top template) can be determined for the current block, and each template type can correspond to a corresponding template region. Multiple candidate reference blocks corresponding to each of the two or more template types can be determined in the reconstruction region. For example, multiple first candidate reference blocks corresponding to the first template type (e.g., L-shaped template) can be determined such that each of the multiple first candidate reference blocks has a corresponding template region with the first template type. Multiple second candidate reference blocks corresponding to the second template type (e.g., top template) can be determined such that each of the multiple second candidate reference blocks has a corresponding template region with the second template type. The difference between each of the two or more template regions of the current block and the template region of each of the multiple candidate reference blocks corresponding to the corresponding one of the two or more template regions can be determined based on a cost function (e.g., SAD cost function). For example, the difference between the first template region of the current block corresponding to the first template type and the template region of each of the multiple first candidate reference blocks can be determined. The difference between the second template region of the current block corresponding to the second template type and the template region of each of the multiple second candidate reference blocks can be determined.
[0098] The current block can be further predicted based on a weighted combination of a subset of the multiple candidate reference blocks corresponding to the K smallest differences. For example, the first K candidate reference blocks can be selected, which correspond to the first K smallest differences among the following differences: (i) the difference between the first template region of the current block and the template regions of the multiple first candidate reference blocks, and (ii) the difference between the second template region of the current block and the template regions of the multiple second candidate reference blocks. The current block can be further predicted based on the weighted combination of the first K candidate reference blocks.
[0099] On the one hand, the available template matching types are determined according to the size of the current block, where w and h represent the width and height of the current block: (1) If w / h < T1, where T1 is a predefined threshold. The following patterns are allowed to use the following types of templates: (a) Using an L-shaped template and a left template is allowed (b) Only using a left template is allowed (2) If w / h > T2, where T2 is a predefined threshold. The following patterns are allowed to use the following types of templates: (a) Using an L-shaped template and a top template is allowed (b) Only using a top template is allowed
[0100] In one embodiment, the available template matching types may be determined according to the size of the current block, where w and h may represent the width and height of the current block, respectively. For example, the available template matching types may be based on the ratio (or shape) of the width and height of the current block.
[0101] In one example, when w / h≤T1, where T1 may be a predefined threshold, a first template, such as an L-shaped template, and / or a second template, such as a left-side template, may be applied. In one example, when w / h≤T1, only the first template, such as a left-side template, may be allowed.
[0102] In one example, when w / h>T2, where T2 may be a predefined threshold, a first template, such as an L-shaped template, and / or a second template, such as a top template, may be allowed. In one example, when w / h>T2, only a first template, such as a left template, may be allowed.
[0103] In one example, which of the multiple candidate template types to select may be determined based on the shape of the current block. The shape of the current block may include a square, a rectangle, and the like.
[0104] In one aspect, the size of the current block may be used to select a context model for writing the selected template mode index.
[0105] In one embodiment, the template mode may be written based on the size of the current block. For example, the size of the current block may be used to select a context model for writing (or entropy encoding) a selected template mode index. Thus, the context model for entropy encoding the template mode index may be determined based on the size of the current block. The template mode index may indicate which of a plurality of candidate template types is selected as the template type for the current block.
[0106] In one aspect, the mode may be written as an intra prediction mode or an intra block copy (IBC) mode.
[0107] In one embodiment, the above-mentioned intra-frame template matching prediction mode based on multiple templates may be written as an intra-frame prediction mode or an IBC mode, in which multiple template types are selected for intra-frame template matching prediction.
[0108] Figure 6A flowchart showing an overview process (600) according to an embodiment of the present disclosure is presented. The process (600) can be used in a video decoder. In various embodiments, the process (600) is executed by a processing circuit, such as a processing circuit that performs the functions of the video decoder (110), a processing circuit that performs the functions of the video decoder (210), etc. In some embodiments, the process (600) is implemented in software instructions, so when the processing circuit executes the software instructions, the processing circuit executes the process (600). The process starts at (S601) and proceeds to (S610).
[0109] At (S610), a video bitstream including coding information of a current block in a current picture is received, where the coding information indicates that the current block is encoded in an intra-template matching prediction mode.
[0110] At (S620), at least one template for predicting the current block is determined. Each of the at least one template is a corresponding candidate template of multiple template types available in the intra-template matching prediction mode. The candidate template is associated with one of the shape of the current block, the size of the current block, the intra prediction mode of the current block, and the distance between the current block and multiple candidate templates of multiple template types. The candidate template includes different combinations of adjacent reconstructed samples. In one example, when w / h < T1, where T1 can be a predefined threshold, an L-shaped template and / or a left template can be applied as one or more template types of the current block. In one example, when w / h < T1, only the left template is allowed for the current block. In one example, when w / h > T2, where T2 can be a predefined threshold, the current block can allow the use of an L-shaped template and / or a top template. In one example, when w / h > T2, only the top template is allowed for the current block. In one example, one template type can be selected from multiple candidate template types based on the requirement of the distance D between the selected template and the current block.
[0111] At (S630), based on the determined at least one template, the current block is reconstructed using template matching in the intra-template matching prediction mode. For example, the list of template matching modes can include a single template matching mode and a composite template matching mode.
[0112] In one example, the multiple template types include at least one of an L-shaped template, a top template, or a left template. The L-shaped template includes adjacent samples of the current block above the top of the current block and adjacent samples of the current block to the left of the current block. The top template includes adjacent samples of the current block above the top of the current block. The left template includes adjacent samples of the current block to the left of the current block.
[0113] In one example, the width of the top template is equal to the width of the current block, and the height of the top template is equal to a first positive integer. In one example, the width of the left template is equal to a second positive integer, and the height of the left template is equal to the height of the current block.
[0114] For example, an intra prediction mode of the current block is determined based on DIMD, wherein the intra prediction mode of the current block is determined based on neighboring samples of the current block reconstructed according to texture gradient analysis. Based on the determined intra prediction mode, at least one template of the current block is determined from multiple template types.
[0115] In one example, based on the ratio between the width of the current block and the height of the current block being less than a first threshold, at least one template of the current block is determined to be one of the following: (i) an L-shaped template and a left template and (ii) a left template. In one example, based on the ratio between the width of the current block and the height of the current block being greater than a second threshold, at least one template of the current block is determined to be one of the following: (i) an L-shaped template and a top template and (ii) a top template.
[0116] In one example, the plurality of template types include a first template at a first distance from the current block and a second template at a second distance from the current block, wherein the first distance is different from the second distance.
[0117] In one example, based on encoding the current block with a first template determined from a plurality of template types, a plurality of candidate reference blocks of the current block are determined based on the first template. A difference between the first template of the current block and a template region of each of the plurality of candidate reference blocks corresponding to the first template is determined. The current block is reconstructed based on a weighted combination of a subset of the plurality of candidate reference blocks, the subset corresponding to K minimum differences among the differences between the first template of the current block and the template regions of the plurality of candidate reference blocks.
[0118] In one example, based on encoding the current block with two or more templates determined from a plurality of template types, a plurality of candidate reference blocks corresponding to the two or more templates of the current block are determined. A difference between each of the two or more templates of the current block and a template region of each of the plurality of candidate reference blocks corresponding to a corresponding one of the two or more templates is determined. The current block is reconstructed based on a weighted combination of a subset of the plurality of candidate reference blocks, the subset corresponding to K minimum differences among the differences between the two or more templates of the current block and the template regions of the plurality of candidate reference blocks corresponding to the two or more templates of the current block.
[0119] In one example, a context model for entropy encoding first signal information included in encoding information is determined based on a size of a current block, wherein the first signal information indicates which of a plurality of template types is selected as at least one template of the current block.
[0120] In one example, the encoded information further includes second signal information that indicates predicting a current block based on at least one template determined from a plurality of template types.
[0121] Then, the process proceeds to (S699) and terminates.
[0122] The process (600) can be adjusted appropriately. Steps in the process (600) can be modified and / or omitted. Additional steps can be added. Any suitable order of implementation can be used.
[0123] Figure 7 A flowchart showing an overview of a process (700) according to an embodiment of the present disclosure is shown. The process (700) can be used in a video encoder. In various embodiments, the process (700) is performed by a processing circuit, such as a processing circuit that performs the functions of the video encoder (103), a processing circuit that performs the functions of the video encoder (303), etc. In some embodiments, the process (700) is implemented in software instructions, so when the processing circuit executes the software instructions, the processing circuit performs the process (700). The process starts at (S701) and proceeds to (S710).
[0124] At (S710), it is determined whether to encode the current block using intra-template matching prediction.
[0125] At (S720), in response to encoding the current block using intra-template matching prediction, one or more template types of the current block are determined from a plurality of candidate template types based on predefined conditions. The predefined conditions are associated with the shape of the current block, the size of the current block, the intra prediction mode of the current block, and the distance between the current block and the plurality of candidate template types.
[0126] In one example, when w / h < T1, where T1 can be a predefined threshold, an L-shaped template and / or a left template can be applied. In one example, when w / h < T1, only the left template can be allowed. In one example, when w / h > T2, where T2 can be a predefined threshold, an L-shaped template and / or a top template can be allowed. In one example, when w / h > T2, only the top template can be allowed. In one example, one template type can be selected from a plurality of candidate template types based on a requirement for the distance D between the selected template and the current block.
[0127] At (S730), the current block is encoded based on one or more template types determined from a plurality of candidate template types. For example, the list of template matching modes can include a single template matching mode and a composite template matching mode.
[0128] Then, the process proceeds to (S799) and terminates.
[0129] The process (700) may be adjusted appropriately. Steps in the process (700) may be modified and / or omitted. Additional steps may be added. Any suitable order of implementation may be used.
[0130] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Figure 8 A computer system (800) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0131] Computer software may be encoded using any suitable machine code or computer language that may be subjected to assembly, compilation, linking or similar mechanisms to create code comprising instructions that may be executed directly by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or through interpretation, microcode, etc.
[0132] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, etc.
[0133] Figure 8 The components shown for the computer system (800) are exemplary in nature and are not intended to suggest any limitation on the scope of use or functionality of computer software implementing the disclosed embodiments. Nor should the configuration of components be interpreted as having any dependency or requirement related to any one or combination of components shown in the exemplary embodiment of the computer system (800).
[0134] The computer system (800) may include certain human-machine interface input devices. Such human-machine interface input devices may respond to input from one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), olfactory input (not shown). The human-machine interface devices may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., voice, music, ambient sound), images (e.g., scanned images, photographic images obtained from a still image camera), videos (e.g., two-dimensional video, three-dimensional video including stereoscopic video), etc.
[0135] The input human-machine interface device may include one or more of the following devices (only one of each is shown): keyboard (801), mouse (802), touchpad (803), touch screen (810), data gloves (not shown), joystick (805), microphone (806), scanner (807), camera (808).
[0136] The computer system (800) may also include certain human-computer interface output devices. Such human-computer interface output devices may, for example, stimulate one or more human user senses through tactile output, sound, light, and smell / taste. Such human-computer interface output devices may include tactile output devices (e.g., tactile feedback of a touch screen (810), a data glove (not shown), or a joystick (805), but may also be a tactile feedback device that is not an input device), audio output devices (e.g., speakers (809), headphones (not shown)), visual output devices (e.g., screens (810) including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities - some of which are capable of outputting two-dimensional visual outputs or outputs in more than three dimensions through devices such as stereo image output, virtual reality glasses (not shown), holographic displays and smoke boxes (not shown), and printers (not shown).
[0137] The computer system (800) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD ROM / RW (820) with CD / DVD etc. media (821), thumb drives (822), removable hard drives or solid-state drives (823), traditional magnetic media such as tapes and floppy disks (not shown), dedicated ROM / ASIC / PLD based devices such as security dongles (not shown), etc.
[0138] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transitory signals.
[0139] The computer system (800) may also include an interface (854) to one or more communication networks (855). The network may be, for example, a wireless network, a wired network, an optical network. The network may further be a local area network, a wide area network, a metropolitan area network, a vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include local area networks such as Ethernet, wireless LAN, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., television wired or wireless wide area digital networks including cable television, satellite television and terrestrial broadcast television, vehicle and industrial networks including CANBus, etc. Some networks typically require an external network interface adapter (e.g., a USB port of the computer system (800)) attached to some general data port or peripheral bus (849); as described below, other network interface adapters are typically integrated into the kernel of the computer system (800) by attaching to the system bus (e.g., connecting to an Ethernet interface in a PC computer system or connecting to a cellular network interface in a smartphone computer system). The computer system (800) can use any of these networks to communicate with other entities. Such communications may be one-way receive-only (e.g., broadcast television), one-way send-only (e.g., a CANbus connected to certain CANbus devices), or two-way, for example, connecting to other computer systems using a local area digital network or a wide area digital network. As described above, certain protocols and protocol stacks may be used on each of those networks and network interfaces.
[0140] The above-mentioned human interface device, human-accessible storage device, and network interface may be attached to the kernel ( 840 ) of the computer system ( 800 ).
[0141] The kernel (840) may include one or more central processing units (CPUs) (841), graphics processing units (GPUs) (842), dedicated programmable processing units in the form of field programmable gate areas (FPGAs) (843), hardware accelerators for certain tasks (844), graphics adapters (850), etc. These devices, as well as read-only memory (ROM) (845), random access memory (846), internal large-capacity storage (847) such as internal non-user accessible hard drives, SSDs, etc., may be connected via a system bus (848). In some computer systems, the system bus (848) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, etc. Peripheral devices may be attached directly to the kernel's system bus (848) or to the kernel's system bus (1848) via a peripheral bus (849). In one example, a screen (810) may be connected to a graphics adapter (850). The architecture of the peripheral bus includes PCI, USB, etc.
[0142] The CPU (841), GPU (842), FPGA (843) and accelerator (844) can execute certain instructions, which can be combined to form the above-mentioned computer code. The computer code can be stored in ROM (845) or RAM (846). Transition data can also be stored in RAM (846), while permanent data can be stored in, for example, internal mass storage (847). Fast storage and retrieval of any storage device can be performed by using a cache memory, which can be closely associated with the following devices: one or more CPUs (841), GPUs (842), mass storage devices (847), ROM (845), RAM (846), etc.
[0143] The computer readable medium may have thereon computer codes for performing various computer-implemented operations. The medium and computer codes may be those specially designed and constructed for the purposes of the present disclosure, or the medium and computer codes may be of a type well known and available to those skilled in the art of computer software.
[0144] As an example and not limitation, a computer system having an architecture (800), particularly a kernel (840), may provide functionality as a result of (one or more) processors (including CPUs, GPUs, FPGAs, accelerators, etc.) executing software contained in one or more tangible computer-readable media. Such computer-readable media may be media associated with a user-accessible mass storage device as described above, as well as some non-temporary memory of the kernel (840), such as a kernel internal mass storage device (847) or ROM (845). Software implementing various embodiments of the present disclosure may be stored in such devices and executed by the kernel (840). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software may enable the kernel (840), particularly the processors therein (including CPUs, GPUs, FPGAs, etc.), to perform specific processes or specific parts of specific processes described herein, including defining data structures stored in RAM (846) and modifying such data structures according to processes defined by the software. Additionally or alternatively, the computer system may provide functionality due to logic hardwired or otherwise embodied in circuitry (e.g., accelerator (844)) that may replace software or operate in conjunction with software to perform specific processes or specific portions of specific processes described herein. Where appropriate, references to portions of software may include logic and vice versa. Where appropriate, references to portions of computer-readable media may include circuitry (e.g., integrated circuits (ICs)) storing software for execution, circuitry embodying logic for execution, or both. The present disclosure includes any suitable combination of hardware and software.
[0145] The use of "at least one of" or "one of" in this disclosure is intended to include any one or combination of the recited elements. For example, references to the following expressions: at least one of A, B, or C; at least one of A, B, and C; at least one of A, B, and / or C; and at least one of A through C are intended to include only A, only B, only C, or any combination thereof. References to one of A or B and one of A and B are intended to include A or B or (A and B). Where applicable, the use of "one of" does not exclude any combination of the recited elements, such as when the elements are not mutually exclusive.
[0146] Although the present disclosure has described some exemplary embodiments, there are changes, permutations and various alternative equivalents that fall within the scope of the present disclosure. Therefore, it should be understood that those skilled in the art will be able to design many systems and methods that, although not explicitly shown or described herein, embody the principles of the present disclosure and therefore fall within the spirit and scope of the present disclosure.
Claims
1. A method of video decoding performed in a video decoder, the method comprising: Receiving a video bitstream including encoding information of a current block in a current picture, wherein the encoding information indicates that the current block is encoded in an intra-frame template matching prediction mode; determining at least one template for predicting the current block, each of the at least one template being a corresponding candidate template of a plurality of template types available in the intra template matching prediction mode, the candidate template being associated with one of a shape of the current block, a size of the current block, an intra prediction mode of the current block, and a distance between the current block and the candidate templates of the plurality of template types, the candidate templates comprising different combinations of adjacent reconstructed samples; and Based on the determined at least one template, the current block is reconstructed using template matching in the intra template matching prediction mode.
2. The method according to claim 1, wherein: The multiple template types include at least one of an L-shaped template, a top template, or a left template, the L-shaped template includes neighboring samples of the current block above the top of the current block and neighboring samples of the current block on the left side of the current block, the top template includes neighboring samples of the current block above the top of the current block, and the left template includes neighboring samples of the current block on the left side of the current block.
3. The method according to claim 2, wherein: The width of the top template is equal to the width of the current block, The height of the top template is equal to a first positive integer, The width of the left template is equal to the second positive integer, and The height of the left template is equal to the height of the current block.
4. The method according to claim 1, wherein: The determination also includes: determining an intra prediction mode of the current block based on a decoder-side intra mode derivation (DIMD), wherein the intra prediction mode of the current block is determined based on neighboring samples of the current block reconstructed according to a texture gradient analysis; and Based on the determined intra prediction mode, the at least one template of the current block is determined from the plurality of template types.
5. The method according to claim 2, wherein: The determination also includes: Based on a ratio between a width of the current block and a height of the current block being less than a first threshold, determining that the at least one template of the current block is one of: (i) the L-shaped template and the left template and (ii) the left template; and Based on a ratio between a width of the current block and a height of the current block being greater than a second threshold, determining that the at least one template of the current block is one of: (i) the L-shaped template and the top template and (ii) the top template.
6. The method according to claim 1, wherein: The plurality of template types include a first template at a first distance from the current block and a second template at a second distance from the current block, the first distance being different from the second distance.
7. The method according to claim 1, wherein: The reconstruction also includes: encoding the current block based on a first template determined from the plurality of template types, Determine a plurality of candidate reference blocks for the current block based on the first template; determining a difference between the first template of the current block and a template area of each candidate reference block of the plurality of candidate reference blocks corresponding to the first template; and The current block is reconstructed based on a weighted combination of subsets of the plurality of candidate reference blocks, the subsets corresponding to K smallest differences among differences between the first template of the current block and template regions of the plurality of candidate reference blocks.
8. The method according to claim 1, wherein: The reconstruction also includes: encoding the current block based on two or more templates determined from the plurality of template types, determining a plurality of candidate reference blocks corresponding to the two or more templates of the current block; determining a difference between each of the two or more templates of the current block and a template area of each of the plurality of candidate reference blocks corresponding to a respective one of the two or more templates; and The current block is reconstructed based on a weighted combination of subsets of the multiple candidate reference blocks, wherein the subsets correspond to K smallest differences among the differences between the two or more templates of the current block and the template areas of the multiple candidate reference blocks corresponding to the two or more templates of the current block.
9. The method according to claim 1, further comprising: A context model for entropy encoding first signal information included in the encoding information is determined based on the size of the current block, wherein the first signal information indicates which one of the multiple template types is selected as at least one template of the current block.
10. The method according to claim 1, wherein: The encoding information further includes second signal information indicating that the current block is predicted based on the at least one template determined from among the plurality of template types.
11. A device, comprising: The processing circuit is configured to: Receiving a video bitstream including encoding information of a current block in a current picture, wherein the encoding information indicates that the current block is encoded in an intra-frame template matching prediction mode; determining at least one template for predicting the current block, each of the at least one template being a corresponding candidate template of a plurality of template types available in the intra template matching prediction mode, the candidate template being associated with one of a shape of the current block, a size of the current block, an intra prediction mode of the current block, and a distance between the current block and the candidate templates of the plurality of template types, the candidate templates comprising different combinations of adjacent reconstructed samples; and Based on the determined at least one template, the current block is reconstructed using template matching in the intra template matching prediction mode.
12. The device according to claim 11, wherein The multiple template types include at least one of an L-shaped template, a top template, or a left template, the L-shaped template includes neighboring samples of the current block above the top of the current block and neighboring samples of the current block on the left side of the current block, the top template includes neighboring samples of the current block above the top of the current block, and the left template includes neighboring samples of the current block on the left side of the current block.
13. The device according to claim 12, wherein: The width of the top template is equal to the width of the current block, The height of the top template is equal to a first positive integer, The width of the left template is equal to the second positive integer, and The height of the left template is equal to the height of the current block.
14. The device according to claim 11, wherein: The processing circuit is further configured to: determining an intra prediction mode of the current block based on a decoder-side intra mode derivation (DIMD), wherein the intra prediction mode of the current block is determined based on neighboring samples of the current block reconstructed according to a texture gradient analysis; and Based on the determined intra prediction mode, the at least one template of the current block is determined from the plurality of template types.
15. The device according to claim 12, wherein: The processing circuit is further configured to: Based on a ratio between a width of the current block and a height of the current block being less than a first threshold, determining that the at least one template of the current block is one of: (i) the L-shaped template and the left template and (ii) the left template; as well as Based on a ratio between a width of the current block and a height of the current block being greater than a second threshold, determining that the at least one template of the current block is one of: (i) the L-shaped template and the top template and (ii) the top template.
16. The device according to claim 11, wherein The plurality of template types include a first template at a first distance from the current block and a second template at a second distance from the current block, wherein the first distance is different from the second distance.
17. The device according to claim 11, wherein: The processing circuit is further configured to: encoding the current block based on a first template determined from the plurality of template types, Determine a plurality of candidate reference blocks for the current block based on the first template; determining a difference between the first template of the current block and a template area of each candidate reference block of the plurality of candidate reference blocks corresponding to the first template; as well as The current block is reconstructed based on a weighted combination of subsets of the plurality of candidate reference blocks, the subsets corresponding to K smallest differences among differences between the first template of the current block and template regions of the plurality of candidate reference blocks.
18. The device according to claim 11, wherein The reconstruction also includes: encoding the current block based on two or more templates determined from the plurality of template types, determining a plurality of candidate reference blocks corresponding to the two or more templates of the current block; determining a difference between each of the two or more templates of the current block and a template area of each of the plurality of candidate reference blocks corresponding to a respective one of the two or more templates; and The current block is reconstructed based on a weighted combination of subsets of the multiple candidate reference blocks, wherein the subsets correspond to K smallest differences among the differences between the two or more templates of the current block and the template areas of the multiple candidate reference blocks corresponding to the two or more templates of the current block.
19. The device according to claim 11, wherein: The processing circuit is further configured to: A context model for entropy encoding first signal information included in the encoding information is determined based on the size of the current block, wherein the first signal information indicates which one of the multiple template types is selected as at least one template of the current block.
20. The device according to claim 11, wherein The encoding information further includes second signal information indicating that the current block is predicted based on the at least one template determined from among the plurality of template types.
Citation Information
Cited By
Method and apparatus of template area generation enhancement for prediction refinement in video coding systems
WO2026108927A1
Method, apparatus, and medium for video processing
WO2026114405A1
