Video coding method and apparatus

By introducing an intra-frame merging and merging mode in video encoding and decoding, a merging candidate list is constructed using information from previous encoding and decoding blocks, and the candidate costs are calculated and sorted. This solves the problem of high complexity in the inheritance of information in intra-frame prediction modes, and improves encoding and decoding efficiency and video quality.

CN123147146APending Publication Date: 2026-11-20MEDIATEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580029570.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-23
Filing Date
2025-04-22
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In existing video coding and decoding technologies, intra-frame prediction mode inherits information with high complexity and low coding and decoding efficiency, making it difficult to effectively utilize information from previous coding and decoding blocks for efficient prediction.

Method used

A novel intra-frame hybrid merging mode is proposed. By constructing a merging candidate list, including spatially adjacent, non-adjacent, historical, and temporal candidates, the prediction data of the current block is generated using the target intra-frame mode. The candidate cost is calculated and reordered. The optimal prediction mode is determined based on spatial distance and template matching methods.

Benefits of technology

It improves the encoding and decoding efficiency of intra-frame prediction, reduces the complexity of inherited information, and enhances the performance of video encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123147146A_ABST
    Figure CN123147146A_ABST
Patent Text Reader

Abstract

The present disclosure provides video coding methods and apparatuses. The method includes receiving input data associated with a current block of a current picture of a video; constructing a merge candidate list for the current block, wherein the merge candidate list contains a plurality of candidates, each candidate containing inherited information inherited from a previously coded block and matching a target intra mode; calculating a cost for each candidate; reordering the plurality of candidates according to the corresponding cost to form a reordered merge candidate list; deciding one or more target candidates from the reordered merge candidate list; generating prediction data for the current block based on the inherited information of the one or more target candidates; and encoding or decoding the current block based on the prediction data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Related citations This invention is a non-provisional application of U.S. Provisional Patent Application No. 63 / 637,410 (filed April 23, 2024), and claims priority thereto. The aforementioned U.S. Provisional Patent Application is incorporated herein by reference in its entirety. Technical Field

[0002] This invention relates to the field of video encoding and decoding technology, specifically to a video encoding and decoding method and apparatus. Background Technology

[0003] Unless otherwise stated herein, the methods described in this section are not prior art within the scope of the following patent applications and are not considered prior art by virtue of their inclusion in this section.

[0004] High-efficiency Video Coding (HEVC) is an international video codec standard developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is based on a hybrid block motion-compensated DCT transform codec architecture. The basic unit of compression is called a coding unit (CU), which is a 2Nx2N pixel block. Each CU can be recursively divided into four smaller CUs until a predetermined minimum size is reached. Each CU contains one or more prediction units (PUs).

[0005] Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11. The input video signal is predicted based on the reconstructed signal, which originates from already encoded (or decoded) image regions. The prediction residual signal is processed through block transform. The transform coefficients are quantized and entropy-encoded along with other auxiliary information in the bitstream. The reconstructed signal is generated by inverse transforming the inverse-quantized transform coefficients of the prediction signal and the reconstructed residual signal. The reconstructed signal is further processed by loop filtering to eliminate encoding / decoding artifacts. The decoded image is stored in the frame buffer and used to predict future images in the input video signal.

[0006] In VVC, the encoded and decoded image is divided into non-overlapping block regions represented by associated coding tree units (CTUs). The leaf nodes of the coding tree correspond to coding units (CUs). The encoded and decoded image can be represented by a set of segments, each containing an integer number of CTUs. The individual CTUs within a segment are processed sequentially in raster scan. Bidirectional prediction (B) segments can be decoded using either intra-frame prediction or inter-frame prediction, using at most two motion vectors (MVs) and a reference index to predict the sample value for each block. Predictive (P) segments are decoded using either intra-frame prediction or inter-frame prediction, using at most one motion vector and a reference index to predict the sample value for each block. Intra-frame (I) segments are decoded using only intra-frame prediction.

[0007] By using a quadtree (QT) with a nested multi-type-tree (MTT) structure, the CTU is divided into one or more non-overlapping codec units (CUs) to accommodate various local motion and texture characteristics. A CU can be further divided into smaller CUs using one of five partitioning types: quadtree partitioning, vertical binary tree partitioning, horizontal binary tree partitioning, vertical ternary tree partitioning, and horizontal ternary tree partitioning.

[0008] Each CU contains one or more prediction units (PUs). A prediction unit, along with its associated CU syntax, serves as the basic unit for conveying prediction sub-information. The specified prediction process is used to predict the values ​​of associated pixel samples within a PU. Each CU may contain one or more transform units (TUs) representing prediction residual blocks. A transform unit (TU) consists of a transform block (TB) of one luma sample and / or two corresponding transform blocks of two chroma samples, with each TB corresponding to a residual sample block for one color component. Integer transforms are applied to the transform blocks. The level values ​​of the quantization coefficients, along with other auxiliary information, are entropy-encoded in the bitstream. The terms "code-decode tree block (CTB), code-decode block (CB), prediction block (PB), and transform block (TB)" are defined to specify two-dimensional sample arrays of a single color component associated with a CTU, CU, PU, ​​and TU, respectively. Therefore, a CTU consists of one luma CTB, two chroma CTBs, and / or associated syntax elements. Similar relationships apply to CUs, PUs, and TUs.

[0009] Figure 1AAn exemplary apparatus or system for video encoding / decoding is shown. The apparatus is configurable for inter-frame / intra-frame video encoding / decoding and may include loop processing. For intra-frame prediction, prediction data is derived based on previously encoded video data in the current frame. For inter-frame prediction 112, motion estimation (ME) is performed on the encoder side, and motion compensation (MC) is performed based on the results of ME to provide prediction data derived from other frames and motion data. Switch 114 selects either intra-frame prediction 110 or inter-frame prediction 112 and provides the selected prediction data to adder 116 to form a prediction error, also known as a residual. The prediction error is then processed by transform (T) 118, followed by quantization (Q) 120. The residual from the transform and quantization is then encoded by entropy encoder 122 to be included in the video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packaged together with auxiliary information (such as motion and encoding / decoding modes related to intra-frame and inter-frame prediction) and other information, such as parameters related to loop filters applied to the underlying image regions. For example... Figure 1A As shown, secondary information related to intra-frame prediction 110, inter-frame prediction 112, and loop filter 130 is provided to entropy encoder 122. When inter-frame prediction mode is used, one or more reference images must also be reconstructed on the encoder side. Therefore, the residuals from transform and quantization are processed by inverse quantization (IQ) 124 and inverse transformation (IT) 126 to recover the residuals. The residuals are then added back to the prediction data 136, reconstructing the video data at reconstruction (REC) 128. The reconstructed video data can be stored in reference image buffer 134 and used for prediction in other frames.

[0010] like Figure 1AAs shown, the incoming video data undergoes a series of processes in the encoding system. The reconstructed video data from REC 128 may be subject to various degradations due to these processes. Therefore, before storing the reconstructed video data in the reference image buffer 134, a loop filter 130 is typically applied to the reconstructed video data to improve video quality. For example, a deblocking filter (DF), sample adaptive offset (SAO), and adaptive loop filter (ALF) may be used. It may be necessary to incorporate loop filter information into the bitstream so that the decoder can correctly recover the required information. Therefore, loop filter information is also provided to the entropy encoder 122 for inclusion in the bitstream. Figure 1A In the process, the loop filter 130 is applied to the reconstructed video, and then the reconstructed samples are stored in the reference image buffer 134. Figure 1A The system described herein is intended to illustrate an exemplary architecture of a typical video encoder. It may correspond to a High Efficiency Video Coding (HEVC) system, VP8, VP9, ​​H.264, or VVC.

[0011] like Figure 1B As shown, apart from transform 118 and quantization 120, the decoder can use the same or partially the same function blocks as the encoder, since the decoder only needs inverse quantization 124 and inverse transform 126. The decoder uses entropy decoder 140 instead of entropy encoder 122 to decode the video bitstream into quantized transform coefficients and the required encoding / decoding information (e.g., ILPF information, intra-frame prediction information, and inter-frame prediction information). Intra-frame prediction 150 at the decoder end does not require mode search. Instead, the decoder only needs to generate intra-frame predictions based on the intra-frame prediction information received from entropy decoder 140. Furthermore, for inter-frame prediction, the decoder only needs to perform motion compensation (MC 152) based on the inter-frame prediction information received from entropy decoder 140, without motion estimation.

[0012] In existing technologies, the current block can only inherit the intra-prediction mode sent in the previous codec block. To improve encoding and decoding efficiency or reduce the complexity of inherited information, video encoding and decoding methods and apparatuses have been proposed. Summary of the Invention

[0013] The following abstract is for illustrative purposes only and is not intended to constitute any limitation. In other words, the following abstract aims to introduce the concepts, highlights, benefits, and advantages of the novel and non-obvious techniques described herein. Some, but not all, of the embodiments will be further described in the detailed description below. Therefore, the following abstract is not intended to identify the essential features of the claimed subject matter, nor is it intended to determine the scope of the claimed subject matter.

[0014] According to a first aspect of this disclosure, one embodiment of this disclosure discloses a video encoding / decoding method. The video encoding / decoding method includes: receiving input data associated with a current block of a current image of a video, wherein the input data includes pixel data to be encoded at an encoder end or data associated with the current block to be decoded at a decoder end, and wherein the current block is encoded / decoded in an intra-frame mode; constructing a merge candidate list for the current block, wherein the merge candidate list includes multiple candidates, each candidate including inheritance information inherited from previously encoded / decoded blocks and matching a target intra-frame mode; calculating the cost of each candidate; reordering the multiple candidates according to their respective costs to form a reordered merge candidate list; determining one or more target candidates from the reordered merge candidate list; generating prediction data for the current block based on the inheritance information of the one or more target candidates; and encoding or decoding the current block based on the prediction data, wherein the operation of calculating the corresponding cost of each candidate among the multiple candidates includes: calculating the cost of each candidate based on the spatial distance between the previously encoded / decoded block of each candidate and the current block, wherein a larger spatial distance results in a larger cost; and / or calculating the cost of each candidate using a template matching method.

[0015] According to a second aspect of this disclosure, an electronic device for video encoding and decoding is provided. The electronic device includes one or more electronic circuits or processors configured to perform the following operations: receiving input data associated with a current block of a current image of a video, wherein the input data includes pixel data to be encoded at an encoder end or data associated with the current block to be decoded at a decoder end, and wherein the current block is encoded and decoded in an intra-frame mode; constructing a merge candidate list for the current block, wherein the merge candidate list includes a plurality of candidates, each candidate including inheritance information inherited from previously encoded and decoded blocks and matching a target intra-frame mode; calculating the cost of each candidate; reordering the plurality of candidates according to their respective costs to form a reordered merge candidate list; determining one or more target candidates from the reordered merge candidate list; generating prediction data for the current block based on the inheritance information of the one or more target candidates; and encoding or decoding the current block based on the prediction data, wherein the operation of calculating the corresponding cost of each of the plurality of candidates includes: calculating the cost of each candidate based on the spatial distance between the previously encoded and decoded blocks of each candidate and the current block, wherein a larger spatial distance results in a larger cost; and / or calculating the cost of each candidate using a template matching method. Attached Figure Description

[0016] Figure 1A An exemplary adaptive inter-frame / intra-frame video encoding and decoding system incorporating loop processing is demonstrated.

[0017] Figure 1B exhibit Figure 1A The corresponding decoder for the encoder.

[0018] Figure 1C This example illustrates the spatial merging candidate positions for the current luminance block.

[0019] Figure 2 Intra-prediction modes in different directions are illustrated by example.

[0020] Figure 3 A top reference sample with extended length is conceptually shown to support wide-angle orientation patterns for non-square blocks with different aspect ratios.

[0021] Figure 4 A conceptual illustration shows a left-side reference sample with extended length to support wide-angle orientation patterns for non-square blocks with different aspect ratios.

[0022] Figure 5 This example illustrates the window used in decoder-side intra-modederivation (DIMD) processing.

[0023] Figure 6This example illustrates the histogram of gradients (HoG) generated by DIMD processing.

[0024] Figure 7 The TIMD process is illustrated by example.

[0025] Figure 8 Three 15-tap filters for EIP mode are illustrated by way of example.

[0026] Figure 9 Three predefined templates for the EIP mode are illustrated by way of example.

[0027] Figure 10 An example is shown in the TMRL intra-frame mode.

[0028] Figure 11 A flowchart illustrating an exemplary video encoding / decoding method according to an embodiment of the present invention is shown.

[0029] Figure 12 A series of candidates are illustrated exemplarily.

[0030] Figure 13 An exemplary template matching method for calculating costs is provided.

[0031] Figure 14 An apparatus for video encoding and decoding is described by way of example. Detailed Implementation

[0032] It is readily understood that, as generally described and illustrated in the accompanying drawings, the components of the present invention can be arranged and designed in a variety of different configurations. Therefore, the more detailed description of embodiments of the systems and methods of the present invention shown in the drawings below is not intended to limit the scope of the invention as claimed, but is merely representative of selected embodiments of the invention. References to “an embodiment,” “embodiment,” or similar terms in this specification mean that a particular feature, structure, or characteristic associated with that embodiment may be included in at least one embodiment of the invention. Therefore, the phrases “in one embodiment” or “in an embodiment” appearing throughout this specification do not necessarily refer to the same embodiment.

[0033] Furthermore, the aforementioned features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. However, those skilled in the art will understand that the invention can be practiced without one or more specific details, or implemented using other methods, components, etc. In other instances, well-known structures or operations have not been shown or described in detail to avoid obscuring various aspects of the invention. The embodiments shown in the invention can be better understood with reference to the accompanying drawings, wherein the same components are always indicated by the same reference numerals. The following description is by way of example only and illustrates only embodiments of certain selected apparatuses and methods consistent with the invention claimed herein.

[0034] To better illustrate the solution of the present invention, the prior art will be introduced first.

[0035] I. Inter-frame prediction (For more details, please refer to JVET-T2002) a. Derivation of spatial adjacency candidates Spatially adjacent candidate blocks from those located Figure 1C Select from the candidate blocks shown.

[0036] like Figure 1C As shown, spatial merging candidate blocks can be selected from candidate blocks in the upper adjacent block and / or left adjacent block of the current luma block, such as block A0, block A1, block B0, block B1 and block B2.

[0037] II. Intra-frame prediction a. Intra-mode encoding / decoding mode with 35 or 67 intra-prediction modes Figure 2 The diagram illustrates 33 traditional intra-prediction modes with different orientations. These intra-prediction modes are called directional modes, excluding DC (vertical) and Planar modes. As shown, there are 33 directional modes (V: vertical; H: horizontal), hence H, H+1 to H+8, H-1 to H-7, V, V+1 to V+8, and V-1 to V-8 are used. Typically, a directional mode can be represented as H+k or V+k, where k = ±1, ±2, ..., ±8. Each intra-prediction mode can also be referred to as an intra-prediction angle. To capture arbitrary edge orientations presented in natural video, the number of directional intra-prediction modes has been expanded from 33 used in HEVC to 65 used in VVC, thus k ranges from ±1 to ±16. These denser directional intra-prediction modes are suitable for all block sizes and for both luma and chroma intra-prediction. By including DC and Planar modes, the number of intra-prediction modes reaches 35 or 67 (not shown in the diagram).

[0038] Of the 35 (or 67) intra-prediction modes, a specific mode (e.g., 3, 5, or 6) is identified as the set of most probable modes (MPMs) for intra-prediction of the current prediction block. The encoder can reduce the bit rate by sending an index to select one of the MPMs (instead of sending an index to select one of the 35 (or 67) intra-prediction modes). The list of most probable modes (MPMs) is generated by considering two adjacent available intra-prediction modes.

[0039] Traditional intra-frame angle prediction directions are defined as clockwise from 45 degrees to -135 degrees. In VVC, for non-square blocks, several traditional intra-frame angle prediction modes are adaptively replaced with wide-angle intra-frame prediction modes. The replaced modes are sent using the original mode indices, which are then remapped to the wide-angle mode indices after parsing.

[0040] In some embodiments, the total number of intra-prediction modes remains unchanged at 67, and the intra-prediction encoding / decoding method remains unchanged. To support these prediction directions, a top reference sample of length 2W+1 and a left reference sample of length 2H+1 are defined. Figure 3 and Figure 4 The concept shows top and left reference samples with extended lengths, respectively used to support wide-angle orientation patterns for non-square blocks with different aspect ratios.

[0041] The number of patterns replaced in wide-angle directional mode can depend on the aspect ratio of the block.

[0042] b. Decoder-Side Intra Mode Derivation (DIMD) When DIMD is applied, two intra-prediction modes are derived from the reconstructed neighboring samples (templates), and two predictors (using the two derived intra-prediction modes) are combined with a planar mode predictor, with the combined weights derived from the gradient.

[0043] To implicitly derive the intra-prediction modes of the blocks, texture gradient analysis is performed at both the encoder and decoder. Texture gradient analysis begins with an empty gradient histogram (HoG), for example, containing 65 entries corresponding to the 65 angular modes mentioned above. The magnitudes of these entries are determined during texture gradient analysis. The intra-prediction mode with the highest magnitude is selected, and the combined weights are derived based on this magnitude.

[0044] like Figure 5 and Figure 6 As shown, Figure 5 This example illustrates the window used in intra-frame mode derivation (DIMD) processing at the decoder end. Figure 6 The gradient histogram (HoG) generated by DIMD processing is illustrated as an example.

[0045] like Figure 5 As shown, the template region located above and to the left of the current block is selected as the reference region for gradient-based intra-prediction mode derivation. Horizontal and vertical filters (e.g., Sobel filters) are applied at all window locations, centered on the template midline pixel. At each window location, the filters compute the intensities Gx and Gy in the purely horizontal and vertical directions, respectively. Then, the texture angle of the window is calculated: This angle can be converted into one of 65 intra-prediction modes. Once the intra-prediction mode (IPM) index of the current window is deduced as idx, The magnitude of the IPM entry will be increased by adding... Update.

[0046] Figure 6 This example shows a gradient histogram (HoG) on the gradient of a graph. Figure 5 The HoG is calculated by applying the amplitude calculation operation described above to all pixel positions within the template region. After calculating the HoG, the indices of the two highest histogram bars are selected as the two implicitly derived intra-prediction modes (IPMs) for that block. The predictions of these two IPMs are further combined with the planar mode prediction as the prediction of the DIMD mode. The prediction fusion is applied as a weighted average of the three prediction factors (the two IPMs and the planar mode prediction). For this purpose, the weight of the planar mode can be set to 21 / 64 (approximately 1 / 3). The remaining 43 / 64 (approximately 2 / 3) weights are shared by the two HoG IPMs, and their magnitude is proportional to the amplitude of their HoG bars.

[0047] c. Template-based intra-mode derivation (TIMD) like Figure 7 As shown, Figure 7 The TIMD process is illustrated by example.

[0048] Template-based intra-frame mode derivation (TIMD) modes are derived by using adjacent templates (such as...) at the encoder and decoder ends. Figure 7 (As shown) the template implicitly derives the intra-prediction mode of the CU, instead of sending precise intra-prediction mode bits to the decoder. The template's prediction samples use the template's reference samples (e.g., ...). Figure 7(As shown) is generated for each candidate mode. The cost is calculated as the sum of the absolute transformed difference (SATD) between the predicted and reconstructed samples of the template. For example, the two intra-predicted modes with the smallest SATD are selected as TIMD modes. The two TIMD modes are fused with weights to generate the prediction for the current CU.

[0049] The two intra-frame prediction modes with the lowest cost are respectively called Cost best and Cost secondBest It was selected as the TIMD mode. If Cost secondBest < Cost best 2. If the two TIMD modes are weighted and fused to determine the final intra-prediction mode, then the intra-prediction mode with the lowest cost is applied.

[0050] d. Extrapolation filter-based intraprediction (EIP) like Figure 8 and Figure 9 As shown, Figure 8 Three 15-tap filters in EIP mode are illustrated by example. Figure 9 Three predefined templates for the EIP mode are illustrated exemplarily. In EIP mode, samples in the CU are predicted from the top left to the bottom right by applying an extrapolation filter to adjacent reconstructed or predicted samples. The EIP mode uses a 15-tap filter for prediction, as shown below: (1) in, c represents the predicted value at position (x, y) in the CU. i Represents the filter coefficients. This indicates a reconstructed sample or a predicted sample.

[0051] EIP filters can be derived from adjacent reconstructed samples or inherited from previous EIP codec blocks. For example... Figure 8 and Figure 9 As shown, ECM supports three EIP filter shapes and three types of reconstruction regions.

[0052] For a CU encoded in EIP mode, an EIP merge flag is sent to indicate whether the EIP filter is inherited from a previously encoded block in EIP mode. When the EIP merge flag is true, the EIP merge list is constructed based on spatial adjacency, spatial non-adjacency, temporal, and historical candidates. The positions and inclusion order of these candidates are the same as those used in the CCP merge candidate list. An EIP merge index is also sent to indicate which EIP merge candidate was selected. The filter shape and filter coefficients of the selected candidate are then inherited for encoding and decoding the CU.

[0053] When the EIP merging flag is false, the EIP filter is derived from neighboring reconstructed samples, and relevant syntax elements are sent to indicate which of the three reconstructed regions and which of the three filter shapes is used for the CU. The selected filter moves horizontally or vertically in the selected reconstructed region in a one-pixel step to construct the autocorrelation matrix and cross-correlation vector. The coefficients of the autocorrelation matrix and cross-correlation vector are calculated in the same way as those in the cross-component chroma model (CCCM).

[0054] In some embodiments, after generating prediction samples for the CU using the EIP filter, the intra-prediction mode is derived by applying DIMD processing to the prediction samples. Specifically, the horizontal and vertical gradients are computed for each prediction sample to construct a gradient histogram. The intra-prediction mode corresponding to the maximum histogram count is then used to determine the low-frequency non-separable transform (LFNST), non-separable primary transform (NSPT), or multiple transform selection (MTS) transform set.

[0055] e. Template-based multiple reference line intra-prediction (TMRL) mode like Figure 10 As shown, Figure 10 This section provides an example of TMRL intra-frame modes. TMRL modes combine reference lines and prediction modes, and construct a candidate combination list using a template matching method. The index of the candidate combination list is sent to indicate which reference line and prediction mode to use when encoding the current block.

[0056] The extended reference line starts from reference line 1. Reference line 0 ( Figure 10The top and / or left templates are used for template matching. The SAD cost (TMRL cost) on the template region is calculated between prediction (generated from 50 combinations) and reconstruction. The 20 combinations with the lowest SAD costs are selected in ascending order to form the TMRL candidate list.

[0057] III. The proposed method and apparatus The following discusses a proposed video encoding / decoding method. This method involves an innovative intra-frame encoding / decoding mode, which can be referred to as an intra-frame hybrid merging mode or a decoder-derived intra-frame prediction (DIP) merging mode. In this paper, "merging mode" can refer to obtaining prediction information from previously encoded blocks (e.g., spatially or temporally adjacent blocks). In other words, the core idea of ​​the intra-frame hybrid merging mode is to inherit (or reference) information from previously encoded blocks and use this inherited information to predict the current block. A previously encoded block is a block previously encoded relative to the current block. The inherited block is selected from the previously encoded blocks according to the inherited block settings. In other words, the inherited block constitutes a subset of the previously encoded blocks.

[0058] like Figure 11 As shown, Figure 11 A flowchart illustrating an exemplary video encoding / decoding method provided according to embodiments of the present disclosure is shown. The proposed video encoding / decoding method includes the following steps: In operation 1101, input data associated with the current block of the current video image is received, wherein the input data includes pixel data to be encoded at the encoder end or data associated with the current block to be decoded at the decoder end, and wherein the current block is encoded and decoded in intra-frame mode.

[0059] In operation 1102, a merge candidate list for the current block is constructed, wherein the merge candidate list contains multiple candidates, each containing inherited information inherited from previously encoded / decoded blocks and matched with the target intra-frame mode.

[0060] 1. Candidate or inherited block settings In some embodiments, one or more candidates from a spatially adjacent candidate and / or non-adjacent candidate, historical candidate, temporal candidate, default candidate, or any subset thereof provide inherited information from previous codec blocks.

[0061] In some embodiments, a merge candidate list containing inheritance information is constructed for the current block. Similar to the inter-frame merge mode candidate list, the merge candidate list includes spatially adjacent candidates and / or non-adjacent candidates, historical candidates, temporal candidates, default candidates, or any subset of the above candidates.

[0062] 1.1 Spatial Adjacency Candidates and Non-Adjacent Candidates Spatial adjacency candidates are drawn from the immediate neighboring blocks of the current block. The immediate neighboring blocks can be the same as the five spatial neighboring blocks in the inter-frame merge mode, or any subset of the immediate neighboring blocks of the current block. For example, adding spatial adjacency candidates to the merge list, such as... Figure 1C As shown, the inclusion order may be A1 B1 A0 B0 B2 or B1 A1 B0 A0 B2.

[0063] Non-adjacent candidate blocks are selected from the search range surrounding (but not adjacent to) the current block. This search range can be the same as the search range for non-adjacent candidate blocks in inter-frame merge mode. Non-adjacent candidate blocks can be added to the merge list from predetermined locations and in a predetermined inclusion order. For example, the predetermined locations and inclusion order are the same as those for non-adjacent candidate blocks in inter-frame merge mode.

[0064] like Figure 12 As shown in the figure, a series of candidate blocks with indices from 1 to 23 are displayed, where candidate blocks with indices from 1 to 5 are spatially adjacent candidate blocks, and candidate blocks with indices from 6 to 23 are non-adjacent candidate blocks.

[0065] 1.2 Historical Candidate Blocks Historical candidate blocks are selected from a history-based buffer array. In the history-based buffer array, inheritance information for each valid previous codec block is stored, where a valid previous codec block refers to any block containing inheritance information.

[0066] 1.3 Time Candidates Temporal candidates are obtained from inherited information stored in one or more previously encoded / decoded images. Temporal candidates can be obtained when the current segment / image is a non-intra-frame segment / image.

[0067] In one embodiment, the time candidate may come from a block at a specific predetermined position (x', y') in a previously encoded / decoded segment / image.

[0068] In one sub-implementation, these locations are situated within the corresponding regions of the current codec block.

[0069] In one sub-implementation, these predetermined locations are located outside the corresponding regions of the current codec block.

[0070] In one sub-implementation, the predetermined position can be determined based on the position, width, and height of the current block.

[0071] In one sub-implementation, the predetermined position can be determined based on the current block's position and some predetermined fixed x and y distances.

[0072] In one embodiment, the previously encoded / decoded image is among the images in the reference list.

[0073] In one embodiment, the previously encoded / decoded image is the same as the co-located image in a regular inter-frame merging mode.

[0074] In one embodiment, there may be multiple selected / pre-selected previously encoded / decoded images.

[0075] In one embodiment, the previously encoded / decoded image can be sent in the image / fragment header. A reference list and reference index are sent in the image / fragment header. For example, L0[0] is sent. As another example, L1[0] is sent.

[0076] In one embodiment, previously encoded or decoded images are selected from an image set according to some predetermined rules.

[0077] In one embodiment, the previously encoded / decoded image is selected from images in a reference list. This selection may be based on the Point of Conformity (POC), and / or the POC distance, and / or the Quality of Points (QP), and / or the QP difference. For example, an image with a smaller POC is selected. Alternatively, an image with a larger POC is selected. For example, the image with the smallest POC distance to the current image is selected. Alternatively, an image with a smaller QP is selected. Alternatively, an image with a larger QP is selected. Alternatively, an image with a smaller QP difference to the current image is selected.

[0078] In one embodiment, the previously encoded / decoded image is the most recently encoded / decoded I-image.

[0079] In one embodiment, the rules for selecting / not selecting previously encoded images described in the above paragraphs can be combined. For example, the image with the smallest QP among the unscaled images in the reference list is selected.

[0080] 1.4 Default Candidates The default candidate is a candidate that includes default information, and / or the default information is derived from the candidates already included in the merged candidate list.

[0081] In one embodiment, the default mode of the default candidate can be derived using the MIMD scheme and / or the event-based intra-frame coding (OBIC) scheme and / or the EIP derived mode scheme and / or any existing or mentioned intra-frame coding scheme (e.g., TIMD, DIMD, EIP and / or MRL) and / or any variant of the existing or mentioned intra-frame coding scheme.

[0082] In one embodiment, the maximum number of candidates allowed in the merge candidate list is N, where N is an integer greater than or equal to 1.

[0083] In one sub-implementation, the maximum number N is 12.

[0084] 2. Target Intra-Frame Mode The target intra-frame mode can refer to the intra-frame mode that the proposed intra-frame blending and merging mode enables or allows for the current block, or it can be referred to as the intra-frame mode that is already enabled or allowed for the current block.

[0085] In one embodiment, the target intra-frame mode includes at least one selected from the group consisting of: DIMD mode, TIMD mode, EIP mode, TMRL mode, spatial geometric partitioning (SGPM) mode, intra sub-partition (ISP) mode, intra template matching prediction (IntraTMP) mode, matrix-based intra prediction (MIP) mode, intra hybrid merging mode, or a combination thereof.

[0086] In one sub-implementation, the target intra-frame mode includes at least an intra-frame hybrid merging mode, and at least two of the following: DIMD mode, TIMD mode, EIP mode, TMRL mode, SGPM mode, ISP mode, IntraTMP mode, or MIP mode.

[0087] In another sub-implementation, the target intra-frame mode includes at least an intra-frame blending mode, and at least two of the following: DIMD mode, TIMD mode, EIP mode, or TMRL mode.

[0088] 3. Inherited Information When generating a prediction for the current block encoded and decoded by the target intra-mode, one or more successor blocks are selected from a merge candidate list or multiple merge candidates. The succession information from the successor blocks is then used in the target intra-mode to generate the prediction. In some embodiments, the succession information for each merge candidate may belong to a different target intra-mode, i.e., a mixed mode. For example, the succession information for a merge candidate may be associated with DIMD, and / or TIMD, and / or MRL, and / or EIP. A merge list may contain merge candidates with different target modes. The current block can be predicted according to DIMD, TIMD, MRL, or EIP, depending on the merge candidate used.

[0089] In the proposed intra-frame merging scheme, inherited information can be any mode information, any sample information, any block information, any model information, and / or any information related to prediction generation. Mode information can be candidate encoding / decoding mode types.

[0090] This defines the inherited information for generating the prediction data for the current block using the target intra-frame mode, i.e., the prediction information that matches the candidate encoding / decoding modes.

[0091] 3.1 Inheritance Information Settings for DIMD Mode For DIMD mode, the inheritance information must include at least one of the following (a) and / or (b) and / or (c) and / or (d): (a) One or more histogram (bar chart) values ​​of available DIMD intra-prediction modes (e.g., DC, planar and / or directional prediction modes); (b) N intra-frame prediction modes suggested by histogram values ​​(with the highest N histogram bars); (c) DIMD weight information and / or whether fusion is performed (or fusion indication); or (d) Reference line information and / or wide-angle conditions.

[0092] 3.2 Inheritance Information Settings for TIMD Mode For TIMD mode, the inherited information must include at least one of the following (a) and / or (b) and / or (c) and / or (d): (a) One or more TIMD cost values ​​available for TIMD intra-prediction modes (e.g., DC, planar and / or directional prediction modes); (b) N intra-frame prediction modes with minimum N TIMD costs proposed by TIMD cost. (c) TIMD weight information and / or whether TIMD fusion is performed (or TIMD fusion indication); or (d) Reference line information and / or wide-angle conditions.

[0093] 3.3 Inheritance Information Settings for MRL Pattern For MRL patterns, the inherited information must include at least one of the following (a) and / or (b) and / or (c) and / or (d): (a) One or more reference lines are used in conjunction with intra-frame prediction modes (e.g., DC, planar and / or directional prediction modes); (b) N intra-frame prediction modes proposed by TIMD cost (with minimum N TIMD cost). (c) Weighting information and / or whether fusion is performed (or fusion indication); or (d) Reference line information and / or wide-angle conditions.

[0094] 3.4 EIP Mode Inheritance Information Settings For EIP mode, the inherited information includes at least one of the following (a) and / or (b) and / or (c): (a) Filter shape; (b) All or part of the filter coefficients; or (c) Templates used to derive filter coefficients.

[0095] 3.5 Inheritance Information Settings for Intra-Frame Hybrid Merging Mode When the target mode is the intra-frame hybrid merging mode proposed by the applicant, the inherited information includes all or any subset of the following: The inheritance information settings for the above DIMD mode; The inheritance information settings for the above TIMD mode; The inheritance information settings for the above MRL mode; or The inheritance information settings for the above EIP mode.

[0096] When the target mode is the intra-frame hybrid merging mode proposed by the applicant, the inherited information may also include the enabled codec mode type, such as whether the codec mode is a DIMD-related mode, a TIMD-related mode, an MRL-related mode, an SGPM-related mode, an ISP-related mode, an intra-frame TMP-related mode, an MPM-related mode, a MIP-related mode, an EIP-related mode, and / or whether the codec mode is any mode related to the predetermined intra-frame mode. The inherited information may also include corresponding information about the codec mode.

[0097] In another embodiment, the enabled codec mode type value is included in the inheritance information, and / or the enabled codec mode type value determines the corresponding information that should also be included in the intra-frame hybrid merging mode inheritance information. For example, if the enabled codec mode is an MRL-related mode, the intra-frame hybrid merging mode inheritance information only includes the corresponding information from the aforementioned MRL mode inheritance information.

[0098] In one embodiment, the codec mode in the intra-frame blending merge mode inheritance information setting is derived from a previous codec block. The previous codec block may store intra-frame blending merge mode inheritance information or blending mode inheritance information. The blending mode inheritance information stored in the previous codec block can be referenced by subsequent codec blocks (e.g., the current block). For example, for each block containing blending mode information, the blending mode information is stored and / or referenced by subsequent codec blocks. For example, for each predetermined unit containing blending mode information, the blending mode information is stored and / or referenced by subsequent codec blocks. This unit can be any predetermined region or... There are 16 grids, where k can be 2, 4, 8, 16 or any predetermined positive integer.

[0099] In one sub-implementation, the enabled codec mode type is EIP. Previous codec blocks generate corresponding EIP inheritance information (e.g., filter shape and / or filter coefficients) and / or store hybrid mode inheritance information (coding mode and / or corresponding information). In one sub-implementation, the enabled codec mode type is SGPM. This mode generates multiple prediction hypotheses from different intra-prediction modes and uses geometrically based segmentation weights as inter-frame GPMs to combine these prediction hypotheses into a final prediction. Previously encoded / decoded blocks generate corresponding SGPM inheritance information (e.g., intra-prediction modes and / or segmentation lines and / or weights) and / or store hybrid mode inheritance information (codec modes and / or corresponding information).

[0100] In one sub-implementation, the enabled codec mode type is ISP. This mode splits the current block into multiple sub-partitions and uses reconstructed samples adjacent to the current sub-partition (possibly from previous sub-partitions) as reference samples to generate predictions for each sub-partition. Previous codec blocks generate corresponding ISP inheritance information (e.g., one or more intra-prediction modes and / or segmentation methods) and / or store hybrid mode inheritance information (codec mode and / or corresponding information).

[0101] In one sub-implementation, the enabled codec mode type is IntraTMP. This mode uses template matching to find displacements (i.e., block vectors) to reference reference blocks within a predetermined range of the current image, and generates predictions using reconstructed samples from the reference blocks. Previous codec blocks generate corresponding intraTMP inheritance information (e.g., one or more block vectors) and / or store hybrid mode inheritance information (encoding modes and / or corresponding information).

[0102] In another embodiment, the enabled encoding / decoding mode type is MIP. This mode uses a predetermined matrix and predetermined neighboring or non-neighboring reference samples to generate predictions. Previous encoding / decoding blocks generate corresponding MIP inheritance information (e.g., one or more matrix indicators and / or one or more matrix coefficients of the indicated matrix and / or block width and / or block height and / or block area and / or block position) and / or store hybrid mode inheritance information (encoding mode and / or corresponding information).

[0103] In another embodiment, to reduce storage space, instead of storing all mixed-mode information (which can be used for reference), only a subset of the mixed-mode information is stored. For example, only three or any predetermined positive number of all information are stored. For example, the subset is the first three of all information. The first three always contain the enabled codec mode type.

[0104] In one embodiment, the inheritance information of the target mode depends on the inheritance encoding / decoding mode value of the selected merge candidate.

[0105] In one sub-implementation, if the selected merge candidate codec mode is DIMD, TIMD, EIP, or MRL, the inherited codec mode value is the same as the codec mode (i.e., DIMD, TIMD, EIP, or MRL respectively).

[0106] In one sub-implementation, for a block encoded in DIP merge mode, the inherited mode type value is set as follows: When the current block is encoded in DIP merge mode, the block will select a merge candidate to generate a prediction. If the selected merge candidate of the current block is encoded in DIMD, TIMD, MRL, or EIP, the inherited mode type value of the current block is set to DIMD, TIMD, MRL, or EIP, respectively. If the selected merge candidate of the current block is encoded in DIP merge mode, the inherited mode type value of the current block is set to the inherited mode type value of the selected merge candidate.

[0107] In one sub-implementation, if the inheritance mode type is DIMD, the inheritance information settings follow the description in Section III.3.1, “Inheritance Information Settings for DIMD Mode” above.

[0108] In one sub-implementation, if the inheritance mode type is TIMD, the inheritance information settings follow the description in Section III.3.2, “Inheritance Information Settings for TIMD Mode”.

[0109] In one sub-implementation, if the inheritance mode type is MRL, the inheritance information settings follow the description in Section III.3.3, “Inheritance Information Settings for MRL Modes” above.

[0110] In one sub-implementation, if the inheritance mode type is EIP, the inheritance information settings can follow the description in Section III.3.4, “Inheritance Information Settings for EIP Mode” above.

[0111] In operation 1103, the cost of each of the multiple candidates is calculated.

[0112] In one embodiment, after the list of candidates to be merged is constructed, the cost of each candidate is calculated based on a predetermined method.

[0113] In one sub-implementation, the cost is calculated using a template matching method. This template matching method includes: determining previously reconstructed templates and those adjacent to the current block; generating sample prediction values ​​for each template based on inheritance information for each candidate; and generating the cost for each candidate based on the difference between the sample prediction values ​​and the reconstructed values.

[0114] like Figure 13 As shown, Figure 13 An illustrative template matching method for calculating the cost is given. First, predictions based on each candidate's neighboring templates are generated. Then, the difference between the predicted sample and the reconstructed sample is calculated; this difference is called the template cost and can be either SAD or SATD.

[0115] In one sub-implementation, such as Figure 13 As shown, the size of the adjacent reconstruction template above the current block is The size of the reconstruction template of the left neighbor of the current block is .For example, Greater than or equal to the width of the current block Greater than or equal to the current block height. For example, and It is a constant. For example, For example, .For example, and It can adaptively determine the current block size, width, or height. If the current block size / width / height is greater than or equal to the threshold, then... and Set to a larger value; otherwise, and Set to a smaller value.

[0116] In one sub-implementation, if the upper adjacent template is unavailable, the template cost is calculated using only the left adjacent template. Similarly, if the left adjacent template is unavailable, the template cost is calculated using only the upper adjacent template. If both adjacent templates are unavailable, the reordering method is not applied.

[0117] In one sub-implementation, the cost of each candidate template is generated based on all or part of the template's pixels. In other words, partial locations within the upper and left adjacent templates are selected to calculate the template cost. For example, a first starting position and / or a first subsampling interval can be defined based on the width of the current block to partially select locations within the upper adjacent template. Similarly, a second starting position and a second subsampling interval can be defined based on the height of the current block to partially select locations within the left adjacent template.

[0118] In one sub-implementation, the cost of candidates with certain codec modes is further adjusted. For example, a specific codec mode refers to a DIMD mode, any subset of DIMD modes, a DIMD-related mode, any subset of DIMD-related modes, or any combination thereof. The cost of candidates with specific codec modes can be reduced by subtracting a positive offset, scaling by a factor less than 1, or setting the cost to a minimum. As another example, a specific codec mode refers to a TIMD mode, any subset of TIMD modes, a TIMD-related mode, any subset of TIMD-related modes, an EIP mode, any subset of EIP modes, or any combination thereof. The cost of candidates with specific codec modes can be increased by increasing a positive offset, scaling by a factor greater than 1, or setting the cost to a maximum. The list is reordered based on the adjusted cost. For candidates encoded in a DIP merge mode, the codec mode refers to the inherited mode type value of the DIP merge mode.

[0119] In one sub-implementation, the cost is calculated based on a spatial distance metric between the candidate block and the current block. A larger spatial distance results in a higher cost. Candidate blocks are reordered in ascending order based on the distance metric. The distance between the first point in the candidate block and the second point in the current block is calculated. The first point can be the top-left, top-right, center, bottom-left, or bottom-right corner of the candidate block. The second point can be the top-left, top-right, center, bottom-left, or bottom-right corner of the current block. The spatial distance metric can be calculated using Euclidean distance, horizontal distance, vertical distance, Manhattan distance, or Minkowski distance.

[0120] In one sub-implementation, if the cost is calculated based on a spatial distance metric between the candidate block and the current block, and the candidate block is a temporal candidate block (see Section 2.2.1.3, “Temporal Candidate Blocks,” for more details), the spatial distance is first calculated using the co-located blocks of the temporal candidate block, and then further adjusted. Assuming the temporal candidate block is located at (x, y) with width w and height h, the co-located block is the block in the current image with width w and height h. The spatial distance is then adjusted by adding a positive offset or scaling by a factor greater than 1. The positive offset or scaling factor can be determined based on the POC distance between the temporal candidate block's image and the current image. If the POC distance is large, the offset or scaling factor is set to a larger value.

[0121] In one sub-implementation, if the cost is calculated based on a spatial distance metric between the candidate block and the current block, and the candidate block is a temporal candidate block, then the distance of the temporal candidate block is set to the maximum value.

[0122] In operation 1104, multiple candidates are reordered according to their respective costs to form a reordered list of merged candidate blocks.

[0123] Based on the corresponding template cost of the candidate blocks, these candidate blocks are reordered in ascending order.

[0124] In one embodiment, after constructing the list of candidate blocks to be merged, the list is reordered. The reordering rules may depend on the encoding / decoding information of adjacent blocks. If adjacent blocks are encoded / decoded using a specific encoding / decoding mode, then candidate blocks using that encoding mode are moved to the beginning of the list. For candidates encoded / decoded in DIP merge mode, the encoding / decoding mode refers to the inherited mode type value of the DIP merge mode. For example, if the adjacent upper or left block is encoded / decoded using DIMD, then DIMD candidates in the list can move to the beginning of the list.

[0125] In one embodiment, when constructing multiple merge candidate lists, the reordering methods used for the different merge candidate lists can be different.

[0126] In one sub-implementation, the first method is used to reorder the merge list, and then the second method is used to reorder the previous list. I The candidate list is reordered. I It is less than the maximum number of candidates allowed in the merge candidate list. N Positive values. For example, the first method is a spatial distance metric, and the second method is a template matching method.

[0127] In one sub-implementation, after the merged list is reordered, the redundancy of the candidate list is further checked. If the cost of a candidate list in the reordered merged candidate list is less than or equal to a predetermined threshold compared to the cost of its predecessor, then the candidate list is redundant. If a candidate is redundant, it can be removed from the reordered merged candidate list or moved to the end of the list.

[0128] In operation 1105, one or more target candidates are selected from the reordered list of merge candidates.

[0129] In one sub-implementation, the determined candidates may come only from the reordered first... M One candidate. M It is a positive value that is less than the maximum number of candidates N allowed in the merge candidate list. For example, MIt can be 2. For example, M It can be 3.

[0130] In one embodiment, after constructing a merge candidate list, one or more candidates are selected from that list for use in the current block. The index of the target candidate used to predict the current block in the reordered merge candidates is either explicitly sent or implicitly set. The selection of one or more target candidates used to predict the current block depends on the explicitly sent index or the implicitly set one or more (promising) candidates. For example, the top one or more candidates with the lowest cost in the list are selected. For example, an explicit index indicates that one or more candidates in the reordered list are selected.

[0131] The cost calculation and / or list reordering processes described above may rely on template matching, which calculates costs based on the distortion between the prediction on the template (using a specific candidate) and the reconstruction on the template. Candidates in the list will then be reordered in ascending order based on cost.

[0132] In operation 1106, prediction data for the current block is generated based on the inheritance information of one or more target candidates.

[0133] Predictive data can be sample or pixel values ​​of the current block predicted based on inherited information from one or more target candidates.

[0134] 4. Target mode settings and shortcut syntax settings 4.1 DIMD Target Mode Settings (DIMD Merge Mode) This section specifies a DIMD merging mode. When the DIMD merging mode is used, DIMD inheritance information from one or more predetermined candidate blocks is used to determine the prediction information required to generate the prediction for the current block, depending on the inheritance block settings. For example, the inheritance information references the histogram values ​​of previous codec blocks, as well as one or more intra-prediction modes (a type of prediction information) and / or corresponding weights used to determine the current block, just like regular DIMD. Then, in conjunction with regular DIMD, the prediction assumptions from each derived intra-prediction mode are combined using a mixing process to form the final prediction for the current block.

[0135] 4.2 TIMD Target Mode Settings (TIMD Merge Mode) This section specifies a TIMD merging mode. When the TIMD merging mode is used, TIMD inheritance information from one or more predetermined candidates (e.g., each candidate provides N available TIMD intra-prediction modes and TIMD weight information, such as {IPM1, IPM2, W1, W2}, and / or whether to merge, and wide-angle conditions) is used to determine the prediction information required to generate the current block prediction, depending on the inherited block settings. For example, the merge candidate list is constructed and reordered based on the cost in the template matching process. Template size and template cost calculations can be unified with regular TIMD. After reordering the TIMD merge candidates, the top two or any predetermined number of candidates in the list are retained for transmission. Then, unified with regular TIMD, the prediction assumptions of each inherited intra-prediction mode are combined using a mixing process to form the final prediction for the current block.

[0136] 4.3 MRL Target Mode Settings (MRL Merge Mode) This section specifies an MRL merging mode. When the MRL merging mode is used, inheritance information from one or more predetermined candidates (e.g., each candidate is provided to one or more reference lines along with intra-prediction modes (IPM1 and MRL1), and / or whether merging is necessary, and wide-angle conditions) is used to determine the prediction information required to generate the current block prediction, depending on the inheritance block settings. For example, the merging candidate list is constructed and reordered based on costs in the template matching process. Template size and template cost calculations can be unified with regular TMRL. After reordering the MRL merging candidates, the top two or any predetermined number of candidates in the list are retained for transmission. Then, in accordance with regular intra-prediction, such as inherited IPM1 and MRL1, the predictions from the inherited intra-prediction modes and the inherited reference lines will form the final prediction for the current block; for the examples of inherited IPM1 and MRL1, IPM2 and MRL2, the prediction assumptions of the corresponding inherited intra-prediction modes and the corresponding inherited reference lines are combined through a mixing process to form the final prediction for the current block; for the examples of inherited IPM1 and MRL1 / W1, IPM2 and MRL2 / W2, the prediction assumptions of the corresponding inherited intra-prediction modes and the corresponding inherited reference lines are combined through a mixing process to form the final prediction for the current block.

[0137] 4.4 Target Mode Setting for Intra-Frame Hybridization This section specifies a hybrid mode merging method. When using the hybrid mode merging method, inherited hybrid mode information is used to generate the prediction for the current block. The inherited information for candidate modes can refer to the encoding / decoding modes and / or corresponding information. The current block obtains its own prediction information from the inherited information.

[0138] For example, the encoding / decoding mode in the inherited hybrid mode information is related to DIMD: in some cases, DIMD merge mode or regular DIMD is applied to the current block.

[0139] For example, the encoding / decoding mode in the inherited hybrid mode information is related to TIMD: in some cases, TIMD merge mode or regular TIMD is applied to the current block.

[0140] For example, the encoding / decoding mode in the inherited hybrid mode information is related to MRL: in some cases, MRL merging mode or regular intra-frame prediction using MRL or TMRL is applied to the current block.

[0141] For example, the encoding / decoding mode in the inherited hybrid mode information is related to the EIP: in some cases, the EIP merge mode or EIP export mode is applied to the current block.

[0142] In another embodiment, depending on the inherited block settings, only one candidate (e.g., the first available candidate) is used to determine the prediction information for the current block.

[0143] In another embodiment, one or more candidates are used to determine the prediction information for the current block. For example, all available candidates are used to determine the prediction information for the current block. For example, assume a predetermined maximum number of J. Based on the checking order, the first J available candidates will be used to determine the prediction information for the current block. If the total number of available candidates is less than J, then all available candidates will be used to determine the prediction information for the current block.

[0144] In one embodiment, an additional flag is sent before the DIMD flag to indicate whether the DIP merge mode is used. If the DIP merge mode is used, candidate indices are sent additionally.

[0145] In operation 1107, the current block is encoded or decoded based on the predicted data.

[0146] The proposed video encoding / decoding method offers a more flexible inheritance process and / or more efficient inheritance information. Furthermore, by reordering the candidate merging list, more promising candidate blocks can be encoded with fewer bits, thereby improving video encoding / decoding efficiency.

[0147] In one embodiment, the candidate index is encoded and decoded using truncated unary, and each block of the candidate index is encoded and decoded using a separate context.

[0148] In this invention, the term "block" may refer to TU / TB, CU / CB, PU / PB, a predetermined area, or CTU / CTB.

[0149] Any combination of the methods proposed in this invention can be applied.

[0150] The method proposed in this invention can be enabled and / or disabled based on implicit rules (e.g., block width, height, or area) or explicit rules (e.g., syntax at the block, tile, fragment, image, SPS, or PPS level). For example, the proposed method is applied when the block area is less than / greater than a threshold.

[0151] Any of the methods proposed above can be implemented in the encoder and / or decoder. For example, any of the proposed methods can be implemented in the inter-frame / intra-frame / IBC / prediction / transform module of the encoder and / or the inter-frame / intra-frame / IBC / prediction / transform module of the decoder. Alternatively, any of the proposed methods can be implemented as circuitry coupled to the inter-frame / intra-frame / IBC / prediction / transform module of the encoder and / or the inter-frame / intra-frame / IBC / prediction / transform module of the decoder to provide the information required by the inter-frame / intra-frame / IBC / prediction / transform module. However, the decoder or encoder may also use additional processing units to implement the required processing. Although the intra-frame / inter-frame prediction units are independent processing units, they may correspond to executable software or firmware code stored on a medium (such as a hard disk or flash memory) for execution by a central processing unit (CPU) or a programmable device (such as a digital signal processor (DSP) or a field-programmable gate array (FPGA)).

[0152] like Figure 14 As shown, according to an embodiment of the present disclosure, an apparatus 200 for video encoding and decoding includes one or more electronic circuits or processors 21. The one or more electronic circuits or processors are configured to perform the following operations: receiving input data associated with a current block of a current image of a video, wherein the input data includes pixel data to be encoded at an encoder end or data associated with the current block to be decoded at a decoder end, and wherein the current block is encoded / decoded in an intra-frame mode; constructing a merge candidate list for the current block, wherein the merge candidate list includes multiple candidates, each candidate including inheritance information inherited from previously encoded / decoded blocks and matched with a target intra-frame mode; calculating the cost of each candidate; reordering the multiple candidates according to their respective costs to form a reordered merge candidate list; determining one or more target candidates from the reordered merge candidate list; generating prediction data for the current block based on the inheritance information of the one or more target candidates; and encoding or decoding the current block based on the prediction data, wherein the operation of calculating the corresponding cost of each of the multiple candidates includes: calculating the cost of each candidate based on the spatial distance between the previously encoded / decoded block of each candidate and the current block, wherein a larger spatial distance results in a larger cost; and / or calculating the cost of each candidate using a template matching method.

[0153] When the device 200 is used as an encoder, the device 200 can be configured as described above. Figure 1AThe encoder shown. When device 200 is used as a decoder, device 200 can be configured as described above. Figure 1B The decoder shown.

[0154] In one embodiment, the device 200 is configured as Figure 1A The encoder shown. Input data associated with the current block of the current image of the video can be received by intra-frame prediction 110 of device 200. The input data may include pixel data to be encoded at device 200. The current block is encoded in intra-frame mode. Switch 114 selects intra-frame prediction 110 accordingly. Intra-frame prediction 110 can construct a merge candidate list for the current block. The merge candidate list may contain multiple candidates, each containing inheritance information inherited from previously encoded blocks and matched with a target intra-frame mode. Intra-frame prediction 110 can calculate the corresponding cost of each candidate, reorder the multiple candidates according to their corresponding costs to form a reordered merge candidate list, determine one or more target candidates from the reordered merge candidate list, generate prediction data for the current block based on the inheritance information of one or more target candidates, and encode the current block based on the prediction data. In addition, the operation of calculating the corresponding cost of each candidate may include: calculating the cost of each candidate according to the spatial distance between the previously encoded block of each candidate and the current block, where the larger the spatial distance, the greater the cost; and / or calculating the cost of each candidate by a template matching method.

[0155] In one embodiment, the device 200 is configured as Figure 1B The decoder. Input data associated with the current block of the current image of the video can be received by the intra-frame prediction 150 of the device 200. The input data may include data associated with the current block to be decoded in the device 200. The current block is encoded in an intra-frame mode. The intra-frame prediction 150 may construct a merge candidate list for the current block. The merge candidate list may include multiple candidates, each including inheritance information inherited from previously encoded / decoded blocks and matched with a target intra-frame mode. The intra-frame prediction 150 may calculate the corresponding cost of each of the multiple candidate blocks, and reorder the multiple candidate blocks according to their corresponding costs to form a reordered merge candidate block list, determine one or more target candidate blocks from the reordered merge candidate block list, generate prediction data for the current block based on the inheritance information of one or more target candidate blocks, and encode the current block based on the prediction data. In addition, the operation of calculating the corresponding cost of each of the multiple candidate blocks may include: calculating the cost of each candidate block according to the spatial distance between the previously encoded / decoded blocks of each candidate block and the current block, wherein the larger the spatial distance, the greater the cost; and / or, calculating the cost of each candidate block by a template matching method.

[0156] The flowchart shown is intended to illustrate examples of video encoding and decoding according to the present invention. Those skilled in the art can modify each step, rearrange the steps, split the steps, or combine the steps to practice the invention without departing from its spirit. In this disclosure, specific syntax and semantics are used to illustrate examples of embodiments of the invention. Those skilled in the art can practice the invention by substituting equivalent syntax and semantics without departing from its spirit.

[0157] The above description is intended to enable those skilled in the art to practice the invention in the context of specific applications and their requirements. Various modifications to the described embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments. Therefore, the invention is not intended to be limited to the specific embodiments shown and described, but rather to be given the broadest scope consistent with the principles and novel features disclosed herein. In the above detailed description, various specific details have been set forth to provide a thorough understanding of the invention. However, the invention can be practiced by those skilled in the art.

[0158] As described above, embodiments of the present invention can be implemented through various hardware, software code, or a combination of both. For example, embodiments of the present invention may be program code integrated into one or more circuits in a video compression chip, or integrated into video compression software to perform the processes described herein. Embodiments of the present invention may also be program code to be executed on a digital signal processor (DSP) to perform the processes described herein. The present invention may also relate to multiple functions performed by a computer processor, digital signal processor, microprocessor, or field-programmable gate array (FPGA). These processors can be configured to perform specific tasks according to the invention, defining the specific methods embodied in the invention by executing machine-readable software code or firmware code. The software code or firmware code can be developed in different programming languages ​​and different formats or styles. The software code can also be compiled for different target platforms. However, different code formats, styles, and languages ​​of the software code, as well as other means of configuring the code to perform tasks according to the invention, do not depart from the spirit and scope of the invention.

[0159] This invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The examples described are to be regarded as illustrative in all respects, not limiting. Therefore, the scope of the invention should be indicated by the appended claims rather than the foregoing description. All variations within the meaning and equivalence of the claims should be included within its scope.

Claims

1. A video encoding / decoding method, comprising: Receive input data associated with a current block of a current image of a video, wherein the input data includes pixel data to be encoded at the encoder end or data associated with the current block to be decoded at the decoder end, and wherein the current block is encoded and decoded in intra-frame mode; Construct a merge candidate list for the current block, wherein the merge candidate list includes multiple candidates, each candidate including inheritance information inherited from previously encoded / decoded blocks and matched with the target intra-frame mode; Calculate the corresponding cost for each candidate; The multiple candidates are reordered based on the cost of each candidate to form a reordered merged candidate list; One or more target candidates are determined from the reordered list of merge candidates; Predictive data for the current block is generated based on inheritance information from one or more target candidates; and Encode or decode the current block based on the predicted data. The operation of calculating the corresponding cost for each of the plurality of candidates includes: The cost of each candidate block is calculated based on the spatial distance between the previous codec block and the current block, wherein the larger the spatial distance, the greater the cost; and / or The cost of each candidate block is calculated using a template matching method.

2. The video encoding and decoding method as described in claim 1, characterized in that, The plurality of candidates are selected from a set of the following: spatially adjacent candidates, spatially non-adjacent candidates, historical candidates, time-based candidates, and / or default candidates.

3. The video encoding and decoding method as described in claim 1, characterized in that, The inheritance information of the candidate previous codec block includes the type of codec mode and / or prediction information that matches the codec mode of the previous codec block.

4. The video encoding and decoding method as described in claim 3, characterized in that, The target intra-frame mode includes at least one of the following modes: Decoder-side Intra-Frame Mode Derivation (DIMD) mode, Template-based Intra-Frame Mode Derivation (TIMD) mode, Extrapolation Filter-based Intra-Frame Prediction (EIP) mode, Template-based Multi-Reference Line Intra-Frame Prediction (TMRL) mode, Spatial Geometric Partitioning (SGPM) mode, Intra-Frame Sub-Partitioning (ISP) mode, Intra-Frame Template Matching Prediction (IntraTMP) mode, Matrix-based Intra-Frame Prediction (MIP), Intra-Frame Hybrid Merging mode, or a combination thereof.

5. The video encoding and decoding method as described in claim 1, characterized in that, The operation of calculating the cost of each candidate using the template matching method includes: Determine the previously reconstructed template that is adjacent to the current block; Based on the inheritance information of each candidate, multiple predicted values ​​for multiple samples of the template are generated; and The cost for each candidate is generated based on the difference between the multiple predicted values ​​and multiple reconstructed values ​​of the multiple samples of the template.

6. The video encoding / decoding method as described in claim 5, characterized in that, The template includes the left reconstruction region and / or the top reconstruction region of the current block; When the template includes the left-side reconstruction region, the height of the left-side reconstruction region is greater than or equal to the height of the current block; or When the template includes the upper reconstruction area, the width of the upper reconstruction area is greater than or equal to the width of the current block.

7. The video encoding and decoding method as described in claim 1, characterized in that, The cost for each candidate is generated based on all or part of the pixels of the template.

8. The video encoding and decoding method as described in claim 4, characterized in that, If the type of the candidate encoding / decoding mode is the DIMD mode, then the prediction information includes at least one of the following: One or more histogram values ​​from multiple available DIMD intra-prediction modes; One or more intra-frame prediction modes suggested by the one or more histogram values; DIMD weighting information and / or fusion indication; or Reference line information and / or wide-angle conditions; or If the type of the candidate encoding / decoding mode is the TIMD mode, then the prediction information includes at least one of the following: One or more TIMD cost values ​​for multiple available TIMD intra-prediction modes; One or more intra-frame prediction modes suggested by the one or more TIMD cost values; TIMD weighting information and / or fusion indication; or Reference line information and / or wide-angle conditions; or If the type of the candidate encoding / decoding mode is the MRL mode, then the prediction information includes at least one of the following: One or more reference lines combined with one or more intra-prediction modes; One or more intra-frame prediction modes recommended by TIMD cost; Weighted information and / or fusion indications; or Reference line information and / or wide-angle conditions; or If the type of the candidate encoding / decoding mode is the EIP mode, the prediction information includes at least one of the following: The shape of the filter; All or part of the filter coefficients of the filter; or A template for deriving the plurality of filter coefficients.

9. The video encoding and decoding method as described in claim 4, characterized in that, When the type of the candidate codec mode is the intra-frame mixing and merging mode, the inheritance information also includes the enabled codec mode type.

10. The video encoding and decoding method as described in claim 4, characterized in that, The operation of calculating the cost of each of the plurality of candidates further includes: When the candidate's codec mode type is the DIMD mode, the calculated cost of the candidate is reduced.

11. The video encoding and decoding method as described in claim 4, characterized in that, The operation of calculating the cost of each of the plurality of candidates further includes: When the candidate encoding / decoding mode type is the TIMD mode or the EIP mode, the calculated cost of the candidate is increased.

12. The video encoding and decoding method as described in claim 1, characterized in that, The operation of reordering the plurality of candidates according to the corresponding costs to form the reordered merged candidate list further includes: When the cost of a candidate in the reordered merge candidate list is less than or equal to a predetermined threshold compared to the cost of its predecessor, the candidate is removed from the reordered merge candidate list or moved to the end of the reordered merge candidate list.

13. The video encoding and decoding method as described in claim 1, characterized in that, The indices of one or more target candidates in the reordered merge candidate list are either explicitly sent or implicitly set.

14. An apparatus for video encoding and decoding, comprising one or more electronic circuits or a processor, wherein, The one or more electronic circuits or processors are configured to perform a plurality of operations, including: Receive input data associated with a current block of a current image of a video, wherein the input data includes pixel data to be encoded at the encoder end or data associated with the current block to be decoded at the decoder end, and wherein the current block is encoded and decoded in intra-frame mode; Construct a merge candidate list for the current block, wherein the merge candidate list includes multiple candidates, each candidate including inheritance information inherited from previously encoded / decoded blocks and matched with the target intra-frame mode; Calculate the corresponding cost for each candidate; The multiple candidates are reordered based on the cost of each candidate to form a reordered merged candidate list; One or more target candidates are determined from the reordered list of merge candidates; Predictive data for the current block is generated based on inheritance information from one or more target candidates; and Encode or decode the current block based on the predicted data. The operation of calculating the corresponding cost for each of the plurality of candidates includes: The cost of each candidate block is calculated based on the spatial distance between the previous codec block and the current block, wherein the larger the spatial distance, the greater the cost; and / or The cost of each candidate block is calculated using a template matching method.