A coding prediction method, apparatus, device and medium

By generating encoding prediction rules, skipping intra prediction processing, and only inter prediction is used to process image sub-blocks, solving the problem of excessive encoding complexity in video encoding technology, and achieving low code rate and efficient encoding.

CN115643409BActive Publication Date: 2025-07-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211258219.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-08
Publication Date
2025-07-25
Estimated Expiration
2042-10-08

AI Technical Summary

Technical Problem

While ensuring low code rates, the existing video encoding technology has too high encoding complexity, affecting the low latency requirements of real-time business scenarios.

Method used

By obtaining the prediction cost of the current image block without division method and target division method, generating coding prediction rules, skipping intra prediction processing, and only inter prediction processing of image sub-blocks is used to reduce coding complexity.

Benefits of technology

While ensuring low code rate, it reduces coding complexity, improves coding efficiency, and meets the low latency requirements of real-time business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115643409B_ABST
    Figure CN115643409B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses an encoding prediction method, apparatus, device, and medium. The method includes: obtaining a current image block and a first prediction cost corresponding to the current image block when encoding and predicting the current image block in an undivided manner, where the first prediction cost is the minimum prediction cost obtained by respectively performing encoding and prediction processing using intra-frame prediction and inter-frame prediction; obtaining a second prediction cost corresponding to the current image block when encoding and predicting the current image block in a target division manner; when the first prediction cost is the prediction cost obtained by performing encoding and prediction processing using inter-frame prediction, generating an encoding prediction rule for each image sub-block obtained by dividing the current image block in other division manners based on the first prediction cost and the second prediction cost; and based on the encoding prediction rule, skipping the encoding and prediction processing of the image sub-block using intra-frame prediction and performing the encoding and prediction processing of the image sub-block using inter-frame prediction. This can reduce the complexity of the encoding process and improve the encoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video coding technology, and in particular to a coding prediction method, device, equipment and medium. Background Art

[0002] With the development of video coding and decoding technology, various video coding and decoding standards are committed to improving video coding quality and lower bit rates from different aspects. For video streams of the same quality, using a lower bit rate for transmission can effectively save transmission bandwidth and storage space, which is of great help to the current massive video business data. In order to ensure coding quality and low bit rate, more complex coding tools are introduced into the current video coding and decoding standards to obtain video compression ratios, which increases the coding complexity by several times. More computing resources and more time are required for coding, which may directly affect the low latency required in some real-time business scenarios (such as live broadcast scenarios) and affect the business experience. Therefore, how to ensure a low bit rate in the video encoding process and reduce the coding complexity as much as possible is a problem worth studying. Summary of the invention

[0003] The embodiments of the present application provide a coding prediction method, apparatus, device and medium, which can effectively reduce the complexity of the coding process while ensuring a low bit rate and improve the coding efficiency.

[0004] On the one hand, an embodiment of the present application provides a coding prediction method, including:

[0005] Obtaining a current image block, and obtaining a first prediction cost corresponding to the current image block when a coding prediction process is performed in a non-division manner; the first prediction cost is a minimum value of prediction costs obtained by performing coding prediction processes in multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively; the current image block also supports coding prediction processes in a target division manner;

[0006] Obtaining a second prediction cost corresponding to the current image block when encoding prediction processing is performed using a target partitioning method;

[0007] When the first prediction cost is a prediction cost obtained by performing coding prediction processing using inter-frame prediction, generating coding prediction rules for each image sub-block obtained by using other division methods for the current image block based on the first prediction cost and the second prediction cost;

[0008] Based on the coding prediction rule, the coding prediction processing of the corresponding image sub-block by adopting the intra-frame prediction is skipped, and the coding prediction processing of the corresponding image sub-block by adopting the inter-frame prediction is performed.

[0009] On the one hand, an embodiment of the present application provides a coding prediction device, including:

[0010] An acquisition module, configured to acquire a current image block and acquire a first prediction cost corresponding to the current image block when encoding and predicting the current image block without using a partitioning method; the first prediction cost is the minimum value among the prediction costs obtained by encoding and predicting the current image block using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively; the current image block also supports encoding and predicting the current image block using a target partitioning method.

[0011] The acquisition module is further configured to acquire a second prediction cost corresponding to the current image block when encoding and predicting the current image block using the target partitioning method.

[0012] A generation module, configured to generate an encoding and prediction rule for each image sub-block obtained by partitioning the current image block in another way based on the first prediction cost and the second prediction cost when the first prediction cost is the prediction cost obtained by encoding and predicting the current image block using inter-frame prediction.

[0013] An encoding and prediction module, configured to skip encoding and predicting the corresponding image sub-block using intra-frame prediction and perform encoding and predicting the corresponding image sub-block using inter-frame prediction based on the encoding and prediction rule.

[0014] Correspondingly, an embodiment of the present application provides an encoding and prediction device, including: a processor, a memory, and a network interface; the processor is connected to the memory and the network interface, wherein the network interface is configured to provide network communication functions, the memory is configured to store program codes, and the processor is configured to call the program codes to execute the encoding and prediction method in the embodiment of the present application.

[0015] Correspondingly, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the encoding and prediction method in the embodiment of the present application is executed.

[0016] In an embodiment of the present application, the current image block can be obtained, and the first prediction cost corresponding to the case where the current image block is encoded and predicted without partitioning can be obtained. Since the first prediction cost is the prediction cost of the minimum value obtained by encoding and predicting the current image block using each prediction mode corresponding to intra-frame prediction and inter-frame prediction respectively when not partitioning, the prediction mode corresponding to the first prediction cost is a better prediction mode that matches the characteristics of the current image block, which can enable the current image block without partitioning to obtain a better prediction result during encoding and prediction, reduce distortion as much as possible while ensuring a low bit rate, and improve the encoding effect. Since the current image block also supports encoding and prediction processing in the target partitioning mode, therefore, the second prediction cost corresponding to the target partitioning mode can also be obtained. Furthermore, when the first prediction cost indicates that the current image block uses inter-frame prediction, an encoding and prediction rule in other partitioning modes is generated based on the first prediction cost and the second prediction cost. The prediction cost is calculated based on the information generated during the encoding process. When generating the encoding and prediction rule based on the prediction cost, there is no need to perform additional high-complexity analysis and processing on the current image block, and the encoding and prediction rule can be generated based on the existing information during the encoding process, thus avoiding the introduction of additional complexity. Under the corresponding encoding and prediction rule, the encoding and prediction processing of the image sub-block using intra-frame prediction can be skipped, and the image sub-block is encoded and predicted using inter-frame prediction. In this way, when the current image block uses other partitioning modes, the way of encoding and predicting the image sub-block using inter-frame prediction can be retained, and some or all of the intra-frame prediction modes used for the intra-frame prediction can be omitted. In this way, the image sub-blocks obtained in other partitioning modes do not need to be encoded and predicted using all prediction modes and calculate the prediction cost, and the encoding process in other partitioning modes can be simplified, the intra-frame prediction encoding complexity can be greatly reduced, and then the overall encoding complexity can be reduced, the encoding and prediction speed can be improved, so as to perform efficient encoding and prediction processing and improve the encoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is an architecture diagram of an encoding and prediction system provided by an embodiment of the present application;

[0018] Figure 2 is a flowchart of an encoding and prediction method provided by an embodiment of the present application;

[0019] Figure 3a is a diagram showing the effects of the non-partitioning mode and each partitioning mode specified in H.266 provided by an embodiment of the present application;

[0020] Figure 3b is a diagram showing the partitioning result of the current image block provided by an embodiment of the present application;

[0021] Figure 4It is a schematic flowchart of another coding prediction method provided by an embodiment of the present application;

[0022] Figure 5 It is a schematic flowchart of yet another coding prediction method provided by an embodiment of the present application;

[0023] Figure 6 It is a flowchart for coding prediction of a current basic coding unit provided by an embodiment of the present application;

[0024] Figure 7 It is a schematic structural diagram of a coding prediction device provided by an embodiment of the present application;

[0025] Figure 8 It is a schematic structural diagram of a coding prediction device provided by an embodiment of the present application. Detailed implementation manners

[0026] An embodiment of the present application proposes a coding prediction method. The coding prediction device can obtain the current image block and first process the current image block in a non-partitioned manner. When the current image block is not partitioned, the coding prediction device can perform coding prediction processing on the current image block using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively (including each intra-frame prediction mode and each inter-frame prediction mode), and obtain corresponding prediction costs based on the prediction results obtained from the coding prediction processing. Furthermore, the minimum value among the prediction costs corresponding to each prediction mode can be used as the first prediction cost, so that the coding prediction device can obtain the first prediction cost corresponding to coding and predicting the current image block in a non-partitioned manner. Since the current image block also supports coding prediction processing using a target partitioning method, the coding prediction device can also perform coding prediction processing on the current image block using the target partitioning method and calculate the prediction cost corresponding to the target partitioning method based on the prediction results obtained from the coding prediction processing. In this way, the coding prediction device can obtain the second prediction cost corresponding to coding and predicting the current image block using the target partitioning method. Through the prediction cost, the prediction results (such as distortion and bit rate, etc.) under the corresponding partitioning method or non-partitioning method can be evaluated. Generally, the smaller the prediction cost, the better the coding prediction result, and the video stream encoded under the corresponding prediction mode is also more conducive to transmission. Further, when the first prediction cost is the prediction cost obtained by performing coding prediction processing using inter-frame prediction, it indicates that among the respective prediction modes corresponding to intra-frame prediction and inter-frame prediction used when the current image block is in a non-partitioned state, the prediction cost corresponding to applying the inter-frame prediction mode (i.e., the prediction mode corresponding to intra-frame prediction) to the coding prediction processing of the current image block is the smallest. Inter-frame prediction is a prediction method that is more suitable for the current image block. At this time, the coding prediction device can generate coding prediction rules for each image sub-block obtained by partitioning the current image block using other partitioning methods based on the first prediction cost and the second prediction cost, specifically based on the comparison result of the two prediction costs. In this way, the coding prediction rules generated based on the prediction cost match the characteristics of the current image block. In practical applications, the coding prediction rules can ensure a lower bit rate when encoding under other partitioning methods, and the prediction cost is generated during the coding prediction processing of the current image block or image sub-block during the coding process, without the need for additional analysis operations on the current image block. This avoids introducing additional complexity, thereby reducing the complexity of the entire coding process and improving the coding efficiency.Next, under the corresponding coding prediction rules, it is supported to skip the coding process of intra prediction for image sub-blocks. In this way, when other partitioning methods are used for the current image block, the way of coding prediction for image sub-blocks by inter prediction can be retained, and when intra prediction is used, some or all of the intra prediction modes applied to the coding prediction process of image sub-blocks can be omitted, reducing the proportion of the complexity of intra prediction coding in the complexity of this coding process. Thus, the image sub-blocks obtained under other partitioning methods do not need to be coded and predicted using all prediction modes, and the coding process under other partitioning methods can be greatly simplified. Furthermore, the coding complexity can be greatly reduced, the coding prediction speed can be improved, efficient coding can be achieved, and the coding efficiency can be enhanced.

[0027] Next, the architecture of the coding prediction processing system provided by the embodiments of the present application will be introduced with reference to the accompanying drawings. Please refer to Figure 1 , Figure 1 which is an architecture diagram of a coding prediction processing system provided by an embodiment of the present application. As Figure 1 shown, the coding prediction processing system includes: a coding prediction device 100 and a terminal device 101. Among them, the terminal device 101 is used to generate a video and transmit the encoded and compressed video, or receive the encoded and compressed video and play the decompressed video. The coding prediction device 100 can be a video coding module in the terminal device 101 or a video coding module independent of the terminal device 101. Among them, the terminal device 101 includes but is not limited to: smart phones, tablets, smart wearable devices, intelligent voice interaction devices, smart home appliances, computers, vehicle-mounted terminals, and other devices, and the present application does not limit this. The coding prediction device 100 can be a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Deliver Network), and big data, but is not limited thereto.

[0028] The encoding prediction device 100 may be an encoder that supports the H.266 video encoding standard, where H.266 is also known as VCC (Versatile Video Coding, the latest generation of encoding standard). This encoding standard specifies the decoding process and syntax for H.266 decoding. The encoding prediction device 100 can encode an input image, which is any frame image in the video to be encoded. During the encoding process, the input image is usually divided into smaller image blocks for encoding prediction, and each image block can be further encoded and predicted in a block division manner. Specifically, the encoding prediction device can divide an image block into several image sub-blocks for encoding prediction using the corresponding division method or perform encoding prediction on the image block without division. If an image block is not divided, the image block can be used as a Coding Unit (CU), and the coding unit is the basic unit for encoding prediction. In addition, each image sub-block obtained by dividing the image block can also be used as a coding unit. In the H.266 standard, it supports the non-division method and two or more division methods, and also supports a very large number of prediction modes (including intra-frame prediction mode and inter-frame prediction mode). When performing encoding prediction processing on an image block, various division methods can be tried for division processing, and all prediction modes for non-divided blocks can be traversed to select a suitable prediction mode. Since the types of division methods and the types of prediction modes are both relatively large, if all prediction modes are traversed under each division method according to the conventional method, the complexity of the encoding prediction process is extremely high. Therefore, the encoding prediction device 100 can use the encoding prediction method described above to perform encoding prediction processing on the image block. By comparing the corresponding prediction costs of the non-division method and the target division method, the corresponding encoding prediction rules are generated, and the encoding prediction rules are applied under other division methods to skip intra-frame prediction. In this way, the encoding prediction under some division methods can avoid traversing all prediction modes, and the selection of the prediction mode can be faster, thereby reducing the encoding prediction complexity, improving the encoding prediction speed, and encoding efficiently. It should be noted that since each division method can be used to divide the image sub-blocks, the above encoding prediction method is also applicable to the encoding prediction processing of the image sub-blocks obtained by dividing the image block. In addition, for other video encoding standards that support two or more division methods and multiple prediction modes, the encoding prediction method provided in the embodiments of the present application can be used to reduce the encoding complexity.

[0029] The encoding prediction method provided by the embodiments of this application can be applied to various scenarios involving video encoding, including but not limited to live broadcast scenarios, screen mirroring display scenarios, video playback scenarios, cloud game scenarios, etc. By adopting the encoding prediction method provided by the embodiments of this application, the complexity of the encoding prediction process can be effectively reduced, the computing resources and encoding time required in the encoding prediction stage can be saved, the overall encoding complexity can be simplified, and the overall encoding efficiency can be improved. For low-latency scenarios such as live broadcasts, the low-latency service requirements can be met, and the service experience can be greatly improved.

[0030] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of an encoding prediction method provided by the embodiments of this application. This method can be executed by the above-mentioned encoding prediction device. This encoding prediction method includes the following steps S201 - S204.

[0031] S201, obtain the current image block, and obtain the first prediction cost corresponding to the current image block when encoding and predicting it in an undivided manner.

[0032] During the video encoding process, encoding is usually performed in a block division manner. A frame of the video to be encoded can be divided into at least two image blocks and encoded in the corresponding encoding order. The current image block can be the image block to be encoded in the currently input frame of the image. When encoding and predicting in an undivided manner, the current image block belongs to the basic encoding unit of the encoding prediction process. Since there is temporal correlation between different frames of the video to be encoded and spatial correlation between adjacent image blocks in the same frame of the image, to effectively utilize the temporal correlation and spatial correlation and improve the encoding efficiency, during the encoding process, the current image block can be encoded and predicted using the corresponding prediction mode without division. The prediction block (equivalent to the predicted value) obtained from the encoding prediction process can be encoded with the residual block (equivalent to the difference) between the current image block (equivalent to the true value), and the encoded bitstream can be transmitted, which can maintain a low bitrate and effectively save the resources required for encoding.

[0033] When performing encoding prediction processing on an image block, the prediction cost is usually calculated based on the prediction result obtained from the encoding prediction processing, and the encoding effect in the corresponding prediction mode can be pre-known through the prediction cost. In the embodiments of the present application, the first prediction cost corresponding to the current image block in the non-partitioning manner can be obtained. The first prediction cost is the minimum value among the prediction costs obtained by performing encoding prediction processing using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively. Among them, intra-frame prediction and inter-frame prediction are different types of encoding prediction techniques. When using intra-frame prediction, the encoding of the current frame image does not refer to the information of other frame images. When using inter-frame prediction, the information of adjacent frame images can be used to predict the current frame image. The multiple prediction modes corresponding to intra-frame prediction can be collectively referred to as intra-frame prediction modes, and the multiple prediction modes corresponding to inter-frame prediction can be collectively referred to as inter-frame prediction modes.

[0034] When the non-partitioning manner is adopted for the current image block, the encoding prediction device can select a prediction mode for the current image block, which is the basic encoding unit (Code Unit, CU) for encoding prediction. Specifically, the encoding prediction device can select a suitable prediction mode for the current image block from at least one intra-frame prediction mode and at least one inter-frame prediction mode based on the prediction cost. When selecting the prediction mode, the encoding prediction device generally adopts a traversal method. The encoding prediction device can apply all prediction modes to the current image block respectively, perform an actual encoding prediction processing on each prediction mode, and then calculate the prediction cost based on the prediction result obtained from the encoding prediction processing, so as to obtain the prediction cost corresponding to the encoding prediction in each prediction mode. This prediction cost is used to evaluate the prediction result obtained by performing encoding prediction in the corresponding prediction mode. Optionally, the prediction cost can be the rate-distortion cost. The rate-distortion cost can effectively evaluate the distortion degree and bit rate of the encoding prediction. Usually, the goal of rate-distortion optimization (RDO) is to minimize the distortion without exceeding the maximum bit rate, so as to achieve a better encoding effect while ensuring a low bit rate. The specific expression of the rate-distortion cost is as follows in Equation (1):

[0035] J(mode) = SSD + λ * R Equation (1)

[0036] Among them, SSD refers to the sum of mean squared differences between the reconstructed block and the current image block, λ is the Lagrange multiplier, which can be regarded as a weight, and R refers to the actual bitstream of the current image block encoded in the prediction mode. If it is an inter-frame prediction mode, it is R(ref, mode, mv, residual), including the sum of bits for the reference frame (i.e., the reference image), prediction mode, motion vector, residual, etc.; if it is an intra-frame prediction mode, it is R(mode, residual), including the sum of bits for the prediction mode, residual, etc.

[0037] After obtaining the prediction costs under various prediction modes, the minimum value among the prediction costs (which can be referred to as the minimum prediction cost) can be selected as the first prediction cost. The prediction mode corresponding to the first prediction cost may be an intra prediction mode or an inter prediction mode. By obtaining the prediction cost with the minimum value, the best prediction mode in the case of not dividing the current image block can be determined. Through the best prediction mode, relevant characteristics of the current image block can be known, such as temporal continuity (the similarity between the current image block in adjacent frame images) or texture continuity (the similarity between the current image block and surrounding adjacent image blocks), which is convenient for providing corresponding references when the current image block is divided into image sub - blocks for encoding prediction.

[0038] The current image block also supports encoding prediction processing using a target partitioning method. Among them, the target partitioning method is a partitioning method for dividing an image block into image sub - blocks. During the overall encoding process, the current image block in a frame of image supports further being divided into several image sub - blocks for encoding prediction processing. Further, each image sub - block can also use the non - partitioning method and the target partitioning method for encoding prediction processing. In the target partitioning method, the basic encoding unit for encoding prediction processing is each image sub - block, and there is also a corresponding prediction cost for the encoding prediction processing of each image sub - block in the target partitioning method.

[0039] S202, obtain the second prediction cost corresponding to the current image block when encoding prediction processing is performed using the target partitioning method.

[0040] The encoding prediction processing of the current image block using the target partitioning method specifically may include: the partitioning processing of the current image block and the prediction processing of each image sub - block obtained by the partitioning. Specifically, the encoding prediction device can use the target partitioning method to perform partitioning processing on the current image block to obtain at least two image sub - blocks. Then, in the case where the image sub - blocks are not partitioned, the encoding prediction device can use multiple prediction modes corresponding to inter - frame prediction and intra - frame prediction respectively to perform prediction processing on the image sub - blocks, and calculate the prediction cost based on the prediction results obtained from the prediction processing. The processing of the obtained image sub - blocks is similar to that of the current image block in the non - partitioning method, and each image sub - block has a corresponding prediction cost under each prediction mode. Optionally, the second prediction cost corresponding to the current image block when encoding prediction processing is performed using the target partitioning method obtained by the encoding prediction device can be the sum of the minimum prediction costs of each image sub - block.

[0041] S203, when the first prediction cost is the prediction cost obtained by performing encoding prediction processing using inter - frame prediction, generate encoding prediction rules for each image sub - block obtained by using other partitioning methods for the current image block based on the first prediction cost and the second prediction cost.

[0042] Since the first prediction cost is the minimum prediction cost among the respective prediction costs obtained by encoding and predicting using all inter-frame prediction modes and all intra-frame prediction modes when the current image block is not partitioned. If the first prediction cost is the prediction cost obtained by encoding and processing using inter-frame prediction, it indicates that when the current image block is not partitioned, the prediction mode corresponding to the minimum prediction cost is an inter-frame prediction mode, and this inter-frame prediction mode is the best prediction mode when the current image block is not partitioned. Encoding and predicting in this inter-frame prediction mode can obtain a prediction block that is closest to the current image block. Encoding based on the residual between the prediction block and the current image block can minimize the distortion. Additionally, this also indicates that the current image block is an image block with strong inter-frame continuity. Here, inter-frame continuity refers to the temporal continuity of video content, which can be measured by the similarity between images in the time dimension. The greater the similarity between adjacent frame images, the stronger the inter-frame continuity. Further, the encoding and prediction device can generate an encoding and prediction rule based on the first prediction cost and the second prediction cost, and this encoding and prediction rule is specifically applied to each image sub-block obtained by partitioning the current image block using other partitioning methods. In one implementation, the best encoding method for the current image block can be determined based on the comparison result of the two prediction costs, and then an encoding and prediction rule for the image sub-blocks obtained by partitioning the current image block using other partitioning methods can be generated according to the best encoding method. Both the other partitioning method and the target partitioning method are partitioning methods supported by the current image block, and these partitioning methods can be used to divide the image block into at least two sub-blocks. The target partitioning method can be any one of multiple partitioning methods, and the other partitioning method can be the partitioning methods other than the target partitioning method among the multiple partitioning methods. Different partitioning methods have different partitioning forms for the image block. For example, in the partitioning methods specified in H.266, they include: horizontal binary partitioning, vertical binary partitioning, quadtree partitioning, horizontal ternary partitioning, and vertical ternary partitioning. As Figure 3a shown, it is a schematic diagram of the effects of the non-partitioning method and various partitioning methods specified in H.266. The target partitioning method can be any one of the above 5 partitioning methods. For example, for horizontal binary partitioning, then the other partitioning methods include the partitioning methods other than horizontal binary partitioning. The sub-blocks obtained by these partitioning methods can choose not to be partitioned, or can continue to be partitioned according to the above 5 partitioning methods until the size of the finally partitioned sub-blocks reaches the partitioning limit, and then various prediction modes are used to encode and predict the sub-blocks, and the prediction mode with the minimum prediction cost is selected as the best prediction mode under the corresponding partitioning method.

[0043] Generally speaking, when the current image block or image sub-block adopts a partitioning method of dividing into sub-blocks, the continued partitioning of the obtained sub-blocks is also recursively encoded. The process of recursive encoding involves the comparison of prediction costs. Through recursive encoding, it can be determined whether to use the non-partitioning method or the partitioning method for the encoding prediction process of the sub-block, and the most suitable prediction mode for each basic encoding unit. If the current image block is partitioned into image sub-blocks by the target partitioning method, and it is determined through recursive encoding that the obtained image sub-blocks are not further partitioned, it indicates that the current image block is suitable for encoding with larger-sized image sub-blocks, and the possibility of intra-frame prediction is low. If the prediction mode of the image sub-blocks obtained by the target partitioning method is also the inter-frame prediction mode, it further indicates that the inter-frame continuity is strong, and the current image block is suitable for inter-frame prediction.

[0044] It should be noted that the encoding prediction rules generated based on the prediction costs can be applied not only to the image sub-blocks obtained by other partitioning methods, but also to the further partitioning of the image sub-blocks under other partitioning methods, so that when the encoding prediction rules indicate skipping some prediction modes, the encoding complexity can be more effectively reduced. In addition, when the first prediction cost is the prediction cost obtained by encoding with intra-frame prediction, it indicates that the inter-frame continuity of the current image block is poor, and the current image block is usually partitioned into relatively small-sized sub-blocks. Then, when it is determined based on the first prediction cost and the second prediction cost that the optimal encoding method for the current image block is the non-partitioning method and the intra-frame prediction mode, or the optimal encoding method is the partitioning method, it indicates that the inter-frame continuity of the current image is poor, or the possibility of using intra-frame prediction under the partitioning method is relatively high. To ensure the accuracy of encoding prediction, when the current image block is encoded and predicted using other partitioning methods, all the prediction modes corresponding to intra-frame prediction and all the prediction modes corresponding to inter-frame prediction can be used to perform encoding prediction processing on the image sub-blocks respectively, and the most suitable prediction mode for each image sub-block can be determined according to the prediction costs corresponding to the encoding prediction processing. Based on the determined prediction mode, more accurate encoding prediction can be performed on the image sub-blocks, obtaining better prediction results, and thus minimizing the image distortion as much as possible.

[0045] S204, based on the encoding prediction rules, skip the encoding prediction process of using intra-frame prediction for the corresponding image sub-blocks, and perform encoding prediction processing on the corresponding image sub-blocks using inter-frame prediction.

[0046] The coding prediction rule is used to indicate the prediction mode adopted for coding prediction of the image sub-blocks obtained by other partitioning methods and the partitioning method of the image sub-blocks. The corresponding image sub-block is any one of the image sub-blocks obtained by partitioning the current image block by other partitioning methods. When the coding prediction device performs coding prediction on the corresponding image sub-block, the coding prediction process using intra prediction can be skipped according to the corresponding coding prediction rule. In one implementation, the coding prediction device can skip all prediction modes corresponding to intra prediction for coding prediction processing, that is, no intra prediction is used for coding the corresponding image sub-block; in another implementation, the coding prediction device can also skip some of the prediction modes corresponding to intra prediction for coding prediction processing, that is, only select some intra prediction modes to be applied to the corresponding image sub-block for coding prediction. In addition, according to the corresponding coding prediction rule, the coding prediction device can also perform coding prediction processing on the corresponding image sub-block using all inter prediction modes corresponding to inter prediction. After each prediction mode is applied to the corresponding image sub-block for coding prediction processing, the prediction mode with the smallest prediction cost can be determined based on the prediction costs corresponding to each prediction mode, and the prediction result corresponding to this prediction mode is used for coding.

[0047] It should be noted that for each image sub-block obtained by partitioning the current image block by other partitioning methods, the intra prediction mode can be skipped based on the coding prediction rule, and the inter prediction mode can be used to perform coding prediction processing on the image sub-block. In addition, after coding prediction is performed on the current image block using any partitioning method, for the current image block, the prediction cost under this partitioning method can be obtained. By comparing the magnitudes of the prediction costs, the partitioning method with the smallest prediction cost can be determined, and the prediction result obtained by coding prediction under this partitioning method can be directly used for quantization and coding to obtain the bitstream of the current image block. It can be understood that for the coding prediction processing of each image block in a frame of image, the coding prediction method provided in this application can be used to implement it, and for each image block, the final partitioning method and the prediction mode of the sub-blocks under each partitioning method can be determined. Generally, for a specific image block, the standard does not stipulate what form it should be partitioned into, as long as the partitioning form that conforms to the partitioning method is in line with the standard. Different partitioning forms will bring different coding efficiencies. In order to maximize the coding efficiency, the coding prediction device often tries all possible partitioning forms and finally selects the one with the best coding efficiency. There are many combinations of different partitioning methods, and the complexity of the coding process is relatively high. Exemplarily, for the partitioning effect of the current image block, reference can be made to Figure 3b . As Figure 3b shown, the current image block includes a combination of multiple partitioning methods, and the type of the best prediction mode corresponding to the image sub-block is either an inter prediction mode or an intra prediction mode.

[0048] The encoding prediction method provided by the embodiment of the present application can obtain the current image block and the first prediction cost corresponding to the current image block when encoding and predicting without partitioning. Since the first prediction cost is the prediction cost of the minimum value obtained by encoding and predicting the current image block using each prediction mode corresponding to intra-frame prediction and inter-frame prediction respectively when not partitioning, the prediction mode corresponding to the first prediction cost is a better mode that matches the characteristics of the current image block, which can enable the current image block without partitioning to obtain a better prediction result during encoding and prediction, reduce distortion as much as possible while ensuring a low bit rate, and improve the encoding effect. Since the current image block also supports encoding and prediction processing in the target partitioning mode, therefore, the second prediction cost of the target partitioning mode can also be obtained. Furthermore, when the first prediction cost indicates that the current image block uses inter-frame prediction, an encoding prediction rule in other partitioning modes is generated based on the first prediction cost and the second prediction cost. The prediction cost is data that would originally be generated during the encoding process. Generating an encoding prediction rule based on the prediction cost does not require additional analysis and processing of the current image block, which can save computational complexity. Under the corresponding encoding prediction rule, the encoding and prediction processing of the image sub-block using intra-frame prediction can be skipped and the image sub-block can be encoded and predicted using intra-frame prediction. In this way, when the current image block uses other partitioning modes, the way of encoding and predicting the image sub-block using inter-frame prediction can be retained, and when using intra-frame prediction, some or all of the intra-frame prediction modes applied to the encoding and prediction processing of the image sub-block can be omitted. Thus, the image sub-blocks obtained in other partitioning modes do not need to be encoded and predicted using all prediction modes and calculate the prediction cost, which can greatly reduce the intra-frame prediction encoding complexity, thereby reducing the overall encoding complexity, improving the encoding prediction speed, and increasing the encoding efficiency.

[0049] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of an encoding prediction method provided by the embodiment of the present application. This method can be executed by the above encoding prediction device. The encoding prediction method includes the following steps S401 - S404.

[0050] S401, obtain the current image block, and obtain the first prediction cost corresponding to the current image block when encoding and predicting without partitioning.

[0051] In one embodiment, if the current image block supports both inter - frame prediction and intra - frame prediction, it means that when the current image block is not partitioned, two major types of prediction methods, namely inter - frame prediction and intra - frame prediction, can be attempted respectively. Specifically, all inter - frame prediction modes and all intra - frame prediction modes are included for encoding and prediction processing, and the corresponding prediction costs are obtained based on the prediction results of the encoding and prediction processing. Based on this, the method for determining the first prediction cost may include: obtaining one or more intra - frame prediction modes supported when performing encoding and prediction processing using intra - frame prediction, and one or more inter - frame prediction modes when performing encoding and prediction processing using inter - frame prediction; respectively using any intra - frame prediction mode to perform encoding and prediction processing on the current image block to obtain the corresponding prediction cost, and using any inter - frame prediction mode to perform encoding and prediction processing on the current image block to obtain the corresponding prediction cost; selecting the minimum value from the obtained prediction costs, and taking the prediction cost of the minimum value as the first prediction cost when the current image block is encoded and predicted without partitioning.

[0052] Specifically, the encoding and prediction device can obtain all intra - frame prediction modes supported when performing encoding and prediction processing using intra - frame prediction. The types of intra - frame prediction modes vary slightly under different encoding standards. For example, in HEVC, there are 35 intra - frame prediction modes (including 33 angular modes, DC mode (an intra - frame prediction mode suitable for large - area flat regions), and Planar mode). In VVC, there are 67 intra - frame prediction modes (including 65 intra - frame angular prediction modes extended from the original 33 angular modes, DC mode, and Planar mode). The encoding and prediction device can also obtain all inter - frame prediction modes supported when performing encoding and prediction processing using inter - frame prediction. For example, the inter - frame prediction modes defined in HEVC include: inter mode, Skip mode, and Merge mode. During the encoding and prediction processing, any intra - frame prediction mode can be used to perform encoding and prediction processing on the current image block, and the corresponding prediction cost is calculated based on the obtained intra - frame prediction result. Also, any inter - frame prediction mode can be used to perform encoding and prediction processing on the current image block, and the corresponding prediction cost is calculated based on the obtained inter - frame prediction result. Each intra - frame prediction mode and each inter - frame prediction mode can be applied to the current image block to obtain the prediction cost corresponding to the prediction mode. For example, if there are 3 inter - frame prediction modes and 35 intra - frame prediction modes, then 38 prediction costs can be obtained, and one prediction cost corresponds to one prediction mode. It should be noted that without special instructions, the "one" and "a" described for the prediction mode and the partitioning method in this application have the same meaning.

[0053] By actually encoding each prediction mode once, the corresponding prediction cost can be obtained. The finally obtained prediction cost includes the prediction costs corresponding to each prediction mode (including the intra prediction mode and the inter prediction mode). The minimum value of the prediction costs can be selected from all the prediction costs, that is, the minimum prediction cost. Furthermore, the minimum prediction cost is used as the first prediction cost to indicate that when the current image block is encoded and predicted without partitioning, the most suitable prediction mode is the prediction mode with the minimum prediction cost.

[0054] S402, obtain the second prediction cost corresponding to the current image block when encoding and predicting using the target partitioning method.

[0055] The current image block supports encoding and predicting using the target partitioning method. In one implementation, the method for determining the second prediction cost may include: obtaining multiple reference sub-blocks obtained after partitioning the current image block using the target partitioning method, and respectively determining the minimum value of the prediction cost corresponding to each reference sub-block; taking the sum of the minimum values of the prediction costs corresponding to each reference sub-block as the second prediction cost corresponding to the current image block when encoding and predicting using the target partitioning method.

[0056] Specifically, the encoding and prediction device partitions the current image block using the target partitioning method, and at least two reference sub-blocks can be obtained. Any reference sub-block is an image sub-block for the current image block. When the reference sub-block is not partitioned, the encoding and prediction device can encode and predict each reference sub-block using the prediction modes corresponding to inter prediction and intra prediction respectively, obtain the prediction costs corresponding to each prediction mode, and then select the minimum value of the prediction costs from each prediction cost. Each reference sub-block corresponds to the minimum value of the prediction cost. By summing the minimum values of the prediction costs of all reference sub-blocks, the minimum prediction cost when the current image block is encoded and predicted using the target partitioning method can be obtained, and the minimum prediction cost is used as the second prediction cost. It should be noted that when the reference sub-block is further partitioned, the encoding and prediction process of the reference sub-block can be analogous to the encoding and prediction process of the current image block, that is, treating the reference sub-block as the current image block and implementing it using the same processing logic.

[0057] The encoding prediction device performs encoding prediction processing using intra-frame prediction or inter-frame prediction, which includes the following two parts: block partitioning and mode decision. Among them, block partitioning needs to perform recursion on the partitioning, and mode decision needs to perform an exhaustive search on the prediction modes. Without acceleration processing, the time consumed by encoding is huge. For this reason, this application can generate an encoding prediction rule based on the corresponding prediction cost, and this encoding prediction rule supports accelerating the encoding prediction process to improve the encoding efficiency. In one embodiment, generating the encoding prediction rules for each image sub-block obtained by using other partitioning methods for the current image block based on the first prediction cost and the second prediction cost may include the content introduced in S403 and S404.

[0058] S403, when the first prediction cost is less than the second prediction cost, generate the first encoding prediction rule.

[0059] The first encoding prediction rule here is a rule that does not perform partitioning processing on the corresponding image sub-blocks obtained by using other partitioning methods for the current image block, and uses inter-frame prediction to perform encoding prediction processing on each image sub-block. Among them, each image sub-block is one or more image sub-blocks obtained by using other partitioning methods for the current image block.

[0060] If the first prediction cost is less than the second prediction cost, it means that the minimum prediction cost corresponding to the current image block in the non-partitioning method is greater than the minimum prediction cost corresponding to the current image block in the target partitioning method. The prediction mode corresponding to the first prediction cost and the encoding prediction using the non-partitioning method for the current image block can obtain a better encoding prediction effect. The current best encoding method includes the non-partitioning method and the inter-frame prediction mode. Therefore, the encoding prediction device can generate an encoding prediction rule, and the specific content of this encoding prediction rule is: for the corresponding image sub-blocks obtained by using other partitioning methods for the current image block, no partitioning processing is performed, and inter-frame prediction is used to perform encoding prediction processing on each image sub-block. That is to say, when using other partitioning methods for the current image block to obtain image sub-blocks, the image sub-blocks can be not further partitioned, and for each image sub-block, all prediction modes corresponding to inter-frame prediction are used for encoding prediction processing.

[0061] It should be noted that performing inter-frame prediction on the image sub-blocks obtained under other partitioning methods here does not mean not using intra-frame prediction to perform encoding prediction on the corresponding image sub-blocks. In one implementation, to further accelerate the encoding prediction speed, it can be selected not to perform intra-frame prediction on the corresponding image sub-blocks. In another implementation, to ensure the accuracy of the prediction results in practical applications, when performing intra-frame prediction on the corresponding image sub-blocks, some intra-frame prediction modes can be selected for encoding prediction.

[0062] S404, when the first prediction cost is greater than or equal to the second prediction cost, generate the second encoding prediction rule.

[0063] The second coding prediction rule here is a rule for performing coding prediction processing on each image sub-block by using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively. Among them, each image sub-block is one or more image sub-blocks obtained by dividing the current image block in other division ways.

[0064] If the first prediction cost is greater than or equal to the second prediction cost, it indicates that the minimum prediction cost corresponding to the current image block in the target division way is less than the minimum prediction cost corresponding to the current image block in the non-division way. Then, the current best division way of the current image block is the target division way, the current image block is suitable for coding with smaller-sized sub-blocks, the image sub-blocks obtained in other division ways can be further divided, the possibility of intra-frame prediction is relatively high, and a suitable prediction mode can be selected when the sub-blocks obtained by further dividing each image sub-block are not divided. The coding prediction device can generate a coding prediction rule matching the result of cost comparison (specifically, the result of cost comparison where the second prediction cost is less than the first prediction cost) here. The specific content of this coding prediction rule is: performing coding prediction processing on each image sub-block obtained by dividing the current image block in other division ways by using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively. This coding prediction rule is similar to the coding prediction processing performed on the current image block without division. For any image sub-block obtained by dividing the current image block in other division ways, the coding prediction device can traverse all intra-frame prediction modes and all inter-frame prediction modes, and select the prediction mode with the minimum prediction cost for it based on the prediction costs corresponding to various prediction modes, so as to perform coding by using the prediction result in this prediction mode.

[0065] It can be seen that by comparing the minimum prediction cost corresponding to the current image block in a certain division way with the minimum prediction cost corresponding to the current image block in the non-division way, a coding prediction rule matching the result of cost comparison can be generated. Based on the matching with the result of cost comparison, the relevant characteristics of the current image block (such as inter-frame continuity) can be indirectly matched. Furthermore, while ensuring relatively accurate processing of the current image block, when the possibility of inter-frame prediction is much greater than the possibility of intra-frame prediction, the influence of traversing all prediction modes on the coding efficiency can be reduced as much as possible. In this way, the coding prediction rule generated with reference to the result without further division in the reference division way can support simplifying the coding process for other division ways. For example, the current image block may not perform intra-frame prediction in other division ways, thereby reducing the coding complexity.

[0066] S405, based on the coding prediction rule, skip performing coding prediction processing on the corresponding image sub-block by using intra-frame prediction, and perform coding prediction processing on the corresponding image sub-block by using inter-frame prediction.

[0067] Based on the foregoing introduction, the generated coding prediction rules vary under different cost comparison results. However, for the image sub-blocks obtained by using other partitioning methods for the current image block, and the sub-blocks obtained by subsequent partitioning of the image sub-blocks, corresponding coding prediction rules can be used for coding prediction processing. In one embodiment, when the coding prediction rule for the corresponding image sub-block is: not to perform partitioning processing on the corresponding image sub-block obtained by using other partitioning methods for the current image block, and to use inter-frame prediction for coding prediction processing, it triggers to execute skipping the coding prediction processing using intra-frame prediction for the corresponding image sub-block and performing coding prediction processing using inter-frame prediction for the corresponding image sub-block.

[0068] When the first coding prediction rule is generated under the condition that the first prediction cost is less than the second prediction cost, the specific content of the coding prediction rule is: not to perform partitioning processing on the corresponding image sub-block obtained by using other partitioning methods for the current image block, and to use inter-frame prediction for coding prediction processing. The coding prediction device can apply this coding prediction rule to the corresponding image sub-block, and in the actual coding process, it can trigger to execute skipping the coding prediction processing using intra-frame prediction for the corresponding image sub-block and performing coding prediction processing using inter-frame prediction. Among them, for the corresponding image sub-block, skipping the coding prediction processing using intra-frame prediction can be skipping some intra-frame prediction modes of intra-frame prediction for coding prediction processing, or skipping all intra-frame prediction modes of intra-frame prediction for coding prediction processing (that is, not using intra-frame prediction for coding prediction processing of the image sub-block). By skipping the coding prediction processing using intra-frame prediction, the time consumed by mode decision in coding prediction processing can be effectively reduced, thereby improving the coding prediction speed and enhancing the overall coding efficiency.

[0069] In one implementation manner, skipping the coding prediction processing using intra-frame prediction for the corresponding image sub-block and performing coding prediction processing using inter-frame prediction for the corresponding image sub-block includes the following implementation manners (1) or (2).

[0070] (1) Skipping some intra-frame prediction modes: The coding prediction device can first select some intra-frame prediction modes from one or more intra-frame prediction modes supported when performing coding prediction processing using intra-frame prediction, and obtain all inter-frame prediction modes supported when performing coding prediction processing using inter-frame prediction; then, based on the selected some intra-frame prediction modes and the obtained all inter-frame prediction modes, perform coding prediction processing on the corresponding image sub-block.

[0071] Specifically, when performing encoding prediction processing using intra prediction, one or more intra prediction modes are supported. The encoding prediction device can select a part of the intra prediction modes from all the supported intra prediction modes, and perform encoding prediction processing on the corresponding image sub-blocks based on the selected part of the intra prediction modes. Here, the encoding prediction processing is specifically intra prediction processing, and the number of the selected part of the intra prediction modes is less than the number of all the intra prediction modes supported by the encoding prediction processing. For example, 20 intra prediction modes (i.e., the selected part of the intra prediction modes) can be selected from 65 intra prediction modes, and intra prediction processing is performed on the image sub-blocks based on these 20 intra prediction modes. When performing encoding processing using inter prediction, one or more inter prediction modes are also supported. The encoding prediction device can obtain all the inter prediction modes, and perform encoding prediction processing on the corresponding image sub-blocks based on all these inter prediction modes. Here, the encoding prediction processing is specifically inter prediction processing. For any image sub-block of the current image block under other partitioning methods, all the inter prediction modes and the selected part of the intra prediction modes can be traversed to perform encoding prediction processing on the image sub-blocks. In this way, the unselected part of the intra prediction modes can be skipped. By skipping the selected part of the intra prediction modes corresponding to intra prediction, the encoding prediction can be performed more concisely. Retaining the selected part of the intra prediction modes for encoding prediction covers a wider comparison range, and thus a more suitable intra prediction mode can be determined for the current image block, making the final encoding result more accurate. At the same time, the proportion of the intra prediction complexity in the entire encoding process complexity can be effectively reduced, thereby reducing the encoding time and saving the computational resource overhead.

[0072] In one way, the selection rule of the selected part of the intra prediction modes can be: obtaining the encoded image blocks encoded using intra encoding and the encoding modes used by the encoded image blocks when using intra encoding. The encoding modes used by the encoded image blocks are determined from one or more intra prediction modes supported during encoding prediction processing; based on the encoding modes used by different encoded image blocks when using intra encoding, determining the selection probability of any intra prediction mode, and selecting the selected part of the intra prediction modes based on the selection probability.

[0073] An encoded image block is an image block that has been encoded between current image blocks. Intra-frame encoding (or inter-frame encoding) refers to an encoding method that performs encoding prediction using an intra-frame prediction mode (or inter-frame prediction mode) and performs encoding processing based on the results of the encoding prediction. Since an image block supports both intra-frame prediction and inter-frame prediction, among all the encoded image blocks in a frame of an image, there are encoded image blocks using inter-frame encoding, encoded image blocks using intra-frame encoding, and encoded image blocks using a combination of inter-frame encoding and intra-frame encoding. Moreover, each image block also corresponds to an encoding mode during encoding. To determine the intra-frame prediction mode used for reference by an image sub-block, the encoding prediction device can statistically calculate the selection probability of each intra-frame prediction mode based on the intra-frame prediction mode used by the encoded image block, and select some intra-frame prediction modes based on the selection probability for the image sub-block to use during the encoding prediction process.

[0074] Specifically, the coding prediction device can first obtain the coding mode used when an encoded image block encoded using intra-frame coding is subjected to intra-frame coding. This coding mode is an intra-frame prediction mode, and can be specifically determined from one or more intra-frame prediction modes supported by the coding prediction process based on the prediction cost. Performing coding prediction processing using the determined intra-frame prediction mode can obtain the corresponding minimum prediction cost. The obtained encoded image blocks encoded using intra-frame coding include at least two, and the coding modes used by different encoded image blocks may be the same intra-frame prediction mode or different intra-frame prediction modes. For example, the obtained encoded image blocks encoded using intra-frame coding include P1, P2, and P3, where the coding modes used by P1 and P2 are both intra-frame prediction mode A1, and the coding mode used by P3 is intra-frame prediction mode A2. From the perspective of each intra-frame prediction mode, any intra-frame prediction mode may be used multiple times (i.e., applied to different encoded image blocks). Thus, based on the coding modes used by different encoded image blocks when using intra-frame coding, the usage times of any intra-frame prediction mode can be determined, and then the selection probability of any intra-frame prediction mode can be determined based on the usage times. This selection probability can be the ratio between the number of times the intra-frame prediction mode is used and the total number of times all intra-frame prediction modes are used, and is used to describe the probability that an encoded image block encoded using intra-frame coding uses a certain intra-frame prediction mode. The larger the selection probability, the higher the frequency of use of the intra-frame prediction mode in each encoded image block. For example, if 5 encoded image blocks all use intra-frame prediction mode A1, then intra-frame prediction mode A1 is used 5 times, and the total number of times all intra-frame prediction modes are used by each encoded image block encoded using intra-frame coding is 50. Then, it can be determined that the selection probability of intra-frame prediction mode A1 is 5 / 50, that is, 0.1. Each intra-frame prediction mode has a selection probability, and then some intra-frame prediction modes can be selected based on the selection probabilities of each intra-frame prediction mode. In one implementation, the selection probabilities can be sorted from largest to smallest, and each intra-frame prediction mode corresponding to the top preset number of selection probabilities can be determined as some intra-frame prediction modes. In another implementation, the intra-frame prediction modes with selection probabilities greater than a preset probability threshold can be determined as an intra-frame prediction mode included in some intra-frame prediction modes. It can be seen that by statistically analyzing the selection probabilities of each intra-frame prediction mode for the encoded image blocks encoded using intra-frame coding, the usage situation of each intra-frame prediction mode by the encoded image blocks can be determined. Referring to the usage situation of each intra-frame prediction mode in the coding prediction process of the encoded image blocks, the spatial correlation between the encoded image blocks and the current image block can be fully utilized to realize the determined selection of some intra-frame prediction modes. Referring to the intra-frame prediction modes with higher usage frequencies can ensure the accuracy of the coding prediction process when performing intra-frame prediction on the image sub-blocks of the current image block under other partitioning methods.

[0075] (2) Skip all intra prediction modes: Obtain all inter prediction modes supported during encoding prediction processing using inter prediction, and mask all intra prediction modes supported during encoding prediction processing using intra prediction; perform encoding prediction processing on the corresponding image sub-blocks based on the obtained all inter prediction modes.

[0076] The encoding prediction device can obtain all inter prediction modes and apply each inter prediction mode to the image sub-blocks for encoding prediction processing respectively. For all intra prediction modes, a masking method can be adopted so that the image sub-blocks obtained under other partitioning methods of the current image block do not use intra prediction for encoding prediction. By masking all intra prediction modes, each image sub-block does not need to traverse all prediction modes of intra prediction, but only uses inter prediction modes for encoding prediction. Compared with skipping some intra prediction modes, this method can greatly reduce the time required for encoding prediction processing of the image sub-blocks and achieve efficient encoding of the current image block.

[0077] It should be noted that for the subsequent partitioning processing of the image sub-blocks obtained under other partitioning methods, some intra prediction modes or all intra prediction modes can also be skipped, so that the image sub-blocks under various partitioning methods can speed up the encoding prediction processing and thus accelerate the encoding process.

[0078] In summary, in the encoding prediction method provided by this application, after the current image block attempts non-partitioning and a partitioning method of partitioning into several sub-blocks, the obtained reference sub-blocks are not further partitioned. And through the comparison result of the prediction cost ratio between the non-partitioning method and the corresponding prediction cost under the target partitioning method, it is determined that the current best processing method is the non-partitioning method and the current best prediction mode is the inter prediction mode. Then, an encoding prediction rule including encoding prediction processing that skips intra prediction can be generated. When encoding prediction is performed on the current image block using other partitioning methods, the image sub-blocks obtained under other partitioning methods and the further partitioning of the image sub-blocks can both apply this encoding prediction rule to skip the encoding of some or all intra prediction modes, and do not need to perform encoding prediction on some or all prediction modes corresponding to intra prediction for the current image block. Furthermore, the encoding prediction processing under other partitioning methods is made more simple and fast, which can effectively save the time required for encoding prediction and improve the encoding efficiency.

[0079] Please refer to Figure 5 , Figure 5 which is a schematic flowchart of an encoding prediction method provided by an embodiment of this application. This method can be executed by the above encoding prediction device. This encoding prediction method includes the following steps S501 - S504.

[0080] S501. Obtain a target processing block. The target processing block is the current image block that adopts the non - division method, or any image sub - block obtained by dividing the current image block using a corresponding division method. The corresponding division method is any division method for dividing the current image block into image sub - blocks, such as any one of the various division methods shown above Figure 3a shown.

[0081] S502. Obtain the intra - prediction flag of the target processing block and set the intra - prediction flag to a target value.

[0082] The encoding and prediction device can obtain the intra - prediction flag of the target processing block. The intra - prediction flag is used to indicate whether intra - prediction is supported for the target processing block, specifically for multiple prediction modes corresponding to intra - prediction. To better monitor the availability of each prediction mode corresponding to intra - prediction during the encoding and prediction process, the intra - prediction flag can be first set to a target value. The intra - prediction flag with the target value is used to indicate: supporting encoding and prediction processing of the target processing block using multiple prediction modes corresponding to intra - prediction.

[0083] When the target processing block is the current image block that adopts the non - division method, the intra - prediction flag of the current image block can be obtained and the value of the intra - prediction flag is set to the target value. In this way, when encoding and predicting the current image block using the non - division method, based on the indication of the value of the intra - prediction flag, the encoding and prediction device can perform encoding and prediction processing on the current image block using multiple intra - prediction modes. When the target processing block is an image sub - block obtained by dividing the current image block using the target division method, the intra - prediction flag of the image sub - block can be obtained and the value of the intra - prediction flag is set to the target value, so that multiple prediction modes of intra - prediction can be used for encoding and prediction processing of the image sub - block obtained by division in the target division method.

[0084] In one implementation, after encoding and predicting the current image block using the non - division method, the encoding and prediction device can set the obtained intra - prediction flag to the target value. By obtaining the intra - prediction flag with the target value, it can be indicated that: supporting encoding and prediction processing of the image sub - blocks obtained by any candidate division method for the current image block using multiple prediction modes corresponding to intra - prediction. The intra - prediction flag can be understood as a generalized concept applicable to the image sub - blocks under each candidate division method, and can also be used to indicate whether it supports encoding and prediction processing of the sub - blocks obtained by subsequent division of the image sub - blocks using multiple prediction modes corresponding to intra - prediction.

[0085] In one embodiment, both the target partitioning method and other partitioning methods are determined from at least two candidate partitioning methods supported by the current image block. Any candidate partitioning method is a method of partitioning the current image block into at least two image sub-blocks. The target partitioning method and other partitioning methods can be randomly determined from each candidate partitioning method, or can be determined according to the corresponding selection order. Before generating the corresponding coding prediction rules, the intra-prediction flag can be used to monitor whether the prediction mode corresponding to intra-prediction can be used for coding prediction of the image sub-blocks under each partitioning method and the further partitioned image sub-blocks. For specific details, reference can be made to the content of S503 - S505 below.

[0086] S503. Determine whether there is a partitioning method among the candidate partitioning methods supported by the current image block that has not been selected for coding prediction processing.

[0087] Since the current image block supports at least two candidate partitioning methods, when the coding prediction device performs coding prediction on the current image block, it can sequentially select a candidate partitioning method from each candidate partitioning method to partition the current image block into at least two image sub-blocks, and perform coding prediction on each image sub-block using the prediction modes corresponding to intra-prediction and inter-prediction respectively when not further partitioning. In one implementation, an order of selection can be set for each candidate partitioning method. The candidate partitioning method with the first selection order can be used as the target partitioning method, and the remaining candidate partitioning methods can be used as other partitioning methods. To traverse all candidate partitioning methods, the coding prediction device can determine whether there is a candidate partitioning method that has not been selected for coding prediction, that is, there are still candidate partitioning methods waiting for coding prediction. In one implementation, when a candidate method is selected for coding prediction of the current image block, a usage identifier can be set for this candidate partitioning method to indicate that this candidate partitioning method has been applied to the current image block for coding prediction. Then, based on the usage identifiers of each candidate partitioning method, the candidate partitioning methods that have not been selected for coding prediction can be determined.

[0088] If there is no partitioning method that has not been selected for coding prediction, it means that each candidate partitioning method has been selected and applied to the current image block for coding prediction. Then the coding prediction device can stop the coding prediction processing of the current image block. Since the coding prediction of the current image block under various candidate partitioning methods corresponds to a prediction cost, the coding result corresponding to the current image block can be obtained by performing coding processing on the current image block based on the prediction block obtained from the coding prediction under the candidate partitioning method with the minimum prediction cost. If there is a partitioning method that has been selected for coding prediction, the following S504 can be executed.

[0089] S504, if it exists, determine whether there is a partitioning method that has been selected for encoding prediction processing among the candidate partitioning methods supported by the current image block, and obtain the value of the intra prediction flag corresponding to the target processing block after partitioning the current image block using the current partitioning method.

[0090] If there is a partitioning method that has not been selected for encoding prediction among the candidate partitioning methods supported by the current image block, it means that there are partitioning methods that the current image block has not used among the candidate partitioning methods. To compare each partitioning method more comprehensively and generate an encoding prediction rule that better conforms to the characteristics of the current image block, before selecting a candidate partitioning method to perform encoding prediction on the current image block, it can be determined whether there is a partitioning method that has been selected for encoding prediction processing among the candidate partitioning methods, that is, whether a candidate partitioning method has been selected for encoding prediction before the current partitioning method (i.e., the currently selected candidate partitioning method). For example, the candidate partitioning methods include partitioning method a, partitioning method b, partitioning method c, and partitioning method d. After any partitioning method is selected, when this step is executed for the remaining partitioning methods, it can be determined that there is a partitioning method that has been selected for encoding prediction. In addition, before performing encoding prediction on the target processing block obtained by using the current partitioning method for the current image block, the encoding prediction device can obtain the value of the intra prediction flag and determine whether to skip the encoding prediction processing of intra prediction for the target processing block under the current partitioning method based on the value of the intra prediction flag.

[0091] S505, if it exists and the value of the intra prediction flag corresponding to the corresponding target processing block is the target value, generate an encoding prediction rule that matches the target value, so as to skip the encoding prediction processing of intra prediction for the corresponding image sub-block based on the generated encoding prediction rule that matches the target value.

[0092] Specifically, if there is a partitioning method that has been selected for encoding prediction processing among the candidate partitioning methods supported by the current image block, it means that at least one candidate partitioning method among the candidate partitioning methods before the current partitioning method has been applied to the current image block for encoding prediction. When the encoding prediction device has performed encoding prediction on the current image block using the non-partitioning method and a candidate partitioning method, and then selects another candidate partitioning method to perform encoding prediction on the current image block, the specific encoding prediction rule for the current partitioning method can be determined based on the comparison of the prediction costs obtained by performing encoding prediction in the two methods.

[0093] When the value of the intra prediction flag corresponding to the target processing block is the target value, it indicates that the target processing block in the current partitioning method can be encoded and predicted using the prediction mode corresponding to intra prediction. Specifically, based on the first prediction cost and the second prediction cost, an encoding prediction rule matching the target value can be generated. Then, when encoding and predicting the corresponding image sub-block based on this encoding prediction rule, all or part of the prediction modes originally supported by intra prediction can be skipped, thereby reducing the encoding complexity.

[0094] In one embodiment, generating an encoding prediction rule matching the target value includes: generating an encoding prediction rule for not partitioning the corresponding image sub-block of the current image block and encoding and predicting each image sub-block obtained by partitioning the current image block using inter prediction; adjusting the value of the intra prediction flag corresponding to the corresponding target processing block to a reference value; wherein, the processing block corresponding to the intra prediction flag obtaining the reference value does not support encoding and predicting using the prediction mode of intra prediction, so as to skip encoding and predicting the corresponding processing block using intra prediction.

[0095] When the value of the intra prediction flag is the target value, it indicates that when the current image block adopts the candidate partitioning method, multiple prediction modes supported by intra prediction are available. Then, when the first prediction cost is less than the second prediction cost, the following encoding prediction rule can be generated: not partitioning the image sub-block and encoding and predicting each image sub-block using inter prediction. Next, the value of the intra prediction flag can be adjusted to the reference value, specifically by adjusting the target value to the reference value, so that the target processing block obtained by partitioning the current image block in the current partitioning method can be encoded and predicted according to the generated encoding prediction rule. It can be seen that the intra prediction flag obtaining the target value and the intra prediction flag obtaining the reference value have different indications for the corresponding processing block. For example, the target value is 1 and the reference value is 0. When the value of the intra prediction flag is 1, it indicates that the image sub-block obtained by the current image block in the candidate partitioning method can use the prediction mode of intra prediction. When the value of the intra prediction flag is 0, it indicates that the image sub-block of the current image block in the candidate partitioning method cannot use the prediction mode of intra prediction. It can be understood that under this encoding prediction rule, each image sub-block can skip part or all of the prediction modes corresponding to intra prediction to reduce the complexity of encoding prediction, and further reduce the overall encoding complexity. For the processing blocks obtained by other partitioning methods of the current image block, since the corresponding intra prediction flag is the intra prediction flag obtaining the reference value, each processing block will not support encoding and predicting using the prediction mode of intra prediction. Therefore, in the actual encoding and prediction process, the encoding and prediction device can skip encoding and predicting each processing block using intra prediction, greatly improving the encoding speed.

[0096] It should be noted that if there is no partitioning method selected for encoding prediction processing among the candidate partitioning methods supported by the current image block, it indicates that the encoding prediction device has not adopted any candidate partitioning method for encoding prediction processing of the current image block at the current moment. Then, the target partitioning method can be used to partition the current image block. And based on the indication of the intra prediction flag, multiple prediction modes corresponding to intra prediction can be used to perform encoding prediction processing on the image sub-blocks in the target partitioning method, and multiple prediction modes corresponding to inter prediction can be used to perform encoding prediction processing on the image sub-blocks in the target partitioning method.

[0097] For the above content, for example, taking the current coding unit CU as an example for illustrative purposes, specifically, reference can be made to Figure 6The corresponding process schematic diagram. Among them, assume that the current coding unit is the current image block. The current image block is first encoded and predicted using the non-partitioning method. Before traversing various candidate partitioning methods, the flag indicating that intra prediction can be used for sub-partitioning is set to 1 (i.e., the intra prediction flag is set to the target value). At this time, the intra prediction flag is used to indicate that the image sub-blocks obtained by partitioning the current image block using the candidate partitioning methods can be encoded and predicted using intra prediction. For each candidate partitioning method, the encoding and prediction device will sequentially traverse to select the corresponding candidate partitioning method for encoding and prediction. The encoding and prediction device can first determine whether there is still a partitioning method to be encoded, that is, whether there is still a candidate partitioning method that has not been applied to the current image block for encoding and prediction processing. After selecting a candidate partitioning method, before performing encoding and prediction using this candidate partitioning method, it can first determine whether the partitioning method that has encoded the current image block into image sub-blocks and the value of the intra prediction flag have been determined. If the partitioning method that can be divided into sub-blocks has been encoded and the value of the intra prediction flag is the target value, then when it is determined that the current best encoding is the non-partitioning method and the inter prediction mode based on the first prediction cost and the second prediction cost, the generated encoding and prediction rule is to use the non-partitioning method for the image sub-blocks and perform encoding and prediction using the inter prediction, and then adjust the value of the intra prediction flag to the reference value, so that when the target processing block obtained under the current partitioning method is encoded and predicted, the prediction mode corresponding to intra prediction can be skipped based on the indication of this intra prediction flag. If the partitioning method that has not encoded the current image block into image sub-blocks, then when encoding and predicting the current image block using the current partitioning method (i.e., the currently selected candidate partitioning method), based on the indication of the value of the intra prediction flag, the encoding and prediction processing includes performing encoding and prediction processing using each prediction mode of intra prediction. Since in the subsequent processing process, the value of the intra prediction flag can be adjusted accordingly, the value of the intra prediction flag may not be the target value. For example, if 1 is adjusted to 0, then if a partitioning method is selected again for encoding and prediction, and at this time the value of the intra prediction flag is not the target value, then when encoding and predicting the current image block using the current partitioning method (i.e., the currently selected candidate partitioning method), based on the indication of the value of the intra prediction flag, the encoding and prediction processing using each prediction mode of intra prediction can be skipped. In addition, if it is determined that the best encoding is the partitioning method or the inter prediction mode based on the prediction cost, then when encoding and predicting the current image block using the current partitioning method, the prediction modes corresponding to intra prediction and inter prediction can be used for encoding and prediction processing respectively. Optionally, for the image sub-blocks obtained by the current partitioning method, when continuing to partition using the partitioning method, the partitioning method of the best encoding of the current image block can be preferentially selected as the target partitioning method of the image sub-blocks, so that when encoding and predicting the image sub-blocks using the non-partitioning method and the target partitioning method, the probability of accelerating the encoding processing speed can be increased.

[0098] In one embodiment, based on the coding prediction rule, the intra prediction for encoding and predicting the corresponding image sub-block is skipped, and the inter prediction is used to perform the encoding and prediction processing on the corresponding image sub-block, including: when the coding prediction rule is not to perform partitioning processing on the corresponding image sub-block obtained by other partitioning methods of the current image block and uses the inter prediction for encoding and prediction processing, the corresponding encoding and prediction processing can be triggered to execute through one or a combination of the following two methods (1) and (2). The above coding prediction rule is that when the first prediction cost is less than the second prediction cost, it can be determined that the current optimal processing method is the non-partitioning method, and the optimal prediction mode in the non-partitioning method is the inter prediction mode.

[0099] (1) Obtain the image size and the limit size of the corresponding image sub-block; when the image size is greater than or equal to the limit size, trigger the execution of skipping the intra prediction for encoding and predicting the corresponding image sub-block, and perform the inter prediction for encoding and predicting the corresponding image sub-block.

[0100] To more accurately apply the above coding prediction rule, the image size and the limit size of the corresponding image sub-block can be obtained. The limit size is a preset larger image size. When the image size is greater than or equal to the limit size, it indicates that the size of the image sub-block is large, and usually, the inter prediction is mostly used for the image sub-block with a large size. Therefore, the coding and prediction processing matching the coding prediction rule can be triggered to execute. Conversely, when the image size of the image sub-block is less than the limit size, it indicates that the size of the image sub-block is small, and the possibility of performing intra prediction on the image sub-block with a small size is relatively large. Therefore, the coding and prediction processing can be performed on the corresponding image sub-block using multiple prediction modes corresponding to intra prediction and inter prediction respectively. For example, if the number of pixels of the image sub-block CU is less than the number limit of 1024, it means that the size of the image sub-block is small. To ensure a more accurate coding and prediction result, when performing coding and prediction on this image sub-block, the multiple prediction modes of intra prediction are not skipped, but all intra prediction modes and all inter prediction modes are traversed for coding and prediction processing, and then the prediction mode corresponding to the minimum prediction cost is determined based on the prediction cost obtained from the coding and prediction processing. Conversely, when the image size of the image sub-block is greater than the limit size, considering the rule that the inter prediction mode is usually used for a large image size, some or all of the prediction modes corresponding to intra prediction can be skipped for coding and prediction processing, and the inter prediction is used to perform the coding and prediction processing on the image sub-block.

[0101] It can be seen that by adding corresponding size limits to each image sub-block, the coding prediction rule can be combined to more accurately trigger the execution of skipping the intra prediction for coding and prediction processing from multiple dimensions, so that the coding complexity can be reduced while the coding effect is improved.

[0102] (2) Obtain the target inter-frame prediction mode adopted by the current image block in the non-partitioning mode; when the target inter-frame prediction mode is the specified inter-frame prediction mode, trigger to skip the intra-frame prediction encoding prediction process for the corresponding image sub-block and perform the inter-frame prediction encoding prediction process on the corresponding image sub-block.

[0103] Here, the target inter-frame prediction mode is an inter-frame prediction mode corresponding to the first prediction cost. In order to apply the above encoding prediction rules to image blocks with stronger inter-frame continuity, when the target inter-frame prediction mode is the specified inter-frame prediction mode, such as the Skip mode of inter-frame prediction, trigger to skip the intra-frame prediction when encoding and predicting the image sub-blocks obtained by other partitioning methods of the current image block, thereby reducing the encoding complexity. It can be seen that by further restricting the inter-frame prediction mode, the application of the above encoding prediction rules can also be made more accurate, thereby ensuring the accuracy of encoding prediction.

[0104] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of an encoding prediction device provided by an embodiment of the present application. The above encoding prediction device can be a computer program (including program code) running in an encoding prediction device. For example, the encoding prediction device is an application software; the encoding prediction device can be used to execute the corresponding steps in the encoding prediction method provided by an embodiment of the present application. As Figure 7 shown, the encoding prediction device 700 may include: an acquisition module 701, a generation module 702, and an encoding prediction module 703.

[0105] The acquisition module 701 is used to acquire the current image block and acquire the first prediction cost corresponding to the current image block when performing encoding prediction processing in the non-partitioning mode; the first prediction cost is the minimum value among the prediction costs obtained by performing encoding prediction processing using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively; the current image block also supports performing encoding prediction processing using the target partitioning mode;

[0106] The acquisition module 701 is further used to acquire the second prediction cost corresponding to the current image block when performing encoding prediction processing in the target partitioning mode;

[0107] The generation module 702 is used to generate encoding prediction rules for each image sub-block obtained by other partitioning methods of the current image block based on the first prediction cost and the second prediction cost when the first prediction cost is the prediction cost obtained by performing encoding prediction processing using inter-frame prediction;

[0108] The encoding prediction module 703 is used to skip the intra-frame prediction encoding prediction process for the corresponding image sub-block and perform the inter-frame prediction encoding prediction process on the corresponding image sub-block based on the encoding prediction rules.

[0109] In one embodiment, the generation module 702 is specifically configured to: when the first prediction cost is less than the second prediction cost, generate a first coding prediction rule, where the first coding prediction rule is a rule that does not perform division processing on the corresponding image sub-blocks obtained by other division methods for the current image block, and performs coding prediction processing on each image sub-block obtained by other division methods for the current image block using inter-frame prediction; when the first prediction cost is greater than or equal to the second prediction cost, generate a second coding prediction rule, where the second coding prediction rule is a rule that performs coding prediction processing on each image sub-block using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively, where each image sub-block is one or more image sub-blocks obtained by other division methods for the current image block.

[0110] In one embodiment, the coding prediction module 703 is specifically configured to: when the coding prediction rule for the corresponding image sub-block is a rule that does not perform division processing on the corresponding image sub-block obtained by other division methods for the current image block and performs coding prediction processing using inter-frame prediction, trigger to execute skipping coding prediction processing of the corresponding image sub-block using intra-frame prediction and performing coding prediction processing of the corresponding image sub-block using inter-frame prediction.

[0111] In one embodiment, the coding prediction module 703 is specifically configured to: select some intra-frame prediction modes from one or more intra-frame prediction modes supported when performing coding prediction processing using intra-frame prediction, and obtain all inter-frame prediction modes supported when performing coding prediction processing using inter-frame prediction; perform coding prediction processing on the corresponding image sub-blocks based on the selected some intra-frame prediction modes and the obtained all inter-frame prediction modes.

[0112] In one embodiment, the coding prediction module 703 is specifically configured to: obtain all inter-frame prediction modes supported when performing coding prediction processing using inter-frame prediction, and mask all intra-frame prediction modes supported when performing coding prediction processing using intra-frame prediction; perform coding prediction processing on the corresponding image sub-blocks based on the obtained all inter-frame prediction modes.

[0113] In one embodiment, the coding prediction module 703 is specifically configured to: obtain the encoded image blocks encoded using intra-frame coding and the coding modes used by the encoded image blocks when performing intra-frame coding; the coding modes used by the encoded image blocks are determined from one or more intra-frame prediction modes supported during coding prediction processing; determine the selection probability of any intra-frame prediction mode based on the coding modes used by different encoded image blocks when performing intra-frame coding, and select some intra-frame prediction modes based on the selection probability.

[0114] In one embodiment, the obtaining module 701 is further configured to: obtain a target processing block, where the target processing block is a current image block that adopts a non-division method, or any image sub-block obtained by dividing the current image block by using a corresponding division method; obtain an intra prediction flag of the target processing block, and set the intra prediction flag to a target value; where the intra prediction flag with the obtained target value is used to indicate that encoding prediction processing is supported for the target processing block by using multiple prediction modes corresponding to intra prediction.

[0115] In one embodiment, both the target division method and other division methods are determined from at least two candidate division methods supported by the current image block; the generating module 702 is further configured to: determine whether there is a division method that has not been selected for encoding prediction processing among the candidate division methods supported by the current image block; if so, determine whether there is a division method that has been selected for encoding prediction processing among the candidate division methods supported by the current image block, and obtain the value of the intra prediction flag corresponding to the target processing block obtained by dividing the current image block by using the current division method; if there is and the value of the intra prediction flag corresponding to the corresponding target processing block is the target value, generate an encoding prediction rule matching the target value, so as to skip encoding prediction processing of the corresponding image sub-block by using intra prediction based on the generated encoding prediction rule matching the target value.

[0116] In one embodiment, the generating module 702 is specifically configured to: generate an encoding prediction rule for not dividing the corresponding image sub-block of the current image block and performing encoding prediction processing on each image sub-block obtained by dividing the current image block by using inter prediction; adjust the value of the intra prediction flag corresponding to the corresponding target processing block to a reference value; where the processing block corresponding to the intra prediction flag with the obtained reference value does not support encoding prediction processing by using the prediction mode of intra prediction, so as to skip encoding prediction processing of the corresponding processing block by using intra prediction.

[0117] In one embodiment, the encoding prediction module 703 is configured to: when the encoding prediction rule is an encoding prediction rule for not dividing the corresponding image sub-block obtained by using other division methods for the current image block and performing encoding prediction processing by using inter prediction, obtain the image size and the limit size of the corresponding image sub-block; when the image size is greater than or equal to the limit size, trigger the execution of skipping encoding prediction processing of the corresponding image sub-block by using intra prediction and performing encoding prediction processing of the corresponding image sub-block by using inter prediction.

[0118] In one embodiment, the encoding prediction module 703 is configured to: when the encoding prediction rule is not to perform partitioning processing on the corresponding image sub-blocks obtained by using other partitioning methods for the current image block, and to perform encoding prediction processing by using inter-frame prediction, obtain the target inter-frame prediction mode adopted by the current image block in the non-partitioning method; when the target inter-frame prediction mode is a specified inter-frame prediction mode, trigger to skip performing encoding prediction processing on the corresponding image sub-block by using intra-frame prediction, and perform encoding prediction processing on the corresponding image sub-block by using inter-frame prediction.

[0119] In one embodiment, if the current image block is an image block that supports inter-frame prediction and intra-frame prediction; the obtaining module 701 is specifically configured to: obtain one or more intra-frame prediction modes supported when performing encoding prediction processing by using intra-frame prediction, and one or more inter-frame prediction modes when performing encoding prediction processing by using inter-frame prediction; perform encoding prediction processing on the current image block by using any one of the intra-frame prediction modes respectively to obtain the corresponding prediction cost, and perform encoding prediction processing on the current image block by using any one of the inter-frame prediction modes respectively to obtain the corresponding prediction cost; select the minimum value from the obtained prediction costs, and use the prediction cost of the minimum value as the first prediction cost of the current image block when performing encoding prediction processing by using the non-partitioning method.

[0120] In one embodiment, the obtaining module 701 is specifically configured to: obtain a plurality of reference sub-blocks obtained after the current image block is partitioned by using the target partitioning method, and respectively determine the minimum value of the prediction cost corresponding to each reference sub-block; use the sum of the minimum values of the prediction costs corresponding to each reference sub-block as the second prediction cost corresponding to the current image block when performing encoding prediction processing by using the target partitioning method.

[0121] It can be understood that the functions of the respective functional modules of the encoding prediction device described in the embodiments of the present application can be specifically implemented according to the methods in the above method embodiments, and the specific implementation process can refer to the relevant descriptions of the above method embodiments, which will not be elaborated here. In addition, the description of the beneficial effects of using the same method will not be elaborated either.

[0122] Please refer to Figure 8 , Figure 8It is a schematic structural diagram of an encoding prediction device provided by an embodiment of the present application. The encoding prediction device 800 may include a stand-alone device (such as one or more of a node, a terminal, etc.), or may include components inside a stand-alone device (such as a chip, a software module, or a hardware module, etc.). The encoding prediction device 800 may include at least one processor 801 and a network interface 802. Further optionally, the encoding prediction device 800 may further include at least one memory 803 and a bus 804. Among them, the processor 801, the network interface 802, and the memory 803 are connected through the bus 804.

[0123] Among them, the processor 801 is a module for performing arithmetic operations and / or logical operations, and may specifically be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor unit (MPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a complex programmable logic device (CPLD), a coprocessor (assisting the central processing unit to complete corresponding processing and applications), a microcontroller unit (MCU), or a combination of one or more of such processing modules.

[0124] The network interface 802 may be used to provide information input or output for at least one processor. And / or, the network interface 802 may be used to receive data sent externally and / or send data to the outside, and may be a wired link interface including, for example, an Ethernet cable, or may also be a wireless link (Wi-Fi, Bluetooth, general wireless transmission, vehicle short-range communication technology, and other short-range wireless communication technologies, etc.) interface. The network interface 802 may serve as a network interface.

[0125] The memory 803 is used to provide storage space, in which data such as an operating system and computer programs can be stored. The memory 803 can be one or a combination of multiple types, such as random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or compact disc read-only memory (CD-ROM), etc.

[0126] At least one processor 801 in the encoding and prediction device 800 is used to call the computer program stored in at least one memory 803 and execute the encoding and prediction method described in the embodiments shown in this application.

[0127] In a possible implementation manner, the processor 801 in the encoding and prediction device 800 is used to call the computer program stored in at least one memory 803 and perform the following operations: obtain a current image block, and obtain a first prediction cost corresponding to the current image block when encoding and prediction processing is performed in a non-partitioned manner; the first prediction cost is the minimum value among the prediction costs obtained by performing encoding and prediction processing using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively; the current image block also supports encoding and prediction processing using a target partitioning method; obtain a second prediction cost corresponding to the current image block when encoding and prediction processing is performed using the target partitioning method; when the first prediction cost is the prediction cost obtained by performing encoding and prediction processing using inter-frame prediction, generate an encoding and prediction rule for each image sub-block obtained by partitioning the current image block using other partitioning methods based on the first prediction cost and the second prediction cost; based on the encoding and prediction rule, skip performing encoding and prediction processing on the corresponding image sub-block using intra-frame prediction, and perform encoding and prediction processing on the corresponding image sub-block using inter-frame prediction.

[0128] In an embodiment, the processor 801 is specifically configured to: when the first prediction cost is less than the second prediction cost, generate a first encoding and prediction rule, where the first encoding and prediction rule is a rule for not performing partitioning processing on the corresponding image sub-blocks obtained by partitioning the current image block using other partitioning methods and performing encoding and prediction processing on each image sub-block obtained by partitioning the current image block using other partitioning methods using inter-frame prediction; when the first prediction cost is greater than or equal to the second prediction cost, generate a second encoding and prediction rule, where the second encoding and prediction rule is a rule for performing encoding and prediction processing on each image sub-block obtained by partitioning the current image block using other partitioning methods using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively, where each image sub-block is one or more image sub-blocks obtained by partitioning the current image block using other partitioning methods.

[0129] In one embodiment, the processor 801 is specifically configured to: when the encoding prediction rule of the corresponding image sub-block is that no division processing is performed on the corresponding image sub-block obtained by other division methods of the current image block, and the inter-frame prediction is used for encoding prediction processing, trigger to execute skipping the encoding prediction processing of the corresponding image sub-block using intra-frame prediction, and perform encoding prediction processing on the corresponding image sub-block using inter-frame prediction.

[0130] In one embodiment, the processor 801 is specifically configured to: select some intra-frame prediction modes from one or more intra-frame prediction modes supported when performing encoding prediction processing using intra-frame prediction, and obtain all inter-frame prediction modes supported when performing encoding prediction processing using inter-frame prediction; based on the selected some intra-frame prediction modes and the obtained all inter-frame prediction modes, perform encoding prediction processing on the corresponding image sub-block.

[0131] In one embodiment, the processor 801 is specifically configured to: obtain all inter-frame prediction modes supported when performing encoding prediction processing using inter-frame prediction, and mask all intra-frame prediction modes supported when performing encoding prediction processing using intra-frame prediction; based on the obtained all inter-frame prediction modes, perform encoding prediction processing on the corresponding image sub-block.

[0132] In one embodiment, the processor 801 is specifically configured to: obtain the encoded image block encoded using intra-frame encoding and the encoding mode used by the encoded image block when performing intra-frame encoding; the encoding mode used by the encoded image block is determined from one or more intra-frame prediction modes supported during encoding prediction processing; based on the encoding modes used by different encoded image blocks when performing intra-frame encoding, determine the selection probability of any intra-frame prediction mode, and select some intra-frame prediction modes based on the selection probability.

[0133] In one embodiment, the processor 801 is further configured to: obtain a target processing block, where the target processing block is the current image block that has not been divided, or any image sub-block obtained by dividing the current image block using a corresponding division method; obtain the intra-frame prediction flag bit of the target processing block, and set the intra-frame prediction flag bit to a target value; where the intra-frame prediction flag bit with the target value is used to indicate that multiple prediction modes corresponding to intra-frame prediction are supported for encoding prediction processing of the target processing block.

[0134] In one embodiment, both the target partitioning method and other partitioning methods are determined from at least two candidate partitioning methods supported by the current image block; the processor 801 is further configured to: determine whether there is a partitioning method that has not been selected for encoding prediction processing among the candidate partitioning methods supported by the current image block; if so, determine whether there is a partitioning method that has been selected for encoding prediction processing among the candidate partitioning methods supported by the current image block, and obtain the value of the intra prediction flag corresponding to the target processing block after partitioning the current image block using the current partitioning method; if there is and the value of the intra prediction flag corresponding to the corresponding target processing block is the target value, generate an encoding prediction rule matching the target value, so as to skip the encoding prediction processing using intra prediction for the corresponding image sub-block based on the generated encoding prediction rule matching the target value.

[0135] In one embodiment, the processor 801 is specifically configured to: generate an encoding prediction rule for not partitioning the corresponding image sub-block of the current image block and performing encoding prediction processing on each image sub-block obtained by partitioning the current image block using inter prediction; adjust the value of the intra prediction flag corresponding to the corresponding target processing block to a reference value; wherein, the processing block corresponding to the intra prediction flag obtaining the reference value does not support encoding prediction processing using the prediction mode of intra prediction, so as to skip the encoding prediction processing using intra prediction for the corresponding processing block.

[0136] In one embodiment, the processor 801 is configured to: when the encoding prediction rule is an encoding prediction rule for not partitioning the corresponding image sub-block obtained by using other partitioning methods for the current image block and performing encoding prediction processing using inter prediction, obtain the image size and the limit size of the corresponding image sub-block; when the image size is greater than or equal to the limit size, trigger the execution of skipping the encoding prediction processing using intra prediction for the corresponding image sub-block and performing encoding prediction processing using inter prediction on the corresponding image sub-block.

[0137] In one embodiment, the processor 801 is configured to: when the encoding prediction rule is an encoding prediction rule for not partitioning the corresponding image sub-block obtained by using other partitioning methods for the current image block and performing encoding prediction processing using inter prediction, obtain the target inter prediction mode used by the current image block in the non-partitioning method; when the target inter prediction mode is a specified inter prediction mode, trigger the execution of skipping the encoding prediction processing using intra prediction for the corresponding image sub-block and performing encoding prediction processing using inter prediction on the corresponding image sub-block.

[0138] In one embodiment, if the current image block supports both inter-frame prediction and intra-frame prediction; the processor 801 is specifically configured to: obtain one or more intra-frame prediction modes supported during encoding prediction processing using intra-frame prediction, and one or more inter-frame prediction modes during encoding prediction processing using inter-frame prediction; perform encoding prediction processing on the current image block using any one of the intra-frame prediction modes to obtain corresponding prediction costs, and perform encoding prediction processing on the current image block using any one of the inter-frame prediction modes to obtain corresponding prediction costs; select the minimum value from the obtained prediction costs, and use the prediction cost of the minimum value as the first prediction cost of the current image block during encoding prediction processing without using a partitioning method.

[0139] In one embodiment, the processor 801 is specifically configured to: obtain a plurality of reference sub-blocks obtained after partitioning the current image block using a target partitioning method, and respectively determine the minimum value of the prediction cost corresponding to each reference sub-block; use the sum of the minimum values of the prediction costs corresponding to each reference sub-block as the second prediction cost corresponding to the current image block during encoding prediction processing using the target partitioning method.

[0140] It should be understood that the encoding prediction device 800 described in the embodiments of the present application can execute the description of the encoding prediction method in the corresponding previous embodiments, and can also execute the description of the encoding prediction device 700 in the corresponding previous Figure 7 embodiments, which will not be elaborated here. In addition, the description of the beneficial effects of using the same method will not be elaborated either.

[0141] In addition, it should be noted that an exemplary embodiment of the present application also provides a storage medium, in which a computer program for the foregoing encoding prediction method is stored. The computer program includes program instructions. When one or more processors load and execute the program instructions, the description of the encoding prediction method in the embodiments can be implemented, which will not be elaborated here, and the description of the beneficial effects of using the same method will not be elaborated here either. It can be understood that the program instructions can be deployed on one or multiple encoding prediction devices that can communicate with each other for execution.

[0142] The above computer-readable storage medium may be the encoding prediction device provided in any of the foregoing embodiments or the internal storage unit of the above encoding prediction device, such as the hard disk or memory of the encoding prediction device. The computer-readable storage medium may also be an external storage device of the encoding prediction device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. provided on the encoding prediction device. Further, the computer-readable storage medium may also include both the internal storage unit and the external storage device of the encoding prediction device. The computer-readable storage medium is used to store the computer program and other programs and data required by the encoding prediction device. The computer-readable storage medium may also be used to temporarily store the data that has been output or is to be output.

[0143] In one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the encoding prediction device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the encoding prediction device executes the method provided in one aspect of the embodiments of the present application.

[0144] The steps in the method of the embodiments of the present application may be adjusted, combined, and deleted according to actual needs.

[0145] The modules in the device of the embodiments of the present application may be combined, divided, and deleted according to actual needs.

[0146] The foregoing disclosure is only part of the embodiments of the present application. Of course, it cannot be used to limit the scope of the rights of the present application. Those of ordinary skill in the art can understand all or part of the processes of implementing the above embodiments, and the equivalent changes made according to the claims of the present application still fall within the scope covered by the invention.

Claims

1. A coding prediction method, characterized in that, The method includes: Obtain a current image block, and obtain a first prediction cost corresponding to the current image block when encoding and predicting the current image block without division; the first prediction cost is the minimum value among the prediction costs obtained by encoding and predicting the current image block using multiple prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively; Obtain a second prediction cost corresponding to the current image block when encoding and predicting the current image block using a target division method; When the first prediction cost is the prediction cost obtained by encoding and predicting the current image block using inter-frame prediction, generate encoding and prediction rules for each image sub-block obtained by dividing the current image block using other division methods based on the first prediction cost and the second prediction cost; Based on the encoding and prediction rules, skip encoding and predicting the corresponding image sub-block using intra-frame prediction, and perform encoding and predicting the corresponding image sub-block using inter-frame prediction.

2. The method according to claim 1, wherein The generating encoding and prediction rules for each image sub-block obtained by dividing the current image block using other division methods based on the first prediction cost and the second prediction cost includes: When the first prediction cost is less than the second prediction cost, generate a first encoding and prediction rule, where the first encoding and prediction rule is a rule of not dividing the corresponding image sub-block and performing encoding and predicting each image sub-block using inter-frame prediction; When the first prediction cost is greater than or equal to the second prediction cost, generate a second encoding and prediction rule, where the second encoding and prediction rule is a rule of performing encoding and predicting each image sub-block using multiple prediction modes corresponding to the intra-frame prediction and the inter-frame prediction respectively; where each image sub-block is one or more image sub-blocks obtained by dividing the current image block using other division methods.

3. The method according to claim 1, wherein The skipping encoding and predicting the corresponding image sub-block using intra-frame prediction and performing encoding and predicting the corresponding image sub-block using inter-frame prediction based on the encoding and prediction rules includes: When the encoding and prediction rule for the corresponding image sub-block is: a rule of not dividing the corresponding image sub-block obtained by dividing the current image block using other division methods and performing encoding and predicting using inter-frame prediction, trigger to execute skipping encoding and predicting the corresponding image sub-block using intra-frame prediction and performing encoding and predicting the corresponding image sub-block using inter-frame prediction.

4. The method according to claim 1 or 3, characterized in that The skipping encoding and predicting the corresponding image sub-block using intra-frame prediction and performing encoding and predicting the corresponding image sub-block using inter-frame prediction includes: Select a part of the intra-frame prediction modes supported when encoding and predicting using intra-frame prediction, and obtain all the inter-frame prediction modes supported when encoding and predicting using inter-frame prediction; based on the selected part of the intra-frame prediction modes and the obtained all the inter-frame prediction modes, perform encoding and predicting the corresponding image sub-block; or, Obtain all the inter-frame prediction modes supported during encoding prediction processing using inter-frame prediction, and mask all the intra-frame prediction modes supported during encoding prediction processing using intra-frame prediction; perform encoding prediction processing on the corresponding image sub-blocks based on the obtained all inter-frame prediction modes.

5. The method according to claim 4, wherein Selecting some intra-frame prediction modes from one or more intra-frame prediction modes supported during encoding prediction processing using intra-frame prediction includes: Obtain the encoded image block encoded using intra-frame encoding and the encoding mode used by the encoded image block during the intra-frame encoding; the encoding mode used by the encoded image block is determined from one or more intra-frame prediction modes supported during encoding prediction processing. Based on the encoding modes used by different encoded image blocks during the intra-frame encoding, determine the selection probability of any intra-frame prediction mode, and select some intra-frame prediction modes based on the selection probability.

6. The method according to claim 1, wherein The method further includes: Obtain a target processing block, where the target processing block is the current image block that adopts the non-division method, or any image sub-block obtained by dividing the current image block using the corresponding division method. Obtain the intra-frame prediction flag of the target processing block, and set the intra-frame prediction flag to a target value; where the intra-frame prediction flag with the target value is used to indicate that encoding prediction processing using multiple prediction modes corresponding to intra-frame prediction for the target processing block is supported.

7. The method according to claim 1 or 6, characterized in that, Both the target division method and the other division method are determined from at least two candidate division methods supported by the current image block; the method further includes: Determine whether there is a division method among the candidate division methods supported by the current image block that has not been selected for encoding prediction processing. If there is, determine whether there is a division method among the candidate division methods supported by the current image block that has been selected for encoding prediction processing, and obtain the value of the intra-frame prediction flag corresponding to the target processing block obtained by dividing the current image block using the current division method. If there is and the value of the intra-frame prediction flag corresponding to the corresponding target processing block is the target value, generate an encoding prediction rule matching the target value, so as to skip encoding prediction processing using intra-frame prediction for the corresponding image sub-block based on the generated encoding prediction rule matching the target value.

8. The method according to claim 7, characterized in that, The generating of the encoding prediction rule matching the target value includes: Generate an encoding prediction rule for not dividing the corresponding image sub-block of the current image block and performing encoding prediction processing on each image sub-block obtained by dividing the current image block using inter-frame prediction. Adjust the value of the intra-frame prediction flag corresponding to the corresponding target processing block to a reference value; where the processing block corresponding to the intra-frame prediction flag with the reference value does not support encoding prediction processing using the prediction mode of intra-frame prediction, so as to skip encoding prediction processing using intra-frame prediction for the corresponding processing block.

9. The method according to claim 1, wherein Based on the encoding prediction rule, skipping encoding prediction processing using intra-frame prediction for the corresponding image sub-block and performing encoding prediction processing using inter-frame prediction on the corresponding image sub-block includes: When the encoding prediction rule is not to perform partitioning processing on the corresponding image sub-blocks obtained by not using other partitioning methods for the current image block, and to perform encoding prediction processing using inter-frame prediction, obtain the image size and the limit size of the corresponding image sub-blocks; When the image size is greater than or equal to the limit size, trigger to skip performing encoding prediction processing using intra-frame prediction on the corresponding image sub-blocks, and perform encoding prediction processing using inter-frame prediction on the corresponding image sub-blocks.

10. The method according to claim 1, characterized in that, Based on the encoding prediction rule, skipping performing encoding prediction processing using intra-frame prediction on the corresponding image sub-blocks and performing encoding prediction processing using inter-frame prediction on the corresponding image sub-blocks includes: When the encoding prediction rule is not to perform partitioning processing on the corresponding image sub-blocks obtained by not using other partitioning methods for the current image block, and to perform encoding prediction processing using inter-frame prediction, obtain the target inter-frame prediction mode adopted by the current image block in the non-partitioning method; When the target inter-frame prediction mode is the specified inter-frame prediction mode, trigger to skip performing encoding prediction processing using intra-frame prediction on the corresponding image sub-blocks, and perform encoding prediction processing using inter-frame prediction on the corresponding image sub-blocks.

11. The method according to claim 1, characterized in that, If the current image block is an image block that supports both inter-frame prediction and intra-frame prediction; then obtaining the first prediction cost of the current image block when performing encoding prediction processing in the non-partitioning method includes: Obtain one or more intra-frame prediction modes supported when performing encoding prediction processing using intra-frame prediction, and one or more inter-frame prediction modes when performing encoding prediction processing using inter-frame prediction; Perform encoding prediction processing on the current image block using any one of the intra-frame prediction modes respectively to obtain the corresponding prediction cost, and perform encoding prediction processing on the current image block using any one of the inter-frame prediction modes respectively to obtain the corresponding prediction cost; Select the minimum value of the obtained prediction costs, and use the prediction cost of the minimum value as the first prediction cost of the current image block when performing encoding prediction processing in the non-partitioning method.

12. The method according to claim 1, wherein Obtaining the second prediction cost corresponding to the current image block when performing encoding prediction processing using the target partitioning method includes: Obtain a plurality of reference sub-blocks obtained after partitioning the current image block using the target partitioning method, and respectively determine the minimum value of the prediction cost corresponding to each reference sub-block; Use the sum of the minimum values of the prediction costs corresponding to each reference sub-block as the second prediction cost corresponding to the current image block when performing encoding prediction processing using the target partitioning method.

13. An encoding prediction device, characterized in that, Includes: An acquisition module, configured to acquire a current image block, and acquire the first prediction cost corresponding to the current image block when performing encoding prediction processing in the non-partitioning method; The first prediction cost is the minimum value of the prediction costs obtained by performing encoding prediction processing using a plurality of prediction modes corresponding to intra-frame prediction and inter-frame prediction respectively; The acquisition module is further configured to acquire the second prediction cost corresponding to the current image block when performing encoding prediction processing using the target partitioning method; A generation module, configured to generate encoding prediction rules for each image sub-block obtained by dividing the current image block in other ways based on the first prediction cost and the second prediction cost when the first prediction cost is the prediction cost obtained by performing encoding prediction processing using inter-frame prediction. An encoding prediction module, configured to skip performing encoding prediction processing on the corresponding image sub-block using intra-frame prediction and perform encoding prediction processing on the corresponding image sub-block using inter-frame prediction based on the encoding prediction rules.

14. A coding prediction device, characterized in that, Comprising: A processor, a memory, and a network interface; The processor is connected to the memory and the network interface. The network interface is configured to provide network communication functions, the memory is configured to store program codes, and the processor is configured to call the program codes to execute the encoding prediction method according to any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program. The computer program includes program instructions that, when executed by the processor, execute the encoding prediction method according to any one of claims 1-12.

Citation Information

Patent Citations

  • Fast coding method in video coding

    CN110351552A

  • Coding unit processing method and device, electronic equipment and storage medium

    CN111988607A