void ia_css_pipe_get_capturepp_binarydesc( struct ia_css_pipe * const pipe, struct ia_css_binary_descr *capture_pp_descr, struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info, struct ia_css_frame_info *vf_info) { unsigned int i; struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS]; assert(pipe != NULL); assert(in_info != NULL); assert(vf_info != NULL); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE, "ia_css_pipe_get_capturepp_binarydesc() enter:\n"); /* the in_info is only used for resolution to enable bayer down scaling. */ if (pipe->out_yuv_ds_input_info.res.width) *in_info = pipe->out_yuv_ds_input_info; else *in_info = *out_info; in_info->format = IA_CSS_FRAME_FORMAT_YUV420; in_info->raw_bit_depth = 0; ia_css_frame_info_set_width(in_info, in_info->res.width, 0); out_infos[0] = out_info; for (i = 1; i < IA_CSS_BINARY_MAX_OUTPUT_PORTS; i++) { out_infos[i] = NULL; } /* * [email protected] * * TODO * - Check with the ISP engineers to see whether "capture_pp" needs * the valid input argument "original_in_info" or not. */ pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_CAPTURE_PP, capture_pp_descr, NULL, in_info, out_infos, vf_info); capture_pp_descr->enable_fractional_ds = true; capture_pp_descr->enable_xnr = pipe->config.default_capture_config.enable_xnr != 0; }
static void psys_terminal_get_frame_info( struct ia_css_frame_info *info, const ia_css_frame_descriptor_t *desc) { assert(info != NULL && desc != NULL); memset(info, 0, sizeof(struct ia_css_frame_info)); info->res.width = desc->dimension[IA_CSS_COL_DIMENSION]; info->res.height = desc->dimension[IA_CSS_ROW_DIMENSION]; /* convert from psys data formats to css formats. */ info->format = ia_css_psys_helper_css_frame_format( desc->frame_format_type); info->raw_bit_depth = desc->bpp; /* default: grbg */ info->raw_bayer_order = 0; ia_css_frame_info_set_width(info, desc->dimension[IA_CSS_COL_DIMENSION], 0); }
void ia_css_pipe_get_yuvscaler_binarydesc( struct ia_css_pipe * const pipe, struct ia_css_binary_descr *yuv_scaler_descr, struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info, struct ia_css_frame_info *internal_out_info, struct ia_css_frame_info *vf_info) { struct ia_css_frame_info *out_infos[IA_CSS_BINARY_MAX_OUTPUT_PORTS]; assert(pipe != NULL); assert(in_info != NULL); /* Note: if the following assert fails, the number of ports has been * changed; in that case an additional initializer must be added * a few lines below after which this assert can be updated. */ assert(IA_CSS_BINARY_MAX_OUTPUT_PORTS == 2); IA_CSS_ENTER_PRIVATE(""); in_info->padded_width = in_info->res.width; in_info->raw_bit_depth = 0; ia_css_frame_info_set_width(in_info, in_info->res.width, 0); out_infos[0] = out_info; out_infos[1] = internal_out_info; /* add initializers here if * assert(IA_CSS_BINARY_MAX_OUTPUT_PORTS == ...); * fails */ /* * [email protected] * * TODO * - Check with the ISP engineers to see whether "yuv_scalar" * needs the valid input argument "original_in_info" or not. */ pipe_binarydesc_get_offline(pipe, IA_CSS_BINARY_MODE_CAPTURE_PP, yuv_scaler_descr, NULL, in_info, out_infos, (vf_info->res.width == 0 && vf_info->res.height == 0) ? NULL : vf_info); yuv_scaler_descr->enable_fractional_ds = true; IA_CSS_LEAVE_PRIVATE(""); }
void ia_css_frame_info_init(struct ia_css_frame_info *info, unsigned int width, unsigned int height, enum ia_css_frame_format format, unsigned int aligned) { assert(info != NULL); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_frame_info_init() enter: " "width=%d, height=%d, format=%d, aligned=%d\n", width, height, format, aligned); info->res.height = height; info->format = format; ia_css_frame_info_set_width(info, width, aligned); ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_frame_info_init() leave: return_void\n"); }