Image filtering processing method, device, equipment, medium and program product

By calculating pixel difference features and correcting pixel values ​​in MCTF technology, the problem of insufficient motion estimation accuracy is solved, video coding efficiency and quality are improved, and error propagation caused by brightness drift is suppressed.

CN122179580APending Publication Date: 2026-06-09SHUXING TECH (BEIJING) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHUXING TECH (BEIJING) CO LTD
Filing Date
2026-04-24
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing MCTF technology fails to effectively reuse motion information from the precoding stage in video coding, resulting in insufficient motion estimation accuracy, which affects filtering performance and coding efficiency. Furthermore, the pyramid search strategy is prone to introducing search error accumulation.

Method used

By calculating the pixel difference features between the target image and the reference image, it is determined whether there is pixel value drift. If there is drift, the pixel values ​​of the reference filter block are corrected to obtain the corrected filter block. Then, filtering is performed to improve the motion compensation accuracy.

Benefits of technology

Without increasing the computational burden of motion estimation, it improves filtering performance and coding efficiency, suppresses the increase in residual energy and error propagation caused by brightness drift, and improves the quality of reconstructed video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179580A_ABST
    Figure CN122179580A_ABST
Patent Text Reader

Abstract

This specification provides an image filtering processing method, apparatus, device, medium, and program product. The image filtering processing method includes: calculating the pixel difference between corresponding pixels in a target image's filter block to be processed and a reference filter block, and statistically analyzing the pixel difference features; determining whether pixel value drift exists between the filter block to be processed and the reference filter block based on the pixel difference features; if pixel value drift exists, correcting the pixel values ​​of the reference filter block based on the pixel difference features to obtain a corrected filter block, wherein the pixel value correction includes uniformly adjusting the pixel values ​​of the reference filter block to a preset value, the preset value being determined based on the pixel difference features; filtering the corrected filter block and the filter block to be processed to obtain a filtered sub-block, and obtaining a filtered image based on the filtered sub-blocks of each filter block to be processed in the target image. This suppresses error propagation caused by overall brightness changes or color drift in MCTF.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of video encoding and decoding technology, and in particular to an image filtering processing method, apparatus, device, medium, and program product. Background Technology

[0002] In mainstream business scenarios such as video-on-demand and live streaming, to improve user experience, the system needs to significantly accelerate video encoding speed while ensuring image quality. Motion Compensated Temporal Filtering (MCTF), as a key technology for improving compression efficiency and video quality, is widely used in modern encoding workflows, and its performance directly affects overall encoding efficiency and latency.

[0003] However, in existing MCTF implementations, although rich motion information is obtained in the precoding stage, it cannot be effectively reused in subsequent filtering processes. At the same time, while the pyramid search strategy reduces the amount of computation, it is prone to introducing the accumulation of search errors, resulting in insufficient motion estimation accuracy and affecting the filtering effect and coding efficiency.

[0004] Therefore, there is an urgent need for an image filtering method that can improve the accuracy of motion estimation. Summary of the Invention

[0005] In view of this, embodiments of this specification provide an image filtering processing method. One or more embodiments of this specification also relate to an image filtering processing apparatus, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0006] According to a first aspect of the embodiments of this specification, an image filtering processing method is provided, comprising: Calculate the pixel difference between corresponding pixels in the target image's filter block and the reference filter block, and statistically analyze the pixel difference characteristics. Determine whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference characteristics; In the presence of pixel value drift, the reference filter block is corrected based on the pixel difference feature to obtain a corrected filter block. The pixel value correction includes adjusting the pixel values ​​of each pixel in the reference filter block to a preset value, which is determined based on the pixel difference feature. The modified filter block and the filter block to be processed are filtered to obtain a filtered sub-block, and the filtered image is obtained based on the filtered sub-blocks of each filter block to be processed in the target image.

[0007] According to a second aspect of the embodiments of this specification, an image filtering processing apparatus is provided, comprising: The statistics module is configured to calculate the pixel difference between corresponding pixels in the filter block to be processed and the reference filter block of the target image, and to statistically analyze the pixel difference features. The judgment module is configured to determine whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference characteristics. The correction module is configured to correct the pixel values ​​of the reference filter block based on the pixel difference feature when pixel value drift exists, thereby obtaining a corrected filter block. The pixel value correction includes uniformly adjusting the pixel values ​​of each pixel in the reference filter block to a preset value, which is determined based on the pixel difference feature. The filtering module is configured to perform filtering on the corrected filtering block and the filtering block to be processed to obtain a filtered sub-block, and obtain a filtered image based on the filtered sub-blocks of each filtering block to be processed in the target image.

[0008] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above-described image filtering processing method.

[0009] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described image filtering processing method.

[0010] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described image filtering processing method.

[0011] According to a sixth aspect of the embodiments of this specification, a method for storing a bitstream is provided, comprising storing the bitstream in a storage medium, the bitstream being generated by the image filtering processing method of the first aspect.

[0012] According to a seventh aspect of the embodiments of this specification, a method for transmitting a bit stream is provided, including transmitting the bit stream, the bit stream being generated by the image filtering processing method of the first aspect.

[0013] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a bit stream thereon, the bit stream being generated by the image filtering processing method of the first aspect.

[0014] One embodiment of this specification calculates the pixel difference between corresponding pixels in the filter block to be processed and the reference filter block of the target image, and statistically analyzes the pixel difference features; determines whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference features; if pixel value drift exists, performs pixel value correction on the reference filter block based on the pixel difference features to obtain a corrected filter block, wherein the pixel value correction includes uniformly adjusting the pixel values ​​of the reference filter block by a preset value, the preset value being determined based on the pixel difference features; performs filtering processing on the corrected filter block and the filter block to be processed to obtain a filtered sub-block, and obtains a filtered image based on the filtered sub-blocks of each filter block to be processed in the target image.

[0015] By statistically analyzing pixel difference features, the global brightness shift between the reference filter block and the filter block to be processed is detected and corrected. This decouples the interference of brightness changes on motion compensation accuracy without changing the motion search strategy. Therefore, within the MCTF framework, even with zero-vector initialization or low-complexity motion search, high compensation accuracy can be maintained, effectively suppressing the increase in residual energy and error propagation caused by brightness drift. Ultimately, without increasing the computational burden of motion estimation, filtering performance, coding efficiency, and the quality of subsequent reconstructed video are improved. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of an example of an MCTF filter; Figure 2 This is a typical diagram of a pyramid search structure; Figure 3 This is a flowchart of an image filtering processing method provided in one embodiment of this specification; Figure 4 This is a flowchart illustrating the processing procedure of an image filtering method provided in one embodiment of this specification. Figure 5 This is a schematic diagram of the structure of an image filtering processing device provided in one embodiment of this specification; Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0017] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0018] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0019] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0020] Furthermore, 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 analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0021] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0022] GOP stands for Group of Pictures, which is a set of images. A GOP consists of a series of consecutive video frames, where the first frame is a keyframe (an intra-predictive frame, I-frame, or a forward predictive frame, P-frame), and subsequent frames are bidirectional predictive frames (B-frames).

[0023] Lookahead: Pre-coding, an initial step in the coding pipeline, involves analyzing the input video sequence before formal encoding to understand its motion characteristics and complexity. This provides guidance for subsequent coding decisions, such as bitrate control and motion estimation.

[0024] MCTF stands for Motion Compensated Temporal Filtering. It is a standardized temporal filtering method based on motion compensation that enhances the compression performance and improves the quality of video sequences by estimating and compensating for motion between frames.

[0025] MV stands for Motion Vector. In video coding, motion vectors represent the movement of coded blocks from one frame to another. Vector values ​​typically include information in both the horizontal and vertical directions, representing the displacement of the block along the time axis within a frame.

[0026] In short video scenarios, videos uploaded by creators need to be transcoded by the server before being distributed to users. To enable users to watch creators' videos as quickly as possible, the platform aims to encode the video as fast as possible while maintaining compression efficiency. In live streaming scenarios, to reduce buffering and ensure smoother streaming, the encoder needs to encode the captured video at the fastest possible speed. Therefore, the platform needs to improve the encoding speed of the video encoder. Existing encoding standards (such as H.266) obtain rich motion information in their pre-encoding stage, but this information is not fully utilized in subsequent processing modules such as MCTF, leading to a waste of computational resources during large-scale searches. Furthermore, in the implementation of MCTF, due to the multi-level complexity of the pyramid search process and the uncertainty of inter-frame motion, low-precision searches, while reducing computational load, are also prone to accumulating search errors, thus affecting the encoding efficiency and quality of the video.

[0027] Motion-compensated temporal filtering (MCTF) is a technique used in video coding systems to enhance the temporal signal processing of a video sequence by utilizing motion information between frames. Its main purpose is to reduce temporal redundancy in video, improve video compression efficiency, and simultaneously maintain or even enhance video quality.

[0028] See Figure 1 As shown, Figure 1 This is a schematic diagram of an example of an MCTF filter. Figure 1 The complete processing flow from precoding information input to encoding result output is presented: Precoding information first generates filtered reference frames, which are then downsampled sequentially by 2x and 4x reference frames, with each level performing coded block division and integer pixel motion estimation; subsequently, motion search is refined step-by-step at 1 / 2, 1 / 4, and 1 / 8 pixel precision; all of the above processes are input to the temporal filter block, which calculates the filter strength based on four inputs: reference block acquisition, block prediction cost, reference frame distance, and reference frame weights, and then outputs the final encoding result through weighted fusion. More specifically, MCTF mainly achieves motion compensation and temporal filtering through the following steps: Motion estimation: The motion trajectory of each pixel or block between adjacent frames is determined using a fixed-size block matching algorithm and search modes such as Full Search, Three-Step Search, and Pyramid Search, and recorded as motion vectors in the MCTF. In common encoders, to balance search accuracy and computational complexity, a pyramid structure built with different downsampling rates is typically used for the search, expanding the search from high downsampling rates to high accuracy.

[0029] See Figure 2 As shown, Figure 2 This is a schematic diagram of a typical pyramid search structure. Figure 2 The structure is divided into three layers: the bottom layer L0, the middle layer L1, and the top layer L2. These three layers are arranged in a bottom-up, progressively upsampled (or downsampled) relationship, forming a pyramid structure with decreasing spatial resolution. L0 is the highest resolution layer, L1 is the intermediate resolution layer obtained by downsampling, and L2 is the lowest resolution layer. This structure is used for a coarse-fine search strategy in motion estimation: a fast coarse search is first performed in L2 to obtain the initial motion vector, and then the search is progressively passed to L1 and L0 for refinement, thereby significantly reducing computational complexity while ensuring search accuracy.

[0030] Motion compensation: Adjusts the pixel values ​​of the current frame based on motion information, using motion vectors to locate and compensate for pixel positions within the frame, aligning homogeneous blocks in the current frame and the reference frame. Temporal filtering: Weights are calculated for homogeneous blocks in different frames using a series of similarity metrics. Bidirectional or unidirectional filtering is then used to filter motion-compensated frames to remove short-term fluctuations and noise, thereby improving the visual quality of the video.

[0031] MCTF effectively removes redundant information in the temporal domain, improves the reference efficiency of temporal information during encoding, significantly enhances video compression efficiency, and achieves higher-quality video transmission within a given bandwidth. By compensating for and filtering noise introduced by motion, MCTF technology ensures smooth video transitions and reduces blockiness and glitches. It can adapt to video content at various resolutions and frame rates and is widely used in live video applications.

[0032] During MCTF (Match-Based Forwarding), the general metric for comparing the reference filter block and the current filter block is SSE (Sum of Squared Errors). SSE is highly sensitive to changes in pixel values, but also to changes in high-frequency noise. Since the goal of MCTF is to find the structurally most similar region, SSE can be somewhat misleading.

[0033] To address the aforementioned problems, this specification provides an image filtering processing method. This specification also relates to an image filtering processing apparatus, a computing device, a computer-readable storage medium, and a program product, which will be described in detail in the following embodiments.

[0034] See Figure 3 , Figure 3 This is a flowchart of an image filtering processing method provided in one embodiment of this specification, specifically including the following steps 302-308.

[0035] Step 302: Calculate the pixel difference between corresponding pixels in the filter block to be processed and the reference filter block of the target image, and statistically analyze the pixel difference features.

[0036] The filter block to be processed refers to the image block in the current frame that needs to be processed by temporal filtering, such as the coding unit participating in filtering at the current level in MCTF.

[0037] A reference filter block refers to the corresponding image block in a reference frame used for motion compensation matching with the filter block to be processed. It is usually determined by motion estimation, such as the predicted block pointed to by the motion vector in the forward or backward reference frame.

[0038] Pixel difference refers to the difference in pixel values ​​at the same coordinates between the filter block to be processed and the reference filter block after they are aligned in space, reflecting local brightness or color differences.

[0039] Pixel difference features refer to the statistical measures extracted from all pixel differences, used to characterize the overall distribution characteristics of the differences, such as the minimum absolute value of the differences, the distribution ratio of the difference signs, the degree to which the differences deviate from the minimum value, and their higher-order statistics.

[0040] In practical applications, the system acquires the filter block to be processed and its corresponding reference filter block from the target image. Both blocks have the same size and are spatially aligned based on motion vectors. Subsequently, the system iterates through all corresponding pixel positions in the two filter blocks, calculating the pixel difference point by point, and constructing a statistical feature set based on all differences. This statistical process includes, but is not limited to: determining the minimum absolute value of all pixel differences, analyzing the proportional distribution of positive and negative differences, and calculating the cumulative deviation of the differences relative to the minimum absolute value. These statistics collectively constitute the pixel difference features, used to characterize whether there is a consistent brightness or chromaticity shift trend between the two filter blocks.

[0041] For example, in a video coding system supporting MCTF, an 8×8 filter block to be processed in the current frame is spatially aligned with the corresponding 8×8 reference filter block obtained through motion estimation in the reference frame. The system sequentially accesses 64 pixel pairs in the two blocks and calculates the pixel difference d(i,j) = curr(i,j) - ref(i,j) at each position, where curr(i,j) is the pixel value of the filter block to be processed and ref(i,j) is the pixel value of the reference block. Subsequently, the system finds the minimum value min_abs_d among all |d(i,j)| and counts the proportion of pixels with d(i,j) > 0 to the total number of pixels as the positive difference ratio. At the same time, the system accumulates all (|d(i,j)| - min_abs_d) to obtain the first-order deviation, and accumulates its square to obtain the second-order deviation. The above minimum absolute value, sign ratio, and deviation together constitute the pixel difference feature, which is used by subsequent modules to determine whether there is an overall brightness drift.

[0042] In the temporal filtering process of video encoding or image processing, global pixel value shifts often occur between the filter block to be processed and the reference filter block due to factors such as changes in illumination, differences in sensor response, or compression distortion. To accurately identify such shifts and distinguish them from local texture differences, it is necessary to perform statistical analysis on the differences between the corresponding pixels of the two blocks and extract representative difference features. Further, the statistical analysis of pixel difference features includes: obtaining the lower limit of the magnitude of the pixel difference, where the lower limit of the magnitude represents the overall pixel value shift; calculating the ratio of the number of positive values ​​to the number of negative values ​​in the pixel difference, where the ratio represents the consistency trend of pixel value changes; and determining the difference features based on the consistency trend of the overall pixel value shift and pixel value changes.

[0043] The lower limit of the modulus value refers to the minimum value among all absolute values ​​of pixel differences (i.e., min(|d|)), which is used to characterize the offset magnitude corresponding to the pixel pair that is closest to the "pure offset" state between two filter blocks, and can be used as a benchmark estimate of the overall brightness or chromaticity drift.

[0044] The ratio refers to the ratio (or proportion) of positive to negative values ​​in pixel differences, used to measure whether the direction of pixel change is consistent: if the vast majority of differences have the same sign, it indicates a significant global offset trend; if the positive and negative differences are evenly distributed, it is more likely to be a local detail difference or noise.

[0045] The difference feature is a comprehensive statistical quantity composed of the lower limit of the modulus and the proportional relationship. It is used to jointly characterize the intensity and directional consistency of pixel value drift and is a key input for determining whether pixel value correction is needed.

[0046] In practice, the system first calculates the difference *d* between the filter block to be processed and the reference filter block pixel by pixel. Then, it iterates through all differences, recording the minimum absolute value as the lower bound of the modulus; simultaneously, it counts the number of pixels with *d* > 0 and *d* < 0, calculating their proportional relationship (e.g., the proportion of positive differences). Furthermore, to further quantify the degree of deviation from the ideal offset, higher-order statistics, such as cumulative |d|, can be calculated based on the lower bound of the modulus. min(|d|) yields DCDiff(DCDifference, DCD), and the sum of its squares yields SDCD(SquaredDCDifference), which are used to assess residual volatility or non-uniformity. These statistics together constitute a complete set of difference characteristics.

[0047] For the step "Statistical Pixel Difference Features", one option is to use only the lower limit of the modulus and the ratio of positive / negative differences as the core features; another option is to further introduce DCD and SDCD as auxiliary criteria to enhance robustness to non-ideal offsets (such as those with noise or local perturbations), which is not limited here.

[0048] In the embodiments of this specification, by constructing difference features by combining the lower limit of the modulus and the proportional relationship, it is possible to effectively distinguish between true global drift and local differences caused by random noise or edge details, thereby improving the accuracy of subsequent drift detection.

[0049] For example, in a 16×16 filter block processing flow, the system calculates 256 pixel differences. Here, min(|d|) = 4, indicating that at least one pair of pixels differs by only 4 units, which can be considered a potential overall offset benchmark; the number of positive differences is 230, and the number of negative differences is 26, with positive differences accounting for 89.8%. Based on this, the system determines that there is a strong consistent positive offset trend, and the lower limit of the modulus, 4, is used as the estimated value of the overall offset. Simultaneously, the system calculates DCD and SDCD to evaluate the uniformity of the offset. The aforementioned lower limit of the modulus, proportional relationships, and derived statistics together constitute the difference characteristics, which are used by subsequent modules to decide whether to perform pixel value correction.

[0050] Before performing pixel-level difference calculation, to improve the robustness and search efficiency of motion estimation, the system can use an image pyramid structure to perform multi-level downsampling processing on the target image. Furthermore, before calculating the pixel difference between corresponding pixels in the target image's filter block and reference filter block, the system further includes: performing multi-level downsampling processing on the target image to generate multiple image layers with progressively decreasing resolution; setting the motion information corresponding to each filter unit in the first resolution layer as a zero vector, where the resolution of the first resolution layer is lower than that of other image layers; and determining the reference filter block based on the zero vector.

[0051] Multi-level downsampling processing refers to sequentially performing low-pass filtering and downsampling (such as 2:1 horizontal / vertical downsampling) on ​​the original target image to generate a series of image levels with progressively decreasing resolution, forming a Gaussian pyramid. Typically, the level numbers increase from the bottom (lowest resolution) upwards, with the first resolution level (i.e., the bottom of the pyramid) having the smallest image size and the least detail information.

[0052] Motion information refers to the motion vectors used to describe the displacement of filtering units (such as macroblocks, CUs, or filter blocks) in the time domain. At the bottom of the pyramid, due to the high blurriness and lack of high-frequency details in the image, it is difficult to directly estimate reliable motion vectors. Therefore, the motion information of all filtering units is initialized to zero vectors (i.e., (0, 0)).

[0053] Determining the reference filter block based on the zero vector means that in the first resolution level, the corresponding position of the filter block to be processed in the reference frame is not compensated for displacement; instead, a region with the same spatial coordinates is directly used as the reference filter block. This initial reference block then serves as the starting point for motion search in subsequent upsampling levels.

[0054] In the actual process, the system first performs N levels of downsampling (e.g., 3 levels) on the target image, generating N+1 levels: L0 (original), L1, L2, ..., LN, where LN is the first resolution level (lowest resolution). At the LN level, the motion vectors of all filtering units are forced to zero, and their reference filtering blocks are taken from the same coordinate region of the reference frame at the LN level. Subsequently, at the next higher level (LN... In step 1), a local search is performed centered on the zero vector to obtain a more accurate motion vector, and the position of the reference filter block is updated accordingly. This process is repeated level by level until the original resolution level is reached. Finally, after obtaining high-precision motion information at the original resolution, the pixel difference is calculated.

[0055] In the embodiments described in this specification, by setting a zero vector at the bottom of the pyramid and using it to determine the initial reference filter block, a stable and unbiased starting point is provided for the entire multi-level motion search, effectively supporting subsequent coarse-to-fine motion compensation and pixel difference analysis.

[0056] For example, the target image is downsampled three times to form four levels: L0 (original resolution), L1 (1 / 2), L2 (1 / 4), and L3 (1 / 8). L3 is the first resolution level. In L3, a filter block to be processed is located at coordinates (16, 12). The system directly extracts the reference filter block from the same coordinates (16, 12) in the L3 level of the reference frame without applying any displacement. This operation is based on a preset zero vector. Subsequently, in the L2 level, the system searches for the most suitable matching block in the neighborhood, starting at (16×2, 12×2) = (32, 24), and updates the motion vector. This process is pushed up level by level, finally obtaining the precise reference filter block position in the L0 level for subsequent pixel difference calculation.

[0057] In the multi-level motion search framework based on image pyramids, to efficiently and robustly determine the reference filter block at high-resolution levels, the system adopts a coarse-to-fine step-by-step propagation strategy. This strategy starts from the lowest resolution level (i.e., the first resolution level), uses its initialized motion information as a starting point, and propagates and refines the motion vectors layer by layer to higher resolution levels. Finally, it obtains accurate motion estimation results at the original resolution level and locates the reference filter block accordingly. To further address this, determining a reference filtering block based on the reference block pointed to by the zero vector includes: taking the first resolution level as the current resolution level; searching for adjacent second resolution levels based on the current resolution level, wherein the resolution of the second resolution level is higher than that of the current resolution level; if a second resolution level exists, transferring the second motion information already determined at the current resolution level to the second resolution level, wherein the second motion information is a zero vector when the current resolution level is the first resolution level; determining the initial position of motion search at the second resolution level based on the second motion information, and determining the third motion information corresponding to the second resolution level based on the initial position; returning to execute the step of searching for adjacent second resolution levels based on the current resolution level until the resolution of the current resolution level is higher than that of other levels in the image level, obtaining the fourth motion information corresponding to the current resolution level; and determining the reference block pointed to by the fourth motion information as the reference filtering block.

[0058] Here, "current resolution level" refers to the pyramid level being processed during the iteration process; "second resolution level" refers to the adjacent level with higher resolution immediately above the current level; "second motion information" refers to the motion vector determined at the current level, which is set as a zero vector in the initial stage (i.e., when the current level is the first resolution level); "third motion information" refers to the updated motion vector obtained through local search at the second resolution level; and "fourth motion information" refers to the final motion vector obtained when the iteration reaches the highest resolution level (usually the original image level), which is used to directly locate the reference filter block.

[0059] Specifically, the system first sets the first resolution level as the current resolution level. Since this level lacks reliable texture details, its motion information is initialized to a zero vector. Then, the system searches for a higher-resolution adjacent level (i.e., the second resolution level). If it exists, the motion information of the current level (initially a zero vector) is upsampled and passed to the second resolution level as the initial position for motion search at that level (e.g., mapping (0,0) to (0,0) at a higher resolution or the corresponding position after coordinate scaling). Near this initial position, the system performs a local motion search (such as a full search, diamond search, or gradient-based optimization) to obtain more accurate third motion information. Next, the system sets the second resolution level as the new current resolution level and repeats the above process: searching the previous level, passing motion information, and performing a local search until the current level is the highest resolution level of the pyramid (i.e., there are no higher-resolution adjacent levels). At this point, the obtained fourth motion information is the final high-precision motion vector, and the reference frame region it points to is determined as the reference filter block.

[0060] For the step "transferring the determined second motion information at the current resolution level to the second resolution level", one possible approach is to simply multiply the coordinates of the motion vector (e.g., ×2) to adapt to the resolution change; another possible approach is to combine interpolation or motion field smoothing strategies for the transfer, which is not limited here.

[0061] In the embodiments described in this specification, by starting from the zero vector and progressively passing and refining motion information, the computational complexity and risk of getting trapped in local minima caused by directly searching a large range of motion at a high-resolution level are effectively avoided, significantly improving the accuracy and stability of the reference filter block localization.

[0062] For example, the image pyramid contains four levels: L3 (1 / 8), L2 (1 / 4), L1 (1 / 2), and L0 (original). Initially, the current level is L3, and the second motion information is the zero vector (0, 0). The system finds L2 to be the second resolution level, passes (0, 0) to L2 as the initial search center, and searches within the neighborhood of L2 to obtain the third motion information, such as (2, ...). 1). Subsequently, the current level is updated to L2, and the search continues in L1, where (2, 1) Passed to L1 (may be scaled to (4, 2), and search for new motion vectors near that location; then pass them to L0 to complete the final local search, finally obtaining the fourth motion information, such as (5, 3) The system locates the corresponding reference block in the reference frame L0 based on the vector and determines it as the reference filter block of the filter block to be processed.

[0063] Step 304: Determine whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference characteristics.

[0064] Pixel drift refers to an approximately constant offset of pixel values ​​between two image blocks. It is characterized by all or most corresponding pixel differences having the same sign and similar absolute values. It is usually caused by global brightness changes, white balance adjustments, overall color drift, or quantization errors.

[0065] The judgment threshold is a preset parameter used to determine whether pixel value drift is significant. It can be set according to the minimum absolute value, sign ratio, or deviation amount in the difference feature. For example, when the positive difference ratio exceeds 80% and the minimum absolute value is lower than a certain limit, drift judgment is triggered.

[0066] In practical applications, the system receives pixel difference features output by the preceding module, including but not limited to statistical quantities such as the distribution ratio of difference signs, the minimum absolute difference, and the degree of difference deviation. Based on these features, the system executes drift judgment logic: first, it evaluates the consistency of the difference signs; if the vast majority of differences have the same sign (e.g., positive or negative), it indicates a possible overall shift; second, it combines the magnitude of the minimum absolute difference to determine whether the shift is global rather than a local texture difference; finally, it considers the magnitude of the deviation to eliminate noise interference. When the above conditions simultaneously meet the preset criteria, the system determines that pixel value drift exists; otherwise, it considers there to be no significant drift.

[0067] For example, in the MCTF module of a video encoder, the system receives pixel difference features between a 16×16 filter block to be processed and a reference filter block: the positive difference ratio is 85%, the minimum absolute difference is 2, and the first-order deviation is 18. The system's preset judgment criteria are: the positive (or negative) difference ratio ≥ 80% and the minimum absolute difference ≤ 5. Since the current features meet all the conditions, the system determines that the filter block pair has pixel value drift and needs to enter the subsequent correction process. If another set of features shows a positive difference ratio of 60% and a minimum absolute difference of 10, the criteria are not met, the system determines that there is no significant drift, skips the correction, and directly performs filtering processing. The entire judgment process relies only on statistical features, without the need for additional motion search or complex modeling, has low computational overhead, and is suitable for real-time encoding scenarios.

[0068] After registering the filter block to be processed and the reference filter block, to determine whether there is a global pixel value drift between them (such as caused by changes in illumination, differences in sensor gain, or coding drift), the system introduces a drift detection mechanism based on pixel difference features. Further, the pixel difference features include a lower limit of the modulus. Determining whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference features includes: for the first pixel in the filter block to be processed, calculating the target difference between the first pixel and its corresponding second pixel in the reference filter block; calculating the difference margin corresponding to the first pixel based on the target difference and the lower limit of the modulus, where the first pixel is any pixel in the filter block to be processed; determining the difference consistency index based on the difference margins corresponding to each pixel in the reference filter block; comparing the difference consistency index with a preset threshold range, and determining whether there is pixel value drift between the filter block to be processed and the reference filter block based on the comparison result.

[0069] The lower limit of the modulus refers to the minimum absolute value of the difference between all corresponding pixels in the filter block to be processed and the reference filter block. It is used to characterize the offset of the pixel pair that is closest to the pure offset state between the two blocks and can be used as a benchmark estimate of potential global drift.

[0070] The target difference refers to the numerical difference between any pixel in the filter block to be processed and the pixel at its spatial position in the reference filter block, reflecting the degree of local change at that position.

[0071] The difference margin is the difference between the absolute value of the target difference and the lower limit of the modulus. It is used to measure the degree to which a single pixel deviates from the ideal global offset. The smaller the margin, the more the pixel conforms to the uniform drift assumption.

[0072] The difference consistency index is a scalar such as DCD and SDCD obtained by statistically aggregating the difference margins of all pixels. It is used to quantify the concentration of the overall margin distribution, thereby determining whether there is consistent pixel value drift.

[0073] In practical applications, the system first iterates through each pixel in the filter block to be processed, taking it as the first pixel, and obtains the second pixel with the same spatial coordinates in the reference filter block, calculating the target difference between the two. Then, the system calculates the absolute value of all target differences and determines a lower limit for the modulus. Based on this lower limit, the system calculates the difference margin for each pixel, which is the absolute value of the target difference minus the lower limit. After calculating the difference margin for all pixels, the system performs statistical processing on these margins to generate a difference consistency index, such as the mean, standard deviation, sum of squares, or weighted average of the margins. Finally, the system compares this difference consistency index with a preset threshold range. If the index falls within this range, it is determined that there is pixel value drift between the filter block to be processed and the reference filter block; otherwise, it is determined that there is no drift.

[0074] For the step "Determine the difference consistency index based on the difference margin corresponding to each pixel in the reference filter block", one possible approach is to calculate the arithmetic mean of all difference margins as the consistency index; another possible approach is to calculate the standard deviation or variance of the difference margin, which is not limited here.

[0075] In the embodiments of this specification, by introducing a lower limit of the modulus as a drift benchmark and combining it with the consistency analysis of the difference margin, it is possible to effectively distinguish between global pixel offset and local texture difference, avoid misjudging high-frequency details as drift, and thus improve the reliability of drift detection.

[0076] For example, in a video decoding post-processing task, the system needs to determine whether there is pixel value drift between the current 16×16 filter block to be processed and the motion-compensated reference filter block. The system first calculates the target difference of 256 sets of corresponding pixels, obtaining the following... 5, +3 4. Values ​​such as +6. Then, take the minimum absolute value of these differences, assuming it's 3, as the lower limit of the modulus. Next, calculate the difference margin for each target difference; for example, when the target difference is +6, the difference margin is |6|. 3=3; the target difference is At time 3, the margin is 0. The system processes all 256 difference margins, for example, calculating their mean to be 2.1. This mean is set as the difference consistency index and compared with a preset threshold range [0, 5]. Since 2.1 falls within this range, the system determines that there is pixel value drift and passes this result to the subsequent compensation module. The entire process is completed based solely on the current filter block pair, without introducing external information or additional assumptions.

[0077] Step 306: In the case of pixel value drift, the pixel value of the reference filter block is corrected based on the pixel difference feature to obtain the corrected filter block. The pixel value correction includes adjusting the pixel values ​​of each pixel in the reference filter block to a preset value, which is determined based on the pixel difference feature.

[0078] A corrected filter block refers to a reference filter block whose pixel values ​​have been uniformly adjusted. All pixels in the reference filter block have been added to or subtracted from the same preset value to match the overall brightness level of the filter block to be processed.

[0079] The preset value refers to the offset used to uniformly adjust the pixel values ​​of the reference filter block. Its magnitude and direction are determined by the characteristics of the pixel difference, such as taking the median of all pixel differences, the signed mean corresponding to the smallest absolute difference, or the weighted average.

[0080] In practical applications, after determining that pixel value drift exists, the system extracts a suitable index as a preset value from the statistically analyzed pixel difference features. A typical approach is to use the consistency of the difference sign and the location information of the minimum absolute difference to determine a scalar representing the overall offset trend. Subsequently, the system adds this preset value to each pixel of the reference filter block, generating a corrected filter block. This process maintains the internal structure of the image block unchanged, performing only a global translation to ensure that the corrected reference block is closer to the block to be processed in terms of luminance or chrominance, while avoiding the introduction of new distortions. The correction operation applies to either the luminance component (Y) or the chrominance component (Cb / Cr) and can be processed independently.

[0081] For example, in an MCTF encoding system supporting adaptive brightness compensation, an 8×8 filter block to be processed and a reference filter block are determined to have pixel value drift. The pixel difference characteristics show that 90% of the differences are positive, the minimum absolute difference is 3, and this minimum value appears at multiple adjacent pixel positions. Based on this, the system sets a preset value of +3, meaning the reference block is considered to be 3 units darker than the filter block overall. Subsequently, the system iterates through all 64 pixels of the reference filter block, increasing the value of each pixel by 3 to obtain the corrected filter block. For example, a pixel value of 120 in the original reference block becomes 123 after correction; another pixel value of 85 becomes 88 after correction. The entire correction process involves only one iteration and addition operation, making it computationally efficient. Furthermore, the corrected block is aligned with the filter block in overall brightness, providing a more suitable input for subsequent weighted filtering.

[0082] Furthermore, the pixel difference features include a lower limit of the magnitude and a proportional relationship; the pixel values ​​of the reference filter block are corrected based on the pixel difference features to obtain a corrected filter block, including: determining the correction direction parameter according to the proportional relationship; determining the correction amount parameter based on the lower limit of the magnitude; and uniformly performing a correction operation on each pixel value in the reference filter block according to the correction direction parameter and the correction amount parameter to generate the corrected filter block.

[0083] The proportional relationship refers to the overall sign tendency or statistical directionality of the pixel difference between the filter block to be processed and the reference filter block. It is usually reflected by the sign distribution of the difference or the weighted average sign, and is used to determine the direction of the correction operation (i.e., increasing or decreasing the pixel value).

[0084] The correction direction parameter is derived from the proportional relationship and indicates whether the reference filter block should be brightened or darkened as a whole. Its sign is opposite to the dominant sign of the pixel difference to achieve inverse compensation.

[0085] The correction parameter is directly determined by the lower limit of the modulus, which represents the adjustment magnitude uniformly applied to all pixels of the reference filter block, ensuring that the correction intensity is consistent with the minimum detected offset.

[0086] In practical applications, the system first analyzes the pixel differences between the filter block to be processed and the reference filter block, calculates the target differences for all corresponding pixels, and statistically analyzes their sign distribution or weighted sign mean to determine the proportional relationship. Based on this proportional relationship, the system sets a correction direction parameter: if the overall difference is negative (i.e., the filter block to be processed is generally smaller than the reference block), the correction direction is positive, indicating that a positive value needs to be subtracted from the reference block; conversely, the opposite is also true. Subsequently, the system calculates the minimum absolute value of all target differences as the lower limit of the modulus and uses it directly as the correction amount parameter. Finally, the system performs a uniform addition or subtraction operation on each pixel in the reference filter block according to the sign of the correction direction parameter and the magnitude of the correction amount parameter to generate the corrected filter block. For example, if the proportional relationship indicates that the dominant sign of the difference is negative, the correction direction parameter is positive, and the system subtracts the lower limit of the modulus from all pixel values ​​in the reference filter block; if the dominant sign is positive, the lower limit of the modulus is added.

[0087] For the step "Determine the correction direction parameter based on the proportional relationship", one possible approach is to calculate the mean of the signs of all target differences. If it is less than 0, the correction direction is addition; otherwise, it is subtraction. Another possible approach is to count the proportion of positive and negative differences and determine the direction based on the majority sign. This approach is not limited here.

[0088] In the embodiments described in this specification, by combining the proportional relationship and the lower limit of the modulus to determine the correction direction and correction amount respectively, the global consistency adjustment of the reference filter block is realized, effectively aligning the reference brightness levels of the two filter blocks and providing a more accurate reference for subsequent fine filtering.

[0089] For example, in a certain inter-frame filtering task, the system has determined that there is pixel value drift between the filter block to be processed and the reference filter block. Calculations show that most of the target differences among the 256 corresponding pixels are negative (e.g., ...). 4. 3. 5, etc.), whose sign mean is A value of 0.8 indicates that the block to be processed is darker than the reference block overall, with a negative proportional relationship. Based on this, the system sets the correction direction parameter to "addition" (i.e., subtracting a positive value from the reference block to reduce its brightness). Simultaneously, the system calculates the minimum absolute value of all differences to be 3, i.e., the lower limit of the modulus is 3, which is used as the correction amount parameter. Subsequently, the system uniformly subtracts 3 from each pixel value in the reference filter block to generate the corrected filter block. For example, if the original reference pixel values ​​are 120, 130, and 125, after correction they become 117, 127, and 122. This correction operation ensures that the reference filter block and the filter block to be processed are aligned in overall intensity without altering their internal texture structure. The entire correction process relies solely on pixel difference features, requiring no additional parameters or external information.

[0090] If the lower limit of the modulus is directly used as the correction amount to adjust the reference filter block, over-compensation or under-compensation problems may be introduced due to excessive or insufficient compensation intensity. Especially in the motion estimation and motion compensation stages, parameter consistency needs to be maintained to avoid reconstruction distortion. To address this, the correction amount parameters are further determined based on the lower limit of the modulus, including: obtaining the amplitude adjustment coefficient; and generating the correction amount parameters based on the lower limit of the modulus and the amplitude adjustment coefficient.

[0091] The amplitude adjustment coefficient is a preset or adaptively determined scaling factor, which can be denoted as k. It is used to adjust the correction intensity. Its value is usually between 0 and 1, and can also be dynamically adjusted according to the scene, but it needs to be consistent in both the motion estimation and motion compensation stages.

[0092] The correction parameter is obtained by multiplying the lower limit of the modulus by the amplitude adjustment coefficient, i.e., Δ=k·dmin, which represents the final uniform adjustment applied to the reference filter block, taking into account both the accuracy of drift estimation and the stability of compensation.

[0093] In practical applications, the system first obtains the amplitude adjustment coefficient, which can be preset by the encoding configuration or adaptively generated based on the current image content complexity, noise level, or historical drift statistics. Subsequently, the system generates a correction parameter Δ through multiplication based on the calculated lower limit of the modulus min(|d|) and the amplitude adjustment coefficient k. This correction parameter will be used for subsequent unified correction operations on the reference filter block. Throughout the entire processing flow, whether used for drift analysis in the motion estimation stage or for pixel value adjustment in the motion compensation stage, the amplitude adjustment coefficient used must be strictly consistent to ensure that the processing logic for the same filter block is aligned in both stages, avoiding compensation deviations or loop mismatches caused by parameter inconsistencies.

[0094] For the step "Obtain amplitude adjustment coefficient", one option is to read a fixed value from the encoder configuration file as the amplitude adjustment coefficient; another option is to dynamically calculate the amplitude adjustment coefficient based on the quantization parameter (QP) or local variance of the current frame, which is not limited here.

[0095] In the embodiments of this specification, by introducing an amplitude adjustment coefficient to scale the lower limit of the modulus, controllable adjustment of the correction intensity is achieved. At the same time, the same scaling factor is forced to be used in the motion estimation and motion compensation stages, ensuring the parameter consistency of the processing link and effectively suppressing visual artifacts caused by excessive compensation or stage mismatch.

[0096] For example, in a video decoding post-processing task, the system has completed the difference analysis between the filter block to be processed and the reference filter block, calculating the lower limit of the modulus min(|d|) = 5. Based on the current encoding configuration, the amplitude adjustment coefficient k is set to 0.8, and this value has already been used for drift judgment during the motion estimation stage. In the motion compensation stage, the system again uses the same k = 0.8 to calculate the correction parameter Δ = 0.8 × 5 = 4. Subsequently, according to the previously determined correction direction (e.g., "subtraction"), the system uniformly subtracts 4 from each pixel value in the reference filter block to generate a corrected filter block. For example, the original reference pixel values ​​are 100, 105, and 110, which become 96, 101, and 106 after correction. Throughout the process, the amplitude adjustment coefficient remains completely consistent in both stages, ensuring the continuity and stability of drift compensation. Even though k can dynamically change between different filter blocks, its value cannot be changed within the processing cycle of the same block, maintaining the closed and predictable nature of the processing logic.

[0097] Step 308: Perform filtering on the corrected filter block and the filter block to be processed to obtain a filtered sub-block, and obtain a filtered image based on the filtered sub-blocks of each filter block to be processed in the target image.

[0098] The filtering sub-block refers to the output image block generated after the filtering block to be processed and its corresponding modified filtering block are fused. Its content integrates information from the current frame and the reference frame.

[0099] A filtered image refers to a complete image composed of or combined filtering sub-blocks corresponding to all filtering blocks in the target image, representing the result frame after temporal filtering.

[0100] In practical applications, the system inputs each filter block to be processed and its corresponding modified filter block into the filter fusion module. This module processes the two blocks pixel-by-pixel according to a preset filtering strategy (such as weighted averaging, bilateral filtering, adaptive weight fusion, etc.), generating a filtered sub-block. The fusion weights can be dynamically adjusted based on motion confidence, local variance, coding mode, or pixel difference features to achieve a balance between preserving details and suppressing noise. All filtered sub-blocks are arranged and combined according to their original spatial positions in the target image, covering the entire image region, and finally synthesized into a complete filtered image. This process is typically performed in the encoder's MCTF stage to improve the reference quality of subsequent inter-frame predictions.

[0101] For example, in the MCTF processing flow of a video encoder, the target image is divided into multiple 16×16 filter blocks to be processed. Each block has undergone drift detection and reference block correction. The system sequentially performs adaptive weighted fusion on each filter block to be processed and the corrected filter block: if a block has high motion confidence and stable difference features, it is given a higher weight (e.g., 0.7); otherwise, its weight is reduced (e.g., 0.3). Each 16×16 filtered sub-block obtained after fusion is written to the corresponding output buffer. When all sub-blocks have been processed, the system seamlessly stitches these sub-blocks together to form a complete filtered image frame, which serves as the input for subsequent encoding or display. The entire process maintains the continuity of block boundaries, avoids stitching artifacts, and fully utilizes the corrected reference information, significantly improving image quality in low-light or high-compression scenes.

[0102] Directly fusing the filter block to be processed with the reference filter block, which exhibits pixel value drift, may result in blurred edges or distorted details. Therefore, a further filtering process is performed on the modified filter block and the filter block to be processed to obtain a filtered sub-block. This process includes: calculating the sum of squared errors and the sum of absolute errors between the modified filter block and the filter block to be processed; determining the filtering weight coefficients based on the sum of squared errors and the sum of absolute errors; and performing a weighted operation on the filter block to be processed and the modified filter block according to the filtering weight coefficients to obtain the filtered sub-block.

[0103] The total squared error (SSE) is the sum of the squares of the differences between all corresponding pixels in the corrected filter block and the filter block to be processed. It is used to measure the energy intensity of the overall difference between the two blocks and is sensitive to large deviations.

[0104] The sum of absolute errors (SAD) refers to the sum of the absolute values ​​of the differences between all corresponding pixels in the corrected filter block and the filter block to be processed. It reflects the cumulative degree of the average deviation between the two blocks and has strong robustness to outliers.

[0105] The filter weight coefficient is a value between 0 and 1, used to control the contribution ratio of the filter block to be processed and the correction filter block in the final output. Its value is determined by the sum of squared errors and the sum of absolute errors. The smaller the error, the higher the weight of the correction filter block.

[0106] In practical applications, the system first calculates the difference between the corrected filter block and the filter block to be processed pixel by pixel, and then accumulates the squares and absolute values ​​of these differences to obtain the sum of squared errors and the sum of absolute errors. Subsequently, the system generates filter weight coefficients based on these two error indices. For example, errors can be mapped to weights using normalized error ratios, exponential decay functions, or empirical formulas. A common approach is to assign higher weights to the corrected filter block when the error is small, and lower its weights when the error is large to preserve the original content to be processed. Finally, the system performs a weighted average calculation on the filter block to be processed and the corrected filter block according to these filter weight coefficients, i.e., output pixel = weight × corrected filter block pixel + (1... The weights are multiplied by the pixels of the filter block to be processed, thus generating a filter processing sub-block.

[0107] For the step "determine the filter weight coefficients based on the sum of squared errors and the sum of absolute errors", one possible approach is to normalize the sum of squared errors and the sum of absolute errors respectively, then sum them by weight, and finally map them to weights using the Sigmoid function; another possible approach is to set an error threshold range and look up the corresponding weights in a table based on the range in which the error falls, which is not limited here.

[0108] In the embodiments of this specification, by jointly utilizing the sum of squared errors and the sum of absolute errors to construct the filter weight coefficients, both sensitivity to large deviations and robustness to local disturbances are taken into account. This allows the weighted fusion result to effectively utilize the drift compensation advantage of the modified filter block while retaining the original structural information when there are significant differences in content.

[0109] For example, in an intra-frame filtering task, the system has obtained an 8×8 filter block to be processed and a corresponding corrected filter block. The system iterates through 64 pixels, calculates the difference between each pair of pixels, and obtains the following: 2, +1, 0, +3, etc. Then, the system calculates the total sum of squared errors as ( 2)² + 1² + 0² + … = 98, the total absolute error is | 2|+|1|+|0|+…=64. Based on these two values, the system uses a preset mapping function: first, the sum of squared errors is divided by the total number of pixels to obtain a mean square error of 1.53, and the sum of absolute errors is divided by the number of pixels to obtain a mean absolute error of 1.0. Then, the two are linearly combined and input into an exponential decay function to obtain a filter weight coefficient of 0.72. The system then performs a weighted operation on the filter block to be processed and the corrected filter block, with each output pixel = 0.72 × corrected pixel + 0.28 × original pixel. For example, if the corrected pixel at a certain position is 120 and the original pixel is 122, then the output is 0.72 × 120 + 0.28 × 122 = 120.56, rounded to 121.

[0110] Relying solely on pixel-domain error metrics (such as squared error and absolute error) may not adequately reflect human visual perception characteristics or high-frequency detail distortion. Therefore, introducing transform-domain distortion metrics (such as SATD) can more effectively capture structural information in texture, edges, and motion compensation residuals. By fusing pixel-domain and transform-domain distortion metrics with preset weights to generate a comprehensive distortion metric, more precise control of filter weight coefficients can be achieved, thereby improving the subjective and objective quality of the filtered image. Furthermore, before calculating the sum of squared errors and the sum of absolute errors between the corrected filter block and the unprocessed filter block, the process includes: performing transform-domain mapping on the residuals between the corrected filter block and the unprocessed filter block to obtain transform-domain coefficients; calculating the sum of absolute values ​​of the transform-domain coefficients to obtain a transform-domain distortion metric; and determining the filter weight coefficients based on the sum of squared errors and the sum of absolute errors, including: combining the transform-domain distortion metric, the sum of squared errors, and the sum of absolute errors according to preset weight relationships to generate a comprehensive distortion metric; and determining the filter weight coefficients corresponding to the corrected filter block based on the comprehensive distortion metric.

[0111] The residual is a difference matrix obtained by subtracting the corresponding pixels of the corrected filter block and the unprocessed filter block, used to characterize the local differences between them. For example, if a pixel value of the corrected filter block is 120 and the corresponding pixel value of the unprocessed filter block is 123, then the residual at that location is... 3.

[0112] Transform domain mapping refers to applying an orthogonal transformation (such as the Hadamard transform or integer DCT) to the residual block, converting it from the spatial domain to the frequency domain, and generating a set of transform domain coefficients. For example, after performing a Hadamard transform on a 4×4 residual block, 16 frequency domain coefficients are obtained, where the low-frequency coefficients reflect the overall offset and the high-frequency coefficients reflect edge or texture differences.

[0113] The transform domain distortion metric is the sum of the absolute values ​​of the transform domain coefficients, i.e., SATD (Sum of Absolute Transformed Differences), which is used to quantify the energy distribution of the residuals in the frequency domain.

[0114] The overall distortion metric is a scalar value composed of SSE, SAD, and SATD combined with preset weights, in the form of E=SSE+α·SAD+β·SATD, where α and β are configurable coefficients, and β can be negative to suppress the influence of high-frequency edge components on distortion assessment.

[0115] In practical applications, the system first calculates the residual between the corrected filter block and the filter block to be processed, and then performs a preset orthogonal transformation on the residual block to obtain the transform domain coefficients. Next, the system takes the absolute value of all transform domain coefficients and sums them to obtain the transform domain distortion metric SATD. At the same time, the system calculates the sum of squared errors SSE and the sum of absolute errors SAD of the residuals. Then, the system linearly combines SSE, SAD and SATD according to the formula E=SSE+α·SAD+β·SATD to generate the comprehensive distortion metric E. Finally, based on E, the system maps the filter weight coefficients corresponding to the corrected filter block through a monotonically decreasing function (such as inverse proportional or exponential decay), and these coefficients are used for subsequent weighted fusion.

[0116] For the step "transform domain mapping of the residuals", one option is to use a 4×4 Hadamard transform to reduce computational complexity; another option is to use an 8×8 integer DCT transform to more finely characterize the frequency domain energy distribution. This is not a limitation here. For the step "determine the filter weight coefficients based on the comprehensive distortion metric", one option is to use a lookup table to directly output the preset weights according to the interval where E is located; another option is to dynamically calculate the weights using a continuous function w=1 / (1+γ·E), where γ is a scaling factor. This is not a limitation here.

[0117] In the embodiments of this specification, SATD is incorporated into the overall distortion metric by introducing a configurable β coefficient, which enables the system to actively reduce the contribution of high-frequency distortion caused by edges, thereby focusing more on non-structural distortions such as noise or drift, and improving the perceived rationality of the filter weight allocation.

[0118] For example, in a video post-processing task, the system processes an 8×8 filter block pair. First, pixel-by-pixel subtraction is performed to obtain a residual block, whose elements include positive values, negative values, and zero. The system performs a 4×4 block Hadamard transform on this residual block, obtaining transform coefficients for four sub-blocks. Then, the absolute values ​​of all 64 transform coefficients are taken and summed to obtain SATD=150. Simultaneously, the system calculates SSE=220 and SAD=90. Based on the current configuration, α=0.6, β= 0.3 (a negative value indicates suppression of edge distortion). The system is substituted into the formula to calculate the overall distortion metric: E = 220 + 0.6 × 90 + ( 0.3) × 150 = 220 + 54 45 = 229. Subsequently, the system uses the function w = 1 / (1 + 0.004 × 229) to calculate the filter weight coefficient, resulting in w ≈ 1 / (1 + 0.916) ≈ 0.522. This weight will be used for the subsequent weighted fusion of the filter block to be processed and the corrected filter block, and the entire process is completed entirely based on the multi-domain distortion statistics of the current block, without introducing external references or fixed thresholds.

[0119] One embodiment of this specification utilizes statistical pixel difference features to detect and correct global brightness shifts between the reference filter block and the filter block to be processed. This decouples the interference of brightness variations on motion compensation accuracy without altering the motion search strategy. Consequently, within the MCTF framework, even with zero-vector initialization or low-complexity motion search, high compensation accuracy can be maintained, effectively suppressing residual energy increases and error propagation caused by brightness drift. Ultimately, without increasing the computational burden of motion estimation, filtering performance, coding efficiency, and the quality of subsequent reconstructed video are improved.

[0120] The following is in conjunction with the appendix Figure 4 Taking the image filtering method provided in this specification as an example in the application of MCTF, the image filtering method will be further explained. Figure 4 This is a flowchart of an image filtering processing method provided in one embodiment of this specification, which specifically includes the following steps.

[0121] Step 402: Determine the search precision (1x, 2x, 4x downsampling layers, 1 / 2, 1 / 4, 1 / 8 pixel subdivision layers).

[0122] Step 404: Determine the filter unit division (e.g., uniformly divide according to a fixed 32x32 size under all precision).

[0123] Step 406: Determine the temporal reference frame queue (e.g., the N frames before and after the current frame to be filtered).

[0124] Step 408: Traverse all filter units, iterating from the lowest search precision (4x) to the highest search precision (1 / 8) for each filter unit, and perform iterative motion estimation.

[0125] Specifically, for each filter unit, 1.4.1 iterates from the lowest search precision (4x) to the highest search precision (1 / 8), performing the following: If the minimum search precision is required, initialize MV to (0, 0). Otherwise, start the search from the best result of the previous search layer, and optionally add (0, 0) or other results as candidates.

[0126] Starting from the best result among the candidate MVs in the previous step, if the precision is greater than or equal to 1, a multi-stage progressive search is performed within a nearby distance M with a step size K; if the precision is less than 1, a search is performed within a range of 0 to 1 with the current precision as the step size.

[0127] Record the best MV information and other intermediate features from the search results.

[0128] Step 410: Obtain the reference filter block for each reference frame based on the optimal MV result.

[0129] Specifically, the system first extracts a reference region corresponding to the spatial position of the current filter block from each reference frame based on the determined optimal motion vector (MV), and uses this region as the reference filter block. This process reads a pixel block of the same size from the reference frame image buffer by offsetting the coordinates of the current block by the horizontal and vertical components indicated by the MV. For example, if the current filter block is located at (64, 32), the MV is ( If (8, 4), then the system extracts a block of the same size from position (56, 36) of the reference frame as a reference filter block. For multi-reference frame scenarios, the system performs this operation for each reference frame to obtain multiple candidate reference filter blocks for subsequent distortion analysis and correction.

[0130] Step 412: Calculate the pixel difference d between the filter block and the filter reference block pixel by pixel, record min(|d|), and count the proportion of the sign sd of d.

[0131] Specifically, the system iterates through all pixel positions of the filter block and the corresponding reference filter block, and calculates the difference d for each pair of pixels = current pixel. The reference pixel is used as a reference. The minimum value among all |d| is found and denoted as min(|d|). This value reflects the closest pixel matching degree between two blocks. Simultaneously, the system calculates the proportion of negative values ​​among all non-zero d values, defined as the proportion of the sign sd, used to determine whether the overall deviation direction is biased towards positive or negative offset. For example, if most d values ​​are negative, it indicates that the overall brightness of the reference block is higher than that of the current block; a high proportion of sd indicates that negative deviation is dominant.

[0132] Step 414: Calculate the pixel difference d between the filter block and the filter reference block pixel by pixel, accumulate |d|-min(|d|) as DCD(DCDiff), and accumulate the square of |d|-min(|d|) as SDCD.

[0133] Specifically, after obtaining the difference d for each pixel, the system calculates the difference between |d| and the global minimum absolute difference min(|d|) at each position, i.e., |d| min(|d|) and sum all the results to get DCD; at the same time, for each term (|d|) The squares of min(|d|) are then summed to obtain SDCD. These two metrics are used to measure the residual energy of the difference after removing the best-fit offset. DCD reflects the strength of the average residual bias, while SDCD emphasizes the contribution of large biases. Together, they characterize the local inconsistency between the reference block and the current block after removing common offsets.

[0134] Step 416: If DCD < θ1 or SDCD < θ2, add or subtract min(d) to all pixel values ​​of the reference filter block, with the sign opposite to sd (if sd is negative, then add here), and θ1 and θ2 are empirical thresholds.

[0135] Specifically, when DCD is lower than the first threshold θ1 or SDCD is lower than the second threshold θ2, the system determines that there is a global brightness or offset drift between the current reference filter block and the filter block, but the local structure is highly consistent. At this time, the system applies a constant correction to the entire reference filter block: if the SD ratio indicates that most d are negative (i.e., the reference block is too bright), then min(d) is added to all pixels of the reference block (note that min(d) itself is a negative value, and the actual effect is to reduce brightness); conversely, if SD is positive, then min(d) is subtracted. This operation is equivalent to performing DC level correction on the reference block to align it with the reference brightness of the current block.

[0136] Step 418: Calculate the pixel difference d pixel by pixel, accumulate d*d as SSE, and accumulate |d| as SAD.

[0137] Specifically, after performing possible DC corrections, the system recalculates the pixel difference d between the corrected reference filter block and the original filter block, and sums the squares of all d values ​​to obtain SSE (Sum of Squared Errors), used to measure energy-type distortion; simultaneously, it sums all |d| values ​​to obtain SAD (Sum of Absolute Differences), used to measure the mean absolute deviation. These two metrics will be used as the basic pixel-domain metrics in subsequent comprehensive distortion evaluation.

[0138] Step 420: Calculate SATD.

[0139] Specifically, the system performs a preset orthogonal transformation (such as a 4×4 Hadamard transform) on the corrected residual block (i.e., the block formed by d in step 418) to obtain a set of transform domain coefficients; then, the absolute values ​​of all transform coefficients are taken and summed to obtain SATD (Sum of Absolute Transformed Differences). This value reflects the structural distortion of the residual in the frequency domain, especially sensitive to high-frequency components such as edges and textures, and is used to supplement the shortcomings of SSE and SAD in perceptual distortion modeling.

[0140] Step 422: Record the motion distortion E of the filter block on the current filter reference block.

[0141] Specifically, the formula for calculating E is as follows: E=SSE+α SAD+β SATD Therefore, for cases of overall brightness variation or color shift, the low-frequency coefficient drift compensation can be used to restore the image and improve the similarity of the reference block. At the same time, SATD is introduced to realize the perception of edge distortion. Note that the β coefficient here can be negative, that is, to exclude the high-frequency distortion caused by the edge from the total distortion and focus on the distortion caused by noise.

[0142] Step 424: In the motion compensation phase, perform the filter reference cell correction synchronized with the motion estimation phase.

[0143] Specifically, when subtracting min(d) during the motion estimation in step 414 and the motion compensation in step 424, a scaling factor k can be added to adjust the intensity of the compensation (i.e., subtract k*min(d)). However, the parameters in the two stages must be strictly aligned.

[0144] Step 426: Calculate the weight of each reference filter block based on the intermediate features, and then perform weighted fusion on the current filter block.

[0145] Through steps 402-426 above, the robustness of the motion search process for uniform brightness or color changes is achieved by compensating for low-frequency drift; the high-frequency distortion caused by texture edges is reduced by adding or eliminating SATD distortion, thereby improving the accuracy and stability of noise detection; and the motion compensation effect for areas with uniform brightness or color changes is achieved by compensating for low-frequency drift.

[0146] Corresponding to the above method embodiments, this specification also provides embodiments of an image filtering processing apparatus. Figure 5 This is a schematic diagram of the structure of an image filtering processing device provided in one embodiment of this specification. Figure 5 As shown, the device includes: The statistics module 502 is configured to calculate the pixel difference between corresponding pixels in the filter block to be processed and the reference filter block of the target image, and to statistically analyze the pixel difference features.

[0147] The judgment module 504 is configured to determine whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference characteristics.

[0148] The correction module 506 is configured to correct the pixel values ​​of a reference filter block based on pixel difference features when pixel value drift exists, thereby obtaining a corrected filter block. The pixel value correction includes uniformly adjusting the pixel values ​​of each pixel in the reference filter block to a preset value, which is determined based on the pixel difference features.

[0149] The filtering module 508 is configured to perform filtering processing on the modified filtering block and the filtering block to be processed to obtain a filtering processing sub-block, and obtain a filtered image based on the filtering processing sub-blocks of each filtering block to be processed in the target image.

[0150] Optionally, the statistics module 502 is further configured to obtain the lower limit of the modulus in the pixel difference, wherein the lower limit of the modulus represents the overall offset of the pixel value; calculate the ratio of the number of positive values ​​to the number of negative values ​​in the pixel difference, wherein the ratio represents the consistency trend of the pixel value change; and determine the difference characteristics based on the consistency trend of the overall pixel value offset and the pixel value change.

[0151] Optionally, the pixel difference feature includes a lower limit of the modulus value; correspondingly, the judgment module 504 is further configured to, for the first pixel in the filter block to be processed, calculate the target difference between the first pixel and the second pixel corresponding to the first pixel in the reference filter block, calculate the difference margin corresponding to the first pixel based on the target difference and the lower limit of the modulus value, wherein the first pixel is any pixel in the filter block to be processed; determine the difference consistency index based on the difference margin corresponding to each pixel in the reference filter block; compare the difference consistency index with a preset threshold range, and determine whether there is pixel value drift between the filter block to be processed and the reference filter block based on the comparison result.

[0152] Optionally, the pixel difference features include a lower limit of the magnitude and a proportional relationship; accordingly, the correction module 506 is further configured to determine the correction direction parameter based on the proportional relationship; determine the correction amount parameter based on the lower limit of the magnitude; and uniformly perform correction operations on each pixel value in the reference filter block according to the correction direction parameter and the correction amount parameter to generate a correction filter block.

[0153] Optionally, the correction module 506 is further configured to obtain the amplitude adjustment coefficient; and generate a correction parameter based on the lower limit of the modulus and the amplitude adjustment coefficient.

[0154] Optionally, the filtering module 508 is further configured to calculate the sum of squared errors and the sum of absolute errors between the modified filtering block and the filtering block to be processed; determine the filtering weight coefficients based on the sum of squared errors and the sum of absolute errors; and perform a weighted operation on the filtering block to be processed and the modified filtering block according to the filtering weight coefficients to obtain the filtering processing sub-block.

[0155] Optionally, the filtering module 508 is further configured to perform transform domain mapping on the residual between the corrected filter block and the filter block to be processed to obtain transform domain coefficients; calculate the sum of the absolute values ​​of the transform domain coefficients to obtain a transform domain distortion metric; combine the transform domain distortion metric, the sum of squared errors and the sum of absolute errors according to a preset weighting relationship to generate a comprehensive distortion metric; and determine the filter weight coefficients corresponding to the corrected filter block based on the comprehensive distortion metric.

[0156] Optionally, the image filtering processing device further includes a search module configured to perform multi-level downsampling processing on the target image to generate multiple image layers with progressively decreasing resolution; set the motion information corresponding to each filtering unit in the first resolution layer as a zero vector, wherein the resolution of the first resolution layer is lower than that of the other image layers; and determine a reference filtering block based on the zero vector.

[0157] Optionally, the search module is further configured to take the first resolution level as the current resolution level, and based on the current resolution level, search for adjacent second resolution levels, wherein the resolution of the second resolution level is higher than that of the current resolution level; if a second resolution level exists, transfer the second motion information already determined under the current resolution level to the second resolution level, wherein if the current resolution level is the first resolution level, the second motion information is a zero vector; determine the initial position of motion search under the second resolution level based on the second motion information, and determine the third motion information corresponding to the second resolution level based on the initial position; return to execute the step of searching for adjacent second resolution levels based on the current resolution level until the resolution of the current resolution level is higher than that of other levels in the image level, and obtain the fourth motion information corresponding to the current resolution level; and determine the reference block pointed to by the fourth motion information as a reference filter block.

[0158] Applied to this image filtering processing device, the statistical module 502 calculates the corresponding pixel differences between the filter block to be processed and the reference filter block and extracts their statistical features to provide a basis for judging the overall brightness shift. The judgment module 504 determines whether there is pixel value drift based on the features, thereby triggering a correction mechanism. When drift exists, the correction module 506 determines a uniform adjustment amount based on the difference features and applies the same offset to all pixels of the reference filter block to generate a corrected filter block, effectively correcting the global brightness difference. Subsequently, the filtering module 508 performs weighted fusion filtering on the corrected reference filter block and the filter block to be processed, outputting a more accurate filtered sub-block. This process, without changing the motion search strategy, enables adaptive compensation for brightness changes through the collaboration of modules 502–508, significantly alleviating compensation inaccuracies caused by low-precision motion estimation or illumination changes, improving the robustness and accuracy of MCTF motion compensation, suppressing error accumulation, and thus enhancing coding efficiency and video quality while maintaining low search complexity, meeting the needs of short video and live streaming scenarios for high-speed, high-quality coding.

[0159] The above is a schematic scheme of an image filtering processing device according to this embodiment. It should be noted that the technical solution of this image filtering processing device and the technical solution of the image filtering processing method described above belong to the same concept. For details not described in detail in the technical solution of the image filtering processing device, please refer to the description of the technical solution of the image filtering processing method described above.

[0160] Figure 6 This is a structural block diagram of a computing device according to one embodiment of this specification. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.

[0161] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0162] In one embodiment of this specification, the above-described components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0163] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 600 can also be a mobile or stationary server.

[0164] The processor 620 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described image filtering processing method.

[0165] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, the computing device embodiments are basically similar to the image filtering method embodiments, so the description is relatively simple; relevant parts can be referred to in the description of the image filtering method embodiments.

[0166] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described image filtering processing method.

[0167] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiments are basically similar to the image filtering method embodiments, so the description is relatively simple; relevant parts can be referred to in the description of the image filtering method embodiments.

[0168] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described image filtering processing method.

[0169] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the image filtering processing method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the image filtering processing method described above.

[0170] An embodiment of this specification also provides a method for storing a bitstream, comprising storing the bitstream in a storage medium, the bitstream being generated by the image filtering processing method described above.

[0171] The above is an illustrative scheme of a method for storing a bitstream according to this embodiment. It should be noted that the technical solution of this method belongs to the same concept as the technical solution of the image filtering processing method described above. For details not described in detail in the technical solution of the bitstream storage method, please refer to the description of the technical solution of the image filtering processing method described above.

[0172] An embodiment of this specification also provides a method for transmitting a bit stream, including transmitting a bit stream generated by the image filtering processing method described above.

[0173] The above is an illustrative scheme of a method for transmitting a bit stream according to this embodiment. It should be noted that the technical solution of this method belongs to the same concept as the technical solution of the image filtering processing method described above. For details not described in detail in the technical solution of the bit stream transmission method, please refer to the description of the technical solution of the image filtering processing method described above.

[0174] An embodiment of this specification also provides a computer-readable storage medium storing a bit stream generated by the image filtering processing method described above.

[0175] The above is an illustrative embodiment of a computer-readable storage medium. It should be noted that the technical solution of this computer-readable storage medium and the technical solution of the image filtering processing method described above belong to the same concept. Details not described in detail in the technical solution of the computer-readable storage medium can be found in the description of the technical solution of the image filtering processing method described above.

[0176] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0177] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0178] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0179] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0180] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. An image filtering processing method, characterized in that, include: Calculate the pixel difference between corresponding pixels in the target image's filter block and the reference filter block, and statistically analyze the pixel difference characteristics. Based on the pixel difference characteristics, determine whether there is pixel value drift between the filter block to be processed and the reference filter block; In the presence of pixel value drift, the reference filter block is corrected based on the pixel difference feature to obtain a corrected filter block. The pixel value correction includes uniformly adjusting the pixel values ​​of each pixel in the reference filter block by a preset value, which is determined based on the pixel difference feature. The modified filter block and the filter block to be processed are filtered to obtain a filtered sub-block, and a filtered image is obtained based on the filtered sub-blocks of each filter block to be processed in the target image.

2. The method according to claim 1, characterized in that, The statistical pixel difference features include: Obtain the lower limit of the modulus value in the pixel difference, wherein the lower limit of the modulus value represents the overall offset of the pixel value; Calculate the ratio of the number of positive values ​​to the number of negative values ​​in the pixel differences, wherein the ratio characterizes the consistent trend of pixel value changes; The difference feature is determined based on the consistency trend between the overall offset of the pixel value and the change of the pixel value.

3. The method according to claim 2, characterized in that, The pixel difference feature includes the lower limit of the modulus; the step of determining whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference feature includes: For the first pixel in the filter block to be processed, calculate the target difference between the first pixel and the second pixel corresponding to the first pixel in the reference filter block. Based on the target difference and the lower limit of the modulus, calculate the difference margin corresponding to the first pixel, wherein the first pixel is any pixel in the filter block to be processed. Based on the difference margin corresponding to each pixel in the reference filter block, the difference consistency index is determined. The difference consistency index is compared with a preset threshold range, and the comparison result is used to determine whether there is pixel value drift between the filter block to be processed and the reference filter block.

4. The method according to claim 2, characterized in that, The pixel difference feature includes the lower limit of the modulus value and the proportional relationship; The step of correcting the pixel values ​​of the reference filter block based on the pixel difference features to obtain a corrected filter block includes: The correction direction parameters are determined based on the aforementioned proportional relationship; The correction parameter is determined based on the lower limit of the modulus. The correction operation is uniformly performed on each pixel value in the reference filter block according to the correction direction parameter and correction amount parameter to generate the correction filter block.

5. The method according to claim 4, characterized in that, The determination of the correction parameter based on the lower limit of the modulus includes: Obtain the amplitude adjustment coefficient; The correction parameter is generated based on the lower limit of the modulus and the amplitude adjustment coefficient.

6. The method according to claim 1, characterized in that, The step of filtering the modified filter block and the filter block to be processed to obtain a filtered sub-block includes: Calculate the sum of squared errors and the sum of absolute errors between the corrected filter block and the filter block to be processed; The filter weight coefficients are determined based on the sum of squared errors and the sum of absolute errors. The filter block to be processed and the modified filter block are weighted according to the filter weight coefficients to obtain the filter processing sub-block.

7. The method according to claim 6, characterized in that, Before calculating the sum of squared errors and the sum of absolute errors between the corrected filter block and the filter block to be processed, the method further includes: The residual between the corrected filter block and the filter block to be processed is mapped into the transform domain to obtain the transform domain coefficients. Calculate the sum of the absolute values ​​of the transform domain coefficients to obtain a measure of transform domain distortion; The determination of the filter weight coefficients based on the sum of squared errors and the sum of absolute errors includes: The transform domain distortion metric, the sum of squared errors, and the sum of absolute errors are combined according to a preset weighting relationship to generate a comprehensive distortion metric. The filter weight coefficients corresponding to the corrected filter block are determined based on the comprehensive distortion metric.

8. The method according to claim 1, characterized in that, Before calculating the pixel difference between corresponding pixels in the target image's filter block and the reference filter block, the method further includes: Perform multi-level downsampling processing on the target image to generate multiple image layers with progressively decreasing resolution; The motion information corresponding to each filtering unit in the first resolution level is set as a zero vector, wherein the resolution of the first resolution level is lower than that of other image levels; The reference filter block is determined based on the zero vector.

9. The method according to claim 8, characterized in that, The process of determining the reference filter block based on the reference block pointed to by the zero vector includes: The first resolution level is taken as the current resolution level. Based on the current resolution level, the adjacent second resolution level is retrieved, wherein the resolution of the second resolution level is higher than that of the current resolution level. In the presence of a second resolution level, the second motion information already determined at the current resolution level is transmitted to the second resolution level, wherein, when the current resolution level is the first resolution level, the second motion information is the zero vector; The initial position of motion search at the second resolution level is determined based on the second motion information, and the third motion information corresponding to the second resolution level is determined based on the initial position. Return to the step of retrieving adjacent second resolution levels based on the current resolution level, until the resolution of the current resolution level is higher than other levels in the image level, and obtain the fourth motion information corresponding to the current resolution level; The reference block pointed to by the fourth motion information is determined as the reference filter block.

10. An image filtering processing apparatus, characterized in that, include: The statistics module is configured to calculate the pixel difference between corresponding pixels in the filter block to be processed and the reference filter block of the target image, and to statistically analyze the pixel difference features. The judgment module is configured to determine whether there is pixel value drift between the filter block to be processed and the reference filter block based on the pixel difference features; The correction module is configured to correct the pixel values ​​of the reference filter block based on the pixel difference feature when pixel value drift exists, thereby obtaining a corrected filter block. The pixel value correction includes uniformly adjusting the pixel values ​​of each pixel in the reference filter block by a preset value, wherein the preset value is determined based on the pixel difference feature. The filtering module is configured to perform filtering processing on the modified filtering block and the filtering block to be processed to obtain a filtering processing sub-block, and obtain a filtered image based on the filtering processing sub-blocks of each filtering block to be processed in the target image.

11. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the image filtering processing method according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, It stores a computer program / instruction that, when executed by a processor, implements the steps of the image filtering processing method according to any one of claims 1-9.

13. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the image filtering processing method according to any one of claims 1-9.

14. A method for storing a bit stream, comprising storing the bit stream in a storage medium, characterized in that, The bitstream is generated by the image filtering processing method according to any one of claims 1-9.

15. A method for transmitting a bit stream, comprising transmitting the bit stream, characterized in that, The bitstream is generated by the image filtering processing method according to any one of claims 1-9.

16. A computer-readable storage medium storing a bit stream thereon, characterized in that, The bitstream is generated by the image filtering processing method according to any one of claims 1-9.