Lines Matching full:pix

121 				    struct v4l2_pix_format *pix)  in rvin_format_bytesperline()  argument
126 fmt = rvin_format_from_pixel(vin, pix->pixelformat); in rvin_format_bytesperline()
131 switch (pix->pixelformat) { in rvin_format_bytesperline()
141 if (V4L2_FIELD_IS_SEQUENTIAL(pix->field)) in rvin_format_bytesperline()
144 return ALIGN(pix->width, align) * fmt->bpp; in rvin_format_bytesperline()
147 static u32 rvin_format_sizeimage(struct v4l2_pix_format *pix) in rvin_format_sizeimage() argument
149 switch (pix->pixelformat) { in rvin_format_sizeimage()
151 return pix->bytesperline * pix->height * 3 / 2; in rvin_format_sizeimage()
153 return pix->bytesperline * pix->height * 2; in rvin_format_sizeimage()
155 return pix->bytesperline * pix->height; in rvin_format_sizeimage()
159 static void rvin_format_align(struct rvin_dev *vin, struct v4l2_pix_format *pix) in rvin_format_align() argument
163 if (!rvin_format_from_pixel(vin, pix->pixelformat)) in rvin_format_align()
164 pix->pixelformat = RVIN_DEFAULT_FORMAT; in rvin_format_align()
166 switch (pix->field) { in rvin_format_align()
178 pix->field = RVIN_DEFAULT_FIELD; in rvin_format_align()
183 switch (pix->pixelformat) { in rvin_format_align()
201 v4l_bound_align_image(&pix->width, 5, vin->info->max_width, walign, in rvin_format_align()
202 &pix->height, 2, vin->info->max_height, 0, 0); in rvin_format_align()
204 pix->bytesperline = rvin_format_bytesperline(vin, pix); in rvin_format_align()
205 pix->sizeimage = rvin_format_sizeimage(pix); in rvin_format_align()
208 pix->width, pix->height, pix->bytesperline, pix->sizeimage); in rvin_format_align()
251 struct v4l2_pix_format *pix, in rvin_try_format() argument
273 if (!rvin_format_from_pixel(vin, pix->pixelformat)) in rvin_try_format()
274 pix->pixelformat = RVIN_DEFAULT_FORMAT; in rvin_try_format()
276 v4l2_fill_mbus_format(&format.format, pix, vin->mbus_code); in rvin_try_format()
279 field = pix->field; in rvin_try_format()
280 width = pix->width; in rvin_try_format()
281 height = pix->height; in rvin_try_format()
288 v4l2_fill_pix_format(pix, &format.format); in rvin_try_format()
293 src_rect->width = pix->width; in rvin_try_format()
294 src_rect->height = pix->height; in rvin_try_format()
298 pix->field = field; in rvin_try_format()
300 pix->width = width; in rvin_try_format()
301 pix->height = height; in rvin_try_format()
303 rvin_format_align(vin, pix); in rvin_try_format()
323 return rvin_try_format(vin, V4L2_SUBDEV_FORMAT_TRY, &f->fmt.pix, NULL); in rvin_try_fmt_vid_cap()
336 ret = rvin_try_format(vin, V4L2_SUBDEV_FORMAT_ACTIVE, &f->fmt.pix, in rvin_s_fmt_vid_cap()
341 vin->format = f->fmt.pix; in rvin_s_fmt_vid_cap()
359 f->fmt.pix = vin->format; in rvin_g_fmt_vid_cap()
869 struct v4l2_pix_format *pix) in rvin_mc_try_format() argument
877 pix->colorspace = RVIN_DEFAULT_COLORSPACE; in rvin_mc_try_format()
878 pix->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(pix->colorspace); in rvin_mc_try_format()
879 pix->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(pix->colorspace); in rvin_mc_try_format()
880 pix->quantization = V4L2_MAP_QUANTIZATION_DEFAULT(true, pix->colorspace, in rvin_mc_try_format()
881 pix->ycbcr_enc); in rvin_mc_try_format()
883 rvin_format_align(vin, pix); in rvin_mc_try_format()
891 rvin_mc_try_format(vin, &f->fmt.pix); in rvin_mc_try_fmt_vid_cap()
904 rvin_mc_try_format(vin, &f->fmt.pix); in rvin_mc_s_fmt_vid_cap()
906 vin->format = f->fmt.pix; in rvin_mc_s_fmt_vid_cap()