Multi-mode hybrid filter circuit, method, apparatus, electronic device, medium, and chip

By optimizing the module structure of the multi-mode hybrid filter circuit, the number of parallel modules is reduced, power consumption is lowered, energy efficiency is improved, and the running time of the image processing equipment is extended.

CN123160328APending Publication Date: 2026-11-24VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510675094.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing multi-mode hybrid filter circuits have high power consumption, and how to reduce their power consumption has become an urgent problem to be solved.

Method used

By employing a window control module and a multi-mode hybrid filtering calculation module, and through the collaborative work of the data distribution module, window selection module, and computing core, the number of parallel modules is reduced, the filtering process is optimized, and dynamic and fixed power consumption is reduced.

Benefits of technology

It effectively reduces the power consumption of multi-mode hybrid filter circuits, improves energy efficiency ratio, and extends the operating time of image processing chips and devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160328A_ABST
    Figure CN123160328A_ABST
Patent Text Reader

Abstract

This application discloses a multi-mode hybrid filtering circuit, method, apparatus, electronic device, medium, and chip, belonging to the field of image processing technology. The multi-mode hybrid filtering circuit includes a windowing control module and a multi-mode hybrid filtering calculation module. The multi-mode hybrid filtering calculation module includes a data distribution module, a window selection module, and a calculation core connected in sequence. The windowing control module is connected to the data distribution module. The windowing control module is used to cache pixels in the image data based on the size of a first filtering window corresponding to the target mode signal of the image data, obtain and send a filtered pixel block to the data distribution module. The data distribution module is used to distribute N filtering windows to the window selection module. The window selection module is used to select a target filtering window corresponding to the target filtering mode from the N filtering windows based on the target mode signal. The calculation core is used to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal to obtain the filtering result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing technology, specifically relating to a multi-mode hybrid filtering circuit, method, apparatus, electronic device, medium, and chip. Background Technology

[0002] In the field of image signal processing (ISP), in order to adapt to different processing needs, multiple filtering modes are usually integrated into a single filtering circuit so as to perform customized processing for different functions, scenes and pixel objects.

[0003] Adding a new filtering mode to a filter circuit can increase its overall power consumption. Therefore, reducing the power consumption of multi-mode hybrid filter circuits is a pressing issue. Summary of the Invention

[0004] The purpose of this application is to provide a multi-mode hybrid filter circuit, method, apparatus, electronic device, medium, and chip that can reduce the power consumption of the multi-mode hybrid filter circuit.

[0005] In a first aspect, embodiments of this application provide a multi-mode hybrid filtering circuit, comprising: a windowing control module and a multi-mode hybrid filtering calculation module. The multi-mode hybrid filtering calculation module includes a data distribution module, a window selection module, and a calculation core connected in sequence. The windowing control module is connected to the data distribution module. The windowing control module is used to cache pixels in the image data based on the size of a first filtering window corresponding to a target mode signal of the image data, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module. The data distribution module is used to distribute N filtering windows to the window selection module. The N filtering windows correspond one-to-one with N filtering modes, including a target filtering mode indicated by the target mode signal. Each filtering window includes at least a portion of the filtered pixel blocks, and N is an integer greater than 1. The window selection module is used to select a target filtering window corresponding to the target filtering mode from the N filtering windows based on the target mode signal. The size of the first filtering window is the same as the size of the target filtering window. The calculation core is used to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal to obtain a filtering result.

[0006] Secondly, embodiments of this application provide an image processing apparatus, comprising: a windowing control module and a multi-mode hybrid filtering calculation module. The multi-mode hybrid filtering calculation module includes a data distribution module, a window selection module, and a calculation core connected in sequence. The windowing control module is connected to the data distribution module. The windowing control module is used to cache pixels in the image data based on the size of a first filtering window corresponding to a target mode signal of the image data, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module. The data distribution module is used to distribute N filtering windows to the window selection module. The N filtering windows correspond one-to-one with N filtering modes, including a target filtering mode indicated by the target mode signal. Each filtering window includes at least a portion of the filtered pixel blocks, and N is an integer greater than 1. The window selection module is used to select a target filtering window corresponding to the target filtering mode from the N filtering windows based on the target mode signal. The size of the first filtering window is the same as the size of the target filtering window. The calculation core is used to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal to obtain a filtering result.

[0007] Thirdly, embodiments of this application provide a multi-mode hybrid filtering method applied to the image processing apparatus described in the second aspect above. The method includes: using a windowing control module in the image processing apparatus, buffering pixels in the image data based on a first filtering window size corresponding to a target mode signal of the image data to obtain a filtered pixel block, and sending the filtered pixel block to a data distribution module in the image processing apparatus; using the data distribution module, distributing N filtering windows to a window selection module in the image processing apparatus, wherein the N filtering windows correspond one-to-one with N filtering modes, the N filtering modes including a target filtering mode indicated by the target mode signal, and each filtering window including at least a portion of the filtered pixel blocks, where N is an integer greater than 1; using the window selection module in the image processing apparatus, selecting a target filtering window corresponding to the target filtering mode from the N filtering windows based on the target mode signal, wherein the size of the first filtering window is the same as the size of the target filtering window; and using a computing core in the image processing apparatus, performing filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal to obtain a filtering result.

[0008] Fourthly, embodiments of this application provide a multi-mode hybrid filtering device applied to the image processing apparatus as described in the second aspect, the multi-mode hybrid filtering device comprising: a processing unit;

[0009] The aforementioned processing unit is configured to, through the windowing control module in the aforementioned image processing device, buffer the pixels in the aforementioned image data based on the first filtering window size corresponding to the target mode signal of the image data, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module in the image processing device.

[0010] The aforementioned processing unit is further configured to distribute N filter windows to the window selection module in the aforementioned image processing device through the aforementioned data distribution module. The aforementioned N filter windows correspond one-to-one with N filter modes. The aforementioned N filter modes include the target filter mode indicated by the aforementioned target mode signal. Each of the aforementioned filter windows includes at least a portion of the aforementioned filter pixel blocks. N is an integer greater than 1.

[0011] The aforementioned processing unit is further configured to select a target filter window corresponding to the target filter mode from the aforementioned N filter windows based on the target mode signal through the window selection module in the aforementioned image processing device, wherein the size of the first filter window is the same as the size of the target filter window;

[0012] The aforementioned processing unit is further configured to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal through the computing core in the aforementioned image processing device, and obtain the filtering result.

[0013] Fifthly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the third aspect.

[0014] In a sixth aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the third aspect.

[0015] In a seventh aspect, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method described in the third aspect.

[0016] Eighthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the third aspect.

[0017] In this embodiment, since the windowing control module can cache the filtered pixel block of the image data (such as pixels arranged in columns) based on the first filter window size corresponding to the target mode signal corresponding to the image data, and the calculation core can perform filtering processing on the target filter window (which is the filter window corresponding to the target filtering mode indicated by the target mode signal) according to the target filtering mode, that is, the calculation core only needs to perform filtering processing once on a certain filtered pixel block obtained by the windowing control module, thus reducing the dynamic power consumption of the filtering circuit. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the structure of a multi-mode hybrid filter circuit in related technologies;

[0019] Figure 2 This is one of the structural schematic diagrams of the multi-mode hybrid filter circuit provided in the embodiments of this application;

[0020] Figure 3 This is a schematic diagram of the first two-dimensional filter window used in the multi-mode hybrid filter circuit provided in the embodiments of this application;

[0021] Figure 4 This is a second schematic diagram of the structure of the multi-mode hybrid filter circuit provided in the embodiments of this application;

[0022] Figure 5 This is the third schematic diagram of the multi-mode hybrid filter circuit provided in the embodiments of this application;

[0023] Figure 6 This is the fourth schematic diagram of the structure of the multi-mode hybrid filter circuit provided in the embodiments of this application;

[0024] Figure 7 This is the fifth schematic diagram of the multi-mode hybrid filter circuit provided in the embodiments of this application;

[0025] Figure 8 This is one of the structural schematic diagrams of the image processing apparatus provided in the embodiments of this application;

[0026] Figure 9 This is a second schematic diagram of the structure of the image processing apparatus provided in the embodiments of this application;

[0027] Figure 10 This is the third schematic diagram of the structure of the image processing apparatus provided in the embodiments of this application;

[0028] Figure 11 This is one of the flowcharts of the filtering method provided in the embodiments of this application;

[0029] Figure 12 This is the second flowchart of the filtering method provided in the embodiments of this application;

[0030] Figure 13 This is a schematic diagram of the structure of the multi-mode hybrid filtering device provided in the embodiments of this application;

[0031] Figure 14 This is one of the structural schematic diagrams of the electronic device provided in the application embodiments;

[0032] Figure 15 This is the second schematic diagram of the electronic device provided in the application embodiment. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0034] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0035] In the field of image signal processing (ISP), to adapt to different processing needs, multiple modes are often integrated into a single filtering module to allow for customized processing of different functions, scenes, and objects. With the increasing prevalence of multi-mode hybrid filtering in ISP algorithms, its design principles are gradually guiding the development of ISP chips.

[0036] An ISP chip is a product of the hardware implementation of the ISP algorithm. At the ISP algorithm level, adding an extra filtering mode does not immediately lead to a significant increase in power consumption. However, at the ISP chip level, each additional mode can potentially increase the overall power consumption of the filtering circuit. Designers often overlook the circuit's energy efficiency ratio, directly mapping the description of the ISP algorithm to the circuit, such as... Figure 1 The image shows a typical low energy efficiency design scheme.

[0037] like Figure 1As shown, to support N filtering modes in a single multi-mode hybrid filter circuit, a typical low-energy-efficiency design incorporates N preprocessing modules, N line buffer control modules, N windowing control modules, and N computational core modules. Different values ​​of the mode signals indicate the filtering results of different modes. Figure 1 The behavior of each module in the multi-mode hybrid filter circuit shown is as follows:

[0038] (1) Data distribution module (Demultiplexer, DeMux) is used to receive data from the upstream module (60) and distribute it to N preprocessing modules. Each preprocessing module corresponds to a preprocessing method.

[0039] (2) The preprocessing results of N preprocessing modules are respectively sent to N row cache control modules and N windowing control modules. The N preprocessing results correspond to N cache bodies, and the N windowing control modules generate N filtering windows, with one windowing control module generating one filtering window. Among them, the N cache bodies correspond to at most N different numbers of row caches. The N filtering windows are sent to N computing cores in parallel, and the N computing cores work simultaneously to obtain N filtering results.

[0040] (3) The window selection module (Multiplexer, Mux) selects one filtering result from the N filtering results based on the value of the mode signal corresponding to the image data and sends it to the downstream module.

[0041] The embodiments of this application will be described in detail below with reference to the accompanying drawings and specific examples and application scenarios.

[0042] This application provides a multi-mode hybrid filter circuit 100, such as... Figure 2 As shown, the multi-mode hybrid filtering circuit 100 includes: a windowing control module 10 and a multi-mode hybrid filtering calculation module 20. The multi-mode hybrid filtering calculation module 20 includes: a data distribution module 21, a window selection module 22 and a calculation core 23 connected in sequence. The windowing control module 10 is connected to the data distribution module 21.

[0043] The data distribution module 21 can be used to distribute N filter windows 24 to the window selection module 22. The N filter windows 24 correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window 24 includes at least a portion of the filter pixel blocks. N is an integer greater than 1.

[0044] The window selection module 22 described above can be used to select a target filter window 24 corresponding to the target filter mode from the N filter windows 24 based on the target mode signal described above. The size of the first filter window is the same as the size of the target filter window 24.

[0045] The aforementioned calculation core 23 can be used to perform filtering processing on the aforementioned target filtering window 24 according to the target filtering mode indicated by the aforementioned target mode signal, and obtain the filtering result.

[0046] In some embodiments of this application, each of the above N filtering modes corresponds to a filtering window.

[0047] In some embodiments of this application, the size of the filter window corresponding to different filtering modes may be the same or different, depending on the filtering mode.

[0048] In some embodiments of this application, the size of the filter window can be the diameter of the filter window.

[0049] In some embodiments of this application, assuming the size of the first filtering window is Dp×Dp, the windowing control module can cache Dp*Dp pixels based on Dp to obtain a filtered pixel block, where Dp is a number greater than 1. For example, DP can be an odd number greater than 1.

[0050] In some embodiments of this application, the computing kernel can perform filtering processing on the filtered pixel block according to any of the N filtering modes, specifically determined according to the target mode signal.

[0051] In some embodiments of this application, the target mode signal can be configured by an external configuration signal.

[0052] In some embodiments of this application, the value of the target mode signal may indicate a filtering mode.

[0053] For example, if the value of the target mode signal is 1, it indicates filter mode 1.

[0054] For example, if the value of the target mode signal is 2, it indicates filter mode 2.

[0055] In some embodiments of this application, one of the N filtering modes may include, but is not limited to, mean filtering, median filtering, Gaussian filtering, bilateral filtering, Sobel operator filtering, Laplacian operator filtering, Prewitt operator filtering, image upsampling, image downsampling, or linear interpolation, as well as filtering operations involving convolution kernels or open filtering windows.

[0056] It should be noted that the multi-mode hybrid filtering circuit provided in this application embodiment can be applied to filtering with different image sizes, different filter window sizes, different line blanking lengths, and different pixel per cycle (PPC) specifications, and has good versatility.

[0057] In some embodiments of this application, the above image data may be the image data of a single image.

[0058] In some embodiments of this application, the windowing control module can be used to generate a two-dimensional filter window including filter pixel blocks according to the second filter window size, and send the two-dimensional filter window to the data distribution module 21.

[0059] The second filter window size is the size of the largest filter window 24 among the N filter windows 24.

[0060] In some embodiments of this application, the above-mentioned two-dimensional filtering window can cover all pixel ranges required for N filtering modes or the filtering windows corresponding to N filtering modes.

[0061] In some embodiments of this application, the maximum number of column buffers of the above-mentioned windowing control module is determined by the size of the second filter window, which is the size of the largest filter window among the above N filter windows.

[0062] In some embodiments of this application, the maximum number of column buffers in the windowing control module can be equal to the column dimension in the second filter window size.

[0063] For example, the second filter window size is 5×5, and the maximum number of column caches for the window control module is 5 columns.

[0064] In some embodiments of this application, if the size of the two-dimensional filter window is different from the size of the first filter window, then the remaining areas of the two-dimensional filter window, except for the area where the filter pixel block is located, are blank. These blank areas can be understood as invalid areas.

[0065] For example, such as Figure 3 As shown, assuming the four filtering modes correspond to filter windows 01, 02, 03, and 04 respectively, and the sizes of the four filter windows are as follows: Filter window 01 > Filter window 04 > Filter window 03 > Filter window 02, that is, the above two-dimensional filter window is filter window 01. Then: if the target mode signal corresponds to filter window 02, the windowing control module can cache the Dp column pixels in the image data based on the diameter Dp of filter window 02 to obtain filter pixel block 05; and send filter pixel block 05 to the data distribution module with the size of filter window 01. That is, the data distribution module receives... Figure 3 The 01 in the middle. It needs to be clarified that... Figure 3The dashed lines in the diagram are only used to illustrate filter windows 03 and 04. In actual implementation, Figure 3 The dotted line in the image does not exist.

[0066] In some embodiments of this application, the function of the windowing control module sending filtered pixel blocks to the data distribution module through the aforementioned two-dimensional filtering window is to facilitate the data distribution module in distributing N filtering windows to the window selection module based on the two-dimensional filtering window. For example, the data distribution module can distribute to the window selection module... Figure 3 The filter windows 01 to 04 are shown.

[0067] It is understandable that the maximum number of column buffers in the windowing control module is determined by the size of the second filter window, which allows the windowing control module to buffer filter pixel blocks that are suitable for different filter modes and corresponding filter window sizes, thereby improving the versatility of the filter circuit.

[0068] Thus, since the windowing control module can generate a two-dimensional filter window including filter pixel blocks according to the size of the largest filter window among the N filter windows corresponding to N filter modes, and send it to the data distribution module, the data distribution module can generate filter windows corresponding to each filter mode based on this two-dimensional filter window, thereby improving the versatility of the filter circuit. Furthermore, since filter pixel blocks adaptable to various filter modes can be obtained through a single windowing control module, compared to a scheme where different filter modes correspond to different windowing control modules, the number of windowing control modules in the filter circuit can be reduced, thereby reducing power consumption.

[0069] In some embodiments of this application, the data distribution module described above can be used to distribute N filter windows corresponding to filter modes, and each distributed filter window includes at least a portion of the pixels in the aforementioned filter pixel block.

[0070] In some embodiments of this application, such as Figure 2 As shown, the data distribution module 21 can also be used to select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate N filter windows 24 that correspond one-to-one with the N regions.

[0071] The N regions at least partially overlap, and each region includes at least a portion of the filtered pixel block.

[0072] It can be understood that for the N filtering windows generated by the data distribution module, any filtering window includes at least a portion of the pixels in the aforementioned filtering pixel blocks. Specifically, a filtering window includes pixels in the region corresponding to that filtering window.

[0073] In some embodiments of this application, such as Figure 4As shown, for each filter window distributed by the data distribution module 21, a filter window may include a data window and a weight window. The data window includes at least a portion of the pixels from the aforementioned filtered data block.

[0074] The aforementioned calculation kernel can be used to perform multiply-accumulate (MAC) calculations on the data window and weight window in the target filtering window to obtain a filtering result.

[0075] In some embodiments of this application, such as Figure 4 As shown, the data distribution module 21 may include a first distribution module 211 and a second distribution module 212. The first distribution module 211 is used to distribute N data windows, and the second distribution module 212 is used to distribute N weight windows. Correspondingly, the window selection module 22 may include a first selection module 221 and a second distribution module 222. The first selection module 221 is used to select one data window from the N data windows based on the target mode signal, and the second distribution module 212 is used to select one weight window from the N data windows based on the target mode signal.

[0076] In some embodiments of this application, the filter window corresponding to the above-mentioned filtering mode can be a hardware window or a software window.

[0077] In some embodiments of this application, the filtering window of the hardware corresponding to the above filtering mode can be a sliding window; wherein, the two ends of the above N filtering windows are respectively connected to the above data distribution module and the above window selection module; wherein, the above data distribution module is used to distribute the above filtered pixel blocks to the above window selection module according to the above N filtering windows respectively.

[0078] Thus, since the data distribution module can select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate N filter windows that correspond one-to-one with the N regions, the pixel range covered by each filter window can meet or adapt to the filtering requirements of the corresponding filter mode, thereby improving the accuracy of distributing filter windows.

[0079] In some embodiments of this application, "the above-mentioned window selection module is used to select a target filter window corresponding to the target mode filter pattern from the above-mentioned N filter windows based on the target mode signal" may include: the above-mentioned window selection module selects a filter window that conforms to the filter mode indicated by the target mode signal from the above-mentioned N filter windows based on the target mode signal, such as the target filter window corresponding to the target filter mode.

[0080] In some embodiments of this application, the above-mentioned N filtering modes can reuse at least one of the following in the above-mentioned computing core: multiplier, adder, register.

[0081] In some embodiments of this application, the computation core may include at least one multiply-accumulate unit, and each multiply-accumulate unit includes at least one multiplier and at least one adder.

[0082] In some embodiments of this application, any of the above N filtering modes involves at least two MAC operations, which may include a row multiply-accumulate (H MAC) operation and a column multiply-accumulate (V MAC) operation. Therefore, as... Figure 4 As shown, the computation kernel can include H MAC and V MAC, with H MAC and V MAC connected. H MAC can be used to perform multiply-accumulate operations on row pixels and their corresponding weights within the filter window; V MAC can be used to perform multiply-accumulate operations on column pixels and their corresponding weights within the filter window.

[0083] In some embodiments of this application, the length of the pipeline of the multi-mode hybrid filtering calculation module is determined by the filtering mode with the longest pipeline among the N filtering modes.

[0084] For example, all of the above N filtering modes involve at least two MAC operations, such as including Figure 4 In the H MAC and VMAC, level 1 pipe and level 2 pipe are used for MAC operations.

[0085] In some embodiments of this application, since the pipeline lengths corresponding to different filtering modes are different, the target mode signals are different. The multi-mode hybrid filtering circuit can perform different calculation operations in the pipeline. In other words, the multi-mode hybrid filtering circuit can skip or bypass calculation operations in the pipeline that are unrelated to the target filtering mode indicated by the target mode signal.

[0086] In some embodiments of this application, the above-mentioned calculation operations may include, but are not limited to: MAC operations, register read operations, register write operations, etc.

[0087] For example, such as Figure 4 As shown, if the filter mode is 1 and the corresponding filter mode X have pipeline lengths of 2 and X levels respectively, and X is greater than 2, then the pipeline length of the multi-mode hybrid filter calculation module has X levels, where X is an integer greater than 2.

[0088] In some embodiments of this application, the computing core can perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal when the pipeline is idle, and obtain a filtering result.

[0089] In the multi-mode hybrid filtering circuit provided in this application embodiment, since the windowing control module can cache the filtered pixel block of the image data (such as pixels arranged in columns) based on the first filtering window size corresponding to the target mode signal corresponding to the image data, and the calculation core can perform filtering processing on the target filtering window (which is the filtering window corresponding to the target filtering mode indicated by the target mode signal) according to the target filtering mode, that is, the calculation core only needs to perform filtering processing once on a certain filtered pixel block obtained by the windowing control module, thus reducing the dynamic power consumption of the filtering circuit.

[0090] Furthermore, by coordinating the data distribution module, window selection module, and windowing control module, the number of windowing control modules and computing cores in the multi-mode hybrid filter circuit can be reduced, thereby reducing the number of components in the filter circuit and thus reducing the fixed power consumption and dynamic power consumption of the filter circuit.

[0091] In some embodiments of this application, combined with Figure 2 ,like Figure 5 As shown, the multi-mode hybrid filter circuit 100 may further include: a line buffer control module 30 and a buffer body 40;

[0092] The input terminal of the aforementioned buffer 40 is connected to the first output terminal of the aforementioned line buffer control module 30, the output terminal of the aforementioned buffer 40 is connected to the first input terminal of the aforementioned line buffer control module 30, and the second output terminal of the aforementioned line buffer control module 30 is connected to the first input terminal of the aforementioned windowing control module 10.

[0093] The row buffer control module 30 is used to write pixels in the image data into the buffer body 40 based on the first filter window size corresponding to the target mode signal; and when M rows of pixels are written into the buffer body 40, it sends each column of pixels in the M rows of pixels to the windowing control module 10 in column units.

[0094] Where M is equal to the number of rows of the first filter window size minus 1, and M can be a positive integer.

[0095] In some embodiments of this application, the value of M varies depending on the target mode signal. Specifically, M = the number of rows in the target filter window minus 1 or the number of rows in the first filter window size minus 1.

[0096] For example, if the size of the target filtering window is Dp×Dp, then M=Dp-1, where Dp and M are both positive integers.

[0097] In some embodiments of this application, the aforementioned cache body can be a register or other device with cache functionality.

[0098] In some embodiments of this application, assuming the size of the first filter window is Dp×Dp, the above-mentioned row cache control module can write (Dp-1) rows of pixels into the cache body based on the size of the first filter window, where Dp is a positive odd number.

[0099] Alternatively, in some embodiments of this application, assuming the first size is Dp × Dp, the aforementioned row buffer control module can write Dp row pixels into the buffer body based on the first filter window size. Alternatively, the aforementioned row buffer control module can send the Dp row pixels buffered in the buffer body to the windowing control module based on the first size. It is understood that in this case, the preprocessing module described below is not connected to the windowing control module; that is, the row buffer control module only outputs all the required pixels to the windowing control module, and Dp is a positive odd number.

[0100] In some embodiments of this application, the row cache control module can be used to read the pixels cached in the cache body using a one-dimensional columnar window and the size of a first filter window, and send the read pixels to the window opening control module. That is, the row cache control module sends one column of pixels cached in the cache body to the window opening control module each time.

[0101] In some embodiments of this application, the column length of the one-dimensional column window can be less than or equal to the column length of the second filter window size, where the second filter window size is the size of the largest filter window among the N filter windows.

[0102] For example, the size of a one-dimensional column-oriented window can be (rows × columns) = (P × 1), where P is a positive integer smaller than the size of the second filter window. For example, P = 1, 2, 3, or 4, etc.

[0103] In some embodiments of this application, the row cache control module can use the one-dimensional column window to perform pixel reading of the cache body, such as using the one-dimensional column window to read (Dp-1)×1 pixels from the cache body.

[0104] For example, assuming the first size is Dp×Dp, the row buffer control module can, after caching (Dp-1) rows of pixels in the buffer body, use the aforementioned one-dimensional column-oriented window to read the rows of pixels in the buffer body. When the first (Dp-1) rows of the one-dimensional column-oriented window are filled, the row buffer control module can send the one-dimensional column-oriented window to the window opening control module. In this way, the window opening control module can receive (Dp-1) column-arranged pixels from the row buffer control module each time.

[0105] Thus, since the row buffer control module can perform write operations on the buffer body based on the size of the first filter window corresponding to the target mode signal, the pixels buffered in the buffer body can adapt to the size requirements of the filter window of different filter modes, thereby improving the versatility of the multi-mode hybrid filter circuit. On the other hand, for every M rows of pixels written, each row of pixels in the M rows is sent to the windowing control module in column units, thereby ensuring the continuity and smoothness of the filtering process and improving the filtering efficiency of the multi-mode hybrid circuit.

[0106] Furthermore, since the multi-mode hybrid filtering circuit only requires one row buffer control module and one buffer body to buffer the row pixels required for any filtering mode, compared with the related technology where each filtering mode corresponds to one row buffer control module and one buffer body, the multi-mode hybrid filtering circuit provided in this application embodiment can save hardware overhead in the multi-mode hybrid filtering circuit.

[0107] In some embodiments of this application, the maximum number of cache rows in the cache body is determined by the number of rows in the second filter window size, and the maximum number of cache columns in the windowing control module is determined by the number of columns in the second filter window size;

[0108] The second filter window size is the largest of the N filter windows.

[0109] Thus, since the maximum number of cache rows in the buffer body is determined by the number of rows of the largest filter window size among the N filter modes, and the maximum number of cache columns in the windowing control module is also determined by this largest size, it is possible to realize the image data processing requirements of different filter modes with one buffer body, one row buffer control module and one windowing control module, thereby reducing the number of components in the circuit and improving the versatility and practicality of the circuit.

[0110] In some embodiments of this application, in conjunction with the above... Figure 5 ,like Figure 6 As shown, the multi-mode hybrid filter circuit 100 may further include: a preprocessing module 50; the output terminal of the preprocessing module 50 is connected to the second input terminal of the line buffer control module 30 and the second input terminal of the windowing control module 10, respectively.

[0111] The preprocessing module 50 is used to perform preprocessing on the row pixels in the image data output by the upstream module 60 according to the preprocessing method corresponding to the above mode signal, and send the preprocessed pixels to the row buffer control module 30. After sending M rows of preprocessed pixels to the row buffer control module 30, it sends the M+1th row of preprocessed pixels to the windowing control module 10.

[0112] The aforementioned windowing control module 10 is used to cache pixels from the aforementioned preprocessing module 50 and the aforementioned row cache control module 30 based on the number of columns of the aforementioned first filter window size, thereby obtaining a filtered pixel block.

[0113] In some embodiments of this application, a mode signal may correspond to a preprocessing method.

[0114] In some embodiments of this application, the preprocessing methods corresponding to different mode signals may be the same or different.

[0115] In some embodiments of this application, the preprocessing method corresponding to the mode signal may include, but is not limited to, any of the following: normalization processing, noise reduction processing, and format conversion processing.

[0116] In some embodiments of this application, assuming the diameter of the filter window corresponding to the target filtering mode indicated by the target mode signal is Dp, the preprocessing module, after obtaining the preprocessing result of each Dp row of pixels, sends the Dp-th row of pixels in that Dp row to the row buffer control module and the windowing control module respectively. This reduces the latency required for the last row of preprocessing results to reach the windowing control module. Therefore, the windowing control module can quickly generate a filtered data block based on the preprocessing results of the previous (Dp-1) rows of pixels sent by the row buffer control module and the preprocessing result of the Dp-th row of pixels.

[0117] In some embodiments of this application, the preprocessing module can perform preprocessing on one pixel at a time to obtain a preprocessing result.

[0118] It is understandable that the preprocessing module can preprocess the pixels in the image data on a pixel-by-pixel basis, according to pixel rows.

[0119] In some embodiments of this application, taking a first filtering window size of Dp×Dp and DP as an example, the windowing control module can obtain a filtered pixel block based on the preprocessing results received within Dp clock cycles. Specifically, within each clock cycle, the row buffer control module sends one pixel from each of the previous (Dp-1) rows to the windowing control module, i.e., pixels are sent column-by-column. The preprocessing module sends one pixel from the Dp-th row to the windowing control module. Thus, after Dp clock cycles, the windowing control module can receive Dp×Dp pixels, thereby obtaining the filtered pixel block.

[0120] Thus, since the preprocessing module can preprocess the image data and send the preprocessed pixels to the row buffer control module, and can synchronously send the most recently processed row M+1 pixels to the windowing control module after preprocessing M+1 rows of pixels, that is, the row M+1 pixels are sent directly by the preprocessing module to the windowing control module, compared with the scheme of waiting for the buffer to buffer M+1 rows of pixels and then sending pixels by the row buffer control module in column units, the windowing control module can obtain the filtered pixel block in a shorter time, thereby reducing the filtering latency.

[0121] Furthermore, since the preprocessing module can perform preprocessing on the image data according to the preprocessing method corresponding to the target mode signal, that is, the same preprocessing module can perform different preprocessing on the image data, compared with the related technology that uses multiple preprocessing modules to perform different preprocessing on the image data to obtain different preprocessing results, the embodiments of this application can accurately perform preprocessing on the image data once based on the target mode signal, thereby saving preprocessing power consumption. It can also reduce the number of preprocessing modules in the filtering circuit and reduce the size of the filtering circuit.

[0122] In some embodiments of this application, combined with Figure 6 ,like Figure 7 As shown, the multi-mode hybrid filter circuit 100 may further include an upstream module 60 and a downstream module 70; the upstream module 60 is connected to the input terminal of the preprocessing module 50; and the downstream module 70 is connected to the output terminal of the computing core 23.

[0123] The preprocessing module 50 can be used to perform preprocessing on the pixels output by the upstream module 60 based on the preprocessing method corresponding to the target mode signal, so as to obtain the preprocessing result corresponding to each pixel.

[0124] In some embodiments of this application, after each handshake between the preprocessing module and the upstream module, the preprocessing module obtains a pixel from the upstream module and performs preprocessing on that pixel based on the preprocessing method corresponding to the target mode signal. During this period, the mode signal points to the corresponding preprocessing method, the preprocessing module obtains the preprocessing result corresponding to that preprocessing method, and sends the preprocessing result to the row buffer control module.

[0125] In some embodiments of this application, the calculation kernel can also be used to send the filtering results of each filtered pixel block to downstream modules.

[0126] In some embodiments of this application, the computation kernel can be used to send a filtering result to the downstream module after each handshake with the downstream module.

[0127] It should be noted that in the multi-mode hybrid filtering circuit provided in this application embodiment, when the mode signal corresponding to the image data changes, the filtering circuit can adaptively perform filtering processing on the corresponding image data based on the changed mode signal.

[0128] It is understood that the multi-mode hybrid filter circuit provided in the embodiments of this application has the following effects:

[0129] (1) Reduce the number of parallel modules: The multi-mode hybrid filtering circuit uses only a single preprocessing module, a single line cache control module, a single windowing control module and a single multi-mode hybrid filtering calculation module, which greatly reduces the hardware resource requirements compared to the N corresponding modules in the original technical solution.

[0130] (2) Improved energy efficiency: By reducing the number of parallel-working filter blocks (such as computing cores) and reducing high-frequency signal switching during register synchronous access, the dynamic power consumption of the system is significantly reduced. At the same time, the static power consumption is also reduced by reducing the size of memory units (caches) and logic units (such as line cache control modules).

[0131] (3) Improve energy efficiency ratio: While maintaining the same energy consumption, the multi-mode hybrid filter circuit provided in this application embodiment can extend the running time of the multi-mode hybrid filter circuit, the image processing chip including the circuit and the device, and improve the energy efficiency ratio.

[0132] This application also provides an image processing apparatus, such as... Figure 8 As shown, the image processing device 200 includes: a windowing control module 10 and a multi-mode hybrid filtering calculation module 20. The multi-mode hybrid filtering calculation module 20 includes a data distribution module 21, a window selection module 22 and a calculation core 23 connected in sequence. The windowing control module 10 is connected to the data distribution module 21.

[0133] The windowing control module 10 is used to cache pixels in the image data based on the first filter window size corresponding to the target mode signal of the image data, obtain a filter pixel block, and send the filter pixel block to the data distribution module 21.

[0134] The data distribution module 21 is used to distribute N filter windows 24 to the window selection module 22. The N filter windows 24 correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window 24 includes at least a portion of the filter pixel blocks. N is an integer greater than 1.

[0135] The window selection module 22 is used to select a target filter window 24 corresponding to the target filter mode from the N filter windows 24 based on the target mode signal, wherein the size of the first filter window is the same as the size of the target filter window 24.

[0136] The computing core 23 is used to perform filtering processing on the target filtering window 24 according to the target filtering mode indicated by the target mode signal, and obtain the filtering result.

[0137] In the image processing apparatus provided in this application embodiment, since the windowing control module in the image processing apparatus can cache the filtered pixel block of the image data (such as pixels arranged in columns) based on the first filter window size corresponding to the target mode signal corresponding to the image data, and the calculation core in the image processing apparatus can perform filtering processing on the target filter window (which is the filter window corresponding to the target filtering mode indicated by the target mode signal) according to the target filtering mode, that is, it is necessary to perform filtering processing once on a certain filtered pixel block obtained by the windowing control module through the calculation core, the dynamic power consumption of the filtering circuit can be reduced.

[0138] Furthermore, by coordinating the data distribution module, window selection module, and windowing control module, the number of windowing control modules and computing cores in the multi-mode hybrid filter circuit can be reduced, thereby reducing the number of components in the filter circuit and thus reducing the fixed power consumption and dynamic power consumption of the filter circuit.

[0139] In some embodiments of this application, such as Figure 8 As shown, the windowing control module 10 is used to generate a two-dimensional filter window including the filter pixel block according to the second filter window size, and send the two-dimensional filter window to the data distribution module 21;

[0140] Wherein, the size of the second filter window is the size of the largest filter window 24 among the N filter windows 24.

[0141] Thus, since the windowing control module can generate a two-dimensional filter window including filter pixel blocks according to the size of the largest filter window among the N filter windows corresponding to N filter modes, and send it to the data distribution module, the data distribution module can generate filter windows corresponding to each filter mode based on this two-dimensional filter window, thereby improving the versatility of the filter circuit. Furthermore, since filter pixel blocks adaptable to various filter modes can be obtained through a single windowing control module, compared to a scheme where different filter modes correspond to different windowing control modules, the number of windowing control modules in the filter circuit can be reduced, thereby reducing power consumption.

[0142] In some embodiments of this application, such as Figure 8As shown, the data distribution module 21 is also used to select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate the N filter windows 24 that correspond one-to-one with the N regions;

[0143] The N regions at least partially overlap, and each region includes at least a portion of the filtered pixel block.

[0144] Thus, since the data distribution module can select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate N filter windows that correspond one-to-one with the N regions, the pixel range covered by each filter window can meet or adapt to the filtering requirements of the corresponding filter mode, thereby improving the accuracy of distributing filter windows.

[0145] In some embodiments of this application, combined with Figure 8 ,like Figure 9 As shown, the image processing apparatus 200 may further include: a line buffer control module 30 and a buffer 40;

[0146] The input terminal of the buffer body 40 is connected to the first output terminal of the row buffer control module 30, the output terminal of the buffer body 40 is connected to the first input terminal of the row buffer control module 30, and the second output terminal of the row buffer control module 30 is connected to the first input terminal of the window opening control module 10.

[0147] The row buffer control module 30 is used to write pixels in the image data into the buffer body 40 based on the first filter window size corresponding to the target mode signal; and when writing M rows of pixels into the buffer body 40, it sends each column of pixels in the M rows of pixels to the windowing control module 10 in column units.

[0148] Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

[0149] Thus, since the row buffer control module can perform write operations on the buffer body based on the size of the first filter window corresponding to the target mode signal, the pixels buffered in the buffer body can adapt to the size requirements of the filter window of different filter modes, thereby improving the versatility of the multi-mode hybrid filter circuit. On the other hand, for every M rows of pixels written, each row of pixels in the M rows is sent to the windowing control module in column units, thereby ensuring the continuity and smoothness of the filtering process and improving the filtering efficiency of the multi-mode hybrid circuit.

[0150] Furthermore, since the multi-mode hybrid filtering circuit only requires one row buffer control module and one buffer body to buffer the row pixels required for any filtering mode, compared with the related technology where each filtering mode corresponds to one row buffer control module and one buffer body, the multi-mode hybrid filtering circuit provided in this application embodiment can save hardware overhead in the multi-mode hybrid filtering circuit.

[0151] In some embodiments of this application, combined with Figure 9 ,like Figure 10 As shown, the image processing device 200 may further include: a preprocessing module 50;

[0152] The output of the preprocessing module 50 is connected to the second input of the row cache control module 30 and the second input of the windowing control module 10, respectively.

[0153] The preprocessing module 50 is used to perform preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal, and send the preprocessed pixels to the row buffer control module 30, and after sending M rows of preprocessed pixels to the row buffer control module 30, send a row of preprocessed pixels to the windowing control module 10.

[0154] The window opening control module 10 is used to cache pixels from the preprocessing module 50 and the row cache control module 30 based on the number of columns of the first filter window size to obtain a filtered pixel block.

[0155] Thus, since the preprocessing module can preprocess the image data and send the preprocessed pixels to the row buffer control module, and can synchronously send the most recently processed row M+1 pixels to the windowing control module after preprocessing M+1 rows of pixels, that is, the row M+1 pixels are sent directly by the preprocessing module to the windowing control module, compared with the scheme of waiting for the buffer to buffer M+1 rows of pixels and then sending pixels by the row buffer control module in column units, the windowing control module can obtain the filtered pixel block in a shorter time, thereby reducing the filtering latency.

[0156] Furthermore, since the preprocessing module can perform preprocessing on the image data according to the preprocessing method corresponding to the target mode signal, that is, the same preprocessing module can perform different preprocessing on the image data, compared with the related technology that uses multiple preprocessing modules to perform different preprocessing on the image data to obtain different preprocessing results, the embodiments of this application can accurately perform preprocessing on the image data once based on the target mode signal, thereby saving preprocessing power consumption. It can also reduce the number of preprocessing modules in the filtering circuit and reduce the size of the filtering circuit.

[0157] In some embodiments of this application, the maximum number of cache rows of the cache body 40 is determined by the number of rows of the second filter window size, and the maximum number of cache columns of the windowing control module 10 is determined by the number of columns of the second filter window size;

[0158] Wherein, the size of the second filter window is the size of the largest filter window 24 among the N filter windows 24.

[0159] Thus, since the maximum number of cache rows in the buffer body is determined by the number of rows of the largest filter mode among the N filter modes, and the maximum number of cache columns in the windowing control module is also determined by this largest size, it is possible to realize the image data processing requirements of different filter modes with one buffer body, one row cache control module and one windowing control module, thereby reducing the number of components in the circuit and improving the versatility and practicality of the circuit.

[0160] For further descriptions of the image processing device, please refer to the relevant descriptions of the multi-mode hybrid filtering circuit in the above embodiments. To avoid repetition, they will not be repeated here.

[0161] This application also provides a multi-mode hybrid filtering method, wherein the executing entity of the filtering method is an image processing device, which can be an electronic device, or a functional module or entity within an electronic device; this application does not limit this. The following will use an electronic device as an example to illustrate the multi-mode hybrid filtering method provided in this application.

[0162] This application provides a multi-mode hybrid filtering method, which can be applied to the image processing apparatus provided in the above embodiments.

[0163] Figure 11 A flowchart illustrating the multi-mode hybrid filtering method provided in an embodiment of this application is shown, as follows: Figure 8 As shown, the multi-mode hybrid filtering method may include the following steps:

[0164] Step 801: The image processing device, through the windowing control module in the image processing device, buffers pixels in the image data based on the size of the first filtering window corresponding to the target mode signal of the image data to obtain a filtered pixel block.

[0165] Step 802: The image processing device distributes N filter windows to the window selection module in the image processing device through the data distribution module.

[0166] Among them, the above N filtering windows correspond one-to-one with N filtering modes. The N filtering modes include the target filtering mode indicated by the target mode signal. Each filtering window includes at least a portion of the filtering pixel blocks, and N is an integer greater than 1.

[0167] Step 803: The image processing device selects the target filter window corresponding to the target filter mode from N filter windows based on the target mode signal through the window selection module in the image processing device.

[0168] The size of the first filter window is the same as the size of the target filter window.

[0169] Step 804: The image processing device performs filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal through the computing core in the image processing device.

[0170] In some embodiments of this application, step 802 may include step 802A.

[0171] Step 802A: The image processing device generates a two-dimensional filter window including filter pixel blocks according to the second filter window size through the windowing control module, and sends the two-dimensional filter window to the data distribution module.

[0172] Wherein, the size of the second filter window is the size of the largest filter window among the N filter windows.

[0173] Thus, since the windowing control module can generate a two-dimensional filter window including the filter pixel block according to the size of the largest filter window among the N filter windows corresponding to the N filter modes, and send it to the data distribution module, the data distribution module can generate filter windows corresponding to each filter mode based on the two-dimensional filter window, thereby improving the versatility of the filter circuit.

[0174] In some embodiments of this application, prior to step 801 above, the filtering method provided in this application may further include steps 805 and 806:

[0175] Step 805: The image processing device, through the line buffer control module in the image processing device, writes the pixels of the above image data into the buffer in the image processing device based on the size of the first filter window corresponding to the target mode signal.

[0176] Step 806: The image processing device, through the row buffer control module, writes M rows of pixels into the buffer body, and then sends each column of pixels in the M rows of pixels to the windowing control module in units of columns.

[0177] Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

[0178] Thus, since the row buffer control module can perform write operations on the buffer body based on the size of the first filter window corresponding to the target mode signal, the pixels buffered in the buffer body can adapt to the size requirements of the filter window of different filter modes, thereby improving the versatility of the multi-mode hybrid filter circuit. On the other hand, for every M rows of pixels written, each row of pixels in the M rows is sent to the windowing control module in column units, thereby ensuring the continuity and smoothness of the filtering process and improving the filtering efficiency of the multi-mode hybrid circuit.

[0179] Furthermore, since the multi-mode hybrid filtering circuit only requires one row buffer control module and one buffer body to buffer the row pixels required for any filtering mode, compared with the related technology where each filtering mode corresponds to one row buffer control module and one buffer body, the multi-mode hybrid filtering circuit provided in this application embodiment can save hardware overhead in the multi-mode hybrid filtering circuit.

[0180] In some embodiments of this application, before step 801 above, the filtering method provided in the embodiments of this application may further include step 807, and step 801 above can be specifically implemented by step 801A below.

[0181] Step 807: The image processing device performs preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal through the preprocessing module in the image processing device, and sends the preprocessed pixels to the row buffer control module. After sending M rows of preprocessed pixels to the row buffer control module, the device sends the M+1th row of preprocessed pixels to the windowing control module.

[0182] Step 801A: The image processing device, through the windowing control module, caches pixels from the preprocessing module and the row cache control module based on the number of columns of the first filter window size to obtain a filtered pixel block.

[0183] Thus, since the preprocessing module can preprocess the image data and send the preprocessed pixels to the row buffer control module, and can synchronously send the most recently processed row M+1 pixels to the windowing control module after preprocessing M+1 rows of pixels, that is, the row M+1 pixels are sent directly by the preprocessing module to the windowing control module, compared with the scheme of waiting for the buffer to buffer M+1 rows of pixels and then sending pixels by the row buffer control module in column units, the windowing control module can obtain the filtered pixel block in a shorter time, thereby reducing the filtering latency.

[0184] In some embodiments of this application, prior to step 802 above, the filtering method provided in this application may further include step 808:

[0185] Step 808: The image processing device, through the data distribution module, selects N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generates N filter windows that correspond one-to-one with the N regions.

[0186] The N regions at least partially overlap, and each region includes at least a portion of the filtered pixel block.

[0187] Thus, since the data distribution module can select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate N filter windows that correspond one-to-one with the N regions, the pixel range covered by each filter window can meet or adapt to the filtering requirements of the corresponding filter mode, thereby improving the accuracy of distributing filter windows.

[0188] The following is a complete flowchart of the filtering method provided in the embodiments of this application.

[0189] For example, Figure 12 The multi-mode hybrid filtering method shown can be derived from... Figures 8 to 10 The image processing device executes the multi-mode hybrid filtering circuit shown, wherein... Figure 12 The execution entity, i.e., the image processing device, is omitted, such as... Figure 12 As shown, the filtering method provided in this application embodiment may include the following steps:

[0190] Step 90: At the start of an image frame, the image processing device performs a hard reset on the multi-mode mixing filter circuit to initialize all signals.

[0191] The image processing device can perform a reset on each module in the multi-mode hybrid filtering circuit.

[0192] Step 91: The image processing device determines whether frame synchronization has been completed.

[0193] The image processing device can determine whether frame synchronization processing has been completed after a hard reset.

[0194] If completed, proceed to step 92; otherwise, proceed to step 91 again.

[0195] Step 92: The image processing device performs a soft reset on the multi-mode hybrid filter circuit.

[0196] In some embodiments of this application, the image processing device can soft reset the multi-mode hybrid filter circuit after the synchronization signal of the image frame arrives.

[0197] Step 93: The image processing device determines whether the handshake between the preprocessing module and the upstream module was successful.

[0198] In some embodiments of this application, each time the preprocessing module and the upstream module successfully handshake, the image processing device retrieves a piece of data from the upstream module through the preprocessing module.

[0199] For example, the preprocessing module can take a single pixel, a row of pixels, or a block of pixels from the upstream module. This is useful for retrieving edge pixel blocks.

[0200] Step 94: The image processing device performs preprocessing on the data based on the preprocessing method corresponding to the pattern signal of the data, through the preprocessing module, obtains the preprocessing result, and sends the preprocessing result to the row buffer control module.

[0201] In some embodiments of this application, the mode signal corresponding to the aforementioned data may be: the mode signal corresponding to the image frame to which the data belongs, or the mode signal corresponding to the image block to which the data belongs, or the mode signal of the data itself. This application does not limit the specific mode signal.

[0202] Step 95: The image processing device determines whether the preprocessing module has finished preprocessing the above data.

[0203] If the process ends, proceed to step 96; otherwise, proceed to step 95 again.

[0204] Step 96: The image processing device caches the preprocessing results in the buffer body based on the filter window diameter corresponding to the above-mentioned mode signal through the line buffer control module.

[0205] Step 97: The image processing device determines whether (Dp-1) rows of pixels are cached in the buffer.

[0206] If Dp-1 rows of pixels are cached, the image processing device may proceed to step 98; otherwise, it shall proceed to step 97 again.

[0207] Step 98: The image processing device caches column pixels based on the diameter of the filter window corresponding to the above-mentioned mode signal through the windowing control module.

[0208] In some embodiments of this application, when the diameter of the filter window corresponding to the filter mode pointed to by the mode signal is Dp, the image processing device can wait for the vertical direction of the buffer to start buffering (Dp-1) rows of pixels (which can also be called data), arrange the data cached in the buffer (which can also be called preprocessing result) and the real-time data in the preprocessing module into a one-dimensional column window, and send it to the window opening control module so that the window opening control module can cache the data in the one-dimensional column window.

[0209] Step 99: The image processing device determines whether the Dp column pixels are cached in the windowing control module.

[0210] It is understandable that when the window diameter corresponding to the filtering mode pointed to by the mode signal is Dp, the windowing control module can wait for DP data to enter in the row direction. After Dp pixels enter in the row direction, it means that the windowing control module has obtained the filtered pixel block, for example, a pixel block with a size of Dp×Dp.

[0211] Step 100: The image processing device controls the windowing control module to send the cached filtered data block to the multi-mode hybrid filtering calculation module.

[0212] The data distribution module, or DeMux module, in the multi-mode hybrid filtering calculation module is used to distribute filter windows corresponding to N filtering modes. Each filter window includes at least a portion of the pixels cached by the window opening control module. The window selection module, or Mux module, in the multi-mode hybrid filtering calculation module is used to select one filter window that conforms to the current filtering mode from 1 to N filter windows based on the filtering mode indicated by the mode signal, such as the target filter window.

[0213] Step 101: The image processing device determines whether the pipeline of the multi-mode hybrid filtering calculation module is idle.

[0214] If the page is idle, proceed to step 102; otherwise, proceed to step 101 again.

[0215] Step 102: The image processing device performs filtering processing on the target filtering window according to the target filtering mode indicated by the above-mentioned mode signal through at least one pipe in the pipeline of the computing core, and obtains the filtering result.

[0216] In some embodiments of this application, the computation core can implement multiply-accumulate operations. Specifically, the computation core can select a filtering mode based on a mode signal and reuse the multipliers, adders, and registers in the computation core to perform filtering processing when the pipeline is idle, thereby obtaining the filtered result.

[0217] Step 103: The image processing device determines whether the multi-mode hybrid filtering calculation module and the downstream module have successfully shaken hands.

[0218] If the handshake is successful once, proceed to step 104; otherwise, proceed to step 103.

[0219] Step 104: The image processing device receives a filtering result calculated by the computing core through the downstream module.

[0220] In some embodiments of this application, the computing core or multi-mode hybrid filtering computing module waits to handshake with the downstream module. Each time the handshake is successful, the downstream module takes away a filtering result obtained by the multi-mode hybrid filtering computing module.

[0221] Step 105: The image processing device determines whether the frame end signal of the image frame has arrived.

[0222] If the frame end signal arrives, it indicates that the filtering of the current image frame has ended.

[0223] In the multi-mode hybrid filtering method provided in this application embodiment, since the windowing control module in the image processing device can cache the filtered pixel block of the image data (such as pixels arranged in columns) based on the first filtering window size corresponding to the target mode signal corresponding to the image data, and the computing core in the image processing device can perform filtering processing on the target filtering window (which is the filtering window corresponding to the target filtering mode indicated by the target mode signal) according to the target filtering mode, that is, it is necessary to perform filtering processing once on a certain filtered pixel block obtained by the windowing control module through the computing core, the dynamic power consumption of the filtering circuit can be reduced.

[0224] Furthermore, by coordinating the data distribution module, window selection module, and windowing control module, the number of windowing control modules and computing cores in the multi-mode hybrid filtering circuit can be reduced, thereby reducing the number of components in the filtering circuit and thus reducing the fixed power consumption and dynamic power consumption of the image processing device.

[0225] The multi-mode hybrid filtering method provided in this application embodiment can be executed by an entity that can be... Multi-mode hybrid filter Place In the embodiments of this application, Multi-mode hybrid filter device implement Multi-mode hybrid filtering Taking the method as an example, the embodiments provided in this application are explained. Multi-mode hybrid filter device .

[0226] This application provides a multi-mode hybrid filtering device, which is applied to, for example... Figures 8 to 10 The image processing device 200 shown, such as Figure 13 As shown, the multi-mode hybrid filtering device 1300 includes: a processing unit 1301;

[0227] The aforementioned processing unit 1301 is used to cache pixels in the image data based on the first filter window size corresponding to the target mode signal of the image data through the windowing control module in the aforementioned image processing device, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module in the image processing device.

[0228] The processing unit 1301 is further configured to distribute N filter windows to the window selection module in the image processing device through the data distribution module. The N filter windows correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window includes at least a portion of the filter pixel blocks. N is an integer greater than 1.

[0229] The processing unit 1301 is further configured to select a target filter window corresponding to the target filter mode from the N filter windows based on the target mode signal through the window selection module in the image processing device, wherein the size of the first filter window is the same as the size of the target filter window.

[0230] The processing unit 1301 is further configured to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal through the computing core in the image processing device, and obtain the filtering result.

[0231] In some embodiments of this application, the processing unit 1301 is further configured to generate a two-dimensional filter window including the filter pixel block according to the second filter window size through the window opening control module, and send the two-dimensional filter window to the data distribution module.

[0232] The size of the second filter window is the largest among the N filter windows.

[0233] In some embodiments of this application, the processing unit 1301 is further configured to select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes through the data distribution module, and generate the N filter windows that correspond one-to-one with the N regions.

[0234] Among them, the above N regions at least partially overlap, and each region includes at least a portion of the above-mentioned filtered pixel blocks.

[0235] In some embodiments of this application, the processing unit 1301 is further configured to write pixels from the image data into the buffer body based on the first filter window size corresponding to the target mode signal through the line buffer control module in the image processing device.

[0236] The processing unit 1301 is further configured to, through the row buffer control module, send each column of pixels in the M rows of pixels to the windowing control module in column units when writing M rows of pixels into the buffer body.

[0237] Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

[0238] In some embodiments of this application, the processing unit 1301 is further configured to perform preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal through the preprocessing module in the image processing device, and send the preprocessed pixels to the row buffer control module, and after sending M rows of preprocessed pixels to the row buffer control module, send the M+1th row of preprocessed pixels to the windowing control module.

[0239] The aforementioned processing unit 1301 is specifically used to cache pixels from the aforementioned preprocessing module and the aforementioned row cache control module based on the number of columns of the aforementioned first filter window size through the aforementioned windowing control module, thereby obtaining a filtered pixel block.

[0240] In the multi-mode hybrid filtering device provided in this application embodiment, since the windowing control module in the image processing device can cache the filtered pixel block of the image data (such as pixels arranged in columns) based on the first filtering window size corresponding to the target mode signal corresponding to the image data, and the calculation core in the image processing device can perform filtering processing on the target filtering window (which is the filtering window corresponding to the target filtering mode indicated by the target mode signal) according to the target filtering mode, that is, it is necessary to perform filtering processing once on a certain filtered pixel block obtained by the windowing control module through the calculation core, the dynamic power consumption of the filtering circuit can be reduced.

[0241] Furthermore, by coordinating the data distribution module, window selection module, and windowing control module, the number of windowing control modules and computing cores in the multi-mode hybrid filtering circuit can be reduced, thereby reducing the number of components in the filtering circuit and thus reducing the fixed power consumption and dynamic power consumption of the image processing device.

[0242] In the embodiments of this application Multi-mode hybrid filter deviceIt can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or any other device besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application does not specifically limit the scope of the embodiments.

[0243] In the embodiments of this application Multi-mode hybrid filtering The device can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems, and this application does not specifically limit the embodiments thereto.

[0244] The embodiments provided in this application Multi-mode hybrid filtering The device can achieve Figures 11 to 12 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.

[0245] Optionally, such as Figure 14 As shown, this application embodiment also provides an electronic device 1400, including a processor 1401 and a memory 1402. The memory 1402 stores a program or instructions that can run on the processor 1401. When the program or instructions are executed by the processor 1401, they implement the various steps of the above-described multi-mode hybrid filtering method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0246] Figure 15 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0247] The electronic device 1500 includes, but is not limited to: a radio frequency unit 1501, a network module 1502, an audio output unit 1503, an input unit 1504, a sensor 1505, a display unit 1506, a user input unit 1507, an interface unit 1508, a memory 1509, a processor 1510, and... Figures 8 to 10 The image processing device and other components shown.

[0248] Those skilled in the art will understand that the electronic device 1500 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1510 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 15 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0249] The processor 1510 is configured to, through the windowing control module in the image processing device, cache the pixels in the image data based on the first filter window size corresponding to the target mode signal of the image data, obtain a filter pixel block, and send the filter pixel block to the data distribution module in the image processing device.

[0250] The processor 1510 is further configured to distribute N filter windows to the window selection module in the image processing device through the data distribution module. The N filter windows correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window includes at least a portion of the filter pixel blocks. N is an integer greater than 1.

[0251] The processor 1510 is further configured to select a target filter window corresponding to the target filter mode from the N filter windows based on the target mode signal through the window selection module in the image processing device, wherein the size of the first filter window is the same as the size of the target filter window.

[0252] The processor 1510 is further configured to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal through the computing core in the image processing device, and obtain the filtering result.

[0253] In some embodiments of this application, the processor 1510 is further configured to generate a two-dimensional filter window including the filter pixel block according to the second filter window size through the windowing control module, and send the two-dimensional filter window to the data distribution module.

[0254] The size of the second filter window is the largest among the N filter windows.

[0255] In some embodiments of this application, the processor 1510 is further configured to select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes through the data distribution module, and generate the N filter windows that correspond one-to-one with the N regions.

[0256] Among them, the above N regions at least partially overlap, and each region includes at least a portion of the above-mentioned filtered pixel blocks.

[0257] In some embodiments of this application, the processor 1510 is further configured to write pixels from the image data into the buffer based on the first filter window size corresponding to the target mode signal, through the line buffer control module in the image processing device.

[0258] The processor 1510 is also configured to, when writing M rows of pixels into the cache body, send each column of pixels in the M rows of pixels to the windowing control module in column units.

[0259] Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

[0260] In some embodiments of this application, the processor 1510 is further configured to perform preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal through the preprocessing module in the image processing device, and send the preprocessed pixels to the row buffer control module, and after sending M rows of preprocessed pixels to the row buffer control module, send the M+1th row of preprocessed pixels to the windowing control module.

[0261] The processor 1510 is specifically used to cache pixels from the preprocessing module and the row cache control module based on the number of columns of the first filter window size through the windowing control module to obtain a filtered pixel block.

[0262] In the multi-mode hybrid filtering device provided in this application embodiment, since the windowing control module in the image processing device can cache the filtered pixel block of the image data (such as pixels arranged in columns) based on the first filtering window size corresponding to the target mode signal corresponding to the image data, and the calculation core in the image processing device can perform filtering processing on the target filtering window (which is the filtering window corresponding to the target filtering mode indicated by the target mode signal) according to the target filtering mode, that is, it is necessary to perform filtering processing once on a certain filtered pixel block obtained by the windowing control module through the calculation core, the dynamic power consumption of the image processing device can be reduced.

[0263] It should be understood that, in this embodiment, the input unit 1504 may include a graphics processing unit (GPU) 15041 and a microphone 15042. The GPU 15041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1506 may include a display panel 15061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1507 includes a touch panel 15071 and at least one of other input devices 15072. The touch panel 15071 is also called a touch screen. The touch panel 15071 may include a touch detection device and a touch controller. Other input devices 15072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0264] The memory 1509 can be used to store software programs and various data. The memory 1509 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1509 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1509 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0265] Processor 1510 may include one or more processing units; optionally, processor 1510 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 1510.

[0266] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described multi-mode hybrid filtering method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0267] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0268] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described multi-mode hybrid filtering method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0269] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0270] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the multi-mode hybrid filtering method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0271] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0272] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0273] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A multi-mode hybrid filter circuit, characterized in that, The filtering circuit includes: a windowing control module and a multi-mode hybrid filtering calculation module. The multi-mode hybrid filtering calculation module includes a data distribution module, a window selection module and a calculation core connected in sequence. The windowing control module is connected to the data distribution module. The windowing control module is used to cache pixels in the image data based on the first filtering window size corresponding to the target mode signal of the image data, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module. The data distribution module is used to distribute N filter windows to the window selection module. The N filter windows correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window includes at least a portion of the filter pixel blocks. N is an integer greater than 1. The window selection module is used to select a target filter window corresponding to the target filter mode from the N filter windows based on the target mode signal, wherein the size of the first filter window is the same as the size of the target filter window; The computing core is used to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal, and obtain the filtering result.

2. The filter circuit according to claim 1, characterized in that, The window opening control module is used to generate a two-dimensional filter window including the filter pixel block according to the second filter window size, and send the two-dimensional filter window to the data distribution module. Wherein, the size of the second filter window is the size of the largest filter window among the N filter windows.

3. The filter circuit according to claim 2, characterized in that, The data distribution module is further configured to select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate the N filter windows that correspond one-to-one with the N regions; The N regions at least partially overlap, and each region includes at least a portion of the filtered pixel block.

4. The filter circuit according to any one of claims 1 to 3, characterized in that, The filtering circuit also includes: a line buffer control module and a buffer body; The input terminal of the buffer body is connected to the first output terminal of the row buffer control module, the output terminal of the buffer body is connected to the first input terminal of the row buffer control module, and the second output terminal of the row buffer control module is connected to the first input terminal of the window opening control module. The row buffer control module is used to write pixels from the image data into the buffer body based on the first filter window size corresponding to the target mode signal; and when M rows of pixels are written into the buffer body, to send each column of pixels in the M rows of pixels to the windowing control module in column units; Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

5. The filter circuit according to claim 4, characterized in that, The filtering circuit further includes: a preprocessing module; The output of the preprocessing module is connected to the second input of the row cache control module and the second input of the windowing control module, respectively. The preprocessing module is configured to perform preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal, and send the preprocessed pixels to the row buffer control module, and after sending M rows of preprocessed pixels to the row buffer control module, send the M+1th row of preprocessed pixels to the windowing control module. The windowing control module is used to cache pixels from the preprocessing module and the row cache control module based on the number of columns of the first filter window size to obtain a filtered pixel block.

6. The filter circuit according to claim 4 or 5, characterized in that, The maximum number of cache rows in the cache body is determined by the number of rows in the second filter window size, and the maximum number of cache columns in the windowing control module is determined by the number of columns in the second filter window size; Wherein, the size of the second filter window is the size of the largest filter window among the N filter windows.

7. An image processing apparatus, characterized in that, The image processing device includes: a windowing control module and a multi-mode hybrid filtering calculation module. The multi-mode hybrid filtering calculation module includes a data distribution module, a window selection module and a calculation core connected in sequence. The windowing control module is connected to the data distribution module. The windowing control module is used to cache pixels in the image data based on the first filtering window size corresponding to the target mode signal of the image data, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module. The data distribution module is used to distribute N filter windows to the window selection module. The N filter windows correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window includes at least a portion of the filter pixel blocks. N is an integer greater than 1. The window selection module is used to select a target filter window corresponding to the target filter mode from the N filter windows based on the target mode signal, wherein the size of the first filter window is the same as the size of the target filter window; The computing core is used to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal, and obtain the filtering result.

8. The image processing apparatus according to claim 7, characterized in that, The window opening control module is used to generate a two-dimensional filter window including the filter pixel block according to the second filter window size, and send the two-dimensional filter window to the data distribution module. Wherein, the size of the second filter window is the size of the largest filter window among the N filter windows.

9. The image processing apparatus according to claim 8, characterized in that, The data distribution module is further configured to select N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generate the N filter windows that correspond one-to-one with the N regions; The N regions at least partially overlap, and each region includes at least a portion of the filtered pixel block.

10. The image processing apparatus according to any one of claims 7 to 9, characterized in that, The image processing device further includes: a row cache control module and a cache body; The input terminal of the buffer body is connected to the first output terminal of the row buffer control module, the output terminal of the buffer body is connected to the first input terminal of the row buffer control module, and the second output terminal of the row buffer control module is connected to the first input terminal of the window opening control module. The row buffer control module is used to write pixels from the image data into the buffer body based on the first filter window size corresponding to the target mode signal; and when writing M rows of pixels into the buffer body, it sends each column of pixels in the M rows of pixels to the windowing control module in column units. Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

11. The image processing apparatus according to claim 10, characterized in that, The image processing device further includes: a preprocessing module; The output of the preprocessing module is connected to the second input of the row cache control module and the second input of the windowing control module, respectively. The preprocessing module is configured to perform preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal, and send the preprocessed pixels to the row buffer control module, and after sending M rows of preprocessed pixels to the row buffer control module, send a row of preprocessed pixels to the windowing control module. The windowing control module is used to cache pixels from the preprocessing module and the row cache control module based on the number of columns of the first filter window size to obtain a filtered pixel block.

12. The image processing apparatus according to claim 10 or 11, characterized in that, The maximum number of cache rows in the cache body is determined by the number of rows in the second filter window size, and the maximum number of cache columns in the windowing control module is determined by the number of columns in the second filter window size; Wherein, the size of the second filter window is the size of the largest filter window among the N filter windows.

13. A multi-mode hybrid filtering method, characterized in that, Applied to the image processing apparatus of any one of claims 7 to 12, the method comprises: The image processing device uses a windowing control module to cache pixels in the image data based on the first filter window size corresponding to the target mode signal of the image data, obtains a filter pixel block, and sends the filter pixel block to the data distribution module in the image processing device. The data distribution module distributes N filter windows to the window selection module in the image processing device. The N filter windows correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window includes at least a portion of the filter pixel blocks. N is an integer greater than 1. The window selection module in the image processing device selects a target filter window corresponding to the target filter mode from the N filter windows based on the target mode signal, wherein the size of the first filter window is the same as the size of the target filter window. The image processing device uses a computing core to perform filtering on the target filtering window according to the target filtering mode indicated by the target mode signal, and obtains the filtering result.

14. The method according to claim 13, characterized in that, The step of sending the filtered pixel block to the data distribution module in the image processing device via the windowing control module includes: The windowing control module generates a two-dimensional filter window including the filter pixel block according to the second filter window size, and sends the two-dimensional filter window to the data distribution module. Wherein, the size of the second filter window is the size of the largest filter window among the N filter windows.

15. The method according to claim 14, characterized in that, The method further includes: The data distribution module selects N regions from the two-dimensional filter window according to the size of the filter window corresponding to the N filter modes, and generates N filter windows that correspond one-to-one with the N regions. The N regions at least partially overlap, and each region includes at least a portion of the filtered pixel block.

16. The method according to claim 14, characterized in that, The method further includes: The image data pixels are written into the buffer body by the row buffer control module in the image processing device based on the size of the first filter window corresponding to the target mode signal. When writing M rows of pixels into the cache body, the row cache control module sends each column of pixels in the M rows of pixels to the windowing control module in column units. Where M is equal to the number of rows of the first filter window size minus 1, and M is a positive integer.

17. The method according to claim 15, characterized in that, The method further includes: The preprocessing module in the image processing device performs preprocessing on the pixels in the image data according to the preprocessing method corresponding to the mode signal, and sends the preprocessed pixels to the row buffer control module. After sending M rows of preprocessed pixels to the row buffer control module, the preprocessed M+1th row of pixels is sent to the windowing control module. The step of using the windowing control module in the image processing device to cache pixels in the image data based on the number of columns of the first filtering window corresponding to the target mode signal of the image data to obtain a filtered pixel block includes: The windowing control module caches pixels from the preprocessing module and the row cache control module based on the number of columns of the first filter window size to obtain a filtered pixel block.

18. A multi-mode hybrid filtering device, characterized in that, The multi-mode hybrid filtering device includes: a processing unit; The processing unit is configured to cache pixels in the image data based on the first filter window size corresponding to the target mode signal of the image data through the windowing control module in the image processing device, obtain a filtered pixel block, and send the filtered pixel block to the data distribution module in the image processing device. The processing unit is further configured to distribute N filter windows to the window selection module in the image processing device through the data distribution module. The N filter windows correspond one-to-one with N filter modes. The N filter modes include the target filter mode indicated by the target mode signal. Each filter window includes at least a portion of the filter pixel blocks. N is an integer greater than 1. The processing unit is further configured to select a target filter window corresponding to the target filter mode from the N filter windows based on the target mode signal through the window selection module in the image processing device, wherein the size of the first filter window is the same as the size of the target filter window; The processing unit is further configured to perform filtering processing on the target filtering window according to the target filtering mode indicated by the target mode signal through the computing core in the image processing device, and obtain the filtering result.

19. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the multi-mode hybrid filtering method as described in any one of claims 13-17.

20. A chip, characterized in that, The chip includes a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the multi-mode hybrid filtering method as described in any one of claims 13-17.