Commit d7ab37bc authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: get rid of USE_WINDOWS_BINNING_FACTOR tests

This is meant to select a platform-dependent factor between
Linux and Windows. It makes no sense to keep it on Kernel.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 63705da3
...@@ -102,12 +102,10 @@ struct ia_css_stream_config { ...@@ -102,12 +102,10 @@ struct ia_css_stream_config {
isys_config[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH]; isys_config[IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH];
struct ia_css_stream_input_config input_config; struct ia_css_stream_input_config input_config;
/* Currently, Android and Windows platforms interpret the binning_factor parameter /*
* differently. In Android, the binning factor is expressed in the form * Currently, Linux and Windows platforms interpret the binning_factor
* 2^N * 2^N, whereas in Windows platform, the binning factor is N*N * parameter differently. In Linux, the binning factor is expressed
* To use the Windows method of specification, the caller has to define * in the form 2^N * 2^N
* macro USE_WINDOWS_BINNING_FACTOR. This is for backward compatibility only
* and will be deprecated. In the future,all platforms will use the N*N method
*/ */
/* ISP2401 */ /* ISP2401 */
unsigned int sensor_binning_factor; /** Binning factor used by sensor unsigned int sensor_binning_factor; /** Binning factor used by sensor
......
...@@ -271,15 +271,6 @@ prepare_shading_table(const struct ia_css_shading_table *in_table, ...@@ -271,15 +271,6 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
bds_denominator - bds_denominator -
binary->info->sp.pipeline.top_cropping; binary->info->sp.pipeline.top_cropping;
#if !defined(USE_WINDOWS_BINNING_FACTOR)
/* @deprecated{This part of the code will be replaced by the code
* in the #else section below to make the calculation same across
* all platforms.
* Android and Windows platforms interpret the binning_factor parameter
* differently. In Android, the binning factor is expressed in the form
* 2^N * 2^N, whereas in Windows platform, the binning factor is N*N}
*/
/* We take into account the binning done by the sensor. We do this /* We take into account the binning done by the sensor. We do this
by cropping the non-binned part of the shading table and then by cropping the non-binned part of the shading table and then
increasing the size of a grid cell with this same binning factor. */ increasing the size of a grid cell with this same binning factor. */
...@@ -291,13 +282,6 @@ prepare_shading_table(const struct ia_css_shading_table *in_table, ...@@ -291,13 +282,6 @@ prepare_shading_table(const struct ia_css_shading_table *in_table,
left_padding <<= sensor_binning; left_padding <<= sensor_binning;
right_padding <<= sensor_binning; right_padding <<= sensor_binning;
top_padding <<= sensor_binning; top_padding <<= sensor_binning;
#else
input_width *= sensor_binning;
input_height *= sensor_binning;
left_padding *= sensor_binning;
right_padding *= sensor_binning;
top_padding *= sensor_binning;
#endif /*USE_WINDOWS_BINNING_FACTOR*/
/* during simulation, the used resolution can exceed the sensor /* during simulation, the used resolution can exceed the sensor
resolution, so we clip it. */ resolution, so we clip it. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment