From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: linux-media@vger.kernel.org,
heiko.stuebner@theobroma-systems.com, heiko@sntech.de
Cc: mchehab@kernel.org, dafna.hirschfeld@collabora.com,
dafna3@gmail.com, tfiga@chromium.org, hverkuil@xs4all.nl,
linux-rockchip@lists.infradead.org, helen.koike@collabora.com,
laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com,
kernel@collabora.com, ezequiel@collabora.com
Subject: [PATCH v7 1/5] media: rkisp1: uapi: change hist_bins array type from __u16 to __u32
Date: Wed, 20 Jan 2021 17:44:42 +0100 [thread overview]
Message-ID: <20210120164446.1220-2-dafna.hirschfeld@collabora.com> (raw)
In-Reply-To: <20210120164446.1220-1-dafna.hirschfeld@collabora.com>
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>
---
include/uapi/linux/rkisp1-config.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h
index 6e449e784260..f75f8d698fb4 100644
--- a/include/uapi/linux/rkisp1-config.h
+++ b/include/uapi/linux/rkisp1-config.h
@@ -844,13 +844,17 @@ 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];
};
/**
--
2.17.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2021-01-20 16:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 16:44 [PATCH v7 0/5] Fix the rkisp1 userspace API for later IP versions Dafna Hirschfeld
2021-01-20 16:44 ` Dafna Hirschfeld [this message]
2021-01-20 21:32 ` [PATCH v7 1/5] media: rkisp1: uapi: change hist_bins array type from __u16 to __u32 Sakari Ailus
2021-01-21 12:48 ` Dafna Hirschfeld
2021-01-21 13:01 ` Sakari Ailus
2021-01-20 16:44 ` [PATCH v7 2/5] media: rkisp1: stats: remove a wrong cast to u8 Dafna Hirschfeld
2021-01-21 9:31 ` Heiko Stuebner
2021-01-21 10:07 ` Tomasz Figa
2021-01-21 11:47 ` Dafna Hirschfeld
2021-01-20 16:44 ` [PATCH v7 3/5] media: rockchip: rkisp1: reduce number of histogram grid elements in uapi Dafna Hirschfeld
2021-01-20 16:44 ` [PATCH v7 4/5] media: rockchip: rkisp1: carry ip version information Dafna Hirschfeld
2021-01-20 16:44 ` [PATCH v7 5/5] media: rockchip: rkisp1: extend uapi array sizes Dafna Hirschfeld
2021-01-21 10:16 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210120164446.1220-2-dafna.hirschfeld@collabora.com \
--to=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=ezequiel@collabora.com \
--cc=heiko.stuebner@theobroma-systems.com \
--cc=heiko@sntech.de \
--cc=helen.koike@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox