Video display processing method and device, computer device and storage medium
By statistically analyzing and mapping the brightness of video frames, the optimal brightness range of LED display devices is determined, solving the brightness mismatch problem when LED display devices process HDR video, and achieving accurate brightness mapping and true color reproduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNILUMIN GRP
- Filing Date
- 2022-12-20
- Publication Date
- 2026-06-09
Smart Images

Figure CN116156140B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of LED display technology, and in particular to a video display processing method, apparatus, computer equipment, storage medium, and computer program product. Background Technology
[0002] With the increasing popularity of HDR (High Dynamic Range) technology, its advantages have been widely appreciated by consumers. HDR technology itself is divided into two main camps: PQ (Product Quantization) and HLG (Hybrid Log-Gamma). The difference between the two lies in their absolute and relative characteristics. PQ's absolute performance allows devices to display true colors, achieving 100% color reproduction, but it places high demands on the display device's brightness and color gamut. HLG, on the other hand, has almost no requirements on the display device, but its color reproduction is not as realistic as PQ. Furthermore, there are subcategories within the PQ camp. For these subcategories of HDR, SMPTE (Society of Motion Picture Engineers) has published standards defined by different HDR video source producers.
[0003] PQ-type HDR video information includes metadata, which contains basic video information and HDR usage information such as brightness and color gamut. Metadata is divided into static and dynamic. Static metadata refers to a single set of metadata for the entire video source, while dynamic metadata is present for each frame of the video source. LED display devices can perform display processing or settings based on this metadata. When display brightness is mismatched, the current mainstream approach is to process the data based on the display device's maximum brightness. When the LED display device's maximum brightness is greater than the HDR video source's maximum brightness, the LED display device's brightness range covers the video source's brightness range, allowing for direct HDR electro-optical conversion and mapping. When the LED display device's maximum brightness is less than the HDR video source's maximum brightness, the excess brightness is limited and fitted to ensure a smooth and gradient transition in the bright areas. Both methods have limitations: when the LED display device's brightness is greater than the video source's brightness, accuracy is insufficient; when the LED display device's brightness is less than the video source's brightness, the bright areas are distorted. Summary of the Invention
[0004] Therefore, it is necessary to provide a video display processing method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.
[0005] Firstly, this application provides a video display processing method. The method includes:
[0006] In response to a playback request for a target video, the video frame data of the target video is read to obtain the type of the target video, the image data of each image frame, and metadata, including color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video.
[0007] According to the type of the target video, the video frame is subjected to reverse photoelectric processing;
[0008] Based on the color gamut information in the metadata, the image data of each image frame after reverse photoelectric processing is converted to obtain the converted brightness of each pixel in the image frame;
[0009] The converted brightness of each image frame is statistically analyzed to obtain a brightness distribution array for each image frame;
[0010] The optimal brightness range of the display device is determined based on the brightness distribution array of each image frame, the brightness information of the image frame, and the brightness information of the display device.
[0011] The image is displayed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0012] In one embodiment, determining the optimal brightness range of the display device based on the brightness distribution array of each of the image frames, the brightness information of the image frames, and the brightness information of the display device includes:
[0013] When the brightness range of the display device is within the brightness range of the image frame, the lower limit of the brightness range of the display device is set to equal the lower limit of the brightness range of the image frame, and the upper limit of the brightness range of the display device is calculated to obtain the current brightness display range of the display device.
[0014] Based on the number of actual brightness values within the current brightness display range of the display device and the brightness distribution array, the number of pixels and the brightness display interval within the current brightness display range of the display device are obtained; the actual brightness values include the actual brightness values corresponding to all brightness encoding values.
[0015] The lower limit of the brightness range of the display device is increased sequentially, and when the upper limit of the brightness range of the corresponding display device is less than or equal to the upper limit of the brightness range of the image frame, the steps of obtaining the number of brightness-covered pixels and the brightness display interval in the current brightness display range based on the number of actual brightness values in the current brightness display range of the display device and the brightness distribution array are repeated to obtain multiple current brightness display ranges, as well as the corresponding number of brightness-covered pixels and the brightness display interval;
[0016] Based on the number of brightness coverage pixels and the brightness display range, the optimal brightness range of the display device is determined among the plurality of current brightness display ranges.
[0017] In one embodiment, determining the optimal brightness range of the display device among the plurality of current brightness display ranges based on the number of brightness coverage pixels and the brightness display interval includes:
[0018] When there is only one maximum number of pixels covered by brightness, the brightness display range corresponding to the maximum number of pixels covered by brightness is taken as the optimal brightness range of the display device;
[0019] When there are multiple maximum values for the number of pixels covered by brightness, the brightness display range corresponding to the maximum brightness display interval among the multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device;
[0020] When there are multiple maximum values for the number of pixels covered by brightness, and multiple maximum brightness display ranges among these multiple maximum values, the brightness display range corresponding to any one of the maximum brightness display ranges among these multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device.
[0021] In one embodiment, the method for determining the brightness display range within the current brightness display range includes:
[0022] As the brightness encoding value increases sequentially, the brightness display range within the current brightness display range is determined based on the first brightness value whose actual brightness value is greater than or equal to the lower limit of the current brightness display range, and the last brightness value whose actual brightness value is less than or equal to the upper limit of the current brightness display range.
[0023] In one embodiment, the method further includes:
[0024] When the brightness range of the image frame is within the brightness display range of the display device, the optimal brightness range of the display device is determined based on the upper limit of the brightness range of the image frame.
[0025] In one embodiment, the method further includes:
[0026] When the upper limit of the brightness display range of the display device is less than the upper limit of the brightness range of the image frame, and the lower limit of the brightness display range of the display device is less than the lower limit of the brightness range of the image frame, the optimal brightness range of the display device is determined based on the lower limit of the brightness range of the image frame; or
[0027] When the lower limit of the brightness display range of the display device is greater than the lower limit of the brightness range of the image frame, and the upper limit of the brightness display range of the display device is greater than the upper limit of the brightness range of the image frame, the optimal brightness range of the display device is determined based on the upper limit of the brightness range of the image frame.
[0028] In one embodiment, the display based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame includes:
[0029] Based on the optimal brightness range of the display device, the corresponding color gamut information, and the mapping table, the corresponding brightness adjustment parameter set is obtained;
[0030] Based on the image data of the image frame, the brightness range and color gamut information of the image frame are mapped to the optimal brightness range and color gamut information of the display device to obtain the display image;
[0031] The display is performed according to the set of brightness adjustment parameters and the display image.
[0032] Secondly, this application also provides a video display processing apparatus. The apparatus includes:
[0033] The video parsing module is used to respond to a playback request for a target video by reading the video frame data of the target video to obtain the type of the target video, the image data of each image frame, and metadata. The metadata includes color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video.
[0034] An electro-optical conversion module is used to perform reverse photoelectric processing on the video frame according to the type of the target video;
[0035] The brightness conversion module is used to convert the image data of each image frame after inverse photoelectric processing according to the color gamut information in the metadata, so as to obtain the converted brightness of each pixel in the image frame;
[0036] The statistical brightness histogram module is used to statistically analyze the converted brightness of each image frame to obtain a brightness distribution array for each image frame;
[0037] A brightness analysis and processing module is used to determine the optimal brightness range of the display device based on the brightness distribution array of each image frame, the brightness information of the image frame, and the brightness information of the display device.
[0038] The display control module is used to display based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0039] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0040] In response to a playback request for a target video, the video frame data of the target video is read to obtain the type of the target video, the image data of each image frame, and metadata, including color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video.
[0041] According to the type of the target video, the video frame is subjected to reverse photoelectric processing;
[0042] Based on the color gamut information in the metadata, the image data of each image frame after reverse photoelectric processing is converted to obtain the converted brightness of each pixel in the image frame;
[0043] The converted brightness of each image frame is statistically analyzed to obtain a brightness distribution array for each image frame;
[0044] The optimal brightness range of the display device is determined based on the brightness distribution array of each image frame, the brightness information of the image frame, and the brightness information of the display device.
[0045] The image is displayed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0046] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0047] In response to a playback request for a target video, the video frame data of the target video is read to obtain the type of the target video, the image data of each image frame, and metadata, including color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video.
[0048] According to the type of the target video, the video frame is subjected to reverse photoelectric processing;
[0049] Based on the color gamut information in the metadata, the image data of each image frame after reverse photoelectric processing is converted to obtain the converted brightness of each pixel in the image frame;
[0050] The converted brightness of each image frame is statistically analyzed to obtain a brightness distribution array for each image frame;
[0051] The optimal brightness range of the display device is determined based on the brightness distribution array of each image frame, the brightness information of the image frame, and the brightness information of the display device.
[0052] The image is displayed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0053] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0054] In response to a playback request for a target video, the video frame data of the target video is read to obtain the type of the target video, the image data of each image frame, and metadata, including color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video.
[0055] According to the type of the target video, the video frame is subjected to reverse photoelectric processing;
[0056] Based on the color gamut information in the metadata, the image data of each image frame after reverse photoelectric processing is converted to obtain the converted brightness of each pixel in the image frame;
[0057] The converted brightness of each image frame is statistically analyzed to obtain a brightness distribution array for each image frame;
[0058] The optimal brightness range of the display device is determined based on the brightness distribution array of each image frame, the brightness information of the image frame, and the brightness information of the display device.
[0059] The image is displayed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0060] The aforementioned video display processing method, apparatus, computer equipment, storage medium, and computer program product, in response to a playback request for a target video, involve the computer equipment reading video frame data of the target video to obtain the type of the target video, image data of each image frame, and metadata; performing reverse photoelectric processing on the video frames according to the type of the target video; converting the image data of each image frame after reverse photoelectric processing according to the color gamut information in the metadata to obtain the converted brightness of each pixel in the image frame; statistically analyzing the converted brightness of each image frame to obtain a brightness distribution array for each image frame; determining the optimal brightness range of the display device based on the brightness distribution array of each image frame, the brightness information of the image frames, and the brightness information of the display device; and displaying the video based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frames, the color gamut information of the image frames, and the image data of the image frames. This method performs statistical analysis on the brightness of video frames to be played, and determines the optimal brightness range of the display device based on the statistical analysis results. In other words, it can dynamically change the optimal brightness range of the display device according to the actual brightness range of the video frames to be played, so that the optimal brightness range of the display device can match the actual brightness range of the video frames to be played. It also performs mapping processing based on the optimal brightness range of the display device and the color gamut information of the display device, thereby solving the problems of insufficient accuracy when the brightness of the LED display device is greater than the brightness of the video source, and the problem that the LED display device cannot meet the brightness range of the video frames. Attached Figure Description
[0061] Figure 1 This is a schematic diagram illustrating the mapping process when the display device's brightness is greater than the HDR brightness.
[0062] Figure 2 This is a schematic diagram illustrating the mapping process when the brightness of the display device is less than the HDR brightness.
[0063] Figure 3 This is a schematic diagram showing the fitting of the brightness of the video source and the brightness of the display device.
[0064] Figure 4 This is an application environment diagram of the video display processing method in one embodiment;
[0065] Figure 5 This is a flowchart illustrating a video display processing method in one embodiment;
[0066] Figure 6 This is a flowchart illustrating the process of calculating the number of pixels covered by brightness in different brightness ranges of a display device in one embodiment.
[0067] Figure 7 This is a flowchart illustrating the video display processing method in another embodiment;
[0068] Figure 8This is a flowchart illustrating the video display processing method in another embodiment;
[0069] Figure 9 This is a structural block diagram of a video display processing device in one embodiment;
[0070] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0072] LED display devices are limited by the display IC chip. The 16-bit PWM dimming technology can achieve 65,535 brightness levels, but sometimes it cannot meet the brightness level and brightness range requirements of HDR technology. For example, if the brightness range of HDR is [0.001, 1000] nits, taking the minimum visible brightness of the LED device as 0.001 as an example, according to the ideal setting of the LED display device, its maximum brightness should be 0.001 * 65,535 = 65.535, which cannot reach the maximum brightness of HDR of 1000 nits; if the maximum brightness of the LED device is set to 1000 nits, then the minimum visible brightness is 1000 / 65,535 ≈ 0.015, which also cannot meet the display brightness requirements of HDR.
[0073] In addressing the brightness mismatch between LED display devices and HDR video, where the maximum display brightness of the LED display device exceeds the maximum brightness of the HDR video source, existing solutions involve processing the video content. This processing method involves electro-optical conversion followed by mapping, such as... Figure 1 As shown, the device displays a maximum brightness of D. MAX The maximum brightness of the video source is S. MAX Furthermore, both sources have the same total of 65,536 luminance code values. Based on the principle of equal luminance, the 65,536 luminance code values from the video source are mapped to the 42,000 luminance code values from the display device. This reduces the utilization rate of the display device's luminance code values, resulting in some video luminance codes being mapped to the same display device luminance code values, which is an accuracy issue. When the maximum display brightness of the LED display device is less than the maximum brightness of the HDR video source, the video brightness exceeding the display brightness range is then limited and fitted. Figure 2 As shown, the S on the left MAX It is the maximum brightness of the video source, D MAX For the maximum brightness of the display device, H MAX This is the starting brightness for height-limited processing. For example... Figure 3The curve on the right remains unchanged up to p1. The curve from p1 to p2 is the brightness conversion curve of the video source. Since the display device can only display up to D... MAX After fitting, the curve from p1 to p2 becomes the dashed line portion from p1 to p3. Figure 3 It can be seen that the highlighted parts are distorted due to device limitations; the curve before p1 is... Figure 2 Left Figure H MAX For the portion below brightness, accuracy issues will also arise due to the inconsistent number of mapped encoded values.
[0074] To alleviate the aforementioned problems and address the limitation of LED display devices in meeting HDR brightness range requirements due to IC chip constraints, a video display processing method is proposed, which can be applied to applications such as... Figure 4 In the application environment shown, the computer device, in response to a playback request for a target video, reads the video frame data of the target video to obtain the target video type, image data of each image frame, and metadata. The metadata includes color gamut information and luminance information; the luminance information includes the luminance range of the target video frames. Based on the target video type, the video frames undergo reverse photoelectric processing. Based on the color gamut information in the metadata, the image data of each image frame after reverse photoelectric processing is converted to obtain the converted luminance of each pixel in the image frame. The converted luminance of each image frame is statistically analyzed to obtain a luminance distribution array for each image frame. Based on the luminance distribution array of each image frame, the luminance information of the image frames, and the luminance information of the display device, the optimal luminance range of the display device is determined. The display is then performed based on the optimal luminance range of the display device, the color gamut information of the display device, the luminance range of the image frames, the color gamut information of the image frames, and the image data of the image frames. The computer device includes personal computing laptops, tablets, and IoT devices, such as smart TVs and smart in-vehicle devices.
[0075] In one embodiment, such as Figure 5 As shown, a video display processing method is provided, which is applied to Figure 4 The computer equipment in the middle includes the following steps:
[0076] Step 502: In response to the playback request of the target video, read the video frame data of the target video to obtain the type of the target video, the image data of each image frame and metadata. The metadata includes color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video.
[0077] The video includes two types: SDR video and HDR video. The metadata mainly includes the color coordinates of red, green, blue, and white points, collectively referred to as color gamut information; and the maximum brightness, minimum brightness, and maximum content brightness, collectively referred to as brightness information. SDR video frames do not have metadata. For SDR video, the metadata is determined by a preset and consists of the brightness and color gamut information of standard SDR or the current LED display.
[0078] Specifically, in response to a playback request for a target video, the computer device reads the video frame data of the target video, parses the type of the video frame, distinguishes between SDR and HDR video frame data based on the video frame type, and obtains image data and metadata for each frame.
[0079] Step 504: Perform reverse photoelectric processing on the video frames according to the type of the target video.
[0080] Among them, reverse photoelectric processing is the inverse conversion of the photoelectric conversion process in video production. For SDR video frames, reverse photoelectric processing is an inverse gamma operation; for HDR video frames, HDR reverse photoelectric conversion processing is performed.
[0081] Specifically, based on the video type obtained from the analysis, an inverse gamma operation is performed on SDR video frames; and an inverse photoelectric conversion process for HDR video frames is performed. After the inverse photoelectric conversion process, nonlinear light is converted into linear light.
[0082] Step 506: Based on the color gamut information in the metadata, convert the image data of each image frame after inverse photoelectric processing to obtain the converted brightness of each pixel in the image frame.
[0083] Based on the color gamut information in the metadata, a transformation matrix is selected, and the image data of each image frame is processed to obtain luminance data. Commonly used color gamuts include BT709, DCI-P3, and BT2020. Specifically, taking an RGB image as an example, the calculation formula is as follows:
[0084] Y = INT(Yr×R+Yg×G+Yb×B)
[0085] Here, INT(*) is the floor function, which rounds a value down to the nearest integer. Y represents the converted brightness, Yr, Yg, and Yb represent the conversion coefficients for brightness on the RGB color components, and R, G, and B represent the RGB channel encoding values of the current pixel.
[0086] Step 508: Statistically analyze the converted brightness of each image frame to obtain a brightness distribution array for each image frame.
[0087] The brightness distribution of the input brightness image frames is statistically analyzed to obtain a brightness distribution array SY. The SY array counts the frequency of each brightness level. The statistical processing is as follows:
[0088] Specifically, the brightness encoding value y is obtained based on the horizontal and vertical positions i and j of the brightness Y image:
[0089] y = Y[i,j]
[0090] Then, perform brightness statistics processing on the brightness encoding value y to obtain the number of times the brightness encoding value y appears. Perform statistical processing on the brightness y at all positions in the brightness Y image to obtain the brightness distribution of the image frame. The brightness distribution array SY[y] can be used to represent the brightness distribution of the image frame.
[0091] Step 510: Determine the optimal brightness range of the display device based on the brightness distribution array of each image frame, the brightness information of the metadata, and the brightness information of the display device.
[0092] Specifically, the optimal display range of the display device is determined based on the brightness distribution array of each image frame, the brightness range of the metadata, and the brightness range of the display device.
[0093] Step 512: Display the image based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0094] Specifically, display mapping processing is performed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame, and the display is performed on the display device based on the display mapping processing result.
[0095] In this embodiment, in response to a playback request for a target video, the computer device reads the video frame data of the target video to obtain the type of the target video, the image data of each image frame, and metadata. Based on the type of the target video, the video frames undergo reverse photoelectric processing. Based on the color gamut information in the metadata, the image data of each image frame after reverse photoelectric processing is converted to obtain the converted brightness of each pixel in the image frame. The converted brightness of each image frame is statistically analyzed to obtain a brightness distribution array for each image frame. Based on the brightness distribution array of each image frame, the brightness information of the image frames, and the brightness information of the display device, the optimal brightness range of the display device is determined. The display is then performed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frames, the color gamut information of the image frames, and the image data of the image frames. This method performs statistical analysis on the brightness of video frames to be played, and determines the optimal brightness range of the display device based on the statistical analysis results. In other words, it can dynamically change the optimal brightness range of the display device according to the actual brightness range of the video frames to be played, so that the optimal brightness range of the display device can match the actual brightness range of the video frames to be played. It also performs mapping processing based on the optimal brightness range of the display device and the color gamut information of the display device, thereby solving the problems of insufficient accuracy when the brightness of the LED display device is greater than the brightness of the video source, and the problem that the LED display device cannot meet the brightness range of the video frames.
[0096] In one embodiment, determining the optimal brightness range of the display device based on the brightness distribution array of each image frame, the brightness information of the image frames, and the brightness information of the display device includes:
[0097] Step 602: When the brightness range of the display device is within the brightness range of the image frame, set the lower limit of the brightness range of the display device to be equal to the lower limit of the brightness range of the image frame, calculate the upper limit of the brightness range of the display device, and obtain the current brightness display range of the display device.
[0098] The current brightness display range of the LED display device can be denoted as [D]. Min D Max The brightness range of an image frame can be denoted as [I]. Min , I Max ].
[0099] Specifically, when the brightness range of the display device is within the brightness range of the image frame, that is, when D... Min >I Min And D Max < I Max At that time, let D Min =I Min If we use 16-bit PWM dimming technology D Max =65535×D MinAt this point, the upper limit D of the brightness range of the display device is calculated. Max =65535×D Min .
[0100] Step 604: Based on the actual brightness value within the current brightness display range of the display device and the brightness distribution array, obtain the number of pixels and the brightness display interval within the current brightness display range of the display device; the actual brightness value includes the actual brightness value corresponding to all brightness encoding values.
[0101] Formula for calculating the actual luminance value corresponding to the luminance code value:
[0102] TY(y) = (y×S Max ) / C Max
[0103] Where y represents the encoded value of the input brightness, S Max The maximum brightness value of the metadata (unit: nit), C Max This represents the maximum encoded value.
[0104] Specifically, the number of pixels within the current brightness display range of the display device is denoted as FOC. The number of pixels within the current brightness display range FOC is obtained by summing the SY[y] corresponding to all TY(y) that satisfy the condition, where TY(y) ≥ D. Min And TY(y)≤D Max y∈[0, C Max ] , SY[*] is the brightness distribution array of the current video frame.
[0105] The luminance encoding value y ranges from 0 to C. Max The first condition to satisfy TY(y)≥D during the change process Min The condition is that the brightness y is y1, and the last condition satisfies TY(y)≤D. Max Let the brightness y be y2, and let the brightness display range be denoted as Area. Then the brightness display range Area = y2 - y1.
[0106] Step 606: Gradually increase the lower limit of the brightness range of the display device.
[0107] Step 608: Determine whether the upper limit of the brightness range of the corresponding display device is less than or equal to the upper limit of the brightness range of the image frame. If yes, return to step 602; otherwise, proceed to step 610.
[0108] Step 610: Obtain the current adjustable brightness range of multiple display devices, as well as the corresponding number of brightness-covered pixels and brightness display interval.
[0109] The lower limit of the brightness range of the display device is increased sequentially, while ensuring that the upper limit of the brightness range of the corresponding display device is less than or equal to the upper limit of the brightness range of the image frame. This is because the portion of the upper limit of the brightness range of the display device that is greater than the brightness range of the image frame not only has no effect, but will also reduce the actual display range of the display device.
[0110] Specifically, according to 16-bit PWM dimming technology, when D Min When the brightness is increased by 0.1, D Max (65535×D Min The brightness was increased by 6553.5, and although the lower limit of the brightness range decreased by 0.1, the upper limit increased by 6553.5, thus increasing the device's brightness display range. As the lower limit of the display device's brightness range increases, the device's brightness display range also increases accordingly.
[0111] By sequentially increasing the lower limit of the brightness range of the display device, calculating the upper limit of the brightness range of the display device, multiple sets of current brightness display ranges of the display device are obtained. Step 602 is repeated to calculate the number of pixels and brightness display intervals corresponding to multiple current brightness display ranges.
[0112] Based on the number of pixels covered by the brightness and the brightness display range, the optimal brightness range of the display device is determined among the current brightness display ranges of multiple display devices.
[0113] The optimal brightness range of a display device is determined based on the number of pixels and brightness display intervals corresponding to the current brightness display range of multiple display devices.
[0114] In this embodiment, by sequentially increasing the lower limit of the brightness range of the display device, multiple current brightness display ranges are obtained, meaning the display device supports dynamic changes in brightness range. Using a brightness distribution array, the number of pixels and brightness display intervals of the multiple display devices within the current brightness display range are calculated, providing conditions for determining the optimal brightness range of the display device.
[0115] In one embodiment, determining the optimal brightness range for a display device among the current brightness display ranges of multiple display devices, based on the number of brightness-covered pixels and the brightness display interval, includes:
[0116] When there is only one maximum number of pixels that can be covered by brightness, the brightness range corresponding to the maximum number of pixels that can be covered by brightness is taken as the optimal brightness range of the display device.
[0117] There is only one maximum number of pixels that can be covered by brightness. That is, within the brightness display range corresponding to the maximum number of pixels, the most pixels in the image frame can display their brightness normally. Therefore, the brightness display range corresponding to the maximum number of pixels that can be covered by brightness is taken as the optimal brightness range of the display device.
[0118] When there are multiple maximum values for the number of pixels covered by brightness, the brightness display range corresponding to the maximum brightness display range among the multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device.
[0119] There are multiple maximum values for the number of pixels covered by brightness. This means that under multiple brightness display ranges corresponding to the maximum number of pixels covered by brightness, the same number of pixels in the image frame can display their brightness normally. In this case, the brightness display range corresponding to the largest display range is selected as the optimal brightness range of the display device.
[0120] When there are multiple maximum values for the number of pixels covered by brightness, and multiple maximum brightness display ranges among these multiple maximum values, the brightness display range corresponding to any one of the maximum brightness display ranges among these multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device.
[0121] In this embodiment, by statistically analyzing the number of pixels in the image frame covered by the display device within the current brightness display range, the coverage range of the image frame by the display device is preferentially selected. If the coverage range of the image frame by the display device is the same, the current brightness display range with the larger display area is selected as the optimal brightness range for the display device. This ensures that more pixels in the image frame and pixels within a larger display area can be displayed correctly.
[0122] In one embodiment, determining the brightness display range within the current brightness display range includes:
[0123] As the brightness encoding value increases sequentially, the brightness display range within the current brightness display range is determined based on the first brightness value whose actual brightness value is greater than or equal to the lower limit of the current brightness display range, and the last brightness value whose actual brightness value is less than or equal to the upper limit of the current brightness display range.
[0124] Wherein, the maximum encoded value is denoted as CMax, the actual brightness value of the image frame is denoted as TY(y), and the lower limit of the current brightness display range of the display device is denoted as D. Min The upper limit of the current brightness display range of the display device is denoted as D. Max .
[0125] Specifically, the luminance coding value y ranges from 0 to C. Max The first condition to satisfy TY(y)≥D during the change process MinThe condition is that the brightness y is y1, and the last condition satisfies TY(y)≤D. Max Let the brightness y be y2, and let the brightness display range be denoted as Area. Then the brightness display range Area = y2-y1.
[0126] In this embodiment, the display range of the image frame within the current brightness range of the display device is calculated by using the actual brightness of the image frame and the current brightness range of the display device, thus providing conditions for determining the optimal brightness range of the display device.
[0127] In one embodiment, the method further includes: when the brightness range of the image frame is within the brightness display range of the display device, determining the optimal brightness range of the display device based on the upper limit of the brightness range of the image frame.
[0128] The brightness range of the image frame is within the brightness display range of the display device, i.e., D. Min ≤I Min And D Max ≥I Max Adjust the upper limit of the display device's brightness range to the upper limit of the image frame brightness range or to a value close to the upper limit of the image frame brightness range, i.e., D. Max =I Max Or D Max ≈I Max If using 16-bit PWM dimming technology, when D... Max =I Max Or D Max ≈I Max D Min =D Max / 65535 or D Min ≈D Max / 65535.
[0129] In this embodiment, by adjusting D Max and I Max Equal to avoid low precision caused by a large difference between DMax and IMax.
[0130] In one embodiment, the method further includes: when the upper limit of the brightness display range of the display device is less than the upper limit of the brightness range of the image frame, and the lower limit of the brightness display range of the display device is less than the lower limit of the brightness range of the image frame, determining the optimal brightness range of the display device based on the lower limit of the brightness range of the image frame; or when the lower limit of the brightness display range of the display device is greater than the lower limit of the brightness range of the image frame, and the upper limit of the brightness display range of the display device is greater than the upper limit of the brightness range of the image frame, determining the optimal brightness range of the display device based on the upper limit of the brightness range of the image frame.
[0131] The upper limit of the brightness display range of a display device is less than the upper limit of the brightness range of an image frame, i.e., D. Max Max And D Min ≤I Min Adjust the lower limit of the display device's brightness range to the lower limit of the image frame brightness range, that is, let D... Min =I Min If, after adjustment, the display brightness range of the display device meets the brightness range of the image frame, no further adjustment is needed;
[0132] The lower limit of the display device's brightness range is greater than the lower limit of the image frame's brightness range, and the upper limit of the display device's brightness range is greater than the upper limit of the image frame's brightness range, i.e., D Max ≥I Max And D Min >I Min Adjust the upper limit of the display device's brightness range to the upper limit of the image frame brightness range, that is, let D... Max =I Max If, after adjustment, the display brightness range of the display device meets the brightness range of the image frame, then no further adjustment is needed;
[0133] If, after adjustment, the display brightness range of the display device does not meet the brightness range of the image frame, then the optimal brightness range of the display device is determined according to the brightness distribution array of the image frame, the brightness information of the image frame, and the brightness information of the display device.
[0134] In this embodiment, for cases where the display brightness range of the display device can partially satisfy the brightness range of the image frame, the lower limit of the display device's brightness range is adjusted to the lower limit of the image frame's brightness range, and the upper limit of the display device's brightness range is adjusted to the upper limit of the image frame's brightness range, so that the display brightness range of the display device satisfies the brightness range of the image frame.
[0135] In one embodiment, displaying an image based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame includes: obtaining a corresponding brightness adjustment parameter set based on the optimal brightness range of the display device, the corresponding color gamut information, and a mapping table; mapping the brightness range and color gamut information of the image frame to the optimal brightness range and color gamut information of the display device based on the image data of the image frame to obtain a display image; and displaying the image based on the brightness adjustment parameter set and the display image.
[0136] Specifically, LED display devices primarily adjust brightness by regulating the current-related parameters of the LED chips, such as cur_arr (current gain, gray-out threshold, refresh rate, etc.). This is achieved using 16-bit PWM dimming technology. Max =65535×DMin According to D Max Conversion relationship between D and cur_arr Max = F(cur_arr), from which the inverse formula cur_arr = UNF(D) is derived. Max ), the D that needs to be adjusted Max Substituting into the inverse formula UNF(*), the adjusted parameter set cur_arr can be calculated. The inverse formula can be replaced by a mapping table, which is formed from the actual measured display brightness, color gamut data, and current parameter set. If a mapping table is used, the mapping data needs to be adjusted and measured in advance.
[0137] The brightness range and color gamut information of the image frame, as well as the optimal brightness range and color gamut information of the display device, are subjected to brightness mapping and color gamut mapping processing.
[0138] Specifically, the brightness mapping process involves calculating the scene brightness value SCY corresponding to the current pixel's brightness encoding value. The scene brightness value refers to the brightness captured by the camera.
[0139] SCY = S Max ×SCX / C Max
[0140] Where SCX represents the single-channel coded value of a single pixel in the input video frame.
[0141] Map this brightness to the corresponding brightness encoding value on the display device:
[0142] CX = INT(SCY / D Min )
[0143] Where INT(*) indicates rounding, CX represents the mapped pixel single-channel encoding value, whose value range is the integer part of [0, CMax], with the excess part limited to the maximum value, and CMax represents the maximum encoding value of a single channel. Taking RGB three-channel pixels with each channel as 16 bits as an example, CMax = 65535, which is 2 16 -1, replacing X in SCX and CX with R, G, and B and substituting them into the above formula, we can calculate the mapped pixel code values (CR, CG, CB), and finally obtain the image after brightness mapping processing.
[0144] Perform color gamut mapping on the image after brightness mapping:
[0145] First, a 3×3 mapping matrix is obtained by mapping the color coordinates of the red, green, and blue points of the metadata color gamut data to the color coordinates of the red, green, and blue points of the display device color gamut data using mathematical geometric mapping formulas:
[0146]
[0147] Then, the pixels (CR, CG, CB) are multiplied by matrix ST to obtain the pixels (TR, TG, TB) after gamut mapping.
[0148]
[0149] The pixels (TR, TG, TB) are the final result of the mapping process and are passed to the display device for display.
[0150] In this embodiment, brightness mapping and color gamut mapping are performed based on the optimal brightness information and color gamut information of the display device. The display device is adjusted to the optimal brightness range and corresponding color gamut information through the mapping table.
[0151] In one embodiment, such as Figure 7 and Figure 8 As shown, a video display processing method is provided. This method involves a "video data input" module receiving video frames transmitted from an external video player and transmitting them to a "video parsing" module. The "video parsing" module parses the video frame type and completes the metadata. The image data and metadata are then passed to an "electro-optical conversion" module for inverse photoelectric conversion processing, converting nonlinear light into linear light. The linear image data and metadata are then passed to a "brightness conversion" module to convert it into a brightness image. This brightness image is then input to a "statistical brightness histogram" module to generate a brightness distribution array SY. Finally, SY is input to a "brightness analysis and processing" module for brightness analysis and processing to obtain the optimal brightness range for the display device. [DMin,DMax], converts the optimal brightness display range into display device brightness adjustment parameters, which are then input to the "Switch Display Device Parameters" module to form a display device brightness control frame. This frame is then input to the "Display Device Control and Display" module to issue brightness adjustment commands to the display device. Simultaneously, the "Brightness Analysis and Processing" module inputs the optimal brightness display range and device display color gamut data to the "Mapping Processing" module. This module performs mapping processing from the input video frame pixel encoding values to the display video pixel encoding values, ultimately obtaining the display image, which is then input to the "Display Device Control and Display" module to issue display image data.
[0152] Specifically, the "brightness analysis and processing" module calculates the current brightness display range of the LED display device [D]. Min D Max ] and the brightness range of the brightness image frame [I Min , I Max The judgment and analysis process can be divided into two steps.
[0153] Step 1: LED display devices primarily adjust brightness by regulating the current-related parameters of the LED chips, such as cur_arr (current gain, gray-out threshold, refresh rate, etc.). This is achieved using 16-bit PWM dimming technology.Max =65535×D Min According to D Max Conversion relationship between D and cur_arr Max = F(cur_arr), from which the inverse formula cur_arr = UNF(D) is derived. Max ), the D that needs to be adjusted Max Substituting into the inverse formula UNF(*), the adjusted parameter set cur_arr can be obtained. The inverse formula can be replaced by a mapping table, which is formed from the actual adjusted and measured display brightness, color gamut data, and current parameter set. If a mapping table is used, the mapping data needs to be adjusted and measured in advance. The color gamut data includes the color coordinate data of red, green, blue, and white points.
[0154] When the judgment condition is D Min ≤I Min And D Max ≥I Max When D indicates that the device displays a brightness range that includes the full brightness range of the current image frame, it means that the device's brightness range includes the full brightness range of the current image frame. Max with I Max Significant differences can lead to low accuracy, requiring adjustment of D. Max with I Max Equal or similar.
[0155] When the judgment condition indicates that the brightness range of the display device is partially satisfied, i.e., D Max Max And D Min ≤I Min , or D Max ≥I Max And D Min >I Min If the adjusted brightness range meets the requirements of the current video frame, no further adjustment is needed; otherwise, D... Min >I Min And D Max < I Max Based on the distribution of the brightness distribution array SY, the brightness range of the display device should be maximized [D]. Min D Max The number of pixels covering more video frames is adjusted and calculated as follows:
[0156] Formula for calculating the actual luminance value corresponding to the luminance code value:
[0157] TY(y) = (y×S Max ) / C Max
[0158] Where y represents the encoded value of the input brightness, S Max The maximum brightness value of the metadata (unit: nit), C Max This represents the maximum encoded value.
[0159] Let D Min =I Min Calculate D Max The value is then used to count the number of pixels covered by the brightness of the display device (FOC).
[0160] The initial value of FOC is 0, y∈[0, C] Max As y increases sequentially, when TY(y)≥D Min And TY(y)≤D Max When FOC+= SY[y], where SY[*] is the luminance distribution array of the current video frame, recording the number of times each luminance level occurs.
[0161] Simultaneously record the brightness y from 0 to C. Max The first condition to satisfy TY(y)≥D during the change process Min The condition is that the brightness y is y1, and the last condition satisfies TY(y)≤D. Max Given the brightness y as y2, we can obtain the display area Area: Area = y2 - y1
[0162] Increase D sequentially Min And ensure that the adjusted D Max ≤I Max Substituting the above processing steps and the FOC calculation formula, we obtain multiple FOCs and Areas. When there is only one maximum value for FOC, we take the value of D when FOC equals the maximum value. Min D Max To optimize the brightness range of the display device, when there are multiple identical maximum values for FOC, the value corresponding to the largest value in Area is selected (D). Min D Max To optimize the brightness range of the display device, when multiple FOCs and Areas are identical, any corresponding D can be selected. Min D Max This refers to the optimal brightness adjustment range for display devices.
[0163] Step Two:
[0164] The D obtained from the analysis and processing Min D Max The parameters and color gamut are passed to the "mapping processing" module, according to D Max The calculated or mapped set of brightness adjustment parameters, cur_arr, is passed to the "Switch Display Device Parameters" module.
[0165] The "Switch Display Device Parameters" module sends display device control signals, performs frame assembly based on the brightness adjustment parameter set transmitted by the "Brightness Analysis and Processing" module, and transmits the control frame signals to the "Display Device Control and Display" module.
[0166] The "mapping processing" module adjusts the brightness range parameters [D] Min D Max ], brightness range of metadata brightness information [S Min , S Max The color gamut data of the metadata, the color gamut data of the display device, and the input video frame image information are subjected to display mapping processing. The mapping processing is performed at the pixel level as follows:
[0167] Luminosity mapping processing:
[0168] Calculate the scene brightness value SCY corresponding to the current pixel brightness encoding value, where the scene brightness value refers to the brightness at the time of camera acquisition:
[0169] SCY = S Max ×SCX / C Max
[0170] Where SCX represents the single-channel encoded value of a single pixel in the input video frame, and then this brightness is mapped to the corresponding brightness encoded value on the display device:
[0171] CX = INT(SCY / D Min )
[0172] Where INT(*) indicates rounding, CX represents the mapped pixel single-channel encoding value, whose value range is the integer part of [0, CMax], with the excess part limited to the maximum value, and CMax represents the maximum encoding value of a single channel. Taking RGB three-channel pixels with each channel as 16 bits as an example, CMax = 65535, which is 2 16 -1, replacing X in SCX and CX with R, G, and B and substituting them into the above formula, we can calculate the mapped pixel code values (CR, CG, CB), and finally obtain the image after brightness mapping processing.
[0173] Perform color gamut mapping on the image after brightness mapping:
[0174] First, a 3×3 mapping matrix is obtained by mapping the color coordinates of the red, green, and blue points of the metadata color gamut data to the color coordinates of the red, green, and blue points of the display device color gamut data using mathematical geometric mapping formulas:
[0175]
[0176] Then, the pixels (CR, CG, CB) are multiplied by matrix ST to obtain the pixels (TR, TG, TB) after gamut mapping.
[0177]
[0178] The pixels (TR, TG, TB) are the final result of the mapping process and are passed to the display device for display.
[0179] The "Display Device Control and Display" module initiates control signals to the display device and sends display image frames to the display device.
[0180] This video display processing method is based on video frame processing and is divided into two sub-processes: device control processing and device display processing. The device control processing analyzes the brightness of the input image frame and adjusts the display parameters of the display device according to the analysis results, changing the brightness range and color gamut of the display device. At the same time, it transmits the changed brightness range and color gamut information of the display device to the device display processing. The device display processing performs mapping processing based on the changed brightness range and color gamut information of the display device, thereby expanding the display dynamic range of the display device.
[0181] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0182] Based on the same inventive concept, this application also provides a video display processing apparatus for implementing the video display processing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more video display processing apparatus embodiments provided below can be found in the limitations of the video display processing method described above, and will not be repeated here.
[0183] In one embodiment, such as Figure 9 As shown, a video display processing device is provided, including: a video parsing module 902, an electro-optical conversion module 904, a brightness conversion module 906, a statistical brightness histogram module 908, a brightness analysis and processing module 910, and a display control module 912, wherein:
[0184] The video parsing module 902 is used to respond to a playback request for the target video, read the video frame data of the target video, and obtain the type of the target video, the image data of each image frame, and metadata. The metadata includes color gamut information and brightness information; the brightness information includes the brightness range of the target video frames.
[0185] The electro-optical conversion module 904 is used to perform reverse photoelectric processing on video frames according to the type of the target video.
[0186] The brightness conversion module 906 is used to convert the image data of each image frame after inverse photoelectric processing according to the color gamut information in the metadata, so as to obtain the converted brightness of each pixel in the image frame.
[0187] The statistical brightness histogram module 908 is used to statistically analyze the converted brightness of each image frame and obtain the brightness distribution array of each image frame.
[0188] The brightness analysis and processing module 910 is used to determine the optimal brightness range of the display device based on the brightness distribution array of each image frame, the brightness information of the image frame, and the brightness information of the display device.
[0189] The display control module 912 is used to display based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
[0190] In one embodiment, the brightness analysis and processing module is configured to: when the brightness range of the display device is within the brightness range of the image frame, set the lower limit of the brightness range of the display device equal to the lower limit of the brightness range of the image frame, calculate the upper limit of the brightness range of the display device, and obtain the current brightness display range of the display device; based on the number of actual brightness values within the current brightness display range of the display device and the brightness distribution array, obtain the number of pixels and the brightness display interval within the current brightness display range of the display device; the actual brightness values include the actual brightness values corresponding to all brightness encoding values; sequentially increase the lower limit of the brightness range of the display device, and when the corresponding upper limit of the brightness range of the display device is less than or equal to the upper limit of the brightness range of the image frame, repeat the steps of obtaining the number of brightness-covered pixels and the brightness display interval within the current brightness display range based on the number of actual brightness values within the current brightness display range of the display device and the brightness distribution array, to obtain multiple current brightness display ranges, and corresponding number of brightness-covered pixels and brightness display intervals; and determine the optimal brightness range of the display device among the multiple current brightness display ranges of the display device based on the number of brightness-covered pixels and the brightness display intervals.
[0191] In one embodiment, the brightness analysis and processing module is further configured to: when there is only one maximum number of pixels covered by brightness, use the brightness display range corresponding to the maximum number of pixels covered by brightness as the optimal brightness range of the display device; when there are multiple maximum numbers of pixels covered by brightness, use the brightness display range corresponding to the maximum brightness display interval among the multiple maximum numbers of pixels covered by brightness as the optimal brightness range of the display device; when there are multiple maximum numbers of pixels covered by brightness and multiple maximum brightness display intervals among the multiple maximum numbers of pixels covered by brightness, use the brightness display range corresponding to any one of the maximum brightness display intervals among the multiple maximum numbers of pixels covered by brightness as the optimal brightness range of the display device.
[0192] In one embodiment, the brightness analysis and processing module is further configured to determine the brightness display interval within the current brightness display range based on the first brightness value whose actual brightness value is greater than or equal to the lower limit of the current brightness display range, and the last brightness value whose actual brightness value is less than or equal to the upper limit of the current brightness display range, as the brightness encoding value increases sequentially.
[0193] In one embodiment, the brightness analysis and processing module is further configured to determine the optimal brightness range of the display device based on the upper limit of the brightness range of the image frame when the brightness range of the image frame is within the brightness display range of the display device.
[0194] In one embodiment, the brightness analysis processing module is further configured to, when the upper limit of the brightness display range of the display device is less than the upper limit of the brightness range of the image frame, and the lower limit of the brightness display range of the display device is less than the lower limit of the brightness range of the image frame, determine the optimal brightness range of the display device based on the lower limit of the brightness range of the image frame; or
[0195] When the lower limit of the brightness display range of the display device is greater than the lower limit of the brightness range of the image frame, and the upper limit of the brightness display range of the display device is greater than the upper limit of the brightness range of the image frame, the optimal brightness range of the display device is determined based on the upper limit of the brightness range of the image frame.
[0196] In one embodiment, the display control module is used to obtain a corresponding set of brightness adjustment parameters based on the optimal brightness range of the display device, the corresponding color gamut information, and the mapping table;
[0197] Based on the image data of the image frame, the brightness range and color gamut information of the image frame are mapped to the optimal brightness range and color gamut information of the display device to obtain the display image;
[0198] The display is based on the brightness adjustment parameter set and the displayed image.
[0199] Each module in the aforementioned video display processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0200] In one embodiment, a computer device is provided, the internal structure of which can be as follows: Figure 10 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. 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, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores image frames and data from the LED display device. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a video display processing method.
[0201] Those skilled in the art will understand that Figure 10 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.
[0202] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the steps in the above-described method embodiments.
[0203] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0204] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0205] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0206] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0207] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A video display processing method, characterized in that, The method includes: In response to a playback request for a target video, the video frame data of the target video is read to obtain the type of the target video, the image data of each image frame, and metadata, including color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video. According to the type of the target video, the video frame is subjected to reverse photoelectric processing; wherein, when the target video is an SDR video, an inverse gamma operation is performed; when the target video is an HDR video, HDR reverse photoelectric conversion processing is performed. Based on the color gamut information in the metadata, the image data of each image frame after inverse photoelectric processing is converted to obtain the converted brightness of each pixel in the image frame; wherein, the converted brightness of each pixel in the image frame is calculated based on the conversion coefficients of brightness conversion on the three components of color RGB, and the RGB channel encoding value of each pixel; The converted brightness of each image frame is statistically analyzed to obtain a brightness distribution array for each image frame; the brightness distribution array is used to record the number of times each brightness encoding value appears in the image frame; When the brightness range of the display device is within the brightness range of the image frame, set the lower limit of the brightness range of the display device to the lower limit of the brightness range of the image frame, calculate the upper limit of the brightness range of the display device, and obtain the current brightness display range of the display device. Based on the number of actual brightness values within the current brightness display range of the display device and the brightness distribution array, the number of pixels and the brightness display range within the current brightness display range of the display device are obtained; the actual brightness values include the actual brightness values corresponding to all brightness encoding values; wherein, the actual brightness value TY(y) is calculated from the brightness encoding value y according to the formula TY(y)=(y×SMax) / CMax, where SMax is the maximum brightness value in the metadata and CMax is the maximum encoding value; the brightness display range is determined as follows: as the brightness encoding value y increases sequentially from 0 to CMax, the first brightness encoding value that satisfies TY(y)≥ the lower limit of the current brightness display range is recorded as y1, and the last brightness encoding value that satisfies TY(y)≤ the upper limit of the current brightness display range is recorded as y2, thus determining the brightness display range Area=y2-y1; The lower limit of the brightness range of the display device is increased sequentially, and when the upper limit of the brightness range of the corresponding display device is less than or equal to the upper limit of the brightness range of the image frame, the steps of obtaining the number of brightness-covered pixels and the brightness display interval in the current brightness display range based on the number of actual brightness values in the current brightness display range of the display device and the brightness distribution array are repeated to obtain multiple current brightness display ranges, and the corresponding number of brightness-covered pixels and brightness display intervals; Based on the number of pixels covered by the brightness and the brightness display range, the optimal brightness range of the display device is determined among the plurality of current brightness display ranges; The image is displayed based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
2. The method according to claim 1, characterized in that, The step of determining the optimal brightness range of the display device among multiple current brightness display ranges based on the number of brightness coverage pixels and the brightness display interval includes: When there is only one maximum number of pixels covered by brightness, the brightness display range corresponding to the maximum number of pixels covered by brightness is taken as the optimal brightness range of the display device; When there are multiple maximum values for the number of pixels covered by brightness, the brightness display range corresponding to the maximum brightness display interval among the multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device; When there are multiple maximum values for the number of pixels covered by brightness, and multiple maximum brightness display ranges among these multiple maximum values, the brightness display range corresponding to any one of the maximum brightness display ranges among these multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device.
3. The method according to claim 1, characterized in that, Methods for determining the brightness display range within the current brightness display range include: As the brightness encoding value increases sequentially, the brightness display range within the current brightness display range is determined based on the first brightness value whose actual brightness value is greater than or equal to the lower limit of the current brightness display range, and the last brightness value whose actual brightness value is less than or equal to the upper limit of the current brightness display range.
4. The method according to claim 1, characterized in that, The method further includes: When the brightness range of the image frame is within the brightness display range of the display device, the optimal brightness range of the display device is determined based on the upper limit of the brightness range of the image frame.
5. The method according to claim 1, characterized in that, The method further includes: When the upper limit of the brightness display range of the display device is less than the upper limit of the brightness range of the image frame, and the lower limit of the brightness display range of the display device is less than the lower limit of the brightness range of the image frame, the optimal brightness range of the display device is determined based on the lower limit of the brightness range of the image frame; or When the lower limit of the brightness display range of the display device is greater than the lower limit of the brightness range of the image frame, and the upper limit of the brightness display range of the display device is greater than the upper limit of the brightness range of the image frame, the optimal brightness range of the display device is determined based on the upper limit of the brightness range of the image frame.
6. The method according to claim 1, characterized in that, The step of displaying the image based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame includes: Based on the optimal brightness range of the display device, the corresponding color gamut information, and the mapping table, the corresponding brightness adjustment parameter set is obtained; Based on the image data of the image frame, the brightness range and color gamut information of the image frame are mapped to the optimal brightness range and color gamut information of the display device to obtain the display image; The display is performed according to the set of brightness adjustment parameters and the display image.
7. A video display processing device, characterized in that, The device includes: The video parsing module is used to respond to a playback request for a target video by reading the video frame data of the target video to obtain the type of the target video, the image data of each image frame, and metadata. The metadata includes color gamut information and brightness information; the brightness information includes the brightness range of the frames of the target video. An electro-optical conversion module is used to perform reverse photoelectric processing on the video frame according to the type of the target video; wherein, when the target video is an SDR video, an inverse gamma operation is performed; and when the target video is an HDR video, HDR reverse photoelectric conversion processing is performed. The brightness conversion module is used to convert the image data of each image frame after inverse photoelectric processing according to the color gamut information in the metadata, so as to obtain the converted brightness of each pixel in the image frame; wherein, the converted brightness of each pixel in the image frame is calculated based on the conversion coefficients of brightness conversion on the three components of color RGB, and the RGB channel encoding value of each pixel; The luminance histogram module is used to statistically analyze the converted luminance of each image frame to obtain a luminance distribution array for each image frame; the luminance distribution array is used to record the number of times each luminance code value appears in the image frame; The brightness analysis and processing module is used to: when the brightness range of the display device is within the brightness range of the image frame, set the lower limit of the brightness range of the display device equal to the lower limit of the brightness range of the image frame, calculate the upper limit of the brightness range of the display device, and obtain the current brightness display range of the display device; based on the number of actual brightness values within the current brightness display range of the display device and the brightness distribution array, obtain the number of pixels and the brightness display interval within the current brightness display range of the display device; the actual brightness values include the actual brightness values corresponding to all brightness encoding values; wherein, the actual brightness value TY(y) is obtained by converting the brightness encoding value y according to the formula TY(y)=(y×SMax) / CMax, where SMax is the maximum brightness value in the metadata and CMax is the maximum encoding value; the brightness display interval is determined as follows: as the brightness encoding value y increases sequentially from 0 to CMax, the first... The brightness encoding value that satisfies TY(y) ≥ the lower limit of the current brightness display range is denoted as y1, and the last brightness encoding value that satisfies TY(y) ≤ the upper limit of the current brightness display range is denoted as y2. The brightness display interval Area = y2 - y1 is determined. The lower limit of the brightness range of the display device is increased sequentially, and when the upper limit of the brightness range of the corresponding display device is less than or equal to the upper limit of the brightness range of the image frame, the steps of obtaining the number of brightness-covered pixels and the brightness display interval in the current brightness display range based on the number of actual brightness values in the current brightness display range of the display device and the brightness distribution array are repeated to obtain multiple current brightness display ranges, and the corresponding number of brightness-covered pixels and brightness display intervals. Based on the number of brightness-covered pixels and the brightness display intervals, the optimal brightness range of the display device is determined among the multiple current brightness display ranges. The display control module is used to display based on the optimal brightness range of the display device, the color gamut information of the display device, the brightness range of the image frame, the color gamut information of the image frame, and the image data of the image frame.
8. The apparatus according to claim 7, characterized in that, The brightness analysis and processing module is also used for: When there is only one maximum value for the number of pixels covered by brightness, the brightness display range corresponding to the maximum value for the number of pixels covered by brightness is taken as the optimal brightness range of the display device; when there are multiple maximum values for the number of pixels covered by brightness, the brightness display range corresponding to the maximum brightness display interval among the multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device; when there are multiple maximum values for the number of pixels covered by brightness and multiple maximum brightness display intervals among the multiple maximum values for the number of pixels covered by brightness, the brightness display range corresponding to any one of the maximum brightness display intervals among the multiple maximum values for the number of pixels covered by brightness is taken as the optimal brightness range of the display device.
9. 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 6.
10. 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 6.