2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef _IA_CSS_STREAM_H_
16 #define _IA_CSS_STREAM_H_
18 #include <type_support.h>
19 #include <system_local.h>
20 #if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
21 #include <input_system.h>
23 #include "ia_css_types.h"
24 #include "ia_css_stream_public.h"
27 * structure to hold all internal stream related information
29 struct ia_css_stream {
30 struct ia_css_stream_config config;
31 struct ia_css_stream_info info;
32 #if !defined(HAS_NO_INPUT_SYSTEM) && !defined(USE_INPUT_SYSTEM_VERSION_2401)
33 rx_cfg_t csi_rx_config;
35 bool reconfigure_css_rx;
36 struct ia_css_pipe *last_pipe;
38 struct ia_css_pipe **pipes;
39 struct ia_css_pipe *continuous_pipe;
40 struct ia_css_isp_parameters *isp_params_configs;
41 struct ia_css_isp_parameters *per_frame_isp_params_configs;
46 bool stop_copy_preview;
51 /** @brief Get a binary in the stream, which binary has the shading correction.
53 * @param[in] stream: The stream.
54 * @return The binary which has the shading correction.
57 struct ia_css_binary *
58 ia_css_stream_get_shading_correction_binary(const struct ia_css_stream *stream);
60 struct ia_css_binary *
61 ia_css_stream_get_dvs_binary(const struct ia_css_stream *stream);
63 struct ia_css_binary *
64 ia_css_stream_get_3a_binary(const struct ia_css_stream *stream);
67 ia_css_stream_input_format_bits_per_pixel(struct ia_css_stream *stream);
70 sh_css_params_set_binning_factor(struct ia_css_stream *stream, unsigned int sensor_binning);
73 sh_css_invalidate_params(struct ia_css_stream *stream);
75 /* The following functions are used for testing purposes only */
76 const struct ia_css_fpn_table *
77 ia_css_get_fpn_table(struct ia_css_stream *stream);
79 /** @brief Get a pointer to the shading table.
81 * @param[in] stream: The stream.
82 * @return The pointer to the shading table.
85 struct ia_css_shading_table *
86 ia_css_get_shading_table(struct ia_css_stream *stream);
89 ia_css_get_isp_dis_coefficients(struct ia_css_stream *stream,
90 short *horizontal_coefficients,
91 short *vertical_coefficients);
94 ia_css_get_isp_dvs2_coefficients(struct ia_css_stream *stream,
95 short *hor_coefs_odd_real,
96 short *hor_coefs_odd_imag,
97 short *hor_coefs_even_real,
98 short *hor_coefs_even_imag,
99 short *ver_coefs_odd_real,
100 short *ver_coefs_odd_imag,
101 short *ver_coefs_even_real,
102 short *ver_coefs_even_imag);
105 ia_css_stream_isp_parameters_init(struct ia_css_stream *stream);
108 ia_css_stream_isp_parameters_uninit(struct ia_css_stream *stream);
110 #endif /*_IA_CSS_STREAM_H_*/