Prediction unit (PU) mode selection method and apparatus, electronic device and storage medium
By using SATD cost and bit rate cost to screen PU mode in HEVC video encoding, the problem of high computational complexity of HEVC video encoding is solved, and fast PU mode selection is achieved without affecting encoding quality while reducing computational complexity. It is suitable for low-latency and high frame rate encoding.
Patent Information
- Application Number
- PCT/CN2025/083055
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-01
- Filing Date
- 2025-03-18
- Publication Date
- 2025-10-09
AI Technical Summary
In HEVC video encoding, the rate-distortion optimization-based traversal PU mode has high computational complexity, which affects the video encoding speed. In particular, it introduces excessive power consumption in hardware video encoding and is not suitable for low-latency encoding and high frame rate encoding scenarios.
SATD cost is used to preliminarily select multiple PU partitioning methods to determine the candidate PU mode. Combining the bit rate cost and rate distortion cost, the target PU mode is quickly screened out, including PU partitioning method, TU partitioning method and PU prediction mode.
It effectively reduces the computational complexity of PU mode selection, improves encoding speed, and ensures that encoding quality is not affected. It is suitable for low-latency and high frame rate encoding scenarios.
Smart Images

Figure CN2025083055_09102025_PF_FP_ABST
Abstract
Description
Prediction unit PU mode selection method and device, electronic device and storage medium
[0001] This application claims priority to Chinese patent application filed on April 1, 2024, application number 202410389551.5, and invention name “Prediction unit PU mode selection method and device, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to the field of computer technology, and in particular to a prediction unit (PU) mode selection method and device, an electronic device, and a storage medium. Background Art
[0003] High Efficiency Video Coding (HEVC) has become the mainstream of video coding today, with an increasing number of applications in film and television production, video communications, and broadcasting gradually adopting the HEVC video coding standard. Among current mainstream technologies, rate-distortion optimization (RDO) is the primary means of achieving optimal coding performance. However, because the coding parameters of HEVC's prediction unit (PU) layer include multiple PU partitioning schemes, multiple transform units (TUs), and multiple PU prediction modes, the method of traversing all coding parameters of the PU layer based on RDO to determine the optimal PU mode is computationally complex, impacting video encoding speed. Summary of the Invention
[0004] The present disclosure proposes a technical solution of a prediction unit (PU) mode selection method and device, an electronic device, and a storage medium.
[0005] According to one aspect of the present disclosure, a PU mode selection method is provided, including: the method is applied to HEVC, the method including: for the HEVC current CU, using SATD cost to select multiple PU partitioning methods, and determining 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; utilizing rate-distortion cost to select the candidate PU modes, and determining a target PU mode corresponding to the current CU, wherein the target PU mode includes a corresponding PU partitioning method, TU partitioning method, and PU prediction mode.
[0006] In one possible implementation, for the HEVC current CU, SATD cost is used to select multiple PU partitioning methods to determine the candidate PU mode, including: using SATD cost to select multiple non-2N×2N PU partitioning methods to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU; using SATD cost and bit rate cost to select the candidate PU partitioning method 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.
[0007] In one possible implementation, the using of a SATD cost to select multiple non-2N×2N PU partitioning modes to determine a non-2N×2N candidate PU partitioning mode corresponding to the current CU includes: for any non-2N×2N PU partitioning mode, dividing the current CU based on the non-2N×2N PU partitioning mode to obtain multiple PUs under the non-2N×2N PU partitioning mode; determining a SATD cost corresponding to the non-2N×2N PU partitioning mode based on the multiple PUs under the non-2N×2N PU partitioning mode; and, based on the SATD cost corresponding to each non-2N×2N PU partitioning mode, determining the non-2N×2N PU partitioning mode with the smallest SATD cost as the non-2N×2N candidate PU partitioning mode.
[0008] In one possible implementation, the determining of 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: determining, for any PU under the non-2N×2N PU partitioning method, a predicted pixel block corresponding to the PU based on a motion estimation method; determining the SATD cost corresponding to the PU based on a residual pixel block between an original pixel block and a 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.
[0009] In one possible implementation, the SATD cost and the bit rate cost are used to select the candidate PU partitioning method and determine the candidate PU mode, including: dividing 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 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 SATD cost and the bit rate cost are used to determine the sum of the costs corresponding to the PU mode; and determining the candidate PU mode according to the sum of the costs corresponding to each PU mode.
[0010] In one possible implementation, for any PU mode, based on the PU prediction mode corresponding to each PU in the PU mode, the SATD cost and the bit rate cost are used to determine the sum of the costs corresponding to the PU mode, including: for any PU in the PU mode, based on the PU prediction mode corresponding to the PU, determining the motion vector and predicted pixel block 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 bit rate 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 bit rate cost corresponding to each PU in the PU mode to determine the sum of the costs corresponding to the PU mode.
[0011] In a 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 the AMVP mode and the 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 the 2N×2N PU partitioning method, setting the first candidate intra-frame PU prediction mode and the second candidate intra-frame PU prediction mode for a PU under the 2N×2N PU partitioning method to obtain the 2N×2N 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, the AMVP mode and the 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.
[0012] In one possible implementation, the determining of the candidate PU mode according to the sum of the costs corresponding to each PU mode includes: selecting the PU mode with the smallest sum of costs among the at least four third PU modes to be determined as the first selected PU mode; selecting the PU mode with the smallest sum of costs among the two first PU modes and the first selected PU mode to be determined as one of the candidate PU modes, and selecting the PU mode with the second smallest sum of costs to be determined as the second selected PU mode; selecting the PU mode with the smallest sum of costs among the two second PU modes to be determined as the third selected PU mode; and selecting the PU mode with the smallest sum of costs among the second selected PU mode and the third selected PU mode to be determined as one of the candidate PU modes.
[0013] In one possible implementation, the utilization rate-distortion cost is used to select the candidate PU mode and determine a target PU mode corresponding to the current CU, including: determining the rate-distortion cost corresponding to each candidate PU mode under different TU partitioning modes based on the PU partitioning mode and PU prediction mode corresponding to each candidate PU mode; and determining the target PU mode based on the candidate PU mode with the smallest rate-distortion cost and the corresponding TU partitioning mode.
[0014] According to one aspect of the present disclosure, a PU mode selection device is provided, which is applied to HEVC, and the device includes: a first selection module, which is used to select multiple PU partitioning methods for the HEVC current CU using SATD cost, 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; a second selection module, which is used to select the candidate PU mode 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, TU partitioning method, and PU prediction mode.
[0015] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0016] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above method is implemented.
[0017] In the embodiment of the present disclosure, for the current CU of HEVC, SATD cost is used to select multiple PU partitioning methods to determine the candidate PU mode corresponding to the current CU, and 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 with higher computational complexity for each PU partitioning method, preliminary selection is performed through SATD cost with lower computational complexity, and candidate PU modes can be quickly screened out based on multiple PU partitioning methods, so that only rate-distortion cost calculation needs to be performed on the candidate PU modes to quickly determine a target PU mode that the current CU ultimately corresponds to. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode. Since the rate-distortion cost is still used to calculate the target PU mode in the end, it can ensure that the encoding quality is not affected while effectively reducing the computational complexity.
[0018] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, rather than limiting the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to explain the technical solutions of the present disclosure.
[0020] FIG1 shows a flowchart of a PU mode selection method according to an embodiment of the present disclosure.
[0021] FIG2 shows a block diagram of a PU mode selection device according to an embodiment of the present disclosure.
[0022] FIG3 shows a block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0024] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0025] The term "and / or" herein simply describes an association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can represent the existence of three situations: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" herein refers to any combination of at least two of any one or more of a plurality of items. For example, "at least one of A, B, and C" can represent any one or more elements selected from the set consisting of A, B, and C.
[0026] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.
[0027] 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 primary goal of video coding is to minimize the encoding bitrate while maintaining a certain level of video quality, or to minimize encoding distortion under mobile coding bitrate constraints. Within a fixed coding framework, there are often multiple candidate encoding methods to address different video content. A key task of the encoder is to strategically select the optimal encoding parameters to achieve optimal coding performance.
[0028] Among current mainstream technologies, coding parameter optimization methods based on rate-distortion theory, or rate-distortion optimization (RDO), are the primary means of achieving optimal coding performance. RDO methods in HEVC encoders include RDO for groups of pictures, slices, coding tree units (CTUs), coding units (CUs), and PUs.
[0029] In HEVC, the rate-distortion optimization of the PU layer is performed by traversing all coding parameters. By calculating the rate-distortion cost of all PU modes, the PU mode with the smallest rate-distortion cost is selected as the optimal PU mode. PU modes include: PU partitioning mode and PU prediction mode. Inter-frame PU partitioning modes include: 2N×2N, N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, nR×2N, and intra-frame PU partitioning modes include: 2N×2N, N×N. Among them, the inter-frame PU prediction modes that can be used by each PU in the PU partitioning mode include: Advanced Motion Vector Prediction (AMVP) mode and Merge mode, and the intra-frame PU prediction modes that can be used include: 35 intra-frame PU prediction modes, all of which require calculation of the rate-distortion cost to select. When calculating the rate-distortion cost of each PU mode, it is necessary to try different TU partitioning methods and select the TU partitioning with the smallest 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.
[0030] The method of determining the optimal PU mode for a CU based on rate-distortion optimization requires traversing 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. Because the calculation of the rate-distortion cost requires a series of calculations such as transformation, quantization, inverse quantization, inverse transformation, and bitrate estimation, this method based on rate-distortion optimization traversal severely reduces encoding speed and introduces excessive power consumption in hardware video encoding, making it unsuitable for low-latency encoding and high frame rate encoding applications.
[0031] To address the above technical issues, the present disclosure provides a PU mode selection method that can effectively reduce the computational complexity of selecting the optimal PU mode for the current CU, thereby increasing the encoding speed of the current CU. The PU mode selection method provided by the present disclosure is described in detail below.
[0032] FIG1 shows a flowchart of a PU mode selection method according to an embodiment of the present disclosure. The 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), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable instruction stored in a memory. Alternatively, the method can be executed by a server. As shown in FIG1 , the method includes:
[0033] In step S11, for the HEVC current CU, the Sum of Absolute Transformed Differences (SATD) cost is used to select multiple PU partitioning methods to determine the candidate PU mode corresponding to the current CU, where each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode.
[0034] The multiple PU partitioning methods here include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, nR×2N, and 2N×2N.
[0035] The SATD cost is a cost function used to measure image or signal quality. In video coding and image processing, the SATD cost is typically used to evaluate the magnitude of the prediction error in the frequency domain. The cost is calculated by calculating the sum of the absolute differences between the original and predicted signals. The SATD cost is widely used to measure image or signal quality in video coding and image processing. Compared to the rate-distortion cost, the SATD cost has lower computational complexity.
[0036] By performing preliminary selection using the SATD cost with low computational complexity, the candidate PU mode with the lowest cost can be quickly screened out from multiple PU partitioning methods. Each candidate PU mode includes a corresponding PU partitioning method and a PU prediction mode.
[0037] The number of candidate PU modes is greater than or equal to two and less than the total number of all PU modes supported by the current CU. The fewer the number of candidate PU modes, the lower the complexity of the subsequent rate-distortion cost calculation; however, the greater the number of candidate PU modes, the higher the accuracy of the target PU mode determined after the subsequent rate-distortion cost calculation. In actual application scenarios, the number of candidate PU modes can be flexibly set based on a comprehensive consideration of computational complexity and accuracy requirements, and this disclosure does not impose specific limitations on this.
[0038] The specific process of selecting multiple PU partitioning methods using SATD cost and determining the candidate PU mode corresponding to the current CU will be described in detail later in combination with possible implementation methods of the present disclosure, which will not be repeated here.
[0039] In step S12, the rate-distortion cost is used to select candidate PU modes to determine a target PU mode corresponding to the current CU, where the target PU mode includes a corresponding PU partitioning mode, TU partitioning mode, and PU prediction mode.
[0040] Since the aforementioned preliminary screening has quickly screened out a small number of candidate PU modes based on multiple PU partitioning methods, further screening can be performed based on the rate-distortion cost with higher computational complexity to select the optimal target PU mode for the current CU, so that the current CU can be subsequently encoded based on the target PU mode.
[0041] The specific process of selecting candidate PU modes based on utilization distortion cost and determining a target PU mode corresponding to the current CU will be described in detail later in conjunction with possible implementation methods of the present disclosure, and will not be repeated here.
[0042] In the embodiment of the present disclosure, for the current CU of HEVC, SATD cost is used to select multiple PU partitioning methods to determine the candidate PU mode corresponding to the current CU, and 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 with higher computational complexity for each PU partitioning method, preliminary selection is performed through SATD cost with lower computational complexity, and candidate PU modes can be quickly screened out based on multiple PU partitioning methods, so that only rate-distortion cost calculation needs to be performed on the candidate PU modes to quickly determine a target PU mode that the current CU ultimately corresponds to. 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 ensure that the encoding quality is not affected while effectively reducing the computational complexity.
[0043] In one possible implementation, for the HEVC current CU, multiple PU partitioning methods are selected using SATD cost to determine a candidate PU mode, including: using SATD cost to select multiple non-2N×2N PU partitioning methods to determine a non-2N×2N candidate PU partitioning method corresponding to the current CU; using SATD cost and bit rate cost to select the candidate PU partitioning method to determine the candidate PU mode, wherein the candidate PU partitioning method includes a 2N×2N PU partitioning method and a non-2N×2N candidate PU partitioning method.
[0044] The multiple non-2N×2N PU partitioning methods include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N.
[0045] A preliminary selection is performed using the SATD cost with low computational complexity, and the non-2N×2N PU partitioning method with the lowest cost is quickly screened out from multiple non-2N×2N PU partitioning methods as the selected non-2N×2N candidate PU partitioning method.
[0046] Bitrate penalty refers to the price paid for reducing the compression ratio of image data in video encoding. Bitrate is a measure of data compression efficiency. The lower the bitrate, the higher the compression ratio, but the greater the loss in image quality. Compared to the rate-distortion penalty, the bitrate penalty is less computationally complex.
[0047] Further selection is performed using the SATD cost and bit rate cost with lower computational complexity to quickly screen out the PU prediction mode with the lowest cost for the 2N×2N PU partitioning mode and / or the non-2N×2N candidate PU partitioning mode to obtain the candidate PU mode.
[0048] In one example, the first stage of mode selection involves selecting a non-2N×2N candidate PU partitioning scheme from multiple non-2N×2N PU partitioning schemes using a SATD cost to determine a candidate non-2N×2N PU partitioning scheme corresponding to the current CU. The second stage of mode selection involves selecting a candidate PU partitioning scheme from the SATD cost and the bit rate cost to determine a candidate PU mode. The third stage of mode selection involves selecting a target PU mode from the candidate PU modes using a rate-distortion cost. Each stage of mode selection utilizes a separate software program or hardware module to perform the selection operation.
[0049] Hardware pipelining is a technology that accelerates instruction execution by breaking down a computer instruction into multiple steps and executing them in parallel across multiple hardware processing units. It breaks down a single instruction into multiple steps and executes these steps simultaneously on different hardware processing units, thus enabling parallel instruction processing. In hardware pipelining, each processing unit performs only one specific task. These processing units can operate in parallel, allowing new instructions to be processed within each clock cycle. This approach can significantly improve computer execution speed and efficiency.
[0050] Because each stage of mode selection utilizes a separate software program or hardware module to perform the selection operation, this staged mode selection approach facilitates hardware pipeline implementation. For example, after the current CU completes the first stage of mode selection, it can enter the second stage of mode selection. At this point, the next CU can initiate the first stage of mode selection without having to wait for the current CU to complete the third stage of mode selection and determine the final target PU mode before initiating the next CU. This effectively improves the efficiency of each CU in determining the target PU mode, thereby improving coding efficiency.
[0051] In one possible implementation, multiple non-2N×2N PU partitioning modes are selected using a SATD cost to determine a non-2N×2N candidate PU partitioning mode corresponding to a current CU, including: for any non-2N×2N PU partitioning mode, dividing the current CU based on the non-2N×2N PU partitioning mode to obtain multiple PUs under the non-2N×2N PU partitioning mode; determining a SATD cost corresponding to the non-2N×2N PU partitioning mode based on the multiple PUs under the non-2N×2N PU partitioning mode; and, based on the SATD cost corresponding to each non-2N×2N PU partitioning mode, determining a non-2N×2N PU partitioning mode with the smallest SATD cost as the non-2N×2N candidate PU partitioning mode.
[0052] When performing the first-stage mode selection using the SATD cost, the SATD cost corresponding to each non-2N×2N PU partitioning method is determined. A smaller SATD cost indicates a smaller 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 for the first-stage mode selection.
[0053] In one possible implementation, based on multiple PUs in 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 in the non-2N×2N PU partitioning method, determining the predicted pixel block corresponding to the PU based on a motion estimation method; determining the SATD cost corresponding to the PU based on a 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 in the non-2N×2N PU partitioning method to determine the SATD cost corresponding to the non-2N×2N PU partitioning method.
[0054] In the first stage mode selection, the PU prediction mode can be ignored. Instead, the prediction pixel block corresponding to each PU is determined based on the motion estimation method, and then the SATD cost of each PU is determined to reduce the computational complexity of the first stage mode selection.
[0055] 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. For example, if the current CU is partitioned using a non-2N×2N PU partitioning method other than the N×N PU partitioning method, two PUs can be obtained; if the current CU is partitioned using the N×N PU partitioning method, four PUs can be obtained.
[0056] For any PU, the predicted pixel block corresponding to the PU is determined based on the motion estimation method; the original pixel block corresponding to the PU is subtracted from the predicted pixel block 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 related technologies and is not specifically limited in this disclosure.
[0057] For any non-2N×2N PU partitioning mode, the sum of the SATD costs corresponding to each PU in the non-2N×2N PU partitioning mode is used as the SATD cost corresponding to the non-2N×2N PU partitioning mode.
[0058] After the non-2N×2N PU partitioning mode with the minimum SATD cost is determined as the non-2N×2N candidate PU partitioning mode selected in the first stage mode selection, the second stage mode selection may be performed on the current CU.
[0059] In one possible implementation, the SATD cost and the bit rate cost are used to select a candidate PU partitioning method to determine a candidate PU mode, including: dividing the current CU based on the candidate PU partitioning method to obtain at least one PU under the candidate PU partitioning method; setting a different PU prediction mode 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 SATD cost and the bit rate cost are used to determine the sum of the costs corresponding to the PU mode; and determining the candidate PU mode according to the sum of the costs corresponding to each PU mode.
[0060] When executing the second-stage mode using SATD cost and bit rate cost, both intra-frame PU prediction mode and intra-frame PU prediction mode are considered simultaneously, so that different video coding scenario requirements such as inter-frame coding and intra-frame coding can be taken into account, and the optimal candidate PU mode is determined for the current CU.
[0061] In a 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; different PU prediction modes are set for each PU under the candidate PU partitioning method, and multiple PU modes corresponding to the candidate PU partitioning method are obtained, including: when the candidate PU partitioning method is a 2N×2N PU partitioning method, the AMVP mode and the Merge mode are set for a PU under the 2N×2N PU partitioning method, and two first PU modes corresponding to the 2N×2N PU partitioning method are obtained; when the candidate PU partitioning method is a 2N×2N PU partitioning method, the first candidate intra-frame PU prediction mode and the second candidate intra-frame PU prediction mode are set for a PU under the 2N×2N PU partitioning method, and a 2N×2N Two second PU modes corresponding to the PU partitioning method; when the candidate PU partitioning method is a non-2N×2N candidate PU partitioning method, the AMVP mode and the Merge mode are set for each PU under the non-2N×2N candidate PU partitioning method, and at least four third PU modes corresponding to the non-2N×2N candidate PU partitioning method are obtained.
[0062] Here, the first candidate intra-frame PU prediction mode and the second candidate intra-frame PU prediction mode may be two selected from 35 intra-frame PU prediction modes according to preset requirements, and the specific selection process is not limited in this disclosure.
[0063] Comprehensively consider the inter-frame PU prediction mode: AMVP mode, Merge mode, and the intra-frame PU prediction mode: the first candidate intra-frame PU prediction mode, the second candidate intra-frame PU prediction mode, so that each PU under different candidate PU partitioning methods is set with a different PU prediction mode, and multiple PU modes can be obtained. The PU mode includes the corresponding PU partitioning method and PU prediction mode.
[0064] When the candidate PU partitioning scheme is 2N×2N, the current CU corresponds to only one PU. The optional PU prediction modes for this PU include AMVP and Merge. This results in two first PU modes: First PU Mode A: 2N×2N PU partitioning and AMVP; First PU Mode B: 2N×2N PU partitioning and Merge.
[0065] When the candidate PU partitioning scheme is 2N×2N, the current CU corresponds to only one PU. The optional PU prediction modes for this PU include: the first candidate intra PU prediction mode and the second candidate intra PU prediction mode. In this case, two second PU modes are obtained: second PU mode C: 2N×2N PU partitioning scheme, first candidate intra PU prediction mode; second PU mode D: 2N×2N PU partitioning scheme, second candidate intra PU prediction mode.
[0066] When the candidate PU partitioning mode is non-2N×2N candidate PU partitioning mode and other non-2N×2N PU partitioning modes other than non-N×N PU partitioning mode, the current CU is divided into 2 PUs, and the optional PU prediction modes for each PU include: AMVP mode and Merge mode. At this time, four (2 2 ) Third PU mode. 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 mode E can be obtained: 2N×N PU partitioning method, PU1 corresponds to AMVP mode, and PU2 corresponds to AMVP mode; the third PU mode F can be obtained: 2N×N PU partitioning method, PU1 corresponds to Merge mode, and PU2 corresponds to Merge mode; the third PU mode G can be obtained: 2N×N PU partitioning method, PU1 corresponds to AMVP mode, and PU2 corresponds to Merge mode; the third PU mode H can be obtained: 2N×N PU partitioning method, PU1 corresponds to Merge mode, and PU2 corresponds to AMVP mode. Other non-2N×2N PU partitioning methods other than the non-N×N PU partitioning method are similar and will not be described here.
[0067] When the candidate PU partitioning mode is not 2N×2N candidate PU partitioning mode, but N×N PU partitioning mode, the current CU is divided into 4 PUs, and the optional PU prediction modes for each PU include: AMVP mode and Merge mode. At this time, sixteen (2 4 ) The third PU mode. The specific forms of the sixteen third PU modes can refer to the above expressions and are not described here in detail.
[0068] In one possible implementation, for any PU mode, based on the PU prediction mode corresponding to each PU in the PU mode, the SATD cost and the bit rate cost are used to determine the sum of the costs corresponding to the PU mode, including: for any PU in the PU mode, based on the PU prediction mode corresponding to the PU, determining the motion vector and predicted pixel block 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 bit rate 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 bit rate cost corresponding to each PU in the PU mode to determine the sum of the costs corresponding to the PU mode.
[0069] For any PU mode, prediction is performed based on the PU prediction mode corresponding to each PU in the PU mode to determine the motion vector (MV) and predicted pixel block corresponding to the PU. The process of prediction based on the PU prediction mode can refer to related technologies and is not specifically limited in this disclosure.
[0070] For any 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 on the residual pixel block corresponding to the PU to obtain the SATD cost corresponding to the PU.
[0071] For any PU, the PU is encoded based on the motion vector and residual pixel block corresponding to the PU, and the bit rate cost corresponding to the PU is determined based on the encoded data. The specific algorithm for calculating the bit rate cost can be referred to related technologies and is not specifically limited in this disclosure.
[0072] For any PU mode, the SATD cost and bitrate cost corresponding to each PU in the PU mode are summed to obtain the sum of the costs corresponding to the PU mode. Then, a candidate PU mode can be selected from multiple PU modes based on the sum of the costs corresponding to each PU mode.
[0073] The selection process when the number of candidate PU modes is two is described in detail below.
[0074] In one possible implementation, a candidate PU mode is determined based on the sum of the costs corresponding to each PU mode, including: among at least four third PU modes, selecting the PU mode with the smallest sum of costs to be determined as the first selected PU mode; among the two first PU modes and the first selected PU mode, selecting the PU mode with the smallest sum of costs to be determined as a candidate PU mode, and selecting the PU mode with the second smallest sum of costs to be determined as the second selected PU mode; among the two second PU modes, selecting the PU mode with the smallest sum of costs to be determined as the third selected PU mode; and among the second selected PU mode and the third selected PU mode, selecting the PU mode with the smallest sum of costs to be determined as a candidate PU mode.
[0075] Based on the above selection strategy, both inter-frame PU prediction and intra-frame PU prediction can be taken into consideration, and the best two candidate PU modes can be selected from multiple PU modes.
[0076] In addition to adopting the above selection strategy to select the best two candidate PU modes from multiple PU modes, other selection strategies may also be adopted for selection, which is not specifically limited in the present disclosure.
[0077] When the number of candidate PU modes is other than two, the corresponding selection strategy can be used for selection, as long as the number of candidate PU modes finally determined is less than the total number of all PU modes supported by the current CU. This disclosure does not limit the specific selection strategy.
[0078] In one possible implementation, the rate-distortion cost is used to select candidate PU modes and determine a target PU mode corresponding to the current CU, including: determining the rate-distortion cost corresponding to each candidate PU mode under different TU partitioning modes based on the PU partitioning mode and PU prediction mode corresponding to each candidate PU mode; and determining the target PU mode based on the candidate PU mode with the smallest rate-distortion cost and the corresponding TU partitioning mode.
[0079] To ensure coding quality does not degrade, the third extreme mode selection process determines the rate-distortion cost of each candidate PU mode under different TU partitioning schemes based on the PU partitioning scheme and PU prediction mode corresponding to each candidate PU mode. This effectively determines the optimal target PU mode for the current PU, including the corresponding PU partitioning scheme, TU partitioning scheme, and PU prediction mode. The calculation process for the rate-distortion cost can be referenced in related technologies and is not specifically limited in this disclosure.
[0080] In the embodiment of the present disclosure, for the current CU of HEVC, SATD cost is used to select multiple PU partitioning methods to determine the candidate PU mode corresponding to the current CU, and 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 with higher computational complexity for each PU partitioning method, preliminary selection is performed through SATD cost with lower computational complexity, and candidate PU modes can be quickly screened out based on multiple PU partitioning methods, so that only rate-distortion cost calculation needs to be performed on the candidate PU modes to quickly determine a target PU mode that the current CU ultimately corresponds to. The target PU mode includes the corresponding PU partitioning method, TU partitioning method, and PU prediction mode. Since the rate-distortion cost is still used to calculate the target PU mode in the end, it can ensure that the encoding quality is not affected while effectively reducing the computational complexity.
[0081] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0082] In addition, the present disclosure also provides a PU mode selection device, electronic device, computer-readable storage medium, and program, all of which can be used to implement any PU mode selection method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method section and are not repeated here.
[0083] FIG2 shows a block diagram of a PU mode selection device according to an embodiment of the present disclosure. As shown in FIG2 , the device 20 includes:
[0084] The first selection module 21 is configured to select, for the HEVC current CU, multiple PU partitioning modes using SATD cost, and determine a candidate PU mode corresponding to the current CU, wherein each candidate PU mode includes a corresponding PU partitioning mode and a PU prediction mode;
[0085] The second selection module 22 is configured to select candidate PU modes based on rate-distortion cost and determine a target PU mode corresponding to the current CU, wherein the target PU mode includes a corresponding PU partitioning mode, TU partitioning mode, and PU prediction mode.
[0086] In a possible implementation, the first selection module 21 includes:
[0087] The first selection submodule is configured to select a plurality of non-2N×2N PU partitioning modes by using a SATD cost, and determine a non-2N×2N candidate PU partitioning mode corresponding to the current CU;
[0088] The second selection submodule is configured to select a candidate PU partitioning method by using SATD cost and code rate cost to determine a candidate PU mode, wherein the candidate PU partitioning method includes a 2N×2N PU partitioning method and a non-2N×2N candidate PU partitioning method.
[0089] In a possible implementation, the first selection submodule includes:
[0090] A first partitioning unit is configured to partition a current CU based on any non-2N×2N PU partitioning mode to obtain a plurality of PUs in the non-2N×2N PU partitioning mode;
[0091] A first cost determining unit is configured to determine a SATD cost corresponding to the non-2N×2N PU partitioning mode based on multiple PUs in the non-2N×2N PU partitioning mode;
[0092] The first selection unit is configured to determine, based on the SATD cost corresponding to each non-2N×2N PU partitioning mode, a non-2N×2N PU partitioning mode with the minimum SATD cost as a non-2N×2N candidate PU partitioning mode.
[0093] In a possible implementation, the first cost determination unit is specifically configured to:
[0094] For any PU in the non-2N×2N PU partitioning mode, determine a predicted pixel block corresponding to the PU based on a motion estimation mode;
[0095] Determine 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;
[0096] The SATD cost corresponding to each PU in the non-2N×2N PU partitioning mode is summed to determine the SATD cost corresponding to the non-2N×2N PU partitioning mode.
[0097] In a possible implementation, the second selection submodule includes:
[0098] A second partitioning unit is configured to partition the current CU based on the candidate PU partitioning mode to obtain at least one PU under the candidate PU partitioning mode;
[0099] A first determining unit is configured to set a different PU prediction mode for each PU in the candidate PU partitioning mode, and obtain multiple PU modes corresponding to the candidate PU partitioning mode, where the different PU prediction modes include: an inter-frame PU prediction mode and an intra-frame PU prediction mode;
[0100] A second cost determination unit is configured to determine, for any PU mode, based on a PU prediction mode corresponding to each PU in the PU mode, using a SATD cost and a bit rate cost to determine a sum of costs corresponding to the PU mode;
[0101] The second determining unit is configured to determine a candidate PU mode according to the sum of the costs corresponding to each PU mode.
[0102] In a possible implementation, the second cost determination unit is specifically configured to:
[0103] For any PU in the PU mode, determine the motion vector and predicted pixel block corresponding to the PU based on the PU prediction mode corresponding to the PU;
[0104] Determine 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;
[0105] Determine the bit rate cost corresponding to the PU based on the motion vector and residual pixel block corresponding to the PU;
[0106] The SATD cost and the bit rate cost corresponding to each PU in the PU mode are summed to determine the sum of the costs corresponding to the PU mode.
[0107] In a 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;
[0108] The first determining unit is specifically configured to:
[0109] When the candidate PU partitioning mode is a 2N×2N PU partitioning mode, setting an AMVP mode and a Merge mode for a PU in the 2N×2N PU partitioning mode, respectively, to obtain two first PU modes corresponding to the 2N×2N PU partitioning mode;
[0110] When the candidate PU partitioning mode is a 2N×2N PU partitioning mode, a first candidate intra PU prediction mode and a second candidate intra PU prediction mode are respectively set for a PU in the 2N×2N PU partitioning mode, to obtain two second PU modes corresponding to the 2N×2N PU partitioning mode;
[0111] When the candidate PU partitioning mode is a non-2N×2N candidate PU partitioning mode, an AMVP mode and a Merge mode are set for each PU in the non-2N×2N candidate PU partitioning mode to obtain at least four third PU modes corresponding to the non-2N×2N candidate PU partitioning mode.
[0112] In a possible implementation, the second determining unit is specifically configured to:
[0113] Among the at least four third PU modes, a PU mode with the smallest sum of selection costs is determined as a first selected PU mode;
[0114] Among the two first PU modes and the first selected PU mode, the PU mode with the smallest sum of selection costs is determined as a candidate PU mode, and the PU mode with the second smallest sum of selection costs is determined as a second selected PU mode;
[0115] Among the two second PU modes, the PU mode with the smallest sum of selection costs is determined as the third selected PU mode;
[0116] Among the second selected PU mode and the third selected PU mode, the PU mode with the smallest sum of costs is selected and determined as a candidate PU mode.
[0117] In a possible implementation, the second selection module 22 is specifically configured to:
[0118] Based on the PU partitioning mode and PU prediction mode corresponding to each candidate PU mode, determine the rate-distortion cost corresponding to each candidate PU mode under different TU partitioning modes;
[0119] The target PU mode is determined based on the candidate PU mode with the minimum rate-distortion cost and the corresponding TU partitioning method.
[0120] This method has a specific technical connection with the internal structure of the computer system, and can solve the technical problem of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the hardware processing speed, etc.), thereby obtaining the technical effect of improving the internal performance of the computer system in accordance with the laws of nature.
[0121] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0122] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0123] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
[0124] An embodiment of the present disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0125] The electronic device may be provided as a terminal, a server, or other forms of devices.
[0126] FIG3 shows a block diagram of an electronic device according to an embodiment of the present disclosure. Referring to FIG3 , the electronic device 1900 can be provided as a server or a terminal device. Referring to FIG3 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions that can be executed by the processing component 1922, such as an application. The application stored in the memory 1932 can include one or more modules, each of which corresponds to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0127] The electronic device 1900 may further include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open-source Unix-like operating system (FreeBSD TM ) or similar.
[0128] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0129] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0130] Computer-readable storage media can be a tangible device that can hold and store the instructions used by the instruction execution device. Computer-readable storage media can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. Computer-readable storage media used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.
[0131] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0132] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state 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++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of 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., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0133] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0134] 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 device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0135] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0136] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0137] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0138] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0139] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean 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.
[0140] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, 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 type of personal information processed.
[0141] While various embodiments of the present disclosure have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of 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 selected to best explain the principles of the embodiments, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A prediction unit (PU) mode selection method, characterized in that: The method is applied to high-efficiency video coding (HEVC), and the method includes: For the HEVC current coding unit CU, multiple PU partitioning modes are selected using the sum of absolute transform differences (SATD) cost to determine a candidate PU mode corresponding to the current CU, where the candidate PU mode includes a corresponding PU partitioning mode and a PU prediction mode; The candidate PU mode is selected based on the rate-distortion cost to determine a target PU mode corresponding to the current CU, wherein the target PU mode includes a corresponding PU partitioning mode, a transform unit TU partitioning mode, and a PU prediction mode.
2. The method according to claim 1, characterized in that The method of selecting multiple PU partitioning modes for the current HEVC CU using the SATD cost to determine the candidate PU mode includes: Selecting multiple non-2N×2N PU partitioning modes using a SATD cost to determine a non-2N×2N candidate PU partitioning mode corresponding to the current CU; The candidate PU partitioning mode is selected by using the SATD cost and the coding rate cost to determine the candidate PU mode, wherein the candidate PU partitioning mode includes a 2N×2N PU partitioning mode and the non-2N×2N candidate PU partitioning mode.
3. The method according to claim 2, characterized in that The selecting a plurality of non-2N×2N PU partitioning modes by using the SATD cost to determine a non-2N×2N candidate PU partitioning mode corresponding to the current CU includes: For any non-2N×2N PU partitioning mode, partition the current CU based on the non-2N×2N PU partitioning mode to obtain multiple PUs in the non-2N×2N PU partitioning mode; Determining, based on multiple PUs in the non-2N×2N PU partitioning mode, a SATD cost corresponding to the non-2N×2N PU partitioning mode; Based on the SATD cost corresponding to each non-2N×2N PU partitioning mode, a non-2N×2N PU partitioning mode with the minimum SATD cost is determined as the non-2N×2N candidate PU partitioning mode.
4. The method according to claim 3, characterized in that The determining, based on the plurality of PUs in the non-2N×2N PU partitioning mode, a SATD cost corresponding to the non-2N×2N PU partitioning mode includes: For any PU in the non-2N×2N PU partitioning mode, determine a predicted pixel block corresponding to the PU based on a motion estimation mode; Determine a SATD cost corresponding to the PU based on a residual pixel block between an original pixel block and a predicted pixel block corresponding to the PU; The SATD cost corresponding to each PU in the non-2N×2N PU partitioning mode is summed to determine the SATD cost corresponding to the non-2N×2N PU partitioning mode.
5. The method according to claim 2, characterized in that The selecting of the candidate PU partitioning method by using the SATD cost and the bit rate cost to determine the candidate PU mode includes: Divide the current CU based on the candidate PU partitioning mode to obtain at least one PU under the candidate PU partitioning mode; Setting a different PU prediction mode for each PU under the candidate PU partitioning mode to obtain multiple PU modes corresponding to the candidate PU partitioning mode, where the different PU prediction modes include: an inter-frame PU prediction mode and an intra-frame PU prediction mode; For any PU mode, based on the PU prediction mode corresponding to each PU in the PU mode, using SATD cost and bit rate cost, determine the sum of costs corresponding to the PU mode; The candidate PU mode is determined according to the sum of the costs corresponding to each PU mode.
6. The method according to claim 5, characterized in that For any PU mode, based on the PU prediction mode corresponding to each PU in the PU mode, using the SATD cost and the bit rate cost, determining the sum of the costs corresponding to the PU mode includes: For any PU in the PU mode, determine a motion vector and a predicted pixel block corresponding to the PU based on the PU prediction mode corresponding to the PU; Determine a SATD cost corresponding to the PU based on a residual pixel block between an original pixel block and a predicted pixel block corresponding to the PU; Determine a bit rate cost corresponding to the PU based on a motion vector and a residual pixel block corresponding to the PU; The SATD cost and the bit rate cost corresponding to each PU in the PU mode are summed to determine the sum of the costs corresponding to the PU mode.
7. The method according to claim 5 or 6, characterized in that The inter-frame PU prediction mode includes: Advanced Motion Vector Prediction AMVP mode and Merge mode; the intra-frame PU prediction mode includes: first candidate intra-frame PU prediction mode and second candidate intra-frame PU prediction mode; The step of setting a different PU prediction mode for each PU in the candidate PU partitioning mode to obtain multiple PU modes corresponding to the candidate PU partitioning mode includes: When the candidate PU partitioning mode is the 2N×2N PU partitioning mode, setting an AMVP mode and a Merge mode for a PU in the 2N×2N PU partitioning mode, respectively, to obtain two first PU modes corresponding to the 2N×2N PU partitioning mode; When the candidate PU partitioning mode is the 2N×2N PU partitioning mode, setting a first candidate intra PU prediction mode and a second candidate intra PU prediction mode for a PU in the 2N×2N PU partitioning mode, respectively, to obtain two second PU modes corresponding to the 2N×2N PU partitioning mode; When the candidate PU partitioning method is the non-2N×2N candidate PU partitioning method, an AMVP mode and a 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.
8. The method according to claim 7, characterized in that The determining the candidate PU mode according to the sum of the costs corresponding to each PU mode includes: Among the at least four third PU modes, a PU mode with the smallest sum of selection costs is determined as a first selected PU mode; Among the two first PU modes and the first selected PU mode, the PU mode with the smallest sum of selection costs is determined as one of the candidate PU modes, and the PU mode with the second smallest sum of selection costs is determined as the second selected PU mode; Among the two second PU modes, the PU mode with the smallest sum of selection costs is determined as the third selected PU mode; Among the second selected PU mode and the third selected PU mode, the PU mode with the smallest sum of costs is selected and determined as the candidate PU mode.
9. The method according to claim 1, characterized in that The candidate PU mode is selected based on the utilization distortion cost to determine a target PU mode corresponding to the current CU, including: Based on the PU partitioning mode and PU prediction mode corresponding to each candidate PU mode, determine the rate-distortion cost corresponding to each candidate PU mode under different TU partitioning modes; The target PU mode is determined according to the candidate PU mode with the minimum rate-distortion cost and the corresponding TU partitioning method.
10. A PU mode selection device, characterized in that: The device is applied to HEVC, and the device includes: A first selection module is configured to select, for an HEVC current CU, a plurality of PU partitioning modes using a SATD cost, and determine a candidate PU mode corresponding to the current CU, wherein each candidate PU mode includes a corresponding PU partitioning mode and a PU prediction mode; The second selection module is used to select the candidate PU mode based on the utilization rate-distortion cost and determine a target PU mode corresponding to the current CU, wherein the target PU mode includes a corresponding PU partitioning mode, TU partitioning mode, and PU prediction mode.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Inter-frame prediction mode selection method based on pre-coding and coding SATD value weighting
CN110139099A
Video coding method and device, electronic equipment and storage medium
CN115278235A
Inter-frame prediction mode selection method and device for video coding
CN117156133A
Prediction unit (PU) mode selection method and device, electronic equipment and storage medium
CN118301322A
Systems and Methods for Low-Resolution Motion Estimation Searches
US20240080462A1