Lines Matching defs:format

465 	kfree(stream->format);
501 struct uvc_streaming *streaming, struct uvc_format *format,
514 format->type = buffer[2];
515 format->index = buffer[3];
529 /* Find the format descriptor from its GUID. */
533 strscpy(format->name, fmtdesc->name,
534 sizeof(format->name));
535 format->fcc = fmtdesc->fcc;
537 uvc_printk(KERN_INFO, "Unknown video format %pUl\n",
539 snprintf(format->name, sizeof(format->name), "%pUl\n",
541 format->fcc = 0;
544 format->bpp = buffer[21];
546 /* Some devices report a format that doesn't match what they
550 if (format->fcc == V4L2_PIX_FMT_YUYV) {
551 strscpy(format->name, "Greyscale 8-bit (Y8 )",
552 sizeof(format->name));
553 format->fcc = V4L2_PIX_FMT_GREY;
554 format->bpp = 8;
559 /* Some devices report bpp that doesn't match the format. */
562 v4l2_format_info(format->fcc);
571 format->bpp = DIV_ROUND_UP(8 * n, div);
580 format->flags = UVC_FMT_FLAG_COMPRESSED;
593 strscpy(format->name, "MJPEG", sizeof(format->name));
594 format->fcc = V4L2_PIX_FMT_MJPEG;
595 format->flags = UVC_FMT_FLAG_COMPRESSED;
596 format->bpp = 0;
611 strscpy(format->name, "SD-DV", sizeof(format->name));
614 strscpy(format->name, "SDL-DV", sizeof(format->name));
617 strscpy(format->name, "HD-DV", sizeof(format->name));
621 "interface %d: unknown DV format %u\n",
627 strlcat(format->name, buffer[8] & (1 << 7) ? " 60Hz" : " 50Hz",
628 sizeof(format->name));
630 format->fcc = V4L2_PIX_FMT_DV;
631 format->flags = UVC_FMT_FLAG_COMPRESSED | UVC_FMT_FLAG_STREAM;
632 format->bpp = 0;
636 frame = &format->frame[0];
637 memset(&format->frame[0], 0, sizeof(format->frame[0]));
642 format->nframes = 1;
650 "interface %d unsupported format %u\n",
656 uvc_trace(UVC_TRACE_DESCR, "Found format %s.\n", format->name);
666 frame = &format->frame[format->nframes];
710 if (!(format->flags & UVC_FMT_FLAG_COMPRESSED))
711 frame->dwMaxVideoFrameBufferSize = format->bpp
744 format->nframes++;
765 format->colorspace = uvc_colorspace(buffer[3]);
766 format->xfer_func = uvc_xfer_func(buffer[4]);
767 format->ycbcr_enc = uvc_ycbcr_enc(buffer[5]);
780 struct uvc_format *format;
900 /* Count the format and frame descriptors. */
910 /* DV format has no frame descriptor. We will create a
951 size = nformats * sizeof(*format) + nframes * sizeof(*frame)
953 format = kzalloc(size, GFP_KERNEL);
954 if (format == NULL) {
959 frame = (struct uvc_frame *)&format[nformats];
962 streaming->format = format;
965 /* Parse the format descriptors. */
972 format->frame = frame;
973 ret = uvc_parse_format(dev, streaming, format,
978 frame += format->nframes;
979 format++;