• Home
  • Raw
  • Download

Lines Matching refs:frame

427 	struct usbvision_frame *frame;  in usbvision_find_header()  local
430 frame = usbvision->cur_frame; in usbvision_find_header()
432 while (scratch_get_header(usbvision, &frame->isoc_header) == USBVISION_HEADER_LENGTH) { in usbvision_find_header()
435 frame->isoc_header.magic_2, in usbvision_find_header()
436 frame->isoc_header.magic_1, in usbvision_find_header()
437 frame->isoc_header.header_length, in usbvision_find_header()
438 frame->isoc_header.frame_num, in usbvision_find_header()
439 frame->isoc_header.frame_phase, in usbvision_find_header()
440 frame->isoc_header.frame_latency, in usbvision_find_header()
441 frame->isoc_header.data_format, in usbvision_find_header()
442 frame->isoc_header.format_param, in usbvision_find_header()
443 frame->isoc_header.frame_width, in usbvision_find_header()
444 frame->isoc_header.frame_height); in usbvision_find_header()
447 if (frame->isoc_header.format_param & 0x80) { in usbvision_find_header()
460 frame->frmwidth = frame->isoc_header.frame_width * usbvision->stretch_width; in usbvision_find_header()
461 frame->frmheight = frame->isoc_header.frame_height * usbvision->stretch_height; in usbvision_find_header()
462 frame->v4l2_linesize = (frame->frmwidth * frame->v4l2_format.depth) >> 3; in usbvision_find_header()
470 if (frame->isoc_header.data_format == ISOC_MODE_COMPRESS) { in usbvision_find_header()
473 if (((usbvision->last_isoc_frame_num + 1) % 32) != frame->isoc_header.frame_num) { in usbvision_find_header()
475 PDEBUG(DBG_HEADER, "Lost frame before %d on USB", frame->isoc_header.frame_num); in usbvision_find_header()
480 usbvision->last_isoc_frame_num = frame->isoc_header.frame_num; in usbvision_find_header()
483 frame->scanstate = scan_state_lines; in usbvision_find_header()
484 frame->curline = 0; in usbvision_find_header()
492 volatile struct usbvision_frame *frame; in usbvision_parse_lines_422() local
501 frame = usbvision->cur_frame; in usbvision_parse_lines_422()
502 f = frame->data + (frame->v4l2_linesize * frame->curline); in usbvision_parse_lines_422()
505 len = (frame->isoc_header.frame_width * 2) + 5; in usbvision_parse_lines_422()
507 PDEBUG(DBG_PARSE, "out of data in line %d, need %u.\n", frame->curline, len); in usbvision_parse_lines_422()
511 if ((frame->curline + 1) >= frame->frmheight) in usbvision_parse_lines_422()
514 bytes_per_pixel = frame->v4l2_format.bytes_per_pixel; in usbvision_parse_lines_422()
516 clipmask_index = frame->curline * MAX_FRAME_WIDTH; in usbvision_parse_lines_422()
519 for (i = 0; i < frame->frmwidth; i += (2 * usbvision->stretch_width)) { in usbvision_parse_lines_422()
522 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_lines_422()
527 switch (frame->v4l2_format.format) { in usbvision_parse_lines_422()
556 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_lines_422()
561 switch (frame->v4l2_format.format) { in usbvision_parse_lines_422()
591 frame->curline += usbvision->stretch_height; in usbvision_parse_lines_422()
592 *pcopylen += frame->v4l2_linesize * usbvision->stretch_height; in usbvision_parse_lines_422()
594 if (frame->curline >= frame->frmheight) in usbvision_parse_lines_422()
700 struct usbvision_frame *frame; in usbvision_parse_compress() local
710 frame = usbvision->cur_frame; in usbvision_parse_compress()
711 image_size = frame->frmwidth * frame->frmheight; in usbvision_parse_compress()
712 if ((frame->v4l2_format.format == V4L2_PIX_FMT_YUV422P) || in usbvision_parse_compress()
713 (frame->v4l2_format.format == V4L2_PIX_FMT_YVU420)) { /* this is a planar format */ in usbvision_parse_compress()
715 f = frame->data + (frame->width * frame->curline); in usbvision_parse_compress()
717 f = frame->data + (frame->v4l2_linesize * frame->curline); in usbvision_parse_compress()
719 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { /* initialise u and v pointers */ in usbvision_parse_compress()
721 u = frame->data in usbvision_parse_compress()
723 + (frame->frmwidth >> 1) * frame->curline; in usbvision_parse_compress()
725 } else if (frame->v4l2_format.format == V4L2_PIX_FMT_YVU420) { in usbvision_parse_compress()
726 v = frame->data + image_size + ((frame->curline * (frame->width)) >> 2); in usbvision_parse_compress()
730 if (frame->curline == 0) in usbvision_parse_compress()
747 if (frame->curline != (int)strip_header[2]) { in usbvision_parse_compress()
765 Y = usbvision->intra_frame_buffer + frame->frmwidth * frame->curline; in usbvision_parse_compress()
766 U = usbvision->intra_frame_buffer + image_size + (frame->frmwidth / 2) * (frame->curline / 2); in usbvision_parse_compress()
767 …V = usbvision->intra_frame_buffer + image_size / 4 * 5 + (frame->frmwidth / 2) * (frame->curline /… in usbvision_parse_compress()
772 bytes_per_pixel = frame->v4l2_format.bytes_per_pixel; in usbvision_parse_compress()
773 clipmask_index = frame->curline * MAX_FRAME_WIDTH; in usbvision_parse_compress()
777 idx_end = frame->frmwidth; in usbvision_parse_compress()
788 if (frame->curline % 2) in usbvision_parse_compress()
799 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_compress()
802 } else if (frame->v4l2_format.format == V4L2_PIX_FMT_YUV422P) { in usbvision_parse_compress()
808 } else if (frame->v4l2_format.format == V4L2_PIX_FMT_YVU420) { in usbvision_parse_compress()
810 if (!((idx & 0x01) | (frame->curline & 0x01))) { in usbvision_parse_compress()
818 switch (frame->v4l2_format.format) { in usbvision_parse_compress()
850 if (frame->v4l2_format.format != V4L2_PIX_FMT_YVU420) in usbvision_parse_compress()
851 *pcopylen += frame->v4l2_linesize; in usbvision_parse_compress()
853 *pcopylen += frame->curline & 0x01 ? frame->v4l2_linesize : frame->v4l2_linesize << 1; in usbvision_parse_compress()
855 frame->curline += 1; in usbvision_parse_compress()
857 if (frame->curline >= frame->frmheight) in usbvision_parse_compress()
875 struct usbvision_frame *frame; in usbvision_parse_lines_420() local
892 frame = usbvision->cur_frame; in usbvision_parse_lines_420()
893 f_even = frame->data + (frame->v4l2_linesize * frame->curline); in usbvision_parse_lines_420()
894 f_odd = f_even + frame->v4l2_linesize * usbvision->stretch_height; in usbvision_parse_lines_420()
899 bytes_per_pixel = frame->v4l2_format.bytes_per_pixel; in usbvision_parse_lines_420()
901 clipmask_even_index = frame->curline * MAX_FRAME_WIDTH; in usbvision_parse_lines_420()
904 pixel_per_line = frame->isoc_header.frame_width; in usbvision_parse_lines_420()
911 if ((frame->curline + 1) >= frame->frmheight) in usbvision_parse_lines_420()
937 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_lines_420()
947 switch (frame->v4l2_format.format) { in usbvision_parse_lines_420()
980 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_lines_420()
990 switch (frame->v4l2_format.format) { in usbvision_parse_lines_420()
1025 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_lines_420()
1035 switch (frame->v4l2_format.format) { in usbvision_parse_lines_420()
1068 if (frame->v4l2_format.format == V4L2_PIX_FMT_YUYV) { in usbvision_parse_lines_420()
1078 switch (frame->v4l2_format.format) { in usbvision_parse_lines_420()
1124 frame->curline += 2 * usbvision->stretch_height; in usbvision_parse_lines_420()
1125 *pcopylen += frame->v4l2_linesize * 2 * usbvision->stretch_height; in usbvision_parse_lines_420()
1127 if (frame->curline >= frame->frmheight) in usbvision_parse_lines_420()
1142 struct usbvision_frame *frame; in usbvision_parse_data() local
1147 frame = usbvision->cur_frame; in usbvision_parse_data()
1154 if (frame->scanstate == scan_state_scanning) { in usbvision_parse_data()
1156 } else if (frame->scanstate == scan_state_lines) { in usbvision_parse_data()
1173 frame->grabstate = frame_state_done; in usbvision_parse_data()
1174 do_gettimeofday(&(frame->timestamp)); in usbvision_parse_data()
1175 frame->sequence = usbvision->frame_num; in usbvision_parse_data()
1178 list_move_tail(&(frame->frame), &usbvision->outqueue); in usbvision_parse_data()
1190 frame->grabstate = frame_state_grabbing; in usbvision_parse_data()
1194 frame->scanlength += copylen; in usbvision_parse_data()
1323 frame); in usbvision_isoc_irq()
1806 usbvision->frame[i].index = i; in usbvision_frames_alloc()
1807 usbvision->frame[i].grabstate = frame_state_unused; in usbvision_frames_alloc()
1808 usbvision->frame[i].data = usbvision->fbuf + in usbvision_frames_alloc()
1815 usbvision->frame[i].width = usbvision->curwidth; in usbvision_frames_alloc()
1816 usbvision->frame[i].height = usbvision->curheight; in usbvision_frames_alloc()
1817 usbvision->frame[i].bytes_read = 0; in usbvision_frames_alloc()
1852 usbvision->frame[i].grabstate = frame_state_unused; in usbvision_empty_framequeues()
1853 usbvision->frame[i].bytes_read = 0; in usbvision_empty_framequeues()