Video Encoding Partition Method, Video Processing Method and Computer Device

By adopting the five-tree division mode in video encoding, the moving objects are divided into the same block, which solves the problem of reducing the compression rate due to segmentation of moving objects into multiple blocks, achieving higher compression rate and encoding efficiency, and improving video quality and decoding speed.

CN115209162BActive Publication Date: 2025-07-04BOE TECHNOLOGY GROUP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210744774.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-07-04
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

During the division process of existing video encoding technology, moving objects are easily divided into multiple blocks, resulting in a reduced compression rate and a lower encoding efficiency.

Method used

The video frame image is encoded using the pentree division mode, especially in the presence of moving objects, the moving objects are divided into the same block, reducing the division depth, and increasing the pentree division mode for encoding and division.

Benefits of technology

It improves the compression rate and encoding efficiency of video encoding, improves video quality, and enables faster decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115209162B_ABST
    Figure CN115209162B_ABST
Patent Text Reader

Abstract

The present application provides a video coding partitioning method, including: obtaining a current video frame image and a previous video frame image adjacent to the current video frame image sequence; determining whether there is a moving object in the current video frame image according to the previous video frame image and the previous video frame image; in the case of determining that there is a moving object in the current video frame image, performing coding partitioning on the current video frame image by using a quadtree partitioning mode. In this way, in the case of the existence of a moving object in the video, the quadtree partitioning mode is added for coding partitioning, so that the moving object can be more accurately partitioned into the same block, the coding block is partitioned as large as possible, and the partitioning depth is reduced. Similar pixels can be partitioned into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same partitioning block is more concentrated, so that the compression ratio is higher in transform and entropy coding, and the coding efficiency and compression ratio are improved while the video quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and particularly to a video coding partitioning method, a video processing method, a computer device, and a storage medium. Background Art

[0002] In the field of audio and video, the demand for ultra-high-definition digital videos is increasing, and the requirements for resolution and frame rate are also getting higher and higher. Correspondingly, the requirements for video decoding and encoding are also getting higher and higher. In related technologies, block partitioning in video coding is mostly based on partitioning methods such as binary trees, ternary trees, and quaternary trees. However, in this case, when partitioning a frame image at the same depth, if a target object exists between multiple blocks at the same time, the target object may be partitioned into multiple blocks, and then partitioning at the next depth is required. However, in this case, due to the reduction of the transform kernel, the compression ratio will be correspondingly reduced, and the video coding efficiency is low. Summary of the Invention

[0003] In view of this, this application provides a video coding partitioning method, a video processing method, a computer device, and a storage medium.

[0004] An embodiment of this application provides a video coding partitioning method, including:

[0005] Obtain a current video frame image and a previous video frame image adjacent to the current video frame image sequence;

[0006] Determine whether there is a moving object in the current video frame image according to the current video frame image and the previous video frame image;

[0007] In the case of determining that there is a moving object in the current video frame image, perform coding partitioning on the current video frame image using a quinary tree partitioning mode.

[0008] In this way, in the video coding partitioning method of the embodiment of this application, in the case of a moving object in the video, a quinary tree partitioning mode is added for coding partitioning, so as to more accurately partition the moving object into the same block, partition as large coding blocks as possible, and reduce the partitioning depth. Similar pixels can be partitioned into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same partitioning block is more concentrated, so that the compression ratio is higher in transform and entropy coding, and the video quality is improved while the coding efficiency and compression ratio are increased.

[0009] In some embodiments, the determining whether there is a moving object in the current video frame image according to the current video frame image and the previous video frame image includes:

[0010] Perform a differential operation on the current video frame image and the previous video frame image to obtain the difference in brightness between the two frames of images;

[0011] When the absolute value of the brightness difference is greater than or equal to a predetermined threshold, it is determined that there is a moving object in the current video frame image.

[0012] In this way, by performing a differential operation on adjacent frames in a video image sequence, the contour of the moving object in the current frame image can be obtained based on the brightness difference between the two frames of images.

[0013] In some embodiments, when it is confirmed that there is a moving object in the current video frame image, encoding and dividing the current video frame image using a quadtree partitioning mode includes:

[0014] When the moving object is located at a non-edge position of the current video frame image, encode and divide the current video frame image using a quadtree partitioning mode.

[0015] In this way, in the present application, especially for the case where using other partitioning methods for moving objects at non-edge positions may cause the same moving object to be divided into multiple blocks, a quadtree mode is used for partitioning.

[0016] In some embodiments, when the moving object is located at a non-edge position of the current video frame image, encoding and dividing the current video frame image using a quadtree partitioning mode includes:

[0017] When there are multiple moving objects in the current video frame image, select the one with the largest area as the target moving object;

[0018] Encode and divide the current video frame image using a quadtree partitioning mode according to the target moving object.

[0019] In this way, for the case where there are multiple target moving objects in a frame image, select the one with the largest area as the target and perform a quadtree partition on the frame image accordingly, which can ensure that the moving object with the largest area is divided into the same block, divide as large an encoding block as possible, and reduce the partitioning depth of the frame image.

[0020] In some embodiments, encoding and dividing the current video frame image using a quadtree partitioning mode according to the target moving object includes:

[0021] Align the area where the target moving object is located according to 2 n *2 m for pixel alignment, so as to divide the area where the target moving object is located into a rectangular area, where both n and m are integers greater than 0.

[0022] In this way, the largest target moving object can be used to divide the area where it is located into a rectangular area with a minimum rectangle, and other areas can be divided accordingly.

[0023] In some embodiments, encoding and dividing the current video frame image by using a quadtree partitioning mode according to the target moving object includes:

[0024] Taking the rectangular area where the target moving object is located as the center, extending the two adjacent sides of the rectangular area respectively to intersect with the boundary of the coding unit where the target moving object is located, so as to divide the coding unit at the current depth into five rectangular areas including the rectangular area where the target moving object is located.

[0025] In this way, taking the rectangular area where the target moving object is located as the center, according to the correlation between pixels, extending the two adjacent sides of the rectangular area where the target moving object is located to intersect with the boundary of the current coding unit, so as to divide the coding unit into five rectangular areas.

[0026] In some embodiments, the method further includes:

[0027] For the four rectangular areas other than the rectangular area where the target moving object is located, using a binary tree, a ternary tree, a quadtree or a quadtree partitioning mode to perform encoding and partitioning at subsequent depths of the current depth until a preset maximum depth.

[0028] In this way, for other rectangular areas, subsequent depths can be divided according to whether there are moving targets and the positions where the moving targets are located until the maximum depth is reached.

[0029] In some embodiments, the method further includes:

[0030] When the moving object is located at the edge position of the current video frame image, using a binary tree, a ternary tree or a quadtree partitioning mode to perform encoding and partitioning on the current video frame.

[0031] In this way, in the case where the moving object is at the edge position in the present application, there is no need to adopt the quadtree partitioning method, and a binary tree, a ternary tree or a quadtree and other partitioning modes can be used for encoding and partitioning.

[0032] An embodiment of the present application provides a video processing method, including:

[0033] Performing encoding processing on a video frame by using the above-mentioned video encoding and partitioning method;

[0034] Performing decoding processing on the encoded video frame to restore the video frame;

[0035] Render and output the restored video frames.

[0036] In this way, during the video coding partition process, when there are moving objects in the video, a quadtree partition mode is added for coding partition, so as to more accurately partition the moving objects into the same block, partition as large coding blocks as possible, and reduce the partition depth. Similar pixels can be partitioned into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same partition block is more concentrated, so that the compression ratio is higher in transform and entropy coding. While improving the video quality, the coding efficiency and compression ratio are improved, and decoding can also be faster.

[0037] An embodiment of the present application provides a computer device, characterized in that the computer device includes a memory and a processor, and a computer program is stored in the memory. When the computer program is executed by the processor, the method described above is implemented.

[0038] In this way, in the present application, during the video coding partition process, when there are moving objects in the video, a quadtree partition mode is added for coding partition, so as to more accurately partition the moving objects into the same block, partition as large coding blocks as possible, and reduce the partition depth. Similar pixels can be partitioned into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same partition block is more concentrated, so that the compression ratio is higher in transform and entropy coding. While improving the video quality, the coding efficiency and compression ratio are improved, and decoding can also be faster.

[0039] An embodiment of the present application provides a non-volatile computer-readable storage medium with computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor is enabled to implement the above method.

[0040] In this way, in the present application, during the video coding partition process, when there are moving objects in the video, a quadtree partition mode is added for coding partition, so as to more accurately partition the moving objects into the same block, partition as large coding blocks as possible, and reduce the partition depth. Similar pixels can be partitioned into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same partition block is more concentrated, so that the compression ratio is higher in transform and entropy coding. While improving the video quality, the coding efficiency and compression ratio are improved, and decoding can also be faster. Description of the Drawings

[0041] The above and / or additional aspects and advantages of the present application will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0042] Figure 1It is a schematic flowchart of a video coding partitioning method according to some embodiments of the present application.

[0043] Figure 2 It is a schematic flowchart of a video coding partitioning method according to some embodiments of the present application.

[0044] Figure 3 It is a schematic flowchart of a video coding partitioning method according to some embodiments of the present application.

[0045] Figure 4 It is a schematic flowchart of a video coding partitioning method according to some embodiments of the present application.

[0046] Figure 5 It is a schematic flowchart of a video coding partitioning method according to some embodiments of the present application.

[0047] Figure 6 It is a schematic flowchart of a video coding partitioning method according to some embodiments of the present application.

[0048] Figures 7a-7d It is a schematic diagram of a quadtree - like partitioning method according to some embodiments of the present application.

[0049] Figures 8a-8e It is a schematic diagram of binary - tree, ternary - tree, and quadtree partitioning methods according to some embodiments of the present application. Detailed implementation manners

[0050] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as a limitation of the present application.

[0051] Please refer to Figure 1 , the present application provides a video coding partitioning method, including:

[0052] S10: Obtain the current video frame image and the previous video frame image adjacent to the current video frame image sequence;

[0053] S20: Determine whether there is a moving object in the current video frame image according to the current video frame image and the previous video frame image;

[0054] S30: When it is determined that there is a moving object in the current video frame image, perform coding partitioning on the current video frame image using a quadtree - like partitioning mode.

[0055] The present application also provides a computer device, and the video encoding partitioning method of the present application can be implemented by the computer device of the present application. The computer device includes a memory and multiple processors, and a computer program is stored in the memory. The processor is configured to fetch the current video frame image and the previous video frame image adjacent to the current video frame image sequence, and to confirm whether there is a moving object in the current video frame image according to the current video frame image and the previous video frame image, and to perform encoding partitioning on the current video frame image in a quadtree partitioning mode when it is confirmed that there is a moving object in the current video frame image.

[0056] Specifically, in multi-functional video encoding, usually a frame of image is segmented into multiple coding units, and then a certain tree structure is adopted for each coding unit to divide the coding unit into multiple rectangular blocks. For example, for a coding unit, quadtree partitioning is adopted to divide it into 4 rectangular (or square) blocks, and then partitioning methods such as binary tree or ternary tree can be adopted to horizontally or vertically split each rectangular block into 2 or 3 sub-blocks. Subsequently, this step can be recursively executed again to further horizontally or vertically split each rectangular sub-block into 2 or 3 sub-blocks until the maximum depth of encoding is reached. In this way, the encoder can better adapt to the input content.

[0057] However, in the related art, during the process of encoding partitioning using a tree structure, a single binary tree, or ternary tree or quadtree partitioning mode, or a partitioning mode of mixed nesting of binary tree, ternary tree, and quadtree is mostly adopted for partitioning. In this way, it may lead to relevant content, such as the same moving object, being partitioned into different rectangular blocks, which is not conducive to image encoding.

[0058] In the present application, for the above-mentioned possible situation, for a video frame image with a moving object, a quadtree partitioning mode is adopted, which can more accurately partition the same moving object into the same rectangular block, making the pixel correlation and similarity in the same rectangular block stronger, facilitating large-block partitioning, reducing the partitioning depth, increasing the compression ratio, and thus reducing the encoding bit rate. The other partitioned rectangular blocks also have strong similarity, reducing the search time for similar blocks and improving the search efficiency.

[0059] It should be noted that the premise of adopting the quadtree mode for encoding partitioning in the present application is that there is a moving object in the video frame image. For a video frame image without a moving object, the correlation between pixels is not as obvious as that of the pixels of a moving object. Therefore, it is sufficient to partition the coding unit using the partitioning mode of the single tree structure or the nested structure of multiple tree structures as described above. The moving object in the image can be detected by methods such as optical flow method, inter-frame difference method, background subtraction method, etc.

[0060] In summary, in the video encoding partitioning method and computer device according to the embodiments of the present application, when there are moving objects in the video, a quadtree partitioning mode is added for encoding partitioning, so as to more accurately partition the moving objects into the same block, partition large encoding blocks as much as possible, and reduce the partitioning depth. Similar pixels can be partitioned into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same partitioning block is more concentrated, so that the compression ratio is higher in transform and entropy coding, and the encoding efficiency and compression ratio are improved while the video quality is improved.

[0061] Please refer to Figure 2 , in some embodiments, S20 includes:

[0062] S21: Perform a differential operation on the current video frame image and the previous video frame image to obtain the difference in brightness between the two frames of images;

[0063] S22: Determine that there is a moving object in the current video frame image when the absolute value of the brightness difference is greater than or equal to a predetermined threshold.

[0064] In some embodiments, the processor is used to perform a differential operation on the current video frame image and the previous video frame image to obtain the difference in brightness between the two frames of images, and is used to determine that there is a moving object in the current video frame image when the absolute value of the brightness difference is greater than or equal to a predetermined threshold.

[0065] Specifically, in this embodiment, the inter-frame difference method is used to detect whether there is a moving object in the current frame image. The inter-frame difference method has a simple principle, is easy to implement, and has a low algorithm complexity. At the same time, the inter-frame difference method has low requirements for the environment, is not easily affected by environmental factors such as light, and has strong adaptability to the environment.

[0066] Using the adjacent frame difference method, subtract the current frame image from the adjacent previous frame image in the image sequence, and analyze the motion characteristics of the image sequence through the absolute value of the brightness difference between the two adjacent frames of images to determine whether there is a moving object in the image sequence. If this value is greater than the set threshold, it is considered that motion has occurred, otherwise it is determined to be a background image, that is, there is no moving object. The frame-by-frame difference of the image sequence is equivalent to filtering the image sequence and removing the common part.

[0067] It should be understood that since the inter-frame difference method needs to make a judgment based on the difference between two time frames, the moving speed of the moving object may have a certain impact on the recognition effect. Then, corresponding improvements can also be made based on the inter-frame difference. For example, three consecutive video images are selected for differential operation to eliminate the influence of the exposed background due to movement, so as to extract accurate contour information of the moving target. The basic principle of this algorithm is to first select three consecutive images in the video image sequence and calculate the differential images of adjacent two frames respectively, then binarize the differential images by selecting an appropriate threshold to obtain a binarized image, and finally perform a logical AND operation on the binarized image obtained at each pixel point to obtain the common part, thereby obtaining the contour information of the moving target. The three consecutive images can be the (k - 1)-th frame image, the k-th frame image, and the (k + 1)-th frame image.

[0068] In this way, by performing a differential operation on adjacent frames in the video image sequence, the contour of the moving object in the current frame image can be obtained according to the brightness difference between the two frames.

[0069] Please refer to Figure 3 , in some embodiments, S30 includes:

[0070] S31: When the moving object is located at a non-edge position of the current video frame image, the current video frame image is encoded and divided using a quadtree partitioning mode.

[0071] In some embodiments, the processor is used to encode and divide the current video frame image using a quadtree partitioning mode when the moving object is located at a non-edge position of the current video frame image.

[0072] Specifically, when it is confirmed that there is a moving target in the image through the aforementioned inter-frame difference algorithm, the position of the moving object in the current video frame object is further determined. When the moving object is located at a non-edge position of the current video image, a quadtree mode can be used for encoding and dividing.

[0073] Among them, the edge position of the image should be generally understood as the area at a predetermined number of pixel distances from the image edge, rather than the physically absolute edge position. It can be understood that if there is a moving object in the image and the moving object is located at the edge position of the image, then several partitioning modes introduced above can be used to partition the moving object into the same rectangular block. For example, if the moving object is located in the upper left part of the image, then a quadtree partitioning mode can be used for partitioning, and if the moving object has a large area in the length direction, a vertical binary tree partitioning mode can be used for encoding and dividing.

[0074] When the moving object is located at a non-edge position of the image, using several of the above-mentioned partitioning methods may cause the same moving target object to be partitioned into different rectangular blocks. However, when using the quadtree partitioning mode, it can ensure that the moving object located at the non-edge position of the image is partitioned into the same rectangular block.

[0075] Thus, in this application, especially for the case where using other partitioning methods for moving objects at non-edge positions may cause the same moving object to be partitioned into multiple blocks, the quadtree mode is used for partitioning.

[0076] Please refer to Figure 4 , in some embodiments, S31 includes:

[0077] S310: When there are multiple moving objects in the current video frame image, select the one with the largest area as the target moving object;

[0078] S311: According to the target moving object, use the quadtree partitioning mode to encode and partition the current video frame image.

[0079] In some embodiments, the processor is used to select the one with the largest area as the target moving object when there are multiple moving objects in the current video frame image; and is used to encode and partition the current video frame image according to the target moving object using the quadtree partitioning mode.

[0080] Specifically, when there are multiple moving objects in the current frame image, selecting the one with the largest area as the target moving object can preferably ensure that the moving object with the largest area is partitioned in the same rectangular block. It can be understood that since the quadtree partitioning mode is used in this application, it is not necessary to partition the coding unit according to a predetermined ratio as in the above other partitioning modes. Therefore, even if the area occupied by the moving object is large, the moving object can be partitioned in the same rectangular block according to its position. However, selecting other moving objects with smaller area as the target moving object and partitioning around it may cause the situation that the moving object with a large area cannot be partitioned into the same rectangular block.

[0081] Selecting the moving object with the largest area as the center and performing subsequent partitioning accordingly can also partition other moving targets in the same rectangular block as much as possible, thus ensuring a high correlation between pixels.

[0082] Thus, for the case where there are multiple target moving objects in the frame image, selecting the one with the largest area as the target and performing quadtree partitioning on the frame image accordingly can ensure that the moving object with the largest area is partitioned in the same block, partition large coding blocks as much as possible, and reduce the partitioning depth of the frame image.

[0083] Please refer to Figure 5 , in some embodiments, S311 includes:

[0084] S3111: Align the region where the target moving object is located in pixels according to 2 n *2 m to divide the region where the target moving object is located into a rectangular region, where both n and m are integers greater than 0.

[0085] In some embodiments, the processor is used to align the region where the target moving object is located in pixels according to 2 n *2 m to divide the region where the target moving object is located into a rectangular region, where both n and m are integers greater than 0.

[0086] Specifically, taking the case where there is a unique moving object in the image as an example for illustration. When it is confirmed that the target moving object is at a non-edge position in the image, the region of the target moving object is divided. Dividing the coding unit in a quadtree pattern means dividing the coding unit into five rectangular regions. Therefore, it is first necessary to align the region where the target moving object is located in pixels. The target moving object is aligned in pixels according to its length and width by 2 n *2 m where both n and m are integers greater than 0, and n and m can be equal, and the specific values are not limited. For example, it can be 8x8, 8x16, 16x16, 16x32, 16x64, 32x64, 64x128, etc.

[0087] In this way, the largest target moving object can be divided into a rectangular region with the smallest rectangle for its location area, and other regions can be divided accordingly.

[0088] Please refer to Figure 6 , in some embodiments, S311 includes:

[0089] S3112: Taking the rectangular region where the target moving object is located as the center, extend the two adjacent sides of the rectangular region respectively to intersect with the boundary of the coding unit where the target moving object is located, so as to divide the coding unit at the current depth into five rectangular regions including the rectangular region where the target moving object is located.

[0090] In some embodiments, the processor is used to take the rectangular region where the target moving object is located as the center, extend the two adjacent sides of the rectangular region respectively to intersect with the boundary of the coding unit where the target moving object is located, so as to divide the coding unit at the current depth into five rectangular regions including the rectangular region where the target moving object is located.

[0091] Specifically, please refer to Figures 7a-7d, after pixel alignment of the area where the target moving object is located, the area where the target moving object is located is divided into a rectangular area, with this rectangular area as the center. According to the similarity of the pixels in the undivided area, the two adjacent sides of this central rectangle are respectively extended towards the edges of the coding unit where they are located until they intersect with the boundary of the coding unit, thereby forming a rectangular area. In this way, proceed sequentially so that after each two adjacent sides are extended, they intersect with the boundary of the current coding unit, thereby dividing the coding unit at the current depth into five rectangular areas including the rectangular area where the target moving object is located.

[0092] It should be noted that Figures 7a-7d This is only for illustrative purposes and is not an exhaustive list of the quadtree partitioning patterns. Other ways that can divide the coding unit into five rectangular areas are all included in the scope of this application.

[0093] In this way, with the rectangular area where the target moving object is located as the center, according to the correlation between pixels, the two adjacent sides of the rectangular area where the target moving object is located are respectively extended until they intersect with the boundary of the current coding unit, thereby dividing the coding unit into five rectangular areas.

[0094] In some embodiments, the video coding partitioning method further includes:

[0095] S3113: For the four rectangular areas other than the rectangular area where the target moving object is located, use a binary tree, ternary tree, quadtree, or quadtree partitioning pattern to perform coding partitioning in subsequent depths at the current depth until a preset maximum depth.

[0096] In some embodiments, the processor is used to perform coding partitioning on the four rectangular areas other than the rectangular area where the target moving object is located in subsequent depths at the current depth using a binary tree, ternary tree, quadtree, or quadtree partitioning pattern until a preset maximum depth.

[0097] Specifically, for the other four rectangular areas other than the rectangular area where the target moving object is located, they can be further divided in subsequent depths, and the division method can refer to the above method. For example, detect whether there are moving objects at non-edge positions in each rectangular area. If there are, the rectangular area can be divided in the quadtree pattern. If there are no moving objects or there are moving objects at the edge positions, a binary tree, ternary tree, or quadtree partitioning pattern can be used until the maximum depth is reached. The maximum depth is set before coding and partitioning the frame image. For example, it can be three or four layers. Generally, it is sufficient that the rectangular areas divided in each layer are suitable for the size of the coding kernel adopted by the current coding standard, and it is not appropriate to divide too many layers resulting in too deep a depth.

[0098] Thus, for other rectangular regions, subsequent depth division can be performed according to the presence or absence of moving objects and the positions where the moving objects are located until the maximum depth is reached.

[0099] Please refer to Figures 8a-8e , in some embodiments, the video encoding division method further includes:

[0100] S32: When the moving object is located at the edge position of the current video frame image, use a binary tree, ternary tree, or quadtree division mode to perform encoding division on the current video frame.

[0101] In some embodiments, the processor is used to, when the moving object is located at the edge position of the current video frame image, use a binary tree, ternary tree, or quadtree division mode to perform encoding division on the current video frame.

[0102] Specifically, for the case where the moving object is located at the edge position of the image, the moving object can be divided into the same rectangular block using several division modes introduced above. For example, if the moving object is located at the upper left part of the image, then the quadtree division mode can be used for division, and if the moving object has a large area in the length direction, the vertical binary tree division mode can be used for encoding division. Again, for example, if the moving object is located at the left edge of the image and occupies a large area in the width direction, division modes such as the vertical binary tree or vertical ternary tree can be used for division.

[0103] Thus, in this application, for the case where the moving object is at the edge position, there is no need to use the pentatree division method, and division modes such as binary tree, ternary tree, or quadtree can be used for encoding division.

[0104] This application also provides a video processing method, including:

[0105] Perform encoding processing on the video frame using the aforementioned video encoding division method;

[0106] Perform decoding processing on the encoded video frame to restore the video frame;

[0107] Perform rendering output on the restored video frame.

[0108] Specifically, taking a complete video processing flow as an example for illustration: First, video images are captured. The frame difference algorithm is used for the video frame image sequence to confirm whether there are moving objects. In the case where there are moving objects at non-edge positions, the above-mentioned coding division mode including the quadtree is used for region division, which can be a single quadtree division mode, a nested quadtree division mode, or a division mode that mixes the quadtree with other tree structures. After division, subsequent related processing steps of acquisition coding are carried out, such as intra-frame prediction, inter-frame prediction, transformation of video coding blocks, quantization of transform coefficients, and entropy coding.

[0109] After encoding is completed, encapsulation is performed and the data is transmitted. After the playback device receives the transmitted data, decoding processing is carried out. The decoding processing flow includes related steps such as de-encapsulation, entropy decoding, inverse quantization, inverse transformation, image processing, and restoration of video frames. Finally, video frame rendering output is performed, which will not be elaborated here.

[0110] Adding the quadtree division mode, and performing motion region division coding through frame difference, can more accurately divide the moving region object into one block, divide as large coding blocks as possible, reduce the division depth, reduce the search time, and divide pixels with higher correlation into the same block. In this way, the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same division block is more concentrated, so that the compression ratio is higher in transformation and entropy coding.

[0111] In this way, during the video coding division process, when there are moving objects in the video, adding the quadtree division mode for coding division can more accurately divide the moving objects into the same block, divide as large coding blocks as possible, and reduce the division depth. Similar pixels can be divided into the same block, and the residual distribution of intra-frame adjacent pixels or inter-frame matching pixels in the same division block is more concentrated, so that the compression ratio is higher in transformation and entropy coding. While improving the video quality, the coding efficiency and compression ratio are improved, and decoding can also be faster.

[0112] It should be understood that the video processing method of this application is based on the video coding division method of this application, and the relevant content can refer to the above explanation and will not be elaborated here.

[0113] Similarly, the computer device of this application can also be used to implement the video processing method of this application.

[0114] The embodiment of this application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processors to execute the method of any of the above embodiments.

[0115] Thus, the non-volatile computer-readable storage medium of the computer program provided by this application stores a computer program, which, when executed by one or more processors, causes the processors to execute the encoding method or the video processing method.

[0116] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), etc.

[0117] The above embodiments only represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several deformations and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.

Claims

1. A video coding partitioning method, characterized in that, including: Obtain the current video frame image and the previous video frame image adjacent to the current video frame image sequence; Confirm whether there is a moving object in the current video frame image according to the current video frame image and the previous video frame image; When it is confirmed that there is a moving object in the current video frame image, perform encoding division on the current video frame image using a quadtree division mode; When it is confirmed that there is a moving object in the current video frame image, performing encoding division on the current video frame image using a quadtree division mode includes: When the moving object is located at a non-edge position of the current video frame image, perform encoding division on the current video frame image using a quadtree division mode; When the moving object is located at a non-edge position of the current video frame image, performing encoding division on the current video frame image using a quadtree division mode includes: When there are multiple moving objects in the current video frame image, select the one with the largest area as the target moving object; According to the target moving object, perform encoding division on the current video frame image using a quadtree division mode; According to the target moving object, performing encoding division on the current video frame image using a quadtree division mode includes: Align the region where the target moving object is located in accordance with 2 n *2 m for pixel alignment, so as to divide the region where the target moving object is located into a rectangular region, where both n and m are integers greater than 0; According to the target moving object, performing encoding division on the current video frame image using a quadtree division mode includes: Taking the rectangular area where the target moving object is located as the center, extend the two adjacent sides of the rectangular area to intersect with the boundary of the coding unit where the target moving object is located, so as to divide the coding unit into five rectangular areas including the rectangular area where the target moving object is located at the current depth.

2. The method according to claim 1, wherein Confirming whether there is a moving object in the current video frame image according to the current video frame image and the previous video frame image includes: Perform a differential operation on the current video frame image and the previous video frame image to obtain the difference in brightness between the two frames of images; When the absolute value of the brightness difference is greater than or equal to a predetermined threshold, determine that there is a moving object in the current video frame image.

3. The method according to claim 1, wherein The method further includes: For the four rectangular areas other than the rectangular area where the target moving object is located, use a binary tree, ternary tree, quadtree or quadtree division mode to perform encoding division at subsequent depths of the current depth until a preset maximum depth.

4. The method according to claim 1, wherein The method further includes: When the moving object is located at an edge position of the current video frame image, perform encoding division on the current video frame using a binary tree, ternary tree or quadtree division mode.

5. A video processing method, characterized in that, including: Perform encoding processing on the video frame using the video encoding division method according to any one of claims 1-4; Perform decoding processing on the encoded video frame to restore the video frame; Perform rendering output on the restored video frame.

6. A computer device, characterized in that, The computer device includes a memory and a processor, and a computer program is stored in the memory. When the computer program is executed by the processor, the method according to any one of claims 1-4 is implemented.

7. A non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Movement perception model extraction method based on time-space domain

    CN101853510A

  • Ultra-high-definition video cut picture target tracking identification method

    CN111311645A

  • Condition dependent video block partition

    CN113396586A