Intra prediction method and apparatus, and electronic device

By using a combination of multiple intra-prediction modes and interpolation filters in intra-prediction, the template prediction value and cost are determined, which solves the problem of low intra-prediction accuracy in the prior art and achieves more efficient image processing.

WO2026086663A1PCT designated stage Publication Date: 2026-04-30VIVO MOBILE COMM CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2025-10-16
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

In existing technologies, intra-frame prediction based on fixed intra-frame prediction modes and interpolation filters cannot effectively handle various textures in the image, resulting in low intra-frame prediction accuracy.

Method used

N intra-frame prediction modes and M interpolation filters are used to determine S template prediction values ​​of the template, and K first combinations are determined by the cost between the template prediction values ​​and the template reconstruction values, which are used to perform intra-frame prediction on the target image patch.

Benefits of technology

It improves the accuracy and flexibility of intra-frame prediction, enabling the selection of appropriate prediction methods based on different image textures, thereby enhancing image processing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025127946_30042026_PF_FP_ABST
    Figure CN2025127946_30042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of video coding and decoding. Disclosed are an intra prediction method and apparatus, and an electronic device. The intra prediction method in the embodiments of the present application comprises: determining N intra prediction modes and M first parameters, wherein the first parameters comprise an interpolation filter; on the basis of the N intra prediction modes and the M first parameters, determining S template prediction values of a template; on the basis of a cost between each of the template prediction values and a template reconstruction value, determining K first combinations; and on the basis of the K first combinations, performing intra prediction on a target image block, so as to determine a prediction value of the target image block, wherein the template and the template reconstruction value are obtained on the basis of neighboring reconstructed pixels of the target image block, each of the first combinations comprises one of the N intra prediction modes and at least one of the M first parameters, and K is a positive integer.
Need to check novelty before this filing date? Find Prior Art

Description

Intra-frame prediction methods, apparatus and electronic equipment

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 202411486994.2, filed in China on October 23, 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 encoding and decoding, a frame of image is divided into many macroblocks, and prediction blocks are obtained using intra-frame prediction or inter-frame prediction. Traditional intra-frame prediction modes include Direct Current (DC), Planar, and Angular Prediction modes. These modes use the reconstructed pixels that have been 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 caused by intra-frame prediction based on a fixed intra-frame prediction mode and interpolation filter in related technologies.

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

[0007] N intra-frame prediction modes and M first parameters are determined, wherein the first parameters include interpolation filters, where N is an integer greater than or equal to 1, and M is an integer greater than 1;

[0008] Based on the N intra-frame prediction modes and the M first parameters, S template prediction values ​​are determined. The template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1.

[0009] Based on the cost between each template prediction value and template reconstruction value, K first combinations are determined;

[0010] Intra-frame prediction is performed on the target image patch based on the K first combinations to determine the predicted value of the target image patch;

[0011] Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

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

[0013] The first determining module is used to determine N intra-frame prediction modes and M first parameters, wherein the first parameters include an interpolation filter, N is an integer greater than or equal to 1, and M is an integer greater than 1.

[0014] The second determining module is used to determine S template prediction values ​​of the template based on the N intra-frame prediction modes and the M first parameters, wherein the template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1.

[0015] The third determining module is used to determine K first combinations based on the cost between each template predicted value and template reconstructed value;

[0016] A prediction module is used to perform intra-frame prediction on the target image patch based on the K first combinations to determine the predicted value of the target image patch;

[0017] Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

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

[0019] Fourthly, an electronic device is provided, 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 method described in the first aspect.

[0020] Fifthly, an electronic device is provided, including a processor and a communication interface, wherein the processor is used for:

[0021] N intra-frame prediction modes and M first parameters are determined, wherein the first parameters include interpolation filters, where N is an integer greater than or equal to 1, and M is an integer greater than 1;

[0022] Based on the N intra-frame prediction modes and the M first parameters, S template prediction values ​​are determined. The template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1.

[0023] Based on the cost between each template prediction value and template reconstruction value, K first combinations are determined;

[0024] Intra-frame prediction is performed on the target image patch based on the K first combinations to determine the predicted value of the target image patch;

[0025] Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

[0026] 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.

[0027] 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] In this embodiment, the encoding or decoding end determines N intra-frame prediction modes and M first parameters (the first parameters include interpolation filters, where M is greater than 1). That is, based on the N intra-frame prediction modes and M interpolation filters, it can determine S template prediction values ​​of a template. Based on the cost between each template prediction value and the template reconstruction value, it determines K first combinations. Each first combination includes an intra-frame prediction mode and at least one interpolation filter. Then, based on the K first combinations, it performs intra-frame prediction on the target image patch to determine the predicted value of the target image patch. This allows the encoding or decoding end to perform intra-frame prediction on the target image patch based on the K first combinations, enabling the selection of different first combinations for intra-frame prediction based on different image textures. This effectively improves intra-frame prediction accuracy and image processing performance, and makes the intra-frame prediction method of the encoding or decoding end more flexible. Attached Figure Description

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

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

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

[0035] Figure 4a shows the intra-frame prediction mode used in related technologies;

[0036] Figure 4b is a schematic diagram of the template and reference pixels in TIMD mode;

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

[0038] Figure 6 is an application diagram of an intra-frame prediction method provided in an embodiment of this application;

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

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

[0041] Figure 9 is a second schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0042] 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.

[0043] 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.

[0044] 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 (CODEC) video data (including encoding or decoding). The video data includes original unencoded video, encoded video, decoded (e.g., reconstructed) video, or syntax elements, etc.

[0045] 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.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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 encoding 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.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] 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.

[0054] 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).

[0055] Destination device 110 can access encoded video data from a server, for example, via a wireless channel (e.g., Wi-Fi connection) or a wired connection (e.g., digital subscriber line (DSL), cable modem, etc.) for accessing encoded video data stored on the server.

[0056] 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 IEEE 802.11 or IEEE 802.15 standard (e.g., ZigBee™), Bluetooth standard, or other physical components. In an example where output interface 104 and input interface 111 include wireless components, output interface 104 and input interface 111 can be configured to transmit data, such as encoded video data, via Wi-Fi, Ethernet, or cellular networks (such as 4G, LTE (Long Term Evolution), Advanced LTE, 5G, 6G, etc.).

[0057] 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.

[0058] The input interface 111 of the destination device 110 receives an encoded video bitstream from the communication medium 120. 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. The display device 114 displays the decoded video data to the user. The display device 114 may include a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light-emitting diode (OLED) display, or other types of display devices.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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 104 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.

[0064] 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.

[0065] 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.

[0066] 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).

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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 transformation, etc. In some examples, the encoder 200 may not include the transformation processing unit 203.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] Figure 3 is a schematic diagram of the decoder 300 provided in an embodiment of this application. The decoder 300 can 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.

[0078] Entropy decoding unit 302 can receive encoded video data from 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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.

[0083] 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.

[0084] 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).

[0085] The following explains the relevant concepts that may be involved in the embodiments of this application.

[0086] 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 4a.

[0087] 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.

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

[0089] TIMD mode is also a technique for implicitly deriving intra-prediction modes, as shown in Figure 4b. 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 here consists 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.

[0090] When it comes to intra-frame prediction technology, a prediction mode can only use a fixed interpolation filter based on preset conditions. However, this method cannot handle various textures in the image well, resulting in low accuracy of intra-frame prediction.

[0091] To address the aforementioned problems, this application provides an intra-frame prediction method. The intra-frame prediction method provided by this application is described below with reference to the accompanying drawings. The intra-frame prediction method provided by this application 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 by this application 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 device or video encoding device, and the decoding end can be referred to as a decoding device or video decoding device.

[0092] Please refer to Figure 5, which is a flowchart of an intra-frame prediction method provided in an embodiment of this application. As shown in Figure 5, the method includes the following steps:

[0093] Step 501: Determine N intra-frame prediction modes and M first parameters, the first parameters including interpolation filters.

[0094] Wherein, N is an integer greater than or equal to 1, and M is an integer greater than 1. That is, the encoding end or the decoding end determines at least one intra-frame prediction mode and multiple interpolation filters.

[0095] Optionally, the encoding or decoding end can obtain the intra-prediction mode index from the bitstream and determine the corresponding intra-prediction mode through the intra-prediction mode index. It should be noted that the encoding and decoding ends pre-agree on an intra-prediction mode list, which includes at least one intra-prediction mode, and each intra-prediction mode includes a corresponding intra-prediction mode index.

[0096] For example, the encoding end determines the corresponding intra-prediction mode index according to the intra-prediction mode it adopts, and writes the intra-prediction mode index into the bitstream sent to the decoding end. The decoding end obtains the intra-prediction mode index from the bitstream, searches for the intra-prediction mode corresponding to the intra-prediction mode index from a pre-agreed list of intra-prediction modes, and thus the decoding end can determine the intra-prediction mode based on the bitstream.

[0097] Alternatively, the encoder or decoder can obtain the N intra-frame prediction modes, such as TIMD modes, through implicit derivation.

[0098] Step 502: Based on the N intra-frame prediction modes and the M first parameters, determine the S template prediction values ​​of the template, where S is an integer greater than 1.

[0099] The template is obtained based on the adjacent reconstructed pixels of the target image block. Optionally, obtaining the template based on the adjacent reconstructed pixels of the target image block can also be understood as: 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.

[0100] In this embodiment of the application, after determining N intra-frame prediction modes and M interpolation filters, the encoding end or decoding end combines the N intra-frame prediction modes and M interpolation filters, and performs intra-frame prediction on the template based on the combined intra-frame prediction modes and interpolation filters to obtain the template prediction value.

[0101] Understandably, the encoding or decoding end can combine the N intra-frame prediction modes and M interpolation filters to obtain S combinations of intra-frame prediction modes and interpolation filters, and thus obtain S template prediction values. For example, intra-frame prediction mode 1 corresponds to 2 interpolation filters, and intra-frame prediction mode 2 also corresponds to 2 interpolation filters. Based on intra-frame prediction mode 1 and its corresponding 2 interpolation filters, 2 template prediction values ​​of the template are obtained; based on intra-frame prediction mode 2 and its corresponding 2 interpolation filters, 2 template prediction values ​​of the template are obtained, thus obtaining a total of 4 template prediction values.

[0102] Step 503: Determine K first combinations based on the cost between each template prediction value and template reconstruction value.

[0103] The template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image patch, and the cost is the sum of the absolute transformation differences between the template prediction value and the template reconstruction value. Each of the first combinations includes an intra-frame prediction mode and at least one first parameter, wherein the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

[0104] In this embodiment of the application, the encoding end or the decoding end determines S template prediction values ​​of the template based on the N intra-frame prediction modes and the M first parameters, calculates the cost between each template prediction value and the template reconstruction value, and thus obtains S costs. The encoding end or the decoding end determines K first combinations based on the S costs.

[0105] Optionally, determining K first combinations based on the cost between each template predicted value and template reconstructed value includes:

[0106] Obtain the cost between each template prediction value and template reconstruction value to get S costs;

[0107] Based on the S costs, K first combinations are determined, where K is less than or equal to S.

[0108] For example, K costs can be randomly selected from the S costs, and the intra-prediction mode and first parameter corresponding to each of the K costs can be obtained to obtain K first combinations. Alternatively, the intra-prediction mode and first parameter corresponding to each of the S costs can be obtained to obtain K first combinations, in which case K equals S.

[0109] In this embodiment, the encoding or decoding end determines K first combinations, including intra-prediction mode and first parameter, based on the cost between each template prediction value and template reconstruction value. This makes the intra-prediction mode and first parameter used for intra-prediction determined based on cost calculation, making the determination of intra-prediction mode and first parameter more accurate, thereby helping to improve the accuracy of intra-prediction.

[0110] Optionally, determining K first combinations based on the S costs includes:

[0111] Find the K smallest costs among the S costs;

[0112] Obtain the intra-frame prediction mode and the first parameter corresponding to each of the K costs to obtain the K first combinations.

[0113] In this embodiment, the encoding or decoding end calculates the cost between each template prediction value and the template reconstruction value, obtains S costs, and then selects the K costs with the smallest cost. For example, the S costs can be sorted in ascending order, and the K costs with the smallest cost can be selected.

[0114] Understandably, the cost is obtained by calculating the sum of the absolute transformation differences between the template prediction value and the template reconstruction value at the encoding or decoding end. The template prediction value is determined based on the intra-frame prediction mode and the first parameter. Then, the template prediction values ​​corresponding to the K costs are calculated. Based on the template prediction values, the intra-frame prediction mode and the first parameter corresponding to the K costs can be determined. The intra-frame prediction mode and the first parameter corresponding to each cost are taken as the first combination, thus obtaining K first combinations.

[0115] In this embodiment, the cost is the sum of the absolute transformation differences between the template prediction value and the template reconstruction value. The encoding end or decoding end selects the intra-prediction mode and the first parameter corresponding to the K smallest costs among the S costs to perform intra-prediction on the target image block, thereby effectively improving the intra-prediction accuracy.

[0116] Optionally, obtaining the K smallest costs among the S costs includes:

[0117] The S costs are classified according to the N intra-frame prediction modes to obtain N cost sets. Each cost set includes M costs, and the intra-frame prediction modes corresponding to the costs in each cost set are the same.

[0118] Obtain the L smallest costs in the target cost set, and obtain the first parameter corresponding to each of the L costs. The N cost set includes the target cost set, and L is a positive integer less than or equal to K.

[0119] K costs are determined based on the first L costs of the target cost set.

[0120] The target cost set can be one, multiple, or each of N cost sets. The value of L in different target cost sets can be the same or different, and the sum of the values ​​of L in all target cost sets equals K.

[0121] For example, assuming there are 3 intra-prediction modes (N=3) and 10 first parameters (M=10), the template prediction value for each intra-prediction mode and the first parameter is calculated, and the cost between each template prediction value and the reconstructed value is calculated, resulting in 30 costs. These 30 costs are then classified according to the intra-prediction mode, resulting in 3 cost sets. For example, the first cost set includes the costs calculated based on the first intra-prediction mode and the 10 first parameters, the second cost set includes the costs calculated based on the second intra-prediction mode and the 10 first parameters, and the third cost set includes the costs calculated based on the third intra-prediction mode and the 10 first parameters. Further, the top L costs with the smallest costs in each cost set are obtained. For example, the top 3 costs with the smallest costs in the first cost set, the top 2 costs with the smallest costs in the second cost set, and the top 4 costs with the smallest costs in the third cost set are obtained, resulting in the final 9 costs. In this case, K can be equal to 9. Furthermore, based on the intra-prediction mode and first parameter corresponding to each of these nine costs, nine first combinations are obtained.

[0122] In this embodiment of the application, K first combinations can be determined based on the different methods described above, thereby making the determination of the intra-prediction mode and the first parameter used for intra-prediction more flexible and diverse.

[0123] Optionally, when the method is executed by the decoding end and K is greater than 1, the method further includes:

[0124] The bitstream is acquired, and a first identifier is obtained from the bitstream, the first identifier being used to identify the first combination for intra-frame prediction of the target image patch.

[0125] For example, when K is greater than 1, after determining K first combinations based on the above method, the encoder can perform intra-frame prediction on the target image block based on one of the first combinations to determine the intra-frame prediction value of the target image block. In this case, the encoder writes a first identifier into the bitstream, which identifies which first combination the encoder used for intra-frame prediction. Then, after obtaining the bitstream, the decoder obtains the first identifier by parsing the bitstream. Based on the first identifier, it can determine the first combination used by the encoder. After determining K first combinations based on the above method, the decoder selects the corresponding first combination according to the first identifier to perform intra-frame prediction on the target image block to determine the prediction value of the target image block. This allows the encoder and decoder to use the same first combination for intra-frame prediction on the target image block, ensuring that the prediction value obtained by the decoder matches that of the encoder, thus improving the accuracy of image processing by the decoder.

[0126] It should be noted that the first combination identified by the first identifier can also be multiple, which will not be elaborated here.

[0127] Step 504: Perform intra-frame prediction on the target image patch based on the K first combinations to determine the predicted value of the target image patch.

[0128] The first combination includes an intra-frame prediction mode and a first parameter. The first parameter includes an interpolation filter. That is, the encoder or decoder performs intra-frame prediction on the target image block based on a combination of K intra-frame prediction modes and interpolation filters, thereby determining the predicted value of the target image block.

[0129] In this embodiment, the encoding or decoding end determines N intra-frame prediction modes and M first parameters (i.e., M interpolation filters). Based on the N intra-frame prediction modes and M interpolation filters, S template prediction values ​​of the template are determined. Based on the cost between each template prediction value and the template reconstruction value, K first combinations are determined. Each first combination includes an intra-frame prediction mode and at least one interpolation filter. Then, intra-frame prediction is performed on the target image patch based on the K first combinations to determine the predicted value of the target image patch. This allows the intra-frame prediction mode to be used in conjunction with at least one interpolation filter to perform intra-frame prediction on the target image patch, thereby enabling the processing of different image textures based on different interpolation filters. This effectively improves the intra-frame prediction accuracy and image processing effect, and makes the intra-frame prediction method of the encoding or decoding end more flexible.

[0130] Optionally, the interpolation filter included in the first parameter is an interpolation filter combination, and the interpolation filter combination includes at least two interpolation filters. In the embodiments of this application, the interpolation filter included in the first parameter can be one or more. For example, the first parameter includes at least a plurality of interpolation filters, and the plurality of interpolation filters can include at least one interpolation filter combination, and each interpolation filter combination includes at least two interpolation filters.

[0131] For example, the interpolation filter combination can be a fixed set of interpolation filters, such as an interpolation filter combination including a 4-tap or 6-tap SIF interpolation filter and a 4-tap or 6-tap DCTIF interpolation filter.

[0132] In this embodiment, the first parameter includes at least two interpolation filters. Thus, when the encoding or decoding end performs intra-frame prediction based on the intra-frame prediction mode and the first parameter, it can perform intra-frame prediction on the target image block based on the intra-frame prediction mode and at least two interpolation filters. This makes the intra-frame prediction mode no longer paired with a fixed interpolation filter, but can be paired with at least two interpolation filters to perform intra-frame prediction, thereby enabling more flexible processing of various textures in the image and effectively improving the accuracy of intra-frame prediction.

[0133] Optionally, the N intra-frame prediction modes include a first intra-frame prediction mode. When a first interpolation filter is determined based on at least one of the first intra-frame prediction mode and first information, the first parameter corresponding to the first intra-frame prediction mode includes a second interpolation filter, and the second interpolation filter can be one or more.

[0134] Alternatively, the first parameter corresponding to the first intra-frame prediction mode may include the first interpolation filter and the second interpolation filter. The second interpolation filter differs from the first interpolation filter, and 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.

[0135] For example, if the intra-frame prediction mode of the target image patch is integer pixel precision, the first interpolation filter may be a 4-tap or 6-tap DCTIF interpolation filter, and the second interpolation filter may be a 4-tap or 6-tap SIF interpolation filter, or the second interpolation filter may be a combination of a 4-tap or 6-tap SIF interpolation filter and a 4-tap or 6-tap DCTIF interpolation filter.

[0136] Alternatively, if the intra-frame prediction mode of the target image patch is not integer pixel precision, if the area of ​​the target image patch is greater than or equal to a first preset threshold, and the absolute value of the difference between the angle prediction mode and the horizontal mode and / or the vertical mode is greater than or equal to a second preset threshold, the first interpolation filter may be a SIF interpolation filter, and the second interpolation filter may be a DCTIF interpolation filter.

[0137] Alternatively, if the intra-frame prediction mode of the target image patch is not integer pixel precision, if the area of ​​the target image patch is less than a first preset threshold, or if the absolute value of the difference between the angle prediction mode and the horizontal mode and / or the vertical mode is less than a second preset threshold, the first interpolation filter may be a DCTIF interpolation filter, and the second interpolation filter may be an SIF interpolation filter.

[0138] Alternatively, if the first interpolation filter is determined to be a 4-tap SIF interpolation filter based on the first information, then the second interpolation filter is a 6-tap SIF interpolation filter, or the second interpolation filter is a 6-tap SIF interpolation filter and a DCTIF interpolation filter.

[0139] Alternatively, if the first interpolation filter is determined to be a 6-tap SIF interpolation filter based on the first information, then the second interpolation filter is a 4-tap SIF interpolation filter, or the second interpolation filter is a 4-tap SIF interpolation filter and a DCTIF interpolation filter.

[0140] Alternatively, if the first interpolation filter is determined to be a DCTIF interpolation filter based on the first information, then the second interpolation filter is a SIF interpolation filter, or the second interpolation filter is a combination of a SIF interpolation filter and a DCTIF interpolation filter.

[0141] Optionally, the second interpolation filter may include at least one interpolation filter.

[0142] In this embodiment of the application, when the first interpolation filter is determined, the encoding end or the decoding end can use a second interpolation filter that is different from the first interpolation filter to perform intra-frame prediction of the target image block. This can accurately determine which interpolation filter is used for intra-frame prediction of the target image block, which helps to improve the accuracy of intra-frame prediction.

[0143] Optionally, the first parameter further includes a reference pixel filtering identifier, which is used to identify whether a reference pixel is filtered. The reference pixel can be determined based on neighboring reconstructed pixels of the target image block. For example, a reference pixel filtering identifier of 0 indicates that no filtering is performed on the reference pixel, such as not performing [1,2,1] / 4 filtering; a reference pixel filtering identifier of 1 indicates that the reference pixel is filtered, such as performing [1,2,1] / 4 filtering.

[0144] For example, to better understand, the first parameter will be represented below by {interpolation filter, reference pixel filter identifier}.

[0145] In this embodiment, the encoding or decoding end determines N intra-frame prediction modes and M {interpolation filters, reference pixel filter identifiers}. Based on the N intra-frame prediction modes and M {interpolation filters, reference pixel filter identifiers}, S template prediction values ​​of the template are determined. Then, the cost between each template prediction value and the template reconstruction value is calculated to obtain S costs. Based on the S costs, K first combinations are determined, each of which includes one intra-frame prediction mode and at least one {interpolation filter, reference pixel filter identifier}. Further, intra-frame prediction is performed on the target image block based on the K first combinations to determine the prediction value of the target image block. Furthermore, the encoding or decoding end can also perform intra-frame prediction on the target image block based on the intra-frame prediction mode, interpolation filter, and reference pixel filter identifier, which helps improve the accuracy of intra-frame prediction and increases the diversity of intra-frame prediction methods for video images.

[0146] Optionally, when the first parameter includes an interpolation filter and a reference pixel filter identifier, the first parameter includes a second combination, wherein the number of the second combination is at least one, and each second combination includes at least one interpolation filter and at least one reference pixel filter identifier. For example, the second combination may include two interpolation filters and one reference pixel identifier, or the second combination may include one interpolation filter and two reference pixel filter identifiers.

[0147] Optionally, the second combination may include a fixed combination of at least one interpolation filter and at least one reference pixel filter identifier. For example, the second combination may include a 4-tap or 6-tap SIF interpolation filter and a 4-tap or 6-tap DCTIF interpolation filter; it may also include a reference pixel filter identifier 0 or a reference pixel filter identifier 1.

[0148] In this embodiment, the first parameter includes at least one second combination, which includes at least one interpolation filter and at least one reference pixel filter identifier. Thus, when the encoding or decoding end performs intra-frame prediction based on the intra-frame prediction mode and the first parameter, it can also perform intra-frame prediction on the target image block based on the intra-frame prediction mode, at least one interpolation filter, and at least one reference pixel filter identifier. This makes the intra-frame prediction mode no longer paired with a fixed interpolation filter and reference pixel filter identifier, but can perform intra-frame prediction based on different interpolation filters and reference pixel filter identifiers, thereby enabling more flexible processing of various textures in the image and effectively improving the accuracy of intra-frame prediction.

[0149] Optionally, the N intra-frame prediction modes include a second intra-frame prediction mode. When a first interpolation filter and / or a first reference pixel filter identifier are determined based on at least one of the second intra-frame prediction mode and second information, the first parameter corresponding to the second intra-frame prediction mode includes the second interpolation filter, and / or the reference pixel filter identifier included in the first parameter corresponding to the second intra-frame prediction mode is the second reference pixel filter identifier; or,

[0150] The first parameter corresponding to the second intra-frame prediction mode includes an interpolation filter that is a first interpolation filter and a second interpolation filter, and the first parameter corresponding to the second intra-frame prediction mode includes a reference pixel filter identifier that is a first reference pixel filter identifier and a second reference pixel filter identifier.

[0151] The second interpolation filter differs from the first interpolation filter, and the second reference pixel filter identifier may be the same as or different from the first reference pixel filter identifier. The second 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. It is understood that the second information may be the same as the first information described above.

[0152] Optionally, the first interpolation filter and the second interpolation filter are interpolation filters of different types; for example, the first interpolation filter is a SIF interpolation filter and the second interpolation filter is a DCTIF interpolation filter.

[0153] Alternatively, the first interpolation filter and the second interpolation filter may be of the same type, but with different taps. For example, the first interpolation filter may be a 4-tap SIF interpolation filter, and the second interpolation filter may be a 6-tap SIF interpolation filter.

[0154] The following describes the process through several specific examples.

[0155] For example, if the intra-frame prediction mode of the target image patch is integer pixel precision (such as -14, -12, -10, -6, 2, 34, 66, 72, 76, 78, or 80), and the first interpolation filter is determined to be a 4-tap or 6-tap DCTIF interpolation filter, then the second interpolation filter can be an SIF interpolation filter.

[0156] Alternatively, if the intra-frame prediction mode of the target image block is integer pixel precision (e.g., -14, -12, -10, -6, 2, 34, 66, 72, 76, 78, or 80), and the first interpolation filter is determined to be a 4-tap or 6-tap DCTIF interpolation filter, then the second interpolation filter can be a 4-tap or 6-tap SIF interpolation filter, and the second reference pixel filter identifier is 0.

[0157] Alternatively, if the intra-frame prediction mode of the target image patch is integer pixel precision (e.g., -14, -12, -10, -6, 2, 34, 66, 72, 76, 78, or 80), the area of ​​the target image patch is greater than or equal to the first preset threshold, and the absolute value of the difference between the angle prediction mode and the horizontal and vertical modes is greater than or equal to the second preset threshold, then the first interpolation filter is determined to be a SIF interpolation filter, and the first reference pixel filtering identifier is 0 (e.g., [1, 2, 1] / 4 filtering is performed on the reference pixel). Then the second interpolation filter can be a DCTIF interpolation filter, and the second reference pixel filtering identifier is 1 (e.g., [1, 2, 1] / 4 filtering is not performed on the reference pixel).

[0158] Alternatively, if the intra-frame prediction mode of the target image patch is not of integer pixel precision, the area of ​​the target image patch is less than the first preset threshold, or the absolute value of the difference between the angle prediction mode and the horizontal mode and / or the vertical mode is greater than or equal to the second preset threshold, and the first interpolation filter is determined to be a DCTIF interpolation filter, then the second interpolation filter can be a SIF interpolation filter.

[0159] Alternatively, if the first interpolation filter is determined to be a 4-tap SIF interpolation filter based on at least one of the intra-frame prediction mode of the target image patch and the second information, then the second interpolation filter can be a 6-tap SIF interpolation filter, and the second reference pixel filter identifier is 0; or, the second interpolation filter can be a DCTIF interpolation filter, and the second reference pixel filter identifier is 0 or 1.

[0160] Alternatively, if the first interpolation filter is determined to be a DCTIF interpolation filter based on at least one of the intra-frame prediction mode of the target image block and the second information, then the second interpolation filter can be a 6-tap SIF interpolation filter or a 4-tap SIF interpolation filter, and the second reference pixel filter identifier is 0.

[0161] For example, if the first interpolation filter is determined to be a 4-tap SIF interpolation filter based on at least one of the intra-frame prediction mode of the target image patch and the second information, and the first reference pixel filter identifier is 0, then the interpolation filter included in the first parameter can be a 4-tap SIF interpolation filter (i.e., the first interpolation filter) and a 6-tap SIF interpolation filter (i.e., the second interpolation filter), and the reference pixel filter identifier included in the first parameter can be reference pixel filter identifier 0 (i.e., the first reference pixel filter identifier) ​​and reference pixel filter identifier 1 (i.e., the second reference pixel filter identifier).

[0162] Alternatively, if the first interpolation filter is determined to be a DCTIF interpolation filter based on at least one of the intra-frame prediction mode of the target image patch and the second information, and the first reference pixel filter identifier is 0, then the interpolation filter included in the first parameter can be a DCTIF interpolation filter (i.e., the first interpolation filter) and a SIF interpolation filter (i.e., the second interpolation filter), and the reference pixel filter identifier included in the first parameter can be reference pixel filter identifier 0 (i.e., the first reference pixel filter identifier) ​​and reference pixel filter identifier 1 (i.e., the second reference pixel filter identifier).

[0163] It should be noted that the above are merely illustrative examples and do not constitute a specific limitation on this application.

[0164] The taps of the interpolation filter can be determined based on the width and height of the target image block (the image block to be encoded or decoded). For example, taking the SIF interpolation filter as an example, if the width and height of the target image block are both greater than or equal to the preset values, it is a 6-tap SIF interpolation filter; if the width or height of the target image block is less than the preset values, it is a 4-tap SIF interpolation filter.

[0165] In this embodiment, the encoding end or decoding end can determine the interpolation filter and / or reference pixel filter identifier included in the first parameter based on the first interpolation filter and / or the first reference pixel filter identifier determined by at least one of the intra-frame prediction mode and second information of the target image block. This enables the encoding end or decoding end to determine more accurately and quickly which interpolation filter and / or reference pixel filter identifier to use for intra-frame prediction of the target image block, which helps to improve the accuracy of intra-frame prediction.

[0166] Optionally, the target image block in the embodiments of this application is an image block to be encoded or decoded, or the target image block is a template of an image block to be encoded or decoded.

[0167] For example, taking TIMD mode as an example, please refer to Figures 6(a) and (b). When the target image block is an image block to be encoded or decoded, the template used to determine the template prediction value is obtained based on the neighboring reconstructed pixels of the image block to be encoded or decoded. In this case, after the encoding end or decoding end determines K first combinations based on the aforementioned method, the encoding end performs intra-frame prediction on the image block to be encoded based on the K first combinations to determine the prediction value of the image block to be encoded; or, the decoding end performs intra-frame prediction on the image block to be decoded based on the K first combinations to determine the prediction value of the image block to be decoded.

[0168] Referring to Figures 6(c) and (d), when the target image block is a template of an image block to be encoded or decoded, the template used to determine the template prediction value is obtained based on the template of the image block to be encoded or decoded. In this case, after determining K first combinations based on the aforementioned method, the encoding end performs intra-frame prediction based on the K first combinations of the template of the image block to be encoded to determine the prediction value of the template of the image block to be encoded; or, the decoding end performs intra-frame prediction based on the K first combinations of the template of the image block to be decoded to determine the prediction value of the template of the image block to be decoded.

[0169] In this embodiment of the application, the encoding end or the decoding end can also perform intra-frame prediction on the template of the image block to be encoded or decoded based on the intra-frame prediction method, so as to determine the predicted value of the template of the image block to be encoded or decoded, thereby helping to improve the accuracy of intra-frame prediction.

[0170] 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 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.

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

[0172] The first determining module 701 is used to determine N intra-frame prediction modes and M first parameters, wherein the first parameters include an interpolation filter, where N is an integer greater than or equal to 1, and M is an integer greater than 1.

[0173] The second determining module 702 is used to determine S template prediction values ​​of the template based on the N intra-frame prediction modes and the M first parameters, wherein the template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1.

[0174] The third determining module 703 is used to determine K first combinations based on the cost between each template prediction value and template reconstruction value;

[0175] The prediction module 704 is used to perform intra-frame prediction on the target image patch based on the K first combinations to determine the predicted value of the target image patch;

[0176] Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

[0177] Optionally, the third determining module 703 is further configured to:

[0178] Obtain the cost between each template prediction value and template reconstruction value to get S costs;

[0179] Based on the S costs, K first combinations are determined, where K is less than or equal to S.

[0180] Optionally, the third determining module 703 is further configured to:

[0181] Find the K smallest costs among the S costs;

[0182] Obtain the intra-frame prediction mode and the first parameter corresponding to each of the K costs to obtain the K first combinations.

[0183] Optionally, when the device is applied to the decoding end and K is greater than 1, the device further includes:

[0184] An acquisition module is used to acquire a bitstream and obtain a first identifier from the bitstream, wherein the first identifier is used to identify the first combination for intra-frame prediction of the target image patch.

[0185] Optionally, the N intra-frame prediction modes include a first intra-frame prediction mode. When a first interpolation filter is determined based on at least one of the first intra-frame prediction mode and first information, the first parameter corresponding to the first intra-frame prediction mode includes a second interpolation filter.

[0186] Or the first parameter corresponding to the first intra-frame prediction mode includes the first interpolation filter and the second interpolation filter;

[0187] The second interpolation filter is different from the first interpolation filter, and 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.

[0188] Optionally, the first parameter further includes a reference pixel filter indicating that the N intra-frame prediction modes include a first intra-frame prediction mode. When a first interpolation filter is determined based on at least one of the first intra-frame prediction mode and first information, the first parameter corresponding to the first intra-frame prediction mode includes a second interpolation filter.

[0189] Alternatively, the first parameter corresponding to the first intra-frame prediction mode may include the first interpolation filter and the second interpolation filter.

[0190] Optionally, the first parameter includes a second combination, which includes at least one interpolation filter and at least one reference pixel filter identifier.

[0191] Optionally, the N intra-frame prediction modes include a second intra-frame prediction mode. When a first interpolation filter and / or a first reference pixel filter identifier are determined based on at least one of the second intra-frame prediction mode and second information, the first parameter corresponding to the second intra-frame prediction mode includes the second interpolation filter, and / or the reference pixel filter identifier included in the first parameter corresponding to the second intra-frame prediction mode is the second reference pixel filter identifier; or,

[0192] The first parameter corresponding to the second intra-frame prediction mode includes an interpolation filter that is a first interpolation filter and a second interpolation filter, and the first parameter corresponding to the second intra-frame prediction mode includes a reference pixel filter identifier that is a first reference pixel filter identifier and a second reference pixel filter identifier.

[0193] Wherein, the second interpolation filter is different from the first interpolation filter, and the second reference pixel filter identifier is the same as or different from the first reference pixel filter identifier; the second 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.

[0194] Optionally, the first interpolation filter and the second interpolation filter are interpolation filters of different types; or,

[0195] The first interpolation filter and the second interpolation filter are of the same type, but the taps of the first interpolation filter and the second interpolation filter are different.

[0196] Optionally, the target image block is an image block to be encoded or decoded, or the target image block is a template of an image block to be encoded or decoded.

[0197] In this embodiment, the intra-frame prediction mode can select at least one interpolation filter to perform intra-frame prediction on the target image block, thereby enabling the processing of different image textures based on different interpolation filters, effectively improving the intra-frame prediction accuracy and image processing effect, and making the device more flexible in its intra-frame prediction method for the target image block.

[0198] The intra-frame prediction device 700 provided in this application embodiment can implement the various processes implemented in the method embodiment shown in FIG5 and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0199] As shown in Figure 8, this application embodiment also provides an electronic device 800, including a processor 801 and a memory 802. The memory 802 stores programs or instructions that can run on the processor 801. For example, when the electronic device 800 is an encoding end device or a decoding end device, when the program or instructions are executed by the processor 801, they implement the various steps of the above-described intra-frame prediction method embodiment and achieve the same technical effect. To avoid repetition, further details are omitted here. Optionally, the memory 802 can be the memory 102 or memory 113 in the embodiment shown in Figure 1, and the processor 801 can implement the functions of the encoder 200 or decoder 300 in the embodiments shown in Figures 1-3.

[0200] 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.

[0201] 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 electronic device embodiment and can achieve the same technical effect.

[0202] The processor or processing circuit in this application embodiment 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 this application embodiment may include transceivers, pins, circuits, buses, etc.

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

[0204] The terminal 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), shipboard equipment, pedestrian user equipment (PUE), smart home (home devices with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), 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.

[0205] 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.

[0206] 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.

[0207] Taking an electronic device as an example, the terminal can be used as an encoding end or a decoding end. Figure 9 is a schematic diagram of the hardware structure of a terminal that implements an embodiment of this application.

[0208] The terminal 900 includes, but is not limited to, at least some of the following components: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910.

[0209] Those skilled in the art will understand that the terminal 900 may also include a power supply (such as a battery) for powering various components. The power supply can be logically connected to the processor 910 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.

[0210] It should be understood that, in this embodiment, the input unit 904 may include a graphics processor 9041 and a microphone 9042. The graphics processor 9041 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 906 may include a display panel 9061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 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.

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

[0212] The memory 909 can be used to store software programs or instructions, as well as various data. The memory 909 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 909 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 909 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0213] Processor 910 may include one or more processing units; optionally, processor 910 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 910.

[0214] The processor 910 is used for:

[0215] N intra-frame prediction modes and M first parameters are determined, wherein the first parameters include interpolation filters, where N is an integer greater than or equal to 1, and M is an integer greater than 1;

[0216] Based on the N intra-frame prediction modes and the M first parameters, S template prediction values ​​are determined. The template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1.

[0217] Based on the cost between each template prediction value and template reconstruction value, K first combinations are determined;

[0218] Intra-frame prediction is performed on the target image patch based on the K first combinations to determine the predicted value of the target image patch;

[0219] Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

[0220] In this embodiment, the terminal determines N intra-frame prediction modes and M first parameters (including interpolation filters). That is, based on the N intra-frame prediction modes and M interpolation filters, it can determine S template prediction values ​​for a template. Based on the cost between each template prediction value and the template reconstruction value, it determines K first combinations. Each first combination includes an intra-frame prediction mode and at least one interpolation filter. Then, based on the K first combinations, it performs intra-frame prediction on a target image patch to determine the predicted value of the target image patch. This allows the intra-frame prediction mode to be selected along with at least one interpolation filter for intra-frame prediction of the target image patch. This enables the processing of different image textures based on different interpolation filters, effectively improving intra-frame prediction accuracy and image processing effects, and making the terminal's intra-frame prediction method more flexible.

[0221] It is understood that the implementation process of each implementation method mentioned in this embodiment can refer to the relevant description of the method embodiment in Figure 5 and achieve the same or corresponding technical effect. To avoid repetition, it will not be described again here.

[0222] 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.

[0223] 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.

[0224] 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.

[0225] 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.

[0226] 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.

[0227] This application also provides an encoding / decoding system, including: an encoding end device and a decoding end device. 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.

[0228] 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.

[0229] 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 includes several instructions to cause the terminal or network-side device to execute the methods described in the various embodiments of this application.

[0230] 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: N intra-frame prediction modes and M first parameters are determined, wherein the first parameters include interpolation filters, where N is an integer greater than or equal to 1, and M is an integer greater than 1; Based on the N intra-frame prediction modes and the M first parameters, S template prediction values ​​are determined. The template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1. Based on the cost between each template prediction value and template reconstruction value, K first combinations are determined; Intra-frame prediction is performed on the target image patch based on the K first combinations to determine the predicted value of the target image patch; Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

2. The method according to claim 1, wherein, The process of determining K first combinations based on the cost between each template predicted value and template reconstructed value includes: Obtain the cost between each template prediction value and template reconstruction value to get S costs; Based on the S costs, K first combinations are determined, where K is less than or equal to S.

3. The method according to claim 2, wherein, The determination of K first combinations based on the S costs includes: Find the K smallest costs among the S costs; Obtain the intra-frame prediction mode and the first parameter corresponding to each of the K costs to obtain the K first combinations.

4. The method according to any one of claims 1-3, wherein, When the method is executed by the decoding end and K is greater than 1, the method further includes: The bitstream is acquired, and a first identifier is obtained from the bitstream, the first identifier being used to identify the first combination for intra-frame prediction of the target image patch.

5. The method according to any one of claims 1-3, wherein, The N intra-frame prediction modes include a first intra-frame prediction mode. When a first interpolation filter is determined based on at least one of the first intra-frame prediction mode and first information, the first parameter corresponding to the first intra-frame prediction mode includes a second interpolation filter. Or the first parameter corresponding to the first intra-frame prediction mode includes the first interpolation filter and the second interpolation filter; The second interpolation filter is different from the first interpolation filter, and 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.

6. The method according to any one of claims 1-3, wherein, The first parameter also includes a reference pixel filtering identifier, which is used to identify whether a reference pixel has been filtered.

7. The method according to claim 6, wherein, The first parameter includes a second combination, which includes at least one interpolation filter and at least one reference pixel filter identifier.

8. The method according to claim 6, wherein, The N intra-frame prediction modes include a second intra-frame prediction mode. When a first interpolation filter and / or a first reference pixel filter identifier are determined based on at least one of the second intra-frame prediction mode and second information, the first parameter corresponding to the second intra-frame prediction mode includes the second interpolation filter, and / or the reference pixel filter identifier included in the first parameter corresponding to the second intra-frame prediction mode is the second reference pixel filter identifier; or... The first parameter corresponding to the second intra-frame prediction mode includes an interpolation filter that is a first interpolation filter and a second interpolation filter, and the first parameter corresponding to the second intra-frame prediction mode includes a reference pixel filter identifier that is a first reference pixel filter identifier and a second reference pixel filter identifier. Wherein, the second interpolation filter is different from the first interpolation filter, and the second reference pixel filter identifier is the same as or different from the first reference pixel filter identifier; the second 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.

9. The method according to claim 5 or 8, wherein, The first interpolation filter and the second interpolation filter are interpolation filters of different types; or, The first interpolation filter and the second interpolation filter are of the same type, but the taps of the first interpolation filter and the second interpolation filter are different.

10. The method according to any one of claims 1-9, wherein, The target image block is an image block to be encoded or decoded, or the target image block is a template of an image block to be encoded or decoded.

11. An intra-frame prediction apparatus, comprising: The first determining module is used to determine N intra-frame prediction modes and M first parameters, wherein the first parameters include an interpolation filter, N is an integer greater than or equal to 1, and M is an integer greater than 1. The second determining module is used to determine S template prediction values ​​of the template based on the N intra-frame prediction modes and the M first parameters, wherein the template is obtained based on the adjacent reconstructed pixels of the target image block, and S is an integer greater than 1. The third determining module is used to determine K first combinations based on the cost between each template predicted value and template reconstructed value; A prediction module is used to perform intra-frame prediction on the target image patch based on the K first combinations to determine the predicted value of the target image patch; Wherein, the template reconstruction value is obtained based on the neighboring reconstructed pixels of the target image block, each of the first combinations includes an intra-frame prediction mode and at least one first parameter, the intra-frame prediction mode in the first combination is one of the N intra-frame prediction modes, the first parameter in the first combination is one of the M first parameters, and K is an integer greater than or equal to 1.

12. The apparatus according to claim 11, wherein, The third determining module is also used for: Obtain the cost between each template prediction value and template reconstruction value to get S costs; Based on the S costs, K first combinations are determined, where K is less than or equal to S.

13. The apparatus according to claim 12, wherein, The third determining module is also used for: Find the K smallest costs among the S costs; Obtain the intra-frame prediction mode and the first parameter corresponding to each of the K costs to obtain the K first combinations.

14. The apparatus according to any one of claims 11-13, wherein, When the device is applied to the decoding end and K is greater than 1, the device further includes: An acquisition module is used to acquire a bitstream and obtain a first identifier from the bitstream, wherein the first identifier is used to identify the first combination for intra-frame prediction of the target image patch.

15. The apparatus according to any one of claims 11-13, wherein, The N intra-frame prediction modes include a first intra-frame prediction mode. When a first interpolation filter is determined based on at least one of the first intra-frame prediction mode and first information, the first parameter corresponding to the first intra-frame prediction mode includes a second interpolation filter. Or the first parameter corresponding to the first intra-frame prediction mode includes the first interpolation filter and the second interpolation filter; The second interpolation filter is different from the first interpolation filter, and 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.

16. The apparatus according to any one of claims 11-13, wherein, The first parameter also includes a reference pixel filtering identifier, which is used to identify whether a reference pixel has been filtered.

17. The apparatus according to claim 16, wherein, The first parameter includes a second combination, which includes at least one interpolation filter and at least one reference pixel filter identifier.

18. The apparatus according to claim 16, wherein, The N intra-frame prediction modes include a second intra-frame prediction mode. When a first interpolation filter and / or a first reference pixel filter identifier are determined based on at least one of the second intra-frame prediction mode and second information, the first parameter corresponding to the second intra-frame prediction mode includes the second interpolation filter, and / or the reference pixel filter identifier included in the first parameter corresponding to the second intra-frame prediction mode is the second reference pixel filter identifier; or... The first parameter corresponding to the second intra-frame prediction mode includes an interpolation filter that is a first interpolation filter and a second interpolation filter, and the first parameter corresponding to the second intra-frame prediction mode includes a reference pixel filter identifier that is a first reference pixel filter identifier and a second reference pixel filter identifier. Wherein, the second interpolation filter is different from the first interpolation filter, and the second reference pixel filter identifier is the same as or different from the first reference pixel filter identifier; the second 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.

19. The apparatus according to claim 15 or 18, wherein, The first interpolation filter and the second interpolation filter are interpolation filters of different types; or, The first interpolation filter and the second interpolation filter are of the same type, but the taps of the first interpolation filter and the second interpolation filter are different.

20. The apparatus according to any one of claims 11-19, wherein, The target image block is an image block to be encoded or decoded, or the target image block is a template of an image block to be encoded or decoded.

21. 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-10.

22. 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-10.

23. A chip comprising 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 intra-frame prediction method as described in any one of claims 1-10.

24. 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-10.

Citation Information

Patent Citations

  • Image coding method, image decoding method, image coder, image decoder, and program thereof

    JP2013090120A

  • Interpolation filtering method and apparatus for intra-frame prediction, medium, and electronic device

    US20220030233A1

  • Intra prediction method, encoder, decoder, and storage medium

    WO2022077490A1

  • Video encoding method and apparatus, video decoding method and apparatus, device, system, and storage medium

    WO2024183007A1

  • Combined inter and intra prediction method and apparatus, and terminal and readable storage medium

    WO2024212920A1