In the Project Explorer view, select the DPU
project.
Then, the features supported for tuning are listed in the
Features view.
In the Features view, click
Brightness.
Then, the settings of the Brightness feature are
displayed in the details view.
Figure 1. Details View When the Brightness is Selected
In the upper-left corner of the details view of the
Brightness feature, select the Enable
Brightness check box to enable the brightness compensation
module.
To the right of Resource File, click and select an
8-bit alpha mask file.
The RDMA reads only the alpha mask in the specified ROIs to save bandwidth.
In the Resource Width text box, enter the width of the
chosen mask.
In the Resource Height text box, enter the height of the
chosen mask.
From the Mask Format drop-down list, select the color
format of the alpha mask.
From the Mask Tile drop-down list, select the tile mode
of the alpha mask.
If the mask file is not compressed, set it
VS_DPU_LINEAR.
If the mask file is compressed, set it to the used tiled format.
Next to Enable Decompressed, select
Enable or Disable to specify
whether the mask file needs to be decompressed.
Next to Enable ROI0, select
Enable or Disable to specify
whether to enable ROI 0.
If Enable is selected for Enable
ROI0, click View/Edit this Table next to
ROI0 Rect and specify ROI 0 for brightness
compensation in the prompted dialog.
The columns in the ROI0 Rect table are described as
follows:
ROI Width: the width of ROI 0
ROI Height: the height of ROI 0
ROI X: the X coordinate of the upper-left corner
of the ROI 0
ROI Y: the Y coordinate of the upper-left corner
of the ROI 0
You can use one of the following methods to specify ROI 0 in the
ROI0 Rect table:
Double-click and edit a cell in the table to update a single value.
Click Edit and update the values in the prompted
Edit Table dialog.
The values must be
specified in the same order as the table columns and separated by a
comma (,).
Click Export to export the values to a
.csv file, edit the file, and then import the
updated values from the .csv file.
The order of the
values in the exported .csv file is the same as
that in the table.
Next to Enable ROI1, select
Enable or Disable to specify
whether to enable ROI 1.
If Enable is selected for Enable
ROI1, specify ROI 1 for brightness compensation by referring to
Step 11 and Step
12.
In the Target Gain text box, enter the target brightness
gain to adjust the alpha value.
The target gain must not exceed 1024.
From the Luma Mode drop-down list, select one of the
following options to specify the luma calculation mode:
VS_DPU_DATAT_CALCU_MAX: the luma is derived from
the maximum value among the red, green, and blue components.
VS_DPU_DATAT_CALCU_WEIGHT: the luma is derived
from a weighted sum of the red, green, and blue components.
If VS_DPU_DATAT_CALCU_WEIGHT is selected for
Luma Mode, click View/Edit this
Table next to Luma Coef and specify the
R, G, and B weights in the prompted dialog.
The columns in the Luma Coef table indicate the R, G,
and B weights in order.
The methods of updating the RGB weights are similar to those of updating the
ROI table described in Step 11.
In the Prot Threshold text box, enter the protection
threshold.
Brightness compensation is performed on a pixel only if its luma value is
greater than the protection threshold.
Results
The tuning results are printed in the Console view in real
time.
The image displayed on the VTunerServer side is updated.