5.8.6.13 Gamma Curve (GAM) Module

The GAM module samples the cc_data[35:0] bus when cc_valid is asserted, and generates gam_data[29:0] 30-bit width data along with the validity signal gam_valid. Imaging devices have non-linear characteristics, but the transfer function is approximated by a power function. The intensity of each of the linear RGB components is transformed to a non-linear signal through the use of the gamma correction submodule. The power function is linearly interpolated using 64 breakpoints. This also performs a 12-bit to 10-bit compression. The polynomial for the linear interpolation between breakpoints is i and i +1. Consequently, for each breakpoint, two values are required: constant and slope. The table values are programmable through the user interface when the gamma correction module is disabled (ISC_GAM_CTRL.ENABLE is cleared). ISC_GAM_RENTRY is used for Red gamma correction. ISC_GAM_GENTRY is used for Green gamma correction. ISC_GAM_BENTRY is used for Blue gamma correction. Each table entry is composed of a 10-bit (signed) slope and a 10-bit constant.

Figure 5-92. GAM Block Diagram
ISC_GAM_CTRL.ENABLEISC_GAM_CTRL.XLUTGAM_DATA SliceValue
00gam_data[29:0]cc_data[29:0]
10gam_data[29:20]cc_data[35:26]
gam_data[19:10]cc_data[23:14]
gam_data[9:0]cc_data[11:2]
11gam_data[29:20]R=piecewise_itpol(cc_data_r[35:24])
gam_data[19:10]G=piecewise_itpol(cc_data_r[23:12])
gam_data[9:0]B=piecewise_itpol(cc_data_r[11:0])
Figure 5-93. Piecewise Linear Interpolation Block Diagram

The interpolation consists of three tables that store the function values GAM_XENTRY[0:63] where X stands for R, G and B. The input of the table has six bits. It outputs a slope and a constant. The slope is later multiplied by the data lsb (6-bit) and added to a constant. The final value is the gamma-corrected value of the input. This module performs a 12-to-10 compression.