CN113099201B - Video signal processing method and device and electronic equipment - Google Patents

Video signal processing method and device and electronic equipment Download PDF

Info

Publication number
CN113099201B
CN113099201B CN202110343564.5A CN202110343564A CN113099201B CN 113099201 B CN113099201 B CN 113099201B CN 202110343564 A CN202110343564 A CN 202110343564A CN 113099201 B CN113099201 B CN 113099201B
Authority
CN
China
Prior art keywords
brightness
value
luminance
target
signals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110343564.5A
Other languages
Chinese (zh)
Other versions
CN113099201A (en
Inventor
耿晨晖
李勇鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202110343564.5A priority Critical patent/CN113099201B/en
Publication of CN113099201A publication Critical patent/CN113099201A/en
Application granted granted Critical
Publication of CN113099201B publication Critical patent/CN113099201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/67Circuits for processing colour signals for matrixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase

Abstract

The embodiment of the invention provides a video signal processing method and device and electronic equipment. The video signal processing method includes: acquiring YUV signals of video frames of a target video; determining a target change intensity value corresponding to the video frame based on the brightness signal of the YUV signal, wherein the target change intensity value is used for representing the brightness change intensity of a dark part area in the video frame; converting the YUV signals into RGB signals, and carrying out tone mapping on the RGB signals to obtain the RGB signals after tone mapping; according to a preset compensation rule, based on the target change intensity value, performing brightness compensation on the RGB signal after tone mapping to obtain a target RGB signal; the compensation rules include: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation; the RGB signals of a video frame to be displayed in the display device are determined using the target RGB signals. By the scheme, the display effect of the HDR video on the display device can be improved.

Description

Video signal processing method and device and electronic equipment
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video signal processing method and apparatus, and an electronic device.
Background
HDR (High Dynamic Range) video technology is a major leap in the development process of the video industry, and reproduces colors and contrast between the brightest white and the darkest black that can be seen by naked eyes by using High bit depth and wide color gamut through the expansion of the photoelectric transmission function. However, the luminance range of HDR video is generally much larger than the luminance display range of display devices, which hampers the limitations of the display performance of the display devices. Therefore, the presentation of HDR video on a display device is a major problem facing both academia and industry at the present stage.
In the related art, a scheme for processing a video signal of an HDR video in a tone mapping manner is provided in a "CUVA High Dynamic Range (HDR) standard" formulated by the chinese ultra high definition video industry alliance (CUVA) to adapt to a display capability of a display device.
However, the inventors found in the process of implementing the present invention that: the related art is fine-tuned, i.e., only weakly linear stretching or linear compression, for a dark region in a video frame of an HDR video at the time of tone mapping, where the dark region and a bright region are relative, and the dark region is a visually darker image region in the video frame and can be empirically specified. In this way, the display performance required by the dark area may still be different from the display capability of the display device, so that the detailed content of the dark area cannot be well presented, and finally the presentation effect of the HDR video on the display device is poor.
Disclosure of Invention
Embodiments of the present invention provide a video signal processing method, an apparatus and an electronic device, so as to improve a presentation effect of an HDR video on a display device. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a video signal processing method, the method including:
acquiring YUV signals of video frames of a target video;
determining a target change intensity value corresponding to the video frame based on the brightness signal of the YUV signal, wherein the target change intensity value is used for representing the brightness change intensity of a dark part area in the video frame;
converting the YUV signals into RGB signals, and carrying out tone mapping on the RGB signals to obtain RGB signals after tone mapping;
according to a preset compensation rule, based on the target change intensity value, performing brightness compensation on the RGB signals after tone mapping to obtain target RGB signals; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
determining RGB signals of the video frame to be displayed in a display device using the target RGB signals.
Optionally, the performing, according to a predetermined compensation rule, luminance compensation on the tone-mapped RGB signal based on the target variation intensity value to obtain a target RGB signal includes:
according to a preset compensation rule, based on the target change intensity value and the brightness performance parameter of the screen of the display equipment, performing brightness compensation on the RGB signals after tone mapping to obtain target RGB signals;
the predetermined reimbursement rules further include: the screen brightness performance is inversely related to the compensation degree of the brightness compensation.
Optionally, the performing, according to a predetermined compensation rule, luminance compensation on the tone-mapped RGB signal based on the target variation intensity value and a luminance performance parameter of the screen of the display device to obtain a target RGB signal includes:
substituting the target change intensity value and the brightness performance parameter of the screen of the display device into a determination formula of a correction coefficient for representing brightness correction degree to obtain a correction coefficient corresponding to the RGB signal after tone mapping;
and correcting the RGB signals after tone mapping based on the obtained correction coefficient to obtain target RGB signals.
Optionally, the brightness performance parameters include:
a contrast ratio; the contrast coefficient is a quantized value of the contrast of the maximum display brightness and the minimum display brightness of the screen; and/or the presence of a gas in the atmosphere,
a screen display coefficient; and the screen display coefficient is a quantized value of the display capability represented by the maximum display brightness of the screen.
Optionally, the on-screen display coefficient is a normalized value, and the target variation intensity value is a normalized value and is inversely proportional to the intensity of the luminance variation with respect to the dark area;
the determination formula of the correction coefficient for representing the brightness correction degree is as follows:
Figure BDA0003000021510000031
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, coeffDisplay is the screen display coefficient, contrast is the contrast coefficient, dark _ log is the target change intensity value, and N is 1 And N 2 Are all predetermined constants, N 2 For the maximum value, N, that the contract can be assigned to 1 For making use of
Figure BDA0003000021510000032
A value not greater than 1;
the correction formula for correcting the RGB signal after tone mapping is as follows:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal.
Optionally, the determining a target change intensity value corresponding to the video frame based on the luminance signals of the YUV signals includes:
determining each brightness value representing the brightness of a dark part area of the video frame from the brightness values corresponding to the brightness signals of the YUV signals;
and calculating a target change intensity value corresponding to the video frame based on the brightness difference relationship represented by each determined brightness value.
Optionally, the determining, from luminance values corresponding to luminance signals of the YUV signals, respective luminance values representing luminance of a dark portion region of the video frame includes:
determining a first brightness value, a third brightness value and a second brightness value from the brightness values corresponding to the brightness signals of the YUV signals; wherein the first luminance value is a minimum luminance value other than zero, the third luminance value is a maximum luminance value of luminance values representing a dark portion region, and the second luminance value is a luminance value between the first luminance value and the third luminance value;
the calculating a target change intensity value corresponding to the video frame based on the brightness difference relationship represented by each determined brightness value includes:
performing photoelectric conversion on the first brightness value, the second brightness value and the third brightness value to obtain a converted first brightness value, a converted second brightness value and a converted third brightness value;
if the converted third brightness value is equal to the converted second brightness value, determining a numerical value representing that the brightness change intensity is unchanged as a target change intensity value;
otherwise, the target variation intensity value is determined using a difference relationship with respect to the converted second luminance value and the converted first luminance value, and a difference relationship with respect to the converted third luminance value and the converted first luminance value.
Optionally, the target variation intensity value is a normalized value and is inversely proportional to the luminance variation intensity with respect to the dark portion region;
the formula used for determining the target change intensity value is as follows:
dark_log=log10(MIN_LUM_A/MIN_LUM)/log10(MIN_LUM_B/MIN_LUM);
where dark _ log is a target intensity variation value, MIN _ LUM is a converted first luminance value, MIN _ LUM _ a is a converted second luminance value, and MIN _ LUM _ B is a converted third luminance value.
Optionally, the determining manner of the contrast ratio includes:
determining a coefficient initial value based on the maximum display brightness and the minimum display brightness of a screen of the display device;
if the initial value of the coefficient is not larger than a preset coefficient threshold value, the initial value of the coefficient is used as a contrast coefficient;
if the initial coefficient value is larger than a preset coefficient threshold value, taking the preset coefficient threshold value as a contrast coefficient;
the formula used for determining the initial value of the coefficient is as follows:
L=log10(MaxDisplay/MinDisplay)
wherein, L is a coefficient initial value, maxDisplay is the maximum display brightness, and minidisplay is the minimum display brightness.
Optionally, the determining manner of the screen display coefficient includes:
determining a target brightness interval in which the maximum display brightness is positioned from a plurality of brightness intervals represented by preset corresponding relations; the preset corresponding relation is the corresponding relation between the brightness interval and a coefficient representing the display capability of the screen;
and determining a coefficient corresponding to the target brightness interval from the preset corresponding relation to be used as a screen display coefficient.
In a second aspect of the present invention, there is also provided a video signal processing apparatus, comprising:
the signal acquisition module is used for acquiring YUV signals of video frames of a target video;
the intensity value determining module is used for determining a target change intensity value corresponding to the video frame based on the luminance signals of the YUV signals, wherein the target change intensity value is used for representing the luminance change intensity of a dark part area in the video frame;
the signal mapping module is used for converting the YUV signals into RGB signals and carrying out tone mapping on the RGB signals to obtain RGB signals after tone mapping;
the compensation module is used for performing brightness compensation on the RGB signals after tone mapping according to a preset compensation rule and based on the target change intensity value to obtain target RGB signals; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
and the signal determining module is used for determining the RGB signals of the video frame to be displayed in the display equipment by using the target RGB signals.
In a third aspect of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the above-described video signal processing methods when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, the computer program, when executed by a processor, implementing any of the video signal processing methods described above.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the video signal processing methods described above.
In the solution provided in the embodiment of the present invention, after performing tone mapping on the RGB signals of the video frame, luminance compensation is performed on the RGB signals after tone mapping based on the luminance change intensity of the dark area in the video frame, that is, luminance compensation is performed on the video signals in combination with the area characteristics of the dark area. Therefore, when the video signal is displayed in the display device, the display performance required by the dark part area can be more suitable for the brightness display capability of the display device, the detail content of the dark part area can be better presented, and the presentation effect of the video signal of the HDR video on the display device is finally improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below.
FIG. 1 is a flowchart of a video signal processing method according to an embodiment of the present invention;
FIG. 2 (a) is a schematic diagram of a video processing process;
FIG. 2 (b) is another flow chart of a video signal processing method according to an embodiment of the present invention;
FIG. 2 (c) is a schematic diagram of a video signal processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a video signal processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a video signal processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to improve the presentation effect of an HDR video on a display device, embodiments of the present invention provide a video signal processing method and apparatus, and an electronic device.
First, a video signal processing method according to an embodiment of the present invention will be described.
The video signal processing method provided by the embodiment of the invention can be applied to electronic equipment. In a specific application, the electronic device may be a set-top box, a smart TV, a smart phone, a notebook computer, a multimedia player, etc.
It will be appreciated that for an electronic device having a screen, the electronic device may be used to display video, i.e. the electronic device simultaneously acts as a display device, for example: devices with screens such as smart TVs, smart phones, notebook computers, and the like can be used as display devices to display videos; for an electronic device without a screen, the electronic device may perform video display through a connected display device, for example: the set-top box, the multimedia player and the like display videos through the connected displays.
In addition, the processing procedure involved in the method provided by the embodiment of the invention is an adaptation procedure aiming at the brightness display capability of the display device. Therefore, for any HDR video, referring to fig. 2 (a), the electronic device may acquire a video stream of the HGR video, decode a video frame in the video stream, and for the YUV signal of the decoded video frame, the electronic device executes the method provided by the embodiment of the present invention to obtain the RGB signal of the video frame to be displayed in the display device, so as to display the video signal in the display device.
Specifically, the video signal processing method provided by the embodiment of the present invention may include the following steps:
acquiring YUV signals of video frames of a target video;
determining a target change intensity value corresponding to the video frame based on the brightness signal in the YUV signal, wherein the target change intensity value is used for representing the brightness change intensity of a dark part area in the video frame;
converting the YUV signal into an RGB signal, and carrying out tone mapping on the RGB signal to obtain an RGB signal subjected to tone mapping;
according to a preset compensation rule, based on the target change intensity value, performing brightness compensation on the RGB signal after tone mapping to obtain a target RGB signal; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
the RGB signals of a video frame to be displayed in the display device are determined using the target RGB signals.
In the solution provided in the embodiment of the present invention, after performing tone mapping on the RGB signals of the video frame, the RGB signals after the tone mapping are subjected to luminance compensation based on the luminance change intensity of the dark area in the video frame, that is, the RGB signals after the tone mapping are subjected to luminance compensation in combination with the area characteristic of the dark area. Therefore, when the video signal is displayed in the display device, the display performance required by the dark part area can be more suitable for the brightness display capability of the display device, the detail content of the dark part area can be better presented, and the presentation effect of the video signal of the HDR video on the display device is finally improved.
A video signal processing method according to an embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1, a video signal processing method may include the steps of:
s101, acquiring YUV signals of a video frame of a target video;
the target video may be any HDR video. In addition, the embodiment of the present invention does not limit the source of the target video, for example: the target video can be a network video or a local video of the electronic device.
When the electronic device needs to display the video signal of the target video through the display device, the electronic device can acquire the video stream of the target video, decode the video frame in the video stream, acquire the YUV signal of the video frame of the target video after decoding, and further perform signal processing on the YUV signal, so as to obtain the RGB signal displayed in the display device. That is, when the electronic device performs video signal processing, the YUV signals of the video frame of the target video are input content of the processing process. It should be noted that the generation process of the YUV signal of the video frame of the target video may be the same as the generation process in the prior art, and the embodiment of the present invention is not limited to the specific generation process.
In addition, it can be understood that, since the video frame is formed by a plurality of pixel points, the YUV signal of the video frame of the acquired target video is the YUV signal of each pixel point of the video frame of the acquired target video. The YUV signal is a signal representing brightness, chromaticity, and concentration, where "Y" denotes brightness (Luma) and "U" and "V" denote chromaticity (Chroma).
S102, determining a target change intensity value corresponding to the video frame based on the brightness signal of the YUV signal, wherein the target change intensity value is used for representing the brightness change intensity of a dark part area in the video frame;
in order to improve the presentation effect of the video signal of the HDR video on the display device, in this embodiment, the intensity of the brightness change in the dark area in the video frame is applied to the video signal processing process, specifically: the dark area is subjected to luminance compensation, that is, each pixel in the dark area is subjected to luminance compensation. The dark area and the light area are relative, and the dark area is a visually darker image area in the video frame. Therefore, after the YUV signals of the video frame are acquired, before the YUV signals of the video frame are converted into RGB signals, the target change intensity value corresponding to the video frame is determined based on the luminance signal of the YUV signals, that is, the Y signal, so that luminance compensation is realized based on the target change intensity value.
It should be noted that, in the present embodiment, it is not concerned which area in the video frame the dark portion area is specifically located, that is, the position of the dark portion area, but the intensity of the luminance change with respect to the dark portion area, that is, the complexity of the luminance with respect to the dark portion area is identified in a predetermined manner, and the identified intensity of the luminance change is quantized.
For clarity of the scheme and layout, a specific implementation manner for determining a target change intensity value corresponding to a video frame based on the luminance signal of the YUV signal is described below.
S103, converting the YUV signals into red, green and blue RGB signals, and carrying out tone mapping on the RGB signals to obtain the RGB signals after tone mapping;
the electronic device may perform signal conversion in any way that is capable of converting YUV signals to RGB; and the RGB signals after tone mapping are specifically RGB signals of each pixel point of the video frame. Illustratively, in one implementation, the YUV signal is converted to an RGB signal according to a YUV signal standard, such as bt709 or bt2020, in the following formula;
R=Y+e*U;G=Y-(a*e/b)*U-(c*d/b)*V;B=Y+d*V;
wherein, under the bt709 standard, a =0.2126, b =0.7152, c =0.0722, d =1.8556, e =1.5748; bt2020 standard, a =0.2627, b =0.6780, c =0.0593, d =1.8814, e =1.4746.
Also, so-called tone mapping, essentially, solves the problem of performing contrast reduction to transform scene luminance to a range where it can be displayed, while retaining information such as image details and colors that are important for representing the original scene.
For example, in one implementation, the process of tone mapping the RGB signal may include:
generating base curve parameters for tone mapping, in particular: if the dynamic metadata of the video frame carries the basic curve parameters, extracting the basic curve parameters from the dynamic metadata; if the dynamic metadata of the video frame does not carry the basic curve parameters, calculating to obtain the basic curve parameters according to a calculation mode given by the CUVA HDR standard;
generating cubic spline interval parameters for tone mapping, specifically, if the dynamic metadata of the video frame carries the cubic spline interval parameters, extracting the cubic spline interval parameters from the dynamic metadata; if the dynamic metadata of the video frame does not carry the cubic spline interval parameter, calculating to obtain the cubic spline interval parameter according to a calculation mode given by the CUVA HDR standard;
and tone mapping is carried out on the RGB signals by utilizing the basic curve parameters and the cubic spline interval parameters according to a color signal dynamic range conversion mode given by the CUVA HDR standard.
The dynamic metadata is used for describing the brightness characteristics of the video image, and for example, the content included in the dynamic metadata may include: maximum luminance, minimum luminance, average luminance of the image, of course, the dynamic metadata may also include: base curve parameters for tone mapping, cubic spline interval parameters, and the like. The basic curve parameter and the cubic spline interval parameter are both parameters for tone mapping given in the CUVA HDR standard, and are not the invention point of the present invention, so the embodiments of the present invention do not describe in detail the specific parameter contents and calculation modes of the basic curve parameter and the cubic spline interval parameter.
S104, performing brightness compensation on the RGB signals after tone mapping according to a preset compensation rule and based on the target change intensity value to obtain target RGB signals; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
after the RGB signals after tone mapping are obtained, the RGB signals are not directly used as RGB signals to be displayed, but luminance compensation is performed on the RGB signals after tone mapping based on the target variation intensity value according to a predetermined compensation rule to obtain target RGB signals. Through the compensation mode, the display performance required by the dark part area can be more fit with the brightness display capability of the display equipment, and the detail content of the dark part area can be better presented. The term "the intensity of the luminance change in the dark area is in positive correlation with the degree of compensation for the luminance compensation" specifically means: the greater the intensity of the luminance change with respect to the dark portion area, the greater the degree of compensation of the luminance compensation, and the smaller the intensity of the luminance change with respect to the dark portion area, the smaller the degree of compensation of the luminance compensation.
The implementation manner of obtaining the target RGB signal may be various, in which the luminance compensation is performed on the RGB signal after the tone mapping based on the target variation intensity value according to a predetermined compensation rule. Optionally, in an implementation manner, performing luminance compensation on the RGB signals after tone mapping based on the target variation intensity value may include:
substituting the target change intensity value into a determination formula of a correction coefficient for representing the brightness correction degree to obtain a correction coefficient corresponding to the RGB signal after tone mapping;
and correcting the RGB signals after tone mapping based on the obtained correction coefficient to obtain target RGB signals.
On the premise of ensuring that the brightness change intensity of the dark area is positively correlated with the compensation degree of brightness compensation, the determination formula of the correction coefficient may be various, and correspondingly, the formula for correcting the RGB signal after tone mapping based on the correction coefficient may also be various.
The following describes an exemplary formula for determining the correction coefficient and a formula for correcting the tone-mapped RGB signal, taking the target variation intensity value as a normalized value.
For example, if the target variation intensity value is a normalized value and is inversely proportional to the luminance variation degree, the formula for determining the correction coefficient may be as follows:
Omiga=dark_log
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, and dark _ log is a target change intensity value;
accordingly, the formula for correcting the RGB signals after tone mapping may be as follows:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone mapped RGB signal.
For example, if the target change intensity value is a normalized value and is proportional to the brightness change degree, the determination formula of the correction coefficient may be as follows:
Omiga=N 0 *dark_log
wherein Omiga is a correction coefficient, dar corresponding to the RGB signal after tone mappingk _ log is the target change strength value, N 0 Is a constant greater than 0 and less than 1;
accordingly, the formula for correcting the RGB signals after tone mapping may be as follows:
f_TM_adjust=f_TM*Omiga+f_TM
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal.
For example, if the target variation intensity value is a normalized value and is proportional to the luminance variation degree, the formula for determining the correction coefficient may be as follows:
Omiga=N 0 dark_log
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, dark _ log is a target change intensity value, and N 0 Is a constant greater than 0 and less than 1;
accordingly, the formula for correcting the tone-mapped RGB signal may be as follows:
f_TM_adiust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal.
Optionally, in another implementation, performing luminance compensation on the RGB signals after tone mapping based on the target variation intensity value according to a predetermined compensation rule may include:
determining a target compensation degree value corresponding to the target change strength based on the target change strength value and the corresponding relation between the change strength value and the compensation degree value;
and adding a target compensation degree value to the RGB signal after tone mapping to obtain a target RGB signal.
It should be emphasized that the specific implementation manner of performing luminance compensation on the tone-mapped RGB signal based on the target variation intensity value is given above only as an example, and should not be construed as limiting the embodiment of the present invention; similarly, the above-mentioned formula for determining the correction coefficient and the formula for correcting the RGB signals after tone mapping are also only examples, and should not be construed as limiting the embodiments of the present invention.
S105, determining RGB signals of a video frame to be displayed in the display device using the target RGB signals.
The electronic device may directly use the target RGB signal as the RGB signal of the video frame to be displayed in the display device. Or, for better color effect, the electronic device may adjust the color saturation of the target RGB signal, and after adjusting the color saturation, may obtain the RGB signal of the video frame to be displayed in the display device. There may be a variety of ways to adjust the color saturation, which is not limited in the embodiment of the present invention, and for example, the color saturation may be adjusted for the target RGB signal according to the color saturation adjustment way given in section 9.4 of the CUVA HDR standard.
In addition, when the target RGB signal is a normalized value, the target RGB signal may be subjected to an inverse operation of normalization, so as to obtain RGB signals of a video frame to be displayed in the display device.
In the solution provided in the embodiment of the present invention, after performing tone mapping on the RGB signals of the video frame, the RGB signals after the tone mapping are subjected to luminance compensation based on the luminance change intensity of the dark area in the video frame, that is, the RGB signals after the tone mapping are subjected to luminance compensation in combination with the area characteristic of the dark area. Therefore, when the video signal is displayed in the display device, the display performance required by the dark part area can better fit with the brightness display capability of the display device, the detail content of the dark part area can be better presented, and the presentation effect of the video signal of the HDR video on the display device is finally improved.
For clarity of the scheme and clear layout, a specific implementation manner for determining the target change intensity value corresponding to the video frame based on the luminance signal in the YUV signal is described below.
Optionally, in an implementation, determining a target change intensity value corresponding to the video frame based on the luminance signal in the YUV signals may include steps A1-A2:
step A1, determining each brightness value representing the brightness of a dark part area of a video frame from the brightness values corresponding to the brightness signals of the YUV signals;
and A2, calculating a target change intensity value corresponding to the video frame based on the brightness difference relation represented by each determined brightness value.
Since the luminance change intensity of any one region can be represented by the difference between a plurality of luminance values in the region, when the target change intensity is determined, the luminance values representing the luminance of the dark area of the video frame can be determined from the luminance values corresponding to the luminance signals of the YUV signals, and the target change intensity value corresponding to the video frame can be calculated based on the luminance difference relationship represented by the determined luminance values. The electronic device may count histogram distribution of the luminance values based on the luminance signals in the YUV signals of the video frame, and determine each luminance value representing the luminance of the dark portion region of the video frame based on the histogram distribution.
There may be various implementations of determining respective luminance values representing the luminance of the dark portion region of the video frame from the luminance signals of the YUV signals; in addition, since the determined difference relationship of each brightness value needs to be utilized, in practical applications, the number of each determined brightness value may be two or three, but is not limited thereto.
For example, in a specific implementation, step A1 may include:
determining a first brightness value, a third brightness value and a second brightness value from the brightness values corresponding to the brightness signals of the YUV signals; the first brightness value is a minimum brightness value which is not zero, the third brightness value is a maximum brightness value of brightness values for representing the dark part area, and the second brightness value is a brightness value between the first brightness value and the third brightness value.
Wherein, the third brightness value is a brightness value meeting a first predetermined condition, and for each brightness value, if the number of pixels in the video frame not greater than the brightness value accounts for a first percentage of the total number of pixels, the brightness value meets the first predetermined condition; and the second brightness value is a brightness value meeting a second predetermined condition, wherein for each brightness value, if the number of pixels in the video frame which are not greater than the brightness value is a second percentage of the total number of pixels, the brightness value meets the second predetermined condition.
Wherein the first percentage is a value greater than the second percentage. Also, the first percentage and the second percentage may be determined from empirical values. For example, the first percentage may be a value in (15%, 35% >) and the second percentage may be a value in [0,15% ], although not limited thereto, it is understood that for the first percentage of 35%, if the number of pixels in the video frame that are not greater than a certain luminance value accounts for 35% of the total number of pixels, the certain luminance value and the pixel region smaller than the certain luminance value may be considered as a dark portion region.
For example, in another specific implementation, determining, from luminance signals in the YUV signals, respective luminance values representing the luminance of the dark portion region of the video frame may include:
selecting a first brightness value and a target brightness value in a specified brightness value range from brightness values corresponding to brightness signals in the YUV signals to obtain each brightness value representing the brightness of a dark part area of a video frame; the first brightness value is a non-zero minimum brightness value, and the specified brightness value range is a preset brightness value range representing the brightness value belonging to the dark part area;
or, selecting a first brightness value, a target brightness value in a specified brightness value range and a brightness value between the first brightness value and the target brightness value from the brightness values corresponding to the brightness signals in the YUV signals to obtain each brightness value representing the brightness of the dark part area of the video frame.
For the case of obtaining the first luminance value, the second luminance value, and the third luminance value, for example, calculating a target change intensity value corresponding to the video frame based on the determined luminance difference relationship represented by each luminance value may include:
performing photoelectric conversion on the first brightness value, the second brightness value and the third brightness value to obtain a converted first brightness value, a converted second brightness value and a converted third brightness value;
if the converted third brightness value is equal to the converted second brightness value, determining a numerical value representing that the brightness change intensity is unchanged as a target change intensity value;
otherwise, the target variation intensity value is determined using a difference relationship with respect to the converted second luminance value and the converted first luminance value, and a difference relationship with respect to the converted third luminance value and the converted first luminance value.
The electronic device may perform photoelectric conversion on the first luminance value, the second luminance value, and the third luminance value by using a photoelectric conversion function. The photoelectric conversion function is a conversion relation from a linear basic color value to a nonlinear basic color value, belongs to functions in the prior art, and is not particularly limited in the embodiment of the invention. In addition, for convenience of calculation, after the converted first luminance value, second luminance value and third luminance value are obtained, the converted first luminance value, second luminance value and third luminance value may be corrected, and each corrected luminance value is used for subsequent analysis processing; for example, the modification method may be: for each brightness value in the converted first brightness value, second brightness value and third brightness value, if the brightness value is greater than a predetermined threshold, modifying the brightness value to the predetermined threshold; wherein the predetermined threshold may be set according to the brightness value usually belonging to the dark scene, for example: the predetermined threshold may be 30nit, although not limited thereto.
For the sake of convenience of calculation, it is reasonable that the target variation intensity value is a normalized value, and may be in inverse proportion to the luminance variation intensity with respect to the dark portion region or in proportion to the luminance variation intensity with respect to the dark portion region. For convenience of understanding, the following formula utilized to determine the target variation intensity value is exemplarily given, taking the target variation intensity value as a normalized value and being inversely proportional to the luminance variation intensity with respect to the dark portion region:
dark_log=log10(MIN_LUM_A/MIN_LUM)/log10(MIN_LUM_B/MIN_LUM);
where dark _ log is a target intensity variation value, MIN _ LUM is a converted first luminance value, MIN _ LUM _ a is a converted second luminance value, and MIN _ LUM _ B is a converted third luminance value.
Note that, regarding the case where three luminance values are obtained to determine the target variation intensity value, reference may be made to the above-described manner of determining the target variation intensity value. In the case of obtaining two luminance values to determine the target variation intensity value, a ratio of a smaller value to a larger value of the two luminance values may be directly obtained, but is not limited thereto. Also, the formulas used to determine the target change intensity values given above are only examples and should not be construed as limiting the invention.
In another embodiment of the present invention, as shown in fig. 2 (b), the video signal processing method provided in the embodiment of the present invention may include the following steps:
s201, acquiring YUV signals of video frames of a target video;
s202, determining a target change intensity value corresponding to the video frame based on the brightness signal of the YUV signal, wherein the target change intensity value is used for representing the brightness change intensity of a dark part area in the video frame;
s203, converting the YUV signals into RGB signals, and carrying out tone mapping on the RGB signals to obtain the RGB signals after tone mapping;
in this embodiment, steps S201 to S203 are the same as steps S101 to S103 in the above embodiment, and are not described herein again.
S204, performing brightness compensation on the RGB signals after tone mapping according to a preset compensation rule and based on the target change intensity value and the brightness performance parameter of the screen of the display equipment to obtain target RGB signals;
wherein the compensation rule comprises: the intensity of the brightness variation with respect to the dark area is positively correlated with the compensation degree of the brightness compensation, and the screen brightness performance is negatively correlated with the compensation degree of the brightness compensation. The so-called negative correlation between the screen brightness performance and the compensation degree of the brightness compensation specifically means that: the worse the screen performance is, the larger the compensation degree of the brightness compensation is, and the better the screen performance is, the smaller the compensation degree of the brightness compensation is.
In order to further improve the presentation effect of the video signal of the target video on the display device, the brightness compensation can be performed on the dark area in combination with the brightness performance of the screen of the display device while considering the brightness variation degree of the dark area.
Illustratively, the brightness performance parameters may include:
a contrast ratio; the contrast coefficient is a quantized value of the contrast of the maximum display brightness and the minimum display brightness of the screen; and/or the presence of a gas in the atmosphere,
a screen display coefficient; the screen display coefficient is a quantized value of the display capability represented by the maximum display brightness of the screen.
For example, the determining manner of the contrast ratio may include: determining a coefficient initial value based on the maximum display brightness and the minimum display brightness of a screen of the display device; if the coefficient initial value is not larger than the preset coefficient threshold value, the coefficient initial value is used as a contrast coefficient; if the initial value of the coefficient is larger than the preset coefficient threshold value, the preset coefficient threshold value is used as a contrast coefficient;
the formula used for determining the initial value of the coefficient may be:
L=log10(MaxDisplay/MinDisplay)
wherein, L is the initial value of the coefficient, maxDisplay is the maximum display brightness, and minidisplay is the minimum display brightness. For example, the predetermined coefficient threshold may be determined according to the maximum display brightness and the minimum display brightness of the screen of the device under the normal conditions in practical applications, for example: the predetermined coefficient threshold may be, but is not limited to, 3, 3.5, 4, etc.
For example, the determination manner of the screen display coefficient may include:
determining a target brightness interval in which the maximum display brightness is positioned from a plurality of brightness intervals represented by preset corresponding relations; the preset corresponding relation is the corresponding relation between the brightness interval and a coefficient representing the display capability of the screen;
and determining a coefficient corresponding to the target brightness interval from the preset corresponding relation to be used as a screen display coefficient. The on-screen display coefficient may be a normalized value, but is not limited thereto.
In addition, under the premise that the brightness change intensity of the dark region is positively correlated with the compensation degree of the brightness compensation and the screen brightness performance is negatively correlated with the compensation degree of the brightness compensation, there are various implementation manners for performing the brightness compensation on the RGB signal after the tone mapping based on the target change intensity value and the brightness performance parameter of the screen of the display device according to a predetermined compensation rule.
Optionally, in an implementation manner, performing luminance compensation on the RGB signals after the tone mapping according to a predetermined compensation rule based on the target variation intensity value and a luminance performance parameter of a screen of the display device to obtain the target RGB signals, may include:
substituting the target change intensity value and the brightness performance parameter of the screen of the display equipment into a determination formula of a correction coefficient for representing the brightness correction degree to obtain a correction coefficient corresponding to the RGB signal after tone mapping; and correcting the RGB signals after tone mapping based on the obtained correction coefficient to obtain target RGB signals.
On the premise of ensuring that the brightness change intensity of the dark area is positively correlated with the compensation degree of brightness compensation and the screen brightness performance is negatively correlated with the compensation degree of brightness compensation, the determination formula of the correction coefficient can be various, and correspondingly, the formula for correcting the RGB signals after tone mapping can also be various on the basis of the correction coefficient.
Generally, the maximum display brightness is the main assessment quantity for the screen, so in the determination formula of the correction coefficient, the CoeffDisplay can mainly act to weaken the influence of the contrast. Based on this processing idea, for example, if the screen display coefficient is a normalized value, the target variation intensity value is a normalized value and is inversely proportional to the luminance variation intensity with respect to the dark portion area; then, the determination formula of the correction coefficient for characterizing the degree of luminance correction may be as follows:
Figure BDA0003000021510000171
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, coeffDisplay is a screen display coefficient, contrast is a contrast coefficient, dark _ log is a target change intensity value, and N is 1 And N 2 Are all predetermined constants, N 2 For maximum values, N, that can be assigned to the draw 1 For making use of
Figure BDA0003000021510000185
Figure BDA0003000021510000183
A value not greater than 1;
accordingly, a correction formula for correcting the RGB signals after tone mapping may be as follows:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone mapped RGB signal.
Illustratively, if the on-screen display coefficient is a normalized value, the target variation intensity value is a normalized value and is proportional to the intensity of the luminance variation with respect to the dark area; then, the determination formula of the correction coefficient for characterizing the degree of luminance correction may be as follows:
Figure BDA0003000021510000181
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, coeffDisplay is a screen display coefficient, contrast is a contrast coefficient, dark _ log is a target change intensity value, and N is 1 And N 2 Are all predetermined constants, N 2 For maximum values, N, that can be assigned to the draw 1 To be used for making
Figure BDA0003000021510000184
Figure BDA0003000021510000186
A value not greater than 1;
accordingly, a correction formula for correcting the RGB signals after tone mapping may be as follows:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal. In this implementation, the range of Omiga is (0-1), and the smaller the Omiga, the greater the degree of compensation; the greater Omiga (trend towards 1), the smaller the degree of compensation.
Illustratively, if the on-screen display coefficient is a normalized value, the target variation intensity value is a normalized value and is proportional to the intensity of the luminance variation with respect to the dark area; then, the determination formula of the correction coefficient for characterizing the degree of luminance correction may be as follows:
Figure BDA0003000021510000182
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, coeffDisplay is a screen display coefficient, contrast is a contrast coefficient, dark _ log is a target change intensity value, and N is 1 And N 2 Are all predetermined constants, N 2 For the maximum value, N, that the contract can be assigned to 1 To be used for making
Figure BDA0003000021510000191
Figure BDA0003000021510000192
A value not greater than 1;
correspondingly, the correction formula for correcting the RGB signals after tone mapping includes:
f_TM_adjust=f_TM*Omiga+f_TM
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal.
S205, determining RGB signals of a video frame to be displayed in the display device using the target RGB signals.
In this embodiment, S205 is the same as S105 in the above embodiment, and is not described herein.
For clearer understanding of the scheme, 2 (c) shows a schematic diagram of the video signal processing method provided by the present embodiment. As shown in fig. 2 (c), the video signal processing method provided by the present embodiment includes the following processing procedures: (1) Acquiring YUV signals, dynamic metadata, maximum display brightness MaxDisplay and minimum display brightness MinDisplay of a video frame; (2) Calculating a target change intensity value dark _ log corresponding to the video frame; (3) converting the YUV signal into an RGB signal; (4) generating basic curve parameters; (5) generating cubic spline interval parameters; (6) tone mapping the RGB signals; (7) performing brightness compensation on the RGB signals after tone mapping; (8) color correction; (9) outputting: the display device performs signal display.
In the solution provided in the embodiment of the present invention, after performing tone mapping on an RGB signal of a video frame, luminance compensation is performed on the video signal based on the luminance change intensity of a dark area in the video frame and a luminance performance parameter of a screen of a display device, that is, luminance compensation is performed on the video signal by combining an area characteristic of the dark area and a luminance performance of the screen of the display device. Therefore, when the video signal is displayed in the display device, the display performance required by the dark part area can be more suitable for the brightness display capability of the display device, the detail content of the dark part area can be better presented, and the presentation effect of the video signal of the HDR video on the display device is finally improved.
The following describes a video signal processing method according to an embodiment of the present invention with reference to a specific embodiment.
As shown in fig. 3, a video signal processing method may include the steps of:
s301, acquiring YUV signals of a video frame of a target video;
s302, determining a target change intensity value dark _ log corresponding to a video frame based on a brightness signal in the YUV signal;
wherein, S302 may specifically include:
determining a first brightness value, a third brightness value and a second brightness value from the brightness values corresponding to the brightness signals of the YUV signals; wherein the first brightness value is a non-zero minimum brightness value, the third brightness value is a maximum brightness value of brightness values for representing the dark portion region, and the second brightness value is a brightness value between the first brightness value and the third brightness value; the third brightness value is a brightness value which enables the number of pixel points which are not larger than the third brightness value in the video frame to account for 35% of the total pixel points; the second brightness value is a brightness value such that the number of pixels not greater than the second brightness value in the video frame accounts for 20% of the total pixels.
Performing photoelectric conversion on the first brightness value, the second brightness value and the third brightness value to obtain a converted first brightness value, a converted second brightness value and a converted third brightness value;
if the transformed third luminance value is equal to the transformed second luminance value, dark _ log =1;
otherwise, the dark _ log is determined using a difference relationship with respect to the converted second luminance value and the converted first luminance value, and a difference relationship with respect to the converted third luminance value and the converted first luminance value.
The formula utilized to determine the target change intensity value is as follows:
dark_log=log10(MIN_LUM_A/MIN_LUM)/log10(MIN_LUM_B/MIN_LUM)
where MIN _ LUM is the converted first luminance value, MIN _ LUM _ a is the converted second luminance value, and MIN _ LUM _ B is the converted third luminance value.
S303, converting the YUV signals into RGB signals, and carrying out tone mapping on the RGB signals to obtain the RGB signals after tone mapping;
s304, substituting the target change intensity value dark _ log, the contrast coefficient contrast and the screen display coefficient CoeffDisplay into a determination formula of a correction coefficient for representing the brightness correction degree to obtain a correction coefficient Omiga corresponding to the RGB signal after tone mapping;
the determination manner of the contrast coefficient may include:
determining a coefficient initial value based on the maximum display brightness and the minimum display brightness of a screen of the display device; if the coefficient initial value is not greater than a predetermined coefficient threshold, the coefficient = the coefficient initial value, wherein the predetermined coefficient threshold is 4; if the initial value of the coefficient is greater than the predetermined coefficient threshold, contract =4;
the formula used for determining the initial value of the coefficient may be:
L=log10(MaxDisplay/MinDisplay)
wherein, L is the initial value of the coefficient, maxDisplay is the maximum display brightness, and minidisplay is the minimum display brightness.
The determination method of the screen display coefficient may include:
calculating the screen display coefficient of the display device by using the following formula:
Figure BDA0003000021510000211
the formula for determining the correction coefficient for representing the brightness correction degree may be as follows:
Omiga=[0.8+Coeffdisplay 4/contrast ] dark_log
s305, correcting the RGB signals after tone mapping based on the obtained correction coefficient Omiga to obtain target RGB signals;
the correction formula for correcting the tone-mapped RGB signal includes:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal.
S306, adjusting the color saturation of the target RGB signal, and performing normalized inverse operation on the target RGB signal after the color saturation adjustment to obtain the RGB signal of the video frame to be displayed in the display equipment.
By the scheme provided by the embodiment, when the video signal is displayed in the display device, the display performance required by the dark part area can be more fit with the brightness display capability of the display device, the detail content of the dark part area can be better presented, and the presentation effect of the video signal of the HDR video on the display device is finally improved.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a video signal processing apparatus, as shown in fig. 4, the apparatus may include:
a signal obtaining module 410, configured to obtain YUV signals of a video frame of a target video;
an intensity value determining module 420, configured to determine, based on luminance signals of the YUV signals, a target change intensity value corresponding to the video frame, where the target change intensity value is used to represent a luminance change intensity in the video frame with respect to a dark portion region;
a signal mapping module 430, configured to convert the YUV signal into an RGB signal, and perform tone mapping on the RGB signal to obtain a tone-mapped RGB signal;
a compensation module 440, configured to perform luminance compensation on the RGB signals after tone mapping according to a predetermined compensation rule and based on the target change intensity value, to obtain target RGB signals; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
a signal determining module 450, configured to determine, by using the target RGB signals, RGB signals of the video frame to be displayed in the display device.
In the solution provided in the embodiment of the present invention, after performing tone mapping on the RGB signals of the video frame, luminance compensation is performed on the RGB signals after tone mapping based on the luminance change intensity of the dark area in the video frame, that is, luminance compensation is performed on the video signals in combination with the area characteristics of the dark area. Therefore, when the video signal is displayed in the display device, the display performance required by the dark part area can be more suitable for the brightness display capability of the display device, the detail content of the dark part area can be better presented, and the presentation effect of the video signal of the HDR video on the display device is finally improved.
Optionally, the compensation module 440 may include:
a compensation unit, configured to perform brightness compensation on the RGB signal after tone mapping according to a predetermined compensation rule based on the target variation intensity value and a brightness performance parameter of a screen of the display device, to obtain a target RGB signal;
the predetermined reimbursement rules further include: the screen brightness performance is inversely related to the compensation degree of the brightness compensation.
Optionally, the compensation unit is specifically configured to:
substituting the target change intensity value and the brightness performance parameter of the screen of the display device into a determination formula of a correction coefficient for representing brightness correction degree to obtain a correction coefficient corresponding to the RGB signal after tone mapping;
and correcting the RGB signals after tone mapping based on the obtained correction coefficient to obtain target RGB signals.
Optionally, the brightness performance parameters include:
a contrast ratio; the contrast coefficient is a quantized value of the contrast of the maximum display brightness and the minimum display brightness of the screen; and/or the presence of a gas in the gas,
a screen display coefficient; and the screen display coefficient is a quantized value of the display capability represented by the maximum display brightness of the screen.
Optionally, the on-screen display coefficient is a normalized value, and the target variation intensity value is a normalized value and is inversely proportional to the intensity of the luminance variation with respect to the dark area;
the formula for determining the correction coefficient for representing the brightness correction degree is as follows:
Figure BDA0003000021510000231
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, coeffDisplay is the screen display coefficient, contrast is the contrast coefficient, dark _ log is the target change intensity value, N is 1 And N 2 Are all predetermined constants, N 2 For the maximum value, N, that the contract can be assigned to 1 To be used for making
Figure BDA0003000021510000232
A value not greater than 1;
the correction formula for correcting the RGB signal after tone mapping is as follows:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone mapped RGB signal.
Optionally, the intensity value determining module 420 comprises:
a luminance value determination unit configured to determine, from luminance values corresponding to luminance signals of the YUV signals, respective luminance values representing luminance of a dark portion region of the video frame;
and the calculating unit is used for calculating a target change intensity value corresponding to the video frame based on the brightness difference relation represented by each determined brightness value.
Optionally, the brightness value determining unit is specifically configured to:
determining a first brightness value, a third brightness value and a second brightness value from the brightness values corresponding to the brightness signals of the YUV signals; wherein the first luminance value is a minimum luminance value other than zero, the third luminance value is a maximum luminance value of luminance values representing a dark portion region, and the second luminance value is a luminance value between the first luminance value and the third luminance value;
the computing unit is specifically configured to:
performing photoelectric conversion on the first brightness value, the second brightness value and the third brightness value to obtain a converted first brightness value, a converted second brightness value and a converted third brightness value;
if the converted third brightness value is equal to the converted second brightness value, determining a numerical value representing that the brightness change intensity is unchanged as a target change intensity value;
otherwise, the target variation intensity value is determined using a difference relationship with respect to the converted second luminance value and the converted first luminance value, and a difference relationship with respect to the converted third luminance value and the converted first luminance value.
Optionally, the target variation intensity value is a normalized value and is inversely proportional to the luminance variation intensity with respect to the dark portion region;
the formula utilized to determine the target change intensity value includes:
dark_log=log10(MIN_LUM_A/MIN_LUM)/log10(MIN_LUM_B/MIN_LUM);
where dark _ log is a target intensity variation value, MIN _ LUM is a converted first luminance value, MIN _ LUM _ a is a converted second luminance value, and MIN _ LUM _ B is a converted third luminance value.
Optionally, the determining manner of the contrast ratio includes:
determining a coefficient initial value based on the maximum display brightness and the minimum display brightness of a screen of the display device;
if the initial value of the coefficient is not larger than a preset coefficient threshold value, the initial value of the coefficient is used as a contrast coefficient;
if the initial coefficient value is larger than a preset coefficient threshold value, taking the preset coefficient threshold value as a contrast coefficient;
the formula for determining the initial value of the coefficient is as follows:
L=log10(MaxDisplay/MinDisplay)
wherein, L is a coefficient initial value, maxDisplay is the maximum display brightness, and minidisplay is the minimum display brightness.
Optionally, the determining manner of the on screen display coefficient includes:
determining a target brightness interval in which the maximum display brightness is positioned from a plurality of brightness intervals represented by preset corresponding relations; the preset corresponding relation is the corresponding relation between the brightness interval and a coefficient representing the display capability of the screen;
and determining a coefficient corresponding to the target brightness interval from the preset corresponding relation to be used as a screen display coefficient.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the steps of the video signal processing method provided by the embodiment of the present invention when executing the program stored in the memory 503.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the video signal processing method described in any of the above embodiments.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video signal processing method described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (12)

1. A method of video signal processing, the method comprising:
acquiring YUV signals of video frames of a target video;
determining a target change intensity value corresponding to the video frame based on the brightness signal of the YUV signal, wherein the target change intensity value is used for representing the brightness change intensity of a dark part area in the video frame; wherein the determining a target change intensity value corresponding to the video frame based on the luminance signals of the YUV signals comprises: determining each brightness value representing the brightness of the dark part area of the video frame from the brightness values corresponding to the brightness signals of the YUV signals; calculating a target change intensity value corresponding to the video frame based on the brightness difference relation represented by each determined brightness value;
converting the YUV signal into an RGB signal, and carrying out tone mapping on the RGB signal to obtain an RGB signal subjected to tone mapping;
according to a preset compensation rule, based on the target change intensity value, performing brightness compensation on the RGB signals after tone mapping to obtain target RGB signals; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
determining RGB signals of the video frame to be displayed in a display device using the target RGB signals.
2. The method of claim 1, wherein performing luminance compensation on the tone-mapped RGB signal based on the target varying intensity value according to a predetermined compensation rule to obtain a target RGB signal comprises:
according to a preset compensation rule, based on the target change intensity value and the brightness performance parameter of the screen of the display equipment, performing brightness compensation on the RGB signals after tone mapping to obtain target RGB signals;
the predetermined reimbursement rules further include: the screen brightness performance is inversely related to the compensation degree of the brightness compensation.
3. The method of claim 2, wherein said luminance compensating said tone-mapped RGB signal based on said target varying intensity value and a luminance performance parameter of a screen of said display device according to a predetermined compensation rule to obtain a target RGB signal comprises:
substituting the target change intensity value and the brightness performance parameter of the screen of the display device into a determination formula of a correction coefficient for representing brightness correction degree to obtain a correction coefficient corresponding to the RGB signal after tone mapping;
and correcting the RGB signals after tone mapping based on the obtained correction coefficient to obtain target RGB signals.
4. The method of claim 3, wherein the brightness performance parameter comprises:
a contrast ratio; the contrast coefficient is a quantized value of the contrast of the maximum display brightness and the minimum display brightness of the screen; and/or the presence of a gas in the gas,
a screen display coefficient; and the screen display coefficient is a quantized value of the display capability represented by the maximum display brightness of the screen.
5. The method of claim 4, wherein the on-screen factor is a normalized value, the target varying intensity value is a normalized value and is inversely proportional to the intensity of the change in brightness with respect to the dark area;
the formula for determining the correction coefficient for representing the brightness correction degree is as follows:
Figure FDA0003836737380000021
wherein Omiga is a correction coefficient corresponding to the RGB signal after tone mapping, coeffDisplay is the screen display coefficient, contrast is the contrast coefficient, dark _ log is the target change intensity value, N is 1 And N 2 Are all predetermined constants, N 2 For maximum values, N, that can be assigned to the draw 1 To be used for making
Figure FDA0003836737380000022
A value not greater than 1;
the correction formula for correcting the RGB signal after tone mapping is as follows:
f_TM_adjust=f_TM Omiga
wherein f _ TM _ adjust is the corrected RGB signal, and f _ TM is the normalized tone-mapped RGB signal.
6. The method according to claim 1, wherein said determining, from luminance values corresponding to luminance signals of said YUV signals, respective luminance values characterizing luminance of a dark portion region of said video frame comprises:
determining a first brightness value, a third brightness value and a second brightness value from the brightness values corresponding to the brightness signals of the YUV signals; wherein the first luminance value is a minimum luminance value other than zero, the third luminance value is a maximum luminance value of luminance values representing a dark portion region, and the second luminance value is a luminance value between the first luminance value and the third luminance value;
the calculating a target change intensity value corresponding to the video frame based on the determined brightness difference relationship represented by each brightness value comprises:
performing photoelectric conversion on the first brightness value, the second brightness value and the third brightness value to obtain a converted first brightness value, a converted second brightness value and a converted third brightness value;
if the converted third brightness value is equal to the converted second brightness value, determining a value representing that the brightness change intensity is unchanged as a target change intensity value;
otherwise, the target variation intensity value is determined using a difference relationship with respect to the converted second luminance value and the converted first luminance value, and a difference relationship with respect to the converted third luminance value and the converted first luminance value.
7. The method of claim 6, wherein the target varying intensity value is a normalized value and inversely proportional to the intensity of the luminance variation with respect to the dark area;
the formula used for determining the target change intensity value is as follows:
dark_log=log10(MIN_LUM_A/MIN_LUM)/log10(MIN_LUM_B/MIN_LUM);
where dark _ log is a target intensity variation value, MIN _ LUM is a converted first luminance value, MIN _ LUM _ a is a converted second luminance value, and MIN _ LUM _ B is a converted third luminance value.
8. The method of claim 4, wherein the contrast factor is determined by:
determining a coefficient initial value based on the maximum display brightness and the minimum display brightness of a screen of the display device;
if the initial coefficient value is not larger than a preset coefficient threshold value, the initial coefficient value is used as a contrast coefficient;
if the initial coefficient value is larger than a preset coefficient threshold value, taking the preset coefficient threshold value as a contrast coefficient;
the formula for determining the initial value of the coefficient is as follows:
L=log10(MaxDisplay/MinDisplay)
wherein, L is a coefficient initial value, maxDisplay is the maximum display brightness, and minidisplay is the minimum display brightness.
9. The method of claim 4, wherein the on-screen display coefficients are determined in a manner comprising:
determining a target brightness interval in which the maximum display brightness is positioned from a plurality of brightness intervals represented by preset corresponding relations; the preset corresponding relation is the corresponding relation between the brightness interval and a coefficient representing the display capability of the screen;
and determining a coefficient corresponding to the target brightness interval from the preset corresponding relation as a screen display coefficient.
10. A video signal processing apparatus, characterized in that the apparatus comprises:
the signal acquisition module is used for acquiring YUV signals of video frames of a target video;
the intensity value determining module is used for determining a target change intensity value corresponding to the video frame based on the luminance signals of the YUV signals, wherein the target change intensity value is used for representing the luminance change intensity of a dark part area in the video frame; the intensity value determining module is specifically configured to determine, from luminance values corresponding to luminance signals of the YUV signals, each luminance value representing luminance of a dark portion region of the video frame; calculating a target change intensity value corresponding to the video frame based on the brightness difference relation represented by each determined brightness value;
the signal mapping module is used for converting the YUV signals into RGB signals and carrying out tone mapping on the RGB signals to obtain RGB signals after tone mapping;
the compensation module is used for performing brightness compensation on the RGB signals after tone mapping according to a preset compensation rule and based on the target change intensity value to obtain target RGB signals; wherein the compensation rule comprises: the brightness variation intensity of the dark area is positively correlated with the compensation degree of the brightness compensation;
and the signal determining module is used for determining the RGB signals of the video frame to be displayed in the display equipment by utilizing the target RGB signals.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-9 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-9.
CN202110343564.5A 2021-03-30 2021-03-30 Video signal processing method and device and electronic equipment Active CN113099201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110343564.5A CN113099201B (en) 2021-03-30 2021-03-30 Video signal processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110343564.5A CN113099201B (en) 2021-03-30 2021-03-30 Video signal processing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113099201A CN113099201A (en) 2021-07-09
CN113099201B true CN113099201B (en) 2022-12-02

Family

ID=76671592

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110343564.5A Active CN113099201B (en) 2021-03-30 2021-03-30 Video signal processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113099201B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113709418A (en) * 2021-08-26 2021-11-26 洛阳瑞光影视光电技术有限公司 Monitor with photometry function

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035195A (en) * 2006-03-08 2007-09-12 深圳Tcl新技术有限公司 Adjusting method for the image quality
CN102118538A (en) * 2008-05-30 2011-07-06 精工爱普生株式会社 Image processing apparatus, image processing method, image processing program, and image printing apparatus

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5076716B2 (en) * 2007-08-06 2012-11-21 株式会社ニコン Imaging device
KR102490304B1 (en) * 2016-08-12 2023-01-20 삼성전자주식회사 Display apparatus and recording media
US10755392B2 (en) * 2017-07-13 2020-08-25 Mediatek Inc. High-dynamic-range video tone mapping

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101035195A (en) * 2006-03-08 2007-09-12 深圳Tcl新技术有限公司 Adjusting method for the image quality
CN102118538A (en) * 2008-05-30 2011-07-06 精工爱普生株式会社 Image processing apparatus, image processing method, image processing program, and image printing apparatus

Also Published As

Publication number Publication date
CN113099201A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US10755392B2 (en) High-dynamic-range video tone mapping
US8089560B2 (en) Image processing apparatus, image processing method and program
CN107211130B (en) Method and apparatus for encoding and decoding color picture
KR102358368B1 (en) Method and device for encoding high dynamic range pictures, corresponding decoding method and decoding device
CN107211142B (en) Method and apparatus for decoding color image
JP6948309B2 (en) How and devices to tone map a picture using the parametric tone adjustment function
US10783837B2 (en) Driving method and driving device of display device, and related device
US20180005358A1 (en) A method and apparatus for inverse-tone mapping a picture
WO2021073304A1 (en) Image processing method and apparatus
CN114866809B (en) Video conversion method, apparatus, device, storage medium, and program product
JP2018524924A (en) Method and device for encoding both HDR pictures and SDR pictures obtained from said HDR pictures using a color mapping function
CN113079362B (en) Video signal processing method and device and electronic equipment
WO2021218924A1 (en) Dynamic range mapping method and apparatus
GB2558234A (en) Image processing
CN112288661A (en) Image color correction method
CN113099201B (en) Video signal processing method and device and electronic equipment
US20100033495A1 (en) Image processing apparatus and image processing method
TWI650998B (en) Format conversion circuit and related method applied to set-top box
WO2021073316A1 (en) Image signal conversion method and apparatus, and terminal device
JP2023530728A (en) Inverse tonemapping with adaptive bright spot attenuation
US7729022B2 (en) Method for processing image
US20220327672A1 (en) Hdr tone mapping based on creative intent metadata and ambient light
US20170064156A1 (en) Method for generating a bitstream relative to image/video signal, bitstream carrying specific information data and method for obtaining such specific information
CN115660997A (en) Image data processing method and device and electronic equipment
CN113132562A (en) Lens shadow correction method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant