#include <linux/math.h>
#include <math_support.h>
#include <gdc_device.h>
#include "hmm.h"
#include "isp.h"
#include "ia_css_binary.h"
#include "ia_css_debug.h"
#include "ia_css_util.h"
#include "ia_css_isp_param.h"
#include "sh_css_internal.h"
#include "sh_css_sp.h"
#include "sh_css_firmware.h"
#include "sh_css_defs.h"
#include "sh_css_legacy.h"
#include "atomisp_internal.h"
#include "vf/vf_1.0/ia_css_vf.host.h"
#include "sc/sc_1.0/ia_css_sc.host.h"
#include "sdis/sdis_1.0/ia_css_sdis.host.h"
#include "fixedbds/fixedbds_1.0/ia_css_fixedbds_param.h"
#include "camera/pipe/interface/ia_css_pipe_binarydesc.h"
#include "assert_support.h"
static struct ia_css_binary_xinfo *all_binaries;
static struct ia_css_binary_xinfo
*binary_infos[IA_CSS_BINARY_NUM_MODES] = …;
static void
ia_css_binary_dvs_env(const struct ia_css_binary_info *info,
const struct ia_css_resolution *dvs_env,
struct ia_css_resolution *binary_dvs_env)
{ … }
static void
ia_css_binary_internal_res(const struct ia_css_frame_info *in_info,
const struct ia_css_frame_info *bds_out_info,
const struct ia_css_frame_info *out_info,
const struct ia_css_resolution *dvs_env,
const struct ia_css_binary_info *info,
struct ia_css_resolution *internal_res)
{ … }
struct sh_css_shading_table_bayer_origin_compute_results { … };
static int
ia_css_binary_compute_shading_table_bayer_origin(
const struct ia_css_binary *binary,
unsigned int required_bds_factor,
const struct ia_css_stream_config *stream_config,
struct sh_css_shading_table_bayer_origin_compute_results *res)
{ … }
static int
binary_get_shading_info_type_1(const struct ia_css_binary *binary,
unsigned int required_bds_factor,
const struct ia_css_stream_config *stream_config,
struct ia_css_shading_info *info)
{ … }
int
ia_css_binary_get_shading_info(const struct ia_css_binary *binary,
enum ia_css_shading_correction_type type,
unsigned int required_bds_factor,
const struct ia_css_stream_config *stream_config,
struct ia_css_shading_info *shading_info,
struct ia_css_pipe_config *pipe_config)
{ … }
static void sh_css_binary_common_grid_info(const struct ia_css_binary *binary,
struct ia_css_grid_info *info)
{ … }
void
ia_css_binary_dvs_grid_info(const struct ia_css_binary *binary,
struct ia_css_grid_info *info,
struct ia_css_pipe *pipe)
{ … }
void
ia_css_binary_dvs_stat_grid_info(
const struct ia_css_binary *binary,
struct ia_css_grid_info *info,
struct ia_css_pipe *pipe)
{ … }
int
ia_css_binary_3a_grid_info(const struct ia_css_binary *binary,
struct ia_css_grid_info *info,
struct ia_css_pipe *pipe) { … }
static void
binary_init_pc_histogram(struct sh_css_pc_histogram *histo)
{ … }
static void
binary_init_metrics(struct sh_css_binary_metrics *metrics,
const struct ia_css_binary_info *info)
{ … }
static bool
binary_supports_output_format(const struct ia_css_binary_xinfo *info,
enum ia_css_frame_format format)
{ … }
static bool
binary_supports_vf_format(const struct ia_css_binary_xinfo *info,
enum ia_css_frame_format format)
{ … }
static bool
supports_bds_factor(u32 supported_factors,
uint32_t bds_factor)
{ … }
static int
binary_init_info(struct ia_css_binary_xinfo *info, unsigned int i,
bool *binary_found) { … }
int
ia_css_binary_init_infos(void) { … }
int
ia_css_binary_uninit(void) { … }
static int
binary_grid_deci_factor_log2(int width, int height)
{ … }
static int
binary_in_frame_padded_width(int in_frame_width,
int isp_internal_width,
int dvs_env_width,
int stream_config_left_padding,
int left_cropping,
bool need_scaling)
{ … }
int
ia_css_binary_fill_info(const struct ia_css_binary_xinfo *xinfo,
bool online,
bool two_ppc,
enum atomisp_input_format stream_format,
const struct ia_css_frame_info *in_info,
const struct ia_css_frame_info *bds_out_info,
const struct ia_css_frame_info *out_info[],
const struct ia_css_frame_info *vf_info,
struct ia_css_binary *binary,
struct ia_css_resolution *dvs_env,
int stream_config_left_padding,
bool accelerator) { … }
static int __ia_css_binary_find(struct ia_css_binary_descr *descr,
struct ia_css_binary *binary) { … }
int ia_css_binary_find(struct ia_css_binary_descr *descr,
struct ia_css_binary *binary)
{ … }
unsigned
ia_css_binary_max_vf_width(void)
{ … }
void
ia_css_binary_destroy_isp_parameters(struct ia_css_binary *binary)
{ … }
void
ia_css_binary_get_isp_binaries(struct ia_css_binary_xinfo **binaries,
uint32_t *num_isp_binaries)
{ … }