Lines Matching full:pix

281 static bool ceu_fmt_mplane(struct v4l2_pix_format_mplane *pix)  in ceu_fmt_mplane()  argument
283 switch (pix->pixelformat) { in ceu_fmt_mplane()
352 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_hw_config() local
364 capwr = (pix->height << 16) | pix->width * mbus_fmt->bpp / 8; in ceu_hw_config()
393 switch (pix->pixelformat) { in ceu_hw_config()
401 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config()
402 cdwdr = pix->plane_fmt[0].bytesperline; in ceu_hw_config()
415 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config()
416 cdwdr = pix->width; in ceu_hw_config()
429 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config()
430 cdwdr = pix->width; in ceu_hw_config()
467 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_capture() local
475 if (ceu_fmt_mplane(pix)) { in ceu_capture()
576 * @pix: Pixel format information (store line width and image sizes)
580 struct v4l2_pix_format_mplane *pix) in ceu_calc_plane_sizes() argument
584 switch (pix->pixelformat) { in ceu_calc_plane_sizes()
589 pix->num_planes = 1; in ceu_calc_plane_sizes()
590 bpl = pix->width * ceu_fmt->bpp / 8; in ceu_calc_plane_sizes()
591 szimage = pix->height * bpl; in ceu_calc_plane_sizes()
592 ceu_update_plane_sizes(&pix->plane_fmt[0], bpl, szimage); in ceu_calc_plane_sizes()
597 pix->num_planes = 2; in ceu_calc_plane_sizes()
598 bpl = pix->width; in ceu_calc_plane_sizes()
599 szimage = pix->height * pix->width; in ceu_calc_plane_sizes()
600 ceu_update_plane_sizes(&pix->plane_fmt[0], bpl, szimage); in ceu_calc_plane_sizes()
601 ceu_update_plane_sizes(&pix->plane_fmt[1], bpl, szimage / 2); in ceu_calc_plane_sizes()
607 pix->num_planes = 2; in ceu_calc_plane_sizes()
608 bpl = pix->width; in ceu_calc_plane_sizes()
609 szimage = pix->height * pix->width; in ceu_calc_plane_sizes()
610 ceu_update_plane_sizes(&pix->plane_fmt[0], bpl, szimage); in ceu_calc_plane_sizes()
611 ceu_update_plane_sizes(&pix->plane_fmt[1], bpl, szimage); in ceu_calc_plane_sizes()
626 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_vb2_setup() local
631 for (i = 0; i < pix->num_planes; i++) in ceu_vb2_setup()
632 if (sizes[i] < pix->plane_fmt[i].sizeimage) in ceu_vb2_setup()
639 *num_planes = pix->num_planes; in ceu_vb2_setup()
640 for (i = 0; i < pix->num_planes; i++) in ceu_vb2_setup()
641 sizes[i] = pix->plane_fmt[i].sizeimage; in ceu_vb2_setup()
661 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_vb2_prepare() local
664 for (i = 0; i < pix->num_planes; i++) { in ceu_vb2_prepare()
665 if (vb2_plane_size(vb, i) < pix->plane_fmt[i].sizeimage) { in ceu_vb2_prepare()
669 pix->plane_fmt[i].sizeimage); in ceu_vb2_prepare()
673 vb2_set_plane_payload(vb, i, pix->plane_fmt[i].sizeimage); in ceu_vb2_prepare()
794 struct v4l2_pix_format_mplane *pix = &v4l2_fmt->fmt.pix_mp; in __ceu_try_fmt() local
816 switch (pix->pixelformat) { in __ceu_try_fmt()
837 pix->pixelformat = V4L2_PIX_FMT_NV16; in __ceu_try_fmt()
842 ceu_fmt = get_ceu_fmt_from_fourcc(pix->pixelformat); in __ceu_try_fmt()
845 v4l_bound_align_image(&pix->width, 2, CEU_MAX_WIDTH, 4, in __ceu_try_fmt()
846 &pix->height, 4, CEU_MAX_HEIGHT, 4, 0); in __ceu_try_fmt()
848 v4l2_fill_mbus_format_mplane(&sd_format.format, pix); in __ceu_try_fmt()
870 v4l2_fill_pix_format_mplane(pix, &sd_format.format); in __ceu_try_fmt()
873 ceu_calc_plane_sizes(ceudev, ceu_fmt, pix); in __ceu_try_fmt()