Color gamut conversion method and device, mapping table establishment method and device, equipment, storage medium and program product

By using a lookup table method for electro-optical and photoelectric conversion, and utilizing the first and second fields to represent optical signal values, the problem of high storage resource consumption is solved, and efficient storage for color gamut conversion and compatibility with multiple standard devices are achieved.

CN121528174AActive Publication Date: 2026-02-13XIAN QINGSONG PHOTOELECTRIC TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411108682.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2026-02-13
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Existing technologies consume excessive storage resources during the color gamut conversion between HDR and SDR. In particular, the conversion between traditional electrical signal values ​​and linear optical signal values ​​requires 27 bits of data representation, resulting in huge storage space requirements.

Method used

Color gamut conversion is performed using a lookup table method. Through a pre-established first and second mapping table, the optical signal value represented by the first form is used for electro-optical conversion and photoelectric conversion. The first form includes a first field and a second field. The value of the first field multiplied by the target value equals the optical signal value, and the value of the second field is used for exponentiation to achieve compression of the optical signal value.

Benefits of technology

It reduces storage resource overhead, minimizes invalid storage space, enables access to video source devices and display media of different standards, and supports color gamut conversion of various standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121528174A_ABST
    Figure CN121528174A_ABST
Patent Text Reader

Abstract

The invention relates to a color gamut conversion method and device, a mapping table establishment method and device, equipment, a storage medium and a program product. The method comprises the following steps: searching a target optical signal value which corresponds to a first electric signal value obtained by encoding an image and is represented in a first form from a pre-established first mapping table; the first mapping table comprises a mapping relation between different electric signal values and optical signal values in the first color gamut; searching a second electric signal value corresponding to the target optical signal value from a pre-established second mapping table; the second mapping table comprises a mapping relation between different electric signal values and optical signal values in the second color gamut; wherein the optical signal values in the first mapping table and the second mapping table are represented in a first form, the first form comprises a first field and a second field, the value of the first field multiplied by a target value is equal to the optical signal value, and the target value is obtained by performing exponentiation by taking a preset value as a base number and the value of the second field as an index. By adopting the method, the storage resource overhead can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image display, in particular to a color gamut conversion method, a mapping table establishing method, a device, an equipment, a storage medium and a program product. BACKGROUND

[0002] High Dynamic Range Imaging (HDRI or HDR for short) is a set of techniques used in computer graphics and cinematography to achieve a greater dynamic range of exposure (i.e. a greater contrast ratio) than ordinary digital imaging techniques. The typical feature of HDR relative to traditional SDR (standard dynamic range image) is that HDR has a higher luminance range, a wider color gamut, and a greater color bit depth.

[0003] In the actual application at the present stage, there are a large number of video sources, video processing devices, and display media that do not support the same HDR format, and a large number of old devices will exist and continue to be used for a long time. The differences between various standards and product generations are very large. At present, different color gamuts or color spaces are converted by mutual conversion between HDR and SDR. In the color gamut conversion process, the electrical signal value after video encoding needs to be converted into a linear optical signal value.

[0004] The mutual conversion between the traditional electrical signal value and the linear optical signal value generally adopts a lookup table method, that is, a RAM (Random Access Memory) is defined, and the values are put in advance. Considering that the data range of the linear optical signal value is very large, 27 bits of data are needed to express it, and the electrical signal value needs 10 bits of data to express it. Therefore, the depth of the data table is 2^27, the width is 10 bits, and the storage space is 2^27*10 bits = 1.3 Gbit. However, this way consumes a lot of storage resources. SUMMARY

[0005] Therefore, it is necessary to provide a color gamut conversion method, a mapping table establishing method, a device, an equipment, a storage medium and a program product capable of reducing storage resources in view of the above technical problems.

[0006] In a first aspect, the present application provides a color gamut conversion method, which comprises:

[0007] obtaining a first electrical signal value obtained after an image is encoded; the first electrical signal value represents color information of the image in a first color gamut;

[0008] finding a target optical signal value represented in a first form corresponding to the first electrical signal value from a pre-established first mapping table; the first mapping table comprises a mapping relationship between different electrical signal values and optical signal values in the first color gamut;

[0009] finding a second electrical signal value corresponding to the target optical signal value from a pre-established second mapping table; the second mapping table comprises mapping relationships between different electrical signal values and optical signal values under a second color gamut; wherein the optical signal values in the first mapping table and the second mapping table are represented by a first form, the first form comprises a first field and a second field, a value of the first field multiplied by a target value is equal to the optical signal value, the target value is obtained by taking a preset value as a base number, and a value of the second field is an exponent for power operation;

[0010] displaying the image under the second color gamut based on the second electrical signal value.

[0011] In one of the embodiments, the method further comprises:

[0012] determining an electro-optical transfer function corresponding to the first color gamut;

[0013] for any electrical signal value under the first color gamut, determining an optical signal value corresponding to the electrical signal value and represented by a second form based on the electro-optical transfer function; the second form is an integer form;

[0014] determining a value of the first field and a value of the second field based on the optical signal value represented by the second form, and obtaining the optical signal value represented by the first form through the value of the first field and the value of the second field;

[0015] establishing a mapping relationship between the electrical signal value and the optical signal value represented by the first form under the first color gamut;

[0016] generating a first mapping table based on the mapping relationship between each electrical signal value and the optical signal value represented by the first form under the first color gamut.

[0017] In one of the embodiments, the determining of the value of the first field and the value of the second field based on the optical signal value represented by the second form comprises:

[0018] setting a first initial value of the first field and a second initial value of the second field based on the optical signal value represented by the second form;

[0019] judging a relationship between the first initial value and a preset range;

[0020] if the first initial value is greater than an upper limit value of the preset range, shifting the first initial value to the left by one bit and adding 1 to the second initial value; if the first initial value is less than a lower limit value of the preset range, shifting the first initial value to the right by one bit and subtracting 1 from the second initial value;

[0021] The updated first initial value is used as the new first initial value, and the step of determining the relationship between the first initial value and the preset range is returned based on the new first initial value, and the process continues until the first initial value is within the preset range, or the number of moves reaches the moving threshold. The last determined first initial value is used as the value of the first field, and the last determined second initial value is used as the value of the second field.

[0022] In one embodiment, the step of searching for the second electrical signal value corresponding to the target optical signal value from a pre-established second mapping table includes:

[0023] Obtain the pre-established second mapping table;

[0024] If the target optical signal value is in the second mapping table, then the electrical signal value corresponding to the target optical signal value in the second mapping table is used as the second electrical signal value corresponding to the target optical signal value.

[0025] In one embodiment, the method further includes:

[0026] If the target optical signal value is not in the second mapping table, then a reference optical signal value that meets the approximation condition is determined in the second mapping table, and the electrical signal value corresponding to the reference optical signal value is used as the second electrical signal value corresponding to the target optical signal value.

[0027] In one embodiment, the method further includes:

[0028] After finding the target optical signal value represented in the first form from the first mapping table, if an update operation for the target optical signal value is detected, the target optical signal value is converted from the first form to the second form.

[0029] Based on the update operation, the target optical signal value expressed in the second form is updated to obtain the updated target optical signal value expressed in the second form.

[0030] Based on the updated target optical signal value represented in the second form, determine the values ​​of the new first field and the new second field, represent the updated target optical signal value represented in the first form using the values ​​of the new first field and the new second field, and perform the step of searching for the second electrical signal value corresponding to the target optical signal value from the pre-established second mapping table based on the updated target optical signal value represented in the first form.

[0031] Secondly, this application also provides a method for establishing a mapping table, the method comprising:

[0032] Determine the electro-optic transfer function corresponding to the target color gamut; the target color gamut refers to either the first color gamut or the second color gamut.

[0033] For any electrical signal value under the target color gamut, based on the electro-optical transfer function, determine the optical signal value corresponding to the electrical signal value in a second form; the second form is an integer form;

[0034] Based on the optical signal value in the second form, determine the value of the first field and the value of the second field, and obtain the optical signal value in the first form through the value of the first field and the value of the second field;

[0035] Establish the mapping relationship between the electrical signal value under the target color gamut and the optical signal value in the first form;

[0036] Based on the mapping relationship between each electrical signal value under the target color gamut and the optical signal value in the first form, generate a target mapping table.

[0037] In one of the embodiments, the determining the value of the first field and the value of the second field based on the optical signal value in the second form comprises:

[0038] Based on the optical signal value in the second form, set a third initial value of the first field and a fourth initial value of the second field;

[0039] Determine the relationship between the third initial value and a preset range;

[0040] If the third initial value is greater than the upper limit value of the preset range, left shift the third initial value once and add 1 to the fourth initial value; if the third initial value is less than the lower limit value of the preset range, right shift the third initial value once and subtract 1 from the fourth initial value;

[0041] Take the updated third initial value as a new third initial value, and continue to execute the step of determining the relationship between the third initial value and the preset range based on the new third initial value until the third initial value is within the preset range, or the number of movements reaches a movement threshold, take the last determined third initial value as the value of the first field and the last determined fourth initial value as the value of the second field.

[0042] In a third aspect, the present application also provides a color gamut conversion device, the device comprises:

[0043] A first electrical signal acquisition module is configured to acquire a first electrical signal value obtained after an image is encoded; the first electrical signal value represents color information of the image under a first color gamut;

[0044] An electro-optical conversion module is configured to search for a target optical signal value in a first form corresponding to the first electrical signal value from a first mapping table, wherein the first mapping table comprises mapping relationships between different electrical signal values and optical signal values in a first color gamut.

[0045] An opto-electrical conversion module is configured to search for a second electrical signal value corresponding to the target optical signal value from a second mapping table, wherein the second mapping table comprises mapping relationships between different electrical signal values and optical signal values in a second color gamut, and the optical signal values in the first mapping table and the second mapping table are represented by a first form, wherein the first form comprises a first field and a second field, the value of the first field multiplied by a target value is equal to the optical signal value, and the target value is obtained by taking a preset value as a base number and performing an exponential operation on the value of the second field.

[0046] A display module is configured to display the image in the second color gamut based on the second electrical signal value.

[0047] In a fourth aspect, the present application further provides a mapping table establishing device, which comprises:

[0048] A transfer function determining module is configured to determine an electro-optical transfer function corresponding to a target color gamut, wherein the target color gamut refers to the first color gamut or the second color gamut.

[0049] An optical signal calculating module is configured to determine, for any electrical signal value in the target color gamut, an optical signal value in a second form corresponding to the electrical signal value based on the electro-optical transfer function, wherein the second form is an integer form.

[0050] An optical signal form converting module is configured to determine the value of the first field and the value of the second field based on the optical signal value in the second form, and obtain the optical signal value in the first form by using the value of the first field and the value of the second field.

[0051] A mapping relationship establishing module is configured to establish a mapping relationship between the electrical signal value and the optical signal value in the first form in the target color gamut.

[0052] A mapping table generating module is configured to generate a target mapping table based on the mapping relationship between each electrical signal value and the optical signal value in the first form in the target color gamut.

[0053] In a fifth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the color gamut conversion method and the mapping table establishing method when executing the computer program.

[0054] In a sixth aspect, the present application further provides a computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the steps of the color gamut conversion method and the mapping table establishing method.

[0055] In a seventh aspect, the present application further provides a computer program product, comprising a computer program which, when executed by a processor, implements the steps of the color gamut conversion method and the mapping table establishing method.

[0056] The color gamut conversion method, the mapping table establishing method, the device, the equipment, the storage medium and the program product find, from a first mapping table established in advance, a target optical signal value represented in a first form corresponding to a first electrical signal value, wherein the first mapping table comprises a mapping relationship between different electrical signal values and optical signal values in a first color gamut, that is, the electrical-optical conversion is completed by the table lookup method; further, from a second mapping table established in advance, a second electrical signal value corresponding to the target optical signal value is found, wherein the second mapping table comprises a mapping relationship between different electrical signal values and optical signal values in a second color gamut, that is, the photoelectric conversion is completed by the table lookup method; further, based on the second electrical signal value, an image is displayed in the second color gamut, so as to convert the first electrical signal value in the first color gamut into the second electrical signal value in the second color gamut, that is, the color gamut conversion is completed, and the color gamut conversion method supports the access of various standard video source devices and can be connected to different standard display media. In the above process, when the photoelectric conversion or the electrical-optical conversion is completed by the table lookup method, the optical signal values in the first mapping table and the second mapping table are represented by the first form, the value of the first field in the first form multiplied by a target value is equal to the optical signal value, the target value and the optical signal value are obtained by the power operation, and the value of the second field is the index in the target value. Therefore, the value of the first field and the value of the second field are both much smaller than the optical signal value, the data bit width occupied by the first form is much smaller than the data bit width occupied by the optical signal value, and a range of the optical signal value can be represented by the combination of the first field and the second field, so that the compression of the optical signal value in each mapping table is realized, the size of the invalid storage space can be greatly reduced, and the storage resource cost is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0058] Figure 1 An application environment diagram of the color gamut conversion method in an embodiment;

[0059] Figure 2A flowchart of a color gamut conversion method in one embodiment;

[0060] Figure 3 A comparison diagram of EOTF and OETF in one embodiment;

[0061] Figure 4 A mapping curve between electrical signal and optical signal in one embodiment;

[0062] Figure 5 A diagram of the relationship between the gray scale step of electrical signal and the display brightness of 12-bit signal in one embodiment;

[0063] Figure 6 A diagram of the relationship between the gray scale step of electrical signal and the display brightness of 10-bit signal in one embodiment;

[0064] Figure 7 A flowchart of searching a second mapping table in one embodiment;

[0065] Figure 8 A flowchart of a mapping table establishment method in one embodiment;

[0066] Figure 9 A structural block diagram of a color gamut conversion device in one embodiment;

[0067] Figure 10 A structural block diagram of a mapping table establishment device in one embodiment;

[0068] Figure 11 An internal structural diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0070] In the actual application at present, there are many video sources, video processing devices and display media, and the format support for HDR is not the same. A large number of old devices will exist and continue to be used for a long time, and the differences between various standards and product generations are very large. At present, the mutual conversion between HDR and SDR is realized to achieve different color gamut or color space conversion. In the color gamut conversion process, the electrical signal value after video encoding needs to be converted into linear optical signal value.

[0071] The mutual conversion between the traditional electric signal value and the linear light signal value generally adopts a lookup table method, that is, a RAM (Random Access Memory) is defined, and the values are put in advance. Considering that the data range of the linear light signal value is very large, 27 bits of data are required to express the linear light signal value, and 10 bits of data are required to express the electric signal value. Therefore, the depth of the data table is 2^27, and the width is 10 bits, 2^27*10 bits = 1.3 Gbit of storage space. However, the storage resource consumption of this method is very large.

[0072] The present application provides a color gamut conversion method, by obtaining a first electric signal value obtained after an image is encoded, the first electric signal value representing color information of the image under a first color gamut, searching for a target light signal value expressed in a first form corresponding to the first electric signal value from a first mapping table established in advance, wherein the first mapping table includes the mapping relationship between different electric signal values and light signal values under the first color gamut, that is, the electric-optical conversion is completed by the lookup table method; further, searching for a second electric signal value corresponding to the target light signal value from a second mapping table established in advance, wherein the second mapping table includes the mapping relationship between different electric signal values and light signal values under the second color gamut, that is, the photoelectric conversion is completed by the lookup table method; further, based on the second electric signal value, displaying the image under the second color gamut, so as to convert the first electric signal value under the first color gamut into the second electric signal value under the second color gamut, that is, the color gamut conversion is completed. This color gamut conversion method supports the access of various standard video source devices and can be connected to different standard display media. In the above process, when the photoelectric conversion or the electric-optical conversion is completed by the lookup table method, the light signal values in the first mapping table and the second mapping table are expressed by the first form, the value of the first field in the first form multiplied by the target value is equal to the light signal value, and the target value and the light signal value are obtained by power operation, and the value of the second field is the index in the target value. Therefore, the value of the first field and the value of the second field are much smaller than the light signal value, the data bit width occupied by the first form is much smaller than the data bit width occupied by the light signal value, and a range of a large light signal value can be represented by the combination of the first field and the second field, realizing the compression of the light signal values in the mapping tables, greatly reducing the size of the invalid storage space, and reducing the storage resource consumption.

[0073] The color gamut conversion method provided by the embodiments of the present application can be applied to, for example, Figure 1The application environment is shown. Among them, the video source device 102 under the first color gamut encodes the image to obtain the first electric signal value, and transmits the first electric signal value to the display device 104 under the second color gamut, wherein the first electric signal value represents the color information of the image under the first color gamut. The display device 104 obtains the first electric signal value obtained after the image is encoded; the display device 104 finds the target light signal value represented in the first form corresponding to the first electric signal value from the first mapping table established in advance; the first mapping table includes the mapping relationship between different electric signal values and light signal values under the first color gamut; the display device 104 finds the second electric signal value corresponding to the target light signal value from the second mapping table established in advance; the second mapping table includes the mapping relationship between different electric signal values and light signal values under the second color gamut; wherein the light signal values in the first mapping table and the second mapping table are represented by the first form, the first form includes a first field and a second field, the value of the first field multiplied by the target value is equal to the light signal value, and the target value is obtained by performing power operation on the value of the second field with a preset value as the base; the display device 104 displays the image under the second color gamut based on the second electric signal value.

[0074] Among them, the video source device 102 and the display device 104 can be but not limited to various personal computers, notebook computers, smart phones, tablet computers, video processing devices and display media.

[0075] In an exemplary embodiment, as shown in Figure 2 , a color gamut conversion method is provided, and the method is applied to the display device in Figure 1 for example, including the following steps. Among them:

[0076] Step 202, obtaining the first electric signal value obtained after the image is encoded; the first electric signal value represents the color information of the image under the first color gamut.

[0077] Among them, the image is a static picture or frame generated by the video source device, which contains all the pixels and corresponding color information constituting the picture. Each frame of image is encoded into a series of electric signal values (denoted as E value) individually or in combination, so as to be transmitted in the transmission medium, and finally decoded and displayed on the display device.

[0078] The first electrical signal value refers to a digital representation obtained after image encoding. This representation is a series of binary codes or numerical values. The first electrical signal value represents the color information of the image in the first color gamut, where color information refers to the color value or color attribute of each pixel in the image. In digital images, color information is usually represented as numerical values in the red, green, blue (RGB) or other color spaces (such as CMYK, HSV, etc.). Further, the first electrical signal value also contains visual information such as color, brightness, contrast, and metadata (such as timestamp, frame number, etc.) of the image.

[0079] The first color gamut refers to the color gamut used by the video source device. Since the video source device and the display device may be based on different technologies or standards, their ability to capture and represent colors (i.e., color gamut) may differ. Therefore, the first color gamut defines the color range or color space used by the video source device when generating and transmitting video signals. When the video signal is transmitted to the display device, the display device needs to convert and process the received signal according to its own supported color gamut to accurately display the original image colors.

[0080] Specifically, the video source device encodes each frame of image to obtain the first electrical signal value and transmits the first electrical signal value to the display device. The display device receives the first electrical signal value transmitted by the video source.

[0081] Step 204: From the pre-established first mapping table, find the target optical signal value represented in the first form corresponding to the first electrical signal value; the first mapping table includes the mapping relationship between different electrical signal values and optical signal values in the first color gamut.

[0082] The first mapping table is a pre-established data structure that contains the mapping relationship between different electrical signal values (E values) and optical signal values (O values) in the first color gamut. The electrical signal values in the first mapping table are usually data generated by the video source device after encoding and compression, used to represent the color information of the image. The optical signal value in the first mapping table is an important intermediate value that represents the color performance of the first electrical signal value in the physical world.

[0083] It should be noted that the process of converting electrical signals to optical signals is called EOTF, where the optical domain (O domain) is a unified intermediate domain, and any different format of HDR encoding standard can be uniformly expressed in the O domain, and then converted to the electrical signal in the target color gamut, thus completing the mutual conversion of different HDR standards.

[0084] The target optical signal value is obtained by looking up the first mapping table for an entry corresponding to the first electrical signal value. The target optical signal value indicates what optical signal value should be used to correctly reproduce the color of the image on the display device. The target optical signal value is determined according to the mapping relationship between the first color gamut used by the video source device and the second color gamut supported by the display device. Once the target optical signal value is determined, the display device can use the information represented by the target optical signal value to generate or control light, thereby presenting a visual effect that matches the original image.

[0085] Specifically, the display device determines the first electrical signal value sent by the video source device and accesses the pre-established first mapping table. In the first mapping table, the display device looks up the first electrical signal value as a key and extracts the target optical signal value corresponding to the first electrical signal value.

[0086] Step 206, looking up the second electrical signal value corresponding to the target optical signal value from the pre-established second mapping table; the second mapping table includes the mapping relationship between different electrical signal values and optical signal values under the second color gamut; wherein the optical signal values in the first mapping table and the second mapping table are represented by the first form, the first form includes a first field and a second field, the value of the first field multiplied by a target value is equal to the optical signal value, and the target value is obtained by performing an exponential operation on a preset value as a base and the value of the second field as an exponent.

[0087] The second mapping table is a pre-established table containing the mapping relationship between different electrical signal values and optical signal values under the second color gamut (i.e. the color gamut of the display device), which is used to convert the optical signal value to the second electrical signal value under the second color gamut in the color gamut conversion process. It should be noted that the process of converting the optical signal to the electrical signal is called OETF. Figure 3 A comparison diagram of EOTF and OETF in an embodiment.

[0088] The second electrical signal value is the electrical signal value corresponding to the target optical signal value under the second color gamut obtained by looking up the second mapping table after the display device determines the target optical signal value.

[0089] The second color gamut refers to the range or set of colors that the display device can display.

[0090] The first form refers to the way in which the optical signal value is stored or represented in the first mapping table and the second mapping table. The optical signal value in the first mapping table and the second mapping table is represented by a floating-point data type, which is referred to as the first form. The first form includes two fields: a first field and a second field. The first field and the second field are used together to represent the optical signal value.

[0091] The first field and the second field are two components in the first form, and are used to store different information or parameters related to the light signal value. The value of the first field multiplied by the target value is equal to the light signal value. The target value is obtained by raising the preset value to the power of the value of the second field.

[0092] The target value refers to a value calculated from the second field through certain operations (such as power operation), which is used to multiply the first field to obtain the final light signal value.

[0093] The preset value refers to the base number used in the storage and calculation of the display device, and the preset value determines how to represent the light signal value. The base number used by the display device includes binary, decimal, octal, and the like. For example, taking the light signal value 19971400000000 as an example, according to 19971400000000 = 1.99714 * 10^13, it can be determined that the first field is 1.99, the target value is 10^13, the preset value is 10, and the second field is 13. For example, taking the light signal value 1200 as an example, according to 1200 = 150 * 2^3, the first field is 150, the target value is 2^3, the preset value is 2, and the second field is 3.

[0094] Specifically, the display device determines the target light signal value and accesses the second mapping table established in advance. In the second mapping table, the display device takes the target light signal value as a key to search and extracts the second electric signal value corresponding to the target light signal value.

[0095] In some embodiments, the mutual conversion of E and O in the conventional technology can also use a direct calculation method. The direct calculation method directly calculates the O corresponding to E or the E corresponding to O according to the electro-optical transfer function. However, since the direct calculation method involves power operation and has a large data bit width, the display device has no problem in processing images alone, but if it is a continuous processing of video stream, it is difficult to meet the real-time requirements, and the consumption of FPGA logic resources and multipliers of the display device is very large, and the calculation amount is extremely large. Generally, it is necessary to sacrifice precision as a price to reduce resource consumption, which has practical value, and in actual large-scale product applications, it is also done in this way, such as directly using integer processing and discarding long decimal places, which has a certain influence on the low gray effect of the video. The specific need to see the use scene to decide how much precision to discard to obtain appropriate resource saving.

[0096] If it is determined through resource evaluation that the resource consumption required to determine the second electric signal value corresponding to the target light signal value by the direct calculation method is acceptable, then the direct calculation method can be used for calculation, and the second mapping table does not need to be used for table lookup determination.

[0097] At step 208, the image is displayed under the second color gamut based on the second electrical signal value.

[0098] Specifically, after the display device obtains the second electrical signal value corresponding to the target optical signal value, the display device converts the second electrical signal value into a digital signal recognizable by the display device, maps the digital signal to specific image data, and displays the image sent by the video source device according to the image data under the second color gamut supported by the display device.

[0099] In the color gamut conversion method, the target optical signal value expressed in the first form corresponding to the first electrical signal value is found from a first mapping table, wherein the first mapping table includes the mapping relationship between different electrical signal values and optical signal values under the first color gamut, that is, the electro-optical conversion is completed by the table lookup method; further, the second electrical signal value corresponding to the target optical signal value is found from a second mapping table, wherein the second mapping table includes the mapping relationship between different electrical signal values and optical signal values under the second color gamut, that is, the photoelectric conversion is completed by the table lookup method; further, the image is displayed under the second color gamut based on the second electrical signal value, so as to convert the first electrical signal value under the first color gamut into the second electrical signal value under the second color gamut, that is, the color gamut conversion is completed. This color gamut conversion method supports the access of various standard video source devices and can be connected to different standard display media. In the above process, when the photoelectric conversion or electro-optical conversion is completed by the table lookup method, the optical signal values in the first mapping table and the second mapping table are expressed by the first form, the value of the first field in the first form multiplied by the target value is equal to the optical signal value, the target value and the optical signal value are obtained by the power operation, and the value of the second field is the exponent in the target value. Therefore, the value of the first field and the value of the second field are much smaller than the optical signal value, the data bit width occupied by the first form is much smaller than the data bit width occupied by the optical signal value, and a range of the optical signal value can be represented by the combination of the first field and the second field, so as to realize the compression of the optical signal value in each mapping table, greatly reduce the size of the invalid storage space, and reduce the storage resource overhead.

[0100] In one embodiment, the establishment method of the first mapping table can be the same as the establishment method of the second mapping table. Therefore, only the establishment method of the first mapping table is introduced here. Specifically, the establishment method of the first mapping table includes:

[0101] I. determining an electro-optical transfer function corresponding to the first color gamut.

[0102] wherein the electro-optical transfer function refers to a function of converting the encoded electrical signal of an image to an offline light domain, and is used to describe the conversion process from a video signal to a linear light output. Through the electro-optical transfer function, the corresponding linear light output can be calculated according to the input video signal, so as to realize the color gamut conversion. For example, the mutual conversion between BT.709 (a format belonging to SDR) and BT.2020 (a format belonging to HDR) first converts the encoded electrical signal of the video of BT.709 to a linear light domain, which is called EOTF, and the function of performing EO is called an electro-optical transfer function.

[0103] Specifically, the display device determines the electro-optical transfer function corresponding to the first color gamut according to the type of the first color gamut.

[0104] In some embodiments, the conversion between different color spaces corresponds to different electro-optical transfer functions. Table 1 lists the electro-optical transfer functions corresponding to several color spaces:

[0105] Table 1

[0106]

[0107] Among them, sRGB and Rec.709 mainly belong to the color gamut standard of SDR. P3-D65, P3-Theatrical and Rec.2020 mainly belong to the color gamut standard of HDR. According to the convention of SMPTE ST 2084 standard, the EOTF conversion equation corresponding to PQ in Table 1 is:

[0108]

[0109] where

[0110] N denotes a nonlinear color value

[0111] L denotes the corresponding linear color value

[0112]

[0113] m2 is the number 2523 / 4096×128=78.84375

[0114] c1 is the number 3424 / 4096=0.8359375=c3-c2+1

[0115] c2 is the number 2413 / 4096×32=18.8515625

[0116] c3 is the number 2392 / 4096x32=18.6875

[0117] Wherein, N is a nonlinear electrical signal, the data range of N is 0-1023. L is a linear optical signal, the data range of L is 0.00004-10000 nits, which represents the light intensity, and the unit is nit. The above function represents the mapping relationship between the electrical signal and the optical signal. According to the above function, the corresponding optical signal of different electrical signals can be obtained as shown in Table 2:

[0118] Table 2

[0119] N L (linear light data) nit 0 0.000000 1 0.000040 2 0.000131 3 0.000262 ...... ...... ...... ...... 1021 9724.121312 1022 9815.190962 1023 9907.147488

[0120] Figure 4 is a mapping curve between the electrical signal and the optical signal in an embodiment, Figure 4 The data corresponding relationship of several typical electrical signals is given, wherein, Figure 4 The horizontal coordinate is the light intensity, and the vertical coordinate is the value of the encoded electrical signal.

[0121] II. For any electrical signal value under the first color gamut, based on the electro-optical transfer function, the optical signal value corresponding to the electrical signal value is determined in the second form. The second form is an integer form.

[0122] Specifically, for any electrical signal value under the first color gamut, the display device uses the electro-optical transfer function (EOTF) corresponding to the first color gamut to convert the electrical signal value into an optical signal value, and quantizes the calculated optical signal value into an integer form.

[0123] III. Based on the optical signal value in the second form, the value of the first field and the value of the second field are determined, and the optical signal value in the first form is obtained through the value of the first field and the value of the second field.

[0124] Wherein, when the first field and the second field are used to express and compress the optical signal value, the bit width of the first field and the second field directly affects the storage size of the storage space RAM. The determination method of the first field is to analyze the step value of the data, analyze the step situation of the whole gray scale by drawing the gray step-display brightness curve, find the minimum value of the gray scale step, and take twice the precision of the value to ensure that the data is lossless. The lossless here means that the error will not affect the result, not the complete equality in mathematics. The determination method of the second field is to consider the maximum and minimum range of the data, such as from 0.00001 to 1000000, which is actually-5 power to 6 power. Therefore, the first field is 5 bits.

[0125] Figure 5Fig. 2 is a diagram showing the relationship between the gray scale steps of an electrical signal and the display brightness of a 12-bit signal in one embodiment, Figure 6 Fig. 3 is a diagram showing the relationship between the gray scale steps of an electrical signal and the display brightness of a 10-bit signal in one embodiment, Figure 5 and Figure 6 As shown in Figs. 2 and 3, as the brightness increases, the percentage of the gray scale steps gradually decreases. In-depth analysis of the table lookup process in combination with the specific gray scale mapping relationship in Table 2 above shows that although the depth of the data table is extremely large, since the range of the N signal is 0-1024, it means that a large number of tables will not be queried. This is the theoretical basis for the operation process, that is, when the gray level is low, high precision is required, but the data range is small. However, when the brightness is high, the data range is large, but the tolerance for precision error is very high. Based on the above findings, the first field and the second field are used to represent and compress the optical signal value in the embodiments of the present application. For example, 9971400000000 = 1.99714 x 1013, so this number can be represented by two fields, 13 and 1.99714. According to the use case, the decimal part that does not affect the accuracy is discarded, which can be further compressed. For example, 13 and 1.99 represent a very large number.

[0126] According to the above Figure 5 and Figure 6 , the characteristics of the PQ table of the color gamut conversion in the HDR and the relationship between the gray scale step percentage, the power needs to be 5 times of 2, that is, in the range of 0 to 32. Then the second field uses 5 bits to represent. The first field, from Figure 5 and Figure 6 , the smallest gray scale step is about 0.9%, so considering the extreme case of positive and negative deviation, the resolution of the first field needs to be greater than 2 times the value, which needs 8-bit precision 1 / 255, which is enough to reach 0.39%. Therefore, the first field uses 8 bits to represent, so the range of the first field is 128-255, and 5 bits + 8 bits are enough to maintain full-precision data processing.

[0127] Therefore, according to the above analysis, it can be known that the range of the first field is 128-255, occupying 8 bits, and the range of the second field is 0-32, occupying 5 bits, that is, 13 bits of data can be used to represent 27 bits of optical signal value. It should be noted that the mutual conversion between the conventional electrical signal value and the linear optical signal value generally adopts a lookup table method, and the optical signal value in the lookup table used by the lookup table method is stored in an integer form. Taking PQ as an example, the original data lookup table generally needs 27 bits of data to express, and the electrical signal value needs 10 bits of data to express. Therefore, the depth of the data table is 2 raised to the power of 27, the width is 10 bits, and the storage space is 2^27*10 bits = 1.3 Gbits. According to the manner of the embodiment, 13 bits of data depth can be used, and the data width is still 10 bits, so the required storage space is 8192*10 bits = 8 Kbits of storage space, which is reduced by thousands of times.

[0128] Since the first field is 8 bits, every time 255 is reached, a carry 1 to the second field is needed, and then the first field starts from 128 again, and the corresponding second field starts from 13. 13 is actually the maximum range of the second field.

[0129] It should be noted that the first field starts from 128 again after the carry, rather than from 0 or other values, because the first field is 8 bits, and its middle value is 10000000 (i.e., 128). When the value of the first field increases from 127 to 128 (i.e., 01111111 to 10000000), it actually does not "overflow" the range of 8 bits, because 128 can still be represented by 8 bits. However, when it continues to increase from 128, it is closer to 255, which is the maximum value that can be represented by the 8-bit field. Therefore, in order to optimize the representation range and utilization efficiency of the numerical value, it is selected not to carry before the first field reaches 128, because doing so will waste the bits of the second field to represent those numbers less than 128. On the contrary, it is not until the first field reaches or exceeds 128 (i.e., close to half of its maximum value) that the carry is considered, so that the numerical value range can be more evenly distributed between the first field and the second field. Therefore, when the value of the first field reaches 255 and needs to be carried, the first field is reset to 128, and the carry is reflected to the second field. In this way, the first field and the second field can be effectively utilized, and larger numerical values can be represented without losing too much precision.

[0130] Specifically, the display device determines the preset value, and determines the value of the first field and the value of the second field based on the light signal value in the second form and the preset value; the display device determines the range of the first field, and adjusts the first field and the second field if the value of the first field is not in the range of the first field, until the adjusted first field is in the range of the first field, and the value of the adjusted first field and the value of the adjusted second field are determined as the final value of the first field and the second field, and the light signal value in the first form is obtained through the final value of the first field and the second field.

[0131] IV. Establishing a mapping relationship between the electrical signal value and the light signal value in the first form under the first color gamut.

[0132] Specifically, the display device establishes a mapping relationship between the electrical signal value under the first color gamut and the light signal value in the first form.

[0133] V. Generating a first mapping table based on the mapping relationship between each electrical signal value and the light signal value in the first form under the first color gamut.

[0134] Specifically, after the display device establishes a mapping relationship between each electrical signal value and the corresponding light signal value in the first form under the first color gamut, the first mapping table can be obtained.

[0135] For example, the host computer / ARM calculates the function value (i.e. the corresponding light signal value) corresponding to any electrical signal value under each first color gamut according to the photoelectric transfer function corresponding to the PQ curve. Wherein, the host computer / ARM uses each 10-bit E signal (i.e. electrical signal) under gray scale as an independent variable, and calculates a 27-bit function value (i.e. the light signal value in the second form), and determines the value of the first field and the value of the second field according to the above method, and combines them into a 5-bit+8-bit 13-bit O data (i.e. the light signal value in the first form). In this way, the 10-bit electrical signal value is used as an index value, and the 13-bit O data can be obtained, and the first mapping table is completed, and the second mapping table can be completed in the same way.

[0136] In the embodiment, the optical signal value is expressed in integer form, which can simplify the storage and transmission process. Based on the optical signal value in integer form, the optical signal value is expressed by the first field and the second field. Since the optical signal value is equal to the value of the first field multiplied by the target value, and the value of the second field is the exponent in the target value, and the target value and the optical signal value are obtained by power operation, the value of the first field and the value of the second field are much smaller than the optical signal value, and the data bit width occupied by the first form is much smaller than the data bit width occupied by the optical signal value. The first form and the second form can be combined to represent an optical signal value with a very large range, which realizes the compression of the optical signal value in each mapping table and greatly reduces the storage space. On the other hand, the mapping relationship between the electrical signal value and the optical signal value is established, and the mapping table is generated, which can speed up the subsequent lookup and conversion process.

[0137] In one embodiment, based on the optical signal value expressed in the second form, the value of the first field and the value of the second field are determined, including:

[0138] I. Based on the optical signal value expressed in the second form, the first initial value of the first field and the second initial value of the second field are set.

[0139] Specifically, the display device determines a preset value, sets the second initial value of the second field as the base number, determines the target value according to the second initial value and the preset value, and determines the first initial value of the first field according to the requirement that the value of the first field multiplied by the target value is equal to the second optical signal value.

[0140] II. Determine the relationship between the first initial value and the preset range.

[0141] The preset range refers to the range of the first initial value. When the value of the first field reaches the upper limit value of its preset range, a carry operation is triggered, that is, the value of the second field is increased by 1, and the value of the first field is reset to the lower limit value of the preset range, so as to continue counting or accumulating. When the value of the first field is less than the lower limit value of its preset range, a borrow operation is triggered, that is, the value of the second field is reduced by 1, and the value of the first field is divided by the preset value (that is, the base number used in the storage and calculation of the display device). This mechanism ensures that even in the case of limited value range of a single field, a larger value range or more complex control logic can be realized through the combination of multiple fields and specific logic processing. Taking the preset value 2 as an example, the preset range corresponding to the first field is [128, 255].

[0142] Specifically, the display device determines a preset range corresponding to the first field, and if the first initial value is within the preset range, takes the first initial value as the value of the first field and takes the second initial value as the value of the second field. If the first initial value is not within the preset range, the first initial value and the second initial value need to be adjusted.

[0143] III. If the first initial value is greater than the upper limit value of the preset range, the first initial value is left shifted once and the second initial value is increased by 1. If the first initial value is less than the lower limit value of the preset range, the first initial value is right shifted once and the second initial value is decreased by 1.

[0144] If the first initial value is not within the preset range, there are two cases, each of which corresponds to a different adjustment strategy. Case I: the first initial value is greater than the upper limit value of the preset range. In this case, the adjustment strategy is that the first initial value is left shifted, i.e., the first initial value is divided by a preset value, and the second initial value corresponding to the second field is increased by 1, and the cycle is repeated until the first initial value is within the preset range. For example, the preset range corresponding to the first field is [128, 255], the optical signal value is 1200, the preset value is 2, the first initial value is 600, and the second initial value is 1. Obviously, the first initial value is not within [128, 255], so the first initial value needs to be left shifted (i.e., divided by 2), and the updated first initial value is 300, and the second initial value is increased by 1 (i.e., the second initial value is 2). At this time, the updated first initial value is still not within the preset range, so the updated first initial value needs to be left shifted again, and the updated first initial value is 150, and the second initial value is increased by 1 (i.e., the second initial value is 3). At this time, the updated first initial value is within [128, 255], and the first initial value and the second initial value are not adjusted.

[0145] Case II: the second initial value is less than the lower limit value of the preset range. In this case, the adjustment strategy is that the first initial value is right shifted, i.e., the first initial value is multiplied by a preset value, and the second initial value corresponding to the second field is decreased by 1, and the cycle is repeated until the first initial value is within the preset range.

[0146] Specifically, the display device determines the first initial value, the second initial value and the preset value set by the display device. If the first initial value is greater than the upper limit value of the preset range, the first initial value is left shifted once, i.e., the first initial value is divided by the preset value, and the second initial value is increased by 1. If the first initial value is less than the lower limit value of the preset range, the first initial value is right shifted once, i.e., the first initial value is multiplied by the preset value, and the second initial value is decreased by 1.

[0147] IV. taking the updated first initial value as a new first initial value, and continuing to execute the step of returning the relationship between the new first initial value and the preset range based on the new first initial value until the first initial value is within the preset range or the number of movements reaches a movement threshold, taking the last determined first initial value as the value of the first field and taking the last determined second initial value as the value of the second field.

[0148] The movement threshold refers to a threshold of the number of consecutive left movements. For example, when the preset value is 2, the corresponding movement threshold can be set to 13.

[0149] Specifically, the display device takes the updated first initial value as a new first initial value, and determines whether the new first initial value is within the preset range of the first field. If not, the first initial value and the second initial value are adjusted again according to step III until the first initial value is within the preset range of the first field, or the number of consecutive movements in a certain direction reaches the preset movement threshold, and the adjustment of the first initial value and the second initial value is stopped. The last determined first initial value is taken as the value of the first field, and the last determined second initial value is taken as the value of the second field.

[0150] In this embodiment, the preset range of the first field is set, and the first initial value and the second initial value are adjusted according to the relationship between the first initial value of the first field and the preset range, so that the updated first initial value is within the preset range corresponding to the first field. Thus, the values of the first field and the second field are determined, which can avoid invalid or incorrect data input, thereby maintaining the integrity and accuracy of the data.

[0151] In a traditional method, the second electric signal value corresponding to the target optical signal value is directly calculated by the photoelectric transfer function. However, this method involves power operation and has a large data bit width, and when processing continuous video streams and the like, the calculation resource consumption is large, and the real-time performance is difficult to meet the requirements. In another traditional method, a direct mapping table is established in advance, which includes the mapping relationship between different electric signal values and optical signal values. The optical signal values stored in the direct mapping table are directly calculated by the photoelectric transfer function. The direct mapping table established in advance can be used to find the second electric signal value corresponding to the target optical signal value by the table lookup method. However, since the data bit width of the optical signal value calculated by the direct calculation method is large, the storage space occupied is large, which affects the lookup efficiency of the table lookup method. Therefore, the embodiments of the present application propose to find the second electric signal value corresponding to the target optical signal value from the second mapping table established in advance, which includes:

[0152] The second mapping table established in advance is obtained. If the target optical signal value is in the second mapping table, the electric signal value corresponding to the target optical signal value in the second mapping table is taken as the second electric signal value corresponding to the target optical signal value.

[0153] In this embodiment, since the second mapping table is pre-established, the target optical signal value can be quickly found and matched through the pre-established second mapping table, and the second electrical signal value corresponding to the target optical signal value can be quickly found and matched. This method is faster in finding the second electrical signal value. Compared with the traditional method of calculating the second electrical signal value corresponding to the target optical signal value in real time, the use of the second mapping table can greatly reduce the calculation amount and the query time. In addition, compared with the traditional method of directly mapping the table, the optical signal values stored in the second mapping table are represented by the first form, and the data bit width occupied by the first form is smaller, which reduces the size of the invalid storage space and is conducive to improving the table lookup efficiency.

[0154] In this embodiment, since the second mapping table is pre-established, the target optical signal value can be quickly found and matched through the pre-established second mapping table, and the second electrical signal value corresponding to the target optical signal value can be quickly found and matched. This method is faster in finding the second electrical signal value. Compared with the traditional method of calculating the second electrical signal value corresponding to the target optical signal value in real time, the use of the second mapping table can greatly reduce the calculation amount and the query time. In addition, compared with the traditional method of directly mapping the table, the optical signal values stored in the second mapping table are represented by the first form, and the data bit width occupied by the first form is smaller, which reduces the size of the invalid storage space and is conducive to improving the table lookup efficiency.

[0155] In this embodiment, since the second mapping table is pre-established, the target optical signal value can be quickly found and matched through the pre-established second mapping table, and the second electrical signal value corresponding to the target optical signal value can be quickly found and matched. This method is faster in finding the second electrical signal value. Compared with the traditional method of calculating the second electrical signal value corresponding to the target optical signal value in real time, the use of the second mapping table can greatly reduce the calculation amount and the query time. In addition, compared with the traditional method of directly mapping the table, the optical signal values stored in the second mapping table are represented by the first form, and the data bit width occupied by the first form is smaller, which reduces the size of the invalid storage space and is conducive to improving the table lookup efficiency.

[0156] In some embodiments, if the target optical signal value is not in the second mapping table, a reference optical signal value satisfying the approximation condition is determined in the second mapping table, and the electrical signal value corresponding to the reference optical signal value is taken as the second electrical signal value corresponding to the target optical signal value.

[0157] In this embodiment, since the second mapping table is pre-established, the target optical signal value can be quickly found and matched through the pre-established second mapping table, and the second electrical signal value corresponding to the target optical signal value can be quickly found and matched. This method is faster in finding the second electrical signal value. Compared with the traditional method of calculating the second electrical signal value corresponding to the target optical signal value in real time, the use of the second mapping table can greatly reduce the calculation amount and the query time. In addition, compared with the traditional method of directly mapping the table, the optical signal values stored in the second mapping table are represented by the first form, and the data bit width occupied by the first form is smaller, which reduces the size of the invalid storage space and is conducive to improving the table lookup efficiency.

[0158] Specifically, after the display device retrieves the pre-established second mapping table from the local and finds the target optical signal value represented in the first form from the first mapping table, the display device finds whether the target optical signal value exists in the second mapping table; if the target optical signal value does not exist in the second mapping table, the display device calculates the similarity between the target optical signal value and the existing optical signal value in the second mapping table, and takes the optical signal value with the largest similarity as the reference optical signal value satisfying the approximate condition, and takes the electrical signal value corresponding to the reference optical signal value as the second electrical signal value corresponding to the target optical signal value.

[0159] In some embodiments, the display device can further pre-establish a third mapping table according to the second mapping table, and find the second electrical signal value corresponding to the target optical signal value from the pre-established third mapping table. The third mapping table includes the mapping relationship between different optical signal values and electrical signal values in the second color gamut.

[0160] Specifically, the display device acquires the pre-established second mapping table, determines the optical signal value represented in the first form, traverses the second mapping table to find the reference optical signal value closest to the optical signal value, stores the electrical signal value corresponding to the reference optical signal value in the data table as the mapping from O to E, and until all 8192 O values are obtained corresponding E values, the third mapping table (O-E data table) is completed. After the display device finds the target optical signal value represented in the first form from the first mapping table, the electrical signal value corresponding to the target optical signal value in the third mapping table is taken as the second electrical signal value corresponding to the target optical signal value.

[0161] In the embodiment, in the case that the target optical signal value does not exist in the second mapping table, the reference optical signal value satisfying the approximate condition is determined in the second mapping table, and the electrical signal value corresponding to the reference optical signal value is taken as the second electrical signal value corresponding to the target optical signal value. In the above process, since the data range of the optical signal value is greater than the data range of the electrical signal value, the reference optical signal value is determined by introducing the approximate condition, so that the corresponding second electrical signal value can be determined in the case that the target optical signal value and the second electrical signal value cannot be accurately mapped, ensuring the smooth progress of the photoelectric conversion, thereby improving the robustness. Compared with calculating the electrical signal value corresponding to each optical signal value in real time, the method of using the pre-established second mapping table can significantly reduce the calculation cost, which is conducive to improving the determination efficiency of the second electrical signal value; compared with online searching the electrical signal value corresponding to each optical signal value, by introducing the approximate condition, each optical signal value needs to be calculated to obtain the corresponding electrical signal value through the photoelectric conversion function, which can further reduce the calculation cost.

[0162] In one of the embodiments, the color gamut conversion method further includes:

[0163] I. After the target optical signal value expressed in the first form is found from the first mapping table, if an update operation for the target optical signal value is detected, the target optical signal value is converted from the first form to the second form.

[0164] The update operation refers to a process of modifying an existing target optical signal value. Since the target optical signal value is initially found from the first mapping table and is expressed in the first form (floating-point type), but the update operation for the target optical signal value is based on the target optical signal value expressed in the second form, when the target optical signal value is modified, the target optical signal value expressed in the first form needs to be converted to the target optical signal value expressed in the second form.

[0165] The update operation can be triggered by a user, an event, or automatically according to certain algorithmic logic. For example, after the target optical signal value expressed in the first form is found from the first mapping table, a user views a certain target optical signal value through the interface of the display device and decides to modify it. At this time, the user inputs a new optical signal value or adjusts the optical signal value according to the adjustment tools (such as sliders, knobs, etc.) provided by the display interface. The display device detects the input change of the user and triggers the update operation.

[0166] For example, after the target optical signal value expressed in the first form is found from the first mapping table, the display device detects that the current target optical signal value does not meet the preset conditions or threshold value according to the built-in algorithm or logic, and automatically calculates a new optical signal value that better meets the current system state or business requirements. At this time, the display device triggers the update operation.

[0167] For example, the display device periodically performs calibration operations to maintain the accuracy of the optical signal value. During the calibration process, after the target optical signal value expressed in the first form is found from the first mapping table, the display device recalculates or sets the target optical signal value according to some reference data or standard value, triggers the update operation according to the new target optical signal value, and replaces the old target optical signal value with the new target optical signal value.

[0168] Specifically, after the target optical signal value expressed in the first form is found from the first mapping table, the display device detects whether there is an update operation for modifying the current target optical signal value. If an update operation for the target optical signal value is detected, the target optical signal value is converted from the first form to the second form.

[0169] The preset value is 2, the target light signal value is expressed in a first form of combination of the first field (150) and the second field (3), and after the display device finds the target light signal value expressed in the first form from the first mapping table, if an update operation for the target light signal value is detected, the display device converts the target light signal value expressed in the first form into a target light signal value expressed in a second form (i.e., 1200, obtained according to 150*2^3=1200).

[0170] II. Based on the update operation, the target light signal value expressed in the second form is updated to obtain an updated target light signal value expressed in the second form.

[0171] Specifically, after the display device converts the target light signal value expressed in the first form into the target light signal value expressed in the second form, the display device modifies the target light signal value expressed in the second form according to the update operation to obtain an updated target light signal value expressed in the second form.

[0172] III. Based on the updated target light signal value expressed in the second form, the value of the new first field and the value of the new second field are determined, the updated target light signal value expressed in the first form is expressed by the value of the new first field and the value of the new second field, and based on the updated target light signal value expressed in the first form, the step of finding the second electric signal value corresponding to the target light signal value from the second mapping table established in advance is performed.

[0173] In the second mapping table, the light signal values are all expressed in the first form. Therefore, after the updated target light signal value expressed in the second form is obtained, the target light signal value expressed in the second form needs to be converted into a target light signal value expressed in the first form, and then the second mapping table is used for the table lookup.

[0174] Specifically, the display device sets a first initial value of the first field and a second initial value of the second field based on the updated target light signal value represented in the second form, and determines a preset range of the first field, adjusts the first initial value and the second initial value until the first initial value is within the preset range if the first initial value is not within the preset range, takes the finally determined first initial value as a new value of the first field, and takes the finally determined second initial value as a new value of the second field. The display device represents the updated target light signal value represented in the first form by using the new value of the first field and the new value of the second field, and looks up the second mapping table based on the target light signal value represented in the first form to obtain a second electrical signal value corresponding to the target light signal value. The display device displays an image in the second color gamut according to the second electrical signal value.

[0175] For example, Figure 7 For an embodiment, a flowchart for looking up the second mapping table is shown in FIG. 6. As shown in FIG. 6, the FPGA processor in the display device converts the target light signal value from the first form to the second form and modifies the target light signal value in the second form to obtain an updated target light signal value represented in the second form based on the target light signal value represented in the first form and the detection of the update operation on the target light signal value. Figure 7 As described above, the FPGA processor in the display device converts the target light signal value from the first form to the second form and modifies the target light signal value in the second form to obtain an updated target light signal value represented in the second form based on the target light signal value represented in the first form and the detection of the update operation on the target light signal value. Then, the FPGA processor converts the updated target light signal value represented in the second form into 13-bit dynamic floating-point number data of the first field + the second field, where the specific conversion process is as follows: if the first initial value of the first field is greater than 255, the first initial value is left shifted by one time, and the second initial value of the second field is increased by 1; if the first initial value is less than 128, the first initial value is right shifted by one time, and the second initial value of the second field is decreased by 1. It is determined whether the updated first initial value is within the range of 128 to 255, and if not, the first initial value and the second initial value are continuously adjusted until the first initial value is left shifted by 13 times or the condition of 128 to 255 is met. The finally determined first initial value is taken as the value of the first field, and the first field is 8 bits. The finally determined second initial value is taken as the value of the second field, and the second field is 5 bits, so as to complete the conversion of the target light signal value represented in the second form into the 13-bit dynamic floating-point number data of the first field + the second field.

[0176] The FPGA processor uses the calculated 13-bit dynamic floating-point number data of the first field + the second field to query the second mapping table issued by the host computer / ARM to obtain the corresponding second electrical signal value, and completes the OE conversion (i.e., the conversion from the light signal to the electrical signal). After obtaining the second electrical signal value, the FPGA processor displays an image in the second color gamut based on the second electrical signal value.

[0177] In this embodiment, since the target optical signal value found from the first mapping table is represented in the first form, and the updating operation is based on the target optical signal value represented in the second form, when the updating operation of the target optical signal value is detected, by converting the target optical signal value from the first form (such as floating point type) to the second form (such as integer type), and updating based on the converted second form value, the consistency of data between different data forms can be ensured, so that the update is correctly reflected in the entire processing flow. At the same time, after updating the target optical signal value, the corresponding electrical signal value can be re-found based on the updated value, ensuring that the mapping relationship between the optical signal and the electrical signal is always accurate, which is beneficial to ensure the accuracy and reliability of the color gamut conversion.

[0178] In one of the embodiments, as shown in Figure 8 A mapping table establishing method is also provided, comprising the following steps:

[0179] Step 802, determining the electro-optical transfer function corresponding to the target color gamut; the target color gamut refers to the first color gamut or the second color gamut.

[0180] The electro-optical transfer function refers to a function of converting the electrical signal after image encoding to the offline optical domain, which is used to describe the conversion process from the video signal to the linear light output. Through the electro-optical transfer function, the corresponding linear light output can be calculated according to the input video signal, so as to realize the color gamut conversion. For example, the mutual conversion between BT.709 (a format belonging to SDR) and BT.2020 (a format belonging to HDR) first converts the electrical signal after video encoding of BT.709 to the linear light domain, which is called EOTF, and the function of executing EO is called electro-optical transfer function.

[0181] The first color gamut refers to the color gamut used by the video source device. The second color gamut refers to the range or set of colors that the display device can display.

[0182] Specifically, the display device determines the electro-optical transfer function corresponding to the first color gamut according to the type of the first color gamut.

[0183] In some embodiments, different electro-optical transfer functions correspond to the conversion between different color spaces. Table 1 lists the electro-optical transfer functions corresponding to several color spaces

[0184] Step 804, for any electrical signal value under the target color gamut, determining the optical signal value corresponding to the electrical signal value in the second form based on the electro-optical transfer function; the second form is an integer form.

[0185] Specifically, for any electrical signal value under the target color gamut, the display device uses the electrical-optical transfer function (EOTF) corresponding to the target color gamut to convert the electrical signal value into an optical signal value, and quantizes the calculated optical signal value into an integer form.

[0186] Step 806, based on the optical signal value represented in the second form, determine the value of the first field and the value of the second field, and obtain the optical signal value represented in the first form through the value of the first field and the value of the second field.

[0187] Wherein, when the first field and the second field are used to data express and compress the optical signal value, the bit width of the first field and the second field directly affects the storage size of the storage space RAM. Wherein, the determination method of the first field is to analyze the step value of the data, analyze the step situation of the whole gray scale by drawing the gray step-display brightness curve, find the minimum value of the gray step, and take the value of more than twice the precision, which can guarantee the data lossless. The lossless here means that the error will not affect the result, not the mathematical complete equality. The determination method of the second field is to consider the maximum and minimum range of the data, such as from 0.00001 to 1000000, which is actually-5 power to 6 power, so the first field is 5 bits can express.

[0188] Figure 5 For an embodiment, the relationship between the gray scale step of the electrical signal and the display brightness of the 12-bit signal is shown in the schematic diagram, Figure 6 For an embodiment, the relationship between the gray scale step of the electrical signal and the display brightness of the 10-bit signal is shown in the schematic diagram, Figure 5 And Figure 6 As shown in the above table 2, with the increase of the brightness, the percentage of the gray scale step gradually decreases, and in-depth analysis of the table lookup process can be known that although the data table depth is very large, but the range of N signal is 0-1024, which means that a large number of tables will not be queried, which is based on the theoretical basis of the operation process, that is, when the low gray, high precision is needed, but the data range is very small. However, when the highlight, the data range is large, but the tolerance of the precision error is very high. Based on the above findings, the first field and the second field are used to data express and compress the optical signal value in the embodiment of the application. For example, 9971400000000=1.99714×10^13, so this number can be recorded as two fields, 13 and 1.99714. According to the use case, the decimal part that does not affect the precision is discarded, which can be further compressed. For example, 13 and 1.99 express a very large number.

[0189] According to the above Figure 5 And Figure 6, the characteristic of the PQ table of the color gamut conversion in the HDR and the relationship between the gray step percentage, the power needs to be 5 times of 2, that is, the range of 0 to 32. Then the second field is represented by 5 bits. The first field is represented by 8 bits. Figure 4 and Figure 5 From the above, the minimum gray step is about 0.9%, and considering the extreme case of positive and negative deviation, the resolution of the first field required is greater than 2 times the value, 8-bit precision 1 / 255, 0.39% is sufficient, and 8 bits are used to represent the first field. Therefore, the range of the first field is 128-255, and 5 bits + 8 bits are sufficient to maintain full-precision data processing.

[0190] Therefore, according to the above analysis, the range of the first field is 128-255, which occupies 8 bits, and the range of the second field is 0-32, which occupies 5 bits. That is, 13 bits of data can be used to represent 27 bits of optical signal value. It should be noted that the mutual conversion between the traditional electrical signal value and the linear optical signal value generally uses a lookup table method, and the optical signal value in the lookup table used by the lookup table method is stored in an integer form. For example, in the PQ, the original data lookup table generally needs 27 bits of data to express, and the electrical signal value needs 10 bits of data to express. Therefore, the depth of the data table is 2^27, and the width is 10 bits, 2^27*10 bits = 1.3 Gbit of storage space. According to the manner of the embodiment, 13 bits of data depth can be used, and the data width is still 10 bits. Therefore, the required storage space is 8192*10 bits = 8 Kbit of storage space, which is reduced by thousands of times.

[0191] Since the first field is 8 bits, every 255, a carry 1 is required to the second field, and then the first field starts from 128 again, and the corresponding second field starts from 13. 13 is actually the maximum range of the second field.

[0192] It is noted that the first field starts over at 128 after a carry, rather than starting at 0 or some other value, because the first field is 8 bits, and its midpoint is 10000000 (i.e., 128). When the value of the first field increases from 127 to 128 (i.e., 01111111 to 10000000), it does not actually "overflow" the range of 8 bits, because 128 can still be represented with 8 bits. However, as the value increases from 128, it gets closer to 255, which is the maximum value that can be represented by an 8-bit field. Therefore, to optimize the range of values represented and the utilization efficiency, it is chosen not to carry over until the first field reaches 128, because doing so would waste bits of the second field to represent values less than 128. Instead, it is chosen to start considering a carry over when the first field reaches or exceeds 128 (i.e., near half of its maximum value), so that the range of values can be more evenly distributed between the first and second fields. Therefore, when the value of the first field reaches 255 and needs to be carried over, the first field is reset to 128, and the carry over is reflected to the second field. This ensures that both the first and second fields are utilized effectively, and that larger values can be represented without losing too much precision.

[0193] Specifically, the display device determines a preset value, and determines the value of the first field and the value of the second field based on the light signal value represented in the second form and the preset value; the display device determines the range of the first field, and adjusts the first field and the second field until the adjusted first field is in the range of the first field if the value of the first field is not in the range of the first field, takes the value of the adjusted first field and the value of the adjusted second field as the finally determined value of the first field and the value of the second field, and obtains the light signal value represented in the first form through the finally determined value of the first field and the value of the second field.

[0194] Step 808, establishing a mapping relationship between the electrical signal value and the light signal value represented in the first form under the target color gamut.

[0195] Specifically, the display device establishes a mapping relationship between the electrical signal value under the first color gamut and the light signal value represented in the first form.

[0196] Step 810, generating a target mapping table based on the mapping relationship between each electrical signal value and the light signal value represented in the first form under the target color gamut.

[0197] Specifically, the display device can obtain the first mapping table after establishing a mapping relationship between each electrical signal value under the first color gamut and the corresponding light signal value represented in the first form.

[0198] For example, the host / ARM calculates the function value (i.e. the corresponding light signal value) corresponding to any electrical signal value of each first color gamut according to the photoelectric transfer function corresponding to the PQ curve. Wherein, the host / ARM takes the gray scale of each 10-bit E signal (i.e. electrical signal) as the independent variable to calculate the 27-bit function value (i.e. the light signal value in the second form), and determines the value of the first field and the value of the second field according to the above-mentioned manner, and combines them into a 5-bit+8-bit 13-bit O data (i.e. the light signal value in the first form). In this way, the 10-bit electrical signal value is used as the index value, and the 13-bit O data can be obtained, thereby completing the preparation of the first mapping table, and the second mapping table can be prepared in the same way.

[0199] In the embodiment, the light signal value is expressed in integer form, which can simplify the storage and transmission process. On the basis of the light signal value in integer form, the light signal value is expressed by the first field and the second field, wherein the value of the first field multiplied by the target value is equal to the light signal value. Since the target value and the light signal value are obtained by power operation, the value of the second field is the exponent in the target value. Therefore, the value of the first field and the value of the second field are both much smaller than the light signal value, and the data bit width occupied by the first form is much smaller than the data bit width occupied by the light signal value. The light signal value in a very large range can be represented by the combination of the first field and the second field, thereby realizing the compression of the light signal value in each mapping table, greatly reducing the storage space, and the mapping table establishment method of the embodiment can also be used for other complex algorithm lookup scenarios. By reasonably determining the value of the first field and the value of the second field, the storage amount can be greatly reduced on the basis of ensuring the accuracy.

[0200] In one of the embodiments, based on the light signal value expressed in the second form, the value of the first field and the value of the second field are determined, which includes:

[0201] I. Based on the light signal value expressed in the second form, the third initial value of the first field and the fourth initial value of the second field are set.

[0202] Specifically, the display device determines a preset value, sets the fourth initial value of the second field as the base number, determines the target value according to the fourth initial value and the preset value, and determines the third initial value of the first field according to the requirement that the value of the first field multiplied by the target value is equal to the second light signal value.

[0203] II. Determine the relationship between the third initial value and the preset range.

[0204] The preset range refers to a range in which the first initial value is counted. When the value of the first field reaches the upper limit value of the preset range, a carry operation is triggered, i.e., the value of the second field is increased by 1, and the value of the first field is reset to the lower limit value of the preset range, so as to continue counting or accumulation. When the value of the first field is less than the lower limit value of the preset range, a borrow operation is triggered, i.e., the value of the second field is decreased by 1, and the value of the first field is divided by the preset value (i.e., the base number used in the storage and calculation of the display device). This mechanism ensures that even in the case of limited value range of a single field, a larger value range or more complex control logic can be achieved through the combination of multiple fields and specific logic processing. Taking the preset value 2 as an example, the preset range corresponding to the first field is [128, 255].

[0205] Specifically, the display device determines the preset range corresponding to the first field. If the third initial value is within the preset range, the third initial value is taken as the value of the first field, and the fourth initial value is taken as the value of the second field. If the third initial value is not within the preset range, the third initial value and the fourth initial value need to be adjusted.

[0206] III. If the third initial value is greater than the upper limit value of the preset range, the third initial value is left shifted by one, and the fourth initial value is increased by 1. If the third initial value is less than the lower limit value of the preset range, the third initial value is right shifted by one, and the fourth initial value is decreased by 1.

[0207] If the third initial value is not within the preset range, there are two cases, each of which corresponds to a different adjustment strategy. Case I: the third initial value is greater than the upper limit value of the preset range. In this case, the adjustment strategy is to left shift the third initial value, i.e., divide the third initial value by the preset value, and at the same time, increase the fourth initial value corresponding to the second field by 1, and then cycle, until the third initial value is within the preset range. For example, the preset range corresponding to the first field is [128, 255], the optical signal value is 1200, the preset value is 2, the third initial value is 600, and the fourth initial value is 1. Obviously, the third initial value is not within [128, 255], so the third initial value needs to be left shifted (i.e., divided by 2), and the updated third initial value is 300, and at the same time, the fourth initial value is increased by 1 (i.e., the fourth initial value is 2). At this time, the updated third initial value is still not within the preset range, so the updated third initial value needs to be left shifted again, and the updated third initial value is 150, and at the same time, the fourth initial value is increased by 1 (i.e., the fourth initial value is 3). At this time, the updated third initial value is within [128, 255], and the third initial value and the fourth initial value are not adjusted.

[0208] Case two: the fourth initial value is less than the lower limit value of the preset range, in this case, the corresponding adjustment strategy is: right shift of the third initial value represents multiplying the third initial value by the preset value, while the fourth initial value corresponding to the second field is reduced by 1, and the cycle is repeated until the third initial value is within the preset range.

[0209] Specifically, the display device determines the third initial value, the fourth initial value and the preset value set, if the third initial value is greater than the upper limit value of the preset range, the third initial value is left shifted once, i.e. the third initial value is divided by the preset value, and at the same time, the fourth initial value is increased by 1; if the third initial value is less than the lower limit value of the preset range, the third initial value is right shifted once, i.e. the third initial value is multiplied by the preset value, and at the same time, the fourth initial value is reduced by 1.

[0210] Four, the updated third initial value is taken as a new third initial value, and the step of judging the relationship between the third initial value and the preset range is continued based on the new third initial value, until the third initial value is within the preset range, or the number of movements reaches the movement threshold, the last determined third initial value is taken as the value of the first field, and the last determined fourth initial value is taken as the value of the second field.

[0211] Wherein, the movement threshold refers to the threshold of the number of consecutive left shifts. For example, when the preset value is 2, the corresponding movement threshold can be set to 13.

[0212] Specifically, the display device takes the updated third initial value as a new third initial value, and judges whether the new third initial value is within the preset range of the first field; if not, the third initial value and the fourth initial value are adjusted again according to step three, until the third initial value is within the preset range of the first field, or after the number of consecutive movements in a certain direction reaches the preset movement threshold, the adjustment of the third initial value and the fourth initial value is stopped, and the last determined third initial value is taken as the value of the first field, and the last determined fourth initial value is taken as the value of the second field.

[0213] In this embodiment, the preset range of the first field is set, and the third initial value and the fourth initial value are adjusted according to the relationship between the third initial value of the first field and the preset range, so that the updated third initial value is within the preset range corresponding to the first field, thereby determining the value of the first field and the value of the second field, which can avoid invalid or incorrect data input, thereby maintaining the integrity and accuracy of the data.

[0214] In one detailed embodiment, a color gamut conversion method comprises the following steps:

[0215] I. Determine the electro-optical transfer function corresponding to the first color gamut.

[0216] II. For any electrical signal value in the first color gamut, determining a corresponding optical signal value represented in a second form based on the electro-optical transfer function; the second form is an integer form.

[0217] III. Setting a first initial value of the first field and a second initial value of the second field based on the optical signal value represented in the second form.

[0218] IV. Determining the relationship between the first initial value and a preset range.

[0219] V. If the first initial value is greater than an upper limit value of the preset range, shifting the first initial value to the left by one bit and increasing the second initial value by 1; if the first initial value is less than a lower limit value of the preset range, shifting the first initial value to the right by one bit and decreasing the second initial value by 1.

[0220] VI. Taking the updated first initial value as a new first initial value, and continuing to determine the relationship between the new first initial value and the preset range, until the first initial value is within the preset range or the number of shifts reaches a shift threshold, taking the last determined first initial value as the value of the first field and the last determined second initial value as the value of the second field.

[0221] VII. Obtaining the optical signal value represented in the first form through the value of the first field and the value of the second field.

[0222] VIII. Establishing a mapping relationship between the electrical signal value and the optical signal value represented in the first form in the first color gamut.

[0223] IX. Generating a first mapping table based on the mapping relationship between each electrical signal value and the optical signal value represented in the first form in the first color gamut.

[0224] X. Obtaining a first electrical signal value obtained after encoding an image; the first electrical signal value represents color information of the image in the first color gamut.

[0225] XI. From the pre-established first mapping table, searching for a target optical signal value represented in the first form corresponding to the first electrical signal value; the first mapping table includes the mapping relationship between different electrical signal values and optical signal values in the first color gamut.

[0226] XII. After searching for the target optical signal value represented in the first form from the first mapping table, if an update operation for the target optical signal value is detected, performing step XIII; if the update operation for the target optical signal value is not detected, performing step XIV.

[0227] Thirteen, convert the target light signal value from the first form to the second form; update the target light signal value represented in the second form based on the update operation to obtain an updated target light signal value represented in the second form; determine a new first field value and a new second field value based on the updated target light signal value represented in the second form, represent the updated target light signal value represented in the first form by the new first field value and the new second field value, and perform step fourteen based on the updated target light signal value represented in the first form.

[0228] Fourteen, obtain a second mapping table established in advance; the second mapping table includes mapping relationships between different electrical signal values and light signal values in the second color gamut; wherein the light signal values in the first mapping table and the second mapping table are represented by the first form, the first form includes a first field and a second field, the value of the first field multiplied by a target value is equal to the light signal value, and the target value is obtained by performing power operation on a preset value as a base number and the value of the second field as an exponent.

[0229] Fifteen, if the target light signal value is in the second mapping table, step sixteen is performed; if the target light signal value is not in the second mapping table, step seventeen is performed.

[0230] Sixteen, take the electrical signal value corresponding to the target light signal value in the second mapping table as the second electrical signal value corresponding to the target light signal value, and perform step eighteen.

[0231] Seventeen, determine a reference light signal value satisfying the approximate condition in the second mapping table, take the electrical signal value corresponding to the reference light signal value as the second electrical signal value corresponding to the target light signal value, and perform step eighteen.

[0232] Eighteen, display the image in the second color gamut based on the second electrical signal value.

[0233] In the embodiment, the optical signal value is expressed in an integer form, which can simplify the storage and transmission process. Based on the optical signal value in the integer form, the optical signal value is expressed by the first field and the second field. Since the optical signal value is equal to the value of the first field multiplied by a target value, and the value of the second field is an index in the target value, and the target value and the optical signal value are obtained by power operation, the value of the first field and the value of the second field are both much smaller than the optical signal value, and the data bit width occupied by the first form is much smaller than the data bit width occupied by the optical signal value. The first field and the second field can be combined to represent an optical signal value with a very large range. The compression of the optical signal value in each mapping table is realized, and the storage space is greatly reduced. For other complex algorithm table lookup scenarios, the mapping table establishment method of the embodiment can also be used. By reasonably determining the value of the first field and the value of the second field, the storage amount can be greatly reduced on the basis of ensuring the accuracy. When the photoelectric conversion or the electro-optical conversion is completed by the table lookup method, the optical signal values in the first mapping table and the second mapping table are expressed by the first form, that is, the optical signal values in the mapping table are compressed by the first field and the second field. The first field and the second field are combined to represent a lookup table with a very large range but a certain requirement for accuracy, which can greatly reduce the size of the invalid storage space and reduce the storage resource overhead.

[0234] It should be understood that, although each step in the flowchart involved in each embodiment as described above is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment as described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times. The execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or stages in other steps.

[0235] Based on the same inventive concept, the embodiment of the present application also provides a color gamut conversion device for implementing the color gamut conversion method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more color gamut conversion device embodiments provided below can refer to the limitations of the color gamut conversion method described above, which will not be described here again.

[0236] In one exemplary embodiment, as shown in Figure 9 a color gamut conversion device is provided, comprising:

[0237] The first electric signal acquisition module 901 is configured to acquire a first electric signal value obtained by encoding an image; the first electric signal value represents color information of the image in a first color gamut.

[0238] The electro-optical conversion module 902 is configured to search, from a first mapping table established in advance, for a target optical signal value in a first form corresponding to the first electric signal value; the first mapping table includes a mapping relationship between different electric signal values and optical signal values in the first color gamut.

[0239] The opto-electric conversion module 903 is configured to search, from a second mapping table established in advance, for a second electric signal value corresponding to the target optical signal value; the second mapping table includes a mapping relationship between different electric signal values and optical signal values in a second color gamut; wherein the optical signal values in the first mapping table and the second mapping table are represented by the first form, the first form includes a first field and a second field, the value of the first field multiplied by a target value is equal to the optical signal value, the target value is obtained by performing an exponential operation on the value of the second field with a preset value as the base number; and the second electric signal value is used to display the image in the second color gamut.

[0240] The display module 904 is configured to display the image in the second color gamut based on the second electric signal value.

[0241] In one of the embodiments, the electro-optical conversion module 902 is further configured to determine an electro-optical transfer function corresponding to the first color gamut; for any electric signal value in the first color gamut, determine an optical signal value in a second form corresponding to the electric signal value based on the electro-optical transfer function; the second form is an integer form; determine the value of the first field and the value of the second field based on the optical signal value in the second form, and obtain the optical signal value in the first form by using the value of the first field and the value of the second field; establish a mapping relationship between the electric signal value and the optical signal value in the first form in the first color gamut; and generate the first mapping table based on the mapping relationship between each electric signal value and the optical signal value in the first form in the first color gamut.

[0242] In one of the embodiments, the electro-optical conversion module 902 is further configured to set a first initial value of the first field and a second initial value of the second field based on the optical signal value represented in the second form; determine a relationship between the first initial value and a preset range; if the first initial value is greater than an upper limit value of the preset range, left shift the first initial value by one bit and increase the second initial value by 1; if the first initial value is less than a lower limit value of the preset range, right shift the first initial value by one bit and decrease the second initial value by 1; take the updated first initial value as a new first initial value, and continue to perform the step of determining the relationship between the first initial value and the preset range based on the new first initial value until the first initial value is within the preset range or the number of shifts reaches a shift threshold, take the finally determined first initial value as the value of the first field, and take the finally determined second initial value as the value of the second field.

[0243] In one of the embodiments, the photoelectric conversion module 903 is further configured to obtain a second mapping table established in advance; if the target optical signal value is in the second mapping table, take the electrical signal value corresponding to the target optical signal value in the second mapping table as the second electrical signal value corresponding to the target optical signal value.

[0244] In one of the embodiments, the photoelectric conversion module 903 is further configured to, if the target optical signal value is not in the second mapping table, determine a reference optical signal value satisfying an approximate condition in the second mapping table, and take the electrical signal value corresponding to the reference optical signal value as the second electrical signal value corresponding to the target optical signal value.

[0245] In one of the embodiments, the photoelectric conversion module 903 is further configured to, after finding out the target optical signal value represented in the first form from the first mapping table, if an update operation for the target optical signal value is detected, convert the target optical signal value from the first form to the second form; update the target optical signal value represented in the second form based on the update operation to obtain an updated target optical signal value represented in the second form; determine a new value of the first field and a new value of the second field based on the updated target optical signal value represented in the second form, represent the updated target optical signal value represented in the first form by the new value of the first field and the new value of the second field, and perform the step of finding out the second electrical signal value corresponding to the target optical signal value from the second mapping table established in advance based on the updated target optical signal value represented in the first form.

[0246] Based on the same inventive concept, the embodiments of the present application also provide a mapping table establishing device for implementing the mapping table establishing method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more mapping table establishing device embodiments provided below can be referred to the limitations of the mapping table establishing method described above, which will not be described here again.

[0247] In one exemplary embodiment, as shown in Figure 10 A mapping table establishing device is provided, comprising:

[0248] A transfer function determining module 1001 is configured to determine an electro-optical transfer function corresponding to a target color gamut; the target color gamut refers to a first color gamut or a second color gamut;

[0249] An optical signal calculating module 1002 is configured to, for any electrical signal value under the target color gamut, determine an optical signal value represented in a second form corresponding to the electrical signal value based on the electro-optical transfer function; the second form is an integer form;

[0250] An optical signal form converting module 1003 is configured to determine a value of a first field and a value of a second field based on the optical signal value represented in the second form, and obtain an optical signal value represented in a first form through the value of the first field and the value of the second field;

[0251] A mapping relationship establishing module 1004 is configured to establish a mapping relationship between the electrical signal value and the optical signal value represented in the first form under the target color gamut;

[0252] A mapping table generating module 1005 is configured to generate a target mapping table based on the mapping relationship between each electrical signal value and the optical signal value represented in the first form under the target color gamut.

[0253] In one embodiment, the optical signal form converting module 1003 is further configured to set a third initial value of the first field and a fourth initial value of the second field based on the optical signal value represented in the second form; determine a relationship between the third initial value and a preset range; if the third initial value is greater than an upper limit value of the preset range, left shift the third initial value once and add 1 to the fourth initial value; if the third initial value is less than a lower limit value of the preset range, right shift the third initial value once and subtract 1 from the fourth initial value; take the updated third initial value as a new third initial value, and continue to execute the step of determining the relationship between the third initial value and the preset range based on the new third initial value until the third initial value is within the preset range or the number of shifts reaches a shift threshold, and take the last determined third initial value as the value of the first field and the last determined fourth initial value as the value of the second field.

[0254] The modules in the aforementioned color gamut conversion device and mapping table establishment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0255] In one exemplary embodiment, a computer device is provided, which may be a display device, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a mapping table creation method and / or a color gamut conversion method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0256] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0257] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0258] In an embodiment, a computer readable storage medium is provided, and a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0259] In an embodiment, a computer program product is provided, and the computer program product comprises a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.

[0260] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of the related data need to comply with relevant regulations.

[0261] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal value processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0262] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present application.

[0263] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A color gamut conversion method, characterized in that, The method includes: The first electrical signal value obtained after encoding the image is acquired; the first electrical signal value represents the color information of the image in a first color gamut. From a pre-established first mapping table, find the target optical signal value represented in a first form that corresponds to the first electrical signal value; the first mapping table includes the mapping relationship between different electrical signal values ​​and optical signal values ​​under a first color gamut. From a pre-established second mapping table, a second electrical signal value corresponding to the target optical signal value is found; the second mapping table includes the mapping relationship between different electrical signal values ​​and optical signal values ​​under the second color gamut; wherein, the optical signal values ​​in the first mapping table and the second mapping table are represented by a first form, the first form includes a first field and a second field, the value of the first field multiplied by the target value equals the optical signal value, the target value is obtained by exponentiation with a preset value as the base and the value of the second field as the exponent; The image is displayed in the second color gamut based on the second electrical signal value.

2. The method according to claim 1, characterized in that, The method further includes: Determine the electro-optical transfer function corresponding to the first color gamut; For any electrical signal value in the first color gamut, based on the electro-optical transfer function, determine the optical signal value corresponding to the electrical signal value, expressed in a second form; the second form is an integer form. Based on the optical signal value represented in the second form, the values ​​of the first field and the second field are determined, and the optical signal value represented in the first form is obtained through the values ​​of the first field and the second field. Establish a mapping relationship between the electrical signal value in the first color gamut and the optical signal value represented in the first form; A first mapping table is generated based on the mapping relationship between each electrical signal value in the first color gamut and the optical signal value represented in the first form.

3. The method according to claim 2, characterized in that, Determining the values ​​of the first field and the second field based on the optical signal value represented in the second form includes: Based on the optical signal value represented in a second form, a first initial value for the first field and a second initial value for the second field are set; Determine the relationship between the first initial value and the preset range; If the first initial value is greater than the upper limit of the preset range, then the first initial value is shifted to the left once and the second initial value is incremented by 1; if the first initial value is less than the lower limit of the preset range, then the first initial value is shifted to the right once and the second initial value is decremented by 1. The updated first initial value is used as the new first initial value, and the step of determining the relationship between the first initial value and the preset range is returned based on the new first initial value, and the process continues until the first initial value is within the preset range, or the number of moves reaches the moving threshold. The last determined first initial value is used as the value of the first field, and the last determined second initial value is used as the value of the second field.

4. The method according to claim 1, characterized in that, The step of searching for the second electrical signal value corresponding to the target optical signal value from a pre-established second mapping table includes: Obtain the pre-established second mapping table; If the target optical signal value is in the second mapping table, then the electrical signal value corresponding to the target optical signal value in the second mapping table is used as the second electrical signal value corresponding to the target optical signal value.

5. The method according to claim 4, characterized in that, The method further includes: If the target optical signal value is not in the second mapping table, then a reference optical signal value that meets the approximation condition is determined in the second mapping table, and the electrical signal value corresponding to the reference optical signal value is used as the second electrical signal value corresponding to the target optical signal value.

6. The method according to claim 1, characterized in that, The method further includes: After finding the target optical signal value represented in the first form from the first mapping table, if an update operation for the target optical signal value is detected, the target optical signal value is converted from the first form to the second form. Based on the update operation, the target optical signal value expressed in the second form is updated to obtain the updated target optical signal value expressed in the second form. Based on the updated target optical signal value represented in the second form, determine the values ​​of the new first field and the new second field, represent the updated target optical signal value represented in the first form using the values ​​of the new first field and the new second field, and perform the step of searching for the second electrical signal value corresponding to the target optical signal value from the pre-established second mapping table based on the updated target optical signal value represented in the first form.

7. A method for establishing a mapping table, characterized in that, The method includes: Determine the electro-optic transfer function corresponding to the target color gamut; the target color gamut refers to either the first color gamut or the second color gamut. For any electrical signal value under the target color gamut, based on the electro-optical transfer function, determine the optical signal value corresponding to the electrical signal value in a second form; the second form is an integer form. Based on the optical signal value represented in the second form, the values ​​of the first field and the second field are determined, and the optical signal value represented in the first form is obtained through the values ​​of the first field and the second field. Establish a mapping relationship between the electrical signal value and the optical signal value represented in the first form under the target color gamut; A target mapping table is generated based on the mapping relationship between each electrical signal value in the target color gamut and the optical signal value represented in the first form.

8. The method according to claim 7, characterized in that, Determining the values ​​of the first field and the second field based on the optical signal value represented in the second form includes: Based on the optical signal value represented in a second form, a third initial value for the first field and a fourth initial value for the second field are set; Determine the relationship between the third initial value and the preset range; If the third initial value is greater than the upper limit of the preset range, then the third initial value is shifted to the left by one, and the fourth initial value is incremented by 1; if the third initial value is less than the lower limit of the preset range, then the third initial value is shifted to the right by one, and the fourth initial value is decremented by 1. The updated third initial value is used as the new third initial value, and the step of determining the relationship between the third initial value and the preset range is returned based on the new third initial value, until the third initial value is within the preset range or the number of moves reaches the moving threshold. The finally determined third initial value is used as the value of the first field, and the finally determined fourth initial value is used as the value of the second field.

9. A color gamut conversion device, characterized in that, The device includes: The first electrical signal acquisition module is used to acquire the first electrical signal value obtained after the image is encoded; the first electrical signal value represents the color information of the image in a first color gamut. An electro-optic conversion module is used to look up a target optical signal value, represented in a first form, that corresponds to the first electrical signal value from a pre-established first mapping table; the first mapping table includes the mapping relationship between different electrical signal values ​​and optical signal values ​​under a first color gamut. The photoelectric conversion module is used to look up a second electrical signal value corresponding to the target optical signal value from a pre-established second mapping table; the second mapping table includes the mapping relationship between different electrical signal values ​​and optical signal values ​​under a second color gamut; wherein, the optical signal values ​​in the first mapping table and the second mapping table are represented by a first form, the first form including a first field and a second field, the value of the first field multiplied by the target value equals the optical signal value, the target value is obtained by exponentiation with a preset value as the base and the value of the second field as the exponent; The display module is used to display the image in the second color gamut based on the second electrical signal value.

10. A mapping table creation apparatus, characterized in that, The device includes: The transfer function determination module is used to determine the electro-optic transfer function corresponding to the target color gamut; the target color gamut refers to the first color gamut or the second color gamut. The optical signal calculation module is used to determine, based on the electro-optical transfer function, the optical signal value corresponding to any electrical signal value under the target color gamut, expressed in a second form; the second form is an integer form. The optical signal format conversion module is used to determine the value of the first field and the value of the second field based on the optical signal value represented in the second form, and obtain the optical signal value represented in the first form through the value of the first field and the value of the second field; The mapping relationship establishment module is used to establish a mapping relationship between the electrical signal value and the optical signal value represented in the first form under the target color gamut. The mapping table generation module is used to generate a target mapping table based on the mapping relationship between each electrical signal value and the optical signal value represented in the first form under the target color gamut.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Content mapping using extended color range

    CN107077726A

  • Tone mapping method and device, computer equipment and storage medium

    CN117395383A

  • Signal level converter and program

    JP2019087901A

  • Luminance conversion method, luminance conversion device, and video display device

    JP2019110538A

  • Dynamic range converter with generic architecture and methods for use therewith

    US20160205367A1