Image data conversion method, conversion device, signal generator and storage medium
By judging and utilizing historical conversion data in the image signal generator, and combining the parameter information of the display module to be tested for image data conversion, the problem of long conversion time in the existing technology is solved and a more efficient conversion process is achieved.
Patent Information
- Application Number
- CN202111567195.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-12-20
AI Technical Summary
The problem in the prior art is that the image signal generator takes a long time to convert the data in the picture file.
By determining whether the historical conversion data of the current pixel exists in the cache before conversion, if it exists, it is obtained directly. Otherwise, conversion is performed based on the parameter information of the display module to be tested, and the converted data is saved in the cache to avoid repeated conversions.
The conversion time is shortened, data redundancy and space occupation are reduced, and equipment costs are reduced.
Smart Images

Figure CN114268704B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of testing technology, and in particular to an image data conversion method, a conversion device, a signal generator and a storage medium. Background Art
[0002] Pattern Generator (PG) devices are usually used in the testing process of the display device under test. They are used to input test file packages into the display device under test to detect whether the display device under test has problems such as bad pixels. The working process of the PG device is as follows: 1. The user sends the test file package to the PG device through the host computer system; 2. The PG device parses the test file package to obtain the image file and sends it to the display device under test for display.
[0003] In actual applications, if the image file in the test file package sent by the host system does not match the characteristics of the display device to be tested, the PG device is required to convert the data in the image file. The current conversion method requires converting each pixel in the image file in turn, which takes a long time. Summary of the invention
[0004] The purpose of the present invention is to provide an image data conversion method, a conversion device, a signal generator and a storage medium, aiming to solve the problem in the prior art that the PG device takes a long time to convert the data in the image file.
[0005] In order to achieve the above object, the present invention provides a first aspect of a method for converting image data, comprising:
[0006] Acquisition steps: Get the test picture;
[0007] Determination step: determine whether there is historical conversion data of the current pixel of the test image in the cache, the historical conversion data including original data and conversion data converted from the original data and matching the display module to be tested;
[0008] Conversion step: If there is historical conversion data of the current pixel, the conversion data in the historical conversion data is obtained from the cache and determined as the conversion data of the current pixel.
[0009] In the embodiment of the present invention, the converting step further includes:
[0010] If there is no historical conversion data of the current pixel, converting the original data of the current pixel according to the parameter information of the display module to be tested to obtain conversion data of the current pixel;
[0011] The original data of the current pixel and the converted data of the current pixel are saved in a buffer as historical conversion data.
[0012] In the embodiment of the present invention, before the original data of the current pixel and the conversion data of the current pixel are stored in the cache as the historical conversion data, the method further includes:
[0013] Determine whether the historical conversion data in the cache reaches a preset amount;
[0014] If not, the original data of the current pixel and the converted data of the current pixel are stored in the cache as historical converted data;
[0015] If so, the original data of the current pixel and the converted data of the current pixel are used as historical conversion data, and replace an existing historical conversion data in the cache.
[0016] In the embodiment of the present invention, the determining step further includes:
[0017] Determine whether the original data of the current pixel of the test image exists in the original data of all the historical conversion data in the cache;
[0018] The conversion step also includes:
[0019] If the original data of the current pixel of the test picture exists, the conversion data in the historical conversion data corresponding to the original data of the current pixel is read and determined as the conversion data of the current pixel.
[0020] In an embodiment of the present invention, the parameter information of the display module to be tested includes color depth and sub-pixel order;
[0021] The original data of the current pixel is converted according to the parameter information of the display module to be tested to obtain the conversion data of the current pixel, including:
[0022] Identify the raw data of each sub-pixel in the raw data of the current pixel;
[0023] Converting the raw data of each sub-pixel according to the color depth of the display module to be tested;
[0024] The converted data of all sub-pixels of each pixel are spliced according to the sub-pixel sequence of the display module to be tested to obtain the converted data of the current pixel.
[0025] In an embodiment of the present invention, converting the original data of each sub-pixel according to the color depth of the display module to be tested includes:
[0026] Compare the color depth of the original data of each sub-pixel with the color depth of the display module to be tested;
[0027] When the color depth of the original data of each sub-pixel is less than the first digit of the color depth of the display module to be tested, the high digit of the original data of each sub-pixel is supplemented with the data of the first digit 0 to obtain the converted data of the sub-pixel;
[0028] When the color depth of the original data of each sub-pixel is greater than the second digit of the color depth of the display module to be tested, the second digit of data is deleted from the highest digit of the original data of each sub-pixel to obtain the converted data of the sub-pixel.
[0029] A second aspect of the present invention provides an image data conversion device, comprising:
[0030] Acquisition module, used to obtain image files;
[0031] A judgment module, used to judge whether there is historical conversion data of the current pixel of the test picture in the cache, the historical conversion data including original data and conversion data obtained by converting the original data into data matching the display module to be tested;
[0032] The conversion module is used to obtain conversion data in the historical conversion data from the cache and determine it as conversion data of the current pixel if there is historical conversion data of the current pixel.
[0033] In an embodiment of the present invention, the conversion module is also used to convert the original data of the current pixel according to the parameter information of the display module to be tested to obtain the conversion data of the current pixel if there is no historical conversion data of the current pixel, and save the original data of the current pixel and the conversion data of the current pixel as historical conversion data in the cache.
[0034] A third aspect of the present invention provides a signal generator, comprising:
[0035] A memory for storing a conversion program for image data;
[0036] The processor is configured to call the image data conversion program from the memory so that the processor can execute the above-mentioned image data conversion method.
[0037] A fourth aspect of the present invention provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configure the processor to execute the above-mentioned method for converting image data.
[0038] Through the above technical solution, by judging whether there is historical conversion data of the current pixel in the cache before converting the original data of the current pixel of the test image, it is avoided to convert all the original data in sequence, thereby shortening the conversion time.
[0039] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0041] Figure 1 A schematic diagram schematically shows an application environment of the image data conversion method according to an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a process flow of a method for converting image data according to an embodiment of the present invention is shown;
[0043] Figure 3 A schematic diagram schematically shows a flow chart of a method for converting image data according to another embodiment of the present invention;
[0044] Figure 4 A schematic diagram showing a structural block diagram of an image data conversion device according to an embodiment of the present invention;
[0045] Figure 5 The internal structure of a computer device according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0047] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0048] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0049] The image data conversion method provided by the present invention can be applied to Figure 1 In the application environment shown. Among them, the PG device communicates with the host computer device and the display module to be tested through the network. The host computer can be, but is not limited to, a smart phone or a tablet computer. The user generates a test file package through the host computer, and sends the test file package to the PG device through the host computer. The host computer also sends an execution instruction to the PG device. After receiving the execution instruction, the PG device decompresses the received test file package to obtain a test image, and sends the test image to the display module to be tested for display.
[0050] Figure 2 The following is a schematic diagram showing a flow chart of a method for converting image data according to an embodiment of the present invention. Figure 2 As shown, in one embodiment of the present invention, a method for converting image data is provided. The present invention mainly applies this method to the above Figure 1 Taking the PG device in the example, the method can include an acquisition step, a judgment step and a conversion step, wherein:
[0051] The acquisition step may include S10: acquiring a test picture.
[0052] Reference Figure 1 When the test image in the test file package sent by the host computer does not match the characteristics of the display module to be tested, the PG device is required to convert the data in the test image. In one example, after obtaining the test file package sent by the host computer, the PG device can decompress the test file package to obtain the test image. In another example, after the PG device decompresses the test file, it can also obtain the attribute information of the screen of the display module to be tested, such as resolution, bit depth, RGB format, etc.
[0053] The determination step may include S20: determining whether there is historical conversion data of the current pixel of the test image in the cache, the historical conversion data including original data and conversion data converted from the original data and matching the display module to be tested.
[0054] In a specific implementation, a preset number (such as 10) of caches can be set in the PG device. Each cache is divided into two storage units A and B. The original data is stored in storage unit A, and the conversion data corresponding to the original data is stored in storage unit B. The historical conversion data stored in the cache is different and dynamically updated.
[0055] The PG device can obtain the original data of each pixel of the test image in turn, and convert it into conversion data that matches the display module to be tested, save the original data of the current pixel to the storage unit A of the Nth cache, and save the corresponding conversion data to the storage unit B of the Nth cache.
[0056] When converting the next pixel, it can be determined whether there is data identical to the original data of the current pixel in the cache storage unit A. If the same data exists, it is determined that the historical conversion data of the current pixel exists in the cache; if the same data does not exist, it is determined that the historical conversion data of the current pixel does not exist in the cache.
[0057] In an example, the conversion data matching the display module to be tested may refer to conversion data having the same sub-pixel sequence and color depth as the display module to be tested.
[0058] The conversion step may include S30: if there is historical conversion data of the current pixel, obtaining conversion data in the historical conversion data from the cache and determining it as conversion data of the current pixel.
[0059] When there is historical conversion data for the current pixel, the conversion data in the historical conversion data can be directly taken out from the storage unit B corresponding to the storage unit A storing the original data, and determined as the conversion data for the current pixel; when there is no historical conversion data for the current pixel, the original data of the current pixel can be saved in the storage unit A, and after the corresponding conversion data is saved in the storage unit B, the next pixel is converted until all pixels from the first pixel in each row to the last pixel in the test image are converted, and then all pixels from the first row to the number of rows of the display module to be tested are converted.
[0060] The embodiment of the present invention obtains a test image; determines whether there is historical conversion data of the current pixel of the test image in the cache, the historical conversion data includes original data and conversion data that matches the display module to be tested by converting the original data, and if there is historical conversion data of the current pixel, obtains the conversion data in the historical conversion data from the cache and determines it as the conversion data of the current pixel. Among them, by first determining whether there is historical conversion data of the current pixel in the cache before converting the original data of the current pixel of the test image, it is avoided to convert all the original data in sequence, shortening the conversion time, and also avoiding data redundancy, reducing space occupancy, and reducing the cost of PG equipment.
[0061] Figure 3 The following is a schematic flow chart of a method for converting image data according to another embodiment of the present invention. Figure 3 As shown, in another embodiment of the present invention, a method for converting image data is provided, and the method may further include the following steps:
[0062] The conversion step includes S31: if there is no historical conversion data of the current pixel, converting the original data of the current pixel according to the parameter information of the display module to be tested to obtain conversion data of the current pixel;
[0063] S32: storing the original data of the current pixel and the converted data of the current pixel in a cache as historical converted data.
[0064] In one example, the parameter information of the display module to be tested may include color depth and sub-pixel order. When the original data of the current pixel is converted according to the parameter information of the display module to be tested, the original data of each sub-pixel in the original data of the current pixel can be identified; the original data of each sub-pixel is converted according to the color depth of the display module to be tested; the converted data of all sub-pixels of each pixel are spliced according to the sub-pixel order of the display module to be tested, and finally the converted data of the current pixel is obtained.
[0065] In a specific implementation, the color depth and RGB sequence of the current pixel can be obtained first, and then the valid data of the R component, G component and B component, that is, the original data of each sub-pixel in the original data of the current pixel, can be obtained according to the color depth and RGB sequence.
[0066] Furthermore, the color depth of the original data of each sub-pixel can be compared with the color depth of the display module to be tested; when the color depth of the original data of each sub-pixel is less than the first digit of the color depth of the display module to be tested, the high bit of the original data of each sub-pixel is supplemented with the first digit of data 0 to obtain the converted data of the sub-pixel; when the color depth of the original data of each sub-pixel is greater than the second digit of the color depth of the display module to be tested, the second digit of data is deleted from the highest bit of the original data of each sub-pixel to obtain the converted data of the sub-pixel.
[0067] Assume that the sub-pixel order of the original data of each sub-pixel is RGB, and the color depth is 8; the sub-pixel order of the display module to be tested is GBR, and the bit depth is 12. When the sub-pixel splicing of the original data of each sub-pixel is stored according to the sub-pixel order of the display module to be tested, the 8-bit data is stored in the 12-bit space, and the high 4 bits are padded with 0. For example, the 8-bit RGB data 0xAABBCC can be converted into the 12-bit GBR data: 0x00BB0CC0AA.
[0068] Assume that the sub-pixel order of the original data of each sub-pixel is RGB, and the color depth is 12; the sub-pixel order of the display module to be tested is GBR, and the bit depth is 8, store the 12-bit data in the 8-bit space, and delete the high 4 bits. For example, the 12-bit RGB data 0x00AA0BB0CC can be converted into 8-bit RGB data: 0xAABBCC.
[0069] Before saving the original data of the current pixel and the conversion data of the current pixel as historical conversion data in the cache, it can also be determined whether the historical conversion data in the cache reaches a preset number; if not, the original data of the current pixel and the conversion data of the current pixel are saved in the cache as historical conversion data; if so, the original data of the current pixel and the conversion data of the current pixel are used as historical conversion data and replace an existing historical conversion data in the cache.
[0070] Taking the preset number of 10 as an example, when the number of historical conversion data in the cache is less than 10, the original data of the current pixel and the corresponding conversion data are directly saved in the cache. When the number of historical conversion data in the cache is greater than 10, when storing the original data of the current pixel and the corresponding conversion data, it is necessary to delete an existing historical conversion data in the cache to ensure that the historical conversion data in the cache is dynamically updated.
[0071] Furthermore, after a preset number of historical conversion data are stored in the cache, it can also be determined whether the original data of the current pixel of the test image exists in the original data of all the historical conversion data in the cache; if the original data of the current pixel of the test image exists, the conversion data in the historical conversion data corresponding to the original data of the current pixel is read and determined as the conversion data of the current pixel.
[0072] The embodiment of the present invention converts the original data of the current pixel according to the parameter information of the display module to be tested to obtain the conversion data of the current pixel when there is no historical conversion data of the current pixel; the original data of the current pixel and the conversion data of the current pixel are stored in a cache as historical conversion data, thereby realizing the conversion of the original data of the current pixel into data matching the display module to be tested, and avoiding problems such as image display distortion caused by the mismatch between the test image and the display module to be tested.
[0073] Figure 2 and Figure 3 FIG. 1 is a flow chart of a method for converting image data in one embodiment. It should be understood that although Figure 2 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 and Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0074] In one embodiment, Figure 4 As shown, a device for converting image data is provided, including an acquisition module 10, a judgment module 20 and a conversion module 30, wherein: the acquisition module 10 is used to acquire an image file; the judgment module 20 is used to determine whether there is historical conversion data of the current pixel of the test image in the cache, the historical conversion data including original data and conversion data that matches the display module to be tested by converting the original data; the conversion module 30 is used to obtain conversion data in the historical conversion data from the cache and determine it as the conversion data of the current pixel if there is historical conversion data of the current pixel.
[0075] Furthermore, the conversion module 30 is also used to convert the original data of the current pixel according to the parameter information of the display module to be tested to obtain the conversion data of the current pixel if there is no historical conversion data of the current pixel; and save the original data of the current pixel and the conversion data of the current pixel as historical conversion data in the cache.
[0076] Furthermore, the image data conversion device also includes a storage module (not shown); wherein,
[0077] The determination module 20 is also used to determine whether the historical conversion data in the cache reaches a preset amount;
[0078] The saving module is used to save the original data of the current pixel and the conversion data of the current pixel as historical conversion data in the cache if no; if yes, the original data of the current pixel and the conversion data of the current pixel are used as historical conversion data and replace an existing historical conversion data in the cache.
[0079] Furthermore, the judgment module 20 is also used to judge whether the original data of the current pixel of the test picture exists in the original data of all the historical conversion data in the cache; the conversion module 30 is also used to read the conversion data in the historical conversion data corresponding to the original data of the current pixel and determine it as the conversion data of the current pixel if the original data of the current pixel of the test picture exists.
[0080] Furthermore, the parameter information of the display module to be tested includes color depth and sub-pixel order; the conversion module 30 is also used to identify the original data of each sub-pixel in the original data of the current pixel; convert the original data of each sub-pixel according to the color depth of the display module to be tested; and splice the converted data of all sub-pixels of each pixel according to the sub-pixel order of the display module to be tested to obtain the converted data of the current pixel.
[0081] Furthermore, the conversion module 30 is also used to compare the color depth of the original data of each sub-pixel with the color depth of the display module to be tested; when the color depth of the original data of each sub-pixel is less than the first digit of the color depth of the display module to be tested, the high bit of the original data of each sub-pixel is supplemented with the first digit of data 0 to obtain the converted data of the sub-pixel; when the color depth of the original data of each sub-pixel is greater than the second digit of the color depth of the display module to be tested, the second digit of data is deleted from the highest bit of the original data of each sub-pixel to obtain the converted data of the sub-pixel.
[0082] An embodiment of the present invention further provides a signal generator, comprising: a memory for storing a conversion program for image data; and a processor configured to call the conversion program for image data from the memory so that the processor can execute the above-mentioned image data conversion method.
[0083] The embodiment of the present invention further provides a machine-readable storage medium on which a program is stored. When the program is executed by a processor, the above-mentioned image data conversion method is implemented.
[0084] An embodiment of the present invention provides a computer device, which may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor A01, a network interface A02, a display screen A04, an input device A05 and a memory (not shown in the figure) connected through a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A06. The non-volatile storage medium A06 stores an operating system B01 and a computer program B02. The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A06. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor A01, a method for converting image data is implemented. The display screen A04 of the computer device can be a liquid crystal display or an electronic ink display, and the input device A05 of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0085] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0086] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0087] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0090] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0091] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0092] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0093] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0094] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for converting image data, characterized in that: Applied to image signal generator, including: Acquisition steps: Get the test picture; Determining step: determining whether there is historical conversion data of the current pixel of the test image in the cache, the historical conversion data including original data and conversion data converted from the original data and matching the display module to be tested; Conversion step: if there is historical conversion data of the current pixel, obtaining conversion data in the historical conversion data from the cache and determining it as conversion data of the current pixel; The conversion step further includes: If there is no historical conversion data of the current pixel, converting the original data of the current pixel according to the parameter information of the display module to be tested to obtain conversion data of the current pixel; storing the original data of the current pixel and the conversion data of the current pixel in the buffer as historical conversion data; The parameter information of the display module to be tested includes color depth and sub-pixel order; The converting the original data of the current pixel according to the parameter information of the display module to be tested to obtain the converted data of the current pixel includes: Identify the original data of each sub-pixel in the original data of the current pixel; Converting the original data of each sub-pixel according to the color depth of the display module to be tested; The converted data of all sub-pixels of each pixel are spliced according to the sub-pixel sequence of the display module to be tested to obtain the converted data of the current pixel.
2. The conversion method according to claim 1, characterized in that: Before storing the original data of the current pixel and the conversion data of the current pixel as historical conversion data in the cache, the method further includes: Determining whether the historical conversion data in the cache reaches a preset amount; If not, the original data of the current pixel and the conversion data of the current pixel are stored in the cache as historical conversion data; If so, the original data of the current pixel and the conversion data of the current pixel are used as historical conversion data, and replace an existing historical conversion data in the cache.
3. The conversion method according to claim 2, characterized in that: The judging step further includes: Determine whether the original data of the current pixel of the test picture exists in the original data of all the historical conversion data in the cache; The conversion step further includes: If the original data of the current pixel of the test picture exists, the conversion data in the historical conversion data corresponding to the original data of the current pixel is read and determined as the conversion data of the current pixel.
4. The conversion method according to claim 1, characterized in that: The converting the original data of each sub-pixel according to the color depth of the display module to be tested includes: Comparing the color depth of the original data of each sub-pixel with the color depth of the display module to be tested; When the color depth of the original data of each sub-pixel is less than the first digit of the color depth of the display module to be tested, the high digit of the original data of each sub-pixel is supplemented with the data of the first digit 0 to obtain the converted data of the sub-pixel; When the color depth of the original data of each sub-pixel is greater than the second digit of the color depth of the display module to be tested, the second digit of data is deleted from the highest digit of the original data of each sub-pixel to obtain the converted data of the sub-pixel.
5. A device for converting image data, characterized in that: Applied to image signal generator, including: Acquisition module, used to obtain test images; A judgment module, used to judge whether there is historical conversion data of the current pixel of the test picture in the cache, wherein the historical conversion data includes original data and conversion data obtained by converting the original data into data matching the display module to be tested; a conversion module, configured to obtain conversion data in the historical conversion data from the cache and determine the conversion data as the conversion data of the current pixel if the historical conversion data of the current pixel exists; The conversion module is further configured to convert the original data of the current pixel according to the parameter information of the display module to be tested to obtain the conversion data of the current pixel if there is no historical conversion data of the current pixel, and store the original data of the current pixel and the conversion data of the current pixel as historical conversion data in the cache; The parameter information of the display module to be tested includes color depth and sub-pixel order; The converting the original data of the current pixel according to the parameter information of the display module to be tested to obtain the converted data of the current pixel includes: Identify the original data of each sub-pixel in the original data of the current pixel; Converting the original data of each sub-pixel according to the color depth of the display module to be tested; The converted data of all sub-pixels of each pixel are spliced according to the sub-pixel sequence of the display module to be tested to obtain the converted data of the current pixel.
6. An image signal generator, characterized in that: include: A memory for storing a conversion program for image data; A processor is configured to call the image data conversion program from the memory so that the processor can execute the image data conversion method according to any one of claims 1 to 4.
7. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the image data conversion method according to any one of claims 1 to 4.
