Template-based intra mode coding and decoding

By excluding template-based intra-mode encoding and decoding methods, and using DIMD and TIMD to determine the intra-prediction mode of the current block, the problem of high signaling cost of intra-prediction mode in the prior art is solved, and more efficient encoding and decoding is achieved.

CN121100526APending Publication Date: 2025-12-09TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480032494.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-10-11
Filing Date
2024-10-14
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

Existing video coding and decoding technologies have high signaling costs when using template-based intra-frame mode coding and decoding, especially when the intra-frame prediction mode is not the first or second entry in the most likely mode list, resulting in an increase in the number of bits.

Method used

By excluding template-based intra-mode coding and decoding methods, the intra-prediction mode of the current block is determined by employing at least one of decoder-side intra-mode derivation (DIMD) and template-based intra-prediction mode derivation (TIMD), and a second intra-mode coding and decoding method that excludes template-based intra-mode is used when necessary.

Benefits of technology

It reduces the number of bits in intra-frame prediction mode signaling, lowers signaling costs, and improves encoding and decoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121100526A_ABST
    Figure CN121100526A_ABST
Patent Text Reader

Abstract

Aspects of the present disclosure include methods and apparatus for video decoding and encoding, and methods of processing visual media data. A method for video decoding includes receiving encoded information in a bitstream, the encoded information indicating that a first intra mode coding method is not enabled for a current block, the first intra mode coding method using one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD). The method for video decoding includes: determining at least one template-based intra mode using a first intra mode coding and decoding method using one of TIMD and DIMD; and when the at least one template-based intra mode is excluded from the second intra mode codec method, determining an intra prediction mode of the current block using the second intra mode codec method excluding the at least one template-based intra mode, and reconstructing the current block using the intra prediction mode.
Need to check novelty before this filing date? Find Prior Art

Description

Related Applications

[0001] This application claims priority to U.S. Patent Application No. 18 / 914,018, filed October 11, 2024, which claims priority to U.S. Provisional Application No. 63 / 544,519, filed October 17, 2023. The entire disclosure of the prior applications is hereby incorporated by reference. TECHNICAL FIELD

[0002] This disclosure generally describes aspects related to video coding. BACKGROUND

[0003] The background description provided herein is for the purpose of generally presenting the context of the disclosure. The work of the presently named inventors, to the extent the work is described in this background section, and the describing of aspects of the description that can not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the application.

[0004] Image / video compression can facilitate the transmission of image / video data across different devices, storage, and networks with minimal quality degradation. In some examples, video codec techniques can compress video based on spatial and temporal redundancies. In an example, a video codec can use a technique known as intra prediction, which can compress an image based on spatial redundancies. For example, intra prediction can use reference data from a current picture in reconstruction for sample prediction. In another example, a video codec can use a technique known as inter prediction, which can compress an image based on temporal redundancies. For example, inter prediction can utilize motion compensation to predict samples in a current picture from previously reconstructed pictures. Motion compensation can be indicated by a motion vector (MV). SUMMARY

[0005] Aspects of the disclosure include methods and apparatuses for video encoding / decoding.

[0006] According to an aspect of the disclosure, a method for video decoding includes receiving coded information in a bitstream. The coded information indicates that a first intra mode coding method that uses one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD) is not enabled for a current block. The method for video decoding includes determining at least one template-based intra mode with the first intra mode coding method that uses one of the TIMD and the DIMD, and determining an intra prediction mode for the current block using a second intra mode coding method that excludes the at least one template-based intra mode when the at least one template-based intra mode is excluded from the second intra mode coding method based on the first intra mode coding method not being enabled for the current block, and reconstructing the current block using the intra prediction mode.

[0007] In an aspect, a method for video encoding includes determining that a first intra mode coding method that uses one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD) is not enabled for a current block, determining at least one template-based intra mode with the first intra mode coding method that uses one of the (i) TIMD and (ii) DIMD, determining an intra prediction mode for the current block using a second intra mode coding method that excludes the at least one template-based intra mode when the at least one template-based intra mode is excluded from the second intra mode coding method based on the first intra mode coding method not being enabled for the current block, and encoding the current block in a bitstream using the intra prediction mode, and encoding a syntax element in the bitstream that indicates that the first intra mode coding method that uses one of the TIMD and the DIMD is not enabled for the current block.

[0008] In an aspect, a method of processing visual media data includes processing a bitstream of visual media data according to a format rule. The bitstream includes a syntax element that indicates that a first intra mode coding method that uses one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD) is not enabled for a current block. The format rule specifies that at least one template-based intra mode is determined with the first intra mode coding method that uses one of the TIMD and the DIMD, and an intra prediction mode for the current block is determined using a second intra mode coding method that excludes the at least one template-based intra mode when the at least one template-based intra mode is excluded from the second intra mode coding method based on the first intra mode coding method not being enabled for the current block, and the current block is processed using the intra prediction mode.

[0009] Aspects of the disclosure also provide an apparatus for video encoding. The apparatus for video encoding includes processing circuitry configured to implement any of the described methods for video encoding.

[0010] Aspects of the disclosure also provide an apparatus for video decoding. The apparatus for video decoding includes processing circuitry configured to implement any of the described methods for video encoding.

[0011] Aspects of the disclosure also provide a non-transitory computer- readable medium storing instructions that, when executed by a computer, cause the computer to perform any of the described methods for video decoding / encoding.

[0012] The technical solution of the disclosure includes aspects related to reducing signaling requirements for intra mode coding using MPM lists. When coding with intra modes using MPM lists, signaling of the intra prediction mode of a current block can use a relatively large number of bits in the bitstream, for example, in cases where the intra prediction mode is not at the first entry or the second entry of the MPM list. In an example, when a first intra mode coding method using one of (i) TIMD and (ii) DIMD is not enabled for a current block, at least one template-based intra mode determined using the first intra mode coding method using one of TIMD and DIMD can be excluded from a second intra mode coding method, e.g., intra mode coding using MPM lists. Thus, the intra prediction mode of the current block can be determined using the second intra mode coding method excluding the at least one template-based intra mode. The template-based intra mode in the first intra mode coding method can be signaled using fewer bits, and thus the fact that the template-based intra mode has been evaluated and not selected by the encoder can indicate that the prediction signal derived from the template-based intra mode can not be a good indicator of the current block. The probability of using a template-based intra mode in intra mode coding using MPM lists can be relatively low, e.g., because intra mode coding using MPM lists can encode more bits than the first intra mode coding method. Thus, excluding the at least one template-based intra mode from intra mode coding using MPM lists can reduce the number of bits signaled for indicating the intra prediction mode used to code the current block. In an example, because the template-based intra mode is excluded, the prediction signal derived based on the intra prediction mode can be a good indicator of the current block.

[0013] In an example, when the template-based intra mode is at the first entry and / or the second entry of the MPM list, the template-based intra mode can be included in the MPM list, and thus the signaling cost for the intra prediction mode can be relatively low compared to the related art, because the codeword length of the first entry and the second entry is the smallest in the MPM list. BRIEF DESCRIPTION OF DRAWINGS

[0014] Other features, properties, and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings, in which:

[0015] Figure 1 is a schematic illustration of an example of a block diagram of a communication system (100).

[0016] Figure 2 is a schematic illustration of an example of a block diagram of a decoder.

[0017] Figure 3 is a schematic illustration of an example of a block diagram of an encoder.

[0018] Figure 4 shows an example of intra prediction according to an aspect of the disclosure.

[0019] Figure 5 shows an example of 67 intra prediction modes according to an aspect of the disclosure.

[0020] Figure 6 shows an example of a template-based intra mode derivation method according to an aspect of the disclosure.

[0021] Figure 7 shows an example of decoder-side intra mode derivation (DIMD) according to an aspect of the disclosure.

[0022] Figure 8 shows an example of multiple reference line (MRL) prediction according to an aspect of the disclosure.

[0023] Figure 9 shows an example of a template-based multiple reference line intra prediction (TMRL) mode according to an aspect of the disclosure.

[0024] Figure 10 shows an example of a syntax table including syntax elements of different intra mode coding methods.

[0025] Figure 11 An example of a codeword length for a most probable mode (MPM) index is shown in accordance with an aspect of the disclosure.

[0026] Figure 12 A flowchart outlining a decoding process in accordance with some aspects of the disclosure is shown.

[0027] Figure 13 A flowchart outlining an encoding process in accordance with some aspects of the disclosure is shown.

[0028] Figure 14 is a schematic illustration of a computer system in accordance with an aspect. 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 a system for the disclosed subject matter - the application of video encoders and video decoders in a streaming environment. The disclosed subject matter can be equally applicable to other video enabled applications, including, for example, video conferencing, digital TV, streaming video services, storing compressed video on digital media including CD (Compact Disc), DVD (Digital Versatile Disc), storage sticks, and the like.

[0030] The video processing system (100) includes a capture subsystem (113) that can include a video source (101), for example a digital camera, that creates, for example, a stream of video pictures (102) that are uncompressed. In an example, the stream of video pictures (102) includes samples taken by the digital camera. The stream of video pictures (102), depicted as a bold line to emphasize the high data volume when compared to the encoded video data (104) (or encoded video bitstreams), can be processed by an electronic device (120) that includes a video encoder (103) coupled to the video source (101). The video encoder (103) can 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 (104) (or encoded video bitstream), depicted as a thin line to emphasize the lower data volume when compared to the stream of video pictures (102), can be stored on a streaming server (105) for future use. One or more streaming client subsystems, for example a video Figure 1Client subsystems (106) and (108) in the example can access the streaming server (105) to retrieve copies (107) and (109) of the encoded video data (104). The client subsystem (106) can include, for example, a video decoder (110) in the electronic device (130). The video decoder (110) decodes the incoming copy of encoded video data (107) and creates an outgoing stream of video pictures (111) that can be rendered on a display (112) (e.g., a display screen) or other rendering device (not depicted). In some streaming systems, the encoded video data (104), (107), and (109) (e.g., video bitstreams) can be encoded according to certain video coding / compression standards. Examples of those standards include ITU-T (International Telecommunication Union- Telecommunication Standardization Sector) H.265 recommendations. In an example, a video coding standard under development is informally known as Versatile Video Coding (VVC). The disclosed subject matter can be used in the context of VVC.

[0031] Note that the electronic devices (120) and (130) can include other components (not shown). For example, the electronic device (120) can include a video decoder (not shown), and the electronic device (130) can include a video encoder (not shown) as well.

[0032] Figure 2 An example of a block diagram showing a video decoder (210) is shown. The video decoder (210) can be included in an electronic device (230). The electronic device (230) can include a receiver (231) (e.g., receiving circuitry). The video decoder (210) can be used in place of Figure 1 The video decoder (110) in the example.

[0033] The receiver (231) can receive, e.g., from a channel (201), one or more coded video sequences included in a bitstream to be decoded by the video decoder (210). In an aspect, one coded video sequence at a time is received, where the decoding of each coded video sequence is independent of the decoding of other coded video sequences. The coded video sequences can be received from a storage medium, e.g., that is part of the channel (201). The receiver (231) can receive the coded video data along with other data, e.g., coded audio data and / or ancillary data streams, which can be forwarded to their respective consuming entities (not depicted). The receiver (231) can separate the coded video sequences from the other data. To combat network jitter, a buffer memory (215) can be coupled between the receiver (231) and the entropy decoder / parser (220), hereinafter simply referred to as the "parser (220)". In certain applications, the buffer memory (215) is part of the video decoder (210). In other applications, the buffer memory (215) can be external to the video decoder (210) (not depicted). In still other applications, there can be a buffer memory (not depicted) external to the video decoder (210) to combat network jitter, and additionally, there can be another buffer memory (215) internal to the video decoder (210) to, e.g., handle playout timing. When the receiver (231) is receiving data from a store / forward device or from an isosychronous network that has sufficient bandwidth and controllability, the buffer memory (215) can not be needed, or can be small. To make the best use of packet networks, such as the Internet, it can be desirable to have the buffer memory (215), which can be relatively large and can advantageously be of adaptive size, and can be implemented at least partly in operating system or similar elements (not depicted) external to the video decoder (210).

[0034] The video decoder (210) can include a parser (220) to reconstruct symbols (221) from the coded video sequence. Categories of those symbols include information used to manage operation of the video decoder (210), and possibly information used to control a rendering device such as a rendering device (212) (e.g., a display screen) that is not an integral part of the electronic device (230), but can be coupled to the electronic device (230), as Figure 2The control information for the rendering device can be in the form of a Supplemental Enhancement Information (SEI) message or a Video Usability Information (VUI) parameter set fragment (not depicted). The parser (220) can parse / entropy-decode the received coded video sequence. The coding of the coded video sequence can be in accordance with a video coding technology or standard, and can follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and so forth. The parser (220) can extract from the coded video sequence, based upon at least one parameter corresponding to a group, a group parameter set for at least one sub-group of sub-groups of pixels in the video decoder, in accordance with the group. The sub-groups can include Groups of Pictures (GOPs), pictures, tiles, slices, macroblocks, Coding Units (CUs), blocks, Transform Units (TUs), Prediction Units (PUs) and so forth. The parser (220) can also extract from the coded video sequence information such as transform coefficients, quantizer parameter values, motion vectors, and so forth.

[0035] The parser (220) can perform entropy-decoding / parsing operation on the video sequence received from the buffer memory (215) to create symbols (221).

[0036] Reconstruction of the symbols (221) can involve multiple different units, depending on the type of coded video picture or part of the coded video picture (e.g., inter and intra picture, inter and intra block), among other factors. Which units are involved and the manner of the involvement can be controlled by the sub-group control information parsed by the parser (220) from the coded video sequence. For the sake of clarity, the flow of such sub-group control information between the parser (220) and the following multiple units is not depicted.

[0037] In addition to the function blocks already mentioned, the video decoder (210) can be conceptually sub-divided into multiple functional units as described below, irrespective of the specific internal working details of the function blocks. In a practical implementation operating under business constraints, many of these units interact closely with each other and can be at least partly integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual sub-division into the functional units below is appropriate.

[0038] The first unit is a scaler / inverse transform unit (251). The scaler / inverse transform unit (251) receives quantized transform coefficients as well as control information, including which transform to use, block size, quantization factor, quantization scaling matrices, etc., from the parser (220) as a symbol (221). The scaler / inverse transform unit (251) can output a block comprising sample values that can be input into the aggregator (255).

[0039] In some cases, the output samples of the scaler / inverse transform unit (251) can belong to an intra coded block. An intra coded block is a block that does not use predictive information from previously reconstructed pictures, but can use predictive information from previously reconstructed parts of the current picture. Such predictive information can be provided by an intra picture prediction unit (252). In some cases, the intra picture prediction unit (252) uses surrounding already reconstructed information extracted from a current picture buffer (258) to generate a block of the same size and shape as the block under reconstruction. For example, the current picture buffer (258) buffers partially reconstructed current pictures and / or fully reconstructed current pictures. In some cases, the aggregator (255) adds the predictive information generated by the intra prediction unit (252) to the output sample information as provided by the scaler / inverse transform unit (251) on a per sample basis.

[0040] In other cases, the output samples of the scaler / inverse transform unit (251) can belong to an inter coded block and potentially to a motion compensated block. In this case, a motion compensation prediction unit (253) can access a reference picture memory (257) to extract samples for prediction. After motion compensation of the extracted samples according to the symbol (221) belonging to the block, these samples can be added by the aggregator (255) to the output of the scaler / inverse transform unit (251) (in this case referred to as residual samples or residual signal) to generate the output sample information. The address within the reference picture memory (257) from which the motion compensation prediction unit (253) extracts the prediction samples can be controlled by a motion vector, which is made available to the motion compensation prediction unit (253) in the form of a symbol (221), which can have, for example, an X component, a Y component, and a reference picture component. Motion compensation can also include interpolation of sample values as extracted from the reference picture memory (257) when sub-sample precision motion vectors are used, motion vector prediction mechanisms, etc.

[0041] The output samples of the aggregator (255) can be subject to various loop filtering techniques in the loop filter unit (256). Video compression technologies can include in-loop filter technologies that are controlled by parameters included in the coded video sequence (also referred to as coded video bitstream) and made available to the loop filter unit (256) as symbols (221) from the parser (220). Video compression can also be responsive to meta-information obtained during the decoding of previous parts of the coded picture or coded video sequence (in decoding order) and to previously reconstructed and loop-filtered sample values.

[0042] The output of the loop filter unit (256) can be a stream of samples that can be output to the rendering device (212) and to the reference picture memory (257) for use in future inter-picture prediction.

[0043] Some of the coded pictures, once fully reconstructed, can be used as reference pictures for future prediction. For example, once a coded picture corresponding to a current picture is fully reconstructed and the coded picture is identified (by, for example, the parser (220)) as a reference picture, the current picture buffer (258) can become part of the reference picture memory (257), and a fresh current picture buffer can be reallocated before commencing the reconstruction of the subsequent coded picture.

[0044] The video decoder (210) can perform decoding operations according to a predetermined video compression technology or standard, such as ITU-T H.265. The coded video sequence can conform to a syntax specified by the video compression technology or standard being used, in the sense that the coded video sequence adheres to the syntax of the video compression technology or standard, and the level of the profile to which the coded video sequence conforms is such that the complexity of reconstructing the coded video sequence is within the limits of the video compression technology or standard. Specifically, a profile can select certain tools available in the video compression technology or standard, as the only tools available for use in that profile. Also, the complexity of the coded video sequence can be required to be within the limits set by the tier of the profile under which the coded video sequence conforms. In some cases, the limits set by the tier include maximum picture size, maximum frame rate, maximum reconstruction sample rate (measured in, for example megasamples per second), maximum reference picture size, and so on. In some cases, the limits set by the tier can be further refined by Hypothetical Reference Decoder (HRD) specifications and metadata for HRD buffer management signaled in the coded video sequence.

[0045] On one hand, the receiver (231) can receive additional (redundant) data along with the encoded video. The additional data can be included as part of the encoded video sequence. The additional data can be used by the video decoder (210) to properly decode the data and / or more accurately reconstruct the original video data. The additional data can be, for example, in the form of temporal, spatial, or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant images, forward error correction codes, etc.

[0046] Figure 3 An example block diagram of a video encoder (303) is shown. The video encoder (303) is included in an electronic device (320). The electronic device (320) includes a transmitter (340) (e.g., a transmission circuit system). The video encoder (303) can be used in place of Figure 1 The video encoder (103) in the example.

[0047] The video encoder (303) can obtain data from the video source (301) (which is not...). Figure 3 In one example, an electronic device (320) receives video samples, and a video source (301) can capture video images to be encoded by a video encoder (303). In another example, the video source (301) is part of the electronic device (320).

[0048] The video source (301) can provide a sequence of source video in the form of a digital video sample stream to be encoded by the video encoder (303). This digital video sample stream can have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit…), any color space (e.g., BT.601 YCrCb, RGB…), and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb 4:4:4). In a media service system, the video source (301) can be a storage device storing previously prepared video. In a video conferencing system, the video source (301) can be a camera device capturing local image information as a video sequence. The video data can be provided as multiple individual pictures that are given motion when viewed sequentially. The pictures themselves can be organized as spatial pixel arrays, where each pixel can include one or more samples, depending on the sampling structure, color space, etc., used. The following description focuses on samples.

[0049] According to one aspect, the video encoder (303) can encode and compress images of the source video sequence into an encoded video sequence (343) in real time or under any other time constraints as required. Implementing an appropriate encoding rate is a function of the controller (350). In some aspects, the controller (350) controls and is functionally coupled to other functional units as described below. For clarity, the coupling is not depicted. Parameters set by the controller (350) may include rate control-related parameters (image skipping, quantizer, λ value of rate-distortion optimization techniques, etc.), image size, group of images (GOP) layout, maximum motion vector search range, etc. The controller (350) can be configured to have other suitable functions related to the video encoder (303) optimized for a specific system design.

[0050] In some respects, the video encoder (303) is configured to operate within an encoding / decoding loop. As a hypersimplified description, in this example, the encoding / decoding loop may include a source encoder (330) (e.g., responsible for creating symbols, such as a symbol stream, based on the input image to be encoded and a reference image) and a (local) decoder (333) embedded within the video encoder (303). The decoder (333) reconstructs the symbols, creating sample data in a manner similar to how the (remote) decoder would also create them. The reconstructed sample stream (sample data) is input to a reference image memory (334). Since decoding of the symbol stream produces bit-accurate results regardless of the decoder's location (local or remote), the contents of the reference image memory (334) are also bit-accurate between the local and remote encoders. In other words, the reference image samples "seen" by the encoder's prediction section are exactly the same sample values ​​that the decoder will "see" when using prediction during decoding. This basic principle of reference image synchronicity (and the drift that occurs, for example, due to channel errors) is also used in some related techniques.

[0051] The operation of the "local" decoder (333) can be combined with what has already been done above. Figure 2 The operation of a "remote" decoder, such as a video decoder (210), is the same as described in the detailed description. However, a brief reference is also made to... Figure 2 Since symbols are available and the encoding of symbols into an encoded video sequence by the entropy encoder (345) and the decoding of symbols by the parser (220) can be lossless, the entropy decoding portion of the video decoder (210), including the buffer memory (215) and the parser (220), can be fully implemented in the local decoder (333).

[0052] In one aspect, the decoder techniques other than the parsing / entropy decoding present in the decoder exist in the corresponding encoder in the same or substantially the same functional form. Thus, the disclosed subject matter focuses on the decoder operations. The description of the encoder techniques can be simplified since the encoder techniques are reciprocal to the fully described decoder techniques. A more detailed description is provided below in certain sections.

[0053] During operation, in some examples, the source coder (330) can perform motion compensated predictive coding, which codes an input picture predictive ly with reference to one or more previously coded pictures, designated as "reference pictures," from the video sequence. In this manner, coding engine (332) codes differences between pixel blocks of an input picture and pixel blocks of reference pictures, which can be selected as prediction references for the input picture.

[0054] The local video decoder (333) can decode coded video data of pictures that can be designated as reference pictures based on symbols created by the source coder (330). The operations of the coding engine (332) can advantageously be lossy processes. When the coded video data can be decoded at a video decoder (not shown) at the far end, the reconstructed video sequence can generally be a replica of the source video sequence with some errors. The local video decoder (333) replicates the decoding processes that can be performed on reference pictures by a video decoder and can cause reconstructed reference pictures to be stored in the reference picture memory (334). In this manner, the video encoder (303) can store copies of reconstructed reference pictures locally that have common content as the reconstructed reference pictures that will be obtained by the far-end video decoder (absent transmission errors). Figure 3

[0055] The predictor (335) can perform a prediction search for the coding engine (332). That is, for a new picture to be coded, the predictor (335) can 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, and so on, that can serve as an appropriate prediction reference for the new picture. The predictor (335) can operate on a sample block-by-pixel block basis to find appropriate prediction references. In some instances, as determined by search results obtained by the predictor (335), an input picture can have prediction references drawn from multiple reference pictures stored in the reference picture memory (334).

[0056] The controller (350) can manage coding operations of the source coder (330), including, for example, settings for parameters and subgroup parameters used for encoding the video data.

[0057] ​The outputs of all the above-mentioned functional units can be subject to entropy coding in an entropy coder (345). The entropy coder (345) converts the symbols generated by the various functional units into an encoded video sequence by applying lossless compression to the symbols according to techniques such as Huffman coding, variable length coding, arithmetic coding, and so on.

[0058] The transmitter (340) can buffer the encoded video sequence created by the entropy coder (345) in preparation for transmission via a communication channel (360), which can be a hardware / software link to a storage device which will store the encoded video data. The transmitter (340) can merge encoded video data from the video coder (303) with other data to be transmitted, for example, encoded audio data and / or ancillary data streams (sources not shown).

[0059] The controller (350) can manage operation of the video encoder (303). During coding, the controller (350) can assign to each coded picture a certain coded picture type, which can affect the coding techniques that can be applied to the corresponding picture. For example, pictures often can be assigned as one of the following picture types:

[0060] Intra Picture (I picture), which can be coded and decoded without using any other picture in the sequence as a source of prediction. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh (“IDR”) pictures.

[0061] Predictive Picture (P picture), which can be coded and decoded using intra prediction or inter prediction that uses a motion vector and a reference index to predict sample values of each block.

[0062] Bi-directional predictive picture (B picture), which can be coded and decoded using intra prediction or inter prediction that uses two motion vectors and reference indices to predict sample values of each block. Similarly, multi-predictive pictures can use more than two reference pictures and associated metadata for reconstructing a single block.

[0063] A source picture can generally be spatially subdivided into a plurality of blocks of samples (e.g., blocks of 4x4, 8x8, 4x8, or 16x16 samples, respectively), and coded block-by-block. The blocks can be predictively coded with reference to other (already coded) blocks, determined by a coding assignment of the respective picture the block is applied to. For example, blocks of an I picture can be non-predictively coded, or predictively coded with reference to already coded blocks of the same picture (spatial prediction or intra prediction). Blocks of a P picture can be predictively coded with reference to one previously coded reference picture, either via spatial prediction or via temporal prediction. Blocks of a B picture can be predictively coded with reference to one or two previously coded reference pictures, either via spatial prediction or via temporal prediction.

[0064] The video encoder (303) can perform encoding operations in accordance with a predetermined video coding technology or standard, such as ITU-T H.265. In its operation, the video encoder (303) can perform various compression operations, including predictive coding operations that exploit temporal and spatial redundancies in the input video sequence. The coded video data can thus conform to a syntax specified by the video coding technology or standard being used.

[0065] In an aspect, the transmitter (340) can transmit additional data with the coded video. The source coder (330) can include such data as part of the coded video sequence. Additional data can comprise temporal / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, and so on.

[0066] Video can be captured as a plurality of source pictures (video pictures) in temporal sequence. Intra-picture prediction (often abbreviated as intra prediction) exploits spatial correlation in a given picture, while inter-picture prediction exploits correlation between pictures (temporal or other). In an example, a particular picture in encoding / decoding (termed the current picture) is partitioned into blocks. When a block in the current picture is similar to a reference block in a reference picture that has been coded previously and is still buffered, the block in the current picture can be coded by a vector referred to as a motion vector. The motion vector points to the reference block in the reference picture, and in case of multiple reference pictures, the motion vector can have a third dimension that identifies the reference picture.

[0067] In some aspects, bi-prediction techniques can be used in inter-picture prediction. According to bi-prediction techniques, two reference pictures are used, e.g., a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but can be respectively the past and future in display order). A block in the current picture can be coded 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 can be predicted by a combination of the first reference block and the second reference block.

[0068] Furthermore, merge mode techniques can be used in inter-picture prediction to improve coding efficiency.

[0069] According to some aspects of the disclosure, prediction, such as inter-picture prediction and intra-picture prediction, is performed in the unit of blocks. For example, according to the HEVC (High Efficiency Video Coding, HEVC) standard, a picture in a video sequence is partitioned into Coding Tree Units (CTUs) for compression, the CTUs in a picture have the same size, such as 64 x 64 pixels, 32 x 32 pixels, or 16 x 16 pixels. Generally, a CTU includes three Coding Tree Blocks (CTBs), which are one luma CTB and two chroma CTBs. Each CTU can be recursively quadtree- split into one or more Coding Units (CUs). For example, a 64 x 64 pixel CTU can be split into one 64 x 64 pixel CU, or 4 32 x 32 pixel CUs, or 16 16 x 16 pixel CUs. In an example, each CU is analyzed to determine a prediction type for the CU, such as an inter prediction type or an intra prediction type. The CU is split into one or more Prediction Units (PUs) depending on the temporal and / or spatial predictability. Generally, each PU includes one luma prediction block (PB), and two chroma PBs. In an aspect, prediction operations in coding (encoding / decoding) are performed in the unit of a prediction block. 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 x 8 pixels, 16 x 16 pixels, 8 x 16 pixels, 16 x 8 pixels, and the like.

[0070] It is noted that the video encoders (103) and (303), and the video decoders (110) and (210) can be implemented using any suitable technique. In an aspect, the video encoders (103) and (303), and the video decoders (110) and (210) can be implemented using one or more integrated circuits. In another aspect, the video encoders (103) and (303), and the video decoders (110) and (210) can be implemented using one or more processors that execute software instructions.

[0071] In intra prediction or intra prediction mode, sample values of a coding block in a current picture can be predicted from samples in the current picture that have already been reconstructed, referred to as reference samples. The samples can be in one or more reference lines.

[0072] A predictor block can be formed using neighboring sample values of already available samples. Sample values of the neighboring samples can be copied into the predictor block according to a direction. A reference to the direction in use can be coded in the bitstream or the reference to the direction in use itself can be predicted.

[0073] An example of intra prediction is planar mode, where a bilinear interpolation can be used. In planar mode, one or more positions in the current block can be predicted using reference samples in a reference line. Other positions in the current block can be predicted by a linear combination of the reference samples and the samples at the one or more positions. The weights can be determined according to a positioning of the current samples in the current block.

[0074] An example of intra prediction is DC (Direct Current, DC) mode. To predict samples in a block with DC mode, an average value of samples in a reference line can be used as a predictor.

[0075] An example of intra prediction is angular intra prediction. In angular intra prediction, a current sample in a current block can be predicted using, for example, an interpolated reference sample or a reference sample (e.g., a predicted sample) in a reference line, as shown in Figure 4 .

[0076] Referring to Figure 4 , a subset of nine predictor directions from a plurality of predictor directions (e.g., 33 angular modes of 35 intra modes in H.265) is depicted in the lower right. The point (401) where the arrows converge represents a sample being predicted. Each of the arrows can represent a respective direction from which the sample is predicted. For example, arrow (402) indicates that sample (401) is predicted from one or more samples located in the upper right at a 45 o degree angle from the horizontal direction. Similarly, arrow (403) indicates that sample (401) is predicted from one or more samples located in the lower left of sample (401) at a 22.5 degree angle from the horizontal direction.o The angle is predicted from one or more samples.

[0077] Still refer to Figure 4 The top left depicts a 4×4 square block (404) containing 16 samples (indicated by a bold dashed line). Each sample is labeled with "S", its position in the Y dimension (e.g., vertical index), and its position in the X dimension (e.g., horizontal index). For example, sample S21 is the second sample in the Y dimension (from top to bottom) and the first sample in the X dimension (from left to right). Similarly, sample S44 is the fourth sample in both the Y and X dimensions of block (404). Since the block is 4×4 samples in size, S44 is located in the bottom right. Reference samples following a similar numbering scheme are further shown. Reference samples are labeled with R, their Y position (e.g., vertical index) and X position (horizontal index) relative to block (404). In some examples, the predicted sample is adjacent to the block being reconstructed; therefore, negative values ​​are not required.

[0078] Intra-frame image prediction can be operated by copying reference sample values ​​from neighboring samples indicated by a prediction direction signaled by a signal. For example, suppose the encoded video bitstream includes signaling indicating a prediction direction consistent with arrow (402) for that block—that is, from the upper right at a 45-degree angle to the horizontal. o The samples at the angle are used to predict the samples. In this case, samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Then, sample S44 is predicted from the reference sample R08.

[0079] In some cases, especially when the direction cannot be 45 degrees. o In the case of uniform division, the values ​​of multiple reference samples can be combined, for example, by interpolation, to calculate the reference sample.

[0080] As video coding techniques have evolved, the number of possible directions has increased. For example, in H.264, nine different directions can be represented. In H.265, 33 different directions can be used. In JEM (Joint Exploration Model) / VVC / BMS (Benchmark Set), up to 65 directions can be used. Experiments have been conducted to identify the most likely directions, and certain techniques in entropy coding have been used to represent those possible directions with a small number of bits, while accepting some penalty for less likely directions. In some examples, directions can be predicted from neighboring directions used in nearby, already decoded blocks.

[0081] Various intra prediction coding tools are introduced to improve coding efficiency, including but not limited to: angular intra prediction with 65 angles and 4-tap interpolation filter, wide-angle intra prediction (WAIP), position dependent prediction combination (PDPC), multi-reference line (MRL) prediction, intra sub-partition (ISP) mode, matrix-based intra prediction (MIP), cross component linear model (CCLM), intra mode coding with 6 most probable modes (MPM), etc.

[0082] Figure 5 An illustration (501) is shown that depicts 67 intra prediction modes, e.g., according to JEM. The 67 intra prediction modes can include a DC mode, a planar mode, and 65 angular modes that correspond to 65 intra prediction directions, respectively. The mapping of intra prediction direction bits in a coded video bitstream that represent a direction can be different according to different video coding techniques. The range of such mappings can be, for example, from a simple direct mapping to codewords, to complex adaptive schemes involving most probable modes, and similar techniques. In most cases, however, there can be certain directions that are statistically less likely to occur in video content than others. As the goal of video compression is the reduction of redundancy, those less likely directions can be represented by more bits than the more likely directions, in a well-working video coding technique.

[0083] In some examples, a template can be used to derive an intra prediction mode for a current block (also referred to as a current coding block). The current coding block and neighboring samples of the current coding block can share similar texture characteristics. Thus, the current coding block can be predicted using neighboring reconstructed samples of the current coding block. The template can include neighboring samples (e.g., neighboring reconstructed samples) of the current coding block.

[0084] Method A can include a template-based derivation method that can derive a prediction mode, e.g., an intra prediction mode, for a current block. In an example, method A includes a template-based intra prediction mode derivation (TIMD) that can be applied to a current coding block. When the template and the current coding block are well-correlated, the intra prediction mode applied to the template can give a good indication for the current block.

[0085] Referring toFigure 6 Neighboring reconstructed samples of the current CU (or current block) (602) can be used as a template (604). The template (604) can have any suitable shape and include any suitable number of samples. The template (604) can be adjacent to the current CU (602). In an aspect, the template (604) includes reconstructed samples. In an aspect, the template (604) includes reference samples. Figure 6 In the example shown, the template (604) has an "L" shape and includes a top template above the current CU (602) and a left template to the left of the current CU (602). In an example, the template (604) includes an upper left corner adjacent to the current CU (602). In an example, the template (604) includes a top template above the current CU (602). In an example, the template (604) includes a left template to the left of the current CU (602).

[0086] The reference samples (606) can be adjacent to the template (604). In an example, the reference samples (606) can include at least one row (e.g., at least one vertical row and / or at least one horizontal row) of samples.

[0087] In some examples, intra mode derivation using a template according to method A can include one or more of the following steps:

[0088] In step 1, a set of samples can be defined as a reference of the template (604), as shown. The set of samples can be used as the reference samples (606) to generate a prediction signal of the template (604). Figure 6

[0089] In step 2, an intra prediction mode can be applied (e.g., can be applied) to the reference samples (606) of the template (604) to generate a prediction signal, e.g., a prediction of the template (604). In an example, a predefined set of intra prediction modes can include predefined intra modes (also referred to as predefined intra prediction modes), and the intra prediction mode applied to the reference samples (606) of the template (604) is one of the predefined intra modes.

[0090] In step 3, a cost between the prediction signal of the template (604) and the template (604) can be determined. In an example, the template (604) is a reconstructed signal of the template (604) represented by the reconstructed samples in the template (604).

[0091] ​In an example, the cost is a Sum of Absolute Transformed Differences (SATD) cost between the prediction signal of the template (604) and the reconstructed signal of the template (604), and the cost is calculated. In an example, the cost is a Mean Removal Sum of Absolute Differences (MRSAD) between the prediction signal of the template (604) and the reconstructed signal of the template (604).

[0092] In step 4, steps 2 and 3 can be repeated for another mode in the pre-defined set of intra prediction modes. The pre-defined intra modes can be ordered (e.g., ranked) based on the corresponding cost (e.g., SATD cost or MRSAD cost).

[0093] In step 5, the mode with the minimum cost (e.g., minimum SATD cost) is selected as the prediction mode for the current block or the current CU (602). For ease of description, the determined prediction mode can be referred to as a template-based intra mode.

[0094] In some examples, in method A, multiple prediction modes (e.g., multiple intra prediction modes) of the current CU (602) corresponding to the minimum cost in the cost can be selected, and the multiple prediction modes can be referred to as template-based intra modes.

[0095] In an example, method A can include TIMD. In an aspect, TIMD can use the reference samples of the current CU as a template, and select an intra mode in the candidate intra prediction mode set associated with the TIMD. For example, the selected intra mode can be determined as the best intra mode based on a cost function. As Figure 6As shown, the neighboring reconstructed samples of the current CU (602) can be used as a template (604). The reconstructed samples in the template (604) can be compared with the predicted samples of the template (604). The reference samples (606) of the template (604) can be used to generate the predicted samples. The reference samples (606) can include the neighboring reconstructed samples around the template (604). A cost function can be used to calculate the cost (or distortion) between the predicted samples and the reconstructed samples in the template (604) based on the respective candidate intra prediction modes in the candidate intra prediction mode set, e.g., described in steps 3-4 above. The intra prediction mode with the minimum cost (or distortion) can be selected as the intra prediction mode (e.g., the best intra prediction mode) to intra predict the current CU (602), e.g., described in step 5. As mentioned above, in some examples, in TIMD, multiple intra prediction modes of the current CU (602) corresponding to the minimum cost in the cost can be selected, and the multiple prediction modes can be referred to as template-based intra modes.

[0096] Referring to Figure 6 The size of the reference samples (606) can depend on the size of the current CU (602) (e.g., block width M and block height N) and the size of the template (604) (e.g., template width L1 of the left template and template height L2 of the top template). In an example, if the reference samples (606) only include one row of samples (e.g., one vertical row of samples located to the left of the template (604) and one horizontal row of samples located above the template (604)), the width of the reference samples (606) can equal 2(M+L1)+1 and the height of the reference samples (606) can equal 2(N+L2)+1.

[0097] In an example, the method A can include decoder-side intra mode derivation (DIMD). When DIMD is applied, N intra modes can be derived from the reconstructed neighboring samples around the current block (701), and N predictors obtained using the N intra modes can be combined with a planar mode predictor with a corresponding weight. The weight can be derived from a gradient (e.g., Histogram of Gradient (HoG) calculation). Figure 7 An example of DIMD is shown. The HoG calculation can be performed by applying filters (e.g., horizontal Sobel filter and vertical Sobel filter) on the pixels in a template (702) around the current block (701). The template (702) can include the reconstructed neighboring samples around the current block (701). In an example, the width of the template is 3. In an example, the pixels in the middle row of the template (702) (marked in gray) can be involved in the HoG calculation. Referring to Figure 7A window (703) around the pixel (705) can be used to determine the gradient associated with the pixel (705). The window (703) can have a size of 3x3, with the pixel (705) at the center of the window (703). For example, a horizontal gradient and a vertical gradient can be obtained using a horizontal Sobel filter and a vertical Sobel filter, respectively. A direction or orientation can be obtained from the horizontal gradient and the vertical gradient. An intra prediction mode associated with the direction can be determined. Subsequently, a histogram (also referred to as HoG) (710) of the intra prediction modes can be obtained. The N highest histogram bins can be selected for the current block (701). In an example, the N intra prediction modes can be referred to as template-based intra modes.

[0098] Figure 8 An example of MRL prediction (also referred to as MRL intra prediction) is shown according to an aspect of the disclosure. MRL intra prediction can use multiple reference lines for intra prediction. In Figure 8 Four reference lines 0 to 3 of a current block (801) are shown in FIG. 8. A reference line i can include reference samples that are i lines away from the current block (801), e.g., i lines away from a boundary of the current block (801), e.g., i horizontal lines away from a top boundary and / or i vertical lines away from a left boundary, where i is 0, 1, 2, or 3. For example, a reference line i includes reference samples that are i horizontal lines above a top boundary of the current block (801) and / or i vertical lines to the left of a left boundary of the current block (801). In an example, reference line 0 includes reference samples that are adjacent to the current block (801), e.g., including reconstructed neighboring samples of top neighboring samples above the current block (801) and left neighboring samples to the left of the current block (801). In an example, reference line 0 can include top-left reconstructed neighboring samples.

[0099] The reference lines 0 to 3 can include multiple segments, e.g., segment A to segment F. In an example, samples of segment A and segment F are not extracted from reconstructed neighboring samples. The samples of segment A and segment F can be padded with samples closest to segment B and segment E, respectively.

[0100] In an example, e.g., in HEVC, the closest reference line (i.e., reference line 0) is used in intra prediction (or intra picture prediction). In MRL intra prediction, multiple reference lines can be used. In an example, two additional lines (e.g., reference line 1 and reference line 3) are used.

[0101] An index for selecting a reference line (e.g., a reference line index denoted as mrl_idx) can be signaled, and the selected reference line can be used to generate an intra predictor for the current block (801). For a reference line index greater than 0, only the additional reference line mode can be included in the MPM list, and an MPM index without the remaining modes (e.g., intra prediction modes not included in the MPM list) can be signaled. The index can be signaled before the intra prediction modes. In an example, when a non-zero reference line index is signaled, certain intra prediction modes (e.g., planar mode and / or DC mode) are excluded from the intra prediction modes.

[0102] Figure 9 An example of a template-based multi-reference line intra prediction (TMRL) mode is shown in accordance with an aspect of the disclosure. Referring to Figure 9 , a current block (901) is being encoded. A top template is above the current block (901), and a left template is to the left of the current block (901). Reference lines such as reference lines 1-3 are adjacent to the top template and the left template.

[0103] The TMRL mode can combine reference lines and prediction modes, and can use a template matching method to construct a list of candidate combinations. An index of the candidate combination list can be encoded to indicate which reference line and prediction mode to use in encoding the current block. In an example, the regular MRL of the non-TIMD part is replaced by the TMRL mode.

[0104] The TMRL mode can extend the reference line candidate list and the intra prediction mode candidate list. In an example, the extended reference line candidate list is {1, 3, 5, 7, 12}. In an example, the restriction on the top CTU horizontal line is unchanged. The size of the intra prediction mode candidate list can be 10. In an example, the construction of the intra prediction mode candidate list can be similar to the MPM, except that the planar mode is excluded from the intra prediction mode candidate list, the DC mode is added after the modes of the 5 neighboring PUs, and the DIMD mode (if it is not included) is added as well as the modes where the delta angle is from ±1 o to ±4 oAn angular mode (compared to existing angular modes in the intra prediction mode candidate list). The accuracy of the angular prediction can be extended from 65 to 129. In an example, non-adjacent positions are added as candidates when constructing the intra candidate list. In an example, when a neighboring block or a non-adjacent block is coded with a geometric partitioning mode (GPM) or a spatial geometric partitioning mode (SGPM), the intra mode of the block is replaced by the partitioning angle.

[0105] TMRL candidates can be constructed as follows. In an example, there are 5x10=50 combinations of extended reference lines and allowed intra prediction modes for a block. Since the extended reference lines start from reference line 1, the area covered by reference line 0 can be used for template matching. The SAD cost on the template area shown can be calculated between the prediction (generated by the 50 combinations) and the reconstruction. The 20 combinations with the smallest SAD cost can be selected in ascending order to form the TMRL candidate list. Figure 9

[0106] For TMRL signaling, in an example, instead of directly encoding the reference line and the intra mode, the index of the TMRL candidate list can be encoded to indicate which combination of reference line and prediction mode is used to encode the current block.

[0107] Aspects of the disclosure describe template-based prediction methods, which include improvements to template-based intra mode coding. A set of methods for video and / or image compression including intra prediction mode coding is described in this disclosure. In an aspect, the intra mode coding includes intra prediction mode coding.

[0108] Video coding has been widely used in many applications. Various video coding standards such as H264, H265, H266 (or VVC), AV1, and AVS (Audio Video coding Standard, AVS) have been widely adopted. In an aspect, a video codec can include a plurality of modules including intra / inter prediction, transform coding, quantization, entropy coding, in-loop filtering, etc. Intra prediction can be one of the major modules and can include signaling processing methods (e.g., signaling processing methods) and neural network based methods.

[0109] ​As mentioned above, method A can include a template-based method that can determine an intra prediction mode for the current block, such as TIMD, DIMD, etc. Method B can include an intra mode coding method using MPM or an MPM list including MPM. For example, in method B, the intra prediction modes can include MPM and non-MPM including remaining intra prediction modes that are not MPM. In Figure 4 to Figure 5 An example of intra prediction modes including MPM used in method B is shown in

[0110] In the case of method A, in some examples, only one flag in the bitstream (e.g., method_A_flag (1001) in Figure 10 ) is used to indicate whether method A is enabled. When method A is enabled, the derived template-based intra mode can be used, and the corresponding intra prediction (e.g., intra prediction based on the derived template-based intra mode) can be performed to generate the prediction signal for the current block. For example, compared to the intra mode coding used in method B using MPM and non-MPM, the bits signaled in the bitstream can be greatly reduced when using method A. For example, more than 1 bit is used in method B to indicate the intra prediction mode, while only 1 bit (e.g., method_A_flag (1001) in Figure 10 ) is used in method A to indicate the intra prediction mode.

[0111] Since method A can use fewer bits to indicate the used intra prediction mode, method A can be placed before method B in syntax, as shown in Figure 10 . Figure 10 An example of a syntax table (1000) of method A and method B is shown. The syntax table (1000) can be part of a syntax structure.

[0112] If method A is selected, method B can not be used, for example, as indicated by the syntax element “return” in Figure 10 . Therefore, in the example shown in Figure 10 , method B can be used only when method A is not used. Syntax elements (1003) to (1005) are associated with method B. Without loss of generality, the template-derived intra modes in method A can be combined with other predictors (e.g., other template-derived intra modes with relatively small cost) that can be derived using method A, and the template-derived intra modes and other predictors can be referred to as template-derived intra modes. The descriptors in the syntax table (1000) are shown as examples. For example, the syntax can be coded with a context or equal probability.

[0113] In an aspect, when method A is not selected by the codec (e.g., such as the encoder can determine not to use method A in predicting the current block), the template-based intra mode (e.g., the template-based intra mode derived using method A, such as TIMD or DIMD) can be excluded from method B. In an example, when method A is not selected by the encoder, method A can be used to derive the template-based intra mode, such as described with reference to Figure 6 to Figure 7 The template-based intra mode in method A can use less bits to signal. In an example, the template-based intra mode having been evaluated and not selected by the encoder can indicate that the prediction signal derived according to the template-based intra mode can not be a good indicator of the current block. Thus, the probability of using the same template-based intra mode in method B can be relatively low, such as because method B can encode more bits than method A.

[0114] According to an aspect of the disclosure, when it is determined that method A is not enabled, the template-based intra mode derived in method A can be excluded in method B. In an example, an MPM list including MPMs is constructed in method B, and the template-based intra mode is excluded from the MPM list. In an example, the template-based intra mode is also excluded from non-MPMs.

[0115] In an example, multiple MPM lists, such as a primary MPM list and a secondary MPM list, can be constructed in method B, and the template-based intra mode is excluded from each of the multiple MPM lists and from non-MPMs.

[0116] In an aspect, method B is used by the encoder and the decoder, and method A is signaled as not being enabled (e.g., method_A_flag (1001) is zero). Method A (e.g., TIMD or DIMD) can be performed by the encoder and / or the decoder to derive the template-based intra mode (or at least one template-based intra mode). The template-based intra mode (or at least one template-based intra mode) can be excluded from method B.

[0117] In an example, at the encoder side, it can be determined that a first intra mode coding method (e.g., method A) using one of (i) TIMD and (ii) DIMD is not enabled for the current block. In an example, the first intra mode coding method includes the method A described above. The at least one template-based intra mode or the plurality of template-based intra modes can be determined with the first intra mode coding method (e.g., method A) using one of (i) TIMD and (ii) DIMD. When the at least one template-based intra mode is excluded from a second intra mode coding method (e.g., method B) based on the first intra mode coding method not being enabled for the current block, the intra prediction mode of the current block can be determined using the second intra mode coding method excluding the at least one template-based intra mode. The current block can be encoded in the bitstream using the intra prediction mode. A syntax element (e.g., method_A_flag (1001)) indicating that the first intra mode coding method using one of TIMD and DIMD is not enabled for the current block can be encoded in the bitstream.

[0118] In an example, at the decoder side, the coded information in the bitstream can be received. The coded information can indicate that a first intra mode coding method (e.g., method A) using one of (i) TIMD and (ii) DIMD is not enabled for the current block. The at least one template-based intra mode can be determined with the first intra mode coding method using one of TIMD and DIMD. When the at least one template-based intra mode is excluded from a second intra mode coding method (e.g., method B) based on the first intra mode coding method not being enabled for the current block, the intra prediction mode of the current block can be determined using the second intra mode coding method excluding the at least one template-based intra mode, and the current block can be reconstructed using the intra prediction mode.

[0119] In an aspect, the second intra mode coding method (e.g., method B) can code (e.g., encode) the intra prediction mode using a MPM list (e.g., the first MPM list) including MPMs. In an example, the at least one template-based intra mode is excluded from the second intra mode coding method (e.g., method B). The method B can include constructing (or creating) a MPM list (e.g., the first MPM list) from M intra prediction modes, the MPM list including N most probable modes (MPMs) of the current block excluding the at least one template-based intra mode. In an example, the MPM list (e.g., the first MPM list) of N MPMs is created from the M intra prediction modes according to a predefined creation method. In an example, M > N > 0. In an example, the number M and the M intra prediction modes can be determined based on a video coding standard. Refer to Figure 5The number M is 67, and the 67 intra-prediction modes include DC mode, planar mode, and 65 angular modes. In the example, the M intra-prediction modes include MPM and non-MPM, where non-MPM are the remaining intra-prediction modes not included in MPM. The MPM flag can be indicated by a signal (e.g., Figure 10 The method_B_flag (1003) shown indicates whether the intra-prediction mode of the current block (or the current coded block) is in an MPM list that includes N MPMs. If the intra-prediction mode of the current block is in the MPM list, it can be signaled, for example, by the list index indicated by the syntax element associated with method B (e.g., method_B_related_syntax) (1004). Otherwise, the intra-prediction mode can be encoded or decoded, for example, using the maximum value of (MN) in truncated binary code and can use the syntax element associated with method B (e.g., method_B_related_syntax) (1005).

[0120] In the example, the flags in the encoded information include, for example, the MPM flag (e.g., Figure 10 The `method_B_flag` (1003) shown indicates whether the intra-prediction mode of the current block is in the first MPM list of the current block. When the flag indicates that the intra-prediction mode of the current block is in the first MPM list of the current block, the intra-prediction mode of the current block can be determined based on an index (e.g., a list index) indicated by encoded information such as syntax elements (e.g., `method_B_related_syntax` (1004)). When the flag indicates that the intra-prediction mode of the current block is not in the first MPM list of the current block, the intra-prediction mode of the current block can be determined as one of the remaining intra-prediction modes among the M intra-prediction modes.

[0121] On one hand, method B can be performed as follows (e.g., an MPM-based and non-MPM-based encoding / decoding method using an MPM list). In the example, when at least one template-based intra-mode is included in an MPM list (e.g., an initial first MPM list) according to a predefined creation method, the MPM list (e.g., the initial first MPM list) can be modified such that at least one template-based intra-mode can be excluded from the MPM list, and thus the modified MPM list does not include at least one template-based intra-mode. The MPM list size can remain unchanged, and at least one template-based intra-mode can be filled (e.g., replaced) with other modes that are not at least one template-based intra-mode (e.g., other intra-prediction modes).

[0122] In an example, an initial first MPM list for the current block is constructed (or created) from the M intra prediction modes, and the initial first MPM list includes N of the M intra prediction modes. For each of the at least one template-based intra mode, when a respective one of the at least one template-based intra mode is included in the initial first MPM list for the current block, the respective one of the at least one template-based intra mode can be removed from the initial first MPM list for the current block, and an intra prediction mode from the remaining (M-N) of the M intra prediction modes can be added to the initial first MPM list to construct the first MPM list for the current block.

[0123] In an aspect, an MPM list (e.g., a first MPM list) for a current block can be pruned while the MPM list is being constructed. In an example, an MPM list (e.g., a first MPM list) for a current block can be constructed or created as follows. When a candidate intra prediction mode to be added to the first MPM list is one of the at least one template-based intra mode, the candidate intra prediction mode is not added to the MPM list (e.g., the first MPM list) for the current block. When the candidate intra prediction mode to be added to the first MPM list is not one of the at least one template-based intra mode, the candidate intra prediction mode is added to the MPM list (e.g., the first MPM list) for the current block.

[0124] In an example, when the at least one template-based intra mode is not within the MPM list according to the predefined creation method, the at least one template-based intra mode can also be excluded from the non-MPM modes and a maximum value of the non-MPM modes can be (M-N-T). A number of the at least one template-based intra mode is T. In an example, T > 0. In a case where T is 1, the maximum value of the non-MPM modes is (M-N-1).

[0125] In an aspect, method B can be adjusted. In addition to a first MPM list (also referred to as a primary MPM list or PMPM list), a second MPM list (also referred to as a secondary MPM list or SMPM list) can be introduced to include S candidates, e.g., S out of M intra prediction modes. In an example, M > S > 0. In an example, the PMPM list has 6 entries, and the SMPM list includes 16 entries. In an example, a general MPM list with 22 entries is first constructed, and then the first 6 entries in the general MPM list are included into the PMPM list, and the remaining entries form the SMPM list. The signaling of MPM indices (e.g., list indices and secondary MPM indices) and MPM flags (e.g., MPM flags and secondary MPM flags) can be similar to described above. If the MPM flag is false, the secondary MPM flag can be signaled to indicate whether the intra prediction mode is within the second MPM list. If the intra prediction mode is within the second MPM list, the secondary MPM index is signaled. Otherwise, if the intra prediction mode is not within the first MPM list and not within the second MPM list, the intra prediction mode can be encoded, e.g., using a truncated binary code with a maximum of (M-N-S).

[0126] In an example, a first flag in the coded information (e.g., the MPM flag, e.g., method_B_flag (1003) in Figure 10 indicates whether the intra prediction mode of the current block is in a first MPM list (or primary MPM list) of the current block. When a second flag (e.g., secondary MPM flag) in the coded information indicates that the intra prediction mode of the current block is in a second MPM list (or secondary MPM list) of the current block, the intra prediction mode of the current block can be determined based on an index (e.g., secondary MPM index) indicated by the coded information. When the second flag (e.g., secondary MPM flag) indicates that the intra prediction mode of the current block is not in the second MPM list of the current block, the intra prediction mode of the current block can be determined as one of the remaining intra prediction modes out of M intra prediction modes.

[0127] Method B based on MPM lists (e.g., including a PMPM list and a SMPM list) and non-MPMs can be modified as follows.

[0128] In an example, the pre-defined MPM list construction method is modified such that the at least one template-based intra mode is not added to the primary MPM list (or first MPM list) and is not added to the secondary MPM list (or second MPM list). The primary MPM list and the secondary MPM list size can remain unchanged, and the at least one template-based intra mode can be padded by other modes that are not the at least one template-based intra mode.

[0129] In an example, the second intra mode coding method (e.g., method B) includes constructing a second MPM list of the current block excluding the at least one template-based intra mode from the (M-N) intra prediction modes that are outside the first MPM list of M intra prediction modes. The second MPM list of the current block can include S intra prediction modes. The first MPM list of the current block can be constructed as follows. When a first candidate intra prediction mode to be added to the first MPM list is one of the at least one template-based intra mode, the first candidate intra prediction mode is not added to the first MPM list of the current block. When the first candidate intra prediction mode to be added to the first MPM list is not one of the at least one template-based intra mode, the first candidate intra prediction mode can be added to the first MPM list of the current block. The second MPM list of the current block can be constructed as follows. When a second candidate intra prediction mode to be added to the second MPM list is one of the at least one template-based intra mode, the second candidate intra prediction mode is not added to the second MPM list of the current block. When the second candidate intra prediction mode to be added to the second MPM list is not one of the at least one template-based intra mode, the second candidate intra prediction mode can be added to the second MPM list of the current block.

[0130] In an example, when the at least one template-based intra mode is not included in the primary MPM list and the secondary MPM list, the maximum value of excluding the at least one template-based intra mode from the non-MPM modes and coding (e.g., encoding) the non-MPM modes can be modified to (M-N-S-T), where T is the number of the at least one template-based intra mode. In a case where T is 1, the maximum value of coding (e.g., encoding) the non-MPM modes can be modified to (M-N-S-1).

[0131] In an example, the at least one template-based intra mode is not in the remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list and the second MPM list. The first MPM list of the current block includes N intra prediction modes of the M intra prediction modes. The number of the at least one template-based intra mode is T. The number of the remaining intra prediction modes is (M-N-S-T). The M intra prediction modes include the N intra prediction modes in the first MPM list, the S intra prediction modes in the second MPM list, the (M-N-S-T) remaining intra prediction modes, and the T at least one template-based intra mode.

[0132] In an aspect, the at least one template-based intra mode can be excluded from the second intra mode coding method (e.g., method B such as the MPM mode coding method) except in some specific positions (e.g., the first entry and the second entry of the MPM list (e.g., the first MPM list or the PMPM list)). If the at least one template-based intra prediction mode is in the first entry and / or the second entry of the MPM list, the at least one template-based intra prediction mode can be included in the MPM list. Since the MPM index or the primary MPM index (e.g., the list index associated with the first MPM list) is coded using the truncated Rice code, the first entry and the second entry of the MPM list can have relatively short codewords, and due to the context coding, the at least one template-based intra prediction mode can be selected if the at least one template-based intra prediction mode is placed in the first entry and / or the second entry of the MPM list (e.g., the PMPM list). Figure 11 An example of the codewords for the MPM index from 0 to 5 (e.g., the first vertical column) in Figure 11 An example of the codewords for the MPM index from 0 to 5 (e.g., the first vertical column) in Figure 11 An example of the codewords for the MPM index from 0 to 5 (e.g., the first vertical column) in

[0133] In an example, the second intra mode coding method (e.g., method B) can include constructing the MPM list of the current block from the M intra prediction modes by excluding the candidate intra prediction mode from the MPM list when the candidate intra prediction mode is one of the at least one template-based intra mode and the candidate intra prediction mode is added to the first entry and the second entry and the entries after the first entry and the second entry of the MPM list. Referring to Figure 11The indicated MPM list includes 6 MPMs. If the candidate intra prediction mode is placed at the first entry or the second entry of the MPM list, the candidate intra prediction mode is included in the MPM list. If the candidate intra prediction mode is placed at one of the third entry to the sixth entry of the MPM list, the candidate intra prediction mode is excluded in the MPM list.

[0134] In an aspect, the at least one template-based intra mode derived in method A can have more than one mode derived based on cost (e.g., SATD cost), such as the best mode and the second best mode, for example, as described with reference to Figure 6 to Figure 7 The exclusion of the at least one template-based intra mode can be extended for N best template-based intra modes determined using method A as described in the disclosure. The exclusion of the at least one template-based intra mode can be extended for N best template-based intra modes determined using method A as described in the disclosure.

[0135] Without loss of generality, the above-described mode exclusion method (e.g., MPM and non-MPM intra mode coding method) between template-based method A and method B can be applied between method A and another intra mode coding method C. In an example, the second intra mode coding method includes method B, method C, and the like. In an example, the syntax associated with method C can be placed after the syntax associated with method A. With reference to Figure 10 , the flag (e.g., method_B_flag) (1003) can be replaced by a flag indicating method C, and the syntax elements (1004) to (1005) associated with method B can be replaced by syntax elements associated with method C. In an example, the at least one template-based intra mode derived in method A can be excluded from method C. For example, the at least one template-based intra mode derived in method A can be used in method C when the signaling cost is still relatively low. In an example, method C is TMRL or a variation of TMRL.

[0136] Without loss of generality, the above-described mode exclusion method (e.g., MPM and non-MPM intra mode coding method) between template-based method A and method B can be applied between another template-based method D and method B. In an example, the template-based mode derivation used in method D is different from the template-based mode derivation used in method A, and the syntax elements associated with method D can be placed before the syntax elements associated with method B. With reference to Figure 10 , the syntax element (1002) can be associated with method D. In an example, the syntax element (1002) indicates whether method D is enabled for the current block.

[0137] Figure 12A flowchart showing an overview of a process (1200) in accordance with an aspect of the disclosure is shown. The process (1200) can be used in an apparatus such as a video decoder. In various aspects, the process (1200) is performed by processing circuitry, e.g., processing circuitry performing the functions of the video decoder (110), processing circuitry performing the functions of the video decoder (210), etc. In some aspects, the process (1200) is implemented in software instructions, so when processing circuitry executes the software instructions, the processing circuitry performs the process (1200). The process starts at (S1201) and proceeds to (S1210).

[0138] At (S1210), coded information in a bitstream is received. The coded information indicates that a first intra mode coding method (e.g., method A) using one of (i) TIMD and (ii) DIMD is not enabled for the current block.

[0139] At (S1220), at least one template-based intra mode can be determined with the first intra mode coding method using one of TIMD and DIMD.

[0140] At (S1230), when the at least one template-based intra mode is excluded from a second intra mode coding method (e.g., method B) based on the first intra mode coding method not being enabled for the current block, an intra prediction mode for the current block can be determined using the second intra mode coding method excluding the at least one template-based intra mode, and the current block can be reconstructed using the intra prediction mode.

[0141] In an example, the at least one template-based intra mode is excluded from the second intra mode coding method. The second intra mode coding method includes constructing a first MPM list for the current block from M intra prediction modes excluding the at least one template-based intra mode.

[0142] In an example, an initial first MPM list for the current block is constructed from M intra prediction modes. The initial first MPM list includes N intra prediction modes of the M intra prediction modes. For each of the at least one template-based intra mode, when a respective one of the at least one template-based intra mode is included in the initial first MPM list for the current block, the respective one of the at least one template-based intra mode can be removed from the initial first MPM list for the current block. Intra prediction modes from remaining (M-N) intra prediction modes of the M intra prediction modes can be added to the initial first MPM list to construct the first MPM list for the current block.

[0143] In an example, when the candidate intra prediction mode to be added to the first MPM list is one of the at least one template-based intra mode, the candidate intra prediction mode is not added to the first MPM list of the current block. When the candidate intra prediction mode to be added to the first MPM list is not one of the at least one template-based intra mode, the candidate intra prediction mode can be added to the first MPM list of the current block.

[0144] In an example, the at least one template-based intra mode is not among the remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list, the first MPM list of the current block includes N intra prediction modes of the M intra prediction modes, a number of the at least one template-based intra mode is T, a number of the remaining intra prediction modes is (M-N-T), and the M intra prediction modes include the N intra prediction modes in the first MPM list, the (M-N-T) remaining intra prediction modes, and the T at least one template-based intra mode.

[0145] Then, the process proceeds to (S1299) and terminates.

[0146] The process (1200) can be adjusted as appropriate. Steps in the process (1200) can be modified and / or omitted. Additional steps can be added. Any suitable implementation order can be used.

[0147] In an example, a flag in the coded information indicates whether the intra prediction mode of the current block is in the first MPM list of the current block. When the flag indicates that the intra prediction mode of the current block is in the first MPM list of the current block, the intra prediction mode of the current block can be determined based on an index indicated by the coded information. When the flag indicates that the intra prediction mode of the current block is not in the first MPM list of the current block, the intra prediction mode of the current block can be determined as one of the remaining intra prediction modes of the M intra prediction modes.

[0148] In an example, a second intra mode coding method includes constructing a second MPM list of (M-N) intra prediction modes other than a first MPM list of M intra prediction modes for a current block excluding at least one template-based intra mode. The second MPM list of the current block includes S intra prediction modes. Constructing the first MPM list of the current block includes not adding a first candidate intra prediction mode to the first MPM list of the current block when the first candidate intra prediction mode is one of the at least one template-based intra mode, and adding the first candidate intra prediction mode to the first MPM list of the current block when the first candidate intra prediction mode is not one of the at least one template-based intra mode. Constructing the second MPM list of the current block includes not adding a second candidate intra prediction mode to the second MPM list of the current block when the second candidate intra prediction mode is one of the at least one template-based intra mode, and adding the second candidate intra prediction mode to the second MPM list of the current block when the second candidate intra prediction mode is not one of the at least one template-based intra mode.

[0149] In an example, the at least one template-based intra mode is not in remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list and the second MPM list, the first MPM list of the current block includes N intra prediction modes of the M intra prediction modes, a number of the at least one template-based intra mode is T, a number of the remaining intra prediction modes is (M-N-S-T), and the M intra prediction modes include the N intra prediction modes in the first MPM list, the S intra prediction modes in the second MPM list, the (M-N-S-T) remaining intra prediction modes, and the T at least one template-based intra mode.

[0150] In an example, a first flag in the coded information indicates that the intra prediction mode of the current block is not in the first MPM list of the current block. When a second flag in the coded information indicates that the intra prediction mode of the current block is in the second MPM list of the current block, the intra prediction mode of the current block can be determined based on an index indicated by the coded information. When the second flag indicates that the intra prediction mode of the current block is not in the second MPM list of the current block, the intra prediction mode of the current block can be determined as one of remaining intra prediction modes of the M intra prediction modes.

[0151] In an example, the second intra mode coding method includes constructing a most probable mode (MPM) list for the current block from M intra prediction modes by excluding the candidate intra prediction mode from the MPM list when the candidate intra prediction mode is one of the at least one template-based intra mode and the candidate intra prediction mode is added to entries of the MPM list after the first and second entries.

[0152] In an example, the second intra mode coding method includes method B.

[0153] In an example, the second intra mode coding method includes the TMRL mode.

[0154] In an example, the method further includes determining whether to include the at least one template-based intra mode in the second intra mode coding method.

[0155] Figure 13 A flowchart showing an overview of a process (1300) in accordance with an aspect of the disclosure is shown. The process (1300) can be used in a video encoder. In aspects, the process (1300) is performed by processing circuitry, such as processing circuitry performing the functions of the video encoder (103), processing circuitry performing the functions of the video encoder (303), and the like. In some aspects, the process (1300) is implemented in software instructions, thus when the processing circuitry executes the software instructions, the processing circuitry performs the process (1300). The process starts at (S1301) and proceeds to (S1310).

[0156] At (S1310), a determination can be made that a first intra mode coding method using one of (i) TIMD and (ii) DIMD is not enabled for the current block.

[0157] At (S1320), the at least one template-based intra mode can be determined with the first intra mode coding method using one of (i) TIMD and (ii) DIMD.

[0158] At (S1330), when the at least one template-based intra mode is excluded from the second intra mode coding method based on the first intra mode coding method not being enabled for the current block, an intra prediction mode for the current block can be determined using the second intra mode coding method excluding the at least one template-based intra mode, and the current block can be encoded in the bitstream using the intra prediction mode.

[0159] At (S1340), a syntax element indicating that the first intra mode coding method using one of TIMD and DIMD is not enabled for the current block can be encoded in the bitstream.

[0160] Then, the process proceeds to (S1399) and terminates.

[0161] The process (1300) can be adjusted as appropriate. Steps in the process (1300) can be modified and / or omitted. Additional steps can be added. Any suitable implementation order can be used.

[0162] In an example, at least one template-based intra mode is excluded from a second intra coding method. The second intra coding method includes constructing a first most probable mode (MPM) list for a current block from M intra prediction modes excluding the at least one template-based intra mode.

[0163] In an example, constructing the first MPM list for the current block includes constructing an initial first MPM list for the current block from the M intra prediction modes. The initial first MPM list includes N intra prediction modes of the M intra prediction modes. For each of the at least one template-based intra mode, when a respective one of the at least one template-based intra mode is included in the initial first MPM list for the current block, the respective one of the at least one template-based intra mode can be removed from the initial first MPM list for the current block. Intra prediction modes from remaining (M-N) intra prediction modes of the M intra prediction modes can be added to the initial first MPM list to construct the first MPM list for the current block.

[0164] In an example, constructing the first MPM list for the current block includes not adding a candidate intra prediction mode to the first MPM list for the current block when the candidate intra prediction mode is one of the at least one template-based intra mode, and adding the candidate intra prediction mode to the first MPM list for the current block when the candidate intra prediction mode is not one of the at least one template-based intra mode.

[0165] In an example, the at least one template-based intra mode is not among remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list, the first MPM list for the current block includes N intra prediction modes of the M intra prediction modes, a number of the at least one template-based intra mode is T, a number of the remaining intra prediction modes is (M-N-T), and the M intra prediction modes include the N intra prediction modes in the first MPM list, the (M-N-T) remaining intra prediction modes, and the T at least one template-based intra mode.

[0166] In an example, the second intra mode coding method includes constructing a second MPM list for the current block from the M intra prediction modes excluding the (M-N) intra prediction modes outside the first MPM list, excluding the at least one template-based intra mode. The second MPM list for the current block includes S intra prediction modes. Constructing the first MPM list for the current block includes: when a first candidate intra prediction mode to be added to the first MPM list is one of the at least one template-based intra mode, not adding the first candidate intra prediction mode to the first MPM list for the current block; and when the first candidate intra prediction mode to be added to the first MPM list is not one of the at least one template-based intra mode, adding the first candidate intra prediction mode to the first MPM list for the current block. Constructing the second MPM list for the current block includes: when a second candidate intra prediction mode to be added to the second MPM list is one of the at least one template-based intra mode, not adding the second candidate intra prediction mode to the second MPM list for the current block; and when the second candidate intra prediction mode to be added to the second MPM list is not one of the at least one template-based intra mode, adding the second candidate intra prediction mode to the second MPM list for the current block.

[0167] In an example, the second intra mode coding method includes constructing a most probable mode (MPM) list for the current block from the M intra prediction modes by excluding a candidate intra prediction mode from the MPM list when the candidate intra prediction mode is one of the at least one template-based intra mode and the candidate intra prediction mode is added to an entry of the MPM list after a first entry and a second entry.

[0168] Although the decoding and encoding processes are provided in separate flowcharts for purposes of description, it should be noted that aspects of the decoding and encoding processes can be used in combination. For example, a decoding process such as described in process (1200) can be combined with all or a portion of process (1300). In another example, an encoding process such as described in process (1300) can be combined with process (1200).

[0169] In an aspect, a method of processing visual media data is disclosed. The method includes processing a bitstream of visual media data according to a format rule. The bitstream includes a syntax element indicating a first intra mode coding method for a current block that does not enable use of one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD). The format rule specifies that at least one template-based intra mode is determined with the first intra mode coding method that uses one of TIMD and DIMD; and when the at least one template-based intra mode is excluded from a second intra mode coding method based on the first intra mode coding method not being enabled for the current block, an intra prediction mode for the current block is determined using the second intra mode coding method that excludes the at least one template-based intra mode, and the current block is processed using the intra prediction mode.

[0170] Aspects and / or examples in the present disclosure can be used alone or in any combination. For example, some aspects and / or examples performed by a decoder can be performed by an encoder, and some aspects and / or examples performed by an encoder can be performed by a decoder. Each of the methods, aspects, examples, encoders, and decoders can be implemented by processing circuitry (e.g., one or more processors or one or more integrated circuits). In one example, one or more processors execute programs stored in a non-transitory computer-readable medium.

[0171] The techniques described above, can be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. For example, Figure 14 A computer system (1400) suitable for implementing certain aspects of the disclosed subject matter is shown.

[0172] Computer software can be coded using any suitable machine code or computer language that can be subject to assembly, compilation, linking, or the like, and executed by one or more computers in combination with one or more operating systems.

[0173] The instructions can be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, internet of things devices, and the like.

[0174] Figure 14The components shown in FIG. 14 for computer system (1400) are examples and are not intended to suggest any limitation as to the scope of use or functionality of the computer software implementing aspects of the present disclosure. Neither should the configuration of components be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the exemplary aspects of a computer system (1400).

[0175] Computer system (1400) can include certain human interface input devices. Such a human interface input device can be responsive to input by one or more people under control of the computer system software. The input can be user data, or control signals. Such

[0176] Input human interface devices can include one or more of: a keyboard (1401), a mouse (1402), a touchpad (1403), a touchscreen (1410), a data glove (not shown), a joystick (1405), a microphone (1406), a scanner (1407), or a camera (1408).

[0177] Computer system (1400) can also include certain human interface output devices. Such human interface output devices can be stimulating one or more of the human senses of sight, touch, taste, smell, and hearing. For example, such human interface output devices can transform information from the computer system into form(s) suitable for one or more human sense(s). Such human interface output devices can include a tactile output device (e.g., a vibration from a haptic feedback device, but there can also be other tactile output devices that do not involve use of the sense of touch by the computer system operator, such as audio output devices that create sound which can be perceived by the sense of hearing); an audio output device (e.g., speakers (1409), headphones (not depicted), but there can also be audio output devices that do not involve use of the sense of hearing by the computer system operator, such as electronic tactile feedback devices that create vibrations which can be perceived by the sense of touch); a video output device (e.g., a display screen (1410), such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), a plasma display, an Organic Light-Emitting Diode (OLED) display, each with or without touch input capability, each with or without tactile feedback capability— some of which can be capable of outputting two dimensional visual output or more than three dimensional output through means such as stereographic output; virtual-reality glasses; holographic displays; and smoke or fog machines); and a printer (not depicted).

[0178] The computer system (1400) can also include human accessible storage devices and their associated media such as optical media including CD / DVD ROM / RW (1420) with CD / DVD (1421), a thumb-drive (1422), a removable hard drive or solid state drive (1423), a conventional magnetic hard drive (not depicted), specialized ROM / ASIC / PLD (Programable Logic Device) based devices such as security dongles (not depicted), and the like.

[0179] Those skilled in the art will further appreciate that the term "computer-readable medium" as used in connection with the presently disclosed subject matter does not encompass transitory signals per se.

[0180] The computer system (1400) can also include an interface (1454) to one or more communication networks (1455). Networks can for example be wireless, wireline, optical. Networks can further be local, wide-area, metropolitan, vehicular and industrial, real-time, delay-tolerant, and so on. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks to include GSM, 3G, 4G, 5G, LTE and the like, TV wireline or wireless, cable TV, fiber optic networks, enterprise networks and so on. Certain networks commonly require various

[0181] The previously mentioned human interface devices, human-accessible storage devices, and network interfaces can be attached to the core (1440) of the computer system (1400).

[0182] The core (1440) can include one or more Central Processing Units (CPU) (1441), Graphics Processing Units (GPU) (1442), specialized programmable processing units in the form of Field Programmable Gate Areas (FPGA) (1443), hardware accelerators for certain tasks (1444), a

[0183] The CPU (1441), GPU (1442), FPGA (1443), and accelerators (1444) can execute certain instructions that, in combination, can constitute the aforementioned computer code. That computer code can be stored in ROM (1445) or RAM (1446). Transitional data can be also stored in RAM (1446), whereas permanent data can be stored for example, in the internal mass storage (1447). Fast storage and retrieval can be enabled through the use of cache memory, which can be closely associated with one or more CPU (1441), GPU (1442), mass storage (1447), ROM (1445), RAM (1446), etc.

[0184] The computer software can be implemented as computer code that is stored in a computer-readable medium during execution. The computer-readable medium can include non- transitory computer-readable media that stores computer code that, when executed by one or more processors, works in confidence to carry out various operations described herein. The non-transitory computer-readable medium can include, but is not limited to, random access memory (RAM), flash memory, readonly memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, DVDs, CD-ROMs, and any other volatile or non-volatile storage medium that stores computer code used to carry out various operations described herein.

[0185] By way of example, and not limitation, a computer system (1400) having architecture, and specifically the core (1440) can provide functionality as a result of processor(s) (including CPUs, GPUs, FPGA, accelerators, and the like) executing software embodied in one or more tangible, computer-readable media. Such computer-readable media can be media associated with user-accessible mass storage as introduced above, as well as certain storage of the core (1440) that does not require, at least temporarily, media to be user- accessible, such as memory (1446) or ROM (1445). Software can provide functionality for implementing aspects of the present disclosure. The computer-readable media, or computer-readable storage media, can include one or more of volatile memory, non-volatile memory, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store information for access by a computer.

[0186] The use of “at least one” or “one or more” of A, B or C, and the like, herein is meant to include at least one, but also one, two, three or four or more; for example, the phrase “at least one of A, B or C” means A or B or C or any combination thereof. The use of “at least one of A, B and C,” “at least one of A, B or C,” “one or more of A, B or C,” and the like, includes A or B or C or any combination thereof.

[0187] While several examples of aspects have been described, various modifications, substitutions, changes and equivalents can be used and are also encompassed by the disclosure. Hence, it is intended that the disclosure is not limited by the examples described herein, but covers any and all modifications and equivalents within the scope of the disclosure. Accordingly, many modifications can be made by those skilled in the art without departing from the spirit and scope of the disclosure.

[0188] The above disclosure also encompasses the features described below. The features can be combined in various ways and are not limited to the combinations described below.

[0189] (1) A method for video decoding, the method comprising: receiving coded information in a bitstream, the coded information indicating that a first intra mode coding method is not enabled for a current block, the first intra mode coding method using one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD); determining at least one template-based intra mode with the first intra mode coding method using one of the TIMD and the DIMD; and when the at least one template-based intra mode is excluded from a second intra mode coding method based on the first intra mode coding method not being enabled for the current block, determining an intra prediction mode for the current block using the second intra mode coding method excluding the at least one template-based intra mode, and reconstructing the current block using the intra prediction mode.

[0190] (2) The method of feature (1), wherein the at least one template-based intra mode is excluded from the second intra mode coding method; and the second intra mode coding method comprises constructing a first most probable mode (MPM) list for the current block excluding the at least one template-based intra mode from M intra prediction modes.

[0191] (3) The method of feature (2), wherein constructing the first MPM list for the current block comprises: constructing an initial first MPM list for the current block from the M intra prediction modes, the initial first MPM list including N intra prediction modes of the M intra prediction modes; for each of the at least one template-based intra mode, when a respective one of the at least one template-based intra mode is included in the initial first MPM list for the current block, removing the respective one of the at least one template-based intra mode from the initial first MPM list for the current block; and adding intra prediction modes from remaining (M-N) intra prediction modes of the M intra prediction modes to the initial first MPM list to construct the first MPM list for the current block.

[0192] (4) The method according to feature (2), wherein constructing the first MPM list for the current block comprises: when a candidate intra prediction mode to be added to the first MPM list is one of the at least one template-based intra mode, not adding the candidate intra prediction mode to the first MPM list for the current block; and when the candidate intra prediction mode to be added to the first MPM list is not one of the at least one template-based intra mode, adding the candidate intra prediction mode to the first MPM list for the current block.

[0193] (5) The method according to feature (2), wherein the at least one template-based intra mode is not among remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list, the first MPM list for the current block includes N intra prediction modes of the M intra prediction modes, a number of the at least one template-based intra mode is T, a number of the remaining intra prediction modes is (M-N-T), and the M intra prediction modes include the N intra prediction modes in the first MPM list, the (M-N-T) remaining intra prediction modes, and the T at least one template-based intra mode.

[0194] (6) The method according to any one of features (1) to (5), wherein a flag in the coded information indicates whether the intra prediction mode for the current block is in the first MPM list for the current block; when the flag indicates that the intra prediction mode for the current block is in the first MPM list for the current block, determining the intra prediction mode for the current block based on an index indicated by the coded information; and when the flag indicates that the intra prediction mode for the current block is not in the first MPM list for the current block, determining the intra prediction mode for the current block as one of remaining intra prediction modes of the M intra prediction modes.

[0195] (7) The method according to any one of features (2) and (4) to (6), wherein the second intra mode coding method comprises constructing a second MPM list of the current block excluding the at least one template-based intra mode from the (M-N) intra prediction modes other than the first MPM list of the M intra prediction modes, the second MPM list of the current block comprising S intra prediction modes; constructing the first MPM list of the current block comprises not adding a first candidate intra prediction mode to be added to the first MPM list of the current block when the first candidate intra prediction mode is one of the at least one template-based intra mode, and adding the first candidate intra prediction mode to the first MPM list of the current block when the first candidate intra prediction mode is not one of the at least one template-based intra mode; and constructing the second MPM list of the current block comprises not adding a second candidate intra prediction mode to be added to the second MPM list of the current block when the second candidate intra prediction mode is one of the at least one template-based intra mode, and adding the second candidate intra prediction mode to the second MPM list of the current block when the second candidate intra prediction mode is not one of the at least one template-based intra mode.

[0196] (8) The method according to feature (7), wherein the at least one template-based intra mode is not among remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list and the second MPM list, the first MPM list of the current block comprising N intra prediction modes of the M intra prediction modes, a number of the at least one template-based intra mode being T, a number of the remaining intra prediction modes being (M-N-S-T), and the M intra prediction modes comprising the N intra prediction modes in the first MPM list, the S intra prediction modes in the second MPM list, (M-N-S-T) remaining intra prediction modes, and T at least one template-based intra mode.

[0197] (9) The method of feature (7), wherein a first flag in the coded information indicates that the intra prediction mode of the current block is not in the first MPM list of the current block, the intra prediction mode of the current block is determined based on an index indicated by the coded information when a second flag in the coded information indicates that the intra prediction mode of the current block is in the second MPM list of the current block, and the intra prediction mode of the current block is determined to be one of the remaining intra prediction modes in the M intra prediction modes when the second flag indicates that the intra prediction mode of the current block is not in the second MPM list of the current block.

[0198] (10) The method of feature (1), wherein the second intra mode coding method comprises constructing a most probable mode (MPM) list for the current block from M intra prediction modes by excluding a candidate intra prediction mode from the MPM list when the candidate intra prediction mode is one of the at least one template-based intra mode and the candidate intra prediction mode is added to an entry after a first entry and a second entry of the MPM list.

[0199] (11) The method of feature (1), wherein the second intra mode coding method comprises a template-based multi-reference line intra prediction (TMRL) mode.

[0200] (12) The method of any of features (1) to (11), wherein the method further comprises determining whether to include the at least one template-based intra mode in the second intra mode coding method.

[0201] (13) A method for video encoding, the method comprising: determining that a first intra mode coding method is not enabled for a current block, the first intra mode coding method using one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD); determining at least one template-based intra mode with the first intra mode coding method using one of (i) the TIMD and (ii) the DIMD; when the at least one template-based intra mode is excluded from a second intra mode coding method based on the first intra mode coding method not being enabled for the current block, determining an intra prediction mode of the current block with the second intra mode coding method excluding the at least one template-based intra mode, and encoding the current block in a bitstream using the intra prediction mode; and encoding a syntax element in the bitstream indicating that the first intra mode coding method using one of the TIMD and the DIMD is not enabled for the current block.

[0202] (14) The method of feature (13), wherein the at least one template-based intra mode is excluded from the second intra mode coding method; and the second intra mode coding method comprises constructing a first most probable mode (MPM) list for the current block from M intra prediction modes excluding the at least one template-based intra mode.

[0203] (15) The method of feature (14), wherein constructing the first MPM list for the current block comprises constructing an initial first MPM list for the current block from the M intra prediction modes, the initial first MPM list including N intra prediction modes of the M intra prediction modes; for each of the at least one template-based intra mode, when a respective one of the at least one template-based intra mode is included in the initial first MPM list for the current block, removing the respective one of the at least one template-based intra mode from the initial first MPM list for the current block; and adding intra prediction modes from remaining (M-N) intra prediction modes of the M intra prediction modes to the initial first MPM list to construct the first MPM list for the current block.

[0204] (16) The method of feature (14), wherein constructing the first MPM list for the current block comprises not adding a candidate intra prediction mode to the first MPM list for the current block when the candidate intra prediction mode is one of the at least one template-based intra mode; and adding the candidate intra prediction mode to the first MPM list for the current block when the candidate intra prediction mode is not one of the at least one template-based intra mode.

[0205] (17) The method of feature (14), wherein the at least one template-based intra mode is not among remaining intra prediction modes of the M intra prediction modes that are not included in the first MPM list, the first MPM list for the current block including N intra prediction modes of the M intra prediction modes, a number of the at least one template-based intra mode being T, a number of the remaining intra prediction modes being (M-N-T), and the M intra prediction modes including the N intra prediction modes in the first MPM list, (M-N-T) remaining intra prediction modes, and T at least one template-based intra mode.

[0206] (18) The method of feature (14), wherein the second intra mode coding method comprises constructing a second MPM list for the current block excluding the at least one template-based intra mode from (M-N) intra prediction modes other than the first MPM list of the M intra prediction modes, the second MPM list for the current block including S intra prediction modes; constructing the first MPM list for the current block comprises not adding a first candidate intra prediction mode to be added to the first MPM list to the first MPM list for the current block when the first candidate intra prediction mode is one of the at least one template-based intra mode, and adding the first candidate intra prediction mode to the first MPM list for the current block when the first candidate intra prediction mode is not one of the at least one template-based intra mode; and constructing the second MPM list for the current block comprises not adding a second candidate intra prediction mode to be added to the second MPM list to the second MPM list for the current block when the second candidate intra prediction mode is one of the at least one template-based intra mode, and adding the second candidate intra prediction mode to the second MPM list for the current block when the second candidate intra prediction mode is not one of the at least one template-based intra mode.

[0207] (19) The method of feature (13), wherein the second intra mode coding method comprises constructing a most probable mode (MPM) list for the current block from M intra prediction modes by excluding a candidate intra prediction mode from the MPM list when the candidate intra prediction mode is one of the at least one template-based intra mode and the candidate intra prediction mode is added to an entry of the MPM list after a first entry and a second entry.

[0208] (20) A method of processing visual media data, the method comprising processing a bitstream of the visual media data according to a format rule. The bitstream comprises a syntax element indicating that a first intra mode coding method is not enabled for a current block, the first intra mode coding method using one of (i) template-based intra prediction mode derivation (TIMD) and (ii) decoder-side intra mode derivation (DIMD). The format rule specifies that at least one template-based intra mode is determined with the first intra mode coding method using one of the TIMD and the DIMD; and when the at least one template-based intra mode is excluded from a second intra mode coding method based on the first intra mode coding method not being enabled for the current block, an intra prediction mode of the current block is determined using the second intra mode coding method excluding the at least one template-based intra mode, and the current block is processed using the intra prediction mode.

[0209] (21) An apparatus for video decoding comprising processing circuitry configured to perform the method according to any of features (1) to (12).

[0210] (22) An apparatus for video encoding comprising processing circuitry configured to perform the method according to any of features (13) to (19).

[0211] (23) A non-transitory computer-readable storage medium storing instructions that, when executed by at least one processor, cause the at least one processor to perform the method according to any of features (1) to (19).

Claims

1. A method for video decoding, the method comprising: Receive encoded information in the bit stream, the encoded information indicating that a first intra-frame mode coding and decoding method is not enabled for the current block, the first intra-frame mode coding and decoding method using one of (i) template-based intra-frame prediction mode derivation (TIMD) and (ii) decoder-side intra-frame mode derivation (DIMD); At least one template-based intra-frame mode is determined using the first intra-frame mode encoding / decoding method that uses one of the TIMD and the DIMD. as well as When at least one template-based intra-mode is excluded from the second intra-mode coding / decoding method because the first intra-mode coding / decoding method is not enabled for the current block, The intra-mode encoding / decoding method that excludes at least one template-based intra-mode is used to determine the intra-prediction mode of the current block, and The current block is reconstructed using the intra-frame prediction mode.

2. The method according to claim 1, wherein, Exclude the at least one template-based intra-frame mode from the second intra-frame mode encoding / decoding method; and The second intra-frame mode encoding / decoding method includes constructing a first most probable mode (MPM) list for the current block that excludes at least one template-based intra-frame mode from M intra-frame prediction modes.

3. The method according to claim 2, wherein, The first MPM list for constructing the current block includes: An initial first MPM list for the current block is constructed from the M intra-prediction modes, the initial first MPM list including N intra-prediction modes from the M intra-prediction modes; For each of the at least one template-based intra-frame mode, When a corresponding one of the at least one template-based intra-modes is included in the initial first MPM list of the current block, the corresponding one of the at least one template-based intra-modes is removed from the initial first MPM list of the current block; and The remaining (MN) intra-prediction modes from the M intra-prediction modes are added to the initial first MPM list to construct the first MPM list for the current block.

4. The method according to claim 2, wherein, The first MPM list for constructing the current block includes: When a candidate intra-prediction mode to be added to the first MPM list is one of the at least one template-based intra-prediction modes, the candidate intra-prediction mode is not added to the first MPM list of the current block; and When the candidate intra-prediction mode to be added to the first MPM list is not one of the at least one template-based intra-prediction modes, the candidate intra-prediction mode is added to the first MPM list of the current block.

5. The method according to claim 2, wherein, The at least one template-based intra-mode is not among the remaining intra-modes not included in the first MPM list of the M intra-modes. The first MPM list of the current block includes N intra-modes from the M intra-modes. The number of the at least one template-based intra-mode is T. The number of the remaining intra-modes is (MNT). The M intra-modes include the N intra-modes in the first MPM list, (MNT) remaining intra-modes, and T at least one template-based intra-mode.

6. The method according to claim 2, wherein, The flag in the encoded information indicates whether the intra-prediction mode of the current block is in the first MPM list of the current block; When the flag indicates that the intra-prediction mode of the current block is in the first MPM list of the current block, the intra-prediction mode of the current block is determined based on the index indicated by the encoded information; and When the flag indicates that the intra-prediction mode of the current block is not in the first MPM list of the current block, the intra-prediction mode of the current block is determined as one of the remaining intra-prediction modes among the M intra-prediction modes.

7. The method according to claim 2, wherein, The second intra-frame mode encoding / decoding method includes: constructing a second MPM list for the current block that excludes at least one template-based intra-frame mode from (MN) intra-frame prediction modes outside the first MPM list from the M intra-frame prediction modes, wherein the second MPM list for the current block includes S intra-frame prediction modes; The first MPM list for constructing the current block includes: When the first candidate intra-prediction mode to be added to the first MPM list is one of the at least one template-based intra-prediction modes, the first candidate intra-prediction mode is not added to the first MPM list of the current block; and When the first candidate intra-prediction mode to be added to the first MPM list is not one of the at least one template-based intra-prediction modes, the first candidate intra-prediction mode is added to the first MPM list of the current block; and Constructing the second MPM list for the current block includes: When the second candidate intra-prediction mode to be added to the second MPM list is one of the at least one template-based intra-prediction modes, the second candidate intra-prediction mode is not added to the second MPM list of the current block; and When the second candidate intra-prediction mode to be added to the second MPM list is not one of the at least one template-based intra-prediction modes, the second candidate intra-prediction mode is added to the second MPM list of the current block.

8. The method according to claim 7, wherein, The at least one template-based intra-mode is not among the remaining intra-modes in the M intra-prediction modes that are not included in the first MPM list and the second MPM list. The first MPM list of the current block includes N intra-prediction modes from the M intra-prediction modes. The number of the at least one template-based intra-mode is T, the number of the remaining intra-prediction modes is (MNST), and the M intra-prediction modes include the N intra-prediction modes in the first MPM list, the S intra-prediction modes in the second MPM list, (MNST) remaining intra-prediction modes, and T at least one template-based intra-mode.

9. The method according to claim 7, wherein, The first flag in the encoded information indicates that the intra-prediction mode of the current block is not in the first MPM list of the current block. When the second flag in the encoded information indicates that the intra-prediction mode of the current block is in the second MPM list of the current block, the intra-prediction mode of the current block is determined based on the index indicated by the encoded information. and When the second flag indicates that the intra-prediction mode of the current block is not in the second MPM list of the current block, the intra-prediction mode of the current block is determined as one of the remaining intra-prediction modes among the M intra-prediction modes.

10. The method according to claim 1, wherein, The second intra-frame mode encoding / decoding method includes constructing a list of most probable modes (MPMs) for the current block from M intra-frame prediction modes as follows: When a candidate intra-prediction mode is one of the at least one template-based intra-prediction modes and the candidate intra-prediction mode is added to an entry after the first and second entries of the MPM list, the candidate intra-prediction mode is excluded from the MPM list.

11. The method according to claim 1, wherein, The second intra-frame mode encoding and decoding method includes a template-based multi-reference line intra-frame prediction (TMRL) mode.

12. The method according to claim 1, wherein, The method further includes determining whether the at least one template-based intra-frame mode is included in the second intra-frame mode encoding / decoding method.

13. A method for video encoding, the method comprising: It is determined that the first intra-frame mode coding method is not enabled for the current block, and the first intra-frame mode coding method uses one of (i) template-based intra-frame prediction mode derivation (TIMD) and (ii) decoder-side intra-frame mode derivation (DIMD). At least one template-based intra-frame mode is determined using the first intra-frame mode encoding / decoding method that uses one of (i) the TIMD and (ii) the DIMD; When at least one template-based intra-mode is excluded from the second intra-mode coding / decoding method because the first intra-mode coding / decoding method is not enabled for the current block, The intra-mode encoding / decoding method that excludes at least one template-based intra-mode is used to determine the intra-prediction mode of the current block, and The current block is encoded in the bitstream using the intra-frame prediction mode; as well as Syntax elements indicating that the first intra-frame mode encoding / decoding method, which uses either TIMD or DIMD, is not enabled for the current block are encoded in the bitstream.

14. The method according to claim 13, wherein, Exclude the at least one template-based intra-frame mode from the second intra-frame mode encoding / decoding method; and The second intra-frame mode encoding / decoding method includes constructing a first most probable mode (MPM) list for the current block that excludes at least one template-based intra-frame mode from M intra-frame prediction modes.

15. A method for processing visual media data, the method comprising: The bitstream of the visual media data is processed according to format rules, wherein... The bitstream includes syntax elements indicating that a first intra-frame mode coding / decoding method is not enabled for the current block, the first intra-frame mode coding / decoding method using one of (i) template-based intra-frame prediction mode derivation (TIMD) and (ii) decoder-side intra-frame mode derivation (DIMD); and The formatting rules specify: At least one template-based intra-frame mode is determined using the first intra-frame mode encoding / decoding method employing one of the TIMD and DIMD; and When at least one template-based intra mode is excluded from the second intra mode coding method based on the fact that the first intra mode coding method is not enabled for the current block, the second intra mode coding method that excludes the at least one template-based intra mode is used to determine the intra prediction mode of the current block, and the current block is processed using the intra prediction mode.