A data processing component and chip, data processing method and device

By designing a 2M memory array to store an M-dimensional lookup table and using the parity attribute to determine the memory, the system can read multiple coordinate lookup results at once, solving the problem of slow processing speed in 3D-LUT and improving data processing speed.

CN113448883BActive Publication Date: 2026-03-27AXERA SEMICON (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-25
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In a 3D display lookup table (3D-LUT), because the SRAM has only one read/write port, the value of different points in the same memory needs to be read eight times, which makes the processing slow.

Method used

Design a memory array with 2M memory cells to store an M-dimensional lookup table. Each memory cell stores coordinates with the same parity attribute, while different memory cells store coordinates with different parity attributes. The memory cell is determined by the parity attribute, enabling the reading of multiple coordinate lookup results at once.

Benefits of technology

It improves the processing speed of data retrieval from the lookup table, avoiding the slow process caused by multiple reads.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113448883B_ABST
    Figure CN113448883B_ABST
Patent Text Reader

Abstract

This application provides a data processing component and chip, a data processing method and apparatus. The data processing component includes a computing unit and a memory array, the memory array including 2... M One memory, computing unit and the 2 M Each memory in the memory array is connected via 2... M Each memory unit stores an M-dimensional lookup table, which includes the coordinates of multiple points in M-dimensional space and the lookup result for each coordinate. Wherein, 2 M The coordinates stored in each of the 2 memory locations have the same parity attribute, and 2 M The parity of coordinates stored in different memories within a single memory is different. Specifically, the parity of two coordinates being the same means that the values ​​of the same channel of the two coordinates are parity-neutral.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of display lookup table, in particular to a data processing component and chip, a data processing method and device. BACKGROUND

[0002] Display lookup table (LUT) is to find a value in the table according to the input of a certain value, as the output value. In the field of image display, through the display lookup table, the value of the image can be converted, so as to realize certain processing on the image.

[0003] In hardware implementation, the display lookup table LUT is stored in the memory, and the storage of the lookup table is completed by writing to the memory, and the lookup table process is realized by reading the memory.

[0004] Due to limited hardware resources, it is impossible to have a corresponding value in the display lookup table for each input, and the interpolation method needs to be used to calculate the output value for the input data without a corresponding value; taking a three-dimensional display lookup table (3D-LUT) as an example, the LUT values of eight grid points near the point are found by rounding up and down the coordinates of three dimensions, and the output value corresponding to the point is calculated using these values and a specific interpolation method.

[0005] In the interpolation implementation of 3D-LUT, the key part is to read the values of eight points around the input point, and since the SRAM has only one read-write port, only one point value can be read at a time. In order to obtain the values of all eight points, the values of different points in the same memory need to be read eight times, which causes the processing process to be slow. SUMMARY

[0006] The purpose of the embodiments of the present application is to provide a data processing component and chip, a data processing method and device to solve the above problems.

[0007] In a first aspect, the present application provides a data processing component, comprising: a calculation unit and a memory array, the memory array comprising two M memory, the calculation unit being connected with each of the two M memory; the memory array stores an M-dimensional lookup table through the two M memory, the M-dimensional lookup table comprising coordinates of a plurality of points in an M-dimensional space and a coordinate lookup result corresponding to each coordinate, wherein the parity attribute of the coordinates stored in each of the two M memory is the same, and the parity attribute of the coordinates stored in different memories of the two M memory is different, wherein the parity attribute of two coordinates being the same means that the parity of the values of the same channels of the two coordinates is the same; the calculation unit is configured to obtain the twoM a parity attribute of each conversion coordinate, determining a memory corresponding to each conversion coordinate according to the parity attribute of each conversion coordinate, and obtaining a coordinate lookup result corresponding to each conversion coordinate by querying each conversion coordinate in the corresponding memory, to obtain a plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed.

[0008] In the data processing assembly designed above, the present application stores the M-dimensional lookup table in the memory array of the two M memory, and the parity attribute of the coordinates in the lookup table stored by each memory is the same, and the parity attribute of the coordinates in the lookup table stored by different memories is different, so that when the M-dimensional coordinate to be processed is looked up, the memory corresponding to each conversion coordinate can be determined based on the parity attribute of the two M conversion coordinates around the M-dimensional coordinate to be processed, the coordinate lookup result corresponding to each conversion coordinate can be obtained by querying each conversion coordinate in the corresponding memory, and then the plurality of coordinate lookup results corresponding to the two M conversion coordinates around the M-dimensional coordinate to be processed can be obtained, and multiple readings are not required to slow down the data processing process, thereby improving the processing speed of the lookup table data acquisition.

[0009] In an optional implementation of the first aspect, the data processing assembly further comprises an interpolation unit, which is electrically connected to the calculation unit; the interpolation unit is configured to receive the plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed, and perform interpolation calculation on the plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed to obtain an M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0010] In an optional implementation of the first aspect, the calculation unit is further configured to perform interpolation calculation on the plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed to obtain an M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0011] In an optional implementation of the first aspect, the number of memories is eight, and the coordinates of the points in the M-dimensional space are three-dimensional coordinates.

[0012] In an optional embodiment of the first aspect, the three-dimensional coordinates include a red channel, a green channel, and a blue channel; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the first memory are all even; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the second memory are all odd; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the third memory are all even; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the fourth memory are all odd; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the fifth memory are all even; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the sixth memory are all odd; the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the seventh memory are all even; and the red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the eighth memory are all odd.

[0013] In a second aspect, the present invention provides a data processing method applied to a data processing component, the processing component including a memory array, the memory array comprising 2 M The method includes: acquiring M-dimensional coordinates to be processed; determining the corresponding 2D coordinates based on the M-dimensional coordinates to be processed. M Each transformation coordinate is a single coordinate; the memory corresponding to each transformation coordinate is determined based on its parity attribute, wherein the memory array is configured through the two... M Each memory stores an M-dimensional lookup table, which includes the coordinates of multiple points in an M-dimensional space and the lookup result for each coordinate. The 2... M The coordinates stored in each of the two memories have the same parity attribute, and the 2 M The parity attributes of coordinates stored in different memories are different. The same parity attribute of two coordinates means that the parity of the values ​​of the same channel of the two coordinates is the same. According to each transformed coordinate, the coordinate lookup result corresponding to each transformed coordinate is obtained by querying the corresponding memory, and multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed are obtained.

[0014] In the data processing method described above, this scheme designs 2 MThe memory arrays of the memories store M-dimensional lookup tables, and the parity of the coordinates in the lookup table stored by each memory is the same, and the parity of the coordinates in the lookup table stored by different memories is different, so that when a lookup is performed on an M-dimensional coordinate to be processed, the parity of 2 M transformed coordinates around the M-dimensional coordinate to be processed can be determined based on the parity of the transformed coordinates, and the coordinate lookup result corresponding to each transformed coordinate can be obtained by querying each transformed coordinate in the corresponding memory, so that the multiple coordinate lookup results corresponding to the 2 M transformed coordinates around the M-dimensional coordinate to be processed can be obtained, and multiple readings are not required, so that the data processing process is not slowed down, and the processing speed of the lookup table data acquisition is improved.

[0015] In an optional implementation of the second aspect, the determining the 2 M transformed coordinates corresponding to the M-dimensional coordinate to be processed comprises: performing upward rounding and downward rounding on the value of each channel in the M-dimensional coordinate to be processed to obtain the 2 M transformed coordinates corresponding to the M-dimensional coordinate to be processed.

[0016] In an optional implementation of the second aspect, after the querying each transformed coordinate in the corresponding memory to obtain the coordinate lookup result corresponding to each transformed coordinate to obtain the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed, the method further comprises: performing interpolation calculation on the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed to obtain the M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0017] In an optional implementation of the second aspect, the performing interpolation calculation on the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed to obtain the M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed comprises: determining a starting point of the interpolation calculation in the multiple coordinate lookup results according to the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed; determining the order of the multiple coordinate lookup results according to the starting point; and performing interpolation calculation on the multiple coordinate lookup results according to the order of the multiple coordinate lookup results to obtain the M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0018] In an optional implementation of the second aspect, the determining the memory corresponding to each transformed coordinate according to the parity of each transformed coordinate comprises: calculating the remainder of the value of each channel of each transformed coordinate divided by 2; determining the parity of the value of each channel of each transformed coordinate according to the remainder of the value of each channel of each transformed coordinate divided by 2; and determining the memory in which the corresponding parity is stored according to the parity of the value of each channel of each transformed coordinate to obtain the memory corresponding to each transformed coordinate.

[0019] In a third aspect, the present application provides a data processing apparatus applied to a data processing component, wherein the data processing component comprises a memory array, and the memory array comprises two memory units. M The data processing apparatus comprises: an acquisition module, configured to acquire an M-dimensional coordinate to be processed; a determination module, configured to determine two conversion coordinates corresponding to the M-dimensional coordinate to be processed according to the M-dimensional coordinate to be processed; and determine a memory unit corresponding to each conversion coordinate according to the parity of each conversion coordinate; wherein the memory array stores an M-dimensional lookup table through the two memory units, and the M-dimensional lookup table comprises coordinates of a plurality of points in an M-dimensional space and a coordinate lookup result corresponding to each coordinate; wherein the parity of the coordinates stored in each memory unit is the same, and the parity of the coordinates stored in different memory units is different; and a query module, configured to acquire the coordinate lookup result corresponding to each conversion coordinate by querying each conversion coordinate in the corresponding memory unit, so as to obtain a plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed. M M M M M M M M

[0020] In the data processing apparatus, the M-dimensional lookup table is stored in the memory array with two memory units, and the parity of the coordinates stored in each memory unit is the same, and the parity of the coordinates stored in different memory units is different, so that when the M-dimensional coordinate to be processed is queried, the memory unit corresponding to each conversion coordinate can be determined based on the parity of the two conversion coordinates around the M-dimensional coordinate to be processed, and the coordinate lookup result corresponding to each conversion coordinate can be obtained by querying each conversion coordinate in the corresponding memory unit, and then a plurality of coordinate lookup results corresponding to the two conversion coordinates around the M-dimensional coordinate to be processed can be obtained, so that the data processing process is not slow due to multiple reading, and the processing speed of the lookup table data acquisition is improved.

[0021] In an optional implementation of the third aspect, the determination module is specifically configured to round up and round down the value of each channel in the M-dimensional coordinate to be processed, so as to obtain the two conversion coordinates corresponding to the M-dimensional coordinate to be processed.

[0022] In an optional implementation of the third aspect, the apparatus further comprises an interpolation calculation module, configured to perform interpolation calculation on the plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed, so as to obtain an M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.​​​​​​​​

[0023] In optional implementation of the third aspect, the determining module is specifically configured to calculate the remainder of each channel value of each conversion coordinate with 2; determine the parity of each channel value of each conversion coordinate according to the remainder of each channel value of each conversion coordinate with 2; and determine the memory with a corresponding parity attribute according to the parity of each channel value of each conversion coordinate, to obtain the memory corresponding to each conversion coordinate.

[0024] In a fourth aspect, the application provides a chip, which comprises the data processing assembly in any optional implementation of the first aspect.

[0025] In a fifth aspect, the embodiments provide an electronic device, which comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to execute the method in the second aspect or any optional implementation of the second aspect.

[0026] In a sixth aspect, the embodiments provide a storage medium, which stores a computer program, and the computer program is executed by a processor to execute the method in the second aspect or any optional implementation of the second aspect.

[0027] In a seventh aspect, the embodiments provide a computer program product, which, when running on a computer, causes the computer to execute the method in the second aspect or any optional implementation of the second aspect. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0029] Figure 1 The first structural schematic diagram of the data processing assembly provided by the embodiments of the present application;

[0030] Figure 2 The second structural schematic diagram of the data processing assembly provided by the embodiments of the present application;

[0031] Figure 3 The structural schematic diagram of the chip provided by the embodiments of the present application;

[0032] Figure 4 The first flowchart of the data processing method provided by the embodiments of the present application;

[0033] Figure 5A second flowchart of the data processing method provided in the embodiments of this application;

[0034] Figure 6 A third flowchart illustrating the data processing method provided in this application embodiment;

[0035] Figure 7 A fourth flowchart of the data processing method provided in the embodiments of this application;

[0036] Figure 8 The fifth flowchart of the data processing method provided in the embodiments of this application;

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

[0038] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0039] Icons: 1-Data processing component; 3-Chip; 10-Computing unit; 20-Memory array; 201-Memory; 30-Interpolation unit; 900-Acquisition module; 910-Determination module; 920-Query module; 930-Interpolation calculation module; 100-Electronic device; 1001-Processing element; 1002-Storage element; 1003-Communication bus. Detailed Implementation

[0040] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0041] This application provides a data processing component 1, which is designed with multiple storage devices to jointly store a lookup table. This allows for the simultaneous reading of multiple query results corresponding to an input point in a single read operation, enabling rapid processing and display of the lookup table data. Figure 1 As shown, the data processing component includes a computing unit 10 and a memory array 20, the memory array 20 including 2 M Each memory 201 in the computing unit 10 and the memory array 20 is connected via two memory arrays. M A memory 201 stores an M-dimensional lookup table, which includes the coordinates of multiple points in an M-dimensional space and the lookup result for each coordinate. M The coordinates stored in each memory 201 have the same parity attribute, and the coordinates stored in different memories 201 have different parity attributes. The same parity attribute for two coordinates means that the values ​​of the same channel of the two coordinates have the same parity.

[0042] The above design can be understood by the following example: assuming that the data processing component of the present application processes image color data and M is 3, the number of memory arrays 20 is 8, the M-dimensional lookup table is a three-dimensional display lookup table, the coordinates of the point in the M-dimensional space are three-dimensional coordinates, and each three-dimensional coordinate corresponds to a coordinate lookup result. For example, when the three-dimensional coordinates are the three-dimensional space color coordinates RGB, the RGB is assumed to be (50, 50, 50), and the corresponding coordinate lookup result RGB is (70, 70, 70). When the three-dimensional space color coordinates RGB are (50, 70, 50), the corresponding coordinate lookup result RGB is (85, 90, 70). Since the value range of each channel of RGB can be 0-255, when the three-dimensional display lookup table is used, the number of three-dimensional space color coordinates RGB is at most 256*256*256.

[0043] As a possible implementation, the three-dimensional space color coordinates include the values of the red, green and blue channels, and each channel value is a dimension data. According to the parity of each channel value, the three-dimensional space color coordinates can be divided into eight cases. For the convenience of subsequent description, the red channel value is represented as R-E when it is even; the red channel value is represented as R-O when it is odd; the green channel value is represented as G-E when it is even; the green channel value is represented as G-O when it is odd; the blue channel value is represented as B-E when it is even; and the blue channel value is represented as B-O when it is odd. Then the eight cases are: the coordinates of (R-E, G-E, B-E); the coordinates of (R-O, G-E, B-E); the coordinates of (R-E, G-O, B-E); the coordinates of (R-O, G-O, B-E); the coordinates of (R-E, G-E, B-O); the coordinates of (R-O, G-E, B-O); the coordinates of (R-E, G-O, B-O); and the coordinates of (R-O, G-O, B-O).

[0044] Assuming that the eight memories 201 are static random access memories (SRAMs), the coordinates of (R-E, G-E, B-E) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM1, the coordinates of (R-O, G-E, B-E) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM2, the coordinates of (R-E, G-O, B-E) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM3, the coordinates of (R-O, G-O, B-E) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM4, the coordinates of (R-E, G-E, B-O) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM5, the coordinates of (R-O, G-E, B-O) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM6, the coordinates of (R-E, G-O, B-O) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM7, and the coordinates of (R-O, G-O, B-O) and the coordinate lookup results corresponding to each coordinate can be stored in SRAM8.

[0045] It should be noted that the above-mentioned three-dimensional lookup table is only one application scenario of the present application, and the present application is also applicable to two-dimensional lookup tables, four-dimensional lookup tables, or lookup tables with more dimensions, and the memory 201 in the present application can also be an SRAM or other types of memories.

[0046] In the application of the above-mentioned data processing assembly, the computing unit 10 can receive an M-dimensional coordinate to be processed, obtain 2 M transformed coordinates around the M-dimensional coordinate to be processed, determine the memory 201 corresponding to each transformed coordinate according to the parity of each transformed coordinate, and then find the coordinate lookup result corresponding to each transformed coordinate in the corresponding memory according to each transformed coordinate, thereby obtaining a plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed.

[0047] In the above-mentioned data processing assembly, the present application stores an M-dimensional lookup table in the memory array of two M memories, and the parity of the coordinates in the lookup table stored in each memory is the same, and the parity of the coordinates in the lookup table stored in different memories is different, so that when the M-dimensional coordinate to be processed is searched, the memory corresponding to each transformed coordinate can be determined based on the parity of the 2 M transformed coordinates around the M-dimensional coordinate to be processed, and the coordinate lookup result corresponding to each transformed coordinate can be obtained by searching in the corresponding memory according to each transformed coordinate, thereby obtaining the 2 MThe plurality of coordinate lookup results corresponding to the conversion coordinates are obtained without multiple reading to slow down the data processing process, and the processing speed of the lookup table data acquisition is improved.

[0048] As a possible implementation, the computing unit 10 can perform interpolation calculation on the plurality of coordinate lookup results corresponding to the M-dimensional coordinates to obtain the M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed.

[0049] As another possible implementation, as shown in the figure, Figure 2 The data processing assembly can further include an interpolation unit 30 electrically connected with the computing unit 10. The interpolation unit 30 can receive the plurality of coordinate lookup results corresponding to the M-dimensional coordinates to be processed transmitted by the computing unit 10, and then perform interpolation calculation on the plurality of coordinate lookup results to obtain the M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed.

[0050] As shown in the figure, Figure 3 The chip 3 can include the data processing assembly of any of the foregoing embodiments.

[0051] The present application provides a data processing method, which can be applied to the foregoing data processing assembly. As shown in the figure, Figure 4 The method can include the following steps:

[0052] Step S400: Obtain the M-dimensional coordinates to be processed.

[0053] Step S410: Determine the 2 M conversion coordinates corresponding to the M-dimensional coordinates to be processed according to the M-dimensional coordinates to be processed.

[0054] Step S420: Determine the memory corresponding to each conversion coordinate according to the parity attribute of each conversion coordinate.

[0055] Step S430: Obtain the coordinate lookup result corresponding to each conversion coordinate in the corresponding memory according to each conversion coordinate to obtain the plurality of coordinate lookup results corresponding to the M-dimensional coordinates to be processed.

[0056] In step S400, the M-dimensional coordinates to be processed can be the coordinates received by the data processing assembly. Each coordinate value in the M-dimensional coordinates represents a dimension. For example, when the M-dimensional coordinates are three-dimensional coordinates, they can be color data coordinates, i.e., RGB coordinates, and each color channel represents a dimension. It should be noted that the M-dimensional coordinates in the present application do not have corresponding coordinate lookup results in the M-dimensional lookup table.

[0057] In step S410, since there is no coordinate lookup result of the M-dimensional coordinate to be processed in the M-dimensional lookup table, it is necessary to obtain 2 M conversion coordinates around the M-dimensional coordinate to be processed. Specifically, as a possible implementation, the conversion process of step S410 can include the following steps:

[0058] Step S500: rounding up and rounding down the value of each channel in the M-dimensional coordinate to be processed to obtain 2 M conversion coordinates corresponding to the M-dimensional coordinate to be processed.

[0059] In step S500, taking RGB coordinates as an example, assuming that the RGB coordinates are (15.1, 15.1, 15.1), rounding up and rounding down the RGB coordinates can obtain 2 3 conversion coordinates, i.e., 8 conversion coordinates, which are (15, 15, 15), (15, 15, 16), (15, 16, 15), (16, 15, 15), (16, 16, 15), (16, 15, 16), (15, 16, 16), (16, 16, 16), i.e., the coordinate values of eight vertices of the unit cube of the RGB coordinates.

[0060] It should be noted that the above is based on three-dimensional coordinates to explain step S500, and the conversion process of other dimensions is consistent.

[0061] In step S420, the parity attribute of the coordinates stored in each of the two M memory is the same, and the parity attribute of the coordinates stored in different ones of the two M memory is different, so that after obtaining the 2 M conversion coordinates based on step S410, the memory corresponding to each conversion coordinate can be determined based on the parity attribute of each conversion coordinate.

[0062] As a possible implementation, step S420 determines the memory corresponding to each conversion coordinate according to the parity attribute of each conversion coordinate, as shown in Figure 6 , which can include the following steps:

[0063] Step S600: calculating the remainder of the value of each channel of each conversion coordinate divided by 2.

[0064] Step S610: determining the parity of the value of each channel of each conversion coordinate according to the remainder of the value of each channel of each conversion coordinate divided by 2.

[0065] Step S620: determining the memory with the corresponding parity attribute according to the parity of the value of each channel of each conversion coordinate to obtain the memory corresponding to each conversion coordinate.

[0066] The above steps can be understood according to the foregoing example: assuming that the conversion coordinates are the foregoing (16, 16, 16), and the red channel R, the green channel G, and the blue channel B are all 16, then the value 16 of the red channel R, the green channel G, and the blue channel B are all divided by 2 to obtain the remainder, and the remainder of the red channel R, the green channel G, and the blue channel B is all 0, so it can be determined that the red channel R, the green channel G, and the blue channel B are all even numbers, and in the foregoing example, the RGB channels in the SRAM1 are all even numbers, so the memory corresponding to the conversion coordinates (16, 16, 16) is the foregoing SRAM1; similarly, the red channel R, the green channel G, and the blue channel B of the conversion coordinates (15, 15, 15) are all 15, so the value 15 of the red channel R, the green channel G, and the blue channel B are all divided by 2 to obtain the remainder, and the remainder of the red channel R, the green channel G, and the blue channel B is all 1, so it can be determined that the red channel R, the green channel G, and the blue channel B are all odd numbers, and in the foregoing example, the RGB channels in the SRAM8 are all odd numbers, so the memory corresponding to the conversion coordinates (15, 15, 15) is the foregoing SRAM8, and the remaining conversion coordinates are sequentially determined according to the odd-even attribute to determine the corresponding memory of each conversion coordinates.

[0067] In step S430, the way of querying the corresponding coordinate search result in the corresponding memory according to the conversion coordinates can include the following multiple ways: as a possible implementation manner, the coordinate data of the conversion coordinates is used to search for the coordinates of the M-dimensional space point in the corresponding memory, and then the coordinate search result of the coordinate mapping of the searched M-dimensional space point is obtained, and the coordinate search result corresponding to each conversion coordinates is obtained. For example, the coordinate search result mapped by the three-dimensional coordinate point (16, 16, 16) in the memory SRAM1 is (26, 26, 26), so step S430 can search for the three-dimensional coordinate point (16, 16, 16) stored in the memory SRAM1 based on the conversion coordinates (16, 16, 16), and then obtain the coordinate search result (26, 26, 26) mapped by the three-dimensional coordinate point (16, 16, 16), and the remaining conversion coordinates can also obtain the corresponding coordinate search result in the same way, and then obtain multiple coordinate search results corresponding to the M-dimensional coordinates to be processed.

[0068] As another possible implementation, each memory can be assigned or defined with a query address of each coordinate of the point in the M-dimensional space stored in the memory, and after determining the memory corresponding to the conversion coordinate, the corresponding coordinate lookup result can be obtained according to the query address corresponding to the conversion coordinate. For example, the coordinate lookup result of the three-dimensional coordinate point (16, 16, 16) mapped in the memory SRAM1 is (26, 26, 26), and the query address of the three-dimensional coordinate point and the coordinate lookup result is defined in the memory in advance as 512, so that when the conversion point (16, 16, 16) is looked up, the query address 512 can be obtained based on the conversion point (16, 16, 16), and then the corresponding coordinate lookup result (26, 26, 26) can be obtained based on the query address 512, and the corresponding coordinate lookup result of the remaining conversion coordinates can also be obtained in the same way, and then the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed are obtained.

[0069] In an optional implementation of the embodiment, after step S430, as shown in Figure 7 the scheme can further include the following steps:

[0070] Step S700: performing interpolation calculation on the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed to obtain the M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0071] In step S700, after the multiple coordinate lookup results are obtained by lookup, the final M-dimensional output coordinate can be obtained by interpolation calculation, and the interpolation method can use any existing interpolation calculation method.

[0072] As a possible implementation, as shown in Figure 8 step S700 can specifically include the following steps:

[0073] Step S800: determining the starting point of interpolation calculation in the multiple coordinate lookup results according to the multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed.

[0074] Step S810: determining the order of the multiple coordinate lookup results according to the starting point.

[0075] Step S820: performing interpolation calculation on the multiple coordinate lookup results according to the order of the multiple coordinate lookup results to obtain the M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0076] In step S800, the interpolation calculation is performed in sequence according to the order of the multiple points, and therefore, the starting point of the order needs to be determined. The starting point of the difference calculation designed in the scheme of the application can be the coordinate lookup result found by the conversion coordinate by taking each dimension / channel down to the integer part as the starting point, or can be the coordinate lookup result found by the conversion coordinate by taking each dimension / channel up to the integer part as the starting point.

[0077] In step S810, the order of the plurality of coordinate search results can be determined based on the starting point determined in step S810. For example, if the coordinate search result obtained by the SRAM1 query is the starting point, the order is that the coordinate search result obtained by the SRAM1 query is ranked first, the coordinate search result obtained by the SRAM2 query is ranked second, the coordinate search result obtained by the SRAM3 query is ranked third, and so on, and the coordinate search result obtained by the SRAM8 query is ranked eighth.

[0078] In step S820, the M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed can be obtained by using the interpolation calculation method according to the order of the plurality of coordinate search results determined. Specifically, in the interpolation calculation, the order affects the weight corresponding to each coordinate search result, and the weights corresponding to different orders are different. For example, taking the RGB coordinates as an example, the R channel value of the final RGB output coordinates is equal to the sum of the R channel weights of each coordinate search result, and the R channel weight of each coordinate search result is equal to the product of the R channel value of each coordinate search result and the corresponding weight; the G channel and the B channel of the RGB output coordinates are also calculated in the same interpolation calculation manner, and the RGB output coordinates are obtained.

[0079] In the above-mentioned data processing method, the present scheme stores the M-dimensional lookup table in the memory array of the two M M M

[0080] Figure 9 The schematic structural block diagram of the data processing device provided by the present application is shown, and it should be understood that the device and the above-mentioned Figures 4 to 8 ​​​The method embodiment executed in the above text corresponds to the steps involved in the aforementioned method. The specific functions of this device can be found in the description above; to avoid repetition, detailed descriptions are omitted here. This device includes at least one software function module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware. Specifically, the device includes: an acquisition module 900, used to acquire the M-dimensional coordinates to be processed; and a determination module 910, used to determine the 2D coordinates corresponding to the M-dimensional coordinates to be processed based on the M-dimensional coordinates to be processed. M Each transformation coordinate has 2 transformation coordinates; and the memory corresponding to each transformation coordinate is determined based on its parity attribute, wherein the memory array is configured using 2... M Each memory unit stores an M-dimensional lookup table, which includes the coordinates of multiple points in an M-dimensional space and the lookup result for each coordinate. Among these, 2 M The coordinates stored in each of the 2 memory locations have the same parity attribute, and 2 M The parity attributes of the coordinates stored in different memories are different. The same parity attribute of two coordinates means that the parity of the values ​​of the same channel of the two coordinates is the same. The query module 920 is used to query the corresponding memory according to each transformed coordinate to obtain the coordinate lookup result corresponding to each transformed coordinate, and obtain multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed.

[0081] In the data processing device designed above, this solution achieves this through the design of 2 M An array of memory stores an M-dimensional lookup table. The coordinates in the lookup table stored in each memory have the same parity attribute, while the coordinates in the lookup tables stored in different memories have different parity attributes. This allows for searching for M-dimensional coordinates based on the surrounding 2D coordinates. M The parity attribute of each transformed coordinate can determine the memory corresponding to each transformed coordinate. By querying the corresponding memory for each transformed coordinate, the coordinate lookup result for each transformed coordinate can be obtained. Furthermore, the 2D coordinates surrounding the M-dimensional coordinates to be processed can also be obtained. M The lookup results for multiple coordinates corresponding to a single transformed coordinate do not require multiple reads, which slows down the data processing and improves the speed of data retrieval from the lookup table.

[0082] In an optional embodiment of this example, the determining module 910 is specifically used to round up and down the value of each channel in the M-dimensional coordinates to be processed, to obtain the 2 corresponding to the M-dimensional coordinates to be processed. M Transformed coordinates.

[0083] In an optional implementation of the embodiment, the device further comprises an interpolation calculation module 930 configured to perform interpolation calculation on the plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed to obtain an M-dimensional output coordinate corresponding to the M-dimensional coordinate to be processed.

[0084] In an optional implementation of the embodiment, the determining module 910 is specifically configured to: calculate a remainder of each channel value of each conversion coordinate with respect to 2; determine a parity of each channel value of each conversion coordinate according to the remainder of each channel value of each conversion coordinate with respect to 2; and determine a memory with a corresponding parity attribute according to the parity of each channel value of each conversion coordinate, to obtain a memory corresponding to each conversion coordinate.

[0085] As shown in Figure 10 The present application provides an electronic device 100, comprising: a processing element 1001 and a storage element 1002, the processing element 1001 and the storage element 1002 are interconnected and communicate with each other through a communication bus 1003 and / or other forms of connection mechanism (not marked), the storage element 1002 stores a computer program executable by the processing element 1001, when the computing device is running, the processing element 1001 executes the computer program to execute the method in any of the preceding optional implementation, for example, steps S400 to S430: obtaining an M-dimensional coordinate to be processed; determining 2 M conversion coordinates corresponding to the M-dimensional coordinate to be processed according to the M-dimensional coordinate to be processed; determining a memory corresponding to each conversion coordinate according to a parity attribute of each conversion coordinate; and obtaining a coordinate lookup result corresponding to each conversion coordinate in the corresponding memory according to each conversion coordinate, to obtain a plurality of coordinate lookup results corresponding to the M-dimensional coordinate to be processed.

[0086] The present application provides a storage medium, the storage medium stores a computer program, the computer program is run by a processor to execute the method in any of the preceding optional implementation.

[0087] The storage medium can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0088] The present application provides a computer program product, which, when running on a computer, causes the computer to execute the method in any of the optional implementation manners.

[0089] In the embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There can be another division during actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some communication interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0090] In addition, the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiments.

[0091] Furthermore, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0092] It should be noted that, if the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part or the technical solutions of the present application that make contributions to the prior art. The computer software product is stored in a storage medium, includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0093] In this article, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations.

[0094] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing component, characterized in that, include: Computing units and a memory array, the memory array comprising 2 M One memory, the computing unit and the 2 M Each memory connection in the memory; The memory array is accessed via the 2 M Each memory stores an M-dimensional lookup table, which includes the coordinates of multiple points in an M-dimensional space and the lookup result for each coordinate. The 2... M The coordinates stored in each of the two memories have the same parity attribute, and the 2 M The parity attributes of coordinates stored in different memories are different. The same parity attribute of two coordinates means that the parity of the values ​​of the same channel of the two coordinates is the same. The calculation unit is used to obtain the 2D coordinates corresponding to the M-dimensional coordinates to be processed. M Each transformation coordinate is used to determine the memory corresponding to each transformation coordinate based on its parity attribute. The coordinate lookup result corresponding to each transformation coordinate is obtained by querying the corresponding memory based on each transformation coordinate, thus obtaining multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed. The calculation unit is specifically used to calculate the remainder of the value of each channel of each transformed coordinate divided by 2; determine the parity of the value of each channel of each transformed coordinate divided by 2 based on the remainder of the value of each channel of each transformed coordinate divided by 2; determine the memory storing the corresponding parity attribute based on the parity of the value of each channel of each transformed coordinate, and obtain the memory corresponding to each transformed coordinate.

2. The data processing component according to claim 1, characterized in that, The data processing component further includes an interpolation unit, which is connected to the calculation unit; The interpolation unit is used to receive multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed, and to perform interpolation calculations on the multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed to obtain the M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed.

3. The data processing component according to claim 1, characterized in that, The calculation unit is also used to perform interpolation calculations on multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed to obtain the M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed.

4. The data processing component according to any one of claims 1-3, characterized in that, The number of memory units is eight, and the coordinates of the points in the M-dimensional space are three-dimensional coordinates.

5. The data processing component according to claim 4, characterized in that, The three-dimensional coordinates include a red channel, a green channel, and a blue channel; The red channel values, green channel values, and blue channel values ​​of the three-dimensional coordinates stored in the first memory are all even numbers; The second memory stores three-dimensional coordinates where the red channel values ​​are all odd, the green channel values ​​are all even, and the blue channel values ​​are all even. The third memory stores three-dimensional coordinates where the red channel values ​​are all even, the green channel values ​​are all odd, and the blue channel values ​​are all even. The red channel values ​​of the three-dimensional coordinates stored in the fourth memory are all odd, the green channel values ​​are all odd, and the blue channel values ​​are all even. The red channel values ​​of the three-dimensional coordinates stored in the fifth memory are all even, the green channel values ​​are all even, and the blue channel values ​​are all odd. The sixth memory stores three-dimensional coordinates where the red channel values ​​are all odd, the green channel values ​​are all even, and the blue channel values ​​are all odd. The red channel values ​​of the three-dimensional coordinates stored in the seventh memory are all even, the green channel values ​​are all odd, and the blue channel values ​​are all odd. The values ​​of the red channel, green channel, and blue channel of the three-dimensional coordinates stored in the eighth memory are all odd.

6. A data processing method, characterized in that, Applied to a data processing component, the processing component including a memory array, the memory array comprising 2 M A memory, the method comprising: Obtain the M-dimensional coordinates to be processed; Determine the corresponding 2 based on the M-dimensional coordinates to be processed. M One transformation coordinate; The memory corresponding to each transformation coordinate is determined based on the parity attribute of each transformation coordinate, wherein the memory array is determined through the 2 M Each memory stores an M-dimensional lookup table, which includes the coordinates of multiple points in an M-dimensional space and the lookup result for each coordinate. The 2... M The coordinates stored in each of the two memories have the same parity attribute, and the 2 M The parity attributes of coordinates stored in different memories are different. The same parity attribute of two coordinates means that the parity of the values ​​of the same channel of the two coordinates is the same. Based on each transformed coordinate, the coordinate lookup result corresponding to each transformed coordinate is obtained by querying the corresponding memory, thus obtaining multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed; The step of determining the memory corresponding to each transformed coordinate based on the parity attribute of each transformed coordinate includes: calculating the remainder of the value of each channel of each transformed coordinate divided by 2; determining the parity of the value of each channel of each transformed coordinate divided by 2 based on the remainder of the value of each channel of each transformed coordinate divided by 2; determining the memory storing the corresponding parity attribute based on the parity of the value of each channel of each transformed coordinate, thereby obtaining the memory corresponding to each transformed coordinate.

7. The method according to claim 6, characterized in that, The step is to determine the 2 corresponding to the M-dimensional coordinates to be processed based on the M-dimensional coordinates to be processed. M One transformation coordinate, including: Round up and down the value of each channel in the M-dimensional coordinates to be processed to obtain the 2D value corresponding to the M-dimensional coordinates. M Transformed coordinates.

8. The method according to claim 6, characterized in that, After obtaining the coordinate lookup result corresponding to each transformed coordinate by querying the corresponding memory, and thus obtaining multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed, the method further includes: The M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed are obtained by interpolation calculation of multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed.

9. The method according to claim 8, characterized in that, The step of interpolating the multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed to obtain the M-dimensional output coordinates includes: The starting point for interpolation calculation in the multiple coordinate query results is determined based on the multiple coordinate lookup results corresponding to the M-dimensional coordinates to be processed; The order of the multiple coordinate search results is determined based on the starting point; The M-dimensional output coordinates corresponding to the M-dimensional coordinates to be processed are obtained by interpolating the multiple coordinate lookup results according to the order of the multiple coordinate lookup results.

10. A data processing apparatus, characterized in that, Applied to a data processing component, the data processing component including a memory array, the memory array including 2 M One memory, including: The acquisition module is used to acquire the M-dimensional coordinates to be processed. The determining module is used to determine the 2D model corresponding to the M-dimensional coordinates to be processed based on the M-dimensional coordinates to be processed. M 1. Transformed coordinates; and 2. Determine the memory corresponding to each transformed coordinate based on the parity attribute of each transformed coordinate, wherein the memory array stores an M-dimensional lookup table through the 2M memories, the M-dimensional lookup table includes the coordinates of multiple points in M-dimensional space and the coordinate lookup result corresponding to each coordinate, wherein the coordinates stored in each of the 2M memories have the same parity attribute, and the coordinates stored in different memories of the 2M memories have different parity attributes, wherein the same parity attribute of two coordinates means that the values ​​of the same channel of the two coordinates have the same parity; The query module is used to query the corresponding memory for each transformed coordinate to obtain the coordinate lookup result corresponding to each transformed coordinate, and obtain multiple coordinate lookup results corresponding to the M-dimensional coordinate to be processed. The determining module is specifically used to calculate the remainder of the value of each channel of each transformed coordinate divided by 2; determine the parity of the value of each channel of each transformed coordinate divided by 2 based on the remainder of the value of each channel of each transformed coordinate divided by 2; determine the memory storing the corresponding parity attribute based on the parity of the value of each channel of each transformed coordinate, and obtain the memory corresponding to each transformed coordinate.

11. A chip, characterized in that, The chip includes the data processing component according to any one of claims 1-5.

12. An electronic device comprising a storage element and a processing element, wherein the storage element stores a computer program, characterized in that, When the processing element executes the computer program, it implements the method of any one of claims 6 to 9.

13. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 6 to 9.

Citation Information

Patent Citations

  • Data converter and control method and program thereof

    JP2016163070A