Lines Matching refs:pix
280 static bool ceu_fmt_mplane(struct v4l2_pix_format_mplane *pix) in ceu_fmt_mplane() argument
282 switch (pix->pixelformat) { in ceu_fmt_mplane()
351 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_hw_config() local
363 capwr = (pix->height << 16) | pix->width * mbus_fmt->bpp / 8; in ceu_hw_config()
392 switch (pix->pixelformat) { in ceu_hw_config()
400 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config()
401 cdwdr = pix->plane_fmt[0].bytesperline; in ceu_hw_config()
414 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config()
415 cdwdr = pix->width; in ceu_hw_config()
428 cfzsr = (pix->height << 16) | pix->width; in ceu_hw_config()
429 cdwdr = pix->width; in ceu_hw_config()
466 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_capture() local
474 if (ceu_fmt_mplane(pix)) { in ceu_capture()
579 struct v4l2_pix_format_mplane *pix) in ceu_calc_plane_sizes() argument
583 switch (pix->pixelformat) { in ceu_calc_plane_sizes()
588 pix->num_planes = 1; in ceu_calc_plane_sizes()
589 bpl = pix->width * ceu_fmt->bpp / 8; in ceu_calc_plane_sizes()
590 szimage = pix->height * bpl; in ceu_calc_plane_sizes()
591 ceu_update_plane_sizes(&pix->plane_fmt[0], bpl, szimage); in ceu_calc_plane_sizes()
596 pix->num_planes = 2; in ceu_calc_plane_sizes()
597 bpl = pix->width; in ceu_calc_plane_sizes()
598 szimage = pix->height * pix->width; in ceu_calc_plane_sizes()
599 ceu_update_plane_sizes(&pix->plane_fmt[0], bpl, szimage); in ceu_calc_plane_sizes()
600 ceu_update_plane_sizes(&pix->plane_fmt[1], bpl, szimage / 2); in ceu_calc_plane_sizes()
606 pix->num_planes = 2; in ceu_calc_plane_sizes()
607 bpl = pix->width; in ceu_calc_plane_sizes()
608 szimage = pix->height * pix->width; in ceu_calc_plane_sizes()
609 ceu_update_plane_sizes(&pix->plane_fmt[0], bpl, szimage); in ceu_calc_plane_sizes()
610 ceu_update_plane_sizes(&pix->plane_fmt[1], bpl, szimage); in ceu_calc_plane_sizes()
625 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_vb2_setup() local
630 for (i = 0; i < pix->num_planes; i++) in ceu_vb2_setup()
631 if (sizes[i] < pix->plane_fmt[i].sizeimage) in ceu_vb2_setup()
638 *num_planes = pix->num_planes; in ceu_vb2_setup()
639 for (i = 0; i < pix->num_planes; i++) in ceu_vb2_setup()
640 sizes[i] = pix->plane_fmt[i].sizeimage; in ceu_vb2_setup()
660 struct v4l2_pix_format_mplane *pix = &ceudev->v4l2_pix; in ceu_vb2_prepare() local
663 for (i = 0; i < pix->num_planes; i++) { in ceu_vb2_prepare()
664 if (vb2_plane_size(vb, i) < pix->plane_fmt[i].sizeimage) { in ceu_vb2_prepare()
668 pix->plane_fmt[i].sizeimage); in ceu_vb2_prepare()
672 vb2_set_plane_payload(vb, i, pix->plane_fmt[i].sizeimage); in ceu_vb2_prepare()
784 struct v4l2_pix_format_mplane *pix = &v4l2_fmt->fmt.pix_mp; in __ceu_try_fmt() local
806 switch (pix->pixelformat) { in __ceu_try_fmt()
827 pix->pixelformat = V4L2_PIX_FMT_NV16; in __ceu_try_fmt()
832 ceu_fmt = get_ceu_fmt_from_fourcc(pix->pixelformat); in __ceu_try_fmt()
835 v4l_bound_align_image(&pix->width, 2, CEU_MAX_WIDTH, 4, in __ceu_try_fmt()
836 &pix->height, 4, CEU_MAX_HEIGHT, 4, 0); in __ceu_try_fmt()
838 v4l2_fill_mbus_format_mplane(&sd_format.format, pix); in __ceu_try_fmt()
860 v4l2_fill_pix_format_mplane(pix, &sd_format.format); in __ceu_try_fmt()
863 ceu_calc_plane_sizes(ceudev, ceu_fmt, pix); in __ceu_try_fmt()