From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: linuxarm@huawei.com, mauro.chehab@huawei.com,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH 12/13] media: atomisp: fix a bug when applying the binning factor
Date: Wed, 17 Nov 2021 09:54:02 +0000 [thread overview]
Message-ID: <20211117095402.2b6cd0df@sal.lan> (raw)
In-Reply-To: <8d41e31e14941b8a0352bd1e2a8c6c5e11c273ca.1637140900.git.mchehab+huawei@kernel.org>
Em Wed, 17 Nov 2021 09:25:37 +0000
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> escreveu:
> The binning factor is actually a shift value, where 0 means
> to not touch the value. This is propagated from the sensors'
> properties:
>
> .bin_factor_x
> .bin_factor_y
>
> At their resolution setting tables.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
It turns that this actually not a bug. It is just that I reverted
the logic on patch 08/13.
So, I'll merge this one there and re-send this series.
> ---
>
> To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
> See [PATCH 00/13] at: https://lore.kernel.org/all/cover.1637140900.git.mchehab+huawei@kernel.org/
>
> .../staging/media/atomisp/pci/sh_css_param_shading.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c
> index 90b5f9014c5e..005b0ab41588 100644
> --- a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c
> +++ b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c
> @@ -283,16 +283,16 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
> * by cropping the non-binned part of the shading table and then
> * increasing the size of a grid cell with this same binning factor.
> */
> - input_width *= sensor_binning;
> - input_height *= sensor_binning;
> + input_width <<= sensor_binning;
> + input_height <<= sensor_binning;
> /*
> * We also scale the padding by the same binning factor. This will
> * make it much easier later on to calculate the padding of the
> * shading table.
> */
> - left_padding *= sensor_binning;
> - right_padding *= sensor_binning;
> - top_padding *= sensor_binning;
> + left_padding <<= sensor_binning;
> + right_padding <<= sensor_binning;
> + top_padding <<= sensor_binning;
>
> /*
> * during simulation, the used resolution can exceed the sensor
next prev parent reply other threads:[~2021-11-17 9:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-17 9:25 [PATCH 00/13] media: atomisp: reduce the gap for ISP2401 Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 01/13] media: atomisp: drop empty files Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 02/13] media: atomisp: simplif sh_css_defs.h Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 03/13] media: atomisp: sh_css_metrics: drop some unused code Mauro Carvalho Chehab
2021-11-17 9:39 ` Dan Carpenter
2021-11-17 9:25 ` [PATCH 04/13] media: atomisp: sh_css_mipi: cleanup the code Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 05/13] media: atomisp: sh_css_params: remove tests for ISP2401 Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 06/13] media: atomisp: sh_css_params: cleanup the code Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 07/13] media: atomisp: remove #ifdef HAS_NO_HMEM Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 08/13] media: atomisp: get rid of USE_WINDOWS_BINNING_FACTOR tests Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 09/13] media: atomisp: get rid of #ifdef HAS_BL Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 10/13] media: atomisp: get rid of sctbl_legacy_* Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 11/13] media: atomisp: sh_css_param_shading: fix comments coding style Mauro Carvalho Chehab
2021-11-17 9:25 ` [PATCH 12/13] media: atomisp: fix a bug when applying the binning factor Mauro Carvalho Chehab
2021-11-17 9:54 ` Mauro Carvalho Chehab [this message]
2021-11-17 9:25 ` [PATCH 13/13] media: atomisp: sh_css_sp: better support the current firmware Mauro Carvalho Chehab
2021-11-17 10:02 ` Dan Carpenter
2021-11-17 11:19 ` Mauro Carvalho Chehab
2021-11-17 12:42 ` Dan Carpenter
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=20211117095402.2b6cd0df@sal.lan \
--to=mchehab+huawei@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linuxarm@huawei.com \
--cc=mauro.chehab@huawei.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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