Lines Matching refs:fmt
77 void ivtv_expand_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal) in ivtv_expand_service_set() argument
79 u16 set = fmt->service_set; in ivtv_expand_service_set()
82 fmt->service_set = 0; in ivtv_expand_service_set()
85 fmt->service_lines[f][l] = select_service_from_set(f, l, set, is_pal); in ivtv_expand_service_set()
90 static void check_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal) in check_service_set() argument
96 fmt->service_lines[f][l] = select_service_from_set(f, l, fmt->service_lines[f][l], is_pal); in check_service_set()
101 u16 ivtv_get_service_set(struct v4l2_sliced_vbi_format *fmt) in ivtv_get_service_set() argument
108 set |= fmt->service_lines[f][l]; in ivtv_get_service_set()
309 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
312 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_g_fmt_sliced_vbi_out()
331 static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_cap() argument
335 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; in ivtv_g_fmt_vid_cap()
354 static int ivtv_g_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vbi_cap() argument
357 struct v4l2_vbi_format *vbifmt = &fmt->fmt.vbi; in ivtv_g_fmt_vbi_cap()
372 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
374 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_g_fmt_sliced_vbi_cap()
395 static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_out() argument
399 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; in ivtv_g_fmt_vid_out()
435 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
439 struct v4l2_window *winfmt = &fmt->fmt.win; in ivtv_g_fmt_vid_out_overlay()
457 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
459 return ivtv_g_fmt_sliced_vbi_out(file, fh, fmt); in ivtv_try_fmt_sliced_vbi_out()
462 static int ivtv_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_cap() argument
466 int w = fmt->fmt.pix.width; in ivtv_try_fmt_vid_cap()
467 int h = fmt->fmt.pix.height; in ivtv_try_fmt_vid_cap()
479 ivtv_g_fmt_vid_cap(file, fh, fmt); in ivtv_try_fmt_vid_cap()
480 fmt->fmt.pix.width = w; in ivtv_try_fmt_vid_cap()
481 fmt->fmt.pix.height = h; in ivtv_try_fmt_vid_cap()
485 static int ivtv_try_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vbi_cap() argument
487 return ivtv_g_fmt_vbi_cap(file, fh, fmt); in ivtv_try_fmt_vbi_cap()
490 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
492 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_try_fmt_sliced_vbi_cap()
497 return ivtv_g_fmt_sliced_vbi_cap(file, fh, fmt); in ivtv_try_fmt_sliced_vbi_cap()
511 static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_out() argument
514 s32 w = fmt->fmt.pix.width; in ivtv_try_fmt_vid_out()
515 s32 h = fmt->fmt.pix.height; in ivtv_try_fmt_vid_out()
516 int field = fmt->fmt.pix.field; in ivtv_try_fmt_vid_out()
517 int ret = ivtv_g_fmt_vid_out(file, fh, fmt); in ivtv_try_fmt_vid_out()
539 fmt->fmt.pix.field = field; in ivtv_try_fmt_vid_out()
540 fmt->fmt.pix.width = w; in ivtv_try_fmt_vid_out()
541 fmt->fmt.pix.height = h; in ivtv_try_fmt_vid_out()
545 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
549 u32 chromakey = fmt->fmt.win.chromakey; in ivtv_try_fmt_vid_out_overlay()
550 u8 global_alpha = fmt->fmt.win.global_alpha; in ivtv_try_fmt_vid_out_overlay()
556 ivtv_g_fmt_vid_out_overlay(file, fh, fmt); in ivtv_try_fmt_vid_out_overlay()
557 fmt->fmt.win.chromakey = chromakey; in ivtv_try_fmt_vid_out_overlay()
558 fmt->fmt.win.global_alpha = global_alpha; in ivtv_try_fmt_vid_out_overlay()
562 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
564 return ivtv_g_fmt_sliced_vbi_out(file, fh, fmt); in ivtv_s_fmt_sliced_vbi_out()
567 static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_cap() argument
574 int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); in ivtv_s_fmt_vid_cap()
575 int w = fmt->fmt.pix.width; in ivtv_s_fmt_vid_cap()
576 int h = fmt->fmt.pix.height; in ivtv_s_fmt_vid_cap()
590 fmt->fmt.pix.width /= 2; in ivtv_s_fmt_vid_cap()
591 format.format.width = fmt->fmt.pix.width; in ivtv_s_fmt_vid_cap()
595 return ivtv_g_fmt_vid_cap(file, fh, fmt); in ivtv_s_fmt_vid_cap()
598 static int ivtv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vbi_cap() argument
606 v4l2_subdev_call(itv->sd_video, vbi, s_raw_fmt, &fmt->fmt.vbi); in ivtv_s_fmt_vbi_cap()
607 return ivtv_g_fmt_vbi_cap(file, fh, fmt); in ivtv_s_fmt_vbi_cap()
610 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
612 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_s_fmt_sliced_vbi_cap()
615 int ret = ivtv_try_fmt_sliced_vbi_cap(file, fh, fmt); in ivtv_s_fmt_sliced_vbi_cap()
629 static int ivtv_s_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_out() argument
634 int ret = ivtv_try_fmt_vid_out(file, fh, fmt); in ivtv_s_fmt_vid_out()
646 yi->v4l2_src_w = fmt->fmt.pix.width; in ivtv_s_fmt_vid_out()
647 yi->v4l2_src_h = fmt->fmt.pix.height; in ivtv_s_fmt_vid_out()
649 switch (fmt->fmt.pix.field) { in ivtv_s_fmt_vid_out()
674 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
677 int ret = ivtv_try_fmt_vid_out_overlay(file, fh, fmt); in ivtv_s_fmt_vid_out_overlay()
680 itv->osd_chroma_key = fmt->fmt.win.chromakey; in ivtv_s_fmt_vid_out_overlay()
681 itv->osd_global_alpha = fmt->fmt.win.global_alpha; in ivtv_s_fmt_vid_out_overlay()
914 static int ivtv_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt) in ivtv_enum_fmt_vid_cap() argument
930 if (fmt->index) in ivtv_enum_fmt_vid_cap()
933 *fmt = mpeg; in ivtv_enum_fmt_vid_cap()
935 *fmt = hm12; in ivtv_enum_fmt_vid_cap()
941 static int ivtv_enum_fmt_vid_out(struct file *file, void *fh, struct v4l2_fmtdesc *fmt) in ivtv_enum_fmt_vid_out() argument
957 if (fmt->index) in ivtv_enum_fmt_vid_out()
960 *fmt = mpeg; in ivtv_enum_fmt_vid_out()
962 *fmt = hm12; in ivtv_enum_fmt_vid_out()
1397 fb->fmt.pixelformat = pixel_format[pixfmt]; in ivtv_g_fbuf()
1398 fb->fmt.width = itv->osd_rect.width; in ivtv_g_fbuf()
1399 fb->fmt.height = itv->osd_rect.height; in ivtv_g_fbuf()
1400 fb->fmt.field = V4L2_FIELD_INTERLACED; in ivtv_g_fbuf()
1401 fb->fmt.bytesperline = fb->fmt.width; in ivtv_g_fbuf()
1402 fb->fmt.colorspace = V4L2_COLORSPACE_SMPTE170M; in ivtv_g_fbuf()
1403 fb->fmt.field = V4L2_FIELD_INTERLACED; in ivtv_g_fbuf()
1404 if (fb->fmt.pixelformat != V4L2_PIX_FMT_PAL8) in ivtv_g_fbuf()
1405 fb->fmt.bytesperline *= 2; in ivtv_g_fbuf()
1406 if (fb->fmt.pixelformat == V4L2_PIX_FMT_RGB32 || in ivtv_g_fbuf()
1407 fb->fmt.pixelformat == V4L2_PIX_FMT_YUV32) in ivtv_g_fbuf()
1408 fb->fmt.bytesperline *= 2; in ivtv_g_fbuf()
1409 fb->fmt.sizeimage = fb->fmt.bytesperline * fb->fmt.height; in ivtv_g_fbuf()