Prediction Unit (PU) Mode Selection Method and Apparatus, Electronic Equipment and Storage Media
The PU mode selection method in HEVC uses SATD cost to reduce computational complexity and improve encoding speed by preliminarily selecting candidate PU modes, ensuring efficient video coding.
Patent Information
- Application Number
- TW114111748
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2024-04-01
- Filing Date
- 2025-03-27
- Publication Date
- 2026-07-11
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The computational complexity of determining the optimal prediction unit (PU) mode in High Efficiency Video Coding (HEVC) due to traversing all coding parameters using rate-distortion optimization (RDO) affects video coding speed and power consumption, making it unsuitable for low-latency and high-frame-rate applications.
A PU mode selection method that uses Sum of Absolute Transformed Differences (SATD) cost to preliminarily select candidate PU modes with lower computational complexity, followed by rate-distortion cost calculation to determine the target PU mode, including PU partitioning, TU partitioning, and PU prediction modes.
This method reduces computational complexity while maintaining coding quality by quickly filtering candidate PU modes, improving encoding speed and efficiency.
Smart Images

Figure IMG-2_DRAW_114111748-A0101-14-0001-1 
Figure IMG-2_DRAW_114111748-A0101-14-0001-2 
Figure IMG-2_DRAW_114111748-A0101-14-0002-3
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and apparatus for selecting a prediction unit (PU) mode, an electronic device, and a storage medium. Prior Technology
[0002] High Efficiency Video Coding (HEVC) has become the mainstream video coding standard, with increasing adoption in film and television production, video communication, and broadcasting. Among current mainstream technologies, rate-distortion optimization (RDBEM) is the primary means of achieving optimal coding performance. However, because HEVC's prediction unit (PU) layer includes various PU partitioning methods, transformation unit (TU) methods, and PU prediction modes, determining the optimal PU mode by traversing all coding parameters of the PU layer based on RDBEM is computationally complex and impacts video coding speed. Summary of the Invention
[0003] This disclosure presents a technical solution for a prediction unit (PU) mode selection method and apparatus, electronic device, and storage medium.
[0004] According to one aspect of this disclosure, a PU mode selection method is provided, comprising: the method being applied to HEVC, the method comprising: for a current CU in HEVC, selecting multiple PU partitioning methods using SATD cost to determine candidate PU modes corresponding to the current CU, wherein each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode; selecting the candidate PU modes using rate-distortion cost to determine a target PU mode corresponding to the current CU, wherein the target PU mode includes a corresponding PU partitioning method, a TU partitioning method, and a PU prediction mode.
[0005] In one possible implementation, the step of selecting multiple PU partitioning methods using SATD cost to determine a candidate PU mode for the current HEVC CU includes: selecting multiple non-2N×2N PU partitioning methods using SATD cost to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU; selecting the candidate PU partitioning method using SATD cost and bitrate cost to determine the candidate PU mode, wherein the candidate PU partitioning method includes a 2N×2N PU partitioning method and the non-2N×2N candidate PU partitioning method.
[0006] In one possible implementation, the step of selecting a non-2N×2N PU partitioning method using SATD cost to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU includes: for any non-2N×2N PU partitioning method, partitioning the current CU based on the non-2N×2N PU partitioning method to obtain multiple PUs under the non-2N×2N PU partitioning method; determining the SATD cost corresponding to the non-2N×2N PU partitioning method based on the multiple PUs under the non-2N×2N PU partitioning method; and determining the non-2N×2N PU partitioning method with the minimum SATD cost as the non-2N×2N candidate PU partitioning method based on the SATD cost corresponding to each non-2N×2N PU partitioning method.
[0007] In one possible implementation, determining the SATD cost corresponding to the non-2N×2N PU partitioning method based on multiple PUs under the non-2N×2N PU partitioning method includes: for any PU under the non-2N×2N PU partitioning method, determining the predicted pixel block corresponding to the PU based on the motion estimation method; determining the SATD cost corresponding to the PU based on the residual pixel block between the original pixel block and the predicted pixel block corresponding to the PU; and summing the SATD costs corresponding to each PU under the non-2N×2N PU partitioning method to determine the SATD cost corresponding to the non-2N×2N PU partitioning method.
[0008] In one possible implementation, selecting the candidate PU partitioning method using SATD cost and bitrate cost to determine the candidate PU mode includes: partitioning the current CU based on the candidate PU partitioning method to obtain at least one PU under the candidate PU partitioning method; setting different PU prediction modes for each PU under the candidate PU partitioning method to obtain multiple PU modes corresponding to the candidate PU partitioning method, wherein the different PU prediction modes include: inter-frame PU prediction mode and intra-frame PU prediction mode; for any PU mode, determining the sum of costs corresponding to the PU mode based on the PU prediction mode corresponding to each PU under the PU mode, using SATD cost and bitrate cost; and determining the candidate PU mode based on the sum of costs corresponding to each PU mode.
[0009] In one possible implementation, the step of determining the sum of costs corresponding to the PU mode for any given PU mode, based on the PU prediction mode corresponding to each PU in the PU mode, using SATD cost and bitrate cost, includes: for any PU in the PU mode, determining the motion vector and predicted pixel block corresponding to the PU based on the PU prediction mode corresponding to the PU; determining the SATD cost corresponding to the PU based on the residual pixel block between the original pixel block and the predicted pixel block corresponding to the PU; determining the bitrate cost corresponding to the PU based on the motion vector and the residual pixel block corresponding to the PU; and summing the SATD cost and bitrate cost corresponding to each PU in the PU mode to determine the sum of costs corresponding to the PU mode.
[0010] In one possible implementation, the inter-frame PU prediction mode includes: AMVP mode and Merge mode; the intra-frame PU prediction mode includes: a first candidate intra-frame PU prediction mode and a second candidate intra-frame PU prediction mode; setting different PU prediction modes for each PU under the candidate PU partitioning method to obtain multiple PU modes corresponding to the candidate PU partitioning method includes: when the candidate PU partitioning method is the 2N×2N PU partitioning method, setting AMVP mode and Merge mode for one PU under the 2N×2N PU partitioning method respectively to obtain two first PU modes corresponding to the 2N×2N PU partitioning method; when the candidate PU partitioning method is the 2N×2N PU partitioning method, setting a first candidate intra-frame PU prediction mode and a second candidate intra-frame PU prediction mode for one PU under the 2N×2N PU partitioning method respectively to obtain the 2N×2N PU partitioning method. Two second PU modes corresponding to the PU partitioning method; when the candidate PU partitioning method is the non-2N×2N candidate PU partitioning method, AMVP mode and Merge mode are set for each PU under the non-2N×2N candidate PU partitioning method to obtain at least four third PU modes corresponding to the non-2N×2N candidate PU partitioning method.
[0011] In one possible implementation, determining the candidate PU mode based on the sum of costs corresponding to each PU mode includes: selecting the PU mode with the smallest sum of costs from the at least four third PU modes as the first selected PU mode; selecting the PU mode with the smallest sum of costs from the two first PU modes and the first selected PU mode as one of the candidate PU modes, and selecting the PU mode with the second smallest sum of costs as the second selected PU mode; selecting the PU mode with the smallest sum of costs from the two second PU modes as the third selected PU mode; and selecting the PU mode with the smallest sum of costs from the second selected PU mode and the third selected PU mode as one of the candidate PU modes.
[0012] In one possible implementation, the selection of candidate PU modes based on rate-distortion cost to determine a target PU mode corresponding to the current CU includes: determining the rate-distortion cost of each candidate PU mode under different TU partitioning methods based on the PU partitioning method and PU prediction mode corresponding to each candidate PU mode; and determining the target PU mode based on the candidate PU mode with the minimum rate-distortion cost and the corresponding TU partitioning method.
[0013] According to one aspect of this disclosure, a PU mode selection device is provided, the device being applied to HEVC, the device comprising: a first selection module, configured to select from multiple PU partitioning methods using SATD cost for a current CU in HEVC, and determine a candidate PU mode corresponding to the current CU, wherein each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode; and a second selection module, configured to select from the candidate PU modes using rate distortion cost, and determine a target PU mode corresponding to the current CU, wherein the target PU mode includes a corresponding PU partitioning method, a TU partitioning method, and a PU prediction mode.
[0014] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the above-described method.
[0015] According to one aspect of this disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the above-described method.
[0016] In this embodiment of the disclosure, for the current HEVC CU, multiple PU partitioning methods are selected using SATD cost to determine the candidate PU mode corresponding to the current CU. Each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode. Compared with the method of performing rate-distortion cost calculation for each PU partitioning method, which has high computational complexity, preliminary selection using SATD cost with low computational complexity can quickly filter candidate PU modes based on multiple PU partitioning methods. This allows the final target PU mode corresponding to the current CU to be quickly determined by only performing rate-distortion cost calculation on the candidate PU modes. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode. Since the target PU mode is still calculated using rate-distortion cost in the end, it can be ensured that the coding quality is not affected while effectively reducing computational complexity.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Simple Explanation of the Diagram
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure. Figure 1 shows a flowchart of a PU mode selection method according to an embodiment of the present disclosure. Figure 2 shows a block diagram of a PU mode selection device according to an embodiment of the present disclosure. Figure 3 shows a block diagram of an electronic device according to an embodiment of the present disclosure. Implementation
[0019] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0020] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0021] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0022] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0023] HEVC employs a hybrid coding framework, using intra-frame and inter-frame prediction to eliminate temporal and spatial redundancy in video frames, discrete cosine transform and quantization techniques to eliminate frequency redundancy in residual pixels, and arithmetic coding to compress syntax elements. The main purpose of video coding is to minimize the bitrate while maintaining a certain video quality, or to minimize coding distortion under moving bitrate constraints. Within a fixed coding framework, to cope with different video content, there are often multiple candidate coding methods. A primary task of the encoder is to select the optimal coding parameters using a certain strategy to achieve optimal coding performance.
[0024] In current mainstream technologies, rate-distortion optimization (RDE) techniques, which optimize coding parameters based on rate-distortion theory, are the primary means of achieving optimal coding performance. REE methods in HEVC encoders include REE optimization for video picture groups, slice layers, coding tree unit (CTU) layers, coding unit (CU) layers, and PU layers.
[0025] In HEVC, rate-distortion optimization of the PU layer is performed by traversing all coding parameters. The optimal PU mode is selected by calculating the rate-distortion cost of all PU modes. PU modes include: PU partitioning scheme and PU prediction scheme. Inter-frame PU partitioning schemes include: 2N×2N, N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N; intra-frame PU partitioning schemes include: 2N×2N and N×N. Within each PU partitioning scheme, the inter-frame PU prediction schemes available include: Advanced Motion Vector Prediction (AMVP) mode and Merge mode; the intra-frame PU prediction schemes available include 35 intra-frame PU prediction schemes, all of which require rate-distortion cost calculation for selection. When calculating the rate distortion cost for each PU mode, it is necessary to try different TU partitioning methods and select the TU partitioning with the minimum rate distortion cost. Therefore, the optimal PU mode includes the optimal PU partitioning method, the optimal TU partitioning method, and the optimal PU prediction mode.
[0026] The method of determining the optimal PU mode for the CU based on rate-distortion optimization requires iterating through each PU mode for rate-distortion optimization and selecting the PU mode with the lowest rate-distortion cost as the optimal PU mode for the CU. Since the calculation of rate-distortion cost requires a series of calculations such as transform, quantization, inverse quantization, inverse transform, and bitrate estimation, this rate-distortion optimization-based traversal method severely affects the encoding speed and introduces excessively high power consumption in hardware video coding, making it unsuitable for low-latency coding and high-frame-rate coding applications.
[0027] To address the aforementioned technical problems, this disclosure provides a PU mode selection method that effectively reduces the computational complexity of selecting the optimal PU mode for the current CU, thereby improving the encoding speed of the current CU. The PU mode selection method provided by this disclosure is described in detail below.
[0028] Figure 1 shows a flowchart of a PU mode selection method according to an embodiment of the present disclosure. This method is applied to HEVC and can be executed by an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. This method can be implemented by a processor calling computer-readable instructions stored in memory. Alternatively, the method can be executed by a server. As shown in Figure 1, the method includes: In step S11, for the current HEVC CU, multiple PU partitioning methods are selected using the Sum of Absolute Transformed Differences (SATD) cost to determine the candidate PU mode corresponding to the current CU. Each candidate PU mode includes the corresponding PU partitioning method and PU prediction mode.
[0029] The various PU partitioning methods here include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, nR×2N, and 2N×2N.
[0030] SATD cost is a cost function used to measure the quality of an image or signal. In video coding and image processing, SATD cost is commonly used to evaluate the magnitude of prediction error in the frequency domain, and is derived by calculating the sum of the absolute differences between the original signal and the predicted signal. SATD cost is widely used in video coding and image processing to measure the quality of images or signals. Compared to rate-distortion cost, SATD cost has lower computational complexity.
[0031] By performing preliminary selection using the SATD cost, which has low computational complexity, the candidate PU mode with the lowest cost can be quickly screened from multiple PU partitioning methods. Each candidate PU mode includes the corresponding PU partitioning method and PU prediction mode.
[0032] The number of candidate PU modes is greater than or equal to two, and less than the total number of PU modes currently supported by the CU. The fewer the number of candidate PU modes, the lower the complexity of subsequent execution rate distortion cost calculation; however, the more candidate PU modes, the higher the accuracy of the target PU mode determined after subsequent execution rate distortion cost calculation. In practical application scenarios, the number of candidate PU modes can be flexibly set considering both computational complexity and accuracy requirements, and this disclosure does not impose a specific limitation on it.
[0033] The following sections will describe in detail the specific process of selecting multiple PU partitioning methods using SATD cost to determine the candidate PU mode corresponding to the current CU, based on the possible implementation methods of this disclosure. These details will not be elaborated here.
[0034] In step S12, the candidate PU mode is selected using rate distortion cost to determine a target PU mode corresponding to the current CU. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode.
[0035] Since the preliminary screening has been completed and a small number of candidate PU modes have been quickly selected based on multiple PU partitioning methods, further screening can be performed based on the rate-distortion cost, which has a higher computational complexity, so as to select the optimal target PU mode for the current CU, so that the current CU can be encoded based on the target PU mode in the future.
[0036] The following sections will describe in detail the specific process of selecting a target PU mode corresponding to the current CU based on the utilization distortion cost, in conjunction with the possible implementation methods of this disclosure. These details will not be elaborated here.
[0037] In this embodiment of the disclosure, for the current HEVC CU, multiple PU partitioning methods are selected using SATD cost to determine the candidate PU mode corresponding to the current CU. Each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode. Compared with the method of performing rate-distortion cost calculation for each PU partitioning method, which has high computational complexity, preliminary selection using SATD cost with low computational complexity can quickly filter candidate PU modes based on multiple PU partitioning methods. This allows the final target PU mode corresponding to the current CU to be quickly determined by only performing rate-distortion cost calculation on the candidate PU modes. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode. Since the target PU mode is still calculated using rate-distortion cost in the end, it can be ensured that the coding quality is not affected while effectively reducing computational complexity.
[0038] In one possible implementation, for the current HEVC CU, multiple PU partitioning methods are selected using SATD cost to determine candidate PU modes. This includes: selecting multiple non-2N×2N PU partitioning methods using SATD cost to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU; and selecting candidate PU partitioning methods using SATD cost and bitrate cost to determine candidate PU modes. The candidate PU partitioning methods include 2N×2N PU partitioning methods and non-2N×2N candidate PU partitioning methods.
[0039] The various non-2N×2N PU partitioning methods here include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N.
[0040] The initial selection is performed using the SATD cost, which has low computational complexity. The non-2N×2N PU partitioning method with the lowest cost is quickly selected from multiple non-2N×2N PU partitioning methods and selected as the non-2N×2N candidate PU partitioning method.
[0041] Bitrate cost refers to the price paid in video encoding to reduce the compression ratio of image data. Bitrate is a metric for data compression efficiency; the lower the bitrate, the higher the compression ratio, but the greater the loss of image quality. Compared to rate-distortion cost, bitrate cost has lower computational complexity.
[0042] Further selection is made using the SATD cost and bitrate cost, which have relatively low computational complexity, to quickly screen out the PU prediction mode with the lowest cost for 2N×2N PU partitioning and / or non-2N×2N candidate PU partitioning, thus obtaining candidate PU modes.
[0043] In one example, the process of selecting a non-2N×2N candidate PU partitioning scheme from multiple non-2N×2N PU partitioning schemes using SATD cost to determine the non-2N×2N candidate PU partitioning scheme corresponding to the current CU can be considered as the first stage of mode selection. The process of selecting a candidate PU partitioning scheme from candidate PU partitioning schemes using SATD cost and bitrate cost to determine the candidate PU mode can be considered as the second stage of mode selection. The process of selecting a target PU mode corresponding to the current CU using utilization distortion cost can be considered as the third stage of mode selection. Each stage of mode selection is performed by an independent software program or hardware module.
[0044] Hardware pipelining is a technique that accelerates instruction execution by dividing the computer instruction process into multiple steps and executing them in parallel by multiple hardware processing units. It breaks down an instruction into multiple steps, which are then executed simultaneously on different hardware processing units, thus achieving parallel instruction processing. In hardware pipelining, each processing unit performs only one specific task. These processing units can work in parallel, ensuring that new instructions are processed every clock cycle. This approach can significantly improve the execution speed and efficiency of a computer.
[0045] Since each stage of mode selection is performed using an independent software program or hardware module, this phased mode selection method is beneficial for hardware pipeline implementation. For example, after the current CU completes the first stage mode selection, it can enter the second stage mode selection. At this point, the next CU can start the first stage mode selection without waiting for the current CU to complete the third stage mode selection to determine the final target PU mode. This effectively improves the efficiency of each CU in determining the target PU mode, thereby improving coding efficiency.
[0046] In one possible implementation, the SATD cost is used to select from multiple non-2N×2N PU partitioning methods to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU. This includes: for any non-2N×2N PU partitioning method, partitioning the current CU based on the non-2N×2N PU partitioning method to obtain multiple PUs under the non-2N×2N PU partitioning method; determining the SATD cost corresponding to the non-2N×2N PU partitioning method based on the multiple PUs under the non-2N×2N PU partitioning method; and determining the non-2N×2N PU partitioning method with the minimum SATD cost based on the SATD cost corresponding to each non-2N×2N PU partitioning method.
[0047] When performing the first-stage mode selection using SATD cost, the SATD cost corresponding to each non-2N×2N PU partitioning method is determined. The smaller the SATD cost, the smaller the prediction error. Therefore, the non-2N×2N PU partitioning method with the smallest SATD cost is determined as the non-2N×2N candidate PU partitioning method selected in the first-stage mode selection.
[0048] In one possible implementation, based on multiple PUs under a non-2N×2N PU partitioning method, the SATD cost corresponding to the non-2N×2N PU partitioning method is determined, including: for any PU under the non-2N×2N PU partitioning method, determining the predicted pixel block corresponding to the PU based on the motion estimation method; determining the SATD cost corresponding to the PU based on the residual pixel block between the original pixel block and the predicted pixel block corresponding to the PU; and summing the SATD costs corresponding to each PU under the non-2N×2N PU partitioning method to determine the SATD cost corresponding to the non-2N×2N PU partitioning method.
[0049] In the first-stage mode selection, the prediction mode of the PU can be disregarded. Instead, the predicted pixel block corresponding to each PU can be determined based on motion estimation, thereby determining the SATD cost of each PU and reducing the computational complexity of the first-stage mode selection.
[0050] For any non-2N×2N PU partitioning method, the current CU is partitioned based on this non-2N×2N PU partitioning method to obtain multiple PUs under this non-2N×2N PU partitioning method. For example, partitioning the current CU for other non-2N×2N PU partitioning methods (excluding N×N PU partitioning) can result in 2 PUs; partitioning the current CU for N×N PU partitioning can result in 4 PUs.
[0051] For any given PU, the predicted pixel block corresponding to the PU is determined based on motion estimation. The original pixel block and the predicted pixel block corresponding to the PU are subtracted to obtain the residual pixel block corresponding to the PU. The SATD cost is calculated for the residual pixel block corresponding to the PU to obtain the SATD cost corresponding to the PU. The SATD cost calculation process can refer to relevant technologies, and this disclosure does not specifically limit it.
[0052] For any non-2N×2N PU partitioning method, the sum of the SATD costs corresponding to each PU under the non-2N×2N PU partitioning method is taken as the SATD cost corresponding to the non-2N×2N PU partitioning method.
[0053] After determining the non-2N×2N PU partitioning method with the lowest SATD cost as the non-2N×2N candidate PU partitioning method selected in the first phase mode selection, the second phase mode selection can be performed on the current CU.
[0054] In one possible implementation, the candidate PU partitioning method is selected using SATD cost and bitrate cost to determine the candidate PU mode. This includes: partitioning the previous CUs based on the candidate PU partitioning method to obtain at least one PU under the candidate PU partitioning method; setting different PU prediction modes for each PU under the candidate PU partitioning method to obtain multiple PU modes corresponding to the candidate PU partitioning method, wherein the different PU prediction modes include: inter-frame PU prediction mode and intra-frame PU prediction mode; for any PU mode, based on the PU prediction mode corresponding to each PU under that PU mode, using SATD cost and bitrate cost to determine the sum of costs corresponding to that PU mode; and determining the candidate PU mode based on the sum of costs corresponding to each PU mode.
[0055] When executing the second-stage mode using SATD cost and bitrate cost, both intra-frame PU prediction mode and intra-frame PU prediction mode are considered simultaneously to meet the needs of different video coding scenarios such as inter-frame coding and intra-frame coding, and to determine the optimal candidate PU mode for the current CU.
[0056] In one possible implementation, the inter-frame PU prediction modes include: AMVP mode and Merge mode; the intra-frame PU prediction modes include: a first candidate intra-frame PU prediction mode and a second candidate intra-frame PU prediction mode; different PU prediction modes are set for each PU under the candidate PU partitioning method to obtain multiple PU modes corresponding to the candidate PU partitioning method, including: when the candidate PU partitioning method is a 2N×2N PU partitioning method, setting the AMVP mode and Merge mode for one PU under the 2N×2N PU partitioning method to obtain two first PU modes corresponding to the 2N×2N PU partitioning method; when the candidate PU partitioning method is a 2N×2N PU partitioning method, setting the first candidate intra-frame PU prediction mode and the second candidate intra-frame PU prediction mode for one PU under the 2N×2N PU partitioning method to obtain 2N×2N Two second PU modes corresponding to the PU partitioning method; when the candidate PU partitioning method is not a 2N×2N candidate PU partitioning method, set the AMVP mode and Merge mode for each PU under the non-2N×2N candidate PU partitioning method to obtain at least four third PU modes corresponding to the non-2N×2N candidate PU partitioning method.
[0057] The first candidate intra-frame PU prediction mode and the second candidate intra-frame PU prediction mode can be two selected from 35 intra-frame PU prediction modes according to preset requirements. The specific selection process is not limited in this disclosure.
[0058] By comprehensively considering inter-frame PU prediction modes (AMVP mode and Merge mode) and intra-frame PU prediction modes (first candidate intra-frame PU prediction mode and second candidate intra-frame PU prediction mode), each PU under different candidate PU partitioning methods can be set with a different PU prediction mode, resulting in multiple PU modes. Each PU mode includes the corresponding PU partitioning method and PU prediction mode.
[0059] When the candidate PU partitioning method is 2N×2N, the current CU corresponds to only one PU. The PU prediction modes that can be selected for this PU include: AMVP mode and Merge mode. At this time, two first PU modes are obtained. First PU mode A: 2N×2N PU partitioning method and AMVP mode; First PU mode B: 2N×2N PU partitioning method and Merge mode.
[0060] When the candidate PU partitioning method is 2N×2N, the current CU corresponds to only one PU. The PU prediction modes that can be selected for this PU include: the first candidate intra-frame PU prediction mode and the second candidate intra-frame PU prediction mode. In this case, two second PU modes are obtained. Second PU mode C: 2N×2N PU partitioning method and first candidate intra-frame PU prediction mode; Second PU mode D: 2N×2N PU partitioning method and second candidate intra-frame PU prediction mode.
[0061] When the candidate PU partitioning method is not 2N×2N and is a non-2N×2N PU partitioning method other than N×N PU partitioning, the current CU is divided into 2 PUs. The PU prediction modes that can be selected for each PU include: AMVP mode and Merge mode. In this case, four (2 2) third PU modes are obtained. For example, if the candidate PU partitioning method is 2N×N and the current CU is divided into two PUs: PU1 and PU2, then the third PU modes are: E: 2N×N PU partitioning method, PU1 corresponds to AMVP mode, and PU2 corresponds to AMVP mode; F: 2N×N PU partitioning method, PU1 corresponds to Merge mode, and PU2 corresponds to Merge mode; G: 2N×N PU partitioning method, PU1 corresponds to AMVP mode, and PU2 corresponds to Merge mode; H: 2N×N PU partitioning method, PU1 corresponds to Merge mode, and PU2 corresponds to AMVP mode. Other non-2N×2N PU partitioning methods besides N×N PU partitioning are similar and will not be elaborated here.
[0062] When the candidate PU partitioning method is not 2N×2N and is an N×N PU partitioning method, the current CU is divided into 4 PUs. The PU prediction modes that can be selected for each PU include: AMVP mode and Merge mode. At this time, sixteen (2+4) third PU modes are obtained. The specific forms of the sixteen third PU modes can be referred to the above description and will not be repeated here.
[0063] In one possible implementation, for any given PU mode, based on the PU prediction mode corresponding to each PU in that PU mode, the sum of costs corresponding to that PU mode is determined using SATD cost and bitrate cost. This includes: for any PU in that PU mode, based on the PU prediction mode corresponding to that PU, determining the motion vector and predicted pixel block corresponding to that PU; based on the residual pixel block between the original pixel block and the predicted pixel block corresponding to that PU, determining the SATD cost corresponding to that PU; based on the motion vector and residual pixel block corresponding to that PU, determining the bitrate cost corresponding to that PU; and summing the SATD cost and bitrate cost corresponding to each PU in that PU mode to determine the sum of costs corresponding to that PU mode.
[0064] For any given PU mode, prediction can be performed based on the PU prediction mode corresponding to each PU within that PU mode, thereby determining the motion vector (MV) and predicted pixel block corresponding to that PU. The process of prediction based on PU prediction modes can refer to relevant technologies, and this disclosure does not specifically limit it.
[0065] For any given PU, the original pixel block and the predicted pixel block corresponding to the PU are subtracted to obtain the residual pixel block corresponding to the PU; the SATD cost is calculated for the residual pixel block corresponding to the PU to obtain the SATD cost corresponding to the PU.
[0066] For any given PU, the PU is encoded based on its corresponding motion vector and residual pixel block, and the bitrate cost corresponding to the PU is determined based on the encoded data. The specific algorithm for calculating the bitrate cost can be found in relevant technologies, and this disclosure does not impose any specific limitations on it.
[0067] For any given PU mode, sum the SATD cost and bitrate cost corresponding to each PU under that PU mode to obtain the sum of costs for that PU mode. Then, based on the sum of costs for each PU mode, candidate PU modes can be selected from multiple PU modes.
[0068] The following is a detailed description of the selection process when there are two candidate PU modes.
[0069] In one possible implementation, candidate PU modes are determined based on the sum of costs corresponding to each PU mode, including: selecting the PU mode with the smallest sum of costs from at least four third PU modes as the first selected PU mode; selecting the PU mode with the smallest sum of costs from two first PU modes and the first selected PU modes as a candidate PU mode, and selecting the PU mode with the second smallest sum of costs as the second selected PU mode; selecting the PU mode with the smallest sum of costs from two second PU modes as the third selected PU mode; and selecting the PU mode with the smallest sum of costs from the second selected PU mode and the third selected PU mode as a candidate PU mode.
[0070] Based on the above selection strategy, both inter-frame PU prediction and intra-frame PU prediction can be taken into account, and the two optimal candidate PU modes can be selected from multiple PU modes.
[0071] In addition to using the above selection strategy to select the two optimal candidate PU modes from multiple PU modes, other selection strategies can also be used, and this disclosure does not specifically limit them.
[0072] When the number of candidate PU modes is more than two, a corresponding selection strategy can be adopted for selection, as long as the final number of candidate PU modes is less than the total number of all PU modes supported by the current CU. This disclosure does not limit the specific selection strategy.
[0073] In one possible implementation, rate-distortion cost is used to select candidate PU modes and determine a target PU mode corresponding to the current CU. This includes: determining the rate-distortion cost of each candidate PU mode under different TU partitioning methods based on the PU partitioning method and PU prediction mode corresponding to each candidate PU mode; and determining the target PU mode based on the candidate PU mode with the minimum rate-distortion cost and the corresponding TU partitioning method.
[0074] For the candidate PU modes determined through the first and second phases of mode selection, to ensure that the coding quality does not degrade, in the third extreme mode selection, based on the PU partitioning method and PU prediction mode corresponding to each candidate PU mode, the rate-distortion cost corresponding to each candidate PU mode under different TU partitioning methods is determined. This effectively determines the optimal target PU mode for the current PU, including the corresponding PU partitioning method, TU partitioning method, and PU prediction mode. The calculation process of rate-distortion cost can refer to relevant technologies, and this disclosure does not specifically limit it.
[0075] In this embodiment of the disclosure, for the current HEVC CU, multiple PU partitioning methods are selected using SATD cost to determine the candidate PU mode corresponding to the current CU. Each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode. Compared with the method of performing rate-distortion cost calculation for each PU partitioning method, which has high computational complexity, preliminary selection using SATD cost with low computational complexity can quickly filter candidate PU modes based on multiple PU partitioning methods. This allows the final target PU mode corresponding to the current CU to be quickly determined by only performing rate-distortion cost calculation on the candidate PU modes. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode. Since the target PU mode is still calculated using rate-distortion cost in the end, it can be ensured that the coding quality is not affected while effectively reducing computational complexity.
[0076] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0077] In addition, this disclosure also provides a PU mode selection device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any of the PU mode selection methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.
[0078] Figure 2 shows a block diagram of a PU mode selection device according to an embodiment of the present disclosure. As shown in Figure 2, the device 20 includes: The first selection module 21 is used to select from multiple PU partitioning methods for the current CU of HEVC using SATD cost, and determine the candidate PU mode corresponding to the current CU. Each candidate PU mode includes the corresponding PU partitioning method and PU prediction mode. The second selection module 22 is used to select candidate PU modes using the cost of rate distortion and determine a target PU mode corresponding to the current CU. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode.
[0079] In one possible implementation, the first selection module 21 includes: The first selection sub-module is used to select from multiple non-2N×2N PU partitioning methods using SATD cost, and determine a non-2N×2N candidate PU partitioning method corresponding to the current CU; The second selection sub-module is used to select the candidate PU partitioning method using SATD cost and bit rate cost, and to determine the candidate PU mode. The candidate PU partitioning method includes 2N×2N PU partitioning method and non-2N×2N candidate PU partitioning method.
[0080] In one possible implementation, the first selected sub-module includes: The first partitioning unit is used to partition the current CU based on any non-2N×2N PU partitioning method, thereby obtaining multiple PUs under that non-2N×2N PU partitioning method; The first cost determination unit is used to determine the SATD cost corresponding to the non-2N×2N PU partitioning method based on multiple PUs under the non-2N×2N PU partitioning method; The first selection unit is used to determine the non-2N×2N PU partitioning method with the lowest SATD cost as the non-2N×2N candidate PU partitioning method based on the SATD cost corresponding to each non-2N×2N PU partitioning method.
[0081] In one possible implementation, the first cost determination unit is specifically used for: For any PU under this non-2N×2N PU partitioning method, the predicted pixel block corresponding to the PU is determined based on motion estimation. Based on the residual pixel blocks between the original pixel blocks and the predicted pixel blocks corresponding to the PU, the SATD cost corresponding to the PU is determined; Sum the SATD costs corresponding to each PU under the non-2N×2N PU partitioning method to determine the SATD cost corresponding to the non-2N×2N PU partitioning method.
[0082] In one possible implementation, the second selection sub-module includes: The second partitioning unit is used to partition the current CU based on the candidate PU partitioning method, and obtain at least one PU under the candidate PU partitioning method; The first determining unit is used to set different PU prediction modes for each PU under the candidate PU partitioning method, thereby obtaining multiple PU modes corresponding to the candidate PU partitioning method. The different PU prediction modes include: inter-frame PU prediction mode and intra-frame PU prediction mode. The second cost determination unit is used to determine the sum of costs corresponding to any PU mode based on the PU prediction mode corresponding to each PU under that PU mode, using SATD cost and bitrate cost; The second determining unit is used to determine the candidate PU mode based on the sum of costs corresponding to each PU mode.
[0083] In one possible implementation, the second cost determination unit is specifically used for: For any PU under this PU mode, the motion vector and predicted pixel block corresponding to the PU are determined based on the PU prediction mode corresponding to the PU; Based on the residual pixel blocks between the original pixel blocks and the predicted pixel blocks corresponding to the PU, the SATD cost corresponding to the PU is determined; Based on the motion vector and residual pixel block corresponding to the PU, the bit rate cost corresponding to the PU is determined; Sum the SATD cost and bitrate cost for each PU under the PU mode to determine the total cost for that PU mode.
[0084] In one possible implementation, the inter-frame PU prediction modes include: AMVP mode and Merge mode; the intra-frame PU prediction modes include: first candidate intra-frame PU prediction mode and second candidate intra-frame PU prediction mode.
[0085] The first determining unit is specifically used for: When the candidate PU partitioning method is 2N×2N PU partitioning, set the AMVP mode and Merge mode for a PU under the 2N×2N PU partitioning method to obtain two first PU modes corresponding to the 2N×2N PU partitioning method; When the candidate PU partitioning method is 2N×2N PU partitioning, a first candidate intra-frame PU prediction mode and a second candidate intra-frame PU prediction mode are set for a PU under the 2N×2N PU partitioning method to obtain two second PU modes corresponding to the 2N×2N PU partitioning method; When the candidate PU partitioning method is not a 2N×2N candidate PU partitioning method, set the AMVP mode and Merge mode for each PU under the non-2N×2N candidate PU partitioning method to obtain at least four third PU modes corresponding to the non-2N×2N candidate PU partitioning method.
[0086] In one possible implementation, the second determining unit is specifically used for: Among at least four third PU modes, the PU mode with the smallest sum of costs is selected as the first selected PU mode; Among the two first PU modes and the first selected PU mode, the PU mode with the smallest sum of costs is selected as a candidate PU mode, and the PU mode with the second smallest sum of costs is selected as the second selected PU mode; Among the two second PU modes, the PU mode with the smallest sum of costs is selected as the third selected PU mode; Among the second and third selected PU modes, the PU mode with the smallest sum of costs is selected and determined as a candidate PU mode.
[0087] In one possible implementation, the second selection module 22 is specifically used for: Based on the PU partitioning method and PU prediction mode corresponding to each candidate PU mode, determine the rate-distortion cost of each candidate PU mode under different TU partitioning methods; The target PU mode is determined based on the candidate PU mode with the lowest rate-distortion cost and the corresponding TU partitioning method.
[0088] This method is specifically technically related to the internal structure of computer systems and can solve technical problems of how to improve hardware computing efficiency or execution performance (including reducing data storage, reducing data transmission, and increasing hardware processing speed), thereby achieving technical effects that improve the internal performance of computer systems in accordance with natural laws.
[0089] In some embodiments, the functions of the apparatus provided in this disclosure or the modules it includes can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0090] This disclosure also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method. The computer-readable storage medium can be volatile or non-volatile.
[0091] This disclosure also proposes an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the above-described method.
[0092] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.
[0093] Electronic devices can be provided as terminals, servers, or other forms of devices.
[0094] Figure 3 shows a block diagram of an electronic device according to an embodiment of the present disclosure. Referring to Figure 3, the electronic device 1900 may be provided as a server or terminal device. Referring to Figure 3, the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions executable by the processing component 1922, such as applications. The applications stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0095] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Microsoft Windows Server™, Apple's graphical user interface operating system (Mac OS X™), a multi-user, multi-process computer operating system (Unix™), a free and open-source Unix-like operating system (Linux™), an open-source Unix-like operating system (FreeBSD™), or similar.
[0096] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as memory 1932 including computer program instructions that can be executed by processing component 1922 of electronic device 1900 to perform the above-described method.
[0097] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0098] Computer-readable storage media can be a tangible device capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, (but not limited to) electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein is not to be construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0099] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media stored in the respective computing / processing device.
[0100] The computer program instructions used to perform the operations of this disclosure may be combination instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this disclosure.
[0101] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0102] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram.
[0103] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0105] The computer program product can be implemented through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied as a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0106] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated here.
[0107] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0108] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
[0109] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
[0110] S11, S12: Steps 20: Device 21: First Choice Module 22: Second Selection Module 1900: Electronic equipment 1922: Processing Components 1926: Power Supply Components 1932: Memory 1950: Network Interface 1958: Input / Output Interface
Claims
1. A prediction unit (PU) mode selection method, characterized in that the method is applied to High Efficiency Video Coding (HEVC), the method comprising: For the current HEVC coding unit (CU), multiple PU partitioning methods are selected using the sum of absolute transform differences (SATD) cost to determine the candidate PU mode corresponding to the current CU. The candidate PU mode includes the corresponding PU partitioning method and PU prediction mode. Rate-distortion cost is then used to select the candidate PU mode to determine a target PU mode corresponding to the current CU. The target PU mode includes the corresponding PU partitioning method, transform unit (TU) partitioning method, and PU prediction mode. The process of selecting multiple PU partitioning methods using SATD cost to determine the candidate PU mode for the current HEVC CU includes: selecting multiple non-2N×2N PU partitioning methods using SATD cost to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU. The multiple non-2N×2N PU partitioning methods include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N. The candidate PU partitioning method is selected using SATD cost and bitrate cost to determine the candidate PU mode, wherein the candidate PU partitioning method includes a 2N×2N PU partitioning method and the non-2N×2N candidate PU partitioning method.
2. The method as described in claim 1, characterized in that, the step of selecting from multiple non-2N×2N PU partitioning methods using SATD cost to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU includes: For any non-2N×2N PU partitioning method, the current CU is partitioned based on the non-2N×2N PU partitioning method to obtain multiple PUs under the non-2N×2N PU partitioning method; based on the multiple PUs under the non-2N×2N PU partitioning method, the SATD cost corresponding to the non-2N×2N PU partitioning method is determined; based on the SATD cost corresponding to each non-2N×2N PU partitioning method, the non-2N×2N PU partitioning method with the lowest SATD cost is determined as the non-2N×2N candidate PU partitioning method.
3. The method as described in claim 2, characterized in that, determining the SATD cost corresponding to the non-2N×2N PU partitioning method based on multiple PUs under the non-2N×2N PU partitioning method includes: For any PU under the non-2N×2N PU partitioning method, the predicted pixel block corresponding to the PU is determined based on the motion estimation method; the SATD cost corresponding to the PU is determined based on the residual pixel block between the original pixel block and the predicted pixel block corresponding to the PU; the SATD cost corresponding to each PU under the non-2N×2N PU partitioning method is summed to determine the SATD cost corresponding to the non-2N×2N PU partitioning method.
4. The method as described in claim 1, characterized in that the step of selecting the candidate PU partitioning method using SATD cost and bitrate cost to determine the candidate PU mode includes: The current CU is divided based on the candidate PU partitioning method to obtain at least one PU under the candidate PU partitioning method; different PU prediction modes are set for each PU under the candidate PU partitioning method to obtain multiple PU modes corresponding to the candidate PU partitioning method, wherein the different PU prediction modes include: inter-frame PU prediction mode and intra-frame PU prediction mode; for any PU mode, based on the PU prediction mode corresponding to each PU under the PU mode, the sum of costs corresponding to the PU mode is determined using SATD cost and bitrate cost; the candidate PU mode is determined based on the sum of costs corresponding to each PU mode.
5. The method as described in claim 4, characterized in that, for any given PU mode, determining the sum of costs corresponding to the PU mode based on the PU prediction mode corresponding to each PU under the PU mode, using SATD cost and bitrate cost, includes: For any PU in the PU mode, based on the PU prediction mode corresponding to the PU, determine the motion vector and predicted pixel block corresponding to the PU; based on the residual pixel block between the original pixel block and the predicted pixel block corresponding to the PU, determine the SATD cost corresponding to the PU; based on the motion vector and residual pixel block corresponding to the PU, determine the bitrate cost corresponding to the PU; sum the SATD cost and bitrate cost corresponding to each PU in the PU mode to determine the sum of costs corresponding to the PU mode.
6. The method as described in claim 4 or 5, characterized in that the inter-frame PU prediction mode includes: Advanced motion vector prediction AMVP mode, merged Merge mode; The intra-frame PU prediction mode includes: a first candidate intra-frame PU prediction mode and a second candidate intra-frame PU prediction mode; The step of setting different PU prediction modes for each PU under the candidate PU partitioning method to obtain multiple PU modes corresponding to the candidate PU partitioning method includes: when the candidate PU partitioning method is the 2N×2N PU partitioning method, setting an AMVP mode and a Merge mode for one PU under the 2N×2N PU partitioning method respectively, to obtain two first PU modes corresponding to the 2N×2N PU partitioning method; when the candidate PU partitioning method is the 2N×2N PU partitioning method, setting a first candidate intra-frame PU prediction mode and a second candidate intra-frame PU prediction mode for one PU under the 2N×2N PU partitioning method respectively, to obtain two second PU modes corresponding to the 2N×2N PU partitioning method; When the candidate PU partitioning method is not the 2N×2N candidate PU partitioning method, AMVP mode and Merge mode are set for each PU under the non-2N×2N candidate PU partitioning method to obtain at least four third PU modes corresponding to the non-2N×2N candidate PU partitioning method.
7. The method as described in claim 6, characterized in that determining the candidate PU mode based on the sum of costs corresponding to each PU mode includes: Among the at least four third PU modes, the PU mode with the smallest sum of costs is selected as the first selected PU mode; among the two first PU modes and the first selected PU modes, the PU mode with the smallest sum of costs is selected as a candidate PU mode, and the PU mode with the second smallest sum of costs is selected as the second selected PU mode; among the two second PU modes, the PU mode with the smallest sum of costs is selected as the third selected PU mode; among the second selected PU modes and the third selected PU modes, the PU mode with the smallest sum of costs is selected as a candidate PU mode.
8. The method as described in claim 1, characterized in that the utilization distortion cost is used to select the candidate PU mode and determine a target PU mode corresponding to the current CU, comprising: Based on the PU partitioning method and PU prediction mode corresponding to each candidate PU mode, the rate-distortion cost corresponding to each candidate PU mode under different TU partitioning methods is determined; the target PU mode is determined according to the candidate PU mode with the minimum rate-distortion cost and the corresponding TU partitioning method.
9. A PU mode selection device, characterized in that the device is applied to HEVC, the device comprising: A first selection module is used to select from multiple PU partitioning methods for the current HEVC CU using SATD cost, and determine the candidate PU mode corresponding to the current CU. Each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode. A second selection module is used to select from the candidate PU modes using rate-distortion cost, and determine a target PU mode corresponding to the current CU. The target PU mode includes a corresponding PU partitioning method, TU partitioning method, and PU prediction mode. The first selection module includes: a first selection sub-module used to select from multiple non-2N×2N PU partitioning methods using SATD cost, and determine a non-2N×2N candidate PU partitioning method corresponding to the current CU. The multiple non-2N×2N PU partitioning methods include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N. The second selection sub-module is used to select from the candidate PU partitioning methods using SATD cost and bitrate cost, and determine the candidate PU mode. The candidate PU partitioning methods include 2N×2N... PU partitioning method and the non-2N×2N candidate PU partitioning method.
10. An electronic device, characterized in that it comprises: processor; Memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method described in any one of requests 1 to 8.
11. A computer-readable storage medium having stored thereon computer program instructions, characterized in that, when executed by a processor, the computer program instructions implement the method as described in any one of claims 1 to 8.