Coding unit CU coding mode determination method and device, electronic device and medium

By determining the rate distortion cost in candidate AMVP and Merge modes in HEVC video encoding, the target encoding mode of the CU is quickly determined, and the problem of high computational complexity in the prior art affecting the encoding speed is solved, and the acceleration rate distortion cost optimization and improving the encoding speed is achieved.

CN118301323BActive Publication Date: 2025-03-18MOORE THREADS TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410389809.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-01
Publication Date
2025-03-18
Estimated Expiration
2044-04-01

AI Technical Summary

Technical Problem

In HEVC video encoding, the method of traversing all PU modes based on rate distortion optimization is used to determine the optimal encoding mode, which has a high computational complexity and affects the video encoding speed.

Method used

A method for determining the encoding mode of the coding unit CU is proposed. By determining the first-rate distortion cost in the AMVP mode of candidate advanced motion vector prediction and the second-rate distortion cost in the candidate merge Merge mode, the target encoding mode is quickly determined.

Benefits of technology

Through AMVP mode rate distortion optimization and Merge mode rate distortion optimization that can be performed in parallel, accelerate the cost optimization of rate distortion of the CU layer and improve coding speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118301323B_ABST
    Figure CN118301323B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and in particular to a method and device for determining a coding mode of a coding unit CU, an electronic device, and a storage medium. The method is applied to high-efficiency video coding (HEVC), and the method includes: for a current CU to be coded in HEVC, determining a first rate-distortion cost of the current CU to be coded in a candidate advanced motion vector prediction (AMVP) mode; using an encoded CU with a coding dependency corresponding to the current CU to be coded, determining a second rate-distortion cost of the current CU to be coded in a candidate merge mode; based on the first rate-distortion cost and the second rate-distortion cost, determining a target coding mode corresponding to the current CU to be coded. The embodiments of the present disclosure can accelerate the rate-distortion cost optimization of the CU layer, and effectively improve the coding speed of the current CU to be coded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for determining a coding mode of a coding unit (CU), an electronic device, and a storage medium. Background Art

[0002] High Efficiency Video Coding (HEVC) has become the mainstream of video coding. More and more film and television production, video communication, radio and television broadcasting, etc. are gradually adopting the HEVC video coding standard. Among the current mainstream technologies, rate-distortion optimization technology is the main means to achieve optimal coding performance. However, since the coding unit (CU) of HEVC can be encoded using multiple prediction unit (PU) modes, the method of traversing all PU modes based on rate-distortion optimization to determine the optimal coding mode has a high computational complexity, which affects the video encoding speed. Summary of the invention

[0003] The present disclosure proposes a technical solution of a method and device for determining a coding mode of a coding unit CU, an electronic device, and a storage medium.

[0004] According to one aspect of the present disclosure, a method for determining a coding mode of a coding unit CU is provided, and the method is applied to high-efficiency video coding (HEVC). The method includes: the method is applied to high-efficiency video coding (HEVC), and the method includes: for a current CU to be encoded in HEVC, determining a first rate-distortion cost of the current CU to be encoded in a candidate advanced motion vector prediction (AMVP) mode; using an encoded CU with a coding dependency corresponding to the current CU to be encoded, determining a second rate-distortion cost of the current CU to be encoded in a candidate merge mode; and determining a target coding mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost.

[0005] In a possible implementation, the method further includes: for the current CU to be encoded, selecting multiple non-2N×2N PU partitioning modes using a sum of absolute transform differences (SATD) cost to determine a target non-2N×2N PU partitioning mode.

[0006] In a possible implementation, the candidate AMVP mode includes: a first candidate AMVP mode and a second candidate AMVP mode; the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode is determined for the HEVC current CU to be encoded, including: based on a motion estimation method, determining a first motion vector MV corresponding to each PU obtained by dividing the current CU to be encoded in a 2N×2NPU partitioning method, and a second MV corresponding to each PU obtained by dividing the current CU to be encoded in the target non-2N×2N PU partitioning method; determining the first candidate AMVP mode based on the 2N×2NPU partitioning method and the first MV; determining the second candidate AMVP mode based on the target non-2N×2N PU partitioning method and the second MV; respectively determining the first rate-distortion cost of the CU to be encoded in the first candidate AMVP mode and the second candidate AMVP mode.

[0007] In a possible implementation, the candidate Merge mode includes: a first candidate Merge mode and a second candidate Merge mode; the determining of a second rate-distortion cost of the current CU to be encoded under the candidate Merge mode by using the encoded CU with encoding dependency corresponding to the current CU to be encoded includes: constructing a Merge candidate list under a 2N×2N PU partitioning mode and a Merge candidate list under a target non-2N×2N PU partitioning mode by using the encoded CU with encoding dependency corresponding to the current CU to be encoded, wherein the Merge candidate list includes multiple predicted motion vectors MVPs; determining the first candidate Merge mode based on the Merge candidate list under the 2N×2N PU partitioning mode, and determining the second candidate Merge mode based on the Merge candidate list under the target non-2N×2N PU partitioning mode; and respectively determining the second rate-distortion costs of the CU to be encoded under the first candidate Merge mode and the second candidate Merge mode.

[0008] In a possible implementation, the determining the first candidate Merge mode based on the Merge candidate list under the 2N×2N PU partitioning mode, and determining the second candidate Merge mode based on the Merge candidate list under the target non-2N×2N PU partitioning mode, include: determining from the Merge candidate list under the 2N×2N PU partitioning mode a first target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the 2N×2N PU partitioning mode, and determining from the Merge candidate list under the target non-2N×2N PU partitioning mode a second target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning mode, wherein the target MVP is the MVP with the minimum sum of SATD cost and bit rate cost; determining the first candidate Merge mode based on the 2N×2N PU partitioning mode and the first target MVP; determining the second candidate Merge mode based on the target non-2N×2N PU partitioning mode and the second target MVP.

[0009] In a possible implementation, determining the target coding mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost includes: determining the target inter-frame prediction mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost; comparing the rate-distortion costs of the target inter-frame prediction mode and the target intra-frame prediction mode corresponding to the current CU to be encoded, and determining the prediction mode with the smallest rate-distortion cost as the target coding mode.

[0010] In a possible implementation, the method further includes: utilizing a rate-distortion cost determination module to, within a target time period for determining the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode, concurrently determine the first rate-distortion cost of the next CU to be encoded after the current CU to be encoded under the candidate AMVP mode, wherein the rate-distortion cost determination module adopts a time division multiplexing mode.

[0011] In a possible implementation, the rate-distortion cost determination module is used to determine the first rate-distortion cost of the next CU to be encoded after the current CU to be encoded under the candidate AMVP mode in parallel with the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode within a target time period, including: in response to a first time slot within the target time period, using the rate-distortion cost determination module to determine the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode; in response to a second time slot within the target time period, using the rate-distortion cost determination module to determine the first rate-distortion cost of the next CU to be encoded under the candidate AMVP mode, wherein the first time slot and the second time slot are different time slots.

[0012] According to one aspect of the present disclosure, a CU encoding mode determination device is provided, which is applied to HEVC, and the device includes: a rate-distortion cost determination module, which is used to determine, for a HEVC current CU to be encoded, a first rate-distortion cost of the current CU to be encoded under a candidate AMVP mode; the rate-distortion cost determination module is used to determine a second rate-distortion cost of the current CU to be encoded under a candidate Merge mode by using an encoded CU with an encoding dependency relationship corresponding to the current CU to be encoded; and a selection module is used to determine a target encoding mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost.

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

[0014] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.

[0015] In the disclosed embodiment, for the HEVC current CU to be encoded, the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode is determined, and the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode is determined by using the encoded CU with encoding dependency corresponding to the current CU to be encoded. By means of the AMVP mode rate-distortion optimization and the Merge mode rate-distortion optimization that can be executed in parallel, the rate-distortion cost optimization of the CU layer can be accelerated, and then based on the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode and the second rate-distortion cost under the candidate Merge mode, the target encoding mode corresponding to the current CU to be encoded can be quickly determined, thereby effectively improving the encoding speed of the current CU to be encoded.

[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit 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

[0017] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.

[0018] Figure 1 A flowchart of a method for determining a CU encoding mode according to an embodiment of the present disclosure is shown.

[0019] Figure 2 A block diagram of a CU encoding mode determination device according to an embodiment of the present disclosure is shown.

[0020] Figure 3 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

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

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

[0023] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0024] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0025] HEVC adopts a hybrid coding framework, eliminates the temporal and spatial redundancy of video frames based on intra-frame prediction and inter-frame prediction, eliminates the frequency domain redundancy of residual pixels through discrete cosine transform and quantization technology, and compresses syntax elements through arithmetic coding. The main purpose of video coding is to minimize the coding bit rate while ensuring a certain video quality, or to minimize coding distortion under the condition of mobile coding bit rate constraints. Under a fixed coding framework, in order to cope with different video contents, there are often multiple candidate coding methods. One of the main tasks of the encoder is to select the optimal coding parameters with a certain strategy to achieve the best coding performance.

[0026] Among the current mainstream technologies, the coding parameter optimization method based on rate-distortion theory, namely rate-distortion optimization technology, is the main means to achieve optimal coding performance. The rate-distortion optimization methods in HEVC encoders include rate-distortion optimization of video image groups, rate-distortion optimization of slice layers, rate-distortion optimization of coding tree units (CTU) layers, rate-distortion optimization of CU layers, rate-distortion optimization of PU layers, etc.

[0027] In HEVC, the rate-distortion optimization of the CU layer is performed by traversing all PU modes. By calculating the rate-distortion costs of all PU modes supported by the CU, the PU mode with the smallest rate-distortion cost is selected as the optimal PU mode of the CU. The PU modes include: PU partitioning mode and PU prediction mode. The inter-frame PU partitioning modes include: 2N×2N, N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, nR×2N, and the 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 transform unit (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.

[0028] The method of determining the optimal PU mode of CU based on rate-distortion optimization requires traversing each PU mode for rate-distortion optimization and selecting the PU mode with the smallest rate-distortion cost as the optimal PU mode of CU. Since the calculation of rate-distortion cost requires a series of calculations such as transformation, quantization, inverse quantization, inverse transformation, and bit rate estimation, this method based on rate-distortion optimization traversal seriously affects the encoding speed, introduces excessive power consumption in hardware video encoding, and is not suitable for low-latency encoding and high frame rate encoding application scenarios.

[0029] In order to solve the above technical problems, the embodiments of the present disclosure provide a CU coding mode determination method, which can effectively accelerate the rate-distortion optimization of the CU layer, quickly determine the optimal coding mode corresponding to the current CU to be encoded, and effectively improve the coding speed of the current CU to be encoded. The CU coding mode determination method provided by the embodiments of the present disclosure is described in detail below.

[0030] Figure 1 A flowchart of a method for determining a CU coding mode according to an embodiment of the present disclosure is shown. The method is applied to HEVC coding scenarios. The method 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 computer-readable instructions stored in a memory. Alternatively, the method can be executed by a server. Figure 1 As shown, the method includes:

[0031] In step S11, for the HEVC current CU to be encoded, a first rate-distortion cost of the current CU to be encoded under a candidate AMVP mode is determined.

[0032] The candidate AMVP mode here is the PU mode supported by the current CU to be encoded, including: the corresponding PU division method and the PU prediction mode (AMVP mode). The number of candidate AMVP modes is less than the total number of all PU modes whose inter-frame PU prediction mode is AMVP mode supported by the current CU to be encoded. The fewer the number of candidate AMVP modes, the lower the computational complexity of the subsequent execution of the AMVP mode rate-distortion optimization. However, the more the number of candidate AMVP modes, the higher the accuracy of the subsequent determination of the optimal PU mode based on rate-distortion optimization. In actual application scenarios, the number of candidate AMVP modes is flexibly set, taking into account the computational complexity and accuracy requirements, and the present disclosure does not make specific limitations on this.

[0033] Since no other reference information is required to perform AMVP mode rate-distortion optimization on the current CU to be encoded, the candidate AMVP mode corresponding to the current CU to be encoded can be directly determined, and then the AMVP mode rate-distortion optimization is performed on the current CU to be encoded to determine the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode.

[0034] The specific process of how to determine the candidate AMVP mode and how to determine the first rate distortion cost of the current CU to be encoded under the candidate AMVP mode will be described in detail later in combination with possible implementation methods of the present disclosure, and no specific limitation is made here.

[0035] In step S12, the second rate-distortion cost of the current CU to be encoded in the candidate Merge mode is determined by using the encoded CU with encoding dependency corresponding to the current CU to be encoded.

[0036] The candidate Merge mode here is the PU mode supported by the current CU to be encoded, including: the corresponding PU division method and the PU prediction mode (Merge mode). The number of candidate Merge modes is less than the total number of all PU modes whose inter-frame PU prediction mode is Merge mode supported by the current CU to be encoded. The fewer the number of candidate Merge modes, the lower the computational complexity of the subsequent Merge mode rate-distortion optimization. However, the more the number of candidate Merge modes, the higher the accuracy of the subsequent determination of the optimal PU mode based on rate-distortion optimization. In actual application scenarios, the number of candidate Merge modes is flexibly set, taking into account the computational complexity and accuracy requirements, and the present disclosure does not make specific limitations on this.

[0037] Since the Merge mode rate-distortion optimization is performed on the current CU to be encoded, it is necessary to use the encoded CU with encoding dependency corresponding to the current CU to be encoded. Therefore, it is necessary to ensure that the CUs before the current CU to be encoded have completed rate-distortion optimization before determining the candidate Merge mode corresponding to the current CU to be encoded, and then perform Merge mode rate-distortion optimization on the current CU to be encoded to determine the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode.

[0038] The specific process of how to determine the candidate Merge mode and how to determine the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode will be described in detail below in combination with possible implementation methods of the present disclosure, and no specific limitation is made here.

[0039] Since performing AMVP mode rate-distortion optimization on the next CU to be encoded after the current CU to be encoded does not need to wait for the completion of rate-distortion optimization of the current CU to be encoded, the AMVP mode rate-distortion optimization can be synchronously performed on the next CU to be encoded while performing Merge mode rate-distortion optimization on the current CU to be encoded. By performing AMVP mode rate-distortion optimization and Merge mode rate-distortion optimization in parallel, the rate-distortion cost optimization of the CU layer can be accelerated, thereby improving the encoding speed of each CU to be encoded in the CU layer.

[0040] In step S13, based on the first rate-distortion cost and the second rate-distortion cost, a target coding mode corresponding to the current CU to be encoded is determined.

[0041] The following text will describe in detail the specific process of how to determine the target coding mode corresponding to the current CU to be encoded based on the first rate-distortion cost of the current CU to be encoded in the candidate AMVP mode and the second rate-distortion cost in the candidate Merge mode, in combination with the possible implementation methods of the present disclosure. It will not be repeated here.

[0042] In the disclosed embodiment, for the HEVC current CU to be encoded, the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode is determined, and the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode is determined by using the encoded CU with encoding dependency corresponding to the current CU to be encoded. By means of the AMVP mode rate-distortion optimization and the Merge mode rate-distortion optimization that can be executed in parallel, the rate-distortion cost optimization of the CU layer can be accelerated, and then based on the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode and the second rate-distortion cost under the candidate Merge mode, the target encoding mode corresponding to the current CU to be encoded can be quickly determined, thereby effectively improving the encoding speed of the current CU to be encoded.

[0043] In a possible implementation, the method further includes: for the current CU to be encoded, selecting multiple non-2N×2N PU partitioning modes using a sum of absolute transformed differences (SATD) cost to determine a target non-2N×2N PU partitioning mode.

[0044] The multiple PU division methods here include: N×N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, nR×2N, and 2N×2N.

[0045] 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 usually used to evaluate the size of the prediction error in the frequency domain. The cost is obtained by calculating the sum of the absolute differences between the original signal and the predicted signal. In video coding and image processing, SATD cost is widely used to measure the quality of an image or signal. Compared with the rate-distortion cost, the computational complexity of SATD cost is lower.

[0046] By performing preliminary selection using the SATD cost with low computational complexity, a target non-2N×2N PU partitioning method with the smallest SATD cost can be quickly screened out from multiple PU partitioning methods. Compared with traversing multiple non-2N×2N PU partitioning methods, only the screened target non-2N×2N PU partitioning method is used to participate in subsequent rate-distortion optimization, which can effectively reduce the computational complexity.

[0047] In one example, the process of selecting multiple non-2N×2N PU partitioning modes using SATD cost to determine a target non-2N×2N PU partitioning mode corresponding to the current CU to be encoded can be used as the first stage mode selection; the process of AMVP mode rate distortion optimization can be used as the second stage mode selection; and the process of Merge mode rate distortion optimization can be used as the third stage mode selection. Each stage mode selection can use an independent software program or hardware module to perform the selection operation.

[0048] Hardware pipelining is a technology that divides the computer instruction process into multiple steps and executes them in parallel on multiple hardware processing units to speed up the execution of instructions. It can split an instruction into multiple steps and then execute these steps simultaneously on different hardware processing units, thereby realizing parallel processing of instructions. In the hardware pipeline, each processing unit only completes a specific task. These processing units can work in parallel so that new instructions are processed in each clock cycle. This method can greatly improve the execution speed and efficiency of the computer.

[0049] Since each of the above-mentioned stage mode selections uses an independent software program or hardware module to perform the selection operation, the above-mentioned stage mode selection method is conducive to the implementation of the hardware pipeline. For example, after the current CU to be encoded completes the first stage mode, the current CU to be encoded can enter the second stage mode selection. At this time, the next CU to be encoded can start the first stage mode selection without waiting for the current CU to be encoded to complete the third stage mode selection and determine the final target encoding mode before the next CU to be encoded is started, thereby effectively improving the efficiency of each CU in determining the target encoding mode, thereby improving the encoding efficiency.

[0050] In one example, for a current CU to be encoded, multiple non-2N×2N PU partitioning methods are selected using a SATD cost to determine a target non-2N×2N PU partitioning method, including: for any non-2N×2N PU partitioning method, dividing the current CU to be encoded 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, determining the SATD cost corresponding to the non-2N×2N PU partitioning method; based on the SATD cost corresponding to each non-2N×2N PU partitioning method, determining the non-2N×2N PU partitioning method with the smallest SATD cost as the target non-2N×2N PU partitioning method.

[0051] When the first-stage mode selection is performed using the 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 target non-2N×2N PU partitioning method selected for the first-stage mode selection.

[0052] In one example, 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, based on a motion estimation method, determining a motion vector (Motion Vector, MV) and a predicted pixel block corresponding to the PU; based on a residual pixel block between an original pixel block and a predicted pixel block corresponding to the PU, determining the SATD cost 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.

[0053] In the first stage mode selection, the PU prediction mode may not be considered, but the MV and predicted pixel block corresponding to each PU are determined based on the motion estimation method, and then the SATD cost corresponding to each PU is determined to reduce the computational complexity of the first stage mode selection.

[0054] For any non-2N×2N PU partitioning method, the current CU to be encoded is divided based on the non-2N×2N PU partitioning method to obtain multiple PUs under the non-2N×2N PU partitioning method. For example, the current CU to be encoded is divided according to other non-2N×2N PU partitioning methods other than the N×N PU partitioning method to obtain 2 PUs; the current CU to be encoded is divided according to the N×N PU partitioning method to obtain 4 PUs.

[0055] For any PU, the MV and predicted pixel block corresponding to the PU are determined based on the motion estimation method; 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 the relevant technology, and the present disclosure does not make specific limitations on this.

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

[0057] After the non-2N×2N PU partitioning method with the minimum SATD cost is determined as the target non-2N×2N PU partitioning method selected in the first stage mode selection, the second stage mode selection can be performed on the current CU to be encoded based on the target non-2N×2N PU partitioning method and the 2N×2N PU partitioning method. Compared with traversing multiple PU partitioning methods, only the 2N×2N PU partitioning method and the target non-2N×2N PU partitioning method selected by the first stage mode selection participate in the subsequent second and third stage rate-distortion optimization, which can effectively reduce the computational complexity.

[0058] In a possible implementation, the candidate AMVP mode includes: a first candidate AMVP mode and a second candidate AMVP mode; for the HEVC current CU to be encoded, determining the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode, including: based on the motion estimation method, determining the first MV corresponding to each PU obtained by dividing the current CU to be encoded in the 2N×2N PU partitioning method, and the second MV corresponding to each PU obtained by dividing the current CU to be encoded in the target non-2N×2N PU partitioning method; based on the 2N×2N PU partitioning method and the first MV, determining the first candidate AMVP mode; based on the target non-2N×2N PU partitioning method and the second MV, determining the second candidate AMVP mode; respectively determining the first rate-distortion cost of the CU to be encoded in the first candidate AMVP mode and the second candidate AMVP mode.

[0059] Based on the motion estimation method, determine the first MV corresponding to each PU obtained by dividing the current CU to be encoded in the 2N×2N PU partitioning method, and the second MV corresponding to each PU obtained by dividing the current CU to be encoded in the target non-2N×2N PU partitioning method. Among them, the second MV corresponding to each PU obtained by dividing the current CU to be encoded in the target non-2N×2N PU partitioning method can directly use the MV determined in the first stage mode selection.

[0060] Based on the 2N×2N PU partitioning method and the first MV corresponding to each PU obtained by dividing the current CU to be encoded in the 2N×2N PU partitioning method, the first candidate AMVP mode, that is, the first candidate PU mode, is determined, including: 2N×2N PU partitioning method, PU prediction mode (AMVP mode), and MV corresponding to each PU.

[0061] Based on the target non-2N×2N PU partitioning method and the second MV corresponding to each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning method, a second candidate AMVP mode, that is, the second candidate PU mode, is determined, including: the target non-2N×2N PU partitioning method, the PU prediction mode (AMVP mode), and the MV corresponding to each PU.

[0062] In the second mode selection stage, the 2N×2N PU partitioning mode and the target non-2N×2N PU partitioning mode respectively determine a candidate PU mode of the AMVP mode for rate-distortion cost optimization. In other words, the first rate-distortion cost of the current CU to be encoded under the first candidate AMVP mode and the second candidate AMVP mode is determined respectively.

[0063] In one example, the first rate-distortion cost of the current CU to be encoded under the first candidate AMVP mode and the second candidate AMVP mode is determined respectively, including: determining the rate-distortion cost corresponding to the first candidate AMVP mode under different TU partitioning methods; and determining the rate-distortion cost corresponding to the second candidate AMVP mode under different TU partitioning methods.

[0064] In a possible implementation, the candidate Merge mode includes: a first candidate Merge mode and a second candidate Merge mode; using the encoded CU with coding dependency corresponding to the current CU to be encoded, determining the second rate-distortion cost of the current CU to be encoded in the candidate Merge mode, including: using the encoded CU with coding dependency corresponding to the current CU to be encoded, constructing a Merge candidate list under a 2N×2N PU partitioning method and a Merge candidate list under a target non-2N×2N PU partitioning method, wherein the Merge candidate list includes multiple predicted motion vectors (Motion Vector Prediction, MVP); determining the first candidate Merge mode based on the Merge candidate list under the 2N×2N PU partitioning method, and determining the second candidate Merge mode based on the Merge candidate list under the target non-2N×2N PU partitioning method; respectively determining the second rate-distortion cost of the CU to be encoded in the first candidate Merge mode and the second candidate Merge mode.

[0065] In a possible implementation, a first candidate Merge mode is determined based on a Merge candidate list under a 2N×2N PU partitioning mode, and a second candidate Merge mode is determined based on a Merge candidate list under a target non-2N×2N PU partitioning mode, including: determining, from the Merge candidate list under the 2N×2N PU partitioning mode, a first target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the 2N×2N PU partitioning mode, and determining, from the Merge candidate list under the target non-2N×2N PU partitioning mode, a second target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning mode, wherein the target MVP is the MVP with the smallest sum of the SATD cost and the bit rate cost; determining a first candidate Merge mode based on the 2N×2N PU partitioning mode and the first target MVP; and determining a second candidate Merge mode based on the target non-2N×2N PU partitioning mode and the second target MVP.

[0066] Bitrate cost refers to the cost paid to reduce the compression rate of image data in video encoding. Bitrate is an indicator of data compression efficiency. The lower the bitrate, the higher the compression rate and the greater the loss of image quality. Compared with rate-distortion cost, the computational complexity of bitrate cost is lower.

[0067] By using the SATD cost and bit rate cost with lower computational complexity for selection, the MVP with the smallest sum of SATD cost and bit rate cost in the Merge candidate list can be quickly determined to construct the candidate Merge mode.

[0068] For each PU obtained by dividing the current CU to be encoded under the 2N×2N PU partitioning method, determine the predicted pixel block corresponding to the PU under each MVP in the Merge candidate list under the 2N×2N PU partitioning method; subtract the original pixel block corresponding to the PU from the predicted pixel block corresponding to the PU under each MVP to obtain the residual pixel block corresponding to the PU under each MVP; perform SATD cost calculation on the residual pixel block corresponding to the PU under each MVP to obtain the SATD cost corresponding to the PU under each MVP; encode based on the residual pixel block corresponding to the PU under each MVP, and determine the bit rate cost corresponding to the PU under each MVP based on the encoded data; further, the MVP with the smallest sum of the SATD cost and the bit rate cost can be determined as the first target MVP corresponding to the PU under the 2N×2N PU partitioning method.

[0069] For each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning method, determine the predicted pixel block corresponding to the PU under each MVP in the Merge candidate list under the target non-2N×2N PU partitioning method; subtract the original pixel block corresponding to the PU from the predicted pixel block corresponding to the PU under each MVP to obtain the residual pixel block corresponding to the PU under each MVP; perform SATD cost calculation on the residual pixel block corresponding to the PU under each MVP to obtain the SATD cost corresponding to the PU under each MVP; encode based on the residual pixel block corresponding to the PU under each MVP, and determine the code rate cost corresponding to the PU under each MVP based on the encoded data; further, the MVP with the smallest sum of the SATD cost and the code rate cost can be determined as the second target MVP corresponding to the PU under the target non-2N×2N PU partitioning method.

[0070] Based on the 2N×2N PU partitioning method and the first target MVP corresponding to each PU obtained by dividing the current CU to be encoded in the 2N×2N PU partitioning method, the first candidate Merge mode, that is, the third candidate PU mode, is determined, including: 2N×2NPU partitioning method, PU prediction mode (Merge mode), and target MVP corresponding to each PU.

[0071] Based on the target non-2N×2N PU partitioning method and the second target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning method, a second candidate Merge mode, that is, the fourth candidate PU mode, is determined, including: the target non-2N×2N PU partitioning method, the PU prediction mode (Merge mode), and the target MVP corresponding to each PU.

[0072] In the third mode selection stage, the 2N×2N PU partitioning mode and the target non-2N×2N PU partitioning mode respectively determine a candidate PU mode of the Merge mode for rate-distortion cost optimization. In other words, the second rate-distortion cost of the current CU to be encoded in the first candidate Merge mode and the second candidate Merge mode is respectively determined.

[0073] In one example, the second rate-distortion cost of the current CU to be encoded under the first candidate Merge mode and the second candidate Merge mode is determined respectively, including: determining the rate-distortion cost corresponding to the first candidate Merge mode under different TU partitioning methods; and determining the rate-distortion cost corresponding to the second candidate Merge mode under different TU partitioning methods.

[0074] In a possible implementation, a target coding mode corresponding to the current CU to be encoded is determined based on a first rate-distortion cost and a second rate-distortion cost, including: determining a target inter-frame prediction mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost; comparing the rate-distortion costs of the target inter-frame prediction mode and the target intra-frame prediction mode corresponding to the current CU to be encoded, and determining a prediction mode with a smaller rate-distortion cost as the target coding mode.

[0075] From the candidate AMVP modes (the first candidate AMVP mode, the second candidate AMVP mode), and the candidate Merge modes (the first candidate Merge mode, the second candidate Merge mode), the target inter-frame prediction mode with the lowest rate-distortion cost is screened out, including: PU partitioning method (2N×2N PU partitioning method or target non-2N×2N PU partitioning method), PU prediction mode (AMVP mode or Merge mode), MV corresponding to each PU or target MVP, and TU partitioning method.

[0076] The target intra prediction mode may be an optimal intra prediction mode selected from 35 intra prediction modes supported by the current CU to be encoded. The specific selection method may refer to related technologies, and the present disclosure does not make any specific limitation on this.

[0077] The rate-distortion costs of the target inter-frame prediction mode and the target intra-frame prediction mode are compared, and the prediction mode with the smaller rate-distortion cost is determined as the target coding mode corresponding to the current CU to be encoded, so that the encoding process of the current CU can take into account different video coding scenario requirements such as inter-frame coding and intra-frame coding.

[0078] In the existing HEVC video coding standard implementation, the rate-distortion optimization is performed on each PU mode supported by the current CU to be encoded in a traversal manner. In the hardware implementation, if multiple rate-distortion cost determination modules (including transform quantization, inverse quantization and inverse transformation, distortion calculation, bit rate estimation and other modules) are used, it will cause excessive occupation of hardware resources; if one rate-distortion cost determination module is used, the encoding speed of the current CU to be encoded will be very slow.

[0079] In a possible implementation, the method further includes: utilizing a rate-distortion cost determination module to, during a time period for determining a second rate-distortion cost of a current CU to be encoded under a candidate Merge mode, concurrently determine a first rate-distortion cost of a next CU to be encoded after the current CU to be encoded under a candidate AMVP mode, wherein the rate-distortion cost determination module adopts a time division multiplexing mode.

[0080] In the disclosed embodiment, since the execution of AMVP mode rate-distortion optimization for the next CU to be encoded after the current CU to be encoded does not need to wait for the completion of rate-distortion optimization of the current CU to be encoded, while executing the Merge mode rate-distortion optimization of the third mode selection stage for the current CU to be encoded, the AMVP mode rate-distortion optimization of the second mode selection stage can be executed in parallel for the next CU to be encoded. At this time, in the hardware implementation, only one rate-distortion cost determination module can be set, and the rate-distortion cost determination module is set to adopt a time-division multiplexing mode, so as to realize the process of executing the Merge mode rate-distortion optimization of the third mode selection stage for the current CU to be encoded, and the process of executing the AMVP mode rate-distortion optimization of the second mode selection stage for the next CU to be encoded, which are executed on the same rate-distortion cost determination module in a time-division multiplexing manner, thereby effectively reducing the occupation of hardware resources.

[0081] In one possible implementation, a rate-distortion cost determination module is used to determine the first rate-distortion cost of the next CU to be encoded under the candidate AMVP mode in parallel with the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode within a target time period, including: in response to a first time slot within the target time period, the rate-distortion cost determination module determines the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode; in response to a second time slot within the target time period, the rate-distortion cost determination module determines the first rate-distortion cost of the next CU to be encoded under the candidate AMVP mode, wherein the first time slot and the second time slot are different time slots.

[0082] The target time period for determining the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode is divided into multiple time slots, and different time slots are allocated to the current CU to be encoded and the next CU to be encoded, so that in response to the first time slot allocated to the current CU to be encoded within the target time period, the rate-distortion cost determination module is used to determine the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode, and in response to the second time slot allocated to the next CU to be encoded within the target time period, the rate-distortion cost determination module is used to determine the first rate-distortion cost of the next CU to be encoded under the candidate AMVP mode, thereby effectively utilizing a hardware rate-distortion cost determination module to execute the Merge mode rate-distortion optimization process of the third mode selection stage of the current CU to be encoded and the AMVP mode rate-distortion optimization process of the second mode selection stage of the next CU to be encoded in parallel through time division multiplexing.

[0083] In the disclosed embodiment, for the HEVC current CU to be encoded, the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode is determined, and the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode is determined by using the encoded CU with encoding dependency corresponding to the current CU to be encoded. By means of the AMVP mode rate-distortion optimization and the Merge mode rate-distortion optimization that can be executed in parallel, the rate-distortion cost optimization of the CU layer can be accelerated, and then based on the first rate-distortion cost of the current CU to be encoded under the candidate AMVP mode and the second rate-distortion cost under the candidate Merge mode, the target encoding mode corresponding to the current CU to be encoded can be quickly determined, thereby effectively improving the encoding speed of the current CU to be encoded.

[0084] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0085] In addition, the present disclosure also provides a CU encoding mode determination device, an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any CU encoding mode determination method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

[0086] Figure 2 A block diagram of a CU coding mode determination device according to an embodiment of the present disclosure is shown. The CU coding mode determination device is applied to HEVC coding scenarios. Figure 2 As shown, the device 20 includes:

[0087] The rate-distortion cost determination module 21 is used to determine the first rate-distortion cost of the current CU to be encoded in the candidate AMVP mode for the current CU to be encoded of the HEVC;

[0088] The rate-distortion cost determination module 21 is used to determine the second rate-distortion cost of the current CU to be encoded in the candidate Merge mode by using the encoded CU with encoding dependency corresponding to the current CU to be encoded;

[0089] The selection module 22 is used to determine a target coding mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost.

[0090] In a possible implementation, the apparatus 20 further includes: a PU partitioning mode selection module;

[0091] The PU partitioning mode selection module is used to select a plurality of non-2N×2N PU partitioning modes for the current CU to be encoded by using the SATD cost, and determine a target non-2N×2N PU partitioning mode.

[0092] In one possible implementation, the candidate AMVP modes include: a first candidate AMVP mode and a second candidate AMVP mode;

[0093] The rate-distortion cost determination module 21 is specifically used for:

[0094] Determine, based on a motion estimation method, a first motion vector MV corresponding to each PU obtained by dividing the current CU to be encoded in a 2N×2N PU partitioning method, and a second MV corresponding to each PU obtained by dividing the current CU to be encoded in a target non-2N×2N PU partitioning method;

[0095] Determine a first candidate AMVP mode based on a 2N×2N PU partitioning method and a first MV;

[0096] Determine a second candidate AMVP mode based on the target non-2N×2N PU partitioning mode and the second MV;

[0097] The first rate-distortion costs of the CU to be encoded under the first candidate AMVP mode and the second candidate AMVP mode are determined respectively.

[0098] In a possible implementation, the candidate Merge modes include: a first candidate Merge mode and a second candidate Merge mode;

[0099] The rate-distortion cost determination module 21 is specifically used for:

[0100] Using the coded CU with coding dependency corresponding to the current CU to be coded, a Merge candidate list under a 2N×2N PU partitioning mode and a Merge candidate list under a target non-2N×2N PU partitioning mode are constructed, wherein the Merge candidate list includes multiple predicted motion vectors MVP;

[0101] Determine a first candidate Merge mode based on the Merge candidate list in the 2N×2N PU partitioning mode, and determine a second candidate Merge mode based on the Merge candidate list in the target non-2N×2N PU partitioning mode;

[0102] The second rate-distortion cost of the CU to be encoded in the first candidate Merge mode and the second candidate Merge mode is determined respectively.

[0103] In a possible implementation, the rate-distortion cost determination module 21 is specifically configured to:

[0104] From the Merge candidate list under the 2N×2N PU partitioning mode, determine the first target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the 2N×2N PU partitioning mode, and from the Merge candidate list under the target non-2N×2N PU partitioning mode, determine the second target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning mode, wherein the target MVP is the MVP with the smallest sum of the SATD cost and the bit rate cost;

[0105] Based on the 2N×2N PU partitioning method and the first target MVP, determine the first candidate Merge mode;

[0106] Based on the target non-2N×2N PU partitioning mode and the second target MVP, a second candidate Merge mode is determined.

[0107] In a possible implementation, the selection module 22 is specifically configured to:

[0108] Determine a target inter prediction mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost;

[0109] The rate-distortion costs of the target inter-frame prediction mode and the target intra-frame prediction mode corresponding to the current CU to be encoded are compared, and the prediction mode with the smallest rate-distortion cost is determined as the target coding mode.

[0110] In a possible implementation, the rate-distortion cost determination module 21 is specifically configured to:

[0111] During the target time period for determining the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode, the first rate-distortion cost of the next CU to be encoded after the current CU to be encoded under the candidate AMVP mode is determined in parallel, wherein the rate-distortion cost determination module 21 adopts a time division multiplexing mode.

[0112] In a possible implementation, the rate-distortion cost determination module 21 is specifically configured to:

[0113] In response to a first time slot in a target time period, the rate-distortion cost determination module 21 is used to determine a second rate-distortion cost of the current CU to be encoded in the candidate Merge mode;

[0114] In response to the second time slot in the target time period, the rate-distortion cost determination module 21 determines a first rate-distortion cost of a next CU to be encoded in the candidate AMVP mode, wherein the first time slot and the second time slot are different time slots.

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

[0116] 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, and for the sake of brevity, it will not be repeated here.

[0117] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

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

[0119] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the 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.

[0120] The electronic device may be provided as a terminal, a server, or a device in other forms.

[0121] Figure 3 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 3 , the electronic device 1900 can be provided as a server or a terminal device. Figure 3 , 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 executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0122] The electronic device 1900 may also 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.

[0123] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0124] The present disclosure may be a system, a method and / or a 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.

[0125] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium 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 medium 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 disk 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. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0126] 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, optical fiber transmissions, wireless transmissions, 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 for storage in the computer-readable storage medium in each computing / processing device.

[0127] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related 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++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely 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 completely 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., using 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 customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0128] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0129] 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 that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0130] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating 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 boxes in the flowchart and / or block diagram.

[0131] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0132] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.

[0133] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0134] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0135] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are 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 he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, 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.

[0136] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for determining a coding mode of a coding unit CU, characterized in that: The method is applied to high efficiency video coding (HEVC), and the method comprises: For the HEVC current CU to be encoded, multiple non-2N×2N PU partitioning methods are selected to determine a target non-2N×2N PU partitioning method; For a HEVC current CU to be encoded, determining a first rate-distortion cost of the current CU to be encoded in a candidate advanced motion vector prediction AMVP mode, wherein the PU partitioning method corresponding to each candidate AMVP mode includes: the target non-2N×2N PU partitioning method and the 2N×2N PU partitioning method; Determine, by using the encoded CU with encoding dependency corresponding to the current CU to be encoded, a second rate-distortion cost of the current CU to be encoded in a candidate merge mode, wherein the PU partitioning mode corresponding to each candidate Merge mode includes: the target non-2N×2N PU partitioning mode and the 2N×2N PU partitioning mode; Based on the first rate-distortion cost and the second rate-distortion cost, a target coding mode corresponding to the current CU to be encoded is determined.

2. The method according to claim 1, characterized in that: The method of selecting a plurality of non-2N×2N PU partitioning modes for the current HEVC CU to be encoded and determining a target non-2N×2N PU partitioning mode includes: For the current CU to be encoded, multiple non-2N×2N PU partitioning modes are selected using the Sum of Absolute Transform Difference (SATD) cost to determine the target non-2N×2N PU partitioning mode.

3. The method according to claim 2, characterized in that The candidate AMVP modes include: a first candidate AMVP mode and a second candidate AMVP mode; The determining, for the HEVC current CU to be encoded, a first rate-distortion cost of the current CU to be encoded in the candidate AMVP mode includes: Determine, based on a motion estimation method, a first motion vector MV corresponding to each PU obtained by dividing the current CU to be encoded in a 2N×2N PU partitioning method, and a second MV corresponding to each PU obtained by dividing the current CU to be encoded in the target non-2N×2N PU partitioning method; Determine the first candidate AMVP mode based on the 2N×2N PU partitioning method and the first MV; Determine the second candidate AMVP mode based on the target non-2N×2N PU partitioning mode and the second MV; The first rate-distortion cost of the CU to be encoded in the first candidate AMVP mode and the second candidate AMVP mode is determined respectively.

4. The method according to claim 2, characterized in that: The candidate Merge modes include: a first candidate Merge mode and a second candidate Merge mode; The determining, by using the encoded CU with the encoding dependency corresponding to the current CU to be encoded, the second rate-distortion cost of the current CU to be encoded in the candidate Merge mode includes: Using the encoded CU with encoding dependency corresponding to the current CU to be encoded, constructing a Merge candidate list under a 2N×2N PU partitioning mode and a Merge candidate list under the target non-2N×2N PU partitioning mode, wherein the Merge candidate list includes multiple predicted motion vectors MVP; Determine the first candidate Merge mode based on the Merge candidate list under the 2N×2N PU partitioning mode, and determine the second candidate Merge mode based on the Merge candidate list under the target non-2N×2N PU partitioning mode; The second rate-distortion cost of the to-be-encoded CU in the first candidate Merge mode and the second candidate Merge mode is determined respectively.

5. The method according to claim 4, characterized in that The determining the first candidate Merge mode based on the Merge candidate list in the 2N×2N PU partitioning mode, and determining the second candidate Merge mode based on the Merge candidate list in the target non-2N×2N PU partitioning mode, includes: Determine, from the Merge candidate list under the 2N×2N PU partitioning mode, a first target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the 2N×2N PU partitioning mode, and determine, from the Merge candidate list under the target non-2N×2N PU partitioning mode, a second target MVP corresponding to each PU obtained by dividing the current CU to be encoded under the target non-2N×2N PU partitioning mode, wherein the target MVP is the MVP with the smallest sum of the SATD cost and the bit rate cost; Determine the first candidate Merge mode based on the 2N×2N PU partitioning method and the first target MVP; Based on the target non-2N×2N PU partitioning mode and the second target MVP, the second candidate Merge mode is determined.

6. The method according to claim 1, characterized in that The determining, based on the first rate-distortion cost and the second rate-distortion cost, a target coding mode corresponding to the current CU to be encoded includes: Determining a target inter prediction mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost; The target inter-frame prediction mode and the target intra-frame prediction mode corresponding to the current CU to be encoded are compared in terms of rate-distortion costs, and the prediction mode with the smallest rate-distortion cost is determined as the target encoding mode.

7. The method according to claim 1, characterized in that The method further comprises: A rate-distortion cost determination module is used to determine the first rate-distortion cost of the next CU to be encoded after the current CU to be encoded under the candidate AMVP mode in parallel within a target time period for determining the second rate-distortion cost of the current CU to be encoded under the candidate Merge mode, wherein the rate-distortion cost determination module adopts a time division multiplexing mode.

8. The method according to claim 7, characterized in that The utilization distortion cost determination module, in parallel with determining the first rate distortion cost of the next CU to be encoded after the current CU to be encoded in the candidate AMVP mode within the target time period for determining the second rate distortion cost of the current CU to be encoded in the candidate Merge mode, includes: In response to a first time slot in the target time period, determining, using the rate-distortion cost determination module, a second rate-distortion cost of the current CU to be encoded in the candidate Merge mode; In response to a second time slot within the target time period, the rate-distortion cost determination module is used to determine a first rate-distortion cost of the next CU to be encoded in the candidate AMVP mode, wherein the first time slot and the second time slot are different time slots.

9. A CU coding mode determination device, characterized in that: The device is applied to HEVC, and the device includes: A PU partitioning mode selection module is used to select multiple non-2N×2N PU partitioning modes for the current HEVC CU to be encoded, and determine a target non-2N×2N PU partitioning mode; A rate-distortion cost determination module, for determining, for a HEVC current CU to be encoded, a first rate-distortion cost of the current CU to be encoded under a candidate AMVP mode, wherein the PU partitioning method corresponding to each candidate AMVP mode includes: the target non-2N×2N PU partitioning method and the 2N×2N PU partitioning method; The rate-distortion cost determination module is used to determine a second rate-distortion cost of the current CU to be encoded in a candidate Merge mode by using an encoded CU with an encoding dependency relationship corresponding to the current CU to be encoded, wherein the PU partitioning mode corresponding to each candidate Merge mode includes: the target non-2N×2N PU partitioning mode and the 2N×2N PU partitioning mode; A selection module is used to determine a target coding mode corresponding to the current CU to be encoded based on the first rate-distortion cost and the second rate-distortion cost.

10. 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 described in any one of claims 1 to 8.

11. 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 8 is implemented.

Citation Information

Patent Citations

  • Method and device for determining reference information in video coding and storage medium

    CN109905702A

  • Video coding method, coding device, electronic equipment and storage medium

    CN112261413A

  • Selection method and device of rate distortion coding mode and coding method and system

    CN116033162A