Video processing method, device, electronic device and storage medium

By determining the target encoding subblock and filter mark information in the video frame, the filtering processing of the video frame is optimized, the problem of high computing resources and time costs is solved, and efficient filtering effect is achieved.

CN115883825BActive Publication Date: 2025-08-26BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211515255.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-08-26
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

During the video encoding process, the filtering operation requires a lot of computing resources and time, resulting in low filtering efficiency of video frames.

Method used

By determining the target coding subblock in the target video frame whose residual information with the reference coding subblock is less than or equal to the preset residual information, and determining the filter mark information based on the correlation information of the coding subblock area and the frame area formed by each coding subblock in the target video frame, the filtering mark information is then performed on the video frame under appropriate circumstances.

Benefits of technology

The adaptability of the filtering mode and the target video frame is improved, computing resources and time costs are saved, and filtering efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883825B_ABST
    Figure CN115883825B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a video processing method, apparatus, electronic device, and storage medium. The method comprises: obtaining a target video frame; the target video frame comprises at least one coding block, each coding block comprising at least one coding sub-block; determining a target coding sub-block in each coding block whose residual information with respect to a reference coding sub-block is less than or equal to a preset residual information; determining filtering tag information for the target video frame based on a coding sub-block region formed by each target coding sub-block in the target video frame and region association information of a frame region corresponding to the target video frame; and, when the filtering tag information indicates that a filtering operation has been performed, performing filtering processing on the target video frame to obtain a processed video frame. The present disclosure can improve filtering effect while improving filtering efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video processing technology, and in particular to a video processing method, device, electronic device, and storage medium. Background Art

[0002] During video encoding, the video frame to be encoded can be divided into multiple coding blocks. Prediction and compensation are performed on a block-by-block basis, and the prediction residuals are then transformed and quantized. This process is implemented on a block-by-block basis, which can lead to image discontinuities at the boundaries of different coding blocks during video frame reconstruction. To improve the image quality of the reconstructed video frame, the target video frame can be filtered. In scenarios with a large number of video frames, filtering each frame individually consumes significant computational resources and time, resulting in low filtering efficiency. Summary of the Invention

[0003] The present disclosure provides a video processing method, apparatus, electronic device, and storage medium to at least address the problem in related technologies that filtering consumes a lot of computing resources and time, resulting in low filtering efficiency for video frames. The technical solutions of the present disclosure are as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a video processing method, including:

[0005] Acquire a target video frame; the target video frame includes at least one coding block, and each coding block includes at least one coding sub-block;

[0006] Determining a target coding subblock in each coding block whose residual information with a reference coding subblock is less than or equal to a preset residual information; the reference coding subblock is a coding subblock corresponding to the target coding subblock in a reference video frame of the target video frame; the reference video frame is a video frame that has an image association with the target video frame;

[0007] Determining filtering mark information for the target video frame based on a coding sub-block region formed by each target coding sub-block in the target video frame and region association information of a frame region corresponding to the target video frame;

[0008] In a case where the filtering flag information indicates that a filtering operation is performed, filtering processing is performed on the target video frame to obtain a processed video frame.

[0009] In an exemplary embodiment, the filtering flag information includes first flag information; the first flag information indicates that a filtering operation is not performed;

[0010] The method further comprises:

[0011] Determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block is a rectangular region formed by starting from the any coding block and extending toward an edge of the frame region;

[0012] The determining of the filtering mark information for the target video frame based on the coding sub-block area formed by each target coding sub-block in the target video frame and the area association information of the frame area corresponding to the target video frame includes:

[0013] When there is at least one target coding block in the target video frame, the filtering mark information for the target video frame is determined to be the first mark information; the ratio of an area of ​​a first target region corresponding to the target coding block to an area of ​​a frame region corresponding to the target video frame is greater than or equal to a first preset ratio; the first target region is a coding sub-block region formed by target coding sub-blocks contained in a coding block region corresponding to the target coding block.

[0014] In an exemplary embodiment, the filtering flag information includes second flag information; the second flag information indicates that a filtering operation is performed;

[0015] The method further comprises:

[0016] In a case where the target coding block does not exist in the target video frame, the filtering operation information on the target video frame is determined to be the second marking information.

[0017] In an exemplary embodiment, the method further comprises:

[0018] Determining a current coding block; the current coding block is a coding block that has not been accessed in the at least one coding block;

[0019] Determining a current coding block area corresponding to the current coding block;

[0020] When the target coding sub-block exists in the current coding block area, determining a second target area corresponding to the current coding block area; the second target area is a coding sub-block area formed by the target coding sub-blocks contained in the current coding block area;

[0021] When the ratio of the area of ​​the second target area to the area of ​​the frame area is less than the first preset ratio, return to the step of determining the current coding block area corresponding to the current coding block until the ratio of the area of ​​the second target area to the area of ​​the frame area is greater than or equal to the first preset ratio, then it is determined that there is at least one target coding block in the target video frame, or until the current coding block is the last coding block accessed in the target video frame.

[0022] In an exemplary embodiment, when the filtering flag information indicates that a filtering operation is performed, filtering the target video frame to obtain a processed video frame includes:

[0023] Traversing each coding block in the target video frame;

[0024] Determine the area of ​​a third target region corresponding to each coding block; the third target region is a coding sub-block region formed by target coding sub-blocks included in each coding block;

[0025] Determining a filtering mode for each coding block based on the area of ​​the third target area and area association information of the area of ​​a fourth target area, wherein the fourth target area is an area formed by each coding block;

[0026] Based on the filtering mode of each coding block, a filtering operation is performed on each coding block to obtain the processed video frame.

[0027] In an exemplary embodiment, the method further comprises:

[0028] Determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block is a rectangular region formed by starting from the any coding block and extending toward an edge of the frame region;

[0029] The determining the area of ​​the third target region corresponding to each coding block includes:

[0030] Determining an area of ​​a fifth target region corresponding to the associated coding block; the fifth target region is a coding sub-block region formed by target coding sub-blocks contained in the coding block region corresponding to the associated coding block; the associated coding block is a coding block having a preset spatial relationship with each of the coding blocks;

[0031] The area of ​​the third target area corresponding to each coding block is determined based on the area of ​​the fifth target area corresponding to the associated coding block and the area of ​​the coding block area corresponding to each coding block.

[0032] In an exemplary embodiment, determining the filtering mode for each coding block based on the area of ​​the third target area and the area association information of the fourth target area includes:

[0033] When the area of ​​the third target region is equal to the area of ​​the fourth target region, determining that the filtering mode for the corresponding coding block is a linear filtering mode;

[0034] When the area of ​​the third target region is not equal to the area of ​​the fourth target region, the filtering mode for the corresponding coding block is determined to be a linear filtering mode and a nonlinear filtering mode.

[0035] In an exemplary embodiment, after determining the filtering mode for each coding block based on the area of ​​the third target area and the area association information of the fourth target area, the method further includes:

[0036] When the ratio of the area of ​​the third target region to the area of ​​the fourth target region is greater than or equal to a second preset ratio, adjusting the number of filtering iterations corresponding to the corresponding coding block to a target number of iterations; the target number of iterations is less than the preset number of iterations;

[0037] When the ratio of the area of ​​the third target region to the area of ​​the fourth target region is smaller than the second preset ratio, the number of filtering iterations corresponding to the corresponding coding block is determined to be the preset number of iterations.

[0038] In an exemplary embodiment, performing a filtering operation on each coding block based on the filtering mode of each coding block to obtain the processed video frame includes:

[0039] For a code block to be filtered in a linear filtering mode and a nonlinear filtering mode, a linear filtering operation is performed on the code block to be filtered to obtain a first filtered code block; and a nonlinear filtering operation is performed on the code block to be filtered to obtain a second filtered code block;

[0040] Determining first distortion information based on the to-be-filtered coded block and the first filtered coded block; determining second distortion information based on the to-be-filtered coded block and the second filtered coded block;

[0041] Selecting a filtered coding block from the first filtered coding block and the second filtered coding block based on the first distortion information and the second distortion information;

[0042] The processed video frame is generated based on the filtered coding block.

[0043] In an exemplary embodiment, performing a filtering operation on each coding block based on the filtering mode of each coding block to obtain the processed video frame includes:

[0044] Filtering each coding block based on the filtering mode and the number of filtering iterations of each coding block to obtain a filtered coding block;

[0045] The processed video frame is generated based on the filtered coding block.

[0046] In an exemplary embodiment, the target video frame is obtained by image reconstruction based on coding information of the original video frame; the coding sub-block division method in the original video frame is consistent with the coding sub-block division method in the target video frame;

[0047] The method further comprises:

[0048] Selecting a coding mode for each coding sub-block in the original video frame to determine a coding mode corresponding to each coding sub-block in the original video frame;

[0049] The determining of a target coding sub-block in each coding block whose residual information with respect to the reference coding sub-block is less than or equal to a preset residual information includes:

[0050] Determining, based on the coding modes corresponding to the respective coding sub-blocks in the original video frame, the coding modes corresponding to the corresponding coding sub-blocks in the target video frame;

[0051] The target coding sub-block is determined based on the coding mode corresponding to each coding sub-block in the target video frame; the coding mode corresponding to the target coding sub-block is a skip mode.

[0052] According to a second aspect of an embodiment of the present disclosure, there is provided a video processing apparatus, including:

[0053] A target video frame acquisition unit is configured to acquire a target video frame; the target video frame includes at least one coding block, and each coding block includes at least one coding sub-block;

[0054] a target coding subblock determining unit configured to determine a target coding subblock in each coding block whose residual information with a reference coding subblock is less than or equal to a preset residual information; the reference coding subblock is a coding subblock corresponding to the target coding subblock in a reference video frame of the target video frame; the reference video frame is a video frame that has an image association with the target video frame;

[0055] a filter mark determination unit configured to determine filter mark information for the target video frame based on a coding sub-block region formed by each target coding sub-block in the target video frame and region association information of a frame region corresponding to the target video frame;

[0056] The filtering processing unit is configured to perform filtering processing on the target video frame to obtain a processed video frame when the filtering mark information indicates that a filtering operation is performed.

[0057] In an exemplary embodiment, the filtering flag information includes first flag information; the first flag information indicates that a filtering operation is not performed;

[0058] The device comprises:

[0059] A first region determining unit is configured to determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block is a rectangular region formed by starting from the any coding block and extending toward a region edge of the frame region;

[0060] The filtering mark determination unit includes:

[0061] The first marking information determining unit is configured to determine, when there is at least one target coding block in the target video frame, that the filtering marking information of the target video frame is the first marking information; the ratio of the area of ​​the first target region corresponding to the target coding block to the area of ​​the frame region corresponding to the target video frame is greater than or equal to a first preset ratio; the first target region is a coding sub-block region formed by target coding sub-blocks contained in the coding block region corresponding to the target coding block.

[0062] In an exemplary embodiment, the filtering flag information includes second flag information; the second flag information indicates that a filtering operation is performed;

[0063] The filtering mark determination unit includes:

[0064] The second tag information determining unit is configured to determine, when the target coding block does not exist in the target video frame, filtering operation information on the target video frame as the second tag information.

[0065] In an exemplary embodiment, the apparatus further comprises:

[0066] a current coding block determining unit, configured to determine a current coding block; the current coding block being a coding block that has not been accessed among the at least one coding block;

[0067] a current coding block region determining unit, configured to determine a current coding block region corresponding to the current coding block;

[0068] A second target region determining unit is configured to determine, when the target coding sub-block exists in the current coding block region, a second target region corresponding to the current coding block region; the second target region is a coding sub-block region formed by the target coding sub-blocks contained in the current coding block region;

[0069] A loop execution unit is configured to execute, when the ratio of the area of ​​the second target area to the area of ​​the frame area is less than the first preset ratio, return to the step of determining the current coding block area corresponding to the current coding block, until the ratio of the area of ​​the second target area to the area of ​​the frame area is greater than or equal to the first preset ratio, then determine that there is at least one target coding block in the target video frame, or until the current coding block is the last coding block accessed in the target video frame.

[0070] In an exemplary embodiment, the filtering processing unit includes:

[0071] A traversal unit, configured to traverse each coding block in the target video frame;

[0072] A third determining unit is configured to determine an area of ​​a third target region corresponding to each coding block; the third target region is a coding sub-block region formed by target coding sub-blocks included in each coding block;

[0073] a filtering mode determining unit configured to determine a filtering mode for each coding block based on the area of ​​the third target area and area association information of the fourth target area; the fourth target area being the area formed by each coding block;

[0074] The first filtering unit is configured to execute a filtering mode based on each coding block, perform a filtering operation on each coding block, and obtain the processed video frame.

[0075] In an exemplary embodiment, the apparatus further comprises:

[0076] a fourth determining unit configured to determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block being a rectangular region formed by starting from the any coding block and extending toward an edge of the frame region;

[0077] The third determining unit includes:

[0078] a fifth determining unit configured to determine an area of ​​a fifth target region corresponding to the associated coding block; the fifth target region being a coding sub-block region formed by target coding sub-blocks contained in the coding block region corresponding to the associated coding block; the associated coding block being a coding block having a preset spatial relationship with each of the coding blocks;

[0079] The sixth determining unit is configured to determine the area of ​​the third target area corresponding to each coding block based on the area of ​​the fifth target area corresponding to the associated coding block and the area of ​​the coding block area corresponding to each coding block.

[0080] In an exemplary embodiment, the filtering mode determining unit includes:

[0081] a first mode determining unit configured to determine, when the area of ​​the third target region is equal to the area of ​​the fourth target region, that the filtering mode for the corresponding coding block is a linear filtering mode;

[0082] The second mode determination unit is configured to determine, when the area of ​​the third target region is not equal to the area of ​​the fourth target region, whether the filtering mode for the corresponding coding block is a linear filtering mode or a nonlinear filtering mode.

[0083] In an exemplary embodiment, the apparatus further comprises:

[0084] an iteration number adjustment unit, configured to, when a ratio of an area of ​​the third target region to an area of ​​the fourth target region is greater than or equal to a second preset ratio, adjust the number of filtering iterations corresponding to the corresponding coding block to a target number of iterations; the target number of iterations being less than the preset number of iterations;

[0085] The preset iteration number determination unit is configured to determine the number of filtering iterations corresponding to the corresponding coding block as the preset iteration number when the ratio of the area of ​​the third target area to the area of ​​the fourth target area is less than the second preset ratio.

[0086] In an exemplary embodiment, the filtering processing unit includes:

[0087] The second filtering unit is configured to perform a linear filtering operation on the coding block to be filtered, where the filtering mode is a linear filtering mode and a nonlinear filtering mode, to obtain a first filtered coding block; and perform a nonlinear filtering operation on the coding block to be filtered, to obtain a second filtered coding block;

[0088] a distortion information determining unit configured to determine first distortion information based on the to-be-filtered coding block and the first filtered coding block; and determine second distortion information based on the to-be-filtered coding block and the second filtered coding block;

[0089] a selection unit configured to select a filtered coding block from the first filtered coding block and the second filtered coding block based on the first distortion information and the second distortion information;

[0090] The first generating unit is configured to generate the processed video frame based on the filtered coding block.

[0091] In an exemplary embodiment, the first filtering unit includes:

[0092] A third filtering unit is configured to perform filtering on each coding block based on a filtering mode and a number of filtering iterations of each coding block to obtain a filtered coding block;

[0093] The second generating unit is configured to generate the processed video frame based on the filtered coding block.

[0094] In an exemplary embodiment, the target video frame is obtained by image reconstruction based on coding information of the original video frame; the coding sub-block division method in the original video frame is consistent with the coding sub-block division method in the target video frame;

[0095] The device further comprises:

[0096] A first mode determination unit is configured to perform coding mode selection on each coding sub-block in the original video frame, and determine a coding mode corresponding to each coding sub-block in the original video frame;

[0097] The target coding sub-block determining unit includes:

[0098] A second mode determination unit is configured to determine a coding mode corresponding to a corresponding coding sub-block in the target video frame based on the coding modes corresponding to the coding sub-blocks in the original video frame;

[0099] The seventh determining unit is configured to determine the target coding sub-block based on the coding mode corresponding to each coding sub-block in the target video frame; the coding mode corresponding to the target coding sub-block is the skip mode.

[0100] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the video processing method as described above.

[0101] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the video processing method as described above.

[0102] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, which includes a computer program stored in a readable storage medium, and at least one processor of a computer device reads and executes the computer program from the readable storage medium, so that the device performs the above-mentioned video processing method.

[0103] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:

[0104] The present disclosure can determine the target coding sub-block in the target video frame based on the residual information of each coding sub-block in the target video frame and the corresponding coding sub-block in the reference video frame, so as to realize the determination of the target coding sub-block based on the residual information corresponding to each coding sub-block; further, based on the coding sub-block area formed by the target coding sub-block in the target video frame and the frame area corresponding to the target video frame, the filtering mark information of the target video frame can be determined; when the filtering mark information indicates that a filtering operation is to be performed, the target video frame is filtered to obtain a processed video frame, that is, the filtering mark information of the target video frame can be formed based on the target coding sub-block. The regional association information of the coding sub-block area and the frame area is determined, and the target coding sub-block can be determined based on the residual information corresponding to each coding sub-block, thereby realizing the determination of the filtering mark information of the target video frame based on the residual characteristics of each coding sub-block in the target video frame. On the one hand, it can improve the adaptability of the filtering mode and the target video frame, and thus improve the filtering effect; on the other hand, when the filtering mark information represents the execution of the filtering operation, the filtering operation is performed on the target video frame, so that the filtering of the target video frame can be achieved in a targeted manner, saving computing resources and time costs, and improving the filtering efficiency of the target video frame.

[0105] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0106] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.

[0107] Figure 1 It is a schematic diagram of an implementation environment according to an exemplary embodiment.

[0108] Figure 2 The figure is a flow chart of a video processing method according to an exemplary embodiment.

[0109] Figure 3 FIG. 4 is a schematic diagram of a first coding block according to an exemplary embodiment.

[0110] Figure 4 The figure is a flowchart of a method for determining a target coding block according to an exemplary embodiment.

[0111] Figure 5 The figure is a flow chart of a video frame filtering method according to an exemplary embodiment.

[0112] Figure 6 is a schematic diagram of a second encoding block according to an exemplary embodiment.

[0113] Figure 7 The present invention is a flowchart of a method for determining a coding sub-block region formed by target coding sub-blocks included in each coding block according to an exemplary embodiment.

[0114] Fig. 8 is a schematic diagram of a third encoding block according to an exemplary embodiment.

[0115] Figure 9 The figure is a flow chart of a method for determining a filtering mode for a coding block according to an exemplary embodiment.

[0116] Figure 10 The figure is a flow chart showing a method for filtering a coding block to be filtered according to an exemplary embodiment.

[0117] Figure 11 The figure is a flow chart of a method for determining a target coding sub-block according to an exemplary embodiment.

[0118] Figure 12 The flowchart of filtering the reconstructed video frame is shown according to an exemplary embodiment.

[0119] Figure 13 The figure is a block diagram of a video processing device according to an exemplary embodiment.

[0120] Figure 14 The figure is a schematic diagram showing the structure of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0121] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0122] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.

[0123] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0124] See also Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present disclosure, the implementation environment may include: at least one client 110 and a video processing server 120, and the client 110 and the video processing server 120 can communicate data through a network.

[0125] Specifically, the client 110 may send a video processing request to the video processing server 120, and the video processing request may include a target video frame; the video processing server 120 may determine the target coding sub-block in the target video frame; based on the coding sub-block area formed by the coding sub-blocks formed by each target coding sub-block in the target video frame, and the area association information of the frame area corresponding to the target video frame, determine the filtering mark information for the target video frame; when the filtering mark information indicates that a filtering operation is to be performed, the target video frame is filtered to obtain a processed video frame, and the processed video frame is returned to the client 110.

[0126] The client 110 can communicate with the video processing server 120 based on a browser / server (B / S) or client / server (C / S) model. The client 110 may include physical devices such as smartphones, tablets, laptops, digital assistants, smart wearable devices, in-vehicle terminals, and servers. It may also include software running on the physical devices, such as applications. Operating systems running on the client 110 in the embodiments of the present disclosure may include, but are not limited to, Android, iOS, Linux, and Windows.

[0127] The video processing server 120 and the client 110 can establish a communication connection via wired or wireless communication. The video processing server 120 can include an independently operated server, a distributed server, or a server cluster consisting of multiple servers, wherein the server can be a cloud server.

[0128] In order to solve the problem in related technologies that filtering consumes a lot of computing resources and time costs, thereby resulting in low filtering efficiency of video frames, the present disclosure provides a video processing method, which can be executed by the above-mentioned video processing server; please refer to Figure 2 , the method may specifically include:

[0129] S210. Obtain a target video frame; the target video frame includes at least one coding block, and each coding block includes at least one coding sub-block.

[0130] The target video frame may be a video frame superimposed with external influencing factors, such as a video frame superimposed with noise information; the target video frame may also be a video frame obtained after image processing is performed on the original video frame, for example, the processed video frame loses the detail information in the original video frame, resulting in image discontinuity in the processed video frame.

[0131] Each target video frame may include at least one coding block. The size of the coding block can be determined by the encoder. After the coding block size is determined, the target video frame can be divided into coding blocks based on the coding block size, thereby obtaining at least one coding block. When the target video frame includes multiple coding blocks, the multiple coding blocks do not overlap. Specifically, the coding block size may include 16×16, 32×32, 64×64, 128×128, etc.

[0132] Furthermore, each coding block can be further divided to obtain corresponding coding sub-blocks. Specifically, the coding sub-blocks can be divided based on the image information in each coding block, and the coding sub-blocks also have different coding sizes. The size of the coding sub-blocks in the area where the image changes gently is larger than the size of the coding sub-blocks in the area where the image changes dramatically. For the area where the image changes gently, dividing this area into the same coding sub-block can improve coding efficiency. For the coding sub-blocks in the area where the image changes dramatically, they contain more image details. Therefore, in order to make the image processing effect more accurate, the area where the image changes dramatically can be divided into multiple coding sub-blocks to achieve the processing of local image details. Specifically, the size of the coding sub-blocks can include 8×8, 16×16, 32×32, etc.

[0133] In a specific embodiment, the coding block can be specifically a CTU (coding tree unit), and the coding sub-block can be specifically a CU (coding unit). In the target video frame, a coding tree unit (CTU) contains a luma coding tree block and two chroma coding tree blocks at the same position, as well as some corresponding syntax elements. A coding unit (CU) is a leaf node of a quadtree partition with the CTU as the root node.

[0134] S220. Determine a target coding subblock in each coding block whose residual information with the reference coding subblock is less than or equal to a preset residual information; the reference coding subblock is a coding subblock corresponding to the target coding subblock in a reference video frame of the target video frame; the reference video frame is a video frame that has an image association with the target video frame.

[0135] In this embodiment, the reference video frame may be a video frame that has an image correlation with the target video frame, and the reference video frame may be a video frame that meets a preset image quality. The reference video frame may be a video frame that has an image correlation with the target video frame, which may mean that the reference video frame may be a video frame in the target video stream that is adjacent to or close to the target video frame, or the reference video frame may be a video frame that is relied upon when encoding the target video frame. The reference video frame may be an original video frame without superimposed external influencing factors, or a video frame that has been filtered, that is, the reference video frame may meet the preset image quality. Thus, the reference video frame can serve as a reference frame for determining residual information for the target video frame.

[0136] Specifically, for each coding block, the coding subblocks in each coding block in the target video frame are compared with the coding subblocks in the corresponding coding block in the reference video frame to determine residual information between each coding subblock in the target video frame and the corresponding reference coding subblock. The residual information between each coding block in the target video frame and the reference coding subblock can represent the deviation of the corresponding coding subblock from the reference coding subblock. A larger residual information indicates a larger deviation between the corresponding coding subblock and the reference coding subblock; a smaller residual information indicates a smaller deviation between the corresponding coding subblock and the reference coding subblock. The preset residual information can be a preset residual value, such as 0, 0.01, etc. Accordingly, a coding subblock whose residual information with the reference coding subblock is less than or equal to the preset residual value can be determined as the target coding subblock. Each coding block may include at least one coding subblock and may or may not include a target coding subblock. For a coding block that includes multiple target coding subblocks, the multiple target coding subblocks may or may not be adjacent.

[0137] In an optional embodiment, the residual information between the pixel value of each pixel in each coding sub-block in the target video frame and the pixel value of each pixel in the corresponding reference coding sub-block can be calculated, and the sum of the residual information corresponding to each pixel is used as the residual information between each coding sub-block and the reference coding sub-block.

[0138] In another optional embodiment, residual information between the mean of the pixel values ​​of each pixel in each coding sub-block in the target video frame and the mean of the pixel values ​​of each pixel in the corresponding reference coding sub-block can be calculated, and the residual information can be used as the residual information between each coding sub-block and the reference coding sub-block.

[0139] S230. Determine filtering mark information for the target video frame based on the coding sub-block region formed by each target coding sub-block in the target video frame and region association information of the frame region corresponding to the target video frame.

[0140] The region association information can represent the size relationship information between the coding sub-block region formed by each target coding sub-block and the frame region corresponding to the target video frame. The region association information can also represent the area ratio of the coding sub-block region formed by each target coding sub-block to the frame region corresponding to the target video frame. In a specific embodiment, whether the target video frame needs to be filtered can be determined based on the region association information, and the filtering mark information of the target video frame can be determined accordingly. The filtering mark information may include information representing the execution of the filtering operation and information representing the non-execution of the filtering operation. For example, the filtering mark information representing the execution of the filtering operation is 1, and the filtering mark information representing the non-execution of the filtering operation is 0; or the filtering mark information representing the execution of the filtering operation is Y, and the filtering mark information representing the non-execution of the filtering operation is N.

[0141] Based on the above, it can be seen that the reference video frame is a video frame that meets the preset image quality, and thus the reference coding sub-blocks therein can also be considered as video frames that meet the preset image quality, that is, no filtering operation is required for the reference coding sub-blocks. The residual information between each coding block in the target video frame and the reference coding sub-block can represent the deviation information of the corresponding coding sub-block relative to the reference coding sub-block. For a target coding sub-block, if the residual information between it and the corresponding reference coding sub-block is less than or equal to the preset residual information, it can be said that the target coding sub-block is similar to or identical to the corresponding reference coding sub-block, and similarly, no filtering operation is required for the target coding sub-block. The larger the coding sub-block area formed by the target coding sub-block in the target video frame, the higher the image quality of the target video frame, and the lower the probability of filtering being required. The smaller the coding sub-block area formed by the target coding sub-block in the target video frame, the lower the image quality of the target video frame, and the higher the probability of filtering being required.

[0142] S240 . When the filtering flag information indicates that a filtering operation is to be performed, perform filtering processing on the target video frame to obtain a processed video frame.

[0143] When the filtering mark information of the target video frame is determined, the target video frame on which the filtering operation is performed can be represented by the filtering mark information and determined as the video frame to be filtered; when the number of video frames to be filtered is 1, the video frame to be filtered can be directly filtered; when the number of video frames to be filtered is multiple, the multiple video frames to be filtered can be filtered in parallel.

[0144] The present disclosure can determine the target coding sub-block in the target video frame based on the residual information of each coding sub-block in the target video frame and the corresponding coding sub-block in the reference video frame, so as to realize the determination of the target coding sub-block based on the residual information corresponding to each coding sub-block; further, based on the coding sub-block area formed by the target coding sub-block in the target video frame and the frame area corresponding to the target video frame, the filtering mark information of the target video frame can be determined; when the filtering mark information indicates that a filtering operation is to be performed, the target video frame is filtered to obtain a processed video frame, that is, the filtering mark information of the target video frame can be formed based on the target coding sub-block. The regional association information of the coding sub-block area and the frame area is determined, and the target coding sub-block can be determined based on the residual information corresponding to each coding sub-block, thereby realizing the determination of the filtering mark information of the target video frame based on the residual characteristics of each coding sub-block in the target video frame. On the one hand, it can improve the adaptability of the filtering mode and the target video frame, and thus improve the filtering effect; on the other hand, when the filtering mark information represents the execution of the filtering operation, the filtering operation is performed on the target video frame, so that the filtering of the target video frame can be achieved in a targeted manner, saving computing resources and time costs, and improving the filtering efficiency of the target video frame.

[0145] According to the above content of this embodiment, the target video frame includes at least one coding block, and the coding block area corresponding to any coding block in the target video frame can be determined; the coding block area corresponding to any coding block is a rectangular area formed by taking the any coding block as the starting point and extending to the edge of the frame area.

[0146] Specifically, the frame area formed by the target video frame may include multiple vertices, and one of the multiple vertices can be used as the target vertex. Therefore, when determining the coding block area corresponding to each coding block, the direction of the target vertex can be used as the extension direction, and extended along the extension direction to the area edge of the frame area to form the coding block area corresponding to each coding block.

[0147] See also Figure 3 , which shows a schematic diagram of the frame area of ​​the target video frame, wherein the target video frame includes 16 coding blocks, the frame area includes 4 vertices, the vertex A in the upper left corner is the target vertex, the coding block a is the starting point, and the direction pointing to the target vertex is the extension direction, so that the coding block area corresponding to the coding block a is as follows Figure 3 Grayscale area in .

[0148] In an exemplary embodiment, the filtering flag information includes first flag information; the first flag information indicates that a filtering operation is not performed; accordingly, determining the filtering flag information for the target video frame based on the coding sub-block region formed by each target coding sub-block in the target video frame and the region association information of the frame region corresponding to the target video frame includes:

[0149] When there is at least one target coding block in the target video frame, the filtering mark information for the target video frame is determined to be the first mark information; the ratio of an area of ​​a first target region corresponding to the target coding block to an area of ​​a frame region corresponding to the target video frame is greater than or equal to a first preset ratio; the first target region is a coding sub-block region formed by target coding sub-blocks contained in a coding block region corresponding to the target coding block.

[0150] In this embodiment, whether any coding block is a target coding block can be determined based on the coding sub-block area formed by the target coding sub-blocks contained in the coding block area corresponding to the coding block and the area association information of the frame area. Specifically, the ratio of the area of ​​the first target area corresponding to any coding block to the area of ​​the frame area can be calculated; if the ratio of the area of ​​the first target area corresponding to any coding block to the area of ​​the frame area is greater than or equal to a first preset ratio, the coding block is determined to be a target coding block; if the ratio of the area of ​​the first target area corresponding to any coding block to the area of ​​the frame area is less than the first preset ratio, the coding block is determined to be a non-target coding block. Specifically, the preset ratio can be 0.9, 0.8, etc.

[0151] Therefore, when a target video frame includes at least one target coding block, it can be determined that the ratio of the area of ​​the coding sub-block region formed by the target coding sub-blocks in the target video frame to the area of ​​the frame region is greater than or equal to a first preset ratio, that most of the coding sub-blocks in the target video frame are target coding sub-blocks, and that the target coding sub-blocks are coding sub-blocks whose residual information with the reference coding sub-block is less than or equal to the preset residual information. Therefore, the filtering flag information for the target video frame can be determined to be the first flag information, i.e., no filtering operation is required for the target video frame. By analyzing the target video frame, when the target video frame includes at least one target coding block, the filtering flag information for the target video frame can be determined to be the first flag information, thereby eliminating the need for filtering the target video frame and improving filtering efficiency. Furthermore, based on the ratio of the area of ​​the coding sub-block region formed by the target coding sub-blocks to the area of ​​the frame region, the proportion of the target coding sub-blocks in the target video frame can be determined. Determining whether filtering is required for the target video frame based on the proportion of the target coding sub-blocks in the target video frame can improve the accuracy and adaptability of determining the filtering flag information.

[0152] In an exemplary embodiment, the filtering flag information includes second flag information; the second flag information indicates that a filtering operation is performed; thus, the method further includes:

[0153] In a case where the target coding block does not exist in the target video frame, the filtering operation information on the target video frame is determined to be the second marking information.

[0154] When the target coding block does not exist in the target video frame, it means that the ratio of the area of ​​the coding sub-block region formed by the target coding sub-block in the target video frame to the area of ​​the frame region is less than a first preset ratio, and most of the coding sub-blocks in the target video frame are non-target coding sub-blocks, so it is necessary to perform a filtering operation on the target video frame. Then, the filtering operation information of the target video frame can be determined as the second marking information indicating that the filtering operation needs to be performed, which can realize the filtering operation on the target video frame, thereby improving the image quality of the target video frame. When the filtered target video frame is used as a reference video frame, it can prevent losses or errors in the target video frame from being transmitted to related video frames, thereby improving the video processing effect.

[0155] In an exemplary embodiment, for a method of determining a target coding block, see Figure 4 , the method may include:

[0156] S410. Determine a current coding block; the current coding block is a coding block that has not been accessed among the at least one coding block.

[0157] In the case where the target video frame includes multiple coding blocks, each time the current coding block is determined, any coding block can be selected from the coding blocks that have not been accessed as the current coding block; or the current coding block can be selected from the coding blocks that have not been accessed according to a preset selection order.

[0158] S420. Determine a current coding block region corresponding to the current coding block.

[0159] The current coding block region may be the coding block region corresponding to the current coding block. For determining the current coding block region, reference may be made to the above-mentioned method for determining the coding block region of any coding block in this embodiment, which will not be repeated here.

[0160] S430. Determine whether the target coding sub-block exists in the current coding block area; if so, execute step S440; if not, execute step S460.

[0161] S440. When the target coding sub-block exists in the current coding block area, determine a second target area corresponding to the current coding block area; the second target area is a coding sub-block area formed by the target coding sub-blocks contained in the current coding block area.

[0162] Taking the current coding block area as a unit, a coding sub-block area formed by target coding sub-blocks contained in the current coding block area is determined.

[0163] S450. Determine whether the ratio of the area of ​​the second target area to the area of ​​the frame area is less than the first preset ratio; if so, execute step S460; if not, execute step S470.

[0164] S460. Determine whether the current coding block is the last coding block accessed in the target video frame; if so, execute step S480; if not, execute step S410.

[0165] S470. Determine whether there is at least one target coding block in the target video frame.

[0166] S480. Determine whether the target coding block does not exist in the target video frame.

[0167] At the end of the loop, if the ratio of the area of ​​the second target region to the area of ​​the frame region is greater than or equal to the first preset ratio, it is determined that there is at least one target coding block in the target video frame.

[0168] At the end of the loop, if the ratio of the area of ​​the second target region to the area of ​​the frame region is less than the first preset ratio, it is determined that the target coding block does not exist in the target video frame.

[0169] Thus, in the process of executing the loop, when it is determined that the target coding block exists, the loop can be ended without accessing other coding blocks that have not been accessed. Because when it has been determined that the target coding block exists, it can be said that the area of ​​the coding sub-block region formed by the target coding sub-block in the target video frame is greater than the ratio of the area of ​​the frame area to the area of ​​the frame area. The filtering mark information of the target video frame can be judged, and there is no need to analyze the coding block area corresponding to the coding block that has not been accessed, thereby improving the efficiency of determining the filtering mark information of the target video frame, and terminating the access and analysis of each coding block in advance, which can reduce the consumption of computing resources.

[0170] For the target video frame on which the filtering operation is to be performed, the filtering flag information may further determine the corresponding filtering mode for each coding block in the target video frame. In an exemplary embodiment, see Figure 5 , which shows a video frame filtering method, which may include:

[0171] S510. Traverse each coding block in the target video frame.

[0172] S520. Determine the area of ​​a third target region corresponding to each coding block; the third target region is a coding sub-block region formed by target coding sub-blocks included in each coding block.

[0173] S530. Determine a filtering mode for each coding block based on the area of ​​the third target region and area association information of the area of ​​the fourth target region; the fourth target region is the region formed by each coding block.

[0174] S540. Perform a filtering operation on each coding block based on the filtering mode of each coding block to obtain the processed video frame.

[0175] Specifically, when determining the filtering mode corresponding to each coding block, the filtering mode can be determined based on the area of ​​the coding sub-block area formed by the target coding sub-block contained in the coding block and the area association information of the area formed by the coding block. The area formed by each coding block can be the area occupied by each coding block in the frame area. The area association information can be the area size relationship information between the area of ​​the third target area and the area of ​​the fourth target area, or the area association information can be the ratio information of the area of ​​the first target area to the area of ​​the fourth target area.

[0176] In this way, the filtering mode corresponding to each coding block can be determined based on the area association information corresponding to the coding block. That is, the filtering mode corresponding to each coding block is determined based on the specific information in the coding block, so that the filtering mode of each coding block can be personalized and targeted filtering of each coding block can be performed, thereby improving the filtering effect of each coding block and further improving the filtering effect of the target video frame.

[0177] According to the above content of this embodiment, it can be known that the target video frame includes at least one coding block, and the coding block area corresponding to any coding block in the target video frame can be determined; the coding block area corresponding to any coding block is a rectangular area formed by starting from any coding block and extending toward the edge of the frame area. Specifically, the frame area formed by the target video frame may include multiple vertices, and one of the multiple vertices can be used as the target vertex. Therefore, when determining the coding block area corresponding to each coding block, the direction of the target vertex can be used as the extension direction, and the area edge of the frame area can be extended along the extension direction to form the coding block area corresponding to each coding block.

[0178] In the case where the target video frame includes multiple coding blocks, the target video frame may include multiple coding block rows, each coding block row may include multiple coding blocks, and the number of coding blocks in each coding row may be the same. In the target video frame, except for the coding block at the target vertex, all other coding blocks have associated coding blocks that are spatially adjacent to the corresponding coding block. The number of associated coding blocks of any coding block (except the coding block at the target vertex) may be one or more. The area where any coding block is located and the area where the associated coding block of the coding block is located form a rectangular area; the spatial position of the associated coding block of any coding block is adjacent to the coding block and on the side with the smaller distance from the target vertex.

[0179] like Figure 6 As shown, for coding block a, its associated coding blocks include coding block b, coding block c and coding block d. Coding block a, coding block b, coding block c and coding block d form a rectangular area. Coding block b, coding block c and coding block d are adjacent to coding block a and are located on the side with a smaller distance from the target vertex A.

[0180] The coding block area corresponding to any coding block is a rectangular area formed by taking the coding block as the starting point and extending to the edge of the frame area. Therefore, the coding block area corresponding to any coding block (except the coding block at the target vertex) has an overlapping area with the coding block area corresponding to the associated coding block of the coding block. In the above embodiment, the coding sub-block area formed by the target coding sub-blocks contained in the coding block area corresponding to any coding block (except the coding block at the target vertex) has been determined. Therefore, in order to determine the target coding contained in each coding block, it is necessary to deduplicate the coding sub-block area formed by the target coding sub-blocks in the overlapping area. For details, please refer to Figure 7 , which shows a method for determining a coding sub-block region formed by target coding sub-blocks contained in each coding block. The method may include:

[0181] S710. Determine the area of ​​the fifth target region corresponding to the associated coding block; the fifth target region is a coding sub-block region formed by the target coding sub-blocks contained in the coding block region corresponding to the associated coding block; the associated coding block is a coding block having a preset spatial relationship with each of the coding blocks.

[0182] S720. Determine the area of ​​the third target area corresponding to each coding block based on the area of ​​the fifth target area corresponding to the associated coding block and the area of ​​the coding block area corresponding to each coding block.

[0183] The number of associated coding blocks of any coding block (except the coding block at the target vertex) can be one or more, and the area where any coding block is located and the area where the associated coding block of the coding block is located form a rectangular area; the associated coding block is a coding block having a preset spatial relationship with each of the coding blocks, specifically, an edge of the associated coding block of any coding block coincides with an edge of the coding block, or a vertex of the associated coding block of any coding block coincides with a vertex of the coding block.

[0184] For any coding block with one associated coding block, the coding sub-block area formed by the target coding sub-block contained in the coding block area corresponding to any coding block overlaps with the fifth target area corresponding to the associated coding block. Therefore, the area of ​​the third target area corresponding to any coding block can be obtained by subtracting the fifth target area from the coding sub-block area formed by the target coding sub-block contained in the coding block area corresponding to any coding block. As shown in Figure 8(a), the associated coding block of coding block a is coding block b, and the vertex at which coding block b is located is target vertex A. Therefore, the third target area for coding block a can be the coding sub-block area formed by the target coding sub-block contained in the coding block area corresponding to coding block a, minus the coding sub-block area formed by the target coding sub-block contained in the coding block area corresponding to coding block b. Since coding block b is a vertex coding block, the coding block area corresponding to coding block b coincides with the area formed by coding block b. That is, the coding sub-block area formed by the target coding sub-block contained in the coding block area corresponding to coding block b is specifically the coding sub-block area formed by the target coding sub-block contained in coding block b.

[0185] For any coding block with multiple associated coding blocks, the coding sub-block area formed by the target coding sub-blocks contained in the coding block area corresponding to each associated coding block can be determined separately. If there is regional overlap in the fifth target areas corresponding to the multiple associated coding blocks, the sum of the areas of the third target areas corresponding to the multiple associated coding blocks can be determined based on the fifth target areas and the overlapping areas corresponding to the multiple associated coding blocks. Then, based on the coding sub-block area formed by the target coding sub-blocks contained in the coding block area corresponding to any coding block, the sum of the third target areas corresponding to the multiple associated coding blocks can be subtracted from the sum of the third target areas corresponding to the multiple associated coding blocks to obtain the area of ​​the third target area corresponding to any coding block.

[0186] As shown in Figure 8(b), it shows coding block a, and the associated coding blocks of coding block a: coding block b, coding block c and coding block d. The vertex where coding block b is located is the target vertex A, the area of ​​the fifth target region corresponding to coding block b is b1, the area of ​​the fifth target region corresponding to coding block c is c1, the area of ​​the fifth target region corresponding to coding block d is d1, and the area of ​​the coding sub-block region formed by the target coding sub-blocks contained in the coding block region corresponding to coding block a is a1. Therefore, the sum of the areas of the third target regions of coding blocks b, coding blocks c and coding block d is c1+d1-b1, so that the area of ​​the third target region corresponding to coding block a is a1-(c1+d1-b1).

[0187] In this embodiment, the method for determining the coding block region corresponding to each coding block is compatible with the parallel coding process because data dependencies often exist during the coding block row-level parallel processing. Typically, the first coding block row in each frame is encoded first in the normal manner, while other coding block rows are encoded two coding blocks later than the coding block row above it. As a result, the coding block region corresponding to the current coding block includes the coding block region corresponding to the coding block encoded before the current coding block, that is, there is data dependency between the coding block regions. Coding block row-level parallel processing ensures that each coding block has data dependencies on its associated coding blocks.

[0188] Thus, the coding sub-block area formed by the target coding sub-block in the coding block area corresponding to the associated coding block of any coding block is determined, thereby meeting the data dependency requirements between coding blocks in the coding block row-level parallel processing process and improving the parallelism of data processing and data processing efficiency.

[0189] In another optional embodiment, statistics may be directly collected on the target coding sub-blocks in each coding block to determine the area of ​​the coding sub-block region formed by the target coding sub-blocks contained in each coding block.

[0190] In an exemplary embodiment, when determining the filtering mode of each coding block, the filtering mode may be determined based on the coding sub-block area formed by the target coding sub-blocks included in each coding block and the area association information of the area formed by the corresponding coding block. Figure 9 , the method may include:

[0191] S910. When the area of ​​the third target region is equal to the area of ​​the fourth target region, determine that the filtering mode for the corresponding coding block is a linear filtering mode.

[0192] S920. When the area of ​​the third target region is not equal to the area of ​​the fourth target region, determine whether the filtering mode for the corresponding coding block is a linear filtering mode or a nonlinear filtering mode.

[0193] The third target area is a coding sub-block area formed by the target coding sub-blocks included in each coding block, and the fourth target area is an area formed by each coding block, so that the area of ​​the third target area may be smaller than the area of ​​the fourth target area, or the area of ​​the third target area may be equal to the area of ​​the fourth target area.

[0194] When the area of ​​the third target area is equal to the area of ​​the fourth target area, it means that the coding sub-blocks in the current coding block are all target coding sub-blocks, that is, the residual between the current coding block and the reference coding block meets the preset residual condition, and the reference coding block is the coding block corresponding to the target coding block in the reference video frame of the target video frame. At this time, it can be determined that the filtering mode of the coding block is a linear filtering mode, and no nonlinear filtering is required for the coding block with smaller residual information.

[0195] When the area of ​​the third target area is not equal to the area of ​​the fourth target area, it means that not all the coding sub-blocks in the current coding block are target coding sub-blocks, or the current coding block does not contain the target coding sub-block. At this time, the residual information between the current coding block and the reference coding block does not meet the preset residual condition, and linear filtering operations and nonlinear filtering operations need to be performed on the current coding block. The corresponding determined filtering modes are linear filtering mode and nonlinear filtering mode.

[0196] Therefore, when determining the filtering mode, different filtering modes can be determined respectively when the relationship between the area of ​​the third target area and the area of ​​the fourth target area is different; when the area of ​​the third target area is equal to the area of ​​the fourth target area, the filtering mode is determined to be a linear filtering mode, so that there is no need to perform nonlinear filtering in the subsequent filtering process, thereby improving the efficiency of filtering; when the area of ​​the third target area is not equal to the area of ​​the fourth target area, the filtering mode is determined to be a linear filtering mode and a nonlinear filtering mode, so that it is convenient to select the filtering mode according to the simulation results of the two filtering modes. The proportion of the target coding sub-blocks in each coding block can characterize the image quality of the coding, so that the corresponding filtering mode is determined based on the image quality of each coding block, which reflects the rationality of the determination of the filtering mode and can improve the filtering effect.

[0197] Before filtering, the processing can determine not only the corresponding filtering mode but also the number of filtering iterations; specifically, when the ratio of the area of ​​the third target area to the area of ​​the fourth target area is greater than or equal to the second preset ratio, the number of filtering iterations corresponding to the corresponding coding block is adjusted to the target number of iterations; the target number of iterations is less than the preset number of iterations.

[0198] For coding blocks that require filtering, the corresponding number of filtering iterations can be determined based on the ratio of the area of ​​the third target area corresponding to the corresponding coding block to the area of ​​the fourth target area. In the case where the ratio of the area of ​​the third target area to the area of ​​the fourth target area is greater than or equal to a second preset ratio, the second preset ratio can be 0.7, 0.8, etc., indicating that the proportion of the target coding sub-blocks in the current coding block is greater than or equal to a certain proportion. Therefore, without affecting the filtering effect, the number of iterations for the coding block can be reduced, thereby improving the filtering efficiency of the current coding block and saving computing resources.

[0199] If the ratio of the area of ​​the third target region to the area of ​​the fourth target region is less than the second preset ratio, the number of filtering iterations corresponding to the corresponding coding block is determined to be the preset number of iterations. If the area of ​​the third target region to the area of ​​the fourth target region is less than the second preset ratio, it means that the proportion of target coding sub-blocks in the current coding block is less than a certain proportion. Therefore, in order to ensure the filtering effect, the number of filtering iterations may not be adjusted, that is, the number of filtering iterations corresponding to the coding block is the preset number of iterations.

[0200] For a coding block to be filtered whose filtering mode is a linear filtering mode and a nonlinear filtering mode, the two filtering methods can be respectively performed on the coding block to be filtered, and then the filtering processing result of the coding block to be filtered is determined based on the filtering results corresponding to the two filtering methods. Figure 10 , which shows a filtering method for a coding block to be filtered, the method may include:

[0201] S1010. For the coding block to be filtered whose filtering mode is a linear filtering mode and a nonlinear filtering mode, perform a linear filtering operation on the coding block to be filtered to obtain a first filtered coding block; perform a nonlinear filtering operation on the coding block to be filtered to obtain a second filtered coding block.

[0202] S1020. Determine first distortion information based on the to-be-filtered coded block and the first filtered coded block; determine second distortion information based on the to-be-filtered coded block and the second filtered coded block.

[0203] S1030. Select a filtered coding block from the first filtered coding block and the second filtered coding block based on the first distortion information and the second distortion information.

[0204] S1040. Generate the processed video frame based on the filtered coding block.

[0205] For the code block to be filtered, linear filtering and nonlinear filtering can be performed separately, thereby obtaining a first filtered code block corresponding to the linear filtering and a second filtered code block corresponding to the nonlinear filtering. First distortion information is then determined based on the code block to be filtered and the first filtered code block, and second distortion information is determined based on the code block to be filtered and the second filtered code block. The filtered code block corresponding to the distortion information representing less distortion can be selected from the first distortion information and the second distortion information as the filtered code block corresponding to the code block to be filtered. Specifically, if the first distortion information is less than the second distortion information, the first filtered code block can be determined as the filtered code block; if the second distortion information is less than the first distortion information, the second filtered code block can be determined as the filtered code block. For example, the distortion information measurement metric can be RDCost (Rate Distortion Optimization), whereby the first distortion information can be specifically a first RDCost parameter and the second distortion information can be a second RDCost parameter. The filtering result corresponding to the filtering mode with the optimal RDCost parameter can be determined as the filtering result for the code block to be filtered.

[0206] For each coding block to be filtered, the filtering result corresponding to the filtering method with smaller distortion information is selected as the filtering result of the coding block to be filtered, thereby reducing the distortion information of the coding block after filtering and improving the filtering effect of the coding block; further generating a processed video frame based on the filtered coding block can reduce the distortion information of the processed video frame relative to the target video frame, and can improve the filtering effect of the processed video frame.

[0207] Based on the determination of the filtering mode and the number of filtering iterations corresponding to the coding block to be filtered, the coding block to be filtered can be filtered in combination with the filtering mode and the number of filtering iterations; specifically, it may include: based on the filtering mode and the number of filtering iterations of each coding block, filtering each coding block to obtain a filtered coding block; and generating the processed video frame based on the filtered coding block.

[0208] When performing the filtering operation of the corresponding filtering mode on the coding block to be filtered, the number of filtering iterations is taken into account, so as to achieve comprehensive filtering operation on each coding block to be filtered. The filtering mode and filtering iteration operation are determined based on the image characteristics of the coding block to be filtered, thereby integrating the factors affecting the filtering performance and the factors affecting the filtering efficiency to achieve personalized filtering of the coding block to be filtered.

[0209] In an exemplary embodiment, the target video frame is obtained by image reconstruction based on the coding information of the original video frame; the coding sub-block division method in the original video frame is consistent with the coding sub-block division method in the target video frame; the target video frame can be regarded as a reconstructed video frame of the original video frame, and the image area distribution is consistent, so that the coding blocks and coding sub-block division in the target video frame can be consistent with the coding blocks and coding sub-block division in the original video frame. Figure 11 , which shows a method for determining a target coding sub-block, which may include:

[0210] S1110. Select a coding mode for each coding sub-block in the original video frame, and determine a coding mode corresponding to each coding sub-block in the original video frame.

[0211] S1120. Based on the coding modes corresponding to the respective coding sub-blocks in the original video frame, determine the coding modes corresponding to the corresponding coding sub-blocks in the target video frame.

[0212] S1130. Determine the target coding sub-block based on the coding mode corresponding to each coding sub-block in the target video frame; the coding mode corresponding to the target coding sub-block is the skip mode.

[0213] In a video coding scenario, when encoding the original video frame, a coding mode can be selected for each coding sub-block separately to obtain a coding mode corresponding to each coding sub-block. The coding mode corresponding to each coding sub-block is suitable for inter-frame prediction scenarios, and motion estimation and motion compensation are performed between the video frame to be encoded and the reference video frame. Specifically, coding modes may include skip mode, merge mode, and inter mode. In skip mode, neither motion vectors nor residual information need to be transmitted. Skip mode is suitable for predicting pixel blocks with less motion or static in a frame, further reducing the amount of data transmitted. Inter mode directly encodes motion parameters and transmits motion vectors and residual blocks. Merge mode does not require the transmission of motion vectors.

[0214] Therefore, when the coding mode of each coding sub-block in the original video frame is determined, the coding mode of the corresponding coding sub-block in the target video frame can be determined, wherein for the coding sub-block whose coding mode is the skip mode, there may be no residual information between it and the corresponding coding sub-block in the reference video frame, or the residual information may be less than the preset residual information; since the image quality of the reference video frame is high, the image quality of the coding sub-block whose coding mode is the skip mode is also high, and it can be filtered.

[0215] The target video frame can be regarded as a reconstructed video frame of the original video frame, and the image area distribution is consistent, so that the coding mode of each coding sub-block of the original video frame can be mapped to each coding sub-block of the target video frame. Then, based on the coding mode of each coding sub-block in the target video frame, it is possible to directly determine whether it is the target coding sub-block, thereby improving the convenience of subsequent filtering mode determination.

[0216] It should be noted that in actual application scenarios, any of the above methods in this embodiment can be combined and have corresponding beneficial effects, which will not be repeated here.

[0217] The specific implementation process of the present disclosure is described below using a video encoding scenario as an example. The video processing server can receive a video stream, which includes multiple continuous original video frames. When encoding each original video frame, the target size of the encoding block can be first determined based on the setting information of the encoder, and then the original video frame can be divided into encoding blocks based on the target size to obtain multiple encoding blocks; in each encoding block, the encoding sub-blocks are divided based on the image information in the encoding block, and the encoding sub-block area size corresponding to the area where the image changes drastically is smaller, and the encoding sub-block area size corresponding to the area where the image changes smoothly is larger; after determining the encoding sub-blocks, the encoding mode corresponding to each encoding sub-block can be determined, and encoding is performed based on the encoding mode corresponding to each encoding sub-block, so as to obtain the encoding information corresponding to each encoding sub-block, and then the encoding information of the original video frame can be obtained.

[0218] The encoder may include a decoder that simulates the decoding process to obtain a decoded reconstructed video frame. The reconstructed video frame can be used as a reference video frame for the unencoded video frame. For the reference video frame, since subsequent video frames are compensated based on the information of the previous video frame, the losses and errors in the reference video frame will be carried over to the entire sequence and, as the motion compensation process progresses, may be diffused to the entire video frame. To reduce video loss, each video frame is post-processed after encoding. The filter that processes these video frames is called a loop filter. Through loop filtering, the filtered reconstructed video frame can be made closer to the original video frame. The video processing method in this embodiment can include a loop filtering process. That is, after encoding any original video frame to obtain encoding information, the video frame can be reconstructed based on the encoding information to obtain a reconstructed video frame; the reconstructed video frame is loop filtered to obtain a processed video frame after loop filtering. The loop filtering in this embodiment can be pixel value-based filtering, so that after loop filtering, the output is the pixel value of each pixel point. The reconstructed video frames after loop filtering can reduce the information loss and information errors caused by block encoding of the original video frames; using the processed video frames as reference video frames for subsequent video frames to be encoded can improve the accuracy of the reference video frames, thereby improving the encoding accuracy of the candidate video frames to be encoded.

[0219] Accordingly, the flowchart of filtering the reconstructed video frame can be found in Figure 12 , specifically including:

[0220] S1210. Determine to reconstruct an image based on the coding information of the original video frame to obtain a target video frame; the target video frame includes multiple coding blocks, and each coding block includes multiple coding sub-blocks.

[0221] S1212. Determine the encoding mode of each encoding subblock in the target video frame based on the encoding mode of the corresponding encoding subblock in the original video frame.

[0222] S1214. Determine the coding sub-block whose coding mode is skip mode in the target video frame as the target coding sub-block.

[0223] S1216. Taking each coding block as a unit, count the area m1 of the target coding sub-block contained in the rectangular region up to the current coding block.

[0224] S1218. Determine whether the area m1 and the area of ​​the frame region of the target video frame are greater than or equal to a first preset ratio; if so, execute step S1236; if not, execute step S1220.

[0225] S1220. Calculate the area m2 of the coding sub-block region formed by the target coding sub-block included in the current coding block.

[0226] S1222. Determine whether the area m2 of the coding sub-block region formed by the target coding sub-block contained in the current coding block is equal to the area m3 of the region formed by the current coding block; if so, execute step S1224; if not, execute step S1226.

[0227] S1224. Determine that the filtering mode is linear filtering.

[0228] S1226. Determine whether the filtering mode is linear filtering or nonlinear filtering.

[0229] S1228. Determine whether the ratio of area m2 to area m3 is greater than or equal to a second preset ratio; if so, execute step S1230; if not, execute step S1232.

[0230] S1230. Reduce the number of filtering iterations.

[0231] S1232. Maintain the preset number of filtering iterations.

[0232] S1234. Perform a filtering operation on the current coding block.

[0233] S1236. Do not filter the current coding block.

[0234] Figure 13 FIG. 1 is a block diagram of a video processing device according to an exemplary embodiment. Figure 13 , the device comprises:

[0235] The target video frame acquisition unit 1310 is configured to acquire a target video frame; the target video frame includes at least one coding block, and each coding block includes at least one coding sub-block;

[0236] The target coding sub-block determining unit 1320 is configured to determine a target coding sub-block in each coding block whose residual information with a reference coding sub-block is less than or equal to a preset residual information; the reference coding sub-block is a coding sub-block corresponding to the target coding sub-block in a reference video frame of the target video frame; the reference video frame is a video frame that has an image association with the target video frame;

[0237] The filter flag determining unit 1330 is configured to determine filter flag information for the target video frame based on the coding sub-block region formed by each target coding sub-block in the target video frame and region association information of the frame region corresponding to the target video frame;

[0238] The filtering processing unit 1340 is configured to perform filtering processing on the target video frame to obtain a processed video frame when the filtering flag information indicates that a filtering operation is performed.

[0239] In an exemplary embodiment, the filtering flag information includes first flag information; the first flag information indicates that a filtering operation is not performed;

[0240] The device comprises:

[0241] A first region determining unit is configured to determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block is a rectangular region formed by starting from the any coding block and extending toward a region edge of the frame region;

[0242] The filtering mark determination unit includes:

[0243] The first marking information determining unit is configured to determine, when there is at least one target coding block in the target video frame, that the filtering marking information of the target video frame is the first marking information; the ratio of the area of ​​the first target region corresponding to the target coding block to the area of ​​the frame region corresponding to the target video frame is greater than or equal to a first preset ratio; the first target region is a coding sub-block region formed by target coding sub-blocks contained in the coding block region corresponding to the target coding block.

[0244] In an exemplary embodiment, the filtering flag information includes second flag information; the second flag information indicates that a filtering operation is performed;

[0245] The filtering mark determination unit includes:

[0246] The second tag information determining unit is configured to determine, when the target coding block does not exist in the target video frame, filtering operation information on the target video frame as the second tag information.

[0247] In an exemplary embodiment, the apparatus further comprises:

[0248] a current coding block determining unit, configured to determine a current coding block; the current coding block being a coding block that has not been accessed among the at least one coding block;

[0249] a current coding block region determining unit, configured to determine a current coding block region corresponding to the current coding block;

[0250] A second target region determining unit is configured to determine, when the target coding sub-block exists in the current coding block region, a second target region corresponding to the current coding block region; the second target region is a coding sub-block region formed by the target coding sub-blocks contained in the current coding block region;

[0251] A loop execution unit is configured to execute, when the ratio of the area of ​​the second target area to the area of ​​the frame area is less than the first preset ratio, return to the step of determining the current coding block area corresponding to the current coding block, until the ratio of the area of ​​the second target area to the area of ​​the frame area is greater than or equal to the first preset ratio, then determine that there is at least one target coding block in the target video frame, or until the current coding block is the last coding block accessed in the target video frame.

[0252] In an exemplary embodiment, the filtering processing unit includes:

[0253] A traversal unit, configured to traverse each coding block in the target video frame;

[0254] A third determining unit is configured to determine an area of ​​a third target region corresponding to each coding block; the third target region is a coding sub-block region formed by target coding sub-blocks included in each coding block;

[0255] a filtering mode determining unit configured to determine a filtering mode for each coding block based on the area of ​​the third target area and area association information of the fourth target area; the fourth target area being the area formed by each coding block;

[0256] The first filtering unit is configured to execute a filtering mode based on each coding block, perform a filtering operation on each coding block, and obtain the processed video frame.

[0257] In an exemplary embodiment, the apparatus further comprises:

[0258] a fourth determining unit configured to determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block being a rectangular region formed by starting from the any coding block and extending toward an edge of the frame region;

[0259] The third determining unit includes:

[0260] a fifth determining unit configured to determine an area of ​​a fifth target region corresponding to the associated coding block; the fifth target region being a coding sub-block region formed by target coding sub-blocks contained in the coding block region corresponding to the associated coding block; the associated coding block being a coding block having a preset spatial relationship with each of the coding blocks;

[0261] The sixth determining unit is configured to determine the area of ​​the third target area corresponding to each coding block based on the area of ​​the fifth target area corresponding to the associated coding block and the area of ​​the coding block area corresponding to each coding block.

[0262] In an exemplary embodiment, the filtering mode determining unit includes:

[0263] a first mode determining unit configured to determine, when the area of ​​the third target region is equal to the area of ​​the fourth target region, that the filtering mode for the corresponding coding block is a linear filtering mode;

[0264] The second mode determination unit is configured to determine, when the area of ​​the third target region is not equal to the area of ​​the fourth target region, whether the filtering mode for the corresponding coding block is a linear filtering mode or a nonlinear filtering mode.

[0265] In an exemplary embodiment, the apparatus further comprises:

[0266] an iteration number adjustment unit, configured to, when a ratio of an area of ​​the third target region to an area of ​​the fourth target region is greater than or equal to a second preset ratio, adjust the number of filtering iterations corresponding to the corresponding coding block to a target number of iterations; the target number of iterations being less than the preset number of iterations;

[0267] The preset iteration number determination unit is configured to determine the number of filtering iterations corresponding to the corresponding coding block as the preset iteration number when the ratio of the area of ​​the third target area to the area of ​​the fourth target area is less than the second preset ratio.

[0268] In an exemplary embodiment, the filtering processing unit includes:

[0269] The second filtering unit is configured to perform a linear filtering operation on the coding block to be filtered, where the filtering mode is a linear filtering mode and a nonlinear filtering mode, to obtain a first filtered coding block; and perform a nonlinear filtering operation on the coding block to be filtered, to obtain a second filtered coding block;

[0270] a distortion information determining unit configured to determine first distortion information based on the to-be-filtered coding block and the first filtered coding block; and determine second distortion information based on the to-be-filtered coding block and the second filtered coding block;

[0271] a selection unit configured to select a filtered coding block from the first filtered coding block and the second filtered coding block based on the first distortion information and the second distortion information;

[0272] The first generating unit is configured to generate the processed video frame based on the filtered coding block.

[0273] In an exemplary embodiment, the first filtering unit includes:

[0274] A third filtering unit is configured to perform filtering on each coding block based on a filtering mode and a number of filtering iterations of each coding block to obtain a filtered coding block;

[0275] The second generating unit is configured to generate the processed video frame based on the filtered coding block.

[0276] In an exemplary embodiment, the target video frame is obtained by image reconstruction based on coding information of the original video frame; the coding sub-block division method in the original video frame is consistent with the coding sub-block division method in the target video frame;

[0277] The device further comprises:

[0278] A first mode determination unit is configured to perform coding mode selection on each coding sub-block in the original video frame, and determine a coding mode corresponding to each coding sub-block in the original video frame;

[0279] The target coding sub-block determining unit includes:

[0280] A second mode determination unit is configured to determine a coding mode corresponding to a corresponding coding sub-block in the target video frame based on the coding modes corresponding to the coding sub-blocks in the original video frame;

[0281] The seventh determining unit is configured to determine the target coding sub-block based on the coding mode corresponding to each coding sub-block in the target video frame; the coding mode corresponding to the target coding sub-block is the skip mode.

[0282] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0283] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided. Optionally, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, an optical data storage device, etc.; when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform any of the methods described above.

[0284] In an exemplary embodiment, a computer program product is also provided, which includes a computer program stored in a readable storage medium, and at least one processor of a computer device reads and executes the computer program from the readable storage medium, so that the device performs any of the above methods.

[0285] Figure 14 is a block diagram of an electronic device for video processing according to an exemplary embodiment. The electronic device may be a server, and its internal structure may be as shown in FIG. Figure 14 As shown. The electronic device includes a processor, a memory, and a network interface connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a video processing method is implemented.

[0286] Those skilled in the art will understand that Figure 14 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0287] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0288] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A video processing method, characterized in that: include: Get the target video frame; The target video frame includes at least one coding block, and each coding block includes at least one coding sub-block; Determining a target coding subblock in each coding block whose residual information with a reference coding subblock is less than or equal to a preset residual information; the reference coding subblock is a coding subblock corresponding to the target coding subblock in a reference video frame of the target video frame; the reference video frame is a video frame that has an image association with the target video frame; Determining filtering mark information for the target video frame based on a coding sub-block region formed by each target coding sub-block in the target video frame and region association information of a frame region corresponding to the target video frame; In a case where the filtering flag information indicates that a filtering operation is performed, filtering processing is performed on the target video frame to obtain a processed video frame.

2. The method according to claim 1, characterized in that The filtering operation is performed on the target video frame to obtain a processed video frame when the filtering mark information indicates that the filtering operation is performed, comprising: Traversing each coding block in the target video frame; Determine the area of ​​a third target region corresponding to each coding block; the third target region is a coding sub-block region formed by target coding sub-blocks included in each coding block; Determining a filtering mode for each coding block based on the area of ​​the third target area and area association information of the area of ​​a fourth target area, wherein the fourth target area is an area formed by each coding block; Based on the filtering mode of each coding block, a filtering operation is performed on each coding block to obtain the processed video frame.

3. The method according to claim 1, characterized in that The filtering mark information includes first mark information; the first mark information indicates that the filtering operation is not performed; The method further comprises: Determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block is a rectangular region formed by starting from the any coding block and extending toward an edge of the frame region; The determining of the filtering mark information for the target video frame based on the coding sub-block area formed by each target coding sub-block in the target video frame and the area association information of the frame area corresponding to the target video frame includes: When there is at least one target coding block in the target video frame, the filtering mark information for the target video frame is determined to be the first mark information; the ratio of an area of ​​a first target region corresponding to the target coding block to an area of ​​a frame region corresponding to the target video frame is greater than or equal to a first preset ratio; the first target region is a coding sub-block region formed by target coding sub-blocks contained in a coding block region corresponding to the target coding block.

4. The method according to claim 3, characterized in that The filtering mark information includes second mark information; the second mark information indicates that a filtering operation is performed; The method further comprises: In a case where the target coding block does not exist in the target video frame, the filtering operation information on the target video frame is determined to be the second marking information.

5. The method according to claim 3, characterized in that The method further comprises: Determining a current coding block; the current coding block is a coding block that has not been accessed in the at least one coding block; Determining a current coding block area corresponding to the current coding block; When the target coding sub-block exists in the current coding block area, determining a second target area corresponding to the current coding block area; the second target area is a coding sub-block area formed by the target coding sub-blocks contained in the current coding block area; When the ratio of the area of ​​the second target area to the area of ​​the frame area is less than the first preset ratio, return to the step of determining the current coding block area corresponding to the current coding block until the ratio of the area of ​​the second target area to the area of ​​the frame area is greater than or equal to the first preset ratio, then it is determined that there is at least one target coding block in the target video frame, or until the current coding block is the last coding block accessed in the target video frame.

6. The method according to claim 2, characterized in that The method further comprises: Determine a coding block region corresponding to any coding block in the target video frame; the coding block region corresponding to any coding block is a rectangular region formed by starting from the any coding block and extending toward an edge of the frame region; The determining the area of ​​the third target region corresponding to each coding block includes: Determining an area of ​​a fifth target region corresponding to the associated coding block; the fifth target region is a coding sub-block region formed by target coding sub-blocks contained in the coding block region corresponding to the associated coding block; the associated coding block is a coding block having a preset spatial relationship with each of the coding blocks; The area of ​​the third target area corresponding to each coding block is determined based on the area of ​​the fifth target area corresponding to the associated coding block and the area of ​​the coding block area corresponding to each coding block.

7. The method according to claim 2, characterized in that The determining, based on the area association information of the third target area and the fourth target area, a filtering mode for each coding block includes: When the area of ​​the third target region is equal to the area of ​​the fourth target region, determining that the filtering mode for the corresponding coding block is a linear filtering mode; When the area of ​​the third target region is not equal to the area of ​​the fourth target region, the filtering mode for the corresponding coding block is determined to be a linear filtering mode and a nonlinear filtering mode.

8. The method according to claim 7, characterized in that After determining the filtering mode for each coding block based on the area of ​​the third target area and the area association information of the fourth target area, the method further includes: When the ratio of the area of ​​the third target region to the area of ​​the fourth target region is greater than or equal to a second preset ratio, adjusting the number of filtering iterations corresponding to the corresponding coding block to a target number of iterations; the target number of iterations is less than the preset number of iterations; When the ratio of the area of ​​the third target region to the area of ​​the fourth target region is smaller than the second preset ratio, the number of filtering iterations corresponding to the corresponding coding block is determined to be the preset number of iterations.

9. The method according to claim 8, characterized in that The filtering operation is performed on each coding block based on the filtering mode of each coding block to obtain the processed video frame, including: Filtering each coding block based on the filtering mode and the number of filtering iterations of each coding block to obtain a filtered coding block; The processed video frame is generated based on the filtered coding block.

10. The method according to claim 7, characterized in that The filtering operation is performed on each coding block based on the filtering mode of each coding block to obtain the processed video frame, including: For a code block to be filtered in a linear filtering mode and a nonlinear filtering mode, a linear filtering operation is performed on the code block to be filtered to obtain a first filtered code block; and a nonlinear filtering operation is performed on the code block to be filtered to obtain a second filtered code block; Determining first distortion information based on the to-be-filtered coded block and the first filtered coded block; determining second distortion information based on the to-be-filtered coded block and the second filtered coded block; Selecting a filtered coding block from the first filtered coding block and the second filtered coding block based on the first distortion information and the second distortion information; The processed video frame is generated based on the filtered coding block.

11. The method according to claim 1, wherein The target video frame is obtained by image reconstruction based on the coding information of the original video frame; the coding sub-block division method in the original video frame is consistent with the coding sub-block division method in the target video frame; The method further comprises: Selecting a coding mode for each coding sub-block in the original video frame to determine a coding mode corresponding to each coding sub-block in the original video frame; The determining of a target coding sub-block in each coding block whose residual information with respect to the reference coding sub-block is less than or equal to a preset residual information includes: Determining, based on the coding modes corresponding to the respective coding sub-blocks in the original video frame, the coding modes corresponding to the corresponding coding sub-blocks in the target video frame; The target coding sub-block is determined based on the coding mode corresponding to each coding sub-block in the target video frame; the coding mode corresponding to the target coding sub-block is a skip mode.

12. A video processing device, characterized in that: include: A target video frame acquiring unit is configured to acquire a target video frame; The target video frame includes at least one coding block, and each coding block includes at least one coding sub-block; a target coding subblock determining unit configured to determine a target coding subblock in each coding block whose residual information with a reference coding subblock is less than or equal to a preset residual information; the reference coding subblock is a coding subblock corresponding to the target coding subblock in a reference video frame of the target video frame; the reference video frame is a video frame that has an image association with the target video frame; a filter mark determination unit configured to determine filter mark information for the target video frame based on a coding sub-block region formed by each target coding sub-block in the target video frame and region association information of a frame region corresponding to the target video frame; The filtering processing unit is configured to perform filtering processing on the target video frame to obtain a processed video frame when the filtering mark information indicates that a filtering operation is performed.

13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the video processing method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the video processing method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method and device for filtering

    CN110121884A

  • Video processing method and device using resolution of reference picture, and recording medium

    WO2021101356A1