Local adaptive contrast enhancement techniques
In one embodiment, an apparatus includes hardware circuitry to determine a tile brightness value and a tile contrast value for each respective tile of a plurality of tiles that together comprise an input frame. The circuitry obtains a first enhancement factor (e.g., from a first lookup table) based on the tile brightness value and a second enhancement factor (e.g., from a second lookup table) based on the tile contrast value. The circuitry generates an output frame based on the first enhancement factor and the second enhancement factor.
1 . An apparatus comprising:
graphics processing circuitry to:
access an input frame of image data;
determine a tile brightness value and a tile contrast value for each respective tile of a plurality of tiles that together comprise the input frame;
obtain a first enhancement factor based on the tile brightness value;
obtain a second enhancement factor based on the tile contrast value;
determine, for each respective tile of the plurality of tiles, an adaptive strength (AS) value by multiplying the first enhancement factor, the second enhancement factor, and a fixed value, and a scaled blurred luma (SBL) value by multiplying the AS value with an average luma value for the tile; and
generate an output frame based on the AS values and the SBL values.
2 . The apparatus of claim 1 , wherein respective pixels of the output frame are generated based on multiplying an input luma value of the pixel by the AS value corresponding to the frame of the pixel and subtracting the SBL value corresponding to the frame of the pixel.
3 . The apparatus of claim 1 , wherein the circuitry is further to perform temporal smoothing of the AS and SBL values using an infinite impulse response (IIR) filter to generate the output frame.
4 . The apparatus of claim 1 , wherein the circuitry is to determine the tile contrast value based on a histogram of brightness for pixels of the tile.
5 . The apparatus of claim 1 , wherein the circuitry is to determine the tile brightness value by averaging luma values of pixels of the tile.
6 . The apparatus of claim 1 , wherein the circuitry is to perform bilinear interpolation of output luma values of neighboring pixels to generate pixel luma values of the output frame.
7 . The apparatus of claim 1 , wherein the circuitry is further to:
determine a luma boost factor for each pixel based on an input luma value for the pixel and an output luma value for the pixel that is based on the first enhancement factor and the second enhancement factor; and
generate the output frame by applying the luma boost factor to an input RGB value for each pixel.
8 . The apparatus of claim 1 , wherein the first enhancement factor is obtained from a first lookup table, and the second enhancement factor is obtained from a second lookup table.
9 . A system comprising:
a display; and
hardware circuitry coupled to the display to:
access an input frame of image data;
determine a tile brightness value and a tile contrast value for each respective tile of a plurality of tiles that together comprise the input frame;
obtain a first enhancement factor based on the tile brightness value;
obtain a second enhancement factor based on the tile contrast value;
determine, for each respective tile of the plurality of tiles, an adaptive strength (AS) value by multiplying the first enhancement factor, the second enhancement factor, and a fixed value, and a scaled blurred luma (SBL) value by multiplying the AS value with an average luma value for the tile;
generate an output frame based on the AS values and the SBL values; and
cause the output frame to be displayed on the display.
10 . The system of claim 9 , wherein respective pixels of the output frame are generated based on multiplying an input luma value of the pixel by the AS value corresponding to the frame of the pixel and subtracting the SBL value corresponding to the frame of the pixel.
11 . The system of claim 10 , wherein the circuitry is further to perform temporal smoothing of the AS and SBL values using an infinite impulse response (IIR) filter to generate the output frame.
12 . The system of claim 9 , wherein the circuitry is to perform bilinear interpolation of output luma values of neighboring pixels to generate pixel luma values of the output frame.
13 . The system of claim 9 , wherein the circuitry is further to:
determine a luma boost factor for each pixel based on an input luma value for the pixel and an output luma value for the pixel that is based on the first enhancement factor and the second enhancement factor; and
generate the output frame by applying the luma boost factor to an input RGB value for each pixel.
14 . The system of claim 9 , wherein the circuitry is within a graphics processing unit (GPU) of the system, and the circuitry is to access the input frame data from memory of the system.
15 . The system of claim 9 , wherein the circuitry is within a timing controller of the system.
16 . The system of claim 9 , wherein the first enhancement factor is obtained from a first lookup table and the second enhancement factor is obtained from a second lookup table.
17 . A method comprising:
receiving an input frame of image data;
determining a tile brightness value and a tile contrast value for each respective tile of a plurality of tiles that together comprise the input frame;
obtaining, from a first lookup table, a first enhancement factor based on the tile brightness value;
obtaining, from a second lookup table, a second enhancement factor based on the tile contrast value;
determine, for each respective tile of the plurality of tiles, an adaptive strength (AS) value by multiplying the first enhancement factor, the second enhancement factor, and a fixed value, and a scaled blurred luma (SBL) value by multiplying the AS value with an average luma value for the tile; and
generating an output frame based on the AS values and the SBL values.
18 . The method of claim 17 ,
wherein respective pixels of the output frame are generated based on multiplying an input luma value of the pixel by the AS value corresponding to the frame of the pixel, and subtracting the SBL value corresponding to the frame of the pixel.
19 . The method of claim 17 , further comprising performing temporal smoothing of the AS and SBL values using an infinite impulse response (IIR) filter to generate the output frame.
20 . The method of claim 17 , wherein the tile contrast value is determined based on a histogram of brightness for pixels of the tile, the tile brightness value is determined by averaging luma values of pixels of the tile, and the method further comprises determining a luma boost factor for each pixel based on an input luma value for the pixel and an output luma value for the pixel that is based on the first enhancement factor and the second enhancement factor, wherein generating the output frame comprises applying the luma boost factor to an input RGB value for each pixel.