Image block prediction method and apparatus, and electronic device

By combining multiple intra prediction mode fusion technology to determine the reference rows, the problem of inaccurate prediction in the prior art is solved and higher prediction accuracy is achieved.

WO2025067195A1PCT designated stage expired Publication Date: 2025-04-03VIVO MOBILE COMM CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/120908
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-28
Filing Date
2024-09-25
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

In the existing multiple intra prediction mode fusion techniques, the corresponding reference row position is determined by a certain intra prediction mode, resulting in inaccurate prediction.

Method used

The prediction blocks are fused to improve prediction accuracy by obtaining the first reference row corresponding to the first prediction mode of the at least two intra prediction modes and determining the second reference row corresponding to the second prediction mode according to the first prediction mode and at least one second prediction mode.

Benefits of technology

This method can avoid the problem of inaccurate prediction results caused by using only the second prediction mode to determine the reference row, and improve the prediction accuracy under the fusion technology of multiple intra prediction modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024120908_03042025_PF_FP_ABST
    Figure CN2024120908_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of coding and decoding, and discloses an image block prediction method and apparatus, and an electronic device. The method in embodiments of the present application comprises: obtaining a first reference line corresponding to a first prediction mode in at least two intra-frame prediction modes corresponding to a target image block; on the basis of the first prediction mode and at least one second prediction mode, determining a second reference line corresponding to the second prediction mode, the second prediction mode being a prediction mode among the at least two intra-frame prediction modes excluding the first prediction mode; and fusing a first prediction block and at least one second prediction block, and determining a target prediction block corresponding to the target image block, the first prediction block being determined on the basis of the first prediction mode and the first reference line, and each second prediction block being determined on the basis of a second prediction mode and a second reference line.
Need to check novelty before this filing date? Find Prior Art

Description

Image block prediction method, device and electronic equipment

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202311275755.8 filed in China on September 28, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of coding and decoding technology, and specifically relates to an image block prediction method, device and electronic equipment. Background Art

[0004] Intra-frame prediction uses a variety of prediction modes to handle various types of textures in an image, including direct current (DC), planar, and several angular prediction modes. Using the reconstructed pixels in the row above and column to the left of the current block as reference pixels, a specified prediction mode is used to obtain the predicted value of the current prediction block, thereby removing spatial redundancy. Versatile Video Coding (VVC) has 65 angular prediction modes, each of which is equivalent to a horizontal or vertical offset.

[0005] Multiple prediction modes or multiple reference lines are used for intra-frame prediction to obtain multiple prediction blocks, and the multiple prediction blocks are fused using a weighted average or nonlinear fitting method to obtain a final prediction block.

[0006] However, in the current multiple intra-frame prediction mode fusion technology, a certain intra-frame prediction mode determines the position of its corresponding reference row (for example, the Nth intra-frame prediction mode determines the position of its corresponding Nth reference row). This method has the problem of inaccurate prediction.

[0007] Summary of the Invention

[0008] The embodiments of the present application provide an image block prediction method, apparatus, and electronic device to improve the prediction accuracy under a technology that integrates multiple intra-frame prediction modes.

[0009] In a first aspect, a method for predicting an image block is provided, the method comprising:

[0010] Obtaining a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to the target image block;

[0011] determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0012] A first prediction block and at least one second prediction block are merged to determine a target prediction block corresponding to the target image block, wherein the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0013] In a second aspect, an image block prediction device is provided, comprising:

[0014] An acquisition module, configured to acquire a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to a target image block;

[0015] a first determining module, configured to determine, based on the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0016] The second determination module is used to fuse the first prediction block and at least one second prediction block to determine the target prediction block corresponding to the target image block, the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0017] In a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0018] In a fourth aspect, an electronic device is provided, including a processor and a communication interface, wherein the processor is configured to:

[0019] Obtaining a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to the target image block;

[0020] determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0021] A first prediction block and at least one second prediction block are merged to determine a target prediction block corresponding to the target image block, wherein the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0022] In a fifth aspect, an image block prediction system is provided, comprising: an image block prediction device, wherein the image block prediction device can be used to perform the steps of the method described in the first aspect.

[0023] In a sixth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0024] In a seventh aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is configured to run a program or instruction to implement the steps of the method described in the first aspect.

[0025] In an eighth aspect, a computer program / program product is provided, wherein the computer program / program product is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.

[0026] In an embodiment of the present application, a first reference row corresponding to a first prediction mode in at least two intra-frame prediction modes is first obtained, and then a second reference row corresponding to a second prediction mode is determined based on the first prediction mode and at least one second prediction mode. A target prediction block corresponding to a target image block is obtained by fusing the first prediction block determined by the first prediction mode and the first reference row and the at least one second prediction block determined by the second prediction mode and the second reference row. In related art, only the second prediction mode is used to determine the second reference row, resulting in an inaccurate prediction result. However, the implementation method of the embodiment of the present application is to combine the second prediction mode and the first prediction mode when determining the reference row corresponding to the second prediction mode, and to determine the reference row corresponding to the second prediction mode by referring to the first prediction mode. This can avoid the problem of inaccurate prediction results caused by only using the second prediction mode to determine the reference row, and can make the prediction block obtained by the second prediction mode and the second reference row better, thereby improving the prediction accuracy under the fusion technology of multiple intra-frame prediction modes. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] FIG1 is a schematic diagram of a coding and decoding system provided in an embodiment of the present application;

[0028] FIG2 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0029] FIG3 is a schematic structural diagram of a decoder provided in an embodiment of the present application;

[0030] FIG4 is a schematic diagram of a flow chart of an image block prediction method according to an embodiment of the present application;

[0031] FIG5 is a module diagram of an image block prediction device according to an embodiment of the present application;

[0032] FIG6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;

[0033] FIG7 is a schematic structural diagram of a communication device according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the accompanying drawings in the embodiments of this application to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0035] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0036] FIG1 is a schematic diagram of a codec system provided in an embodiment of the present application. The technical solution of the embodiment of the present application involves performing codec (coder-decoder, CODEC) (including encoding or decoding) on ​​video data. The video data includes original unencoded video, encoded video, decoded (e.g., reconstructed) video, or syntax elements.

[0037] As shown in FIG1 , the codec system includes a source device 100, which provides encoded video data to be decoded and displayed by a destination device 110. Specifically, the source device 100 provides the 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 a desktop computer, a notebook (i.e., laptop) computer, a tablet computer, a set-top box, a mobile phone, a wearable device (e.g., a smart watch or a wearable camera), a television, a camera, a display device, an in-vehicle device, a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, a digital media player, a video game console, a video conferencing device, a video streaming device, a broadcast receiver device, a broadcast transmitter device, a spacecraft, an aircraft, a robot, a satellite, and the like.

[0038] In the example of Figure 1, the source device 100 includes a data source 101, a memory 102, an encoder 200, and an output interface 104. The destination device 110 includes an input interface 111, a decoder 300, a memory 113, and a display device 114. The source device 100 represents an example of a video encoding device, while the destination device 110 represents an example of a video decoding device. In other examples, the source device 100 and the destination device 110 may not include some of the components in Figure 1, or may also include other components outside of Figure 1. For example, the source device 100 can receive video data from an external data source (such as an external camera). Similarly, the destination device 110 can be connected to an external display device interface without including an integrated display device. For another example, the memory 102 and the memory 113 can be external memories.

[0039] Although FIG1 illustrates source device 100 and destination device 110 as separate devices, in some examples, the two may be integrated into a single device. In such embodiments, the functions corresponding to source device 100 and the functions corresponding to destination device 110 may be implemented using the same hardware or software, or using separate hardware or software, or any combination thereof.

[0040] In some examples, source device 100 and destination device 110 can perform one-way video transmission or two-way video transmission. If it is two-way 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.

[0041] Data source 101 represents a source of video data (i.e., raw, unencoded video data) and provides a series of pictures containing the video data to encoder 200, which encodes the picture data. Data source 101 of source device 100 may include a video capture device (such as a video camera), a video archive containing previously captured 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 the source video, or combine real-time video, archived video, and computer-generated video. In these cases, encoder 200 encodes the captured, pre-captured, or computer-generated video data. Encoder 200 may rearrange the pictures from the order in which they were received (sometimes referred to as "display order") into an encoding order. Encoder 200 may generate a bitstream comprising the encoded video data. Source device 100 may then output the encoded video data to communication medium 120 via output interface 104 for receipt or retrieval, for example, by input interface 111 of destination device 110.

[0042] Memory 102 of source device 100 and memory 113 of destination device 110 represent general purpose memories. 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 store software instructions executable by, for example, encoder 200 and decoder 300, respectively. Although memory 102 and memory 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, memory 102 and memory 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 memory 102 , 113 may be allocated as one or more video buffers, eg, for storing raw, decoded, or encoded video data.

[0043] In some examples, source device 100 can output the encoded data from output interface 104 to memory 113. Similarly, destination device 110 can access the encoded data from memory 113 via input interface 111. Memory 113 or storage 102 can include any of a variety of distributed or locally accessed data storage media, such as a hard drive, a Blu-ray disc, a Digital Versatile Disc (DVD), a Compact Disc Read-Only Memory (CD-ROM), flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0044] 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 a communication standard of a wireless communication protocol and transmitted to destination device 110.

[0045] The communication medium 120 may include a transient medium such as a wireless broadcast or a wired network transmission. For example, the communication medium 120 may include a radio frequency (RF) spectrum or one or more physical transmission lines (e.g., cables). The 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. The communication medium 120 may also take the form of a storage medium (e.g., a non-transitory storage medium) such as a hard disk, a flash drive, a compact disk, a digital video disk, a Blu-ray disc, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0046] In some embodiments, the communication medium 120 may include a router, a switch, a base station, or any other device that can be used to facilitate communication from the source device 100 to the destination device 110. For example, a server (not shown) can receive encoded video from the source device 100 and provide the encoded video data to the destination device 110, for example, via a network transmission. The server may include a web server (e.g., for a website), a server configured to provide a file transfer protocol service (such as the File Transfer Protocol (FTP) or the 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 an evolved Multimedia Broadcast Multicast Service (eMBMS) server, a Network-attached storage (NAS) device, and the like. The server can implement one or more HTTP streaming protocols, such as MPEG Media Transport (MMT) protocol, Dynamic Adaptive Streaming over HTTP (DASH) protocol, HTTP Live Streaming (HLS) protocol or Real Time Streaming Protocol (RTSP).

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

[0048] The output interface 104 and the input interface 111 may represent wireless transmitters / receivers, modems, wired networking components (e.g., Ethernet cards), wireless communication components operating according to the IEEE 802.11 standard or the IEEE 802.15 standard (e.g., ZigBee™), the Bluetooth standard, or other physical components. In examples where the output interface 104 and the input interface 111 include wireless components, the output interface 104 and the input interface 111 may be configured to communicate data, such as encoded video data, according to WIFI, Ethernet, a cellular network (such as 4G, LTE (Long Term Evolution), LTE-Advanced, 5G, 6G, etc.).

[0049] The technology provided in the embodiments of the present 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 on a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0050] Input interface 111 of destination device 110 receives an encoded video bitstream from communication medium 120. The encoded video bitstream may include syntax elements and encoded data units (e.g., sequences, groups of pictures, pictures, slices, blocks, etc.), wherein the syntax elements are used to decode the encoded data units to obtain decoded video data. Display device 114 displays the decoded video data to a user. 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.

[0051] The encoder 200 and the decoder 300 may be implemented as one or more of a variety of processing circuits, which may include a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), discrete logic, hardware, or any combination thereof. When the technology is implemented in whole or in part in software, the device may store instructions for the software in an appropriate 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 the present application.

[0052] The encoder 200 and the decoder 300 can be processed based on the following video coding and decoding standards: H.263, H.264, H.265 (also known as High Efficiency Video Coding (HEVC)), H.266 (also known as Versatile Video Coding (VVC), the second generation Moving Picture Experts Group 2 (MPEG-2), MPEG-4, VP8, VP9, ​​the first generation of open media alliance video (Alliance for Open Media Video 1, AV1), the first generation audio and video coding standard (Audio Video coding Standard 1, AVS1), AVS2, AVS3 or the next generation video standard protocol, which is not specifically limited in the embodiments of the present application.

[0053] Generally, the encoder 200 and decoder 300 can perform block-based encoding and decoding of pictures. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used in the encoding or decoding process). For example, a block can include a two-dimensional matrix of samples of luma or chroma data. For example, the encoder 200 and decoder 300 can encode and decode video data represented in YUV format.

[0054] 2 , which is a schematic diagram of the structure of an encoder 200 provided in an embodiment of the present application, and the encoder 200 may be the encoder 200 in FIG1 . In the example of FIG2 , the encoder 200 includes a memory 201, a coding 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 coding unit 220.

[0055] The memory 201 can store video data to be encoded. For example, the encoder 200 can receive and store video data from the data source 101 shown in FIG1 . In some examples, the memory 201 can be on the same chip as other components of the encoder 200 (as shown in FIG2 ), or can be independent of the chip where these components are located.

[0056] 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 of the current block using the inter-frame prediction mode, and the intra-frame prediction unit 213 is used to obtain a second prediction block of the current block using the intra-frame prediction mode. The mode selection unit 211 is used to obtain a target prediction block based on the first prediction block and the second prediction block, and to determine a final prediction mode. In addition, the coding parameter determination unit 210 may also include other functional units, such as a functional unit for determining the division method of the coding unit (CU), a functional unit for determining the transform type of the residual data of the CU or the quantization parameter of the residual data of the CU, etc.

[0057] For ease of description and understanding, the embodiment of the present application refers to the CU to be processed in the current image as the current CU, and the image block to be processed in the current CU 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.

[0058] The inter prediction unit 212 may include a motion estimation unit and a motion compensation unit. For inter 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 decoded pictures stored in the DPB 209).

[0059] The motion estimation unit may form one or more motion vectors (MVs) that represent the position of a reference block in a reference picture relative to the position of a current block in a current picture, and the motion compensation unit may obtain a prediction value of the accuracy indicated by the motion vectors through interpolation.

[0060] The encoding parameter determination unit 210 may provide the target prediction block to the residual generation unit 202. The residual generation unit 202 receives the original unencoded 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 a residual block. In some examples, the functionality of the residual generation unit 202 may be implemented using one or more subtractor circuits that perform binary subtraction.

[0061] As an example, the coding parameter determination unit 210 may provide a syntax element representing the coding parameter to the entropy coding unit 220 for encoding. The coding parameter includes one or more of the CU partitioning method, the final prediction mode, the transform type of the CU residual data, or the quantization parameter of the CU residual data.

[0062] The transform processing unit 203 transforms the residual block output by the residual generating unit 202 to obtain a transform coefficient block. The transform may include discrete cosine transform (DCT), integer transform, directional transform, or Karhunen-Loeve transform. In some examples, the encoder 200 may not include the transform processing unit 203.

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

[0064] The inverse quantization unit 205 and the inverse transform processing unit 206 can respectively perform inverse quantization and inverse transform on the transform coefficient block to obtain a 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.

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

[0066] The encoder 200 stores the reconstructed picture obtained from the reconstructed block in the DPB 209. For example, in examples where the operation of the filter unit 208 is not required, the reconstruction unit 207 may store the reconstructed block in the DPB 209. In examples where the operation of the filter unit 208 is required, the filter unit 208 may store the filtered reconstructed block in the DPB 209. The inter-frame prediction unit 212 obtains the reconstructed picture from the DPB 209 to perform inter-frame prediction on blocks of subsequent pictures to be encoded. In some examples, the DPB 209 may be replaced with other types of memory.

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

[0068] It is understandable that the composition of the encoder 200 shown in FIG2 is merely an illustration and does not constitute a limitation to the embodiments of the present application.

[0069] FIG3 is a schematic diagram of the structure of a decoder 300 provided in an embodiment of the present application, and the decoder 300 may be the decoder 300 described in FIG1 . In the example of FIG3 , 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.

[0070] The entropy decoding unit 302 can receive the encoded video data from the CPB 301 and perform entropy decoding on the video data to obtain syntax elements, where the syntax elements indicate encoding parameters, and the encoding parameters include one or more of the CU partitioning method, the final prediction mode, the transform type of the CU's residual data, or the quantization parameter of the CU's residual data.

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

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

[0073] The decoder 300 can perform reconstruction operations on each block separately. The entropy decoding unit 302 can entropy decode the syntax elements of the quantized transform coefficients and transform information (such as QP or transform mode indication) to obtain quantized transform coefficients. The quantized transform coefficients are dequantized by the dequantization unit 303 to obtain a transform coefficient block including the transform coefficients. The transform coefficient block is inversely transformed by the inverse transform processing unit 304 to generate a residual block corresponding to the current block. This inverse transform is the inverse operation of the above-mentioned transform.

[0074] The reconstruction unit 305 may reconstruct the current block according to the prediction block and the residual block. For example, the reconstruction unit 305 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.

[0075] The filter unit 306 may perform one or more filter operations on the reconstructed block. For example, the type of the filter unit 306 may refer to the type of the filter unit 208 and will not be described in detail here. In some examples, the operation of the filter unit 306 may be skipped.

[0076] The decoder 300 may store the reconstructed picture obtained from the reconstructed block in the DPB 307. For example, in an example in which the operation of the filter unit 306 is not performed, the reconstruction unit 305 may store the reconstructed block in the DPB 307. In an example in which the operation of the filter unit 306 is performed, the filter unit 306 may store the filtered reconstructed block in the DPB 307. The decoder 300 may output a decoded picture (e.g., decoded video) from the DPB 307 for subsequent presentation to a display device (such as the display device 114 of FIG. 1 ).

[0077] The following describes the image block prediction method, device, and electronic device provided by the embodiments of the present application in conjunction with the accompanying drawings. The image block prediction method provided by the embodiments of the present application can be executed by an encoding end, such as the encoder 200 shown in Figure 1 or Figure 2. The image block prediction method provided by the embodiments of the present application can be executed by a decoding end, such as the decoder 300 described in Figure 1 or Figure 3. The encoding end and the decoding end can be implemented by software, hardware, or a combination thereof. When implemented by hardware, the encoding end can be referred to as an encoding end device or a video encoding device, and the decoding end can be referred to as a decoding end device or a video decoding device.

[0078] The following first describes the technologies related to the embodiments of the present application.

[0079] In video coding, a frame is divided into many macroblocks, and prediction blocks are obtained using intra-frame prediction or inter-frame prediction. The difference between the original block and the predicted block is the residual block, which is then transformed, quantized, and entropy coded.

[0080] Video standards typically use I-pictures, P-pictures, and B-pictures. I-pictures can be decoded independently without referencing other pictures. P-pictures use multiple pictures preceding (or past) the current picture in the display order as reference pictures. B-pictures can use multiple pictures preceding (or past) the current picture in the display order and pictures following (or future) the current picture in the display order as reference pictures.

[0081] 1. Template-based intra mode derivation (TIMD)

[0082] TIMD is also a technology for implicitly deriving intra-frame prediction modes. At the decoding end, if the TIMD mode is true, for each candidate mode in the most probable mode (MPM) list, the reference pixels of the template are used to generate the predicted pixels of the template. The template described here is composed of the decoded reconstructed pixels adjacent to the current coding block to be decoded, which may include: one row / several rows above, and one column / several columns to the left. The cost is calculated as the sum of the absolute transformed differences (SATD) between the predicted samples and the reconstructed samples of the template. One or more intra-frame prediction modes with the minimum cost are selected as the intra-frame prediction mode for prediction.

[0083] 2. Multiple reference lines

[0084] In the pre-research of the next generation compression standard, for the intra prediction mode, a method of deriving the intra prediction by weighting the intra prediction obtained from the reference line is proposed, and the expression is p fusion =w0p line +w1p line+1 , where p line is the intra prediction from the default reference line, p line+1 is the prediction from the previous row of the default reference row. The weights are set to w0 = 3 / 4 and w1 = 1 / 4.

[0085] When there is only one intra prediction mode, p line and p line+1 It is the predicted block obtained using the same intra prediction mode.

[0086] Currently, there are two intra-frame prediction modes in TIMD Fusion Mode, expressed as P = Xp1 + Yp2, where p1 is the prediction block obtained using the first intra-frame prediction mode and the first reference line. p2 is the prediction block obtained using the second intra-frame prediction mode and the second reference line (line or line+1, which can be the same or different from the first reference line). The choice of the second reference line (line or line+1) is inferred from the second prediction mode.

[0087] 3. Wide-angle intra prediction mode

[0088] Traditionally, angular intra prediction directions are defined from 45 degrees to -135 degrees counterclockwise. In VVC, for non-square blocks, several traditional angular intra prediction modes are adaptively replaced with wide-angle intra prediction modes. These replaced modes are signaled using the original mode index, which is then remapped to the wide-angle mode index after parsing. The total number of intra prediction modes remains unchanged at 67, and the intra mode encoding method remains unchanged.

[0089] 4. Intra Sub-Partitions (ISP) mode

[0090] ISP mode divides the luma intra prediction block into 2 or 4 sub-blocks vertically or horizontally, depending on the block size.

[0091] In the multiple intra prediction mode fusion technology, it is inaccurate to determine the position of the Nth reference row only by the Nth intra prediction mode.

[0092] The image block prediction method, device, and electronic device provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings through some embodiments and their application scenarios.

[0093] As shown in FIG4 , an embodiment of the present application provides an image block prediction method, including:

[0094] Step 401: Obtain a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to a target image block;

[0095] It should be noted that the image block prediction method of the embodiments of the present application can be applied to both an encoding device (encoder) and a decoding device (decoder); when applied to an encoding device, the encoding device can optionally determine the cost corresponding to each intra-frame prediction mode based on at least two intra-frame prediction modes, and then select the intra-frame prediction mode with the lowest cost as the first prediction mode. When applied to a decoding device, because the encoding device encodes the first prediction mode into the bitstream, the decoding device can optionally obtain the first prediction mode based on intra-frame prediction mode related information in the bitstream obtained from the encoding device; or, optionally, the decoding device can also directly decode the bitstream obtained from the encoding device to obtain the first prediction mode.

[0096] The first reference row may be preset, for example, may be row 0.

[0097] It should be noted that the target image block can be understood as the image block currently to be processed.

[0098] Step 402: determining a second reference row corresponding to the second prediction mode according to the first prediction mode and at least one second prediction mode;

[0099] Optionally, the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0100] Step 403: Fusing the first prediction block and at least one second prediction block to determine a target prediction block corresponding to the target image block;

[0101] The first prediction block is determined based on the first prediction mode and a first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0102] It should be noted here that each prediction mode corresponds to only one prediction block, that is, in this application, only one first prediction block can be obtained. If there are several second prediction modes, then several corresponding second prediction blocks can be obtained.

[0103] It should be noted that, by first obtaining the first reference row corresponding to the first prediction mode of at least two intra-frame prediction modes, and then determining the second reference row corresponding to the second prediction mode based on the first prediction mode and at least one second prediction mode, the target prediction block corresponding to the target image block is obtained by fusing the first prediction block determined by the first prediction mode and the first reference row and the at least one second prediction block determined by the second prediction mode and the second reference row. In the related art, only the second mode index corresponding to the second prediction mode is used to determine the second reference row, resulting in inaccurate prediction results. However, the implementation method of the embodiment of the present application is to combine the second prediction mode and the first prediction mode when determining the reference row corresponding to the second prediction mode, and determine the reference row corresponding to the second prediction mode by referring to the first prediction mode. This can avoid the problem of inaccurate prediction results caused by using only the second prediction mode to determine the reference row, and can make the prediction block obtained by the second prediction mode and the second reference row better, thereby improving the prediction accuracy under the fusion technology of multiple intra-frame prediction modes.

[0104] Optionally, the intra-frame prediction mode in this embodiment includes at least one of the following: DC mode, PLANAR mode, angle prediction mode, and TIMD.

[0105] Optionally, the angle prediction mode includes a normal angle prediction mode (corresponding to a square block) and a wide angle prediction mode (corresponding to a non-square block).

[0106] It should be noted that the above-mentioned DC mode, PLANAR mode, angle prediction mode, and TIMD can be regarded as different types of intra-frame prediction modes, and under the same type, the intra-frame prediction mode can include multiple modes (for example, based on different angles, the intra-frame prediction mode is divided into multiple modes). Therefore, the at least two intra-frame prediction modes mentioned in the embodiment of the present application can be a combination of prediction modes under different types, or a combination of different prediction modes under the same type. Of course, the at least two intra-frame prediction modes can also be a combination of prediction modes under different types and different prediction modes under the same type.

[0107] Optionally, in one implementation, the second reference row corresponding to the second prediction mode includes at least one of the following:

[0108] A1. All second prediction modes except the first prediction mode in the at least two intra-frame prediction modes correspond to the same second reference row;

[0109] This situation can be understood as, as long as the second reference row of one second prediction mode is determined, the second reference rows of all second prediction modes except the first prediction mode in the at least two intra-frame prediction modes can be determined. This method does not need to determine the second reference row of each second prediction mode one by one, which can reduce processing delay.

[0110] A2. Each of the second prediction modes except the first prediction mode in the at least two intra-frame prediction modes corresponds to an independent second reference row;

[0111] In this case, the second reference row needs to be determined for each second prediction mode respectively. The second reference rows corresponding to different second prediction modes can be the same or different. This method can improve the accuracy of the second reference row determined for each second prediction mode.

[0112] In another optional implementation, determining, based on the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following:

[0113] A101: When the target image block is not in the intra sub-block division mode, determine, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode;

[0114] A102. When at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, determine a second reference row corresponding to the second prediction mode according to the first prediction mode and the at least one second prediction mode.

[0115] This situation can also be understood as: when at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes is a mode index corresponding to the angle prediction mode, the second reference row corresponding to the second prediction mode is determined based on the first prediction mode and the at least one second prediction mode.

[0116] It should be noted here that for each intra-frame prediction mode, it will correspond to a mode index. For example, in the wide-angle intra-frame prediction mode, the first mode index and the second mode index mentioned in the embodiment of the present application refer to the intra-frame prediction mode index after the wide-angle mode is mapped.

[0117] It should be noted that the above implementation may include the following situations:

[0118] Case 1: only when the target image block is not in the intra sub-block division mode, determining the second reference row corresponding to the second prediction mode according to the first prediction mode and at least one second prediction mode;

[0119] Case 2: only when at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, determining a second reference row corresponding to the second prediction mode according to the first prediction mode and the at least one second prediction mode;

[0120] For example, when the first mode index corresponding to the first prediction mode is the mode index corresponding to the angle prediction mode, the second reference row corresponding to the second prediction mode is determined according to the first prediction mode and at least one second prediction mode.

[0121] For example, when at least one of the second mode indices corresponding to at least one second prediction mode is a mode index corresponding to an angle prediction mode, a second reference row corresponding to the second prediction mode is determined according to the first prediction mode and at least one second prediction mode.

[0122] For example, when the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one second prediction mode are both mode indexes corresponding to the angle prediction mode, the second reference row corresponding to the second prediction mode is determined based on the first prediction mode and at least one second prediction mode.

[0123] Case three: when the target image block is not an intra-frame sub-block division mode, and at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one second prediction mode is a mode index corresponding to the angle prediction mode, the second reference row corresponding to the second prediction mode is determined based on the first prediction mode and the at least one second prediction mode.

[0124] In another optional implementation, the determining, based on the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following:

[0125] A11. If the second prediction mode does not satisfy the first condition, determine that a second reference row corresponding to the second prediction mode is located at a different position from the first reference row.

[0126] Optionally, the first condition includes at least one of the following:

[0127] A111: An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is greater than or equal to a second preset value;

[0128] Optionally, in this case, when the absolute value of the difference between the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is greater than a second preset value, not satisfying the first condition means that: the absolute value of the difference between the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is less than or equal to the second preset value. Optionally, in this case, when the absolute value of the difference between the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is greater than or equal to the second preset value, not satisfying the first condition means that: the absolute value of the difference between the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is less than the second preset value.

[0129] Optionally, in one implementation, the second preset value is determined based on at least one of the following:

[0130] A1111, the area of ​​the target image block;

[0131] A1112, the width and height of the target image block;

[0132] A1113: The ratio of the width to the height of the target image block.

[0133] A112: The product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, where the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode and a horizontal mode index corresponding to the angular prediction mode;

[0134] For example, in this case, the first condition includes at least one of the following:

[0135] (predModeIntra1-VER_IDX)*(predModeIntraK-VER_IDX) is less than or equal to 0;

[0136] (predModeIntra1-HOR_IDX)*(predModeIntraK-HOR_IDX) is less than or equal to 0;

[0137] Among them, predModeIntra1 represents the first mode index, VER_IDX represents the vertical mode index corresponding to the angular prediction mode, predModeIntraK represents the second mode index, and HOR_IDX represents the horizontal mode index corresponding to the angular prediction mode.

[0138] It should be noted that the product of the difference between the second mode index and the target index and the difference between the first mode index and the target index is less than or equal to 0 includes the following situations:

[0139] Case 1: the product of the difference between the second pattern index and the target index and the difference between the first pattern index and the target index is less than (corresponding to data symbol <) 0;

[0140] Case 2: the product of the difference between the second pattern index and the target index and the difference between the first pattern index and the target index is equal to (corresponding data symbol=) 0;

[0141] Case 3: The product of the difference between the second pattern index and the target index and the difference between the first pattern index and the target index is less than or equal to 0 (corresponding data symbol ≤) 0.

[0142] Optionally, in this case, not satisfying the first condition means that the product of the difference between the second pattern index and the target index and the difference between the first pattern index and the target index is greater than 0.

[0143] A113: At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is not equal to a third preset value;

[0144] Optionally, in this case, not satisfying the first condition means that both the second mode index and the first mode index are equal to a third preset value.

[0145] It should be noted that the third preset value refers to the mode index corresponding to the intra-frame prediction mode. Typically, the mode index corresponding to the intra-frame prediction mode includes one or more. When the mode index corresponding to the intra-frame prediction mode includes one, as long as at least one of the second mode index and the first mode index is not equal to the third preset value, it means that the first condition is satisfied. When the mode index corresponding to the intra-frame prediction mode includes multiple, the third preset value represents a set of mode indexes. In this case, it can be understood that at least one of the second mode index and the first mode index is not included in the set of mode indexes, which means that the first condition is satisfied.

[0146] Optionally, the third preset value may include, but is not limited to, one or more of the following values:

[0147] 0,-14,-12,-10,-6,2,34,66,72,76,78,80.

[0148] For example, if the second prediction mode does not satisfy A111, A112, or A113, it is determined that the second reference row corresponding to the second prediction mode is at a different position from the first reference row.

[0149] For example, if the second prediction mode does not satisfy two items of A111-A113, it is determined that the second reference row corresponding to the second prediction mode is at a different position from the first reference row.

[0150] For example, if the second prediction mode does not satisfy A111, A112, and A113, it is determined that the second reference row corresponding to the second prediction mode is at a different position from the first reference row.

[0151] A12. If the number of the first target modes is greater than or equal to a first preset value, determine that the second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0152] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition;

[0153] For example, there are M (M is less than or equal to K, where K represents the number of at least two intra-frame prediction modes minus 1) second prediction modes among the at least two intra-frame prediction modes that do not satisfy the first condition. If M is greater than or equal to a first preset value, it is determined that the second reference row corresponding to the second prediction mode is located at a different position than the first reference row. It should be noted that when M is equal to K, it indicates that all intra-frame prediction modes among the at least two intra-frame prediction modes except the first prediction mode do not satisfy the first condition.

[0154] In an optional manner, the first preset value is set to K / 2. Usually, when K / 2 is not an integer, an operation of rounding up or rounding down needs to be performed.

[0155] In another optional implementation, the determining, based on the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following:

[0156] B11. If the second prediction mode satisfies the first condition, determine that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determine a second reference row corresponding to the second prediction mode based on the second prediction mode;

[0157] This situation can be understood as, as long as the second prediction mode satisfies the first condition, the second reference row corresponding to the second prediction mode is set to be the same as the first reference row; or, as long as the second prediction mode satisfies the first condition, the second reference row corresponding to the second prediction mode is determined according to the second prediction mode, that is, the second reference row is determined according to the existing method, which can be understood as determining the second reference row corresponding to the second prediction mode according to the second mode index corresponding to the second prediction mode; optionally, the implementation method of determining the second reference row corresponding to the second prediction mode according to the second prediction mode can be: if the target image block is not an intra-frame sub-block division mode, the second prediction mode is an angle prediction mode, and the second mode index is not equal to 0, -14, -12, -10, -6, 2, 34, 66, 72, 76, 78, 80, then the second reference row and the first reference row are in the same position, otherwise the positions are different.

[0158] For example, if the second prediction mode satisfies A111, A112 or A113, the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined according to the second prediction mode.

[0159] For example, if the second prediction mode satisfies two items of A111-A113, the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined according to the second prediction mode.

[0160] For example, if the second prediction mode satisfies A111, A112, and A113, the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined according to the second prediction mode.

[0161] B12. If the number of the first target modes is less than the first preset value or the number of the second target modes is greater than or equal to the first preset value, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0162] Among them, the first target mode is a second prediction mode among the at least two intra-frame prediction modes other than the first prediction mode that does not meet the first condition; the second target mode is a second prediction mode among the at least two intra-frame prediction modes other than the first prediction mode that meets the first condition.

[0163] This situation can be understood as, as long as the number of second prediction modes that do not meet the first condition is less than the first preset value or the number of second prediction modes that meet the first condition is greater than or equal to the first preset value, the second reference row corresponding to the second prediction mode is set to be the same as the first reference row; or, as long as the number of second prediction modes that do not meet the first condition is less than the first preset value or the number of second prediction modes that meet the first condition is greater than or equal to the first preset value, the second reference row corresponding to the second prediction mode is determined according to the second prediction mode, that is, the second reference row is determined according to the existing method.

[0164] Alternatively, in the above case, failure to meet the first condition may be understood as the following situations:

[0165] For example 1, when the first condition includes only one of A111, A112, and A113, failure to meet the first condition can be understood as failure to meet this one item; if this one item is met, the first condition is considered to be met.

[0166] Example 2: When the first condition includes two items of A111, A112, and A113, not meeting the first condition can be understood as not meeting both items. If at least one item is met, it is considered that the first condition is met.

[0167] Example 3: When the first condition includes A111, A112, and A113, failure to meet the first condition can be understood as failure to meet all three items. If at least one item is met, the first condition is considered to be met.

[0168] In another optional implementation, determining the second reference row corresponding to the second prediction mode according to the first prediction mode and at least one second prediction mode includes at least one of the following:

[0169] C11. When the target image block is in intra sub-block division mode, determine that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determine a second reference row corresponding to the second prediction mode according to the second prediction mode;

[0170] This situation can be understood as, as long as the target image block is in the intra-frame sub-block division mode, the second reference row corresponding to the second prediction mode is set to be the same as the first reference row; or, as long as the target image block is in the intra-frame sub-block division mode, the second reference row corresponding to the second prediction mode is determined according to the second prediction mode, that is, the second reference row is determined according to the existing method.

[0171] C12. When at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction mode and the second mode index corresponding to the second prediction mode is not a mode index corresponding to the angle prediction mode, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0172] This situation can be understood as, as long as there is at least one mode index that does not correspond to the angle prediction mode among the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one second prediction mode, the second reference row corresponding to the second prediction mode is set to be the same as the first reference row; or, as long as there is at least one mode index that does not correspond to the angle prediction mode among the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one second prediction mode, the second reference row corresponding to the second prediction mode is determined according to the second prediction mode, that is, the second reference row is determined according to the existing method.

[0173] When C11 and C12 are used in combination, it can be understood that: when the target image block is an intra-frame sub-block division mode, and there is at least one mode index that is not a mode index corresponding to the angle prediction mode among the first mode index corresponding to the first prediction mode and at least one second mode index corresponding to the second prediction mode, it is determined that the second reference row corresponding to the second prediction mode is the same as the position of the first reference row, or the second reference row corresponding to the second prediction mode is determined according to the second prediction mode.

[0174] Optionally, the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes may include at least one mode index that does not correspond to the angle prediction mode:

[0175] Case 1: the first mode index corresponding to the first prediction mode is not the mode index corresponding to the angle prediction mode;

[0176] Case 2: Among the second mode indices corresponding to at least one of the second prediction modes, there is at least one mode index that does not correspond to the angle prediction mode;

[0177] Case three: all of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes are not mode indexes corresponding to the angular prediction mode.

[0178] The specific application of the embodiments of the present application is described below with examples.

[0179] Application Scenario 1: Intra-frame prediction mode fusion technology only includes two intra-frame prediction modes

[0180] The specific implementation process includes:

[0181] Step S11: obtaining a first prediction mode of two intra-frame prediction modes corresponding to a target image block and a first reference row corresponding thereto;

[0182] It should be noted that after the first prediction mode is determined, the other one is the second prediction mode.

[0183] Step S12: determining a second reference row corresponding to the second prediction mode according to the first prediction mode and the second prediction mode;

[0184] Optionally, one implementation of this step is:

[0185] When the target image block is not in intra sub-block division mode, and / or at least one of a first mode index corresponding to the first prediction mode and a second mode index corresponding to the second prediction mode is a mode index corresponding to an angular prediction mode, if the second prediction mode does not satisfy the first condition, determining that a second reference row corresponding to the second prediction mode is at a different position from the first reference row;

[0186] When the target image block is not in intra sub-block division mode, and / or at least one of a first mode index corresponding to the first prediction mode and a second mode index corresponding to the second prediction mode is a mode index corresponding to an angular prediction mode, if the second prediction mode satisfies a first condition, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining a second reference row corresponding to the second prediction mode based on the second prediction mode;

[0187] In the case where the target image block is in intra-frame sub-block division mode, it is determined that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode; or, in the case where at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to the second prediction mode is not the mode index corresponding to the angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

[0188] Step S13 : Fusing the first prediction block determined by the first prediction mode and the first reference row and the second prediction block determined by the second prediction mode and the second reference row to obtain a target prediction block.

[0189] Application Scenario 2: Intra-frame prediction mode fusion technology includes three intra-frame prediction modes

[0190] The specific implementation process includes:

[0191] Step S21: obtaining a first prediction mode among three intra-frame prediction modes corresponding to a target image block and a first reference row corresponding thereto;

[0192] It should be noted that after the first prediction mode is determined, the other two are the second prediction modes.

[0193] Step S22: determining two second reference rows corresponding to the second prediction mode according to the first prediction mode and the second prediction mode;

[0194] Optionally, one implementation of this step is:

[0195] When the target image block is not in intra sub-block division mode, and / or at least one of a first mode index corresponding to the first prediction mode and a second mode index corresponding to the second prediction mode is a mode index corresponding to an angular prediction mode, if both second prediction modes do not satisfy the first condition, determining that the second reference rows corresponding to the two second prediction modes are at different positions from the first reference row;

[0196] When the target image block is not in intra sub-block division mode, and / or at least one of a first mode index corresponding to the first prediction mode and a second mode index corresponding to the second prediction mode is a mode index corresponding to an angular prediction mode, if at least one of the two second prediction modes satisfies a first condition, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0197] In the case where the target image block is in intra-frame sub-block division mode, it is determined that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode; or, in the case where at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to the second prediction mode is not the mode index corresponding to the angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

[0198] Step S23 : Fusing the first prediction block determined by the first prediction mode and the first reference row and the two second prediction blocks determined by the two second prediction modes and the second reference rows to obtain a target prediction block.

[0199] Application 3: Intra-frame prediction mode fusion technology includes three intra-frame prediction modes

[0200] The specific implementation process includes:

[0201] Step S31: obtaining a first prediction mode among three intra-frame prediction modes corresponding to a target image block and its corresponding first reference row;

[0202] It should be noted that after the first prediction mode is determined, the other two are the second prediction modes.

[0203] Step S32: determining two second reference rows corresponding to the second prediction modes respectively according to the first prediction mode and the second prediction mode;

[0204] Optionally, one implementation of this step is:

[0205] When the target image block is not in intra sub-block division mode, and / or at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to the second prediction mode is a mode index corresponding to an angular prediction mode, if the number of the two second prediction modes that do not satisfy the first condition is greater than one (which can also be understood as at least one of the two second prediction modes not satisfying the first condition), determining that a second reference row corresponding to each second prediction mode is different from a position of the first reference row;

[0206] When the target image block is not in intra sub-block division mode, and / or at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to the second prediction mode is a mode index corresponding to an angular prediction mode, if both second prediction modes satisfy a first condition, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0207] In the case where the target image block is in intra-frame sub-block division mode, it is determined that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode; or, in the case where at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to the second prediction mode is not the mode index corresponding to the angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

[0208] Step S33 : Fusing the first prediction block determined by the first prediction mode and the first reference row and the two second prediction blocks respectively determined by the two second prediction modes and the second reference rows to obtain a target prediction block.

[0209] It should be noted that, in the related art, only the second mode index corresponding to the second prediction mode is used to determine the second reference row, which makes the prediction result inaccurate. However, the implementation method of the embodiment of the present application is to analyze the gap between the second prediction mode and the first prediction mode by comparing the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one second prediction mode; for example, the absolute value of the difference between the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode in the first condition is greater than or equal to the second preset value, indicating that the gap between the two modes is large, or the product of the difference between the second mode index corresponding to the second prediction mode and the target index and the difference between the first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, indicating that the gap between the two modes is large, or at least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is not equal to the third preset value, indicating that the gap between the two modes is large. That is to say, if the first condition is met, It indicates that the gap between the two modes is large. If the gap between the two modes is large, the reference row with the same position as the first reference row can be used for the second prediction mode; for example, the absolute value of the difference between the second mode index corresponding to the second prediction mode in the first condition and the first mode index corresponding to the first prediction mode is less than the second preset value, indicating that the gap between the two modes is small, or the product of the difference between the second mode index corresponding to the second prediction mode and the target index and the difference between the first mode index corresponding to the first prediction mode and the target index is greater than 0, indicating that the gap between the two modes is small, or the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode are all equal to the third preset value, indicating that the gap between the two modes is small, that is, if the first condition is not met, it indicates that the gap between the two modes is small. If the gap between the two modes is small, a reference row with a different position from the first reference row can be used for the second prediction mode; and the prediction block obtained by the second prediction mode and the second reference row can be better, thereby improving the prediction accuracy under the fusion technology of multiple intra-frame prediction modes.

[0210] The image block prediction method provided in the embodiment of the present application can be executed by an image block prediction device. In the embodiment of the present application, the image block prediction device performing the image block prediction method is used as an example to illustrate the image block prediction device provided in the embodiment of the present application.

[0211] As shown in FIG5 , an image block prediction device 500 according to an embodiment of the present application includes:

[0212] An acquisition module 501 is configured to acquire a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to a target image block;

[0213] A first determining module 502 is configured to determine, based on the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0214] The second determination module 503 is used to fuse the first prediction block and at least one second prediction block to determine the target prediction block corresponding to the target image block, where the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0215] Optionally, the first determining module 502 is configured to implement at least one of the following:

[0216] When the target image block is not in the intra sub-block division mode, determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode;

[0217] In a case where at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, a second reference row corresponding to the second prediction mode is determined according to the first prediction mode and the at least one second prediction mode.

[0218] Optionally, the first determining module 502 is configured to implement at least one of the following:

[0219] If the second prediction mode does not satisfy the first condition, determining that a second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0220] If the number of the first target modes is greater than or equal to a first preset value, determining that the second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0221] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition;

[0222] The first condition includes at least one of the following:

[0223] An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is greater than or equal to a second preset value;

[0224] A product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode, and a horizontal mode index corresponding to the angular prediction mode;

[0225] At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is not equal to a third preset value.

[0226] Optionally, the first determining module 502 is configured to implement at least one of the following:

[0227] If the second prediction mode satisfies the first condition, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode;

[0228] If the number of the first target modes is less than a first preset value or the number of the second target modes is greater than or equal to the first preset value, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0229] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition; the second target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that satisfies the first condition;

[0230] The first condition includes at least one of the following:

[0231] An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the second prediction mode is greater than or equal to a second preset value;

[0232] A product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the second prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode, and a horizontal mode index corresponding to the angular prediction mode;

[0233] At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the second prediction mode is not equal to a third preset value.

[0234] Optionally, the second preset value is determined based on at least one of the following:

[0235] The area of ​​the target image block;

[0236] The width and height of the target image block;

[0237] The ratio of the width to the height of the target image block.

[0238] Optionally, the first determining module is configured to implement at least one of the following:

[0239] When the target image block is in intra sub-block division mode, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode;

[0240] In the case that at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes does not correspond to the angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

[0241] Optionally, the second reference row corresponding to the second prediction mode includes at least one of the following:

[0242] All second prediction modes except the first prediction mode in the at least two intra-frame prediction modes correspond to the same second reference row;

[0243] Each of the second prediction modes in all the second prediction modes except the first prediction mode in the at least two intra prediction modes corresponds to an independent second reference row.

[0244] Optionally, the intra prediction mode includes at least one of the following: DC mode, PLANAR mode, angular prediction mode, and template-based intra prediction mode TIMD.

[0245] It should be noted that the device embodiment corresponds to the above method, and all implementation methods in the above method embodiment are applicable to the device embodiment and can achieve the same technical effects.

[0246] The image block prediction device in the embodiments of the present application can be an electronic device, such as an electronic device with an operating system, or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the terminal can include, but is not limited to, the types of terminal 11 listed above. Other devices can include servers, network attached storage (NAS), etc., and are not specifically limited in the embodiments of the present application.

[0247] The image block prediction device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 4 and achieve the same technical effect. To avoid repetition, it will not be described here.

[0248] An embodiment of the present application further provides an electronic device, including a processor and a communication interface, wherein the processor is configured to obtain a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to a target image block;

[0249] determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0250] A first prediction block and at least one second prediction block are merged to determine a target prediction block corresponding to the target image block, wherein the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0251] Optionally, the processor is configured to implement at least one of the following:

[0252] When the target image block is not in the intra sub-block division mode, determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode;

[0253] In a case where at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, a second reference row corresponding to the second prediction mode is determined according to the first prediction mode and the at least one second prediction mode.

[0254] Optionally, the processor is configured to implement at least one of the following:

[0255] If the second prediction mode does not satisfy the first condition, determining that a second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0256] If the number of the first target modes is greater than or equal to a first preset value, determining that the second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0257] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition;

[0258] The first condition includes at least one of the following:

[0259] An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is greater than or equal to a second preset value;

[0260] A product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode, and a horizontal mode index corresponding to the angular prediction mode;

[0261] At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is not equal to a third preset value.

[0262] Optionally, the processor is configured to implement at least one of the following:

[0263] If the second prediction mode satisfies the first condition, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode;

[0264] If the number of the first target modes is less than a first preset value or the number of the second target modes is greater than or equal to the first preset value, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0265] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition; the second target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that satisfies the first condition;

[0266] The first condition includes at least one of the following:

[0267] An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the second prediction mode is greater than or equal to a second preset value;

[0268] A product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the second prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode, and a horizontal mode index corresponding to the angular prediction mode;

[0269] At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the second prediction mode is not equal to a third preset value.

[0270] Optionally, the second preset value is determined based on at least one of the following:

[0271] The area of ​​the target image block;

[0272] The width and height of the target image block;

[0273] The ratio of the width to the height of the target image block.

[0274] Optionally, the processor is configured to implement at least one of the following:

[0275] When the target image block is in intra sub-block division mode, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode;

[0276] In the case that at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes does not correspond to the angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

[0277] Optionally, the second reference row corresponding to the second prediction mode includes at least one of the following:

[0278] All second prediction modes except the first prediction mode in the at least two intra-frame prediction modes correspond to the same second reference row;

[0279] Each of the second prediction modes in all the second prediction modes except the first prediction mode in the at least two intra prediction modes corresponds to an independent second reference row.

[0280] Optionally, the intra prediction mode includes at least one of the following: DC mode, PLANAR mode, angular prediction mode, and template-based intra prediction mode TIMD.

[0281] The electronic device embodiment corresponds to the above method embodiment, and each implementation process and implementation method of the above method embodiment are applicable to the electronic device embodiment and can achieve the same technical effect. Specifically, Figure 6 is a hardware structure diagram of an electronic device that implements the embodiment of the present application.

[0282] The electronic device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609 and at least some of the components of the processor 610.

[0283] Those skilled in the art will appreciate that the electronic device 600 may further include a power source (e.g., a battery) to power various components. The power source may be logically connected to the processor 610 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The electronic device structure shown in FIG6 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components or arrange the components differently, which will not be described in detail here.

[0284] It should be understood that in an embodiment of the present application, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0285] In this embodiment of the present application, after receiving downlink data from the access network device, the radio frequency unit 601 can transmit the data to the processor 610 for processing. In addition, the radio frequency unit 601 can send uplink data to the network-side device. Generally, the radio frequency unit 601 includes but is not limited to an antenna, an amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc.

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

[0287] Processor 610 may include one or more processing units. Optionally, processor 610 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 610.

[0288] The processor 610 is configured to:

[0289] Obtaining a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to the target image block;

[0290] determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes;

[0291] A first prediction block and at least one second prediction block are merged to determine a target prediction block corresponding to the target image block, wherein the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

[0292] Optionally, the processor 610 is configured to implement at least one of the following:

[0293] When the target image block is not in the intra sub-block division mode, determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode;

[0294] In a case where at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, a second reference row corresponding to the second prediction mode is determined according to the first prediction mode and the at least one second prediction mode.

[0295] Optionally, the processor 610 is configured to implement at least one of the following:

[0296] If the second prediction mode does not satisfy the first condition, determining that a second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0297] If the number of the first target modes is greater than or equal to a first preset value, determining that the second reference row corresponding to the second prediction mode is at a different position than the first reference row;

[0298] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition;

[0299] The first condition includes at least one of the following:

[0300] An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is greater than or equal to a second preset value;

[0301] A product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode, and a horizontal mode index corresponding to the angular prediction mode;

[0302] At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the first prediction mode is not equal to a third preset value.

[0303] Optionally, the processor 610 is configured to implement at least one of the following:

[0304] If the second prediction mode satisfies the first condition, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode;

[0305] If the number of the first target modes is less than a first preset value or the number of the second target modes is greater than or equal to the first preset value, determining that the second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode based on the second prediction mode;

[0306] The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition; the second target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that satisfies the first condition;

[0307] The first condition includes at least one of the following:

[0308] An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the second prediction mode is greater than or equal to a second preset value;

[0309] A product of a difference between a second mode index corresponding to the second prediction mode and a target index and a difference between a first mode index corresponding to the second prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: a vertical mode index corresponding to the angular prediction mode, and a horizontal mode index corresponding to the angular prediction mode;

[0310] At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the second prediction mode is not equal to a third preset value.

[0311] Optionally, the second preset value is determined based on at least one of the following:

[0312] The area of ​​the target image block;

[0313] The width and height of the target image block;

[0314] The ratio of the width to the height of the target image block.

[0315] Optionally, the processor 610 is configured to implement at least one of the following:

[0316] When the target image block is in intra sub-block division mode, determining that a second reference row corresponding to the second prediction mode is at the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode;

[0317] In the case that at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes does not correspond to the angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

[0318] Optionally, the second reference row corresponding to the second prediction mode includes at least one of the following:

[0319] All second prediction modes except the first prediction mode in the at least two intra-frame prediction modes correspond to the same second reference row;

[0320] Each of the second prediction modes in all the second prediction modes except the first prediction mode in the at least two intra prediction modes corresponds to an independent second reference row.

[0321] Optionally, the intra prediction mode includes at least one of the following: DC mode, PLANAR mode, angular prediction mode, and template-based intra prediction mode TIMD.

[0322] Preferably, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the various processes of the above-mentioned image block prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they will not be described here.

[0323] An embodiment of the present application also provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned image block prediction method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0324] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0325] Optionally, as shown in Figure 7, an embodiment of the present application also provides a communication device 700, including a processor 701 and a memory 702, wherein the memory 702 stores a program or instruction that can be run on the processor 701, and when the program or instruction is executed by the processor 701, the various steps of the above-mentioned image block prediction method embodiment are implemented and the same technical effect can be achieved.

[0326] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image block prediction method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0327] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0328] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the above-mentioned information transmission method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0329] An embodiment of the present application further provides an image block prediction system, comprising: an image block prediction device, wherein the image block prediction device can be used to execute the steps of the above-mentioned image block prediction method.

[0330] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0331] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0332] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. An image block prediction method, comprising: Acquire a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to the target image block; Determine, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, where the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes; The first prediction block and at least one second prediction block are merged to determine a target prediction block corresponding to the target image block, wherein the first prediction block is determined based on the first prediction mode and a first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

2. The method according to claim 1, wherein: The determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following: When the target image block is not in the intra sub-block division mode, determining a second reference row corresponding to the second prediction mode according to the first prediction mode and at least one second prediction mode; In the case that at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, a second reference row corresponding to the second prediction mode is determined according to the first prediction mode and the at least one second prediction mode.

3. The method according to claim 1 or 2, wherein: The determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following: If the second prediction mode does not satisfy the first condition, determining that a second reference row corresponding to the second prediction mode is at a different position from the first reference row; If the number of the first target modes is greater than or equal to a first preset value, determining that the second reference row corresponding to the second prediction mode is at a different position from the first reference row; The first target mode is a second prediction mode among the at least two intra-frame prediction modes other than the first prediction mode and not satisfying the first condition; The first condition includes at least one of the following: An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is greater than or equal to a second preset value; The product of the difference between the second mode index corresponding to the second prediction mode and the target index and the difference between the first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: the vertical mode index corresponding to the angular prediction mode, and the horizontal mode index corresponding to the angular prediction mode; At least one of a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is not equal to a third preset value.

4. The method according to claim 1 or 2, wherein: The determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following: If the second prediction mode satisfies the first condition, determining that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode; If the number of the first target modes is less than the first preset value or the number of the second target modes is greater than or equal to the first preset value, determining that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode; The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition; the second target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that satisfies the first condition; The first condition includes at least one of the following: An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the second prediction mode is greater than or equal to a second preset value; The product of the difference between the second mode index corresponding to the second prediction mode and the target index and the difference between the first mode index corresponding to the second prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: the vertical mode index corresponding to the angular prediction mode, and the horizontal mode index corresponding to the angular prediction mode; At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the second prediction mode is not equal to a third preset value.

5. The method according to claim 3 or 4, wherein: The second preset value is determined based on at least one of the following: The area of ​​the target image block; The width and height of the target image block; The ratio of the width to the height of the target image block.

6. The method according to claim 1, wherein: The determining, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode includes at least one of the following: In the case where the target image block is in the intra sub-block division mode, determining that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode; When at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes does not correspond to an angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

7. The method according to any one of claims 1 to 3, wherein: The second reference row corresponding to the second prediction mode includes at least one of the following: All second prediction modes except the first prediction mode in the at least two intra-frame prediction modes correspond to the same second reference row; Each of all second prediction modes except the first prediction mode among the at least two intra prediction modes The second prediction modes respectively correspond to independent second reference rows.

8. The method according to any one of claims 1 to 7, wherein: The intra prediction mode includes at least one of the following: a DC mode, a PLANAR mode, an angle prediction mode, and a template-based derived intra prediction mode TIMD.

9. An image block prediction device, comprising: An acquisition module, used for acquiring a first reference row corresponding to a first prediction mode of at least two intra-frame prediction modes corresponding to a target image block; A first determining module, configured to determine, according to the first prediction mode and at least one second prediction mode, a second reference row corresponding to the second prediction mode, wherein the second prediction mode is a prediction mode other than the first prediction mode among the at least two intra-frame prediction modes; The second determination module is used to fuse the first prediction block and at least one second prediction block to determine the target prediction block corresponding to the target image block, the first prediction block is determined based on the first prediction mode and the first reference row, and each second prediction block is determined based on a second prediction mode and a second reference row.

10. The device according to claim 9, wherein: The first determining module is configured to implement at least one of the following: When the target image block is not in the intra sub-block division mode, determining a second reference row corresponding to the second prediction mode according to the first prediction mode and at least one second prediction mode; In the case that at least one of the first prediction mode and at least one of the second prediction modes is an angle prediction mode, a second reference row corresponding to the second prediction mode is determined according to the first prediction mode and the at least one second prediction mode.

11. The device according to claim 9 or 10, wherein: The first determining module is configured to implement at least one of the following: If the second prediction mode does not satisfy the first condition, determining that a second reference row corresponding to the second prediction mode is at a different position from the first reference row; If the number of the first target modes is greater than or equal to a first preset value, determining that the second reference row corresponding to the second prediction mode is at a different position from the first reference row; The first target mode is a second prediction mode among the at least two intra-frame prediction modes other than the first prediction mode and not satisfying the first condition; The first condition includes at least one of the following: An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is greater than or equal to a second preset value; The product of the difference between the second mode index corresponding to the second prediction mode and the target index and the difference between the first mode index corresponding to the first prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: the vertical mode index corresponding to the angular prediction mode, and the horizontal mode index corresponding to the angular prediction mode; At least one of a second mode index corresponding to the second prediction mode and a first mode index corresponding to the first prediction mode is not equal to a third preset value.

12. The device according to claim 9 or 10, wherein: The first determining module is configured to implement at least one of the following: If the second prediction mode satisfies the first condition, determining that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode; If the number of the first target modes is less than the first preset value or the number of the second target modes is greater than or equal to the first preset value, determining that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode; The first target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that does not satisfy the first condition; the second target mode is a second prediction mode other than the first prediction mode among the at least two intra-frame prediction modes that satisfies the first condition; The first condition includes at least one of the following: An absolute value of a difference between a second mode index corresponding to the second prediction mode and a first mode index corresponding to the second prediction mode is greater than or equal to a second preset value; The product of the difference between the second mode index corresponding to the second prediction mode and the target index and the difference between the first mode index corresponding to the second prediction mode and the target index is less than or equal to 0, and the target index includes at least one of the following: the vertical mode index corresponding to the angular prediction mode, and the horizontal mode index corresponding to the angular prediction mode; At least one of the second mode index corresponding to the second prediction mode and the first mode index corresponding to the second prediction mode is not equal to a third preset value.

13. The device according to claim 11 or 12, wherein: The second preset value is determined based on at least one of the following: The area of ​​the target image block; The width and height of the target image block; The ratio of the width to the height of the target image block.

14. The device according to claim 9, wherein: The first determining module is configured to implement at least one of the following: In the case where the target image block is in the intra sub-block division mode, determining that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining the second reference row corresponding to the second prediction mode according to the second prediction mode; When at least one of the first mode index corresponding to the first prediction mode and the second mode index corresponding to at least one of the second prediction modes does not correspond to an angle prediction mode, it is determined that the second reference row corresponding to the second prediction mode has the same position as the first reference row, or the second reference row corresponding to the second prediction mode is determined based on the second prediction mode.

15. The device according to any one of claims 9 to 11, wherein: The second reference row corresponding to the second prediction mode includes at least one of the following: All second prediction modes except the first prediction mode in the at least two intra-frame prediction modes correspond to the same second reference row; Each of all second prediction modes except the first prediction mode among the at least two intra prediction modes The second prediction modes respectively correspond to independent second reference rows.

16. The device according to any one of claims 9 to 15, wherein: The intra prediction mode includes at least one of the following: a DC mode, a PLANAR mode, an angle prediction mode, and a template-based derived intra prediction mode TIMD.

17. An electronic device comprising a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the image block prediction method according to any one of claims 1 to 8 are implemented.

18. A readable storage medium storing a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the image block prediction method according to any one of claims 1 to 8.

19. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the image block prediction method according to any one of claims 1 to 8.

20. A computer program product, wherein the computer program product is stored in a storage medium, and wherein the computer program product is executed by at least one processor to implement the steps of the image block prediction method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image encoding / decoding method and apparatus, and recording medium storing bitstream

    CN113273213A

  • Power control method and deviceto minimum frequency variable using full bridge induction heating inverter

    KR1020250015432A

  • Method and device for processing video signal for intra prediction

    US20210400263A1