Lines Matching defs:frame
141 const struct uvc_frame *frame = NULL;
180 frame = &format->frames[i];
185 if (frame == NULL)
192 frame->dwMaxVideoFrameBufferSize;
211 : frame->dwFrameInterval[0];
214 * Compute a bandwidth estimation by multiplying the frame
220 bandwidth = frame->wWidth * frame->wHeight / 8 * format->bpp;
335 * format and frame descriptors.
508 * - store the frame PTS in the buffer structure
522 * all the data packets of the same frame contains the same SOF. In that
536 * the USB frame number to keep their own frame counters as long as they
537 * match the size and frequency of the frame number associated with USB
618 * cover the whole 11-bits SOF range (0-2047) but are limited to the HCI frame
622 * We thus need to recover the SOF value corresponding to the host frame number.
623 * As the device and host frame numbers are sampled in a short interval, the
625 * integer multiple of 256 caused by the host frame number limited precision.
628 * the high bits of the host frame counter and device SOF difference and add it
821 stream->stats.frame.nb_packets == 0)
845 stream->stats.frame.nb_invalid++;
858 /* Is PTS constant through the whole frame ? */
859 if (has_pts && stream->stats.frame.nb_pts) {
860 if (stream->stats.frame.pts != pts) {
861 stream->stats.frame.nb_pts_diffs++;
862 stream->stats.frame.last_pts_diff =
863 stream->stats.frame.nb_packets;
868 stream->stats.frame.nb_pts++;
869 stream->stats.frame.pts = pts;
876 if (stream->stats.frame.size == 0) {
878 stream->stats.frame.has_initial_pts = has_pts;
880 stream->stats.frame.has_early_pts = true;
883 /* Do the SCR.STC and SCR.SOF fields vary through the frame ? */
884 if (has_scr && stream->stats.frame.nb_scr) {
885 if (stream->stats.frame.scr_stc != scr_stc)
886 stream->stats.frame.nb_scr_diffs++;
892 stream->stats.frame.nb_scr > 0)
897 stream->stats.frame.nb_scr++;
898 stream->stats.frame.scr_stc = scr_stc;
899 stream->stats.frame.scr_sof = scr_sof;
908 if (stream->stats.frame.size == 0 && len > header_size)
909 stream->stats.frame.first_data = stream->stats.frame.nb_packets;
911 /* Update the frame size. */
912 stream->stats.frame.size += len - header_size;
915 stream->stats.frame.nb_packets++;
917 stream->stats.frame.nb_empty++;
920 stream->stats.frame.nb_errors++;
925 struct uvc_stats_frame *frame = &stream->stats.frame;
928 "frame %u stats: %u/%u/%u packets, %u/%u/%u pts (%searly %sinitial), %u/%u scr, last pts/stc/sof %u/%u/%u\n",
929 stream->sequence, frame->first_data,
930 frame->nb_packets - frame->nb_empty, frame->nb_packets,
931 frame->nb_pts_diffs, frame->last_pts_diff, frame->nb_pts,
932 frame->has_early_pts ? "" : "!",
933 frame->has_initial_pts ? "" : "!",
934 frame->nb_scr_diffs, frame->nb_scr,
935 frame->pts, frame->scr_stc, frame->scr_sof);
938 stream->stats.stream.nb_packets += stream->stats.frame.nb_packets;
939 stream->stats.stream.nb_empty += stream->stats.frame.nb_empty;
940 stream->stats.stream.nb_errors += stream->stats.frame.nb_errors;
941 stream->stats.stream.nb_invalid += stream->stats.frame.nb_invalid;
943 if (frame->has_early_pts)
945 if (frame->has_initial_pts)
947 if (frame->last_pts_diff <= frame->first_data)
949 if (frame->nb_scr >= frame->nb_packets - frame->nb_empty)
951 if (frame->nb_scr_diffs + 1 == frame->nb_scr)
954 memset(&stream->stats.frame, 0, sizeof(stream->stats.frame));
1028 * and a new video buffer. This is used when end of frame conditions can be
1029 * reliably detected at the beginning of the next frame only.
1065 stream->stats.frame.nb_invalid++;
1104 * frame will always be in sync.
1128 * Mark the buffer as done if we're at the beginning of a new frame.
1129 * End of frame detection is better implemented by checking the EOF
1130 * bit (FID bit toggling is delayed by one frame compared to the EOF
1131 * bit), but some devices don't set the bit at end of frame (and the
1136 * frame will never trigger an end of frame detection.
1138 * Empty buffers (bytesused == 0) don't trigger end of frame detection
1140 * avoids detecting end of frame conditions at FID toggling if the
1227 /* Complete the current frame if the buffer size was exceeded. */
1258 * UVC output device transfers a whole frame in a single payload, the EOF bit
1302 * Ideally we want to capture all payload headers for each frame. However, their
1365 "%s(): t-sys %lluns, SOF %u, len %u, flags 0x%x, PTS %u, STC %u frame SOF %u\n",
1425 "USB isochronous frame lost (%d)\n",
1469 * Ignore ZLPs if they're not part of a frame, otherwise process them
1941 "Device requested %u B/frame bandwidth\n",
1971 "Selecting alternate setting %u (%u B/frame bandwidth)\n",
2094 * Some cameras (namely the Fuji Finepix) set the format and frame
2104 const struct uvc_frame *frame = NULL;
2171 "No frame descriptor found for the default format.\n");
2177 * MPEG-2 TS and DV) do not support frames but have a dummy frame
2178 * descriptor with bFrameIndex set to zero. If the default frame
2179 * descriptor is not found, use the first available frame.
2182 frame = &format->frames[i-1];
2183 if (frame->bFrameIndex == probe->bFrameIndex)
2188 probe->bFrameIndex = frame->bFrameIndex;
2192 stream->cur_frame = frame;