• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/media/video/usbvideo/

Lines Matching refs:frame

240 	struct usbvideo_frame *frame;
244 err("ibmcam_find_header: Illegal frame %d.", uvd->curframe);
249 frame = &uvd->frame[uvd->curframe];
260 frame->header = RING_QUEUE_PEEK(&uvd->dp, 3);
261 if ((frame->header == HDRSIG_MODEL1_128x96) ||
262 (frame->header == HDRSIG_MODEL1_176x144) ||
263 (frame->header == HDRSIG_MODEL1_352x288))
293 frame->header = HDRSIG_MODEL1_176x144;
303 * Headers: (one precedes every frame). nc=no compression,
304 * bq=best quality bf=best frame rate.
311 * encode the frame type. This is a set of bit fields that
313 * do NOT contain frame number because all frames carry
323 * Combine 2 bytes of frame type into one
330 frame->header = (byte3 << 8) | byte4;
345 info("Skipping frame, no header");
352 frame->scanstate = ScanState_Lines;
353 frame->curline = 0;
366 * decoded RGB value into the current frame buffer
376 struct usbvideo_frame *frame,
391 assert(frame != NULL);
397 v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
400 /* Model 4 frame markers do not carry image size identification */
415 switch (frame->header) {
432 err("Unknown header signature 00 FF 00 %02lX", frame->header);
472 if ((frame->curline + 2) >= VIDEOSIZE_Y(frame->request))
482 assert(frame->data != NULL);
483 f = frame->data + (v4l_linesize * frame->curline);
494 * where 'i' is the column number [0..VIDEOSIZE_X(frame->request)-1]
498 for (i = 0; i < VIDEOSIZE_X(frame->request); i++)
507 * frame! Obviously our camera/V4L frame size is out
509 * out where exactly the new frame arrived.
530 if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {
534 f = frame->data + (v4l_linesize * frame->curline) + j;
575 * sake of frame rate (or any other reason.)
581 RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);
588 * Typically we do not decide within a legitimate frame
589 * that we want to end the frame. However debugging code
590 * may detect marker of new frame within the data. Then
598 * Account for number of bytes that we wrote into output V4L frame.
603 frame->curline += 2;
606 frame->deinterlace = Deinterlace_FillOddLines;
608 if (frame_done || (frame->curline >= VIDEOSIZE_Y(frame->request)))
641 struct usbvideo_frame *frame,
664 v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
682 if ((frame->curline + 2) >= VIDEOSIZE_Y(frame->request))
690 * VIDEOSIZE_X(frame->request)
697 f = frame->data + (v4l_linesize * frame->curline);
700 for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {
726 if (((frame->curline + 2) >= scanHeight) || (i >= scanLength)) {
730 f = frame->data + (v4l_linesize * frame->curline) + j;
775 RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);
778 * Account for number of bytes that we wrote into output V4L frame.
783 frame->curline += 2;
785 frame->deinterlace = Deinterlace_FillOddLines;
787 if (frame_done || (frame->curline >= VIDEOSIZE_Y(frame->request)))
795 struct usbvideo_frame *frame,
811 v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
813 /* The header tells us what sort of data is in this frame */
814 switch (frame->header) {
834 case 0x0368: /* 640x480, best frame rate compression */
836 case 0x0268: /* 320x240, best frame rate compression */
838 case 0x02EA: /* 160x120, best frame rate compression */
840 err("Unsupported mode $%04lx", frame->header);
844 err("Strange frame->header=$%08lx", frame->header);
854 if ((frame->curline + 1) >= data_h) {
856 info("Reached line %d. (frame is done)", frame->curline);
875 rw = (int)VIDEOSIZE_Y(frame->request) - (int)(frame->curline) - 1;
876 RESTRICT_TO_RANGE(rw, 0, VIDEOSIZE_Y(frame->request)-1);
878 for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {
898 RGB24_PUTPIXEL(frame, i, rw, rv, gv, bv); /* Done by deinterlacing now */
900 frame->deinterlace = Deinterlace_FillEvenLines;
903 * Account for number of bytes that we wrote into output V4L frame.
908 frame->curline += 2;
911 if (frame->curline >= VIDEOSIZE_Y(frame->request)) {
914 VIDEOSIZE_Y(frame->request));
940 struct usbvideo_frame *frame,
949 v4l_linesize = VIDEOSIZE_X(frame->request) * V4L_BYTES_PER_PIXEL;
957 if ((frame->curline + 1) >= data_h) {
959 info("Reached line %d. (frame is done)", frame->curline);
982 for (i = 0; i < VIDEOSIZE_X(frame->request); i++) {
1000 RGB24_PUTPIXEL(frame, i, frame->curline, rv, gv, bv);
1002 frame->deinterlace = Deinterlace_None;
1003 frame->curline++;
1006 if (frame->curline >= VIDEOSIZE_Y(frame->request)) {
1009 VIDEOSIZE_Y(frame->request));
1027 struct usbvideo_frame *frame)
1036 if (frame->scanstate == ScanState_Scanning) {
1038 } else if (frame->scanstate == ScanState_Lines) {
1045 uvd, frame, &copylen);
1056 newstate = ibmcam_model2_320x240_parse_lines(uvd, frame, &copylen);
1058 newstate = ibmcam_model4_128x96_parse_lines(uvd, frame, &copylen);
1060 newstate = ibmcam_parse_lines(uvd, frame, &copylen);
1063 newstate = ibmcam_model3_parse_lines(uvd, frame, &copylen);
1065 newstate = ibmcam_parse_lines(uvd, frame, &copylen);
1078 frame->frameState = FrameState_Done;
1083 frame->flags |= USBVIDEO_FRAME_FLAG_SOFTWARE_CONTRAST;
1087 /* Update the frame's uncompressed length. */
1088 frame->seqRead_Length += copylen;
1145 * This procedure roughly calculates the real frame rate based
1147 * slightly depending on lighting conditions, so that actual frame
1897 * Here we configure the frame rate and turn on the LED.
1993 * We have our own frame rate setting varying from 0 (slowest) to 6 (fastest).
1994 * The camera model 2 allows frame rate in range [0..0x1F] where 0 is also the
1998 * frame rate faster than allowed for the video size - see below:
3185 unsigned short compression = 0; /* 0=none, 7=best frame rate */
3191 /* Internal frame rate is controlled by f_rate value */