Method, apparatus, computer device, and storage medium for dividing coding blocks

By obtaining the number of pixel bits of the video encoding block and filtering the partition mode, the problem of low encoding speed in the AV1 video encoding standard is solved, and a more efficient encoding speed is achieved.

CN117615127BActive Publication Date: 2025-05-30XIAOHONGSHU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311560369.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-05-30
Estimated Expiration
2043-11-21

AI Technical Summary

Technical Problem

In the AV1 video encoding standard, the rate distortion cost of each partition mode needs to be calculated during the block encoding process, resulting in a decrease in encoding speed, especially when the finer the encoding block is divided, the more number of encoding blocks, affecting the video encoding speed.

Method used

By obtaining the number of pixel bits of the first coded block of the previous layer partition depth, and excluding the target type of partition mode from the various partition modes that are optional at the current layer partition depth according to the size relationship of the pixel bits and the preset threshold, the partition mode of the target type is selected from the various partition modes that can be divided by the current layer partition depth.

Benefits of technology

The time to determine the partition mode is reduced, and the image blocks with simple content are avoided to divide the content into too small encoding blocks, resulting in too many encoding blocks, thereby improving the encoding speed of the video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117615127B_ABST
    Figure CN117615127B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a method, apparatus, computer device, and storage medium for partitioning coding blocks. By obtaining the pixel bit count of the first coding block at the previous layer partitioning depth under the current layer partitioning depth of the block-based coding process of the video to be coded, where the number of layers of the current layer partitioning depth is greater than 0; according to the magnitude relationship between the pixel bit count and a preset threshold, excluding the partitioning modes of the target type from various selectable partitioning modes under the current layer partitioning depth; and selecting, from the remaining partitioning modes after exclusion, the partitioning mode used for partitioning the second coding block at the current layer partitioning depth. According to the pixel bit count of the coding block, the embodiment of the present application filters the partitioning modes, which can reduce the time for determining the partitioning mode and the number of coding blocks, and improve the coding speed of the video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and particularly to a method and apparatus for partitioning coding blocks, a computer device, and a storage medium, where the storage medium is a computer-readable storage medium. Background Art

[0002] The AV1 video coding standard adopts a block-based coding method. When coding a coding block, it supports multiple partitioning modes to split the coding block into smaller coding blocks. Usually, it is necessary to calculate the rate-distortion cost of each partitioning mode for the current coding block, and select a partitioning mode for the coding block according to the rate-distortion cost. However, for each partitioning of each coding block, it is necessary to calculate the rate-distortion cost of each partitioning mode, and the finer the coding block is partitioned, the more coding blocks there are, both of which will affect the coding speed of the video. Summary of the Invention

[0003] Embodiments of this application provide a method and apparatus for partitioning coding blocks, a computer device, and a storage medium, which can improve the coding speed of the video.

[0004] A method for partitioning coding blocks provided by an embodiment of this application includes:[[]]

[0005] Based on the current layer partitioning depth of the block-based coding process of the video to be coded, obtain the number of pixel bits of the first coding block at the previous layer partitioning depth, where the number of layers of the current layer partitioning depth is greater than 0;

[0006] According to the magnitude relationship between the number of pixel bits and a preset threshold, exclude the partitioning modes of the target type from the multiple partitioning modes selectable at the current layer partitioning depth;

[0007] Select the partitioning mode used to partition the second coding block at the current layer partitioning depth from the remaining partitioning modes after exclusion.

[0008] Another method for partitioning coding blocks provided by an embodiment of this application includes:[[]]

[0009] Obtain the network latency information of the terminal, where the terminal is the receiving end of the video to be coded;

[0010] According to the network latency information, perform image processing on the target video frame of the video to be coded to determine the non-concerned area in the target video frame;

[0011] Perform filtering processing on the non-concerned area to obtain the video to be coded after processing;

[0012] Perform block-based coding on the video to be coded after processing, and based on the current layer partitioning depth, obtain the number of pixel bits of the first coding block at the previous layer partitioning depth, where the number of layers of the current layer partitioning depth is greater than 0;

[0013] Exclude the partitioning mode of the target type from multiple selectable partitioning modes at the current layer partitioning depth according to the magnitude relationship between the pixel bit number and the preset threshold;

[0014] Select, from the remaining partitioning modes after exclusion, the partitioning mode used for partitioning the second coding block at the current layer partitioning depth.

[0015] Correspondingly, an embodiment of the present application further provides a partitioning device for a coding block, including:

[0016] An obtaining unit, configured to obtain the pixel bit number of the first coding block at the previous layer partitioning depth based on the current layer partitioning depth of the block coding process of the video to be coded, where the number of layers of the current layer partitioning depth is greater than 0;

[0017] An excluding unit, configured to exclude the partitioning mode of the target type from multiple selectable partitioning modes at the current layer partitioning depth according to the magnitude relationship between the pixel bit number and the preset threshold;

[0018] A selecting unit, configured to select, from the remaining partitioning modes after exclusion, the partitioning mode used for partitioning the second coding block at the current layer partitioning depth.

[0019] In an embodiment, the partitioning mode of the target type does not include the non-partitioning mode and the iterative partitioning mode, and the excluding unit is configured to:

[0020] If the pixel bit number is less than the preset threshold, filter out the non-partitioning mode and the iterative partitioning mode from the multiple partitioning modes;

[0021] The selecting unit is configured to:

[0022] Select, from the non-partitioning mode and the iterative partitioning mode, the partitioning mode for partitioning the second coding block.

[0023] In an embodiment, the excluding unit is configured to:

[0024] If the pixel bit number is less than the preset threshold, exclude the partitioning mode of the target type from multiple selectable partitioning modes at the current layer partitioning depth;

[0025] The partitioning device for the coding block further includes:

[0026] A cost calculation unit, configured to calculate the rate-distortion cost of block coding the second coding block through each of the multiple partitioning modes if the pixel bit number is not less than the preset threshold;

[0027] A cost selection unit, configured to select, from the multiple partitioning modes, the partitioning mode with the lowest rate distortion cost as the partitioning mode used for partitioning the second coding block.

[0028] In one embodiment, the partitioning modes of the target type do not include the non-partitioning mode and the iterative partitioning mode, the preset thresholds include a first preset threshold and a second preset threshold, and the first preset threshold is less than the second preset threshold.

[0029] The exclusion unit includes:

[0030] A first screening subunit, configured to screen out the non-partitioning mode and the iterative partitioning mode from the multiple partitioning modes if the number of pixel bits is less than the first preset threshold.

[0031] A second screening subunit, configured to screen out the iterative partitioning mode from the multiple partitioning modes if the number of pixel bits is greater than the second preset threshold.

[0032] The partitioning device for the coding block further includes:

[0033] A partitioning mode selection unit, configured to select a partitioning mode for partitioning the second coding block from the partitioning modes of the target type and the iterative partitioning mode if the number of pixel bits is greater than or equal to the first preset threshold and less than or equal to the second preset threshold.

[0034] In one embodiment, the partitioning device for the coding block further includes:

[0035] A partitioning unit, configured to partition the second coding block based on the partitioning mode selected from the remaining partitioning modes after exclusion, obtain the partitioning result at the current layer partitioning depth, and enter the next layer partitioning depth.

[0036] An updating unit, configured to update the current layer partitioning depth to the upper layer partitioning depth and update the next layer partitioning depth to the current layer partitioning depth.

[0037] A loop unit, configured to return to execute obtaining the number of pixel bits of the first coding block at the upper layer partitioning depth at the current layer partitioning depth of the block-based coding process of the video to be coded until the second coding block is the smallest coding block in the coding process, and obtain the coding result of the video to be coded.

[0038] In one embodiment, the partitioning device for the coding block further includes:

[0039] A sample acquisition unit, configured to acquire video samples.

[0040] An index calculation unit, configured to obtain the encoding rate and the bit rate difference of block encoding the video sample based on each threshold within a threshold range.

[0041] A threshold selection unit, configured to determine a target threshold from the threshold range as a preset threshold according to the encoding rate and the bit rate difference.

[0042] Correspondingly, an embodiment of the present application further provides another device for dividing encoding blocks, including:

[0043] An information acquisition unit, configured to acquire the network latency information of a terminal, where the terminal is the receiving end of the video to be encoded;

[0044] An image processing unit, configured to perform image processing on a target video frame of the video to be encoded according to the network latency information to determine a non - concerned area in the target video frame;

[0045] A filtering processing unit, configured to perform filtering processing on the non - concerned area to obtain the video to be encoded after processing;

[0046] An information amount acquisition unit, configured to perform block encoding on the processed video to be encoded, and based on the current layer division depth, obtain the pixel bit number of a first encoding block at the previous layer division depth, where the number of layers of the current layer division depth is greater than 0;

[0047] A mode exclusion unit, configured to exclude a target type of division mode from multiple optional division modes at the current layer division depth according to the size relationship between the pixel bit number and the preset threshold;

[0048] A mode selection unit, configured to select a division mode used for dividing a second encoding block at the current layer division depth from the remaining division modes after exclusion.

[0049] Correspondingly, an embodiment of the present application further provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute any one of the encoding block division methods provided by the embodiments of the present application.

[0050] Correspondingly, an embodiment of the present application further provides a computer - readable storage medium, where the computer - readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute any one of the encoding block division methods provided by the embodiments of the present application.

[0051] In an embodiment of the present application, based on the current layer division depth in the block coding process of the video to be encoded, the pixel bit count of the first coding block at the previous layer division depth is obtained, and the number of layers of the current layer division depth is greater than 0; according to the magnitude relationship between the pixel bit count and a preset threshold, division modes of a target type are excluded from various optional division modes at the current layer division depth; a division mode used to divide a second coding block at the current layer division depth is selected from the remaining division modes after exclusion.

[0052] In an embodiment of the present application, by filtering the division mode according to the pixel bit count of the coding block of the video frame, the time for determining the division mode can be reduced, and it is also possible to avoid dividing some image blocks with simple content into overly small coding blocks, resulting in an excessive number of coding blocks and improving the video coding speed. Description of the Drawings

[0053] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0054] Figure 1 is a flowchart of a method for dividing a coding block provided by an embodiment of the present application;

[0055] Figure 2 is a division schematic diagram of a division mode provided by an embodiment of the present application;

[0056] Figure 3 is a schematic diagram of the division hierarchy of a coding block provided by an embodiment of the present application;

[0057] Figure 4 is another flowchart of a method for dividing a coding block provided by an embodiment of the present application;

[0058] Figure 5 is a schematic diagram of a device for dividing a coding block provided by an embodiment of the present application;

[0059] Figure 6 is a schematic diagram of another device for dividing a coding block provided by an embodiment of the present application;

[0060] Figure 7 is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. Detailed Embodiments

[0061] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.

[0062] The embodiments of the present application provide a method, apparatus, computer device, and computer-readable storage medium for partitioning coding blocks. The coding block partitioning apparatus can be integrated in a computer device, which can be a server or a terminal device, etc.

[0063] Among them, the terminal can include a mobile phone, a wearable intelligent device, a tablet computer, a laptop computer, a personal computer (PC), and an in-vehicle computer, etc.

[0064] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0065] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.

[0066] This embodiment will be described from the perspective of the coding block partitioning apparatus. The coding block partitioning apparatus can be specifically integrated in a computer device, which can be a server or a terminal device, etc.

[0067] A method for partitioning coding blocks provided by the embodiments of the present application, as Figure 1 shown, the specific process of the coding block partitioning method can be as follows:

[0068] 101. Based on the current layer partitioning depth of the block-based coding process of the video to be coded, obtain the pixel bit count of the first coding block at the previous layer partitioning depth, and the number of layers of the current layer partitioning depth is greater than 0.

[0069] Among them, the video to be coded can be uncoded video data. The video to be coded can include multiple video frames, and each video frame can be divided into a superblock. The superblock is the largest coding unit, and the superblock is larger than other coding blocks after partitioning.

[0070] In the AV1 encoder, the Superblock can be of two sizes, 128x128 or 64x64. Each video frame can be divided into at least one superblock according to the resolution of the video to be encoded. The AV1 video coding standard uses a block-based coding method. When encoding an encoding block, multiple partitioning modes are supported to split the encoding block into smaller encoding blocks. The partitioning modes can include the 9 ways shown in the following table. The partitioning schematic diagram of each partitioning mode can be referred to Figure 2 , and the symbols marked in the figure are the abbreviations of each partitioning mode. Among them, the iterative partitioning mode can also be called the four-way partitioning mode, etc. The iterative partitioning mode is the only mode among the following 10 partitioning modes that can be further partitioned, allowing the superblock to be partitioned into the smallest encoding block (4×4).

[0071]

[0072]

[0073] Taking a superblock with a size of 128×128 as an example for illustration, the partitioning depth starts from 0. As Figure 3 shown, when the number of layers of the partitioning depth (depth) is 0, there are 8 partitioning modes. If the recursive partitioning mode is used to partition the superblock, 4 encoding blocks with a size of 64×64 can be obtained. For each 64×64 encoding block, it can be further partitioned at the partitioning depth of level 1. The encoding blocks obtained by other partitioning modes are not further partitioned. At the partitioning depth of level 1, for the 64×64 encoding block, there are 10 partitioning modes, including the recursive partitioning mode. If the recursive partitioning mode is used to partition the superblock, 4 encoding blocks with a size of 32×32 can be obtained, which can be further partitioned at the partitioning depth of level 2, and so on. The encoding blocks obtained by using the recursive partitioning mode can be continuously partitioned until they are partitioned into the smallest encoding block with a size of 4×4.

[0074] Generally, the rate-distortion cost of each partitioning mode for the current encoding block can be calculated, and a partitioning mode for the encoding block can be selected according to the rate-distortion cost. However, for each partitioning of each encoding block, the rate-distortion cost of each partitioning mode needs to be calculated, and the finer the encoding block is partitioned, the more the number of encoding blocks, both of which will affect the encoding speed of the video.

[0075] In the embodiments of the present application, according to the pixel bits of the encoding block of the video frame, the partitioning mode is filtered, which can reduce the time for determining the partitioning mode, and can also avoid partitioning some simple image blocks into too small encoding blocks, resulting in too many encoding blocks, and can improve the encoding speed of the video.

[0076] The method for dividing coding blocks provided by the embodiments of the present application can be applied to scenarios of real-time video transmission such as live broadcast, video-on-demand, and cloud gaming. By improving the video coding speed, the video transmission efficiency can be enhanced, the video can be played smoothly without stuttering, and thus the user experience can be improved.

[0077] In the scenario of short video on-demand, the user can select the target video to be played on the graphical user interface displayed on the terminal, and the terminal sends a corresponding request to the server in response to the user's operation. After receiving the request sent by the terminal, the server obtains the video data selected by the user, that is, the video to be coded, and then performs coding processing on the video to be coded and transmits it to the terminal for playback. In order to improve the smoothness of video playback on the terminal, in the embodiments of the present application, the AV1 encoder is used to code the video to be coded, and during the coding process, according to the pixel bit number of the first coding block at the previous layer division depth, the division modes of the target type at the current layer division depth are excluded, the time for selecting the division mode is reduced, and the number of coding blocks obtained by division is reduced, so as to improve the coding speed and enhance the smoothness of video playback on the terminal.

[0078] It can be Figure 3 seen that during the process of block coding of the video, it is divided layer by layer. As the division depth increases, the video will be divided into smaller coding blocks. The current layer division depth is the current level at which the coding blocks are divided, and the coding blocks to be divided in the current layer division depth are obtained by using the iterative division mode in the previous layer division depth. For example, if the current layer division depth is the first layer, the previous layer division depth is the 0th layer, and the coding blocks obtained by dividing the 0th layer are further divided in the first layer.

[0079] Among them, the first coding block can be the coding block that has been divided in the previous layer division depth. For example, it can be the coding block obtained by the non-division mode, or the coding block with the same size as the second coding block and the second coding block. The second coding block is the coding block obtained by the iterative division model.

[0080] Exemplarily, the division levels are as Figure 3 shown. Assuming that the current layer division depth is the second layer, then the previous layer division depth is the first layer. The first coding block can be the coding block with a size of 64×64, and the second coding block is the coding block with a size of 32×32.

[0081] Among them, the pixel bit number can be the average number of bits (bit) of each pixel in a coding block. The ratio of the bit number of the coding block to the resolution of the coding block can be calculated to obtain the pixel bit number of the coding block.

[0082] For example, for a superblock, the number of pixels and the total number of bits of the superblock can be obtained, the ratio of the total number of bits to the number of pixels can be calculated, and the pixel bits of the superblock can be obtained. For coding blocks of other sizes, the pixel bits of the coding blocks can also be calculated in the same way.

[0083] 102. According to the magnitude relationship between the pixel bits and a preset threshold, exclude the partitioning modes of the target type from the various partitioning modes selectable at the current layer partitioning depth.

[0084] Among them, the partitioning modes of the target type may include vertical quarter-block partitioning mode, horizontal quarter-block partitioning mode, horizontal partitioning mode, and vertical partitioning mode, or may be other partitioning modes except the non-partitioning mode and the iterative partitioning mode.

[0085] Since the larger the pixel bits, the more complex the image content of the coding block. For a coding block with relatively complex image content, the coding block can be divided into smaller coding blocks to capture more image details and improve the display effect. For a coding block with relatively simple image content, overly fine partitioning of the coding block can be avoided, resulting in a large number of coding blocks. It is possible to determine whether the image content of the coding block is relatively complex and whether it needs to be divided into smaller coding blocks according to the magnitude relationship between the pixel bits and the preset threshold.

[0086] Therefore, the pixel bits can be compared with the preset threshold. If the pixel bits are less than the preset threshold, it means that the image content of the coding block is relatively simple and there is no need to partition the coding block, or there is no need to divide the coding block into too many small coding blocks. For example, if the pixel bits are less than the preset threshold, the coding block is not partitioned. If the pixel bits are not less than the preset threshold, a partitioning mode that divides the coding block into at least two coding blocks is selected.

[0087] Since the iterative partitioning mode is very important among the various partitioning modes, when the pixel bits are less than the preset threshold, a partitioning mode can be selected from the non-partitioning mode and the iterative partitioning mode. That is, in one embodiment, the partitioning modes of the target type do not include the non-partitioning mode and the iterative partitioning mode. Step 102 “According to the magnitude relationship between the pixel bits and the preset threshold, exclude the partitioning modes of the target type from the various partitioning modes selectable at the current layer partitioning depth” includes:

[0088] If the pixel bits are less than the preset threshold, then screen out the non-partitioning mode and the iterative partitioning mode from the various partitioning modes;

[0089] Step 103 “Select the partitioning mode used to partition the second coding block at the current layer partitioning depth from the remaining partitioning modes after exclusion” includes:

[0090] Select a partitioning pattern for partitioning the second coding block from a non-partitioning pattern and an iterative partitioning pattern.

[0091] For example, if the number of pixel bits is less than a preset threshold, filter out the non-partitioning pattern and the iterative partitioning pattern from the various partitioning patterns in the above table, and select one from the non-partitioning pattern and the iterative partitioning pattern as the partitioning pattern used for partitioning the second coding block according to methods such as rate-distortion cost.

[0092] Optionally, it can also be that if the number of pixel bits is less than the preset threshold, first filter out the partitioning patterns of the target type, and then select a partitioning pattern. If the number of pixel bits is not less than the preset threshold, directly select from the various partitioning patterns. And if the number of pixel bits is not less than the preset threshold, it means that the image content of the coding block is more complex and the coding block needs to be divided into smaller coding blocks to capture more image details. That is, in one embodiment, the step of "excluding the partitioning patterns of the target type from the various partitioning patterns optional at the current layer partitioning depth according to the size relationship between the number of pixel bits and the preset threshold" may include:

[0093] If the number of pixel bits is less than the preset threshold, then exclude the partitioning patterns of the target type from the various partitioning patterns optional at the current layer partitioning depth;

[0094] The method for partitioning a coding block provided by the embodiments of the present application may further include:

[0095] If the number of pixel bits is not less than the preset threshold, then calculate the rate-distortion cost of block coding the second coding block through each of the various partitioning patterns;

[0096] Select the partitioning pattern with the lowest rate-distortion cost from the various partitioning patterns as the partitioning pattern used for partitioning the second coding block.

[0097] For example, the partitioning patterns of the target type may include a vertical quarter-block partitioning pattern, a horizontal quarter-block partitioning pattern, an A horizontal three-block partitioning pattern, a B horizontal three-block partitioning pattern, an A vertical three-block partitioning pattern, a B vertical three-block partitioning pattern, a horizontal partitioning pattern, and a vertical partitioning pattern. In one embodiment, only the non-partitioning pattern, the iterative partitioning pattern, the vertical quarter-block partitioning pattern, the horizontal quarter-block partitioning pattern, the horizontal partitioning pattern, and the vertical partitioning pattern are used to partition the coding block, then the partitioning patterns of the target type may include the vertical quarter-block partitioning pattern, the horizontal quarter-block partitioning pattern, the horizontal partitioning pattern, and the vertical partitioning pattern.

[0098] If the number of pixel bits is less than the preset threshold, then exclude the partitioning patterns of the target type from the various partitioning patterns optional at the current layer partitioning depth, and then select from the excluded partitioning patterns; if the number of pixel bits is not less than the preset threshold, then select from the various partitioning patterns optional at the current layer partitioning depth.

[0099] Calculate the rate-distortion cost of block-encoding the second coded block for each of multiple partitioning modes that are depth-selectable through the current layer.

[0100] Select the partitioning mode with the lowest rate-distortion cost from the multiple partitioning modes as the partitioning mode used for partitioning the second coded block.

[0101] Since there are multiple partitioning modes and one needs to be selected to partition the coded block, some partitioning modes result in small image distortion but large bitrates, while some result in large image distortion but small bitrates. On the premise of minimizing the bitrate as much as possible, the distortion of the obtained image should also be minimized as much as possible so that the coding efficiency is relatively high. Therefore, the target partitioning mode can be selected according to the coding efficiency of each partitioning mode. For example, the rate-distortion cost (Rate-Distortion Cost, RD-Cost) of block-partitioning the coded block for each partitioning mode can be calculated, and the partitioning mode with the lowest rate-distortion cost is selected as the partitioning mode for partitioning the second coded block.

[0102] Since the coded blocks obtained by the iterative partitioning mode can be further partitioned, while the coded blocks obtained by other partitioning modes cannot be further partitioned, the preset threshold can include two thresholds. One threshold is used to determine whether to partition, and the other is used to determine whether to use the iterative partitioning mode for partitioning. That is, in one embodiment, the partitioning modes of the target type do not include the non-partitioning mode and the iterative partitioning mode. The preset threshold includes a first preset threshold and a second preset threshold, and the first preset threshold is less than the second preset threshold. The step of "excluding the partitioning modes of the target type from the multiple partitioning modes that are selectable at the current layer partitioning depth according to the relationship between the pixel bit number and the preset threshold" can include:

[0103] If the pixel bit number is less than the first preset threshold, screen out the non-partitioning mode and the iterative partitioning mode from the multiple partitioning modes;

[0104] If the pixel bit number is greater than the second preset threshold, screen out the iterative partitioning mode from the multiple partitioning modes.

[0105] For example, the preset threshold can include a first preset threshold and a second preset threshold, and the second preset threshold is greater than the first preset threshold. If the pixel bit number is less than the first preset threshold, it means that the image content of the coded block is simple and there is no need to further partition the coded block. The non-partitioning mode and the iterative mode can be selected from the multiple partitioning modes, excluding the partitioning modes of the target type.

[0106] If the number of pixel bits is less than the second preset threshold, it indicates that the image content of the coding block is relatively complex and requires more than one division into smaller coding blocks. Therefore, the iterative division mode is selected. After dividing the coding block through the iterative mode, each divided coding block obtained can be further divided.

[0107] If the pixel is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, then select the division mode for dividing the second coding block from the iterative division mode and the division mode of the target type.

[0108] For the case of only one division mode, use the division mode as the division mode for dividing the second coding block. For two or more division modes, the division mode can be selected according to the rate-distortion cost. The specific process can refer to the description of the above relevant content and will not be elaborated here.

[0109] The preset threshold can be an empirical value and can be obtained through experiments. For example, through a large number of video samples for experiments to obtain the preset threshold. That is, in one embodiment, before the step of "obtaining the number of pixel bits of the first coding block at the previous division depth based on the current division depth of the block coding process of the video to be coded", the division method of the coding block provided by the embodiments of the present application can further include:

[0110] Obtain video samples;

[0111] Obtain the coding rate and the bit rate difference for block coding the video samples based on each threshold within the threshold range;

[0112] Determine the target threshold from the threshold range as the preset threshold according to the coding rate and the bit rate difference.

[0113] The translation of BD-Rate in Chinese is "bit rate difference", which is an index used to evaluate the quality of video coding.

[0114] Among them, the video samples can be the videos used to obtain the preset threshold, and there are multiple video samples.

[0115] Among them, the bit rate difference (Bjontegaard Delta Rate, BD-Rate) represents the reduction in the bitstream size brought by one configuration relative to another configuration. The lower the BD-Rate, the higher the coding efficiency and the more the bitstream size is reduced.

[0116] In the embodiments of the present application, it represents the bitstream size difference between the video data after block coding the video samples with the threshold selected from the threshold range and the video data after block coding the video samples without a threshold, and is used to reflect the improvement of coding efficiency.

[0117] Specifically, the same video sequence can be encoded with and without a threshold respectively to obtain RD curves. Through mathematical fitting, the areas corresponding to the two RD curves are calculated, the difference between the two areas is calculated, and then it is converted into the percentage difference in bitstream size to obtain the BD-Rate.

[0118] For example, a video sample can be obtained, and each threshold within the threshold range is calculated as the threshold for comparison with the pixel bit number. The encoding rate and bitrate differences during the block encoding process of the test sample are combined. Based on the encoding rate and bitrate differences, the target threshold with a small bitrate difference and the corresponding encoding rate block is selected from the threshold range as the preset threshold.

[0119] The threshold range can be the bit depth range of common images, such as 2 - 16.

[0120] 103. Select the partitioning mode used to partition the second coding block at the current layer partitioning depth from the remaining partitioning modes after exclusion.

[0121] For example, select a partitioning mode from the remaining partitioning modes after excluding the target mode's partitioning mode as the partitioning mode used to partition the second coding block at the current layer partitioning depth.

[0122] If the partitioning mode for partitioning the second coding block is a recursive partitioning mode, the partitioned coding block can be further partitioned. If the target partitioning mode is not a recursive partitioning mode, stop further partitioning the partitioned coding block.

[0123] For the coding block obtained by partitioning through the recursive partitioning mode, the partitioning mode can be determined according to the pixel bit number and then partitioning is performed. That is, in one embodiment, after the step "select the partitioning mode used to partition the second coding block at the current layer partitioning depth from the remaining partitioning modes after exclusion", the method for partitioning the coding block provided by the embodiments of the present application may further include:

[0124] Based on the partitioning mode selected from the remaining partitioning modes after exclusion, partition the second coding block to obtain the partitioning result at the current layer partitioning depth, and enter the next layer partitioning depth;

[0125] Update the current layer partitioning depth to the upper layer partitioning depth, and update the next layer partitioning depth to the current layer partitioning depth;

[0126] Return the number of pixel bits of the first coded block at the previous layer partition depth at the current layer partition depth when performing the block coding process based on the video to be coded, until the second coded block is the smallest coded block in the coding process, to obtain the coding result of the video to be coded. For example, based on the partition mode selected from the remaining partition modes after exclusion, partition the second coded block to obtain the partition result at the current layer partition depth, and enter the next layer partition depth.

[0127] Update the next layer partition depth to the current layer partition depth. For the coded block that needs to be partitioned at the current layer partition depth, calculate the number of pixel bits of the first coded block at the previous layer partition depth, determine the size relationship between the number of pixel bits of the coded block and a preset threshold, and select the partition mode for partitioning the coded block at the current layer partition depth according to this size relationship. Iterate continuously until the coded block at the current layer partition depth is the smallest coded block in the block coding process. The obtained coded block is used as the block coding result of the video to be coded, and the coded video data of the video to be coded is obtained.

[0128] As can be seen from the above, in the embodiment of the present application, at the current layer partition depth of the block coding process based on the video to be coded, the number of pixel bits of the first coded block at the previous layer partition depth is obtained, and the number of layers of the current layer partition depth is greater than 0; according to the size relationship between the number of pixel bits and the preset threshold, exclude the partition modes of the target type from the multiple optional partition modes at the current layer partition depth; select the partition mode used for partitioning the second coded block at the current layer partition depth from the remaining partition modes after exclusion.

[0129] In the embodiment of the present application, filtering the partition mode according to the number of pixel bits of the coded block can reduce the time for determining the partition mode, and can also avoid dividing some simple image blocks into too small coded blocks, resulting in too many coded blocks, and improve the coding speed of the video.

[0130] In one embodiment, another method for partitioning coded blocks is also provided, as Figure 4 shown. The specific process of this method for partitioning coded blocks can be as follows. In this embodiment, it will be described from the perspective of the coded block partitioning device, and this coded block partitioning device can be specifically integrated on the server.

[0131] 201. Obtain the network delay information of the terminal, where the terminal is the receiving end of the video to be coded.

[0132] Among them, the network delay information may include information indicating the degree of network delay of the terminal.

[0133] For example, the terminal can detect the network delay and send the network delay information to the server based on the detection result to inform the server of its network delay situation.

[0134] The method for partitioning coding blocks provided by the embodiments of the present application can be applied to scenarios of real-time video transmission such as live broadcast, on-demand broadcast, and cloud gaming. By reducing the data volume of the non-concerned area of the video frame and increasing the video coding speed, the video playback fluency is high, and the user experience is improved.

[0135] In the cloud gaming scenario, since it is necessary to render game frames in real time and send them to the terminal for display, the data volume of game frames is generally large and the coding time is long, especially for large-scale games. Therefore, in the cloud gaming scenario, network latency is likely to occur. In the embodiments of the present application, the fluency of game screen display can be improved by reducing the data volume of game frames and increasing the coding speed.

[0136] Specifically, a cloud gaming client can be installed on the terminal. The cloud gaming client can detect the network latency of the terminal and send network latency information to the cloud gaming server. After receiving the network latency information, if the cloud gaming server determines that the network latency of the terminal is relatively obvious, it can perform filtering processing on the game frames rendered by the server to reduce the data volume of the game frames, obtain the processed game frames, then encode the game frames through an encoder, and send the encoded game frames to the cloud gaming client. The cloud gaming client receives the encoded video frames and decodes them through a decoder and then displays them on the terminal screen.

[0137] 202. According to the network latency information, perform image processing on the target video frame of the video to be encoded, and determine the non-concerned area in the target video frame.

[0138] After receiving the network latency information, the server can determine whether the network latency of the terminal is relatively obvious. If so, it can process the video to be encoded to reduce the data volume of the video to be encoded, reduce the data volume of data transmission, relieve the data transmission pressure, and reduce the latency degree of the terminal.

[0139] For example, it can be to perform image processing on the target video frame in the video frame to be encoded to determine the non-concerned area in the target video frame. The image processing can be to perform image recognition on the target video frame through a neural network to detect the non-concerned area in the target video frame; it can also be to perform edge detection on the target video frame to obtain the edge information of the target video frame, and then determine the non-concerned area of the target video frame according to the edge information; it can also be to preset the position information of the non-concerned area, and determine the non-concerned area of the target video frame according to the position information, etc. A suitable method can be selected according to the characteristics of the application scenario. For example, in some scenarios, the characters in the video are the most important. Through image recognition processing, the area where the characters are located in the video frame can be recognized, and then the area outside the area where the characters are located can be determined as the non-concerned area.

[0140] Among them, the non - concerned area can be an area in the video frame that the user is less interested in, such as the background, etc.

[0141] The target video frame can be at least one video frame in the video to be encoded. For example, it can include a preset number of video frames with the earliest sending time sequence when the network latency of the detection terminal is relatively obvious.

[0142] 203. Perform filtering processing on the non - concerned area to obtain the processed video to be encoded.

[0143] Performing filtering processing on the non - concerned area in the video frame can reduce the data volume of the non - concerned area and obtain the processed video to be encoded. The filtering processing can include non - linear filtering, adaptive filtering, frequency - domain filtering, and edge - protection filtering, etc.

[0144] Exemplarily, through filtering processing, the background area of the target video frame can be blurred to reduce the data volume of the target video frame.

[0145] 204. Perform block - based encoding on the processed video to be encoded, and based on the current layer partition depth, obtain the pixel bit number of the first encoded block in the previous layer partition depth, where the number of layers of the current layer partition depth is greater than 0.

[0146] After encoding the video frames of the processed video to be encoded, it can be transmitted to the terminal. Since steps 201 - 203 reduce the data volume of the video to be encoded, it can improve the encoding speed of the video to be encoded, and reduce the number of encoded videos, which can reduce the video latency of the terminal and improve the smoothness of video playback. In the embodiments of the present application, the smoothness of video playback can also be improved by increasing the encoding speed of the video.

[0147] Increasing the encoding speed of the video can specifically be Figure 2 As can be seen, during the process of block - based encoding of the video, it is divided layer by layer. As the partition depth increases, the video will be divided into smaller encoded blocks. The current layer partition depth is the current level of dividing the encoded blocks. The encoded blocks to be divided in the current layer partition depth are obtained by using an iterative partition mode in the previous layer partition depth. For example, if the current layer partition depth is the first layer, the previous layer partition depth is the 0th layer, and the encoded blocks obtained by dividing the 0th layer are further divided in the first layer.

[0148] Among them, the first encoded block can be an encoded block that has been divided in the previous layer partition depth. For example, it can be an encoded block obtained by using a non - division mode, or an encoded block with the same size as the second encoded block and the second encoded block. The second encoded block is an encoded block obtained by dividing through an iterative partition model. When dividing the second encoded block at the current layer partition depth, the pixel bit number of the first encoded block in the previous layer partition depth is obtained.

[0149] 205. Exclude the partitioning mode of the target type from multiple selectable partitioning modes at the current layer partitioning depth according to the size relationship between the pixel bit number and the preset threshold.

[0150] Since the larger the pixel bit number, the more complex the image content of the coding block. For a coding block with relatively complex image content, the coding block can be divided into smaller coding blocks to capture more image details and improve the display effect. For a coding block with relatively simple image content, excessive subdivision of the coding block can be avoided, resulting in a large number of coding blocks. The size relationship between the pixel bit number and the preset threshold can be used to determine whether the image content of the coding block is relatively complex and whether it needs to be divided into smaller coding blocks.

[0151] Therefore, the pixel bit number can be compared with the preset threshold. If the pixel bit number is less than the preset threshold, it indicates that the image content of the coding block is relatively simple and the coding block does not need to be partitioned, or there is no need to divide the coding block into too many small coding blocks. For example, if the pixel bit number is less than the preset threshold, the coding block is not partitioned. If the pixel bit number is not less than the preset threshold, a partitioning mode that divides the coding block into at least two coding blocks is selected.

[0152] Since the iterative partitioning mode is very important among multiple partitioning modes, the partitioning mode of the target type can be excluded when the pixel bit number is less than the preset threshold, and a partitioning mode is selected from the non-partitioning mode and the iterative partitioning mode.

[0153] 206. Select the partitioning mode used to partition the second coding block at the current layer partitioning depth from the remaining partitioning modes after exclusion.

[0154] For example, select a partitioning mode from the remaining partitioning modes after excluding the partitioning mode of the target mode as the partitioning mode for partitioning the second coding block at the current layer partitioning depth.

[0155] For the specific description of steps 204-206, reference can be made to the relevant content in the previous embodiment, which will not be elaborated here.

[0156] As described above, the embodiments of the present application obtain the network delay information of the terminal; according to the network delay information, perform image processing on the target video frame of the video to be encoded to determine the non - attention area in the target video frame; perform filtering processing on the non - attention area to obtain the video to be encoded after processing; perform block - based encoding on the video to be encoded after processing, and based on the current layer division depth, obtain the pixel bits of the first encoded block at the previous layer division depth, where the number of layers of the current layer division depth is greater than 0; according to the size relationship between the pixel bits and the preset threshold, exclude the division modes of the target type from the multiple division modes available at the current layer division depth; select the division mode used for dividing the second encoded block at the current layer division depth from the remaining division modes after exclusion.

[0157] The embodiments of the present application can improve the video encoding speed by reducing the number of non - attention areas in the target video frame, and filter the division modes according to the pixel bits of the encoded blocks of the video frame, which can reduce the number of encoded blocks and further improve the video encoding speed.

[0158] To facilitate better implementation of the division method of the encoded block provided by the embodiments of the present application, in one embodiment, a division device for the encoded block is also provided. The meanings of the nouns are the same as those in the above - mentioned division method of the encoded block, and the specific implementation details can be referred to the description in the method embodiments.

[0159] The division device for the encoded block can be specifically integrated in a computer device, such as Figure 5 As shown, the division device for the encoded block may include: an acquisition unit 301, an exclusion unit 302, and a selection unit 303, specifically as follows:

[0160] (1) The acquisition unit 301 is configured to obtain the pixel bits of the first encoded block at the previous layer division depth based on the current layer division depth of the block - based encoding process of the video to be encoded, where the number of layers of the current layer division depth is greater than 0.

[0161] (2) The exclusion unit 302 is configured to exclude the division modes of the target type from the multiple division modes available at the current layer division depth according to the size relationship between the pixel bits and the preset threshold.

[0162] In one embodiment, the division modes of the target type do not include the non - division mode and the iterative division mode. The exclusion unit 302 is configured to:

[0163] If the pixel bits are less than the preset threshold, screen out the non - division mode and the iterative division mode from the multiple division modes;

[0164] The selection unit 303 is configured to:

[0165] Select, as the partitioning mode for partitioning the second coding block, from the above non-partitioning mode and the above iterative partitioning mode.

[0166] In one embodiment, the above exclusion unit 302 is configured to:

[0167] If the number of pixel bits is less than the above preset threshold, exclude the partitioning mode of the target type from various partitioning modes selectable at the current layer partitioning depth;

[0168] The partitioning device of the above coding block further includes:

[0169] A cost calculation unit, configured to calculate the rate-distortion cost of block-coding the second coding block through each of the various partitioning modes if the number of pixel bits is not less than the above preset threshold;

[0170] A cost selection unit, configured to select, from the above various partitioning modes, the partitioning mode with the lowest rate-distortion cost as the partitioning mode used for partitioning the second coding block.

[0171] In one embodiment, the partitioning mode of the target type does not include the non-partitioning mode and the iterative partitioning mode, the above preset threshold includes a first preset threshold and a second preset threshold, and the first preset threshold is less than the second preset threshold.

[0172] The above exclusion unit 302 includes:

[0173] A first screening subunit, configured to screen out the non-partitioning mode and the iterative partitioning mode from the above various partitioning modes if the number of pixel bits is less than the first preset threshold;

[0174] A second screening subunit, configured to screen out the iterative partitioning mode from the above various partitioning modes if the number of pixel bits is greater than the second preset threshold.

[0175] The partitioning device of the above coding block further includes:

[0176] A partitioning mode selection unit, configured to select, as the partitioning mode for partitioning the second coding block, from the partitioning mode of the target type and the iterative partitioning mode if the number of pixel bits is greater than or equal to the first preset threshold and less than or equal to the second preset threshold.

[0177] (3) A selection unit 303, configured to select, from the remaining partitioning modes after exclusion, the partitioning mode used for partitioning the second coding block at the current layer partitioning depth.

[0178] In one embodiment, the partitioning device of the above coding block further includes:

[0179] A partitioning unit, configured to partition the second coding block based on a partitioning pattern selected from the remaining partitioning patterns after exclusion, obtain a partitioning result at the current layer partitioning depth, and enter the next layer partitioning depth;

[0180] An updating unit, configured to update the current layer partitioning depth to the previous layer partitioning depth, and update the next layer partitioning depth to the current layer partitioning depth;

[0181] A looping unit, configured to return and execute obtaining the pixel bit number of the first coding block at the previous layer partitioning depth at the current layer partitioning depth of the block coding process of the video to be coded, until the second coding block is the smallest coding block in the coding process, to obtain the coding result of the video to be coded.

[0182] In one embodiment, the partitioning device of the coding block further includes:

[0183] A sample obtaining unit, configured to obtain video samples;

[0184] An index calculating unit, configured to obtain the coding rate and the bit rate difference for performing block coding processing on the video samples based on each threshold within a threshold interval;

[0185] A threshold selecting unit, configured to determine a target threshold from the threshold interval as a preset threshold according to the coding rate and the bit rate difference.

[0186] As can be seen from the above, the partitioning device of the coding block in the embodiment of the present application obtains, through the obtaining unit 301, the pixel bit number of the first coding block at the previous layer partitioning depth at the current layer partitioning depth of the block coding process of the video to be coded, and the number of layers of the current layer partitioning depth is greater than 0; the exclusion unit 302 excludes the partitioning patterns of the target type from various optional partitioning patterns at the current layer partitioning depth according to the size relationship between the pixel bit number and the preset threshold; the selection unit 303 selects the partitioning pattern used for partitioning the second coding block at the current layer partitioning depth from the remaining partitioning patterns after exclusion.

[0187] In the embodiment of the present application, filtering the partitioning patterns according to the pixel bit number of the coding block of the video frame can reduce the time for determining the partitioning pattern, and can also avoid partitioning some simple image blocks into too small coding blocks, resulting in too many coding blocks, and can improve the coding speed of the video.

[0188] To facilitate better implementation of the partitioning method of the coding block provided in the embodiment of the present application, in one embodiment, a partitioning device of the coding block is further provided. The meanings of the nouns are the same as those in the above-mentioned partitioning method of the coding block, and the specific implementation details can be referred to the description in the method embodiment.

[0189] The apparatus for partitioning the coding block may be specifically integrated in a computer device, such as Figure 6 As shown, the apparatus for partitioning the coding block may include: an information acquisition unit 401, an image processing unit 402, a filtering processing unit 403, an information amount acquisition unit 404, a mode exclusion unit 405, and a mode selection unit 406, specifically as follows:

[0190] (1) The information acquisition unit 401 is configured to acquire the network latency information of the terminal, where the terminal is the receiving end of the video to be coded.

[0191] (2) The image processing unit 402 is configured to perform image processing on the target video frame of the video to be coded according to the network latency information, and determine the non - concerned area in the target video frame.

[0192] (3) The filtering processing unit 403 is configured to perform filtering processing on the non - concerned area to obtain the processed video to be coded.

[0193] (4) The information amount acquisition unit 404 is configured to perform block coding on the processed video to be coded, and based on the current layer partition depth, acquire the pixel bits of the first coding block of the previous layer partition depth, where the number of layers of the current layer partition depth is greater than 0.

[0194] (5) The mode exclusion unit 405 is configured to exclude the target - type partition mode from multiple selectable partition modes under the current layer partition depth according to the size relationship between the pixel bits and a preset threshold.

[0195] (6) The mode selection unit 406 is configured to select the partition mode used for partitioning the second coding block under the current layer partition depth from the remaining partition modes after exclusion.

[0196] As can be seen from the above, in the embodiment of the present application, the information acquisition unit 401 acquires the network latency information of the terminal; the image processing unit 402 performs image processing on the target video frame of the video to be coded according to the network latency information, and determines the non - concerned area in the target video frame; the filtering processing unit 403 performs filtering processing on the non - concerned area to obtain the processed video to be coded; the information amount acquisition unit 404 performs block coding on the processed video to be coded, and based on the current layer partition depth, acquires the pixel bits of the first coding block of the previous layer partition depth, where the number of layers of the current layer partition depth is greater than 0; the mode exclusion unit 405 excludes the target - type partition mode from multiple selectable partition modes under the current layer partition depth according to the size relationship between the pixel bits and a preset threshold; the mode selection unit 406 selects the partition mode used for partitioning the second coding block under the current layer partition depth from the remaining partition modes after exclusion.

[0197] By reducing the number of non - concerned regions in the target video frame, the embodiments of the present application can improve the video encoding speed. Moreover, according to the pixel bits of the encoding blocks in the video frame, the partitioning mode is filtered, which can reduce the number of encoding blocks, and further improve the video encoding speed.

[0198] The embodiments of the present application also provide a computer device, which can be a terminal or a server. As Figure 7 shown, it shows a schematic structural diagram of the computer device involved in the embodiments of the present application. Specifically:

[0199] The computer device may include a processor 1001 with one or more processing cores, a memory 1002 with one or more computer - readable storage media, a power supply 1003, an input unit 1004 and other components. Those skilled in the art can understand that Figure 7 the structural diagram of the computer device shown in does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements. Among them:

[0200] The processor 1001 is the control center of the computer device, connecting various parts of the entire computer device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1002, and calling the data stored in the memory 1002, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, computer programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above - mentioned modem processor may not be integrated into the processor 1001.

[0201] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area. Among them, the program storage area can store the operating system, computer programs required for at least one function (such as the sound playback function, image playback function, etc.); the data storage area can store data created according to the use of the computer device. In addition, the memory 1002 may include high - speed random - access memory, and may also include non - volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid - state storage devices. Correspondingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.

[0202] The computer device further includes a power supply 1003 for powering each component. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 1003 may further include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, a power status indicator, etc.

[0203] The computer device may further include an input unit 1004, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0204] Although not shown, the computer device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 1001 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 1002 according to the following instructions, and the processor 1001 will run the computer programs stored in the memory 1002 to implement various functions as follows:

[0205] Based on the current layer partition depth of the block coding process of the video to be encoded, obtain the pixel bit number of the first coded block of the previous layer partition depth, and the number of layers of the current layer partition depth is greater than 0;

[0206] According to the size relationship between the pixel bit number and a preset threshold, exclude the partitioning modes of the target type from various optional partitioning modes at the current layer partition depth;

[0207] Select the partitioning mode used to partition the second coded block at the current layer partition depth from the remaining partitioning modes after exclusion. And:

[0208] Obtain the network latency information of the terminal, where the terminal is the receiving end of the video to be encoded;

[0209] According to the network latency information, perform image processing on the target video frame of the video to be encoded to determine the non - concerned area in the target video frame;

[0210] Perform filtering processing on the non - concerned area to obtain the processed video to be encoded;

[0211] Perform block coding on the processed video to be encoded, and based on the current layer partition depth, obtain the pixel bit number of the first coded block of the previous layer partition depth, and the number of layers of the current layer partition depth is greater than 0;

[0212] According to the size relationship between the pixel bit number and a preset threshold, exclude the partitioning modes of the target type from various optional partitioning modes at the current layer partition depth;

[0213] Select, from the partitioning patterns remaining after exclusion, the partitioning pattern used for partitioning the second coding block at the current layer partitioning depth.

[0214] For the specific implementation of each of the above operations, reference may be made to the foregoing embodiments, which will not be elaborated herein.

[0215] As can be seen from the above, the computer device according to the embodiment of the present application can obtain the pixel bits of the first coding block at the previous layer partitioning depth based on the current layer partitioning depth of the block coding process of the video to be coded, where the number of layers of the current layer partitioning depth is greater than 0; according to the magnitude relationship between the pixel bits and a preset threshold, exclude the partitioning patterns of the target type from the various optional partitioning patterns at the current layer partitioning depth; select, from the partitioning patterns remaining after exclusion, the partitioning pattern used for partitioning the second coding block at the current layer partitioning depth. According to the pixel bits of the coding block of the video frame, the embodiment of the present application filters the partitioning patterns, which can reduce the time for determining the partitioning pattern, and can also avoid partitioning some image blocks with simple content into too small coding blocks, resulting in an excessive number of coding blocks, and can improve the coding speed of the video.

[0216] According to one aspect of the present application, there is provided a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementation manners in the foregoing embodiments.

[0217] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the foregoing embodiments can be completed by a computer program or by controlling related hardware through a computer program. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0218] Therefore, the embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute any of the coding block partitioning methods provided by the embodiment of the present application.

[0219] For the specific implementation of each of the above operations, reference may be made to the foregoing embodiments, which will not be elaborated herein.

[0220] Wherein, the computer-readable storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, an optical disc, etc.

[0221] Since the computer program stored in the computer-readable storage medium can execute any of the coding block partitioning methods provided in the embodiments of the present application, the beneficial effects achievable by any of the coding block partitioning methods provided in the embodiments of the present application can be realized. For details, refer to the previous embodiments and will not be elaborated here.

[0222] The above has introduced in detail a coding block partitioning method, apparatus, computer device, and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A method for dividing coding blocks, characterized in that, it includes: Based on the current layer partition depth of the block coding process of the video to be coded, obtain the pixel bit number of the first coding block at the previous layer partition depth, the number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of the pixels in the first coding block; If the pixel bit number is less than a preset threshold, exclude the partitioning modes of the target type from the various partitioning modes optional at the current layer partition depth, the partitioning modes of the target type do not include the non-partitioning mode and the iterative partitioning mode, and at least the non-partitioning mode and the iterative partitioning mode are included in the various partitioning modes; Select the partitioning mode used to partition the second coding block at the current layer partition depth from the remaining partitioning modes after exclusion, where the second coding block is the coding block obtained by partitioning the first coding block at the previous layer partition depth.

2. The method according to claim 1, characterized in that, The step of if the pixel bit number is less than a preset threshold, exclude the partitioning modes of the target type from the various partitioning modes optional at the current layer partition depth includes: If the pixel bit number is less than the preset threshold, then screen out the non-partitioning mode and the iterative partitioning mode from the various partitioning modes; The step of selecting the partitioning mode used to partition the second coding block at the current layer partition depth from the remaining partitioning modes after exclusion includes: Select from the non-partitioning mode and the iterative partitioning mode as the partitioning mode for partitioning the second coding block.

3. The method according to claim 1, characterized in that, The method further includes: If the pixel bit number is not less than the preset threshold, calculate the rate-distortion cost of block coding the second coding block through each partitioning mode in the various partitioning modes; Select the partitioning mode with the lowest rate-distortion cost from the various partitioning modes as the partitioning mode used to partition the second coding block.

4. The method according to claim 1, characterized in that, After the step of selecting the partitioning mode used to partition the second coding block at the current layer partition depth from the remaining partitioning modes after exclusion, the method further includes: Based on the partitioning mode selected from the remaining partitioning modes after exclusion, partition the second coding block to obtain the partitioning result at the current layer partition depth, and enter the next layer partition depth; Update the current layer partition depth to the previous layer partition depth, and update the next layer partition depth to the current layer partition depth; Return to execute obtaining the pixel bit number of the first coding block at the previous layer partition depth at the current layer partition depth of the block coding process of the video to be coded, until the second coding block is the smallest coding block in the coding process, to obtain the coding result of the video to be coded.

5. The method according to any one of claims 1 to 4, characterized in that, Before the step of obtaining the pixel bit number of the first coding block at the previous layer partition depth based on the current layer partition depth of the block coding process of the video to be coded, the method further includes: Obtain a video sample; Obtain the encoding rate and bitrate difference for block - encoding the video sample based on each threshold within a threshold interval; Determine a target threshold from the threshold interval as a preset threshold according to the encoding rate and the bitrate difference.

6. A method for dividing encoding blocks, Characterized in that, It includes: Based on the current layer - division depth of the block - encoding process of the video to be encoded, obtain the pixel bit number of the first encoding block at the previous layer - division depth. The number of layers of the current layer - division depth is greater than 0, and the pixel bit number is the average bit number of the pixels in the first encoding block; If the pixel bit number is less than a first preset threshold, filter out the non - division mode and the iterative - division mode from the various division modes available at the current layer - division depth; If the pixel bit number is greater than a second preset threshold, filter out the iterative - division mode from the various division modes; Select, from the filtered - out division modes, the division mode used to divide the second encoding block at the current layer - division depth. The second encoding block is the encoding block obtained by dividing the first encoding block at the previous layer - division depth.

7. The method according to claim 6, Characterized in that, The method further includes: If the pixel bit number is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, select the division mode for dividing the second encoding block from the division modes of the target type and the iterative - division mode. The division modes of the target type do not include the non - division mode and the iterative - division mode.

8. The method according to claim 6, Characterized in that, After selecting, from the filtered - out division modes, the division mode used to divide the second encoding block at the current layer - division depth, the method further includes: Based on the division mode selected from the filtered - out division modes, divide the second encoding block to obtain the division result at the current layer - division depth, and enter the next layer - division depth; Update the current layer - division depth to the previous layer - division depth, and update the next layer - division depth to the current layer - division depth; Return to execute obtaining the pixel bit number of the first encoding block at the previous layer - division depth based on the current layer - division depth of the block - encoding process of the video to be encoded until the second encoding block is the smallest encoding block in the encoding process, to obtain the encoding result of the video to be encoded.

9. The method according to any one of claims 6 to 8, Characterized in that, Before obtaining the pixel bit number of the first encoding block at the previous layer - division depth based on the current layer - division depth of the block - encoding process of the video to be encoded, the method further includes: Obtain a video sample; Obtain the encoding rate and bitrate difference for block - encoding the video sample based on each threshold within a threshold interval; Determine a target threshold from the threshold interval as a preset threshold according to the encoding rate and the bitrate difference.

10. A method for dividing encoding blocks, Characterized in that, It includes: Obtain the network latency information of the terminal, where the terminal is the receiving end of the video to be encoded; Perform image processing on a target video frame of the video to be encoded according to the network delay information, and determine a non - concerned area in the target video frame; Perform filtering processing on the non - concerned area to obtain a processed video to be encoded; Perform block - based encoding on the processed video to be encoded, and based on the current layer partition depth, obtain the pixel bit number of a first encoded block at the previous layer partition depth. The number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of pixels in the first encoded block; If the pixel bit number is less than a preset threshold, exclude a target type of partition mode from multiple optional partition modes at the current layer partition depth. The target type of partition mode does not include the non - partition mode and the iterative partition mode, and at least the non - partition mode and the iterative partition mode are included in the multiple partition modes; Select a partition mode used to partition a second encoded block at the current layer partition depth from the remaining partition modes after exclusion. The second encoded block is an encoded block obtained by partitioning the first encoded block at the previous layer partition depth.

11. A method for partitioning an encoded block, Characterized in that, It includes: Obtain the network delay information of a terminal, where the terminal is the receiving end of the video to be encoded; Perform image processing on a target video frame of the video to be encoded according to the network delay information, and determine a non - concerned area in the target video frame; Perform filtering processing on the non - concerned area to obtain a processed video to be encoded; Perform block - based encoding on the processed video to be encoded, and based on the current layer partition depth, obtain the pixel bit number of a first encoded block at the previous layer partition depth. The number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of pixels in the first encoded block; If the pixel bit number is less than a first preset threshold, screen out the non - partition mode and the iterative partition mode from multiple optional partition modes at the current layer partition depth; If the pixel bit number is greater than a second preset threshold, screen out the iterative partition mode from the multiple partition modes; Select a partition mode used to partition a second encoded block at the current layer partition depth from the screened - out partition modes. The second encoded block is an encoded block obtained by partitioning the first encoded block at the previous layer partition depth.

12. An apparatus for partitioning an encoded block, Characterized in that, It includes: An obtaining unit, configured to obtain the pixel bit number of a first encoded block at the previous layer partition depth based on the current layer partition depth of the block - based encoding process of the video to be encoded. The number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of pixels in the first encoded block; An excluding unit, configured to exclude a target type of partition mode from multiple optional partition modes at the current layer partition depth if the pixel bit number is less than a preset threshold. The target type of partition mode does not include the non - partition mode and the iterative partition mode, and at least the non - partition mode and the iterative partition mode are included in the multiple partition modes; A selection unit, configured to select, from the remaining partition patterns after exclusion, a partition pattern used for partitioning a second coding block at the current layer partition depth, where the second coding block is a coding block obtained by partitioning the first coding block at the previous layer partition depth.

13. An apparatus for partitioning a coding block, characterized in that it includes: An acquisition unit, configured to acquire the pixel bit number of a first coding block at a previous layer partition depth based on the current layer partition depth of the block-based coding process of the video to be coded, where the number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of the pixels in the first coding block; An exclusion unit, configured to, if the pixel bit number is less than a first preset threshold, screen out a non-partitioning pattern and an iterative partitioning pattern from multiple optional partitioning patterns at the current layer partition depth; if the pixel bit number is greater than a second preset threshold, screen out the iterative partitioning pattern from the multiple partitioning patterns; A selection unit, configured to select, from the screened partitioning patterns, a partitioning pattern used for partitioning a second coding block at the current layer partition depth, where the second coding block is a coding block obtained by partitioning the first coding block at the previous layer partition depth.

14. An apparatus for partitioning a coding block, characterized in that it includes: An information acquisition unit, configured to acquire the network latency information of a terminal, where the terminal is the receiving end of the video to be coded; An image processing unit, configured to perform image processing on a target video frame of the video to be coded according to the network latency information to determine a non-attentive area in the target video frame; A filtering processing unit, configured to perform filtering processing on the non-attentive area to obtain the video to be coded after processing; An information amount acquisition unit, configured to perform block-based coding on the video to be coded after processing, and acquire the pixel bit number of a first coding block at a previous layer partition depth based on the current layer partition depth, where the number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of the pixels in the first coding block; A pattern exclusion unit, configured to, if the pixel bit number is less than a preset threshold, exclude a target type of partitioning pattern from multiple optional partitioning patterns at the current layer partition depth, where the target type of partitioning pattern does not include a non-partitioning pattern and an iterative partitioning pattern, and at least the non-partitioning pattern and the iterative partitioning pattern are included in the multiple partitioning patterns; A pattern selection unit, configured to select, from the remaining partition patterns after exclusion, a partition pattern used for partitioning a second coding block at the current layer partition depth, where the second coding block is a coding block obtained by partitioning the first coding block at the previous layer partition depth.

15. An apparatus for partitioning a coding block, characterized in that it includes: An information acquisition unit, configured to acquire the network latency information of a terminal, where the terminal is the receiving end of the video to be coded; An image processing unit, configured to perform image processing on a target video frame of the video to be coded according to the network latency information to determine a non-attentive area in the target video frame; A filtering processing unit, configured to perform filtering processing on the non-attentive area to obtain the video to be coded after processing; An information acquisition unit, configured to perform block coding on the processed video to be coded, and based on the current layer partition depth, obtain the pixel bit number of the first coded block at the previous layer partition depth, where the number of layers of the current layer partition depth is greater than 0, and the pixel bit number is the average bit number of the pixels in the first coded block; A mode exclusion unit, configured to, if the pixel bit number is less than a first preset threshold, screen out a non-partition mode and an iterative partition mode from various partition modes optional at the current layer partition depth; if the pixel bit number is greater than a second preset threshold, screen out the iterative partition mode from the various partition modes; A mode selection unit, configured to select, from the screened partition modes, a partition mode used to partition a second coded block at the current layer partition depth, where the second coded block is a coded block obtained by partitioning the first coded block at the previous layer partition depth.

16. A computer device, characterized in that, it includes a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute the coded block partitioning method according to any one of claims 1 to 11.

17. A computer-readable storage medium, characterized in that, the computer-readable storage medium is configured to store a computer program, and the computer program is loaded by a processor to execute the coded block partitioning method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Screen content coding method based on content analysis

    CN106534860A