SPRUIE9D May 2017 – May 2024 DRA74P , DRA75P , DRA76P , DRA77P
For the location of 2D edge-enhancer memory accesses, see Section 9.3.3.11, ISS ISP Memory Mapping.
The edge-enhancer module operates on the Luma (Y data) component of images to improve the image quality and can be enabled from the IPIPE_YEE_EN[0] EN bit. Edges in input images are detected by a 2D high-pass filter, and its sharpness is increased by the value from a nonlinear table. Figure 9-79 shows a block diagram of the Luma nonlinear edge-enhancer. Entry for the nonlinear table is 10-bit and the output is in signed 9-bit.
In edge-enhancer mode when IPIPE_YEE_TYP[0] SEL is set to 0, linear filter with programmable coefficient is applied to the Y input. Here, M is a 5 × 5 matrix with programmable coefficients (IPIPE_YEE_MUL_xx, where xx = 00, 01, 02, 10, 11, 12, 20, 21, 22). A down shift of high-pass filter is applied to the edge-enhancer from the IPIPE_YEE_SHF[3:0] SHF bit field (shfHFP in the formula in Figure 9-78).
Then, the HPF value is shrunk by a threshold value (u6) specified by the IPIPE_YEE_THR register (thresholdHPF in the formula), and clipped to signed 10 bits to get the index for the LUT.
Moreover, the edge-enhancement intensity is looked up from the LUT through the formula shown in Figure 9-80 and in Table 9-183.
Address (32-bit Word Address) | Bit Position | LUT Index |
---|---|---|
0x00000h | [8:0] | 1 |
[17:9] | 2 | |
0x00001h | [8:0] | 2 |
[17:9] | 3 | |
0x00002h | [8:0] | 4 |
[17:9] | 5 | |
0x00003h | [8:0] | 6 |
[17:9] | 7 | |
. . . | . . . | . . . |
0x000FFh | [8:0] | 510 |
[17:9] | 511 | |
0x00100h | [8:0] | –512 |
[17:0] | –511 | |
0x00101h | [8:0] | –510 |
[17:9] | –509 | |
. . . | . . . | . . . |
0x001FD | [8:0] | –6 |
[17:9] | –5 | |
0x001FE | [8:0] | –4 |
[17:9] | –3 | |
0x001FFh | [8:0] | –2 |
[17:9] | –1 |
Figure 9-81 shows the LUT packing, and Figure 9-82 shows the 2D edge-enhancer block diagram.
In edge sharpener mode, enabled when IPIPE_YEE_TYP[0] SEL = 1, edge clarity is enhanced without producing a halo artifact. In this module, edge intensity is derived by the 2D linear filter with fixed coefficients shown in Figure 9-83.
The gain (g) and threshold values for the shrink/clip function (thresholdLOW, thresholdHIGH) are determined by the IPIPE_YEE_E_GAN, IPIPE_YEE_E_THR_1, and IPIPE_YEE_E_THR_2 registers. The bit width of g and thresholdHIGH is in U6, and thresholdLOW is in U12Q6.
This edge intensity is then clipped by a threshold value in the formula shown in Figure 9-84.
The threshold value (grad) is a function of the activity around the target pixel, which is derived from gradient values. Gain and offset are specified by IPIPE_YEE_G_GAN and IPIPE_YEE_G_OFT
Capping with gradient value prevents overly enhancing edges, and suppresses halo artifacts around edges.
The output from edge-enhancer and edge sharpener are merged with the function shown in Figure 9-85.
The Emerge value is added to the Y input value to make the final output.
For Chroma suppression, another 2D high-pass filter (HPF) is implemented. One of the four coefficient sets shown in Figure 9-86 is selectable.
At the end of the edge-enhancer process, brightness and contrast adjustment are applied to the Y signal. The formula shown in Figure 9-87 describes the process.
In the formula from Figure 9-87, YEE is the output (Y) of the Edge-Enhancer, as shown in Figure 9-82. CTR is a U8Q4 contrast enhancement factor (configured through the IPIPE_YUV_ADJ[7:0] CTR bit field), BRT is a U8 brightness enhancement factor (configured through the IPIPE_YUV_ADJ[15:8] BRT bit field), and YCTR_BRT is the output with brightness and contrast adjustment applied.