Lines Matching refs:msg
37 IepMsg msg; member
215 static RK_U32 check_msg_image(IepMsg *msg) in check_msg_image() argument
218 IepMsgImg *src = &msg->src; in check_msg_image()
219 IepMsgImg *dst = &msg->dst; in check_msg_image()
339 IepMsg *msg = &impl->msg; in iep_control() local
343 memset(msg, 0, sizeof(*msg)); in iep_control()
346 IepMsgImg *src = &msg->src; in iep_control()
350 memcpy(&msg->src, param, sizeof(IepImg)); in iep_control()
360 msg->dein_mode == IEP_DEI_MODE_DISABLE) { in iep_control()
361 msg->dein_mode = IEP_DEI_MODE_BYPASS; in iep_control()
371 memcpy(&msg->dst, param, sizeof(IepImg)); in iep_control()
382 msg->dein_high_fre_en = 0; in iep_control()
383 msg->dein_mode = IEP_DEI_MODE_I2O1; in iep_control()
384 msg->field_order = IEP_DEI_FLD_ORDER_BOT_FIRST; in iep_control()
385 msg->dein_ei_mode = 0; in iep_control()
386 msg->dein_ei_sel = 0; in iep_control()
387 msg->dein_ei_radius = 0; in iep_control()
388 msg->dein_ei_smooth = 0; in iep_control()
389 msg->dein_high_fre_fct = 0; in iep_control()
391 msg->dein_high_fre_en = dei_cfg->dei_high_freq_en; in iep_control()
392 msg->dein_mode = dei_cfg->dei_mode; in iep_control()
393 msg->field_order = dei_cfg->dei_field_order; in iep_control()
394 msg->dein_ei_mode = dei_cfg->dei_ei_mode; in iep_control()
395 msg->dein_ei_sel = dei_cfg->dei_ei_sel; in iep_control()
396 msg->dein_ei_radius = dei_cfg->dei_ei_radius; in iep_control()
397 msg->dein_ei_smooth = dei_cfg->dei_ei_smooth; in iep_control()
398 msg->dein_high_fre_fct = dei_cfg->dei_high_freq_fct; in iep_control()
400 switch (msg->dein_mode) { in iep_control()
402 msg->dein_mode = IEP_DEI_MODE_BYPASS; in iep_control()
408 if (!msg->src1.mem_addr) in iep_control()
409 memcpy(&msg->src1, &msg->src, sizeof(msg->src)); in iep_control()
410 if (!msg->dst1.mem_addr) in iep_control()
411 memcpy(&msg->dst1, &msg->dst, sizeof(msg->dst)); in iep_control()
420 memcpy(&msg->src1, param, sizeof(IepImg)); in iep_control()
429 memcpy(&msg->dst1, param, sizeof(IepImg)); in iep_control()
439 msg->yuv_enhance_en = 1; in iep_control()
441 msg->sat_con_int = 0x80; in iep_control()
442 msg->contrast_int = 0x80; in iep_control()
444 msg->cos_hue_int = 0x00; in iep_control()
445 msg->sin_hue_int = 0x80; in iep_control()
447 msg->yuv_enh_brightness = 0x00; in iep_control()
449 msg->video_mode = IEP_VIDEO_MODE_NORMAL_VIDEO; in iep_control()
451 msg->color_bar_u = 0; in iep_control()
452 msg->color_bar_v = 0; in iep_control()
453 msg->color_bar_y = 0; in iep_control()
462 if (msg->src.format >= 1 && msg->src.format <= 5 && in iep_control()
463 msg->dst.format >= 1 && msg->dst.format <= 5) { in iep_control()
469 msg->yuv_enhance_en = 1; in iep_control()
471 msg->sat_con_int = (RK_S32)(yuv_enh->saturation * yuv_enh->contrast * 128); in iep_control()
472 msg->contrast_int = (RK_S32)(yuv_enh->contrast * 128); in iep_control()
473 msg->cos_hue_int = (RK_S32)(cos(yuv_enh->hue_angle) * 128.0); in iep_control()
474 msg->sin_hue_int = (RK_S32)(sin(yuv_enh->hue_angle) * 128.0); in iep_control()
475 msg->yuv_enh_brightness = yuv_enh->brightness >= 0 ? in iep_control()
479 msg->video_mode = yuv_enh->video_mode; in iep_control()
480 msg->color_bar_y = yuv_enh->color_bar_y; in iep_control()
481 msg->color_bar_u = yuv_enh->color_bar_u; in iep_control()
482 msg->color_bar_v = yuv_enh->color_bar_v; in iep_control()
489 msg->rgb_color_enhance_en = 1; in iep_control()
490 msg->rgb_enh_coe = 32; in iep_control()
491 msg->rgb_contrast_enhance_mode = IEP_RGB_ENHANCE_MODE_DETAIL_ENHANCE; in iep_control()
492 msg->rgb_cg_en = 0; in iep_control()
493 msg->enh_threshold = 255; in iep_control()
494 msg->enh_alpha = 8; in iep_control()
495 msg->enh_radius = 3; in iep_control()
498 msg->cg_tab[i] = cg_tab[i]; in iep_control()
508 if ((msg->src.format & IEP_FORMAT_YUV_BASE) && in iep_control()
509 (msg->dst.format & IEP_FORMAT_YUV_BASE)) { in iep_control()
515 msg->rgb_color_enhance_en = 1; in iep_control()
516 msg->rgb_enh_coe = (RK_U32)(rgb_enh->coe * 32); in iep_control()
517 msg->rgb_contrast_enhance_mode = rgb_enh->order; in iep_control()
518 msg->rgb_cg_en = rgb_enh->cg_en; in iep_control()
519 msg->rgb_enhance_mode = rgb_enh->mode; in iep_control()
521 msg->enh_threshold = rgb_enh->threshold; in iep_control()
522 msg->enh_alpha = in iep_control()
524 msg->enh_radius = rgb_enh->radius - 1; in iep_control()
527 setup_cg_tab(rgb_enh->cg_rb, msg->cg_tab); in iep_control()
528 setup_cg_tab(rgb_enh->cg_rg, msg->cg_tab + 64); in iep_control()
529 setup_cg_tab(rgb_enh->cg_rb, msg->cg_tab + 128); in iep_control()
535 msg->scale_up_mode = (scale) ? (scale->scale_alg) : (IEP_SCALE_ALG_CATROM); in iep_control()
541 msg->rgb2yuv_mode = IEP_COLOR_MODE_BT601_L; in iep_control()
542 msg->yuv2rgb_mode = IEP_COLOR_MODE_BT601_L; in iep_control()
543 msg->rgb2yuv_clip_en = 0; in iep_control()
544 msg->yuv2rgb_clip_en = 0; in iep_control()
545 msg->global_alpha_value = 0; in iep_control()
546 msg->dither_up_en = 1; in iep_control()
547 msg->dither_down_en = 1; in iep_control()
551 if (color_cvt->dither_up_en && msg->src.format != IEP_FORMAT_RGB_565) { in iep_control()
557 if (color_cvt->dither_down_en && msg->dst.format != IEP_FORMAT_RGB_565) { in iep_control()
563 msg->rgb2yuv_mode = color_cvt->rgb2yuv_mode; in iep_control()
564 msg->yuv2rgb_mode = color_cvt->yuv2rgb_mode; in iep_control()
565 msg->rgb2yuv_clip_en = color_cvt->rgb2yuv_input_clip; in iep_control()
566 msg->yuv2rgb_clip_en = color_cvt->yuv2rgb_input_clip; in iep_control()
567 msg->global_alpha_value = color_cvt->global_alpha_value; in iep_control()
568 msg->dither_up_en = color_cvt->dither_up_en; in iep_control()
569 msg->dither_down_en = color_cvt->dither_down_en; in iep_control()
572 check_msg_image(msg); in iep_control()
574 int ops_ret = ioctl(impl->fd, IEP_SET_PARAMETER, msg); in iep_control()