Lines Matching defs:csc_handle
110 } CSC_HANDLE;
114 CSC_HANDLE *handle)
148 CSC_HANDLE *handle)
190 CSC_HANDLE *handle)
228 CSC_HANDLE *handle)
262 CSC_HANDLE *handle)
288 CSC_HANDLE *handle)
360 CSC_HANDLE *csc_handle;
363 csc_handle = (CSC_HANDLE *)handle;
364 if (csc_handle->csc_method == CSC_METHOD_HW) {
365 switch (csc_handle->csc_hw_type) {
368 csc_handle->csc_hw_handle = csc_hwconverter_open();
374 if (csc_handle->hw_property.fixed_node >= 0)
375 csc_handle->csc_hw_handle = exynos_gsc_create_exclusive(csc_handle->hw_property.fixed_node, GSC_M2M_MODE, 0, 0);
377 csc_handle->csc_hw_handle = exynos_gsc_create();
394 csc_handle->csc_hw_handle = g2d;
401 csc_handle->csc_hw_handle = NULL;
406 if (csc_handle->csc_method == CSC_METHOD_HW) {
407 if (csc_handle->csc_hw_handle == NULL) {
413 ALOGV("%s:: CSC_METHOD=%d", __func__, csc_handle->csc_method);
421 CSC_HANDLE *csc_handle;
427 csc_handle = (CSC_HANDLE *)handle;
428 if (csc_handle->csc_method == CSC_METHOD_HW) {
429 switch (csc_handle->csc_hw_type) {
435 csc_handle->csc_hw_handle,
436 ALIGN(csc_handle->src_format.width, GSCALER_IMG_ALIGN),
437 ALIGN(csc_handle->src_format.height, GSCALER_IMG_ALIGN),
438 csc_handle->src_format.crop_left,
439 csc_handle->src_format.crop_top,
440 csc_handle->src_format.crop_width,
441 csc_handle->src_format.crop_height,
442 HAL_PIXEL_FORMAT_2_V4L2_PIX(csc_handle->src_format.color_format),
443 csc_handle->src_format.cacheable,
444 csc_handle->hw_property.mode_drm);
447 csc_handle->csc_hw_handle,
448 ALIGN(csc_handle->dst_format.width, GSCALER_IMG_ALIGN),
449 ALIGN(csc_handle->dst_format.height, GSCALER_IMG_ALIGN),
450 csc_handle->dst_format.crop_left,
451 csc_handle->dst_format.crop_top,
452 csc_handle->dst_format.crop_width,
453 csc_handle->dst_format.crop_height,
454 HAL_PIXEL_FORMAT_2_V4L2_PIX(csc_handle->dst_format.color_format),
455 csc_handle->dst_format.cacheable,
456 csc_handle->hw_property.mode_drm,
463 g2d_data *g2d = (g2d_data *)csc_handle->csc_hw_handle;
465 g2d->src.width = ALIGN(csc_handle->src_format.width,
467 g2d->src.height = csc_handle->src_format.height;
469 hal_2_g2d_bpp(csc_handle->src_format.color_format) >> 3;
470 g2d->src.order = hal_2_g2d_pixel_order(csc_handle->src_format.color_format);
471 g2d->src.fmt = hal_2_g2d_color_format(csc_handle->src_format.color_format);
472 g2d->src.rect.x1 = csc_handle->src_format.crop_left;
473 g2d->src.rect.y1 = csc_handle->src_format.crop_top;
474 g2d->src.rect.x2 = csc_handle->src_format.crop_left +
475 csc_handle->src_format.crop_width;
476 g2d->src.rect.y2 = csc_handle->src_format.crop_top +
477 csc_handle->src_format.crop_height;
479 g2d->dst.width = ALIGN(csc_handle->dst_format.width,
481 g2d->dst.height = csc_handle->dst_format.height;
483 hal_2_g2d_bpp(csc_handle->dst_format.color_format) >> 3;
484 g2d->dst.order = hal_2_g2d_pixel_order(csc_handle->dst_format.color_format);
485 g2d->dst.fmt = hal_2_g2d_color_format(csc_handle->dst_format.color_format);
486 g2d->dst.rect.x1 = csc_handle->dst_format.crop_left;
487 g2d->dst.rect.y1 = csc_handle->dst_format.crop_top;
488 g2d->dst.rect.x2 = csc_handle->dst_format.crop_left +
489 csc_handle->dst_format.crop_width;
490 g2d->dst.rect.y2 = csc_handle->dst_format.crop_top +
491 csc_handle->dst_format.crop_height;
508 CSC_HANDLE *csc_handle;
514 csc_handle = (CSC_HANDLE *)handle;
515 if (csc_handle->csc_method == CSC_METHOD_HW) {
516 switch (csc_handle->csc_hw_type) {
521 exynos_gsc_set_src_addr(csc_handle->csc_hw_handle, csc_handle->src_buffer.planes, -1);
522 exynos_gsc_set_dst_addr(csc_handle->csc_hw_handle, csc_handle->dst_buffer.planes, -1);
528 g2d_data *g2d = (g2d_data *)csc_handle->csc_hw_handle;
531 g2d->src.addr.fd[0] = (int)csc_handle->src_buffer.planes[0];
532 g2d->src.addr.fd[1] = (int)csc_handle->src_buffer.planes[1];
535 g2d->dst.addr.fd[0] = (int)csc_handle->dst_buffer.planes[0];
536 g2d->dst.addr.fd[1] = (int)csc_handle->dst_buffer.planes[1];
553 CSC_HANDLE *csc_handle;
554 csc_handle = (CSC_HANDLE *)malloc(sizeof(CSC_HANDLE));
555 if (csc_handle == NULL)
558 memset(csc_handle, 0, sizeof(CSC_HANDLE));
559 csc_handle->hw_property.fixed_node = -1;
560 csc_handle->hw_property.mode_drm = 0;
561 csc_handle->csc_method = method;
563 return (void *)csc_handle;
570 CSC_HANDLE *csc_handle;
572 csc_handle = (CSC_HANDLE *)handle;
573 if (csc_handle->csc_hw_handle) {
574 switch (csc_handle->csc_hw_type) {
577 csc_hwconverter_close(csc_handle->csc_hw_handle);
582 exynos_gsc_destroy(csc_handle->csc_hw_handle);
588 g2d_data *g2d = (g2d_data *)csc_handle->csc_hw_handle;
600 if (csc_handle != NULL) {
601 free(csc_handle);
612 CSC_HANDLE *csc_handle;
618 csc_handle = (CSC_HANDLE *)handle;
619 *method = csc_handle->csc_method;
628 CSC_HANDLE *csc_handle;
634 csc_handle = (CSC_HANDLE *)handle;
635 csc_handle->csc_method = method;
645 CSC_HANDLE *csc_handle;
651 csc_handle = (CSC_HANDLE *)handle;
653 if (csc_handle->csc_hw_handle) {
660 csc_handle->hw_property.fixed_node = value;
663 csc_handle->hw_property.mode_drm = value;
666 csc_handle->csc_hw_type = value;
687 CSC_HANDLE *csc_handle;
693 csc_handle = (CSC_HANDLE *)handle;
694 *width = csc_handle->src_format.width;
695 *height = csc_handle->src_format.height;
696 *crop_left = csc_handle->src_format.crop_left;
697 *crop_top = csc_handle->src_format.crop_top;
698 *crop_width = csc_handle->src_format.crop_width;
699 *crop_height = csc_handle->src_format.crop_height;
700 *color_format = csc_handle->src_format.color_format;
701 *cacheable = csc_handle->src_format.cacheable;
717 CSC_HANDLE *csc_handle;
723 csc_handle = (CSC_HANDLE *)handle;
724 csc_handle->src_format.width = width;
725 csc_handle->src_format.height = height;
726 csc_handle->src_format.crop_left = crop_left;
727 csc_handle->src_format.crop_top = crop_top;
728 csc_handle->src_format.crop_width = crop_width;
729 csc_handle->src_format.crop_height = crop_height;
730 csc_handle->src_format.color_format = color_format;
731 csc_handle->src_format.cacheable = cacheable;
747 CSC_HANDLE *csc_handle;
753 csc_handle = (CSC_HANDLE *)handle;
754 *width = csc_handle->dst_format.width;
755 *height = csc_handle->dst_format.height;
756 *crop_left = csc_handle->dst_format.crop_left;
757 *crop_top = csc_handle->dst_format.crop_top;
758 *crop_width = csc_handle->dst_format.crop_width;
759 *crop_height = csc_handle->dst_format.crop_height;
760 *color_format = csc_handle->dst_format.color_format;
761 *cacheable = csc_handle->dst_format.cacheable;
777 CSC_HANDLE *csc_handle;
783 csc_handle = (CSC_HANDLE *)handle;
784 csc_handle->dst_format.width = width;
785 csc_handle->dst_format.height = height;
786 csc_handle->dst_format.crop_left = crop_left;
787 csc_handle->dst_format.crop_top = crop_top;
788 csc_handle->dst_format.crop_width = crop_width;
789 csc_handle->dst_format.crop_height = crop_height;
790 csc_handle->dst_format.color_format = color_format;
791 csc_handle->dst_format.cacheable = cacheable;
800 CSC_HANDLE *csc_handle;
806 csc_handle = (CSC_HANDLE *)handle;
807 csc_handle->src_buffer.planes[CSC_Y_PLANE] = addr[0];
808 csc_handle->src_buffer.planes[CSC_U_PLANE] = addr[1];
809 csc_handle->src_buffer.planes[CSC_V_PLANE] = addr[2];
818 CSC_HANDLE *csc_handle;
824 csc_handle = (CSC_HANDLE *)handle;
825 csc_handle->dst_buffer.planes[CSC_Y_PLANE] = addr[0];
826 csc_handle->dst_buffer.planes[CSC_U_PLANE] = addr[1];
827 csc_handle->dst_buffer.planes[CSC_V_PLANE] = addr[2];
835 CSC_HANDLE *csc_handle = (CSC_HANDLE *)handle;
838 if (csc_handle == NULL)
841 if ((csc_handle->csc_method == CSC_METHOD_HW) &&
842 (csc_handle->csc_hw_handle == NULL)) {
848 ret = csc_set_format(csc_handle);
852 ret = csc_set_buffer(csc_handle);
856 if (csc_handle->csc_method == CSC_METHOD_HW)
857 ret = conv_hw(csc_handle);
859 ret = conv_sw(csc_handle);