Lines Matching full:pix

409 mxc_isi_format_try(struct mxc_isi_pipe *pipe, struct v4l2_pix_format_mplane *pix,  in mxc_isi_format_try()  argument
420 fmt = mxc_isi_format_by_fourcc(pix->pixelformat, type); in mxc_isi_format_try()
424 pix->width = clamp(pix->width, MXC_ISI_MIN_WIDTH, max_width); in mxc_isi_format_try()
425 pix->height = clamp(pix->height, MXC_ISI_MIN_HEIGHT, MXC_ISI_MAX_HEIGHT); in mxc_isi_format_try()
426 pix->pixelformat = fmt->fourcc; in mxc_isi_format_try()
427 pix->field = V4L2_FIELD_NONE; in mxc_isi_format_try()
429 if (pix->colorspace == V4L2_COLORSPACE_DEFAULT) { in mxc_isi_format_try()
430 pix->colorspace = MXC_ISI_DEF_COLOR_SPACE; in mxc_isi_format_try()
431 pix->ycbcr_enc = MXC_ISI_DEF_YCBCR_ENC; in mxc_isi_format_try()
432 pix->quantization = MXC_ISI_DEF_QUANTIZATION; in mxc_isi_format_try()
433 pix->xfer_func = MXC_ISI_DEF_XFER_FUNC; in mxc_isi_format_try()
436 if (pix->ycbcr_enc == V4L2_YCBCR_ENC_DEFAULT) in mxc_isi_format_try()
437 pix->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(pix->colorspace); in mxc_isi_format_try()
438 if (pix->quantization == V4L2_QUANTIZATION_DEFAULT) { in mxc_isi_format_try()
441 pix->quantization = in mxc_isi_format_try()
442 V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb, pix->colorspace, in mxc_isi_format_try()
443 pix->ycbcr_enc); in mxc_isi_format_try()
445 if (pix->xfer_func == V4L2_XFER_FUNC_DEFAULT) in mxc_isi_format_try()
446 pix->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(pix->colorspace); in mxc_isi_format_try()
448 pix->num_planes = fmt->mem_planes; in mxc_isi_format_try()
451 struct v4l2_plane_pix_format *plane = &pix->plane_fmt[i]; in mxc_isi_format_try()
457 pix->width * fmt->depth[0] / 8, in mxc_isi_format_try()
460 bpl = pix->plane_fmt[0].bytesperline; in mxc_isi_format_try()
464 plane->sizeimage = plane->bytesperline * pix->height; in mxc_isi_format_try()
476 struct v4l2_plane_pix_format *plane = &pix->plane_fmt[i]; in mxc_isi_format_try()
478 pix->plane_fmt[0].sizeimage += plane->sizeimage; in mxc_isi_format_try()
658 for (i = 0; i < video->pix.num_planes; i++) { in mxc_isi_video_free_discard_buffers()
675 for (i = 0; i < video->pix.num_planes; i++) { in mxc_isi_video_alloc_discard_buffers()
678 buf->size = PAGE_ALIGN(video->pix.plane_fmt[i].sizeimage); in mxc_isi_video_alloc_discard_buffers()
697 for (j = 0; j < video->pix.num_planes; ++j) in mxc_isi_video_alloc_discard_buffers()
714 info = mxc_isi_format_by_fourcc(video->pix.pixelformat, in mxc_isi_video_validate_format()
719 format->width != video->pix.width || in mxc_isi_video_validate_format()
720 format->height != video->pix.height) { in mxc_isi_video_validate_format()
724 info->mbus_code, video->pix.width, video->pix.height); in mxc_isi_video_validate_format()
838 const struct v4l2_pix_format_mplane *pix) in mxc_isi_video_buffer_init() argument
850 unsigned int size = pix->plane_fmt[0].bytesperline * pix->height; in mxc_isi_video_buffer_init()
862 const struct v4l2_pix_format_mplane *pix) in mxc_isi_video_buffer_prepare() argument
867 unsigned long size = pix->plane_fmt[i].sizeimage; in mxc_isi_video_buffer_prepare()
889 return mxc_isi_video_queue_setup(&video->pix, video->fmtinfo, in mxc_isi_vb2_queue_setup()
899 &video->pix); in mxc_isi_vb2_buffer_init()
909 video->fmtinfo, &video->pix); in mxc_isi_vb2_buffer_prepare()
934 mxc_isi_channel_set_output_format(pipe, video->fmtinfo, &video->pix); in mxc_isi_video_init_channel()
1118 f->fmt.pix_mp = video->pix; in mxc_isi_video_g_fmt()
1136 struct v4l2_pix_format_mplane *pix = &f->fmt.pix_mp; in mxc_isi_video_s_fmt() local
1141 video->fmtinfo = mxc_isi_format_try(video->pipe, pix, MXC_ISI_VIDEO_CAP); in mxc_isi_video_s_fmt()
1142 video->pix = *pix; in mxc_isi_video_s_fmt()
1410 struct v4l2_pix_format_mplane *pix = &video->pix; in mxc_isi_video_register() local
1420 pix->width = MXC_ISI_DEF_WIDTH; in mxc_isi_video_register()
1421 pix->height = MXC_ISI_DEF_HEIGHT; in mxc_isi_video_register()
1422 pix->pixelformat = MXC_ISI_DEF_PIXEL_FORMAT; in mxc_isi_video_register()
1423 pix->colorspace = MXC_ISI_DEF_COLOR_SPACE; in mxc_isi_video_register()
1424 pix->ycbcr_enc = MXC_ISI_DEF_YCBCR_ENC; in mxc_isi_video_register()
1425 pix->quantization = MXC_ISI_DEF_QUANTIZATION; in mxc_isi_video_register()
1426 pix->xfer_func = MXC_ISI_DEF_XFER_FUNC; in mxc_isi_video_register()
1427 video->fmtinfo = mxc_isi_format_try(video->pipe, pix, MXC_ISI_VIDEO_CAP); in mxc_isi_video_register()