Coding mode decision method and device, equipment, storage medium and product

By determining the mode constraint information and decision rounds of the coding area to be decided in video encoding, some decision rounds are skipped to improve efficiency, the problem of low decision efficiency of encoding mode is solved and the video encoding speed is improved.

CN120034650APending Publication Date: 2025-05-23BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510000846.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the existing video encoding technology, the encoding mode decision efficiency is low, which affects the video encoding speed.

Method used

By determining the mode constraint information of the coding area to be decided, the decision round information is determined, and the first round of encoding mode decision is made in the case of two rounds of decision-making, the round skip information is determined based on the mode constraint information, and the second round of decision-making is skipped to determine the target coding mode.

Benefits of technology

It effectively reduces the complexity of coding mode decision-making in the video encoding process, and improves the coding mode decision-making efficiency and video encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034650A_ABST
    Figure CN120034650A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a coding mode decision method and device, equipment, a storage medium and a product. According to the technical scheme provided by the embodiment of the invention, the decision round information of the to-be-decided coding region is determined according to the mode constraint information of the to-be-decided coding region, and the first round of coding mode decision is carried out on the to-be-decided coding region under the condition that the decision round information is a two-round decision. The round skipping information can be determined according to the mode constraint information, the target coding mode is determined according to the first round coding mode decision result under the condition that the round skipping information is skipping the second round decision, and the second round decision of part of the coding area to be decided can be skipped under the condition that the coding mode decision accuracy is ensured. The coding mode decision complexity in the video coding process is effectively reduced, so that the coding mode decision efficiency and the video coding efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to video coding technology, and more particularly to a coding mode decision method, apparatus, device, storage medium and product. Background Art

[0002] In video coding, the block division of the current coding area to be decided can be recursively divided into undivided, quadrilateral, binary and trilateral divisions. After the block division, the mode decision is made on the divided coding units, which is divided into intra-frame and inter-frame mode decisions. Intra-frame prediction refers to the use of the spatial correlation of the video, using the encoded pixel value in the current frame to predict the current pixel, so as to achieve the purpose of removing spatial redundancy and reducing the spatial correlation of the video. Inter-frame prediction technology combines multi-frame information for prediction, reduces the temporal correlation of the video, and improves the video compression efficiency.

[0003] Before making a mode decision, each division will restrict the partial mode decision for the special situation of the current block, and control the current coding area to be decided to make only partial mode decisions. Since the encoder involves cost calculation, transformation, quantization and other processes when performing inter-frame prediction and intra-frame prediction coding, it will significantly increase the encoding complexity and encoding time of the encoder while bringing better encoding performance. The coding mode decision efficiency is low, which seriously affects the video encoding speed. Summary of the invention

[0004] The embodiments of the present application provide a coding mode decision method, apparatus, device, storage medium and product to solve the technical problem that the coding mode decision efficiency in the related technology is low and affects the video coding efficiency. It can effectively reduce the complexity of coding mode decision in the video coding process, thereby improving the coding mode decision efficiency and video coding efficiency.

[0005] In a first aspect, an embodiment of the present application provides a coding mode decision method, comprising:

[0006] Determining mode constraint information of the coding region to be decided, and determining decision round information for the coding region to be decided according to the mode constraint information;

[0007] When the decision round information indicates two rounds of decision, performing a first round of coding mode decision on the coding area to be decided;

[0008] Determine round skipping information according to the mode constraint information;

[0009] In the case where the round skipping information is to skip the second round decision, the target coding mode is determined according to the first round coding mode decision result.

[0010] In a second aspect, an embodiment of the present application provides a coding mode decision device, including a round determination module, a first decision module, a skip determination module and a mode determination module, wherein:

[0011] The round determination module is configured to determine the mode constraint information of the coding region to be decided, and determine the decision round information for the coding region to be decided according to the mode constraint information;

[0012] The first decision module is configured to perform a first round of coding mode decision on the coding area to be decided when the decision round information indicates two rounds of decision;

[0013] The skip determination module is configured to determine round skip information according to the mode constraint information;

[0014] The mode determination module is configured to determine the target coding mode according to the first round coding mode decision result when the round skipping information is to skip the second round decision.

[0015] In a third aspect, an embodiment of the present application provides a coding mode decision device, including: a memory and one or more processors;

[0016] The memory is used to store one or more programs;

[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the coding mode decision method as described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the coding mode decision method as described in the first aspect.

[0019] In the fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device performs the coding mode decision method described in the first aspect.

[0020] The embodiment of the present application determines the decision round information of the coding area to be decided according to the mode constraint information of the coding area to be decided, and when the decision round information is two-round decision, performs the first round of coding mode decision on the coding area to be decided, and can determine the round skipping information according to the mode constraint information, and when the round skipping information is to skip the second round of decision, determine the target coding mode according to the result of the first round of coding mode decision, and under the condition of ensuring the accuracy of the coding mode decision, the second round of decision for some coding areas to be decided can be skipped, thereby effectively reducing the complexity of coding mode decision in the video coding process, thereby improving the coding mode decision efficiency and video coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flowchart of a coding mode decision method provided by an embodiment of the present application;

[0022] Figure 2 is a flowchart of another coding mode decision method provided in an embodiment of the present application;

[0023] Figure 3 It is a structural diagram of a coding mode decision device provided in an embodiment of the present application;

[0024] Figure 4 It is a structural diagram of a coding mode decision device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The above process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The above process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0026] The coding mode decision method provided in the present application can be applied to video coding scenarios (for example, in the coding of a video encoder VVC), and aims to use the coding unit mode results of the current coding area to be decided that have been coded and divided to control the mode decisions of subsequent coding units of other types to be divided, thereby ensuring the accuracy of the encoder mode decision while greatly reducing the complexity of the mode decision and improving the video encoding speed.

[0027] In the existing coding mode decision scheme, the partition decision of the current coding block can be recursively performed as unpartitioned (NS), quadripartitioned (QT), binary partitioned (BT) and tripartitioned (TT). After block partitioning, the coding mode decision will be made on the coding unit (CU), and the coding mode decision includes intra-frame mode decision and inter-frame mode decision. Since the encoder involves cost calculation, transformation, quantization and other processes when performing inter-frame prediction and intra-frame prediction coding, while bringing better coding performance, it will significantly increase the coding complexity and coding time of the encoder. The coding mode decision efficiency is low, which seriously affects the video coding speed. Based on this, a coding mode decision method of an embodiment of the present application is provided to solve the technical problem that the existing coding mode decision efficiency is low and affects the video coding efficiency.

[0028] Figure 1 A flowchart of a coding mode decision method provided in an embodiment of the present application is given. The coding mode decision method provided in an embodiment of the present application can be executed by a coding mode decision device, which can be implemented by hardware and / or software and integrated in the coding mode decision device.

[0029] The following description is made by taking the coding mode decision device executing the coding mode decision method as an example. Figure 1 , the coding mode decision method includes:

[0030] S110: Determine mode constraint information of the coding region to be decided, and determine decision round information for the coding region to be decided according to the mode constraint information.

[0031] In one embodiment, when encoding an image to be encoded (such as an I frame, B frame, P frame, etc. in a video stream), the image to be encoded can be divided into multiple coding areas to be decided of preset sizes (such as 128*128, 64*64, etc.), and encoding can be performed on each coding area to be decided.

[0032] Exemplarily, for each coding area to be decided, the mode constraint information (signalModeConsVal) of the coding area to be decided is determined. The mode constraint information may indicate the mode decision restriction on the coding area to be decided, and may be used to determine whether a certain coding area to be decided requires a signal mode constraint flag (mode_constraint_flag), and how the coding mode type (modeType) of the coding area to be decided is determined.

[0033] Optionally, a preset mode constraint information determination function (such as signalModeCons() function) may be used for determination. In one embodiment, the mode constraint information may be determined based on a combination of one or more of the coding structure of the coding area to be decided, the parent node mode type, the chroma format, the partitioning mode, and the area and / or size of the luminance area and the chroma block.

[0034] In one embodiment, the decision round information for the decision coding area can be determined according to the mode constraint information, wherein the decision round information is used to indicate the round for making coding mode decisions, and the decision rounds corresponding to the decision round information include one-round decision and two-round decision, and different decision round information corresponds to different decision rounds.

[0035] S120: When the decision round information indicates two rounds of decision, a first round of coding mode decision is performed on the coding area to be decided.

[0036] Exemplarily, when the decision round information is two rounds of decision, a first round of coding mode decision can be performed on the coding area to be decided, and a first round of coding mode decision result can be obtained. Optionally, the first round of coding mode decision can be an intra mode decision or an intra block copy (IBC) mode decision, or an inter mode decision.

[0037] In one embodiment, when the decision round information is one round of decision, a first round of coding mode decision can be performed on the coding area to be decided, and the first round of coding mode decision result can be obtained. The target coding mode can be determined based on the first round of coding mode decision result, for example, the first round of coding mode decision result is used as the target coding mode.

[0038] S130: Determine round skipping information according to the mode constraint information.

[0039] Exemplarily, the round skipping information may be determined according to the above determined mode constraint information, and the round skipping information may be used to indicate whether to skip the second round of coding mode decision. Optionally, different mode constraint information may correspond to different round skipping information.

[0040] Optionally, the second round of coding mode decisions can be inter-frame mode decisions, or intra-frame mode decisions or intra-frame block copy mode decisions, that is, when the first round of coding mode decisions are intra-frame mode decisions or intra-frame block copy mode decisions, the second round of coding mode decisions are inter-frame mode decisions; when the first round of coding mode decisions are inter-frame mode decisions, the second round of coding mode decisions are intra-frame mode decisions or intra-frame block copy mode decisions.

[0041] S140: When the round skipping information indicates skipping the second round of decision, determine the target coding mode according to the first round of coding mode decision result.

[0042] Exemplarily, when the round skip information is to skip the second round of decision, the second round of coding mode decision for the decision coding area can be skipped, and the optimal coding mode corresponding to the first round coding mode decision result obtained by the above-mentioned first round of coding mode decision can be used as the target coding mode.

[0043] In a possible embodiment, after determining the round skipping information according to the mode constraint information, the coding mode decision method provided by the present scheme can also perform a second round of coding mode decision on the coding area to be decided when the round skipping information indicates not to skip the second round of decision; and determine the target coding mode according to the result of the second round of coding mode decision and the result of the first round of coding mode decision.

[0044] Exemplarily, when the round skip information indicates that the second round of decision is not to be skipped, a second round of coding mode decision may be made for the coding area to be decided, and the result of the second round of coding mode decision may be obtained. The optimal coding mode among the first round of coding mode decision results and the second round of coding mode decision results may be used as the target coding mode, for example, the loss cost (such as rate distortion cost RDcost) of one or more coding modes corresponding to the first round of coding mode decision results and the loss cost of one or more coding modes corresponding to the second round of coding mode decision results are determined, and the coding mode corresponding to the minimum loss cost is used as the target coding mode. This solution ensures the accuracy of coding mode decision by accurately determining the target coding mode according to the two rounds of coding mode decision results for the coding area to be decided when the round skip information indicates that the second round of decision is not to be skipped.

[0045] In the above, by determining the decision round information of the coding area to be decided according to the mode constraint information of the coding area to be decided, and when the decision round information is two rounds of decision, the first round of coding mode decision is performed on the coding area to be decided, the round skipping information can be determined according to the mode constraint information, and when the round skipping information is to skip the second round of decision, the target coding mode is determined according to the result of the first round of coding mode decision, and the second round of decision for some coding areas to be decided can be skipped while ensuring the accuracy of the coding mode decision, thereby effectively reducing the complexity of the coding mode decision in the video coding process, thereby improving the coding mode decision efficiency and video coding efficiency.

[0046] Based on the above embodiments, Figure 2 A flowchart of another coding mode decision method provided in an embodiment of the present application is given, which is a specific implementation of the above coding mode decision method. Figure 2 , the coding mode decision method includes:

[0047] S210: Determine mode constraint information of the coding region to be decided, and determine decision round information for the coding region to be decided according to the mode constraint information.

[0048] In a possible embodiment, the coding mode decision method provided by the present solution is characterized in that determining the mode constraint information of the coding region to be decided includes:

[0049] S211: Determine the tree structure, parent node coding mode type, chroma format, minimum color block and minimum brightness block of the coding area to be decided.

[0050] S212: Under the condition that the tree structure is a dual tree structure, the parent node coding mode type is non-full mode prediction, the chroma format is a preset chroma format, the area of ​​the minimum color block is greater than or equal to the first preset area, and the size of the minimum color block is a non-preset size type, the mode constraint information of the coding area to be decided is determined to be an inherited mode constraint.

[0051] S213: When the area of ​​the minimum brightness block is smaller than the second preset area, or the image frame corresponding to the coding area to be decided is a key frame, determining that the mode constraint information of the coding area to be decided is an inferred mode constraint.

[0052] S214: When the area of ​​the minimum brightness block is greater than or equal to the second preset area and the image frame corresponding to the coding area to be decided is a non-key frame, determine that the mode constraint information of the coding area to be decided is a signal mode constraint.

[0053] Exemplarily, the tree structure, parent node coding mode type, chroma format, minimum color block and minimum brightness block of the coding area to be decided are determined, and the mode constraint information of the coding area to be decided is determined based on the tree structure, parent node coding mode type, chroma format, minimum color block and minimum brightness block of the coding area to be decided (for example, determining the area and / or size of the minimum color block).

[0054] In one embodiment, when the coding area to be decided satisfies the tree structure of a dual tree structure (the image frame corresponding to the coding area to be decided is an I frame and a luminance-chrominance dual tree is used as the tree structure, indicating that the luminance and chrominance components of the I frame need to be processed separately), the parent node coding mode type is a non-full mode prediction (that is, the current parent node modetype is not MODE_TYPE_ALL), the chroma format is a preset chroma format (the preset chroma format may be YUV444 or YUV400), and the area of ​​the smallest color block is greater than or equal to a first preset area (for example, the first preset area may be 16) and the size of the smallest color block is a non-preset size type (for example, the preset size type may be 2*N), it may be determined that the mode constraint information of the coding area to be decided is an inherited mode constraint (for example, the mode constraint information is set to signalModeConsVal=LDT_MODE_TYPE_INHERIT).

[0055] In one embodiment, when the area of ​​the minimum brightness block is smaller than the second preset area (for example, the second preset area may be 32), or the image frame corresponding to the coding area to be decided is a key frame, the mode constraint information of the coding area to be decided may be determined as an inferred mode constraint (for example, the mode constraint information is set to signalModeConsVal=LDT_MODE_TYPE_INFER). When the area of ​​the minimum brightness block is greater than or equal to the second preset area, and the image frame corresponding to the coding area to be decided is a non-key frame, the mode constraint information of the coding area to be decided may be determined as a signal mode constraint (for example, the mode constraint information is set to signalModeConsVal=LDT_MODE_TYPE_SIGNAL). This scheme can accurately determine the mode constraint information of the coding area to be decided according to the tree structure of the coding area to be decided, the parent node coding mode type, the chroma format, the minimum color block and the minimum brightness block, so as to accurately determine the decision round information of the coding area to be decided and improve the accuracy of coding mode decision.

[0056] In one embodiment, before making a mode decision for the coding region to be decided, a partial mode decision restriction process can be performed for the special case of each division of the current block, wherein the mode decision restriction parameter mode_constraint_flag for the mode decision restriction is used to control the current coding region to be decided to make only a partial mode decision, and the specific decision mode is indicated by the decision mode type information modeType. The mode constraint information signalModeConsVal is determined according to the division type and region size of the current coding region to be decided, indicating whether the coding mode decision restriction parameter mode_constraint_flag is needed. Among them, the mode constraint information signalModeConsVal has three optional values, including: static const int LDT_MODE_TYPE_INHERIT=0 corresponding to the inherited mode constraint, static const int LDT_MODE_TYPE_INFER=1 corresponding to the inferred mode constraint, and static const intLDT_MODE_TYPE_SIGNAL=2 corresponding to the signal mode constraint, wherein the decision mode type information modeType can have three values, namely MODE_TYPE_ALL=0, MODE_TYPE_INTER=1 and MODE_TYPE_INTRA=2. Among them, MODE_TYPE_ALL can indicate that the current coding area to be decided can be predicted in all decision modes; MODE_TYPE_INTER indicates that only various inter-frame modes (inter mode) are predicted, and MODE_TYPE_INTRA indicates that only ordinary intra-frame mode (intra mode) decisions or intra-frame block copy mode (IBC mode) predictions are performed.

[0057] When signalModeConsVal==LDT_MODE_TYPE_INHERIT, it indicates that no additional coding mode decision restriction parameter mode_constraint_flag is required, and the decision mode type information modeType of the current coding area to be decided can be directly inherited from its parent node.

[0058] When signalModeConsVal==LDT_MODE_TYPE_INFER, it indicates that no additional coding mode decision restriction parameter mode_constraint_flag is required, and the decision mode type information modeType of the current coding area to be decided has been inferred to be MODE_TYPE_INTRA. During coding, only the related modes of the intra-frame mode and the intra-frame block copy mode can be predicted.

[0059] When signalModeConsVal==LDT_MODE_TYPE_SIGNAL, it indicates that an additional coding mode decision constraint parameter mode_constraint_flag is required, and the decision mode type information modeType of the current coding area to be decided will be determined according to the mode decision constraint parameter mode_constraint_flag (mode_constraint_flag takes the value of 0-inter or 1-intra). At this time, two coding mode decision cycles will be performed, for example, the first round of coding mode decision MODE_TYPE_INTER only judges the inter-related mode, and the second round of coding mode decision MODE_TYPE_INTRA can only judge the intra-frame mode and intra-frame block copy mode related modes.

[0060] In one embodiment, the value of the mode constraint information signalModeConsVal can be obtained through the signalModeCons() function before entering the mode decision of the coding area to be decided. Optionally, the judgment of the mode constraint information can be performed according to the following conditions 1 and 2: Condition 1: If one of the following conditions is met: the tree structure of the current coding area to be decided is a dual tree structure (the current is an I frame and uses a luminance and chrominance dual tree, indicating that the luminance and chrominance components of the I frame need to be processed separately); the current parent node encoding mode type modetype is not MODE_TYPE_ALL (indicating that the current parent node has restricted the prediction mode); the luminance and chrominance format of the current coding area to be decided is YUV444 or YUV400. At this time, the mode constraint information signalModeConsVal = LDT_MODE_TYPE_INHERIT (indicating that the decision mode type information modeType of the area can be inherited from its parent node, and the encoding mode decision restriction parameter mode_constraint_flag is not required).

[0061] Condition 2: If the area of ​​the minimum color block is ≥16 and the size of the minimum color block is not 2*N, signalModeConsVal=LDT_MODE_TYPE_INHERIT; otherwise, if the area of ​​the minimum brightness block is less than 32 or the current frame is an I frame, signalModeConsVal=LDT_MODE_TYPE_INFER mode, the decision mode type information modeType of the current coding area to be decided defaults to the intra-frame prediction related mode, otherwise signalModeConsVal=LDT_MODE_TYPE_SIGNAL, indicating that the decision mode type information modeType of the current coding area to be decided is determined by the mode decision restriction parameter mode_constraint_flag.

[0062] In a possible embodiment, the coding mode decision method provided by the present solution is characterized in that determining the decision round information of the coding region to be decided according to the mode constraint information includes:

[0063] S215: When the mode constraint information is a signal mode constraint, determine that the decision round information for the decision coding area is two rounds of decision.

[0064] S216: When the mode constraint information is an inherited mode constraint or an inferred mode constraint, determine that the decision round information for the decision coding area is one round of decision.

[0065] Exemplarily, after determining the mode constraint information of the coding area to be decided, the decision round information can be determined according to the mode constraint information, wherein, when the mode constraint information is a signal mode constraint (at this time the mode constraint information signalModeConsVal=LDT_MODE_TYPE_SIGNAL), it can be determined that the decision round information for the coding area to be decided is two rounds of decisions, and when the mode constraint information is an inherited mode constraint (at this time the mode constraint information signalModeConsVal==LDT_MODE_TYPE_INHERIT) or an inferred mode constraint (at this time the mode constraint information signalModeConsVal==LDT_MODE_TYPE_INFER), it can be determined that the decision round information for the coding area to be decided is one round of decisions.

[0066] For example, when the mode constraint information signalModeConsVal!=LDT_MODE_TYPE_SIGNAL, the decision round information numRoundRDO=1 (ie, one round of decision), and at this time, only one round of coding mode decision can be performed for the current coding region to be decided.

[0067] When the mode constraint information signalModeConsVal==LDT_MODE_TYPE_SIGNAL, the decision round information numRoundRDO=2 (ie, two rounds of decision), and at this time, two rounds of division decision can be performed for the current coding area to be decided.

[0068] This scheme uses the mode constraint information to determine the decision round information as two rounds of decisions and one round of decisions respectively, based on the signal mode constraint, inherited mode constraint or inferred mode constraint, to accurately determine the decision round for the decision coding area and improve the accuracy of coding mode decision.

[0069] S220: When the decision round information is two rounds of decision, determine the optimal prediction mode of each coding unit in the coding area to be decided, and determine the first decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit.

[0070] Exemplarily, before the first round of coding mode decision is made for the coding region to be decided, the optimal prediction mode of each coding unit in the coding region to be decided (the optimal division result of the current coding region to be decided) is determined, and the first decision mode type of the coding region to be decided is determined according to the optimal prediction mode of each coding unit. For example, when the optimal prediction modes of each coding unit are consistent, the first decision mode type can be determined as the decision mode corresponding to the optimal prediction mode, reducing unnecessary data processing of the decision mode, and when there are inconsistent optimal prediction modes in each coding unit, the type of the first decision mode may not be updated.

[0071] In a possible embodiment, the coding mode decision method provided by the present solution determines the first decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit, including at least one of the following:

[0072] S221: When the optimal prediction modes of the coding units are all intra-frame prediction modes, determining that the first decision mode type of the coding area to be decided is intra-frame prediction.

[0073] S222: When the optimal prediction modes of the coding units are all inter-frame prediction modes, determining that the first decision mode type of the coding area to be decided is inter-frame prediction.

[0074] S223: When the optimal prediction mode of each coding unit includes an intra-frame prediction mode and an inter-frame prediction mode, determining that a first decision mode type of the coding area to be decided is a decision mode type given by a preset coding standard.

[0075] Exemplarily, when the optimal prediction mode of each coding unit is the intra-frame prediction mode, it can be considered that the possibility of subsequently using the inter-frame prediction mode as the optimal prediction mode is small, and the first decision mode type of the coding area to be decided can be determined to be the intra-frame prediction; when the optimal prediction mode of each coding unit is the inter-frame prediction mode, it can be considered that the possibility of subsequently using the intra-frame prediction mode as the optimal prediction mode is small, and the first decision mode type of the coding area to be decided can be determined to be the inter-frame prediction; when the optimal prediction mode of each coding unit includes the intra-frame prediction mode and the inter-frame prediction mode, the first decision mode type of the coding area to be decided is determined to be the decision mode type given by the preset coding standard, that is, the value of the current decision mode type information is maintained.

[0076] Among them, the decision mode type given by the preset coding standard can be determined according to the mode constraint information determined by the function. For example, when receiving the coding area to be decided, the value of the mode constraint information signalModeConsVal can be determined based on the signalModeCons() function according to the preset coding standard, and then the value of the decision mode type information pm.modeType is determined by the value of signalModeConsVal. When the optimal prediction mode of each coding unit is an intra-frame prediction mode or an inter-frame prediction mode, the value of pm.modeType will be updated, and when the optimal prediction mode of each coding unit includes an intra-frame prediction mode and an inter-frame prediction mode, the value of pm.modeType is maintained.

[0077] In a possible embodiment, the decision mode type can be recorded through the decision mode type information modeType. The decision mode type information can be updated before the first round of coding mode decisions and the second round of coding mode decisions, and used as the first decision mode type and the second decision mode type, respectively, to guide the first round of coding mode decisions and the second round of coding mode decisions, respectively.

[0078] For example, the encoded optimal prediction mode can be used as a guide to update the decision mode type information modeType of the current coding area to be decided, and the all-inter mode flag allModeInter and the all-intra mode flag allModeIntra can be created and initialized to true at the same time. The update method of allModeInter and allModeIntra can be expressed as: for(intidx=0; idx<cus.size();idx++){allModeInter&=cus[idx]-> predMode==MODE_INTER;allModeIntra&=cus[idx]->predMode==MODE_INTRA}. Among them, cus.size() represents the optimal prediction mode contained in the current coding area to be decided after being encoded; allModeInter means that all encoded optimal prediction modes are inter; allModeIntra means that all encoded optimal prediction modes are intra. For example: if the size of the current coding area to be decided is 32*32, and it has been decided not to be divided (NT partition), the current partition type to be decided is quadtree partition (QT partition) decision, binary tree partition (BT partition) decision or ternary tree partition (TT partition) decision.

[0079] In one embodiment, if the non-division decision is the optimal division result at this time, then cus.size()=1 at this time, cus contains an optimal prediction mode of 32*32 size, and the optimal prediction mode is MODE_INTER, then allModeInter=true, allModeIntra=false at this time. If the quadtree division decision is the optimal division result at this time, then cus.size()=4 at this time, cus contains 4 optimal sub-coding units of 16*16 size. If the optimal prediction mode of the 4 quadtree divisions is MODE_INTER, then allModeInter=true; allModeIntra=false at this time; if the optimal prediction modes of the 4 quadtree divisions are different, then allModeInter=false; allModeIntra=false; if the optimal prediction modes of the 4 quadtree divisions are all MODE_INTRA, then allModeInter=false; allModeIntra=true at this time. If the binary partition decision is the optimal partition result at this time, then cus.size() = 2, and cus contains 2 optimal binary tree partitions; if the optimal prediction modes of the two binary tree partitions are both MODE_INTER, then allModeInter = true; allModeIntra = false; if the optimal prediction modes of the two binary tree partitions are different, then allModeInter = false; allModeIntra = false; if the optimal prediction modes of the two binary tree partitions are both MODE_INTRA, then allModeInter = false; allModeIntra = true. If the ternary partition decision is the optimal partition result at this time, then cus.size() = 3, cus contains 3 optimal ternary tree partitions; if the optimal prediction modes of the 3 ternary tree partitions are all MODE_INTER, then allModeInter = true; allModeIntra = false; if the optimal prediction modes of the 3 ternary tree partitions are different, then allModeInter = false; allModeIntra = false; if the optimal prediction modes of the 3 ternary tree partitions are all MODE_INTRA, then allModeInter = false; allModeIntra = true.

[0080] Among them, for the current coding area to be decided, the update method of the decision mode type information modeType is as follows (including the first round of coding mode decisions and the second round of coding mode decisions): if allModeInter=true, modeType is updated to MODE_TYPE_INTER, indicating that the current coding area to be decided only executes the decision of the inter mode; if allModeIntra=true, modeType is updated to MODE_TYPE_INTRA, indicating that the coding area to be decided only executes the decision of the intra mode and the IBC mode; otherwise, modeType maintains the original value and is not updated.

[0081] S230: Perform a first round of coding mode decision on the coding area to be decided according to the first decision mode type.

[0082] Exemplarily, after determining the first decision mode type of the coding area to be decided, a first round of coding mode decision corresponding to the first decision mode type may be performed on the coding area to be decided to obtain a first round of coding mode decision. For example, when the first decision mode type is intra-frame prediction or inter-frame prediction, a coding mode decision based on intra-frame prediction or inter-frame prediction may be performed on the coding area to be decided; when the first decision mode type is intra-frame prediction and inter-frame prediction, coding mode decisions based on intra-frame prediction and inter-frame prediction may be performed on the coding area to be decided, respectively.

[0083] This solution determines the first decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit, accurately performs the first round of coding mode decisions on the coding area to be decided, and improves the efficiency of coding mode decisions while ensuring the accuracy of coding mode decisions.

[0084] S240: Determine round skipping information according to the mode constraint information.

[0085] In one embodiment, the coding mode decision method provided by the present scheme determines round skipping information based on signal mode constraint information, including: when the mode constraint information is a signal mode constraint and there is an optimal division result in the first round of coding mode decision results, determining the round skipping information to skip the second round of decision.

[0086] Exemplarily, when the mode constraint information is a signal mode constraint and there is an optimal division result in the first round of coding mode decision results, the round skipping information can be determined as skipping the second round of decisions. When the mode constraint information is a non-signal mode constraint, or there is no optimal division result in the first round of coding mode decision results (for example, when other preset fast algorithms skip part of the coding mode decisions, there may be a situation where there is no optimal division result), the round skipping information is determined as not skipping the second round of decisions to ensure the accuracy of the coding mode decisions.

[0087] This scheme accurately determines the round skipping information based on whether the mode constraint information is a signal mode constraint and whether there is an optimal division result in the first round of coding mode decision results, thereby improving the efficiency of coding mode decision while ensuring the accuracy of coding mode decision.

[0088] In one embodiment, when entering the coding mode decision of the coding area to be decided, a round skip information bSkip2Pass for indicating whether to skip the second round of coding mode decision can be added, and bSkip2Pass is initialized to false, indicating that the second round of coding mode decision is not skipped by default. After completing the first round of coding mode decision, the round skip information bSkip2Pass can be calculated according to the coding mode decision result. The round skip information bSkip2Pass can be updated in the following manner: if the current mode constraint information signalModeConsVal==LDT_MODE_TYPE_SIGNAL, that is, numRoundRDO=2 and there is an optimal division result after the first round of division decision, then bSkip2Pass=true, otherwise bSkip2Pass=false. When bSkip2Pass==false, the second round of coding mode decision can be continued, and when bSkip2Pass==true, the optimal result corresponding to the first round of coding mode decision can be saved, and the second round of coding mode decision can be skipped.

[0089] In a possible embodiment, after determining the round skip information according to the mode constraint information, the coding mode decision method provided by the present solution can also perform a second round of coding mode decision on the coding area to be decided when the round skip information indicates that the second round of decision is not skipped, and before performing the second round of coding mode decision on the coding area to be decided, the optimal prediction mode of each coding unit in the coding area to be decided can also be determined, and the second decision mode type of the coding area to be decided can be determined according to the optimal prediction mode of each coding unit. Correspondingly, performing a second round of coding mode decision on the coding area to be decided includes: performing a second round of coding mode decision on the coding area to be decided according to the second decision mode type.

[0090] Exemplarily, before making a second round of coding mode decision for the coding region to be decided, the optimal prediction mode of each coding unit in the coding region to be decided (the optimal division result of the current coding region to be decided) is determined, and the second decision mode type of the coding region to be decided is determined according to the optimal prediction mode of each coding unit. For example, when the optimal prediction modes of each coding unit are consistent, the second decision mode type can be determined as the decision mode corresponding to the optimal prediction mode, reducing unnecessary data processing of the decision mode, and when there are inconsistent optimal prediction modes in each coding unit, the type of the second decision mode is not updated.

[0091] In a possible embodiment, the coding mode decision method provided by the present solution determines the second decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit, including at least one of the following: when the optimal prediction modes of each coding unit are all intra-frame prediction modes, the second decision mode type of the coding area to be decided is determined to be intra-frame prediction. When the optimal prediction modes of each coding unit are all inter-frame prediction modes, the second decision mode type of the coding area to be decided is determined to be inter-frame prediction. When the optimal prediction modes of each coding unit include intra-frame prediction mode and inter-frame prediction mode, the decision mode type of the coding area to be decided is determined to be maintained.

[0092] In a possible embodiment, the second decision mode type can be recorded through the decision mode type information modeType, and the decision mode type information modeType can be used as the first decision mode type information and the second decision mode type information of the first round of coding mode decisions and the second round of coding mode decisions, and are used to guide the first round of coding mode decisions and the second round of coding mode decisions respectively. The update of the decision mode type information modeType can refer to the relevant description of updating the decision mode type information modeType in the above embodiment, and will not be repeated in this scheme.

[0093] Exemplarily, after determining the second decision mode type of the coding area to be decided, a second round of coding mode decision corresponding to the second decision mode type can be performed on the coding area to be decided to obtain a second round of coding mode decision. For example, when the second decision mode type is intra-frame prediction or inter-frame prediction, a coding mode decision based on intra-frame prediction or inter-frame prediction can be performed on the coding area to be decided. When the second decision mode type is intra-frame prediction and inter-frame prediction, coding mode decisions based on intra-frame prediction and inter-frame prediction can be performed on the coding area to be decided, respectively. This solution determines the second decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit, accurately performs the second round of coding mode decision on the coding area to be decided, and improves the efficiency of the coding mode decision while ensuring the accuracy of the coding mode decision.

[0094] S250: When the round skipping information is to skip the second round of decision, determine the target coding mode according to the first round of coding mode decision result.

[0095] In the above, by determining the decision round information of the coding area to be decided according to the mode constraint information of the coding area to be decided, and when the decision round information is two rounds of decision, the first round of coding mode decision is performed on the coding area to be decided, the round skip information can be determined according to the mode constraint information, and when the round skip information is to skip the second round of decision, the target coding mode is determined according to the first round of coding mode decision results, and under the condition of ensuring the accuracy of the coding mode decision, the second round of decision of some coding areas to be decided can be skipped, effectively reducing the complexity of coding mode decision in the video coding process, thereby improving the coding mode decision efficiency and video coding efficiency. At the same time, by accurately determining the round skip information according to whether the mode constraint information is a signal mode constraint and whether the first round of coding mode decision results have an optimal division result, while ensuring the accuracy of the coding mode decision, the coding mode decision efficiency is improved. Considering that the modes of different division results of the same coding area have a high similarity, the coding mode decision results of the current area that have been coded and divided can be used to optimize the mode decision process of other types of coding units to be divided in the current area, so as to achieve the purpose of reducing the coding complexity. By optimizing the decision-making process of the current coding area mode, the encoding speed of the encoder is improved without reducing the objective performance of the encoder and maintaining the consistency of subjective picture quality, thereby improving the utilization rate of computing resources on the server side, saving server costs, and reducing the utilization rate of computing resources on the client side, further improving the user experience.

[0096] Figure 3 Schematic diagram of a coding mode decision device provided in an embodiment of the present application. Figure 3 The encoding mode decision device includes a round determination module 31, a first decision module 32, a skip determination module 33 and a mode determination module 34.

[0097] Among them, the round determination module 31 is configured to determine the mode constraint information of the coding area to be decided, and determine the decision round information for the coding area to be decided based on the mode constraint information; the first decision module 32 is configured to make a first round of coding mode decision for the coding area to be decided when the decision round information is two rounds of decision; the skip determination module 33 is configured to determine the round skip information based on the mode constraint information; the mode determination module 34 is configured to determine the target coding mode based on the result of the first round of coding mode decision when the round skip information is to skip the second round of decision.

[0098] In the above, by determining the decision round information of the coding area to be decided according to the mode constraint information of the coding area to be decided, and when the decision round information is two rounds of decision, the first round of coding mode decision is performed on the coding area to be decided, the round skipping information can be determined according to the mode constraint information, and when the round skipping information is to skip the second round of decision, the target coding mode is determined according to the result of the first round of coding mode decision, and the second round of decision for some coding areas to be decided can be skipped while ensuring the accuracy of the coding mode decision, thereby effectively reducing the complexity of the coding mode decision in the video coding process, thereby improving the coding mode decision efficiency and video coding efficiency.

[0099] In a possible embodiment, the mode determination module 34 is also configured to perform a second round of coding mode decision on the decision coding area when the round skip information indicates not to skip the second round of decision; and determine the target coding mode based on the second round of coding mode decision results and the first round of coding mode decision results.

[0100] In a possible embodiment, the round determination module 31 determines the mode constraint information of the coding region to be decided, and is configured as follows:

[0101] Determine the tree structure of the coding area to be decided, the parent node coding mode type, the chroma format, the minimum color block and the minimum brightness block;

[0102] Under the condition that the tree structure is a double tree structure, the parent node coding mode type is non-full mode prediction, the chroma format is a preset chroma format, the area of ​​the minimum color block is greater than or equal to the first preset area, and the size of the minimum color block is a non-preset size type, it is determined that the mode constraint information of the coding area to be decided is an inherited mode constraint;

[0103] When the area of ​​the minimum brightness block is smaller than the second preset area, or the image frame corresponding to the coding area to be decided is a key frame, determining that the mode constraint information of the coding area to be decided is an inferred mode constraint;

[0104] When the area of ​​the minimum brightness block is greater than or equal to the second preset area and the image frame corresponding to the coding area to be decided is a non-key frame, the mode constraint information of the coding area to be decided is determined to be a signal mode constraint.

[0105] In a possible embodiment, the round determination module 31 determines the decision round information of the decision coding region according to the mode constraint information, and is configured as follows:

[0106] In the case where the mode constraint information is a signal mode constraint, determining that the decision round information for the decision coding area is two rounds of decision;

[0107] When the mode constraint information is an inherited mode constraint or an inferred mode constraint, the decision round information for the decision coding area is determined to be one round of decision.

[0108] In a possible embodiment, the skip determination module 33 determines the round skip information according to the mode constraint information, and is configured as follows:

[0109] When the mode constraint information is a signal mode constraint and there is an optimal division result in the first round of coding mode decision results, the round skipping information is determined to skip the second round of decision.

[0110] In a possible embodiment, the coding mode decision device further includes a first mode determination module, and the first mode determination module is configured to:

[0111] Determine the optimal prediction mode of each coding unit in the coding area to be decided, and determine the first decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit;

[0112] Correspondingly, the first decision module 32 performs a first round of coding mode decision on the coding area to be decided, and is configured as follows:

[0113] A first round of coding mode decision is performed on the coding area to be decided according to the first decision mode type.

[0114] In a possible embodiment, the first mode determination module determines the first decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit, and is configured as follows:

[0115] When the optimal prediction modes of each coding unit are all intra-frame prediction modes, determining that the first decision mode type of the coding area to be decided is intra-frame prediction;

[0116] When the optimal prediction modes of each coding unit are all inter-frame prediction modes, determining that the first decision mode type of the coding area to be decided is inter-frame prediction;

[0117] In the case that the optimal prediction mode of each coding unit includes an intra-frame prediction mode and an inter-frame prediction mode, it is determined that the first decision mode type of the coding area to be decided is a decision mode type given by a preset coding standard.

[0118] In a possible embodiment, the coding mode decision device further includes a second mode determination module, and the second mode determination module is configured to:

[0119] Determine the optimal prediction mode of each coding unit in the coding area to be decided, and determine the second decision mode type of the coding area to be decided according to the optimal prediction mode of each coding unit;

[0120] Correspondingly, the mode determination module 34 performs a second round of coding mode decision on the coding area to be decided, and is configured to: perform a second round of coding mode decision on the coding area to be decided according to the second decision mode type.

[0121] It is worth noting that in the embodiment of the above-mentioned coding mode decision device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0122] An embodiment of the present application also provides a coding mode decision device, which can integrate the coding mode decision apparatus provided in the embodiment of the present application. Figure 4 is a schematic diagram of the structure of a coding mode decision device provided in an embodiment of the present application. Figure 4 , the coding mode decision device includes: an input device 43, an output device 44, a memory 42 and one or more processors 41; the memory 42 is used to store one or more programs; when one or more programs are executed by one or more processors 41, the one or more processors 41 implement the coding mode decision method provided in the above embodiment. The coding mode decision device, equipment and computer provided above can be used to execute the coding mode decision method provided in any of the above embodiments, and have corresponding functions and beneficial effects.

[0123] The embodiment of the present application also provides a non-volatile storage medium storing computer executable instructions, which are used to execute the coding mode decision method provided in the above embodiment when executed by a computer processor. Of course, the non-volatile storage medium storing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the coding mode decision method provided above, can also execute the related operations in the coding mode decision method provided in any embodiment of the present application. The coding mode decision device, equipment and storage medium provided in the above embodiments can execute the coding mode decision method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the coding mode decision method provided in any embodiment of the present application.

[0124] On the basis of the above embodiments, the embodiments of the present application also provide a computer program product. The technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium, including a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the coding mode decision method provided in each embodiment of the present application.

Claims

1. A coding mode decision method, characterized in that: include: Determining mode constraint information of the coding region to be decided, and determining decision round information for the coding region to be decided according to the mode constraint information; When the decision round information indicates two rounds of decision, performing a first round of coding mode decision on the coding area to be decided; Determine round skipping information according to the mode constraint information; In the case where the round skipping information is to skip the second round of decision, the target coding mode is determined according to the first round of coding mode decision result.

2. The coding mode decision method according to claim 1, characterized in that: After determining the round skipping information according to the mode constraint information, the method further includes: When the round skipping information indicates that the second round of decision is not to be skipped, performing a second round of coding mode decision on the coding area to be decided; The target coding mode is determined according to the second-round coding mode decision result and the first-round coding mode decision result.

3. The coding mode decision method according to claim 1, characterized in that: The determining of the mode constraint information of the coding region to be decided includes: Determine the tree structure of the coding area to be decided, the parent node coding mode type, the chroma format, the minimum color block and the minimum brightness block; Under the condition that the tree structure is a dual tree structure, the parent node coding mode type is non-full mode prediction, the chroma format is a preset chroma format, the area of ​​the minimum color block is greater than or equal to the first preset area, and the size of the minimum color block is a non-preset size type, one or more combinations thereof are satisfied, determining that the mode constraint information of the coding area to be decided is an inherited mode constraint; When the area of ​​the minimum brightness block is smaller than the second preset area, or the image frame corresponding to the coding area to be decided is a key frame, determining that the mode constraint information of the coding area to be decided is an inferred mode constraint; When the area of ​​the minimum brightness block is greater than or equal to the second preset area and the image frame corresponding to the coding area to be decided is a non-key frame, the mode constraint information of the coding area to be decided is determined to be a signal mode constraint.

4. The coding mode decision method according to claim 1, characterized in that: The determining, according to the mode constraint information, decision round information for the coding region to be decided comprises: In a case where the mode constraint information is a signal mode constraint, determining that decision round information for the coding area to be decided is two rounds of decision; In the case where the mode constraint information is an inherited mode constraint or an inferred mode constraint, the decision round information for the coding area to be decided is determined to be one round of decision.

5. The coding mode decision method according to claim 1, characterized in that: The determining the round skipping information according to the mode constraint information comprises: When the mode constraint information is a signal mode constraint and there is an optimal division result in the first round of coding mode decision results, the round skipping information is determined to skip the second round of decision.

6. The coding mode decision method according to claim 1, characterized in that: Before performing a first round of coding mode decision on the coding area to be decided, the method further includes: Determining an optimal prediction mode for each coding unit in the coding area to be decided, and determining a first decision mode type for the coding area to be decided according to the optimal prediction mode of each coding unit; Correspondingly, the first round of coding mode decision for the coding area to be decided includes: A first round of coding mode decision is performed on the coding area to be decided according to the first decision mode type.

7. The coding mode decision method according to claim 6, characterized in that: The determining the first decision mode type of the to-be-decided coding area according to the optimal prediction mode of each coding unit includes: When the optimal prediction modes of each coding unit are all intra-frame prediction modes, determining that the first decision mode type of the coding area to be decided is intra-frame prediction; When the optimal prediction modes of each coding unit are all inter-frame prediction modes, determining that the first decision mode type of the coding area to be decided is inter-frame prediction; In the case that the optimal prediction mode of each coding unit includes an intra-frame prediction mode and an inter-frame prediction mode, it is determined that the first decision mode type of the to-be-decided coding area is a decision mode type given by a preset coding standard.

8. The coding mode decision method according to claim 2, characterized in that: Before performing a second round of coding mode decision on the coding area to be decided, the method further includes: Determining an optimal prediction mode for each coding unit in the coding area to be decided, and determining a second decision mode type for the coding area to be decided according to the optimal prediction mode of each coding unit; Correspondingly, the performing a second round of coding mode decision on the coding area to be decided includes: A second round of coding mode decision is performed on the coding area to be decided according to the second decision mode type.

9. A coding mode decision device, characterized in that: It includes a round determination module, a first decision module, a skip determination module and a mode determination module, wherein: The round determination module is configured to determine the mode constraint information of the coding region to be decided, and determine the decision round information for the coding region to be decided according to the mode constraint information; The first decision module is configured to perform a first round of coding mode decision on the coding area to be decided when the decision round information indicates two rounds of decision; The skip determination module is configured to determine round skip information according to the mode constraint information; The mode determination module is configured to determine the target coding mode according to the first round coding mode decision result when the round skipping information is to skip the second round decision.

10. A coding mode decision device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the coding mode decision method as described in any one of claims 1-8.

11. A non-volatile storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the coding mode decision method as described in any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the coding mode decision method according to any one of claims 1 to 8 is implemented.