Video filtering method, device, equipment and medium

By setting the pixel block size parameters of the motion compensation temporal filter according to the video size information of the video data, the problem of failing to fully utilize SIMD processor parallelism in the existing technology is solved, and the video filtering efficiency and quality are improved.

CN118714306APending Publication Date: 2024-09-27ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410832868.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

In the existing technology, when using a SIMD processor to filter video frames, the motion compensation time domain filter fails to fully utilize the parallelism of the SIMD processor, resulting in low video filtering efficiency.

Method used

According to the video size information of the video data, set the pixel block size parameters of the motion compensation temporal filter to cut the video frame. If the video size information is in a larger interval, set a larger pixel block parameter to make full use of the parallelism of the SIMD processor. degree, and improve filtering efficiency while ensuring video filtering quality.

Benefits of technology

By flexibly setting the pixel block size parameters, the video filtering efficiency is significantly improved, the parallel utilization of the SIMD processor is improved, the video filtering quality is ensured, and the BD-rate loss is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714306A
    Figure CN118714306A
Patent Text Reader

Abstract

The embodiment of the invention discloses a video filtering method and device, equipment and a medium. The scheme comprises the following steps: acquiring video size information of video data; if the video size information of the video data is located in a first size interval, setting a pixel block size parameter of a video frame cut by a motion compensation time domain filter as a first cut pixel block parameter; if the video size information of the video data is located in a second size interval, setting a pixel block size parameter of a video frame cut by the motion compensation time domain filter as a second cut pixel block parameter; the maximum value of the first size interval is smaller than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is smaller than the second cutting pixel block parameter; filtering the video data by using an SIMD (Single Instruction Multiple Data) processor based on a motion compensation time domain filter with a set pixel block size parameter; the second cutting pixel block parameter is smaller than or equal to a preset parameter value; the preset parameter value is the quotient of the bit number of the SIMD processor and the bit width value of the video data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video filtering technology, and in particular to a video filtering method, device, equipment and medium. Background Art

[0002] Video coding plays an important role in the field of digital media. It enables video data to be easily transmitted and shared on the Internet, bringing people a richer audio-visual experience.

[0003] In the related art, before encoding the video data, it is usually necessary to filter the video frames in the video data to improve the video encoding quality. The efficiency of filtering the video frames directly affects the efficiency of video encoding, so it is very important to improve the video filtering efficiency. Summary of the invention

[0004] The embodiments of this specification provide a video filtering method, device, equipment and medium to improve the efficiency of video filtering.

[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows:

[0006] A video filtering method provided by an embodiment of this specification includes:

[0007] Get the video size information of the video data;

[0008] If the video size information of the video data is within the first size interval, setting the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the first cutting pixel block parameter;

[0009] If the video size information of the video data is in a second size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the second cutting pixel block parameter; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter;

[0010] The video data is filtered using a SIMD processor based on a motion compensated time domain filter with set pixel block size parameters; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

[0011] The embodiment of this specification provides a video filtering device, including:

[0012] A video size acquisition module is used to obtain video size information of video data;

[0013] A first parameter setting module, configured to set a pixel block size parameter of a motion compensated time domain filter cutting a video frame to a first cutting pixel block parameter if the video size information of the video data is within a first size interval;

[0014] A second parameter setting module is used to set the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the second cutting pixel block parameter if the video size information of the video data is in a second size interval; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter;

[0015] A video filtering module is used to filter the video data using a SIMD processor based on a motion compensated time domain filter with set pixel block size parameters; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

[0016] A video filtering device provided in an embodiment of the present specification includes:

[0017] at least one processor; and,

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0020] Get the video size information of the video data;

[0021] If the video size information of the video data is within the first size interval, setting the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the first cutting pixel block parameter;

[0022] If the video size information of the video data is in a second size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the second cutting pixel block parameter; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter;

[0023] The video data is filtered using a SIMD processor based on a motion compensated time domain filter with set pixel block size parameters; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

[0024] An embodiment of the present specification provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the steps of the video filtering method described above.

[0025] At least one embodiment provided in this specification can achieve the following beneficial effects: by setting the pixel block size parameter of the motion compensation time domain filter for cutting the video frame according to the video size information of the video data, wherein if the video size information is in a second size interval larger than the first size interval, the pixel block size parameter of the motion compensation time domain filter for cutting the video frame is set to a second cutting pixel block parameter larger than the first cutting pixel block parameter, wherein the first cutting pixel block parameter is a parameter when the video size information is in the first size interval, so that when the video data is filtered by the SIMD processor, the parallelism of the SIMD processor can be fully utilized to improve the video filtering effect. In addition, since the video size information of the video data is negatively correlated with the amount of information of the unit pixel block of the video frame, when a larger cutting pixel block parameter is used to cut the video frame in the video data with larger video size information, a large amount of information will not be lost, thereby ensuring the quality of video filtering. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0027] Figure 1 A schematic diagram of an application scenario of video filtering provided in an embodiment of this specification;

[0028] Figure 2 A schematic diagram of a flow chart of a video filtering method provided in an embodiment of this specification;

[0029] Figure 3 A schematic diagram of the structure of a video filtering device provided in an embodiment of this specification;

[0030] Figure 4 A schematic diagram of the structure of a video filtering device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.

[0032] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0033] Video coding can compress and encode video data to reduce the amount of video data and maintain video quality. The compressed and encoded video data can be used for storage, such as storage locally or on a server, and can also be used for video transmission. The party receiving the video data can watch it after decoding the video data.

[0034] Before video encoding, it is usually necessary to filter the video frames in the video data to improve the video encoding quality. In the prior art, a motion compensated temporal filter (MCTF) is used to filter the video frames. The filtering process of the motion compensated temporal filter mainly includes a motion estimation part, a motion compensation part and a filtering part. The implementation methods of these three parts are introduced below:

[0035] (1) Motion estimation part. The motion compensation time domain filter needs to perform motion estimation on each video frame in the video data, that is, by comparing the pixel differences between each video frame and the reference frame of the video frame (the reference frame is the previous and next frames of the video frame, such as the first 4 frames and the last 4 frames of the video frame), the motion vector of each video frame relative to the reference frame of the video frame is determined. Commonly used motion estimation algorithms include full search method, three-step search method, pyramid method, etc.

[0036] (2) Motion compensation part. The motion compensation time domain filter performs motion compensation on each video frame based on the obtained motion vector, that is, the pixels in the reference frame are displaced and interpolated according to the motion vector to generate a predicted frame for each video frame. Motion compensation can reduce redundant information in video data and improve coding efficiency and compression ratio.

[0037] (3) Filtering. For each video frame, the motion compensation time domain filter needs to perform bilateral filtering on the video frame in units of pixel blocks based on the prediction frame corresponding to the reference frame. For video frames in video data of any resolution, the brightness of the 8x8 pixel block is filtered in units of 8x8 pixel blocks, and the chrominance of the 4x4 pixel block is filtered in units of 4x4 pixel blocks.

[0038] In the prior art, in order to improve the filtering efficiency, the Single Instruction Multiple Data (SIMD) technology is used on the basis of the motion compensation time domain filter. With the advancement of science and technology, SIMD processors have developed to 512 bits, with a higher degree of parallelism, that is, they can process more data at the same time. However, if the 512-bit SIMD processor is used to process the filtering process of the motion compensation time domain filter in parallel, the parallelism of the SIMD processor cannot be fully utilized. For example, for 8-bit video data, a 512-bit SIMD processor can process 64 bits of data in parallel, which is reflected in the pixel block as a 64*64 pixel block, that is, the 512-bit SIMD processor can filter the pixels in the 64*64 pixel block in parallel. However, when existing motion compensation time domain filters filter video frames, they are based on smaller pixel blocks - the brightness of 8x8 pixel blocks is filtered in units of 8*8 pixel blocks, and the chrominance of 4*4 pixel blocks is filtered in units of 4*4 pixel blocks. This does not fully utilize the parallelism of the SIMD processor, resulting in low processing efficiency of the SIMD processor and thus low video filtering efficiency.

[0039] The following is an explanation of the terms involved in the embodiments of this specification.

[0040] Video encoding: Video encoding refers to the method of converting the original video format file into another video format file through compression technology. Its main purpose is to reduce the size of the video file while maintaining the video quality, which is used for video storage, video transmission, etc.

[0041] Motion compensated time domain filter: a filtering tool used for pre-processing of video during video encoding.

[0042] SIMD: It is a technology that uses one controller to control multiple processors and simultaneously performs the same operation on each data element in a set of data to achieve spatial parallelism. Its basic principle is to achieve data parallel processing by packaging multiple data elements into a data vector and using one instruction to process all elements in the data vector at the same time.

[0043] The parallelism of a SIMD processor refers to the number of data elements that a processor equipped with SIMD technology can process simultaneously at the same time. It reflects the number of data elements that a SIMD processor can process in parallel within a single instruction cycle.

[0044] Improving the parallelism of the SIMD processor can enable the SIMD processor to process more data elements in one instruction cycle, thereby reducing instruction overhead and improving the processing efficiency of the SIMD processor under the same number of data elements.

[0045] The video size information of video data is negatively correlated with the amount of information in the unit pixel block of the video frame: Taking the video size information of video data as the resolution of video data as an example, the greater the resolution of video data, the less information the unit pixel of the pixel frame in the video data carries. This is because the video data with a larger resolution will divide the video frame into finer areas, and each pixel only needs to carry a small amount of chromaticity information and brightness information to express the details of each area. The less information the unit pixel of the pixel frame carries, the less information the unit pixel block of the video frame has. Therefore, the video size information of video data is negatively correlated with the amount of information in the unit pixel block of the video frame.

[0046] In order to solve the defects in the prior art, this solution provides the following embodiments:

[0047] Figure 1 The following is a schematic diagram of an application scenario of video filtering provided in an embodiment of this specification. Figure 1 As shown, the application scenario includes a terminal 1 and a server 2. The terminal 1 can be a smart phone, or at least one of a smart watch, a desktop computer, a handheld computer, a virtual reality terminal, and an augmented reality terminal. The server 2 can be an independent physical server, or a server cluster or a distributed file system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0048] Terminal 1 can collect video data and send it to server 2 for video encoding. Among them, server 2 can be equipped with a motion compensation time domain filter, a SIMD processor, and a program or device capable of video encoding. Server 2 can filter the video data based on the motion compensation time domain filter using a SIMD processor, and perform video encoding on the filtered video data based on a program or device capable of video encoding to obtain video encoding data. Server 2 can also transmit the obtained video encoding data to a decoding device, or store the video encoding data locally, or transmit it to a memory for storage, wherein the memory can include terminal 1.

[0049] In addition, the terminal 1 may also be equipped with a motion compensation time domain filter, a SIMD processor, and a program or device capable of video encoding, that is, the terminal 1 may also filter and encode the collected video data to obtain video encoding data. The terminal 1 may store the video encoding data locally, or transmit it to a memory for storage, or transmit it to the server 2, or transmit it to a decoding device, etc.

[0050] The video filtering method provided by the embodiments of this specification is introduced below.

[0051] Figure 2 The following is a flow chart of a video filtering method provided in an embodiment of this specification. From a program perspective, Figure 2 The execution subject of the method may be a program installed on the application server or an application client. Figure 2 As shown, the method may include the following steps:

[0052] Step 102: Obtain video size information of the video data.

[0053] In the embodiments of this specification, the terminal can send the collected video data to the server regularly or irregularly, and then the server obtains the video data, wherein the video data can be understood as data that needs to be video encoded. Of course, the server can also directly obtain the video data from the terminal regularly or irregularly, which is not limited here.

[0054] In the embodiment of the present specification, the video size information of the video data may be at least one of the resolution of the video data, the number of vertical pixels of the video frame in the video data, and the number of horizontal pixels of the video frame in the video data.

[0055] The resolution of the video data may refer to the total number of pixels contained in a video frame in the video data.

[0056] Step 104: If the video size information of the video data is within the first size range, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the first cutting pixel block parameter.

[0057] In the embodiment of the present specification, the pixel block size parameter may be a size parameter of a video frame cut by a motion compensation time domain filter when filtering the video frame. Based on the pixel block size parameter, the video frame may be cut into a plurality of pixel blocks, and then the pixel points in the plurality of pixel blocks may be filtered.

[0058] Among them, different pixel block size parameters can cut the video frame into pixel blocks of different sizes. Pixel blocks of different sizes can be understood as pixel blocks with different numbers of pixels. The more the number of pixels, the larger the pixel block.

[0059] Step 106: If the video size information of the video data is within a second size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the second cutting pixel block parameter; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter.

[0060] In the embodiment of this specification, the first size interval and the second size interval may be specific numerical value intervals.

[0061] Taking the video size information of the video data as the number of vertical pixel points of the video frame in the video data as an example, when the number of vertical pixel points of the video frame in the video data is in a second size interval having a larger numerical range than the first size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame can be set to a second cutting pixel block parameter that is larger than the first cutting pixel block parameter.

[0062] Step 108: Filter the video data using a SIMD processor based on a motion compensated time domain filter with set pixel block size parameters; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width of the video data.

[0063] The quotient of the number of bits of the SIMD processor and the bit width of the video data can be interpreted as the parallelism of the SIMD processor.

[0064] In the embodiments of the present specification, for video data with larger video size information, within the parallelism range of the SIMD processor, the pixel block size parameter of the motion compensated time domain filter for cutting the video frame can be set to a larger size parameter. In this way, when the video data is filtered using the SIMD processor based on the motion compensated time domain filter, the parallelism of the SIMD processor can be fully utilized to improve the video filtering effect.

[0065] In addition, since the video size information of the video data is negatively correlated with the amount of information in the unit pixel block in the video frame, that is, the unit pixel block of the video frame in the video data with larger video size information has less information, for the video frame, the pixel block obtained by cutting with a larger cutting pixel block parameter will not lose much information, thereby ensuring the quality of video filtering.

[0066] like Figure 2 As shown, in the embodiment of the present specification, by setting a larger pixel block size parameter for video data with larger video size information, and then filtering the video data using a SIMD processor based on a motion compensation time domain filter with the set pixel block size parameter, the parallelism of the SIMD processor can be fully utilized to improve the video filtering efficiency while ensuring the quality of video filtering.

[0067] It should be understood that the order of some steps in the methods described in one or more embodiments of this specification can be interchanged according to actual needs, or some steps can be omitted or deleted.

[0068] based on Figure 2 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.

[0069] In an embodiment of the present specification, the motion compensation time domain filter may filter the video frame in units of pixel blocks. The motion compensation time domain filter based on the set pixel block size parameter, using a SIMD processor to filter the video data, may specifically include:

[0070] Based on a motion compensation time domain filter with set pixel block size parameters, the video frames in the video data are cut to obtain individual pixel blocks;

[0071] Calculating the filter coefficients of each pixel block using the SIMD processor;

[0072] The respective pixel blocks are filtered based on the filter coefficients of the respective pixel blocks.

[0073] In the embodiments of the present specification, the pixel block size parameter may indicate the number of pixels in the horizontal or vertical direction of the pixel blocks into which the video frame is cut. For example, if the pixel block size parameter is 16, then a 16*16 pixel block may be obtained by cutting the video frame based on the size parameter. For example, if the pixel block size parameter is 8, then an 8*8 pixel block may be obtained by cutting the video frame based on the size parameter.

[0074] Calculating the filter coefficient of each pixel block may be calculating the filter coefficient of each pixel point of each pixel block. Filtering each pixel block may be filtering each pixel point of each pixel block.

[0075] In an embodiment of the present specification, the pixel block size parameter of the motion compensated time domain filter cutting the video frame may specifically include: a brightness size parameter, or a chroma size parameter, or a brightness size parameter and a chroma size parameter; the brightness size parameter is a size parameter required to calculate the brightness filter coefficient of each pixel block, and the chroma size parameter is a size parameter required to calculate the chroma filter coefficient of each pixel block.

[0076] Furthermore, the brightness of each pixel block obtained by cutting based on the brightness size parameter can be filtered, that is, the brightness of each pixel point of each pixel block can be filtered, and the chroma of each pixel block obtained by cutting based on the chroma size parameter can be filtered, that is, the chroma of each pixel point of each pixel block can be filtered.

[0077] In the prior art, the filtering part of the motion compensation time domain filter is as follows:

[0078] For example, for a video frame where (POC%8)==0, the calculation formula for the filtering strength of the motion compensation time domain filter is:

[0079]

[0080] Among them, s 0 (n) represents the video frame s 0 The POC is n; POC represents the sequence information of the video frames in the video data, that is, when playing the video data, the order in which the video frames are displayed; (POC%8)==0 can represent a video frame whose POC is divisible by 8.

[0081] Filter the video frame, the filtering formula is as follows:

[0082]

[0083] Among them, I n Represents the pixel value of the nth pixel after filtering, I 0 Represents the pixel value of the nth pixel before filtering, I r(i) represents the pixel value of the rth pixel in the i-th reference frame after motion compensation. The rth pixel in the i-th reference frame corresponds to the nth pixel before filtering. r (i, a) represents the filtering strength coefficient of the r-th pixel point of the i-th reference frame among a reference frames.

[0084]

[0085] s l =0.4

[0086]

[0087]

[0088] σ l (QP) = 3*(QP-10)

[0089] ΔI(i)=I r (i)-I 0

[0090] Among them, s r (i, a) represents the filter strength coefficient of the i-th reference frame among a reference frames, w a Indicates the correlation filter strength coefficient correction between the current pixel and the pixel in the reference frame, σ w Represents the noise correlation filter strength coefficient correction, σ l (QP) represents the QP correlation filter strength coefficient correction, QP (Quantization Parameter) represents the quantization parameter, noise represents the noise of the motion compensation time domain filter, and error represents the error of the motion compensation time domain filter. Noise and error are calculated based on the 8x8 pixel block filtered for brightness.

[0091] In an embodiment of the present specification, a brightness size parameter in the pixel block size parameter of the motion compensation time domain filter cutting the video frame can be set, and then the noise and error of the motion compensation time domain filter are calculated based on the pixel block obtained by cutting the video frame based on the brightness size parameter. Wherein, the filter coefficient includes a brightness filter coefficient; the use of the SIMD processor to calculate the filter coefficient of each pixel block can specifically include:

[0092] Based on the respective pixel blocks, using the SIMD processor to calculate the noise and error of the motion compensated temporal filter;

[0093] Based on the noise and error of the motion compensation time domain filter, the brightness filter coefficients of the respective pixel blocks are calculated.

[0094] Further, filtering each pixel block based on the filter coefficient of each pixel block may specifically include:

[0095] The brightness of each pixel block is filtered based on the brightness filter coefficient of each pixel block.

[0096] SIMD processors can perform the same operation on each data element in a set of data in parallel, thereby improving data processing efficiency. In order to further improve filtering efficiency, SIMD processors can be used to filter the brightness of each pixel block based on the brightness filter coefficient of each pixel block.

[0097] In the embodiment of the present specification, the chroma size parameter in the pixel block size parameter of the motion compensation time domain filter cutting the video frame can also be set, and then the chroma of the pixel points of the pixel block obtained by cutting the video frame based on the chroma size parameter is filtered. Wherein, the filter coefficient includes the chroma filter coefficient; the use of the SIMD processor to calculate the filter coefficient of each pixel block can specifically include:

[0098] Calculating the chroma filter coefficients of each pixel block using the SIMD processor;

[0099] The filtering of each pixel block based on the filter coefficient of each pixel block may specifically include:

[0100] Based on the chroma filter coefficients of the respective pixel blocks, the chroma of the respective pixel blocks is filtered.

[0101] In order to further improve the filtering efficiency, the chrominance of each pixel block may be filtered using a SIMD processor based on the chrominance filter coefficient of each pixel block.

[0102] In practical applications, video data includes a variety of color coding formats. In the embodiments of this specification, for video data in different color coding formats, the way of filtering the chrominance of the video frame is also different. The difference is mainly reflected in the chrominance size parameter, that is, the chrominance size parameter can be determined based on the video coding format of the video data, and specifically may include:

[0103] If the video encoding format of the video data is YUV444, the chroma size parameter is equal to the brightness size parameter;

[0104] If the video encoding format of the video data is YUV420, the chroma size parameter is smaller than the brightness size parameter.

[0105] Among them, for video data in YUV444 color encoding format, the brightness component and chrominance component of the pixel points in the pixel frame have complete sampling, that is, the brightness and chrominance information of each pixel point are complete, so the chrominance size parameter can be set to be equal to the brightness size parameter; for video data in YUV420 color encoding format, the brightness component of the pixel points in the pixel frame has complete sampling, while the chrominance component has undergone 2:1 sub-sampling in the horizontal and vertical directions, resulting in the chrominance information of the pixel points being reduced by half, so the chrominance size parameter can be set to be smaller than the brightness size parameter, for example, the chrominance size parameter is equal to half of the brightness size parameter, so that the pixel block obtained by cutting the video frame based on the chrominance size parameter is smaller, more chrominance information can be retained, and the filtering quality of the pixel points in chrominance is guaranteed.

[0106] In some specific embodiments, the video data may also be video data in YUV400 color encoding format. For video data in this format, the pixels in the video frame have complete brightness information but no chrominance information. In this case, there is no need to filter the chrominance of the video frame, and the chrominance size parameter does not need to be set, or the chrominance size parameter can be set to zero.

[0107] In an embodiment of the present specification, the pixel block size parameter of the motion compensation time domain filter cutting the video frame can be set according to the video size information of the video data, wherein the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data. After a large number of experiments, the following strategy is obtained: for video data in the YUV420 video encoding format, when the video size information of the video data is less than or equal to 512, the brightness size parameter in the pixel block size parameter can be set to 8, and the chrominance size parameter can be set to 4; when the video size information is greater than or equal to 512 and less than or equal to 704, the brightness size parameter can be set to 16, and the chrominance size parameter can be set to 8; when the video size information is greater than or equal to 704, the brightness size parameter can be set to 32, and the chrominance size parameter can be set to 16.

[0108] The size interval is set based on the above strategy, and the pixel block size parameter of the motion compensation time domain filter for cutting the video frame is set according to the relationship between the video size information of the video data and the size interval. Take the pixel block size parameter as a brightness size parameter and a chroma size parameter, the first cutting pixel block parameter as an example, and the first brightness size parameter and the first chroma size parameter as an example:

[0109] If the video size information of the video data is in the first size interval [A, B], the first brightness size parameter is 16, the first chrominance size parameter is 8, the second brightness size parameter is 32, and the second chrominance size parameter is 16.

[0110] If the video size information of the video data is in the second size interval [A, B], the first brightness size parameter is 8, the first chroma size parameter is 4, the second brightness size parameter is 16, and the second chroma size parameter is 8.

[0111] If the maximum value of the first size interval is not greater than A and the minimum value of the second size interval is not less than B; then the first brightness size parameter is 8, the first chromaticity size parameter is 4, the second brightness size parameter is 32, and the second chromaticity size parameter is 16.

[0112] Among them, the value of A is [512-K, 512+K], the value of B is [704-K, 704+K], and K can be a preset value, such as 0, 10, 20, etc., which is not limited here.

[0113] In the embodiment of the present specification, a third size interval can also be set, wherein the maximum value of the first size interval is less than or equal to the minimum value of the third size interval, the maximum value of the third size interval is less than or equal to the minimum value of the second size interval, and the third cutting pixel parameter is greater than the first cutting pixel parameter and less than the second cutting pixel parameter; if the video size information of the video data is in the third size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the third cutting pixel block parameter.

[0114] Continuing with the above example, if the maximum value of the first size interval is not greater than A, the third size interval is [A, B], and the minimum value of the second size interval is not less than B, then the first brightness size parameter is 8, the first chromaticity size parameter is 4, the third brightness size parameter is 16, the third chromaticity size parameter is 8, the second brightness size parameter is 32, and the second chromaticity size parameter is 16.

[0115] In the prior art, when a SIMD processor is used to filter video data based on a motion compensated time domain filter, the parallelism of the SIMD processor cannot be fully utilized. For example, for a 256-bit SIMD processor, the processor can process 64 bits of data in parallel, which is reflected in the pixel block as a 32*32 pixel block. For example, for filtering video data with a resolution of 720P using a 256-bit SIMD processor, the prior art is to cut the video frame of the video data into 8*8 pixel blocks and then filter the 8*8 pixel blocks, and the utilization rate of the parallelism of the SIMD processor is only 25%. The video filtering method provided in the embodiment of this specification can cut the video frame of the video data into 32*32 pixel blocks and then filter the 32*32 pixel blocks, and the utilization rate of the parallelism of the SIMD processor is 100%, that is, for filtering video data with a resolution of 720P using a 256-bit SIMD processor, the filtering speed of the video filtering method in the embodiment of this specification is 4 times that of the existing video filtering method. Similarly, for filtering 540P resolution video data using a 256-bit SIMD processor, the utilization rate of the parallelism of the SIMD processor in the prior art is 50%, while the utilization rate of the parallelism of the SIMD processor in the video filtering method provided in the embodiment of this specification is 100%, and the filtering speed is twice that of the existing video filtering method. And through calculation, the BD-rate loss is less than 0.5%, where the BD-rate loss can be calculated based on the bit rate-distortion curve.

[0116] In a specific embodiment, in order to ensure the quality of video filtering, a smaller pixel block size parameter may be set, such as setting the brightness size parameter to less than 8 and the chrominance size parameter to less than 4. In this way, although the filtering efficiency is lower, the filtering quality is higher.

[0117] Furthermore, since the amount of information in the unit pixel block of the video frame in the video data with smaller video size information is larger, a smaller pixel block size parameter can be set for the video data with smaller video size information to retain the amount of information of the video frame as much as possible and improve the filtering quality.

[0118] For example, a smaller pixel block size parameter can be set for video data with a resolution of 240P or 480P. Continuing with the above example, if the maximum value of the first size interval is not greater than C, the first brightness size parameter is 4, the first chrominance size parameter is 2, and the value of C is [240-K, 480+K].

[0119] In practical applications, video data includes video data of various bit widths, such as 8-bit video data, 16-bit video data, etc. In addition, SIMD processors also include SIMD processors of various bit widths, such as 256-bit SIMD processors, 512-bit SIMD processors, etc. The parallelism of the SIMD processor can be calculated by dividing the number of bits of the SIMD processor by the bit width value of the video data. In the embodiments of this specification, in order to make full use of the parallelism of the SIMD processor, the pixel block size parameter is set to be no greater than the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

[0120] In a specific embodiment, the bit width value of the video data is 8, the SIMD processor is a 256-bit SIMD processor, the second pixel block parameter is 32, and the pixel block obtained by cutting the video frame based on the second cutting pixel block parameter is a 32*32 pixel block;

[0121] Alternatively, the bit width value of the video data is 8, the SIMD processor is a 512-bit SIMD processor, the second pixel block parameter is 64, and the pixel blocks obtained by cutting the video frame based on the second cutting pixel block parameter are 64*64 pixel blocks.

[0122] In a specific embodiment, the bit width value of the video data is 16, the SIMD processor is a 256-bit SIMD processor, the second pixel block parameter is 16, and the pixel block obtained by cutting the video frame based on the second cutting pixel block parameter is a 16*16 pixel block;

[0123] Alternatively, the bit width value of the video data is 16, the SIMD processor is a 512-bit SIMD processor, the second pixel block parameter is 32, and the pixel blocks obtained by cutting the video frame based on the second cutting pixel block parameter are 32*32 pixel blocks.

[0124] In the embodiment of the present specification, video encoding can also be performed on the filtered video data. After filtering the video data using the SIMD processor, the method can also include:

[0125] Transform-encode the video frames in the video data to obtain frequency domain coefficients of the video frames in the video data;

[0126] Based on the frequency domain coefficients of the video frames in the video data, sequentially quantize and entropy encode the video frames in the video data to obtain entropy-encoded video frames;

[0127] Performing inter-frame prediction on the entropy-encoded video frame to encode the video frame;

[0128] The encoded video frames are packaged according to a preset format to obtain video encoding data.

[0129] Furthermore, after obtaining the video encoding data, the following steps may also be included:

[0130] The video encoding data is transmitted to a storage device or a decoding device.

[0131] In the prior art, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is fixed. In the embodiment of the present specification, the pixel block size parameter can be flexibly set. Specifically, it can be flexibly set according to the video size information of the video data. If the video size information of the video data is large, a larger pixel block size parameter can be set within the parallelism of the SIMD processor, thereby making full use of the parallelism of the SIMD processor, while ensuring the quality of video filtering, improving the efficiency of video filtering.

[0132] If the video size information of the video data is small, a smaller pixel block size parameter can be set. Although the filtering efficiency is reduced, the video filtering quality can be greatly improved.

[0133] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0134] Figure 3 This is a structural diagram of a video filtering device provided in an embodiment of this specification. Figure 3 As shown, the apparatus may include:

[0135] The video size acquisition module 202 is used to acquire video size information of the video data;

[0136] A first parameter setting module 204 is configured to set a pixel block size parameter of a motion compensated time domain filter cutting a video frame to a first cutting pixel block parameter if the video size information of the video data is within a first size interval;

[0137] A second parameter setting module 206 is configured to set a pixel block size parameter of a video frame cut by a motion compensation time domain filter to a second cut pixel block parameter if the video size information of the video data is within a second size interval; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cut pixel block parameter is less than the second cut pixel block parameter;

[0138] The video filtering module 208 is used to filter the video data using a SIMD processor based on a motion compensated time domain filter with a set pixel block size parameter; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

[0139] Optionally, the video filtering module 208 is specifically configured to:

[0140] Based on a motion compensation time domain filter with set pixel block size parameters, the video frames in the video data are cut to obtain individual pixel blocks;

[0141] Calculating the filter coefficients of each pixel block using the SIMD processor;

[0142] The respective pixel blocks are filtered based on the filter coefficients of the respective pixel blocks.

[0143] In an embodiment of the present specification, the pixel block size parameters of the motion compensated time domain filter cutting the video frame specifically include: a brightness size parameter, or a chroma size parameter, or a brightness size parameter and a chroma size parameter; the brightness size parameter is a size parameter required to calculate the brightness filter coefficient of each pixel block, and the chroma size parameter is a size parameter required to calculate the chroma filter coefficient of each pixel block.

[0144] The filter coefficient includes a brightness filter coefficient; and the step of calculating the filter coefficient of each pixel block by using the SIMD processor may specifically include:

[0145] Based on the respective pixel blocks, using the SIMD processor to calculate the noise and error of the motion compensated temporal filter;

[0146] Based on the noise and error of the motion compensation time domain filter, the brightness filter coefficients of the respective pixel blocks are calculated.

[0147] Optionally, the chroma size parameter is determined based on a color encoding format of the video data.

[0148] In a specific embodiment, the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data;

[0149] The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, and the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter;

[0150] When the first size interval is [512, 704], the first brightness size parameter is 16, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is a 16*16 pixel block; the first chroma size parameter is 8, and the pixel block obtained by cutting the video frame based on the first chroma size parameter is an 8*8 pixel block;

[0151] The second brightness size parameter is 32, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 32*32 pixel block; the second chroma size parameter is 16, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is a 16*16 pixel block.

[0152] In a specific embodiment, the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data;

[0153] The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, and the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter;

[0154] When the second size interval is [512, 704], the first brightness size parameter is 8, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is an 8*8 pixel block; the first chrominance size parameter is 4, and the pixel block obtained by cutting the video frame based on the first chrominance size parameter is a 4*4 pixel block;

[0155] The second brightness size parameter is 16, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 16*16 pixel block; the second chroma size parameter is 8, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is an 8*8 pixel block.

[0156] In a specific embodiment, the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data;

[0157] The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, and the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter;

[0158] When the maximum value of the first size interval is not greater than 512 and the minimum value of the second size interval is not less than 704, the first brightness size parameter is 8, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is an 8*8 pixel block; the first chrominance size parameter is 4, and the pixel block obtained by cutting the video frame based on the first chrominance size parameter is a 4*4 pixel block;

[0159] The second brightness size parameter is 32, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 32*32 pixel block; the second chroma size parameter is 16, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is a 16*16 pixel block.

[0160] Optionally, the video filtering device may further include:

[0161] If the video size information of the video data is in a third size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the third cutting pixel block parameter; the maximum value of the first size interval is less than or equal to the minimum value of the third size interval, the maximum value of the third size interval is less than or equal to the minimum value of the second size interval, and the third cutting pixel parameter is greater than the first cutting pixel parameter and less than the second cutting pixel parameter.

[0162] In a specific embodiment, the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data;

[0163] The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter, and the third cut pixel block parameter specifically includes a third brightness size parameter and a third chromaticity size parameter;

[0164] When the maximum value of the first size interval is not greater than 512, the third size interval is [512, 704], and the minimum value of the second size interval is not less than 704, the first brightness size parameter is 8, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is an 8*8 pixel block; the first chrominance size parameter is 4, and the pixel block obtained by cutting the video frame based on the first chrominance size parameter is a 4*4 pixel block;

[0165] The third brightness size parameter is 16, and the pixel block obtained by cutting the video frame based on the third brightness size parameter is a 16*16 pixel block; the third chrominance size parameter is 8, and the pixel block obtained by cutting the video frame based on the third chrominance size parameter is an 8*8 pixel block;

[0166] The second brightness size parameter is 32, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 32*32 pixel block; the second chroma size parameter is 16, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is a 16*16 pixel block.

[0167] In a specific embodiment, the bit width value of the video data is 8, the SIMD processor is a 256-bit SIMD processor, the second pixel block parameter is 32, and the pixel block obtained by cutting the video frame based on the second cutting pixel block parameter is a 32*32 pixel block;

[0168] Alternatively, the bit width value of the video data is 8, the SIMD processor is a 512-bit SIMD processor, the second pixel block parameter is 64, and the pixel blocks obtained by cutting the video frame based on the second cutting pixel block parameter are 64*64 pixel blocks.

[0169] In a specific embodiment, the bit width value of the video data is 16, the SIMD processor is a 256-bit SIMD processor, the second pixel block parameter is 16, and the pixel block obtained by cutting the video frame based on the second cutting pixel block parameter is a 16*16 pixel block;

[0170] Alternatively, the bit width value of the video data is 16, the SIMD processor is a 512-bit SIMD processor, the second pixel block parameter is 32, and the pixel blocks obtained by cutting the video frame based on the second cutting pixel block parameter are 32*32 pixel blocks.

[0171] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.

[0172] Figure 4 The embodiments of this specification provide corresponding to Figure 1 A schematic diagram of the structure of a video filtering device. Figure 4 As shown, the device 400 may include:

[0173] at least one processor 410; and,

[0174] A memory 430 is communicatively connected to the at least one processor 410; wherein,

[0175] The memory 430 stores instructions 420 executable by the at least one processor 410. The instructions 420 are executed by the at least one processor 410 to enable the at least one processor 410 to:

[0176] Get the video size information of the video data;

[0177] If the video size information of the video data is within the first size interval, setting the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the first cutting pixel block parameter;

[0178] If the video size information of the video data is in a second size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the second cutting pixel block parameter; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter;

[0179] The video data is filtered using a SIMD processor based on a motion compensated time domain filter with set pixel block size parameters; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

[0180] Based on the same idea, the embodiments of this specification also provide a computer-readable storage medium corresponding to the above method, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the above video filtering method are implemented.

[0181] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 4 As for the video filtering device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0182] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0183] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0184] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0185] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0186] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0187] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0188] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0189] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0190] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0191] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0192] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0193] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0194] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0195] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0196] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A video filtering method, include: Get the video size information of the video data; If the video size information of the video data is within the first size interval, setting the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the first cutting pixel block parameter; If the video size information of the video data is within the second size interval, setting the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the second cutting pixel block parameter; The maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter; filtering the video data using a SIMD processor based on a motion compensated temporal filter with set pixel block size parameters; wherein the second cut pixel block parameter is less than or equal to a preset parameter value; The preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width of the video data.

2. The method according to claim 1, wherein the motion compensation time domain filter based on the set pixel block size parameter uses a SIMD processor to filter the video data, specifically include: Based on a motion compensation time domain filter with set pixel block size parameters, the video frames in the video data are cut to obtain individual pixel blocks; Calculating the filter coefficients of each pixel block using the SIMD processor; The respective pixel blocks are filtered based on the filter coefficients of the respective pixel blocks.

3. The method according to claim 2, wherein the pixel block size parameter of the motion compensation time domain filter cutting the video frame is specifically include: a luminance size parameter, or a chrominance size parameter, or a luminance size parameter and a chrominance size parameter; The brightness size parameter is a size parameter required to be used when calculating the brightness filter coefficient of each pixel block, and the chrominance size parameter is a size parameter required to be used when calculating the chrominance filter coefficient of each pixel block.

4. The method according to claim 2, wherein the filter coefficient comprises a brightness filter coefficient; wherein the filter coefficients of each pixel block are calculated by the SIMD processor. include: Based on the respective pixel blocks, using the SIMD processor to calculate the noise and error of the motion compensated temporal filter; Based on the noise and error of the motion compensation time domain filter, the brightness filter coefficients of the respective pixel blocks are calculated.

5. The method of claim 3, wherein the chroma size parameter is determined based on a color encoding format of the video data.

6. The method according to claim 3, wherein the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data; The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, and the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter; When the first size interval is [512, 704], the first brightness size parameter is 16, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is a 16*16 pixel block; the first chroma size parameter is 8, and the pixel block obtained by cutting the video frame based on the first chroma size parameter is an 8*8 pixel block; The second brightness size parameter is 32, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 32*32 pixel block; the second chroma size parameter is 16, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is a 16*16 pixel block.

7. The method according to claim 3, wherein the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data; The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, and the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter; When the second size interval is [512, 704], the first brightness size parameter is 8, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is an 8*8 pixel block; the first chrominance size parameter is 4, and the pixel block obtained by cutting the video frame based on the first chrominance size parameter is a 4*4 pixel block; The second brightness size parameter is 16, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 16*16 pixel block; the second chroma size parameter is 8, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is an 8*8 pixel block.

8. The method according to claim 3, wherein the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data; The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, and the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter; When the maximum value of the first size interval is not greater than 512 and the minimum value of the second size interval is not less than 704, the first brightness size parameter is 8, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is an 8*8 pixel block; the first chrominance size parameter is 4, and the pixel block obtained by cutting the video frame based on the first chrominance size parameter is a 4*4 pixel block; The second brightness size parameter is 32, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 32*32 pixel block; the second chroma size parameter is 16, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is a 16*16 pixel block.

9. The method of claim 1, further comprising: include: If the video size information of the video data is within a third size interval, setting a pixel block size parameter of the motion compensation time domain filter cutting the video frame to a third cutting pixel block parameter; The maximum value of the first size interval is less than or equal to the minimum value of the third size interval, the maximum value of the third size interval is less than or equal to the minimum value of the second size interval, and the third cutting pixel parameter is greater than the first cutting pixel parameter and less than the second cutting pixel parameter.

10. The method according to claim 9, wherein the unit of the video size in the video size information of the video data is the number of vertical pixels of the video frame in the video data; The pixel block size parameter is specifically a brightness size parameter and a chromaticity size parameter, the first cut pixel block parameter specifically includes a first brightness size parameter and a first chromaticity size parameter, the second cut pixel block parameter specifically includes a second brightness size parameter and a second chromaticity size parameter, and the third cut pixel block parameter specifically includes a third brightness size parameter and a third chromaticity size parameter; When the maximum value of the first size interval is not greater than 512, the third size interval is [512, 704], and the minimum value of the second size interval is not less than 704, the first brightness size parameter is 8, and the pixel block obtained by cutting the video frame based on the first brightness size parameter is an 8*8 pixel block; the first chrominance size parameter is 4, and the pixel block obtained by cutting the video frame based on the first chrominance size parameter is a 4*4 pixel block; The third brightness size parameter is 16, and the pixel block obtained by cutting the video frame based on the third brightness size parameter is a 16*16 pixel block; the third chrominance size parameter is 8, and the pixel block obtained by cutting the video frame based on the third chrominance size parameter is an 8*8 pixel block; The second brightness size parameter is 32, and the pixel block obtained by cutting the video frame based on the second brightness size parameter is a 32*32 pixel block; the second chroma size parameter is 16, and the pixel block obtained by cutting the video frame based on the second chroma size parameter is a 16*16 pixel block.

11. The method according to claim 1, wherein the bit width of the video data is 8, the SIMD processor is a 256-bit SIMD processor, the second pixel block parameter is 32, and the pixel block obtained by cutting the video frame based on the second cutting pixel block parameter is a 32*32 pixel block; Alternatively, the bit width value of the video data is 8, the SIMD processor is a 512-bit SIMD processor, the second pixel block parameter is 64, and the pixel blocks obtained by cutting the video frame based on the second cutting pixel block parameter are 64*64 pixel blocks.

12. The method according to claim 1, wherein the bit width of the video data is 16, the SIMD processor is a 256-bit SIMD processor, the second pixel block parameter is 16, and the pixel block obtained by cutting the video frame based on the second cutting pixel block parameter is a 16*16 pixel block; Alternatively, the bit width value of the video data is 16, the SIMD processor is a 512-bit SIMD processor, the second pixel block parameter is 32, and the pixel blocks obtained by cutting the video frame based on the second cutting pixel block parameter are 32*32 pixel blocks.

13. A video filtering device, include: A video size acquisition module is used to obtain video size information of video data; A first parameter setting module, configured to set a pixel block size parameter of a motion compensated time domain filter cutting a video frame to a first cutting pixel block parameter if the video size information of the video data is within a first size interval; A second parameter setting module is used to set the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the second cutting pixel block parameter if the video size information of the video data is in a second size interval; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter; A video filtering module, configured to filter the video data using a SIMD processor based on a motion compensated time domain filter with a set pixel block size parameter; the second cut pixel block parameter is less than or equal to a preset parameter value; The preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width of the video data.

14. A video filtering device, include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Get the video size information of the video data; If the video size information of the video data is within the first size interval, setting the pixel block size parameter of the motion compensation time domain filter cutting the video frame to the first cutting pixel block parameter; If the video size information of the video data is in a second size interval, the pixel block size parameter of the motion compensation time domain filter cutting the video frame is set to the second cutting pixel block parameter; the maximum value of the first size interval is less than or equal to the minimum value of the second size interval, and the first cutting pixel block parameter is less than the second cutting pixel block parameter; The video data is filtered using a SIMD processor based on a motion compensated time domain filter with set pixel block size parameters; the second cut pixel block parameter is less than or equal to a preset parameter value; the preset parameter value is the quotient of the number of bits of the SIMD processor and the bit width value of the video data.

15. A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the video filtering method according to any one of claims 1 to 12.