Lines Matching refs:fmt
91 void ivtv_expand_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal) in ivtv_expand_service_set() argument
93 u16 set = fmt->service_set; in ivtv_expand_service_set()
96 fmt->service_set = 0; in ivtv_expand_service_set()
99 fmt->service_lines[f][l] = select_service_from_set(f, l, set, is_pal); in ivtv_expand_service_set()
104 static void check_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal) in check_service_set() argument
110 fmt->service_lines[f][l] = select_service_from_set(f, l, fmt->service_lines[f][l], is_pal); in check_service_set()
115 u16 ivtv_get_service_set(struct v4l2_sliced_vbi_format *fmt) in ivtv_get_service_set() argument
122 set |= fmt->service_lines[f][l]; in ivtv_get_service_set()
314 static int ivtv_g_fmt_sliced_vbi_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_sliced_vbi_out() argument
317 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_g_fmt_sliced_vbi_out()
335 static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_cap() argument
339 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; in ivtv_g_fmt_vid_cap()
361 static int ivtv_g_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vbi_cap() argument
364 struct v4l2_vbi_format *vbifmt = &fmt->fmt.vbi; in ivtv_g_fmt_vbi_cap()
379 static int ivtv_g_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_sliced_vbi_cap() argument
381 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_g_fmt_sliced_vbi_cap()
396 v4l2_subdev_call(itv->sd_video, video, g_fmt, fmt); in ivtv_g_fmt_sliced_vbi_cap()
401 static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_out() argument
405 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; in ivtv_g_fmt_vid_out()
442 static int ivtv_g_fmt_vid_out_overlay(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_out_overlay() argument
445 struct v4l2_window *winfmt = &fmt->fmt.win; in ivtv_g_fmt_vid_out_overlay()
461 static int ivtv_try_fmt_sliced_vbi_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_sliced_vbi_out() argument
463 return ivtv_g_fmt_sliced_vbi_out(file, fh, fmt); in ivtv_try_fmt_sliced_vbi_out()
466 static int ivtv_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_cap() argument
470 int w = fmt->fmt.pix.width; in ivtv_try_fmt_vid_cap()
471 int h = fmt->fmt.pix.height; in ivtv_try_fmt_vid_cap()
477 ivtv_g_fmt_vid_cap(file, fh, fmt); in ivtv_try_fmt_vid_cap()
478 fmt->fmt.pix.width = w; in ivtv_try_fmt_vid_cap()
479 fmt->fmt.pix.height = h; in ivtv_try_fmt_vid_cap()
483 static int ivtv_try_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vbi_cap() argument
485 return ivtv_g_fmt_vbi_cap(file, fh, fmt); in ivtv_try_fmt_vbi_cap()
488 static int ivtv_try_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_sliced_vbi_cap() argument
490 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_try_fmt_sliced_vbi_cap()
495 return ivtv_g_fmt_sliced_vbi_cap(file, fh, fmt); in ivtv_try_fmt_sliced_vbi_cap()
509 static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_out() argument
512 s32 w = fmt->fmt.pix.width; in ivtv_try_fmt_vid_out()
513 s32 h = fmt->fmt.pix.height; in ivtv_try_fmt_vid_out()
514 int field = fmt->fmt.pix.field; in ivtv_try_fmt_vid_out()
515 int ret = ivtv_g_fmt_vid_out(file, fh, fmt); in ivtv_try_fmt_vid_out()
537 fmt->fmt.pix.field = field; in ivtv_try_fmt_vid_out()
538 fmt->fmt.pix.width = w; in ivtv_try_fmt_vid_out()
539 fmt->fmt.pix.height = h; in ivtv_try_fmt_vid_out()
543 static int ivtv_try_fmt_vid_out_overlay(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_out_overlay() argument
546 u32 chromakey = fmt->fmt.win.chromakey; in ivtv_try_fmt_vid_out_overlay()
547 u8 global_alpha = fmt->fmt.win.global_alpha; in ivtv_try_fmt_vid_out_overlay()
551 ivtv_g_fmt_vid_out_overlay(file, fh, fmt); in ivtv_try_fmt_vid_out_overlay()
552 fmt->fmt.win.chromakey = chromakey; in ivtv_try_fmt_vid_out_overlay()
553 fmt->fmt.win.global_alpha = global_alpha; in ivtv_try_fmt_vid_out_overlay()
557 static int ivtv_s_fmt_sliced_vbi_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_sliced_vbi_out() argument
559 return ivtv_g_fmt_sliced_vbi_out(file, fh, fmt); in ivtv_s_fmt_sliced_vbi_out()
562 static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_cap() argument
567 int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); in ivtv_s_fmt_vid_cap()
568 int w = fmt->fmt.pix.width; in ivtv_s_fmt_vid_cap()
569 int h = fmt->fmt.pix.height; in ivtv_s_fmt_vid_cap()
583 fmt->fmt.pix.width /= 2; in ivtv_s_fmt_vid_cap()
584 v4l2_subdev_call(itv->sd_video, video, s_fmt, fmt); in ivtv_s_fmt_vid_cap()
585 return ivtv_g_fmt_vid_cap(file, fh, fmt); in ivtv_s_fmt_vid_cap()
588 static int ivtv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vbi_cap() argument
596 v4l2_subdev_call(itv->sd_video, video, s_fmt, fmt); in ivtv_s_fmt_vbi_cap()
597 return ivtv_g_fmt_vbi_cap(file, fh, fmt); in ivtv_s_fmt_vbi_cap()
600 static int ivtv_s_fmt_sliced_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_sliced_vbi_cap() argument
602 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_s_fmt_sliced_vbi_cap()
605 int ret = ivtv_try_fmt_sliced_vbi_cap(file, fh, fmt); in ivtv_s_fmt_sliced_vbi_cap()
614 v4l2_subdev_call(itv->sd_video, video, s_fmt, fmt); in ivtv_s_fmt_sliced_vbi_cap()
619 static int ivtv_s_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_out() argument
624 int ret = ivtv_try_fmt_vid_out(file, fh, fmt); in ivtv_s_fmt_vid_out()
636 yi->v4l2_src_w = fmt->fmt.pix.width; in ivtv_s_fmt_vid_out()
637 yi->v4l2_src_h = fmt->fmt.pix.height; in ivtv_s_fmt_vid_out()
639 switch (fmt->fmt.pix.field) { in ivtv_s_fmt_vid_out()
664 static int ivtv_s_fmt_vid_out_overlay(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_out_overlay() argument
667 int ret = ivtv_try_fmt_vid_out_overlay(file, fh, fmt); in ivtv_s_fmt_vid_out_overlay()
670 itv->osd_chroma_key = fmt->fmt.win.chromakey; in ivtv_s_fmt_vid_out_overlay()
671 itv->osd_global_alpha = fmt->fmt.win.global_alpha; in ivtv_s_fmt_vid_out_overlay()
924 static int ivtv_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt) in ivtv_enum_fmt_vid_cap() argument
936 enum v4l2_buf_type type = fmt->type; in ivtv_enum_fmt_vid_cap()
938 if (fmt->index > 1) in ivtv_enum_fmt_vid_cap()
941 *fmt = formats[fmt->index]; in ivtv_enum_fmt_vid_cap()
942 fmt->type = type; in ivtv_enum_fmt_vid_cap()
946 static int ivtv_enum_fmt_vid_out(struct file *file, void *fh, struct v4l2_fmtdesc *fmt) in ivtv_enum_fmt_vid_out() argument
960 enum v4l2_buf_type type = fmt->type; in ivtv_enum_fmt_vid_out()
965 if (fmt->index > 1) in ivtv_enum_fmt_vid_out()
968 *fmt = formats[fmt->index]; in ivtv_enum_fmt_vid_out()
969 fmt->type = type; in ivtv_enum_fmt_vid_out()
1349 fb->fmt.pixelformat = pixel_format[pixfmt]; in ivtv_g_fbuf()
1350 fb->fmt.width = itv->osd_rect.width; in ivtv_g_fbuf()
1351 fb->fmt.height = itv->osd_rect.height; in ivtv_g_fbuf()
1352 fb->fmt.field = V4L2_FIELD_INTERLACED; in ivtv_g_fbuf()
1353 fb->fmt.bytesperline = fb->fmt.width; in ivtv_g_fbuf()
1354 fb->fmt.colorspace = V4L2_COLORSPACE_SMPTE170M; in ivtv_g_fbuf()
1355 fb->fmt.field = V4L2_FIELD_INTERLACED; in ivtv_g_fbuf()
1356 fb->fmt.priv = 0; in ivtv_g_fbuf()
1357 if (fb->fmt.pixelformat != V4L2_PIX_FMT_PAL8) in ivtv_g_fbuf()
1358 fb->fmt.bytesperline *= 2; in ivtv_g_fbuf()
1359 if (fb->fmt.pixelformat == V4L2_PIX_FMT_RGB32 || in ivtv_g_fbuf()
1360 fb->fmt.pixelformat == V4L2_PIX_FMT_YUV32) in ivtv_g_fbuf()
1361 fb->fmt.bytesperline *= 2; in ivtv_g_fbuf()
1362 fb->fmt.sizeimage = fb->fmt.bytesperline * fb->fmt.height; in ivtv_g_fbuf()