Lines Matching refs:fmt

90 void ivtv_expand_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal)  in ivtv_expand_service_set()  argument
92 u16 set = fmt->service_set; in ivtv_expand_service_set()
95 fmt->service_set = 0; in ivtv_expand_service_set()
98 fmt->service_lines[f][l] = select_service_from_set(f, l, set, is_pal); in ivtv_expand_service_set()
103 static void check_service_set(struct v4l2_sliced_vbi_format *fmt, int is_pal) in check_service_set() argument
109 fmt->service_lines[f][l] = select_service_from_set(f, l, fmt->service_lines[f][l], is_pal); in check_service_set()
114 u16 ivtv_get_service_set(struct v4l2_sliced_vbi_format *fmt) in ivtv_get_service_set() argument
121 set |= fmt->service_lines[f][l]; in ivtv_get_service_set()
322 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
325 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_g_fmt_sliced_vbi_out()
344 static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_cap() argument
348 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; in ivtv_g_fmt_vid_cap()
367 static int ivtv_g_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vbi_cap() argument
370 struct v4l2_vbi_format *vbifmt = &fmt->fmt.vbi; in ivtv_g_fmt_vbi_cap()
385 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
387 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_g_fmt_sliced_vbi_cap()
408 static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_g_fmt_vid_out() argument
412 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; in ivtv_g_fmt_vid_out()
448 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
452 struct v4l2_window *winfmt = &fmt->fmt.win; in ivtv_g_fmt_vid_out_overlay()
470 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
472 return ivtv_g_fmt_sliced_vbi_out(file, fh, fmt); in ivtv_try_fmt_sliced_vbi_out()
475 static int ivtv_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_cap() argument
479 int w = fmt->fmt.pix.width; in ivtv_try_fmt_vid_cap()
480 int h = fmt->fmt.pix.height; in ivtv_try_fmt_vid_cap()
492 ivtv_g_fmt_vid_cap(file, fh, fmt); in ivtv_try_fmt_vid_cap()
493 fmt->fmt.pix.width = w; in ivtv_try_fmt_vid_cap()
494 fmt->fmt.pix.height = h; in ivtv_try_fmt_vid_cap()
498 static int ivtv_try_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vbi_cap() argument
500 return ivtv_g_fmt_vbi_cap(file, fh, fmt); in ivtv_try_fmt_vbi_cap()
503 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
505 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_try_fmt_sliced_vbi_cap()
510 return ivtv_g_fmt_sliced_vbi_cap(file, fh, fmt); in ivtv_try_fmt_sliced_vbi_cap()
524 static int ivtv_try_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_try_fmt_vid_out() argument
527 s32 w = fmt->fmt.pix.width; in ivtv_try_fmt_vid_out()
528 s32 h = fmt->fmt.pix.height; in ivtv_try_fmt_vid_out()
529 int field = fmt->fmt.pix.field; in ivtv_try_fmt_vid_out()
530 int ret = ivtv_g_fmt_vid_out(file, fh, fmt); in ivtv_try_fmt_vid_out()
552 fmt->fmt.pix.field = field; in ivtv_try_fmt_vid_out()
553 fmt->fmt.pix.width = w; in ivtv_try_fmt_vid_out()
554 fmt->fmt.pix.height = h; in ivtv_try_fmt_vid_out()
558 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
562 u32 chromakey = fmt->fmt.win.chromakey; in ivtv_try_fmt_vid_out_overlay()
563 u8 global_alpha = fmt->fmt.win.global_alpha; in ivtv_try_fmt_vid_out_overlay()
569 ivtv_g_fmt_vid_out_overlay(file, fh, fmt); in ivtv_try_fmt_vid_out_overlay()
570 fmt->fmt.win.chromakey = chromakey; in ivtv_try_fmt_vid_out_overlay()
571 fmt->fmt.win.global_alpha = global_alpha; in ivtv_try_fmt_vid_out_overlay()
575 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
577 return ivtv_g_fmt_sliced_vbi_out(file, fh, fmt); in ivtv_s_fmt_sliced_vbi_out()
580 static int ivtv_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_cap() argument
587 int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); in ivtv_s_fmt_vid_cap()
588 int w = fmt->fmt.pix.width; in ivtv_s_fmt_vid_cap()
589 int h = fmt->fmt.pix.height; in ivtv_s_fmt_vid_cap()
603 fmt->fmt.pix.width /= 2; in ivtv_s_fmt_vid_cap()
604 format.format.width = fmt->fmt.pix.width; in ivtv_s_fmt_vid_cap()
608 return ivtv_g_fmt_vid_cap(file, fh, fmt); in ivtv_s_fmt_vid_cap()
611 static int ivtv_s_fmt_vbi_cap(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vbi_cap() argument
619 v4l2_subdev_call(itv->sd_video, vbi, s_raw_fmt, &fmt->fmt.vbi); in ivtv_s_fmt_vbi_cap()
620 return ivtv_g_fmt_vbi_cap(file, fh, fmt); in ivtv_s_fmt_vbi_cap()
623 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
625 struct v4l2_sliced_vbi_format *vbifmt = &fmt->fmt.sliced; in ivtv_s_fmt_sliced_vbi_cap()
628 int ret = ivtv_try_fmt_sliced_vbi_cap(file, fh, fmt); in ivtv_s_fmt_sliced_vbi_cap()
642 static int ivtv_s_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *fmt) in ivtv_s_fmt_vid_out() argument
647 int ret = ivtv_try_fmt_vid_out(file, fh, fmt); in ivtv_s_fmt_vid_out()
659 yi->v4l2_src_w = fmt->fmt.pix.width; in ivtv_s_fmt_vid_out()
660 yi->v4l2_src_h = fmt->fmt.pix.height; in ivtv_s_fmt_vid_out()
662 switch (fmt->fmt.pix.field) { in ivtv_s_fmt_vid_out()
687 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
690 int ret = ivtv_try_fmt_vid_out_overlay(file, fh, fmt); in ivtv_s_fmt_vid_out_overlay()
693 itv->osd_chroma_key = fmt->fmt.win.chromakey; in ivtv_s_fmt_vid_out_overlay()
694 itv->osd_global_alpha = fmt->fmt.win.global_alpha; in ivtv_s_fmt_vid_out_overlay()
934 static int ivtv_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtdesc *fmt) in ivtv_enum_fmt_vid_cap() argument
949 if (fmt->index) in ivtv_enum_fmt_vid_cap()
952 *fmt = mpeg; in ivtv_enum_fmt_vid_cap()
954 *fmt = hm12; in ivtv_enum_fmt_vid_cap()
960 static int ivtv_enum_fmt_vid_out(struct file *file, void *fh, struct v4l2_fmtdesc *fmt) in ivtv_enum_fmt_vid_out() argument
975 if (fmt->index) in ivtv_enum_fmt_vid_out()
978 *fmt = mpeg; in ivtv_enum_fmt_vid_out()
980 *fmt = hm12; in ivtv_enum_fmt_vid_out()
1415 fb->fmt.pixelformat = pixel_format[pixfmt]; in ivtv_g_fbuf()
1416 fb->fmt.width = itv->osd_rect.width; in ivtv_g_fbuf()
1417 fb->fmt.height = itv->osd_rect.height; in ivtv_g_fbuf()
1418 fb->fmt.field = V4L2_FIELD_INTERLACED; in ivtv_g_fbuf()
1419 fb->fmt.bytesperline = fb->fmt.width; in ivtv_g_fbuf()
1420 fb->fmt.colorspace = V4L2_COLORSPACE_SMPTE170M; in ivtv_g_fbuf()
1421 fb->fmt.field = V4L2_FIELD_INTERLACED; in ivtv_g_fbuf()
1422 if (fb->fmt.pixelformat != V4L2_PIX_FMT_PAL8) in ivtv_g_fbuf()
1423 fb->fmt.bytesperline *= 2; in ivtv_g_fbuf()
1424 if (fb->fmt.pixelformat == V4L2_PIX_FMT_RGB32 || in ivtv_g_fbuf()
1425 fb->fmt.pixelformat == V4L2_PIX_FMT_YUV32) in ivtv_g_fbuf()
1426 fb->fmt.bytesperline *= 2; in ivtv_g_fbuf()
1427 fb->fmt.sizeimage = fb->fmt.bytesperline * fb->fmt.height; in ivtv_g_fbuf()