Lines Matching full:format
18 struct v4l2_pix_format format; member
71 *fmt = vcap->format; in vimc_cap_get_format()
79 f->fmt.pix = vcap->format; in vimc_cap_g_fmt_vid_cap()
87 struct v4l2_pix_format *format = &f->fmt.pix; in vimc_cap_try_fmt_vid_cap() local
90 format->width = clamp_t(u32, format->width, VIMC_FRAME_MIN_WIDTH, in vimc_cap_try_fmt_vid_cap()
92 format->height = clamp_t(u32, format->height, VIMC_FRAME_MIN_HEIGHT, in vimc_cap_try_fmt_vid_cap()
96 vpix = vimc_pix_map_by_pixelformat(format->pixelformat); in vimc_cap_try_fmt_vid_cap()
98 format->pixelformat = fmt_default.pixelformat; in vimc_cap_try_fmt_vid_cap()
99 vpix = vimc_pix_map_by_pixelformat(format->pixelformat); in vimc_cap_try_fmt_vid_cap()
102 format->bytesperline = format->width * vpix->bpp; in vimc_cap_try_fmt_vid_cap()
103 format->sizeimage = format->bytesperline * format->height; in vimc_cap_try_fmt_vid_cap()
105 if (format->field == V4L2_FIELD_ANY) in vimc_cap_try_fmt_vid_cap()
106 format->field = fmt_default.field; in vimc_cap_try_fmt_vid_cap()
108 vimc_colorimetry_clamp(format); in vimc_cap_try_fmt_vid_cap()
110 if (format->colorspace == V4L2_COLORSPACE_DEFAULT) in vimc_cap_try_fmt_vid_cap()
111 format->colorspace = fmt_default.colorspace; in vimc_cap_try_fmt_vid_cap()
122 /* Do not change the format while stream is on */ in vimc_cap_s_fmt_vid_cap()
130 dev_dbg(vcap->ved.dev, "%s: format update: " in vimc_cap_s_fmt_vid_cap()
134 vcap->format.width, vcap->format.height, in vimc_cap_s_fmt_vid_cap()
135 vcap->format.pixelformat, vcap->format.colorspace, in vimc_cap_s_fmt_vid_cap()
136 vcap->format.quantization, vcap->format.xfer_func, in vimc_cap_s_fmt_vid_cap()
137 vcap->format.ycbcr_enc, in vimc_cap_s_fmt_vid_cap()
144 vcap->format = f->fmt.pix; in vimc_cap_s_fmt_vid_cap()
301 return sizes[0] < vcap->format.sizeimage ? -EINVAL : 0; in vimc_cap_queue_setup()
304 sizes[0] = vcap->format.sizeimage; in vimc_cap_queue_setup()
312 unsigned long size = vcap->format.sizeimage; in vimc_cap_buffer_prepare()
383 vimc_buf->vb2.field = vcap->format.field; in vimc_cap_process_frame()
387 memcpy(vbuf, frame, vcap->format.sizeimage); in vimc_cap_process_frame()
391 vcap->format.sizeimage); in vimc_cap_process_frame()
446 /* Set default frame format */ in vimc_cap_add()
447 vcap->format = fmt_default; in vimc_cap_add()
448 vpix = vimc_pix_map_by_pixelformat(vcap->format.pixelformat); in vimc_cap_add()
449 vcap->format.bytesperline = vcap->format.width * vpix->bpp; in vimc_cap_add()
450 vcap->format.sizeimage = vcap->format.bytesperline * in vimc_cap_add()
451 vcap->format.height; in vimc_cap_add()