Skip to content

Commit

Permalink
media: rkisp1: uapi: change hist_bins array type from __u16 to __u32
Browse files Browse the repository at this point in the history
Each entry in the array is a 20 bits value composed of 16 bits unsigned
integer and 4 bits fractional part. So the type should change to __u32.
In addition add a documentation of how the measurements are done.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Dafna Hirschfeld authored and Mauro Carvalho Chehab committed Jan 28, 2021
1 parent e081863 commit 31f190e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions include/uapi/linux/rkisp1-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -844,13 +844,18 @@ struct rkisp1_cif_isp_af_stat {
/**
* struct rkisp1_cif_isp_hist_stat - statistics histogram data
*
* @hist_bins: measured bin counters
* @hist_bins: measured bin counters. Each bin is a 20 bits unsigned fixed point
* type. Bits 0-4 are the fractional part and bits 5-19 are the
* integer part.
*
* Measurement window divided into 25 sub-windows, set
* with ISP_HIST_XXX
* The window of the measurements area is divided to 5x5 sub-windows. The
* histogram is then computed for each sub-window independently and the final
* result is a weighted average of the histogram measurements on all
* sub-windows. The window of the measurements area and the weight of each
* sub-window are configurable using struct @rkisp1_cif_isp_hst_config.
*/
struct rkisp1_cif_isp_hist_stat {
__u16 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];
__u32 hist_bins[RKISP1_CIF_ISP_HIST_BIN_N_MAX];
};

/**
Expand Down

0 comments on commit 31f190e

Please sign in to comment.