Lines Matching full:vb

379 static inline void store_byte(struct go7007_buffer *vb, u8 byte)  in store_byte()  argument
381 if (vb && vb->vb.vb2_buf.planes[0].bytesused < GO7007_BUF_SIZE) { in store_byte()
382 u8 *ptr = vb2_plane_vaddr(&vb->vb.vb2_buf, 0); in store_byte()
384 ptr[vb->vb.vb2_buf.planes[0].bytesused++] = byte; in store_byte()
388 static void go7007_set_motion_regions(struct go7007 *go, struct go7007_buffer *vb, in go7007_set_motion_regions() argument
396 .frame_sequence = vb->vb.sequence, in go7007_set_motion_regions()
410 static void go7007_motion_regions(struct go7007 *go, struct go7007_buffer *vb) in go7007_motion_regions() argument
412 u32 *bytesused = &vb->vb.vb2_buf.planes[0].bytesused; in go7007_motion_regions()
420 store_byte(vb, go->active_map[i]); in go7007_motion_regions()
433 go7007_set_motion_regions(go, vb, motion_regions); in go7007_motion_regions()
439 static struct go7007_buffer *frame_boundary(struct go7007 *go, struct go7007_buffer *vb) in frame_boundary() argument
445 if (vb == NULL) { in frame_boundary()
448 vb = go->active_buf = in frame_boundary()
452 return vb; in frame_boundary()
454 bytesused = &vb->vb.vb2_buf.planes[0].bytesused; in frame_boundary()
456 vb->vb.sequence = go->next_seq++; in frame_boundary()
457 if (vb->modet_active && *bytesused + 216 < GO7007_BUF_SIZE) in frame_boundary()
458 go7007_motion_regions(go, vb); in frame_boundary()
460 go7007_set_motion_regions(go, vb, 0); in frame_boundary()
462 vb->vb.vb2_buf.timestamp = ktime_get_ns(); in frame_boundary()
463 vb_tmp = vb; in frame_boundary()
465 list_del(&vb->list); in frame_boundary()
467 vb = NULL; in frame_boundary()
469 vb = list_first_entry(&go->vidq_active, in frame_boundary()
471 go->active_buf = vb; in frame_boundary()
473 vb2_buffer_done(&vb_tmp->vb.vb2_buf, VB2_BUF_STATE_DONE); in frame_boundary()
474 return vb; in frame_boundary()
498 struct go7007_buffer *vb = go->active_buf; in go7007_parse_video_stream() local
516 if (vb && vb->vb.vb2_buf.planes[0].bytesused >= in go7007_parse_video_stream()
519 vb->vb.vb2_buf.planes[0].bytesused = 0; in go7007_parse_video_stream()
520 vb->frame_offset = 0; in go7007_parse_video_stream()
521 vb->modet_active = 0; in go7007_parse_video_stream()
522 vb = go->active_buf = NULL; in go7007_parse_video_stream()
535 store_byte(vb, buf[i]); in go7007_parse_video_stream()
545 store_byte(vb, 0x00); in go7007_parse_video_stream()
549 store_byte(vb, 0x00); in go7007_parse_video_stream()
550 store_byte(vb, buf[i]); in go7007_parse_video_stream()
558 store_byte(vb, 0x00); in go7007_parse_video_stream()
565 store_byte(vb, 0x00); in go7007_parse_video_stream()
566 store_byte(vb, 0x00); in go7007_parse_video_stream()
570 store_byte(vb, 0x00); in go7007_parse_video_stream()
571 store_byte(vb, 0x00); in go7007_parse_video_stream()
572 store_byte(vb, buf[i]); in go7007_parse_video_stream()
580 store_byte(vb, 0x00); in go7007_parse_video_stream()
581 store_byte(vb, 0x00); in go7007_parse_video_stream()
582 store_byte(vb, 0x01); in go7007_parse_video_stream()
583 store_byte(vb, 0xF8); in go7007_parse_video_stream()
595 if (vb == NULL || go->seen_frame) in go7007_parse_video_stream()
596 vb = frame_boundary(go, vb); in go7007_parse_video_stream()
598 if (vb && go->seen_frame) in go7007_parse_video_stream()
599 vb->frame_offset = in go7007_parse_video_stream()
600 vb->vb.vb2_buf.planes[0].bytesused; in go7007_parse_video_stream()
619 store_byte(vb, 0x00); in go7007_parse_video_stream()
620 store_byte(vb, 0x00); in go7007_parse_video_stream()
621 store_byte(vb, 0x01); in go7007_parse_video_stream()
625 store_byte(vb, 0x00); in go7007_parse_video_stream()
626 store_byte(vb, 0x00); in go7007_parse_video_stream()
627 store_byte(vb, 0x01); in go7007_parse_video_stream()
628 store_byte(vb, buf[i]); in go7007_parse_video_stream()
636 store_byte(vb, 0xFF); in go7007_parse_video_stream()
640 store_byte(vb, 0xFF); in go7007_parse_video_stream()
645 vb = frame_boundary(go, vb); in go7007_parse_video_stream()
648 store_byte(vb, 0xFF); in go7007_parse_video_stream()
649 store_byte(vb, buf[i]); in go7007_parse_video_stream()
672 } else if (go->parse_length == 207 && vb) { in go7007_parse_video_stream()
673 vb->modet_active = buf[i]; in go7007_parse_video_stream()