Intra prediction method and apparatus, and electronic device

By selecting and determining multiple interpolation filters, the problem of insufficient accuracy in processing image texture in traditional intra-frame prediction modes is solved, and higher-precision intra-frame prediction is achieved.

WO2026138698A1PCT designated stage Publication Date: 2026-07-02VIVO MOBILE COMM CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2025-12-22
Publication Date
2026-07-02

AI Technical Summary

Technical Problem

Traditional intra-frame prediction modes have low accuracy when processing various textures in images, resulting in poor intra-frame prediction performance.

Method used

The method employs a first intra-frame prediction mode and multiple interpolation filters, selecting at least one first interpolation filter and determining a second interpolation filter according to preset conditions, to perform intra-frame prediction on the target image patch.

Benefits of technology

It improves the accuracy of intra-frame prediction, enables more flexible handling of various textures in images, and enhances prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025144159_02072026_PF_FP_ABST
    Figure CN2025144159_02072026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and discloses an intra prediction method and apparatus, and an electronic device. The intra prediction method in embodiments of the present application comprises: on the basis of a first intra prediction mode and M interpolation filters, determining at least one first interpolation filter from among the M interpolation filters, M being an integer greater than 1; determining a second interpolation filter on the basis of the at least one first interpolation filter and a preset condition; and performing intra prediction on a target image block on the basis of the first intra prediction mode and the second interpolation filter, to determine a predicted value of the target image block.
Need to check novelty before this filing date? Find Prior Art

Description

Intra-frame prediction methods, apparatus and electronic equipment

[0001] Cross-reference of related applications

[0002] This application claims priority to Chinese Patent Application No. 202411954717.X, filed in China on December 27, 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application belongs to the field of video encoding and decoding technology, specifically relating to an intra-frame prediction method, apparatus, and electronic device. Background Technology

[0004] In video coding, a frame of image is divided into many macroblocks. Predictive blocks are obtained using intra-frame prediction or inter-frame prediction. The difference between the original block and the predicted block is the residual block, which is then transformed, quantized, and entropy-coded. Traditional intra-frame prediction modes include Direct Current (DC), Planar, and angular prediction modes. These modes use the reconstructed pixels already encoded or decoded by the current coding unit as reference pixels and calculate the predicted pixels using a pre-defined model. When dealing with intra-frame prediction techniques, it is usually based on a fixed intra-frame prediction mode and interpolation filter. However, this approach cannot handle various textures in the image well, resulting in low accuracy of intra-frame prediction. Summary of the Invention

[0005] This application provides an intra-frame prediction method, apparatus, and electronic device that can solve the problem of low intra-frame prediction accuracy.

[0006] Firstly, an intra-frame prediction method is provided, executed by an encoder or decoder, the method comprising:

[0007] Based on the first intra-frame prediction mode and M interpolation filters, at least one first interpolation filter is determined from the M interpolation filters, where M is an integer greater than 1;

[0008] Based on the at least one first interpolation filter and the preset conditions, a second interpolation filter is determined;

[0009] Based on the first intra-frame prediction mode and the second interpolation filter, intra-frame prediction is performed on the target image block to determine the predicted value of the target image block.

[0010] Secondly, an intra-frame prediction apparatus is provided, comprising:

[0011] The first determining module is used to determine at least one first interpolation filter from the M interpolation filters based on the first intra-frame prediction mode and M interpolation filters, where M is an integer greater than 1;

[0012] The second determining module is used to determine the second interpolation filter based on the at least one first interpolation filter and preset conditions;

[0013] The prediction module is used to perform intra-frame prediction on the target image block based on the first intra-frame prediction mode and the second interpolation filter, and to determine the predicted value of the target image block.

[0014] Thirdly, an intra-frame prediction apparatus is provided, the apparatus being configured to perform the steps of the method described in the first aspect.

[0015] Fourthly, an electronic device is provided, the terminal including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method as described in the first aspect.

[0016] Fifthly, an electronic device is provided, including a processor and a communication interface, wherein the processor is configured to determine at least one first interpolation filter from the M interpolation filters based on a first intra-frame prediction mode and M interpolation filters, where M is an integer greater than 1; determine a second interpolation filter based on the at least one first interpolation filter and preset conditions; and perform intra-frame prediction on a target image patch based on the first intra-frame prediction mode and the second interpolation filter to determine the predicted value of the target image patch.

[0017] A sixth aspect provides an electronic device comprising: a memory configured to store video data, and processing circuitry configured to implement the steps of the method described in the first aspect.

[0018] In a seventh aspect, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0019] Eighthly, a coding / decoding system is provided, comprising: an encoding end device and a decoding end device, wherein the encoding end device is configured to perform the steps of the method described in the first aspect, and the decoding end device is configured to perform the steps of the method described in the first aspect.

[0020] In a ninth aspect, a chip is provided, the chip including a processor and a communication interface coupled to the processor, the processor being configured to run a program or instructions to implement the steps of the method described in the first aspect.

[0021] In a tenth aspect, a computer program / program product is provided, the computer program / program product being stored in a storage medium, the computer program / program product being executed by at least one processor to perform the steps of the method as described in the first aspect.

[0022] In this embodiment, the decoding or encoding end determines at least one first interpolation filter from the M interpolation filters based on a first intra-frame prediction mode and M interpolation filters. Then, based on the at least one first interpolation filter and preset conditions, a second interpolation filter is determined. Intra-frame prediction of the target image patch is performed based on the first intra-frame prediction mode and the second interpolation filter to determine the predicted value of the target image patch. In this application, the second interpolation filter used by the decoding or encoding end for intra-frame prediction of the target image patch is not a fixed interpolation filter, but is determined based on preset conditions and at least one first interpolation filter. This makes the selection of the interpolation filter used for intra-frame prediction more flexible, allowing for flexible selection of appropriate interpolation filters to handle various textures in the image, which helps improve the accuracy of intra-frame prediction. Attached Figure Description

[0023] Figure 1 is a schematic diagram of the encoding and decoding system provided in an embodiment of this application;

[0024] Figure 2 is a schematic diagram of the encoder provided in an embodiment of this application;

[0025] Figure 3 is a schematic diagram of the decoder provided in an embodiment of this application;

[0026] Figure 4 is a schematic diagram of the intra-frame prediction mode in related technologies;

[0027] Figure 5 is a flowchart illustrating an intra-frame prediction method provided in an embodiment of this application;

[0028] Figure 6 is a schematic diagram of an intra-frame prediction device provided in an embodiment of this application;

[0029] Figure 7 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0030] Figure 8 is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0031] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0032] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, the scope of protection for "A or B" covers at least three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. In addition, the terms "A and / or B," "at least one of A and B," and "at least one of A or B" also cover at least the above three scenarios. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0033] Figure 1 is a schematic diagram of the encoding / decoding system 10 provided in an embodiment of this application. The technical solution of this application embodiment relates to encoding and decoding video data (including encoding or decoding). The video data includes original unencoded video, encoded video, decoded (e.g., reconstructed) video, or syntax elements, etc.

[0034] As shown in Figure 1, the encoding / decoding system 10 includes a source device 100, which provides encoded video data to be decoded and displayed by the destination device 110. Specifically, the source device 100 provides video data to the destination device 110 via a communication medium 120. The source device 100 and the destination device 110 may include any one or more of the following: desktop computer, laptop computer, tablet computer, set-top box, mobile phone, wearable device (e.g., smartwatch or wearable camera), television, camera, display device, in-vehicle device, virtual reality (VR) device, augmented reality (AR) device, mixed reality (MR) device, digital media player, video game console, video conferencing equipment, video streaming equipment, broadcast receiver equipment, broadcast transmitter equipment, spacecraft, aircraft, robot, satellite, etc.

[0035] In the example of Figure 1, source device 100 includes a data source 101, memory 102, encoder 200, and output interface 104. Destination device 110 includes an input interface 111, decoder 300, memory 113, and display device 114. Source device 100 represents an example of a video encoding device, while destination device 110 represents an example of a video decoding device. In other examples, source device 100 and destination device 110 may not include some of the components shown in Figure 1, or they may include components other than those shown in Figure 1. For example, source device 100 may receive video data from an external data source (such as an external camera). Similarly, destination device 110 may interface with an external display device instead of including an integrated display device. As another example, memory 102 and memory 113 may be external memories.

[0036] Although Figure 1 illustrates the source device 100 and the destination device 110 as separate devices, in some examples, they may be integrated into a single device. In such embodiments, the same hardware or software, separate hardware or software, or any combination thereof may be used to implement the functionality corresponding to the source device 100 and the functionality corresponding to the destination device 110.

[0037] In some examples, source device 100 and destination device 110 can perform unidirectional or bidirectional video transmission. If it is bidirectional video transmission, source device 100 and destination device 110 can operate in a substantially symmetrical manner, that is, each of source device 100 and destination device 110 includes an encoder and a decoder.

[0038] Data source 101 represents the source of video data (i.e., raw, unencoded video data) and provides encoder 200 with a series of images containing video data, which encoder 200 encodes. Data source 101 of source device 100 may include a video acquisition device (such as a video camera), a video archive containing previously acquired raw video, or a video feed interface for receiving video from a video content provider. Alternatively, data source 101 may generate computer graphics-based data as source video, or combine live video, archived video, and computer-generated video. In these cases, encoder 200 encodes the acquired, pre-acquired, or computer-generated video data. Encoder 200 may rearrange the images from the received order (sometimes referred to as the "display order") according to the encoded order. Encoder 200 may generate a bitstream including the encoded video data. Source device 100 may then output the encoded video data to communication medium 120 via output interface 104 for reception or retrieval, for example, by input interface 111 of destination device 110.

[0039] The memory 102 of the source device 100 and the memory 113 of the destination device 110 represent general-purpose memory. In some examples, memory 102 may store raw video data from data source 101, and memory 113 may store decoded video data from decoder 300. Additionally or alternatively, memories 102 and 113 may respectively store software instructions executable by, for example, encoder 200 and decoder 300. Although memories 102 and 113 are shown separately from encoder 200 and decoder 300 in this example, it should be understood that encoder 200 and decoder 300 may also include internal memory for functionally similar or equivalent purposes. If encoder 200 and decoder 300 are deployed on the same hardware device, memories 102 and 113 may be the same memory. Furthermore, memories 102 and 113 may store, for example, encoded video data output from encoder 200 and input to decoder 300. In some examples, portions of memories 102 and 113 may be allocated as one or more video buffers, for example, to store raw, decoded, or encoded video data.

[0040] In some examples, source device 100 can output encoded data from output interface 104 to memory 113. Similarly, destination device 110 can access encoded data from memory 113 via input interface 111. Memory 113 or memory 102 can include any of a variety of distributed or locally accessed data storage media, such as hard drives, Blu-ray discs, digital versatile discs (DVDs), compact disc read-only memory (CD-ROMs), flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0041] Output interface 104 may include any type of medium or device capable of transmitting encoded video data from source device 100 to destination device 110. For example, output interface 104 may include a transmitter or transceiver, such as an antenna, configured to transmit encoded video data directly from source device 100 to destination device 110 in real time. The encoded video data may be modulated according to the communication standards of a wireless communication protocol and transmitted to destination device 110.

[0042] Communication medium 120 may include transient media, such as wireless broadcasting or wired network transmission. For example, communication medium 120 may include radio frequency (RF) spectrum or one or more physical transmission lines (e.g., cables). Communication medium 120 may form part of a packet-based network (such as a local area network, a wide area network, or a global network such as the Internet). Communication medium 120 may also take the form of a storage medium (e.g., a non-transitory storage medium), such as a hard disk, flash drive, compact disc, digital video disc, Blu-ray disc, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0043] In some implementations, the communication medium 120 may include a router, switch, base station, or any other device that can be used to facilitate communication from source device 100 to destination device 110. For example, a server (not shown) may receive encoded video from source device 100 and provide the encoded video data to destination device 110, for example, via network transmission. The server may include (e.g., a web server for a website), a server configured to provide file transfer protocol services (such as File Transfer Protocol (FTP) or File Delivery Over Unidirectional Transport (FLUTE) protocol), a Content Delivery Network (CDN) device, a Hypertext Transfer Protocol (HTTP) server, a Multimedia Broadcast Multicast Services (MBMS) or Evolved Multimedia Broadcast Multicast Service (eMBMS) server, or a Network-attached Storage (NAS) device, etc. The server can implement one or more HTTP streaming protocols, such as MPEG Media Transport (MMT), Dynamic Adaptive Streaming over HTTP (DASH), HTTP Live Streaming (HLS), or Real Time Streaming Protocol (RTSP).

[0044] Destination device 110 can access encoded video data from a server, for example via a wireless channel (e.g., Wireless Fidelity (WIFI) connection) or a wired connection (e.g., Digital Subscriber Line (DSL), Cable Modem, etc.) for accessing encoded video data stored on the server.

[0045] Output interface 104 and input interface 111 can represent a wireless transmitter / receiver, a modem, a wired networking component (e.g., an Ethernet card), a wireless communication component operating according to the Institute of Electrical and Electronics Engineers (IEEE) 802.11 or IEEE 802.15 standard (e.g., ZigBee™ transmission mode), Bluetooth standard, or other physical components. In an example where output interface 104 and input interface 111 include a wireless component, output interface 104 and input interface 111 can be configured to operate according to Wi-Fi, Ethernet, cellular networks (such as 4G (4... th Generation 4G mobile communication networks, Long Term Evolution (LTE), Advanced LTE, 5G (5G) th Generation 5G mobile communication network, sixth generation (6G) th Generation 6G mobile communication networks, etc., are used to transmit data, such as encoded video data.

[0046] The technology provided in this application can be applied to support video encoding and decoding in one or more multimedia applications such as video conferencing, over-the-air television broadcasting, cable television transmission, satellite television transmission, internet streaming video transmission, digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0047] Destination device 110 receives an encoded video bitstream from communication medium 120 via its input interface 111. The encoded video bitstream may include syntax elements and encoded data units (e.g., sequences, image groups, images, slices, blocks, etc.), where the syntax elements are used to decode the encoded data units to obtain decoded video data. Display device 114 displays the decoded video data to the user. Display device 114 may include a cathode ray tube (CRT), liquid crystal display (LCD), plasma display, organic light-emitting diode (OLED) display, or other types of display devices.

[0048] The encoder 200 and decoder 300 can be implemented as one or more of various processing circuits, which may include microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. When the technology is implemented wholly or partially in software, the device may store instructions for the software in a suitable non-transitory computer-readable storage medium and use one or more processors to execute the instructions in hardware to perform the technology provided in the embodiments of this application.

[0049] The encoder 200 and decoder 300 can process based on the following video codec standards: H.263, H.264, H.265 (also known as High Efficiency Video Coding, HEVC), H.266 (also known as Versatile Video Coding, VVC), Moving Picture Experts Group 2 (MPEG-2), MPEG-4, VP8, VP9, ​​Alliance for Open Media Video 1 (AV1), Audio Video Coding Standard 1 (AVS1), AVS2, AVS3, or next-generation video standard protocols. This application embodiment does not specifically limit the specific implementation.

[0050] Typically, encoder 200 and decoder 300 can perform block-based encoding and decoding of images. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used during encoding or decoding). For example, a block can include a two-dimensional matrix of samples of luminance or chrominance data. For example, encoder 200 and decoder 300 can encode and decode video data represented in YUV format, where "Y" represents luminance (or Luma), and "U" and "V" are the two components of chrominance (or Chroma), with "U" representing the blue chrominance component (Cb) and "V" representing the red chrominance component (Cr).

[0051] Referring to Figure 2, which is a schematic diagram of the encoder 200 provided in an embodiment of this application, the encoder 200 can be the encoder 200 in Figure 1. In the example of Figure 2, the encoder 200 includes a memory 201, an encoding parameter determination unit 210, a residual generation unit 202, a transform processing unit 203, a quantization unit 204, an inverse quantization unit 205, an inverse transform processing unit 206, a reconstruction unit 207, a filter unit 208, a decoded picture buffer (DPB) 209, and an entropy encoding unit 220.

[0052] The memory 201 can store video data to be encoded. For example, the encoder 200 can receive and store video data from the data source 101 shown in Figure 1. In some examples, the memory 201 can be on the same chip as other components of the encoder 200 (as shown in Figure 2), or it can be on a separate chip from those components.

[0053] The coding parameter determination unit 210 includes a mode selection unit 211, an inter-frame prediction unit 212, and an intra-frame prediction unit 213. The inter-frame prediction unit 212 is used to obtain a first prediction block for the current block using an inter-frame prediction mode. The intra-frame prediction unit 213 is used to obtain a second prediction block for the current block using an intra-frame prediction mode. The mode selection unit 211 is used to obtain a target prediction block based on the first and second prediction blocks and determine the final prediction mode. Furthermore, the coding parameter determination unit 210 may also include other functional units, such as functional units for determining the partitioning method of coding units (CUs), functional units for determining the transformation type of the residual data of the CUs, or functional units for determining the quantization parameters of the residual data of the CUs.

[0054] For ease of description and understanding, in the embodiments of this application, the CU to be processed in the current image is referred to as the current CU, and the image block to be processed in the current CU is referred to as the current block or the image block to be processed. For example, in encoding, it refers to the block currently being encoded; in decoding, it refers to the block currently being decoded.

[0055] Inter-frame prediction unit 212 may include a motion estimation unit and a motion compensation unit. For inter-frame prediction of the current block, the motion estimation unit may perform a motion search to identify one or more matching reference blocks in one or more reference pictures (e.g., one or more previously encoded / decoded pictures stored in DPB 209).

[0056] The motion estimation unit can generate one or more motion vectors (MVs) representing the position of a reference block in a reference image relative to the position of the current block in the current image. The motion compensation unit can then use interpolation to obtain a predicted value with the precision indicated by the motion vectors.

[0057] The encoding parameter determination unit 210 can provide the target prediction block to the residual generation unit 202. The residual generation unit 202 receives the raw uncoded video data of the current block from the memory 201 and calculates the residual between the current block and the target prediction block to obtain the residual block. In some examples, the function of the residual generation unit 202 can be implemented using one or more subtractor circuits that perform binary subtraction.

[0058] As an example, the encoding parameter determination unit 210 can provide the entropy encoding unit 220 with syntax elements representing encoding parameters for encoding. The encoding parameters include one or more of the following: the partitioning method of the CU, the final prediction mode, the transformation type of the residual data of the CU, or the quantization parameters of the residual data of the CU.

[0059] The transformation processing unit 203 transforms the residual block output by the residual generation unit 202 to obtain a transform coefficient block. This transformation may include Discrete Cosine Transform (DCT), integer transformation, direction transformation, or Karhunen-Loeve Transform (KL Transform), etc. In some examples, the encoder 200 may not include the transformation processing unit 203.

[0060] Quantization unit 204 can quantize the transform coefficients in the transform coefficient block according to the quantization parameter (QP) value associated with the current block to generate a quantized transform coefficient block.

[0061] The inverse quantization unit 205 and the inverse transform processing unit 206 can perform inverse quantization and inverse transform on the transform coefficient block, respectively, to obtain the reconstructed residual block. The reconstruction unit 207 can generate a reconstructed block corresponding to the current block based on the reconstructed residual block and the target prediction block generated by the coding parameter determination unit 210.

[0062] Filter unit 208 can perform one or more filter operations on the reconstructed block. For example, filter unit 208 can be a deblocking filter (DBF), an adaptive loop filter (ALF), a sample adaptive offset (SAO) filter, etc. In some examples, encoder 200 may not include filter unit 208.

[0063] Encoder 200 stores the reconstructed image obtained from the reconstructed blocks in DPB 209. For example, in an example where the operation of filter unit 208 is not required, reconstruction unit 207 can store the reconstructed blocks in DPB 209. In an example where the operation of filter unit 208 is required, filter unit 208 can store the filtered reconstructed blocks in DPB 209. Inter-frame prediction unit 212 retrieves the reconstructed image from DPB 209 to perform inter-frame prediction on blocks of subsequent images to be encoded. In some examples, DPB 209 can be replaced with other types of memory.

[0064] Entropy coding unit 220 can entropy code the syntax elements of other components in encoder 200 to output encoded video data. For example, entropy coding unit 220 can entropy code the quantized transform coefficient block from quantization unit 204. As another example, entropy coding unit 220 can entropy code the syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from coding parameter determination unit 210.

[0065] It is understood that the composition of the encoder 200 shown in Figure 2 is only illustrative and does not constitute a limitation on the embodiments of this application.

[0066] Figure 3 is a schematic diagram of the decoder 300 provided in an embodiment of this application. The decoder 300 may be the decoder 300 described in Figure 1. In the example of Figure 3, the decoder 300 includes a Coded Picture Buffer (CPB) 301, an entropy decoding unit 302, a prediction processing unit 310, an inverse quantization unit 303, an inverse transform processing unit 304, a reconstruction unit 305, a filter unit 306, and a DPB 307.

[0067] The entropy decoding unit 302 can receive encoded video data from the CPB 301 and perform entropy decoding on the video data to obtain syntax elements. The syntax elements indicate encoding parameters, including one or more of the following: CU partitioning method, final prediction mode, transformation type of CU residual data, or quantization parameters of CU residual data.

[0068] When the syntax element includes the final prediction mode, the prediction processing unit 310 obtains the final prediction mode. If the final prediction mode is an inter-frame prediction mode, the prediction block of the current CU can be obtained through the inter-frame prediction unit 311 of the prediction processing unit 310; if the final prediction mode is an intra-frame prediction mode, the prediction block of the current CU can be obtained through the intra-frame prediction unit 312 of the prediction processing unit 310. In some examples, the prediction processing unit 310 may also include a unit for performing prediction functions according to other prediction modes.

[0069] CPB 301 can acquire and store encoded video data from the communication medium 120 shown in Figure 1. DPB 307 is used to store decoded images. Optionally, CPB 301 and DPB 307 can be replaced with other types of memory, which are not specifically limited in this application. In some examples, CPB 301 can be on the same chip as other components of decoder 300 (as shown in the figure), or it can be on a separate chip from the chip where those components are located.

[0070] Decoder 300 can perform reconstruction operations on each block individually. Entropy decoding unit 302 can entropy decode the syntax elements and transform information (e.g., QP or transform mode indication) of the quantized transform coefficients to obtain the quantized transform coefficients. Dequantization unit 303 dequantizes the quantized transform coefficients to obtain a transform coefficient block including the transform coefficients. Inverse transform processing unit 304 performs an inverse transform on the transform coefficient block to generate a residual block corresponding to the current block; this inverse transform is the reverse operation of the above transform.

[0071] Reconstruction unit 305 can reconstruct the current block based on the prediction block and the residual block. For example, reconstruction unit 305 can add samples from the residual block to the corresponding samples from the prediction block to reconstruct the current block.

[0072] Filter unit 306 can perform one or more filter operations on the reconstructed block. For example, the type of filter unit 306 can be referenced to the type of filter unit 208, and will not be described again here. In some examples, the operations of filter unit 306 can be skipped.

[0073] Decoder 300 can store the reconstructed image obtained from the reconstructed blocks in DPB 307. For example, in an example where filter unit 306 is not operated, reconstruction unit 305 can store the reconstructed blocks in DPB 307. In an example where filter unit 306 is operated, filter unit 306 can store the filtered reconstructed blocks in DPB 307. Decoder 300 can output the decoded image (e.g., decoded video) from DPB 307 for subsequent rendering on a display device (such as display device 114 of FIG. 1).

[0074] In video coding, a frame of image is divided into many macroblocks, and prediction blocks are obtained using intra-frame prediction or inter-frame prediction. The difference between the original block and the prediction block is the residual block, which is then transformed, quantized, and entropy-coded. During the pre-research process of next-generation standards, some template-based prediction techniques were proposed.

[0075] In related technologies, intra-frame prediction modes include DC, planar, and angle prediction modes. These modes use the already encoded or decoded reconstructed pixels adjacent to the current coding unit as reference pixels to calculate the predicted pixel through a pre-defined model. In order to capture arbitrary edge directions presented in natural video, the number of intra-frame modes in Versatile Video Coding (VVC) has been expanded from 33 used in High Efficiency Video Coding (HEVC) to 65, as shown in Figure 4.

[0076] In HEVC, a 2-tap linear interpolation filter has been used to generate intra-prediction blocks in direction prediction mode (i.e., excluding planar and DC modes). In VVC, two sets of 4-tap interpolation filters replace the less accurate linear interpolation filters in HEVC: one is a Discrete Cosine Transform (DCT)-based interpolation filter (DCTIF), and the other is a 4-tap smoothing interpolation filter (SIF). The DCTIF is constructed in the same way as the DCTIF used for chroma component motion compensation in HEVC and VVC. The SIF is obtained by convolving the 2-tap linear interpolation filter with a [1 2 1] / 4 filter.

[0077] Template-based intra-mode derivation (TIMD):

[0078] TIMD mode is also a technique for implicitly deriving intra-prediction modes. At the decoder, if the TIMD mode is true, for each candidate mode in the most probable mode (MPM) list, the template's predicted pixels are generated using the template's reference pixels. The template is composed of adjacent decoded reconstructed pixels of the current coded block to be decoded, and may include one or more rows above and one or more columns to the left. The cost is calculated as the sum of the absolute transformed differences (SATDs) between the template's predicted values ​​and the template's reconstructed values. One or more intra-prediction modes with the lowest cost are selected as the intra-prediction modes for prediction.

[0079] Template-based intra-interpolation filter selection:

[0080] First, a candidate filter list is constructed, including a 6-tap DCTIF interpolation filter, and 4-tap and 6-tap SIF interpolation filters. Based on an intra-prediction mode and at least one interpolation filter from the candidate filter list, at least one template prediction value for the template is determined. Then, based on the cost between each template prediction value and the template reconstruction value, an interpolation filter is determined. Based on the interpolation filter and the intra-prediction mode, the prediction value of the target image patch is obtained.

[0081] The intra-frame prediction method provided in this application embodiment is described below with reference to the accompanying drawings. The intra-frame prediction method provided in this application embodiment can be executed by an encoding end, such as the encoder 200 shown in Figure 1 or Figure 2. The intra-frame prediction method provided in this application embodiment can also be executed by a decoding end, such as the decoder 300 shown in Figure 1 or Figure 3. The encoding end and decoding end can be implemented by software, hardware, or a combination thereof. When implemented by hardware, the encoding end can be referred to as an encoding end device or a video encoding device, and the decoding end can be referred to as a decoding end device or a video decoding device.

[0082] Please refer to Figure 5, which is a flowchart of an intra-frame prediction method provided in an embodiment of this application. The method can be applied to the encoding end or the decoding end. To better illustrate the method provided in this application, the following embodiments will use the decoding end as an example to explain the intra-frame prediction method provided in this application.

[0083] As shown in Figure 5, the method includes the following steps:

[0084] Step 501: Based on the first intra-frame prediction mode and M interpolation filters, determine at least one first interpolation filter from the M interpolation filters.

[0085] Where M is an integer greater than 1; the first intra-frame prediction mode can be any intra-frame prediction mode, and this application does not make any specific limitation on it.

[0086] In this embodiment, the decoding end determines at least one first interpolation filter from the M interpolation filters based on a first intra-frame prediction mode and M interpolation filters. Optionally, the M interpolation filters may be a preset set of M interpolation filters, or they may be selected by traversing the interpolation filter list, or they may be determined based on the first intra-frame prediction mode.

[0087] Furthermore, the decoding end determines at least one first interpolation filter from the M interpolation filters. For example, the decoding end may randomly select at least one interpolation filter from the M interpolation filters as the first interpolation filter; or, the decoding end may calculate the template cost of the M interpolation filters and determine at least one first interpolation filter from the M interpolation filters based on the template cost, which will not be elaborated here.

[0088] Optionally, the M interpolation filters include at least one of the following:

[0089] 4-tap SIF;

[0090] 6-tap SIF;

[0091] 4-tap DCTIF;

[0092] 6-tap DCTIF;

[0093] 8-tap DCTIF.

[0094] For example, the M interpolation filters may include a 4-tap DCTIF interpolation filter and a 4-tap SIF interpolation filter; or, the M interpolation filters may include a 6-tap DCTIF interpolation filter and a 4-tap SIF interpolation filter; or, the M interpolation filters may include a 6-tap DCTIF interpolation filter, a 4-tap SIF interpolation filter, and a 6-tap SIF interpolation filter. These are merely examples of M interpolation filters, and will not be listed in detail here.

[0095] It should be noted that when the M interpolation filters include different types of interpolation filters, the interpolation filter with a low tap can be selected as the first interpolation filter to reduce the complexity of intra-frame prediction of the template. Alternatively, for DCTIF, the DCTIF filter with a high tap can be selected as the first interpolation filter to improve the accuracy of intra-frame prediction of the template.

[0096] For example, if the M interpolation filters include a 4-tap DCTIF interpolation filter and a 4-tap SIF interpolation filter, then a 4-tap interpolation filter can be selected instead of a 6-tap or 8-tap interpolation filter, thereby reducing the complexity of intra-frame prediction using the template.

[0097] Step 502: Determine the second interpolation filter based on the at least one first interpolation filter and the preset conditions.

[0098] For example, the preset condition may be related to at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode. For instance, when the first interpolation filter is SIF, if both the width and height of the target image patch are greater than or equal to a certain preset value, then the second interpolation filter is determined to be a 6-tap SIF; if both the width or height of the target image patch are less than the preset value, then the second interpolation filter is determined to be a 4-tap SIF. Of course, the first interpolation filter may also be DCTIF, and the preset condition may also be other cases, which will be specifically described in subsequent embodiments and will not be elaborated here.

[0099] It should be noted that the second interpolation filter may be one of the at least one first interpolation filters, or it may not be a first interpolation filter.

[0100] For example, the M interpolation filters include a 6-tap DCTIF interpolation filter, a 4-tap SIF interpolation filter, and a 6-tap SIF interpolation filter. If the first interpolation filter is determined to be a 6-tap DCTIF interpolation filter, then a second interpolation filter can be determined from the 6-tap DCTIF interpolation filter and the 8-tap DCTIF interpolation filter according to preset conditions. Furthermore, the second interpolation filter may be an 8-tap DCTIF interpolation filter, which does not belong to the first interpolation filter.

[0101] Step 503: Perform intra-frame prediction on the target image block based on the first intra-frame prediction mode and the second interpolation filter to determine the predicted value of the target image block.

[0102] Understandably, after determining the second interpolation filter, the decoding end performs intra-frame prediction on the target image block based on the first intra-frame prediction mode and the second interpolation filter to obtain the predicted value of the target image block. The specific implementation of intra-frame prediction of the image block based on the intra-frame prediction mode and the interpolation filter can be found in related technologies, and will not be elaborated upon in this embodiment.

[0103] In this embodiment, the decoding end determines at least one first interpolation filter from the M interpolation filters based on a first intra-frame prediction mode and M interpolation filters. Then, based on the at least one first interpolation filter and preset conditions, it determines a second interpolation filter. Intra-frame prediction of the target image patch is then performed based on the first intra-frame prediction mode and the second interpolation filter to determine the predicted value of the target image patch. In this application, the second interpolation filter used by the decoding end for intra-frame prediction of the target image patch is not a fixed interpolation filter, but is determined based on preset conditions and at least one first interpolation filter. This makes the selection of the interpolation filter for intra-frame prediction more flexible, allowing for the flexible selection of appropriate interpolation filters to handle various textures in the image, thus helping to improve the accuracy of intra-frame prediction.

[0104] Optionally, determining at least one first interpolation filter from the M interpolation filters based on the first intra-frame prediction mode and the M interpolation filters includes:

[0105] Based on the first intra-frame prediction mode and M interpolation filters, M template prediction values ​​of the target template are determined, wherein the target template is determined based on the adjacent reconstructed pixels of the target image block;

[0106] M template costs are determined based on the template reconstruction values ​​and the M template prediction values, wherein the template reconstruction values ​​are obtained based on the neighboring reconstructed pixels of the target image block;

[0107] Based on the M template costs, at least one first interpolation filter is determined from the M interpolation filters.

[0108] Optionally, the determination of the target template based on the adjacent reconstructed pixels of the target image block can also be understood as follows: the template is composed of the adjacent encoded or decoded reconstructed pixels of the target image block, for example, it may include one or several rows above the target image block and one or several columns to the left of the target image block. It should be noted that the target image block can be understood as the image block to be encoded or decoded, or it can also be called the current image block.

[0109] For example, after determining M interpolation filters, the decoding end performs intra-frame prediction on the target template according to the first intra-frame prediction mode and the M interpolation filters to obtain M template prediction values. Then, it calculates the template cost between each template prediction value and the reconstructed template value, thereby obtaining M template costs; wherein, the template cost is the sum of the absolute transform differences between the template prediction value and the reconstructed template value. Based on the M template costs, at least one first interpolation filter is determined from the M interpolation filters. For example, the M template costs can be sorted from largest to smallest or smallest to largest, and the one with the smallest template cost or the first few smallest ones can be determined as the first interpolation filter.

[0110] In this embodiment, the decoding end can determine at least one first interpolation filter by calculating the template cost of M interpolation filters, thereby making the determination of the first interpolation filter more flexible.

[0111] Optionally, if the template costs corresponding to K interpolation filters are known among the M interpolation filters, determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and the M interpolation filters includes:

[0112] Based on the first intra-frame prediction mode and N interpolation filters, N template prediction values ​​of the target template are determined, where M is the sum of K and N, N is an integer less than or equal to M, and K is an integer greater than or equal to 0.

[0113] The process of determining the cost of M templates based on the template reconstruction value and the M template prediction values ​​includes:

[0114] The cost of N templates is determined based on the reconstructed template values ​​and the predicted values ​​of the N templates.

[0115] The M template costs are obtained based on the N template costs and the template costs corresponding to the K interpolation filters.

[0116] For example, assuming M is 10 and K is 2, that is, the template cost of two interpolation filters is known, then these two interpolation filters do not need to have their template costs calculated. The decoding end determines the eight template prediction values ​​of the target template based on the intra-frame prediction mode and the remaining eight interpolation filters, and then calculates the template cost of the reconstructed template value and these eight template prediction values ​​to obtain eight template costs. Then, based on these eight template costs and the two known template costs, the template costs of the ten interpolation filters are obtained.

[0117] In this embodiment of the application, when there is an interpolation filter with a known template cost among the M interpolation filters, only the template cost of the remaining interpolation filters with unknown template costs is calculated, thereby reducing the amount of computation and energy consumption.

[0118] Optionally, before determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and the M interpolation filters, the method further includes:

[0119] The target template is determined based on the intra-frame prediction mode, vertical mode, and horizontal mode of the first frame.

[0120] For example, the target template can be determined by comparing the magnitudes of the intra-frame prediction mode, vertical mode, and horizontal mode, thus making the determination of the target template more flexible.

[0121] Optionally, determining the target template based on the first intra-frame prediction mode, vertical mode, and horizontal mode includes any one of the following:

[0122] If the intra-frame prediction mode is greater than or equal to the vertical mode, the first template is determined as the target template, and the first template is determined based on at least one of the upper region and the upper left region of the target image block.

[0123] If the intra-frame prediction mode is less than or equal to the horizontal mode, the second template is determined as the target template, and the second template is determined based on at least one of the left region and the upper left region of the target image block;

[0124] If the intra-frame prediction mode is less than the vertical mode, or if the intra-frame prediction mode is greater than the horizontal mode, the third template is determined as the target template. The third template is determined based on at least one of the upper region, the left region, and the upper left region of the target image block.

[0125] The upper region of the target image block includes one or more rows above the target image block;

[0126] The left-side region of the target image block includes one or more columns on the left side of the target image block;

[0127] The upper left region of the target image block includes one or more rows and columns at the top left of the target image block. For example, the upper left region may be the overlapping area of ​​one or more rows at the top and one or more columns at the left of the target image block.

[0128] It should be noted that, for example, "the first intra-frame prediction mode is greater than or equal to the vertical mode" can mean that the index of the first intra-frame prediction mode is greater than or equal to the index of the vertical mode; "the first intra-frame prediction mode is less than the vertical mode" can mean that the index of the first intra-frame prediction mode is less than the index of the vertical mode; "the first intra-frame prediction mode is less than or equal to the horizontal mode" can mean that the index of the first intra-frame prediction mode is less than or equal to the index of the horizontal mode; and "the first intra-frame prediction mode is greater than the horizontal mode" can mean that the index of the first intra-frame prediction mode is greater than the index of the horizontal mode.

[0129] For example, if the first intra-frame prediction mode is greater than or equal to the vertical mode, the upper region of the target image block is determined as the target template, such as the upper three rows of the target image block.

[0130] For example, if the first intra-frame prediction mode is less than or equal to the horizontal mode, then the left region of the target image block is determined as the target template, for example, the four columns on the left side of the target image block are determined as the target template.

[0131] For example, if the first intra-frame prediction mode is less than the vertical mode, or the first intra-frame prediction mode is greater than the horizontal mode, then the upper left region of the target image block is determined as the target template, for example, the overlapping region of the top three rows and the left three columns of the target image block is determined as the target template.

[0132] Understandably, the target template can also be other cases, which will not be specifically listed here.

[0133] In this embodiment, the target template is determined based on the size of the first intra-frame prediction mode and the vertical mode, as well as the size of the first intra-frame prediction mode and the horizontal mode. Thus, the range of the target template is related to the first intra-frame prediction mode, the vertical mode, and the horizontal mode, making the determination of the target template more flexible.

[0134] Optionally, before determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and the M interpolation filters, the method further includes:

[0135] Based on at least one of the first intra-frame prediction mode and the first information, determine at least one of the third interpolation filter and the reference pixel filter identifier;

[0136] The first information includes at least one of the following: the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

[0137] For example, the decoding end determines a third interpolation filter based on the first intra-frame prediction mode and the first information. In some embodiments, the third interpolation filter may also be referred to as the initial filter, and the third interpolation filter may be used to determine the M interpolation filters.

[0138] For example, the decoding end determines the reference pixel filtering identifier based on the first intra-frame prediction mode and the first information. The reference pixel filtering identifier is used to determine whether to perform filtering processing on the reference pixel. The reference pixel is also the reference pixel of the target image block, such as the pixel above or to the left of the target image block.

[0139] For example, the decoding end determines the third interpolation filter and / or reference pixel filter identifier based on the first intra-frame prediction mode; or, the decoding end determines the third interpolation filter and / or reference pixel filter identifier based on the first information.

[0140] In this embodiment, the decoding end can determine at least one of a third interpolation filter and a reference pixel filter identifier based on at least one of the first intra-frame prediction mode and the first information. The third interpolation filter is used to determine the M interpolation filters, thereby making the determination of the M interpolation filters more flexible. The reference pixel filter identifier is used to determine whether to perform filtering processing on the reference pixel, thereby improving the processing accuracy of the template prediction value.

[0141] Optionally, before determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and the M interpolation filters, the method further includes:

[0142] Given a third interpolation filter, M interpolation filters are determined based on the third interpolation filter.

[0143] For example, the decoding end can traverse the interpolation filter list based on the third interpolation filter. This list may include a 6-tap DCTIF interpolation filter, a 4-tap SIF interpolation filter, a 6-tap SIF interpolation filter, etc., and determine M interpolation filters from the list based on the third interpolation filter. For example, interpolation filters of the same type as the third interpolation filter in the interpolation filter list can be selected as the M interpolation filters.

[0144] In this embodiment, the decoding end can determine M interpolation filters based on the third interpolation filter, making the determination of the M interpolation filters more flexible.

[0145] Optionally, determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and the M interpolation filters includes:

[0146] Given the reference pixel filter identifier, M template prediction values ​​for the target template are determined based on the first intra-frame prediction mode, the reference pixel filter identifier, and M interpolation filters.

[0147] In this embodiment, the determination of the template prediction value requires combining the first intra-frame prediction mode, the reference pixel filter identifier, and M interpolation filters, which helps to improve the accuracy of the template prediction value.

[0148] Optionally, determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode, the reference pixel filter identifier, and the M interpolation filters includes:

[0149] When the reference pixel filtering identifier is the first identifier and the interpolation filter type is DCTIF, the reference pixel is filtered, and the M template prediction values ​​of the target template are determined according to the first intra-frame prediction mode, M interpolation filters and the filtered reference pixel.

[0150] If the reference pixel filtering identifier is not the first identifier, no filtering is performed on the reference pixel. Based on the first intra-frame prediction mode, M interpolation filters, and the unfiltered reference pixel, M template prediction values ​​of the target template are determined.

[0151] For example, the first identifier is 1, that is, the reference pixel filtering identifier is 1, indicating that the reference pixel needs to be filtered. If the interpolation filter type is DCTIF, the reference pixel is filtered, and the M template prediction values ​​of the target template are determined according to the first intra-frame prediction mode, M interpolation filters and the filtered reference pixel, so as to improve the accuracy of the template prediction values.

[0152] If the reference pixel filtering flag is not 1, for example, if the reference pixel filtering flag is 0, it means that no filtering processing is required for the reference pixel. Then, based on the first intra-frame prediction mode, the M interpolation filters, and the unfiltered reference pixel, the M template prediction values ​​of the target template are determined, which helps to reduce the processing complexity of the template prediction values.

[0153] In this embodiment of the application, determining the second interpolation filter based on the at least one first interpolation filter and the preset conditions includes any one of the following:

[0154] If the first interpolation filter includes DCTIF, a second interpolation filter is determined based on a first preset condition;

[0155] If the first interpolation filter includes SIF, a second interpolation filter is determined based on a second preset condition;

[0156] The first preset condition is different from the second preset condition.

[0157] In this embodiment, for two different types of interpolation filters, DCTIF and SIF, the second interpolation filter can be determined based on a first preset condition or a second preset condition, respectively. The first preset condition is different from the second preset condition, which makes the determination of the second interpolation filter more flexible and targeted.

[0158] Optionally, before determining the second interpolation filter based on the at least one first interpolation filter and preset conditions, the method further includes:

[0159] Based on at least one of the first intra-frame prediction mode and the second information, determine the first preset condition and the second preset condition;

[0160] The second information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

[0161] For example, the decoder can determine the first preset condition and the second preset condition based on the first intra-frame prediction mode. Alternatively, the decoder can determine the first preset condition and the second preset condition based on second information. For example, the first preset condition is related to the area of ​​the target image patch, the second preset condition is related to the width and height of the target image patch, and so on, without being specifically listed here.

[0162] In this embodiment of the application, the first preset condition and the second preset condition can be determined based on at least one of the first intra-frame prediction mode and the second information, so that the decoding end can determine the second interpolation filter based on the first preset condition and the second preset condition, so as to better achieve intra-frame prediction of the target image block.

[0163] Optionally, the first preset condition includes a first condition and a second condition. When the first interpolation filter includes DCTIF, determining the second interpolation filter based on the first preset condition includes:

[0164] If the first and second conditions are met, the second interpolation filter is determined to be an 8-tap DCTIF;

[0165] If the first condition or the second condition is not met, the second interpolation filter is determined to be a 6-tap DCTIF;

[0166] In high-precision intra-frame prediction mode, if the first value is greater than the first threshold, the first condition is satisfied; in low-precision prediction mode, if the first value is greater than half of the first threshold, the first condition is satisfied.

[0167] In high-precision intra-frame prediction mode, if the first threshold is less than the first preset value, the second condition is satisfied. In low-precision mode, if the first threshold is less than the second preset value, the second condition is satisfied, and the first preset value is greater than the second preset value.

[0168] The first value is the minimum of the first absolute value and the second absolute value, the first absolute value is the absolute value of the difference between the angle prediction mode and the horizontal mode, and the second absolute value is the absolute value of the difference between the angle prediction mode and the vertical mode; the first threshold is determined based on the width and height of the target image block.

[0169] For example, the first condition is expressed by the following formula based on Formula 1, and the second condition is expressed by the following formula based on Formula 2:

[0170] diff > ((bExtIntraDir ? log2Size: log2Size / 2 )) Formula 1

[0171] log2Size<(bExtIntraDir?6:4) / / 32xN blocks,8xN blocks

[0172] Wherein, diff is the first value, log2Size is the first threshold, Size is the size determined by the width and height of the target image patch, the first preset value is 6, and the second preset value is 4.

[0173] For example, in high-precision mode (including 131 intra-frame prediction modes), if the minimum of the first absolute value and the second absolute value (i.e., the first value) is greater than the first threshold (log2Size), then the first condition is satisfied; and if the first threshold is less than 6, then the second condition is satisfied, and the second interpolation filter is determined to be an 8-tap DCTIF. If the first value is not greater than the first threshold, then the first condition is not satisfied; if the first threshold is greater than 6, then the second condition is not satisfied. If either the first condition or the second condition is not satisfied, then the first preset condition is not satisfied, and the second interpolation filter is determined to be a 6-tap DCTIF.

[0174] In low-precision mode, if the minimum of the first absolute value and the second absolute value (i.e., the first value) is greater than half of the first threshold (log2Size / 2), then the first condition is met, and the first threshold is less than 4, i.e., the second condition is met. Therefore, the second interpolation filter is determined to be an 8-tap DCTIF. If the first value is not greater than half of the first threshold (log2Size / 2), then the first condition is not met, and the first threshold is greater than 4, i.e., the second condition is not met. If either the first or second condition is not met, then the first preset condition is not met, and the second interpolation filter is determined to be a 6-tap DCTIF.

[0175] In this embodiment of the application, when the first interpolation filter includes DCTIF, the second interpolation filter can be determined based on the first and second conditions, making the determination of the second interpolation filter more flexible.

[0176] Optionally, if the first interpolation filter includes SIF, determining the second interpolation filter based on the second preset condition includes any one of the following:

[0177] If the width and height of the target image block are both greater than or equal to a third preset value, the second interpolation filter is determined to be a 6-tap SIF.

[0178] If the width of the target image block is less than the third preset value, or the height of the target image block is less than the third preset value, the second interpolation filter is determined to be a 4-tap SIF.

[0179] For example, in one implementation, the third preset value is 32. That is, if the width and height of the target image patch are both greater than or equal to 32, the second interpolation filter is determined to be a 6-tap SIF; if the width or height of the target image patch is less than 32, the second interpolation filter is determined to be a 4-tap SIF. This allows the second interpolation filter to be determined based on the width and height of the target image patch, making the determination of the second interpolation filter more flexible.

[0180] For example, please refer to Table 1 below, which shows the performance of the embodiments of this application on the ECM-15.0 reference software as follows:

[0181] Table 1

[0182] Class A1 and Class A2 consist of video sequences with a resolution of 3840x2160, Class B consists of video sequences with a resolution of 1920x1080, Class C consists of video sequences with a resolution of 832x480, and Class E consists of video sequences with a resolution of 1280x720. EncT represents the encoding time, and DecT represents the decoding time. All intra represents the test configuration of the intra-frame configuration. Y, U, and V are the three color components.

[0183] Using the intra-frame prediction method provided in the embodiments of this application, the coding gain of Y / U / V components is increased by 0.06% / 0.11% / 0.02% respectively under general test conditions, thereby improving the objective compression efficiency.

[0184] The intra-prediction method provided in this application can be executed by an intra-prediction device. As an example, the device can be an electronic device, such as an encoding or decoding device, or a component within an electronic device, such as a chip or circuit. This application uses an intra-prediction device executing the intra-prediction method as an example to illustrate the intra-prediction device provided in this application.

[0185] Please refer to Figure 6, which is a structural diagram of an intra-frame prediction device provided in an embodiment of this application. As shown in Figure 6, the intra-frame prediction device 600 includes:

[0186] The first determining module 601 is used to determine at least one first interpolation filter from the M interpolation filters based on the first intra-frame prediction mode and M interpolation filters, where M is an integer greater than 1;

[0187] The second determining module 602 is used to determine the second interpolation filter based on the at least one first interpolation filter and preset conditions;

[0188] The prediction module 603 is used to perform intra-frame prediction on the target image block based on the first intra-frame prediction mode and the second interpolation filter, and to determine the predicted value of the target image block.

[0189] Optionally, the first determining module 601 is further configured to:

[0190] Based on the first intra-frame prediction mode and M interpolation filters, M template prediction values ​​of the target template are determined, wherein the target template is determined based on the adjacent reconstructed pixels of the target image block;

[0191] M template costs are determined based on the template reconstruction values ​​and the M template prediction values, wherein the template reconstruction values ​​are obtained based on the neighboring reconstructed pixels of the target image block;

[0192] Based on the M template costs, at least one first interpolation filter is determined from the M interpolation filters.

[0193] Optionally, if the template costs corresponding to K interpolation filters are known among the M interpolation filters, the first determining module 601 is further configured to:

[0194] Based on the first intra-frame prediction mode and N interpolation filters, N template prediction values ​​of the target template are determined, where M is the sum of K and N, N is an integer less than or equal to M, and K is an integer greater than or equal to 0.

[0195] The cost of N templates is determined based on the reconstructed template values ​​and the predicted values ​​of the N templates.

[0196] The M template costs are obtained based on the N template costs and the template costs corresponding to the K interpolation filters.

[0197] Optionally, the first determining module 601 is further configured to:

[0198] The target template is determined based on the intra-frame prediction mode, vertical mode, and horizontal mode of the first frame.

[0199] Optionally, the first determining module 601 is further configured to perform any of the following:

[0200] If the intra-frame prediction mode is greater than or equal to the vertical mode, the first template is determined as the target template, and the first template is determined based on at least one of the upper region and the upper left region of the target image block.

[0201] If the intra-frame prediction mode is less than or equal to the horizontal mode, the second template is determined as the target template, and the second template is determined based on at least one of the left region and the upper left region of the target image block;

[0202] If the intra-frame prediction mode is less than the vertical mode, or if the intra-frame prediction mode is greater than the horizontal mode, the third template is determined as the target template. The third template is determined based on at least one of the upper region, the left region, and the upper left region of the target image block.

[0203] The upper region of the target image block includes one or more rows above the target image block;

[0204] The left-side region of the target image block includes one or more columns on the left side of the target image block;

[0205] The upper left region of the target image block includes one row and one column or multiple rows and columns in the upper left corner of the target image block.

[0206] Optionally, the first determining module 601 is further configured to:

[0207] Based on at least one of the first intra-frame prediction mode and the first information, determine at least one of the third interpolation filter and the reference pixel filter identifier;

[0208] The first information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

[0209] Optionally, the first determining module 601 is further configured to:

[0210] Given a third interpolation filter, M interpolation filters are determined based on the third interpolation filter.

[0211] Optionally, the first determining module 601 is further configured to:

[0212] Given the reference pixel filter identifier, M template prediction values ​​for the target template are determined based on the first intra-frame prediction mode, the reference pixel filter identifier, and M interpolation filters.

[0213] Optionally, the first determining module 601 is further configured to:

[0214] When the reference pixel is identified as the first identifier and the interpolation filter is of the Discrete Cosine Transform Interpolation Filter (DCTIF) type, the reference pixel is filtered, and the M template prediction values ​​of the target template are determined based on the first intra-frame prediction mode, the M interpolation filters, and the filtered reference pixel.

[0215] If the reference pixel filtering identifier is not the first identifier, no filtering is performed on the reference pixel. Based on the first intra-frame prediction mode, the M interpolation filters, and the unfiltered reference pixel, the M template prediction values ​​of the target template are determined.

[0216] Optionally, the M interpolation filters include at least one of the following:

[0217] 4-tap SIF;

[0218] 6-tap SIF;

[0219] 4-tap DCTIF;

[0220] 6-tap DCTIF;

[0221] 8-tap DCTIF.

[0222] Optionally, the second determining module 602 is further configured to perform at least one of the following:

[0223] If the first interpolation filter includes DCTIF, a second interpolation filter is determined based on a first preset condition;

[0224] If the first interpolation filter includes SIF, a second interpolation filter is determined based on a second preset condition;

[0225] The first preset condition is different from the second preset condition.

[0226] Optionally, the first preset condition includes a first condition and a second condition. When the first interpolation filter includes DCTIF, the second determining module 602 is further configured to:

[0227] If the first condition and the second condition are met, the second interpolation filter is determined to be an 8-tap DCTIF;

[0228] If the first condition or the second condition is not met, the second interpolation filter is determined to be a 6-tap DCTIF;

[0229] In high-precision intra-frame prediction mode, if the first value is greater than the first threshold, the first condition is satisfied; in low-precision prediction mode, if the first value is greater than half of the first threshold, the first condition is satisfied.

[0230] In high-precision intra-frame prediction mode, if the first threshold is less than the first preset value, then the second condition is satisfied. In low-precision mode, if the first threshold is less than the second preset value, then the second condition is satisfied, and the first preset value is greater than the second preset value.

[0231] The first value is the minimum of the first absolute value and the second absolute value, the first absolute value is the absolute value of the difference between the angle prediction mode and the horizontal mode, and the second absolute value is the absolute value of the difference between the angle prediction mode and the vertical mode; the first threshold is determined based on the width and height of the target image block.

[0232] Optionally, if the first interpolation filter includes SIF, the second determining module 602 is further configured to:

[0233] If the width and height of the target image block are both greater than or equal to a third preset value, the second interpolation filter is determined to be a 6-tap SIF.

[0234] If the width of the target image block is less than the third preset value, or the height of the target image block is less than the third preset value, the second interpolation filter is determined to be a 4-tap SIF.

[0235] Optionally, the second determining module 602 is further configured to:

[0236] Based on at least one of the first intra-frame prediction mode and the second information, determine the first preset condition and the second preset condition;

[0237] The second information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

[0238] In this embodiment, the device determines at least one first interpolation filter from the M interpolation filters based on a first intra-frame prediction mode and M interpolation filters. Then, based on the at least one first interpolation filter and preset conditions, it determines a second interpolation filter. Intra-frame prediction of the target image patch is then performed based on the first intra-frame prediction mode and the second interpolation filter to determine the predicted value of the target image patch. In this application, the second interpolation filter used by the intra-frame prediction device for intra-frame prediction of the target image patch is not a fixed interpolation filter, but is determined based on preset conditions and at least one first interpolation filter. This makes the selection of the interpolation filter used for intra-frame prediction more flexible, allowing for flexible selection of appropriate interpolation filters to handle various textures in the image, thus helping to improve the accuracy of intra-frame prediction.

[0239] The intra-frame prediction apparatus provided in this application embodiment can implement all the processes implemented in the above-described intra-frame prediction method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0240] As shown in Figure 7, this application embodiment also provides an electronic device 700, including a processor 701 and a memory 702. The memory 702 stores programs or instructions that can run on the processor 701. For example, when the electronic device 700 is an encoding device, the program or instructions executed by the processor 701 implement the various steps of the above-described intra-frame prediction method embodiment and achieve the same technical effect. When the electronic device 700 is a decoding device, the program or instructions executed by the processor 701 implement the various steps of the above-described intra-frame prediction method embodiment and achieve the same technical effect. To avoid repetition, this will not be repeated here. Optionally, the memory 702 can be the memory 102 or memory 113 in the embodiment shown in Figure 1, and the processor 701 can implement the functions of the encoder 200 or decoder 300 in the embodiments shown in Figures 1-3.

[0241] This application also provides an electronic device, including: a memory configured to store video data; and a processing circuit configured to implement the steps of the intra-frame prediction method embodiments described above. Optionally, the memory may be memory 102 or memory 113 in the embodiment shown in FIG1, and the processing circuit may implement the functions of encoder 200 or decoder 300 in the embodiments shown in FIG1-3.

[0242] This application also provides an electronic device, including a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps in the method embodiment shown in FIG5. This device embodiment corresponds to the above method embodiment, and all implementation processes and methods of the above method embodiments can be applied to this terminal embodiment and can achieve the same technical effect.

[0243] The processor or processing circuit in the embodiments of this application may include general-purpose processors, special-purpose processors, etc., such as central processing units (CPUs), microprocessors, digital signal processors (DSPs), artificial intelligence (AI) processors, graphics processing units (GPUs), application-specific integrated circuits (ASICs), network processors (NPs), field-programmable gate arrays (FPGAs), or other programmable logic devices, gate circuits, transistors, discrete hardware components, etc. The communication interface in the embodiments of this application may include transceivers, pins, circuits, buses, etc.

[0244] The aforementioned electronic devices can be terminals or other devices besides terminals, such as servers, network attached storage (NAS), etc.

[0245] Among them, the terminal can also be called user equipment (UE), which can be a mobile phone, tablet computer, laptop computer, notebook computer, personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR), virtual reality (VR) device, mixed reality (MR) device, robot, wearable device, flight vehicle, vehicle user equipment (VUE), shipborne equipment, pedestrian user equipment (PUE), smart home (home devices with wireless communication functions, such as refrigerators, televisions, washing machines or furniture, etc.), game console, personal computer (PC), ATM or self-service machine, etc. Wearable devices include: smartwatches, smart bracelets, smart earphones, smart glasses, smart jewelry (smart bracelets, smart chains, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. Among these, in-vehicle devices can also be referred to as in-vehicle terminals, in-vehicle controllers, in-vehicle modules, in-vehicle components, in-vehicle chips, or in-vehicle units, etc. It should be noted that the embodiments in this application do not limit the specific type of terminal.

[0246] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server. A cloud server can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), or cloud computing services based on big data and artificial intelligence platforms.

[0247] For example, the aforementioned electronic device may include, but is not limited to, the type of source device 100 or destination device 110 shown in FIG1.

[0248] Taking an electronic device as an example, Figure 8 is a schematic diagram of the hardware structure of a terminal implementing an embodiment of this application.

[0249] The terminal 800 includes, but is not limited to, at least some of the following components: radio frequency unit 801, network module 802, audio output unit 803, input unit 804, sensor 805, display unit 806, user input unit 807, interface unit 808, memory 809, and processor 810.

[0250] Those skilled in the art will understand that the terminal 800 may also include a power supply (such as a battery) for powering various components. The power supply can be logically connected to the processor 810 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The terminal structure shown in Figure 8 does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0251] It should be understood that, in this embodiment, the input unit 804 may include a graphics processor 8041 and a microphone 8042. The graphics processor 8041 processes image data of still images or videos obtained by an image acquisition device (such as a camera) in video acquisition mode or image acquisition mode, or it may process the obtained point cloud data. The display unit 806 may include a display panel 8061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0252] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 801 can transmit it to the processor 810 for processing; in addition, the radio frequency unit 801 can send uplink data to the network-side device. Typically, the radio frequency unit 801 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, duplexers, etc.

[0253] The memory 809 can be used to store software programs or instructions, as well as various data. The memory 809 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 809 may include volatile memory or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 809 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0254] Processor 810 may include one or more processing units; optionally, processor 810 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 810.

[0255] The processor 810 is used for:

[0256] Based on the first intra-frame prediction mode and M interpolation filters, at least one first interpolation filter is determined from the M interpolation filters, where M is an integer greater than 1;

[0257] Based on the at least one first interpolation filter and the preset conditions, a second interpolation filter is determined;

[0258] Based on the first intra-frame prediction mode and the second interpolation filter, intra-frame prediction is performed on the target image block to determine the predicted value of the target image block.

[0259] In this embodiment, the terminal determines at least one first interpolation filter from the M interpolation filters based on a first intra-frame prediction mode and M interpolation filters. Then, based on the at least one first interpolation filter and preset conditions, it determines a second interpolation filter. Intra-frame prediction of the target image patch is then performed based on the first intra-frame prediction mode and the second interpolation filter to determine the predicted value of the target image patch. In this application, the second interpolation filter used by the terminal for intra-frame prediction of the target image patch is not a fixed interpolation filter, but is determined based on preset conditions and at least one first interpolation filter. This makes the selection of the interpolation filter for intra-frame prediction more flexible, allowing for the flexible selection of appropriate interpolation filters to handle various textures in the image, thus helping to improve the accuracy of intra-frame prediction.

[0260] It is understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description of the intra-frame prediction method embodiment and achieve the same or corresponding technical effects. To avoid repetition, it will not be described again here.

[0261] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described intra-frame prediction method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0262] The processor mentioned above is the processor in the terminal described in the above embodiments. The readable storage medium includes computer-readable storage media, such as ROM, RAM, magnetic disk, or optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.

[0263] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described intra-frame prediction method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0264] It should be understood that the chips mentioned in the embodiments of this application may include system-on-a-chip (also known as system chip, chip system, or system-on-a-chip) or discrete display chips, etc.

[0265] This application also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described intra-frame prediction method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0266] This application also provides a communication system, including: an encoding end device and a decoding end device, wherein the encoding end device can be used to perform the steps of the intra-frame prediction method as described above, and the decoding end device can be used to perform the steps of the intra-frame prediction method as described above.

[0267] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0268] From the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of computer software products plus necessary general-purpose hardware platforms, and of course, they can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk, etc.), and the computer software product includes several instructions to cause the terminal or network-side device to execute the methods described in the various embodiments of this application.

[0269] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other implementations under the guidance of this application without departing from the spirit and scope of the claims. All of these implementations are within the protection scope of this application.

Claims

1. An intra-frame prediction method, comprising: Based on the first intra-frame prediction mode and M interpolation filters, at least one first interpolation filter is determined from the M interpolation filters, where M is an integer greater than 1; Based on the at least one first interpolation filter and the preset conditions, a second interpolation filter is determined; Based on the first intra-frame prediction mode and the second interpolation filter, intra-frame prediction is performed on the target image block to determine the predicted value of the target image block.

2. The method according to claim 1, wherein, The step of determining at least one first interpolation filter from the M interpolation filters based on the first intra-frame prediction mode and M interpolation filters includes: Based on the first intra-frame prediction mode and M interpolation filters, M template prediction values ​​of the target template are determined, wherein the target template is determined based on the adjacent reconstructed pixels of the target image block; M template costs are determined based on the template reconstruction values ​​and the M template prediction values, wherein the template reconstruction values ​​are obtained based on the neighboring reconstructed pixels of the target image block; Based on the M template costs, at least one first interpolation filter is determined from the M interpolation filters.

3. The method according to claim 2, wherein, Given that the template costs corresponding to K interpolation filters are known among the M interpolation filters, determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and the M interpolation filters includes: Based on the first intra-frame prediction mode and N interpolation filters, N template prediction values ​​of the target template are determined, where M is the sum of K and N, N is an integer less than or equal to M, and K is an integer greater than or equal to 0. The process of determining the cost of M templates based on the template reconstruction value and the M template prediction values ​​includes: The cost of N templates is determined based on the reconstructed template values ​​and the predicted values ​​of the N templates. The M template costs are obtained based on the N template costs and the template costs corresponding to the K interpolation filters.

4. The method according to claim 2, wherein, Before determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and M interpolation filters, the method further includes: The target template is determined based on the intra-frame prediction mode, vertical mode, and horizontal mode of the first frame.

5. The method according to claim 4, wherein, The determination of the target template based on the first intra-frame prediction mode, vertical mode, and horizontal mode includes any one of the following: If the intra-frame prediction mode is greater than or equal to the vertical mode, the first template is determined as the target template, and the first template is determined based on at least one of the upper region and the upper left region of the target image block. If the intra-frame prediction mode is less than or equal to the horizontal mode, the second template is determined as the target template, and the second template is determined based on at least one of the left region and the upper left region of the target image block; If the intra-frame prediction mode is less than the vertical mode, or if the intra-frame prediction mode is greater than the horizontal mode, the third template is determined as the target template. The third template is determined based on at least one of the upper region, the left region, and the upper left region of the target image block. The upper region of the target image block includes one or more rows above the target image block; The left-side region of the target image block includes one or more columns on the left side of the target image block; The upper left region of the target image block includes one row and one column or multiple rows and columns in the upper left corner of the target image block.

6. The method according to claim 2, wherein, Before determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and M interpolation filters, the method further includes: Based on at least one of the first intra-frame prediction mode and the first information, determine at least one of the third interpolation filter and the reference pixel filter identifier; The first information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

7. The method according to claim 6, wherein, Before determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and M interpolation filters, the method further includes: Given a third interpolation filter, M interpolation filters are determined based on the third interpolation filter.

8. The method according to claim 6, wherein, The step of determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode and M interpolation filters includes: Given the reference pixel filter identifier, M template prediction values ​​for the target template are determined based on the first intra-frame prediction mode, the reference pixel filter identifier, and M interpolation filters.

9. The method according to claim 8, wherein, The step of determining the M template prediction values ​​of the target template based on the first intra-frame prediction mode, the reference pixel filter identifier, and the M interpolation filters includes: When the reference pixel is identified as the first identifier and the interpolation filter is of the Discrete Cosine Transform Interpolation Filter (DCTIF) type, the reference pixel is filtered, and the M template prediction values ​​of the target template are determined based on the first intra-frame prediction mode, the M interpolation filters, and the filtered reference pixel. If the reference pixel filtering identifier is not the first identifier, no filtering is performed on the reference pixel. Based on the first intra-frame prediction mode, the M interpolation filters, and the unfiltered reference pixel, the M template prediction values ​​of the target template are determined.

10. The method according to any one of claims 1-9, wherein, The M interpolation filters include at least one of the following: 4-tap Smooth Interpolation Filter (SIF); 6-tap SIF; 4-tap DCTIF; 6-tap DCTIF; 8-tap DCTIF.

11. The method according to any one of claims 1-10, wherein, The determination of the second interpolation filter based on the at least one first interpolation filter and the preset conditions includes at least one of the following: If the first interpolation filter includes DCTIF, a second interpolation filter is determined based on a first preset condition; If the first interpolation filter includes SIF, a second interpolation filter is determined based on a second preset condition.

12. The method according to claim 11, wherein, The first preset condition includes a first condition and a second condition. When the first interpolation filter includes DCTIF, determining the second interpolation filter based on the first preset condition includes any one of the following: If the first condition and the second condition are met, the second interpolation filter is determined to be an 8-tap DCTIF; If the first condition or the second condition is not met, the second interpolation filter is determined to be a 6-tap DCTIF; In high-precision intra-frame prediction mode, if the first value is greater than the first threshold, the first condition is satisfied; in low-precision prediction mode, if the first value is greater than half of the first threshold, the first condition is satisfied. In high-precision intra-frame prediction mode, if the first threshold is less than the first preset value, the second condition is satisfied. In low-precision mode, if the first threshold is less than the second preset value, the second condition is satisfied, and the first preset value is greater than the second preset value. The first value is the minimum of the first absolute value and the second absolute value, the first absolute value is the absolute value of the difference between the angle prediction mode and the horizontal mode, and the second absolute value is the absolute value of the difference between the angle prediction mode and the vertical mode; the first threshold is determined based on the width and height of the target image block.

13. The method according to claim 11, wherein, When the first interpolation filter includes SIF, determining the second interpolation filter based on the second preset condition includes any one of the following: If the width and height of the target image block are both greater than or equal to a third preset value, the second interpolation filter is determined to be a 6-tap SIF. If the width of the target image block is less than the third preset value, or the height of the target image block is less than the third preset value, the second interpolation filter is determined to be a 4-tap SIF.

14. The method according to claim 11, wherein, Before determining the second interpolation filter based on the at least one first interpolation filter and preset conditions, the method further includes: Based on at least one of the first intra-frame prediction mode and the second information, determine the first preset condition and the second preset condition; The second information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

15. An intra-frame prediction apparatus, comprising: The first determining module is used to determine at least one first interpolation filter from the M interpolation filters based on the first intra-frame prediction mode and M interpolation filters, where M is an integer greater than 1; The second determining module is used to determine the second interpolation filter based on the at least one first interpolation filter and preset conditions; The prediction module is used to perform intra-frame prediction on the target image block based on the first intra-frame prediction mode and the second interpolation filter, and to determine the predicted value of the target image block.

16. The apparatus according to claim 15, wherein, The first determining module is further configured to: Based on the first intra-frame prediction mode and M interpolation filters, M template prediction values ​​of the target template are determined, wherein the target template is determined based on the adjacent reconstructed pixels of the target image block; M template costs are determined based on the template reconstruction values ​​and the M template prediction values, wherein the template reconstruction values ​​are obtained based on the neighboring reconstructed pixels of the target image block; Based on the M template costs, at least one first interpolation filter is determined from the M interpolation filters.

17. The apparatus according to claim 16, wherein, If the template costs of K interpolation filters are known among the M interpolation filters, the first determining module is further configured to: Based on the first intra-frame prediction mode and N interpolation filters, N template prediction values ​​of the target template are determined, where M is the sum of K and N, N is an integer less than or equal to M, and K is an integer greater than or equal to 0. The cost of N templates is determined based on the reconstructed template values ​​and the predicted values ​​of the N templates. The M template costs are obtained based on the N template costs and the template costs corresponding to the K interpolation filters.

18. The apparatus according to claim 16, wherein, The first determining module is further configured to: The target template is determined based on the intra-frame prediction mode, vertical mode, and horizontal mode of the first frame.

19. The apparatus according to claim 18, wherein, The first determining module is also used for any of the following: If the intra-frame prediction mode is greater than or equal to the vertical mode, the first template is determined as the target template, and the first template is determined based on at least one of the upper region and the upper left region of the target image block. If the intra-frame prediction mode is less than or equal to the horizontal mode, the second template is determined as the target template, and the second template is determined based on at least one of the left region and the upper left region of the target image block; If the intra-frame prediction mode is less than the vertical mode, or if the intra-frame prediction mode is greater than the horizontal mode, the third template is determined as the target template. The third template is determined based on at least one of the upper region, the left region, and the upper left region of the target image block. The upper region of the target image block includes one or more rows above the target image block; The left-side region of the target image block includes one or more columns on the left side of the target image block; The upper left region of the target image block includes one row and one column or multiple rows and columns in the upper left corner of the target image block.

20. The apparatus according to claim 16, wherein, The first determining module is further configured to: Based on at least one of the first intra-frame prediction mode and the first information, determine at least one of the third interpolation filter and the reference pixel filter identifier; The first information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

21. The apparatus according to claim 20, wherein, The first determining module is further configured to: Given a third interpolation filter, M interpolation filters are determined based on the third interpolation filter.

22. The apparatus according to claim 20, wherein, The first determining module is further configured to: Given the reference pixel filter identifier, M template prediction values ​​for the target template are determined based on the first intra-frame prediction mode, the reference pixel filter identifier, and M interpolation filters.

23. The apparatus according to claim 22, wherein, The first determining module is further configured to: When the reference pixel is identified as the first identifier and the interpolation filter is of the Discrete Cosine Transform Interpolation Filter (DCTIF) type, the reference pixel is filtered, and the M template prediction values ​​of the target template are determined based on the first intra-frame prediction mode, the M interpolation filters, and the filtered reference pixel. If the reference pixel filtering identifier is not the first identifier, no filtering is performed on the reference pixel. Based on the first intra-frame prediction mode, the M interpolation filters, and the unfiltered reference pixel, the M template prediction values ​​of the target template are determined.

24. The apparatus according to any one of claims 15-23, wherein, The M interpolation filters include at least one of the following: 4-tap SIF; 6-tap SIF; 4-tap DCTIF; 6-tap DCTIF; 8-tap DCTIF.

25. The apparatus according to any one of claims 15-24, wherein, The second determining module is also used for at least one of the following: If the first interpolation filter includes DCTIF, a second interpolation filter is determined based on a first preset condition; If the first interpolation filter includes SIF, a second interpolation filter is determined based on a second preset condition; The first preset condition is different from the second preset condition.

26. The apparatus according to claim 25, wherein, The first preset condition includes a first condition and a second condition. When the first interpolation filter includes DCTIF, the second determining module is further configured to: If the first condition and the second condition are met, the second interpolation filter is determined to be an 8-tap DCTIF; If the first condition or the second condition is not met, the second interpolation filter is determined to be a 6-tap DCTIF; In high-precision intra-frame prediction mode, if the first value is greater than the first threshold, the first condition is satisfied; in low-precision prediction mode, if the first value is greater than half of the first threshold, the first condition is satisfied. In high-precision intra-frame prediction mode, if the first threshold is less than the first preset value, the second condition is satisfied. In low-precision mode, if the first threshold is less than the second preset value, the second condition is satisfied, and the first preset value is greater than the second preset value. The first value is the minimum of the first absolute value and the second absolute value, the first absolute value is the absolute value of the difference between the angle prediction mode and the horizontal mode, and the second absolute value is the absolute value of the difference between the angle prediction mode and the vertical mode; the first threshold is determined based on the width and height of the target image block.

27. The apparatus according to claim 25, wherein, When the first interpolation filter includes SIF, the second determining module is further configured to: If the width and height of the target image block are both greater than or equal to a third preset value, the second interpolation filter is determined to be a 6-tap SIF. If the width of the target image block is less than the third preset value, or the height of the target image block is less than the third preset value, the second interpolation filter is determined to be a 4-tap SIF.

28. The apparatus according to claim 25, wherein, The second determining module is also used for: Based on at least one of the first intra-frame prediction mode and the second information, determine the first preset condition and the second preset condition; The second information includes at least one of the following: the width of the target image patch, the height of the target image patch, the area of ​​the target image patch, the absolute value of the difference between the angle prediction mode and the horizontal mode, and the absolute value of the difference between the angle prediction mode and the vertical mode.

29. An electronic device comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the intra-frame prediction method as claimed in any one of claims 1-14.

30. A readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the intra-frame prediction method as described in any one of claims 1-14.

31. A chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to run a program or instructions to implement the steps of the intra-frame prediction method as described in any one of claims 1-14.

32. A computer program product stored in a storage medium, the computer program product being executed by at least one processor to implement the steps of the intra-frame prediction method as claimed in any one of claims 1-14.