Lines Matching refs:frame
278 struct mtk_mdp_frame *frame; in mtk_mdp_try_crop() local
293 frame = mtk_mdp_ctx_get_frame(ctx, type); in mtk_mdp_try_crop()
294 max_w = frame->width; in mtk_mdp_try_crop()
295 max_h = frame->height; in mtk_mdp_try_crop()
309 max_w = frame->height; in mtk_mdp_try_crop()
310 max_h = frame->width; in mtk_mdp_try_crop()
378 static void mtk_mdp_set_frame_size(struct mtk_mdp_frame *frame, int width, in mtk_mdp_set_frame_size() argument
381 frame->width = width; in mtk_mdp_set_frame_size()
382 frame->height = height; in mtk_mdp_set_frame_size()
383 frame->crop.width = width; in mtk_mdp_set_frame_size()
384 frame->crop.height = height; in mtk_mdp_set_frame_size()
385 frame->crop.left = 0; in mtk_mdp_set_frame_size()
386 frame->crop.top = 0; in mtk_mdp_set_frame_size()
428 struct mtk_mdp_frame *frame, in mtk_mdp_prepare_addr() argument
433 pix_size = frame->width * frame->height; in mtk_mdp_prepare_addr()
434 planes = min_t(u32, frame->fmt->num_planes, ARRAY_SIZE(addr->addr)); in mtk_mdp_prepare_addr()
439 if (frame->fmt->pixelformat == V4L2_PIX_FMT_YVU420) { in mtk_mdp_prepare_addr()
446 frame->fmt->pixelformat); in mtk_mdp_prepare_addr()
545 struct mtk_mdp_frame *frame; in mtk_mdp_m2m_queue_setup() local
548 frame = mtk_mdp_ctx_get_frame(ctx, vq->type); in mtk_mdp_m2m_queue_setup()
549 *num_planes = frame->fmt->num_planes; in mtk_mdp_m2m_queue_setup()
550 for (i = 0; i < frame->fmt->num_planes; i++) in mtk_mdp_m2m_queue_setup()
551 sizes[i] = frame->payload[i]; in mtk_mdp_m2m_queue_setup()
561 struct mtk_mdp_frame *frame; in mtk_mdp_m2m_buf_prepare() local
564 frame = mtk_mdp_ctx_get_frame(ctx, vb->vb2_queue->type); in mtk_mdp_m2m_buf_prepare()
567 for (i = 0; i < frame->fmt->num_planes; i++) in mtk_mdp_m2m_buf_prepare()
568 vb2_set_plane_payload(vb, i, frame->payload[i]); in mtk_mdp_m2m_buf_prepare()
633 struct mtk_mdp_frame *frame; in mtk_mdp_m2m_g_fmt_mplane() local
639 frame = mtk_mdp_ctx_get_frame(ctx, f->type); in mtk_mdp_m2m_g_fmt_mplane()
642 pix_mp->width = frame->width; in mtk_mdp_m2m_g_fmt_mplane()
643 pix_mp->height = frame->height; in mtk_mdp_m2m_g_fmt_mplane()
645 pix_mp->pixelformat = frame->fmt->pixelformat; in mtk_mdp_m2m_g_fmt_mplane()
646 pix_mp->num_planes = frame->fmt->num_planes; in mtk_mdp_m2m_g_fmt_mplane()
655 pix_mp->plane_fmt[i].bytesperline = (frame->width * in mtk_mdp_m2m_g_fmt_mplane()
656 frame->fmt->row_depth[i]) / 8; in mtk_mdp_m2m_g_fmt_mplane()
657 pix_mp->plane_fmt[i].sizeimage = (frame->width * in mtk_mdp_m2m_g_fmt_mplane()
658 frame->height * frame->fmt->depth[i]) / 8; in mtk_mdp_m2m_g_fmt_mplane()
683 struct mtk_mdp_frame *frame; in mtk_mdp_m2m_s_fmt_mplane() local
690 frame = mtk_mdp_ctx_get_frame(ctx, f->type); in mtk_mdp_m2m_s_fmt_mplane()
696 frame->fmt = fmt; in mtk_mdp_m2m_s_fmt_mplane()
705 for (i = 0; i < frame->fmt->num_planes; i++) { in mtk_mdp_m2m_s_fmt_mplane()
706 frame->payload[i] = pix_mp->plane_fmt[i].sizeimage; in mtk_mdp_m2m_s_fmt_mplane()
707 frame->pitch[i] = pix_mp->plane_fmt[i].bytesperline; in mtk_mdp_m2m_s_fmt_mplane()
710 mtk_mdp_set_frame_size(frame, pix_mp->width, pix_mp->height); in mtk_mdp_m2m_s_fmt_mplane()
719 frame->width, frame->height); in mtk_mdp_m2m_s_fmt_mplane()
773 struct mtk_mdp_frame *frame; in mtk_mdp_m2m_g_selection() local
790 frame = mtk_mdp_ctx_get_frame(ctx, s->type); in mtk_mdp_m2m_g_selection()
799 s->r.width = frame->width; in mtk_mdp_m2m_g_selection()
800 s->r.height = frame->height; in mtk_mdp_m2m_g_selection()
805 s->r.left = frame->crop.left; in mtk_mdp_m2m_g_selection()
806 s->r.top = frame->crop.top; in mtk_mdp_m2m_g_selection()
807 s->r.width = frame->crop.width; in mtk_mdp_m2m_g_selection()
808 s->r.height = frame->crop.height; in mtk_mdp_m2m_g_selection()
840 struct mtk_mdp_frame *frame; in mtk_mdp_m2m_s_selection() local
866 frame = &ctx->s_frame; in mtk_mdp_m2m_s_selection()
868 frame = &ctx->d_frame; in mtk_mdp_m2m_s_selection()
889 frame->crop = new_r; in mtk_mdp_m2m_s_selection()
1030 struct mtk_mdp_frame *frame; in mtk_mdp_set_default_params() local
1032 frame = mtk_mdp_ctx_get_frame(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE); in mtk_mdp_set_default_params()
1033 frame->fmt = mtk_mdp_find_fmt_by_index(0, in mtk_mdp_set_default_params()
1035 frame->width = mdp->variant->pix_min->org_w; in mtk_mdp_set_default_params()
1036 frame->height = mdp->variant->pix_min->org_h; in mtk_mdp_set_default_params()
1037 frame->payload[0] = frame->width * frame->height; in mtk_mdp_set_default_params()
1038 frame->payload[1] = frame->payload[0] / 2; in mtk_mdp_set_default_params()
1040 frame = mtk_mdp_ctx_get_frame(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE); in mtk_mdp_set_default_params()
1041 frame->fmt = mtk_mdp_find_fmt_by_index(0, in mtk_mdp_set_default_params()
1043 frame->width = mdp->variant->pix_min->target_rot_dis_w; in mtk_mdp_set_default_params()
1044 frame->height = mdp->variant->pix_min->target_rot_dis_h; in mtk_mdp_set_default_params()
1045 frame->payload[0] = frame->width * frame->height; in mtk_mdp_set_default_params()
1046 frame->payload[1] = frame->payload[0] / 2; in mtk_mdp_set_default_params()