Lines Matching defs:frame

136 	struct uvc_frame *frame = NULL;
174 if (format->frame[i].bFrameIndex == ctrl->bFrameIndex) {
175 frame = &format->frame[i];
180 if (frame == NULL)
187 frame->dwMaxVideoFrameBufferSize;
205 : frame->dwFrameInterval[0];
207 /* Compute a bandwidth estimation by multiplying the frame
213 bandwidth = frame->wWidth * frame->wHeight / 8 * format->bpp;
324 * format and frame descriptors.
497 * - store the frame PTS in the buffer structure
521 * the USB frame number to keep their own frame counters as long as they
522 * match the size and frequency of the frame number associated with USB
603 * cover the whole 11-bits SOF range (0-2047) but are limited to the HCI frame
607 * We thus need to recover the SOF value corresponding to the host frame number.
608 * As the device and host frame numbers are sampled in a short interval, the
610 * integer multiple of 256 caused by the host frame number limited precision.
613 * the high bits of the host frame counter and device SOF difference and add it
805 stream->stats.frame.nb_packets == 0)
829 stream->stats.frame.nb_invalid++;
842 /* Is PTS constant through the whole frame ? */
843 if (has_pts && stream->stats.frame.nb_pts) {
844 if (stream->stats.frame.pts != pts) {
845 stream->stats.frame.nb_pts_diffs++;
846 stream->stats.frame.last_pts_diff =
847 stream->stats.frame.nb_packets;
852 stream->stats.frame.nb_pts++;
853 stream->stats.frame.pts = pts;
859 if (stream->stats.frame.size == 0) {
861 stream->stats.frame.has_initial_pts = has_pts;
863 stream->stats.frame.has_early_pts = true;
866 /* Do the SCR.STC and SCR.SOF fields vary through the frame ? */
867 if (has_scr && stream->stats.frame.nb_scr) {
868 if (stream->stats.frame.scr_stc != scr_stc)
869 stream->stats.frame.nb_scr_diffs++;
875 stream->stats.frame.nb_scr > 0)
880 stream->stats.frame.nb_scr++;
881 stream->stats.frame.scr_stc = scr_stc;
882 stream->stats.frame.scr_sof = scr_sof;
891 if (stream->stats.frame.size == 0 && len > header_size)
892 stream->stats.frame.first_data = stream->stats.frame.nb_packets;
894 /* Update the frame size. */
895 stream->stats.frame.size += len - header_size;
898 stream->stats.frame.nb_packets++;
900 stream->stats.frame.nb_empty++;
903 stream->stats.frame.nb_errors++;
908 struct uvc_stats_frame *frame = &stream->stats.frame;
910 uvc_trace(UVC_TRACE_STATS, "frame %u stats: %u/%u/%u packets, "
913 stream->sequence, frame->first_data,
914 frame->nb_packets - frame->nb_empty, frame->nb_packets,
915 frame->nb_pts_diffs, frame->last_pts_diff, frame->nb_pts,
916 frame->has_early_pts ? "" : "!",
917 frame->has_initial_pts ? "" : "!",
918 frame->nb_scr_diffs, frame->nb_scr,
919 frame->pts, frame->scr_stc, frame->scr_sof);
922 stream->stats.stream.nb_packets += stream->stats.frame.nb_packets;
923 stream->stats.stream.nb_empty += stream->stats.frame.nb_empty;
924 stream->stats.stream.nb_errors += stream->stats.frame.nb_errors;
925 stream->stats.stream.nb_invalid += stream->stats.frame.nb_invalid;
927 if (frame->has_early_pts)
929 if (frame->has_initial_pts)
931 if (frame->last_pts_diff <= frame->first_data)
933 if (frame->nb_scr >= frame->nb_packets - frame->nb_empty)
935 if (frame->nb_scr_diffs + 1 == frame->nb_scr)
938 memset(&stream->stats.frame, 0, sizeof(stream->stats.frame));
1010 * and a new video buffer. This is used when end of frame conditions can be
1011 * reliably detected at the beginning of the next frame only.
1046 stream->stats.frame.nb_invalid++;
1082 * frame will always be in sync.
1105 /* Mark the buffer as done if we're at the beginning of a new frame.
1106 * End of frame detection is better implemented by checking the EOF
1107 * bit (FID bit toggling is delayed by one frame compared to the EOF
1108 * bit), but some devices don't set the bit at end of frame (and the
1113 * frame will never trigger an end of frame detection.
1115 * Empty buffers (bytesused == 0) don't trigger end of frame detection
1117 * avoids detecting end of frame conditions at FID toggling if the
1181 /* Complete the current frame if the buffer size was exceeded. */
1210 * UVC output device transfers a whole frame in a single payload, the EOF bit
1254 * Ideally we want to capture all payload headers for each frame. However, their
1317 "%s(): t-sys %lluns, SOF %u, len %u, flags 0x%x, PTS %u, STC %u frame SOF %u\n",
1376 uvc_trace(UVC_TRACE_FRAME, "USB isochronous frame "
1420 * Ignore ZLPs if they're not part of a frame, otherwise process them
1877 "B/frame bandwidth.\n", bandwidth);
1906 "(%u B/frame bandwidth).\n", altsetting, best_psize);
2025 * Some cameras (namely the Fuji Finepix) set the format and frame
2035 struct uvc_frame *frame = NULL;
2081 uvc_printk(KERN_INFO, "No frame descriptor found for the "
2087 * MPEG-2 TS and DV) do not support frames but have a dummy frame
2088 * descriptor with bFrameIndex set to zero. If the default frame
2089 * descriptor is not found, use the first available frame.
2092 frame = &format->frame[i-1];
2093 if (frame->bFrameIndex == probe->bFrameIndex)
2098 probe->bFrameIndex = frame->bFrameIndex;
2102 stream->cur_frame = frame;