Lines Matching refs:fmt
105 const struct sh_veu_format *fmt; member
167 .fmt = &sh_veu_fmt[DEFAULT_IN_FMTIDX], \
176 .fmt = &sh_veu_fmt[DEFAULT_OUT_FMTIDX], \
361 static int sh_veu_enum_fmt(struct v4l2_fmtdesc *f, const int *fmt, int fmt_num) in sh_veu_enum_fmt() argument
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()
398 struct v4l2_pix_format *pix = &f->fmt.pix; in sh_veu_g_fmt()
407 pix->pixelformat = vfmt->fmt->fourcc; in sh_veu_g_fmt()
411 vfmt->fmt->depth / vfmt->fmt->ydepth; in sh_veu_g_fmt()
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()
451 y_bytes_used = (pix->width * fmt->ydepth) >> 3; in sh_veu_try_fmt()
455 pix->sizeimage = pix->height * pix->bytesperline * fmt->depth / fmt->ydepth; in sh_veu_try_fmt()
457 pix->pixelformat = fmt->fourcc; in sh_veu_try_fmt()
467 const int *fmt; in sh_veu_find_fmt() local
470 pr_debug("%s(%d;%d)\n", __func__, f->type, f->fmt.pix.field); in sh_veu_find_fmt()
474 fmt = sh_veu_fmt_out; in sh_veu_find_fmt()
480 fmt = sh_veu_fmt_in; in sh_veu_find_fmt()
487 if (sh_veu_fmt[fmt[i]].fourcc == f->fmt.pix.pixelformat) in sh_veu_find_fmt()
488 return &sh_veu_fmt[fmt[i]]; in sh_veu_find_fmt()
496 const struct sh_veu_format *fmt; in sh_veu_try_fmt_vid_cap() local
498 fmt = sh_veu_find_fmt(f); in sh_veu_try_fmt_vid_cap()
499 if (!fmt) in sh_veu_try_fmt_vid_cap()
503 return sh_veu_try_fmt(f, fmt); in sh_veu_try_fmt_vid_cap()
509 const struct sh_veu_format *fmt; in sh_veu_try_fmt_vid_out() local
511 fmt = sh_veu_find_fmt(f); in sh_veu_try_fmt_vid_out()
512 if (!fmt) in sh_veu_try_fmt_vid_out()
516 return sh_veu_try_fmt(f, fmt); in sh_veu_try_fmt_vid_out()
524 dma_addr_t offset = ((left * veu->vfmt_out.fmt->depth) >> 3) + in sh_veu_colour_offset()
530 switch (vfmt->fmt->fourcc) { in sh_veu_colour_offset()
551 struct v4l2_pix_format *pix = &f->fmt.pix; 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()
878 const struct v4l2_pix_format *pix = &f->fmt.pix; in sh_veu_queue_setup()
879 const struct sh_veu_format *fmt = sh_veu_find_fmt(f); in sh_veu_queue_setup() local
882 if (fmt->fourcc != pix->pixelformat) in sh_veu_queue_setup()
884 sh_veu_try_fmt(&ftmp, fmt); in sh_veu_queue_setup()
885 if (ftmp.fmt.pix.width != pix->width || in sh_veu_queue_setup()
886 ftmp.fmt.pix.height != pix->height) in sh_veu_queue_setup()
888 size = pix->bytesperline ? pix->bytesperline * pix->height * fmt->depth / fmt->ydepth : in sh_veu_queue_setup()
889 pix->width * pix->height * fmt->depth / fmt->ydepth; in sh_veu_queue_setup()
892 size = vfmt->bytesperline * vfmt->frame.height * vfmt->fmt->depth / vfmt->fmt->ydepth; in sh_veu_queue_setup()
920 vfmt->fmt->depth / vfmt->fmt->ydepth; in sh_veu_buf_prepare()