A method and device for predictive video coding

Through the decision-making process of judging whether to skip the intra prediction mode based on the executed mode information in HEVC video coding, the problem of high code rate consumption of the intra prediction mode in inter-frame coding is solved, the coding speed and efficiency are improved, and the cost is reduced. .

CN112637591BActive Publication Date: 2024-09-13BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011461361.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-11
Publication Date
2024-09-13
Estimated Expiration
2040-12-11

AI Technical Summary

Technical Problem

In the inter-frame coding process of HEVC video coding, the intra-frame prediction mode has high code rate consumption, low coding efficiency and high coding cost.

Method used

During inter-frame prediction, the decision-making process of whether to skip the intra-frame prediction mode is determined by determining the executed mode information, including the stage-optimal mode and its cost, to reduce unnecessary rate-distortion optimization mode selection.

Benefits of technology

It reduces the consumption of Intra mode, reduces the resource overhead of the encoder, increases the encoding speed and reduces the encoding cost, and improves the encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112637591B
    Figure CN112637591B
Patent Text Reader

Abstract

The present application discloses a method and device for video prediction coding, wherein the method comprises: during inter-frame prediction, in the process of deciding the optimal mode of the current prediction unit, determining the executed mode information according to the executed mode, the executed mode information including the stage optimal mode and the cost of the stage optimal mode; judging whether to skip the intra-frame prediction mode of the decision process according to the executed mode information, thereby reducing the consumption of the Intra mode, which can greatly reduce the resource overhead of the encoder, thereby improving the encoding speed and reducing the encoding cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to video coding technology, and more particularly to a method and apparatus for video predictive coding. Background Art

[0002] HEVC is the latest generation of video coding standard. Compared with H.264, HEVC's compression efficiency can be doubled. HEVC uses many complex technologies to achieve the improvement of compression rate. Specifically, (1) HEVC uses a quadtree block method. Each block is called a coding unit (CU). The maximum size of a CU is 64x64. Each CU can be recursively divided into four sub-CUs, and the minimum size of a CU is 8x8. Therefore, HEVC's block segmentation method is more flexible than H.264, and there are more types of blocks. (2) HEVC can try more prediction modes for each CU. Each prediction mode corresponds to a prediction unit (PredictionUnit, PU). There are two types of prediction modes: inter-frame prediction mode (including Merge&Skip_2Nx2N, Inter_2Nx2N, Inter_2NxN, Inter_Nx2N, Inter_2NxnU, Inter_2NxnD, Inter_nLx2N, Inter_nRx2N, Inter_NxN, etc.) and intra-frame prediction mode (including Intra_2Nx2N, Intra_NxN). I frames can only use intra-frame prediction mode, while P and B frames can use all prediction modes. HEVC calculates the coding cost of each mode and selects the prediction mode with the smallest coding cost, so as to achieve a higher compression effect.

[0003] In HEVC's P and B frames, the intra-frame prediction mode is also a very important prediction mode. For motion sequences, since motion is accompanied by the appearance of new scenes and the disappearance of old scenes, there will be some coding units in each frame that cannot find matching blocks in other frames. For such coding units, the prediction effect of using intra-frame prediction may be significantly better than inter-frame prediction. However, in general, most coding units can find matching blocks in adjacent frames in the time domain, so the proportion of intra-frame prediction selection in P and B frames is relatively low.

[0004] HEVC's intra-frame prediction mode has also been greatly improved compared to H264: HEVC supports 33 directional prediction modes and 2 non-directional prediction modes (Planar and DC modes), while H264 only has 8 directional prediction modes. Therefore, HEVC's Intra is much more complex than H264, and it is necessary to calculate the RD cost (rate-distortion cost) for each prediction mode. The process of this mode decision-making has high computational complexity and very high time overhead. Therefore, if unnecessary RDO (Rate-Distortion Optimize) mode selection can be reduced, the encoder's resource overhead can be greatly reduced, thereby increasing the encoding speed and reducing the encoding cost. Summary of the invention

[0005] The present application provides a method and apparatus for video prediction coding to solve the problems of high bit rate consumption, low coding efficiency and high coding cost caused by executing intra-frame prediction mode in the inter-frame coding process in the prior art.

[0006] In a first aspect, an embodiment of the present application provides a method for video predictive coding, the method comprising:

[0007] During inter-frame prediction, in a decision process of deciding an optimal mode of a current prediction unit, information about an executed mode is determined according to an executed mode, wherein the executed mode information includes an optimal mode of a stage and a cost of the optimal mode of the stage;

[0008] According to the executed mode information, it is determined whether to skip the intra prediction mode of the decision process.

[0009] In a second aspect, an embodiment of the present application further provides a device for video predictive coding, the device comprising:

[0010] An executed mode information determination module, used for determining executed mode information according to an executed mode in a decision process of deciding an optimal mode of a current prediction unit during inter-frame prediction, wherein the executed mode information includes an optimal mode of a stage and a cost of the optimal mode of the stage;

[0011] The intra-frame prediction mode skipping decision module is used to determine whether to skip the intra-frame prediction mode of the decision process according to the executed mode information.

[0012] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above method when executing the program.

[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned method when executed by a processor.

[0014] This application has the following beneficial effects:

[0015] In this embodiment, during inter-frame prediction, in the decision process of deciding the optimal mode of the current prediction unit, the executed mode information can be determined according to the executed mode, and the executed mode information includes the stage optimal mode and the cost of the stage optimal mode. Then, according to the obtained executed mode information, it is determined whether to skip the intra-frame prediction mode of the decision process, thereby reducing the consumption of the Intra mode, which can greatly reduce the resource overhead of the encoder, thereby increasing the encoding speed and reducing the encoding cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flowchart of a method embodiment of video predictive coding provided in Embodiment 1 of the present application;

[0017] Figure 2 This is a schematic diagram of a decision process of an inter-frame PU mode provided in Embodiment 1 of the present application;

[0018] Figure 3 This is a flowchart of an Intra mode skip decision provided in Embodiment 1 of the present application;

[0019] Figure 4 This is another flowchart of Intra mode skipping decision provided in Embodiment 1 of the present application;

[0020] Figure 5 It is a structural block diagram of a video prediction coding device embodiment provided in Embodiment 2 of the present application;

[0021] Figure 6 It is a structural schematic diagram of an electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0022] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be 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 ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0023] Embodiment 1

[0024] Figure 1A flowchart of a method embodiment of video prediction coding provided in Embodiment 1 of the present application, this embodiment can be applied to the prediction coding stage in video coding, prediction coding refers to using one or more encoded sample values, according to a certain model or method, to predict the current sample value, and encode the difference between the true sample value and the predicted value, by transforming, quantizing, and entropy encoding the predicted residual instead of the original pixel value, thereby greatly improving the coding efficiency. Prediction coding can include intra-frame prediction Intra mode and inter-frame prediction Inter mode, I frame can only use Intra mode, P, B frame can use all prediction modes.

[0025] In HEVC's P and B frames, the Intra mode is also a very important prediction mode. The Intra mode mainly uses the correlation of video spatial pixels and uses the coded pixels to predict the current pixels to achieve the purpose of removing video spatial redundancy. In HEVC, there are 5 types of PUs for intra-frame coding of the luminance component: 4x4, 8x8, 16x16, 32x32, and 64x64. Each size of PU corresponds to 35 prediction modes, namely DC, Planar, and 33 angle modes. There are 5 prediction modes for the chrominance component, namely DC, Planar, horizontal, vertical, and luminance component corresponding prediction modes. It is necessary to calculate the RDcost for each prediction mode. The process of this mode decision is highly complex and time-consuming. If the unnecessary RDO mode selection can be reduced through the intra-frame PU fast algorithm, the resource overhead of the encoder can be greatly reduced, thereby increasing the encoding speed and reducing the encoding cost.

[0026] Based on this, this embodiment can quickly process the intra-frame mode when doing inter-frame coding. The compression speed of the encoder can be improved by simplifying the complexity of the intra-frame mode decision during the inter-frame coding process of the encoder. After the compression speed of the encoder is improved, the throughput rate of the transcoding service can be improved, thereby saving server resources and reducing transcoding costs.

[0027] It should be noted that the method mentioned in this embodiment can be applied to any block-based hybrid coding architecture, and any encoder that complies with the HEVC coding standard can be applied. Other encoders that comply with AVS1, H.264, VP8, VP9, ​​AVS2, AVS3, AV1, VVC and other standards can also be used directly after adjustment. The encoder mentioned in this embodiment can be applied not only to transcoding services, but also to mobile real-time coding services.

[0028] This embodiment may include the following steps:

[0029] Step 110, during inter-frame prediction, in the process of deciding the optimal mode of the current prediction unit, the executed mode information is determined according to the executed mode, and the executed mode information includes the stage optimal mode and the cost of the stage optimal mode.

[0030] Step 120: Determine whether to skip the intra prediction mode of the decision process according to the executed mode information.

[0031] In an exemplary embodiment, referring to Figure 2 A schematic diagram of a decision process of an inter-frame PU mode is shown. The decision process of the inter-frame PU mode may include the following process:

[0032] First, perform the MERGE / SKIP mode at the 2Nx2N level. If the recursive conditions are met, execute the CU recursive mode. After the recursion is completed, return to the current block size CU and continue to execute the intra-frame prediction Intra mode. After Intra is completed, execute the 2Nx2N inter-frame mode (forward and backward search are performed to select the best matching block respectively), then execute the 2Nx2N BIDIR (only perform bidirectional search to obtain the best matching block), and then continue to execute the 2NxN and Nx2N mode types. After each mode is completed, a mode decision is made to obtain the stage optimal mode tempBestMode.

[0033] After executing Nx2N,

[0034] If tempBestMode==2NxN, continue to execute 2NxnU and 2NxnD, and obtain the final optimal mode BestMode after comparison.

[0035] If tempBestMode==Nx2N, then continue to execute nLx2N and nRx2N, and obtain the final optimal mode BestMode after comparison.

[0036] If tempBestMode!=2NxN&&tempBestMode!=Nx2N, then continue to execute 2NxnU, 2NxnD, nLx2N, nRx2N, and get the final optimal mode BestMode after comparison.

[0037] It should be noted that if the current block is CU recursive, the BestMode cost is compared with the recursive cost to determine whether to perform CU recursive division.

[0038] In addition, modes such as 2NxN, Nx2N, 2NxnU, 2NxnD, nLx2N, and nRx2N contain two PUs, and each PU needs to perform MERGE / SKIP, forward and backward search, and bidirectional search to obtain the optimal matching block.

[0039] With respect to the above-mentioned decision-making process, this embodiment can obtain corresponding executed mode information based on the executed mode when making the optimal mode decision for the inter-frame prediction mode of the current PU, and determine whether to skip the intra-frame prediction Intra mode in the above-mentioned decision-making process based on the executed mode information.

[0040] Exemplarily, the executed mode information may include the optimal mode of the stage and the cost of the optimal mode of the stage. According to different executed mode information, this embodiment designs different ways to determine whether to skip the Intra mode.

[0041] In an exemplary implementation scenario, skipping the Intra mode can be skipping part of the Intra process, that is, when executing the Intra mode, intervening in the internal decision of Intra so that Intra tries not to do RDO, thereby reducing the complexity of the Intra mode and saving encoding time. The decision of the intra-frame fast mode can be made directly based on the inter-frame coding PU information of the current PU to determine whether to skip the Intra mode, without additional calculation, and with high cost performance.

[0042] In one embodiment, the cost of the phase-optimal mode may include the SATD cost of the phase-optimal mode, such as Figure 3 As shown, step 120 may include the following sub-steps:

[0043] Sub-step S11 : performing a SATD rough selection decision of the intra-frame prediction mode on the prediction unit to determine the SATD cost of the optimal intra-frame prediction mode.

[0044] In one implementation, when executing the intra-frame prediction mode, a low-complexity SATD (Sum of Absolute Transformed Difference) cost can be used to select the prediction mode with the lowest SATD cost from all available intra-frame prediction modes as the optimal intra-frame prediction mode.

[0045] Sub-step S12, judging whether to skip the subsequent process of the intra-frame prediction mode according to the size of the prediction unit, combined with the SATD cost of the optimal mode of the stage and the SATD cost of the optimal intra-frame prediction mode.

[0046] In this step, after obtaining the SATD cost InterSATDCost of the optimal mode of the stage and the SATD cost RModeSATDCost of the optimal intra prediction mode, it can be determined whether to skip the subsequent process in the Intra mode according to PUs of different sizes.

[0047] Among them, PUs of different sizes may include 2Nx2N PUs and NxN PUs. 2Nx2N refers to PUs of 64x64, 32x32, 16x16, and 8x8 block sizes; NxN refers to PUs of 4x4 block sizes.

[0048] In one embodiment, if the size of the current PU is NxN, sub-step S12 may further include the following sub-steps:

[0049] Sub-step S121, determining whether the first 4x4 prediction unit adopts the transform skip mode.

[0050] In this embodiment, if the current PU size is NxN, NxN is a special Intra coding mode that only supports 8x8 block PUs, and can be further divided into 4 4x4 PUs for Intra coding. For 4x4 PU coding, there is a special coding mode called Transformskip (TSKIP).

[0051] Transform skip mode is a technology introduced in HEVC. Its application scope is 4x4 blocks within or between frames. It has a significant effect on video sequences with slow scene changes and can improve compression efficiency. Since there is a certain correlation between the transform skip modes of the four 4x4 PUs obtained by division, this embodiment can take the transform skip mode of the first 4x4 PU for judgment, that is, to judge whether the TU (Transform Unit) corresponding to the first 4x4 PU adopts the transform skip mode decision to decide whether to skip the subsequent process not executed in the Intra mode.

[0052] Sub-step S122, determining a mode cost threshold based on the judgment result and the SATD cost of the optimal mode of the stage.

[0053] In one implementation, if the first 4x4 PU uses the transform skip mode, the mode cost threshold is determined as the product of the SATD cost of the stage optimal mode and the first adjustment factor; if the first 4x4 PU does not use the transform skip mode, the mode cost threshold is determined as the product of the SATD cost of the stage optimal mode and the second adjustment factor, wherein the second adjustment factor is less than the first adjustment factor. That is, the mode cost threshold can be determined by the following formula:

[0054] SATDCostThreshold=firstTskip? InterSATDCost*a1:InterSATDCost*b1

[0055] Among them, SATDCostThreshold is the mode cost threshold, firstTskip? is the judgment whether the first 4x4 PU adopts the transform skip mode (that is, whether the first 4x4 PU is a TSKIP block); InterSATDCost is the SATD cost of the stage optimal mode, a1 is the first adjustment factor, and b1 is the second adjustment factor.

[0056] When firstTskip is 1, it means that the first 4x4 PU is a TSKIP block, then SATDCostThreshold = InterSATDCost*a1; when firstTskip is 0, it means that the first 4x4 PU is not a TSKIP block, then SATDCostThreshold = InterSATDCost*b1.

[0057] It should be noted that since TSKIP has a positive impact on coding efficiency, if the first 4x4 PU is TSKIP, the probability of subsequent blocks being TSKIP is relatively high, so the mode cost threshold can be increased to avoid skipping. Therefore, a1>b1 can be set. Of course, the specific values ​​of a1 and b1 can be set according to actual needs. For example, a1 can be set to 0.5 and b1 can be set to 0.3.

[0058] Sub-step S123: if the SATD cost of the optimal intra-frame prediction mode is greater than the mode cost threshold, then skipping the subsequent process of the intra-frame prediction mode.

[0059] After determining the mode cost threshold, the SATD cost of the optimal intra-frame prediction mode can be compared with the mode cost threshold. If the SATD cost of the optimal intra-frame prediction mode is greater than the mode cost threshold, it means that the cost of intra-frame coding is relatively high and the Intra mode wastes bit rate. In this case, the subsequent process of the Intra mode can be skipped.

[0060] In one implementation, the judgment condition may be set in combination with the adjustment factor, and different acceleration requirements may be achieved by setting the adjustment factor. For example, the following condition may be used to determine whether to skip the subsequent process of the Intra mode:

[0061] if(RModeSATDCost*c>d*SATDCostThreshold)

[0062] skipIntra = true;

[0063] That is, if RModeSATDCost*c is greater than d*SATDCostThreshold, it means that the encoding cost of executing the Intra mode is relatively large, and the subsequent process of the Intra mode can be skipped; among them, c and d are adjustment factors, which can be set according to actual needs. For example, c and d can both be set to the value 1.

[0064] In another embodiment, if the size of the current PU is 2Nx2N, it can be determined whether to skip the subsequent process of the Intra mode in combination with its coding recursion. Figure 2 As shown, if the executed mode includes the CU recursive mode, the executed mode information may also include the ratio of the coding sub-block corresponding to the current CU to the intra-prediction sub-block, wherein the intra-prediction sub-block is the sub-block whose optimal mode at the decision stage is the intra-prediction mode. For example, for the 4 CU sub-blocks divided by the current CU, if there is one sub-block whose optimal mode is the Intra mode (i.e., the Intra sub-block) among the 4 CU sub-blocks, the ratio is 1 / 4; if there are two sub-blocks whose optimal mode is the Intra mode among the 4 CU sub-blocks, the ratio is 2 / 4.

[0065] In an example, if the size of the current PU is 2Nx2N, sub-step S12 may include the following sub-steps:

[0066] If the SATD cost of the optimal intra-frame prediction mode is greater than the SATD cost of the optimal mode of the stage, and the ratio is less than a preset ratio threshold, the subsequent process of the intra-frame prediction mode is skipped.

[0067] For example, the following formula can be used to determine whether to skip the subsequent process of the Intra mode:

[0068] if(RModeSATDCost*e>f*InterSATDCost&&Ra <g)

[0069] skipIntra = true;

[0070] Among them, Ra is the ratio of the CU sub-block corresponding to the current CU to the Intra sub-block; e, f and g are adjustment factors, which can be set according to actual needs. For example, e, f and g can be set to 1, 1 and 0.75 respectively.

[0071] For the above formula, if RModeSATDCost*e>f*InterSATDCost, it means that the cost of intra-frame prediction coding is relatively high, and if the Ra of the CU sub-block is relatively low, such as lower than g, then the probability that the optimal mode in the corresponding CU is the Intra mode is also relatively low. Therefore, the subsequent process of the Intra mode can be skipped directly to terminate the execution of the Intra mode in advance, so as to save prediction time and improve coding efficiency.

[0072] In other embodiments, if it is determined according to sub-steps S11 and S12 that the subsequent process of the Intra mode is not skipped, the subsequent process of Intra can be continued. For example, the candidate prediction mode roughly selected by SATD and MPM (Most Possible Mode) can be combined into a candidate prediction mode set, where MPM is calculated based on the intra-frame prediction mode of the adjacent PU, and the adjacent PUs are the upper block, the left block, and the upper left block. Then, RDO is performed on the candidate prediction mode set to obtain the optimal intra-frame prediction mode.

[0073] In another exemplary implementation scenario, the Intra mode can be skipped for the entire Intra process, and Intra is not performed directly to save encoding time. In the decision process of the inter-frame optimal mode, the information of the stage optimal mode can be directly used to determine whether to skip the Intra mode. The stage optimal mode is variable according to different content, adaptively adjusted, and has strong robustness.

[0074] In one embodiment, the cost of the phase optimal mode may include the RDO cost of the phase optimal mode, such as Figure 4 As shown, step 120 may include the following sub-steps:

[0075] Sub-step S21, determining whether the executed mode includes a coding unit recursive mode.

[0076] Sub-step S22, combining the result of the judgment, judging whether to skip the intra-frame prediction mode of the decision process according to the optimal mode of the stage and / or the RDO cost of the optimal mode of the stage.

[0077] In one embodiment, if the executed mode includes the CU recursive mode, the executed mode information may also include one or a combination of the following information: the sum of the RDO costs of the coding sub-blocks corresponding to the current coding unit; first flag information for marking whether the current coding unit is an all-zero block; second flag information for marking whether the coding sub-block corresponding to the current coding unit has an intra-frame prediction sub-block, and the intra-frame prediction sub-block is a sub-block whose optimal mode of prediction is the intra-frame prediction mode. Then sub-step S22 may include the following sub-steps:

[0078] If one or a combination of the following conditions are met, the Intra mode of the decision-making process is skipped:

[0079] Condition 1: The sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage.

[0080] Specifically, since the executed modes are all modes that have performed RDO, when the mode execution is completed, the corresponding RDO information (ie, the executed mode information) is also available.

[0081] After executing the CU recursive mode, the RDO cost of each CU sub-block can be obtained. The sum of the RDO costs of all CU sub-blocks can be calculated to obtain the sum of the RDO costs (i.e., the recursive cost). If the sum of the RDO costs is greater than the RDO cost of the stage optimal mode, it means that the recursive cost is greater than the stage optimal cost, and CU recursive division can be omitted, which saves bit rate. The Intra mode is more bit rate-consuming, so if it is determined that the sum of the RDO costs is greater than the RDO cost of the stage optimal mode, the bit rate can be saved by skipping the Intra mode.

[0082] Condition 2: The first flag information marks the current coding unit as an all-zero block.

[0083] In this condition, if the first flag information marks the current block as an all-zero block, because the all-zero block consumes a relatively low bit rate, and the Intra mode consumes a relatively high bit rate, the two are contradictory, and the probability that the optimal mode under the all-zero block is the Intra mode is also very low. Therefore, when the current block is determined to be an all-zero block, the Intra mode can be skipped.

[0084] Condition 3: The second flag information indicates that the coding sub-block corresponding to the current coding unit does not have an intra-frame prediction sub-block.

[0085] Under this condition, if there is no Intra sub-block in the sub-block (that is, there is no sub-block in the sub-block whose optimal mode is predicted to be the Intra mode), the probability that the optimal mode of the current block is the Intra mode is also very low. Therefore, when it is determined that there is no Intra sub-block in the sub-block, the Intra mode can be skipped directly.

[0086] In other implementations, in order to improve the accuracy of the decision and reduce the loss, the above three conditions may be combined for decision making. For example, condition 1 and condition 2 may be combined. When both condition 1 and condition 2 are met, the Intra mode is skipped, as shown in the following conditional judgment formula:

[0087] skipIntra = true;

[0088] Among them, SubCuRdCost i Represents the RDO cost of the CU sub-block, Represents the sum of the RDO costs of the sub-blocks. BestModeRdCost is the RDO cost of the best mode of the stage; BestMode->CBF represents the first flag information, which is used to indicate whether the current block is an all-zero block after encoding; splitIntra represents the second flag information, which is used to indicate whether there is an Intra block in the sub-block; a2 and b2 are adjustment factors, which can be adjusted according to actual needs. For example, a2 and b2 can be set to the value 1 by default.

[0089] In the above conditional judgment, if If both conditions hold true, that is, the current block is an all-zero block and the sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage, the Intra mode is skipped. Alternatively, if there is no Intra block in the sub-block, the Intra mode is also skipped.

[0090] In another implementation, if the executed mode does not include the CU recursive mode, then sub-step S22 may include the following sub-steps:

[0091] If the optimal mode at the stage is the SKIP mode, the intra prediction mode is skipped.

[0092] In this embodiment, since the SKIP mode saves bit rate and the Intra mode consumes bit rate, in order to save bit rate, if the optimal mode in the stage determined according to the executed mode is the SKIP mode, the Intra mode can be skipped directly.

[0093] In other embodiments, if the Intra mode cannot be skipped through the above sub-steps S21 and S22, the present embodiment may further include the following steps:

[0094] Perform 2Nx2N intra-frame coding on the current coding unit and obtain a 2Nx2N intra-frame SATD cost; if the 2Nx2N intra-frame SATD cost is greater than the SATD cost of the optimal mode at the stage, skip the NxN intra-frame prediction mode.

[0095] In this embodiment, if the Intra mode cannot be skipped after the above sub-steps S21 and S22, the current CU can be firstly Intra encoded with 2Nx2N to obtain a 2Nx2N Intra SATD cost, and then the 2Nx2NIntraSATD cost is compared with the SATD cost of the optimal mode of the stage to determine whether to skip the NxN Intra mode.

[0096] For example, the following judgment formula can be used to determine whether to skip the NxN Intra mode:

[0097] if(a3*Intra2Nx2NSATDCost>b3*BestModeSATDCost)

[0098] skipIntraNxN = true;

[0099] Among them, Intra2Nx2NSATDCost is the 2Nx2N Intra SATD cost; BestModeSATDCost is the SATD cost of the best mode in the stage; a3 and b3 are adjustment factors, which can be set according to actual needs. For example, a3 and b3 can be set to 10 and 11.

[0100] In this embodiment, during inter-frame prediction, in the decision process of deciding the optimal mode of the current prediction unit, the executed mode information can be determined according to the executed mode, and the executed mode information includes the optimal mode of the stage and the cost of the optimal mode of the stage. Then, based on the obtained executed mode information, it is determined whether to skip the intra-frame prediction mode of the decision process, thereby reducing the consumption of the Intra mode, which can greatly reduce the resource overhead of the encoder, thereby increasing the encoding speed and reducing the encoding cost. Through the judgment of skipping the Intra mode in this embodiment, the encoding speed can be increased by 15% under the condition of a 0.2% loss in the encoder compression rate. From the perspective of online transcoding applications, 15% of server computing resources can be saved under the condition of slight image quality loss, thereby reducing the transcoding cost.

[0101] Embodiment 2

[0102] Figure 5 The structural block diagram of a video prediction coding device embodiment provided in Embodiment 2 of the present application may include the following modules:

[0103] An executed mode information determination module 510 is used to determine executed mode information according to an executed mode in a decision process of determining an optimal mode of a current prediction unit during inter-frame prediction, wherein the executed mode information includes an optimal mode of a stage and a cost of the optimal mode of the stage;

[0104] The intra-frame prediction mode skipping decision module 520 is used to determine whether to skip the intra-frame prediction mode of the decision process according to the executed mode information.

[0105] In one implementation, the cost of the phase optimal mode includes the SATD cost of the phase optimal mode; the intra prediction mode skip decision module 520 may include the following submodules:

[0106] A SATD rough selection submodule, used for making a SATD rough selection decision of the intra-frame prediction mode for the prediction unit to determine the SATD cost of the optimal intra-frame prediction mode;

[0107] The first Intra mode skip judgment submodule is used to judge whether to skip the subsequent process of the intra prediction mode according to the size of the prediction unit, combined with the SATD cost of the optimal mode of the stage and the SATD cost of the optimal intra prediction mode.

[0108] In one implementation, the size of the prediction unit is NxN, and the first Intra mode skip determination submodule is specifically used for:

[0109] Determine whether the first 4x4 prediction unit adopts the transform skip mode;

[0110] Determine a mode cost threshold based on the result of the judgment and the SATD cost of the optimal mode in the stage;

[0111] If the SATD cost of the optimal intra-frame prediction mode is greater than the mode cost threshold, the subsequent process of the intra-frame prediction mode is skipped.

[0112] In one implementation, the first Intra mode skip determination submodule is specifically configured to:

[0113] If the first 4x4 prediction unit adopts the transform skip mode, the mode cost threshold is determined as the product of the SATD cost of the optimal mode of the stage and the first adjustment factor;

[0114] If the first 4x4 prediction unit does not adopt the transform skip mode, the mode cost threshold is determined as the product of the SATD cost of the optimal mode of the stage and a second adjustment factor, and the second adjustment factor is smaller than the first adjustment factor.

[0115] In another embodiment, if the size of the prediction unit is 2Nx2N, the executed mode includes a coding unit recursive mode, and the executed mode information includes a ratio of a coding subblock corresponding to the current coding unit to an intra-frame prediction subblock, and the intra-frame prediction subblock is a subblock whose optimal mode of prediction is an intra-frame prediction mode;

[0116] The first Intra mode skip judgment submodule is specifically used for:

[0117] If the SATD cost of the optimal intra prediction mode is greater than the SATD cost of the optimal mode of the stage, and the ratio is less than a preset ratio threshold, the subsequent process of the intra prediction mode is skipped.

[0118] In one implementation, the cost of the phase optimal mode includes the RDO cost of the phase optimal mode; the intra prediction mode skip decision module 520 may include the following submodules:

[0119] A recursion determination submodule, used to determine whether the executed mode includes a coding unit recursion mode;

[0120] The second Intra mode skip judgment submodule is used to judge whether to skip the intra prediction mode of the decision process according to the optimal mode of the stage and / or the RDO cost of the optimal mode of the stage in combination with the judgment result.

[0121] In one embodiment, if the executed mode includes a coding unit recursive mode, the executed mode information further includes one or a combination of the following: a sum of RDO costs of a coding sub-block corresponding to a current coding unit; first flag information for marking whether the current coding unit is an all-zero block; second flag information for marking whether a coding sub-block corresponding to the current coding unit has an intra-frame prediction sub-block, the intra-frame prediction sub-block being a sub-block whose optimal mode of prediction is an intra-frame prediction mode;

[0122] The second Intra mode skip judgment submodule is specifically used for:

[0123] If one or a combination of the following conditions are met, the intra prediction mode of the decision process is skipped:

[0124] The sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage;

[0125] The first flag information marks the current coding unit as an all-zero block;

[0126] The second flag information indicates that the coding sub-block corresponding to the current coding unit does not have an intra-frame prediction sub-block.

[0127] In one implementation, if the executed mode does not include the coding unit recursive mode; the second Intra mode skip judgment submodule is specifically used to:

[0128] If the optimal mode at the stage is the SKIP mode, the intra prediction mode is skipped.

[0129] In one embodiment, the cost of the phase optimal mode further includes the SATD cost of the phase optimal mode; the device further includes:

[0130] A 2Nx2N intra-frame coding module, configured to perform 2Nx2N intra-frame coding on the current coding unit and obtain a 2Nx2N intra-frame SATD cost if it is determined that the intra-frame prediction mode of the decision process is not skipped;

[0131] The NxN Intra mode skipping decision module is used to skip the NxN intra prediction mode if the 2Nx2N intra SATD cost is greater than the SATD cost of the optimal mode in the stage.

[0132] It should be noted that the above-mentioned video prediction coding device provided in the embodiment of the present application can execute the video prediction coding method provided in the first embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.

[0133] Embodiment 3

[0134] Figure 6 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application is shown in FIG. Figure 6 As shown, the electronic device includes a processor 610, a memory 620, an input device 630, and an output device 640; the number of the processor 610 in the electronic device can be one or more. Figure 6 A processor 610 is taken as an example; the processor 610, the memory 620, the input device 630 and the output device 640 in the electronic device can be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0135] The memory 620 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present application. The processor 610 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 620, that is, implementing the above method.

[0136] The memory 620 may mainly include a program storage area and a data storage area, wherein the program storage area

[0137] The operating system and the application required for at least one function may be stored; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 620 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 620 may further include a memory remotely arranged relative to the processor 610, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0138] The input device 630 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 640 may include a display device such as a display screen.

[0139] Embodiment 4

[0140] Embodiment 4 of the present application further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the method in any one of the embodiments in Embodiment 1 when executed by a processor of a server.

[0141] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0142] It is worth noting that in the embodiment of the above-mentioned 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 scope of protection of this application.

[0143] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for video predictive coding, characterized in that: The method comprises: During inter-frame prediction, in a process of determining an optimal mode for a current prediction unit, determining executed mode information according to an executed mode, the executed mode information including an optimal mode of a stage and a cost of the optimal mode of the stage; determining, based on the executed mode information, whether to skip the intra prediction mode of the decision process; The cost of the optimal mode of the stage includes the SATD cost of the optimal mode of the stage; and determining whether to skip the intra prediction mode of the decision process according to the executed mode information includes: Performing a SATD coarse selection decision of an intra-frame prediction mode on the prediction unit to determine a SATD cost of an optimal intra-frame prediction mode; Determining whether to skip a subsequent process of the intra prediction mode according to the size of the prediction unit and in combination with the SATD cost of the optimal mode of the stage and the SATD cost of the optimal intra prediction mode; The size of the prediction unit is NxN, and the SATD cost of the optimal mode of the stage and the SATD cost of the optimal intra-frame prediction mode are combined to determine whether to skip the subsequent process of the intra-frame prediction mode, including: Determine whether the first 4x4 prediction unit adopts transform skip mode; Determine a mode cost threshold based on the judgment result and the SATD cost of the optimal mode in the stage; If the SATD cost of the optimal intra prediction mode is greater than the mode cost threshold, skipping the subsequent process of the intra prediction mode; If the size of the prediction unit is 2Nx2N, the executed mode includes a coding unit recursive mode, and the executed mode information includes a ratio of a coding subblock corresponding to the current coding unit to an intra-frame prediction subblock, where the intra-frame prediction subblock is a subblock whose optimal prediction mode is an intra-frame prediction mode; The determining whether to skip the subsequent process of the intra prediction mode by combining the SATD cost of the optimal mode of the stage and the SATD cost of the optimal intra prediction mode includes: If the SATD cost of the optimal intra prediction mode is greater than the SATD cost of the optimal mode of the stage, and the ratio is less than a preset ratio threshold, skipping the subsequent process of the intra prediction mode; or, The cost of the optimal mode of the stage includes an RDO cost of the optimal mode of the stage; and determining whether to skip the intra prediction mode of the decision process according to the executed mode information includes: determining whether the executed mode includes a coding unit recursive mode; In combination with the result of the determination, judging whether to skip the intra prediction mode of the decision process according to the optimal mode of the stage and / or the RDO cost of the optimal mode of the stage; If the executed mode includes a coding unit recursive mode, the executed mode information further includes one or a combination of the following: a sum of RDO costs of a coding sub-block corresponding to a current coding unit; first flag information for marking whether the current coding unit is an all-zero block; second flag information for marking whether the coding sub-block corresponding to the current coding unit has an intra-frame prediction sub-block, where the intra-frame prediction sub-block is a sub-block whose optimal prediction mode is an intra-frame prediction mode; The step of determining whether to skip the intra prediction mode of the decision process according to the optimal mode of the stage and / or the RDO cost of the optimal mode of the stage in combination with the result of the determination includes: If one of the following conditions is met, the intra prediction mode of the decision process is skipped: The sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage; The second flag information indicates that the coding sub-block corresponding to the current coding unit does not have an intra-frame prediction sub-block; If the following conditions are met, the intra prediction mode of the decision process is skipped: The sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage; The first flag information marks the current coding unit as an all-zero block; The second flag information indicates that the coding sub-block corresponding to the current coding unit does not have an intra-frame prediction sub-block.

2. The method according to claim 1, characterized in that The determining of the mode cost threshold based on the judgment result and the SATD cost of the optimal mode of the stage includes: If the first 4x4 prediction unit adopts the transform skip mode, the mode cost threshold is determined as the product of the SATD cost of the optimal mode of the stage and the first adjustment factor; If the first 4x4 prediction unit does not adopt the transform skip mode, the mode cost threshold is determined as the product of the SATD cost of the optimal mode of the stage and a second adjustment factor, and the second adjustment factor is smaller than the first adjustment factor.

3. The method according to claim 1, characterized in that If the executed mode does not include the coding unit recursive mode; determining whether to skip the intra prediction mode of the decision process according to the optimal mode of the stage and / or the RDO cost of the optimal mode of the stage in combination with the determination result, includes: If the optimal mode at the stage is the SKIP mode, the intra prediction mode is skipped.

4. The method according to any one of claims 1 and 3, characterized in that When the cost of the optimal mode at the stage includes an RDO cost of the optimal mode at the stage, and it is determined that the intra prediction mode of the decision process is not skipped, the cost of the optimal mode at the stage also includes a SATD cost of the optimal mode at the stage; performing 2Nx2N intra encoding on the current coding unit and obtaining a 2Nx2N intra SATD cost; If the 2Nx2N intra SATD cost is greater than the SATD cost of the optimal mode at that stage, the NxN intra prediction mode is skipped.

5. A device for video predictive coding, characterized in that: The device comprises: an executed mode information determination module, configured to determine executed mode information according to an executed mode in a process of determining an optimal mode for a current prediction unit during inter-frame prediction, wherein the executed mode information includes an optimal mode of a stage and a cost of the optimal mode of the stage; an intra-frame prediction mode skipping decision module, configured to determine whether to skip the intra-frame prediction mode of the decision process according to the executed mode information; The cost of the optimal mode of the stage includes the SATD cost of the optimal mode of the stage; the intra-frame prediction mode skip decision module includes the following submodules: A SATD coarse selection submodule, configured to perform a SATD coarse selection decision of an intra-frame prediction mode on the prediction unit to determine a SATD cost of an optimal intra-frame prediction mode; A first Intra mode skip judgment submodule is configured to judge whether to skip a subsequent process of the intra prediction mode according to the size of the prediction unit, the SATD cost of the optimal mode of the stage, and the SATD cost of the optimal intra prediction mode; The size of the prediction unit is NxN, and the first Intra mode skip judgment submodule is specifically used for: Determine whether the first 4x4 prediction unit adopts transform skip mode; Determine a mode cost threshold based on the judgment result and the SATD cost of the optimal mode in the stage; If the SATD cost of the optimal intra prediction mode is greater than the mode cost threshold, skipping the subsequent process of the intra prediction mode; If the size of the prediction unit is 2Nx2N, the executed mode includes a coding unit recursive mode, and the executed mode information includes a ratio of a coding subblock corresponding to the current coding unit to an intra-frame prediction subblock, where the intra-frame prediction subblock is a subblock whose optimal prediction mode is an intra-frame prediction mode; The first Intra mode skip judgment submodule is specifically used to: If the SATD cost of the optimal intra prediction mode is greater than the SATD cost of the optimal mode of the stage, and the ratio is less than a preset ratio threshold, skipping the subsequent process of the intra prediction mode; or, The cost of the optimal mode in the stage includes the RDO cost of the optimal mode in the stage; the intra-frame prediction mode skip decision module includes the following submodules: A recursion determination submodule, configured to determine whether the executed mode includes a coding unit recursion mode; a second Intra mode skip judgment submodule, configured to judge whether to skip the intra prediction mode of the decision process based on the optimal mode of the stage and / or the RDO cost of the optimal mode of the stage in combination with the judgment result; If the executed mode includes a coding unit recursive mode, the executed mode information further includes one or a combination of the following: a sum of RDO costs of a coding sub-block corresponding to a current coding unit; first flag information for marking whether the current coding unit is an all-zero block; second flag information for marking whether the coding sub-block corresponding to the current coding unit has an intra-frame prediction sub-block, where the intra-frame prediction sub-block is a sub-block whose optimal prediction mode is an intra-frame prediction mode; The second Intra mode skip judgment submodule is specifically used to: If one of the following conditions is met, the intra prediction mode of the decision process is skipped: The sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage; The second flag information indicates that the coding sub-block corresponding to the current coding unit does not have an intra-frame prediction sub-block; If the following conditions are met, the intra prediction mode of the decision process is skipped: The sum of the RDO costs is greater than the RDO cost of the optimal mode of the stage; The first flag information marks the current coding unit as an all-zero block; The second flag information indicates that the coding sub-block corresponding to the current coding unit does not have an intra-frame prediction sub-block.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.