Intra-frame prediction method, electronic device, and storage medium

By selecting appropriate filter shapes and coefficients for luminance blocks with large aspect ratios in video encoding and decoding technology, the problem of poor intra-frame prediction performance in existing technologies is solved, improving prediction performance and reducing computational complexity.

WO2026081847A1PCT designated stage Publication Date: 2026-04-23ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
ZTE CORP
Filing Date
2025-09-28
Publication Date
2026-04-23

AI Technical Summary

Technical Problem

In existing video encoding and decoding technologies, intra-frame prediction based on extrapolation filters performs poorly for luminance blocks with large aspect ratios, leaving room for optimization.

Method used

An intra-frame prediction method is provided, which selects appropriate filter shapes and coefficients by determining filters with different shapes and coefficients for intra-frame prediction of luma blocks, including EIP derivation mode and EIP merging mode, to optimize prediction performance.

Benefits of technology

It improves the performance of intra-frame prediction, reduces computational complexity, and increases the efficiency of video encoding and decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025124735_23042026_PF_FP_ABST
    Figure CN2025124735_23042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses an intra-frame prediction method, an electronic device, and a storage medium. The intra-frame prediction method comprises: determining a filter shape and a filter coefficient of a filter, wherein the filter shape comprises at least one of a first shape and a second shape, and the first shape is different from the second shape; determining a target prediction block of a luma block based on the filter shape and the filter coefficient of the filter; and determining an intra prediction angle based on the target prediction block, and selecting a transform kernel of the luma block based on the intra prediction angle.
Need to check novelty before this filing date? Find Prior Art

Description

Intra-frame prediction methods, electronic devices and storage media Technical Field

[0001] This application relates to the field of encoding and decoding technology, such as intra-frame prediction methods, electronic devices, and storage media. Background Technology

[0002] Enhanced Compression Model (ECM) is an advanced standard for video coding and decoding. In ECM, Extrapolation Filter-Based Intra Prediction (EIP) mode is used for intra-frame prediction. EIP mode uses filters in three shapes: 4x4, 2x8, and 8x2. It specifies that luma blocks larger than 32x32 and smaller than 64 (e.g., 4x8, 8x4, 8x8) are not used for intra-frame prediction using EIP mode. For luma blocks with relatively large aspect ratios (e.g., 4x32, 32x4), filters with shapes of 2x8 and 8x2 are better suited to these luma blocks than filters with a 4x4 shape, but the prediction performance is still not ideal, and there is room for optimization. Summary of the Invention

[0003] This application provides an intra-frame prediction method, comprising: determining a filter shape and filter coefficients of a filter, wherein the filter shape includes at least one of a first shape and a second shape, and the first shape and the second shape are different; determining a target prediction block of a lumen block based on the filter shape and filter coefficients of the filter; determining an intra-frame prediction angle based on the target prediction block; and selecting a transform kernel of the lumen block based on the intra-frame prediction angle.

[0004] This application provides an electronic device, including: a processor; the processor is configured to implement the above-described intra-frame prediction method when executing a computer program.

[0005] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described intra-frame prediction method. Attached Figure Description

[0006] Figure 1 is a schematic diagram of a block-based hybrid video coding framework;

[0007] Figure 2 is a schematic diagram of a block-based hybrid video decoding framework;

[0008] Figure 3 is a flowchart illustrating an intra-frame prediction method provided in one embodiment;

[0009] Figure 4 is a schematic diagram of a filter of a first shape provided in one embodiment;

[0010] Figure 5 is a schematic diagram of a filter of a second shape provided in one embodiment;

[0011] Figure 6 is a diagram showing the positional relationship between a luminance block and a reconstructed region according to an embodiment;

[0012] Figure 7 is a flowchart illustrating a method for determining a first prediction block according to an embodiment;

[0013] Figure 8 is a schematic diagram of a filter sliding in a diagonal scanning manner within a brightness block according to an embodiment;

[0014] Figure 9 is a schematic diagram of three cases for calculating predicted pixels provided in one embodiment;

[0015] Figure 10 is a flowchart illustrating another method for determining a first prediction block according to an embodiment;

[0016] Figure 11 is a flowchart illustrating another method for determining a first prediction block according to an embodiment;

[0017] Figure 12 is a flowchart illustrating another method for determining a first prediction block according to an embodiment;

[0018] Figure 13 is a schematic diagram of an intra-frame prediction device provided in an embodiment;

[0019] Figure 14 is a schematic diagram of the structure of an electronic device provided in one embodiment. Detailed Implementation

[0020] Figure 1 is a schematic diagram of a block-based hybrid video coding framework. As shown in Figure 1, the block-based hybrid video coding process includes: 1) dividing the current block according to several partitioning types; 2) performing prediction based on the partitioned results, mainly involving intra-frame prediction and inter-frame prediction, which are respectively used to remove spatial redundancy and temporal redundancy; 3) subtracting the predicted reconstructed image from the original image, and further reducing redundancy through transformation and quantization of the residual, and then performing binary encoding through entropy coding; 4) eliminating block artifacts and other problems through post-processing modules such as deblocking filtering and adaptive sample offset.

[0021] Therefore, it can be seen that raw YUV can be compressed into video through several key modules: prediction, transformation, quantization, entropy coding, bitrate control, and post-processing. Specifically, compression is mainly achieved from the perspectives of temporal redundancy and spatial redundancy.

[0022] Figure 2 is a schematic diagram of a block-based hybrid video decoding framework. As shown in Figure 2, the video decoding process includes: 1) decoding the encoded binary bitstream; 2) performing inverse quantization and inverse transform on the decoded result; 3) adding the prediction result based on mode selection with the result after inverse quantization and inverse transform to obtain the reconstructed image; 4) performing post-processing on the reconstructed image, namely, operations such as de-blocking filter (DBF), sample adaptive offset (SAO), and adaptive loop filter (ALF), and finally storing it in the decoded image buffer.

[0023] Video coding standards, whether AVS4, H.267, or VVC, all adopt the aforementioned block-based hybrid video coding and decoding framework. In ECM, the EIP mode is used for intra-frame prediction. The filters used in EIP mode include three shapes: 4x4, 2x8, and 8x2. It is stipulated that luma blocks larger than 32x32 and smaller than 64 (such as 4x8, 8x4, and 8x8) will not use EIP mode for intra-frame prediction. For luma blocks with relatively large aspect ratios (such as 4x32 and 32x4), filters with shapes of 2x8 and 8x2 are better suited to these luma blocks than filters with a 4x4 shape, but the prediction performance is still unsatisfactory, and there is room for optimization.

[0024] The intra-frame prediction method provided in this application can be applied to the above-mentioned block-based hybrid video coding and decoding frameworks, and can select appropriate filters for luma blocks of various sizes, thereby improving prediction performance and reducing computational complexity.

[0025] The following describes the intra-frame prediction method, electronic equipment, and its technical effects.

[0026] Figure 3 is a flowchart illustrating an intra-frame prediction method according to an embodiment. As shown in Figure 3, the method provided in this embodiment is applicable to electronic devices, such as encoding devices or decoding devices. The method includes steps S310-S330.

[0027] S310. Determine the filter shape and filter coefficients of the filter, wherein the filter shape includes at least one of a first shape and a second shape, and the first shape and the second shape are different.

[0028] Intra-frame prediction includes various modes, such as Decoder-side Intra Mode Derivation (DIMD), Spatial Geometric Partitioning Mode (SGPM), EIP, and Intra Template Matching Prediction (IntraTMP). The intra-frame prediction method provided in this application primarily targets the EIP mode and can be applied in both video encoding and decoding processes. Correspondingly, the luma block can be either a coding block or a decoding block. When applied in video encoding, the electronic device performs video encoding, and the luma block is the coding block; when applied in video decoding, the electronic device performs video decoding, and the luma block is the decoding block.

[0029] In one embodiment, the EIP mode includes the EIP derivation mode and the EIP merging mode, therefore the filter also includes the filter corresponding to the EIP derivation mode and the filter corresponding to the EIP merging mode.

[0030] The shape of the filter includes at least one of a first shape and a second shape.

[0031] Figure 4 is a schematic diagram of a filter of a first shape provided in one embodiment. As shown in Figure 4, the first shape may include 4x4, 2x8, or 8x2, that is, the first shape is the filter shape commonly used in EIP mode (also known as the original shape or original shape). The filter of the first shape has 16 taps, of which 15 taps are used as EIP inputs and 1 tap is used as an EIP output.

[0032] Figure 5 is a schematic diagram of a second-shape filter provided in one embodiment. As shown in Figure 5, the second shape can include 16x1, 1x16, 2x2, 1x4, 4x1, 3x3, and 5x5, that is, the second shape is a newly added filter shape in the EIP mode (also called a new shape). The number of taps of the filter of the second shape can be 16 or not 16. For example, the 16x1 and 1x16 filters have 16 taps, of which 15 taps are used as EIP inputs and 1 tap is used as an EIP output; the 2x2, 1x4, and 4x1 filters have 4 taps, of which 3 taps are used as EIP inputs and 1 tap is used as an EIP output; the 3x3 filter has 9 taps, of which 8 taps are used as EIP inputs and 1 tap is used as an EIP output; the 5x5 filter has 25 taps, of which 24 taps are used as EIP inputs and 1 tap is used as an EIP output.

[0033] Therefore, although the first shape and the second shape are different, the number of taps of the filter of the first shape can be equal to or unequal to the number of taps of the filter of the second shape.

[0034] When the number of taps of the first-shaped filter is equal to the number of taps of the second-shaped filter, the second shape includes at least one of 16x1 and 1x16; when the number of taps of the first-shaped filter is not equal to the number of taps of the second-shaped filter, the second shape includes at least one of 2x2, 1x4, 4x1, 3x3, and 5x5.

[0035] In one embodiment, this application can determine the filter shape and filter coefficients from the EIP derivation mode and the EIP merging mode, respectively. Specifically, for the filter corresponding to the EIP derivation mode, the filter shape is determined based on the size of the luma block, and the filter coefficients are derived; for the filter corresponding to the EIP merging mode, the filter shape and filter coefficients corresponding to the previously encoded EIP derivation mode or EIP merging mode are inherited.

[0036] For the filter corresponding to the EIP derivation mode: first, the filter shape needs to be determined based on the size of the luma block, and then the filter coefficients are derived.

[0037] The size of the luminance block and the filter shape satisfy at least one of the following relationships: Relationship 1: When the size of the luminance block is 4x16, the filter shape includes a first shape and a second shape, the first shape including 4x4, 2x8, and 8x2, and the second shape including 16x1 and 1x16; Relationship 2: When the size of the luminance block is 16x4, the filter shape includes a first shape and a second shape, the first shape including 4x4, 2x8, and 8x2, and the second shape including 16x1 and 1x16; Relationship 3: When the size of the luminance block is 8x32, the filter shape includes a first shape and a second shape, the first shape including 4x4, 2x8, and 8x2, and the second shape including 16x1 and 1x16; 4. When the luma block size is 32x8, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8, and 8x2, and the second shape includes 16x1 and 1x16. 5. When the luma block size is 4x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 2x8, and the second shape includes 1x16. 6. When the luma block size is 32x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 8x2, and the second shape includes 16x1. 7. When the luma block size is 4x4, 4x8, or 8x4, the luma block allows intra-frame prediction using the EIP derivation mode. In this case, the filter shape includes a second shape, which includes 2x2, 1x4, 4x1, and 3x3. 8. When the luma block size is 32x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8, and 8x2, and the second shape includes 5x5.

[0038] Figure 6 is a diagram illustrating the positional relationship between a luminance block and a reconstruction region according to an embodiment. As shown in Figure 6, the reconstruction region is typically located above, to the left of, or both above and to the left of the luminance block. Filter coefficients can be derived based on the reconstruction region surrounding the luminance block. For example, the filter can be moved horizontally or vertically within the reconstruction region with a stride of one pixel. Using a method similar to that of a convolutional cross-component model (CCCM) for calculating filter coefficients, an autocorrelation matrix and a cocorrelation vector can be constructed, and the filter coefficients can be derived from these.

[0039] For filters corresponding to the EIP merging mode: simply inherit the filter shape and filter coefficients from the previously encoded EIP derivation mode or EIP merging mode. During video decoding, the EIP merging flag can be decoded to determine whether to use the EIP merging mode.

[0040] The EIP merging list includes candidate patterns that are spatially adjacent, non-spatially adjacent, temporally adjacent, and historical candidate patterns. The EIP merging list contains a maximum of 12 candidate patterns, which are then reordered based on a template, and the top 6 candidate patterns with the lowest cost are selected.

[0041] S320. Determine the target prediction block for the luminance block based on the filter shape and filter coefficients.

[0042] In this application, the target prediction block of the lumen block refers to the optimal prediction block obtained by performing intra-frame prediction on the lumen block using all the filters determined in S310.

[0043] The method for determining the target prediction block of the luminance block based on the filter shape and filter coefficients may include the following S1-S3.

[0044] S1: For the filter corresponding to the EIP derivation mode, determine the first prediction block of the luminance block based on the filter shape and filter coefficients.

[0045] In a first possible implementation, Figure 7 is a flowchart illustrating a method for determining a first prediction block according to an embodiment. As shown in Figure 7, it includes steps S710-S730.

[0046] S710. For a filter of the first shape, determine the third prediction block of the luminance block based on the filter shape and filter coefficients.

[0047] In one embodiment, the number of filters of the first shape is at least one, and for each filter of the first shape, S710 needs to be executed to determine the third prediction block of the luma block when performing intra-frame prediction using the filter of the first shape. That is, one filter of the first shape corresponds to one third prediction block of the luma block.

[0048] For example, if the filter of the first shape is a 4x4 filter A, the filter A can be slid in a diagonal scanning manner within the brightness block, and the predicted pixel at each slid is determined. The predicted pixel is calculated based on the pixel value at the position of filter A and the filter coefficient. Based on the predicted pixel, the third prediction block of the brightness block is determined.

[0049] Figure 8 is a schematic diagram of a filter sliding diagonally within a luminance block according to an embodiment. As shown in Figure 8, at the start of prediction, the position of filter A is such that the EIP output tap of filter A coincides with the pixel in the first row and first column of the luminance block. Based on the pixel value and filter coefficient at the corresponding position of the EIP input tap of filter A, the predicted pixel in the first row and first column of the luminance block is calculated. Then, filter A is slid to the right in a step of one pixel. At this time, the position of filter A is such that the EIP output tap of filter A coincides with the pixel in the second row and second column of the luminance block. Based on the pixel value and filter coefficient at the corresponding position of the EIP input tap of filter A, the predicted pixel in the second row and second column of the luminance block is calculated. Next, slide filter A to the lower left in a step of one pixel. At this point, filter A is positioned such that the EIP output tap of filter A coincides with the pixel in the first column of the second row of the luminance block. Based on the pixel value at the corresponding position of the EIP input tap of filter A and the filter coefficients, calculate the predicted pixel in the first column of the second row of the luminance block. Then, slide filter A to the upper right in a step of one pixel. At this point, filter A is positioned such that the EIP output tap of filter A coincides with the pixel in the third column of the first row of the luminance block... and so on, until the predicted pixels of the entire luminance block are obtained, thus forming the third prediction block of the luminance block.

[0050] The predicted pixel for each slide can be calculated based on the following formula:

[0051] ;in, This represents the predicted pixel at the current block position (x, y), where m is the number of EIP input taps of the filter. Let i be the i-th coefficient of the filter. To reconstruct samples or already predicted samples, and It represents the current position offset, and B represents the bit depth.

[0052] Because the location of the filter varies, the calculation of the predicted pixel may vary. Figure 9 is a schematic diagram of three cases for calculating the predicted pixel provided in one embodiment. As shown in Figure 9, in Figure 9(a), the input of the filter is all reconstructed samples (i.e., samples from the reconstructed region); in Figure 9(b), the input of the filter is partly reconstructed samples and partly already predicted samples; and in Figure 9(c), the input of the filter is all already predicted samples.

[0053] S720. For the second-shaped filter, determine the fourth prediction block of the luminance block based on the filter shape and filter coefficients.

[0054] In one embodiment, the number of filters of the second shape is at least one, and for each filter of the second shape, S720 needs to be executed to determine the fourth prediction block of the luma block when performing intra-frame prediction using the filter of the second shape. That is, one filter of the second shape corresponds to the fourth prediction block of one luma block.

[0055] For example, if the filter of the second shape is a 16x1 filter B, the filter B can be slid in a diagonal scanning manner within the luminance block, and the predicted pixel at each slid is determined. The predicted pixel is calculated based on the pixel value at the position of the filter B and the filter coefficient; based on the predicted pixel, the fourth prediction block of the luminance block is determined.

[0056] The method by which the filter of the second shape slides diagonally within the brightness block, and the method for calculating the predicted pixel at each slide, are similar to the method described in S710 above for the filter of the first shape to slide diagonally within the brightness block, and the method for calculating the predicted pixel at each slide. For the sake of brevity, they will not be repeated here.

[0057] S730. Select the prediction block with the lowest rate-distortion optimization (RDO) cost between the third and fourth prediction blocks as the first prediction block.

[0058] After steps S710 and S720, at least one third prediction block and at least one fourth prediction block can be determined, and the RDO cost of each prediction block can be determined. The smaller the RDO cost, the better the prediction performance of the filter; the larger the RDO cost, the worse the prediction performance of the filter. Therefore, the prediction block with the smallest RDO cost among the third and fourth prediction blocks is selected as the first prediction block, which means that the filter with the optimal shape and its corresponding first prediction block are determined in the filter corresponding to the EIP derivation mode.

[0059] In the first possible implementation, there is no order of execution between S710 and S720. S710 can be executed first, followed by S720; or S720 can be executed first, followed by S710; or S710 and S720 can be executed simultaneously.

[0060] In a second possible implementation, Figure 10 is a flowchart illustrating another method for determining the first prediction block provided in an embodiment. As shown in Figure 10, it includes steps S810-S850.

[0061] S810. For a filter of the first shape, determine the third prediction block of the luminance block based on the filter shape and filter coefficients.

[0062] The method of S810 is the same as that of S710 above, and can be referred to the description of S710 above, which will not be repeated here.

[0063] S820. Determine whether the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is a preset shape. If yes, proceed to S830; otherwise, proceed to S840-S850.

[0064] After S810 is executed, the RDO cost of each third prediction block can be determined, and the filter shape corresponding to the prediction block with the minimum RDO cost can be determined. If the filter shape is a preset shape, it means that the current prediction effect is good enough and there is no need to use a second-shape filter for prediction (i.e., no secondary filtering is needed); if the filter shape is not a preset shape, it means that the current prediction effect may not be good enough and a second-shape filter needs to be used for prediction for further judgment.

[0065] S830. Select the prediction block with the lowest RDO cost in the third prediction block as the first prediction block.

[0066] If the filter shape is a preset shape, then the prediction block with the lowest RDO cost in the third prediction block can be directly used as the first prediction block. This determines the filter with the optimal shape among the filters corresponding to the EIP derivation mode and its corresponding first prediction block.

[0067] S840. For the second-shaped filter, determine the fourth prediction block of the luminance block based on the filter shape and filter coefficients.

[0068] S850, Select the prediction block with the lowest RDO cost among the third and fourth prediction blocks as the first prediction block.

[0069] The methods of S840-S850 are the same as those of S720-S730 above, and can be referred to the descriptions of S720-S730 above, which will not be repeated here.

[0070] In the second possible implementation, unlike the first, there is a strict execution order between S810 and S850. Furthermore, compared to the first implementation, the determination of whether secondary filtering is needed effectively reduces computational complexity, saves computing power, and improves prediction efficiency while maintaining prediction accuracy.

[0071] In a third possible implementation, Figure 11 is a flowchart illustrating another method for determining the first prediction block provided in an embodiment. As shown in Figure 11, it includes steps S910-S940.

[0072] S910. For a filter of the first shape, determine the third prediction block of the luminance block based on the filter shape and filter coefficients.

[0073] The method of S910 is the same as that of S710 above, and can be referred to the description of S710 above, which will not be repeated here.

[0074] S920. For the second-shaped filter, determine the fourth prediction block of the luminance block based on the filter shape and filter coefficients.

[0075] The method of S920 is the same as that of S720 above, and can be referred to the description of S720 above, which will not be repeated here.

[0076] S930. Based on preset rules, select at least one group of prediction blocks for weighting to determine the fifth prediction block. Each group of prediction blocks includes a third prediction block and a fourth prediction block.

[0077] S940. Select the prediction block with the lowest RDO cost among the third, fourth, and fifth prediction blocks as the first prediction block.

[0078] In the third possible implementation, to further improve the prediction results, at least one set of prediction blocks can be selected and weighted based on preset rules to determine the fifth prediction block. Each set of prediction blocks includes a third prediction block and a fourth prediction block. The fifth prediction block also participates in the RDO cost determination. The prediction block with the smallest RDO cost among the third, fourth, and fifth prediction blocks is selected as the first prediction block. This determines the filter with the optimal shape in the filter corresponding to the EIP derivation mode (which may include the two filters involved in the weighting) and its corresponding first prediction block.

[0079] In the third possible implementation, there is no order of execution between S910 and S920. S910 can be executed first, followed by S920; S920 can be executed first, followed by S910; or S910 and S920 can be executed simultaneously.

[0080] In a fourth possible implementation, Figure 12 is a flowchart illustrating another method for determining the first prediction block provided in an embodiment. As shown in Figure 12, it includes steps S1010-S1060.

[0081] S1010. For a filter of the first shape, determine the third prediction block of the luminance block based on the filter shape and filter coefficients.

[0082] S1020. Determine whether the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is a preset shape. If yes, proceed to S1030; otherwise, proceed to S1040-S1060.

[0083] S1030. Select the prediction block with the smallest RDO cost in the third prediction block as the first prediction block.

[0084] S1040. For the second-shaped filter, determine the fourth prediction block of the luminance block based on the filter shape and filter coefficients.

[0085] The methods in S1010-S1040 are the same as those in S810-S840 above, and can be referred to the descriptions of S810-S840 above, which will not be repeated here.

[0086] S1050. Based on preset rules, select at least one group of prediction blocks for weighting to determine the fifth prediction block. Each group of prediction blocks includes a third prediction block and a fourth prediction block.

[0087] S1060. Select the prediction block with the lowest RDO cost among the third, fourth, and fifth prediction blocks as the first prediction block.

[0088] In the fourth possible implementation, there is a strict execution order between S1010 and S1060. Compared with the three possible implementations mentioned above: 1) Because a judgment is made on whether secondary filtering is needed, the computational complexity can be effectively reduced, saving computing power and improving prediction efficiency while ensuring prediction performance. 2) Since the fifth prediction block also participates in the RDO cost determination, the prediction block with the smallest RDO cost among the third, fourth, and fifth prediction blocks is selected as the first prediction block. This determines the filter with the optimal shape (possibly including the two filters involved in the weighting) and its corresponding first prediction block in the filter corresponding to the EIP derivation mode. This can further improve the prediction results.

[0089] In one embodiment, the preset shape is 4x4.

[0090] In one embodiment, the preset rules include at least one of the following rules: Rule 1: For a set of prediction blocks, the filter shape corresponding to the third prediction block is 2x8 and the filter shape corresponding to the fourth prediction block is 1x16; Rule 2: For a set of prediction blocks, the filter shape corresponding to the third prediction block is 8x2 and the filter shape corresponding to the fourth prediction block is 16x1.

[0091] S2: For the filter corresponding to the EIP merging mode, determine the second prediction block of the luminance block based on the filter shape and filter coefficients.

[0092] For filters corresponding to EIP merging modes, their filter shape and filter coefficients are directly inherited from the filter shape and filter coefficients of previously encoded EIP derivation modes or EIP merging modes. The filter shape may be either a first shape or a second shape.

[0093] When the filter shape corresponding to the EIP merging mode is the first shape, the second prediction block of the luma block can be determined by referring to the method in S710 above. When the filter shape corresponding to the EIP merging mode is the second shape, the second prediction block of the luma block can be determined by referring to the method in S720 above.

[0094] S3: Select the prediction block with the lowest RDO cost between the first and second prediction blocks as the target prediction block.

[0095] Since a smaller RDO cost indicates better filter prediction performance, and a larger RDO cost indicates worse filter prediction performance, the prediction block with the smallest RDO cost between the first and second prediction blocks is selected as the target prediction block. This determines the filter with the optimal shape and its corresponding optimal prediction block in both the EIP derivation mode and the EIP merging mode.

[0096] S330. Determine the intra-frame prediction angle based on the target prediction block, and select the transform kernel of the luma block based on the intra-frame prediction angle.

[0097] In one embodiment, DIMD can be used to analyze the gradient and magnitude of the target prediction block to obtain a gradient histogram, thereby determining the intra-frame prediction angle, and selecting the transform kernel of the luma block based on the intra-frame prediction angle.

[0098] The transform kernel of the luminance block can be a Multiple Transform Selection (MTS) transform kernel, a low-frequency non-separable transform (LFNST) transform kernel, or a Non-Separable Primary Transform (NSPT) transform kernel.

[0099] Below are some examples to illustrate the intra-frame prediction method provided in this application.

[0100] Example 1

[0101] 1. For filters corresponding to EIP derivation modes, determine the filter shape based on the size of the luma block and derive the filter coefficients; for filters corresponding to EIP merging modes, inherit the filter shape and filter coefficients corresponding to the previously encoded EIP derivation or EIP merging modes.

[0102] The number of taps in the first-shape filter is equal to the number of taps in the second-shape filter, which includes 16x1 and 1x16 shapes. The second-shape filter is only suitable for luma blocks with a relatively large aspect ratio, such as luma blocks with dimensions of 4x32, 32x4, 8x32, 32x8, 4x16, and 16x4. Specifically, for luma blocks with dimensions of 4x32, 32x4, 8x32, 32x8, 4x16, and 16x4:

[0103] When the size of the luminance block is 4x16, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0104] When the size of the luminance block is 16x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0105] When the size of the luminance block is 8x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0106] When the size of the luminance block is 32x8, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0107] When the size of the luminance block is 4x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 2x8, and the second shape includes 1x16.

[0108] When the size of the luminance block is 32x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 8x2, and the second shape includes 16x1.

[0109] Other sizes of luminance blocks still use filters of the first shape, which includes 4x4, 2x8 and 8x2.

[0110] 2. Based on the filters obtained from the above operations, slide the filters in a diagonal scanning manner within the luminance block and determine the predicted pixels at each slide to obtain the prediction block corresponding to each filter, and select the optimal prediction block from them.

[0111] Since the length or width of the filter in the second shape has increased to 16, the size of the reconstruction region also needs to be increased accordingly during the prediction process.

[0112] 3. Use DIMD to analyze the gradient and magnitude of the optimal prediction block to obtain the gradient histogram, and then determine the intra-frame prediction angle. Select the transform kernel of the luma block based on the intra-frame prediction angle.

[0113] Example 2

[0114] 1. For filters corresponding to EIP derivation modes, determine the filter shape based on the size of the luma block and derive the filter coefficients; for filters corresponding to EIP merging modes, inherit the filter shape and filter coefficients corresponding to the previously encoded EIP derivation or EIP merging modes.

[0115] The number of taps in the first-shape filter is equal to the number of taps in the second-shape filter, which includes 16x1 and 1x16 shapes. The second-shape filter is only suitable for luma blocks with a relatively large aspect ratio, such as luma blocks with dimensions of 4x32, 32x4, 8x32, 32x8, 4x16, and 16x4. Specifically, for luma blocks with dimensions of 4x32, 32x4, 8x32, 32x8, 4x16, and 16x4:

[0116] When the size of the luminance block is 4x16, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0117] When the size of the luminance block is 16x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0118] When the size of the luminance block is 8x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0119] When the size of the luminance block is 32x8, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0120] When the size of the luminance block is 4x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 2x8, and the second shape includes 1x16.

[0121] When the size of the luminance block is 32x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 8x2, and the second shape includes 16x1.

[0122] Other sizes of luminance blocks still use filters of the first shape, which includes 4x4, 2x8 and 8x2.

[0123] 2. Based on the filters obtained from the above operations, slide the filters in a diagonal scanning manner within the luminance block and determine the predicted pixels at each slide to obtain the prediction block corresponding to each filter, and select the optimal prediction block from them.

[0124] For a luminance block of a certain width and height, prediction is first performed using a filter of the first shape. After the RDO decision, there are three cases: if the optimal filter shape after the RDO decision is 4x4, then the 1x16 or 16x1 filter is no longer predicted; if the optimal filter shape after the RDO decision is 2x8, then the newly added 1x16 filter is applied to the luminance block for prediction again, and finally the 2x8 or 1x16 filter with lower RDO cost is selected; if the optimal filter shape after the RDO decision is 8x2, then the newly added 16x1 filter is applied to the luminance block for prediction again, and finally the 8x2 or 16x1 filter with lower RDO cost is selected.

[0125] Since the length or width of the filter in the second shape has increased to 16, the size of the reconstruction region also needs to be increased accordingly during the prediction process.

[0126] 3. Use DIMD to analyze the gradient and magnitude of the optimal prediction block to obtain the gradient histogram, and then determine the intra-frame prediction angle. Select the transform kernel of the luma block based on the intra-frame prediction angle.

[0127] Example 3

[0128] 1. For filters corresponding to EIP derivation modes, determine the filter shape based on the size of the luma block and derive the filter coefficients; for filters corresponding to EIP merging modes, inherit the filter shape and filter coefficients corresponding to the previously encoded EIP derivation or EIP merging modes.

[0129] The number of taps in the first-shape filter is equal to the number of taps in the second-shape filter, which includes 16x1 and 1x16 shapes. The second-shape filter is only suitable for luma blocks with a relatively large aspect ratio, such as luma blocks with dimensions of 4x32, 32x4, 8x32, 32x8, 4x16, and 16x4. Specifically, for luma blocks with dimensions of 4x32, 32x4, 8x32, 32x8, 4x16, and 16x4:

[0130] When the size of the luminance block is 4x16, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0131] When the size of the luminance block is 16x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0132] When the size of the luminance block is 8x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0133] When the size of the luminance block is 32x8, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0134] When the size of the luminance block is 4x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 2x8, and the second shape includes 1x16.

[0135] When the size of the luminance block is 32x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 8x2, and the second shape includes 16x1.

[0136] Other sizes of luminance blocks still use filters of the first shape, which includes 4x4, 2x8 and 8x2.

[0137] 2. Based on the filters obtained from the above operations, slide the filters in a diagonal scanning manner within the luminance block and determine the predicted pixels at each slide to obtain the prediction block corresponding to each filter, and select the optimal prediction block from them.

[0138] For a brightness block of a certain width and height, in addition to prediction using a filter of the first shape, prediction is also performed using a filter of the second shape. The prediction results corresponding to the first shape filter and the prediction results corresponding to the second shape filter are weighted, specifically including two methods:

[0139] Method 1

[0140] For luminance blocks of 4x16, 16x4, 8x32, and 32x8, based on predictions using five filters (4x4, 2x8, 8x2, 1x16, and 16x1), the prediction results of the 1x16 and 2x8 filters are weighted in a 1:1 or 1:3 ratio, and the prediction results of the 16x1 and 8x2 filters are weighted in the same way. These weighted results are then used as two new prediction modes to participate in the RDO decision-making process. For 4x32 and 32x4 luminance blocks... Based on the prediction using three types of filters (4x32 blocks use filters of 4x4, 2x8, and 1x16 shapes, and 32x4 blocks use filters of 4x4, 8x2, and 16x1 shapes), for 4x32 luma blocks, the prediction results of 2x8 and 1x16 filters are weighted in a 1:1 or 3:1 ratio, and the weighted result is used as a new prediction mode to participate in the RDO decision; for 32x4 blocks, they participate in the RDO decision in a similar way.

[0141] Method 2

[0142] For luminance blocks of 4x16, 16x4, 8x32, and 32x8, based on the original three filters (4x4, 2x8, and 8x2) for prediction, if the optimal filter shape after RDO decision is 4x4, no action is taken; if the optimal filter shape after RDO decision is 2x8, a newly added 1x16 filter is applied to the current luminance block for prediction, and the prediction results are weighted at a 3:1 ratio. The weighted result participates in the RDO decision as a new prediction mode. Similarly, if the optimal filter shape after RDO decision is 8x2, a newly added 16x1 filter is applied to the current luminance block for prediction, and the prediction results are weighted at a 3:1 ratio. The weighted result also participates in the RDO decision as a new prediction mode.

[0143] For 4x32 and 32x4 blocks, based on the original two types of filters (4x32 blocks use filters of 4x4 and 2x8 shapes, and 32x4 blocks use filters of 4x4 and 8x2 shapes) for prediction, for the 4x32 luma block, if the optimal filter shape after RDO decision is 4x4, no operation is performed; if the optimal filter shape after RDO decision is 2x8, a newly added 1x16 filter is applied to the current luma block for prediction, and the prediction results are weighted at a ratio of 3:1. The weighted result participates in the RDO decision as a new prediction mode; the 32x4 block participates in the RDO decision in a similar manner.

[0144] 3. Use DIMD to analyze the gradient and magnitude of the optimal prediction block to obtain the gradient histogram, and then determine the intra-frame prediction angle. Select the transform kernel of the luma block based on the intra-frame prediction angle.

[0145] Example 4

[0146] 1. For filters corresponding to EIP derivation modes, determine the filter shape based on the size of the luma block and derive the filter coefficients; for filters corresponding to EIP merging modes, inherit the filter shape and filter coefficients corresponding to the previously encoded EIP derivation or EIP merging modes.

[0147] The number of taps in the first-shape filter is not equal to the number of taps in the second-shape filter, which includes 2x2, 1x4, 4x1, 3x3, and 5x5. Because the number of taps in the second-shape filter changes compared to the first-shape filter, the number of filter coefficients that need to be derived also changes accordingly.

[0148] When the luma block size is 4x4, 4x8, or 8x4, the luma block allows for intra-frame prediction using the EIP derivation mode. In this case, the filter shape includes a second shape, which includes 2x2, 1x4, 4x1, and 3x3.

[0149] When the size of the luminance block is 32x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 5x5.

[0150] Other sizes of luminance blocks still use filters of the first shape, which includes 4x4, 2x8 and 8x2.

[0151] 2. Based on the filters obtained from the above operations, slide the filters in a diagonal scanning manner within the luminance block and determine the predicted pixels at each slide to obtain the prediction block corresponding to each filter, and select the optimal prediction block from them.

[0152] Since the number of filter taps in the second shape has changed and the shape is different from the first shape, the size of the reconstruction region is adjusted accordingly during the prediction process to prevent the filter from going out of bounds during prediction.

[0153] Furthermore, the second-shaped filter described in Example 4 can also be derived from the ideas in Examples 2 and 3, that is, the idea of ​​determining whether to add secondary filtering and weighting can also be applied.

[0154] 3. Use DIMD to analyze the gradient and magnitude of the optimal prediction block to obtain the gradient histogram, and then determine the intra-frame prediction angle. Select the transform kernel of the luma block based on the intra-frame prediction angle.

[0155] Figure 13 is a schematic diagram of an intra-frame prediction device provided in an embodiment. The device can be configured in an electronic device. As shown in Figure 13, the device includes: a filter determination module 1301, a prediction module 1302, and a transform kernel determination module 1303.

[0156] The filter determination module 1301 is configured to determine the filter shape and filter coefficients of the filter, wherein the filter shape includes at least one of a first shape and a second shape, and the first shape and the second shape are different; the prediction module 1302 is configured to determine the target prediction block of the luma block according to the filter shape and filter coefficients of the filter; the transform kernel determination module 1303 is configured to determine the intra-frame prediction angle according to the target prediction block, and select the transform kernel of the luma block according to the intra-frame prediction angle.

[0157] The intra-prediction device provided in this embodiment is to implement the intra-prediction method of the embodiment shown in Figure 3. The implementation principle and technical effect of the intra-prediction device provided in this embodiment are similar to those of the above embodiments, and will not be repeated here.

[0158] In one embodiment, the filter includes a filter corresponding to the intra-prediction EIP derivation mode based on the extrapolation filter and a filter corresponding to the EIP merging mode.

[0159] In one embodiment, the filter determination module 1301 is configured to determine the filter shape and derive the filter coefficients based on the size of the luma block for the filter corresponding to the EIP derivation mode; and to inherit the filter shape and filter coefficients corresponding to the previously encoded EIP derivation mode or EIP merging mode for the filter corresponding to the filter.

[0160] In one embodiment, the number of taps of the first-shaped filter is equal to the number of taps of the second-shaped filter, or the number of taps of the first-shaped filter is not equal to the number of taps of the second-shaped filter.

[0161] In one embodiment, the first shape includes at least one of 4x4, 2x8, and 8x2; when the number of taps of the filter of the first shape is equal to the number of taps of the filter of the second shape, the second shape includes at least one of 16x1 and 1x16; when the number of taps of the filter of the first shape is not equal to the number of taps of the filter of the second shape, the second shape includes at least one of 2x2, 1x4, 4x1, 3x3, and 5x5.

[0162] In one embodiment, when the size of the luminance block is 4x16, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8 and 8x2, and the second shape includes 16x1 and 1x16.

[0163] When the size of the luminance block is 16x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8, and 8x2, and the second shape includes 16x1 and 1x16. When the size of the luminance block is 8x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8, and 8x2, and the second shape includes 16x1 and 1x16. When the size of the luminance block is 32x8, the filter shape includes a first shape and a second shape. The first shape includes 4x4, 2x8, and 8x2, and the second shape includes 16x1 and 1x16. When the size of the luminance block is 4x32, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 2x8, and the second shape includes 1x16. When the size of the luminance block is 32x4, the filter shape includes a first shape and a second shape. The first shape includes 4x4 and 8x2, and the second shape includes 16x1.

[0164] In one embodiment, when the size of the luma block is 4x4, 4x8, or 8x4, the luma block allows intra-frame prediction using the EIP derivation mode.

[0165] In one embodiment, when the size of the luminance block is 4x4, 4x8, or 8x4, the filter shape includes a second shape, which includes 2x2, 1x4, 4x1, and 3x3; when the size of the luminance block is 32x32, the filter shape includes a first shape and a second shape, which includes 4x4, 2x8, and 8x2, and the second shape includes 5x5.

[0166] In one embodiment, the prediction module 1302 is configured to determine a first prediction block of the luminance block based on the filter shape and filter coefficients of the filter corresponding to the EIP derivation mode; and to determine a second prediction block of the luminance block based on the filter shape and filter coefficients of the filter corresponding to the EIP merging mode; and to select the prediction block with the lowest rate-distortion optimization (RDO) cost between the first and second prediction blocks as the target prediction block.

[0167] In one embodiment, the prediction module 1302 is configured to determine a third prediction block of the luminance block based on the filter shape and filter coefficients for a filter of a first shape; determine a fourth prediction block of the luminance block based on the filter shape and filter coefficients for a filter of a second shape; and determine a first prediction block based on the third and fourth prediction blocks.

[0168] In one embodiment, the prediction module 1302 is configured to, after determining the third prediction block of the luma block, determine whether the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is a preset shape; if the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is a preset shape, then the prediction block with the lowest RDO cost in the third prediction block is taken as the first prediction block; if the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is not a preset shape, then continue to execute the filter for the second shape, and determine the fourth prediction block of the luma block according to the filter shape and filter coefficients.

[0169] In one embodiment, the prediction module 1302 is configured to select the prediction block with the lowest RDO cost among the third and fourth prediction blocks as the first prediction block.

[0170] In one embodiment, the prediction module 1302 is configured to select at least one group of prediction blocks for weighting based on preset rules to determine a fifth prediction block, wherein each group of prediction blocks includes a third prediction block and a fourth prediction block; and the prediction block with the lowest RDO cost among the third prediction block, the fourth prediction block and the fifth prediction block is selected as the first prediction block.

[0171] In one embodiment, the prediction module 1302 is configured to slide the filter in a diagonal scanning manner within the brightness block and determine the predicted pixel at each slide. The predicted pixel is calculated based on the pixel value at the location of the filter and the filter coefficient. Based on the predicted pixel, a second prediction block / third prediction block / fourth prediction block of the brightness block is determined.

[0172] In one embodiment, the preset shape is 4x4.

[0173] In one embodiment, the preset rules include at least one of the following: for a set of prediction blocks, the filter shape corresponding to the third prediction block is 2x8 and the filter shape corresponding to the fourth prediction block is 1x16; for a set of prediction blocks, the filter shape corresponding to the third prediction block is 8x2 and the filter shape corresponding to the fourth prediction block is 16x1.

[0174] Figure 14 is a schematic diagram of an electronic device according to an embodiment. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown in this application, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application as described and / or claimed herein.

[0175] As shown in Figure 14, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0176] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0177] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as intra-frame prediction methods.

[0178] In some embodiments, the intra-frame prediction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more operations of the intra-frame prediction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the intra-frame prediction method by any other suitable means (e.g., by means of firmware).

[0179] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0180] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0181] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0182] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0183] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0184] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0185] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the intra-frame prediction method provided in any embodiment of this application.

[0186] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0187] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.

[0188] Any block diagram of logical flow in the accompanying drawings of this application may represent program operations, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program operations and logic circuits, modules, and functions. The computer program may be stored in memory. The memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Multifunction Discs, DVDs, or CDs), etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), and a processor based on a multi-core processor architecture.

[0189] The various processes shown above can be used to reorder, add, or delete operations. For example, the operations described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

Claims

1. An intra-frame prediction method, comprising: The filter shape and filter coefficients are determined, wherein the filter shape includes at least one of a first shape and a second shape, the first shape and the second shape being different; The target prediction block of the luminance block is determined based on the filter shape and the filter coefficients of the filter. Based on the target prediction block, the intra-frame prediction angle is determined, and the transform kernel of the luma block is selected based on the intra-frame prediction angle.

2. The intra prediction method of claim 1, wherein, The filters include filters corresponding to the intra-prediction EIP derivation mode based on extrapolation filters and filters corresponding to the EIP merging mode.

3. The intra prediction method of claim 2, wherein, The determination of the filter shape and filter coefficients includes: For the filter corresponding to the EIP derivation mode, the filter shape is determined based on the size of the luma block, and the filter coefficients are derived. For the filter corresponding to the EIP merging mode, the filter shape and filter coefficients corresponding to the previously encoded EIP derivation mode or EIP merging mode are inherited.

4. The intra prediction method of claim 1, wherein, The number of taps in the first-shaped filter is equal to the number of taps in the second-shaped filter, or the number of taps in the first-shaped filter is not equal to the number of taps in the second-shaped filter.

5. The intra prediction method of claim 4, wherein, The first shape includes at least one of 4x4, 2x8, and 8x2; The number of taps of the filter of the first shape is equal to the number of taps of the filter of the second shape, wherein the second shape includes at least one of 16x1 and 1x16; In response to the fact that the number of taps of the filter of the first shape is not equal to the number of taps of the filter of the second shape, the second shape includes at least one of 2x2, 1x4, 4x1, 3x3, and 5x5.

6. The intra-frame prediction method according to claim 3, wherein, In response to the brightness block having a size of 4x16, the filter shape includes the first shape and the second shape, the first shape including 4x4, 2x8 and 8x2, and the second shape including 16x1 and 1x16; In response to the brightness block having a size of 16x4, the filter shape includes the first shape and the second shape, the first shape including 4x4, 2x8 and 8x2, and the second shape including 16x1 and 1x16; In response to the size of the luminance block being 8x32, the filter shape includes the first shape and the second shape, the first shape including 4x4, 2x8 and 8x2, and the second shape including 16x1 and 1x16; In response to the brightness block having a size of 32x8, the filter shape includes the first shape and the second shape, the first shape including 4x4, 2x8 and 8x2, and the second shape including 16x1 and 1x16; In response to the brightness block having a size of 4x32, the filter shape includes a first shape and a second shape, the first shape including 4x4 and 2x8, and the second shape including 1x16; In response to the size of the luminance block being 32x4, the filter shape includes a first shape and a second shape, the first shape including 4x4 and 8x2, and the second shape including 16x1.

7. The intra prediction method of claim 3, wherein, In response to the size of the luma block being 4x4, 4x8, or 8x4, the luma block allows for intra-frame prediction using the EIP derivation mode.

8. The intra-frame prediction method according to claim 7, wherein, In response to the size of the luminance block being 4x4, 4x8, or 8x4, the filter shape includes a second shape, which includes 2x2, 1x4, 4x1, and 3x3; In response to the brightness block having a size of 32x32, the filter shape includes a first shape and a second shape, the first shape including 4x4, 2x8 and 8x2, and the second shape including 5x5.

9. The intra prediction method of claim 2, wherein, Determining the target prediction block of the luminance block based on the filter shape and the filter coefficients includes: For the filter corresponding to the EIP derivation mode, the first prediction block of the luminance block is determined according to the filter shape and the filter coefficients. For the filter corresponding to the EIP merging mode, the second prediction block of the luma block is determined according to the filter shape and the filter coefficients; The prediction block with the lowest rate-distortion optimization (RDO) cost between the first and second prediction blocks is selected as the target prediction block.

10. The intra prediction method of claim 9, wherein, The step of determining the first prediction block of the lumen block based on the filter shape and filter coefficients of the filter corresponding to the EIP derivation mode includes: For the filter of the first shape, the third prediction block of the luminance block is determined based on the filter shape and the filter coefficients; For the filter of the second shape, the fourth prediction block of the luminance block is determined based on the filter shape and the filter coefficients; The first prediction block is determined based on the third prediction block and the fourth prediction block.

11. The intra-frame prediction method according to claim 10, further comprising, after determining the third prediction block of the luma block: Determine whether the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is a preset shape; In response to the filter shape corresponding to the prediction block with the smallest RDO cost in the third prediction block being the preset shape, the prediction block with the smallest RDO cost in the third prediction block is taken as the first prediction block; In response to the fact that the filter shape corresponding to the prediction block with the lowest RDO cost in the third prediction block is not the preset shape, the filter for the second shape is executed, and the fourth prediction block of the luminance block is determined according to the filter shape and the filter coefficients.

12. The intra prediction method of claim 10 or 11, wherein, Determining the first prediction block based on the third prediction block and the fourth prediction block includes: The prediction block with the lowest RDO cost among the third and fourth prediction blocks is selected as the first prediction block.

13. The intra prediction method of claim 10 or 11, wherein, Determining the first prediction block based on the third prediction block and the fourth prediction block includes: Based on preset rules, at least one set of prediction blocks is selected and weighted to determine the fifth prediction block. Each set of prediction blocks includes a third prediction block and a fourth prediction block. The prediction block with the lowest RDO cost among the third, fourth, and fifth prediction blocks is selected as the first prediction block.

14. The intra prediction method of claim 9 or 10, wherein, The step of determining the second prediction block / third prediction block / fourth prediction block of the luminance block based on the filter shape and the filter coefficients includes: The filter is slid within the brightness block in a diagonal scanning manner, and the predicted pixel is determined at each slide. The predicted pixel is calculated based on the pixel value at the location of the filter and the filter coefficient. Based on the predicted pixels, determine the second prediction block, the third prediction block, and the fourth prediction block of the luminance block.

15. The intra prediction method of claim 11, wherein, The preset shape is 4x4.

16. The intra prediction method of claim 13, wherein, The preset rules include at least one of the following: For a set of prediction blocks, the filter shape corresponding to the third prediction block included in the set of prediction blocks is 2x8, and the filter shape corresponding to the fourth prediction block is 1x16; For a set of prediction blocks, the filter shape corresponding to the third prediction block in the set of prediction blocks is 8x2, and the filter shape corresponding to the fourth prediction block is 16x1.

17. An electronic device comprising: processor; The processor is configured to implement the intra-frame prediction method as described in any one of claims 1-16 when executing a computer program.

18. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the intra-frame prediction method as described in any one of claims 1-16.