Lines Matching defs:format

99  * given frame format and size. This should be done by the device as part of
135 static u32 uvc_v4l2_get_bytesperline(const struct uvc_format *format,
138 switch (format->fcc) {
146 return format->bpp * frame->wWidth / 8;
154 struct uvc_format *format = NULL;
167 uvc_trace(UVC_TRACE_FORMAT, "Trying format 0x%08x (%c%c%c%c): %ux%u.\n",
172 /* Check if the hardware supports the requested format, use the default
173 * format otherwise.
176 format = &stream->format[i];
177 if (format->fcc == fmt->fmt.pix.pixelformat)
182 format = stream->def_format;
183 fmt->fmt.pix.pixelformat = format->fcc;
194 for (i = 0; i < format->nframes; ++i) {
195 u16 w = format->frame[i].wWidth;
196 u16 h = format->frame[i].wHeight;
202 frame = &format->frame[i];
221 /* Set the format index, frame index and frame interval. */
224 probe->bFormatIndex = format->index;
253 * accepted the requested format as-is.
256 if (probe->bFormatIndex == stream->format[i].index) {
257 format = &stream->format[i];
267 for (i = 0; i < format->nframes; ++i) {
268 if (probe->bFrameIndex == format->frame[i].bFrameIndex) {
269 frame = &format->frame[i];
274 if (i == format->nframes)
282 fmt->fmt.pix.bytesperline = uvc_v4l2_get_bytesperline(format, frame);
284 fmt->fmt.pix.pixelformat = format->fcc;
285 fmt->fmt.pix.colorspace = format->colorspace;
286 fmt->fmt.pix.xfer_func = format->xfer_func;
287 fmt->fmt.pix.ycbcr_enc = format->ycbcr_enc;
290 *uvc_format = format;
301 struct uvc_format *format;
309 format = stream->cur_format;
312 if (format == NULL || frame == NULL) {
317 fmt->fmt.pix.pixelformat = format->fcc;
321 fmt->fmt.pix.bytesperline = uvc_v4l2_get_bytesperline(format, frame);
323 fmt->fmt.pix.colorspace = format->colorspace;
324 fmt->fmt.pix.xfer_func = format->xfer_func;
325 fmt->fmt.pix.ycbcr_enc = format->ycbcr_enc;
336 struct uvc_format *format;
343 ret = uvc_v4l2_try_format(stream, fmt, &probe, &format, &frame);
355 stream->cur_format = format;
403 struct uvc_format *format;
429 format = stream->cur_format;
436 for (i = 0; i < format->nframes && maxd != 0; i++) {
439 if (&format->frame[i] == stream->cur_frame)
442 if (format->frame[i].wWidth != stream->cur_frame->wWidth ||
443 format->frame[i].wHeight != stream->cur_frame->wHeight)
446 ival = uvc_try_frame_interval(&format->frame[i], interval);
451 frame = &format->frame[i];
636 struct uvc_format *format;
647 format = &stream->format[fmt->index];
649 if (format->flags & UVC_FMT_FLAG_COMPRESSED)
651 strscpy(fmt->description, format->name, sizeof(fmt->description));
653 fmt->pixelformat = format->fcc;
1220 struct uvc_format *format = NULL;
1225 /* Look for the given pixel format */
1227 if (stream->format[i].fcc == fsize->pixel_format) {
1228 format = &stream->format[i];
1232 if (format == NULL)
1236 for (i = 0, index = 0; i < format->nframes; i++) {
1237 if (frame && frame->wWidth == format->frame[i].wWidth &&
1238 frame->wHeight == format->frame[i].wHeight)
1240 frame = &format->frame[i];
1246 if (i == format->nframes)
1260 struct uvc_format *format = NULL;
1266 /* Look for the given pixel format and frame size */
1268 if (stream->format[i].fcc == fival->pixel_format) {
1269 format = &stream->format[i];
1273 if (format == NULL)
1277 for (i = 0; i < format->nframes; i++) {
1278 if (format->frame[i].wWidth == fival->width &&
1279 format->frame[i].wHeight == fival->height) {
1280 frame = &format->frame[i];
1287 if (i == format->nframes)