📄 img_ilm.c
字号:
msg_p->overlay_frame_mode = encode->overlay_frame_mode;
msg_p->overlay_color_depth = encode->overlay_color_depth;
msg_p->overlay_frame_source_key = encode->overlay_frame_source_key;
msg_p->overlay_frame_width = encode->overlay_frame_width;
msg_p->overlay_frame_height = encode->overlay_frame_height;
msg_p->overlay_frame_buffer_address = encode->overlay_frame_buffer_address;
#endif /* MT6228_SERIES */
ilm_ptr = allocate_ilm(src_mod_id);
ilm_ptr->src_mod_id = src_mod_id;
ilm_ptr->dest_mod_id = MOD_MED;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_ENCODE_REQ;
ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
/*****************************************************************************
* FUNCTION
* img_send_encode_finish_ind
* DESCRIPTION
*
* PARAMETERS
* result [IN]
* seq_num [IN]
* RETURNS
* void
*****************************************************************************/
void img_send_encode_finish_ind(kal_int16 result, kal_uint16 seq_num)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
media_img_encode_finish_ind_struct *ind_p;
ilm_struct *ilm_ptr = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ind_p = (media_img_encode_finish_ind_struct*)
construct_local_para(sizeof(media_img_encode_finish_ind_struct), TD_CTRL);
ind_p->result = result;
ind_p->seq_num = seq_num;
ilm_ptr = allocate_ilm(MOD_MED);
ilm_ptr->src_mod_id = MOD_MED;
ilm_ptr->dest_mod_id = img_context_p->src_mod;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_ENCODE_FINISH_IND;
ilm_ptr->local_para_ptr = (local_para_struct*) ind_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
/*****************************************************************************
* FUNCTION
* img_send_encode_event_ind
* DESCRIPTION
*
* PARAMETERS
* cause [IN]
* RETURNS
* void
*****************************************************************************/
void img_send_encode_event_ind(kal_uint8 cause)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
media_img_encode_event_ind_struct *ind_p;
ilm_struct *ilm_ptr = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ind_p = (media_img_encode_event_ind_struct*)
construct_local_para(sizeof(media_img_encode_event_ind_struct), TD_CTRL);
ind_p->cause = cause;
ilm_ptr = allocate_ilm(MOD_JPEG_HISR);
ilm_ptr->src_mod_id = MOD_JPEG_HISR;
ilm_ptr->dest_mod_id = MOD_MED;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_ENCODE_EVENT_IND;
ilm_ptr->local_para_ptr = (local_para_struct*) ind_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
/*****************************************************************************
* FUNCTION
* img_send_resize_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* data [?]
* RETURNS
* void
*****************************************************************************/
void img_send_resize_req(module_type src_mod_id, void *data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
media_img_resize_req_struct *msg_p = NULL;
ilm_struct *ilm_ptr = NULL;
img_resize_struct *resize = (img_resize_struct*) data;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p = (media_img_resize_req_struct*) construct_local_para(sizeof(media_img_resize_req_struct), TD_CTRL);
msg_p->src_image_address = resize->src_image_address;
msg_p->dest_image_address = resize->dest_image_address;
msg_p->dest_buffer_size = resize->dest_buffer_size;
msg_p->src_width = resize->src_width;
msg_p->src_height = resize->src_height;
msg_p->src_pitch = resize->src_pitch;
msg_p->target_width = resize->target_width;
msg_p->target_height = resize->target_height;
msg_p->image_clip_x1 = resize->image_clip_x1;
msg_p->image_clip_x2 = resize->image_clip_x2;
msg_p->image_clip_y1 = resize->image_clip_y1;
msg_p->image_clip_y2 = resize->image_clip_y2;
msg_p->seq_num = resize->seq_num;
msg_p->blocking = resize->blocking;
msg_p->type = resize->type;
msg_p->data_order = resize->data_order;
#if MT6228_SERIES
msg_p->image_pitch_mode = resize->image_pitch_mode;
msg_p->image_data_format = resize->image_data_format;
msg_p->image_pitch_bytes = resize->image_pitch_bytes;
#endif /* MT6228_SERIES */
ilm_ptr = allocate_ilm(src_mod_id);
ilm_ptr->src_mod_id = src_mod_id;
ilm_ptr->dest_mod_id = MOD_MED;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_RESIZE_REQ;
ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
/*****************************************************************************
* FUNCTION
* img_send_resize_done_ind
* DESCRIPTION
*
* PARAMETERS
* result [IN]
* seq_num [IN]
* RETURNS
* void
*****************************************************************************/
void img_send_resize_done_ind(kal_int16 result, kal_uint16 seq_num)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
media_img_resize_done_ind_struct *ind_p;
ilm_struct *ilm_ptr = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ind_p = (media_img_resize_done_ind_struct*)
construct_local_para(sizeof(media_img_resize_done_ind_struct), TD_CTRL);
ind_p->result = result;
ind_p->seq_num = seq_num;
ilm_ptr = allocate_ilm(MOD_MED);
ilm_ptr->src_mod_id = MOD_MED;
ilm_ptr->dest_mod_id = img_context_p->src_mod;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_RESIZE_DONE_IND;
ilm_ptr->local_para_ptr = (local_para_struct*) ind_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
/*****************************************************************************
* FUNCTION
* img_send_stop_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* RETURNS
* void
*****************************************************************************/
void img_send_stop_req(module_type src_mod_id)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
media_img_stop_req_struct *msg_p = NULL;
ilm_struct *ilm_ptr = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p = (media_img_stop_req_struct*) construct_local_para(sizeof(media_img_stop_req_struct), TD_CTRL);
ilm_ptr = allocate_ilm(src_mod_id);
ilm_ptr->src_mod_id = src_mod_id;
ilm_ptr->dest_mod_id = MOD_MED;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_STOP_REQ;
ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
/*****************************************************************************
* FUNCTION
* img_send_exif_decode_req
* DESCRIPTION
*
* PARAMETERS
* src_mod_id [IN]
* data [?]
* RETURNS
* void
*****************************************************************************/
void img_send_exif_decode_req(module_type src_mod_id, void *data)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
media_img_exif_decode_req_struct *msg_p = NULL;
ilm_struct *ilm_ptr = NULL;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_p = (media_img_exif_decode_req_struct*)
construct_local_para(sizeof(media_img_exif_decode_req_struct), TD_CTRL);
msg_p->exif_info = data;
ilm_ptr = allocate_ilm(src_mod_id);
ilm_ptr->src_mod_id = src_mod_id;
ilm_ptr->dest_mod_id = MOD_MED;
ilm_ptr->sap_id = MED_SAP;
ilm_ptr->msg_id = (msg_type) MSG_ID_MEDIA_IMG_EXIF_DECODE_REQ;
ilm_ptr->local_para_ptr = (local_para_struct*) msg_p;
ilm_ptr->peer_buff_ptr = NULL;
msg_send_ext_queue(ilm_ptr);
}
#endif /* __MED_IMG_MOD__ */
#endif /* MED_NOT_PRESENT */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -