Image block prediction method and device and electronic equipment

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.

CN119728988AActive Publication Date: 2025-03-28VIVO MOBILE COMM CO LTD

Patent Information

Application Number
CN202311275755.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28
Estimated Expiration
2043-09-28

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

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

Benefits of technology

This method can avoid the problem of inaccurate prediction results when only using 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 CN119728988A_ABST
    Figure CN119728988A_ABST
Patent Text Reader

Abstract

The invention discloses an image block prediction method and device and electronic equipment, and belongs to the technical field of coding and decoding, and the method comprises the steps: 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; according to the first prediction mode and at least one second prediction mode, a second reference line corresponding to the second prediction mode is determined, and the second prediction mode is one prediction mode except the first prediction mode in the at least two intra-frame prediction modes; the first prediction block and at least one second prediction block are fused, a target prediction block corresponding to the target image block is determined, the first prediction block is determined based on the first prediction mode and the first reference line, and each second prediction block is determined based on one second prediction mode and the second reference line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] 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

[0002] Intra-frame prediction has many prediction modes to handle various types of textures in images, including DC, planar, and some angle prediction modes. The reconstructed pixels in the upper row and left column of the current block are used as reference pixels, and the prediction value of the current prediction block is obtained through the specified prediction mode, thereby achieving the purpose of removing spatial redundancy. There are 65 angle prediction modes in Versatile Video Coding (VVC), and each angle prediction mode is equivalent to an offset in the horizontal or vertical direction.

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

[0004] 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. Summary of the invention

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

[0006] In a first aspect, an image block prediction method is provided, the method comprising:

[0007] 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;

[0008] 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;

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

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

[0011] 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;

[0012] 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;

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

[0014] According to a third aspect, an electronic device is provided, comprising a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and wherein the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0015] In a fourth aspect, an electronic device is provided, comprising a processor and a communication interface, wherein the processor is used 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;

[0016] 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;

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

[0018] 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 execute the steps of the method described in the first aspect.

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

[0020] 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 used to run a program or instruction to implement the steps of the method described in the first aspect.

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

[0022] 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 based on the first prediction mode and at least one second prediction mode, a second reference row corresponding to a second prediction mode is determined, and 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 the 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 determine the reference row corresponding to the second prediction mode by combining the second prediction mode and the first prediction mode, and determining the reference row corresponding to the second prediction mode by referring to the first prediction mode, thereby avoiding the problem of inaccurate prediction results caused by only using the second prediction mode to determine the reference row, and making the second prediction mode and the second reference row obtain a better prediction block, thereby improving the prediction accuracy under the fusion technology of multiple intra-frame prediction modes. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

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

[0026] Figure 4 is a flowchart of an image block prediction method according to an embodiment of the present application;

[0027] Figure 5 is a module schematic diagram of an image block prediction device according to an embodiment of the present application;

[0028] Figure 6 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0029] Figure 7 It is a schematic diagram of the structure of the communication device of an embodiment of the present application. DETAILED DESCRIPTION

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

[0031] The terms "first", "second", etc. of the present 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 one type, and the number of objects is not limited, for example, the first object can be one or more. In addition, "or" in the present application represents at least one of the connected objects. For example, "A or B" covers three schemes, namely, Scheme 1: including A but not including B; Scheme 2: including B but not including A; Scheme 3: including both A and B. The character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0032] Figure 1 Schematic diagram of a coding and decoding system provided by an embodiment of the present application. The technical solution of the embodiment of the present application relates to coding and decoding (CODEC) (including encoding or decoding) of video data. The video data includes original uncoded video, coded video, decoded (e.g., reconstructed) video or syntax elements, etc.

[0033] like Figure 1 As shown, the codec system includes a source device 100, which provides encoded video data that is 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, a car 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 airplane, a robot, a satellite, and the like.

[0034] exist Figure 1In the example of FIG. 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, and 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 Figure 1 Some components in, or can also include Figure 1 For example, source device 100 may receive video data from an external data source (such as an external camera). Similarly, destination device 110 may be connected to an external display device interface without including an integrated display device. For another example, memory 102 and memory 113 may be external memories.

[0035] Although Figure 1 The source device 100 and the destination device 110 are shown as separate devices, but in some examples, the two may also be integrated into one device. In such embodiments, the functions corresponding to the source device 100 and the functions corresponding to the destination device 110 may be implemented using the same hardware or software, or using separate hardware or software, or any combination thereof.

[0036] In some examples, the source device 100 and the destination device 110 can perform one-way video transmission or two-way video transmission. If it is two-way video transmission, the source device 100 and the destination device 110 can operate in a substantially symmetrical manner, that is, each of the source device 100 and the destination device 110 includes an encoder and a decoder.

[0037] The data source 101 represents the source of video data (i.e., the original, unencoded video data) and provides a continuous picture containing the video data to the encoder 200, which encodes the data of the picture. The data source 101 of the source device 100 may include a video acquisition device (such as a video camera), a video archive containing previously acquired original video, or a video feed interface for receiving video from a video content provider. As an alternative, the 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, the encoder 200 encodes the acquired, pre-acquired, or computer-generated video data. The encoder 200 may rearrange the pictures from the received order (sometimes referred to as the "display order") in the encoding order. The encoder 200 may generate a bitstream including the encoded video data. The source device 100 may then output the encoded video data to the communication medium 120 via the output interface 104 for, for example, reception or retrieval by the input interface 111 of the destination device 110.

[0038] The memory 102 of the source device 100 and the memory 113 of the destination device 110 represent general memory. In some examples, the memory 102 can store the original video data from the data source 101, and the memory 113 can store the decoded video data from the decoder 300. Additionally or alternatively, the memories 102 and 113 can store software instructions that can be executed by, for example, the encoder 200 and the decoder 300, respectively. Although the memory 102 and the memory 113 are shown separately from the encoder 200 and the decoder 300 in this example, it should be understood that the encoder 200 and the decoder 300 can also include internal memories for functionally similar or equivalent purposes. If the encoder 200 and the decoder 300 are deployed on the same hardware device, the memory 102 and the memory 113 can be the same memory. In addition, the memories 102 and 113 can store, for example, the encoded video data output from the encoder 200 and input to the 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.

[0039] In some examples, source device 100 may output the encoded data from output interface 104 to memory 113. Similarly, destination device 110 may access the encoded data from memory 113 via input interface 111. Memory 113 or storage 102 may 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.

[0040] The output interface 104 may include any type of medium or device capable of transmitting the encoded video data from the source device 100 to the destination device 110. For example, the output interface 104 may include a transmitter or transceiver, such as an antenna, configured to transmit the encoded video data directly from the source device 100 to the 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 the destination device 110.

[0041] 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 disk, a volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0042] 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 the encoded video from the source device 100 and provide the encoded video data to the destination device 110, for example, via a network transmission to the destination device 110. The server may include a web server (e.g., for a website), a server configured to provide a file transfer protocol service (such as a file transfer protocol (FTP) or a unidirectional file transfer (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, or a network-attached storage (NAS) device, etc. 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) protocol.

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

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

[0045] The technology provided in the embodiments of the present application can be applied to support video encoding and decoding in one or more of the following multimedia applications: 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.

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

[0047] The encoder 200 and the decoder 300 may be implemented as one or more of various 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.

[0048] 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 Videocoding Standard 1, AVS1), AVS2, AVS3 or the next generation video standard protocol, which is not specifically limited in the embodiments of the present application.

[0049] In general, the encoder 200 and the 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 an encoding or decoding process). For example, a block may include a two-dimensional matrix of samples of luminance or chrominance data. For example, the encoder 200 and the decoder 300 can encode and decode video data represented in a YUV format.

[0050] See also Figure 2 , which is a schematic diagram of the structure of the encoder 200 provided in the embodiment of the present application, and the encoder 200 may be Figure 1 The encoder 200 in. Figure 2In the example, 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.

[0051] The memory 201 can store the video data to be encoded. For example, the encoder 201 can store the video data to be encoded. Figure 1 The data source 101 shown receives the video data and stores it. In some examples, the memory 201 can be on the same chip as other components of the encoder 200 (e.g. Figure 2 As shown), it can also be independent of the chip where these components are located.

[0052] 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 an inter-frame prediction mode, and the intra-frame prediction unit 213 is used to obtain a second prediction block of the current block using an intra-frame prediction mode. The mode selection unit 211 is used to obtain a target prediction block according to the first prediction block and the second prediction block, and 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 a division method of a coding unit (CU), a functional unit for determining a transform type of residual data of a CU or a quantization parameter of residual data of a CU, etc.

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

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

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

[0056] 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 uncoded video data of the current block from the memory 201, and calculates the residual between the current block and the target prediction block to obtain the residual block. In some examples, the function of the residual generation unit 202 may be implemented using one or more subtractor circuits that perform binary subtraction.

[0057] 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 a CU partitioning method, a final prediction mode, a transform type of the CU residual data, or a quantization parameter of the CU residual data.

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

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

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

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

[0062] The encoder 200 stores the reconstructed picture obtained by the reconstructed block in the DPB 209. For example, in an example where the operation of the filter unit 208 is not required, the reconstruction unit 207 can store the reconstructed block in the DPB 209. In an example where the operation of the filter unit 208 is required, the filter unit 208 can 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 the block of the subsequent picture to be encoded. In some examples, the DPB 209 can be replaced by other types of memory.

[0063] 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 block from the quantization unit 204. As another example, the entropy coding unit 220 may entropy encode syntax elements (e.g., motion information for inter-frame prediction or intra-frame mode information for intra-frame prediction) from the encoding parameter determination unit 210.

[0064] Understandably, Figure 2 The composition of the encoder 200 is merely an illustration and does not constitute a limitation to the embodiments of the present application.

[0065] Figure 3 is a schematic diagram of the structure of a decoder 300 provided in an embodiment of the present application. The decoder 300 may be Figure 1 The decoder 300. Figure 3 In the example, 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.

[0066] 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 transformation type of the CU's residual data, or the quantization parameter of the CU's residual data.

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

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

[0069] The decoder 300 may perform reconstruction operations on each block separately. The entropy decoding unit 302 may entropy decode the syntax elements of the quantized transform coefficients and the transform information (e.g., QP or transform mode indication) to obtain the 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 dequantized by the inverse transform processing unit 304 to generate a residual block corresponding to the current block, and the dequantization is the inverse operation of the above-mentioned transform.

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

[0071] 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, which will not be described in detail herein. In some examples, the operation of the filter unit 306 may be skipped.

[0072] The decoder 300 may store the reconstructed picture obtained by the reconstructed block in the DPB 307. For example, in an example where 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 where 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., a decoded video) from the DPB 307 for display on a display device (such as a display device). Figure 1 for subsequent presentation on display device 114).

[0073] 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 the encoding end, for example Figure 1 or Figure 2 The image block prediction method provided in the embodiment of the present application can be executed by a decoding end, for example Figure 1 or Figure 3 The decoder 300. The encoding end and the decoding end may be implemented by software, hardware or a combination thereof. When implemented by hardware, the encoding end may be referred to as an encoding end device or a video encoding device, and the decoding end may be referred to as a decoding end device or a video decoding device.

[0074] The following is a description of the technologies related to the embodiments of the present application.

[0075] In video coding, a frame of image is divided into many macroblocks, and prediction blocks are obtained by intra-frame prediction or inter-frame prediction. The difference between the original block and the prediction block is the residual block, which is then transformed, quantized, and entropy encoded.

[0076] The types of pictures in video standards usually include I pictures, P pictures, and B pictures. I pictures can be decoded independently without referring to other pictures, P pictures use multiple pictures before (in the past) the current picture in the display order as reference pictures, and B pictures can use multiple pictures before (in the past) the current picture in the display order and after (in the future) the current picture in the display order as reference pictures.

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

[0078] 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 modes for prediction.

[0079] 2. Multiple reference lines

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

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

[0082] Currently, there are two intra prediction modes in the TIMD fusion mode, expressed as P = Xp1 + Yp2, where p1 is the prediction block obtained using the first intra prediction mode and the first reference line. p2 is the prediction block obtained using the second intra prediction mode and the second reference line (line or line+1, which can be written as the same or different reference line as the first reference line). Which reference line is selected for the second reference line (line or line+1) is inferred from the second prediction mode.

[0083] 3. Wide-angle intra prediction mode

[0084] 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. The replaced modes are signaled using the original mode index, which is remapped to the index of the wide-angle mode after parsing. The total number of intra prediction modes remains unchanged, i.e. 67, and the intra mode encoding method also remains unchanged.

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

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

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

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

[0089] like Figure 4 As shown, the embodiment of the present application provides an image block prediction method, comprising:

[0090] Step 401, obtaining a first reference row corresponding to a first prediction mode among at least two intra-frame prediction modes corresponding to a target image block;

[0091] It should be noted that the image block prediction method of the embodiment of the present application can be applied to both an encoding device (encoder) and a decoding device (decoder); when applied to an encoding device, optionally, the encoding device can 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 smallest cost as the first prediction mode. When applied to a decoding device, because the encoding device encodes the first prediction mode into the bitstream, optionally, the decoding device can obtain the first prediction mode based on the 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.

[0092] The first reference row may be preset, for example, may be the 0th row.

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

[0094] 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;

[0095] Optionally, the second prediction mode is a prediction mode of the at least two intra-frame prediction modes except the first prediction mode;

[0096] 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;

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

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

[0099] It should be noted that, by first obtaining the first reference row corresponding to the first prediction mode in 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, so that the prediction result is inaccurate, and 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, so as to avoid the problem of inaccurate prediction results caused by only using the second prediction mode to determine the reference row, and can make the second prediction mode and the second reference row obtain a better prediction block, so as to improve the prediction accuracy under the fusion technology of multiple intra-frame prediction modes.

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

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

[0102] 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 ones (for example, based on different angles, the intra-frame prediction modes are divided into multiple ones). Therefore, the at least two intra-frame prediction modes mentioned in the embodiments 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.

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

[0104] 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;

[0105] This situation can be understood as, as long as the second reference row of a 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, and can reduce processing delay.

[0106] A2, each of the second prediction modes in all 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;

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

[0108] In another optional implementation manner, 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:

[0109] A101, 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;

[0110] 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 at least one of the second prediction modes.

[0111] 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 according to the first prediction mode and at least one second prediction mode.

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

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

[0114] 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;

[0115] 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 at least one of the second prediction modes;

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

[0117] For example, when at least one of the second mode indexes corresponding to at least one of the second prediction modes 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.

[0118] 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 angle prediction modes, 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.

[0119] 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 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 according to the first prediction mode and at least one second prediction mode.

[0120] In another optional implementation, 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:

[0121] 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 at a different position from the first reference row;

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

[0123] 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;

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

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

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

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

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

[0129] A112: 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;

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

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

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

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

[0134] 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 being less than or equal to 0 includes the following situations:

[0135] Case 1: 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 (corresponding to data symbol <) 0;

[0136] Case 2: 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 equal to (corresponding data symbol=)0;

[0137] Case 3: 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 (corresponding data symbol ≤) 0.

[0138] Optionally, in this case, not satisfying the first condition means 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 greater than 0.

[0139] 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;

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

[0141] It should be noted that the third preset value refers to the mode index corresponding to the intra-frame prediction mode. Normally, 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 met. When the mode index corresponding to the intra-frame prediction mode includes multiple, the third preset value represents a set of mode indexes. This situation can be understood as 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 met.

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

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

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

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

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

[0147] 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 from the first reference row;

[0148] 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;

[0149] For example, there are M (M is less than or equal to K, K represents the number of at least two intra-frame prediction modes - 1) second prediction modes other than the first prediction mode among at least two intra-frame prediction modes. 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 not in the same position as the first reference row. It should be noted that when M is equal to K, it means that all intra-frame prediction modes other than the first prediction mode among at least two intra-frame prediction modes do not meet the first condition.

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

[0151] In another optional implementation, 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:

[0152] B11. 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;

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

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

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

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

[0157] 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 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;

[0158] 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 satisfy 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 satisfies the first condition.

[0159] This situation can be understood as, as long as the number of second prediction modes that do not satisfy the first condition is less than the first preset value or the number of second prediction modes that satisfy 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 satisfy the first condition is less than the first preset value or the number of second prediction modes that satisfy 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.

[0160] Optionally, in the above case, failure to meet the first condition can be understood as the following situations:

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

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

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

[0164] In another optional implementation manner, 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:

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

[0166] This situation can be understood as, as long as the target image block is in 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 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.

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

[0168] 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 at least one second mode index corresponding to the 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 at least one second mode index corresponding to the 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.

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

[0170] Optionally, the first mode index corresponding to the first prediction mode and at least one second mode index corresponding to the second prediction mode may include the following situations:

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

[0172] Case 2: Among the second mode indexes 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;

[0173] Case three: 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 angle prediction mode.

[0174] The specific application examples of the embodiments of the present application are described below.

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

[0176] The specific implementation process includes:

[0177] 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;

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

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

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

[0181] In a case where the target image block is not in the 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 angle prediction mode, if the second prediction mode does not satisfy the first condition, determining that the second reference row corresponding to the second prediction mode is not in the same position as the first reference row;

[0182] In a case where the target image block is not in the 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 angle prediction mode, if the second prediction mode satisfies a first condition, determining that a second reference row corresponding to the second prediction mode has the same position as the first reference row, or determining a second reference row corresponding to the second prediction mode according to the second prediction mode;

[0183] 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 in 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; 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 in 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.

[0184] Step S13: merge 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.

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

[0186] The specific implementation process includes:

[0187] 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;

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

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

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

[0191] In a case where the target image block is not in the 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 the angle 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 not at the same position as the first reference row;

[0192] In a case where the target image block is not in an 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 angle 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 has the same position as the first reference row, or determining a second reference row corresponding to the second prediction mode according to the second prediction mode;

[0193] 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 in 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; 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 in 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.

[0194] Step S23: merge 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 respectively to obtain a target prediction block.

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

[0196] The specific implementation process includes:

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

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

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

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

[0201] In a case where the target image block is not in the 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 the angle prediction mode, if the number of the two second prediction modes that do not satisfy the first condition is greater than 1 (it can also be understood that at least one of the two second prediction modes does not satisfy the first condition), it is determined that the second reference row corresponding to each second prediction mode is different from the position of the first reference row;

[0202] In a case where the target image block is not in the 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 the angle prediction mode, if both of the two second prediction modes satisfy 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;

[0203] 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 in 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; 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 in 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.

[0204] Step S33: merge 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 respectively to obtain a target prediction block.

[0205] 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, while the implementation method of the embodiment of the present application is to analyze the difference 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 difference 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 difference 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 difference between the two modes is large, that is, if the first condition is met, It indicates that the difference between the two modes is large. If the difference 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 difference 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 difference 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 difference between the two modes is small, that is, if the first condition is not met, it indicates that the difference between the two modes is small. If the difference 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; 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.

[0206] 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 taken as an example to illustrate the image block prediction device provided in the embodiment of the present application.

[0207] like Figure 5 As shown, the image block prediction device 500 of the embodiment of the present application includes:

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

[0209] A first determination module 502 is 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 of the at least two intra-frame prediction modes other than the first prediction mode;

[0210] 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, 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.

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

[0212] 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;

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

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

[0215] 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;

[0216] 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;

[0217] 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;

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

[0219] 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;

[0220] 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;

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

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

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

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

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

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

[0227] 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;

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

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

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

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

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

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

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

[0235] 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;

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

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

[0238] 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;

[0239] Each of the second prediction modes in all 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.

[0240] Optionally, 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.

[0241] 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 effect.

[0242] The image block prediction device in the embodiment of the present application can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the terminal can include but is not limited to the types of terminals 11 listed above, and other devices can be servers, network attached storage (Network Attached Storage, NAS), etc., which are not specifically limited in the embodiment of the present application.

[0243] The image block prediction device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.

[0244] An embodiment of the present application further provides an electronic device, including a processor and a communication interface, wherein the processor is used 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;

[0245] 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;

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

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

[0248] 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;

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

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

[0251] 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;

[0252] 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;

[0253] 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;

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

[0255] 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;

[0256] 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;

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

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

[0259] 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;

[0260] 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;

[0261] 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;

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

[0263] 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;

[0264] 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;

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

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

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

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

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

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

[0271] 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;

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

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

[0274] 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;

[0275] Each of the second prediction modes in all 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.

[0276] Optionally, 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.

[0277] The electronic device embodiment corresponds to the above method embodiment, and each implementation process and implementation method of the above method embodiment can be applied to the electronic device embodiment and can achieve the same technical effect. Specifically, Figure 6 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0278] 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 a processor 610.

[0279] Those skilled in the art will appreciate that the electronic device 600 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0280] It should be understood that in the 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.

[0281] In the 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.

[0282] 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, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), 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.

[0283] The processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 610.

[0284] The processor 610 is configured to:

[0285] 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;

[0286] 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;

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

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

[0289] 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;

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

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

[0292] 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;

[0293] 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;

[0294] 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;

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

[0296] 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;

[0297] 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;

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

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

[0300] 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;

[0301] 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;

[0302] 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;

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

[0304] 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;

[0305] 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;

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

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

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

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

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

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

[0312] 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;

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

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

[0315] 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;

[0316] Each of the second prediction modes in all 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.

[0317] Optionally, 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.

[0318] 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, each process of the above-mentioned image block prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0319] 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, each process of the above-mentioned image block prediction method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0321] Optional, such as Figure 7 As shown, 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 executed on the processor 701, and when the program or instruction is executed by the processor 701, each step of the above-mentioned image block prediction method embodiment is implemented, and the same technical effect can be achieved.

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

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

[0324] The embodiments of the present application further provide a computer program / program product, which is stored in a storage medium, and 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.

[0325] The 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.

[0326] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out 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 reverse 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.

[0327] 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an 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 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.

[0328] 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 the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An image block prediction method, characterized in that: include: 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, characterized in that 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, characterized in that: 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, characterized in that: 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, characterized in that: 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, characterized in that 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, characterized in that: 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 the second prediction modes in all 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.

8. The method according to any one of claims 1 to 7, characterized in that: 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, characterized in that: include: 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that 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, characterized in that: 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 the second prediction modes in all 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.

16. The device according to any one of claims 9 to 15, characterized in that: 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, characterized in that: The method comprises 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, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the image block prediction method according to any one of claims 1 to 8 are implemented.

19. A chip, characterized in that: The chip includes a processor and a communication interface, 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.

Citation Information

Patent Citations

  • Method and apparatus for intra prediction fusion in image and video coding

    CN111295881A

  • Intra-frame prediction method and terminal

    CN115883834A

  • Method for decoding and encoding video and transmission method

    CN116389727A

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

    KR102879697B1

  • Method and apparatus of video coding

    US20170272757A1

Cited By

  • Image block prediction method and apparatus, and electronic device

    EP4787836A1