|
@@ -462,46 +462,46 @@ verify_copy_out_frame_format(struct ia_css_pipe *pipe)
|
|
|
assert(pipe->stream != NULL);
|
|
|
|
|
|
switch (pipe->stream->config.input_config.format) {
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_8:
|
|
|
for (i=0; i<ARRAY_SIZE(yuv420_copy_formats) && !found; i++)
|
|
|
found = (out_fmt == yuv420_copy_formats[i]);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_10:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_16:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_10:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_16:
|
|
|
found = (out_fmt == IA_CSS_FRAME_FORMAT_YUV420_16);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV422_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV422_8:
|
|
|
for (i=0; i<ARRAY_SIZE(yuv422_copy_formats) && !found; i++)
|
|
|
found = (out_fmt == yuv422_copy_formats[i]);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV422_10:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV422_16:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV422_10:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV422_16:
|
|
|
found = (out_fmt == IA_CSS_FRAME_FORMAT_YUV422_16 ||
|
|
|
out_fmt == IA_CSS_FRAME_FORMAT_YUV420_16);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_444:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_555:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_565:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_444:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_555:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_565:
|
|
|
found = (out_fmt == IA_CSS_FRAME_FORMAT_RGBA888 ||
|
|
|
out_fmt == IA_CSS_FRAME_FORMAT_RGB565);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_666:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_888:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_666:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_888:
|
|
|
found = (out_fmt == IA_CSS_FRAME_FORMAT_RGBA888 ||
|
|
|
out_fmt == IA_CSS_FRAME_FORMAT_YUV420);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_6:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_7:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_8:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_10:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_12:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_14:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_16:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_6:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_7:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_10:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_12:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_14:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_16:
|
|
|
found = (out_fmt == IA_CSS_FRAME_FORMAT_RAW) ||
|
|
|
(out_fmt == IA_CSS_FRAME_FORMAT_RAW_PACKED);
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_BINARY_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_BINARY_8:
|
|
|
found = (out_fmt == IA_CSS_FRAME_FORMAT_BINARY_8);
|
|
|
break;
|
|
|
default:
|
|
@@ -586,13 +586,13 @@ sh_css_config_input_network(struct ia_css_stream *stream)
|
|
|
}
|
|
|
#elif !defined(HAS_NO_INPUT_SYSTEM) && defined(USE_INPUT_SYSTEM_VERSION_2401)
|
|
|
static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
|
|
|
- enum ia_css_stream_format format,
|
|
|
+ enum atomisp_input_format format,
|
|
|
unsigned int pixels_per_line)
|
|
|
{
|
|
|
unsigned int rval;
|
|
|
|
|
|
switch (format) {
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY:
|
|
|
/*
|
|
|
* The frame format layout is shown below.
|
|
|
*
|
|
@@ -611,9 +611,9 @@ static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
|
|
|
*/
|
|
|
rval = pixels_per_line * 2;
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_8:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_10:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV420_16:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_10:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV420_16:
|
|
|
/*
|
|
|
* The frame format layout is shown below.
|
|
|
*
|
|
@@ -630,9 +630,9 @@ static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
|
|
|
*/
|
|
|
rval = pixels_per_line * 2;
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV422_8:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV422_10:
|
|
|
- case IA_CSS_STREAM_FORMAT_YUV422_16:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV422_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV422_10:
|
|
|
+ case ATOMISP_INPUT_FORMAT_YUV422_16:
|
|
|
/*
|
|
|
* The frame format layout is shown below.
|
|
|
*
|
|
@@ -649,11 +649,11 @@ static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
|
|
|
*/
|
|
|
rval = pixels_per_line * 2;
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_444:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_555:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_565:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_666:
|
|
|
- case IA_CSS_STREAM_FORMAT_RGB_888:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_444:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_555:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_565:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_666:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RGB_888:
|
|
|
/*
|
|
|
* The frame format layout is shown below.
|
|
|
*
|
|
@@ -670,22 +670,22 @@ static unsigned int csi2_protocol_calculate_max_subpixels_per_line(
|
|
|
*/
|
|
|
rval = pixels_per_line * 4;
|
|
|
break;
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_6:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_7:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_8:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_10:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_12:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_14:
|
|
|
- case IA_CSS_STREAM_FORMAT_RAW_16:
|
|
|
- case IA_CSS_STREAM_FORMAT_BINARY_8:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF1:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF2:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF3:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF4:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF5:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF6:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF7:
|
|
|
- case IA_CSS_STREAM_FORMAT_USER_DEF8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_6:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_7:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_10:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_12:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_14:
|
|
|
+ case ATOMISP_INPUT_FORMAT_RAW_16:
|
|
|
+ case ATOMISP_INPUT_FORMAT_BINARY_8:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF1:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF2:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF3:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF4:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF5:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF6:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF7:
|
|
|
+ case ATOMISP_INPUT_FORMAT_USER_DEF8:
|
|
|
/*
|
|
|
* The frame format layout is shown below.
|
|
|
*
|
|
@@ -742,11 +742,11 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_id(
|
|
|
break;
|
|
|
case IA_CSS_INPUT_MODE_BUFFERED_SENSOR:
|
|
|
|
|
|
- if (stream_cfg->source.port.port == IA_CSS_CSI2_PORT0) {
|
|
|
+ if (stream_cfg->source.port.port == MIPI_PORT0_ID) {
|
|
|
isys_stream_descr->input_port_id = INPUT_SYSTEM_CSI_PORT0_ID;
|
|
|
- } else if (stream_cfg->source.port.port == IA_CSS_CSI2_PORT1) {
|
|
|
+ } else if (stream_cfg->source.port.port == MIPI_PORT1_ID) {
|
|
|
isys_stream_descr->input_port_id = INPUT_SYSTEM_CSI_PORT1_ID;
|
|
|
- } else if (stream_cfg->source.port.port == IA_CSS_CSI2_PORT2) {
|
|
|
+ } else if (stream_cfg->source.port.port == MIPI_PORT2_ID) {
|
|
|
isys_stream_descr->input_port_id = INPUT_SYSTEM_CSI_PORT2_ID;
|
|
|
}
|
|
|
|
|
@@ -927,7 +927,7 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
|
|
|
unsigned int max_subpixels_per_line;
|
|
|
unsigned int lines_per_frame;
|
|
|
unsigned int align_req_in_bytes;
|
|
|
- enum ia_css_stream_format fmt_type;
|
|
|
+ enum atomisp_input_format fmt_type;
|
|
|
|
|
|
fmt_type = stream_cfg->isys_config[isys_stream_idx].format;
|
|
|
if ((stream_cfg->mode == IA_CSS_INPUT_MODE_SENSOR ||
|
|
@@ -936,11 +936,11 @@ static bool sh_css_translate_stream_cfg_to_input_system_input_port_resolution(
|
|
|
|
|
|
if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
|
|
|
UNCOMPRESSED_BITS_PER_PIXEL_10) {
|
|
|
- fmt_type = IA_CSS_STREAM_FORMAT_RAW_10;
|
|
|
+ fmt_type = ATOMISP_INPUT_FORMAT_RAW_10;
|
|
|
}
|
|
|
else if (stream_cfg->source.port.compression.uncompressed_bits_per_pixel ==
|
|
|
UNCOMPRESSED_BITS_PER_PIXEL_12) {
|
|
|
- fmt_type = IA_CSS_STREAM_FORMAT_RAW_12;
|
|
|
+ fmt_type = ATOMISP_INPUT_FORMAT_RAW_12;
|
|
|
}
|
|
|
else
|
|
|
return false;
|
|
@@ -1082,7 +1082,7 @@ sh_css_config_input_network(struct ia_css_stream *stream)
|
|
|
|
|
|
/* get the SP thread id */
|
|
|
rc = ia_css_pipeline_get_sp_thread_id(ia_css_pipe_get_pipe_num(pipe), &sp_thread_id);
|
|
|
- if (rc != true)
|
|
|
+ if (!rc)
|
|
|
return IA_CSS_ERR_INTERNAL_ERROR;
|
|
|
/* get the target input terminal */
|
|
|
sp_pipeline_input_terminal = &(sh_css_sp_group.pipe_io[sp_thread_id].input);
|
|
@@ -1108,7 +1108,7 @@ sh_css_config_input_network(struct ia_css_stream *stream)
|
|
|
&(isys_stream_descr));
|
|
|
}
|
|
|
|
|
|
- if (rc != true)
|
|
|
+ if (!rc)
|
|
|
return IA_CSS_ERR_INTERNAL_ERROR;
|
|
|
|
|
|
isys_stream_id = ia_css_isys_generate_stream_id(sp_thread_id, i);
|
|
@@ -1118,7 +1118,7 @@ sh_css_config_input_network(struct ia_css_stream *stream)
|
|
|
&(isys_stream_descr),
|
|
|
&(sp_pipeline_input_terminal->context.virtual_input_system_stream[i]),
|
|
|
isys_stream_id);
|
|
|
- if (rc != true)
|
|
|
+ if (!rc)
|
|
|
return IA_CSS_ERR_INTERNAL_ERROR;
|
|
|
|
|
|
/* calculate the configuration of the virtual Input System (2401) */
|
|
@@ -1126,7 +1126,7 @@ sh_css_config_input_network(struct ia_css_stream *stream)
|
|
|
&(sp_pipeline_input_terminal->context.virtual_input_system_stream[i]),
|
|
|
&(isys_stream_descr),
|
|
|
&(sp_pipeline_input_terminal->ctrl.virtual_input_system_stream_cfg[i]));
|
|
|
- if (rc != true) {
|
|
|
+ if (!rc) {
|
|
|
ia_css_isys_stream_destroy(&(sp_pipeline_input_terminal->context.virtual_input_system_stream[i]));
|
|
|
return IA_CSS_ERR_INTERNAL_ERROR;
|
|
|
}
|
|
@@ -1195,7 +1195,7 @@ static inline struct ia_css_pipe *stream_get_target_pipe(
|
|
|
|
|
|
static enum ia_css_err stream_csi_rx_helper(
|
|
|
struct ia_css_stream *stream,
|
|
|
- enum ia_css_err (*func)(enum ia_css_csi2_port, uint32_t))
|
|
|
+ enum ia_css_err (*func)(enum mipi_port_id, uint32_t))
|
|
|
{
|
|
|
enum ia_css_err retval = IA_CSS_ERR_INTERNAL_ERROR;
|
|
|
uint32_t sp_thread_id, stream_id;
|
|
@@ -1391,7 +1391,7 @@ start_copy_on_sp(struct ia_css_pipe *pipe,
|
|
|
ia_css_isys_rx_disable();
|
|
|
#endif
|
|
|
|
|
|
- if (pipe->stream->config.input_config.format != IA_CSS_STREAM_FORMAT_BINARY_8)
|
|
|
+ if (pipe->stream->config.input_config.format != ATOMISP_INPUT_FORMAT_BINARY_8)
|
|
|
return IA_CSS_ERR_INTERNAL_ERROR;
|
|
|
sh_css_sp_start_binary_copy(ia_css_pipe_get_pipe_num(pipe), out_frame, pipe->stream->config.pixels_per_clock == 2);
|
|
|
|
|
@@ -1454,7 +1454,7 @@ static void start_pipe(
|
|
|
&me->stream->info.metadata_info
|
|
|
#if !defined(HAS_NO_INPUT_SYSTEM)
|
|
|
,(input_mode==IA_CSS_INPUT_MODE_MEMORY) ?
|
|
|
- (mipi_port_ID_t)0 :
|
|
|
+ (enum mipi_port_id)0 :
|
|
|
me->stream->config.source.port.port
|
|
|
#endif
|
|
|
#ifdef ISP2401
|
|
@@ -1497,7 +1497,7 @@ static void
|
|
|
enable_interrupts(enum ia_css_irq_type irq_type)
|
|
|
{
|
|
|
#ifdef USE_INPUT_SYSTEM_VERSION_2
|
|
|
- mipi_port_ID_t port;
|
|
|
+ enum mipi_port_id port;
|
|
|
#endif
|
|
|
bool enable_pulse = irq_type != IA_CSS_IRQ_TYPE_EDGE;
|
|
|
IA_CSS_ENTER_PRIVATE("");
|
|
@@ -2562,7 +2562,7 @@ ia_css_uninit(void)
|
|
|
ifmtr_set_if_blocking_mode_reset = true;
|
|
|
#endif
|
|
|
|
|
|
- if (fw_explicitly_loaded == false) {
|
|
|
+ if (!fw_explicitly_loaded) {
|
|
|
ia_css_unload_firmware();
|
|
|
}
|
|
|
ia_css_spctrl_unload_fw(SP0_ID);
|
|
@@ -4074,9 +4074,9 @@ preview_start(struct ia_css_pipe *pipe)
|
|
|
#endif
|
|
|
#if !defined(HAS_NO_INPUT_SYSTEM)
|
|
|
#ifndef ISP2401
|
|
|
- , (mipi_port_ID_t)0
|
|
|
+ , (enum mipi_port_id)0
|
|
|
#else
|
|
|
- (mipi_port_ID_t)0,
|
|
|
+ (enum mipi_port_id)0,
|
|
|
#endif
|
|
|
#endif
|
|
|
#ifndef ISP2401
|
|
@@ -4106,9 +4106,9 @@ preview_start(struct ia_css_pipe *pipe)
|
|
|
#endif
|
|
|
#if !defined(HAS_NO_INPUT_SYSTEM)
|
|
|
#ifndef ISP2401
|
|
|
- , (mipi_port_ID_t) 0
|
|
|
+ , (enum mipi_port_id) 0
|
|
|
#else
|
|
|
- (mipi_port_ID_t) 0,
|
|
|
+ (enum mipi_port_id) 0,
|
|
|
#endif
|
|
|
#endif
|
|
|
#ifndef ISP2401
|
|
@@ -4673,7 +4673,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
|
|
|
event->type = convert_event_sp_to_host_domain[payload[0]];
|
|
|
/* Some sane default values since not all events use all fields. */
|
|
|
event->pipe = NULL;
|
|
|
- event->port = IA_CSS_CSI2_PORT0;
|
|
|
+ event->port = MIPI_PORT0_ID;
|
|
|
event->exp_id = 0;
|
|
|
event->fw_warning = IA_CSS_FW_WARNING_NONE;
|
|
|
event->fw_handle = 0;
|
|
@@ -4719,7 +4719,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event)
|
|
|
}
|
|
|
}
|
|
|
if (event->type == IA_CSS_EVENT_TYPE_PORT_EOF) {
|
|
|
- event->port = (enum ia_css_csi2_port)payload[1];
|
|
|
+ event->port = (enum mipi_port_id)payload[1];
|
|
|
event->exp_id = payload[3];
|
|
|
} else if (event->type == IA_CSS_EVENT_TYPE_FW_WARNING) {
|
|
|
event->fw_warning = (enum ia_css_fw_warning)payload[1];
|
|
@@ -5949,9 +5949,9 @@ static enum ia_css_err video_start(struct ia_css_pipe *pipe)
|
|
|
#endif
|
|
|
#if !defined(HAS_NO_INPUT_SYSTEM)
|
|
|
#ifndef ISP2401
|
|
|
- , (mipi_port_ID_t)0
|
|
|
+ , (enum mipi_port_id)0
|
|
|
#else
|
|
|
- (mipi_port_ID_t)0,
|
|
|
+ (enum mipi_port_id)0,
|
|
|
#endif
|
|
|
#endif
|
|
|
#ifndef ISP2401
|
|
@@ -6784,7 +6784,7 @@ static bool copy_on_sp(struct ia_css_pipe *pipe)
|
|
|
|
|
|
rval &= (pipe->config.default_capture_config.mode == IA_CSS_CAPTURE_MODE_RAW);
|
|
|
|
|
|
- rval &= ((pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_BINARY_8) ||
|
|
|
+ rval &= ((pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) ||
|
|
|
(pipe->config.mode == IA_CSS_PIPE_MODE_COPY));
|
|
|
|
|
|
return rval;
|
|
@@ -6817,7 +6817,7 @@ static enum ia_css_err load_capture_binaries(
|
|
|
return err;
|
|
|
}
|
|
|
if (copy_on_sp(pipe) &&
|
|
|
- pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_BINARY_8) {
|
|
|
+ pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
|
|
|
ia_css_frame_info_init(
|
|
|
&pipe->output_info[0],
|
|
|
JPEG_BYTES,
|
|
@@ -6915,7 +6915,7 @@ need_yuv_scaler_stage(const struct ia_css_pipe *pipe)
|
|
|
|
|
|
/* TODO: make generic function */
|
|
|
need_format_conversion =
|
|
|
- ((pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY) &&
|
|
|
+ ((pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) &&
|
|
|
(pipe->output_info[0].format != IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8));
|
|
|
|
|
|
in_res = pipe->config.input_effective_res;
|
|
@@ -7304,7 +7304,7 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
|
|
|
/*
|
|
|
* NOTES
|
|
|
* - Why does the "yuvpp" pipe needs "isp_copy_binary" (i.e. ISP Copy) when
|
|
|
- * its input is "IA_CSS_STREAM_FORMAT_YUV422_8"?
|
|
|
+ * its input is "ATOMISP_INPUT_FORMAT_YUV422_8"?
|
|
|
*
|
|
|
* In most use cases, the first stage in the "yuvpp" pipe is the "yuv_scale_
|
|
|
* binary". However, the "yuv_scale_binary" does NOT support the input-frame
|
|
@@ -7319,7 +7319,7 @@ load_yuvpp_binaries(struct ia_css_pipe *pipe)
|
|
|
* "yuv_scale_binary".
|
|
|
*/
|
|
|
need_isp_copy_binary =
|
|
|
- (pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_YUV422_8);
|
|
|
+ (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8);
|
|
|
#else /* !USE_INPUT_SYSTEM_VERSION_2401 */
|
|
|
need_isp_copy_binary = true;
|
|
|
#endif /* USE_INPUT_SYSTEM_VERSION_2401 */
|
|
@@ -7627,11 +7627,11 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
|
|
|
* Bayer-Quad RAW.
|
|
|
*/
|
|
|
int in_frame_format;
|
|
|
- if (pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY) {
|
|
|
+ if (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV420_8_LEGACY) {
|
|
|
in_frame_format = IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8;
|
|
|
- } else if (pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_YUV422_8) {
|
|
|
+ } else if (pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_YUV422_8) {
|
|
|
/*
|
|
|
- * When the sensor output frame format is "IA_CSS_STREAM_FORMAT_YUV422_8",
|
|
|
+ * When the sensor output frame format is "ATOMISP_INPUT_FORMAT_YUV422_8",
|
|
|
* the "isp_copy_var" binary is selected as the first stage in the yuvpp
|
|
|
* pipe.
|
|
|
*
|
|
@@ -7739,7 +7739,7 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
|
|
|
|
|
|
for (i = 0, j = 0; i < num_stage; i++) {
|
|
|
assert(j < num_output_stage);
|
|
|
- if (pipe->pipe_settings.yuvpp.is_output_stage[i] == true) {
|
|
|
+ if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
|
|
|
tmp_out_frame = out_frame[j];
|
|
|
tmp_vf_frame = vf_frame[j];
|
|
|
} else {
|
|
@@ -7758,7 +7758,7 @@ create_host_yuvpp_pipeline(struct ia_css_pipe *pipe)
|
|
|
}
|
|
|
/* we use output port 1 as internal output port */
|
|
|
tmp_in_frame = yuv_scaler_stage->args.out_frame[1];
|
|
|
- if (pipe->pipe_settings.yuvpp.is_output_stage[i] == true) {
|
|
|
+ if (pipe->pipe_settings.yuvpp.is_output_stage[i]) {
|
|
|
if (tmp_vf_frame && (tmp_vf_frame->info.res.width != 0)) {
|
|
|
in_frame = yuv_scaler_stage->args.out_vf_frame;
|
|
|
err = add_vf_pp_stage(pipe, in_frame, tmp_vf_frame, &vf_pp_binary[j],
|
|
@@ -7812,7 +7812,7 @@ create_host_copy_pipeline(struct ia_css_pipe *pipe,
|
|
|
out_frame->flash_state = IA_CSS_FRAME_FLASH_STATE_NONE;
|
|
|
|
|
|
if (copy_on_sp(pipe) &&
|
|
|
- pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_BINARY_8) {
|
|
|
+ pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
|
|
|
ia_css_frame_info_init(
|
|
|
&out_frame->info,
|
|
|
JPEG_BYTES,
|
|
@@ -8044,7 +8044,6 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
|
|
|
}
|
|
|
|
|
|
if (mode == IA_CSS_CAPTURE_MODE_PRIMARY) {
|
|
|
- unsigned int frm;
|
|
|
struct ia_css_frame *local_in_frame = NULL;
|
|
|
struct ia_css_frame *local_out_frame = NULL;
|
|
|
|
|
@@ -8082,7 +8081,6 @@ create_host_regular_capture_pipeline(struct ia_css_pipe *pipe)
|
|
|
return err;
|
|
|
}
|
|
|
}
|
|
|
- (void)frm;
|
|
|
/* If we use copy iso primary,
|
|
|
the input must be yuv iso raw */
|
|
|
current_stage->args.copy_vf =
|
|
@@ -8321,8 +8319,6 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
|
|
|
struct ia_css_frame_info *info,
|
|
|
unsigned int idx)
|
|
|
{
|
|
|
- enum ia_css_err err = IA_CSS_SUCCESS;
|
|
|
-
|
|
|
assert(pipe != NULL);
|
|
|
assert(info != NULL);
|
|
|
|
|
@@ -8331,7 +8327,7 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
|
|
|
|
|
|
*info = pipe->output_info[idx];
|
|
|
if (copy_on_sp(pipe) &&
|
|
|
- pipe->stream->config.input_config.format == IA_CSS_STREAM_FORMAT_BINARY_8) {
|
|
|
+ pipe->stream->config.input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8) {
|
|
|
ia_css_frame_info_init(
|
|
|
info,
|
|
|
JPEG_BYTES,
|
|
@@ -8347,7 +8343,7 @@ sh_css_pipe_get_output_frame_info(struct ia_css_pipe *pipe,
|
|
|
|
|
|
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
|
|
|
"sh_css_pipe_get_output_frame_info() leave:\n");
|
|
|
- return err;
|
|
|
+ return IA_CSS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
#if !defined(HAS_NO_INPUT_SYSTEM)
|
|
@@ -8392,7 +8388,7 @@ ia_css_stream_send_input_line(const struct ia_css_stream *stream,
|
|
|
|
|
|
void
|
|
|
ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream,
|
|
|
- enum ia_css_stream_format format,
|
|
|
+ enum atomisp_input_format format,
|
|
|
const unsigned short *data,
|
|
|
unsigned int width)
|
|
|
{
|
|
@@ -9176,7 +9172,7 @@ ia_css_stream_configure_rx(struct ia_css_stream *stream)
|
|
|
else if (config->num_lanes != 0)
|
|
|
return IA_CSS_ERR_INVALID_ARGUMENTS;
|
|
|
|
|
|
- if (config->port > IA_CSS_CSI2_PORT2)
|
|
|
+ if (config->port > MIPI_PORT2_ID)
|
|
|
return IA_CSS_ERR_INVALID_ARGUMENTS;
|
|
|
stream->csi_rx_config.port =
|
|
|
ia_css_isys_port_to_mipi_port(config->port);
|
|
@@ -9363,7 +9359,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config,
|
|
|
|
|
|
#if defined(USE_INPUT_SYSTEM_VERSION_2)
|
|
|
/* We don't support metadata for JPEG stream, since they both use str2mem */
|
|
|
- if (stream_config->input_config.format == IA_CSS_STREAM_FORMAT_BINARY_8 &&
|
|
|
+ if (stream_config->input_config.format == ATOMISP_INPUT_FORMAT_BINARY_8 &&
|
|
|
stream_config->metadata_config.resolution.height > 0) {
|
|
|
err = IA_CSS_ERR_INVALID_ARGUMENTS;
|
|
|
IA_CSS_LEAVE_ERR(err);
|
|
@@ -10142,7 +10138,7 @@ ia_css_temp_pipe_to_pipe_id(const struct ia_css_pipe *pipe, enum ia_css_pipe_id
|
|
|
return IA_CSS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-enum ia_css_stream_format
|
|
|
+enum atomisp_input_format
|
|
|
ia_css_stream_get_format(const struct ia_css_stream *stream)
|
|
|
{
|
|
|
return stream->config.input_config.format;
|
|
@@ -10218,8 +10214,6 @@ ia_css_stream_get_3a_binary(const struct ia_css_stream *stream)
|
|
|
enum ia_css_err
|
|
|
ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width)
|
|
|
{
|
|
|
- enum ia_css_err err = IA_CSS_SUCCESS;
|
|
|
-
|
|
|
struct ia_css_pipe *pipe;
|
|
|
|
|
|
assert(stream != NULL);
|
|
@@ -10232,7 +10226,7 @@ ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int
|
|
|
pipe->config.output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
|
|
|
pipe->output_info[IA_CSS_PIPE_OUTPUT_STAGE_0].padded_width = output_padded_width;
|
|
|
|
|
|
- return err;
|
|
|
+ return IA_CSS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
static struct ia_css_binary *
|
|
@@ -10734,7 +10728,7 @@ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool
|
|
|
(uint8_t) IA_CSS_PSYS_SW_EVENT_STAGE_ENABLE_DISABLE,
|
|
|
(uint8_t) thread_id,
|
|
|
(uint8_t) stage->stage_num,
|
|
|
- (enable == true) ? 1 : 0);
|
|
|
+ enable ? 1 : 0);
|
|
|
if (err == IA_CSS_SUCCESS) {
|
|
|
if(enable)
|
|
|
SH_CSS_QOS_STAGE_ENABLE(&(sh_css_sp_group.pipe[thread_id]),stage->stage_num);
|
|
@@ -11059,7 +11053,7 @@ static struct sh_css_hmm_buffer_record
|
|
|
|
|
|
buffer_record = &hmm_buffer_record[0];
|
|
|
for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
|
|
|
- if (buffer_record->in_use == false) {
|
|
|
+ if (!buffer_record->in_use) {
|
|
|
buffer_record->in_use = true;
|
|
|
buffer_record->type = type;
|
|
|
buffer_record->h_vbuf = h_vbuf;
|
|
@@ -11083,7 +11077,7 @@ static struct sh_css_hmm_buffer_record
|
|
|
|
|
|
buffer_record = &hmm_buffer_record[0];
|
|
|
for (i = 0; i < MAX_HMM_BUFFER_NUM; i++) {
|
|
|
- if ((buffer_record->in_use == true) &&
|
|
|
+ if ((buffer_record->in_use) &&
|
|
|
(buffer_record->type == type) &&
|
|
|
(buffer_record->h_vbuf != NULL) &&
|
|
|
(buffer_record->h_vbuf->vptr == ddr_buffer_addr)) {
|
|
@@ -11093,7 +11087,7 @@ static struct sh_css_hmm_buffer_record
|
|
|
buffer_record++;
|
|
|
}
|
|
|
|
|
|
- if (found_record == true)
|
|
|
+ if (found_record)
|
|
|
return buffer_record;
|
|
|
else
|
|
|
return NULL;
|