Lines Matching refs:f
361 static int sh_veu_enum_fmt(struct v4l2_fmtdesc *f, const int *fmt, int fmt_num) in sh_veu_enum_fmt() argument
363 if (f->index >= fmt_num) in sh_veu_enum_fmt()
366 strlcpy(f->description, sh_veu_fmt[fmt[f->index]].name, sizeof(f->description)); in sh_veu_enum_fmt()
367 f->pixelformat = sh_veu_fmt[fmt[f->index]].fourcc; in sh_veu_enum_fmt()
372 struct v4l2_fmtdesc *f) in sh_veu_enum_fmt_vid_cap() argument
374 return sh_veu_enum_fmt(f, sh_veu_fmt_out, ARRAY_SIZE(sh_veu_fmt_out)); in sh_veu_enum_fmt_vid_cap()
378 struct v4l2_fmtdesc *f) in sh_veu_enum_fmt_vid_out() argument
380 return sh_veu_enum_fmt(f, sh_veu_fmt_in, ARRAY_SIZE(sh_veu_fmt_in)); in sh_veu_enum_fmt_vid_out()
396 static int sh_veu_g_fmt(struct sh_veu_file *veu_file, struct v4l2_format *f) in sh_veu_g_fmt() argument
398 struct v4l2_pix_format *pix = &f->fmt.pix; in sh_veu_g_fmt()
402 vfmt = sh_veu_get_vfmt(veu, f->type); in sh_veu_g_fmt()
413 f->type, pix->sizeimage, pix->width, pix->height, pix->pixelformat); in sh_veu_g_fmt()
419 struct v4l2_format *f) in sh_veu_g_fmt_vid_out() argument
421 return sh_veu_g_fmt(priv, f); in sh_veu_g_fmt_vid_out()
425 struct v4l2_format *f) in sh_veu_g_fmt_vid_cap() argument
427 return sh_veu_g_fmt(priv, f); in sh_veu_g_fmt_vid_cap()
430 static int sh_veu_try_fmt(struct v4l2_format *f, const struct sh_veu_format *fmt) in sh_veu_try_fmt() argument
432 struct v4l2_pix_format *pix = &f->fmt.pix; in sh_veu_try_fmt()
460 pr_debug("%s(): type: %d, size %u\n", __func__, f->type, pix->sizeimage); in sh_veu_try_fmt()
465 static const struct sh_veu_format *sh_veu_find_fmt(const struct v4l2_format *f) in sh_veu_find_fmt() argument
470 pr_debug("%s(%d;%d)\n", __func__, f->type, f->fmt.pix.field); in sh_veu_find_fmt()
472 switch (f->type) { in sh_veu_find_fmt()
487 if (sh_veu_fmt[fmt[i]].fourcc == f->fmt.pix.pixelformat) in sh_veu_find_fmt()
494 struct v4l2_format *f) in sh_veu_try_fmt_vid_cap() argument
498 fmt = sh_veu_find_fmt(f); in sh_veu_try_fmt_vid_cap()
503 return sh_veu_try_fmt(f, fmt); in sh_veu_try_fmt_vid_cap()
507 struct v4l2_format *f) in sh_veu_try_fmt_vid_out() argument
511 fmt = sh_veu_find_fmt(f); in sh_veu_try_fmt_vid_out()
516 return sh_veu_try_fmt(f, fmt); in sh_veu_try_fmt_vid_out()
549 static int sh_veu_s_fmt(struct sh_veu_file *veu_file, struct v4l2_format *f) in sh_veu_s_fmt() argument
551 struct v4l2_pix_format *pix = &f->fmt.pix; in sh_veu_s_fmt()
559 vq = v4l2_m2m_get_vq(veu->m2m_ctx, f->type); in sh_veu_s_fmt()
568 vfmt = sh_veu_get_vfmt(veu, f->type); in sh_veu_s_fmt()
571 vfmt->fmt = sh_veu_find_fmt(f); in sh_veu_s_fmt()
588 f->type, pix->width, pix->height, vfmt->fmt->fourcc); in sh_veu_s_fmt()
594 struct v4l2_format *f) in sh_veu_s_fmt_vid_cap() argument
596 int ret = sh_veu_try_fmt_vid_cap(file, priv, f); in sh_veu_s_fmt_vid_cap()
600 return sh_veu_s_fmt(priv, f); in sh_veu_s_fmt_vid_cap()
604 struct v4l2_format *f) in sh_veu_s_fmt_vid_out() argument
606 int ret = sh_veu_try_fmt_vid_out(file, priv, f); in sh_veu_s_fmt_vid_out()
610 return sh_veu_s_fmt(priv, f); in sh_veu_s_fmt_vid_out()
868 const struct v4l2_format *f, in sh_veu_queue_setup() argument
876 if (f) { in sh_veu_queue_setup()
877 const struct v4l2_pix_format *pix = &f->fmt.pix; in sh_veu_queue_setup()
878 const struct sh_veu_format *fmt = sh_veu_find_fmt(f); in sh_veu_queue_setup()
879 struct v4l2_format ftmp = *f; in sh_veu_queue_setup()